diff --git a/packages/uui-ref-node/lib/uui-ref-node.element.ts b/packages/uui-ref-node/lib/uui-ref-node.element.ts index 15d8c818a..56254786f 100644 --- a/packages/uui-ref-node/lib/uui-ref-node.element.ts +++ b/packages/uui-ref-node/lib/uui-ref-node.element.ts @@ -185,6 +185,7 @@ export class UUIRefNodeElement extends UUIRefElement { align-items: center; line-height: 1.2em; padding: calc(var(--uui-size-3)); + width: calc(100% - 2 * var(--uui-size-3)); } #open-part { @@ -193,6 +194,7 @@ export class UUIRefNodeElement extends UUIRefElement { cursor: pointer; display: flex; flex-grow: 1; + width: calc(100%); } #icon { @@ -210,12 +212,17 @@ export class UUIRefNodeElement extends UUIRefElement { justify-content: center; height: 100%; padding-left: var(--uui-size-2); + max-width: calc(100% - 2 * var(--uui-size-3) - var(--uui-size-2)); margin-top: 1px; } #detail { opacity: 0.6; line-height: 1.2em; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + max-width: calc(100%); } :host([selectable]) #open-part { diff --git a/packages/uui-ref-node/lib/uui-ref-node.story.ts b/packages/uui-ref-node/lib/uui-ref-node.story.ts index da35fad20..2b00cd059 100644 --- a/packages/uui-ref-node/lib/uui-ref-node.story.ts +++ b/packages/uui-ref-node/lib/uui-ref-node.story.ts @@ -62,6 +62,17 @@ export const Href: Story = { }, }; +export const LongLink: Story = { + args: { + name: 'Example with very long link', + detail: + 'https://www.example.com/search/results?page=12&sort=ascending&category=electronics&subcategory=smartphones&brand=Samsung&min_price=199.99&max_price=1499.99&availability=in_stock&rating=4_plus&discount=true&shipping=free&color=black%2Cwhite%2Cblue&features=5G%2Cwireless_charging%2Cwaterproof&seller=official_store&lang=en_US¤cy=USD&ref=homepage_banner&utm_source=google&utm_medium=cpc&utm_campaign=fall_sale_2025&utm_term=smartphone_deals&utm_content=ad_variant_3&session_id=8a7b9c123f00456d87eabc990f12a345&user_id=anonymous_54b23ff89d12×tamp=2025-10-12T16%3A45%3A30Z&tracking_code=XYZ123ABC789DEF456GHI', + 'actions slot': html`Remove`, + }, +}; + export const Selectable: Story = { args: { selectable: true,