@ds-mo/ui 2.8.0 → 2.10.0

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 (143) hide show
  1. package/README.md +8 -9
  2. package/dist/.build-stamp +1 -1
  3. package/dist/components/ds-app-shell.js +1 -1
  4. package/dist/components/ds-badge.js +1 -1
  5. package/dist/components/ds-banner.js +1 -1
  6. package/dist/components/ds-bar-nav.js +1 -1
  7. package/dist/components/{ds-toggle-button.d.ts → ds-button-filled.d.ts} +4 -4
  8. package/dist/components/ds-button-filled.js +2 -0
  9. package/dist/components/ds-button-unfilled-icon.js +1 -1
  10. package/dist/components/{ds-button-group.d.ts → ds-card-setting.d.ts} +4 -4
  11. package/dist/components/ds-card-setting.js +2 -0
  12. package/dist/components/ds-card-setting.js.map +1 -0
  13. package/dist/components/ds-card.js +1 -1
  14. package/dist/components/ds-checkbox.js +1 -1
  15. package/dist/components/ds-chip.js +1 -1
  16. package/dist/components/ds-divider.js +1 -1
  17. package/dist/components/ds-empty-state.js +1 -1
  18. package/dist/components/ds-empty-state.js.map +1 -1
  19. package/dist/components/ds-fade.js +1 -1
  20. package/dist/components/ds-field.js +1 -1
  21. package/dist/components/ds-field.js.map +1 -1
  22. package/dist/components/ds-header.js +1 -1
  23. package/dist/components/ds-icon.js +1 -1
  24. package/dist/components/ds-input.js +1 -1
  25. package/dist/components/ds-loader.js +1 -1
  26. package/dist/components/ds-loader.js.map +1 -1
  27. package/dist/components/ds-menu.js +1 -1
  28. package/dist/components/ds-modal.js +1 -1
  29. package/dist/components/ds-panel-nav.js +1 -1
  30. package/dist/components/ds-panel-tools.js +1 -1
  31. package/dist/components/ds-panel-tools.js.map +1 -1
  32. package/dist/components/ds-radio-group.js +1 -1
  33. package/dist/components/ds-scrollbar.js +1 -1
  34. package/dist/components/ds-select.js +1 -1
  35. package/dist/components/ds-shell-gradient-picker.js +1 -1
  36. package/dist/components/ds-shell-gradient-swatch.js +1 -1
  37. package/dist/components/ds-slider.js +1 -1
  38. package/dist/components/ds-surface.js +1 -1
  39. package/dist/components/ds-tab-group-nav.js +1 -1
  40. package/dist/components/ds-tab-group.js +1 -1
  41. package/dist/components/ds-table.js +1 -1
  42. package/dist/components/ds-table.js.map +1 -1
  43. package/dist/components/ds-tag.js +1 -1
  44. package/dist/components/ds-text.js +1 -1
  45. package/dist/components/ds-toast-provider.js +1 -1
  46. package/dist/components/ds-toggle.js +1 -1
  47. package/dist/components/ds-tooltip.js +1 -1
  48. package/dist/components/ds-tooltip.js.map +1 -1
  49. package/dist/components/{p-g6MCxfm4.js → p-BFPfyJ8Z.js} +1 -1
  50. package/dist/components/p-BFPfyJ8Z.js.map +1 -0
  51. package/dist/components/{p-CiEc8Nwx.js → p-BOpHKDOG.js} +2 -2
  52. package/dist/components/p-BOpHKDOG.js.map +1 -0
  53. package/dist/components/{p-DvBrQuie.js → p-CDNVPM2x.js} +2 -2
  54. package/dist/components/{p-C9za7IDu.js → p-CJubWt1F.js} +2 -2
  55. package/dist/components/{p-DDEAcGac.js → p-CKCBqwIw.js} +2 -2
  56. package/dist/components/{p-DDEAcGac.js.map → p-CKCBqwIw.js.map} +1 -1
  57. package/dist/components/p-Cynjsv-P.js +2 -0
  58. package/dist/components/p-Cynjsv-P.js.map +1 -0
  59. package/dist/components/{p-B3ua1NkM.js → p-DnGr8qtq.js} +2 -2
  60. package/dist/components/p-Dul5eGGE.js +2 -0
  61. package/dist/components/p-Dul5eGGE.js.map +1 -0
  62. package/dist/components/{p-D4zKc1RW.js → p-evjnuLjj.js} +2 -2
  63. package/dist/components/p-jjfqrXnP.js +2 -0
  64. package/dist/components/p-jjfqrXnP.js.map +1 -0
  65. package/dist/components/p-w2Wrf0jC.js +2 -0
  66. package/dist/components/p-w2Wrf0jC.js.map +1 -0
  67. package/dist/types/components/Badge/Badge.d.ts +5 -1
  68. package/dist/types/components/ButtonFilled/ButtonFilled.d.ts +26 -0
  69. package/dist/types/components/ButtonFilled/index.d.ts +2 -0
  70. package/dist/types/components/ButtonUnfilledIcon/ButtonUnfilledIcon.d.ts +9 -2
  71. package/dist/types/components/ButtonUnfilledIcon/index.d.ts +1 -1
  72. package/dist/types/components/CardSetting/CardSetting.d.ts +16 -0
  73. package/dist/types/components/CardSetting/index.d.ts +2 -0
  74. package/dist/types/components/Icon/Icon.d.ts +14 -1
  75. package/dist/types/components/Icon/flag-icon-catalog.d.ts +2 -1
  76. package/dist/types/components/Icon/icon-cache.d.ts +25 -0
  77. package/dist/types/components/Icon/icon-svg.d.ts +26 -0
  78. package/dist/types/components/Icon/system-icon-catalog.d.ts +2 -1
  79. package/dist/types/components.d.ts +129 -414
  80. package/dist/types/utils/index.d.ts +1 -0
  81. package/package.json +2 -2
  82. package/src/angular/index.ts +2 -4
  83. package/src/angular/proxies.ts +40 -105
  84. package/src/react/components.ts +2 -4
  85. package/src/react/ds-button-filled.ts +27 -0
  86. package/src/react/ds-card-setting.ts +27 -0
  87. package/src/wc/components/Badge/Badge.tsx +6 -2
  88. package/src/wc/components/ButtonFilled/ButtonFilled.tsx +86 -0
  89. package/src/wc/components/ButtonFilled/index.ts +1 -0
  90. package/src/wc/components/ButtonUnfilledIcon/ButtonUnfilledIcon.tsx +19 -11
  91. package/src/wc/components/ButtonUnfilledIcon/index.ts +1 -1
  92. package/src/wc/components/CardSetting/CardSetting.tsx +96 -0
  93. package/src/wc/components/CardSetting/index.ts +1 -0
  94. package/src/wc/components/Icon/Icon.tsx +82 -22
  95. package/src/wc/components/Icon/flag-icon-catalog.ts +33 -65
  96. package/src/wc/components/Icon/icon-cache.ts +47 -0
  97. package/src/wc/components/Icon/icon-svg.ts +73 -0
  98. package/src/wc/components/Icon/system-icon-catalog.ts +398 -795
  99. package/src/wc/components.d.ts +129 -414
  100. package/src/wc/nav/badge-gradient-ring.ts +4 -1
  101. package/src/wc/utils/index.ts +1 -0
  102. package/dist/components/ds-button-group.js +0 -2
  103. package/dist/components/ds-button-group.js.map +0 -1
  104. package/dist/components/ds-button.d.ts +0 -11
  105. package/dist/components/ds-button.js +0 -2
  106. package/dist/components/ds-toggle-button-group.d.ts +0 -11
  107. package/dist/components/ds-toggle-button-group.js +0 -2
  108. package/dist/components/ds-toggle-button-group.js.map +0 -1
  109. package/dist/components/ds-toggle-button.js +0 -2
  110. package/dist/components/ds-toggle-button.js.map +0 -1
  111. package/dist/components/p-BPMJx63I.js +0 -2
  112. package/dist/components/p-BPMJx63I.js.map +0 -1
  113. package/dist/components/p-BTndnbR_.js +0 -2
  114. package/dist/components/p-BTndnbR_.js.map +0 -1
  115. package/dist/components/p-C0CUGiLm.js +0 -2
  116. package/dist/components/p-C0CUGiLm.js.map +0 -1
  117. package/dist/components/p-CiEc8Nwx.js.map +0 -1
  118. package/dist/components/p-DUDppafq.js +0 -2
  119. package/dist/components/p-DUDppafq.js.map +0 -1
  120. package/dist/components/p-DgDSRPSP.js +0 -2
  121. package/dist/components/p-DgDSRPSP.js.map +0 -1
  122. package/dist/components/p-DqBCQRRd.js +0 -2
  123. package/dist/components/p-DqBCQRRd.js.map +0 -1
  124. package/dist/components/p-g6MCxfm4.js.map +0 -1
  125. package/dist/types/components/Button/Button.d.ts +0 -38
  126. package/dist/types/components/Button/index.d.ts +0 -2
  127. package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +0 -29
  128. package/dist/types/components/ToggleButton/ToggleButton.d.ts +0 -37
  129. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +0 -33
  130. package/src/react/ds-button-group.ts +0 -27
  131. package/src/react/ds-button.ts +0 -35
  132. package/src/react/ds-toggle-button-group.ts +0 -27
  133. package/src/react/ds-toggle-button.ts +0 -27
  134. package/src/wc/components/Button/Button.tsx +0 -158
  135. package/src/wc/components/Button/index.ts +0 -1
  136. package/src/wc/components/ButtonGroup/ButtonGroup.tsx +0 -110
  137. package/src/wc/components/ToggleButton/ToggleButton.tsx +0 -124
  138. package/src/wc/components/ToggleButtonGroup/ToggleButtonGroup.tsx +0 -118
  139. /package/dist/components/{ds-button.js.map → ds-button-filled.js.map} +0 -0
  140. /package/dist/components/{p-DvBrQuie.js.map → p-CDNVPM2x.js.map} +0 -0
  141. /package/dist/components/{p-C9za7IDu.js.map → p-CJubWt1F.js.map} +0 -0
  142. /package/dist/components/{p-B3ua1NkM.js.map → p-DnGr8qtq.js.map} +0 -0
  143. /package/dist/components/{p-D4zKc1RW.js.map → p-evjnuLjj.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{p as e,H as a,h as i,a as n,t as r}from"./index.js";import{i as d,B as t}from"./p-g6MCxfm4.js";const s=()=>`.sc-ds-badge-h{display:inline-flex;align-items:center;justify-content:center;pointer-events:none;vertical-align:middle;--_badge-bg:var(--color-background-bold-brand);--_badge-fg:var(--color-foreground-on-bold-background-primary);--_badge-ring:var(--color-background-secondary);--_badge-ring-width:var(--dimension-stroke-width-018)}.badge__mark.sc-ds-badge{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;color:var(--_badge-fg);background:var(--_badge-bg);box-shadow:0 0 0 var(--_badge-ring-width) var(--_badge-ring);white-space:nowrap}.badge--dot.sc-ds-badge-h .badge__mark.sc-ds-badge{width:var(--dimension-size-075);height:var(--dimension-size-075);border-radius:var(--dimension-radius-half)}.badge--counter.sc-ds-badge-h .badge__mark.sc-ds-badge{width:var(--dimension-size-150);height:var(--dimension-size-150);padding:0;border-radius:var(--dimension-radius-half);font-size:var(--typography-fontsize-xs);line-height:1}.badge--selected.sc-ds-badge-h{--_badge-bg:var(--color-foreground-primary)}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge{position:relative;z-index:0;box-shadow:none;isolation:isolate}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::before,.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::after{content:'';position:absolute;inset:calc(-1 * var(--_badge-ring-width));border-radius:inherit;box-sizing:border-box;padding:var(--_badge-ring-width);pointer-events:none;-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask-composite:exclude}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::before{z-index:-2;background-color:var(--_badge-ring)}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::after{z-index:-1;background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-position:0 0;background-repeat:no-repeat;background-attachment:fixed;opacity:var(--ds-shell-gradient-opacity, 1)}`;const o={default:"var(--color-background-secondary)",primary:"var(--color-background-primary)",secondary:"var(--color-background-secondary)",medium:"var(--color-background-medium-neutral)",bold:"var(--color-background-bold-neutral)",strong:"var(--color-background-strong-neutral)",navigation:"var(--color-navigation-background)","always-dark":"var(--color-always-dark-background)"};const g=e(class e extends a{constructor(e){super();if(e!==false){this.__registerHost()}this.variant="counter";this.count=0;this.max=9;this.surface="default";this.gradientBackground=false;this.isSelected=false;this.gradientLayoutVersion=0;this.gradientObserver=null;this.gradientWindowListener=null}componentDidLoad(){this.enableShellGradientRingIfNeeded()}disconnectedCallback(){this.unbindGradientRingSync()}gradientBackgroundChanged(){this.bindGradientRingSync()}enableShellGradientRingIfNeeded(){if(!this.gradientBackground&&d(this.el)){this.gradientBackground=true}if(this.gradientBackground){this.bindGradientRingSync()}}bindGradientRingSync(){this.unbindGradientRingSync();if(!this.gradientBackground)return;const e=()=>{this.gradientLayoutVersion+=1};e();this.gradientWindowListener=e;window.addEventListener("resize",e);if(typeof ResizeObserver!=="undefined"){this.gradientObserver=new ResizeObserver(e);this.gradientObserver.observe(this.el);const a=this.el.closest("ds-app-shell");if(a)this.gradientObserver.observe(a);const i=this.el.closest("ds-bar-nav");if(i)this.gradientObserver.observe(i);const n=this.el.closest("ds-panel-nav");if(n)this.gradientObserver.observe(n)}}unbindGradientRingSync(){if(this.gradientWindowListener){window.removeEventListener("resize",this.gradientWindowListener);this.gradientWindowListener=null}this.gradientObserver?.disconnect();this.gradientObserver=null}ringHostStyle(e){const a={"--_badge-ring":e};if(!this.gradientBackground||!d(this.el))return a;a[t]="0 0";return a}render(){const e=this.variant==="dot";if(!e&&this.count===0)return i(n,{style:{display:"none"}});const a=this.count>this.max?"+":String(this.count);const r=this.label??(e?"Notification":String(this.count));const d=this.background??o[this.surface];return i(n,{class:{badge:true,"badge--counter":!e,"badge--dot":e,"badge--selected":this.isSelected,"badge--on-gradient-background":this.gradientBackground},"aria-label":r,style:this.ringHostStyle(d)},i("span",{class:{badge__mark:true,"text-caption-emphasis":!e},"aria-hidden":"true"},!e&&a))}get el(){return this}static get watchers(){return{gradientBackground:[{gradientBackgroundChanged:0}]}}static get style(){return s()}},[2,"ds-badge",{variant:[1],count:[2],max:[2],surface:[1],background:[1],gradientBackground:[516,"on-gradient-background"],isSelected:[4,"is-selected"],label:[1],gradientLayoutVersion:[32]},undefined,{gradientBackground:[{gradientBackgroundChanged:0}]}]);function c(){if(typeof customElements==="undefined"){return}const e=["ds-badge"];e.forEach((e=>{switch(e){case"ds-badge":if(!customElements.get(r(e))){customElements.define(r(e),g)}break}}))}c();export{g as B,c as d};
2
- //# sourceMappingURL=p-CiEc8Nwx.js.map
1
+ import{p as e,H as a,h as i,a as n,t as r}from"./index.js";import{i as d,B as t}from"./p-BFPfyJ8Z.js";const s=()=>`.sc-ds-badge-h{display:inline-flex;align-items:center;justify-content:center;pointer-events:none;vertical-align:middle;--_badge-bg:var(--color-background-bold-brand);--_badge-fg:var(--color-foreground-on-bold-background-primary);--_badge-ring:var(--color-background-secondary);--_badge-ring-width:var(--dimension-stroke-width-018)}.badge__mark.sc-ds-badge{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;color:var(--_badge-fg);background:var(--_badge-bg);box-shadow:0 0 0 var(--_badge-ring-width) var(--_badge-ring);white-space:nowrap}.badge--dot.sc-ds-badge-h .badge__mark.sc-ds-badge{width:var(--dimension-size-075);height:var(--dimension-size-075);border-radius:var(--dimension-radius-half)}.badge--counter.sc-ds-badge-h .badge__mark.sc-ds-badge{width:var(--dimension-size-150);height:var(--dimension-size-150);padding:0;border-radius:var(--dimension-radius-half);font-size:var(--typography-fontsize-xs);line-height:1}.badge--selected.sc-ds-badge-h{--_badge-bg:var(--color-foreground-primary)}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge{position:relative;z-index:0;box-shadow:none;isolation:isolate}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::before,.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::after{content:'';position:absolute;inset:calc(-1 * var(--_badge-ring-width));border-radius:inherit;box-sizing:border-box;padding:var(--_badge-ring-width);pointer-events:none;-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask-composite:exclude}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::before{z-index:-2;background-color:var(--_badge-ring)}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::after{z-index:-1;background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-position:0 0;background-repeat:no-repeat;background-attachment:fixed;opacity:var(--ds-shell-gradient-opacity, 1)}`;const o={default:"var(--color-background-secondary)",primary:"var(--color-background-primary)",secondary:"var(--color-background-secondary)",medium:"var(--color-background-medium-neutral)",bold:"var(--color-background-bold-neutral)",strong:"var(--color-background-strong-neutral)",navigation:"var(--color-navigation-background)","always-dark":"var(--color-always-dark-background)"};const g=e(class e extends a{constructor(e){super();if(e!==false){this.__registerHost()}this.variant="counter";this.count=0;this.max=9;this.surface="default";this.gradientBackground=false;this.isSelected=false;this.gradientLayoutVersion=0;this.gradientObserver=null;this.gradientWindowListener=null}componentDidLoad(){this.enableShellGradientRingIfNeeded()}disconnectedCallback(){this.unbindGradientRingSync()}gradientBackgroundChanged(){this.bindGradientRingSync()}enableShellGradientRingIfNeeded(){if(!this.gradientBackground&&d(this.el)){this.gradientBackground=true}if(this.gradientBackground){this.bindGradientRingSync()}}bindGradientRingSync(){this.unbindGradientRingSync();if(!this.gradientBackground)return;const e=()=>{this.gradientLayoutVersion+=1};e();this.gradientWindowListener=e;window.addEventListener("resize",e);if(typeof ResizeObserver!=="undefined"){this.gradientObserver=new ResizeObserver(e);this.gradientObserver.observe(this.el);const a=this.el.closest("ds-app-shell");if(a)this.gradientObserver.observe(a);const i=this.el.closest("ds-bar-nav");if(i)this.gradientObserver.observe(i);const n=this.el.closest("ds-panel-nav");if(n)this.gradientObserver.observe(n)}}unbindGradientRingSync(){if(this.gradientWindowListener){window.removeEventListener("resize",this.gradientWindowListener);this.gradientWindowListener=null}this.gradientObserver?.disconnect();this.gradientObserver=null}ringHostStyle(e){const a={"--_badge-ring":e};if(!this.gradientBackground||!d(this.el))return a;a[t]="0 0";return a}render(){const e=this.variant==="dot";if(!e&&this.count===0)return i(n,{style:{display:"none"}});const a=this.count>this.max?"+":String(this.count);const r=this.label??(e?"Notification":String(this.count));const d=this.background??o[this.surface];return i(n,{class:{badge:true,"badge--counter":!e,"badge--dot":e,"badge--selected":this.isSelected,"badge--on-gradient-background":this.gradientBackground},"aria-label":r,style:this.ringHostStyle(d)},i("span",{class:{badge__mark:true,"text-caption-emphasis":!e},"aria-hidden":"true"},!e&&a))}get el(){return this}static get watchers(){return{gradientBackground:[{gradientBackgroundChanged:0}]}}static get style(){return s()}},[2,"ds-badge",{variant:[1],count:[2],max:[2],surface:[1],background:[1],gradientBackground:[516,"gradient-background"],isSelected:[4,"is-selected"],label:[1],gradientLayoutVersion:[32]},undefined,{gradientBackground:[{gradientBackgroundChanged:0}]}]);function c(){if(typeof customElements==="undefined"){return}const e=["ds-badge"];e.forEach((e=>{switch(e){case"ds-badge":if(!customElements.get(r(e))){customElements.define(r(e),g)}break}}))}c();export{g as B,c as d};
2
+ //# sourceMappingURL=p-BOpHKDOG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["badgeCss","SURFACE_RING","default","primary","secondary","medium","bold","strong","navigation","Badge","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","variant","count","max","surface","gradientBackground","isSelected","gradientLayoutVersion","gradientObserver","gradientWindowListener","componentDidLoad","enableShellGradientRingIfNeeded","disconnectedCallback","unbindGradientRingSync","gradientBackgroundChanged","bindGradientRingSync","isShellGradientActive","el","update","window","addEventListener","ResizeObserver","observe","shell","closest","bar","panel","removeEventListener","disconnect","ringHostStyle","ring","style","BADGE_GRADIENT_POSITION_VAR","render","isDot","h","Host","display","String","ariaLabel","label","background","class","badge","badge__mark"],"sources":["src/wc/components/Badge/Badge.css?tag=ds-badge&encapsulation=scoped","src/wc/components/Badge/Badge.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n vertical-align: middle;\n\n --_badge-bg: var(--color-background-bold-brand);\n --_badge-fg: var(--color-foreground-on-bold-background-primary);\n --_badge-ring: var(--color-background-secondary);\n --_badge-ring-width: var(--dimension-stroke-width-018);\n}\n\n.badge__mark {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-sizing: border-box;\n color: var(--_badge-fg);\n background: var(--_badge-bg);\n box-shadow: 0 0 0 var(--_badge-ring-width) var(--_badge-ring);\n white-space: nowrap;\n}\n\n:host(.badge--dot) .badge__mark {\n width: var(--dimension-size-075);\n height: var(--dimension-size-075);\n border-radius: var(--dimension-radius-half);\n}\n\n:host(.badge--counter) .badge__mark {\n width: var(--dimension-size-150);\n height: var(--dimension-size-150);\n padding: 0;\n border-radius: var(--dimension-radius-half);\n font-size: var(--typography-fontsize-xs);\n line-height: 1;\n}\n\n:host(.badge--selected) {\n --_badge-bg: var(--color-foreground-primary);\n}\n\n/* Shell gradient ring — base fill + wash donut (option 3). */\n:host(.badge--on-gradient-background) .badge__mark {\n position: relative;\n z-index: 0;\n box-shadow: none;\n isolation: isolate;\n}\n\n:host(.badge--on-gradient-background) .badge__mark::before,\n:host(.badge--on-gradient-background) .badge__mark::after {\n content: '';\n position: absolute;\n inset: calc(-1 * var(--_badge-ring-width));\n border-radius: inherit;\n box-sizing: border-box;\n padding: var(--_badge-ring-width);\n pointer-events: none;\n -webkit-mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n -webkit-mask-composite: xor;\n mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n mask-composite: exclude;\n}\n\n:host(.badge--on-gradient-background) .badge__mark::before {\n z-index: -2;\n background-color: var(--_badge-ring);\n}\n\n:host(.badge--on-gradient-background) .badge__mark::after {\n z-index: -1;\n background-image: var(--ds-shell-gradient-image, none);\n background-size: var(--ds-shell-gradient-size, auto);\n background-position: 0 0;\n background-repeat: no-repeat;\n background-attachment: fixed;\n opacity: var(--ds-shell-gradient-opacity, 1);\n}\n","import { Component, Prop, Element, State, Watch, h, Host } from '@stencil/core';\nimport {\n BADGE_GRADIENT_POSITION_VAR,\n isShellGradientActive,\n} from '../../nav/badge-gradient-ring';\n\nexport type BadgeVariant = 'counter' | 'dot';\nexport type BadgeSurface =\n | 'default'\n | 'primary'\n | 'secondary'\n | 'medium'\n | 'bold'\n | 'strong'\n | 'navigation'\n | 'always-dark';\n\nconst SURFACE_RING: Record<BadgeSurface, string> = {\n default: 'var(--color-background-secondary)',\n primary: 'var(--color-background-primary)',\n secondary: 'var(--color-background-secondary)',\n medium: 'var(--color-background-medium-neutral)',\n bold: 'var(--color-background-bold-neutral)',\n strong: 'var(--color-background-strong-neutral)',\n navigation: 'var(--color-navigation-background)',\n 'always-dark': 'var(--color-always-dark-background)',\n};\n\n@Component({\n tag: 'ds-badge',\n styleUrl: 'Badge.css',\n scoped: true,\n})\nexport class Badge {\n @Element() el!: HTMLElement;\n\n /** Render as a compact counter or notification dot. */\n @Prop() variant: BadgeVariant = 'counter';\n\n /** Count shown for counter badges. Count 0 hides the badge. */\n @Prop() count: number = 0;\n\n /** Highest count shown before compacting to \"+\". */\n @Prop() max: number = 9;\n\n /** Surface context for the ring around dots. */\n @Prop() surface: BadgeSurface = 'default';\n\n /** Direct ring background override for component-local surfaces. */\n @Prop() background: string | undefined;\n\n /**\n * Ring samples the shell gradient stack (base fill + wash) instead of a flat\n * `box-shadow`. Auto-enabled in `componentDidLoad` under `ds-app-shell[gradient]`;\n * set `gradient-background` to opt in/out explicitly.\n *\n * The attribute must NOT start with `on` — Stencil's setAccessor routes any\n * unknown `on*` member down the event-listener path during attribute\n * reflection, calling addEventListener with a non-listener and throwing.\n */\n @Prop({ attribute: 'gradient-background', reflect: true }) gradientBackground: boolean = false;\n\n /** Deprecated alias for selected counter styling. Prefer context-specific color in the parent. */\n @Prop() isSelected: boolean = false;\n\n /** Accessible label. Defaults to the count as a string. */\n @Prop() label: string | undefined;\n\n /** Bumps on resize/layout so render recomputes gradient ring position. */\n @State() private gradientLayoutVersion = 0;\n\n private gradientObserver: ResizeObserver | null = null;\n private gradientWindowListener: (() => void) | null = null;\n\n componentDidLoad() {\n this.enableShellGradientRingIfNeeded();\n }\n\n disconnectedCallback() {\n this.unbindGradientRingSync();\n }\n\n @Watch('gradientBackground')\n gradientBackgroundChanged() {\n this.bindGradientRingSync();\n }\n\n /** Imperative opt-in avoids Stencil aborting parent render for nested badges. */\n private enableShellGradientRingIfNeeded() {\n if (!this.gradientBackground && isShellGradientActive(this.el)) {\n this.gradientBackground = true;\n }\n\n if (this.gradientBackground) {\n this.bindGradientRingSync();\n }\n }\n\n private bindGradientRingSync() {\n this.unbindGradientRingSync();\n\n if (!this.gradientBackground) return;\n\n const update = () => {\n this.gradientLayoutVersion += 1;\n };\n update();\n\n this.gradientWindowListener = update;\n window.addEventListener('resize', update);\n\n if (typeof ResizeObserver !== 'undefined') {\n this.gradientObserver = new ResizeObserver(update);\n this.gradientObserver.observe(this.el);\n\n const shell = this.el.closest('ds-app-shell');\n if (shell) this.gradientObserver.observe(shell);\n\n const bar = this.el.closest('ds-bar-nav');\n if (bar) this.gradientObserver.observe(bar);\n\n const panel = this.el.closest('ds-panel-nav');\n if (panel) this.gradientObserver.observe(panel);\n }\n }\n\n private unbindGradientRingSync() {\n if (this.gradientWindowListener) {\n window.removeEventListener('resize', this.gradientWindowListener);\n this.gradientWindowListener = null;\n }\n\n this.gradientObserver?.disconnect();\n this.gradientObserver = null;\n }\n\n private ringHostStyle(ring: string): Record<string, string> {\n void this.gradientLayoutVersion;\n\n const style: Record<string, string> = { '--_badge-ring': ring };\n if (!this.gradientBackground || !isShellGradientActive(this.el)) return style;\n\n /* Shell chrome wash uses background-attachment: fixed at viewport origin. */\n style[BADGE_GRADIENT_POSITION_VAR] = '0 0';\n return style;\n }\n\n render() {\n const isDot = this.variant === 'dot';\n\n if (!isDot && this.count === 0) return <Host style={{ display: 'none' }} />;\n\n const display = this.count > this.max ? '+' : String(this.count);\n const ariaLabel = this.label ?? (isDot ? 'Notification' : String(this.count));\n const ring = this.background ?? SURFACE_RING[this.surface];\n\n return (\n <Host\n class={{\n badge: true,\n 'badge--counter': !isDot,\n 'badge--dot': isDot,\n 'badge--selected': this.isSelected,\n 'badge--on-gradient-background': this.gradientBackground,\n }}\n aria-label={ariaLabel}\n style={this.ringHostStyle(ring)}\n >\n <span\n class={{\n 'badge__mark': true,\n 'text-caption-emphasis': !isDot,\n }}\n aria-hidden=\"true\"\n >\n {!isDot && display}\n </span>\n </Host>\n );\n }\n}\n"],"mappings":"sGAAA,MAAMA,EAAW,IAAM,ymECiBvB,MAAMC,EAA6C,CACjDC,QAAS,oCACTC,QAAS,kCACTC,UAAW,oCACXC,OAAQ,yCACRC,KAAM,uCACNC,OAAQ,yCACRC,WAAY,qCACZ,cAAe,uC,MAQJC,EAAKC,EAAA,MAAAD,UAAAE,EALlB,WAAAC,CAAAC,G,4CASUC,KAAAC,QAAwB,UAGxBD,KAAAE,MAAgB,EAGhBF,KAAAG,IAAc,EAGdH,KAAAI,QAAwB,UAc2BJ,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,GAA+B,MACrC,OAAOD,C,CAGT,MAAAE,GACE,MAAMC,EAAQlC,KAAKC,UAAY,MAE/B,IAAKiC,GAASlC,KAAKE,QAAU,EAAG,OAAOiC,EAACC,EAAI,CAACL,MAAO,CAAEM,QAAS,UAE/D,MAAMA,EAAUrC,KAAKE,MAAQF,KAAKG,IAAM,IAAMmC,OAAOtC,KAAKE,OAC1D,MAAMqC,EAAYvC,KAAKwC,QAAUN,EAAQ,eAAiBI,OAAOtC,KAAKE,QACtE,MAAM4B,EAAO9B,KAAKyC,YAActD,EAAaa,KAAKI,SAElD,OACE+B,EAACC,EAAI,CACHM,MAAO,CACLC,MAAO,KACP,kBAAmBT,EACnB,aAAcA,EACd,kBAAmBlC,KAAKM,WACxB,gCAAiCN,KAAKK,oBACvC,aACWkC,EACZR,MAAO/B,KAAK6B,cAAcC,IAE1BK,EAAA,QACEO,MAAO,CACLE,YAAe,KACf,yBAA0BV,GAC3B,cACW,SAEVA,GAASG,G","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as s,H as e,c as t,h as a,a as i,t as r}from"./index.js";import{D as n,a as c,b as l,c as d}from"./p-0y48zKIF.js";const o=()=>`.sc-ds-shell-gradient-swatch-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-shell-gradient-swatch: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-shell-gradient-swatch{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-shell-gradient-swatch:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-shell-gradient-swatch: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-shell-gradient-swatch{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-gradient-swatch::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.sc-ds-shell-gradient-swatch-h{box-sizing:border-box;display:inline-flex;flex:0 0 auto;width:var(--dimension-size-300);height:var(--dimension-size-300);--_swatch-inner-inset:calc( var(--dimension-stroke-width-025) + var(--dimension-space-025) );--_swatch-ring-bg:var(--color-background-primary);--_swatch-select-motion:var(--effect-motion-short-3)}.shell-gradient-swatch.sc-ds-shell-gradient-swatch{position:relative;box-sizing:border-box;width:var(--dimension-size-300);height:var(--dimension-size-300);padding:0;border:none;border-radius:var(--dimension-radius-half);background:transparent;cursor:pointer;flex-shrink:0;isolation:isolate}.shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__border.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__halo.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__stroke.sc-ds-shell-gradient-swatch{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;pointer-events:none}.shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch{z-index:1;background-color:var(--color-background-secondary);background-image:var(--_swatch-gradient-image);background-repeat:no-repeat;background-size:cover;background-position:0 0;transition:top var(--_swatch-select-motion), right var(--_swatch-select-motion), bottom var(--_swatch-select-motion), left var(--_swatch-select-motion)}.shell-gradient-swatch--none.sc-ds-shell-gradient-swatch .shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch{background-image:none}.shell-gradient-swatch.sc-ds-shell-gradient-swatch:not(.shell-gradient-swatch--none) .shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch{opacity:var(--ds-shell-gradient-opacity, 0.1)}.shell-gradient-swatch__border.sc-ds-shell-gradient-swatch{z-index:2;box-shadow:inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-tertiary);transition:top var(--_swatch-select-motion), right var(--_swatch-select-motion), bottom var(--_swatch-select-motion), left var(--_swatch-select-motion)}.shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch{z-index:3;background:transparent;transition:top var(--_swatch-select-motion), right var(--_swatch-select-motion), bottom var(--_swatch-select-motion), left var(--_swatch-select-motion), background-color 0s}.shell-gradient-swatch.sc-ds-shell-gradient-swatch:hover:not(:disabled) .shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch{background:var(--color-interaction-hover)}.shell-gradient-swatch.sc-ds-shell-gradient-swatch:active:not(:disabled) .shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch{background:var(--color-interaction-pressed)}.shell-gradient-swatch__halo.sc-ds-shell-gradient-swatch{z-index:4;opacity:0;transform:scale(1.2);transform-origin:center;box-shadow:inset 0 0 0 var(--_swatch-inner-inset) var(--_swatch-ring-bg);transition:opacity var(--_swatch-select-motion), transform var(--_swatch-select-motion)}.shell-gradient-swatch__stroke.sc-ds-shell-gradient-swatch{z-index:5;opacity:0;transform:scale(1.2);transform-origin:center;box-shadow:inset 0 0 0 var(--dimension-stroke-width-025) var(--color-border-bold-brand);transition:opacity var(--_swatch-select-motion), transform var(--_swatch-select-motion)}.shell-gradient-swatch--selected.sc-ds-shell-gradient-swatch .shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch,.shell-gradient-swatch--selected.sc-ds-shell-gradient-swatch .shell-gradient-swatch__border.sc-ds-shell-gradient-swatch,.shell-gradient-swatch--selected.sc-ds-shell-gradient-swatch .shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch{top:var(--_swatch-inner-inset);right:var(--_swatch-inner-inset);bottom:var(--_swatch-inner-inset);left:var(--_swatch-inner-inset)}.shell-gradient-swatch--selected.sc-ds-shell-gradient-swatch .shell-gradient-swatch__halo.sc-ds-shell-gradient-swatch,.shell-gradient-swatch--selected.sc-ds-shell-gradient-swatch .shell-gradient-swatch__stroke.sc-ds-shell-gradient-swatch{opacity:1;transform:scale(1)}.shell-gradient-swatch.sc-ds-shell-gradient-swatch:disabled{opacity:0.5;cursor:not-allowed}@media (prefers-reduced-motion: reduce){.shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__border.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__halo.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__stroke.sc-ds-shell-gradient-swatch{transition:none}}`;const h=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.dsSelect=t(this,"dsSelect");this.preset=n;this.selected=false;this.inactive=false;this.handleClick=()=>{if(this.inactive)return;this.dsSelect.emit(this.preset)}}render(){const s=this.ariaLabel??c[this.preset];return a(i,{key:"61e935dc389c660e34105d4ac48b1316646a67d6"},a("button",{key:"89f197cc1eaf8a5e35a248d38e455d11dd36f48e",type:"button",class:{"shell-gradient-swatch":true,"ds-focus-ring-inset":true,"shell-gradient-swatch--selected":this.selected,"shell-gradient-swatch--none":this.preset==="none"},style:this.preset==="none"?undefined:{"--_swatch-gradient-image":d(this.preset),"--ds-shell-gradient-opacity":l},"aria-label":s,"aria-pressed":this.selected?"true":"false",disabled:this.inactive,onClick:this.handleClick},a("span",{key:"d896fd9a600bc19fdf7af90d81d105d28ed93a2b",class:"shell-gradient-swatch__fill","aria-hidden":"true"}),a("span",{key:"9dc3ef62b56f922d7e9cf3e59c78426981422120",class:"shell-gradient-swatch__border","aria-hidden":"true"}),a("span",{key:"6804a6d3702310e74352a8327598c864fb72b089",class:"shell-gradient-swatch__interaction","aria-hidden":"true"}),a("span",{key:"bc52625591af392c25e2aaf46b5ca72372237e34",class:"shell-gradient-swatch__halo","aria-hidden":"true"}),a("span",{key:"52d04e7e41e7dea60bc368de83c298f533990e1a",class:"shell-gradient-swatch__stroke","aria-hidden":"true"})))}static get style(){return o()}},[2,"ds-shell-gradient-swatch",{preset:[513],selected:[516],inactive:[4],ariaLabel:[1,"aria-label"]}]);function g(){if(typeof customElements==="undefined"){return}const s=["ds-shell-gradient-swatch"];s.forEach((s=>{switch(s){case"ds-shell-gradient-swatch":if(!customElements.get(r(s))){customElements.define(r(s),h)}break}}))}g();export{h as S,g as d};
2
- //# sourceMappingURL=p-DvBrQuie.js.map
1
+ import{p as s,H as e,c as t,h as a,a as i,t as r}from"./index.js";import{D as n,a as c,b as l,c as d}from"./p-0y48zKIF.js";const o=()=>`.sc-ds-shell-gradient-swatch-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-shell-gradient-swatch: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-shell-gradient-swatch{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-shell-gradient-swatch:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-shell-gradient-swatch: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-shell-gradient-swatch{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-gradient-swatch::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.sc-ds-shell-gradient-swatch-h{box-sizing:border-box;display:inline-flex;flex:0 0 auto;width:var(--dimension-size-300);height:var(--dimension-size-300);--_swatch-inner-inset:calc( var(--dimension-stroke-width-025) + var(--dimension-space-025) );--_swatch-ring-bg:var(--color-background-primary);--_swatch-select-motion:var(--effect-motion-short-3)}.shell-gradient-swatch.sc-ds-shell-gradient-swatch{position:relative;box-sizing:border-box;width:var(--dimension-size-300);height:var(--dimension-size-300);padding:0;border:none;border-radius:var(--dimension-radius-half);background:transparent;cursor:pointer;flex-shrink:0;isolation:isolate}.shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__border.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__halo.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__stroke.sc-ds-shell-gradient-swatch{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;pointer-events:none}.shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch{z-index:1;background-color:var(--color-background-secondary);background-image:var(--_swatch-gradient-image);background-repeat:no-repeat;background-size:cover;background-position:0 0;transition:top var(--_swatch-select-motion), right var(--_swatch-select-motion), bottom var(--_swatch-select-motion), left var(--_swatch-select-motion)}.shell-gradient-swatch--none.sc-ds-shell-gradient-swatch .shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch{background-image:none}.shell-gradient-swatch.sc-ds-shell-gradient-swatch:not(.shell-gradient-swatch--none) .shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch{opacity:var(--ds-shell-gradient-opacity, 0.1)}.shell-gradient-swatch__border.sc-ds-shell-gradient-swatch{z-index:2;box-shadow:inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-tertiary);transition:top var(--_swatch-select-motion), right var(--_swatch-select-motion), bottom var(--_swatch-select-motion), left var(--_swatch-select-motion)}.shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch{z-index:3;background:transparent;transition:top var(--_swatch-select-motion), right var(--_swatch-select-motion), bottom var(--_swatch-select-motion), left var(--_swatch-select-motion), background-color 0s}.shell-gradient-swatch.sc-ds-shell-gradient-swatch:hover:not(:disabled) .shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch{background:var(--color-interaction-hover)}.shell-gradient-swatch.sc-ds-shell-gradient-swatch:active:not(:disabled) .shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch{background:var(--color-interaction-pressed)}.shell-gradient-swatch__halo.sc-ds-shell-gradient-swatch{z-index:4;opacity:0;transform:scale(1.2);transform-origin:center;box-shadow:inset 0 0 0 var(--_swatch-inner-inset) var(--_swatch-ring-bg);transition:opacity var(--_swatch-select-motion), transform var(--_swatch-select-motion)}.shell-gradient-swatch__stroke.sc-ds-shell-gradient-swatch{z-index:5;opacity:0;transform:scale(1.2);transform-origin:center;box-shadow:inset 0 0 0 var(--dimension-stroke-width-025) var(--color-border-bold-brand);transition:opacity var(--_swatch-select-motion), transform var(--_swatch-select-motion)}.shell-gradient-swatch--selected.sc-ds-shell-gradient-swatch .shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch,.shell-gradient-swatch--selected.sc-ds-shell-gradient-swatch .shell-gradient-swatch__border.sc-ds-shell-gradient-swatch,.shell-gradient-swatch--selected.sc-ds-shell-gradient-swatch .shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch{top:var(--_swatch-inner-inset);right:var(--_swatch-inner-inset);bottom:var(--_swatch-inner-inset);left:var(--_swatch-inner-inset)}.shell-gradient-swatch--selected.sc-ds-shell-gradient-swatch .shell-gradient-swatch__halo.sc-ds-shell-gradient-swatch,.shell-gradient-swatch--selected.sc-ds-shell-gradient-swatch .shell-gradient-swatch__stroke.sc-ds-shell-gradient-swatch{opacity:1;transform:scale(1)}.shell-gradient-swatch.sc-ds-shell-gradient-swatch:disabled{opacity:0.5;cursor:not-allowed}@media (prefers-reduced-motion: reduce){.shell-gradient-swatch__fill.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__border.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__interaction.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__halo.sc-ds-shell-gradient-swatch,.shell-gradient-swatch__stroke.sc-ds-shell-gradient-swatch{transition:none}}`;const h=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.dsSelect=t(this,"dsSelect");this.preset=n;this.selected=false;this.inactive=false;this.handleClick=()=>{if(this.inactive)return;this.dsSelect.emit(this.preset)}}render(){const s=this.ariaLabel??c[this.preset];return a(i,{key:"d3faead48bf591613ee33d43111fb9a2cae79587"},a("button",{key:"8dd5c0b26620994dad951b23210ab747fbd90f7e",type:"button",class:{"shell-gradient-swatch":true,"ds-focus-ring-inset":true,"shell-gradient-swatch--selected":this.selected,"shell-gradient-swatch--none":this.preset==="none"},style:this.preset==="none"?undefined:{"--_swatch-gradient-image":d(this.preset),"--ds-shell-gradient-opacity":l},"aria-label":s,"aria-pressed":this.selected?"true":"false",disabled:this.inactive,onClick:this.handleClick},a("span",{key:"00bd6626851dd828053e08238cb3b566428b6869",class:"shell-gradient-swatch__fill","aria-hidden":"true"}),a("span",{key:"bb9ba647f8420c85ae4edde30af5dce193271d2e",class:"shell-gradient-swatch__border","aria-hidden":"true"}),a("span",{key:"3d15b81299c2a2f5e9f14e0836c56d98f38406d5",class:"shell-gradient-swatch__interaction","aria-hidden":"true"}),a("span",{key:"db6983e3523371d27d1763562d10861a3b1c456b",class:"shell-gradient-swatch__halo","aria-hidden":"true"}),a("span",{key:"fcdec4a1c3dd5ed6de0c55d665cd586d0e893648",class:"shell-gradient-swatch__stroke","aria-hidden":"true"})))}static get style(){return o()}},[2,"ds-shell-gradient-swatch",{preset:[513],selected:[516],inactive:[4],ariaLabel:[1,"aria-label"]}]);function g(){if(typeof customElements==="undefined"){return}const s=["ds-shell-gradient-swatch"];s.forEach((s=>{switch(s){case"ds-shell-gradient-swatch":if(!customElements.get(r(s))){customElements.define(r(s),h)}break}}))}g();export{h as S,g as d};
2
+ //# sourceMappingURL=p-CDNVPM2x.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,h as o,a as r,t as n}from"./index.js";const s=()=>`.text.sc-ds-text{margin:0}.text--truncate-1.sc-ds-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--truncate-2.sc-ds-text,.text--truncate-3.sc-ds-text,.text--truncate-4.sc-ds-text,.text--truncate-5.sc-ds-text{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;text-overflow:ellipsis;word-break:break-word}.text--truncate-2.sc-ds-text{-webkit-line-clamp:2}.text--truncate-3.sc-ds-text{-webkit-line-clamp:3}.text--truncate-4.sc-ds-text{-webkit-line-clamp:4}.text--truncate-5.sc-ds-text{-webkit-line-clamp:5}.text--nowrap.sc-ds-text{white-space:nowrap;word-break:normal;overflow:hidden;text-overflow:ellipsis;min-width:0}.text--balance.sc-ds-text{text-wrap:balance}.text--pretty.sc-ds-text{text-wrap:pretty}.text--color-primary.sc-ds-text{color:var(--color-foreground-primary)}.text--color-secondary.sc-ds-text{color:var(--color-foreground-secondary)}.text--color-tertiary.sc-ds-text{color:var(--color-foreground-tertiary)}.text--color-brand.sc-ds-text{color:var(--color-foreground-bold-brand)}.text--color-negative.sc-ds-text{color:var(--color-foreground-bold-negative)}.text--color-positive.sc-ds-text{color:var(--color-foreground-bold-positive)}.text--color-warning.sc-ds-text{color:var(--color-foreground-bold-warning)}.text--color-caution.sc-ds-text{color:var(--color-foreground-bold-caution)}.text--color-ai.sc-ds-text{color:var(--color-foreground-bold-ai)}.text--color-on-strong.sc-ds-text{color:var(--color-foreground-on-strong-background-primary)}.text--color-on-bold.sc-ds-text{color:var(--color-foreground-on-bold-background-primary)}.text--color-inherit.sc-ds-text{color:inherit}.text--decoration-underline.sc-ds-text{text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.text--decoration-dotted-underline.sc-ds-text{text-decoration:underline dotted;text-underline-offset:2px;text-decoration-thickness:1px}.text--italic.sc-ds-text{font-style:italic}.text--font-feature-tabular-nums.sc-ds-text{font-variant-numeric:tabular-nums;font-feature-settings:'tnum'}.text--align-left.sc-ds-text{text-align:left}.text--align-center.sc-ds-text{text-align:center}.text--align-right.sc-ds-text{text-align:right}`;const i=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.variant="text-body-medium";this.italic=false;this.lineTruncation="none";this.fontFeature="normal";this.as="p"}render(){const t=this.as;const e=t=>typeof t==="string"&&t.startsWith("var(--");const n={[this.variant]:true,text:true,"text--nowrap":this.wrap==="nowrap","text--balance":this.wrap==="balance","text--pretty":this.wrap==="pretty","text--truncate-1":this.lineTruncation===1&&this.wrap!=="nowrap","text--truncate-2":this.lineTruncation===2&&this.wrap!=="nowrap","text--truncate-3":this.lineTruncation===3&&this.wrap!=="nowrap","text--truncate-4":this.lineTruncation===4&&this.wrap!=="nowrap","text--truncate-5":this.lineTruncation===5&&this.wrap!=="nowrap","text--color-primary":this.color==="primary","text--color-secondary":this.color==="secondary","text--color-tertiary":this.color==="tertiary","text--color-brand":this.color==="brand","text--color-negative":this.color==="negative","text--color-positive":this.color==="positive","text--color-warning":this.color==="warning","text--color-caution":this.color==="caution","text--color-ai":this.color==="ai","text--color-on-strong":this.color==="on-strong","text--color-on-bold":this.color==="on-bold","text--color-inherit":this.color==="inherit","text--decoration-underline":this.decoration==="underline","text--decoration-dotted-underline":this.decoration==="dotted-underline","text--italic":this.italic,"text--align-left":this.align==="left","text--align-center":this.align==="center","text--align-right":this.align==="right","text--font-feature-tabular-nums":this.fontFeature==="tabular-nums"};const s=this.color&&e(this.color)?{color:this.color}:undefined;const i={};if(this.as==="label"&&this.for)i["for"]=this.for;return o(r,{key:"a2a0db4222bbbce592d8059718a30dd547b70f18",style:{display:"contents"}},o(t,{key:"5465c8b31b32258440ce93d547e50f341afd49d5",class:n,style:s,...i},o("slot",{key:"92cc4d8fc79e8828395fe6994c61b0c409d15109"})))}static get style(){return s()}},[262,"ds-text",{variant:[1],color:[1],decoration:[1],italic:[4],align:[1],lineTruncation:[8,"line-truncation"],wrap:[1],fontFeature:[1,"font-feature"],as:[1],for:[1]}]);function c(){if(typeof customElements==="undefined"){return}const t=["ds-text"];t.forEach((t=>{switch(t){case"ds-text":if(!customElements.get(n(t))){customElements.define(n(t),i)}break}}))}c();export{i as T,c as d};
2
- //# sourceMappingURL=p-C9za7IDu.js.map
1
+ import{p as t,H as e,h as o,a as r,t as n}from"./index.js";const s=()=>`.text.sc-ds-text{margin:0}.text--truncate-1.sc-ds-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--truncate-2.sc-ds-text,.text--truncate-3.sc-ds-text,.text--truncate-4.sc-ds-text,.text--truncate-5.sc-ds-text{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;text-overflow:ellipsis;word-break:break-word}.text--truncate-2.sc-ds-text{-webkit-line-clamp:2}.text--truncate-3.sc-ds-text{-webkit-line-clamp:3}.text--truncate-4.sc-ds-text{-webkit-line-clamp:4}.text--truncate-5.sc-ds-text{-webkit-line-clamp:5}.text--nowrap.sc-ds-text{white-space:nowrap;word-break:normal;overflow:hidden;text-overflow:ellipsis;min-width:0}.text--balance.sc-ds-text{text-wrap:balance}.text--pretty.sc-ds-text{text-wrap:pretty}.text--color-primary.sc-ds-text{color:var(--color-foreground-primary)}.text--color-secondary.sc-ds-text{color:var(--color-foreground-secondary)}.text--color-tertiary.sc-ds-text{color:var(--color-foreground-tertiary)}.text--color-brand.sc-ds-text{color:var(--color-foreground-bold-brand)}.text--color-negative.sc-ds-text{color:var(--color-foreground-bold-negative)}.text--color-positive.sc-ds-text{color:var(--color-foreground-bold-positive)}.text--color-warning.sc-ds-text{color:var(--color-foreground-bold-warning)}.text--color-caution.sc-ds-text{color:var(--color-foreground-bold-caution)}.text--color-ai.sc-ds-text{color:var(--color-foreground-bold-ai)}.text--color-on-strong.sc-ds-text{color:var(--color-foreground-on-strong-background-primary)}.text--color-on-bold.sc-ds-text{color:var(--color-foreground-on-bold-background-primary)}.text--color-inherit.sc-ds-text{color:inherit}.text--decoration-underline.sc-ds-text{text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.text--decoration-dotted-underline.sc-ds-text{text-decoration:underline dotted;text-underline-offset:2px;text-decoration-thickness:1px}.text--italic.sc-ds-text{font-style:italic}.text--font-feature-tabular-nums.sc-ds-text{font-variant-numeric:tabular-nums;font-feature-settings:'tnum'}.text--align-left.sc-ds-text{text-align:left}.text--align-center.sc-ds-text{text-align:center}.text--align-right.sc-ds-text{text-align:right}`;const i=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.variant="text-body-medium";this.italic=false;this.lineTruncation="none";this.fontFeature="normal";this.as="p"}render(){const t=this.as;const e=t=>typeof t==="string"&&t.startsWith("var(--");const n={[this.variant]:true,text:true,"text--nowrap":this.wrap==="nowrap","text--balance":this.wrap==="balance","text--pretty":this.wrap==="pretty","text--truncate-1":this.lineTruncation===1&&this.wrap!=="nowrap","text--truncate-2":this.lineTruncation===2&&this.wrap!=="nowrap","text--truncate-3":this.lineTruncation===3&&this.wrap!=="nowrap","text--truncate-4":this.lineTruncation===4&&this.wrap!=="nowrap","text--truncate-5":this.lineTruncation===5&&this.wrap!=="nowrap","text--color-primary":this.color==="primary","text--color-secondary":this.color==="secondary","text--color-tertiary":this.color==="tertiary","text--color-brand":this.color==="brand","text--color-negative":this.color==="negative","text--color-positive":this.color==="positive","text--color-warning":this.color==="warning","text--color-caution":this.color==="caution","text--color-ai":this.color==="ai","text--color-on-strong":this.color==="on-strong","text--color-on-bold":this.color==="on-bold","text--color-inherit":this.color==="inherit","text--decoration-underline":this.decoration==="underline","text--decoration-dotted-underline":this.decoration==="dotted-underline","text--italic":this.italic,"text--align-left":this.align==="left","text--align-center":this.align==="center","text--align-right":this.align==="right","text--font-feature-tabular-nums":this.fontFeature==="tabular-nums"};const s=this.color&&e(this.color)?{color:this.color}:undefined;const i={};if(this.as==="label"&&this.for)i["for"]=this.for;return o(r,{key:"ac837805408b88532a001ed1df0ec001b4dea6e9",style:{display:"contents"}},o(t,{key:"97004d084bd5cbc57907ac433efe5e73a9e0d1fa",class:n,style:s,...i},o("slot",{key:"9b73c9acbbdd99f2a5842621f7f07c8353010fbf"})))}static get style(){return s()}},[262,"ds-text",{variant:[1],color:[1],decoration:[1],italic:[4],align:[1],lineTruncation:[8,"line-truncation"],wrap:[1],fontFeature:[1,"font-feature"],as:[1],for:[1]}]);function c(){if(typeof customElements==="undefined"){return}const t=["ds-text"];t.forEach((t=>{switch(t){case"ds-text":if(!customElements.get(n(t))){customElements.define(n(t),i)}break}}))}c();export{i as T,c as d};
2
+ //# sourceMappingURL=p-CJubWt1F.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as i,c as s,h as t,a as n,t as o}from"./index.js";import{d as r}from"./p-B3ua1NkM.js";import{d as a}from"./p-DvBrQuie.js";import{a as d,T as c}from"./p-BPMJx63I.js";import{r as u}from"./p-BWUTr_XN.js";import{r as l}from"./p-C1cBr-Ri.js";function h(e){const{anchorRect:i,popupWidth:s,popupHeight:t,side:n,align:o,sideOffsetPx:r,alignOffsetPx:a,viewportPadPx:d,viewportWidth:c,viewportHeight:u}=e;let l=0;let h=0;switch(n){case"top":h=i.top-t-r;l=o==="start"?i.left+a:o==="end"?i.right-s+a:i.left+i.width/2-s/2+a;break;case"bottom":h=i.bottom+r;l=o==="start"?i.left+a:o==="end"?i.right-s+a:i.left+i.width/2-s/2+a;break;case"left":l=i.left-s-r;h=o==="start"?i.top+a:o==="end"?i.bottom-t+a:i.top+i.height/2-t/2+a;break;case"right":l=i.right+r;h=o==="start"?i.top+a:o==="end"?i.bottom-t+a:i.top+i.height/2-t/2+a;break}return{x:Math.min(Math.max(l,d),c-s-d),y:Math.min(Math.max(h,d),u-t-d)}}function m(e){return"variant"in e&&e.variant==="gradient-picker"}const f=()=>`.sc-ds-menu-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-menu: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-menu{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-menu:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-menu: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-menu{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-menu::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.menu-popup.sc-ds-menu{box-sizing:border-box;display:flex;flex-direction:column;min-width:var(--dimension-menu-width-xs);max-width:var(--dimension-panel-width-lg);overflow:hidden;background-color:var(--color-background-primary);border-radius:var(--dimension-radius-075);box-shadow:var(--effect-shadow-elevated-floating);animation:menuFadeIn var(--effect-motion-short-2) forwards;backface-visibility:hidden;will-change:transform}.menu-popup.sc-ds-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:var(--effect-highlight-elevated-floating)}.menu-popup--closing.sc-ds-menu{animation:menuFadeOut var(--effect-motion-short-2) forwards}@keyframes menuFadeIn{from{opacity:0;transform:inherit scale(0.97)}to{opacity:1}}@keyframes menuFadeOut{from{opacity:1}to{opacity:0}}.menu-section.sc-ds-menu{display:flex;flex-direction:column;gap:var(--dimension-space-050);padding:var(--dimension-space-050)}.menu-section--divided.sc-ds-menu{border-bottom:var(--dimension-stroke-width-015) solid var(--color-border-tertiary)}.section-header.sc-ds-menu{display:flex;align-items:center;height:var(--dimension-size-400);padding:var(--dimension-space-050) var(--dimension-space-075);-webkit-user-select:none;user-select:none}.section-label.sc-ds-menu{display:inline-flex;align-items:center;padding:0 var(--dimension-space-025);color:var(--color-foreground-secondary)}.menu-item.sc-ds-menu{display:flex;align-items:center;gap:var(--dimension-space-050);position:relative;width:100%;min-height:var(--dimension-size-400);padding:var(--dimension-space-075);box-sizing:border-box;border:none;border-radius:var(--dimension-radius-025);background:transparent;cursor:pointer;-webkit-user-select:none;user-select:none;text-align:left;color:inherit;--_hover-bg:var(--color-interaction-hover);--_pressed-bg:var(--color-interaction-pressed);--_selected-bg:var(--color-interaction-active)}.menu-item.sc-ds-menu:has(.menu-item__subtext){align-items:flex-start}.menu-item.sc-ds-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;transition:none}.menu-item--selected.sc-ds-menu::after{background:var(--_selected-bg);transition:none}.menu-item.sc-ds-menu:hover:not(:disabled):not(.menu-item--selected)::after{background:var(--_hover-bg);transition:none}.menu-item.sc-ds-menu:active:not(:disabled)::after{background:var(--_pressed-bg);transition:none}.menu-item--inactive.sc-ds-menu{opacity:0.5;cursor:not-allowed;pointer-events:none}.menu-item--destructive.sc-ds-menu .menu-item__label.sc-ds-menu{color:var(--color-foreground-bold-negative) !important}.menu-item__content.sc-ds-menu{position:relative;z-index:1;display:flex;flex:1;flex-direction:column;gap:var(--dimension-space-025);min-width:0}.menu-item__label.sc-ds-menu{padding:0 var(--dimension-space-025);color:var(--color-foreground-secondary)}.menu-item.sc-ds-menu:has(.menu-item__subtext) .menu-item__label.sc-ds-menu,.menu-item--selected.sc-ds-menu .menu-item__label.sc-ds-menu{color:var(--color-foreground-primary)}.menu-item__subtext.sc-ds-menu{padding:0 var(--dimension-space-025);color:var(--color-foreground-secondary);line-height:1.4}.menu-item__toggle.sc-ds-menu{position:relative;z-index:1;flex-shrink:0;width:calc(var(--dimension-size-400) + var(--dimension-size-050));height:var(--dimension-size-250);border-radius:var(--dimension-radius-125);background-color:var(--color-background-translucent);transition:background-color var(--effect-motion-short-2)}.menu-item__toggle--on.sc-ds-menu{background-color:var(--color-background-medium-brand)}.menu-item__toggle-thumb.sc-ds-menu{position:absolute;top:var(--dimension-space-025);left:var(--dimension-space-025);width:var(--dimension-size-200);height:var(--dimension-size-200);border-radius:50%;background-color:var(--color-foreground-on-bold-background-primary);transition:transform var(--effect-motion-short-2)}.menu-item__toggle--on.sc-ds-menu .menu-item__toggle-thumb.sc-ds-menu{transform:translateX(var(--dimension-offset-200, 16px))}`;const p=8;const g=e(class e extends i{constructor(e){super();if(e!==false){this.__registerHost()}this.dsClose=s(this,"dsClose");this.dsSelect=s(this,"dsSelect");this.dsGradientSelect=s(this,"dsGradientSelect");this.open=false;this.items=[];this.sections=[];this.side="bottom";this.align="start";this.sideOffset=d.space050;this.alignOffset=0;this.initialFocusVisible=false;this.shouldRender=false;this.closing=false;this.pos={x:0,y:0};this.focusedIndex=0;this.positionReady=false;this.focusRingVisible=false;this.clickOutsideHandler=null;this.scrollResizeHandler=null;this.closeTimer=null;this.itemEls=[];this.positionRetryRaf=null;this.listenersReady=false}componentDidLoad(){if(this.open)this.onOpenChange(true)}disconnectedCallback(){this.cancelPositionRetry();this.teardownListeners()}onOpenChange(e){if(e){this.teardownListeners();this.shouldRender=true;this.closing=false;this.positionReady=false;this.listenersReady=false;this.focusRingVisible=this.initialFocusVisible;this.listenersReady=true;this.setupListeners();this.schedulePositionUpdate((()=>{this.focusInitialItem()}))}else if(this.shouldRender){this.cancelPositionRetry();this.closing=true;this.teardownListeners();this.listenersReady=false;this.closeTimer=setTimeout((()=>{this.shouldRender=false;this.closing=false;this.closeTimer=null}),this.closeAnimationMs)}}onAnchorChange(){if(this.open)this.schedulePositionUpdate()}onPositionPropsChange(){if(this.open)this.schedulePositionUpdate()}get viewportPadPx(){return u(c.space050,c.space050)}get sideOffsetPx(){return u(this.sideOffset,c.space050)}get alignOffsetPx(){return u(this.alignOffset,0)}get popupFallbackWidthPx(){return u(c.menuWidthXs,c.menuWidthXs)}get popupFallbackHeightPx(){return u(c.menuFallbackHeight,c.menuFallbackHeight)}get closeAnimationMs(){return l(c.motionShort2,c.animationDurationShort3)}get resolvedAnchor(){if(this.anchor)return this.anchor;if(this.anchorId)return document.getElementById(this.anchorId);return null}get activeSections(){if(this.sections.length>0)return this.sections;if(this.items.length>0)return[{items:this.items}];return[]}get flatItems(){return this.activeSections.flatMap((e=>m(e)?[]:e.items))}cancelPositionRetry(){if(this.positionRetryRaf!==null){cancelAnimationFrame(this.positionRetryRaf);this.positionRetryRaf=null}}schedulePositionUpdate(e){if(!this.open)return;this.cancelPositionRetry();this.positionReady=false;let i=p;const s=()=>{this.positionRetryRaf=null;if(!this.open)return;if(this.calculatePosition()){this.positionReady=true;e?.();return}if(i>0){i-=1;this.positionRetryRaf=requestAnimationFrame(s)}};this.positionRetryRaf=requestAnimationFrame(s)}calculatePosition(){const e=this.resolvedAnchor;if(!e)return false;const i=this.el.querySelector(".menu-popup");if(!i)return false;this.pos=h({anchorRect:e.getBoundingClientRect(),popupWidth:i.offsetWidth||this.popupFallbackWidthPx,popupHeight:i.offsetHeight||this.popupFallbackHeightPx,side:this.side,align:this.align,sideOffsetPx:this.sideOffsetPx,alignOffsetPx:this.alignOffsetPx,viewportPadPx:this.viewportPadPx,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight});return true}focusInitialItem(){const e=this.flatItems;const i=e.findIndex((e=>e.isSelected&&!e.isInactive));const s=e.findIndex((e=>!e.isInactive));this.focusedIndex=i>=0?i:s>=0?s:0;requestAnimationFrame((()=>{const e=this.el.querySelectorAll(".menu-item");e[this.focusedIndex]?.focus()}))}setupListeners(){this.clickOutsideHandler=e=>{const i=e.target;const s=this.el.querySelector(".menu-popup");const t=this.resolvedAnchor;if(s?.contains(i)||t?.contains(i))return;this.close()};this.scrollResizeHandler=()=>{if(this.shouldRender&&!this.closing)this.calculatePosition()};document.addEventListener("mousedown",this.clickOutsideHandler,true);window.addEventListener("scroll",this.scrollResizeHandler,true);window.addEventListener("resize",this.scrollResizeHandler)}teardownListeners(){if(this.clickOutsideHandler){document.removeEventListener("mousedown",this.clickOutsideHandler,true);this.clickOutsideHandler=null}if(this.scrollResizeHandler){window.removeEventListener("scroll",this.scrollResizeHandler,true);window.removeEventListener("resize",this.scrollResizeHandler);this.scrollResizeHandler=null}if(this.closeTimer){clearTimeout(this.closeTimer);this.closeTimer=null}}close(){this.resolvedAnchor?.focus();this.dsClose.emit();this.open=false;this.onOpenChange(false)}handleKeyDown(e){if(!this.shouldRender||this.closing)return;const i=this.flatItems;const s=i.map(((e,i)=>({it:e,i}))).filter((({it:e})=>!e.isInactive)).map((({i:e})=>e));if(!s.length)return;const t=s.indexOf(this.focusedIndex);const n=t<0?0:t;switch(e.key){case"ArrowDown":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=s[(n+1)%s.length];this.focusItem(this.focusedIndex);break;case"ArrowUp":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=s[(n-1+s.length)%s.length];this.focusItem(this.focusedIndex);break;case"Home":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=s[0];this.focusItem(this.focusedIndex);break;case"End":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=s[s.length-1];this.focusItem(this.focusedIndex);break;case"Escape":e.preventDefault();this.close();break;case"Tab":e.preventDefault();this.close();break}}focusItem(e){const i=this.el.querySelectorAll(".menu-item");i[e]?.focus()}handleItemClick(e){if(e.isInactive)return;this.dsSelect.emit(e)}handleGradientSelect(e){this.dsGradientSelect.emit(e)}render(){if(!this.shouldRender)return t(n,{style:{display:"contents"}});const e=this.activeSections;let i=0;const s={position:"fixed",left:"0",top:"0",transform:`translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,zIndex:"9998",visibility:this.positionReady?"visible":"hidden"};if(this.menuWidth)s["width"]=this.menuWidth;if(this.minWidth)s["min-width"]=this.minWidth;return t(n,{style:{display:"contents"}},t("div",{class:{"menu-popup":true,"menu-popup--closing":this.closing},style:s,role:"menu","aria-label":"Menu","aria-orientation":"vertical"},e.map(((s,n)=>t("div",{key:n,class:{"menu-section":true,"menu-section--divided":n<e.length-1,"menu-section--gradient-picker":m(s)},role:s.header?"group":undefined,"aria-label":s.header},s.header&&t("div",{class:"section-header","aria-hidden":"true"},t("span",{class:"text-body-small-emphasis section-label"},s.header)),m(s)?t("ds-shell-gradient-picker",{value:s.value,onDsChange:e=>{e.stopPropagation();this.handleGradientSelect(e.detail)}}):s.items.map((e=>{const s=i++;const n=this.focusedIndex===s;return t("button",{key:s,type:"button",class:{"menu-item":true,"ds-focus-ring-inset":true,"ds-focus-ring--visible":n&&this.focusRingVisible,"menu-item--selected":!!e.isSelected,"menu-item--inactive":!!e.isInactive,"menu-item--destructive":!!e.isDestructive,"menu-item--focused":n},role:"menuitem","aria-current":e.isSelected?"true":undefined,disabled:e.isInactive,tabIndex:n?0:-1,onMouseDown:()=>{this.focusRingVisible=false},onClick:()=>this.handleItemClick(e),onFocus:()=>{this.focusedIndex=s}},t("div",{class:"menu-item__content"},t("span",{class:e.isSelected?"text-body-medium-emphasis menu-item__label":"text-body-medium menu-item__label"},e.label),e.subtext&&t("span",{class:"text-body-small menu-item__subtext"},e.subtext)),e.showToggle&&t("div",{class:{"menu-item__toggle":true,"menu-item__toggle--on":!!e.toggleValue},"aria-hidden":"true"},t("div",{class:"menu-item__toggle-thumb"})))})))))))}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}],anchor:[{onAnchorChange:0}],anchorId:[{onAnchorChange:0}],side:[{onPositionPropsChange:0}],align:[{onPositionPropsChange:0}],sideOffset:[{onPositionPropsChange:0}],alignOffset:[{onPositionPropsChange:0}]}}static get style(){return f()}},[2,"ds-menu",{open:[1028],items:[16],sections:[16],side:[1],align:[1],sideOffset:[8,"side-offset"],alignOffset:[8,"align-offset"],menuWidth:[1,"menu-width"],minWidth:[1,"min-width"],anchor:[16],anchorId:[1,"anchor-id"],initialFocusVisible:[4,"initial-focus-visible"],shouldRender:[32],closing:[32],pos:[32],focusedIndex:[32],positionReady:[32],focusRingVisible:[32]},[[0,"keydown","handleKeyDown"]],{open:[{onOpenChange:0}],anchor:[{onAnchorChange:0}],anchorId:[{onAnchorChange:0}],side:[{onPositionPropsChange:0}],align:[{onPositionPropsChange:0}],sideOffset:[{onPositionPropsChange:0}],alignOffset:[{onPositionPropsChange:0}]}]);function v(){if(typeof customElements==="undefined"){return}const e=["ds-menu","ds-shell-gradient-picker","ds-shell-gradient-swatch"];e.forEach((e=>{switch(e){case"ds-menu":if(!customElements.get(o(e))){customElements.define(o(e),g)}break;case"ds-shell-gradient-picker":if(!customElements.get(o(e))){r()}break;case"ds-shell-gradient-swatch":if(!customElements.get(o(e))){a()}break}}))}v();export{g as M,v as d};
2
- //# sourceMappingURL=p-DDEAcGac.js.map
1
+ import{p as e,H as s,c as i,h as t,a as n,t as o}from"./index.js";import{d as r}from"./p-DnGr8qtq.js";import{d as a}from"./p-CDNVPM2x.js";import{a as d,T as c}from"./p-jjfqrXnP.js";import{r as u}from"./p-BWUTr_XN.js";import{r as l}from"./p-C1cBr-Ri.js";function h(e){const{anchorRect:s,popupWidth:i,popupHeight:t,side:n,align:o,sideOffsetPx:r,alignOffsetPx:a,viewportPadPx:d,viewportWidth:c,viewportHeight:u}=e;let l=0;let h=0;switch(n){case"top":h=s.top-t-r;l=o==="start"?s.left+a:o==="end"?s.right-i+a:s.left+s.width/2-i/2+a;break;case"bottom":h=s.bottom+r;l=o==="start"?s.left+a:o==="end"?s.right-i+a:s.left+s.width/2-i/2+a;break;case"left":l=s.left-i-r;h=o==="start"?s.top+a:o==="end"?s.bottom-t+a:s.top+s.height/2-t/2+a;break;case"right":l=s.right+r;h=o==="start"?s.top+a:o==="end"?s.bottom-t+a:s.top+s.height/2-t/2+a;break}return{x:Math.min(Math.max(l,d),c-i-d),y:Math.min(Math.max(h,d),u-t-d)}}function m(e){return"variant"in e&&e.variant==="gradient-picker"}const f=()=>`.sc-ds-menu-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-menu: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-menu{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-menu:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-menu: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-menu{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-menu::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.menu-popup.sc-ds-menu{box-sizing:border-box;display:flex;flex-direction:column;min-width:var(--dimension-menu-width-xs);max-width:var(--dimension-panel-width-lg);overflow:hidden;background-color:var(--color-background-primary);border-radius:var(--dimension-radius-075);box-shadow:var(--effect-shadow-elevated-floating);animation:menuFadeIn var(--effect-motion-short-2) forwards;backface-visibility:hidden;will-change:transform}.menu-popup.sc-ds-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:var(--effect-highlight-elevated-floating)}.menu-popup--closing.sc-ds-menu{animation:menuFadeOut var(--effect-motion-short-2) forwards}@keyframes menuFadeIn{from{opacity:0;transform:inherit scale(0.97)}to{opacity:1}}@keyframes menuFadeOut{from{opacity:1}to{opacity:0}}.menu-section.sc-ds-menu{display:flex;flex-direction:column;gap:var(--dimension-space-050);padding:var(--dimension-space-050)}.menu-section--divided.sc-ds-menu{border-bottom:var(--dimension-stroke-width-015) solid var(--color-border-tertiary)}.section-header.sc-ds-menu{display:flex;align-items:center;height:var(--dimension-size-400);padding:var(--dimension-space-050) var(--dimension-space-075);-webkit-user-select:none;user-select:none}.section-label.sc-ds-menu{display:inline-flex;align-items:center;padding:0 var(--dimension-space-025);color:var(--color-foreground-secondary)}.menu-item.sc-ds-menu{display:flex;align-items:center;gap:var(--dimension-space-050);position:relative;width:100%;min-height:var(--dimension-size-400);padding:var(--dimension-space-075);box-sizing:border-box;border:none;border-radius:var(--dimension-radius-025);background:transparent;cursor:pointer;-webkit-user-select:none;user-select:none;text-align:left;color:inherit;--_hover-bg:var(--color-interaction-hover);--_pressed-bg:var(--color-interaction-pressed);--_selected-bg:var(--color-interaction-active)}.menu-item.sc-ds-menu:has(.menu-item__subtext){align-items:flex-start}.menu-item.sc-ds-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;transition:none}.menu-item--selected.sc-ds-menu::after{background:var(--_selected-bg);transition:none}.menu-item.sc-ds-menu:hover:not(:disabled):not(.menu-item--selected)::after{background:var(--_hover-bg);transition:none}.menu-item.sc-ds-menu:active:not(:disabled)::after{background:var(--_pressed-bg);transition:none}.menu-item--inactive.sc-ds-menu{opacity:0.5;cursor:not-allowed;pointer-events:none}.menu-item--destructive.sc-ds-menu .menu-item__label.sc-ds-menu{color:var(--color-foreground-bold-negative) !important}.menu-item__content.sc-ds-menu{position:relative;z-index:1;display:flex;flex:1;flex-direction:column;gap:var(--dimension-space-025);min-width:0}.menu-item__label.sc-ds-menu{padding:0 var(--dimension-space-025);color:var(--color-foreground-secondary)}.menu-item.sc-ds-menu:has(.menu-item__subtext) .menu-item__label.sc-ds-menu,.menu-item--selected.sc-ds-menu .menu-item__label.sc-ds-menu{color:var(--color-foreground-primary)}.menu-item__subtext.sc-ds-menu{padding:0 var(--dimension-space-025);color:var(--color-foreground-secondary);line-height:1.4}.menu-item__toggle.sc-ds-menu{position:relative;z-index:1;flex-shrink:0;width:calc(var(--dimension-size-400) + var(--dimension-size-050));height:var(--dimension-size-250);border-radius:var(--dimension-radius-125);background-color:var(--color-background-translucent);transition:background-color var(--effect-motion-short-2)}.menu-item__toggle--on.sc-ds-menu{background-color:var(--color-background-medium-brand)}.menu-item__toggle-thumb.sc-ds-menu{position:absolute;top:var(--dimension-space-025);left:var(--dimension-space-025);width:var(--dimension-size-200);height:var(--dimension-size-200);border-radius:50%;background-color:var(--color-foreground-on-bold-background-primary);transition:transform var(--effect-motion-short-2)}.menu-item__toggle--on.sc-ds-menu .menu-item__toggle-thumb.sc-ds-menu{transform:translateX(var(--dimension-offset-200, 16px))}`;const p=8;const g=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsClose=i(this,"dsClose");this.dsSelect=i(this,"dsSelect");this.dsGradientSelect=i(this,"dsGradientSelect");this.open=false;this.items=[];this.sections=[];this.side="bottom";this.align="start";this.sideOffset=d.space050;this.alignOffset=0;this.initialFocusVisible=false;this.shouldRender=false;this.closing=false;this.pos={x:0,y:0};this.focusedIndex=0;this.positionReady=false;this.focusRingVisible=false;this.clickOutsideHandler=null;this.scrollResizeHandler=null;this.closeTimer=null;this.itemEls=[];this.positionRetryRaf=null;this.listenersReady=false}componentDidLoad(){if(this.open)this.onOpenChange(true)}disconnectedCallback(){this.cancelPositionRetry();this.teardownListeners()}onOpenChange(e){if(e){this.teardownListeners();this.shouldRender=true;this.closing=false;this.positionReady=false;this.listenersReady=false;this.focusRingVisible=this.initialFocusVisible;this.listenersReady=true;this.setupListeners();this.schedulePositionUpdate((()=>{this.focusInitialItem()}))}else if(this.shouldRender){this.cancelPositionRetry();this.closing=true;this.teardownListeners();this.listenersReady=false;this.closeTimer=setTimeout((()=>{this.shouldRender=false;this.closing=false;this.closeTimer=null}),this.closeAnimationMs)}}onAnchorChange(){if(this.open)this.schedulePositionUpdate()}onPositionPropsChange(){if(this.open)this.schedulePositionUpdate()}get viewportPadPx(){return u(c.space050,c.space050)}get sideOffsetPx(){return u(this.sideOffset,c.space050)}get alignOffsetPx(){return u(this.alignOffset,0)}get popupFallbackWidthPx(){return u(c.menuWidthXs,c.menuWidthXs)}get popupFallbackHeightPx(){return u(c.menuFallbackHeight,c.menuFallbackHeight)}get closeAnimationMs(){return l(c.motionShort2,c.animationDurationShort3)}get resolvedAnchor(){if(this.anchor)return this.anchor;if(this.anchorId)return document.getElementById(this.anchorId);return null}get activeSections(){if(this.sections.length>0)return this.sections;if(this.items.length>0)return[{items:this.items}];return[]}get flatItems(){return this.activeSections.flatMap((e=>m(e)?[]:e.items))}cancelPositionRetry(){if(this.positionRetryRaf!==null){cancelAnimationFrame(this.positionRetryRaf);this.positionRetryRaf=null}}schedulePositionUpdate(e){if(!this.open)return;this.cancelPositionRetry();this.positionReady=false;let s=p;const i=()=>{this.positionRetryRaf=null;if(!this.open)return;if(this.calculatePosition()){this.positionReady=true;e?.();return}if(s>0){s-=1;this.positionRetryRaf=requestAnimationFrame(i)}};this.positionRetryRaf=requestAnimationFrame(i)}calculatePosition(){const e=this.resolvedAnchor;if(!e)return false;const s=this.el.querySelector(".menu-popup");if(!s)return false;this.pos=h({anchorRect:e.getBoundingClientRect(),popupWidth:s.offsetWidth||this.popupFallbackWidthPx,popupHeight:s.offsetHeight||this.popupFallbackHeightPx,side:this.side,align:this.align,sideOffsetPx:this.sideOffsetPx,alignOffsetPx:this.alignOffsetPx,viewportPadPx:this.viewportPadPx,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight});return true}focusInitialItem(){const e=this.flatItems;const s=e.findIndex((e=>e.isSelected&&!e.isInactive));const i=e.findIndex((e=>!e.isInactive));this.focusedIndex=s>=0?s:i>=0?i:0;requestAnimationFrame((()=>{const e=this.el.querySelectorAll(".menu-item");e[this.focusedIndex]?.focus()}))}setupListeners(){this.clickOutsideHandler=e=>{const s=e.target;const i=this.el.querySelector(".menu-popup");const t=this.resolvedAnchor;if(i?.contains(s)||t?.contains(s))return;this.close()};this.scrollResizeHandler=()=>{if(this.shouldRender&&!this.closing)this.calculatePosition()};document.addEventListener("mousedown",this.clickOutsideHandler,true);window.addEventListener("scroll",this.scrollResizeHandler,true);window.addEventListener("resize",this.scrollResizeHandler)}teardownListeners(){if(this.clickOutsideHandler){document.removeEventListener("mousedown",this.clickOutsideHandler,true);this.clickOutsideHandler=null}if(this.scrollResizeHandler){window.removeEventListener("scroll",this.scrollResizeHandler,true);window.removeEventListener("resize",this.scrollResizeHandler);this.scrollResizeHandler=null}if(this.closeTimer){clearTimeout(this.closeTimer);this.closeTimer=null}}close(){this.resolvedAnchor?.focus();this.dsClose.emit();this.open=false;this.onOpenChange(false)}handleKeyDown(e){if(!this.shouldRender||this.closing)return;const s=this.flatItems;const i=s.map(((e,s)=>({it:e,i:s}))).filter((({it:e})=>!e.isInactive)).map((({i:e})=>e));if(!i.length)return;const t=i.indexOf(this.focusedIndex);const n=t<0?0:t;switch(e.key){case"ArrowDown":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=i[(n+1)%i.length];this.focusItem(this.focusedIndex);break;case"ArrowUp":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=i[(n-1+i.length)%i.length];this.focusItem(this.focusedIndex);break;case"Home":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=i[0];this.focusItem(this.focusedIndex);break;case"End":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=i[i.length-1];this.focusItem(this.focusedIndex);break;case"Escape":e.preventDefault();this.close();break;case"Tab":e.preventDefault();this.close();break}}focusItem(e){const s=this.el.querySelectorAll(".menu-item");s[e]?.focus()}handleItemClick(e){if(e.isInactive)return;this.dsSelect.emit(e)}handleGradientSelect(e){this.dsGradientSelect.emit(e)}render(){if(!this.shouldRender)return t(n,{style:{display:"contents"}});const e=this.activeSections;let s=0;const i={position:"fixed",left:"0",top:"0",transform:`translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,zIndex:"9998",visibility:this.positionReady?"visible":"hidden"};if(this.menuWidth)i["width"]=this.menuWidth;if(this.minWidth)i["min-width"]=this.minWidth;return t(n,{style:{display:"contents"}},t("div",{class:{"menu-popup":true,"menu-popup--closing":this.closing},style:i,role:"menu","aria-label":"Menu","aria-orientation":"vertical"},e.map(((i,n)=>t("div",{key:n,class:{"menu-section":true,"menu-section--divided":n<e.length-1,"menu-section--gradient-picker":m(i)},role:i.header?"group":undefined,"aria-label":i.header},i.header&&t("div",{class:"section-header","aria-hidden":"true"},t("span",{class:"text-body-small-emphasis section-label"},i.header)),m(i)?t("ds-shell-gradient-picker",{value:i.value,onDsChange:e=>{e.stopPropagation();this.handleGradientSelect(e.detail)}}):i.items.map((e=>{const i=s++;const n=this.focusedIndex===i;return t("button",{key:i,type:"button",class:{"menu-item":true,"ds-focus-ring-inset":true,"ds-focus-ring--visible":n&&this.focusRingVisible,"menu-item--selected":!!e.isSelected,"menu-item--inactive":!!e.isInactive,"menu-item--destructive":!!e.isDestructive,"menu-item--focused":n},role:"menuitem","aria-current":e.isSelected?"true":undefined,disabled:e.isInactive,tabIndex:n?0:-1,onMouseDown:()=>{this.focusRingVisible=false},onClick:()=>this.handleItemClick(e),onFocus:()=>{this.focusedIndex=i}},t("div",{class:"menu-item__content"},t("span",{class:e.isSelected?"text-body-medium-emphasis menu-item__label":"text-body-medium menu-item__label"},e.label),e.subtext&&t("span",{class:"text-body-small menu-item__subtext"},e.subtext)),e.showToggle&&t("div",{class:{"menu-item__toggle":true,"menu-item__toggle--on":!!e.toggleValue},"aria-hidden":"true"},t("div",{class:"menu-item__toggle-thumb"})))})))))))}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}],anchor:[{onAnchorChange:0}],anchorId:[{onAnchorChange:0}],side:[{onPositionPropsChange:0}],align:[{onPositionPropsChange:0}],sideOffset:[{onPositionPropsChange:0}],alignOffset:[{onPositionPropsChange:0}]}}static get style(){return f()}},[2,"ds-menu",{open:[1028],items:[16],sections:[16],side:[1],align:[1],sideOffset:[8,"side-offset"],alignOffset:[8,"align-offset"],menuWidth:[1,"menu-width"],minWidth:[1,"min-width"],anchor:[16],anchorId:[1,"anchor-id"],initialFocusVisible:[4,"initial-focus-visible"],shouldRender:[32],closing:[32],pos:[32],focusedIndex:[32],positionReady:[32],focusRingVisible:[32]},[[0,"keydown","handleKeyDown"]],{open:[{onOpenChange:0}],anchor:[{onAnchorChange:0}],anchorId:[{onAnchorChange:0}],side:[{onPositionPropsChange:0}],align:[{onPositionPropsChange:0}],sideOffset:[{onPositionPropsChange:0}],alignOffset:[{onPositionPropsChange:0}]}]);function v(){if(typeof customElements==="undefined"){return}const e=["ds-menu","ds-shell-gradient-picker","ds-shell-gradient-swatch"];e.forEach((e=>{switch(e){case"ds-menu":if(!customElements.get(o(e))){customElements.define(o(e),g)}break;case"ds-shell-gradient-picker":if(!customElements.get(o(e))){r()}break;case"ds-shell-gradient-swatch":if(!customElements.get(o(e))){a()}break}}))}v();export{g as M,v as d};
2
+ //# sourceMappingURL=p-CKCBqwIw.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["computeMenuPosition","input","anchorRect","a","popupWidth","pw","popupHeight","ph","side","align","sideOffsetPx","alignOffsetPx","viewportPadPx","vpPad","viewportWidth","viewportHeight","x","y","top","left","right","width","bottom","height","Math","min","max","isMenuGradientPickerSection","section","variant","menuCss","POSITION_RETRY_BUDGET","Menu","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","open","items","sections","sideOffset","TOKEN_CSS_LENGTHS","space050","alignOffset","initialFocusVisible","shouldRender","closing","pos","focusedIndex","positionReady","focusRingVisible","clickOutsideHandler","scrollResizeHandler","closeTimer","itemEls","positionRetryRaf","listenersReady","componentDidLoad","onOpenChange","disconnectedCallback","cancelPositionRetry","teardownListeners","isOpen","setupListeners","schedulePositionUpdate","focusInitialItem","setTimeout","closeAnimationMs","onAnchorChange","onPositionPropsChange","resolveCssLengthPx","TOKEN_DEFAULTS","popupFallbackWidthPx","menuWidthXs","popupFallbackHeightPx","menuFallbackHeight","resolveCssTimeMs","motionShort2","animationDurationShort3","resolvedAnchor","anchor","anchorId","document","getElementById","activeSections","length","flatItems","flatMap","cancelAnimationFrame","onReady","remaining","attempt","calculatePosition","requestAnimationFrame","anchorEl","popup","el","querySelector","getBoundingClientRect","offsetWidth","offsetHeight","window","innerWidth","innerHeight","flat","selectedIdx","findIndex","it","isSelected","isInactive","firstEnabledIdx","btns","querySelectorAll","focus","e","t","target","contains","close","addEventListener","removeEventListener","clearTimeout","dsClose","emit","handleKeyDown","enabled","map","i","filter","cur","indexOf","safe","key","preventDefault","stopPropagation","focusItem","idx","handleItemClick","item","dsSelect","handleGradientSelect","preset","dsGradientSelect","render","h","Host","style","display","flatIdx","popupStyle","position","transform","round","zIndex","visibility","menuWidth","minWidth","class","role","si","header","undefined","value","onDsChange","detail","isFocused","type","isDestructive","disabled","tabIndex","onMouseDown","onClick","onFocus","label","subtext","showToggle","toggleValue"],"sources":["src/wc/components/Menu/menu-position.ts","src/wc/components/Menu/menu-types.ts","src/wc/components/Menu/Menu.css?tag=ds-menu&encapsulation=scoped","src/wc/components/Menu/Menu.tsx"],"sourcesContent":["export type MenuSide = 'top' | 'right' | 'bottom' | 'left';\nexport type MenuAlign = 'start' | 'center' | 'end';\n\nexport interface MenuPositionInput {\n anchorRect: Pick<DOMRectReadOnly, 'top' | 'left' | 'right' | 'bottom' | 'width' | 'height'>;\n popupWidth: number;\n popupHeight: number;\n side: MenuSide;\n align: MenuAlign;\n sideOffsetPx: number;\n alignOffsetPx: number;\n viewportPadPx: number;\n viewportWidth: number;\n viewportHeight: number;\n}\n\n/** Pure layout math for ds-menu — anchor rect + placement props → viewport-fixed x/y. */\nexport function computeMenuPosition(input: MenuPositionInput): { x: number; y: number } {\n const {\n anchorRect: a,\n popupWidth: pw,\n popupHeight: ph,\n side,\n align,\n sideOffsetPx,\n alignOffsetPx,\n viewportPadPx: vpPad,\n viewportWidth,\n viewportHeight,\n } = input;\n\n let x = 0;\n let y = 0;\n\n switch (side) {\n case 'top':\n y = a.top - ph - sideOffsetPx;\n x =\n align === 'start'\n ? a.left + alignOffsetPx\n : align === 'end'\n ? a.right - pw + alignOffsetPx\n : a.left + a.width / 2 - pw / 2 + alignOffsetPx;\n break;\n case 'bottom':\n y = a.bottom + sideOffsetPx;\n x =\n align === 'start'\n ? a.left + alignOffsetPx\n : align === 'end'\n ? a.right - pw + alignOffsetPx\n : a.left + a.width / 2 - pw / 2 + alignOffsetPx;\n break;\n case 'left':\n x = a.left - pw - sideOffsetPx;\n y =\n align === 'start'\n ? a.top + alignOffsetPx\n : align === 'end'\n ? a.bottom - ph + alignOffsetPx\n : a.top + a.height / 2 - ph / 2 + alignOffsetPx;\n break;\n case 'right':\n x = a.right + sideOffsetPx;\n y =\n align === 'start'\n ? a.top + alignOffsetPx\n : align === 'end'\n ? a.bottom - ph + alignOffsetPx\n : a.top + a.height / 2 - ph / 2 + alignOffsetPx;\n break;\n }\n\n return {\n x: Math.min(Math.max(x, vpPad), viewportWidth - pw - vpPad),\n y: Math.min(Math.max(y, vpPad), viewportHeight - ph - vpPad),\n };\n}\n","import type { ShellGradientPreset } from '../../nav/shell-gradient-presets';\n\nexport type { MenuAlign, MenuSide } from './menu-position';\nexport {\n PANEL_NAV_USER_MENU_PLACEMENT,\n type MenuPlacement,\n} from './menu-placement';\n\nexport interface MenuItemData {\n label: string;\n value?: string;\n subtext?: string;\n isSelected?: boolean;\n isInactive?: boolean;\n isDestructive?: boolean;\n showToggle?: boolean;\n toggleValue?: boolean;\n}\n\nexport interface MenuItemsSection {\n header?: string;\n items: MenuItemData[];\n}\n\nexport interface MenuGradientPickerSection {\n header?: string;\n variant: 'gradient-picker';\n value: ShellGradientPreset;\n}\n\nexport type MenuSection = MenuItemsSection | MenuGradientPickerSection;\n\nexport function isMenuGradientPickerSection(\n section: MenuSection,\n): section is MenuGradientPickerSection {\n return 'variant' in section && section.variant === 'gradient-picker';\n}\n\nexport type { ShellGradientPreset };\n","@import '../../utils/focus-ring.css';\n\n/* ── Popup shell ─────────────────────────────────────────────────────────── */\n\n.menu-popup {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n min-width: var(--dimension-menu-width-xs);\n max-width: var(--dimension-panel-width-lg);\n overflow: hidden;\n background-color: var(--color-background-primary);\n border-radius: var(--dimension-radius-075);\n /* Split elevation: shadow on shell, inset highlight on ::after (combined token clips with overflow:hidden). */\n box-shadow: var(--effect-shadow-elevated-floating);\n animation: menuFadeIn var(--effect-motion-short-2) forwards;\n backface-visibility: hidden;\n will-change: transform;\n}\n\n.menu-popup::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n pointer-events: none;\n box-shadow: var(--effect-highlight-elevated-floating);\n}\n\n.menu-popup--closing {\n animation: menuFadeOut var(--effect-motion-short-2) forwards;\n}\n\n@keyframes menuFadeIn {\n from { opacity: 0; transform: inherit scale(0.97); }\n to { opacity: 1; }\n}\n\n@keyframes menuFadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n\n/* ── Sections ────────────────────────────────────────────────────────────── */\n\n.menu-section {\n display: flex;\n flex-direction: column;\n gap: var(--dimension-space-050);\n padding: var(--dimension-space-050);\n}\n\n.menu-section--divided {\n border-bottom: var(--dimension-stroke-width-015) solid var(--color-border-tertiary);\n}\n\n.section-header {\n display: flex;\n align-items: center;\n height: var(--dimension-size-400);\n padding: var(--dimension-space-050) var(--dimension-space-075);\n -webkit-user-select: none;\n user-select: none;\n}\n\n.section-label {\n display: inline-flex;\n align-items: center;\n padding: 0 var(--dimension-space-025);\n color: var(--color-foreground-secondary);\n}\n\n/* ── Items ───────────────────────────────────────────────────────────────── */\n\n.menu-item {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-050);\n position: relative;\n width: 100%;\n min-height: var(--dimension-size-400);\n padding: var(--dimension-space-075);\n box-sizing: border-box;\n border: none;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n text-align: left;\n color: inherit;\n --_hover-bg: var(--color-interaction-hover);\n --_pressed-bg: var(--color-interaction-pressed);\n --_selected-bg: var(--color-interaction-active);\n}\n\n.menu-item:has(.menu-item__subtext) {\n align-items: flex-start;\n}\n\n/* Interaction layer — same ::after pattern as tabs / BarNav trigger */\n.menu-item::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n background: transparent;\n pointer-events: none;\n transition: none;\n}\n\n.menu-item--selected::after {\n background: var(--_selected-bg);\n transition: none;\n}\n\n.menu-item:hover:not(:disabled):not(.menu-item--selected)::after {\n background: var(--_hover-bg);\n transition: none;\n}\n\n.menu-item:active:not(:disabled)::after {\n background: var(--_pressed-bg);\n transition: none;\n}\n\n.menu-item--inactive {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n.menu-item--destructive .menu-item__label {\n color: var(--color-foreground-bold-negative) !important;\n}\n\n.menu-item__content {\n position: relative;\n z-index: 1;\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: var(--dimension-space-025);\n min-width: 0;\n}\n\n.menu-item__label {\n padding: 0 var(--dimension-space-025);\n color: var(--color-foreground-secondary);\n}\n\n.menu-item:has(.menu-item__subtext) .menu-item__label,\n.menu-item--selected .menu-item__label {\n color: var(--color-foreground-primary);\n}\n\n.menu-item__subtext {\n padding: 0 var(--dimension-space-025);\n color: var(--color-foreground-secondary);\n line-height: 1.4;\n}\n\n/* ── Toggle suffix ───────────────────────────────────────────────────────── */\n\n.menu-item__toggle {\n position: relative;\n z-index: 1;\n flex-shrink: 0;\n width: calc(var(--dimension-size-400) + var(--dimension-size-050));\n height: var(--dimension-size-250);\n border-radius: var(--dimension-radius-125);\n background-color: var(--color-background-translucent);\n transition: background-color var(--effect-motion-short-2);\n}\n\n.menu-item__toggle--on {\n background-color: var(--color-background-medium-brand);\n}\n\n.menu-item__toggle-thumb {\n position: absolute;\n top: var(--dimension-space-025);\n left: var(--dimension-space-025);\n width: var(--dimension-size-200);\n height: var(--dimension-size-200);\n border-radius: 50%;\n background-color: var(--color-foreground-on-bold-background-primary);\n transition: transform var(--effect-motion-short-2);\n}\n\n.menu-item__toggle--on .menu-item__toggle-thumb {\n transform: translateX(var(--dimension-offset-200, 16px));\n}\n","import { Component, Prop, State, Event, EventEmitter, Element, Watch, Listen, h, Host } from '@stencil/core';\nimport { resolveCssLengthPx, resolveCssTimeMs, TOKEN_CSS_LENGTHS, TOKEN_DEFAULTS } from '../../utils';\nimport { computeMenuPosition, type MenuAlign, type MenuSide } from './menu-position';\nimport type { MenuItemData, MenuSection } from './menu-types';\nimport { isMenuGradientPickerSection } from './menu-types';\nimport type { ShellGradientPreset } from '../../nav/shell-gradient-presets';\n\n/** rAF retries while the popup mounts or the anchor resolves. */\nconst POSITION_RETRY_BUDGET = 8;\n\n@Component({\n tag: 'ds-menu',\n styleUrl: 'Menu.css',\n scoped: true,\n})\nexport class Menu {\n @Element() el!: HTMLElement;\n\n @Prop({ mutable: true }) open: boolean = false;\n @Prop() items: MenuItemData[] = [];\n @Prop() sections: MenuSection[] = [];\n @Prop() side: MenuSide = 'bottom';\n @Prop() align: MenuAlign = 'start';\n /** Gap between anchor and menu — number (px) or TokoMo length (`var(--dimension-space-050)`, etc.). */\n @Prop() sideOffset: number | string = TOKEN_CSS_LENGTHS.space050;\n /** Cross-axis offset — number (px) or TokoMo length. */\n @Prop() alignOffset: number | string = 0;\n @Prop() menuWidth: string | undefined;\n @Prop() minWidth: string | undefined;\n /** External trigger element to position against. Set via JS: menuEl.anchor = buttonEl */\n @Prop() anchor: HTMLElement | undefined;\n /** ID of the external trigger element for positioning */\n @Prop() anchorId: string | undefined;\n /** Show a visible ring on the initially focused menu item. Use only when the opener was keyboard-driven. */\n @Prop() initialFocusVisible: boolean = false;\n\n @State() private shouldRender: boolean = false;\n @State() private closing: boolean = false;\n @State() private pos: { x: number; y: number } = { x: 0, y: 0 };\n @State() private focusedIndex: number = 0;\n @State() private positionReady: boolean = false;\n @State() private focusRingVisible: boolean = false;\n\n @Event() dsClose!: EventEmitter<void>;\n @Event() dsSelect!: EventEmitter<MenuItemData>;\n /** Emitted when a `gradient-picker` section swatch is chosen. */\n @Event() dsGradientSelect!: EventEmitter<ShellGradientPreset>;\n\n private clickOutsideHandler: ((e: MouseEvent) => void) | null = null;\n private scrollResizeHandler: (() => void) | null = null;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private itemEls: HTMLElement[] = [];\n private positionRetryRaf: number | null = null;\n private listenersReady = false;\n\n componentDidLoad() {\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.cancelPositionRetry();\n this.teardownListeners();\n }\n\n @Watch('open')\n onOpenChange(isOpen: boolean) {\n if (isOpen) {\n this.teardownListeners();\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.listenersReady = false;\n this.focusRingVisible = this.initialFocusVisible;\n this.listenersReady = true;\n this.setupListeners();\n this.schedulePositionUpdate(() => {\n this.focusInitialItem();\n });\n } else if (this.shouldRender) {\n this.cancelPositionRetry();\n this.closing = true;\n this.teardownListeners();\n this.listenersReady = false;\n this.closeTimer = setTimeout(() => {\n this.shouldRender = false;\n this.closing = false;\n this.closeTimer = null;\n }, this.closeAnimationMs);\n }\n }\n\n @Watch('anchor')\n @Watch('anchorId')\n onAnchorChange() {\n if (this.open) this.schedulePositionUpdate();\n }\n\n @Watch('side')\n @Watch('align')\n @Watch('sideOffset')\n @Watch('alignOffset')\n onPositionPropsChange() {\n if (this.open) this.schedulePositionUpdate();\n }\n\n private get viewportPadPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n }\n\n private get sideOffsetPx(): number {\n return resolveCssLengthPx(this.sideOffset, TOKEN_DEFAULTS.space050);\n }\n\n private get alignOffsetPx(): number {\n return resolveCssLengthPx(this.alignOffset, 0);\n }\n\n private get popupFallbackWidthPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuWidthXs, TOKEN_DEFAULTS.menuWidthXs);\n }\n\n private get popupFallbackHeightPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuFallbackHeight, TOKEN_DEFAULTS.menuFallbackHeight);\n }\n\n private get closeAnimationMs(): number {\n return resolveCssTimeMs(TOKEN_DEFAULTS.motionShort2, TOKEN_DEFAULTS.animationDurationShort3);\n }\n\n private get resolvedAnchor(): HTMLElement | null {\n if (this.anchor) return this.anchor;\n if (this.anchorId) return document.getElementById(this.anchorId);\n return null;\n }\n\n private get activeSections(): MenuSection[] {\n if (this.sections.length > 0) return this.sections;\n if (this.items.length > 0) return [{ items: this.items }];\n return [];\n }\n\n private get flatItems(): MenuItemData[] {\n return this.activeSections.flatMap(section =>\n isMenuGradientPickerSection(section) ? [] : section.items,\n );\n }\n\n private cancelPositionRetry() {\n if (this.positionRetryRaf !== null) {\n cancelAnimationFrame(this.positionRetryRaf);\n this.positionRetryRaf = null;\n }\n }\n\n /** Retry until anchor + popup exist — do not reveal at 0,0 on a failed first pass. */\n private schedulePositionUpdate(onReady?: () => void) {\n if (!this.open) return;\n\n this.cancelPositionRetry();\n this.positionReady = false;\n\n let remaining = POSITION_RETRY_BUDGET;\n\n const attempt = () => {\n this.positionRetryRaf = null;\n if (!this.open) return;\n\n if (this.calculatePosition()) {\n this.positionReady = true;\n onReady?.();\n return;\n }\n\n if (remaining > 0) {\n remaining -= 1;\n this.positionRetryRaf = requestAnimationFrame(attempt);\n }\n };\n\n this.positionRetryRaf = requestAnimationFrame(attempt);\n }\n\n /** @returns `true` when anchor and popup were found and `pos` was updated. */\n private calculatePosition(): boolean {\n const anchorEl = this.resolvedAnchor;\n if (!anchorEl) return false;\n const popup = this.el.querySelector('.menu-popup') as HTMLElement | null;\n if (!popup) return false;\n\n this.pos = computeMenuPosition({\n anchorRect: anchorEl.getBoundingClientRect(),\n popupWidth: popup.offsetWidth || this.popupFallbackWidthPx,\n popupHeight: popup.offsetHeight || this.popupFallbackHeightPx,\n side: this.side,\n align: this.align,\n sideOffsetPx: this.sideOffsetPx,\n alignOffsetPx: this.alignOffsetPx,\n viewportPadPx: this.viewportPadPx,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n });\n return true;\n }\n\n /** Focus the selected item when present, otherwise the first enabled item. */\n private focusInitialItem() {\n const flat = this.flatItems;\n const selectedIdx = flat.findIndex(it => it.isSelected && !it.isInactive);\n const firstEnabledIdx = flat.findIndex(it => !it.isInactive);\n this.focusedIndex = selectedIdx >= 0\n ? selectedIdx\n : (firstEnabledIdx >= 0 ? firstEnabledIdx : 0);\n\n requestAnimationFrame(() => {\n const btns = this.el.querySelectorAll<HTMLElement>('.menu-item');\n btns[this.focusedIndex]?.focus();\n });\n }\n\n private setupListeners() {\n this.clickOutsideHandler = (e: MouseEvent) => {\n const t = e.target as Node;\n const popup = this.el.querySelector('.menu-popup');\n const anchorEl = this.resolvedAnchor;\n if (popup?.contains(t) || anchorEl?.contains(t)) return;\n this.close();\n };\n\n this.scrollResizeHandler = () => {\n if (this.shouldRender && !this.closing) this.calculatePosition();\n };\n\n document.addEventListener('mousedown', this.clickOutsideHandler, true);\n window.addEventListener('scroll', this.scrollResizeHandler, true);\n window.addEventListener('resize', this.scrollResizeHandler);\n }\n\n private teardownListeners() {\n if (this.clickOutsideHandler) {\n document.removeEventListener('mousedown', this.clickOutsideHandler, true);\n this.clickOutsideHandler = null;\n }\n if (this.scrollResizeHandler) {\n window.removeEventListener('scroll', this.scrollResizeHandler, true);\n window.removeEventListener('resize', this.scrollResizeHandler);\n this.scrollResizeHandler = null;\n }\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private close() {\n this.resolvedAnchor?.focus();\n this.dsClose.emit();\n this.open = false;\n this.onOpenChange(false);\n }\n\n @Listen('keydown')\n handleKeyDown(e: KeyboardEvent) {\n if (!this.shouldRender || this.closing) return;\n const flat = this.flatItems;\n const enabled = flat.map((it, i) => ({ it, i })).filter(({ it }) => !it.isInactive).map(({ i }) => i);\n if (!enabled.length) return;\n\n const cur = enabled.indexOf(this.focusedIndex);\n const safe = cur < 0 ? 0 : cur;\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[(safe + 1) % enabled.length];\n this.focusItem(this.focusedIndex);\n break;\n case 'ArrowUp':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[(safe - 1 + enabled.length) % enabled.length];\n this.focusItem(this.focusedIndex);\n break;\n case 'Home':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[0];\n this.focusItem(this.focusedIndex);\n break;\n case 'End':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[enabled.length - 1];\n this.focusItem(this.focusedIndex);\n break;\n case 'Escape':\n e.preventDefault();\n this.close();\n break;\n case 'Tab':\n e.preventDefault();\n this.close();\n break;\n }\n }\n\n private focusItem(idx: number) {\n const btns = this.el.querySelectorAll<HTMLElement>('.menu-item');\n btns[idx]?.focus();\n }\n\n private handleItemClick(item: MenuItemData) {\n if (item.isInactive) return;\n this.dsSelect.emit(item);\n }\n\n private handleGradientSelect(preset: ShellGradientPreset) {\n this.dsGradientSelect.emit(preset);\n }\n\n render() {\n if (!this.shouldRender) return <Host style={{ display: 'contents' }} />;\n\n const sections = this.activeSections;\n let flatIdx = 0;\n\n const popupStyle: Record<string, string> = {\n position: 'fixed',\n left: '0',\n top: '0',\n transform: `translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,\n zIndex: '9998',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n\n if (this.menuWidth) popupStyle['width'] = this.menuWidth;\n if (this.minWidth) popupStyle['min-width'] = this.minWidth;\n\n return (\n <Host style={{ display: 'contents' }}>\n <div\n class={{ 'menu-popup': true, 'menu-popup--closing': this.closing }}\n style={popupStyle}\n role=\"menu\"\n aria-label=\"Menu\"\n aria-orientation=\"vertical\"\n >\n {sections.map((section, si) => (\n <div\n key={si}\n class={{\n 'menu-section': true,\n 'menu-section--divided': si < sections.length - 1,\n 'menu-section--gradient-picker': isMenuGradientPickerSection(section),\n }}\n role={section.header ? 'group' : undefined}\n aria-label={section.header}\n >\n {section.header && (\n <div class=\"section-header\" aria-hidden=\"true\">\n <span class=\"text-body-small-emphasis section-label\">{section.header}</span>\n </div>\n )}\n {isMenuGradientPickerSection(section) ? (\n <ds-shell-gradient-picker\n value={section.value}\n onDsChange={(e: CustomEvent<ShellGradientPreset>) => {\n e.stopPropagation();\n this.handleGradientSelect(e.detail);\n }}\n />\n ) : (\n section.items.map(item => {\n const idx = flatIdx++;\n const isFocused = this.focusedIndex === idx;\n return (\n <button\n key={idx}\n type=\"button\"\n class={{\n 'menu-item': true,\n 'ds-focus-ring-inset': true,\n 'ds-focus-ring--visible': isFocused && this.focusRingVisible,\n 'menu-item--selected': !!item.isSelected,\n 'menu-item--inactive': !!item.isInactive,\n 'menu-item--destructive': !!item.isDestructive,\n 'menu-item--focused': isFocused,\n }}\n role=\"menuitem\"\n aria-current={item.isSelected ? 'true' : undefined}\n disabled={item.isInactive}\n tabIndex={isFocused ? 0 : -1}\n onMouseDown={() => { this.focusRingVisible = false; }}\n onClick={() => this.handleItemClick(item)}\n onFocus={() => { this.focusedIndex = idx; }}\n >\n <div class=\"menu-item__content\">\n <span class={item.isSelected ? 'text-body-medium-emphasis menu-item__label' : 'text-body-medium menu-item__label'}>\n {item.label}\n </span>\n {item.subtext && (\n <span class=\"text-body-small menu-item__subtext\">{item.subtext}</span>\n )}\n </div>\n {item.showToggle && (\n <div class={{ 'menu-item__toggle': true, 'menu-item__toggle--on': !!item.toggleValue }} aria-hidden=\"true\">\n <div class=\"menu-item__toggle-thumb\" />\n </div>\n )}\n </button>\n );\n }))}\n </div>\n ))}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"6PAiBM,SAAUA,EAAoBC,GAClC,MACEC,WAAYC,EACZC,WAAYC,EACZC,YAAaC,EAAEC,KACfA,EAAIC,MACJA,EAAKC,aACLA,EAAYC,cACZA,EACAC,cAAeC,EAAKC,cACpBA,EAAaC,eACbA,GACEd,EAEJ,IAAIe,EAAI,EACR,IAAIC,EAAI,EAER,OAAQT,GACN,IAAK,MACHS,EAAId,EAAEe,IAAMX,EAAKG,EACjBM,EACEP,IAAU,QACNN,EAAEgB,KAAOR,EACTF,IAAU,MACRN,EAAEiB,MAAQf,EAAKM,EACfR,EAAEgB,KAAOhB,EAAEkB,MAAQ,EAAIhB,EAAK,EAAIM,EACxC,MACF,IAAK,SACHM,EAAId,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A,4BACEkB,MAAOvI,EAAQuI,MACfC,WAAajD,IACXA,EAAEoB,kBACFlG,KAAKwG,qBAAqB1B,EAAEkD,OAAO,IAIvCzI,EAAQW,MAAMwF,KAAIY,IAClB,MAAMF,EAAMY,IACZ,MAAMiB,EAAYjI,KAAKY,eAAiBwF,EACxC,OACEQ,EAAA,UACEZ,IAAKI,EACL8B,KAAK,SACLT,MAAO,CACL,YAAa,KACb,sBAAuB,KACvB,yBAA0BQ,GAAajI,KAAKc,iBAC5C,wBAAyBwF,EAAK9B,WAC9B,wBAAyB8B,EAAK7B,WAC9B,2BAA4B6B,EAAK6B,cACjC,qBAAsBF,GAExBP,KAAK,WAAU,eACDpB,EAAK9B,WAAa,OAASqD,UACzCO,SAAU9B,EAAK7B,WACf4D,SAAUJ,EAAY,GAAI,EAC1BK,YAAa,KAAQtI,KAAKc,iBAAmB,KAAK,EAClDyH,QAAS,IAAMvI,KAAKqG,gBAAgBC,GACpCkC,QAAS,KAAQxI,KAAKY,aAAewF,CAAG,GAExCQ,EAAA,OAAKa,MAAM,sBACTb,EAAA,QAAMa,MAAOnB,EAAK9B,WAAa,6CAA+C,qCAC3E8B,EAAKmC,OAEPnC,EAAKoC,SACJ9B,EAAA,QAAMa,MAAM,sCAAsCnB,EAAKoC,UAG1DpC,EAAKqC,YACJ/B,EAAA,OAAKa,MAAO,CAAE,oBAAqB,KAAM,0BAA2BnB,EAAKsC,aAAa,cAAc,QAClGhC,EAAA,OAAKa,MAAM,6BAGR,Q","ignoreList":[]}
1
+ {"version":3,"names":["computeMenuPosition","input","anchorRect","a","popupWidth","pw","popupHeight","ph","side","align","sideOffsetPx","alignOffsetPx","viewportPadPx","vpPad","viewportWidth","viewportHeight","x","y","top","left","right","width","bottom","height","Math","min","max","isMenuGradientPickerSection","section","variant","menuCss","POSITION_RETRY_BUDGET","Menu","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","open","items","sections","sideOffset","TOKEN_CSS_LENGTHS","space050","alignOffset","initialFocusVisible","shouldRender","closing","pos","focusedIndex","positionReady","focusRingVisible","clickOutsideHandler","scrollResizeHandler","closeTimer","itemEls","positionRetryRaf","listenersReady","componentDidLoad","onOpenChange","disconnectedCallback","cancelPositionRetry","teardownListeners","isOpen","setupListeners","schedulePositionUpdate","focusInitialItem","setTimeout","closeAnimationMs","onAnchorChange","onPositionPropsChange","resolveCssLengthPx","TOKEN_DEFAULTS","popupFallbackWidthPx","menuWidthXs","popupFallbackHeightPx","menuFallbackHeight","resolveCssTimeMs","motionShort2","animationDurationShort3","resolvedAnchor","anchor","anchorId","document","getElementById","activeSections","length","flatItems","flatMap","cancelAnimationFrame","onReady","remaining","attempt","calculatePosition","requestAnimationFrame","anchorEl","popup","el","querySelector","getBoundingClientRect","offsetWidth","offsetHeight","window","innerWidth","innerHeight","flat","selectedIdx","findIndex","it","isSelected","isInactive","firstEnabledIdx","btns","querySelectorAll","focus","e","t","target","contains","close","addEventListener","removeEventListener","clearTimeout","dsClose","emit","handleKeyDown","enabled","map","i","filter","cur","indexOf","safe","key","preventDefault","stopPropagation","focusItem","idx","handleItemClick","item","dsSelect","handleGradientSelect","preset","dsGradientSelect","render","h","Host","style","display","flatIdx","popupStyle","position","transform","round","zIndex","visibility","menuWidth","minWidth","class","role","si","header","undefined","value","onDsChange","detail","isFocused","type","isDestructive","disabled","tabIndex","onMouseDown","onClick","onFocus","label","subtext","showToggle","toggleValue"],"sources":["src/wc/components/Menu/menu-position.ts","src/wc/components/Menu/menu-types.ts","src/wc/components/Menu/Menu.css?tag=ds-menu&encapsulation=scoped","src/wc/components/Menu/Menu.tsx"],"sourcesContent":["export type MenuSide = 'top' | 'right' | 'bottom' | 'left';\nexport type MenuAlign = 'start' | 'center' | 'end';\n\nexport interface MenuPositionInput {\n anchorRect: Pick<DOMRectReadOnly, 'top' | 'left' | 'right' | 'bottom' | 'width' | 'height'>;\n popupWidth: number;\n popupHeight: number;\n side: MenuSide;\n align: MenuAlign;\n sideOffsetPx: number;\n alignOffsetPx: number;\n viewportPadPx: number;\n viewportWidth: number;\n viewportHeight: number;\n}\n\n/** Pure layout math for ds-menu — anchor rect + placement props → viewport-fixed x/y. */\nexport function computeMenuPosition(input: MenuPositionInput): { x: number; y: number } {\n const {\n anchorRect: a,\n popupWidth: pw,\n popupHeight: ph,\n side,\n align,\n sideOffsetPx,\n alignOffsetPx,\n viewportPadPx: vpPad,\n viewportWidth,\n viewportHeight,\n } = input;\n\n let x = 0;\n let y = 0;\n\n switch (side) {\n case 'top':\n y = a.top - ph - sideOffsetPx;\n x =\n align === 'start'\n ? a.left + alignOffsetPx\n : align === 'end'\n ? a.right - pw + alignOffsetPx\n : a.left + a.width / 2 - pw / 2 + alignOffsetPx;\n break;\n case 'bottom':\n y = a.bottom + sideOffsetPx;\n x =\n align === 'start'\n ? a.left + alignOffsetPx\n : align === 'end'\n ? a.right - pw + alignOffsetPx\n : a.left + a.width / 2 - pw / 2 + alignOffsetPx;\n break;\n case 'left':\n x = a.left - pw - sideOffsetPx;\n y =\n align === 'start'\n ? a.top + alignOffsetPx\n : align === 'end'\n ? a.bottom - ph + alignOffsetPx\n : a.top + a.height / 2 - ph / 2 + alignOffsetPx;\n break;\n case 'right':\n x = a.right + sideOffsetPx;\n y =\n align === 'start'\n ? a.top + alignOffsetPx\n : align === 'end'\n ? a.bottom - ph + alignOffsetPx\n : a.top + a.height / 2 - ph / 2 + alignOffsetPx;\n break;\n }\n\n return {\n x: Math.min(Math.max(x, vpPad), viewportWidth - pw - vpPad),\n y: Math.min(Math.max(y, vpPad), viewportHeight - ph - vpPad),\n };\n}\n","import type { ShellGradientPreset } from '../../nav/shell-gradient-presets';\n\nexport type { MenuAlign, MenuSide } from './menu-position';\nexport {\n PANEL_NAV_USER_MENU_PLACEMENT,\n type MenuPlacement,\n} from './menu-placement';\n\nexport interface MenuItemData {\n label: string;\n value?: string;\n subtext?: string;\n isSelected?: boolean;\n isInactive?: boolean;\n isDestructive?: boolean;\n showToggle?: boolean;\n toggleValue?: boolean;\n}\n\nexport interface MenuItemsSection {\n header?: string;\n items: MenuItemData[];\n}\n\nexport interface MenuGradientPickerSection {\n header?: string;\n variant: 'gradient-picker';\n value: ShellGradientPreset;\n}\n\nexport type MenuSection = MenuItemsSection | MenuGradientPickerSection;\n\nexport function isMenuGradientPickerSection(\n section: MenuSection,\n): section is MenuGradientPickerSection {\n return 'variant' in section && section.variant === 'gradient-picker';\n}\n\nexport type { ShellGradientPreset };\n","@import '../../utils/focus-ring.css';\n\n/* ── Popup shell ─────────────────────────────────────────────────────────── */\n\n.menu-popup {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n min-width: var(--dimension-menu-width-xs);\n max-width: var(--dimension-panel-width-lg);\n overflow: hidden;\n background-color: var(--color-background-primary);\n border-radius: var(--dimension-radius-075);\n /* Split elevation: shadow on shell, inset highlight on ::after (combined token clips with overflow:hidden). */\n box-shadow: var(--effect-shadow-elevated-floating);\n animation: menuFadeIn var(--effect-motion-short-2) forwards;\n backface-visibility: hidden;\n will-change: transform;\n}\n\n.menu-popup::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n pointer-events: none;\n box-shadow: var(--effect-highlight-elevated-floating);\n}\n\n.menu-popup--closing {\n animation: menuFadeOut var(--effect-motion-short-2) forwards;\n}\n\n@keyframes menuFadeIn {\n from { opacity: 0; transform: inherit scale(0.97); }\n to { opacity: 1; }\n}\n\n@keyframes menuFadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n\n/* ── Sections ────────────────────────────────────────────────────────────── */\n\n.menu-section {\n display: flex;\n flex-direction: column;\n gap: var(--dimension-space-050);\n padding: var(--dimension-space-050);\n}\n\n.menu-section--divided {\n border-bottom: var(--dimension-stroke-width-015) solid var(--color-border-tertiary);\n}\n\n.section-header {\n display: flex;\n align-items: center;\n height: var(--dimension-size-400);\n padding: var(--dimension-space-050) var(--dimension-space-075);\n -webkit-user-select: none;\n user-select: none;\n}\n\n.section-label {\n display: inline-flex;\n align-items: center;\n padding: 0 var(--dimension-space-025);\n color: var(--color-foreground-secondary);\n}\n\n/* ── Items ───────────────────────────────────────────────────────────────── */\n\n.menu-item {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-050);\n position: relative;\n width: 100%;\n min-height: var(--dimension-size-400);\n padding: var(--dimension-space-075);\n box-sizing: border-box;\n border: none;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n text-align: left;\n color: inherit;\n --_hover-bg: var(--color-interaction-hover);\n --_pressed-bg: var(--color-interaction-pressed);\n --_selected-bg: var(--color-interaction-active);\n}\n\n.menu-item:has(.menu-item__subtext) {\n align-items: flex-start;\n}\n\n/* Interaction layer — same ::after pattern as tabs / BarNav trigger */\n.menu-item::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n background: transparent;\n pointer-events: none;\n transition: none;\n}\n\n.menu-item--selected::after {\n background: var(--_selected-bg);\n transition: none;\n}\n\n.menu-item:hover:not(:disabled):not(.menu-item--selected)::after {\n background: var(--_hover-bg);\n transition: none;\n}\n\n.menu-item:active:not(:disabled)::after {\n background: var(--_pressed-bg);\n transition: none;\n}\n\n.menu-item--inactive {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n.menu-item--destructive .menu-item__label {\n color: var(--color-foreground-bold-negative) !important;\n}\n\n.menu-item__content {\n position: relative;\n z-index: 1;\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: var(--dimension-space-025);\n min-width: 0;\n}\n\n.menu-item__label {\n padding: 0 var(--dimension-space-025);\n color: var(--color-foreground-secondary);\n}\n\n.menu-item:has(.menu-item__subtext) .menu-item__label,\n.menu-item--selected .menu-item__label {\n color: var(--color-foreground-primary);\n}\n\n.menu-item__subtext {\n padding: 0 var(--dimension-space-025);\n color: var(--color-foreground-secondary);\n line-height: 1.4;\n}\n\n/* ── Toggle suffix ───────────────────────────────────────────────────────── */\n\n.menu-item__toggle {\n position: relative;\n z-index: 1;\n flex-shrink: 0;\n width: calc(var(--dimension-size-400) + var(--dimension-size-050));\n height: var(--dimension-size-250);\n border-radius: var(--dimension-radius-125);\n background-color: var(--color-background-translucent);\n transition: background-color var(--effect-motion-short-2);\n}\n\n.menu-item__toggle--on {\n background-color: var(--color-background-medium-brand);\n}\n\n.menu-item__toggle-thumb {\n position: absolute;\n top: var(--dimension-space-025);\n left: var(--dimension-space-025);\n width: var(--dimension-size-200);\n height: var(--dimension-size-200);\n border-radius: 50%;\n background-color: var(--color-foreground-on-bold-background-primary);\n transition: transform var(--effect-motion-short-2);\n}\n\n.menu-item__toggle--on .menu-item__toggle-thumb {\n transform: translateX(var(--dimension-offset-200, 16px));\n}\n","import { Component, Prop, State, Event, EventEmitter, Element, Watch, Listen, h, Host } from '@stencil/core';\nimport { resolveCssLengthPx, resolveCssTimeMs, TOKEN_CSS_LENGTHS, TOKEN_DEFAULTS } from '../../utils';\nimport { computeMenuPosition, type MenuAlign, type MenuSide } from './menu-position';\nimport type { MenuItemData, MenuSection } from './menu-types';\nimport { isMenuGradientPickerSection } from './menu-types';\nimport type { ShellGradientPreset } from '../../nav/shell-gradient-presets';\n\n/** rAF retries while the popup mounts or the anchor resolves. */\nconst POSITION_RETRY_BUDGET = 8;\n\n@Component({\n tag: 'ds-menu',\n styleUrl: 'Menu.css',\n scoped: true,\n})\nexport class Menu {\n @Element() el!: HTMLElement;\n\n @Prop({ mutable: true }) open: boolean = false;\n @Prop() items: MenuItemData[] = [];\n @Prop() sections: MenuSection[] = [];\n @Prop() side: MenuSide = 'bottom';\n @Prop() align: MenuAlign = 'start';\n /** Gap between anchor and menu — number (px) or TokoMo length (`var(--dimension-space-050)`, etc.). */\n @Prop() sideOffset: number | string = TOKEN_CSS_LENGTHS.space050;\n /** Cross-axis offset — number (px) or TokoMo length. */\n @Prop() alignOffset: number | string = 0;\n @Prop() menuWidth: string | undefined;\n @Prop() minWidth: string | undefined;\n /** External trigger element to position against. Set via JS: menuEl.anchor = buttonEl */\n @Prop() anchor: HTMLElement | undefined;\n /** ID of the external trigger element for positioning */\n @Prop() anchorId: string | undefined;\n /** Show a visible ring on the initially focused menu item. Use only when the opener was keyboard-driven. */\n @Prop() initialFocusVisible: boolean = false;\n\n @State() private shouldRender: boolean = false;\n @State() private closing: boolean = false;\n @State() private pos: { x: number; y: number } = { x: 0, y: 0 };\n @State() private focusedIndex: number = 0;\n @State() private positionReady: boolean = false;\n @State() private focusRingVisible: boolean = false;\n\n @Event() dsClose!: EventEmitter<void>;\n @Event() dsSelect!: EventEmitter<MenuItemData>;\n /** Emitted when a `gradient-picker` section swatch is chosen. */\n @Event() dsGradientSelect!: EventEmitter<ShellGradientPreset>;\n\n private clickOutsideHandler: ((e: MouseEvent) => void) | null = null;\n private scrollResizeHandler: (() => void) | null = null;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private itemEls: HTMLElement[] = [];\n private positionRetryRaf: number | null = null;\n private listenersReady = false;\n\n componentDidLoad() {\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.cancelPositionRetry();\n this.teardownListeners();\n }\n\n @Watch('open')\n onOpenChange(isOpen: boolean) {\n if (isOpen) {\n this.teardownListeners();\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.listenersReady = false;\n this.focusRingVisible = this.initialFocusVisible;\n this.listenersReady = true;\n this.setupListeners();\n this.schedulePositionUpdate(() => {\n this.focusInitialItem();\n });\n } else if (this.shouldRender) {\n this.cancelPositionRetry();\n this.closing = true;\n this.teardownListeners();\n this.listenersReady = false;\n this.closeTimer = setTimeout(() => {\n this.shouldRender = false;\n this.closing = false;\n this.closeTimer = null;\n }, this.closeAnimationMs);\n }\n }\n\n @Watch('anchor')\n @Watch('anchorId')\n onAnchorChange() {\n if (this.open) this.schedulePositionUpdate();\n }\n\n @Watch('side')\n @Watch('align')\n @Watch('sideOffset')\n @Watch('alignOffset')\n onPositionPropsChange() {\n if (this.open) this.schedulePositionUpdate();\n }\n\n private get viewportPadPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n }\n\n private get sideOffsetPx(): number {\n return resolveCssLengthPx(this.sideOffset, TOKEN_DEFAULTS.space050);\n }\n\n private get alignOffsetPx(): number {\n return resolveCssLengthPx(this.alignOffset, 0);\n }\n\n private get popupFallbackWidthPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuWidthXs, TOKEN_DEFAULTS.menuWidthXs);\n }\n\n private get popupFallbackHeightPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuFallbackHeight, TOKEN_DEFAULTS.menuFallbackHeight);\n }\n\n private get closeAnimationMs(): number {\n return resolveCssTimeMs(TOKEN_DEFAULTS.motionShort2, TOKEN_DEFAULTS.animationDurationShort3);\n }\n\n private get resolvedAnchor(): HTMLElement | null {\n if (this.anchor) return this.anchor;\n if (this.anchorId) return document.getElementById(this.anchorId);\n return null;\n }\n\n private get activeSections(): MenuSection[] {\n if (this.sections.length > 0) return this.sections;\n if (this.items.length > 0) return [{ items: this.items }];\n return [];\n }\n\n private get flatItems(): MenuItemData[] {\n return this.activeSections.flatMap(section =>\n isMenuGradientPickerSection(section) ? [] : section.items,\n );\n }\n\n private cancelPositionRetry() {\n if (this.positionRetryRaf !== null) {\n cancelAnimationFrame(this.positionRetryRaf);\n this.positionRetryRaf = null;\n }\n }\n\n /** Retry until anchor + popup exist — do not reveal at 0,0 on a failed first pass. */\n private schedulePositionUpdate(onReady?: () => void) {\n if (!this.open) return;\n\n this.cancelPositionRetry();\n this.positionReady = false;\n\n let remaining = POSITION_RETRY_BUDGET;\n\n const attempt = () => {\n this.positionRetryRaf = null;\n if (!this.open) return;\n\n if (this.calculatePosition()) {\n this.positionReady = true;\n onReady?.();\n return;\n }\n\n if (remaining > 0) {\n remaining -= 1;\n this.positionRetryRaf = requestAnimationFrame(attempt);\n }\n };\n\n this.positionRetryRaf = requestAnimationFrame(attempt);\n }\n\n /** @returns `true` when anchor and popup were found and `pos` was updated. */\n private calculatePosition(): boolean {\n const anchorEl = this.resolvedAnchor;\n if (!anchorEl) return false;\n const popup = this.el.querySelector('.menu-popup') as HTMLElement | null;\n if (!popup) return false;\n\n this.pos = computeMenuPosition({\n anchorRect: anchorEl.getBoundingClientRect(),\n popupWidth: popup.offsetWidth || this.popupFallbackWidthPx,\n popupHeight: popup.offsetHeight || this.popupFallbackHeightPx,\n side: this.side,\n align: this.align,\n sideOffsetPx: this.sideOffsetPx,\n alignOffsetPx: this.alignOffsetPx,\n viewportPadPx: this.viewportPadPx,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n });\n return true;\n }\n\n /** Focus the selected item when present, otherwise the first enabled item. */\n private focusInitialItem() {\n const flat = this.flatItems;\n const selectedIdx = flat.findIndex(it => it.isSelected && !it.isInactive);\n const firstEnabledIdx = flat.findIndex(it => !it.isInactive);\n this.focusedIndex = selectedIdx >= 0\n ? selectedIdx\n : (firstEnabledIdx >= 0 ? firstEnabledIdx : 0);\n\n requestAnimationFrame(() => {\n const btns = this.el.querySelectorAll<HTMLElement>('.menu-item');\n btns[this.focusedIndex]?.focus();\n });\n }\n\n private setupListeners() {\n this.clickOutsideHandler = (e: MouseEvent) => {\n const t = e.target as Node;\n const popup = this.el.querySelector('.menu-popup');\n const anchorEl = this.resolvedAnchor;\n if (popup?.contains(t) || anchorEl?.contains(t)) return;\n this.close();\n };\n\n this.scrollResizeHandler = () => {\n if (this.shouldRender && !this.closing) this.calculatePosition();\n };\n\n document.addEventListener('mousedown', this.clickOutsideHandler, true);\n window.addEventListener('scroll', this.scrollResizeHandler, true);\n window.addEventListener('resize', this.scrollResizeHandler);\n }\n\n private teardownListeners() {\n if (this.clickOutsideHandler) {\n document.removeEventListener('mousedown', this.clickOutsideHandler, true);\n this.clickOutsideHandler = null;\n }\n if (this.scrollResizeHandler) {\n window.removeEventListener('scroll', this.scrollResizeHandler, true);\n window.removeEventListener('resize', this.scrollResizeHandler);\n this.scrollResizeHandler = null;\n }\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private close() {\n this.resolvedAnchor?.focus();\n this.dsClose.emit();\n this.open = false;\n this.onOpenChange(false);\n }\n\n @Listen('keydown')\n handleKeyDown(e: KeyboardEvent) {\n if (!this.shouldRender || this.closing) return;\n const flat = this.flatItems;\n const enabled = flat.map((it, i) => ({ it, i })).filter(({ it }) => !it.isInactive).map(({ i }) => i);\n if (!enabled.length) return;\n\n const cur = enabled.indexOf(this.focusedIndex);\n const safe = cur < 0 ? 0 : cur;\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[(safe + 1) % enabled.length];\n this.focusItem(this.focusedIndex);\n break;\n case 'ArrowUp':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[(safe - 1 + enabled.length) % enabled.length];\n this.focusItem(this.focusedIndex);\n break;\n case 'Home':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[0];\n this.focusItem(this.focusedIndex);\n break;\n case 'End':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[enabled.length - 1];\n this.focusItem(this.focusedIndex);\n break;\n case 'Escape':\n e.preventDefault();\n this.close();\n break;\n case 'Tab':\n e.preventDefault();\n this.close();\n break;\n }\n }\n\n private focusItem(idx: number) {\n const btns = this.el.querySelectorAll<HTMLElement>('.menu-item');\n btns[idx]?.focus();\n }\n\n private handleItemClick(item: MenuItemData) {\n if (item.isInactive) return;\n this.dsSelect.emit(item);\n }\n\n private handleGradientSelect(preset: ShellGradientPreset) {\n this.dsGradientSelect.emit(preset);\n }\n\n render() {\n if (!this.shouldRender) return <Host style={{ display: 'contents' }} />;\n\n const sections = this.activeSections;\n let flatIdx = 0;\n\n const popupStyle: Record<string, string> = {\n position: 'fixed',\n left: '0',\n top: '0',\n transform: `translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,\n zIndex: '9998',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n\n if (this.menuWidth) popupStyle['width'] = this.menuWidth;\n if (this.minWidth) popupStyle['min-width'] = this.minWidth;\n\n return (\n <Host style={{ display: 'contents' }}>\n <div\n class={{ 'menu-popup': true, 'menu-popup--closing': this.closing }}\n style={popupStyle}\n role=\"menu\"\n aria-label=\"Menu\"\n aria-orientation=\"vertical\"\n >\n {sections.map((section, si) => (\n <div\n key={si}\n class={{\n 'menu-section': true,\n 'menu-section--divided': si < sections.length - 1,\n 'menu-section--gradient-picker': isMenuGradientPickerSection(section),\n }}\n role={section.header ? 'group' : undefined}\n aria-label={section.header}\n >\n {section.header && (\n <div class=\"section-header\" aria-hidden=\"true\">\n <span class=\"text-body-small-emphasis section-label\">{section.header}</span>\n </div>\n )}\n {isMenuGradientPickerSection(section) ? (\n <ds-shell-gradient-picker\n value={section.value}\n onDsChange={(e: CustomEvent<ShellGradientPreset>) => {\n e.stopPropagation();\n this.handleGradientSelect(e.detail);\n }}\n />\n ) : (\n section.items.map(item => {\n const idx = flatIdx++;\n const isFocused = this.focusedIndex === idx;\n return (\n <button\n key={idx}\n type=\"button\"\n class={{\n 'menu-item': true,\n 'ds-focus-ring-inset': true,\n 'ds-focus-ring--visible': isFocused && this.focusRingVisible,\n 'menu-item--selected': !!item.isSelected,\n 'menu-item--inactive': !!item.isInactive,\n 'menu-item--destructive': !!item.isDestructive,\n 'menu-item--focused': isFocused,\n }}\n role=\"menuitem\"\n aria-current={item.isSelected ? 'true' : undefined}\n disabled={item.isInactive}\n tabIndex={isFocused ? 0 : -1}\n onMouseDown={() => { this.focusRingVisible = false; }}\n onClick={() => this.handleItemClick(item)}\n onFocus={() => { this.focusedIndex = idx; }}\n >\n <div class=\"menu-item__content\">\n <span class={item.isSelected ? 'text-body-medium-emphasis menu-item__label' : 'text-body-medium menu-item__label'}>\n {item.label}\n </span>\n {item.subtext && (\n <span class=\"text-body-small menu-item__subtext\">{item.subtext}</span>\n )}\n </div>\n {item.showToggle && (\n <div class={{ 'menu-item__toggle': true, 'menu-item__toggle--on': !!item.toggleValue }} aria-hidden=\"true\">\n <div class=\"menu-item__toggle-thumb\" />\n </div>\n )}\n </button>\n );\n }))}\n </div>\n ))}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"6PAiBM,SAAUA,EAAoBC,GAClC,MACEC,WAAYC,EACZC,WAAYC,EACZC,YAAaC,EAAEC,KACfA,EAAIC,MACJA,EAAKC,aACLA,EAAYC,cACZA,EACAC,cAAeC,EAAKC,cACpBA,EAAaC,eACbA,GACEd,EAEJ,IAAIe,EAAI,EACR,IAAIC,EAAI,EAER,OAAQT,GACN,IAAK,MACHS,EAAId,EAAEe,IAAMX,EAAKG,EACjBM,EACEP,IAAU,QACNN,EAAEgB,KAAOR,EACTF,IAAU,MACRN,EAAEiB,MAAQf,EAAKM,EACfR,EAAEgB,KAAOhB,EAAEkB,MAAQ,EAAIhB,EAAK,EAAIM,EACxC,MACF,IAAK,SACHM,EAAId,EAAEmB,OAASZ,EACfM,EACEP,IAAU,QACNN,EAAEgB,KAAOR,EACTF,IAAU,MACRN,EAAEiB,MAAQf,EAAKM,EACfR,EAAEgB,KAAOhB,EAAEkB,MAAQ,EAAIhB,EAAK,EAAIM,EACxC,MACF,IAAK,OACHK,EAAIb,EAAEgB,KAAOd,EAAKK,EAClBO,EACER,IAAU,QACNN,EAAEe,IAAMP,EACRF,IAAU,MACRN,EAAEmB,OAASf,EAAKI,EAChBR,EAAEe,IAAMf,EAAEoB,OAAS,EAAIhB,EAAK,EAAII,EACxC,MACF,IAAK,QACHK,EAAIb,EAAEiB,MAAQV,EACdO,EACER,IAAU,QACNN,EAAEe,IAAMP,EACRF,IAAU,MACRN,EAAEmB,OAASf,EAAKI,EAChBR,EAAEe,IAAMf,EAAEoB,OAAS,EAAIhB,EAAK,EAAII,EACxC,MAGJ,MAAO,CACLK,EAAGQ,KAAKC,IAAID,K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KqG,gBAAgBC,GACpCkC,QAAS,KAAQxI,KAAKY,aAAewF,CAAG,GAExCQ,EAAA,OAAKa,MAAM,sBACTb,EAAA,QAAMa,MAAOnB,EAAK9B,WAAa,6CAA+C,qCAC3E8B,EAAKmC,OAEPnC,EAAKoC,SACJ9B,EAAA,QAAMa,MAAM,sCAAsCnB,EAAKoC,UAG1DpC,EAAKqC,YACJ/B,EAAA,OAAKa,MAAO,CAAE,oBAAqB,KAAM,0BAA2BnB,EAAKsC,aAAa,cAAc,QAClGhC,EAAA,OAAKa,MAAM,6BAGR,Q","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{p as o,H as i,h as s,a as r,t as n}from"./index.js";const e=Symbol.for("ds-mo.icon-svg-cache");function c(o,i){return i?`flag:${o}`:`system:${o}`}function t(){const o=globalThis;return o[e]??(o[e]=new Map)}const m={FlagAustria:()=>import("@ds-mo/icons/svg/flags/FlagAustria").then((o=>o.FlagAustria)),FlagBelgium:()=>import("@ds-mo/icons/svg/flags/FlagBelgium").then((o=>o.FlagBelgium)),FlagBulgaria:()=>import("@ds-mo/icons/svg/flags/FlagBulgaria").then((o=>o.FlagBulgaria)),FlagCanada:()=>import("@ds-mo/icons/svg/flags/FlagCanada").then((o=>o.FlagCanada)),FlagCroatia:()=>import("@ds-mo/icons/svg/flags/FlagCroatia").then((o=>o.FlagCroatia)),FlagCyprus:()=>import("@ds-mo/icons/svg/flags/FlagCyprus").then((o=>o.FlagCyprus)),FlagCzechRepublic:()=>import("@ds-mo/icons/svg/flags/FlagCzechRepublic").then((o=>o.FlagCzechRepublic)),FlagDenmark:()=>import("@ds-mo/icons/svg/flags/FlagDenmark").then((o=>o.FlagDenmark)),FlagEU:()=>import("@ds-mo/icons/svg/flags/FlagEU").then((o=>o.FlagEU)),FlagEstonia:()=>import("@ds-mo/icons/svg/flags/FlagEstonia").then((o=>o.FlagEstonia)),FlagFinland:()=>import("@ds-mo/icons/svg/flags/FlagFinland").then((o=>o.FlagFinland)),FlagFrance:()=>import("@ds-mo/icons/svg/flags/FlagFrance").then((o=>o.FlagFrance)),FlagGermany:()=>import("@ds-mo/icons/svg/flags/FlagGermany").then((o=>o.FlagGermany)),FlagGreece:()=>import("@ds-mo/icons/svg/flags/FlagGreece").then((o=>o.FlagGreece)),FlagHungary:()=>import("@ds-mo/icons/svg/flags/FlagHungary").then((o=>o.FlagHungary)),FlagIreland:()=>import("@ds-mo/icons/svg/flags/FlagIreland").then((o=>o.FlagIreland)),FlagItaly:()=>import("@ds-mo/icons/svg/flags/FlagItaly").then((o=>o.FlagItaly)),FlagLatvia:()=>import("@ds-mo/icons/svg/flags/FlagLatvia").then((o=>o.FlagLatvia)),FlagLithuania:()=>import("@ds-mo/icons/svg/flags/FlagLithuania").then((o=>o.FlagLithuania)),FlagLuxembourg:()=>import("@ds-mo/icons/svg/flags/FlagLuxembourg").then((o=>o.FlagLuxembourg)),FlagMalta:()=>import("@ds-mo/icons/svg/flags/FlagMalta").then((o=>o.FlagMalta)),FlagMexico:()=>import("@ds-mo/icons/svg/flags/FlagMexico").then((o=>o.FlagMexico)),FlagNetherlands:()=>import("@ds-mo/icons/svg/flags/FlagNetherlands").then((o=>o.FlagNetherlands)),FlagPoland:()=>import("@ds-mo/icons/svg/flags/FlagPoland").then((o=>o.FlagPoland)),FlagPortugal:()=>import("@ds-mo/icons/svg/flags/FlagPortugal").then((o=>o.FlagPortugal)),FlagRomania:()=>import("@ds-mo/icons/svg/flags/FlagRomania").then((o=>o.FlagRomania)),FlagSlovakia:()=>import("@ds-mo/icons/svg/flags/FlagSlovakia").then((o=>o.FlagSlovakia)),FlagSlovenia:()=>import("@ds-mo/icons/svg/flags/FlagSlovenia").then((o=>o.FlagSlovenia)),FlagSpain:()=>import("@ds-mo/icons/svg/flags/FlagSpain").then((o=>o.FlagSpain)),FlagSweden:()=>import("@ds-mo/icons/svg/flags/FlagSweden").then((o=>o.FlagSweden)),FlagUnitedKingdom:()=>import("@ds-mo/icons/svg/flags/FlagUnitedKingdom").then((o=>o.FlagUnitedKingdom)),FlagUnitedStates:()=>import("@ds-mo/icons/svg/flags/FlagUnitedStates").then((o=>o.FlagUnitedStates))};const l={AI:()=>import("@ds-mo/icons/svg/AI").then((o=>o.AI)),AIChip:()=>import("@ds-mo/icons/svg/AIChip").then((o=>o.AIChip)),AINew:()=>import("@ds-mo/icons/svg/AINew").then((o=>o.AINew)),AISparkle:()=>import("@ds-mo/icons/svg/AISparkle").then((o=>o.AISparkle)),AUX:()=>import("@ds-mo/icons/svg/AUX").then((o=>o.AUX)),AUXFilled:()=>import("@ds-mo/icons/svg/AUXFilled").then((o=>o.AUXFilled)),AndroidFilled:()=>import("@ds-mo/icons/svg/AndroidFilled").then((o=>o.AndroidFilled)),ArrowDown:()=>import("@ds-mo/icons/svg/ArrowDown").then((o=>o.ArrowDown)),ArrowLeft:()=>import("@ds-mo/icons/svg/ArrowLeft").then((o=>o.ArrowLeft)),ArrowPath:()=>import("@ds-mo/icons/svg/ArrowPath").then((o=>o.ArrowPath)),ArrowRight:()=>import("@ds-mo/icons/svg/ArrowRight").then((o=>o.ArrowRight)),ArrowUp:()=>import("@ds-mo/icons/svg/ArrowUp").then((o=>o.ArrowUp)),ArrowsDiagonal:()=>import("@ds-mo/icons/svg/ArrowsDiagonal").then((o=>o.ArrowsDiagonal)),ArrowsDiff:()=>import("@ds-mo/icons/svg/ArrowsDiff").then((o=>o.ArrowsDiff)),ArrowsDiffDisabled:()=>import("@ds-mo/icons/svg/ArrowsDiffDisabled").then((o=>o.ArrowsDiffDisabled)),ArrowsVertical:()=>import("@ds-mo/icons/svg/ArrowsVertical").then((o=>o.ArrowsVertical)),AtSign:()=>import("@ds-mo/icons/svg/AtSign").then((o=>o.AtSign)),Avatar:()=>import("@ds-mo/icons/svg/Avatar").then((o=>o.Avatar)),BackslashBrackets:()=>import("@ds-mo/icons/svg/BackslashBrackets").then((o=>o.BackslashBrackets)),BatteryCharging:()=>import("@ds-mo/icons/svg/BatteryCharging").then((o=>o.BatteryCharging)),BatteryEmpty:()=>import("@ds-mo/icons/svg/BatteryEmpty").then((o=>o.BatteryEmpty)),BatteryFull:()=>import("@ds-mo/icons/svg/BatteryFull").then((o=>o.BatteryFull)),BatteryHalf:()=>import("@ds-mo/icons/svg/BatteryHalf").then((o=>o.BatteryHalf)),BatteryLow:()=>import("@ds-mo/icons/svg/BatteryLow").then((o=>o.BatteryLow)),Beaker:()=>import("@ds-mo/icons/svg/Beaker").then((o=>o.Beaker)),Bell:()=>import("@ds-mo/icons/svg/Bell").then((o=>o.Bell)),BellCircle:()=>import("@ds-mo/icons/svg/BellCircle").then((o=>o.BellCircle)),BellExclamation:()=>import("@ds-mo/icons/svg/BellExclamation").then((o=>o.BellExclamation)),BellFilled:()=>import("@ds-mo/icons/svg/BellFilled").then((o=>o.BellFilled)),BellRinging:()=>import("@ds-mo/icons/svg/BellRinging").then((o=>o.BellRinging)),BellWifi:()=>import("@ds-mo/icons/svg/BellWifi").then((o=>o.BellWifi)),BlackWhite:()=>import("@ds-mo/icons/svg/BlackWhite").then((o=>o.BlackWhite)),BlankUI:()=>import("@ds-mo/icons/svg/BlankUI").then((o=>o.BlankUI)),Bluetooth:()=>import("@ds-mo/icons/svg/Bluetooth").then((o=>o.Bluetooth)),Bolt:()=>import("@ds-mo/icons/svg/Bolt").then((o=>o.Bolt)),BoltFilled:()=>import("@ds-mo/icons/svg/BoltFilled").then((o=>o.BoltFilled)),Bookmark:()=>import("@ds-mo/icons/svg/Bookmark").then((o=>o.Bookmark)),Box:()=>import("@ds-mo/icons/svg/Box").then((o=>o.Box)),Braces:()=>import("@ds-mo/icons/svg/Braces").then((o=>o.Braces)),Bug:()=>import("@ds-mo/icons/svg/Bug").then((o=>o.Bug)),BuildingFacility:()=>import("@ds-mo/icons/svg/BuildingFacility").then((o=>o.BuildingFacility)),BuildingHome:()=>import("@ds-mo/icons/svg/BuildingHome").then((o=>o.BuildingHome)),BuildingOffice:()=>import("@ds-mo/icons/svg/BuildingOffice").then((o=>o.BuildingOffice)),BuildingPublic:()=>import("@ds-mo/icons/svg/BuildingPublic").then((o=>o.BuildingPublic)),BuildingShop:()=>import("@ds-mo/icons/svg/BuildingShop").then((o=>o.BuildingShop)),Bulb:()=>import("@ds-mo/icons/svg/Bulb").then((o=>o.Bulb)),Calculator:()=>import("@ds-mo/icons/svg/Calculator").then((o=>o.Calculator)),Calendar:()=>import("@ds-mo/icons/svg/Calendar").then((o=>o.Calendar)),CalendarClock:()=>import("@ds-mo/icons/svg/CalendarClock").then((o=>o.CalendarClock)),CameraA:()=>import("@ds-mo/icons/svg/CameraA").then((o=>o.CameraA)),CameraB:()=>import("@ds-mo/icons/svg/CameraB").then((o=>o.CameraB)),Card:()=>import("@ds-mo/icons/svg/Card").then((o=>o.Card)),CardPerson:()=>import("@ds-mo/icons/svg/CardPerson").then((o=>o.CardPerson)),Cart:()=>import("@ds-mo/icons/svg/Cart").then((o=>o.Cart)),Chart:()=>import("@ds-mo/icons/svg/Chart").then((o=>o.Chart)),Check:()=>import("@ds-mo/icons/svg/Check").then((o=>o.Check)),CheckCircle:()=>import("@ds-mo/icons/svg/CheckCircle").then((o=>o.CheckCircle)),CheckCircleFilled:()=>import("@ds-mo/icons/svg/CheckCircleFilled").then((o=>o.CheckCircleFilled)),CheckDouble:()=>import("@ds-mo/icons/svg/CheckDouble").then((o=>o.CheckDouble)),ChevronDown:()=>import("@ds-mo/icons/svg/ChevronDown").then((o=>o.ChevronDown)),ChevronLeft:()=>import("@ds-mo/icons/svg/ChevronLeft").then((o=>o.ChevronLeft)),ChevronLeftDouble:()=>import("@ds-mo/icons/svg/ChevronLeftDouble").then((o=>o.ChevronLeftDouble)),ChevronRight:()=>import("@ds-mo/icons/svg/ChevronRight").then((o=>o.ChevronRight)),ChevronRightDouble:()=>import("@ds-mo/icons/svg/ChevronRightDouble").then((o=>o.ChevronRightDouble)),ChevronUp:()=>import("@ds-mo/icons/svg/ChevronUp").then((o=>o.ChevronUp)),ChevronUpDown:()=>import("@ds-mo/icons/svg/ChevronUpDown").then((o=>o.ChevronUpDown)),Circle:()=>import("@ds-mo/icons/svg/Circle").then((o=>o.Circle)),CircleArrow:()=>import("@ds-mo/icons/svg/CircleArrow").then((o=>o.CircleArrow)),CircleArrowsDiff:()=>import("@ds-mo/icons/svg/CircleArrowsDiff").then((o=>o.CircleArrowsDiff)),CircleArrowsDiffDisabled:()=>import("@ds-mo/icons/svg/CircleArrowsDiffDisabled").then((o=>o.CircleArrowsDiffDisabled)),CircleConcentricFilled:()=>import("@ds-mo/icons/svg/CircleConcentricFilled").then((o=>o.CircleConcentricFilled)),CircleConcentricThree:()=>import("@ds-mo/icons/svg/CircleConcentricThree").then((o=>o.CircleConcentricThree)),CircleConcentricTwo:()=>import("@ds-mo/icons/svg/CircleConcentricTwo").then((o=>o.CircleConcentricTwo)),CircleExclamation:()=>import("@ds-mo/icons/svg/CircleExclamation").then((o=>o.CircleExclamation)),CircleExclamationFilled:()=>import("@ds-mo/icons/svg/CircleExclamationFilled").then((o=>o.CircleExclamationFilled)),CircleFastForward:()=>import("@ds-mo/icons/svg/CircleFastForward").then((o=>o.CircleFastForward)),CircleFilled:()=>import("@ds-mo/icons/svg/CircleFilled").then((o=>o.CircleFilled)),CircleGrid:()=>import("@ds-mo/icons/svg/CircleGrid").then((o=>o.CircleGrid)),CirclePlay:()=>import("@ds-mo/icons/svg/CirclePlay").then((o=>o.CirclePlay)),CircleQuestion:()=>import("@ds-mo/icons/svg/CircleQuestion").then((o=>o.CircleQuestion)),CircleSlash:()=>import("@ds-mo/icons/svg/CircleSlash").then((o=>o.CircleSlash)),Clipboard:()=>import("@ds-mo/icons/svg/Clipboard").then((o=>o.Clipboard)),ClipboardCheck:()=>import("@ds-mo/icons/svg/ClipboardCheck").then((o=>o.ClipboardCheck)),Clock:()=>import("@ds-mo/icons/svg/Clock").then((o=>o.Clock)),ClockDefer:()=>import("@ds-mo/icons/svg/ClockDefer").then((o=>o.ClockDefer)),ClockFilled:()=>import("@ds-mo/icons/svg/ClockFilled").then((o=>o.ClockFilled)),ClockSixteenHour:()=>import("@ds-mo/icons/svg/ClockSixteenHour").then((o=>o.ClockSixteenHour)),Cloud:()=>import("@ds-mo/icons/svg/Cloud").then((o=>o.Cloud)),CloudEllipses:()=>import("@ds-mo/icons/svg/CloudEllipses").then((o=>o.CloudEllipses)),CloudLightning:()=>import("@ds-mo/icons/svg/CloudLightning").then((o=>o.CloudLightning)),CloudRain:()=>import("@ds-mo/icons/svg/CloudRain").then((o=>o.CloudRain)),CloudRainSun:()=>import("@ds-mo/icons/svg/CloudRainSun").then((o=>o.CloudRainSun)),CloudSun:()=>import("@ds-mo/icons/svg/CloudSun").then((o=>o.CloudSun)),CloudWind:()=>import("@ds-mo/icons/svg/CloudWind").then((o=>o.CloudWind)),Cluster:()=>import("@ds-mo/icons/svg/Cluster").then((o=>o.Cluster)),Coin:()=>import("@ds-mo/icons/svg/Coin").then((o=>o.Coin)),CoinStack:()=>import("@ds-mo/icons/svg/CoinStack").then((o=>o.CoinStack)),CoinStackGeneral:()=>import("@ds-mo/icons/svg/CoinStackGeneral").then((o=>o.CoinStackGeneral)),Compass:()=>import("@ds-mo/icons/svg/Compass").then((o=>o.Compass)),Copy:()=>import("@ds-mo/icons/svg/Copy").then((o=>o.Copy)),Crop:()=>import("@ds-mo/icons/svg/Crop").then((o=>o.Crop)),Cross:()=>import("@ds-mo/icons/svg/Cross").then((o=>o.Cross)),CrossCircle:()=>import("@ds-mo/icons/svg/CrossCircle").then((o=>o.CrossCircle)),CrossCircleFilled:()=>import("@ds-mo/icons/svg/CrossCircleFilled").then((o=>o.CrossCircleFilled)),Cube:()=>import("@ds-mo/icons/svg/Cube").then((o=>o.Cube)),Cup:()=>import("@ds-mo/icons/svg/Cup").then((o=>o.Cup)),CursorPointer:()=>import("@ds-mo/icons/svg/CursorPointer").then((o=>o.CursorPointer)),CursorPointerMinus:()=>import("@ds-mo/icons/svg/CursorPointerMinus").then((o=>o.CursorPointerMinus)),CursorPointerPlus:()=>import("@ds-mo/icons/svg/CursorPointerPlus").then((o=>o.CursorPointerPlus)),Dashboard:()=>import("@ds-mo/icons/svg/Dashboard").then((o=>o.Dashboard)),DeviceAIDashcamPlus:()=>import("@ds-mo/icons/svg/DeviceAIDashcamPlus").then((o=>o.DeviceAIDashcamPlus)),DeviceAssetTracker:()=>import("@ds-mo/icons/svg/DeviceAssetTracker").then((o=>o.DeviceAssetTracker)),DeviceDVR:()=>import("@ds-mo/icons/svg/DeviceDVR").then((o=>o.DeviceDVR)),DeviceDashcam:()=>import("@ds-mo/icons/svg/DeviceDashcam").then((o=>o.DeviceDashcam)),DeviceDashcamLiveStream:()=>import("@ds-mo/icons/svg/DeviceDashcamLiveStream").then((o=>o.DeviceDashcamLiveStream)),DeviceDoorSensor:()=>import("@ds-mo/icons/svg/DeviceDoorSensor").then((o=>o.DeviceDoorSensor)),DeviceMobile:()=>import("@ds-mo/icons/svg/DeviceMobile").then((o=>o.DeviceMobile)),DeviceMobileTwo:()=>import("@ds-mo/icons/svg/DeviceMobileTwo").then((o=>o.DeviceMobileTwo)),DeviceOmnicam:()=>import("@ds-mo/icons/svg/DeviceOmnicam").then((o=>o.DeviceOmnicam)),DeviceSensor:()=>import("@ds-mo/icons/svg/DeviceSensor").then((o=>o.DeviceSensor)),DeviceTablet:()=>import("@ds-mo/icons/svg/DeviceTablet").then((o=>o.DeviceTablet)),DeviceVehicleGateway:()=>import("@ds-mo/icons/svg/DeviceVehicleGateway").then((o=>o.DeviceVehicleGateway)),Devices:()=>import("@ds-mo/icons/svg/Devices").then((o=>o.Devices)),Document:()=>import("@ds-mo/icons/svg/Document").then((o=>o.Document)),DocumentArrow:()=>import("@ds-mo/icons/svg/DocumentArrow").then((o=>o.DocumentArrow)),DocumentChart:()=>import("@ds-mo/icons/svg/DocumentChart").then((o=>o.DocumentChart)),DocumentDollar:()=>import("@ds-mo/icons/svg/DocumentDollar").then((o=>o.DocumentDollar)),DocumentGear:()=>import("@ds-mo/icons/svg/DocumentGear").then((o=>o.DocumentGear)),DocumentInverted:()=>import("@ds-mo/icons/svg/DocumentInverted").then((o=>o.DocumentInverted)),DocumentPencil:()=>import("@ds-mo/icons/svg/DocumentPencil").then((o=>o.DocumentPencil)),DocumentPlus:()=>import("@ds-mo/icons/svg/DocumentPlus").then((o=>o.DocumentPlus)),DocumentQuestion:()=>import("@ds-mo/icons/svg/DocumentQuestion").then((o=>o.DocumentQuestion)),DocumentReceipt:()=>import("@ds-mo/icons/svg/DocumentReceipt").then((o=>o.DocumentReceipt)),DocumentStacked:()=>import("@ds-mo/icons/svg/DocumentStacked").then((o=>o.DocumentStacked)),Dot:()=>import("@ds-mo/icons/svg/Dot").then((o=>o.Dot)),DotFilled:()=>import("@ds-mo/icons/svg/DotFilled").then((o=>o.DotFilled)),DotPath:()=>import("@ds-mo/icons/svg/DotPath").then((o=>o.DotPath)),Download:()=>import("@ds-mo/icons/svg/Download").then((o=>o.Download)),Drag:()=>import("@ds-mo/icons/svg/Drag").then((o=>o.Drag)),Ellipses:()=>import("@ds-mo/icons/svg/Ellipses").then((o=>o.Ellipses)),Email:()=>import("@ds-mo/icons/svg/Email").then((o=>o.Email)),Engine:()=>import("@ds-mo/icons/svg/Engine").then((o=>o.Engine)),Enter:()=>import("@ds-mo/icons/svg/Enter").then((o=>o.Enter)),EntityAsset:()=>import("@ds-mo/icons/svg/EntityAsset").then((o=>o.EntityAsset)),EntityAssetFilled:()=>import("@ds-mo/icons/svg/EntityAssetFilled").then((o=>o.EntityAssetFilled)),EntityDriver:()=>import("@ds-mo/icons/svg/EntityDriver").then((o=>o.EntityDriver)),EntityDriverFilled:()=>import("@ds-mo/icons/svg/EntityDriverFilled").then((o=>o.EntityDriverFilled)),EntityTravelGroup:()=>import("@ds-mo/icons/svg/EntityTravelGroup").then((o=>o.EntityTravelGroup)),EntityTravelGroupFilled:()=>import("@ds-mo/icons/svg/EntityTravelGroupFilled").then((o=>o.EntityTravelGroupFilled)),EntityVehicle:()=>import("@ds-mo/icons/svg/EntityVehicle").then((o=>o.EntityVehicle)),EntityVehicleCharging:()=>import("@ds-mo/icons/svg/EntityVehicleCharging").then((o=>o.EntityVehicleCharging)),EntityVehicleChargingFilled:()=>import("@ds-mo/icons/svg/EntityVehicleChargingFilled").then((o=>o.EntityVehicleChargingFilled)),EntityVehicleFilled:()=>import("@ds-mo/icons/svg/EntityVehicleFilled").then((o=>o.EntityVehicleFilled)),EntityVehicleImmobilized:()=>import("@ds-mo/icons/svg/EntityVehicleImmobilized").then((o=>o.EntityVehicleImmobilized)),EntityVehicleImmobilizedFilled:()=>import("@ds-mo/icons/svg/EntityVehicleImmobilizedFilled").then((o=>o.EntityVehicleImmobilizedFilled)),ErrorTriangle:()=>import("@ds-mo/icons/svg/ErrorTriangle").then((o=>o.ErrorTriangle)),ErrorTriangleFilled:()=>import("@ds-mo/icons/svg/ErrorTriangleFilled").then((o=>o.ErrorTriangleFilled)),ErrorTriangleSimpleFilled:()=>import("@ds-mo/icons/svg/ErrorTriangleSimpleFilled").then((o=>o.ErrorTriangleSimpleFilled)),Export:()=>import("@ds-mo/icons/svg/Export").then((o=>o.Export)),ExternalLink:()=>import("@ds-mo/icons/svg/ExternalLink").then((o=>o.ExternalLink)),Eye:()=>import("@ds-mo/icons/svg/Eye").then((o=>o.Eye)),EyeDisabled:()=>import("@ds-mo/icons/svg/EyeDisabled").then((o=>o.EyeDisabled)),EyeLock:()=>import("@ds-mo/icons/svg/EyeLock").then((o=>o.EyeLock)),FastForward:()=>import("@ds-mo/icons/svg/FastForward").then((o=>o.FastForward)),FastForwardSkip:()=>import("@ds-mo/icons/svg/FastForwardSkip").then((o=>o.FastForwardSkip)),Filters:()=>import("@ds-mo/icons/svg/Filters").then((o=>o.Filters)),FitToScreen:()=>import("@ds-mo/icons/svg/FitToScreen").then((o=>o.FitToScreen)),Flag:()=>import("@ds-mo/icons/svg/Flag").then((o=>o.Flag)),FlagFilled:()=>import("@ds-mo/icons/svg/FlagFilled").then((o=>o.FlagFilled)),FloppyDisk:()=>import("@ds-mo/icons/svg/FloppyDisk").then((o=>o.FloppyDisk)),Folder:()=>import("@ds-mo/icons/svg/Folder").then((o=>o.Folder)),FolderFilled:()=>import("@ds-mo/icons/svg/FolderFilled").then((o=>o.FolderFilled)),FuelPump:()=>import("@ds-mo/icons/svg/FuelPump").then((o=>o.FuelPump)),FullScreen:()=>import("@ds-mo/icons/svg/FullScreen").then((o=>o.FullScreen)),FullScreenExit:()=>import("@ds-mo/icons/svg/FullScreenExit").then((o=>o.FullScreenExit)),Gauge:()=>import("@ds-mo/icons/svg/Gauge").then((o=>o.Gauge)),GaugeTemperature:()=>import("@ds-mo/icons/svg/GaugeTemperature").then((o=>o.GaugeTemperature)),Gear:()=>import("@ds-mo/icons/svg/Gear").then((o=>o.Gear)),GearCheck:()=>import("@ds-mo/icons/svg/GearCheck").then((o=>o.GearCheck)),Geofence:()=>import("@ds-mo/icons/svg/Geofence").then((o=>o.Geofence)),GeofenceCircle:()=>import("@ds-mo/icons/svg/GeofenceCircle").then((o=>o.GeofenceCircle)),GeofenceDiamond:()=>import("@ds-mo/icons/svg/GeofenceDiamond").then((o=>o.GeofenceDiamond)),GeofenceSquare:()=>import("@ds-mo/icons/svg/GeofenceSquare").then((o=>o.GeofenceSquare)),GlobeNetwork:()=>import("@ds-mo/icons/svg/GlobeNetwork").then((o=>o.GlobeNetwork)),GlobeWorldMap:()=>import("@ds-mo/icons/svg/GlobeWorldMap").then((o=>o.GlobeWorldMap)),Graph:()=>import("@ds-mo/icons/svg/Graph").then((o=>o.Graph)),GraphArrow:()=>import("@ds-mo/icons/svg/GraphArrow").then((o=>o.GraphArrow)),GraphBars:()=>import("@ds-mo/icons/svg/GraphBars").then((o=>o.GraphBars)),GraphDecreasing:()=>import("@ds-mo/icons/svg/GraphDecreasing").then((o=>o.GraphDecreasing)),GraphIncreasing:()=>import("@ds-mo/icons/svg/GraphIncreasing").then((o=>o.GraphIncreasing)),GroupBy:()=>import("@ds-mo/icons/svg/GroupBy").then((o=>o.GroupBy)),Hamburger:()=>import("@ds-mo/icons/svg/Hamburger").then((o=>o.Hamburger)),HandOpen:()=>import("@ds-mo/icons/svg/HandOpen").then((o=>o.HandOpen)),Headset:()=>import("@ds-mo/icons/svg/Headset").then((o=>o.Headset)),History:()=>import("@ds-mo/icons/svg/History").then((o=>o.History)),HourGlass:()=>import("@ds-mo/icons/svg/HourGlass").then((o=>o.HourGlass)),Image:()=>import("@ds-mo/icons/svg/Image").then((o=>o.Image)),Import:()=>import("@ds-mo/icons/svg/Import").then((o=>o.Import)),ImportClock:()=>import("@ds-mo/icons/svg/ImportClock").then((o=>o.ImportClock)),Inbox:()=>import("@ds-mo/icons/svg/Inbox").then((o=>o.Inbox)),IosFilled:()=>import("@ds-mo/icons/svg/IosFilled").then((o=>o.IosFilled)),Jerrycan:()=>import("@ds-mo/icons/svg/Jerrycan").then((o=>o.Jerrycan)),KeyA:()=>import("@ds-mo/icons/svg/KeyA").then((o=>o.KeyA)),KeyB:()=>import("@ds-mo/icons/svg/KeyB").then((o=>o.KeyB)),KeyCmd:()=>import("@ds-mo/icons/svg/KeyCmd").then((o=>o.KeyCmd)),KeyShift:()=>import("@ds-mo/icons/svg/KeyShift").then((o=>o.KeyShift)),LED:()=>import("@ds-mo/icons/svg/LED").then((o=>o.LED)),Layers:()=>import("@ds-mo/icons/svg/Layers").then((o=>o.Layers)),Leaf:()=>import("@ds-mo/icons/svg/Leaf").then((o=>o.Leaf)),LeftCollapse:()=>import("@ds-mo/icons/svg/LeftCollapse").then((o=>o.LeftCollapse)),LeftCollapseB:()=>import("@ds-mo/icons/svg/LeftCollapseB").then((o=>o.LeftCollapseB)),LeftExpand:()=>import("@ds-mo/icons/svg/LeftExpand").then((o=>o.LeftExpand)),LeftExpandB:()=>import("@ds-mo/icons/svg/LeftExpandB").then((o=>o.LeftExpandB)),LeftTurnSignal:()=>import("@ds-mo/icons/svg/LeftTurnSignal").then((o=>o.LeftTurnSignal)),LetterB:()=>import("@ds-mo/icons/svg/LetterB").then((o=>o.LetterB)),LetterC:()=>import("@ds-mo/icons/svg/LetterC").then((o=>o.LetterC)),LetterI:()=>import("@ds-mo/icons/svg/LetterI").then((o=>o.LetterI)),License:()=>import("@ds-mo/icons/svg/License").then((o=>o.License)),LicensePlate:()=>import("@ds-mo/icons/svg/LicensePlate").then((o=>o.LicensePlate)),Lifebuoy:()=>import("@ds-mo/icons/svg/Lifebuoy").then((o=>o.Lifebuoy)),Link:()=>import("@ds-mo/icons/svg/Link").then((o=>o.Link)),List:()=>import("@ds-mo/icons/svg/List").then((o=>o.List)),Loads:()=>import("@ds-mo/icons/svg/Loads").then((o=>o.Loads)),LocationPin:()=>import("@ds-mo/icons/svg/LocationPin").then((o=>o.LocationPin)),LocationPinArrows:()=>import("@ds-mo/icons/svg/LocationPinArrows").then((o=>o.LocationPinArrows)),LocationPinDisabled:()=>import("@ds-mo/icons/svg/LocationPinDisabled").then((o=>o.LocationPinDisabled)),LocationPinDollar:()=>import("@ds-mo/icons/svg/LocationPinDollar").then((o=>o.LocationPinDollar)),LockClosed:()=>import("@ds-mo/icons/svg/LockClosed").then((o=>o.LockClosed)),LockClosedFilled:()=>import("@ds-mo/icons/svg/LockClosedFilled").then((o=>o.LockClosedFilled)),LockOpen:()=>import("@ds-mo/icons/svg/LockOpen").then((o=>o.LockOpen)),Logout:()=>import("@ds-mo/icons/svg/Logout").then((o=>o.Logout)),Logs:()=>import("@ds-mo/icons/svg/Logs").then((o=>o.Logs)),LogsMagnifyingGlass:()=>import("@ds-mo/icons/svg/LogsMagnifyingGlass").then((o=>o.LogsMagnifyingGlass)),MagnifyingGlass:()=>import("@ds-mo/icons/svg/MagnifyingGlass").then((o=>o.MagnifyingGlass)),MagnifyingGlassGraph:()=>import("@ds-mo/icons/svg/MagnifyingGlassGraph").then((o=>o.MagnifyingGlassGraph)),MagnifyingGlassZoomIn:()=>import("@ds-mo/icons/svg/MagnifyingGlassZoomIn").then((o=>o.MagnifyingGlassZoomIn)),MagnifyingGlassZoomOut:()=>import("@ds-mo/icons/svg/MagnifyingGlassZoomOut").then((o=>o.MagnifyingGlassZoomOut)),MapNavigation:()=>import("@ds-mo/icons/svg/MapNavigation").then((o=>o.MapNavigation)),MapPage:()=>import("@ds-mo/icons/svg/MapPage").then((o=>o.MapPage)),MapPin:()=>import("@ds-mo/icons/svg/MapPin").then((o=>o.MapPin)),MarkRead:()=>import("@ds-mo/icons/svg/MarkRead").then((o=>o.MarkRead)),Match:()=>import("@ds-mo/icons/svg/Match").then((o=>o.Match)),MessageBubble:()=>import("@ds-mo/icons/svg/MessageBubble").then((o=>o.MessageBubble)),MessageBubbleStack:()=>import("@ds-mo/icons/svg/MessageBubbleStack").then((o=>o.MessageBubbleStack)),Messaging:()=>import("@ds-mo/icons/svg/Messaging").then((o=>o.Messaging)),Mic:()=>import("@ds-mo/icons/svg/Mic").then((o=>o.Mic)),MicMute:()=>import("@ds-mo/icons/svg/MicMute").then((o=>o.MicMute)),Minimize:()=>import("@ds-mo/icons/svg/Minimize").then((o=>o.Minimize)),Monitor:()=>import("@ds-mo/icons/svg/Monitor").then((o=>o.Monitor)),Notification:()=>import("@ds-mo/icons/svg/Notification").then((o=>o.Notification)),NumberTen:()=>import("@ds-mo/icons/svg/NumberTen").then((o=>o.NumberTen)),OctagonSubtract:()=>import("@ds-mo/icons/svg/OctagonSubtract").then((o=>o.OctagonSubtract)),Odometer:()=>import("@ds-mo/icons/svg/Odometer").then((o=>o.Odometer)),OverviewAI:()=>import("@ds-mo/icons/svg/OverviewAI").then((o=>o.OverviewAI)),PanelCollapse:()=>import("@ds-mo/icons/svg/PanelCollapse").then((o=>o.PanelCollapse)),PanelExpand:()=>import("@ds-mo/icons/svg/PanelExpand").then((o=>o.PanelExpand)),Paperclip:()=>import("@ds-mo/icons/svg/Paperclip").then((o=>o.Paperclip)),PaperplaneSend:()=>import("@ds-mo/icons/svg/PaperplaneSend").then((o=>o.PaperplaneSend)),Paragraph:()=>import("@ds-mo/icons/svg/Paragraph").then((o=>o.Paragraph)),ParagraphCheck:()=>import("@ds-mo/icons/svg/ParagraphCheck").then((o=>o.ParagraphCheck)),ParagraphPencil:()=>import("@ds-mo/icons/svg/ParagraphPencil").then((o=>o.ParagraphPencil)),Pause:()=>import("@ds-mo/icons/svg/Pause").then((o=>o.Pause)),PauseFilled:()=>import("@ds-mo/icons/svg/PauseFilled").then((o=>o.PauseFilled)),Pencil:()=>import("@ds-mo/icons/svg/Pencil").then((o=>o.Pencil)),PencilSquiggle:()=>import("@ds-mo/icons/svg/PencilSquiggle").then((o=>o.PencilSquiggle)),Person:()=>import("@ds-mo/icons/svg/Person").then((o=>o.Person)),PersonAt:()=>import("@ds-mo/icons/svg/PersonAt").then((o=>o.PersonAt)),PersonConnect:()=>import("@ds-mo/icons/svg/PersonConnect").then((o=>o.PersonConnect)),PersonFrame:()=>import("@ds-mo/icons/svg/PersonFrame").then((o=>o.PersonFrame)),PersonGear:()=>import("@ds-mo/icons/svg/PersonGear").then((o=>o.PersonGear)),PersonGroup:()=>import("@ds-mo/icons/svg/PersonGroup").then((o=>o.PersonGroup)),PersonGroupArrows:()=>import("@ds-mo/icons/svg/PersonGroupArrows").then((o=>o.PersonGroupArrows)),PersonManager:()=>import("@ds-mo/icons/svg/PersonManager").then((o=>o.PersonManager)),PersonShield:()=>import("@ds-mo/icons/svg/PersonShield").then((o=>o.PersonShield)),PersonStar:()=>import("@ds-mo/icons/svg/PersonStar").then((o=>o.PersonStar)),Phone:()=>import("@ds-mo/icons/svg/Phone").then((o=>o.Phone)),PhoneDisconnect:()=>import("@ds-mo/icons/svg/PhoneDisconnect").then((o=>o.PhoneDisconnect)),PicmanFilled:()=>import("@ds-mo/icons/svg/PicmanFilled").then((o=>o.PicmanFilled)),Pin:()=>import("@ds-mo/icons/svg/Pin").then((o=>o.Pin)),PipBottomLeft:()=>import("@ds-mo/icons/svg/PipBottomLeft").then((o=>o.PipBottomLeft)),PipBottomRight:()=>import("@ds-mo/icons/svg/PipBottomRight").then((o=>o.PipBottomRight)),PipTopLeft:()=>import("@ds-mo/icons/svg/PipTopLeft").then((o=>o.PipTopLeft)),PipTopRight:()=>import("@ds-mo/icons/svg/PipTopRight").then((o=>o.PipTopRight)),Play:()=>import("@ds-mo/icons/svg/Play").then((o=>o.Play)),PlayFilled:()=>import("@ds-mo/icons/svg/PlayFilled").then((o=>o.PlayFilled)),Plug:()=>import("@ds-mo/icons/svg/Plug").then((o=>o.Plug)),Plus:()=>import("@ds-mo/icons/svg/Plus").then((o=>o.Plus)),PlusCircle:()=>import("@ds-mo/icons/svg/PlusCircle").then((o=>o.PlusCircle)),Preferences:()=>import("@ds-mo/icons/svg/Preferences").then((o=>o.Preferences)),Printer:()=>import("@ds-mo/icons/svg/Printer").then((o=>o.Printer)),PunchCard:()=>import("@ds-mo/icons/svg/PunchCard").then((o=>o.PunchCard)),Puzzle:()=>import("@ds-mo/icons/svg/Puzzle").then((o=>o.Puzzle)),PuzzleJoined:()=>import("@ds-mo/icons/svg/PuzzleJoined").then((o=>o.PuzzleJoined)),Redo:()=>import("@ds-mo/icons/svg/Redo").then((o=>o.Redo)),Refresh:()=>import("@ds-mo/icons/svg/Refresh").then((o=>o.Refresh)),Restore:()=>import("@ds-mo/icons/svg/Restore").then((o=>o.Restore)),RewardRibbon:()=>import("@ds-mo/icons/svg/RewardRibbon").then((o=>o.RewardRibbon)),Rewind:()=>import("@ds-mo/icons/svg/Rewind").then((o=>o.Rewind)),RewindSkip:()=>import("@ds-mo/icons/svg/RewindSkip").then((o=>o.RewindSkip)),RewindSkipFilled:()=>import("@ds-mo/icons/svg/RewindSkipFilled").then((o=>o.RewindSkipFilled)),RightCollapse:()=>import("@ds-mo/icons/svg/RightCollapse").then((o=>o.RightCollapse)),RightCollapseB:()=>import("@ds-mo/icons/svg/RightCollapseB").then((o=>o.RightCollapseB)),RightExpand:()=>import("@ds-mo/icons/svg/RightExpand").then((o=>o.RightExpand)),RightExpandB:()=>import("@ds-mo/icons/svg/RightExpandB").then((o=>o.RightExpandB)),RightTurnSignal:()=>import("@ds-mo/icons/svg/RightTurnSignal").then((o=>o.RightTurnSignal)),Rotate:()=>import("@ds-mo/icons/svg/Rotate").then((o=>o.Rotate)),Satellite:()=>import("@ds-mo/icons/svg/Satellite").then((o=>o.Satellite)),Scan:()=>import("@ds-mo/icons/svg/Scan").then((o=>o.Scan)),Scissor:()=>import("@ds-mo/icons/svg/Scissor").then((o=>o.Scissor)),Scope:()=>import("@ds-mo/icons/svg/Scope").then((o=>o.Scope)),Seatbelt:()=>import("@ds-mo/icons/svg/Seatbelt").then((o=>o.Seatbelt)),SeatbeltBuckle:()=>import("@ds-mo/icons/svg/SeatbeltBuckle").then((o=>o.SeatbeltBuckle)),Shapes:()=>import("@ds-mo/icons/svg/Shapes").then((o=>o.Shapes)),ShareCircles:()=>import("@ds-mo/icons/svg/ShareCircles").then((o=>o.ShareCircles)),ShareCirclesFilled:()=>import("@ds-mo/icons/svg/ShareCirclesFilled").then((o=>o.ShareCirclesFilled)),SharePaperplane:()=>import("@ds-mo/icons/svg/SharePaperplane").then((o=>o.SharePaperplane)),Shield:()=>import("@ds-mo/icons/svg/Shield").then((o=>o.Shield)),ShieldCheck:()=>import("@ds-mo/icons/svg/ShieldCheck").then((o=>o.ShieldCheck)),ShieldCheckmarkFilled:()=>import("@ds-mo/icons/svg/ShieldCheckmarkFilled").then((o=>o.ShieldCheckmarkFilled)),ShieldCircle:()=>import("@ds-mo/icons/svg/ShieldCircle").then((o=>o.ShieldCircle)),ShieldCircleFilled:()=>import("@ds-mo/icons/svg/ShieldCircleFilled").then((o=>o.ShieldCircleFilled)),ShieldCross:()=>import("@ds-mo/icons/svg/ShieldCross").then((o=>o.ShieldCross)),ShieldCrossFilled:()=>import("@ds-mo/icons/svg/ShieldCrossFilled").then((o=>o.ShieldCrossFilled)),ShieldFilled:()=>import("@ds-mo/icons/svg/ShieldFilled").then((o=>o.ShieldFilled)),ShieldLock:()=>import("@ds-mo/icons/svg/ShieldLock").then((o=>o.ShieldLock)),ShieldLockFilled:()=>import("@ds-mo/icons/svg/ShieldLockFilled").then((o=>o.ShieldLockFilled)),ShoppingBag:()=>import("@ds-mo/icons/svg/ShoppingBag").then((o=>o.ShoppingBag)),Snowflake:()=>import("@ds-mo/icons/svg/Snowflake").then((o=>o.Snowflake)),SpeakerPhone:()=>import("@ds-mo/icons/svg/SpeakerPhone").then((o=>o.SpeakerPhone)),SpeedometerArrow:()=>import("@ds-mo/icons/svg/SpeedometerArrow").then((o=>o.SpeedometerArrow)),SpeedometerLeft:()=>import("@ds-mo/icons/svg/SpeedometerLeft").then((o=>o.SpeedometerLeft)),SpeedometerRight:()=>import("@ds-mo/icons/svg/SpeedometerRight").then((o=>o.SpeedometerRight)),SpikeCirclePercentage:()=>import("@ds-mo/icons/svg/SpikeCirclePercentage").then((o=>o.SpikeCirclePercentage)),SpikeCirclePercentageFilled:()=>import("@ds-mo/icons/svg/SpikeCirclePercentageFilled").then((o=>o.SpikeCirclePercentageFilled)),Square:()=>import("@ds-mo/icons/svg/Square").then((o=>o.Square)),SquareArrowTopRight:()=>import("@ds-mo/icons/svg/SquareArrowTopRight").then((o=>o.SquareArrowTopRight)),SquareCheck:()=>import("@ds-mo/icons/svg/SquareCheck").then((o=>o.SquareCheck)),SquareCheckFilled:()=>import("@ds-mo/icons/svg/SquareCheckFilled").then((o=>o.SquareCheckFilled)),SquareDollar:()=>import("@ds-mo/icons/svg/SquareDollar").then((o=>o.SquareDollar)),SquareDollarFilled:()=>import("@ds-mo/icons/svg/SquareDollarFilled").then((o=>o.SquareDollarFilled)),SquareDottedMinus:()=>import("@ds-mo/icons/svg/SquareDottedMinus").then((o=>o.SquareDottedMinus)),SquareFilled:()=>import("@ds-mo/icons/svg/SquareFilled").then((o=>o.SquareFilled)),SquareGrid:()=>import("@ds-mo/icons/svg/SquareGrid").then((o=>o.SquareGrid)),SquarePencil:()=>import("@ds-mo/icons/svg/SquarePencil").then((o=>o.SquarePencil)),SquarePlus:()=>import("@ds-mo/icons/svg/SquarePlus").then((o=>o.SquarePlus)),SquareSubtract:()=>import("@ds-mo/icons/svg/SquareSubtract").then((o=>o.SquareSubtract)),SquareSubtractFilled:()=>import("@ds-mo/icons/svg/SquareSubtractFilled").then((o=>o.SquareSubtractFilled)),Star:()=>import("@ds-mo/icons/svg/Star").then((o=>o.Star)),StarFilled:()=>import("@ds-mo/icons/svg/StarFilled").then((o=>o.StarFilled)),Stopwatch:()=>import("@ds-mo/icons/svg/Stopwatch").then((o=>o.Stopwatch)),Street:()=>import("@ds-mo/icons/svg/Street").then((o=>o.Street)),Subtract:()=>import("@ds-mo/icons/svg/Subtract").then((o=>o.Subtract)),SubtractCircle:()=>import("@ds-mo/icons/svg/SubtractCircle").then((o=>o.SubtractCircle)),SubtractCircleFilled:()=>import("@ds-mo/icons/svg/SubtractCircleFilled").then((o=>o.SubtractCircleFilled)),Table:()=>import("@ds-mo/icons/svg/Table").then((o=>o.Table)),Tag:()=>import("@ds-mo/icons/svg/Tag").then((o=>o.Tag)),Target:()=>import("@ds-mo/icons/svg/Target").then((o=>o.Target)),TargetDollar:()=>import("@ds-mo/icons/svg/TargetDollar").then((o=>o.TargetDollar)),Text:()=>import("@ds-mo/icons/svg/Text").then((o=>o.Text)),ThemeDark:()=>import("@ds-mo/icons/svg/ThemeDark").then((o=>o.ThemeDark)),ThemeLight:()=>import("@ds-mo/icons/svg/ThemeLight").then((o=>o.ThemeLight)),ThumbsDown:()=>import("@ds-mo/icons/svg/ThumbsDown").then((o=>o.ThumbsDown)),ThumbsDownFilled:()=>import("@ds-mo/icons/svg/ThumbsDownFilled").then((o=>o.ThumbsDownFilled)),ThumbsUp:()=>import("@ds-mo/icons/svg/ThumbsUp").then((o=>o.ThumbsUp)),ThumbsUpFilled:()=>import("@ds-mo/icons/svg/ThumbsUpFilled").then((o=>o.ThumbsUpFilled)),TirePressure:()=>import("@ds-mo/icons/svg/TirePressure").then((o=>o.TirePressure)),Toggle:()=>import("@ds-mo/icons/svg/Toggle").then((o=>o.Toggle)),TrafficLight:()=>import("@ds-mo/icons/svg/TrafficLight").then((o=>o.TrafficLight)),Trash:()=>import("@ds-mo/icons/svg/Trash").then((o=>o.Trash)),Trophy:()=>import("@ds-mo/icons/svg/Trophy").then((o=>o.Trophy)),TurnSignal:()=>import("@ds-mo/icons/svg/TurnSignal").then((o=>o.TurnSignal)),TurnSignalFilled:()=>import("@ds-mo/icons/svg/TurnSignalFilled").then((o=>o.TurnSignalFilled)),Undo:()=>import("@ds-mo/icons/svg/Undo").then((o=>o.Undo)),Upgrade:()=>import("@ds-mo/icons/svg/Upgrade").then((o=>o.Upgrade)),Upload:()=>import("@ds-mo/icons/svg/Upload").then((o=>o.Upload)),VehicleTrailer:()=>import("@ds-mo/icons/svg/VehicleTrailer").then((o=>o.VehicleTrailer)),VehicleTruck:()=>import("@ds-mo/icons/svg/VehicleTruck").then((o=>o.VehicleTruck)),VehicleTruckMagnifyingGlass:()=>import("@ds-mo/icons/svg/VehicleTruckMagnifyingGlass").then((o=>o.VehicleTruckMagnifyingGlass)),Video:()=>import("@ds-mo/icons/svg/Video").then((o=>o.Video)),ViewMenu:()=>import("@ds-mo/icons/svg/ViewMenu").then((o=>o.ViewMenu)),Volume:()=>import("@ds-mo/icons/svg/Volume").then((o=>o.Volume)),VolumeFilled:()=>import("@ds-mo/icons/svg/VolumeFilled").then((o=>o.VolumeFilled)),VolumeMute:()=>import("@ds-mo/icons/svg/VolumeMute").then((o=>o.VolumeMute)),VolumeMuteFilled:()=>import("@ds-mo/icons/svg/VolumeMuteFilled").then((o=>o.VolumeMuteFilled)),WandSparkle:()=>import("@ds-mo/icons/svg/WandSparkle").then((o=>o.WandSparkle)),Waveform:()=>import("@ds-mo/icons/svg/Waveform").then((o=>o.Waveform)),Webhooks:()=>import("@ds-mo/icons/svg/Webhooks").then((o=>o.Webhooks)),Whistle:()=>import("@ds-mo/icons/svg/Whistle").then((o=>o.Whistle)),WiFiHorizontal:()=>import("@ds-mo/icons/svg/WiFiHorizontal").then((o=>o.WiFiHorizontal)),WiFiTower:()=>import("@ds-mo/icons/svg/WiFiTower").then((o=>o.WiFiTower)),WifiVertical:()=>import("@ds-mo/icons/svg/WifiVertical").then((o=>o.WifiVertical)),WifiVerticalFilled:()=>import("@ds-mo/icons/svg/WifiVerticalFilled").then((o=>o.WifiVerticalFilled)),WifiVerticalFilledDisabled:()=>import("@ds-mo/icons/svg/WifiVerticalFilledDisabled").then((o=>o.WifiVerticalFilledDisabled)),WorkflowA:()=>import("@ds-mo/icons/svg/WorkflowA").then((o=>o.WorkflowA)),WorkflowB:()=>import("@ds-mo/icons/svg/WorkflowB").then((o=>o.WorkflowB)),Wrench:()=>import("@ds-mo/icons/svg/Wrench").then((o=>o.Wrench)),ZoomBackOut:()=>import("@ds-mo/icons/svg/ZoomBackOut").then((o=>o.ZoomBackOut))};const d=new Set(["script","foreignobject","iframe","object","embed","animation"]);function a(o){if(d.has(o.localName.toLowerCase()))return false;for(const i of o.getAttributeNames()){const s=i.toLowerCase();if(s.startsWith("on"))return false;if(s==="href"||s==="xlink:href"){const s=o.getAttribute(i)??"";if(!s.startsWith("#"))return false}}for(let i=0;i<o.children.length;i++){if(!a(o.children[i]))return false}return true}function g(o){return o!=null&&o.localName==="svg"&&a(o)}function p(o){if(typeof DOMParser==="undefined")return null;const i=(new DOMParser).parseFromString(o,"image/svg+xml");if(i.querySelector("parsererror"))return null;const s=i.documentElement;if(!g(s))return null;return i.documentElement}const v=()=>`.icon.sc-ds-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:0;color:var(--color-foreground-primary);width:var(--_icon-sz, var(--dimension-iconography-md));height:var(--_icon-sz, var(--dimension-iconography-md))}.icon__svg.sc-ds-icon{display:contents;line-height:0}.icon--size-xs.sc-ds-icon{--_icon-sz:var(--dimension-iconography-xs)}.icon--size-sm.sc-ds-icon{--_icon-sz:var(--dimension-iconography-sm)}.icon--size-md.sc-ds-icon{--_icon-sz:var(--dimension-iconography-md)}.icon--size-lg.sc-ds-icon{--_icon-sz:var(--dimension-iconography-lg)}.icon--size-xl.sc-ds-icon{--_icon-sz:var(--dimension-iconography-xl)}.icon--size-2xl.sc-ds-icon{--_icon-sz:var(--dimension-iconography-2xl)}.icon--size-3xl.sc-ds-icon{--_icon-sz:var(--dimension-iconography-3xl)}.icon--color-primary.sc-ds-icon{color:var(--color-foreground-primary)}.icon--color-secondary.sc-ds-icon{color:var(--color-foreground-secondary)}.icon--color-tertiary.sc-ds-icon{color:var(--color-foreground-tertiary)}.icon--color-quaternary.sc-ds-icon{color:var(--color-foreground-quaternary)}.icon--color-inherit.sc-ds-icon{color:inherit}.icon--color-brand.sc-ds-icon{color:var(--color-foreground-bold-brand)}.icon--color-negative.sc-ds-icon{color:var(--color-foreground-bold-negative)}.icon--color-positive.sc-ds-icon{color:var(--color-foreground-bold-positive)}.icon--color-warning.sc-ds-icon{color:var(--color-foreground-bold-warning)}.icon--color-caution.sc-ds-icon{color:var(--color-foreground-bold-caution)}.icon--color-ai.sc-ds-icon{color:var(--color-foreground-bold-ai)}.icon--color-guide.sc-ds-icon{color:var(--color-foreground-bold-guide)}.icon--color-neutral.sc-ds-icon{color:var(--color-foreground-bold-neutral)}.icon--color-faint-brand.sc-ds-icon{color:var(--color-foreground-faint-brand)}.icon--color-faint-negative.sc-ds-icon{color:var(--color-foreground-faint-negative)}.icon--color-faint-positive.sc-ds-icon{color:var(--color-foreground-faint-positive)}.icon--color-faint-warning.sc-ds-icon{color:var(--color-foreground-faint-warning)}.icon--color-faint-caution.sc-ds-icon{color:var(--color-foreground-faint-caution)}.icon--color-faint-ai.sc-ds-icon{color:var(--color-foreground-faint-ai)}.icon--color-faint-neutral.sc-ds-icon{color:var(--color-foreground-faint-neutral)}.icon--color-medium-brand.sc-ds-icon{color:var(--color-foreground-medium-brand)}.icon--color-medium-negative.sc-ds-icon{color:var(--color-foreground-medium-negative)}.icon--color-medium-positive.sc-ds-icon{color:var(--color-foreground-medium-positive)}.icon--color-medium-warning.sc-ds-icon{color:var(--color-foreground-medium-warning)}.icon--color-medium-caution.sc-ds-icon{color:var(--color-foreground-medium-caution)}.icon--color-medium-ai.sc-ds-icon{color:var(--color-foreground-medium-ai)}.icon--color-medium-neutral.sc-ds-icon{color:var(--color-foreground-medium-neutral)}.icon--color-bold-brand.sc-ds-icon{color:var(--color-foreground-bold-brand)}.icon--color-bold-negative.sc-ds-icon{color:var(--color-foreground-bold-negative)}.icon--color-bold-positive.sc-ds-icon{color:var(--color-foreground-bold-positive)}.icon--color-bold-warning.sc-ds-icon{color:var(--color-foreground-bold-warning)}.icon--color-bold-caution.sc-ds-icon{color:var(--color-foreground-bold-caution)}.icon--color-bold-ai.sc-ds-icon{color:var(--color-foreground-bold-ai)}.icon--color-bold-neutral.sc-ds-icon{color:var(--color-foreground-bold-neutral)}.icon--color-strong-brand.sc-ds-icon{color:var(--color-foreground-strong-brand)}.icon--color-strong-negative.sc-ds-icon{color:var(--color-foreground-strong-negative)}.icon--color-strong-positive.sc-ds-icon{color:var(--color-foreground-strong-positive)}.icon--color-strong-warning.sc-ds-icon{color:var(--color-foreground-strong-warning)}.icon--color-strong-caution.sc-ds-icon{color:var(--color-foreground-strong-caution)}.icon--color-strong-ai.sc-ds-icon{color:var(--color-foreground-strong-ai)}.icon--color-strong-neutral.sc-ds-icon{color:var(--color-foreground-strong-neutral)}.icon--color-on-strong.sc-ds-icon{color:var(--color-foreground-on-strong-background-primary)}.icon--color-on-bold.sc-ds-icon{color:var(--color-foreground-on-bold-background-primary)}`;const u=o(class o extends i{constructor(o){super();if(o!==false){this.__registerHost()}this.name="";this.size="md";this.flag=false;this.svg="";this.loadToken=0;this.renderedSvg=null}resolveSvg(){const o=this.flag;const i=c(this.name,o);const s=++this.loadToken;const r=t().get(i);if(r!==undefined){this.svg=r;return}const n=o?m:l;const e=Object.prototype.hasOwnProperty.call(n,this.name)?n[this.name]:undefined;if(!e){this.svg="";return}e().then((o=>{t().set(i,o);if(s===this.loadToken)this.svg=o})).catch((()=>{if(s===this.loadToken)this.svg=""}))}componentWillLoad(){this.resolveSvg()}updateSvg(){const o=this.el.querySelector(".icon__svg");if(!o)return;if(this.svg===this.renderedSvg)return;this.renderedSvg=this.svg;const i=this.svg?p(this.svg):null;if(!i){o.replaceChildren();return}i.removeAttribute("width");i.removeAttribute("height");i.setAttribute("focusable","false");i.setAttribute("aria-hidden","true");i.style.display="block";i.style.flexShrink="0";i.style.width="100%";i.style.height="100%";o.replaceChildren(i)}onIconChange(){this.resolveSvg()}componentDidRender(){this.updateSvg()}render(){const o=typeof this.color==="string"&&this.color.startsWith("var(--");const i={icon:true,[`icon--size-${this.size}`]:true,[`icon--color-${this.color}`]:!!this.color&&!o&&this.color!=="inherit","icon--color-inherit":this.color==="inherit"};const n=o?{color:this.color}:undefined;return s(r,{key:"583b537487b016c8895652aa6ef478ddfc8da8ce",style:{display:"inline-flex",alignItems:"center",justifyContent:"center"}},s("span",{key:"b0a3334376b7c5e04c3fd6201557fc8f4063b701",class:i,style:n,role:this.label?"img":"presentation","aria-label":this.label,"aria-hidden":!this.label?"true":undefined},s("span",{key:"2bff8eca624f86fcfb1a9c25ba239f4c0ad94d0b",class:"icon__svg"})))}get el(){return this}static get watchers(){return{name:[{onIconChange:0}],flag:[{onIconChange:0}]}}static get style(){return v()}},[2,"ds-icon",{name:[1],size:[1],color:[1],label:[1],flag:[4],svg:[32]},undefined,{name:[{onIconChange:0}],flag:[{onIconChange:0}]}]);function h(){if(typeof customElements==="undefined"){return}const o=["ds-icon"];o.forEach((o=>{switch(o){case"ds-icon":if(!customElements.get(n(o))){customElements.define(n(o),u)}break}}))}h();export{u as I,h as d};
2
+ //# sourceMappingURL=p-Cynjsv-P.js.map