@ds-gn/ui 0.11.1 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -126,6 +126,7 @@ import {
126
126
  nothing
127
127
  } from "lit";
128
128
  import { property, state } from "lit/decorators.js";
129
+
129
130
  // components/Icon/src/icons/loader.ts
130
131
  import { svg } from "lit";
131
132
  var loader = svg`<path d="M12 2v4" /><path d="m16.2 7.8 2.9-2.9" /><path d="M18 12h4" /><path d="m16.2 16.2 2.9 2.9" /><path d="M12 18v4" /><path d="m4.9 19.1 2.9-2.9" /><path d="M2 12h4" /><path d="m4.9 4.9 2.9 2.9" />`;
@@ -123,6 +123,7 @@ var surfaceProps = enumCreator(Object.values(surfaceValues), "surface", String,
123
123
  // components/Callout/src/Callout.ts
124
124
  import { html as html2 } from "lit";
125
125
  import { property } from "lit/decorators.js";
126
+
126
127
  // components/Icon/src/icons/circle-alert.ts
127
128
  import { svg } from "lit";
128
129
  var circleAlert = svg`<circle cx="12" cy="12" r="10" /><line x1="12" x2="12" y1="8" y2="12" /><line x1="12" x2="12.01" y1="16" y2="16" />`;
@@ -523,10 +523,10 @@ class Card extends Base {
523
523
  >${feature.label}</dsgn-feature-item
524
524
  >
525
525
  ${feature.bullets?.length ? html2`<ul class="${bulletsClasses()}">
526
- ${feature.bullets.map((bullet) => html2`<li class="${bulletItemClasses()}">
527
- ${bullet}
528
- </li>`)}
529
- </ul>` : nothing}
526
+ ${feature.bullets.map((bullet) => html2`<li class="${bulletItemClasses()}">
527
+ ${bullet}
528
+ </li>`)}
529
+ </ul>` : nothing}
530
530
  </div>`)}
531
531
  </div>` : nothing;
532
532
  }
@@ -93,6 +93,7 @@ defineElement("dsgn-base", Base);
93
93
  // components/CodeSnippet/src/CodeSnippet.ts
94
94
  import { html as html2, nothing } from "lit";
95
95
  import { property, state } from "lit/decorators.js";
96
+
96
97
  // components/Icon/src/icons/check.ts
97
98
  import { svg } from "lit";
98
99
  var check = svg`<path d="M20 6 9 17l-5-5" />`;
@@ -416,14 +417,14 @@ class CodeSnippet extends Base {
416
417
  const hasHeader = this.filename || this.language || this.copyLabel;
417
418
  return html2`<div class="${classNames()}">
418
419
  ${hasHeader ? html2`<div class="${headerClassNames()}">
419
- <span class="${metaClassNames()}">
420
- ${this.filename ? html2`<span class="${filenameClassNames()}"
421
- >${this.filename}</span
422
- >` : nothing}
423
- ${this.language ? html2`<span>${this.language}</span>` : nothing}
424
- </span>
425
- ${this._renderButton()}
426
- </div>` : nothing}
420
+ <span class="${metaClassNames()}">
421
+ ${this.filename ? html2`<span class="${filenameClassNames()}"
422
+ >${this.filename}</span
423
+ >` : nothing}
424
+ ${this.language ? html2`<span>${this.language}</span>` : nothing}
425
+ </span>
426
+ ${this._renderButton()}
427
+ </div>` : nothing}
427
428
  <slot></slot>
428
429
  <span class="${liveRegionClassNames()}" role="status" aria-live="polite"
429
430
  >${this._copied ? this.copiedLabel : ""}</span
@@ -1481,9 +1481,11 @@ class DropdownMenu extends Base {
1481
1481
  >
1482
1482
  ${this._renderIcon(entry.icon, plain)}
1483
1483
  <span class="${itemLabelClasses()}">${entry.label}</span>
1484
- ${entry.shortcut ? html2`<span part="item-shortcut" class="${itemShortcutClasses(plain)}"
1485
- >${entry.shortcut}</span
1486
- >` : nothing}
1484
+ ${entry.shortcut ? html2`<span
1485
+ part="item-shortcut"
1486
+ class="${itemShortcutClasses(plain)}"
1487
+ >${entry.shortcut}</span
1488
+ >` : nothing}
1487
1489
  </div>`;
1488
1490
  }
1489
1491
  render() {
@@ -1175,17 +1175,17 @@ class FeatureTabs extends Base {
1175
1175
  return nothing;
1176
1176
  return html2`<div class="${ctaRowClassNames()}">
1177
1177
  ${hasPrimary ? html2`<dsgn-button
1178
- appearance="solid"
1179
- surface="dark"
1180
- href=${feature.ctaHref ?? ""}
1181
- >${feature.ctaLabel}</dsgn-button
1182
- >` : nothing}
1178
+ appearance="solid"
1179
+ surface="dark"
1180
+ href=${feature.ctaHref ?? ""}
1181
+ >${feature.ctaLabel}</dsgn-button
1182
+ >` : nothing}
1183
1183
  ${hasSecondary ? html2`<dsgn-button
1184
- appearance="ghost"
1185
- surface="dark"
1186
- href=${feature.ctaSecondaryHref ?? ""}
1187
- >${feature.ctaSecondaryLabel}</dsgn-button
1188
- >` : nothing}
1184
+ appearance="ghost"
1185
+ surface="dark"
1186
+ href=${feature.ctaSecondaryHref ?? ""}
1187
+ >${feature.ctaSecondaryLabel}</dsgn-button
1188
+ >` : nothing}
1189
1189
  </div>`;
1190
1190
  }
1191
1191
  _renderDetailPanel(idx, feature, progress, total, paused, features, slot) {
@@ -1284,9 +1284,9 @@ class FeatureTabs extends Base {
1284
1284
  >
1285
1285
  <span class="${railClassNames()}"></span>
1286
1286
  ${i === idx ? html2`<span
1287
- class="${railFillClassNames()}"
1288
- style=${styleMap({ height: `${progress * 100}%` })}
1289
- ></span>` : ""}
1287
+ class="${railFillClassNames()}"
1288
+ style=${styleMap({ height: `${progress * 100}%` })}
1289
+ ></span>` : ""}
1290
1290
  <span class="${tabInnerClassNames()}">
1291
1291
  <span class="${iconBadgeClassNames(i === idx)}">
1292
1292
  ${this._renderIcon(feat.icon, "sm")}
@@ -438,19 +438,19 @@ class FormBlock extends Base {
438
438
  return html2`
439
439
  <div class="${formGroupClassNames()}">
440
440
  ${!this._showSuccess ? html2`
441
- <div class="${formRowClassNames(this._fading, this.alignment)}">
442
- <div class="${inputWrapperClassNames()}">
443
- <slot name="input"></slot>
441
+ <div class="${formRowClassNames(this._fading, this.alignment)}">
442
+ <div class="${inputWrapperClassNames()}">
443
+ <slot name="input"></slot>
444
+ </div>
445
+ <slot name="button"></slot>
444
446
  </div>
445
- <slot name="button"></slot>
446
- </div>
447
- ${this._note ? html2`<div class="${noteClassNames(this.alignment)}">
448
- <slot name="note"></slot>
449
- </div>` : nothing}
450
- ` : nothing}
447
+ ${this._note ? html2`<div class="${noteClassNames(this.alignment)}">
448
+ <slot name="note"></slot>
449
+ </div>` : nothing}
450
+ ` : nothing}
451
451
  ${this._showSuccess && this._successSlot ? html2`<div class="${successRowClassNames(this.alignment)}">
452
- <slot name="success"></slot>
453
- </div>` : nothing}
452
+ <slot name="success"></slot>
453
+ </div>` : nothing}
454
454
  </div>
455
455
  `;
456
456
  }
@@ -262,8 +262,8 @@ class HeadingBlock extends Base {
262
262
  return html2`
263
263
  <dsgn-stack direction="vertical" gap="md" align=${align}>
264
264
  ${this._eyebrow ? html2`<div class="${eyebrowClassNames()}">
265
- <slot name="eyebrow"></slot>
266
- </div>` : nothing}
265
+ <slot name="eyebrow"></slot>
266
+ </div>` : nothing}
267
267
  <slot name="heading"></slot>
268
268
  <div class="${descriptionClassNames()}">
269
269
  <slot name="description"></slot>
@@ -130,6 +130,7 @@ var surfaceValues = {
130
130
  DARK: "dark"
131
131
  };
132
132
  var surfaceProps = enumCreator(Object.values(surfaceValues), "surface", String, { reflect: true });
133
+
133
134
  // components/Icon/src/icons/circle-alert.ts
134
135
  import { svg } from "lit";
135
136
  var circleAlert = svg`<circle cx="12" cy="12" r="10" /><line x1="12" x2="12" y1="8" y2="12" /><line x1="12" x2="12.01" y1="16" y2="16" />`;
@@ -707,11 +708,11 @@ class Input extends Base {
707
708
  class="${labelClasses(this.size, this.isDisabled)}"
708
709
  for="input"
709
710
  >${this.label}${this.required ? html2` <span
710
- part="required-indicator"
711
- class="${requiredClasses()}"
712
- aria-hidden="true"
713
- >*</span
714
- >` : nothing}</label
711
+ part="required-indicator"
712
+ class="${requiredClasses()}"
713
+ aria-hidden="true"
714
+ >*</span
715
+ >` : nothing}</label
715
716
  >`;
716
717
  }
717
718
  _renderHint() {
@@ -129,6 +129,7 @@ import {
129
129
  buttonAppearanceValues,
130
130
  buttonIconPositionValues
131
131
  } from "../../Button/src/Button.props.js";
132
+
132
133
  // components/Icon/src/icons/x.ts
133
134
  import { svg } from "lit";
134
135
  var x = svg`<path d="M18 6 6 18" /><path d="m6 6 12 12" />`;
@@ -1135,15 +1136,15 @@ class Modal extends Base {
1135
1136
  >
1136
1137
  <slot name="close" @slotchange=${this._handleSlotChange}>
1137
1138
  ${this.noCloseControl ? nothing : html2`
1138
- <dsgn-button
1139
- part="close-button"
1140
- .surface=${this.surface}
1141
- .appearance=${buttonAppearanceValues.GHOST}
1142
- .icon=${x}
1143
- .iconPosition=${buttonIconPositionValues.ONLY}
1144
- aria-label=${this.closeLabel}
1145
- ></dsgn-button>
1146
- `}
1139
+ <dsgn-button
1140
+ part="close-button"
1141
+ .surface=${this.surface}
1142
+ .appearance=${buttonAppearanceValues.GHOST}
1143
+ .icon=${x}
1144
+ .iconPosition=${buttonIconPositionValues.ONLY}
1145
+ aria-label=${this.closeLabel}
1146
+ ></dsgn-button>
1147
+ `}
1147
1148
  </slot>
1148
1149
  </div>
1149
1150
  </header>
@@ -1159,7 +1160,7 @@ class Modal extends Base {
1159
1160
  <div class=${bodyClasses()}>
1160
1161
  <slot></slot>
1161
1162
  </div>
1162
- <footer class=${footerClasses(this._hasFooter)}>
1163
+ <footer role="presentation" class=${footerClasses(this._hasFooter)}>
1163
1164
  <slot name="footer" @slotchange=${this._handleSlotChange}></slot>
1164
1165
  </footer>
1165
1166
  </div>
@@ -126,6 +126,7 @@ var surfaceProps = enumCreator(Object.values(surfaceValues), "surface", String,
126
126
 
127
127
  // components/Nav/src/Nav.ts
128
128
  import { containerSizeValues } from "../../Container/src/Container.props.js";
129
+
129
130
  // components/Icon/src/icons/menu.ts
130
131
  import { svg } from "lit";
131
132
  var menu = svg`<line x1="4" x2="20" y1="12" y2="12" /><line x1="4" x2="20" y1="6" y2="6" /><line x1="4" x2="20" y1="18" y2="18" />`;
@@ -676,20 +677,20 @@ class Nav extends Base {
676
677
  <slot name="logo"></slot>
677
678
  </div>
678
679
  ${this.hasNavigationItems ? html2`
679
- <button
680
- class="${menuButtonClasses()}"
681
- type="button"
682
- aria-controls="mobile-nav-menu"
683
- aria-expanded=${this.menuOpen ? "true" : "false"}
684
- aria-label=${this.menuOpen ? this.menuCloseLabel : this.menuOpenLabel}
685
- @click=${this.toggleMenu}
686
- >
687
- <dsgn-icon
688
- .icon=${this.menuOpen ? x : menu}
689
- size="xl"
690
- ></dsgn-icon>
691
- </button>
692
- ` : nothing}
680
+ <button
681
+ class="${menuButtonClasses()}"
682
+ type="button"
683
+ aria-controls="mobile-nav-menu"
684
+ aria-expanded=${this.menuOpen ? "true" : "false"}
685
+ aria-label=${this.menuOpen ? this.menuCloseLabel : this.menuOpenLabel}
686
+ @click=${this.toggleMenu}
687
+ >
688
+ <dsgn-icon
689
+ .icon=${this.menuOpen ? x : menu}
690
+ size="xl"
691
+ ></dsgn-icon>
692
+ </button>
693
+ ` : nothing}
693
694
  <div
694
695
  id="mobile-nav-menu"
695
696
  class="${rightClasses(this.menuOpen)}"
@@ -516,6 +516,7 @@ class BreakpointController {
516
516
  return this.registry.getValue(breakpoint);
517
517
  }
518
518
  }
519
+
519
520
  // components/Icon/src/icons/arrow-right.ts
520
521
  import { svg } from "lit";
521
522
  var arrowRight = svg`<path d="M5 12h14" /><path d="m12 5 7 7-7 7" />`;
@@ -1912,8 +1913,8 @@ class NavLink extends Base {
1912
1913
  ><span class="${nudgeLabelClasses()}"
1913
1914
  ><slot @slotchange=${this.handleLabelSlotChange}></slot></span
1914
1915
  >${this.subheading ? html2`<span class="${linkSubheadingClasses()}"
1915
- >${this.subheading}</span
1916
- >` : nothing}</span
1916
+ >${this.subheading}</span
1917
+ >` : nothing}</span
1917
1918
  ><dsgn-icon
1918
1919
  class="${nudgeArrowClasses()}"
1919
1920
  .icon=${arrowRight}
@@ -1927,8 +1928,8 @@ class NavLink extends Base {
1927
1928
  >
1928
1929
  <slot @slotchange=${this.handleLabelSlotChange}></slot>
1929
1930
  ${this.subheading ? html2`
1930
- <span class="${linkSubheadingClasses()}">${this.subheading}</span>
1931
- ` : nothing}
1931
+ <span class="${linkSubheadingClasses()}">${this.subheading}</span>
1932
+ ` : nothing}
1932
1933
  </span>`;
1933
1934
  }
1934
1935
  renderDisclosureTrigger(labelId) {
@@ -1986,14 +1987,14 @@ class NavLink extends Base {
1986
1987
  <div class="${dropdownPanelClasses()}">
1987
1988
  <div class="${dropdownSlotClasses(this.dropdownColumns)}">
1988
1989
  ${this.shouldRenderOverview ? html2`
1989
- <a
1990
- class="${overviewClasses()}"
1991
- href=${this.href}
1992
- target=${this.target}
1993
- rel=${this.computedRel ?? nothing}
1994
- >${this.overviewLabel}</a
1995
- >
1996
- ` : nothing}
1990
+ <a
1991
+ class="${overviewClasses()}"
1992
+ href=${this.href}
1993
+ target=${this.target}
1994
+ rel=${this.computedRel ?? nothing}
1995
+ >${this.overviewLabel}</a
1996
+ >
1997
+ ` : nothing}
1997
1998
  <slot
1998
1999
  name="dropdown"
1999
2000
  @slotchange=${this.handleDropdownSlotChange}
@@ -520,6 +520,7 @@ var overlayItemClasses = ({
520
520
  ...active ? [fill] : []
521
521
  ];
522
522
  };
523
+
523
524
  // components/Icon/src/icons/check.ts
524
525
  import { svg } from "lit";
525
526
  var check = svg`<path d="M20 6 9 17l-5-5" />`;
@@ -1592,11 +1593,11 @@ class Select extends Base {
1592
1593
  class="${labelClasses(this.size, this._isDisabled)}"
1593
1594
  for="trigger"
1594
1595
  >${this.label}${this.required ? html2` <span
1595
- part="required-indicator"
1596
- class="${requiredClasses()}"
1597
- aria-hidden="true"
1598
- >*</span
1599
- >` : nothing}</label
1596
+ part="required-indicator"
1597
+ class="${requiredClasses()}"
1598
+ aria-hidden="true"
1599
+ >*</span
1600
+ >` : nothing}</label
1600
1601
  >`;
1601
1602
  }
1602
1603
  _renderHint() {
@@ -1052,9 +1052,9 @@ class Table extends Base {
1052
1052
  </table>
1053
1053
  </div>
1054
1054
  ${hasPinned ? nothing : html2`<div
1055
- class="fade-start ${fadeClasses("start")}"
1056
- aria-hidden="true"
1057
- ></div>`}
1055
+ class="fade-start ${fadeClasses("start")}"
1056
+ aria-hidden="true"
1057
+ ></div>`}
1058
1058
  <div class="fade-end ${fadeClasses("end")}" aria-hidden="true"></div>
1059
1059
  </div>
1060
1060
  </div>`;
@@ -136,6 +136,7 @@ import {
136
136
  buttonSizeValues
137
137
  } from "../../Button/src/Button.props.js";
138
138
  import { Icon } from "../../Icon/src/Icon.js";
139
+
139
140
  // components/Icon/src/icons/circle-check.ts
140
141
  import { svg } from "lit";
141
142
  var circleCheck = svg`<circle cx="12" cy="12" r="10" /><path d="m9 12 2 2 4-4" />`;
@@ -226,6 +227,8 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
226
227
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
227
228
  monospace;
228
229
  --spacing: 0.25rem;
230
+ --text-xs: 0.75rem;
231
+ --text-xs--line-height: calc(1 / 0.75);
229
232
  --text-sm: 0.875rem;
230
233
  --text-sm--line-height: calc(1.25 / 0.875);
231
234
  --font-weight-semibold: 600;
@@ -234,8 +237,11 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
234
237
  --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
235
238
  --duration-quick: var(--dsgn-src-duration-quick, 180ms);
236
239
  --ease-standard: var(--dsgn-src-ease-standard, cubic-bezier(0.2, 0, 0, 1));
240
+ --color-button-inline-text: inherit;
241
+ --color-button-inline-text-hover: inherit;
237
242
  --color-error: inherit;
238
243
  --color-error-strong: inherit;
244
+ --color-focus: inherit;
239
245
  --color-info: inherit;
240
246
  --color-outline-strong: inherit;
241
247
  --color-popover-bg: inherit;
@@ -345,6 +351,9 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
345
351
  .inline {
346
352
  display: inline;
347
353
  }
354
+ .inline-flex {
355
+ display: inline-flex;
356
+ }
348
357
  .size-5 {
349
358
  width: calc(var(--spacing) * 5);
350
359
  height: calc(var(--spacing) * 5);
@@ -471,9 +480,15 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
471
480
  .p-0 {
472
481
  padding: calc(var(--spacing) * 0);
473
482
  }
483
+ .px-1 {
484
+ padding-inline: calc(var(--spacing) * 1);
485
+ }
474
486
  .px-2\\.5 {
475
487
  padding-inline: calc(var(--spacing) * 2.5);
476
488
  }
489
+ .py-0\\.5 {
490
+ padding-block: calc(var(--spacing) * 0.5);
491
+ }
477
492
  .py-2\\.5 {
478
493
  padding-block: calc(var(--spacing) * 2.5);
479
494
  }
@@ -499,6 +514,10 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
499
514
  font-size: var(--text-sm);
500
515
  line-height: var(--tw-leading, var(--text-sm--line-height));
501
516
  }
517
+ .text-xs {
518
+ font-size: var(--text-xs);
519
+ line-height: var(--tw-leading, var(--text-xs--line-height));
520
+ }
502
521
  .text-\\[11px\\] {
503
522
  font-size: 11px;
504
523
  }
@@ -518,6 +537,12 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
518
537
  --tw-tracking: 0.02em;
519
538
  letter-spacing: 0.02em;
520
539
  }
540
+ .whitespace-pre-line {
541
+ white-space: pre-line;
542
+ }
543
+ .text-button-inline-text {
544
+ color: var(--color-button-inline-text);
545
+ }
521
546
  .text-error-strong {
522
547
  color: var(--color-error-strong);
523
548
  }
@@ -536,6 +561,18 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
536
561
  .text-warning-strong {
537
562
  color: var(--color-warning-strong);
538
563
  }
564
+ .underline {
565
+ text-decoration-line: underline;
566
+ }
567
+ .decoration-transparent {
568
+ text-decoration-color: transparent;
569
+ }
570
+ .decoration-2 {
571
+ text-decoration-thickness: 2px;
572
+ }
573
+ .underline-offset-4 {
574
+ text-underline-offset: 4px;
575
+ }
539
576
  .shadow-popover {
540
577
  --tw-shadow: inherit;
541
578
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -570,6 +607,42 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
570
607
  opacity: 0%;
571
608
  }
572
609
  }
610
+ .hover\\:text-button-inline-text-hover {
611
+ &:hover {
612
+ @media (hover: hover) {
613
+ color: var(--color-button-inline-text-hover);
614
+ }
615
+ }
616
+ }
617
+ .hover\\:decoration-current {
618
+ &:hover {
619
+ @media (hover: hover) {
620
+ text-decoration-color: currentcolor;
621
+ }
622
+ }
623
+ }
624
+ .focus-visible\\:outline {
625
+ &:focus-visible {
626
+ outline-style: var(--tw-outline-style);
627
+ outline-width: 1px;
628
+ }
629
+ }
630
+ .focus-visible\\:outline-2 {
631
+ &:focus-visible {
632
+ outline-style: var(--tw-outline-style);
633
+ outline-width: 2px;
634
+ }
635
+ }
636
+ .focus-visible\\:outline-offset-2 {
637
+ &:focus-visible {
638
+ outline-offset: 2px;
639
+ }
640
+ }
641
+ .focus-visible\\:outline-focus {
642
+ &:focus-visible {
643
+ outline-color: var(--color-focus);
644
+ }
645
+ }
573
646
  .data-\\[behind\\]\\:overflow-hidden {
574
647
  &[data-behind] {
575
648
  overflow: hidden;
@@ -750,6 +823,11 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
750
823
  syntax: "*";
751
824
  inherits: false;
752
825
  }
826
+ @property --tw-outline-style {
827
+ syntax: "*";
828
+ inherits: false;
829
+ initial-value: solid;
830
+ }
753
831
  @property --tw-content {
754
832
  syntax: "*";
755
833
  initial-value: "";
@@ -783,6 +861,7 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
783
861
  --tw-ring-offset-shadow: 0 0 #0000;
784
862
  --tw-duration: initial;
785
863
  --tw-ease: initial;
864
+ --tw-outline-style: solid;
786
865
  --tw-content: "";
787
866
  --dsgn-border-sweep-angle: 0deg;
788
867
  }
@@ -858,8 +937,9 @@ var iconColorClasses = {
858
937
  var iconClasses = (variant, compact) => clsx_default("size-5", "shrink-0", "fill-none", "stroke-current", "stroke-[1.75]", !compact && "mt-px", iconColorClasses[variant], behindHidden);
859
938
  var bodyClasses = () => clsx_default("flex-1", "min-w-0", "flex", "flex-col", "gap-0.5", behindHidden);
860
939
  var titleClasses = () => clsx_default("text-sm", "leading-5", "font-semibold", "text-text-primary");
861
- var descriptionClasses = () => clsx_default("text-sm", "leading-5", "text-text-secondary");
940
+ var descriptionClasses = () => clsx_default("text-sm", "leading-5", "text-text-secondary", "whitespace-pre-line");
862
941
  var linksClasses = () => clsx_default("flex", "flex-wrap", "gap-x-4", "gap-y-1", "mt-1");
942
+ var linkClasses = () => clsx_default(touchTargetClasses(), "inline-flex", "items-center", "px-1", "py-0.5", "text-xs", "font-semibold", "text-button-inline-text", "hover:text-button-inline-text-hover", "underline", "decoration-2", "underline-offset-4", "decoration-transparent", "hover:decoration-current", "focus-visible:outline", "focus-visible:outline-2", "focus-visible:outline-offset-2", "focus-visible:outline-focus");
863
943
  var actionsClasses = (inline) => clsx_default("flex", "flex-wrap", "gap-2", inline ? ["shrink-0", behindHidden] : "mt-2.5");
864
944
  var touchTargetClasses = () => clsx_default("relative", "pointer-coarse:after:content-['']", "pointer-coarse:after:absolute", "pointer-coarse:after:-inset-1.5");
865
945
  var dismissClasses = (compact) => clsx_default(touchTargetClasses(), "shrink-0", !compact && "-mt-1.5", behindHidden);
@@ -1171,11 +1251,11 @@ class Toaster extends Base {
1171
1251
  }
1172
1252
  _place() {
1173
1253
  if (!this._container || !this._containerRoot) {
1174
- const container2 = document.createElement("div");
1175
- container2.setAttribute("data-dsgn-toaster", "");
1176
- const root = container2.attachShadow({ mode: "open" });
1254
+ const container = document.createElement("div");
1255
+ container.setAttribute("data-dsgn-toaster", "");
1256
+ const root = container.attachShadow({ mode: "open" });
1177
1257
  adoptStyles(root, this.constructor.elementStyles);
1178
- this._container = container2;
1258
+ this._container = container;
1179
1259
  this._containerRoot = root;
1180
1260
  }
1181
1261
  const container = this._container;
@@ -1304,7 +1384,7 @@ class Toaster extends Base {
1304
1384
  if (queued > 0) {
1305
1385
  parts.push(this.queuedLabel ? this.queuedLabel.replaceAll(QUEUED_COUNT_TOKEN, String(queued)) : `+${queued}`);
1306
1386
  }
1307
- if (this._paused && this.pausedLabel && this._stack().length > 0) {
1387
+ if (this._paused && this.pausedLabel && this._stack().some((record) => record.phase === "shown" && record.duration > 0)) {
1308
1388
  parts.push(this.pausedLabel);
1309
1389
  }
1310
1390
  return parts.join(" · ");
@@ -1342,11 +1422,11 @@ class Toaster extends Base {
1342
1422
  ${repeat(this._assertive, ({ id }) => id, ({ text }) => html2`<p>${text}</p>`)}
1343
1423
  </div>
1344
1424
  ${queueText ? html2`<div part="queue" class=${queueClasses()} aria-hidden="true">
1345
- ${queueText}
1346
- </div>` : nothing}
1425
+ ${queueText}
1426
+ </div>` : nothing}
1347
1427
  ${stack.length ? html2`<ol part="list" class=${listClasses()}>
1348
- ${repeat([...stack].reverse(), (record) => record.id, (record) => this._toastTemplate(record))}
1349
- </ol>` : nothing}
1428
+ ${repeat([...stack].reverse(), (record) => record.id, (record) => this._toastTemplate(record))}
1429
+ </ol>` : nothing}
1350
1430
  </section>
1351
1431
  `;
1352
1432
  }
@@ -1383,10 +1463,10 @@ class Toaster extends Base {
1383
1463
  @click=${() => this._dismiss(record, toastDismissReasonValues.CLOSE)}
1384
1464
  ></dsgn-button>
1385
1465
  ${record.duration > 0 ? html2`<div
1386
- part="progress"
1387
- class=${progressClasses(variant, this._paused)}
1388
- aria-hidden="true"
1389
- ></div>` : nothing}
1466
+ part="progress"
1467
+ class=${progressClasses(variant, this._paused)}
1468
+ aria-hidden="true"
1469
+ ></div>` : nothing}
1390
1470
  </div>
1391
1471
  </li>
1392
1472
  `;
@@ -1397,11 +1477,11 @@ class Toaster extends Base {
1397
1477
  <div class=${bodyClasses()}>
1398
1478
  <p part="title" class=${titleClasses()}>${options.title}</p>
1399
1479
  ${options.description ? html2`<p part="description" class=${descriptionClasses()}>
1400
- ${options.description}
1401
- </p>` : nothing}
1480
+ ${options.description}
1481
+ </p>` : nothing}
1402
1482
  ${links.length ? html2`<div part="links" class=${linksClasses()}>
1403
- ${links.map((link) => this._linkTemplate(link))}
1404
- </div>` : nothing}
1483
+ ${links.map((link) => this._linkTemplate(link))}
1484
+ </div>` : nothing}
1405
1485
  ${actions.length && !compact ? this._actionsTemplate(record, actions, false) : nothing}
1406
1486
  </div>
1407
1487
  `;
@@ -1439,12 +1519,20 @@ class Toaster extends Base {
1439
1519
  </div>`;
1440
1520
  }
1441
1521
  _linkTemplate(link) {
1522
+ if (link.href)
1523
+ return html2`<a
1524
+ class=${linkClasses()}
1525
+ href=${link.href}
1526
+ target=${link.target ?? nothing}
1527
+ rel=${link.target === "_blank" ? "noopener" : nothing}
1528
+ @click=${() => link.onClick?.()}
1529
+ >${link.label}</a
1530
+ >`;
1442
1531
  return html2`<dsgn-button
1443
1532
  class=${touchTargetClasses()}
1444
1533
  .surface=${this.surface}
1445
1534
  .size=${buttonSizeValues.SM}
1446
1535
  .appearance=${buttonAppearanceValues.INLINE}
1447
- .href=${link.href ?? ""}
1448
1536
  @click=${() => link.onClick?.()}
1449
1537
  >${link.label}</dsgn-button
1450
1538
  >`;
@@ -37,8 +37,11 @@ export declare const toastClasses: (compact: boolean) => string;
37
37
  export declare const iconClasses: (variant: ToastVariantType, compact: boolean) => string;
38
38
  export declare const bodyClasses: () => string;
39
39
  export declare const titleClasses: () => string;
40
+ /** `pre-line` keeps paragraph breaks authored as newlines. */
40
41
  export declare const descriptionClasses: () => string;
41
42
  export declare const linksClasses: () => string;
43
+ /** Native links keep touch-target hits on the anchor and preserve navigation. */
44
+ export declare const linkClasses: () => string;
42
45
  /** The action row: 10px under the text, or inline in a title-only toast. */
43
46
  export declare const actionsClasses: (inline: boolean) => string;
44
47
  /**
@@ -46,6 +46,8 @@ export interface ToastAction {
46
46
  export interface ToastLink {
47
47
  label: string;
48
48
  href?: string;
49
+ /** With `href`, `_blank` opens a new tab (with `rel="noopener"`). */
50
+ target?: '_blank' | '_self';
49
51
  onClick?: () => void;
50
52
  }
51
53
  export interface ToastOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ds-gn/ui",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
4
4
  "description": "UI components for the DS-GN Design System",
5
5
  "type": "module",
6
6
  "exports": {
@@ -396,8 +396,8 @@
396
396
  "react-dom": "19.2.4"
397
397
  },
398
398
  "dependencies": {
399
- "@ds-gn/motion": "0.11.1",
400
- "@ds-gn/tokens": "0.11.1",
399
+ "@ds-gn/motion": "0.11.2",
400
+ "@ds-gn/tokens": "0.11.2",
401
401
  "@lit-labs/observers": "^2.0.5",
402
402
  "@lit/react": "^1.0.7",
403
403
  "clsx": "^2.1.1"
@@ -412,7 +412,7 @@
412
412
  }
413
413
  },
414
414
  "engines": {
415
- "bun": ">=1.4.0"
415
+ "bun": ">=1.4.4"
416
416
  },
417
417
  "customElements": "custom-elements.json",
418
418
  "repository": {