@ds-gn/ui 0.11.1 → 0.11.2

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>
@@ -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" />`;
@@ -1171,11 +1172,11 @@ class Toaster extends Base {
1171
1172
  }
1172
1173
  _place() {
1173
1174
  if (!this._container || !this._containerRoot) {
1174
- const container2 = document.createElement("div");
1175
- container2.setAttribute("data-dsgn-toaster", "");
1176
- const root = container2.attachShadow({ mode: "open" });
1175
+ const container = document.createElement("div");
1176
+ container.setAttribute("data-dsgn-toaster", "");
1177
+ const root = container.attachShadow({ mode: "open" });
1177
1178
  adoptStyles(root, this.constructor.elementStyles);
1178
- this._container = container2;
1179
+ this._container = container;
1179
1180
  this._containerRoot = root;
1180
1181
  }
1181
1182
  const container = this._container;
@@ -1342,11 +1343,11 @@ class Toaster extends Base {
1342
1343
  ${repeat(this._assertive, ({ id }) => id, ({ text }) => html2`<p>${text}</p>`)}
1343
1344
  </div>
1344
1345
  ${queueText ? html2`<div part="queue" class=${queueClasses()} aria-hidden="true">
1345
- ${queueText}
1346
- </div>` : nothing}
1346
+ ${queueText}
1347
+ </div>` : nothing}
1347
1348
  ${stack.length ? html2`<ol part="list" class=${listClasses()}>
1348
- ${repeat([...stack].reverse(), (record) => record.id, (record) => this._toastTemplate(record))}
1349
- </ol>` : nothing}
1349
+ ${repeat([...stack].reverse(), (record) => record.id, (record) => this._toastTemplate(record))}
1350
+ </ol>` : nothing}
1350
1351
  </section>
1351
1352
  `;
1352
1353
  }
@@ -1383,10 +1384,10 @@ class Toaster extends Base {
1383
1384
  @click=${() => this._dismiss(record, toastDismissReasonValues.CLOSE)}
1384
1385
  ></dsgn-button>
1385
1386
  ${record.duration > 0 ? html2`<div
1386
- part="progress"
1387
- class=${progressClasses(variant, this._paused)}
1388
- aria-hidden="true"
1389
- ></div>` : nothing}
1387
+ part="progress"
1388
+ class=${progressClasses(variant, this._paused)}
1389
+ aria-hidden="true"
1390
+ ></div>` : nothing}
1390
1391
  </div>
1391
1392
  </li>
1392
1393
  `;
@@ -1397,11 +1398,11 @@ class Toaster extends Base {
1397
1398
  <div class=${bodyClasses()}>
1398
1399
  <p part="title" class=${titleClasses()}>${options.title}</p>
1399
1400
  ${options.description ? html2`<p part="description" class=${descriptionClasses()}>
1400
- ${options.description}
1401
- </p>` : nothing}
1401
+ ${options.description}
1402
+ </p>` : nothing}
1402
1403
  ${links.length ? html2`<div part="links" class=${linksClasses()}>
1403
- ${links.map((link) => this._linkTemplate(link))}
1404
- </div>` : nothing}
1404
+ ${links.map((link) => this._linkTemplate(link))}
1405
+ </div>` : nothing}
1405
1406
  ${actions.length && !compact ? this._actionsTemplate(record, actions, false) : nothing}
1406
1407
  </div>
1407
1408
  `;
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.2",
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": {