@ds-mo/ui 2.15.0 → 3.0.1

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.
Files changed (157) hide show
  1. package/dist/.build-stamp +1 -1
  2. package/dist/components/ds-app-shell.js +1 -1
  3. package/dist/components/ds-badge.js +1 -1
  4. package/dist/components/ds-banner.js +1 -1
  5. package/dist/components/ds-banner.js.map +1 -1
  6. package/dist/components/ds-bar-nav.js +1 -1
  7. package/dist/components/ds-bar-nav.js.map +1 -1
  8. package/dist/components/ds-button-filled.js +1 -1
  9. package/dist/components/ds-button-unfilled.js +1 -1
  10. package/dist/components/ds-card-data-viz-donut.js +1 -1
  11. package/dist/components/ds-card-data-viz-donut.js.map +1 -1
  12. package/dist/components/ds-card-setting.js +1 -1
  13. package/dist/components/ds-card.js +1 -1
  14. package/dist/components/ds-chart-bar.js +1 -1
  15. package/dist/components/ds-chart-donut.js +1 -1
  16. package/dist/components/ds-chart-donut.js.map +1 -1
  17. package/dist/components/ds-chart-legend.js +1 -1
  18. package/dist/components/ds-chart-legend.js.map +1 -1
  19. package/dist/components/ds-chart-line.js +1 -1
  20. package/dist/components/ds-checkbox.js +1 -1
  21. package/dist/components/ds-checkbox.js.map +1 -1
  22. package/dist/components/ds-chip.js +1 -1
  23. package/dist/components/ds-chip.js.map +1 -1
  24. package/dist/components/ds-divider.js +1 -1
  25. package/dist/components/ds-empty-state.js +1 -1
  26. package/dist/components/ds-empty-state.js.map +1 -1
  27. package/dist/components/ds-field.js +1 -1
  28. package/dist/components/ds-icon.js +1 -1
  29. package/dist/components/ds-input.js +1 -1
  30. package/dist/components/ds-input.js.map +1 -1
  31. package/dist/components/ds-loader.js +1 -1
  32. package/dist/components/ds-loader.js.map +1 -1
  33. package/dist/components/ds-menu.js +1 -1
  34. package/dist/components/ds-modal.js +1 -1
  35. package/dist/components/ds-modal.js.map +1 -1
  36. package/dist/components/ds-pagination.js +1 -1
  37. package/dist/components/ds-pagination.js.map +1 -1
  38. package/dist/components/ds-panel-nav.js +1 -1
  39. package/dist/components/ds-panel-nav.js.map +1 -1
  40. package/dist/components/ds-panel-tools.js +1 -1
  41. package/dist/components/ds-panel-tools.js.map +1 -1
  42. package/dist/components/ds-radio-group.js +1 -1
  43. package/dist/components/ds-radio-group.js.map +1 -1
  44. package/dist/components/ds-select.js +1 -1
  45. package/dist/components/ds-select.js.map +1 -1
  46. package/dist/components/ds-shell-gradient-picker.js +1 -1
  47. package/dist/components/ds-shell-gradient-swatch.js +1 -1
  48. package/dist/components/ds-slider.js +1 -1
  49. package/dist/components/ds-tab-group-nav.js +1 -1
  50. package/dist/components/ds-tab-group.js +1 -1
  51. package/dist/components/ds-tab-group.js.map +1 -1
  52. package/dist/components/ds-table.js +1 -1
  53. package/dist/components/ds-table.js.map +1 -1
  54. package/dist/components/ds-tag.js +1 -1
  55. package/dist/components/ds-tag.js.map +1 -1
  56. package/dist/components/ds-text.js +1 -1
  57. package/dist/components/ds-toggle.js +1 -1
  58. package/dist/components/ds-tooltip-data-viz.js +1 -1
  59. package/dist/components/ds-tooltip-data-viz.js.map +1 -1
  60. package/dist/components/ds-tooltip.js +1 -1
  61. package/dist/components/p-8WTsyLQ9.js +2 -0
  62. package/dist/components/p-8WTsyLQ9.js.map +1 -0
  63. package/dist/components/{p-CyFVn2Sc.js → p-9Qu1ls2y.js} +2 -2
  64. package/dist/components/p-BOQRM49Q.js +2 -0
  65. package/dist/components/p-BOQRM49Q.js.map +1 -0
  66. package/dist/components/p-BSNlp8Di.js +2 -0
  67. package/dist/components/p-BSNlp8Di.js.map +1 -0
  68. package/dist/components/p-Co2kLhWu.js +2 -0
  69. package/dist/components/p-Co2kLhWu.js.map +1 -0
  70. package/dist/components/p-CsaW5gDM.js +2 -0
  71. package/dist/components/{p-C3ORQUOp.js.map → p-CsaW5gDM.js.map} +1 -1
  72. package/dist/components/{p-BvF44IQK.js → p-Cx-ywr1e.js} +1 -1
  73. package/dist/components/p-Cx-ywr1e.js.map +1 -0
  74. package/dist/components/p-D0gBLLJx.js +2 -0
  75. package/dist/components/p-D0gBLLJx.js.map +1 -0
  76. package/dist/components/p-DEgY_Lnb.js +2 -0
  77. package/dist/components/p-DEgY_Lnb.js.map +1 -0
  78. package/dist/components/p-DI8rHm9u.js +2 -0
  79. package/dist/components/p-DI8rHm9u.js.map +1 -0
  80. package/dist/components/p-DMD-RO1W.js +2 -0
  81. package/dist/components/p-DMD-RO1W.js.map +1 -0
  82. package/dist/components/p-boPMASaQ.js +2 -0
  83. package/dist/components/p-boPMASaQ.js.map +1 -0
  84. package/dist/components/p-vlwhuqVn.js +2 -0
  85. package/dist/components/p-vlwhuqVn.js.map +1 -0
  86. package/dist/lib/utils/control-text.d.ts +4 -4
  87. package/dist/lib/utils/index.d.ts +1 -1
  88. package/dist/lib/utils/index.js.map +2 -2
  89. package/dist/types/components/ChartDonut/ChartDonut.d.ts +2 -7
  90. package/dist/types/components/Loader/Loader.d.ts +7 -3
  91. package/dist/types/components/Loader/index.d.ts +1 -1
  92. package/dist/types/components/Text/Text.d.ts +2 -1
  93. package/dist/types/components/Text/text-utils.d.ts +3 -1
  94. package/dist/types/components/Tooltip/Tooltip.d.ts +6 -0
  95. package/dist/types/components/TooltipDataViz/TooltipDataViz.d.ts +3 -2
  96. package/dist/types/components.d.ts +34 -19
  97. package/dist/types/utils/control-text.d.ts +4 -4
  98. package/dist/types/utils/index.d.ts +1 -1
  99. package/package.json +7 -7
  100. package/src/angular/proxies.ts +2 -2
  101. package/src/wc/components/Banner/Banner.tsx +3 -5
  102. package/src/wc/components/BarNav/BarNav.tsx +14 -6
  103. package/src/wc/components/ButtonFilled/ButtonFilled.tsx +9 -5
  104. package/src/wc/components/ButtonUnfilled/ButtonUnfilled.tsx +9 -5
  105. package/src/wc/components/Card/Card.tsx +9 -12
  106. package/src/wc/components/ChartDonut/ChartDonut.tsx +4 -47
  107. package/src/wc/components/ChartLegend/ChartLegend.tsx +23 -15
  108. package/src/wc/components/Checkbox/Checkbox.tsx +3 -5
  109. package/src/wc/components/Chip/Chip.tsx +3 -5
  110. package/src/wc/components/EmptyState/EmptyState.tsx +3 -5
  111. package/src/wc/components/Input/Input.tsx +10 -3
  112. package/src/wc/components/Loader/Loader.tsx +77 -30
  113. package/src/wc/components/Loader/index.ts +1 -1
  114. package/src/wc/components/Menu/Menu.tsx +22 -17
  115. package/src/wc/components/Modal/Modal.tsx +10 -11
  116. package/src/wc/components/Pagination/Pagination.tsx +3 -3
  117. package/src/wc/components/PanelNav/PanelNav.tsx +37 -31
  118. package/src/wc/components/PanelTools/PanelTools.tsx +10 -5
  119. package/src/wc/components/RadioGroup/RadioGroup.tsx +3 -5
  120. package/src/wc/components/Select/Select.tsx +9 -5
  121. package/src/wc/components/Table/Table.tsx +15 -12
  122. package/src/wc/components/Tag/Tag.tsx +3 -5
  123. package/src/wc/components/Text/Text.tsx +6 -4
  124. package/src/wc/components/Text/text-utils.ts +8 -1
  125. package/src/wc/components/Tooltip/Tooltip.tsx +53 -6
  126. package/src/wc/components/TooltipDataViz/TooltipDataViz.tsx +20 -12
  127. package/src/wc/components.d.ts +34 -19
  128. package/src/wc/utils/control-density.css +2 -6
  129. package/src/wc/utils/control-text.ts +4 -4
  130. package/src/wc/utils/index.ts +1 -1
  131. package/src/wc/utils/interaction-fill.css +2 -2
  132. package/src/wc/utils/typography.css +146 -0
  133. package/dist/components/p-061wD4FM.js +0 -2
  134. package/dist/components/p-061wD4FM.js.map +0 -1
  135. package/dist/components/p-AiGt4dQS.js +0 -2
  136. package/dist/components/p-AiGt4dQS.js.map +0 -1
  137. package/dist/components/p-BDQgqw5J.js +0 -2
  138. package/dist/components/p-BDQgqw5J.js.map +0 -1
  139. package/dist/components/p-B_g8X0eh.js +0 -2
  140. package/dist/components/p-B_g8X0eh.js.map +0 -1
  141. package/dist/components/p-BvF44IQK.js.map +0 -1
  142. package/dist/components/p-C3ORQUOp.js +0 -2
  143. package/dist/components/p-DIgHkkPe.js +0 -2
  144. package/dist/components/p-DIgHkkPe.js.map +0 -1
  145. package/dist/components/p-DOqi-Vkb.js +0 -2
  146. package/dist/components/p-DOqi-Vkb.js.map +0 -1
  147. package/dist/components/p-DQ3MyAC7.js +0 -2
  148. package/dist/components/p-DQ3MyAC7.js.map +0 -1
  149. package/dist/components/p-DkcH8mRl.js +0 -2
  150. package/dist/components/p-DkcH8mRl.js.map +0 -1
  151. package/dist/components/p-DrhmNrKD.js +0 -2
  152. package/dist/components/p-DrhmNrKD.js.map +0 -1
  153. package/dist/components/p-DujEDZ7f.js +0 -2
  154. package/dist/components/p-DujEDZ7f.js.map +0 -1
  155. package/dist/components/p-DwQ-zdqa.js +0 -2
  156. package/dist/components/p-DwQ-zdqa.js.map +0 -1
  157. /package/dist/components/{p-CyFVn2Sc.js.map → p-9Qu1ls2y.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{p as n,H as t,c as o,h as i,a as s,t as e}from"./index.js";import{d}from"./p-DEgY_Lnb.js";import{d as r}from"./p-9Qu1ls2y.js";import{d as l}from"./p-BOQRM49Q.js";import{C as a}from"./p-Cx-ywr1e.js";import{c}from"./p-DuFm-ieS.js";const u=()=>`.sc-ds-button-unfilled-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-button-unfilled:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-button-unfilled{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-button-unfilled:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-button-unfilled:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-button-unfilled{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-button-unfilled::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-interaction-fill.sc-ds-button-unfilled-h,.ds-interaction-fill.sc-ds-button-unfilled{position:relative;z-index:0;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent}.ds-interaction-fill.sc-ds-button-unfilled-h::before,.ds-interaction-fill.sc-ds-button-unfilled::before,.ds-interaction-fill.sc-ds-button-unfilled-h::after,.ds-interaction-fill.sc-ds-button-unfilled::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;transition:none}.ds-interaction-fill.sc-ds-button-unfilled-h::before,.ds-interaction-fill.sc-ds-button-unfilled::before{z-index:1}.ds-interaction-fill.sc-ds-button-unfilled-h::after,.ds-interaction-fill.sc-ds-button-unfilled::after{z-index:3;box-shadow:inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-button-unfilled-h,.ds-interaction-fill--bordered.sc-ds-button-unfilled{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-button-unfilled-h::before,.ds-interaction-fill--selected.sc-ds-button-unfilled::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-button-unfilled-h,.ds-interaction-fill--selected.sc-ds-button-unfilled{--ds-interaction-dot-ring:var(--ds-interaction-active)}.ds-interaction-fill.sc-ds-button-unfilled-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-button-unfilled:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}.ds-interaction-fill.sc-ds-button-unfilled-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-button-unfilled:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill.sc-ds-button-unfilled-h>.ds-interaction-fill__content.sc-ds-button-unfilled,.ds-interaction-fill.sc-ds-button-unfilled>.ds-interaction-fill__content.sc-ds-button-unfilled,.ds-interaction-fill__content.sc-ds-button-unfilled{position:relative;z-index:2}.ds-interaction-fill--on-medium.sc-ds-button-unfilled-h,.ds-interaction-fill--on-medium.sc-ds-button-unfilled{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-button-unfilled-h,.ds-interaction-fill--on-bold.sc-ds-button-unfilled{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-button-unfilled-h,.ds-interaction-fill--on-strong.sc-ds-button-unfilled{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-always-dark.sc-ds-button-unfilled-h,.ds-interaction-fill--on-always-dark.sc-ds-button-unfilled{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-button-unfilled-h,.ds-interaction-fill--on-navigation.sc-ds-button-unfilled{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}.ds-control-inactive.sc-ds-button-unfilled-h,.ds-control-inactive.sc-ds-button-unfilled{opacity:0.25;pointer-events:none;cursor:not-allowed}.ds-control--md.sc-ds-button-unfilled-h,.ds-control--md.sc-ds-button-unfilled{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050);--ds-control-radius:var(--dimension-radius-025)}.ds-control--sm.sc-ds-button-unfilled-h,.ds-control--sm.sc-ds-button-unfilled{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025);--ds-control-radius:var(--dimension-radius-025)}.ds-control--xs.sc-ds-button-unfilled-h,.ds-control--xs.sc-ds-button-unfilled{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025);--ds-control-radius:var(--dimension-radius-025)}.ds-control-width--hug.sc-ds-button-unfilled-h,.ds-control-width--hug.sc-ds-button-unfilled{width:fit-content;max-width:100%;flex:0 0 auto;align-self:flex-start}.ds-control-width--fill.sc-ds-button-unfilled-h,.ds-control-width--fill.sc-ds-button-unfilled{width:100%;min-width:0;flex:1 1 auto;align-self:stretch}.sc-ds-button-unfilled-h{display:inline-flex;outline:none;--ds-button-unfilled-fg:var(--color-foreground-secondary);--ds-button-unfilled-fg-active:var(--color-foreground-primary);--ds-button-unfilled-dot-ring:var(--color-background-secondary);--ds-button-unfilled-border:var(--color-border-secondary)}.button-unfilled-host--icon.ds-control-width--hug.sc-ds-button-unfilled-h{width:var(--ds-control-height, var(--dimension-size-400));height:var(--ds-control-height, var(--dimension-size-400));min-width:var(--ds-control-height, var(--dimension-size-400));min-height:var(--ds-control-height, var(--dimension-size-400))}.button-unfilled-host--icon.ds-control-width--fill.sc-ds-button-unfilled-h{height:var(--ds-control-height, var(--dimension-size-400));min-height:var(--ds-control-height, var(--dimension-size-400))}.ds-control-width--fill.sc-ds-button-unfilled-h .button-unfilled.sc-ds-button-unfilled{width:100%}.button-unfilled.sc-ds-button-unfilled{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding:0 var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));background:transparent;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));color:var(--ds-button-unfilled-fg);cursor:pointer;-webkit-user-select:none;user-select:none;overflow:hidden;transition:color var(--effect-motion-short-2)}.button-unfilled--icon.sc-ds-button-unfilled{width:100%;height:100%;padding:0}.button-unfilled--active.sc-ds-button-unfilled{color:var(--ds-button-unfilled-fg-active)}.button-unfilled--bordered.sc-ds-button-unfilled{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--ds-button-unfilled-border)}.button-unfilled--bordered.sc-ds-button-unfilled:not(.ds-interaction-fill){box-shadow:inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.button-unfilled--contrast-medium.sc-ds-button-unfilled{--ds-button-unfilled-fg:var(--color-foreground-on-medium-background-secondary);--ds-button-unfilled-fg-active:var(--color-foreground-on-medium-background-primary);--ds-button-unfilled-dot-ring:var(--color-background-medium-neutral);--ds-button-unfilled-border:var(--color-border-on-medium-background-secondary)}.button-unfilled--contrast-bold.sc-ds-button-unfilled{--ds-button-unfilled-fg:var(--color-foreground-on-bold-background-secondary);--ds-button-unfilled-fg-active:var(--color-foreground-on-bold-background-primary);--ds-button-unfilled-dot-ring:var(--color-background-bold-neutral);--ds-button-unfilled-border:var(--color-border-on-bold-background-secondary)}.button-unfilled--contrast-strong.sc-ds-button-unfilled{--ds-button-unfilled-fg:var(--color-foreground-on-strong-background-secondary);--ds-button-unfilled-fg-active:var(--color-foreground-on-strong-background-primary);--ds-button-unfilled-dot-ring:var(--color-background-strong-neutral);--ds-button-unfilled-border:var(--color-border-on-strong-background-secondary)}.button-unfilled--on-always-dark.sc-ds-button-unfilled{--ds-button-unfilled-fg:var(--color-always-dark-foreground-secondary);--ds-button-unfilled-fg-active:var(--color-always-dark-foreground-primary);--ds-button-unfilled-dot-ring:var(--color-always-dark-background);--ds-button-unfilled-border:var(--color-always-dark-border-secondary)}.button-unfilled--on-navigation.sc-ds-button-unfilled{--ds-button-unfilled-fg:var(--color-navigation-foreground-secondary);--ds-button-unfilled-fg-active:var(--color-navigation-foreground-primary);--ds-button-unfilled-dot-ring:var(--color-navigation-background);--ds-button-unfilled-border:var(--color-navigation-border-secondary)}.button-unfilled.ds-interaction-fill--selected.sc-ds-button-unfilled{--ds-button-unfilled-dot-ring:var(--ds-interaction-active)}.button-unfilled__icon-wrap.sc-ds-button-unfilled{position:relative;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md));display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;z-index:2}.button-unfilled__label.sc-ds-button-unfilled{position:relative;z-index:2;padding:0 var(--ds-control-label-inset, var(--dimension-space-025));white-space:nowrap;flex-shrink:0;min-width:0}.button-unfilled__dot.sc-ds-button-unfilled{position:absolute;top:0;right:0;z-index:2;pointer-events:none}`;const f={md:"md",sm:"sm",xs:"xs"};const b=n(class n extends t{constructor(n){super();if(n!==false){this.__registerHost()}this.dsClick=o(this,"dsClick");this.dsChange=o(this,"dsChange");this.variant="label";this.size="md";this.width="hug";this.label="";this.icon="";this.isActive=false;this.activeFill=true;this.hasBorder=true;this.dot=false;this.isInactive=false;this.type="button";this.buttonEl=null;this.handleClick=n=>{if(this.isInactive)return;this.dsClick.emit(n);this.dsChange.emit(!this.isActive)}}async setFocus(){this.buttonEl?.focus()}effectiveContrast(){return this.backgroundContrast??"default"}get showIcon(){return this.variant==="icon"||this.variant==="icon-label"}get showLabel(){return this.variant==="label"||this.variant==="icon-label"}get showDot(){return this.variant==="icon"&&this.dot}get dotRing(){if(this.isActive&&this.activeFill){return"var(--ds-interaction-active)"}return"var(--ds-button-unfilled-dot-ring)"}get accessibleName(){if(this.ariaLabel)return this.ariaLabel;if(this.showLabel&&this.label)return undefined;if(this.variant==="icon")return this.icon||"action";return this.label||"action"}render(){const n=this.background;const t=this.effectiveContrast();const o=a[this.size];const e=f[this.size];const d={"button-unfilled":true,"ds-focus-ring-inset":true,"ds-interaction-fill":true,"ds-interaction-fill--selected":this.isActive&&this.activeFill&&!this.isInactive,"ds-interaction-fill--on-medium":t==="medium","ds-interaction-fill--on-bold":t==="bold","ds-interaction-fill--on-strong":t==="strong","ds-interaction-fill--on-always-dark":n==="always-dark","ds-interaction-fill--on-navigation":n==="navigation","button-unfilled--active":this.isActive,"button-unfilled--bordered":this.hasBorder,"ds-control-inactive":this.isInactive,"ds-control--md":this.size==="md","ds-control--sm":this.size==="sm","ds-control--xs":this.size==="xs","button-unfilled--icon":this.variant==="icon","button-unfilled--label":this.variant==="label","button-unfilled--icon-label":this.variant==="icon-label","button-unfilled--contrast-medium":t==="medium","button-unfilled--contrast-bold":t==="bold","button-unfilled--contrast-strong":t==="strong","button-unfilled--on-always-dark":n==="always-dark","button-unfilled--on-navigation":n==="navigation"};return i(s,{key:"2d979484f1a3cee8ead4ca3f7c9edfab8dd474b2",class:{"button-unfilled-host":true,"button-unfilled-host--icon":this.variant==="icon","ds-control--md":this.size==="md","ds-control--sm":this.size==="sm","ds-control--xs":this.size==="xs",...c(this.width)},tabIndex:-1},i("button",{key:"6b0348d367c9eb73ef8a76ad94bd07b23ccea68d",ref:n=>{this.buttonEl=n??null},type:this.type,class:d,disabled:this.isInactive,tabIndex:this.focusTabIndex??0,"aria-label":this.accessibleName,"aria-controls":this.controls,"aria-expanded":this.expanded===undefined?undefined:String(this.expanded),"aria-haspopup":this.haspopup,"aria-pressed":this.pressed===undefined?undefined:String(this.pressed),onClick:this.handleClick},this.showIcon&&i("span",{key:"738b15892de45bc9e8a7bf0f1e16df64170ce359",class:"button-unfilled__icon-wrap ds-interaction-fill__content"},i("ds-icon",{key:"bc049c53a41b8eb09daacb68c73fef99aa66fa76",name:this.icon,size:e,color:"inherit"}),this.showDot&&i("ds-badge",{key:"c9eeacc100e32331c27d85a16b422abe59df6147",class:"button-unfilled__dot",variant:"dot",background:this.dotRing,label:"","aria-hidden":"true"})),this.showLabel&&i("ds-text",{key:"b577aed4bf50bf8987c6ff4fcdfdd989ee71bc96",class:"button-unfilled__label ds-interaction-fill__content",as:"span",variant:o,emphasis:true,color:"inherit"},this.label)))}get el(){return this}static get style(){return u()}},[2,"ds-button-unfilled",{variant:[1],size:[1],width:[1],label:[1],icon:[1],isActive:[4,"is-active"],activeFill:[4,"active-fill"],hasBorder:[4,"has-border"],dot:[4],isInactive:[4,"is-inactive"],type:[1],backgroundContrast:[1,"on-background-contrast"],background:[1],ariaLabel:[1,"aria-label"],controls:[1],expanded:[4],haspopup:[1],pressed:[4],focusTabIndex:[2,"tab-index"],setFocus:[64]}]);function h(){if(typeof customElements==="undefined"){return}const n=["ds-button-unfilled","ds-badge","ds-icon","ds-text"];n.forEach((n=>{switch(n){case"ds-button-unfilled":if(!customElements.get(e(n))){customElements.define(e(n),b)}break;case"ds-badge":if(!customElements.get(e(n))){d()}break;case"ds-icon":if(!customElements.get(e(n))){r()}break;case"ds-text":if(!customElements.get(e(n))){l()}break}}))}h();export{b as B,h as d};
2
+ //# sourceMappingURL=p-vlwhuqVn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["buttonUnfilledCss","ICON_SIZE","md","sm","xs","ButtonUnfilled","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","variant","size","width","label","icon","isActive","activeFill","hasBorder","dot","isInactive","type","buttonEl","handleClick","event","dsClick","emit","dsChange","setFocus","focus","effectiveContrast","backgroundContrast","showIcon","showLabel","showDot","dotRing","accessibleName","ariaLabel","undefined","render","bg","background","contrast","textVariant","CONTROL_TEXT_VARIANT","iconSize","cls","h","Host","key","class","controlWidthClass","tabIndex","ref","el","disabled","focusTabIndex","controls","expanded","String","haspopup","pressed","onClick","name","color","as","emphasis"],"sources":["src/wc/components/ButtonUnfilled/ButtonUnfilled.css?tag=ds-button-unfilled&encapsulation=scoped","src/wc/components/ButtonUnfilled/ButtonUnfilled.tsx"],"sourcesContent":["@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n@import '../../utils/control-inactive.css';\n@import '../../utils/control-density.css';\n@import '../../utils/control-width.css';\n\n:host {\n display: inline-flex;\n outline: none;\n --ds-button-unfilled-fg: var(--color-foreground-secondary);\n --ds-button-unfilled-fg-active: var(--color-foreground-primary);\n --ds-button-unfilled-dot-ring: var(--color-background-secondary);\n --ds-button-unfilled-border: var(--color-border-secondary);\n}\n\n/* Icon-only: fixed square from density height (hug). Fill stretches the hit target. */\n:host(.button-unfilled-host--icon.ds-control-width--hug) {\n width: var(--ds-control-height, var(--dimension-size-400));\n height: var(--ds-control-height, var(--dimension-size-400));\n min-width: var(--ds-control-height, var(--dimension-size-400));\n min-height: var(--ds-control-height, var(--dimension-size-400));\n}\n\n:host(.button-unfilled-host--icon.ds-control-width--fill) {\n height: var(--ds-control-height, var(--dimension-size-400));\n min-height: var(--ds-control-height, var(--dimension-size-400));\n}\n\n:host(.ds-control-width--fill) .button-unfilled {\n width: 100%;\n}\n\n.button-unfilled {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n height: var(--ds-control-height, var(--dimension-size-400));\n padding: 0 var(--ds-control-padding-inline, var(--dimension-space-075));\n gap: var(--ds-control-gap, var(--dimension-space-050));\n background: transparent;\n border: none;\n border-radius: var(--ds-control-radius, var(--dimension-radius-025));\n color: var(--ds-button-unfilled-fg);\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n overflow: hidden;\n transition: color var(--effect-motion-short-2);\n /* Hover/press/selected fill: `.ds-interaction-fill` (+ `--selected` / `--on-*`).\n Active always promotes foreground to primary (toggle mode). */\n}\n\n.button-unfilled--icon {\n width: 100%;\n height: 100%;\n padding: 0;\n}\n\n.button-unfilled--active {\n color: var(--ds-button-unfilled-fg-active);\n}\n\n/* Inset stroke via interaction-fill ::after (above selected / hover washes). */\n.button-unfilled--bordered {\n --ds-interaction-border-width: var(--dimension-stroke-width-012);\n --ds-interaction-border-color: var(--ds-button-unfilled-border);\n}\n\n/* Fallback if interaction-fill is omitted (should be rare — prefer keep the util class). */\n.button-unfilled--bordered:not(.ds-interaction-fill) {\n box-shadow: inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color);\n}\n\n/* Inactive: `.ds-control-inactive` (25% opacity). */\n\n/* Foreground / chrome tokens per surface — interaction tokens come from util `--on-*`. */\n.button-unfilled--contrast-medium {\n --ds-button-unfilled-fg: var(--color-foreground-on-medium-background-secondary);\n --ds-button-unfilled-fg-active: var(--color-foreground-on-medium-background-primary);\n --ds-button-unfilled-dot-ring: var(--color-background-medium-neutral);\n --ds-button-unfilled-border: var(--color-border-on-medium-background-secondary);\n}\n\n.button-unfilled--contrast-bold {\n --ds-button-unfilled-fg: var(--color-foreground-on-bold-background-secondary);\n --ds-button-unfilled-fg-active: var(--color-foreground-on-bold-background-primary);\n --ds-button-unfilled-dot-ring: var(--color-background-bold-neutral);\n --ds-button-unfilled-border: var(--color-border-on-bold-background-secondary);\n}\n\n.button-unfilled--contrast-strong {\n --ds-button-unfilled-fg: var(--color-foreground-on-strong-background-secondary);\n --ds-button-unfilled-fg-active: var(--color-foreground-on-strong-background-primary);\n --ds-button-unfilled-dot-ring: var(--color-background-strong-neutral);\n --ds-button-unfilled-border: var(--color-border-on-strong-background-secondary);\n}\n\n.button-unfilled--on-always-dark {\n --ds-button-unfilled-fg: var(--color-always-dark-foreground-secondary);\n --ds-button-unfilled-fg-active: var(--color-always-dark-foreground-primary);\n --ds-button-unfilled-dot-ring: var(--color-always-dark-background);\n --ds-button-unfilled-border: var(--color-always-dark-border-secondary);\n}\n\n.button-unfilled--on-navigation {\n --ds-button-unfilled-fg: var(--color-navigation-foreground-secondary);\n --ds-button-unfilled-fg-active: var(--color-navigation-foreground-primary);\n --ds-button-unfilled-dot-ring: var(--color-navigation-background);\n --ds-button-unfilled-border: var(--color-navigation-border-secondary);\n}\n\n/*\n * After surface ring defaults: selected fill remaps the knock-out to the active\n * wash so the badge halo matches the selected background.\n */\n.button-unfilled.ds-interaction-fill--selected {\n --ds-button-unfilled-dot-ring: var(--ds-interaction-active);\n}\n\n.button-unfilled__icon-wrap {\n position: relative;\n width: var(--ds-control-icon, var(--dimension-iconography-md));\n height: var(--ds-control-icon, var(--dimension-iconography-md));\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n z-index: 2;\n}\n\n.button-unfilled__label {\n position: relative;\n z-index: 2;\n padding: 0 var(--ds-control-label-inset, var(--dimension-space-025));\n white-space: nowrap;\n flex-shrink: 0;\n min-width: 0;\n}\n\n.button-unfilled__dot {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n pointer-events: none;\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport { controlWidthClass, CONTROL_TEXT_VARIANT, type ControlWidth } from '../../utils';\n\nexport type ButtonUnfilledOnBackgroundContrast = 'default' | 'medium' | 'bold' | 'strong';\n\nexport type ButtonUnfilledBackground = 'always-dark' | 'navigation';\n\nexport type ButtonUnfilledVariant = 'icon' | 'label' | 'icon-label';\n\nexport type ButtonUnfilledSize = 'md' | 'sm' | 'xs';\n\nexport type ButtonUnfilledWidth = ControlWidth;\n\n/**\n * `ds-icon` size prop matching control-density icon metrics\n * (md→20 / sm→16 / xs→12 via `--dimension-iconography-*`).\n */\nconst ICON_SIZE: Record<ButtonUnfilledSize, 'md' | 'sm' | 'xs'> = {\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\n@Component({\n tag: 'ds-button-unfilled',\n styleUrl: 'ButtonUnfilled.css',\n scoped: true,\n})\nexport class ButtonUnfilled {\n @Element() el!: HTMLElement;\n\n /**\n * Content layout. Default is label-only; pass `icon` for icon-only chrome\n * (nav / tool rails) or `icon-label` for leading icon + text.\n */\n @Prop() variant: ButtonUnfilledVariant = 'label';\n\n /** Control density (height, padding, icon, type). */\n @Prop() size: ButtonUnfilledSize = 'md';\n\n /** Width fit — hug content (default) or fill the parent. */\n @Prop() width: ButtonUnfilledWidth = 'hug';\n\n /** Visible text for `label` / `icon-label` variants. */\n @Prop() label: string = '';\n\n /** Icon name passed to <ds-icon> for `icon` / `icon-label` variants. */\n @Prop() icon: string = '';\n\n /** Active/selected visual state. Always promotes foreground to primary. */\n @Prop() isActive: boolean = false;\n\n /**\n * When active, render the selected interaction fill.\n * Default `true` for general UI. Shell chrome (nav / tool rails) should pass\n * `false` so selection is foreground-only (primary color, no fill).\n */\n @Prop() activeFill: boolean = true;\n\n /** Show a 1px secondary inset border. Default on; shell chrome can pass `false`. */\n @Prop() hasBorder: boolean = true;\n\n /** Show a notification dot at the top-right of the icon zone (icon variant only). */\n @Prop() dot: boolean = false;\n\n /** Disables interaction. */\n @Prop() isInactive: boolean = false;\n\n /** Native button type. */\n @Prop() type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * Foreground and interaction tokens when the button sits on a contrasting parent\n * background (default, medium, bold, or strong).\n */\n @Prop({ attribute: 'on-background-contrast' })\n backgroundContrast?: ButtonUnfilledOnBackgroundContrast;\n\n /** Parent surface context for navigation and always-dark chrome. */\n @Prop() background: ButtonUnfilledBackground | undefined;\n\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | undefined;\n @Prop() controls: string | undefined;\n @Prop() expanded: boolean | undefined;\n @Prop() haspopup: string | undefined;\n @Prop() pressed: boolean | undefined;\n\n /**\n * Native `tabindex` for roving keyboard groups in shell chrome.\n * Omit for the default button tab stop (`0`).\n */\n @Prop({ attribute: 'tab-index' }) focusTabIndex?: number;\n\n @Event() dsClick!: EventEmitter<MouseEvent>;\n @Event() dsChange!: EventEmitter<boolean>;\n\n private buttonEl: HTMLButtonElement | null = null;\n\n @Method()\n async setFocus() {\n this.buttonEl?.focus();\n }\n\n private handleClick = (event: MouseEvent) => {\n if (this.isInactive) return;\n this.dsClick.emit(event);\n this.dsChange.emit(!this.isActive);\n };\n\n private effectiveContrast(): ButtonUnfilledOnBackgroundContrast {\n return this.backgroundContrast ?? 'default';\n }\n\n private get showIcon(): boolean {\n return this.variant === 'icon' || this.variant === 'icon-label';\n }\n\n private get showLabel(): boolean {\n return this.variant === 'label' || this.variant === 'icon-label';\n }\n\n private get showDot(): boolean {\n return this.variant === 'icon' && this.dot;\n }\n\n /** Knock-out ring: selected fill → active wash; otherwise surface token. */\n private get dotRing(): string {\n if (this.isActive && this.activeFill) {\n return 'var(--ds-interaction-active)';\n }\n return 'var(--ds-button-unfilled-dot-ring)';\n }\n\n private get accessibleName(): string | undefined {\n if (this.ariaLabel) return this.ariaLabel;\n if (this.showLabel && this.label) return undefined;\n if (this.variant === 'icon') return this.icon || 'action';\n return this.label || 'action';\n }\n\n render() {\n const bg = this.background;\n const contrast = this.effectiveContrast();\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n\n const cls: Record<string, boolean> = {\n 'button-unfilled': true,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': this.isActive && this.activeFill && !this.isInactive,\n 'ds-interaction-fill--on-medium': contrast === 'medium',\n 'ds-interaction-fill--on-bold': contrast === 'bold',\n 'ds-interaction-fill--on-strong': contrast === 'strong',\n 'ds-interaction-fill--on-always-dark': bg === 'always-dark',\n 'ds-interaction-fill--on-navigation': bg === 'navigation',\n 'button-unfilled--active': this.isActive,\n 'button-unfilled--bordered': this.hasBorder,\n 'ds-control-inactive': this.isInactive,\n 'ds-control--md': this.size === 'md',\n 'ds-control--sm': this.size === 'sm',\n 'ds-control--xs': this.size === 'xs',\n 'button-unfilled--icon': this.variant === 'icon',\n 'button-unfilled--label': this.variant === 'label',\n 'button-unfilled--icon-label': this.variant === 'icon-label',\n 'button-unfilled--contrast-medium': contrast === 'medium',\n 'button-unfilled--contrast-bold': contrast === 'bold',\n 'button-unfilled--contrast-strong': contrast === 'strong',\n 'button-unfilled--on-always-dark': bg === 'always-dark',\n 'button-unfilled--on-navigation': bg === 'navigation',\n };\n\n return (\n <Host\n class={{\n 'button-unfilled-host': true,\n 'button-unfilled-host--icon': this.variant === 'icon',\n 'ds-control--md': this.size === 'md',\n 'ds-control--sm': this.size === 'sm',\n 'ds-control--xs': this.size === 'xs',\n ...controlWidthClass(this.width),\n }}\n tabIndex={-1}\n >\n <button\n ref={el => {\n this.buttonEl = el ?? null;\n }}\n type={this.type}\n class={cls}\n disabled={this.isInactive}\n tabIndex={this.focusTabIndex ?? 0}\n aria-label={this.accessibleName}\n aria-controls={this.controls}\n aria-expanded={this.expanded === undefined ? undefined : String(this.expanded)}\n aria-haspopup={this.haspopup}\n aria-pressed={this.pressed === undefined ? undefined : String(this.pressed)}\n onClick={this.handleClick}\n >\n {this.showIcon && (\n <span class=\"button-unfilled__icon-wrap ds-interaction-fill__content\">\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n {this.showDot && (\n <ds-badge\n class=\"button-unfilled__dot\"\n variant=\"dot\"\n background={this.dotRing}\n label=\"\"\n aria-hidden=\"true\"\n />\n )}\n </span>\n )}\n {this.showLabel && (\n <ds-text\n class=\"button-unfilled__label ds-interaction-fill__content\"\n as=\"span\"\n variant={textVariant}\n emphasis\n color=\"inherit\"\n >\n {this.label}\n </ds-text>\n )}\n </button>\n </Host>\n );\n }\n}\n"],"mappings":"4OAAA,MAAMA,EAAoB,IAAM,khWCiBhC,MAAMC,EAA4D,CAChEC,GAAI,KACJC,GAAI,KACJC,GAAI,M,MAQOC,EAAcC,EAAA,MAAAD,UAAAE,EAL3B,WAAAC,CAAAC,G,4GAYUC,KAAAC,QAAiC,QAG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AAAE,IAAA,2CACEC,MAAM,uBACNvC,QAAQ,MACR8B,WAAY/B,KAAKyB,QACjBrB,MAAM,GAAE,cACI,UAKnBJ,KAAKuB,WACJc,EAAA,WAAAE,IAAA,2CACEC,MAAM,sDACNe,GAAG,OACHtD,QAASgC,EACTuB,SAAQ,KACRF,MAAM,WAELtD,KAAKI,Q","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import type { TextVariant } from '../components/Text/text-types';
2
- /** Control-density sizes shared by buttons, tags, chips, select, tooltip. */
3
- export type ControlDensitySize = 'md' | 'sm' | 'xs';
4
- /** Body/caption variant per control-density size (emphasis is separate). */
5
- export declare const CONTROL_TEXT_VARIANT: Record<ControlDensitySize, TextVariant>;
2
+ /** Shared public control sizes. Typography is derived; it is not a separate density API. */
3
+ export type ControlSize = 'md' | 'sm' | 'xs';
4
+ /** Complete text variant selected internally by each control size. */
5
+ export declare const CONTROL_TEXT_VARIANT: Record<ControlSize, TextVariant>;
@@ -10,4 +10,4 @@ export type { TokenDefaultKey } from './token-defaults';
10
10
  export { controlWidthClass } from './control-width';
11
11
  export type { ControlWidth } from './control-width';
12
12
  export { CONTROL_TEXT_VARIANT } from './control-text';
13
- export type { ControlDensitySize } from './control-text';
13
+ export type { ControlSize } from './control-text';
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/wc/components/Icon/icon-cache.ts", "../../../src/wc/utils/resolve-css-length-px.ts", "../../../src/wc/utils/format-compact-number.ts", "../../../src/wc/utils/truncate-svg-text.ts", "../../../src/wc/utils/resolve-css-time-ms.ts", "../../../src/wc/utils/scroll-edge-fade.ts", "../../../src/wc/utils/token-defaults.ts", "../../../src/wc/utils/control-width.ts", "../../../src/wc/utils/control-text.ts"],
4
- "sourcesContent": ["/**\n * Shared SVG glyph cache for ds-icon.\n *\n * Keyed on a global symbol so every module instance (the compiled Stencil chunk\n * inside dist/components and any direct source import, e.g. via `@ds-mo/ui/utils`)\n * reads and writes the same cache. Without this, `registerIcons` called from an\n * app would fill a different Map than the one ds-icon resolves from.\n */\nconst CACHE_KEY = Symbol.for('ds-mo.icon-svg-cache');\n\ntype IconCacheMap = Map<string, string>;\n\ntype GlobalWithIconCache = { [CACHE_KEY]?: IconCacheMap };\n\nexport function iconCacheKey(name: string, flag: boolean): string {\n return flag ? `flag:${name}` : `system:${name}`;\n}\n\nexport function iconCache(): IconCacheMap {\n const g = globalThis as GlobalWithIconCache;\n return (g[CACHE_KEY] ??= new Map());\n}\n\n/**\n * Pre-register glyphs so ds-icon renders them synchronously \u2014 no lazy-chunk\n * fetch, no first-paint pop-in. Import the SVG strings from `@ds-mo/icons`\n * in the app (statically, so they ship in the app's own bundle):\n *\n * ```ts\n * import { Bell } from '@ds-mo/icons/svg/Bell';\n * import { US } from '@ds-mo/icons/svg/flags/US';\n * import { registerIcons } from '@ds-mo/ui/utils';\n *\n * registerIcons({ Bell });\n * registerIcons({ US }, { flag: true });\n * ```\n *\n * Icons that are not registered still work \u2014 they lazy-load on first render\n * and stay cached afterwards.\n */\nexport function registerIcons(icons: Record<string, string>, options?: { flag?: boolean }): void {\n const cache = iconCache();\n const flag = options?.flag === true;\n for (const [name, svg] of Object.entries(icons)) {\n cache.set(iconCacheKey(name, flag), svg);\n }\n}\n", "const lengthPxCache = new Map<string, number>();\n\nlet probeEl: HTMLElement | null = null;\n\nfunction getProbeElement(): HTMLElement | null {\n if (typeof document === 'undefined') return null;\n\n if (!probeEl) {\n probeEl = document.createElement('div');\n probeEl.setAttribute('aria-hidden', 'true');\n probeEl.style.cssText =\n 'position:absolute;visibility:hidden;pointer-events:none;top:0;left:0;width:0;height:0;overflow:hidden;';\n document.documentElement.appendChild(probeEl);\n }\n\n return probeEl;\n}\n\n/** Clear session cache (tests only). */\nexport function clearCssLengthPxCache(): void {\n lengthPxCache.clear();\n}\n\n/**\n * Resolve a CSS length to pixels for layout math.\n * Numbers pass through; `var(--dimension-*)`, `calc(...)`, and `16px` resolve via a hidden probe.\n */\nexport function resolveCssLengthPx(\n value: number | string | undefined,\n fallback: number | string,\n): number {\n const resolved = value === undefined || value === null || value === '' ? fallback : value;\n if (typeof resolved === 'number') return resolved;\n\n const trimmed = resolved.trim();\n if (!trimmed) return resolveCssLengthPx(fallback, 0);\n\n const cached = lengthPxCache.get(trimmed);\n if (cached !== undefined) return cached;\n\n if (/^-?\\d+(\\.\\d+)?$/.test(trimmed)) {\n const n = Number(trimmed);\n lengthPxCache.set(trimmed, n);\n return n;\n }\n\n const pxMatch = trimmed.match(/^(-?\\d+(\\.\\d+)?)px$/);\n if (pxMatch) {\n const px = parseFloat(pxMatch[1]);\n lengthPxCache.set(trimmed, px);\n return px;\n }\n\n const cssLength = /^--[\\w-]+$/.test(trimmed) ? `var(${trimmed})` : trimmed;\n\n const probe = getProbeElement();\n if (!probe) {\n return typeof fallback === 'number' ? fallback : 0;\n }\n\n probe.style.width = cssLength;\n const px = probe.getBoundingClientRect().width;\n probe.style.width = '';\n lengthPxCache.set(trimmed, px);\n return px;\n}\n", "const COMPACT_UNITS: { threshold: number; suffix: string }[] = [\n { threshold: 1_000_000_000, suffix: 'b' },\n { threshold: 1_000_000, suffix: 'm' },\n { threshold: 1_000, suffix: 'k' },\n];\n\n/** Compact large numbers for display: 1000 -> \"1k\", 1500 -> \"1.5k\", 110100 -> \"110.1k\", 1000000 -> \"1m\". */\nexport function formatCompactNumber(value: number): string {\n const sign = value < 0 ? '-' : '';\n const abs = Math.abs(value);\n if (abs < 1000) return String(value);\n\n for (let i = 0; i < COMPACT_UNITS.length; i++) {\n const unit = COMPACT_UNITS[i];\n if (abs < unit.threshold) continue;\n\n let scaled = Math.round((abs / unit.threshold) * 10) / 10;\n // Carry over, e.g. 999.96k rounds to \"1000k\" \u2014 bump to the next unit instead.\n if (scaled >= 1000 && i > 0) {\n const next = COMPACT_UNITS[i - 1];\n scaled = Math.round((abs / next.threshold) * 10) / 10;\n return `${sign}${scaled}${next.suffix}`;\n }\n return `${sign}${scaled}${unit.suffix}`;\n }\n return String(value);\n}\n", "/**\n * Binary-searches the longest prefix of `text` (plus an ellipsis) that fits within `maxWidth`\n * px when rendered by `el`, using the SVG `getComputedTextLength()` API for exact measurement \u2014\n * `text-overflow: ellipsis` doesn't apply to raw SVG `<text>` nodes.\n *\n * Mutates `el.textContent` during measurement; the caller's next render (driven by the\n * returned string going into state) overwrites it with the final value.\n */\nexport function truncateSvgTextToWidth(el: SVGTextElement, text: string, maxWidth: number): string {\n el.textContent = text;\n if (maxWidth <= 0 || el.getComputedTextLength() <= maxWidth) return text;\n\n let lo = 0;\n let hi = text.length;\n while (lo < hi) {\n const mid = Math.ceil((lo + hi) / 2);\n el.textContent = `${text.slice(0, mid)}\u2026`;\n if (el.getComputedTextLength() <= maxWidth) {\n lo = mid;\n } else {\n hi = mid - 1;\n }\n }\n return lo > 0 ? `${text.slice(0, lo)}\u2026` : '\u2026';\n}\n", "/** Parse a CSS <time> value (or motion shorthand's first token) to milliseconds. */\nexport function parseCssTimeMs(value: string, fallback: number): number {\n const firstToken = value.trim().split(/\\s+/)[0] ?? '';\n const num = parseFloat(firstToken);\n if (Number.isNaN(num)) return fallback;\n if (/ms\\s*$/.test(firstToken)) return num;\n if (/s\\s*$/.test(firstToken)) return num * 1000;\n return num;\n}\n\nfunction extractCssCustomProp(ref: string): string | null {\n const varMatch = ref.match(/^var\\(\\s*(--[^),]+)/);\n if (varMatch) return varMatch[1].trim();\n if (ref.startsWith('--')) return ref.trim();\n return null;\n}\n\nfunction readTokenTimeMs(token: string, fallback: number): number {\n if (typeof document === 'undefined') return fallback;\n\n const prop = extractCssCustomProp(token);\n if (!prop) return parseCssTimeMs(token, fallback);\n\n const raw = getComputedStyle(document.documentElement).getPropertyValue(prop).trim();\n return parseCssTimeMs(raw, fallback);\n}\n\n/**\n * Resolve a duration to milliseconds for JS timers aligned with CSS motion tokens.\n * Accepts numbers (ms), raw times (`200ms`, `0.75s`), or `var(--effect-*)` references.\n */\nexport function resolveCssTimeMs(\n value: number | string | undefined,\n fallbackToken: string,\n): number {\n if (typeof value === 'number') return value;\n\n const token = typeof value === 'string' && value.trim() ? value.trim() : fallbackToken;\n const prop = extractCssCustomProp(token);\n\n if (prop) {\n return readTokenTimeMs(token, readTokenTimeMs(fallbackToken, 200));\n }\n\n return parseCssTimeMs(token, readTokenTimeMs(fallbackToken, 200));\n}\n", "/** CSS custom property for scroll-edge fade depth (dimension token or length). */\nexport const SCROLL_EDGE_FADE_SIZE_VAR = '--ds-scroll-edge-fade-size';\n\nexport const SCROLL_EDGE_FADE_DEFAULT_SIZE = 'var(--dimension-size-600)';\n\nexport type ScrollEdgeFadeEdge = 'top' | 'bottom' | 'left' | 'right';\n\nexport type ScrollEdgeFadeSizeToken =\n | 'size-000'\n | 'size-050'\n | 'size-075'\n | 'size-100'\n | 'size-150'\n | 'size-200'\n | 'size-250'\n | 'size-300'\n | 'size-400'\n | 'size-500'\n | 'size-600'\n | 'size-800';\n\nexport type ScrollEdgeFadeSize = ScrollEdgeFadeSizeToken | (string & {});\n\nconst SIZE_VALUE: Record<ScrollEdgeFadeSizeToken, string> = {\n 'size-000': 'var(--dimension-size-000)',\n 'size-050': 'var(--dimension-size-050)',\n 'size-075': 'var(--dimension-size-075)',\n 'size-100': 'var(--dimension-size-100)',\n 'size-150': 'var(--dimension-size-150)',\n 'size-200': 'var(--dimension-size-200)',\n 'size-250': 'var(--dimension-size-250)',\n 'size-300': 'var(--dimension-size-300)',\n 'size-400': 'var(--dimension-size-400)',\n 'size-500': 'var(--dimension-size-500)',\n 'size-600': 'var(--dimension-size-600)',\n 'size-800': 'var(--dimension-size-800)',\n};\n\nconst SIZE_REF = `var(${SCROLL_EDGE_FADE_SIZE_VAR}, ${SCROLL_EDGE_FADE_DEFAULT_SIZE})`;\n\nexport interface ScrollEdgeFadeOptions {\n /** One or more edges to fade. */\n edges: ScrollEdgeFadeEdge | ScrollEdgeFadeEdge[];\n /**\n * When true, or when every listed edge is at its scroll limit, removes the mask.\n * Pass a per-edge map to hide only the edges that are flush (panel-nav bottom fade).\n */\n atEnd?: boolean | Partial<Record<ScrollEdgeFadeEdge, boolean>>;\n /** Force the mask off regardless of scroll position (`ds-fade` `visible={false}`). */\n hidden?: boolean;\n}\n\n/** Resolve a dimension size token name or raw CSS length for `--ds-scroll-edge-fade-size`. */\nexport function resolveScrollEdgeFadeSize(\n size: ScrollEdgeFadeSize = 'size-600',\n height?: string,\n): string {\n if (height) return height;\n return Object.prototype.hasOwnProperty.call(SIZE_VALUE, size)\n ? SIZE_VALUE[size as ScrollEdgeFadeSizeToken]\n : size;\n}\n\n/** Inline style map setting fade depth on a scroll container. */\nexport function scrollEdgeFadeSizeStyle(\n size: ScrollEdgeFadeSize = 'size-600',\n height?: string,\n): Record<string, string> {\n return {\n [SCROLL_EDGE_FADE_SIZE_VAR]: resolveScrollEdgeFadeSize(size, height),\n };\n}\n\n/**\n * Alpha mask for a scroll container edge \u2014 content fades to transparent so\n * textured backgrounds (shell gradients, images) show through.\n */\nexport function scrollEdgeFadeMaskImage(edge: ScrollEdgeFadeEdge): string {\n switch (edge) {\n case 'top':\n return `linear-gradient(to bottom, #000 0, #000 50%, transparent 100%)`;\n case 'bottom':\n return `linear-gradient(to bottom, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n case 'left':\n return `linear-gradient(to right, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n case 'right':\n return `linear-gradient(to left, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n }\n}\n\n/** Inline style map for a masked scroll region (single edge). */\nexport function scrollEdgeFadeMaskStyle(\n edge: ScrollEdgeFadeEdge,\n size: ScrollEdgeFadeSize = 'size-600',\n height?: string,\n): Record<string, string> {\n const mask = scrollEdgeFadeMaskImage(edge);\n return {\n ...scrollEdgeFadeSizeStyle(size, height),\n WebkitMaskImage: mask,\n maskImage: mask,\n WebkitMaskSize: '100% 100%',\n maskSize: '100% 100%',\n };\n}\n\n/** Class map for `scroll-edge-fade` modifiers \u2014 pair with `scroll-edge-fade.css`. */\nexport function scrollEdgeFadeClassMap(opts: ScrollEdgeFadeOptions): Record<string, boolean> {\n const edges = Array.isArray(opts.edges) ? opts.edges : [opts.edges];\n const classes: Record<string, boolean> = {\n 'scroll-edge-fade': true,\n 'scroll-edge-fade--hidden': opts.hidden === true,\n };\n\n for (const edge of edges) {\n classes[`scroll-edge-fade--${edge}`] = true;\n }\n\n const { atEnd } = opts;\n if (atEnd === true) {\n classes['scroll-edge-fade--at-end'] = true;\n } else if (atEnd && typeof atEnd === 'object') {\n const allAtEnd = edges.every(edge => atEnd[edge]);\n if (allAtEnd) {\n classes['scroll-edge-fade--at-end'] = true;\n }\n }\n\n return classes;\n}\n\n/** Whether a scroll container is flush with the given edge (within `threshold` px). */\nexport function isScrollAtEdge(\n el: HTMLElement,\n edge: ScrollEdgeFadeEdge,\n threshold = 2,\n): boolean {\n switch (edge) {\n case 'top':\n return el.scrollTop <= threshold;\n case 'bottom':\n return el.scrollHeight - el.scrollTop - el.clientHeight <= threshold;\n case 'left':\n return el.scrollLeft <= threshold;\n case 'right':\n return el.scrollWidth - el.scrollLeft - el.clientWidth <= threshold;\n }\n}\n", "import {\n dimensionIconographyMd,\n dimensionIconographySm,\n dimensionIconographyXs,\n dimensionMenuWidthXs,\n dimensionPanelWidth2xs,\n dimensionPanelWidthLg,\n dimensionPanelWidthMd,\n dimensionRadius025,\n dimensionSize200,\n dimensionSize300,\n dimensionSize400,\n dimensionSize600,\n dimensionSize800,\n dimensionSpace050,\n dimensionSpace200,\n typographyLineheightLg,\n typographyLineheightMd,\n typographyLineheightSm,\n typographyLineheightXl,\n typographyLineheightXs,\n effectAnimationDelayLong2,\n effectAnimationDelayMedium1,\n effectAnimationDelayMedium3,\n effectAnimationDelayInstant,\n effectAnimationDelayShort2,\n effectAnimationDurationMedium1,\n effectAnimationDurationShort3,\n effectMotionShort2,\n effectMotionShort3,\n} from '@ds-mo/tokens/ts';\n\n/** TokoMo CSS custom-property names for shared component defaults (runtime resolution). */\nexport const TOKEN_DEFAULTS = {\n space050: dimensionSpace050,\n space200: dimensionSpace200,\n radius025: dimensionRadius025,\n size200: dimensionSize200,\n size300: dimensionSize300,\n size400: dimensionSize400,\n size600: dimensionSize600,\n size800: dimensionSize800,\n iconographyMd: dimensionIconographyMd,\n iconographySm: dimensionIconographySm,\n iconographyXs: dimensionIconographyXs,\n panelWidth2xs: dimensionPanelWidth2xs,\n panelWidthMd: dimensionPanelWidthMd,\n panelWidthLg: dimensionPanelWidthLg,\n menuWidthXs: dimensionMenuWidthXs,\n lineheightLg: typographyLineheightLg,\n lineheightMd: typographyLineheightMd,\n lineheightSm: typographyLineheightSm,\n lineheightXl: typographyLineheightXl,\n lineheightXs: typographyLineheightXs,\n motionShort2: effectMotionShort2,\n motionShort3: effectMotionShort3,\n animationDurationShort3: effectAnimationDurationShort3,\n animationDurationMedium1: effectAnimationDurationMedium1,\n animationDelayInstant: effectAnimationDelayInstant,\n animationDelayMedium1: effectAnimationDelayMedium1,\n animationDelayMedium3: effectAnimationDelayMedium3,\n animationDelayShort2: effectAnimationDelayShort2,\n animationDelayLong2: effectAnimationDelayLong2,\n /** Unmeasured menu height fallback: 20\u00D7 base (160px at default scale). */\n menuFallbackHeight: 'calc(var(--dimension-size-base) * 20)',\n /** Unmeasured tooltip width fallback: size-800 + size-200 (80px). */\n tooltipFallbackWidth: 'calc(var(--dimension-size-800) + var(--dimension-size-200))',\n /** Fill-mode donut diameter floor: 16\u00D7 size-base (128px). */\n donutFillMin: 'calc(var(--dimension-size-base) * 16)',\n /** Fill-mode donut diameter ceiling: 24\u00D7 size-base (192px). */\n donutFillMax: 'calc(var(--dimension-size-base) * 24)',\n} as const;\n\nexport type TokenDefaultKey = keyof typeof TOKEN_DEFAULTS;\n\n/** Valid CSS length strings for overlay offset props \u2014 bind on `sideOffset` / `alignOffset` in hosts. */\nexport const TOKEN_CSS_LENGTHS = {\n space050: `var(${dimensionSpace050})`,\n space200: `var(${dimensionSpace200})`,\n menuWidthXs: `var(${dimensionMenuWidthXs})`,\n} as const;\n", "/** Shared width fit for interactive controls (buttons, select, \u2026). */\nexport type ControlWidth = 'hug' | 'fill';\n\n/** Host / control class map for `width=\"hug\" | \"fill\"`. */\nexport function controlWidthClass(width: ControlWidth): Record<string, boolean> {\n return {\n 'ds-control-width--hug': width === 'hug',\n 'ds-control-width--fill': width === 'fill',\n };\n}\n", "import type { TextVariant } from '../components/Text/text-types';\n\n/** Control-density sizes shared by buttons, tags, chips, select, tooltip. */\nexport type ControlDensitySize = 'md' | 'sm' | 'xs';\n\n/** Body/caption variant per control-density size (emphasis is separate). */\nexport const CONTROL_TEXT_VARIANT: Record<ControlDensitySize, TextVariant> = {\n md: 'text-body-medium',\n sm: 'text-body-small',\n xs: 'text-caption',\n};\n"],
5
- "mappings": ";AAQA,IAAM,YAAY,uBAAO,IAAI,sBAAsB;AAM5C,SAAS,aAAa,MAAc,MAAuB;AAChE,SAAO,OAAO,QAAQ,IAAI,KAAK,UAAU,IAAI;AAC/C;AAEO,SAAS,YAA0B;AACxC,QAAM,IAAI;AACV,SAAQ,gCAAiB,oBAAI,IAAI;AACnC;AAmBO,SAAS,cAAc,OAA+B,SAAoC;AAC/F,QAAM,QAAQ,UAAU;AACxB,QAAM,OAAO,SAAS,SAAS;AAC/B,aAAW,CAAC,MAAM,GAAG,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC/C,UAAM,IAAI,aAAa,MAAM,IAAI,GAAG,GAAG;AAAA,EACzC;AACF;;;AC9CA,IAAM,gBAAgB,oBAAI,IAAoB;AAE9C,IAAI,UAA8B;AAElC,SAAS,kBAAsC;AAC7C,MAAI,OAAO,aAAa,YAAa,QAAO;AAE5C,MAAI,CAAC,SAAS;AACZ,cAAU,SAAS,cAAc,KAAK;AACtC,YAAQ,aAAa,eAAe,MAAM;AAC1C,YAAQ,MAAM,UACZ;AACF,aAAS,gBAAgB,YAAY,OAAO;AAAA,EAC9C;AAEA,SAAO;AACT;AAGO,SAAS,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S,kBAAkB,OAA8C;AAC9E,SAAO;AAAA,IACL,yBAAyB,UAAU;AAAA,IACnC,0BAA0B,UAAU;AAAA,EACtC;AACF;;;ACHO,IAAM,uBAAgE;AAAA,EAC3E,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;",
4
+ "sourcesContent": ["/**\n * Shared SVG glyph cache for ds-icon.\n *\n * Keyed on a global symbol so every module instance (the compiled Stencil chunk\n * inside dist/components and any direct source import, e.g. via `@ds-mo/ui/utils`)\n * reads and writes the same cache. Without this, `registerIcons` called from an\n * app would fill a different Map than the one ds-icon resolves from.\n */\nconst CACHE_KEY = Symbol.for('ds-mo.icon-svg-cache');\n\ntype IconCacheMap = Map<string, string>;\n\ntype GlobalWithIconCache = { [CACHE_KEY]?: IconCacheMap };\n\nexport function iconCacheKey(name: string, flag: boolean): string {\n return flag ? `flag:${name}` : `system:${name}`;\n}\n\nexport function iconCache(): IconCacheMap {\n const g = globalThis as GlobalWithIconCache;\n return (g[CACHE_KEY] ??= new Map());\n}\n\n/**\n * Pre-register glyphs so ds-icon renders them synchronously \u2014 no lazy-chunk\n * fetch, no first-paint pop-in. Import the SVG strings from `@ds-mo/icons`\n * in the app (statically, so they ship in the app's own bundle):\n *\n * ```ts\n * import { Bell } from '@ds-mo/icons/svg/Bell';\n * import { US } from '@ds-mo/icons/svg/flags/US';\n * import { registerIcons } from '@ds-mo/ui/utils';\n *\n * registerIcons({ Bell });\n * registerIcons({ US }, { flag: true });\n * ```\n *\n * Icons that are not registered still work \u2014 they lazy-load on first render\n * and stay cached afterwards.\n */\nexport function registerIcons(icons: Record<string, string>, options?: { flag?: boolean }): void {\n const cache = iconCache();\n const flag = options?.flag === true;\n for (const [name, svg] of Object.entries(icons)) {\n cache.set(iconCacheKey(name, flag), svg);\n }\n}\n", "const lengthPxCache = new Map<string, number>();\n\nlet probeEl: HTMLElement | null = null;\n\nfunction getProbeElement(): HTMLElement | null {\n if (typeof document === 'undefined') return null;\n\n if (!probeEl) {\n probeEl = document.createElement('div');\n probeEl.setAttribute('aria-hidden', 'true');\n probeEl.style.cssText =\n 'position:absolute;visibility:hidden;pointer-events:none;top:0;left:0;width:0;height:0;overflow:hidden;';\n document.documentElement.appendChild(probeEl);\n }\n\n return probeEl;\n}\n\n/** Clear session cache (tests only). */\nexport function clearCssLengthPxCache(): void {\n lengthPxCache.clear();\n}\n\n/**\n * Resolve a CSS length to pixels for layout math.\n * Numbers pass through; `var(--dimension-*)`, `calc(...)`, and `16px` resolve via a hidden probe.\n */\nexport function resolveCssLengthPx(\n value: number | string | undefined,\n fallback: number | string,\n): number {\n const resolved = value === undefined || value === null || value === '' ? fallback : value;\n if (typeof resolved === 'number') return resolved;\n\n const trimmed = resolved.trim();\n if (!trimmed) return resolveCssLengthPx(fallback, 0);\n\n const cached = lengthPxCache.get(trimmed);\n if (cached !== undefined) return cached;\n\n if (/^-?\\d+(\\.\\d+)?$/.test(trimmed)) {\n const n = Number(trimmed);\n lengthPxCache.set(trimmed, n);\n return n;\n }\n\n const pxMatch = trimmed.match(/^(-?\\d+(\\.\\d+)?)px$/);\n if (pxMatch) {\n const px = parseFloat(pxMatch[1]);\n lengthPxCache.set(trimmed, px);\n return px;\n }\n\n const cssLength = /^--[\\w-]+$/.test(trimmed) ? `var(${trimmed})` : trimmed;\n\n const probe = getProbeElement();\n if (!probe) {\n return typeof fallback === 'number' ? fallback : 0;\n }\n\n probe.style.width = cssLength;\n const px = probe.getBoundingClientRect().width;\n probe.style.width = '';\n lengthPxCache.set(trimmed, px);\n return px;\n}\n", "const COMPACT_UNITS: { threshold: number; suffix: string }[] = [\n { threshold: 1_000_000_000, suffix: 'b' },\n { threshold: 1_000_000, suffix: 'm' },\n { threshold: 1_000, suffix: 'k' },\n];\n\n/** Compact large numbers for display: 1000 -> \"1k\", 1500 -> \"1.5k\", 110100 -> \"110.1k\", 1000000 -> \"1m\". */\nexport function formatCompactNumber(value: number): string {\n const sign = value < 0 ? '-' : '';\n const abs = Math.abs(value);\n if (abs < 1000) return String(value);\n\n for (let i = 0; i < COMPACT_UNITS.length; i++) {\n const unit = COMPACT_UNITS[i];\n if (abs < unit.threshold) continue;\n\n let scaled = Math.round((abs / unit.threshold) * 10) / 10;\n // Carry over, e.g. 999.96k rounds to \"1000k\" \u2014 bump to the next unit instead.\n if (scaled >= 1000 && i > 0) {\n const next = COMPACT_UNITS[i - 1];\n scaled = Math.round((abs / next.threshold) * 10) / 10;\n return `${sign}${scaled}${next.suffix}`;\n }\n return `${sign}${scaled}${unit.suffix}`;\n }\n return String(value);\n}\n", "/**\n * Binary-searches the longest prefix of `text` (plus an ellipsis) that fits within `maxWidth`\n * px when rendered by `el`, using the SVG `getComputedTextLength()` API for exact measurement \u2014\n * `text-overflow: ellipsis` doesn't apply to raw SVG `<text>` nodes.\n *\n * Mutates `el.textContent` during measurement; the caller's next render (driven by the\n * returned string going into state) overwrites it with the final value.\n */\nexport function truncateSvgTextToWidth(el: SVGTextElement, text: string, maxWidth: number): string {\n el.textContent = text;\n if (maxWidth <= 0 || el.getComputedTextLength() <= maxWidth) return text;\n\n let lo = 0;\n let hi = text.length;\n while (lo < hi) {\n const mid = Math.ceil((lo + hi) / 2);\n el.textContent = `${text.slice(0, mid)}\u2026`;\n if (el.getComputedTextLength() <= maxWidth) {\n lo = mid;\n } else {\n hi = mid - 1;\n }\n }\n return lo > 0 ? `${text.slice(0, lo)}\u2026` : '\u2026';\n}\n", "/** Parse a CSS <time> value (or motion shorthand's first token) to milliseconds. */\nexport function parseCssTimeMs(value: string, fallback: number): number {\n const firstToken = value.trim().split(/\\s+/)[0] ?? '';\n const num = parseFloat(firstToken);\n if (Number.isNaN(num)) return fallback;\n if (/ms\\s*$/.test(firstToken)) return num;\n if (/s\\s*$/.test(firstToken)) return num * 1000;\n return num;\n}\n\nfunction extractCssCustomProp(ref: string): string | null {\n const varMatch = ref.match(/^var\\(\\s*(--[^),]+)/);\n if (varMatch) return varMatch[1].trim();\n if (ref.startsWith('--')) return ref.trim();\n return null;\n}\n\nfunction readTokenTimeMs(token: string, fallback: number): number {\n if (typeof document === 'undefined') return fallback;\n\n const prop = extractCssCustomProp(token);\n if (!prop) return parseCssTimeMs(token, fallback);\n\n const raw = getComputedStyle(document.documentElement).getPropertyValue(prop).trim();\n return parseCssTimeMs(raw, fallback);\n}\n\n/**\n * Resolve a duration to milliseconds for JS timers aligned with CSS motion tokens.\n * Accepts numbers (ms), raw times (`200ms`, `0.75s`), or `var(--effect-*)` references.\n */\nexport function resolveCssTimeMs(\n value: number | string | undefined,\n fallbackToken: string,\n): number {\n if (typeof value === 'number') return value;\n\n const token = typeof value === 'string' && value.trim() ? value.trim() : fallbackToken;\n const prop = extractCssCustomProp(token);\n\n if (prop) {\n return readTokenTimeMs(token, readTokenTimeMs(fallbackToken, 200));\n }\n\n return parseCssTimeMs(token, readTokenTimeMs(fallbackToken, 200));\n}\n", "/** CSS custom property for scroll-edge fade depth (dimension token or length). */\nexport const SCROLL_EDGE_FADE_SIZE_VAR = '--ds-scroll-edge-fade-size';\n\nexport const SCROLL_EDGE_FADE_DEFAULT_SIZE = 'var(--dimension-size-600)';\n\nexport type ScrollEdgeFadeEdge = 'top' | 'bottom' | 'left' | 'right';\n\nexport type ScrollEdgeFadeSizeToken =\n | 'size-000'\n | 'size-050'\n | 'size-075'\n | 'size-100'\n | 'size-150'\n | 'size-200'\n | 'size-250'\n | 'size-300'\n | 'size-400'\n | 'size-500'\n | 'size-600'\n | 'size-800';\n\nexport type ScrollEdgeFadeSize = ScrollEdgeFadeSizeToken | (string & {});\n\nconst SIZE_VALUE: Record<ScrollEdgeFadeSizeToken, string> = {\n 'size-000': 'var(--dimension-size-000)',\n 'size-050': 'var(--dimension-size-050)',\n 'size-075': 'var(--dimension-size-075)',\n 'size-100': 'var(--dimension-size-100)',\n 'size-150': 'var(--dimension-size-150)',\n 'size-200': 'var(--dimension-size-200)',\n 'size-250': 'var(--dimension-size-250)',\n 'size-300': 'var(--dimension-size-300)',\n 'size-400': 'var(--dimension-size-400)',\n 'size-500': 'var(--dimension-size-500)',\n 'size-600': 'var(--dimension-size-600)',\n 'size-800': 'var(--dimension-size-800)',\n};\n\nconst SIZE_REF = `var(${SCROLL_EDGE_FADE_SIZE_VAR}, ${SCROLL_EDGE_FADE_DEFAULT_SIZE})`;\n\nexport interface ScrollEdgeFadeOptions {\n /** One or more edges to fade. */\n edges: ScrollEdgeFadeEdge | ScrollEdgeFadeEdge[];\n /**\n * When true, or when every listed edge is at its scroll limit, removes the mask.\n * Pass a per-edge map to hide only the edges that are flush (panel-nav bottom fade).\n */\n atEnd?: boolean | Partial<Record<ScrollEdgeFadeEdge, boolean>>;\n /** Force the mask off regardless of scroll position (`ds-fade` `visible={false}`). */\n hidden?: boolean;\n}\n\n/** Resolve a dimension size token name or raw CSS length for `--ds-scroll-edge-fade-size`. */\nexport function resolveScrollEdgeFadeSize(\n size: ScrollEdgeFadeSize = 'size-600',\n height?: string,\n): string {\n if (height) return height;\n return Object.prototype.hasOwnProperty.call(SIZE_VALUE, size)\n ? SIZE_VALUE[size as ScrollEdgeFadeSizeToken]\n : size;\n}\n\n/** Inline style map setting fade depth on a scroll container. */\nexport function scrollEdgeFadeSizeStyle(\n size: ScrollEdgeFadeSize = 'size-600',\n height?: string,\n): Record<string, string> {\n return {\n [SCROLL_EDGE_FADE_SIZE_VAR]: resolveScrollEdgeFadeSize(size, height),\n };\n}\n\n/**\n * Alpha mask for a scroll container edge \u2014 content fades to transparent so\n * textured backgrounds (shell gradients, images) show through.\n */\nexport function scrollEdgeFadeMaskImage(edge: ScrollEdgeFadeEdge): string {\n switch (edge) {\n case 'top':\n return `linear-gradient(to bottom, #000 0, #000 50%, transparent 100%)`;\n case 'bottom':\n return `linear-gradient(to bottom, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n case 'left':\n return `linear-gradient(to right, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n case 'right':\n return `linear-gradient(to left, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n }\n}\n\n/** Inline style map for a masked scroll region (single edge). */\nexport function scrollEdgeFadeMaskStyle(\n edge: ScrollEdgeFadeEdge,\n size: ScrollEdgeFadeSize = 'size-600',\n height?: string,\n): Record<string, string> {\n const mask = scrollEdgeFadeMaskImage(edge);\n return {\n ...scrollEdgeFadeSizeStyle(size, height),\n WebkitMaskImage: mask,\n maskImage: mask,\n WebkitMaskSize: '100% 100%',\n maskSize: '100% 100%',\n };\n}\n\n/** Class map for `scroll-edge-fade` modifiers \u2014 pair with `scroll-edge-fade.css`. */\nexport function scrollEdgeFadeClassMap(opts: ScrollEdgeFadeOptions): Record<string, boolean> {\n const edges = Array.isArray(opts.edges) ? opts.edges : [opts.edges];\n const classes: Record<string, boolean> = {\n 'scroll-edge-fade': true,\n 'scroll-edge-fade--hidden': opts.hidden === true,\n };\n\n for (const edge of edges) {\n classes[`scroll-edge-fade--${edge}`] = true;\n }\n\n const { atEnd } = opts;\n if (atEnd === true) {\n classes['scroll-edge-fade--at-end'] = true;\n } else if (atEnd && typeof atEnd === 'object') {\n const allAtEnd = edges.every(edge => atEnd[edge]);\n if (allAtEnd) {\n classes['scroll-edge-fade--at-end'] = true;\n }\n }\n\n return classes;\n}\n\n/** Whether a scroll container is flush with the given edge (within `threshold` px). */\nexport function isScrollAtEdge(\n el: HTMLElement,\n edge: ScrollEdgeFadeEdge,\n threshold = 2,\n): boolean {\n switch (edge) {\n case 'top':\n return el.scrollTop <= threshold;\n case 'bottom':\n return el.scrollHeight - el.scrollTop - el.clientHeight <= threshold;\n case 'left':\n return el.scrollLeft <= threshold;\n case 'right':\n return el.scrollWidth - el.scrollLeft - el.clientWidth <= threshold;\n }\n}\n", "import {\n dimensionIconographyMd,\n dimensionIconographySm,\n dimensionIconographyXs,\n dimensionMenuWidthXs,\n dimensionPanelWidth2xs,\n dimensionPanelWidthLg,\n dimensionPanelWidthMd,\n dimensionRadius025,\n dimensionSize200,\n dimensionSize300,\n dimensionSize400,\n dimensionSize600,\n dimensionSize800,\n dimensionSpace050,\n dimensionSpace200,\n typographyLineheightLg,\n typographyLineheightMd,\n typographyLineheightSm,\n typographyLineheightXl,\n typographyLineheightXs,\n effectAnimationDelayLong2,\n effectAnimationDelayMedium1,\n effectAnimationDelayMedium3,\n effectAnimationDelayInstant,\n effectAnimationDelayShort2,\n effectAnimationDurationMedium1,\n effectAnimationDurationShort3,\n effectMotionShort2,\n effectMotionShort3,\n} from '@ds-mo/tokens/ts';\n\n/** TokoMo CSS custom-property names for shared component defaults (runtime resolution). */\nexport const TOKEN_DEFAULTS = {\n space050: dimensionSpace050,\n space200: dimensionSpace200,\n radius025: dimensionRadius025,\n size200: dimensionSize200,\n size300: dimensionSize300,\n size400: dimensionSize400,\n size600: dimensionSize600,\n size800: dimensionSize800,\n iconographyMd: dimensionIconographyMd,\n iconographySm: dimensionIconographySm,\n iconographyXs: dimensionIconographyXs,\n panelWidth2xs: dimensionPanelWidth2xs,\n panelWidthMd: dimensionPanelWidthMd,\n panelWidthLg: dimensionPanelWidthLg,\n menuWidthXs: dimensionMenuWidthXs,\n lineheightLg: typographyLineheightLg,\n lineheightMd: typographyLineheightMd,\n lineheightSm: typographyLineheightSm,\n lineheightXl: typographyLineheightXl,\n lineheightXs: typographyLineheightXs,\n motionShort2: effectMotionShort2,\n motionShort3: effectMotionShort3,\n animationDurationShort3: effectAnimationDurationShort3,\n animationDurationMedium1: effectAnimationDurationMedium1,\n animationDelayInstant: effectAnimationDelayInstant,\n animationDelayMedium1: effectAnimationDelayMedium1,\n animationDelayMedium3: effectAnimationDelayMedium3,\n animationDelayShort2: effectAnimationDelayShort2,\n animationDelayLong2: effectAnimationDelayLong2,\n /** Unmeasured menu height fallback: 20\u00D7 base (160px at default scale). */\n menuFallbackHeight: 'calc(var(--dimension-size-base) * 20)',\n /** Unmeasured tooltip width fallback: size-800 + size-200 (80px). */\n tooltipFallbackWidth: 'calc(var(--dimension-size-800) + var(--dimension-size-200))',\n /** Fill-mode donut diameter floor: 16\u00D7 size-base (128px). */\n donutFillMin: 'calc(var(--dimension-size-base) * 16)',\n /** Fill-mode donut diameter ceiling: 24\u00D7 size-base (192px). */\n donutFillMax: 'calc(var(--dimension-size-base) * 24)',\n} as const;\n\nexport type TokenDefaultKey = keyof typeof TOKEN_DEFAULTS;\n\n/** Valid CSS length strings for overlay offset props \u2014 bind on `sideOffset` / `alignOffset` in hosts. */\nexport const TOKEN_CSS_LENGTHS = {\n space050: `var(${dimensionSpace050})`,\n space200: `var(${dimensionSpace200})`,\n menuWidthXs: `var(${dimensionMenuWidthXs})`,\n} as const;\n", "/** Shared width fit for interactive controls (buttons, select, \u2026). */\nexport type ControlWidth = 'hug' | 'fill';\n\n/** Host / control class map for `width=\"hug\" | \"fill\"`. */\nexport function controlWidthClass(width: ControlWidth): Record<string, boolean> {\n return {\n 'ds-control-width--hug': width === 'hug',\n 'ds-control-width--fill': width === 'fill',\n };\n}\n", "import type { TextVariant } from '../components/Text/text-types';\n\n/** Shared public control sizes. Typography is derived; it is not a separate density API. */\nexport type ControlSize = 'md' | 'sm' | 'xs';\n\n/** Complete text variant selected internally by each control size. */\nexport const CONTROL_TEXT_VARIANT: Record<ControlSize, TextVariant> = {\n md: 'text-body-medium',\n sm: 'text-body-small',\n xs: 'text-caption',\n};\n"],
5
+ "mappings": ";AAQA,IAAM,YAAY,uBAAO,IAAI,sBAAsB;AAM5C,SAAS,aAAa,MAAc,MAAuB;AAChE,SAAO,OAAO,QAAQ,IAAI,KAAK,UAAU,IAAI;AAC/C;AAEO,SAAS,YAA0B;AACxC,QAAM,IAAI;AACV,SAAQ,gCAAiB,oBAAI,IAAI;AACnC;AAmBO,SAAS,cAAc,OAA+B,SAAoC;AAC/F,QAAM,QAAQ,UAAU;AACxB,QAAM,OAAO,SAAS,SAAS;AAC/B,aAAW,CAAC,MAAM,GAAG,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC/C,UAAM,IAAI,aAAa,MAAM,IAAI,GAAG,GAAG;AAAA,E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B;AAAA,EACvB,uBAAuB;AAAA,EACvB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA,EAEpB,sBAAsB;AAAA;AAAA,EAEtB,cAAc;AAAA;AAAA,EAEd,cAAc;AAChB;AAKO,IAAM,oBAAoB;AAAA,EAC/B,UAAU,OAAO,iBAAiB;AAAA,EAClC,UAAU,OAAO,iBAAiB;AAAA,EAClC,aAAa,OAAO,oBAAoB;AAC1C;;;AC5EO,SAAS,kBAAkB,OAA8C;AAC9E,SAAO;AAAA,IACL,yBAAyB,UAAU;AAAA,IACnC,0BAA0B,UAAU;AAAA,EACtC;AACF;;;ACHO,IAAM,uBAAyD;AAAA,EACpE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;",
6
6
  "names": ["px"]
7
7
  }
@@ -25,13 +25,11 @@ export declare class ChartDonut {
25
25
  * Externally controlled highlight, matched by `label` — e.g. drive this from a sibling
26
26
  * `ds-chart-legend`'s `dsItemHover` event to keep chart and legend hover in sync.
27
27
  * Falls back to this component's own pointer/focus hover when unset.
28
- * External sync dims slices only the data-viz tooltip is reserved for this
29
- * component's own pointer/keyboard interaction.
28
+ * Slice hover dims peer slices and emits `dsSliceHover` for legend sync no data-viz
29
+ * tooltip (the legend already surfaces label/value).
30
30
  */
31
31
  activeLabel: string | null;
32
32
  private hoveredLabel;
33
- /** Own-hover tooltip (cursor-following). Cleared on leave; not driven by `activeLabel`. */
34
- private tooltip;
35
33
  /** Center text, truncated with an ellipsis if it doesn't fit inside the inner circle. */
36
34
  private displayedValueText;
37
35
  private displayedCaptionText;
@@ -41,7 +39,6 @@ export declare class ChartDonut {
41
39
  dsSliceHover: EventEmitter<ChartDatum | null>;
42
40
  private valueTextEl?;
43
41
  private captionTextEl?;
44
- private wrapperEl?;
45
42
  private resizeObserver;
46
43
  private get isFillMode();
47
44
  private get fillMinPx();
@@ -57,8 +54,6 @@ export declare class ChartDonut {
57
54
  private applyAvailableSize;
58
55
  private teardownResizeObserver;
59
56
  private handleHover;
60
- private handleSliceMove;
61
- private updateTooltip;
62
57
  componentDidRender(): void;
63
58
  render(): any;
64
59
  }
@@ -1,13 +1,17 @@
1
+ import type { IconColor, IconSize } from '../Icon/Icon';
2
+ export type LoaderSize = IconSize;
3
+ export type LoaderColor = IconColor;
1
4
  export declare class Loader {
2
- /** Render size number (px) or TokoMo length (`var(--dimension-iconography-md)`, etc.). */
3
- size: number | string;
5
+ /** Iconography size token. Maps to `--dimension-iconography-{size}`. Default `md` = 20 px. */
6
+ size: LoaderSize;
7
+ /** Semantic foreground color token, or a raw CSS var reference. Same tokens as `ds-icon`. */
8
+ color: LoaderColor | undefined;
4
9
  /**
5
10
  * Accessible label for standalone usage. Wraps the spinner in a live region
6
11
  * and renders the label visually-hidden. Omit when the host element already
7
12
  * conveys busy state via aria-busy.
8
13
  */
9
14
  label: string | undefined;
10
- private get sizePx();
11
15
  render(): any;
12
16
  }
13
17
  //# sourceMappingURL=Loader.d.ts.map
@@ -1,2 +1,2 @@
1
- export type {} from './Loader';
1
+ export type { LoaderSize, LoaderColor } from './Loader';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -3,7 +3,8 @@ export declare class Text {
3
3
  variant: TextVariant;
4
4
  /**
5
5
  * Heavier weight + tighter letter-spacing for the variant.
6
- * `false` (default): regular weight (caption stays medium).
6
+ * `false` (default): one step below emphasis (display semibold, title/body
7
+ * medium, caption medium).
7
8
  * `true`: display bold, title/caption semibold, body medium.
8
9
  */
9
10
  emphasis: boolean;
@@ -1,4 +1,6 @@
1
- import type { TextVariant } from './text-types';
1
+ import type { TextElement, TextVariant } from './text-types';
2
2
  /** `text-body-medium` → `ds-text--body-medium` */
3
3
  export declare function textVariantClass(variant: TextVariant): string;
4
+ /** Inline semantics get a measurable inline box; paragraphs/headings get a block box. */
5
+ export declare function textDisplayClass(element: TextElement): string;
4
6
  //# sourceMappingURL=text-utils.d.ts.map
@@ -37,6 +37,7 @@ export declare class Tooltip {
37
37
  private closeTimer;
38
38
  private anchor;
39
39
  private popupEl;
40
+ private positionObserver;
40
41
  private skipEnterAnimation;
41
42
  private isOpen;
42
43
  private mouseEnterHandler;
@@ -59,6 +60,11 @@ export declare class Tooltip {
59
60
  private unbindAnchor;
60
61
  private clearTimers;
61
62
  private destroyPopup;
63
+ /**
64
+ * Position after `ds-text` upgrades and lays out. Measuring synchronously in
65
+ * `mountPopup` reads a collapsed/fallback width and places left/right tips wrong.
66
+ */
67
+ private schedulePosition;
62
68
  /** Drop the open tip immediately (warm handoff to another tooltip). */
63
69
  private hideInstant;
64
70
  private show;
@@ -1,8 +1,9 @@
1
1
  export type TooltipDataVizSide = 'left' | 'right';
2
2
  export type TooltipDataVizAlign = 'top' | 'bottom';
3
3
  /**
4
- * Positioned value/label callout for chart hover interactions (donut slice, bar,
5
- * line point, ...). Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element
4
+ * Positioned value/label callout for chart hover interactions (bar, line point, …).
5
+ * Donut charts skip this legend sync already surfaces the hovered slice.
6
+ * Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —
6
7
  * charts hover-highlight data that lives inside an SVG, so the chart itself computes
7
8
  * the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
8
9
  *
@@ -22,6 +22,7 @@ import { DividerInset, DividerLength, DividerOrientation, DividerSurface } from
22
22
  import { EmptyStateType } from "./components/EmptyState/EmptyState";
23
23
  import { IconColor, IconSize } from "./components/Icon/Icon";
24
24
  import { InputType } from "./components/Input/Input";
25
+ import { LoaderColor, LoaderSize } from "./components/Loader/Loader";
25
26
  import { MenuItemData, MenuSection } from "./components/Menu/menu-types";
26
27
  import { MenuAlign, MenuSide } from "./components/Menu/menu-position";
27
28
  import { ModalWidth } from "./components/Modal/Modal";
@@ -56,6 +57,7 @@ export { DividerInset, DividerLength, DividerOrientation, DividerSurface } from
56
57
  export { EmptyStateType } from "./components/EmptyState/EmptyState";
57
58
  export { IconColor, IconSize } from "./components/Icon/Icon";
58
59
  export { InputType } from "./components/Input/Input";
60
+ export { LoaderColor, LoaderSize } from "./components/Loader/Loader";
59
61
  export { MenuItemData, MenuSection } from "./components/Menu/menu-types";
60
62
  export { MenuAlign, MenuSide } from "./components/Menu/menu-position";
61
63
  export { ModalWidth } from "./components/Modal/Modal";
@@ -401,7 +403,7 @@ export namespace Components {
401
403
  }
402
404
  interface DsChartDonut {
403
405
  /**
404
- * Externally controlled highlight, matched by `label` — e.g. drive this from a sibling `ds-chart-legend`'s `dsItemHover` event to keep chart and legend hover in sync. Falls back to this component's own pointer/focus hover when unset. External sync dims slices onlythe data-viz tooltip is reserved for this component's own pointer/keyboard interaction.
406
+ * Externally controlled highlight, matched by `label` — e.g. drive this from a sibling `ds-chart-legend`'s `dsItemHover` event to keep chart and legend hover in sync. Falls back to this component's own pointer/focus hover when unset. Slice hover dims peer slices and emits `dsSliceHover` for legend sync no data-viz tooltip (the legend already surfaces label/value).
405
407
  * @default null
406
408
  */
407
409
  "activeLabel": string | null;
@@ -639,15 +641,19 @@ export namespace Components {
639
641
  "value": string;
640
642
  }
641
643
  interface DsLoader {
644
+ /**
645
+ * Semantic foreground color token, or a raw CSS var reference. Same tokens as `ds-icon`.
646
+ */
647
+ "color": LoaderColor | undefined;
642
648
  /**
643
649
  * Accessible label for standalone usage. Wraps the spinner in a live region and renders the label visually-hidden. Omit when the host element already conveys busy state via aria-busy.
644
650
  */
645
651
  "label": string | undefined;
646
652
  /**
647
- * Render size number (px) or TokoMo length (`var(--dimension-iconography-md)`, etc.).
648
- * @default TOKEN_DEFAULTS.iconographyMd
653
+ * Iconography size token. Maps to `--dimension-iconography-{size}`. Default `md` = 20 px.
654
+ * @default 'md'
649
655
  */
650
- "size": number | string;
656
+ "size": LoaderSize;
651
657
  }
652
658
  interface DsMenu {
653
659
  /**
@@ -1070,7 +1076,7 @@ export namespace Components {
1070
1076
  "color": TextColor | undefined;
1071
1077
  "decoration": TextDecoration | undefined;
1072
1078
  /**
1073
- * Heavier weight + tighter letter-spacing for the variant. `false` (default): regular weight (caption stays medium). `true`: display bold, title/caption semibold, body medium.
1079
+ * Heavier weight + tighter letter-spacing for the variant. `false` (default): one step below emphasis (display semibold, title/body medium, caption medium). `true`: display bold, title/caption semibold, body medium.
1074
1080
  * @default false
1075
1081
  */
1076
1082
  "emphasis": boolean;
@@ -1156,8 +1162,9 @@ export namespace Components {
1156
1162
  "size": TooltipSize;
1157
1163
  }
1158
1164
  /**
1159
- * Positioned value/label callout for chart hover interactions (donut slice, bar,
1160
- * line point, ...). Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element
1165
+ * Positioned value/label callout for chart hover interactions (bar, line point, …).
1166
+ * Donut charts skip this legend sync already surfaces the hovered slice.
1167
+ * Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —
1161
1168
  * charts hover-highlight data that lives inside an SVG, so the chart itself computes
1162
1169
  * the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
1163
1170
  * Renders `position: absolute` — place inside a `position: relative` chart wrapper,
@@ -1851,8 +1858,9 @@ declare global {
1851
1858
  new (): HTMLDsTooltipElement;
1852
1859
  };
1853
1860
  /**
1854
- * Positioned value/label callout for chart hover interactions (donut slice, bar,
1855
- * line point, ...). Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element
1861
+ * Positioned value/label callout for chart hover interactions (bar, line point, …).
1862
+ * Donut charts skip this legend sync already surfaces the hovered slice.
1863
+ * Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —
1856
1864
  * charts hover-highlight data that lives inside an SVG, so the chart itself computes
1857
1865
  * the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
1858
1866
  * Renders `position: absolute` — place inside a `position: relative` chart wrapper,
@@ -2255,7 +2263,7 @@ declare namespace LocalJSX {
2255
2263
  }
2256
2264
  interface DsChartDonut {
2257
2265
  /**
2258
- * Externally controlled highlight, matched by `label` — e.g. drive this from a sibling `ds-chart-legend`'s `dsItemHover` event to keep chart and legend hover in sync. Falls back to this component's own pointer/focus hover when unset. External sync dims slices onlythe data-viz tooltip is reserved for this component's own pointer/keyboard interaction.
2266
+ * Externally controlled highlight, matched by `label` — e.g. drive this from a sibling `ds-chart-legend`'s `dsItemHover` event to keep chart and legend hover in sync. Falls back to this component's own pointer/focus hover when unset. Slice hover dims peer slices and emits `dsSliceHover` for legend sync no data-viz tooltip (the legend already surfaces label/value).
2259
2267
  * @default null
2260
2268
  */
2261
2269
  "activeLabel"?: string | null;
@@ -2511,15 +2519,19 @@ declare namespace LocalJSX {
2511
2519
  "value"?: string;
2512
2520
  }
2513
2521
  interface DsLoader {
2522
+ /**
2523
+ * Semantic foreground color token, or a raw CSS var reference. Same tokens as `ds-icon`.
2524
+ */
2525
+ "color"?: LoaderColor | undefined;
2514
2526
  /**
2515
2527
  * Accessible label for standalone usage. Wraps the spinner in a live region and renders the label visually-hidden. Omit when the host element already conveys busy state via aria-busy.
2516
2528
  */
2517
2529
  "label"?: string | undefined;
2518
2530
  /**
2519
- * Render size number (px) or TokoMo length (`var(--dimension-iconography-md)`, etc.).
2520
- * @default TOKEN_DEFAULTS.iconographyMd
2531
+ * Iconography size token. Maps to `--dimension-iconography-{size}`. Default `md` = 20 px.
2532
+ * @default 'md'
2521
2533
  */
2522
- "size"?: number | string;
2534
+ "size"?: LoaderSize;
2523
2535
  }
2524
2536
  interface DsMenu {
2525
2537
  /**
@@ -2985,7 +2997,7 @@ declare namespace LocalJSX {
2985
2997
  "color"?: TextColor | undefined;
2986
2998
  "decoration"?: TextDecoration | undefined;
2987
2999
  /**
2988
- * Heavier weight + tighter letter-spacing for the variant. `false` (default): regular weight (caption stays medium). `true`: display bold, title/caption semibold, body medium.
3000
+ * Heavier weight + tighter letter-spacing for the variant. `false` (default): one step below emphasis (display semibold, title/body medium, caption medium). `true`: display bold, title/caption semibold, body medium.
2989
3001
  * @default false
2990
3002
  */
2991
3003
  "emphasis"?: boolean;
@@ -3072,8 +3084,9 @@ declare namespace LocalJSX {
3072
3084
  "size"?: TooltipSize;
3073
3085
  }
3074
3086
  /**
3075
- * Positioned value/label callout for chart hover interactions (donut slice, bar,
3076
- * line point, ...). Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element
3087
+ * Positioned value/label callout for chart hover interactions (bar, line point, …).
3088
+ * Donut charts skip this legend sync already surfaces the hovered slice.
3089
+ * Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —
3077
3090
  * charts hover-highlight data that lives inside an SVG, so the chart itself computes
3078
3091
  * the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
3079
3092
  * Renders `position: absolute` — place inside a `position: relative` chart wrapper,
@@ -3264,7 +3277,8 @@ declare namespace LocalJSX {
3264
3277
  "ariaDescribedby": string | undefined;
3265
3278
  }
3266
3279
  interface DsLoaderAttributes {
3267
- "size": string;
3280
+ "size": LoaderSize;
3281
+ "color": LoaderColor | undefined;
3268
3282
  "label": string | undefined;
3269
3283
  }
3270
3284
  interface DsMenuAttributes {
@@ -3537,8 +3551,9 @@ declare module "@stencil/core" {
3537
3551
  */
3538
3552
  "ds-tooltip": LocalJSX.IntrinsicElements["ds-tooltip"] & JSXBase.HTMLAttributes<HTMLDsTooltipElement>;
3539
3553
  /**
3540
- * Positioned value/label callout for chart hover interactions (donut slice, bar,
3541
- * line point, ...). Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element
3554
+ * Positioned value/label callout for chart hover interactions (bar, line point, …).
3555
+ * Donut charts skip this legend sync already surfaces the hovered slice.
3556
+ * Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —
3542
3557
  * charts hover-highlight data that lives inside an SVG, so the chart itself computes
3543
3558
  * the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
3544
3559
  * Renders `position: absolute` — place inside a `position: relative` chart wrapper,
@@ -1,6 +1,6 @@
1
1
  import type { TextVariant } from '../components/Text/text-types';
2
- /** Control-density sizes shared by buttons, tags, chips, select, tooltip. */
3
- export type ControlDensitySize = 'md' | 'sm' | 'xs';
4
- /** Body/caption variant per control-density size (emphasis is separate). */
5
- export declare const CONTROL_TEXT_VARIANT: Record<ControlDensitySize, TextVariant>;
2
+ /** Shared public control sizes. Typography is derived; it is not a separate density API. */
3
+ export type ControlSize = 'md' | 'sm' | 'xs';
4
+ /** Complete text variant selected internally by each control size. */
5
+ export declare const CONTROL_TEXT_VARIANT: Record<ControlSize, TextVariant>;
6
6
  //# sourceMappingURL=control-text.d.ts.map
@@ -10,5 +10,5 @@ export type { TokenDefaultKey } from './token-defaults';
10
10
  export { controlWidthClass } from './control-width';
11
11
  export type { ControlWidth } from './control-width';
12
12
  export { CONTROL_TEXT_VARIANT } from './control-text';
13
- export type { ControlDensitySize } from './control-text';
13
+ export type { ControlSize } from './control-text';
14
14
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ds-mo/ui",
3
- "version": "2.15.0",
3
+ "version": "3.0.1",
4
4
  "description": "CompoMo — composable web components styled with TokoMo design tokens",
5
5
  "keywords": [
6
6
  "web-components",
@@ -69,9 +69,9 @@
69
69
  "pretest": "node scripts/generate-icon-catalog.mjs",
70
70
  "build": "stencil build && node scripts/patch-index-types.mjs && node scripts/verify-icons-externalized.mjs && node scripts/write-build-stamp.mjs && node scripts/build-lib-exports.mjs",
71
71
  "verify:pack": "node scripts/verify-npm-pack.mjs && node scripts/verify-nav-import.mjs",
72
- "test": "node --import tsx/esm --test tests/panel-nav-utils.test.ts tests/panel-tools.test.ts tests/text.test.ts tests/shell-shortcuts.test.ts tests/shell-gradient-presets.test.ts tests/shell-view-transition.test.ts tests/shell-gradient.test.ts tests/shell-chrome-metrics.test.ts tests/shell-chrome-layer.test.ts tests/chrome-transition.test.ts tests/bar-nav-overflow-hysteresis.test.ts tests/badge-gradient-ring.test.ts tests/scroll-edge-fade.test.ts tests/resolve-css-length-px.test.ts tests/resolve-css-time-ms.test.ts tests/overlay-positioning.test.ts tests/menu-position.test.ts tests/menu-placement.test.ts tests/bar-nav-utils.test.ts tests/bar-nav-tabs-menu-utils.test.ts tests/bar-nav-dom-utils.test.ts tests/icon-catalog.test.ts tests/icon-cache.test.ts tests/icon-svg.test.ts",
72
+ "test": "node --import tsx/esm --test tests/panel-nav-utils.test.ts tests/panel-tools.test.ts tests/text.test.ts tests/eslint-plugin-local.test.ts tests/shell-shortcuts.test.ts tests/shell-gradient-presets.test.ts tests/shell-view-transition.test.ts tests/shell-gradient.test.ts tests/shell-chrome-metrics.test.ts tests/shell-chrome-layer.test.ts tests/chrome-transition.test.ts tests/bar-nav-overflow-hysteresis.test.ts tests/badge-gradient-ring.test.ts tests/scroll-edge-fade.test.ts tests/resolve-css-length-px.test.ts tests/resolve-css-time-ms.test.ts tests/overlay-positioning.test.ts tests/menu-position.test.ts tests/menu-placement.test.ts tests/bar-nav-utils.test.ts tests/bar-nav-tabs-menu-utils.test.ts tests/bar-nav-dom-utils.test.ts tests/icon-catalog.test.ts tests/icon-cache.test.ts tests/icon-svg.test.ts",
73
73
  "test:e2e": "npm run build && playwright test",
74
- "test:e2e:install": "playwright install chromium",
74
+ "test:e2e:install": "playwright install chromium firefox",
75
75
  "build:docs": "stencil build --docs",
76
76
  "dev": "node scripts/generate-icon-catalog.mjs && stencil build --watch",
77
77
  "storybook:ui": "node scripts/storybook-ui.mjs",
@@ -114,9 +114,9 @@
114
114
  "@stencil/angular-output-target": "^1.3.1",
115
115
  "@stencil/core": "^4.43.4",
116
116
  "@stencil/react-output-target": "^1.5.3",
117
- "@storybook/addon-docs": "^10.4.2",
118
- "@storybook/web-components": "^10.4.2",
119
- "@storybook/web-components-vite": "^10.4.2",
117
+ "@storybook/addon-docs": "^10.5.0",
118
+ "@storybook/web-components": "^10.5.0",
119
+ "@storybook/web-components-vite": "^10.5.0",
120
120
  "@types/d3-array": "^3.2.2",
121
121
  "@types/d3-scale": "^4.0.9",
122
122
  "@types/d3-shape": "^3.1.8",
@@ -130,7 +130,7 @@
130
130
  "lit": "^3.3.3",
131
131
  "react": "^19.2.7",
132
132
  "react-dom": "^19.2.7",
133
- "storybook": "^10.4.2",
133
+ "storybook": "^10.5.0",
134
134
  "stylelint": "^17.14.0",
135
135
  "stylelint-config-standard": "^40.0.0",
136
136
  "tsx": "^4.20.3",
@@ -553,14 +553,14 @@ export declare interface DsInput extends Components.DsInput {
553
553
 
554
554
 
555
555
  @ProxyCmp({
556
- inputs: ['label', 'size']
556
+ inputs: ['color', 'label', 'size']
557
557
  })
558
558
  @Component({
559
559
  selector: 'ds-loader',
560
560
  changeDetection: ChangeDetectionStrategy.OnPush,
561
561
  template: '<ng-content></ng-content>',
562
562
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
563
- inputs: ['label', 'size'],
563
+ inputs: ['color', 'label', 'size'],
564
564
  standalone: false
565
565
  })
566
566
  export class DsLoader {
@@ -121,11 +121,9 @@ export class Banner {
121
121
  </div>
122
122
  )}
123
123
  <div class="banner-body">
124
- <span class="banner-message">
125
- <ds-text as="span" variant="text-body-medium" color="inherit">
126
- {this.message}
127
- </ds-text>
128
- </span>
124
+ <ds-text class="banner-message" as="div" variant="text-body-medium" color="inherit">
125
+ {this.message}
126
+ </ds-text>
129
127
  {this.showDismiss && (
130
128
  <button
131
129
  type="button"