@ds-mo/ui 14.18.0 → 14.19.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 (281) hide show
  1. package/README.md +7 -0
  2. package/dist/.package-ready.json +1 -1
  3. package/dist/agent-patterns.json +4 -3
  4. package/dist/agent.json +59 -22
  5. package/dist/angular/ds-filter-menu.d.ts +1 -1
  6. package/dist/angular/ds-filter-menu.js +3 -3
  7. package/dist/angular/ds-input.d.ts +1 -1
  8. package/dist/angular/ds-input.js +3 -3
  9. package/dist/angular/ds-menu.d.ts +1 -1
  10. package/dist/angular/ds-menu.js +3 -3
  11. package/dist/angular/ds-pagination.d.ts +1 -1
  12. package/dist/angular/ds-pagination.js +3 -3
  13. package/dist/angular/ds-panel-tool-header.d.ts +3 -8
  14. package/dist/angular/ds-panel-tools.d.ts +3 -8
  15. package/dist/angular/ds-select.d.ts +1 -1
  16. package/dist/angular/ds-select.js +3 -3
  17. package/dist/angular/ds-tooltip.d.ts +1 -1
  18. package/dist/angular/ds-tooltip.js +3 -3
  19. package/dist/components/ds-agent-activity.js +1 -1
  20. package/dist/components/ds-agent-questionnaire.js +1 -1
  21. package/dist/components/ds-agent-response.js +1 -1
  22. package/dist/components/ds-agent-source-list.js +1 -1
  23. package/dist/components/ds-agent-tool-call.js +1 -1
  24. package/dist/components/ds-attachment-list.js +1 -1
  25. package/dist/components/ds-badge.js +1 -1
  26. package/dist/components/ds-banner.js +1 -1
  27. package/dist/components/ds-banner.js.map +1 -1
  28. package/dist/components/ds-bar-action.js +1 -1
  29. package/dist/components/ds-bar-action.js.map +1 -1
  30. package/dist/components/ds-bar-nav.js +1 -1
  31. package/dist/components/ds-bar-title.js +1 -1
  32. package/dist/components/ds-bar-workflow.js +1 -1
  33. package/dist/components/ds-bar-workflow.js.map +1 -1
  34. package/dist/components/ds-breadcrumb.js +1 -1
  35. package/dist/components/ds-button-filled.js +1 -1
  36. package/dist/components/ds-button-unfilled.js +1 -1
  37. package/dist/components/ds-card-chart.js +1 -1
  38. package/dist/components/ds-card-overview.js +1 -1
  39. package/dist/components/ds-card-setting.js +1 -1
  40. package/dist/components/ds-chart-legend.js +1 -1
  41. package/dist/components/ds-chart.js +1 -1
  42. package/dist/components/ds-checkbox.js +1 -1
  43. package/dist/components/ds-chip.js +1 -1
  44. package/dist/components/ds-code-block.js +1 -1
  45. package/dist/components/ds-conversation-list-item.js +1 -1
  46. package/dist/components/ds-conversation-list-section.js +1 -1
  47. package/dist/components/ds-conversation-list.js +1 -1
  48. package/dist/components/ds-conversation-list.js.map +1 -1
  49. package/dist/components/ds-divider.js +1 -1
  50. package/dist/components/ds-empty-state.js +1 -1
  51. package/dist/components/ds-field.js +1 -1
  52. package/dist/components/ds-filter-menu.js +1 -1
  53. package/dist/components/ds-input.js +1 -1
  54. package/dist/components/ds-markdown.js +1 -1
  55. package/dist/components/ds-menu.js +1 -1
  56. package/dist/components/ds-message-actions.js +1 -1
  57. package/dist/components/ds-message-bubble.js +1 -1
  58. package/dist/components/ds-message-composer.js +1 -1
  59. package/dist/components/ds-message-composer.js.map +1 -1
  60. package/dist/components/ds-message-scroller.js +1 -1
  61. package/dist/components/ds-message.js +1 -1
  62. package/dist/components/ds-mobile-bar-nav.js +1 -1
  63. package/dist/components/ds-mobile-header.js +1 -1
  64. package/dist/components/ds-mobile-section-switcher.js +1 -1
  65. package/dist/components/ds-mobile-sheet-nav.js +1 -1
  66. package/dist/components/ds-modal.js +1 -1
  67. package/dist/components/ds-pagination.js +1 -1
  68. package/dist/components/ds-panel-nav.js +1 -1
  69. package/dist/components/ds-panel-sub-nav.js +1 -1
  70. package/dist/components/ds-panel-tool-header.js +1 -1
  71. package/dist/components/ds-panel-tool-search.js +1 -1
  72. package/dist/components/ds-panel-tools.js +1 -1
  73. package/dist/components/ds-paper-texture.js +1 -1
  74. package/dist/components/ds-radio.js +1 -1
  75. package/dist/components/ds-scroll-overlay.js +1 -1
  76. package/dist/components/ds-select.js +1 -1
  77. package/dist/components/ds-shell-app.js +1 -1
  78. package/dist/components/ds-shell-app.js.map +1 -1
  79. package/dist/components/ds-shell-page.js +1 -1
  80. package/dist/components/ds-shell-tools.js +1 -1
  81. package/dist/components/ds-skeleton.js +1 -1
  82. package/dist/components/ds-slider.js +1 -1
  83. package/dist/components/ds-swatch-picker.js +1 -1
  84. package/dist/components/ds-switch.js +1 -1
  85. package/dist/components/ds-tab-group.js +1 -1
  86. package/dist/components/ds-table-filter.js +1 -1
  87. package/dist/components/ds-table-saved-views.js +1 -1
  88. package/dist/components/ds-table-sort.js +1 -1
  89. package/dist/components/ds-table-toolbar.js +1 -1
  90. package/dist/components/ds-table.js +1 -1
  91. package/dist/components/ds-table.js.map +1 -1
  92. package/dist/components/ds-tag.js +1 -1
  93. package/dist/components/ds-text.js +1 -1
  94. package/dist/components/ds-toast.js +1 -1
  95. package/dist/components/ds-toast.js.map +1 -1
  96. package/dist/components/ds-tooltip-chart.js +1 -1
  97. package/dist/components/ds-tooltip.js +1 -1
  98. package/dist/components/ds-typing-indicator.js +1 -1
  99. package/dist/components/ds-typing-indicator.js.map +1 -1
  100. package/dist/components/p--CRAu9fJ.js +2 -0
  101. package/dist/components/{p-C6yLERx6.js → p-B1JRCDHS.js} +2 -2
  102. package/dist/components/p-BBG6Sswb.js +2 -0
  103. package/dist/components/{p-Drcl4zS9.js.map → p-BBG6Sswb.js.map} +1 -1
  104. package/dist/components/{p-Dd8VKdAO.js → p-BCOl1x0_.js} +2 -2
  105. package/dist/components/{p-C9StMCWg.js → p-BHVOiWz5.js} +2 -2
  106. package/dist/components/p-BNiuAMeh.js +2 -0
  107. package/dist/components/p-BNiuAMeh.js.map +1 -0
  108. package/dist/components/{p-DJ0GCCFa.js → p-BNkU9dcc.js} +2 -2
  109. package/dist/components/p-BPG0r_mC.js +2 -0
  110. package/dist/components/p-BPG0r_mC.js.map +1 -0
  111. package/dist/components/{p-DHzn7INS.js → p-BS0AbMNK.js} +2 -2
  112. package/dist/components/p-BUDAwJVV.js +2 -0
  113. package/dist/components/p-BUDAwJVV.js.map +1 -0
  114. package/dist/components/p-BZVWmzKf.js +2 -0
  115. package/dist/components/p-BZVWmzKf.js.map +1 -0
  116. package/dist/components/{p-CihNoe1M.js → p-B_jZIC9R.js} +2 -2
  117. package/dist/components/{p-CAJIARNW.js → p-Bbb9A3NV.js} +2 -2
  118. package/dist/components/{p-Dginv8PT.js → p-Bf7PZJPT.js} +2 -2
  119. package/dist/components/{p-D6P_1YrL.js → p-BhYS_Ump.js} +2 -2
  120. package/dist/components/p-BknXYAEc.js +2 -0
  121. package/dist/components/{p-9GuNIXuz.js.map → p-BknXYAEc.js.map} +1 -1
  122. package/dist/components/{p-BKx2ihnG.js → p-Bu3dOjpW.js} +2 -2
  123. package/dist/components/{p-BiBXCjjo.js → p-BxGQ3cRJ.js} +2 -2
  124. package/dist/components/{p-Dl3gciej.js → p-BysVBVQv.js} +2 -2
  125. package/dist/components/{p-CBa_6lqj.js → p-C-Y7gYgz.js} +2 -2
  126. package/dist/components/{p-9EQ3xLI1.js → p-C6R5Lft0.js} +2 -2
  127. package/dist/components/{p-DPR0TGGJ.js → p-C9gC4haA.js} +2 -2
  128. package/dist/components/{p-LHzBS95u.js → p-CAnnQL1F.js} +2 -2
  129. package/dist/components/p-CY4YFAT3.js +2 -0
  130. package/dist/components/p-CY4YFAT3.js.map +1 -0
  131. package/dist/components/{p-3WlVHGUe.js → p-Cg0kimXZ.js} +2 -2
  132. package/dist/components/{p-HZz5aJKz.js → p-CsBICYmt.js} +2 -2
  133. package/dist/components/p-CwjVgUqy.js +2 -0
  134. package/dist/components/p-CwjVgUqy.js.map +1 -0
  135. package/dist/components/p-D1eEgwcP.js +2 -0
  136. package/dist/components/p-D1eEgwcP.js.map +1 -0
  137. package/dist/components/{p-oCc3mz_c.js → p-D3fMaUJ3.js} +2 -2
  138. package/dist/components/p-D7R4yE2C.js +2 -0
  139. package/dist/components/{p-Ba7DaFkb.js.map → p-D7R4yE2C.js.map} +1 -1
  140. package/dist/components/{p-CHEt4mW8.js → p-DAvh38E4.js} +2 -2
  141. package/dist/components/{p-DPpHSIzS.js → p-DBue3ISk.js} +2 -2
  142. package/dist/components/{p-BdgoB2ef.js → p-DDgeXGbB.js} +2 -2
  143. package/dist/components/{p-hp_2W2Qy.js → p-DOUDRJbE.js} +2 -2
  144. package/dist/components/{p-Be-vZpWx.js → p-DUdOmSFR.js} +2 -2
  145. package/dist/components/p-DaAXY-XS.js +2 -0
  146. package/dist/components/p-DaAXY-XS.js.map +1 -0
  147. package/dist/components/{p-B9ZfoprK.js → p-DlYw4UGQ.js} +2 -2
  148. package/dist/components/p-DlYw4UGQ.js.map +1 -0
  149. package/dist/components/p-DtndC9f1.js +2 -0
  150. package/dist/components/p-DtndC9f1.js.map +1 -0
  151. package/dist/components/p-HB_cf_aR.js +2 -0
  152. package/dist/components/{p-BBmRD_S0.js.map → p-HB_cf_aR.js.map} +1 -1
  153. package/dist/components/{p-BTTxl3ro.js → p-ZpQBAwZC.js} +2 -2
  154. package/dist/components/p-ZpQBAwZC.js.map +1 -0
  155. package/dist/components/p-ag6Io-kL.js +2 -0
  156. package/dist/components/p-ag6Io-kL.js.map +1 -0
  157. package/dist/components/p-fg9EKoZp.js +2 -0
  158. package/dist/components/{p-DMaQkEYP.js.map → p-fg9EKoZp.js.map} +1 -1
  159. package/dist/components/p-iMuFgSoM.js +2 -0
  160. package/dist/components/p-iMuFgSoM.js.map +1 -0
  161. package/dist/components/{p-CbZ0RU2c.js → p-r8PMqlqm.js} +2 -2
  162. package/dist/components/{p-B145kX-i.js → p-uI6z53BE.js} +2 -2
  163. package/dist/docs/components.json +252 -37
  164. package/dist/lib/components/PanelTools/panel-tools-types.d.ts +12 -0
  165. package/dist/lib/shell/index.d.ts +1 -1
  166. package/dist/lib/shell/index.js.map +1 -1
  167. package/dist/lib/utils/anchored-position.d.ts +6 -2
  168. package/dist/mcp-data/registry/badge.json +7 -9
  169. package/dist/mcp-data/registry/banner.json +2 -2
  170. package/dist/mcp-data/registry/bar-action.json +2 -2
  171. package/dist/mcp-data/registry/button-unfilled.json +1 -1
  172. package/dist/mcp-data/registry/conversation-list.json +2 -2
  173. package/dist/mcp-data/registry/filter-menu.json +21 -6
  174. package/dist/mcp-data/registry/input.json +23 -3
  175. package/dist/mcp-data/registry/menu.json +22 -4
  176. package/dist/mcp-data/registry/message-composer.json +2 -2
  177. package/dist/mcp-data/registry/pagination.json +31 -10
  178. package/dist/mcp-data/registry/panel-nav.json +1 -1
  179. package/dist/mcp-data/registry/panel-tool-header.json +3 -3
  180. package/dist/mcp-data/registry/panel-tools.json +5 -4
  181. package/dist/mcp-data/registry/registry.json +58 -21
  182. package/dist/mcp-data/registry/select.json +17 -3
  183. package/dist/mcp-data/registry/shell-app.json +3 -2
  184. package/dist/mcp-data/registry/table.json +21 -1
  185. package/dist/mcp-data/registry/toast.json +2 -2
  186. package/dist/mcp-data/registry/tooltip.json +20 -3
  187. package/dist/mcp-data/registry/typing-indicator.json +4 -4
  188. package/dist/react/ds-panel-tool-header.d.ts +2 -5
  189. package/dist/react/ds-panel-tools.d.ts +2 -5
  190. package/dist/types/components/Badge/Badge.d.ts +2 -16
  191. package/dist/types/components/Banner/Banner.d.ts +0 -1
  192. package/dist/types/components/BarAction/BarAction.d.ts +0 -7
  193. package/dist/types/components/ConversationList/ConversationList.d.ts +1 -0
  194. package/dist/types/components/FilterMenu/FilterMenu.d.ts +5 -5
  195. package/dist/types/components/Input/Input.d.ts +7 -0
  196. package/dist/types/components/Menu/Menu.d.ts +3 -4
  197. package/dist/types/components/MessageComposer/MessageComposer.d.ts +0 -3
  198. package/dist/types/components/Pagination/Pagination.d.ts +2 -0
  199. package/dist/types/components/Pagination/pagination-types.d.ts +2 -0
  200. package/dist/types/components/PanelToolHeader/PanelToolHeader.d.ts +2 -5
  201. package/dist/types/components/PanelTools/PanelTools.d.ts +2 -5
  202. package/dist/types/components/PanelTools/panel-tools-types.d.ts +12 -0
  203. package/dist/types/components/Select/Select.d.ts +3 -0
  204. package/dist/types/components/Table/Table.d.ts +1 -13
  205. package/dist/types/components/Table/table-body-renderer.d.ts +36 -0
  206. package/dist/types/components/Table/table-load-view.d.ts +17 -0
  207. package/dist/types/components/Table/table-row-view.d.ts +26 -0
  208. package/dist/types/components/Table/table-skeleton-view.d.ts +12 -0
  209. package/dist/types/components/Tooltip/Tooltip.d.ts +3 -0
  210. package/dist/types/components.d.ts +72 -23
  211. package/dist/types/shell/index.d.ts +1 -1
  212. package/dist/types/utils/anchored-overlay-boundary.d.ts +14 -0
  213. package/dist/types/utils/anchored-overlay-interaction-controller.d.ts +26 -0
  214. package/dist/types/utils/anchored-position-controller.d.ts +14 -0
  215. package/dist/types/utils/anchored-position.d.ts +6 -2
  216. package/dist/types/utils/select-controller.d.ts +1 -0
  217. package/dist/vue/ds-filter-menu.js +1 -0
  218. package/dist/vue/ds-input.js +1 -0
  219. package/dist/vue/ds-menu.js +1 -0
  220. package/dist/vue/ds-pagination.js +1 -0
  221. package/dist/vue/ds-select.js +1 -0
  222. package/dist/vue/ds-tooltip.js +1 -0
  223. package/package.json +4 -1
  224. package/dist/components/p-9GuNIXuz.js +0 -2
  225. package/dist/components/p-B9ZfoprK.js.map +0 -1
  226. package/dist/components/p-BBmRD_S0.js +0 -2
  227. package/dist/components/p-BTTxl3ro.js.map +0 -1
  228. package/dist/components/p-Ba7DaFkb.js +0 -2
  229. package/dist/components/p-BcNYvLMi.js +0 -2
  230. package/dist/components/p-BcNYvLMi.js.map +0 -1
  231. package/dist/components/p-CI5Ce8VF.js +0 -2
  232. package/dist/components/p-CI5Ce8VF.js.map +0 -1
  233. package/dist/components/p-Cgm7YMLw.js +0 -2
  234. package/dist/components/p-Cgm7YMLw.js.map +0 -1
  235. package/dist/components/p-Cj5Hkt6Y.js +0 -2
  236. package/dist/components/p-Cj5Hkt6Y.js.map +0 -1
  237. package/dist/components/p-DC_8dK55.js +0 -2
  238. package/dist/components/p-DC_8dK55.js.map +0 -1
  239. package/dist/components/p-DKY3IJqt.js +0 -2
  240. package/dist/components/p-DKY3IJqt.js.map +0 -1
  241. package/dist/components/p-DMaQkEYP.js +0 -2
  242. package/dist/components/p-DQyvAN44.js +0 -2
  243. package/dist/components/p-DQyvAN44.js.map +0 -1
  244. package/dist/components/p-DaxKVtZG.js +0 -2
  245. package/dist/components/p-DbJahF86.js +0 -2
  246. package/dist/components/p-DbJahF86.js.map +0 -1
  247. package/dist/components/p-DhKvqh5G.js +0 -2
  248. package/dist/components/p-DhKvqh5G.js.map +0 -1
  249. package/dist/components/p-Drcl4zS9.js +0 -2
  250. package/dist/components/p-DzPw6aDK.js +0 -2
  251. package/dist/components/p-DzPw6aDK.js.map +0 -1
  252. package/dist/components/p-jk2-y5dH.js +0 -2
  253. package/dist/components/p-jk2-y5dH.js.map +0 -1
  254. package/dist/types/shell/badge-gradient-ring.d.ts +0 -28
  255. /package/dist/components/{p-DaxKVtZG.js.map → p--CRAu9fJ.js.map} +0 -0
  256. /package/dist/components/{p-C6yLERx6.js.map → p-B1JRCDHS.js.map} +0 -0
  257. /package/dist/components/{p-Dd8VKdAO.js.map → p-BCOl1x0_.js.map} +0 -0
  258. /package/dist/components/{p-C9StMCWg.js.map → p-BHVOiWz5.js.map} +0 -0
  259. /package/dist/components/{p-DJ0GCCFa.js.map → p-BNkU9dcc.js.map} +0 -0
  260. /package/dist/components/{p-DHzn7INS.js.map → p-BS0AbMNK.js.map} +0 -0
  261. /package/dist/components/{p-CihNoe1M.js.map → p-B_jZIC9R.js.map} +0 -0
  262. /package/dist/components/{p-CAJIARNW.js.map → p-Bbb9A3NV.js.map} +0 -0
  263. /package/dist/components/{p-Dginv8PT.js.map → p-Bf7PZJPT.js.map} +0 -0
  264. /package/dist/components/{p-D6P_1YrL.js.map → p-BhYS_Ump.js.map} +0 -0
  265. /package/dist/components/{p-BKx2ihnG.js.map → p-Bu3dOjpW.js.map} +0 -0
  266. /package/dist/components/{p-BiBXCjjo.js.map → p-BxGQ3cRJ.js.map} +0 -0
  267. /package/dist/components/{p-Dl3gciej.js.map → p-BysVBVQv.js.map} +0 -0
  268. /package/dist/components/{p-CBa_6lqj.js.map → p-C-Y7gYgz.js.map} +0 -0
  269. /package/dist/components/{p-9EQ3xLI1.js.map → p-C6R5Lft0.js.map} +0 -0
  270. /package/dist/components/{p-DPR0TGGJ.js.map → p-C9gC4haA.js.map} +0 -0
  271. /package/dist/components/{p-LHzBS95u.js.map → p-CAnnQL1F.js.map} +0 -0
  272. /package/dist/components/{p-3WlVHGUe.js.map → p-Cg0kimXZ.js.map} +0 -0
  273. /package/dist/components/{p-HZz5aJKz.js.map → p-CsBICYmt.js.map} +0 -0
  274. /package/dist/components/{p-oCc3mz_c.js.map → p-D3fMaUJ3.js.map} +0 -0
  275. /package/dist/components/{p-CHEt4mW8.js.map → p-DAvh38E4.js.map} +0 -0
  276. /package/dist/components/{p-DPpHSIzS.js.map → p-DBue3ISk.js.map} +0 -0
  277. /package/dist/components/{p-BdgoB2ef.js.map → p-DDgeXGbB.js.map} +0 -0
  278. /package/dist/components/{p-hp_2W2Qy.js.map → p-DOUDRJbE.js.map} +0 -0
  279. /package/dist/components/{p-Be-vZpWx.js.map → p-DUdOmSFR.js.map} +0 -0
  280. /package/dist/components/{p-CbZ0RU2c.js.map → p-r8PMqlqm.js.map} +0 -0
  281. /package/dist/components/{p-B145kX-i.js.map → p-uI6z53BE.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{p as e,H as i,c as n,h as s,a as o,t}from"./index.js";import{A as r,c}from"./p-DzPw6aDK.js";import{d}from"./p-DbJahF86.js";import{d as a}from"./p-BFfLvMZd.js";import{d as l}from"./p-Dl3gciej.js";import{d as u}from"./p-HZz5aJKz.js";import{d as h}from"./p-3WlVHGUe.js";import{d as m}from"./p-LHzBS95u.js";import{a as f,b as p,T as v}from"./p-DFQ9mcbK.js";import{c as g,r as b}from"./p-DhKvqh5G.js";import{r as x}from"./p-BMc0DE59.js";import{a as w,C as _}from"./p-CuwopElg.js";function y(e){return"variant"in e&&e.variant==="swatch-picker"}function k(e){return y(e)}function C(e){return e.map((e=>{if(y(e)){return{...e,...e.options?{options:e.options.map((e=>({...e})))}:{},...e.sections?{sections:e.sections.map((e=>({...e,options:e.options.map((e=>({...e})))})))}:{}}}return{...e,items:e.items.map((e=>({...e})))}}))}function P(e,i){if(!e[i]?.reorderable)return null;let n=i;while(n>0&&e[n-1]?.reorderable)n-=1;let s=i;while(s<e.length-1&&e[s+1]?.reorderable)s+=1;return{start:n,end:s}}function z(e,i,n){const s=P(e,i);if(!s)return null;const o=Math.min(Math.max(n,s.start),s.end+1);let t=o;if(i<t)t-=1;if(t===i||t<s.start||t>s.end)return null;const r=[...e];const[c]=r.splice(i,1);r.splice(t,0,c);return r}function A(e,i,n){if(n===0)return null;return z(e,i,i+(n<0?n:n+1))}function I(e,i){let n=i;for(let i=0;i<e.length;i+=1){const s=e[i];if(k(s))continue;if(n<s.items.length){return{sectionIndex:i,itemIndex:n,items:s.items}}n-=s.items.length}return null}function T(e,i,n,s){const o=e[i];if(!o)return null;const t=n.indexOf(o);if(t<0){const e=o.value;const t=e?n.findIndex((i=>i.value===e)):-1;if(t<0)return null;return{item:o,fromIndex:i,toIndex:t,sectionIndex:s,items:n}}return{item:o,fromIndex:i,toIndex:t,sectionIndex:s,items:n}}const D=()=>`@media (forced-colors: active){.sc-ds-menu:root,.sc-ds-menu-h,.ds-forced-colors-scope.sc-ds-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.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-h,.ds-focus-ring.sc-ds-menu,.ds-focus-ring-inset.sc-ds-menu-h,.ds-focus-ring-inset.sc-ds-menu{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-menu-h:focus-visible,.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-h,.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-h:focus-visible,.ds-focus-ring-inset.sc-ds-menu:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-menu-h:focus-visible::after,.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-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-menu{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-menu-h::after,.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))}@media (forced-colors: active){.sc-ds-menu-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){.sc-ds-menu:root,.sc-ds-menu-h,.ds-forced-colors-scope.sc-ds-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}@media (forced-colors: active){.sc-ds-menu:root,.sc-ds-menu-h,.ds-forced-colors-scope.sc-ds-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-interaction-fill.sc-ds-menu-h,.ds-interaction-fill.sc-ds-menu{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}.ds-interaction-fill.sc-ds-menu-h::before,.ds-interaction-fill.sc-ds-menu::before,.ds-interaction-fill.sc-ds-menu-h::after,.ds-interaction-fill.sc-ds-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}.ds-interaction-fill.sc-ds-menu-h::before,.ds-interaction-fill.sc-ds-menu::before{z-index:1}.ds-interaction-fill.sc-ds-menu-h::after,.ds-interaction-fill.sc-ds-menu::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-menu-h,.ds-interaction-fill--bordered.sc-ds-menu{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-menu-h::before,.ds-interaction-fill--selected.sc-ds-menu::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-menu-h,.ds-interaction-fill--selected.sc-ds-menu{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-menu-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-menu:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}.ds-interaction-fill.sc-ds-menu-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-menu:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill--grouped.sc-ds-menu-h::after,.ds-interaction-fill--grouped.sc-ds-menu::after,.ds-interaction-fill--grouped.sc-ds-menu-h:active:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-menu:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill--grouped.sc-ds-menu-h:hover:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-menu:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}.ds-interaction-fill--grouped.sc-ds-menu-h,.ds-interaction-fill--grouped.sc-ds-menu{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}.ds-interaction-fill.sc-ds-menu-h>.ds-interaction-fill__content.sc-ds-menu,.ds-interaction-fill.sc-ds-menu>.ds-interaction-fill__content.sc-ds-menu,.ds-interaction-fill__content.sc-ds-menu{position:relative;z-index:2;cursor:inherit}.ds-interaction-fill--on-faint.sc-ds-menu-h,.ds-interaction-fill--on-faint.sc-ds-menu{--ds-interaction-active:var(--color-interaction-active)}.ds-interaction-fill--on-medium.sc-ds-menu-h,.ds-interaction-fill--on-medium.sc-ds-menu{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-menu-h,.ds-interaction-fill--on-bold.sc-ds-menu{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-menu-h,.ds-interaction-fill--on-strong.sc-ds-menu{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-menu-h,.ds-interaction-fill--on-translucent.sc-ds-menu{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active-brand);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-menu-h,.ds-interaction-fill--on-inverted.sc-ds-menu{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active-brand);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-menu-h,.ds-interaction-fill--on-media.sc-ds-menu{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-menu-h,.ds-interaction-fill--on-always-dark.sc-ds-menu{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active-brand);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-menu-h,.ds-interaction-fill--on-navigation.sc-ds-menu{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}@media (forced-colors: active){.ds-interaction-fill.sc-ds-menu-h::after,.ds-interaction-fill.sc-ds-menu::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}.ds-interaction-fill--selected.sc-ds-menu-h::before,.ds-interaction-fill--selected.sc-ds-menu::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-menu-h:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill.sc-ds-menu:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}@media (forced-colors: active){.sc-ds-menu:root,.sc-ds-menu-h,.ds-forced-colors-scope.sc-ds-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-control-inactive.sc-ds-menu-h,.ds-control-inactive.sc-ds-menu{opacity:var(--effect-opacity-medium);pointer-events:none;cursor:not-allowed}@media (forced-colors: active){.ds-control-inactive.sc-ds-menu-h,.ds-control-inactive.sc-ds-menu{color:var(--ds-forced-color-disabled);opacity:1}}.ds-control--lg.sc-ds-menu,.ds-control--lg.sc-ds-menu-h,.ds-control--md.sc-ds-menu-h,.ds-control--md.sc-ds-menu,.ds-control--sm.sc-ds-menu-h,.ds-control--sm.sc-ds-menu,.ds-control--xs.sc-ds-menu-h,.ds-control--xs.sc-ds-menu{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-menu-h,.ds-control--lg.sc-ds-menu{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-menu-h,.ds-control--md.sc-ds-menu{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-menu-h,.ds-control--sm.sc-ds-menu{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-menu-h,.ds-control--xs.sc-ds-menu{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-menu-h,.ds-chrome-space--sm.sc-ds-menu{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-menu-h,.ds-chrome-space--md.sc-ds-menu{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-menu-h,.ds-chrome-space--lg.sc-ds-menu{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-menu-h,.ds-chrome-row.sc-ds-menu,.ds-chrome-column.sc-ds-menu-h,.ds-chrome-column.sc-ds-menu,.ds-chrome-grid.sc-ds-menu-h,.ds-chrome-grid.sc-ds-menu{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-menu-h,.ds-chrome-row.sc-ds-menu{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-menu-h,.ds-chrome-column.sc-ds-menu{flex-direction:column}.ds-chrome-grid.sc-ds-menu-h,.ds-chrome-grid.sc-ds-menu{display:grid;align-items:center}.ds-control-frame.sc-ds-menu{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-menu{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-menu{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-label-dot.sc-ds-menu{position:relative;padding-inline-end:calc( var(--ds-control-label-inset, var(--dimension-space-025)) + var(--ds-control-gap, var(--dimension-space-050)) )}.ds-control-label-dot__badge.sc-ds-menu{position:absolute;inset-block-start:0;inset-inline-end:0;pointer-events:none}.ds-empty-region.sc-ds-menu{display:flex;flex:1 1 auto;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:0}.ds-empty-region--padded.sc-ds-menu{padding:var(--dimension-space-200)}.sc-ds-menu:where(.ds-text-decoration,.ds-text-action).sc-ds-menu{text-decoration-color:var(--ds-text-decoration-color, var(--color-foreground-tertiary));text-decoration-thickness:var(--ds-text-decoration-thickness, var(--dimension-stroke-width-012));text-underline-offset:var(--ds-text-decoration-offset, var(--dimension-space-025))}.ds-text-action.sc-ds-menu{--ds-text-action-foreground:var(--color-foreground-bold-brand);--ds-text-decoration-color:var(--ds-text-action-foreground);color:var(--ds-text-action-foreground);text-decoration-line:none}.ds-text-action--on-medium.sc-ds-menu{--ds-text-action-foreground:var(--color-foreground-on-medium-background-primary);--ds-text-decoration-color:var(--color-foreground-on-medium-background-secondary);text-decoration-line:underline}.ds-text-action--on-strong.sc-ds-menu{--ds-text-action-foreground:var(--color-foreground-on-strong-background-primary);--ds-text-decoration-color:var(--color-foreground-on-strong-background-secondary);text-decoration-line:underline}.ds-text-action--on-bold.sc-ds-menu{--ds-text-action-foreground:var(--color-foreground-on-bold-background-primary);--ds-text-decoration-color:var(--color-foreground-on-bold-background-secondary);text-decoration-line:underline}@media (hover: hover) and (pointer: fine){.ds-text-action.sc-ds-menu:hover{text-decoration-line:underline}}@media (forced-colors: active){.ds-text-action.sc-ds-menu{text-decoration-line:underline;text-decoration-color:currentcolor}}.ds-choice-popup.sc-ds-menu{box-sizing:border-box;display:flex;flex-direction:column;min-width:var(--ds-choice-popup-min-inline-size, var(--dimension-menu-width-xs));max-width:min(var(--dimension-panel-width-lg), calc(100vw - var(--dimension-space-200)));max-height:calc(100vh - var(--dimension-space-200));overflow:hidden;inset:auto;margin:0;padding:0;border:0;background-color:var(--color-background-primary);border-radius:var(--dimension-radius-075);box-shadow:var(--effect-shadow-elevated-floating);color:var(--color-foreground-secondary);animation:dsChoiceFadeIn var(--effect-motion-short-2) forwards;backface-visibility:hidden;will-change:transform;text-align:start}.ds-choice-popup.sc-ds-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:var(--effect-highlight-elevated-floating)}.ds-choice-popup--closing.sc-ds-menu{animation:dsChoiceFadeOut var(--effect-motion-short-2) forwards}@keyframes dsChoiceFadeIn{from{opacity:0;transform:inherit scale(0.97)}to{opacity:1}}@keyframes dsChoiceFadeOut{from{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.ds-choice-popup.sc-ds-menu{animation:none;opacity:1}.ds-choice-popup--closing.sc-ds-menu{opacity:0}}.ds-choice-list.sc-ds-menu{display:flex;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain}.ds-choice-section--divided.sc-ds-menu{border-bottom:var(--dimension-stroke-width-015) solid var(--color-border-tertiary)}ds-text.ds-choice-section__header.sc-ds-menu{text-align:start;-webkit-user-select:none;user-select:none}.ds-choice-section--headed-after-first.sc-ds-menu{margin-block-start:var(--dimension-space-050)}.ds-choice-item.sc-ds-menu{width:100%;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));background:transparent;cursor:default;-webkit-user-select:none;user-select:none;text-align:left;color:inherit}.ds-choice-item.sc-ds-menu:has(.ds-choice-item__subtext){height:auto;min-height:var(--ds-control-height, var(--dimension-size-400));padding-block:var(--ds-control-padding-inline, var(--dimension-space-075));align-items:flex-start}.ds-choice-item__content.sc-ds-menu{display:flex;flex:1;flex-direction:column;gap:var(--dimension-space-025);min-width:0}ds-text.ds-choice-item__label.sc-ds-menu{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ds-text.ds-choice-item__subtext.sc-ds-menu{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ds-choice-item__icon.sc-ds-menu,.ds-choice-item__suffix.sc-ds-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md));pointer-events:none}.ds-choice-item.ds-interaction-fill--selected.sc-ds-menu .ds-choice-item__icon.sc-ds-menu{color:var(--color-foreground-primary)}.ds-choice-item__tag.sc-ds-menu{flex-shrink:0;pointer-events:none}.ds-choice-empty.sc-ds-menu,.ds-choice-loading.sc-ds-menu{min-height:var(--dimension-size-600);padding:var(--dimension-space-100)}.ds-choice-footer.sc-ds-menu{position:relative;box-sizing:border-box;padding-block:var(--dimension-space-050)}.ds-choice-footer.sc-ds-menu::before{content:'';position:absolute;inset:0 0 auto;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.ds-choice-footer__content.sc-ds-menu{display:flex;align-items:center;justify-content:space-between;column-gap:var(--dimension-space-050);box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400))}.ds-choice-footer__summary.sc-ds-menu,.ds-choice-footer__summary-measure.sc-ds-menu,.ds-choice-footer__clear.sc-ds-menu ds-text.sc-ds-menu,.ds-choice-footer__action.sc-ds-menu ds-text.sc-ds-menu{padding-inline:calc( var(--dimension-space-050) + var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-choice-footer__summary.sc-ds-menu,.ds-choice-footer__summary-measure.sc-ds-menu,.ds-choice-footer__clear.sc-ds-menu,.ds-choice-footer__action.sc-ds-menu{white-space:nowrap}.ds-choice-footer__summary-measure.sc-ds-menu{position:absolute;visibility:hidden;pointer-events:none}.ds-choice-footer__clear.sc-ds-menu,.ds-choice-footer__action.sc-ds-menu{appearance:none;display:inline-flex;align-items:center;padding:0;border:0;border-radius:var(--dimension-radius-025);background:transparent;cursor:default}@media (forced-colors: active){.ds-choice-popup.sc-ds-menu{outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);outline-offset:calc(-1 * var(--dimension-stroke-width-012))}.ds-choice-popup.sc-ds-menu::after{box-shadow:none}.ds-choice-section--divided.sc-ds-menu{border-bottom-color:var(--ds-forced-color-content)}.ds-choice-footer.sc-ds-menu::before{background-color:var(--ds-forced-color-content)}}.ds-visually-hidden.sc-ds-menu-h,.ds-visually-hidden.sc-ds-menu{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}@media (forced-colors: active){.sc-ds-menu:root,.sc-ds-menu-h,.ds-forced-colors-scope.sc-ds-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.menu-item--destructive.sc-ds-menu .menu-item__label.sc-ds-menu{color:var(--color-foreground-bold-negative) !important}.menu-item__dot-box.sc-ds-menu{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md));pointer-events:none}.menu-item__switch.sc-ds-menu{flex-shrink:0;margin-inline-start:calc( var(--dimension-space-100) - var(--ds-control-gap, var(--dimension-space-050)) )}.menu-item.sc-ds-menu>.menu-item__handle.sc-ds-menu{pointer-events:auto;cursor:grab;touch-action:none}.menu-item.sc-ds-menu>.menu-item__handle.sc-ds-menu:active,.menu-item--dragging.sc-ds-menu>.menu-item__handle.sc-ds-menu{cursor:grabbing}.menu-item--dragging.sc-ds-menu{opacity:var(--effect-opacity-medium)}.menu-item__drop-rail.sc-ds-menu{position:absolute;z-index:var(--dimension-z-index-raised);inset-inline:var(--dimension-space-050);block-size:var(--dimension-stroke-width-025);border-radius:var(--dimension-radius-half);background:var(--color-border-bold-brand);pointer-events:none}.menu-item__drop-rail--before.sc-ds-menu{inset-block-start:calc(-1 * var(--dimension-space-025));transform:translateY(-50%)}.menu-item__drop-rail--after.sc-ds-menu{inset-block-end:calc(-1 * var(--dimension-space-025));transform:translateY(50%)}@media (forced-colors: active){.menu-item__drop-rail.sc-ds-menu{background:var(--ds-forced-color-selected)}}`;const H={lg:"md",md:"sm",sm:"xs",xs:"xs"};const M=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");const j=e(class e extends i{constructor(e){super();if(e!==false){this.__registerHost()}this.dsClose=n(this,"dsClose",7);this.dsAfterClose=n(this,"dsAfterClose",7);this.dsSelect=n(this,"dsSelect",7);this.dsSwatchSelect=n(this,"dsSwatchSelect",7);this.dsReorder=n(this,"dsReorder",7);this.open=false;this.items=[];this.size="md";this.selectionMode="none";this.sections=[];this.side="bottom";this.align="start";this.anchorAlignment="choice-cell";this.sideOffset=f.space050;this.alignOffset=0;this.initialFocusVisible=false;this.menuLabel="Menu";this.shouldRender=false;this.closing=false;this.pos={x:0,y:0};this.focusedIndex=0;this.positionReady=false;this.availableHeight=null;this.focusRingVisible=false;this.reorderFromFlat=null;this.reorderInsertBefore=null;this.reorderAnnouncement="";this.clickOutsideHandler=null;this.closeTimer=null;this.suppressItemClick=false;this.reorderPointer=null;this.position=new r({getAnchor:()=>this.resolvedAnchor??null,getPopup:()=>this.el.querySelector(".menu-popup"),measure:(e,i)=>{if(!this.open)return null;const n=e.getBoundingClientRect();const s=this.viewportPadPx;if(!this.minWidth){if(this.anchorAlignment==="choice-cell"&&(this.side==="top"||this.side==="bottom")){i.style.minWidth=`max(var(--dimension-menu-width-xs), ${g(n.width,s)}px)`}else{i.style.removeProperty("min-width")}}const o=this.viewportPadPx;const t=i.querySelector(".ds-choice-list");const r=Math.min(Math.max(i.offsetHeight,t?.scrollHeight??0),window.innerHeight-o*2);const d={anchorRect:n,popupWidth:i.offsetWidth||this.popupFallbackWidthPx,popupHeight:r||this.popupFallbackHeightPx,side:this.side,align:this.align,sideOffsetPx:this.sideOffsetPx,alignOffsetPx:b({align:this.align,alignOffsetPx:this.alignOffsetPx,sectionInsetPx:s,anchorAlignment:this.anchorAlignment}),viewportPadPx:o,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight};const a=c(d);return{...d,popupHeight:Math.min(d.popupHeight,a.availableHeight)}},apply:({x:e,y:i,availableHeight:n})=>{this.pos={x:e,y:i};this.availableHeight=n},onReady:()=>{this.positionReady=true},liveUpdate:"double-frame",topLayer:true});this.lastRenderedSections=[];this.closingSections=null;this.onReorderPointerMove=e=>{const i=this.reorderPointer;if(!i||e.pointerId!==i.pointerId)return;const n=this.activeSections[i.sectionIndex];if(!n||k(n))return;const s=this.resolveReorderInsertBefore(e.clientY,i.sectionIndex,i.fromIndex,n.items);if(s!==this.reorderInsertBefore)this.reorderInsertBefore=s};this.onReorderPointerUp=e=>{const i=this.reorderPointer;if(!i||e.pointerId!==i.pointerId)return;const n=this.activeSections[i.sectionIndex];const s=this.reorderInsertBefore;this.clearReorderPointer();queueMicrotask((()=>{this.suppressItemClick=false}));if(!n||k(n)||s===null)return;const o=z(n.items,i.fromIndex,s);if(!o)return;this.emitReorder(n.items,i.fromIndex,o,i.sectionIndex)};this.onReorderPointerCancel=e=>{if(!this.reorderPointer||e.pointerId!==this.reorderPointer.pointerId)return;this.clearReorderPointer();queueMicrotask((()=>{this.suppressItemClick=false}))}}componentDidLoad(){if(this.open)this.onOpenChange(true)}disconnectedCallback(){this.cancelPositionRetry();this.cancelLivePositionUpdate();this.clearReorderPointer();this.teardownListeners()}onOpenChange(e){if(e){this.teardownListeners();this.closingSections=null;this.shouldRender=true;this.closing=false;this.positionReady=false;this.availableHeight=null;this.focusRingVisible=this.initialFocusVisible;this.setupListeners();this.schedulePositionUpdate((()=>{this.focusInitialItem()}))}else if(this.shouldRender){this.positionReadyCallback=undefined;this.cancelPositionRetry();this.captureClosingSections();this.closing=true;this.teardownListeners();const e=this.closeAnimationMs;if(e<=0){this.finishClose();return}this.closeTimer=setTimeout((()=>{this.closeTimer=null;this.finishClose()}),e)}}onAnchorChange(){if(this.open)this.schedulePositionUpdate()}onPositionPropsChange(){if(this.open)this.schedulePositionUpdate()}get viewportPadPx(){return x(v.space050,v.space050)}get sideOffsetPx(){return x(this.sideOffset,v.space050)}get alignOffsetPx(){return x(this.alignOffset,0)}get popupFallbackWidthPx(){return x(v.menuWidthXs,v.menuWidthXs)}get popupFallbackHeightPx(){return x(v.menuFallbackHeight,v.menuFallbackHeight)}get closeAnimationMs(){return p(v.motionShort2,v.animationDurationShort3)}finishClose(){const e=this.el.querySelector(".menu-popup");if(e?.matches(":popover-open"))e.hidePopover();this.shouldRender=false;this.closing=false;this.lastRenderedSections=[];this.closingSections=null;this.clearReorderPointer();this.reorderAnnouncement="";this.dsAfterClose.emit()}captureClosingSections(){if(this.closingSections)return;const e=this.lastRenderedSections.length?this.lastRenderedSections:this.activeSections;this.closingSections=C(e)}get resolvedAnchor(){if(this.anchor)return this.anchor;if(this.anchorId)return document.getElementById(this.anchorId);return null}get anchorFocusTarget(){const e=this.resolvedAnchor;if(!e)return null;if(e.matches(M))return e;return e.querySelector(M)??e}focusAnchor(){const e=this.resolvedAnchor;if(e?.setFocus){e.setFocus();return}this.anchorFocusTarget?.focus()}moveFocusAfterTab(e){const i=this.anchorFocusTarget;if(!i)return;if(e){i.focus();return}const n=Array.from(document.querySelectorAll(M)).filter((e=>!e.closest(".menu-popup")&&!e.closest("[inert]")&&e.getClientRects().length>0));const s=n.indexOf(i);(n[s+1]??i).focus()}compositeTabLeavesPopup(e){const i=this.el.querySelector(".menu-popup");if(!i)return true;const n=Array.from(i.querySelectorAll(M)).filter((e=>e.getClientRects().length>0));const s=n.indexOf(e.target);if(s<0)return true;return e.shiftKey?s===0:s===n.length-1}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=>k(e)?[]:e.items))}get hasCompositeSections(){return this.activeSections.some(k)}cancelPositionRetry(){this.position.cancel()}cancelLivePositionUpdate(){this.position.cancel()}scheduleLivePositionUpdate(){this.position.scheduleLiveUpdate()}schedulePositionUpdate(e){if(!this.open)return;this.positionReady=false;if(e)this.positionReadyCallback=e;const i=this.positionReadyCallback;this.position.schedule((()=>{if(this.positionReadyCallback===i){this.positionReadyCallback=undefined}i?.()}))}calculatePosition(){return this.position.update()}focusInitialItem(){if(this.hasCompositeSections){requestAnimationFrame((()=>{this.el.querySelector('.menu-popup [tabindex="0"]')?.focus()}));return}const e=this.flatItems;const i=e.findIndex((e=>e.isSelected&&!e.isInactive));const n=e.findIndex((e=>!e.isInactive||!!e.reorderable));this.focusedIndex=i>=0?i:n>=0?n:0;requestAnimationFrame((()=>{const e=this.el.querySelectorAll(".menu-item");e[this.focusedIndex]?.focus()}))}setupListeners(){this.clickOutsideHandler=e=>{const i=e.target;const n=this.el.querySelector(".menu-popup");const s=this.resolvedAnchor;if(n?.contains(i)||s?.contains(i))return;this.close()};document.addEventListener("mousedown",this.clickOutsideHandler,true);this.position.observe()}teardownListeners(){this.position.unobserve();if(this.clickOutsideHandler){document.removeEventListener("mousedown",this.clickOutsideHandler,true);this.clickOutsideHandler=null}if(this.closeTimer){clearTimeout(this.closeTimer);this.closeTimer=null}}close(e=true){this.captureClosingSections();if(e)this.focusAnchor();this.dsClose.emit();this.open=false;this.onOpenChange(false)}handleKeyDown(e){if(!this.shouldRender||this.closing)return;if(e.key==="Escape"){e.preventDefault();this.close();return}if(e.key==="Tab"){if(this.hasCompositeSections&&!this.compositeTabLeavesPopup(e))return;e.preventDefault();this.close(false);this.moveFocusAfterTab(e.shiftKey);return}if(this.hasCompositeSections)return;if((e.key==="ArrowUp"||e.key==="ArrowDown")&&e.altKey&&!e.ctrlKey&&!e.shiftKey){this.handleReorderKey(e);return}const i=this.flatItems;const n=i.map(((e,i)=>({it:e,i}))).filter((({it:e})=>!e.isInactive||!!e.reorderable)).map((({i:e})=>e));if(!n.length)return;const s=n.indexOf(this.focusedIndex);const o=s<0?0:s;switch(e.key){case"ArrowDown":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=n[(o+1)%n.length];this.focusItem(this.focusedIndex);break;case"ArrowUp":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=n[(o-1+n.length)%n.length];this.focusItem(this.focusedIndex);break;case"Home":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=n[0];this.focusItem(this.focusedIndex);break;case"End":e.preventDefault();e.stopPropagation();this.focusRingVisible=true;this.focusedIndex=n[n.length-1];this.focusItem(this.focusedIndex);break}}focusItem(e){const i=this.el.querySelectorAll(".menu-item");i[e]?.focus()}handleItemClick(e){if(this.suppressItemClick){this.suppressItemClick=false;return}if(e.isInactive)return;this.captureClosingSections();this.dsSelect.emit(e)}handleSwatchSelect(e){this.dsSwatchSelect.emit(e)}handleReorderKey(e){const i=I(this.activeSections,this.focusedIndex);if(!i||!i.items[i.itemIndex]?.reorderable)return;const n=A(i.items,i.itemIndex,e.key==="ArrowUp"?-1:1);if(!n)return;e.preventDefault();e.stopPropagation();this.emitReorder(i.items,i.itemIndex,n,i.sectionIndex)}emitReorder(e,i,n,s){const o=T(e,i,n,s);if(!o)return;this.focusedIndex=this.flatIndexFor(s,o.toIndex);this.announceReorder(o);this.dsReorder.emit(o)}flatIndexFor(e,i){let n=0;for(let s=0;s<this.activeSections.length;s+=1){const o=this.activeSections[s];if(k(o))continue;if(s===e)return n+i;n+=o.items.length}return i}announceReorder(e){const i=P(e.items,e.toIndex);const n=i?i.end-i.start+1:e.items.length;const s=i?e.toIndex-i.start+1:e.toIndex+1;this.reorderAnnouncement=`${e.item.label} moved to position ${s} of ${n}`}onReorderPointerDown(e,i,n,s){if(e.button!==0)return;const o=this.activeSections[i];if(!o||k(o))return;if(!o.items[n]?.reorderable)return;e.preventDefault();e.stopPropagation();this.suppressItemClick=true;this.focusRingVisible=false;this.focusedIndex=s;this.focusItem(s);this.reorderPointer={pointerId:e.pointerId,sectionIndex:i,fromIndex:n};this.reorderFromFlat=s;this.reorderInsertBefore=n;window.addEventListener("pointermove",this.onReorderPointerMove);window.addEventListener("pointerup",this.onReorderPointerUp);window.addEventListener("pointercancel",this.onReorderPointerCancel)}resolveReorderInsertBefore(e,i,n,s){const o=P(s,n);if(!o)return n;const t=[...this.el.querySelectorAll(".menu-item")];const r=this.flatIndexFor(i,0);let c=o.end+1;for(let i=o.start;i<=o.end;i+=1){const n=t[r+i];if(!n)continue;const s=n.getBoundingClientRect();if(e<s.top+s.height/2){c=i;break}}return Math.min(Math.max(c,o.start),o.end+1)}clearReorderPointer(){if(this.reorderPointer){window.removeEventListener("pointermove",this.onReorderPointerMove);window.removeEventListener("pointerup",this.onReorderPointerUp);window.removeEventListener("pointercancel",this.onReorderPointerCancel)}this.reorderPointer=null;this.reorderFromFlat=null;this.reorderInsertBefore=null}render(){if(!this.shouldRender)return s(o,{style:{display:"contents"}});const e=this.closing?this.closingSections??this.lastRenderedSections:this.activeSections;const i=e.some(k);if(!this.closing){this.lastRenderedSections=C(e);this.closingSections=null}let n=0;const t=this.reorderFromFlat===null?null:I(e,this.reorderFromFlat);const r=t?P(t.items,t.itemIndex):null;const c={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)c["width"]=this.menuWidth;if(this.minWidth)c["min-width"]=this.minWidth;if(this.availableHeight!==null){c["max-height"]=`${Math.floor(this.availableHeight)}px`}return s(o,{style:{display:"contents"}},s("div",{popover:"manual",class:{"menu-popup":true,"menu-popup--closing":this.closing,"ds-choice-popup":true,"ds-choice-popup--closing":this.closing},style:c,role:i?"dialog":"menu","aria-label":this.menuLabel,"aria-orientation":i?undefined:"vertical"},s("div",{class:"ds-choice-list"},e.map(((o,c)=>s("div",{key:c,class:{"menu-section":true,"menu-section--divided":c<e.length-1,"menu-section--swatch-picker":k(o),"ds-choice-section":true,"ds-chrome-column":true,"ds-chrome-space--sm":true,"ds-choice-section--divided":c<e.length-1,"ds-choice-section--headed-after-first":c>0&&Boolean(o.header)},role:o.header?"group":undefined,"aria-label":o.header},o.header&&s("ds-text",{class:`section-header ds-choice-section__header ds-control-section-heading ds-control--${this.size}`,as:"span",variant:w[this.size],emphasis:true,color:"primary","aria-hidden":"true"},s("span",{class:"ds-choice-section__header-label"},o.header)),y(o)?s("ds-swatch-picker",{value:o.value,groupLabel:o.groupLabel??o.header??"Swatch options",options:o.options??[],sections:o.sections??[],onDsChange:e=>{e.stopPropagation();this.handleSwatchSelect(e.detail)}}):o.items.map(((e,d)=>{const a=n++;const l=this.focusedIndex===a;const u=!i&&this.selectionMode==="single"&&!e.showSwitch;const h=o.items.some((e=>e.reorderable||!!e.icon));const m=!!e.isInactive&&!e.reorderable;const f=this.reorderFromFlat===a;const p=t?.sectionIndex===c&&r!==null&&d<=r.end&&this.reorderInsertBefore===d;const v=t?.sectionIndex===c&&r!==null&&this.reorderInsertBefore===r.end+1&&d===r.end;return s("button",{key:e.value??`${c}-${e.label}`,type:"button",class:{"menu-item":true,"ds-choice-item":true,"ds-control-frame":true,[`ds-control--${this.size}`]:true,"ds-focus-ring-inset":true,"ds-focus-ring--visible":l&&this.focusRingVisible,"ds-interaction-fill":!m,"ds-interaction-fill--selected":!!e.isSelected&&!m,"menu-item--selected":!!e.isSelected,"menu-item--switch":!!e.showSwitch,"ds-control-inactive":m,"menu-item--destructive":!!e.isDestructive,"menu-item--focused":l,"menu-item--dragging":f},role:i?undefined:e.showSwitch?"menuitemcheckbox":u?"menuitemradio":"menuitem","aria-checked":!i&&e.showSwitch?String(!!e.switchValue):u?String(!!e.isSelected):undefined,"aria-pressed":i?String(e.showSwitch?!!e.switchValue:!!e.isSelected):undefined,"aria-current":!i&&!e.showSwitch&&!u&&e.isSelected?"true":undefined,"aria-description":e.reorderable?e.isInactive?"Visibility cannot be changed. Alt + Arrow Up or Alt + Arrow Down moves this row.":"Drag to reorder. Alt + Arrow Up or Alt + Arrow Down moves this row.":undefined,"aria-disabled":e.isInactive?"true":undefined,disabled:m,tabIndex:i?0:l?0:-1,onMouseDown:()=>{this.focusRingVisible=false},onClick:()=>this.handleItemClick(e),onFocus:()=>{this.focusedIndex=a}},(p||v)&&s("span",{class:{"menu-item__drop-rail":true,"menu-item__drop-rail--before":p,"menu-item__drop-rail--after":v},"data-menu-drop-rail":true,"aria-hidden":"true"}),e.reorderable?s("span",{class:"menu-item__handle ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","data-menu-handle":true,"aria-hidden":"true",onPointerDown:e=>this.onReorderPointerDown(e,c,d,a),onClick:e=>{e.preventDefault();e.stopPropagation()}},s("ds-icon",{name:"Drag",size:this.size,color:"inherit"})):h&&e.icon?s("span",{class:"menu-item__icon ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},s("ds-icon",{name:e.icon,size:this.size,color:"inherit"})):h?s("span",{class:"menu-item__icon-spacer ds-choice-item__icon ds-control-icon-box","aria-hidden":"true"}):null,s("div",{class:"menu-item__content ds-choice-item__content ds-interaction-fill__content"},s("ds-text",{class:"menu-item__label ds-choice-item__label ds-control-label-box",as:"span",variant:_[this.size],color:e.isSelected?"primary":"secondary"},e.label),e.subtext&&s("ds-text",{class:"menu-item__subtext ds-choice-item__subtext ds-control-label-box",as:"span",variant:w[this.size],color:"secondary"},e.subtext)),e.tag&&s("ds-tag",{class:"ds-choice-item__tag ds-interaction-fill__content",label:e.tag.label,size:H[this.size],intent:e.tag.intent??"neutral",contrast:e.tag.contrast??"faint",rounded:e.tag.rounded??false,isInset:true}),e.dot&&s("span",{class:"menu-item__dot-box ds-interaction-fill__content","aria-hidden":"true"},s("ds-badge",{class:"menu-item__dot",variant:"dot",hasRing:false,label:""})),e.showSwitch&&s("ds-switch",{class:"menu-item__switch ds-interaction-fill__content",size:this.size,checked:!!e.switchValue,isInactive:!!e.isInactive,presentation:true}))}))))))),s("div",{class:"ds-visually-hidden",role:"status","aria-live":"polite"},this.reorderAnnouncement))}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}],anchor:[{onAnchorChange:0}],anchorId:[{onAnchorChange:0}],side:[{onPositionPropsChange:0}],align:[{onPositionPropsChange:0}],anchorAlignment:[{onPositionPropsChange:0}],sideOffset:[{onPositionPropsChange:0}],alignOffset:[{onPositionPropsChange:0}]}}static get style(){return D()}},[2,"ds-menu",{open:[1028],items:[16],size:[1],selectionMode:[1,"selection-mode"],sections:[16],side:[1],align:[1],anchorAlignment:[1,"anchor-alignment"],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"],menuLabel:[1,"menu-label"],shouldRender:[32],closing:[32],pos:[32],focusedIndex:[32],positionReady:[32],availableHeight:[32],focusRingVisible:[32],reorderFromFlat:[32],reorderInsertBefore:[32],reorderAnnouncement:[32]},[[0,"keydown","handleKeyDown"]],{open:[{onOpenChange:0}],anchor:[{onAnchorChange:0}],anchorId:[{onAnchorChange:0}],side:[{onPositionPropsChange:0}],align:[{onPositionPropsChange:0}],anchorAlignment:[{onPositionPropsChange:0}],sideOffset:[{onPositionPropsChange:0}],alignOffset:[{onPositionPropsChange:0}]}]);function F(){if(typeof customElements==="undefined"){return}const e=["ds-menu","ds-badge","ds-icon","ds-swatch-picker","ds-switch","ds-tag","ds-text"];e.forEach((e=>{switch(e){case"ds-menu":if(!customElements.get(t(e))){customElements.define(t(e),j)}break;case"ds-badge":if(!customElements.get(t(e))){d()}break;case"ds-icon":if(!customElements.get(t(e))){a()}break;case"ds-swatch-picker":if(!customElements.get(t(e))){l()}break;case"ds-switch":if(!customElements.get(t(e))){u()}break;case"ds-tag":if(!customElements.get(t(e))){h()}break;case"ds-text":if(!customElements.get(t(e))){m()}break}}))}F();export{j as M,F as d};
2
- //# sourceMappingURL=p-DKY3IJqt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["isMenuSwatchPickerSection","section","variant","isMenuPickerSection","snapshotMenuSections","sections","map","options","option","swatchSection","items","item","menuReorderableRange","index","reorderable","start","end","length","moveReorderableMenuItemBefore","fromIndex","insertBefore","range","clamped","Math","min","max","toIndex","next","splice","moveReorderableMenuItemBy","offset","locateMenuItem","flatIndex","remaining","sectionIndex","itemIndex","createMenuReorderDetail","nextItems","indexOf","value","matched","findIndex","candidate","menuCss","MENU_ITEM_TAG_SIZE","lg","md","sm","xs","MENU_FOCUSABLE_SELECTOR","join","Menu","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","open","size","selectionMode","side","align","anchorAlignment","sideOffset","TOKEN_CSS_LENGTHS","space050","alignOffset","initialFocusVisible","menuLabel","shouldRender","closing","pos","x","y","focusedIndex","positionReady","availableHeight","focusRingVisible","reorderFromFlat","reorderInsertBefore","reorderAnnouncement","clickOutsideHandler","closeTimer","suppressItemClick","reorderPointer","position","AnchoredPositionController","getAnchor","resolvedAnchor","getPopup","el","querySelector","measure","anchorEl","popup","anchorRect","getBoundingClientRect","sectionInsetPx","viewportPadPx","minWidth","style","choicePopupMinWidth","width","removeProperty","list","naturalPopupHeight","offsetHeight","scrollHeight","window","innerHeight","input","popupWidth","offsetWidth","popupFallbackWidthPx","popupHeight","popupFallbackHeightPx","sideOffsetPx","alignOffsetPx","resolveChoicePopupAlignOffset","viewportWidth","innerWidth","viewportHeight","unconstrained","computeAnchoredPosition","apply","onReady","liveUpdate","topLayer","lastRenderedSections","closingSections","onReorderPointerMove","event","drag","pointerId","activeSections","resolveReorderInsertBefore","clientY","onReorderPointerUp","clearReorderPointer","queueMicrotask","emitReorder","onReorderPointerCancel","componentDidLoad","onOpenChange","disconnectedCallback","cancelPositionRetry","cancelLivePositionUpdate","teardownListeners","isOpen","setupListeners","schedulePositionUpdate","focusInitialItem","positionReadyCallback","undefined","captureClosingSections","closeAnimationMs","finishClose","setTimeout","onAnchorChange","onPositionPropsChange","resolveCssLengthPx","TOKEN_DEFAULTS","menuWidthXs","menuFallbackHeight","resolveMotionTimeMs","motionShort2","animationDurationShort3","matches","hidePopover","dsAfterClose","emit","visibleSections","anchor","anchorId","document","getElementById","anchorFocusTarget","focusAnchor","setFocus","focus","moveFocusAfterTab","backwards","candidates","Array","from","querySelectorAll","filter","element","closest","getClientRects","compositeTabLeavesPopup","focusables","currentIndex","target","shiftKey","flatItems","flatMap","hasCompositeSections","some","cancel","scheduleLivePositionUpdate","scheduleLiveUpdate","callback","schedule","calculatePosition","update","requestAnimationFrame","flat","selectedIdx","it","isSelected","isInactive","firstEnabledIdx","btns","e","t","contains","close","addEventListener","observe","unobserve","removeEventListener","clearTimeout","restoreFocus","dsClose","handleKeyDown","key","preventDefault","altKey","ctrlKey","handleReorderKey","enabled","i","cur","safe","stopPropagation","focusItem","idx","handleItemClick","dsSelect","handleSwatchSelect","dsSwatchSelect","located","detail","flatIndexFor","announceReorder","dsReorder","count","label","onReorderPointerDown","button","buttons","sectionStart","row","rect","top","height","render","h","Host","display","flatIdx","dragLocated","dragRange","popupStyle","left","transform","round","zIndex","visibility","menuWidth","floor","popover","class","role","si","Boolean","header","as","CONTROL_SUPPORTING_TEXT_VARIANT","emphasis","color","groupLabel","onDsChange","isFocused","isSingleSelectionItem","showSwitch","usesLeading","icon","locked","dragging","dropBefore","dropAfter","type","isDestructive","String","switchValue","disabled","tabIndex","onMouseDown","onClick","onFocus","onPointerDown","name","CONTROL_TEXT_VARIANT","subtext","tag","intent","contrast","rounded","isInset","dot","hasRing","checked","presentation"],"sources":["src/wc/components/Menu/menu-types.ts","src/wc/components/Menu/menu-sections.ts","src/wc/components/Menu/menu-reorder.ts","src/wc/components/Menu/Menu.css?tag=ds-menu&encapsulation=scoped","src/wc/components/Menu/Menu.tsx"],"sourcesContent":["import type { SwatchPickerOption, SwatchPickerSection } from '../SwatchPicker/swatch-picker-types';\nimport type { TagContrast, TagIntent } from '../Tag/Tag';\n\nexport type { MenuAlign, MenuSide } from './menu-position';\nexport {\n PANEL_NAV_USER_MENU_PLACEMENT,\n PANEL_TOOLS_HEADER_MENU_PLACEMENT,\n type MenuPlacement,\n} from './menu-placement';\n\nexport interface MenuItemTagData {\n label: string;\n intent?: TagIntent;\n contrast?: TagContrast;\n rounded?: boolean;\n}\n\nexport interface MenuItemData {\n label: string;\n value?: string;\n subtext?: string;\n /** Leading decorative icon. Ignored when `reorderable` is true. */\n icon?: string;\n /** Show a supplemental brand notification dot. */\n dot?: boolean;\n /** Show a non-interactive tag at the trailing edge of the row. */\n tag?: MenuItemTagData;\n isSelected?: boolean;\n isInactive?: boolean;\n isDestructive?: boolean;\n /** Render a compact switch indicator; the menu row owns interaction. */\n showSwitch?: boolean;\n switchValue?: boolean;\n /** Prefix a drag handle and allow pointer and keyboard reorder within the contiguous reorderable run. */\n reorderable?: boolean;\n}\n\n/** Next section item order after a pointer or keyboard reorder. */\nexport interface MenuReorderDetail {\n item: MenuItemData;\n fromIndex: number;\n toIndex: number;\n sectionIndex: number;\n items: MenuItemData[];\n}\n\nexport interface MenuItemsSection {\n header?: string;\n items: MenuItemData[];\n}\n\nexport interface MenuSwatchPickerSection {\n header?: string;\n variant: 'swatch-picker';\n value: string;\n options?: SwatchPickerOption[];\n sections?: SwatchPickerSection[];\n groupLabel?: string;\n}\n\nexport type MenuSection =\n | MenuItemsSection\n | MenuSwatchPickerSection;\n\nexport function isMenuSwatchPickerSection(\n section: MenuSection,\n): section is MenuSwatchPickerSection {\n return 'variant' in section && section.variant === 'swatch-picker';\n}\n\nexport function isMenuPickerSection(\n section: MenuSection,\n): section is MenuSwatchPickerSection {\n return isMenuSwatchPickerSection(section);\n}\n\nexport type { SwatchPickerOption, SwatchPickerSection };\n","import type { MenuSection } from './menu-types';\nimport { isMenuSwatchPickerSection } from './menu-types';\n\n/** Preserve the exact menu context painted during exit motion. */\nexport function snapshotMenuSections(sections: readonly MenuSection[]): MenuSection[] {\n return sections.map(section => {\n if (isMenuSwatchPickerSection(section)) {\n return {\n ...section,\n ...(section.options\n ? { options: section.options.map(option => ({ ...option })) }\n : {}),\n ...(section.sections\n ? {\n sections: section.sections.map(swatchSection => ({\n ...swatchSection,\n options: swatchSection.options.map(option => ({ ...option })),\n })),\n }\n : {}),\n };\n }\n return { ...section, items: section.items.map(item => ({ ...item })) };\n });\n}\n","import {\n isMenuPickerSection,\n type MenuItemData,\n type MenuReorderDetail,\n type MenuSection,\n} from './menu-types';\n\nexport interface MenuReorderRange {\n start: number;\n end: number;\n}\n\n/** Contiguous reorderable run containing `index`, or null when that row cannot move. */\nexport function menuReorderableRange(\n items: readonly MenuItemData[],\n index: number,\n): MenuReorderRange | null {\n if (!items[index]?.reorderable) return null;\n\n let start = index;\n while (start > 0 && items[start - 1]?.reorderable) start -= 1;\n\n let end = index;\n while (end < items.length - 1 && items[end + 1]?.reorderable) end += 1;\n\n return { start, end };\n}\n\n/**\n * Move a reorderable row so it would be inserted before `insertBefore`.\n * `insertBefore` is clamped to the contiguous reorderable run.\n */\nexport function moveReorderableMenuItemBefore(\n items: readonly MenuItemData[],\n fromIndex: number,\n insertBefore: number,\n): MenuItemData[] | null {\n const range = menuReorderableRange(items, fromIndex);\n if (!range) return null;\n\n const clamped = Math.min(Math.max(insertBefore, range.start), range.end + 1);\n let toIndex = clamped;\n if (fromIndex < toIndex) toIndex -= 1;\n if (toIndex === fromIndex || toIndex < range.start || toIndex > range.end) return null;\n\n const next = [...items];\n const [item] = next.splice(fromIndex, 1);\n next.splice(toIndex, 0, item);\n return next;\n}\n\n/** Keyboard step: move one slot within the reorderable run. */\nexport function moveReorderableMenuItemBy(\n items: readonly MenuItemData[],\n fromIndex: number,\n offset: number,\n): MenuItemData[] | null {\n if (offset === 0) return null;\n return moveReorderableMenuItemBefore(\n items,\n fromIndex,\n fromIndex + (offset < 0 ? offset : offset + 1),\n );\n}\n\nexport function locateMenuItem(\n sections: readonly MenuSection[],\n flatIndex: number,\n): { sectionIndex: number; itemIndex: number; items: MenuItemData[] } | null {\n let remaining = flatIndex;\n for (let sectionIndex = 0; sectionIndex < sections.length; sectionIndex += 1) {\n const section = sections[sectionIndex];\n if (isMenuPickerSection(section)) continue;\n if (remaining < section.items.length) {\n return { sectionIndex, itemIndex: remaining, items: section.items };\n }\n remaining -= section.items.length;\n }\n return null;\n}\n\nexport function createMenuReorderDetail(\n items: MenuItemData[],\n fromIndex: number,\n nextItems: MenuItemData[],\n sectionIndex: number,\n): MenuReorderDetail | null {\n const item = items[fromIndex];\n if (!item) return null;\n const toIndex = nextItems.indexOf(item);\n if (toIndex < 0) {\n const value = item.value;\n const matched = value\n ? nextItems.findIndex(candidate => candidate.value === value)\n : -1;\n if (matched < 0) return null;\n return { item, fromIndex, toIndex: matched, sectionIndex, items: nextItems };\n }\n return { item, fromIndex, toIndex, sectionIndex, items: nextItems };\n}\n","@import '../../utils/choice-list.css';\n@import '../../utils/visually-hidden.css';\n@import '../../utils/forced-colors.css';\n\n/* Inactive: `.ds-control-inactive` (50% opacity). */\n\n.menu-item--destructive .menu-item__label {\n /* Beat ds-text color-* host classes for destructive rows. */\n color: var(--color-foreground-bold-negative) !important;\n}\n\n/* Standard md icon zone keeps the dot aligned with other control suffixes. */\n.menu-item__dot-box {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--ds-control-icon, var(--dimension-iconography-md));\n height: var(--ds-control-icon, var(--dimension-iconography-md));\n pointer-events: none;\n}\n\n/* Switch suffix keeps an 8px label-to-control gap without changing the\n density gap between a prefix icon or drag handle and the label. */\n.menu-item__switch {\n flex-shrink: 0;\n margin-inline-start: calc(\n var(--dimension-space-100) - var(--ds-control-gap, var(--dimension-space-050))\n );\n}\n\n/* ── Prefix icon / reorder handle ────────────────────────────────────────── */\n\n.menu-item > .menu-item__handle {\n pointer-events: auto;\n cursor: grab;\n touch-action: none;\n}\n\n.menu-item > .menu-item__handle:active,\n.menu-item--dragging > .menu-item__handle {\n cursor: grabbing;\n}\n\n.menu-item--dragging {\n opacity: var(--effect-opacity-medium);\n}\n\n.menu-item__drop-rail {\n position: absolute;\n z-index: var(--dimension-z-index-raised);\n inset-inline: var(--dimension-space-050);\n block-size: var(--dimension-stroke-width-025);\n border-radius: var(--dimension-radius-half);\n background: var(--color-border-bold-brand);\n pointer-events: none;\n}\n\n.menu-item__drop-rail--before {\n inset-block-start: calc(-1 * var(--dimension-space-025));\n transform: translateY(-50%);\n}\n\n.menu-item__drop-rail--after {\n inset-block-end: calc(-1 * var(--dimension-space-025));\n transform: translateY(50%);\n}\n\n@media (forced-colors: active) {\n .menu-item__drop-rail {\n background: var(--ds-forced-color-selected);\n }\n}\n","import {\n Component,\n Prop,\n State,\n Event,\n EventEmitter,\n Element,\n Watch,\n Listen,\n h,\n Host,\n} from '@stencil/core';\nimport {\n choicePopupMinWidth,\n CONTROL_SUPPORTING_TEXT_VARIANT,\n CONTROL_TEXT_VARIANT,\n resolveChoicePopupAlignOffset,\n resolveCssLengthPx,\n resolveMotionTimeMs,\n TOKEN_CSS_LENGTHS,\n TOKEN_DEFAULTS,\n type ChoicePopupAnchorAlignment,\n type ControlSize,\n} from '../../utils';\nimport { AnchoredPositionController } from '../../utils/anchored-position-controller';\nimport { computeAnchoredPosition, type AnchoredPositionInput } from '../../utils/anchored-position';\nimport type { MenuAlign, MenuSide } from './menu-position';\nimport {\n isMenuPickerSection,\n isMenuSwatchPickerSection,\n type MenuItemData,\n type MenuReorderDetail,\n type MenuSection,\n} from './menu-types';\nimport { snapshotMenuSections } from './menu-sections';\nimport {\n createMenuReorderDetail,\n locateMenuItem,\n menuReorderableRange,\n moveReorderableMenuItemBefore,\n moveReorderableMenuItemBy,\n} from './menu-reorder';\n\nexport type MenuSelectionMode = 'none' | 'single';\nexport type MenuSize = ControlSize;\nconst MENU_ITEM_TAG_SIZE: Record<MenuSize, 'md' | 'sm' | 'xs'> = {\n lg: 'md',\n md: 'sm',\n sm: 'xs',\n xs: 'xs',\n};\n\nconst MENU_FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\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 /** Choice-row density. */\n @Prop() size: MenuSize = 'md';\n /** Give ordinary rows mutually-exclusive menu semantics using isSelected. */\n @Prop() selectionMode: MenuSelectionMode = 'none';\n @Prop() sections: MenuSection[] = [];\n /** Preferred side; placement flips to the opposite side when that offers a better fit. */\n @Prop() side: MenuSide = 'bottom';\n @Prop() align: MenuAlign = 'start';\n /** Align choice-row edges to the anchor by default; use `popup-frame` only for custom frame geometry. */\n @Prop() anchorAlignment: ChoicePopupAnchorAlignment = 'choice-cell';\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 /** Accessible name for the popup menu. */\n @Prop() menuLabel: string = 'Menu';\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 availableHeight: number | null = null;\n @State() private focusRingVisible: boolean = false;\n @State() private reorderFromFlat: number | null = null;\n @State() private reorderInsertBefore: number | null = null;\n @State() private reorderAnnouncement = '';\n\n @Event() dsClose!: EventEmitter<void>;\n /** Emitted after the popup's exit motion is complete and its rendered content is removed. */\n @Event() dsAfterClose!: EventEmitter<void>;\n @Event() dsSelect!: EventEmitter<MenuItemData>;\n /** Emitted when a generic `swatch-picker` section option is chosen. */\n @Event() dsSwatchSelect!: EventEmitter<string>;\n /** Emitted after a pointer drop or keyboard move; Menu never mutates item order. */\n @Event() dsReorder!: EventEmitter<MenuReorderDetail>;\n\n private clickOutsideHandler: ((e: MouseEvent) => void) | null = null;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private positionReadyCallback: (() => void) | undefined;\n private suppressItemClick = false;\n private reorderPointer: {\n pointerId: number;\n sectionIndex: number;\n fromIndex: number;\n } | null = null;\n /**\n * Anchored placement. The choice-cell measurement stays here on purpose: the\n * inner-cell align offset and the `--dimension-menu-width-xs` floor are Menu\n * semantics, not shared geometry.\n */\n private readonly position = new AnchoredPositionController({\n getAnchor: () => this.resolvedAnchor ?? null,\n getPopup: () => this.el.querySelector<HTMLElement>('.menu-popup'),\n measure: (anchorEl, popup) => {\n if (!this.open) return null;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n const sectionInsetPx = this.viewportPadPx;\n if (!this.minWidth) {\n if (\n this.anchorAlignment === 'choice-cell' &&\n (this.side === 'top' || this.side === 'bottom')\n ) {\n popup.style.minWidth = `max(var(--dimension-menu-width-xs), ${choicePopupMinWidth(\n anchorRect.width,\n sectionInsetPx\n )}px)`;\n } else {\n popup.style.removeProperty('min-width');\n }\n }\n\n const viewportPadPx = this.viewportPadPx;\n const list = popup.querySelector<HTMLElement>('.ds-choice-list');\n const naturalPopupHeight = Math.min(\n Math.max(popup.offsetHeight, list?.scrollHeight ?? 0),\n window.innerHeight - viewportPadPx * 2\n );\n const input: AnchoredPositionInput = {\n anchorRect,\n popupWidth: popup.offsetWidth || this.popupFallbackWidthPx,\n popupHeight: naturalPopupHeight || this.popupFallbackHeightPx,\n side: this.side,\n align: this.align,\n sideOffsetPx: this.sideOffsetPx,\n alignOffsetPx: resolveChoicePopupAlignOffset({\n align: this.align,\n alignOffsetPx: this.alignOffsetPx,\n sectionInsetPx,\n anchorAlignment: this.anchorAlignment,\n }),\n viewportPadPx,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n };\n const unconstrained = computeAnchoredPosition(input);\n return {\n ...input,\n popupHeight: Math.min(input.popupHeight, unconstrained.availableHeight),\n };\n },\n apply: ({ x, y, availableHeight }) => {\n this.pos = { x, y };\n this.availableHeight = availableHeight;\n },\n onReady: () => {\n this.positionReady = true;\n },\n liveUpdate: 'double-frame',\n topLayer: true,\n });\n /** Last content actually painted while open; retained unchanged through exit motion. */\n private lastRenderedSections: MenuSection[] = [];\n private closingSections: MenuSection[] | null = null;\n\n componentDidLoad() {\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.cancelPositionRetry();\n this.cancelLivePositionUpdate();\n this.clearReorderPointer();\n this.teardownListeners();\n }\n\n @Watch('open')\n onOpenChange(isOpen: boolean) {\n if (isOpen) {\n this.teardownListeners();\n this.closingSections = null;\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.availableHeight = null;\n this.focusRingVisible = this.initialFocusVisible;\n this.setupListeners();\n this.schedulePositionUpdate(() => {\n this.focusInitialItem();\n });\n } else if (this.shouldRender) {\n this.positionReadyCallback = undefined;\n this.cancelPositionRetry();\n this.captureClosingSections();\n this.closing = true;\n this.teardownListeners();\n const closeAnimationMs = this.closeAnimationMs;\n if (closeAnimationMs <= 0) {\n this.finishClose();\n return;\n }\n this.closeTimer = setTimeout(() => {\n this.closeTimer = null;\n this.finishClose();\n }, 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('anchorAlignment')\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 resolveMotionTimeMs(TOKEN_DEFAULTS.motionShort2, TOKEN_DEFAULTS.animationDurationShort3);\n }\n\n private finishClose() {\n const popup = this.el.querySelector<HTMLElement>('.menu-popup');\n if (popup?.matches(':popover-open')) popup.hidePopover();\n this.shouldRender = false;\n this.closing = false;\n this.lastRenderedSections = [];\n this.closingSections = null;\n this.clearReorderPointer();\n this.reorderAnnouncement = '';\n this.dsAfterClose.emit();\n }\n\n private captureClosingSections() {\n if (this.closingSections) return;\n const visibleSections = this.lastRenderedSections.length\n ? this.lastRenderedSections\n : this.activeSections;\n this.closingSections = snapshotMenuSections(visibleSections);\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 anchorFocusTarget(): HTMLElement | null {\n const anchor = this.resolvedAnchor;\n if (!anchor) return null;\n if (anchor.matches(MENU_FOCUSABLE_SELECTOR)) return anchor;\n return anchor.querySelector<HTMLElement>(MENU_FOCUSABLE_SELECTOR) ?? anchor;\n }\n\n private focusAnchor() {\n const anchor = this.resolvedAnchor as\n (HTMLElement & { setFocus?: () => Promise<void> | void }) | null;\n if (anchor?.setFocus) {\n anchor.setFocus();\n return;\n }\n this.anchorFocusTarget?.focus();\n }\n\n private moveFocusAfterTab(backwards: boolean) {\n const anchor = this.anchorFocusTarget;\n if (!anchor) return;\n if (backwards) {\n anchor.focus();\n return;\n }\n\n const candidates = Array.from(\n document.querySelectorAll<HTMLElement>(MENU_FOCUSABLE_SELECTOR)\n ).filter(\n element =>\n !element.closest('.menu-popup') &&\n !element.closest('[inert]') &&\n element.getClientRects().length > 0\n );\n const index = candidates.indexOf(anchor);\n (candidates[index + 1] ?? anchor).focus();\n }\n\n private compositeTabLeavesPopup(event: KeyboardEvent): boolean {\n const popup = this.el.querySelector<HTMLElement>('.menu-popup');\n if (!popup) return true;\n const focusables = Array.from(\n popup.querySelectorAll<HTMLElement>(MENU_FOCUSABLE_SELECTOR)\n ).filter(element => element.getClientRects().length > 0);\n const currentIndex = focusables.indexOf(event.target as HTMLElement);\n if (currentIndex < 0) return true;\n return event.shiftKey ? currentIndex === 0 : currentIndex === focusables.length - 1;\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 isMenuPickerSection(section) ? [] : section.items\n );\n }\n\n /** Rich preference content is a non-modal dialog, not an ARIA action menu. */\n private get hasCompositeSections(): boolean {\n return this.activeSections.some(isMenuPickerSection);\n }\n\n private cancelPositionRetry() {\n this.position.cancel();\n }\n\n private cancelLivePositionUpdate() {\n this.position.cancel();\n }\n\n /** Reposition after the current scroll/layout frame without hiding the open popup. */\n private scheduleLivePositionUpdate() {\n this.position.scheduleLiveUpdate();\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 this.positionReady = false;\n // Opening often sets `open` and `anchorId` together. Each Watch reschedules\n // placement; keep the open-path ready callback so initial focus is not dropped.\n if (onReady) this.positionReadyCallback = onReady;\n const callback = this.positionReadyCallback;\n this.position.schedule(() => {\n if (this.positionReadyCallback === callback) {\n this.positionReadyCallback = undefined;\n }\n callback?.();\n });\n }\n\n /** @returns `true` when anchor and popup were found and `pos` was updated. */\n private calculatePosition(): boolean {\n return this.position.update();\n }\n\n /** Focus the selected item when present, otherwise the first enabled item. */\n private focusInitialItem() {\n if (this.hasCompositeSections) {\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>('.menu-popup [tabindex=\"0\"]')?.focus();\n });\n return;\n }\n\n const flat = this.flatItems;\n const selectedIdx = flat.findIndex(it => it.isSelected && !it.isInactive);\n const firstEnabledIdx = flat.findIndex(it => !it.isInactive || !!it.reorderable);\n this.focusedIndex = selectedIdx >= 0 ? selectedIdx : 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 document.addEventListener('mousedown', this.clickOutsideHandler, true);\n this.position.observe();\n }\n\n private teardownListeners() {\n this.position.unobserve();\n if (this.clickOutsideHandler) {\n document.removeEventListener('mousedown', this.clickOutsideHandler, true);\n this.clickOutsideHandler = null;\n }\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private close(restoreFocus = true) {\n this.captureClosingSections();\n if (restoreFocus) this.focusAnchor();\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\n if (e.key === 'Escape') {\n e.preventDefault();\n this.close();\n return;\n }\n\n if (e.key === 'Tab') {\n if (this.hasCompositeSections && !this.compositeTabLeavesPopup(e)) return;\n e.preventDefault();\n this.close(false);\n this.moveFocusAfterTab(e.shiftKey);\n return;\n }\n\n if (this.hasCompositeSections) return;\n\n if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && e.altKey && !e.ctrlKey && !e.shiftKey) {\n this.handleReorderKey(e);\n return;\n }\n\n const flat = this.flatItems;\n const enabled = flat\n .map((it, i) => ({ it, i }))\n .filter(({ it }) => !it.isInactive || !!it.reorderable)\n .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();\n 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();\n 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();\n e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[0];\n this.focusItem(this.focusedIndex);\n break;\n case 'End':\n e.preventDefault();\n e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[enabled.length - 1];\n this.focusItem(this.focusedIndex);\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 (this.suppressItemClick) {\n this.suppressItemClick = false;\n return;\n }\n if (item.isInactive) return;\n // Consumers commonly change the item source while handling selection.\n // Capture first so the exit animation never paints the next menu context.\n this.captureClosingSections();\n this.dsSelect.emit(item);\n }\n\n private handleSwatchSelect(value: string) {\n this.dsSwatchSelect.emit(value);\n }\n\n private handleReorderKey(event: KeyboardEvent): void {\n const located = locateMenuItem(this.activeSections, this.focusedIndex);\n if (!located || !located.items[located.itemIndex]?.reorderable) return;\n\n const nextItems = moveReorderableMenuItemBy(\n located.items,\n located.itemIndex,\n event.key === 'ArrowUp' ? -1 : 1\n );\n if (!nextItems) return;\n\n event.preventDefault();\n event.stopPropagation();\n this.emitReorder(located.items, located.itemIndex, nextItems, located.sectionIndex);\n }\n\n private emitReorder(\n items: MenuItemData[],\n fromIndex: number,\n nextItems: MenuItemData[],\n sectionIndex: number\n ): void {\n const detail = createMenuReorderDetail(items, fromIndex, nextItems, sectionIndex);\n if (!detail) return;\n this.focusedIndex = this.flatIndexFor(sectionIndex, detail.toIndex);\n this.announceReorder(detail);\n this.dsReorder.emit(detail);\n }\n\n private flatIndexFor(sectionIndex: number, itemIndex: number): number {\n let flat = 0;\n for (let index = 0; index < this.activeSections.length; index += 1) {\n const section = this.activeSections[index];\n if (isMenuPickerSection(section)) continue;\n if (index === sectionIndex) return flat + itemIndex;\n flat += section.items.length;\n }\n return itemIndex;\n }\n\n private announceReorder(detail: MenuReorderDetail): void {\n const range = menuReorderableRange(detail.items, detail.toIndex);\n const count = range ? range.end - range.start + 1 : detail.items.length;\n const position = range ? detail.toIndex - range.start + 1 : detail.toIndex + 1;\n this.reorderAnnouncement = `${detail.item.label} moved to position ${position} of ${count}`;\n }\n\n private onReorderPointerDown(\n event: PointerEvent,\n sectionIndex: number,\n itemIndex: number,\n flatIndex: number\n ): void {\n if (event.button !== 0) return;\n const section = this.activeSections[sectionIndex];\n if (!section || isMenuPickerSection(section)) return;\n if (!section.items[itemIndex]?.reorderable) return;\n\n event.preventDefault();\n event.stopPropagation();\n this.suppressItemClick = true;\n this.focusRingVisible = false;\n this.focusedIndex = flatIndex;\n this.focusItem(flatIndex);\n this.reorderPointer = {\n pointerId: event.pointerId,\n sectionIndex,\n fromIndex: itemIndex,\n };\n this.reorderFromFlat = flatIndex;\n this.reorderInsertBefore = itemIndex;\n window.addEventListener('pointermove', this.onReorderPointerMove);\n window.addEventListener('pointerup', this.onReorderPointerUp);\n window.addEventListener('pointercancel', this.onReorderPointerCancel);\n }\n\n private onReorderPointerMove = (event: PointerEvent) => {\n const drag = this.reorderPointer;\n if (!drag || event.pointerId !== drag.pointerId) return;\n const section = this.activeSections[drag.sectionIndex];\n if (!section || isMenuPickerSection(section)) return;\n\n const insertBefore = this.resolveReorderInsertBefore(\n event.clientY,\n drag.sectionIndex,\n drag.fromIndex,\n section.items\n );\n if (insertBefore !== this.reorderInsertBefore) this.reorderInsertBefore = insertBefore;\n };\n\n private onReorderPointerUp = (event: PointerEvent) => {\n const drag = this.reorderPointer;\n if (!drag || event.pointerId !== drag.pointerId) return;\n\n const section = this.activeSections[drag.sectionIndex];\n const insertBefore = this.reorderInsertBefore;\n this.clearReorderPointer();\n queueMicrotask(() => {\n this.suppressItemClick = false;\n });\n if (!section || isMenuPickerSection(section) || insertBefore === null) return;\n\n const nextItems = moveReorderableMenuItemBefore(section.items, drag.fromIndex, insertBefore);\n if (!nextItems) return;\n this.emitReorder(section.items, drag.fromIndex, nextItems, drag.sectionIndex);\n };\n\n private onReorderPointerCancel = (event: PointerEvent) => {\n if (!this.reorderPointer || event.pointerId !== this.reorderPointer.pointerId) return;\n this.clearReorderPointer();\n queueMicrotask(() => {\n this.suppressItemClick = false;\n });\n };\n\n private resolveReorderInsertBefore(\n clientY: number,\n sectionIndex: number,\n fromIndex: number,\n items: MenuItemData[]\n ): number {\n const range = menuReorderableRange(items, fromIndex);\n if (!range) return fromIndex;\n\n const buttons = [...this.el.querySelectorAll<HTMLElement>('.menu-item')];\n const sectionStart = this.flatIndexFor(sectionIndex, 0);\n let insertBefore = range.end + 1;\n for (let itemIndex = range.start; itemIndex <= range.end; itemIndex += 1) {\n const row = buttons[sectionStart + itemIndex];\n if (!row) continue;\n const rect = row.getBoundingClientRect();\n if (clientY < rect.top + rect.height / 2) {\n insertBefore = itemIndex;\n break;\n }\n }\n return Math.min(Math.max(insertBefore, range.start), range.end + 1);\n }\n\n private clearReorderPointer(): void {\n if (this.reorderPointer) {\n window.removeEventListener('pointermove', this.onReorderPointerMove);\n window.removeEventListener('pointerup', this.onReorderPointerUp);\n window.removeEventListener('pointercancel', this.onReorderPointerCancel);\n }\n this.reorderPointer = null;\n this.reorderFromFlat = null;\n this.reorderInsertBefore = null;\n }\n\n render() {\n if (!this.shouldRender) return <Host style={{ display: 'contents' }} />;\n\n const sections = this.closing\n ? (this.closingSections ?? this.lastRenderedSections)\n : this.activeSections;\n const hasCompositeSections = sections.some(isMenuPickerSection);\n if (!this.closing) {\n this.lastRenderedSections = snapshotMenuSections(sections);\n this.closingSections = null;\n }\n let flatIdx = 0;\n const dragLocated =\n this.reorderFromFlat === null ? null : locateMenuItem(sections, this.reorderFromFlat);\n const dragRange = dragLocated\n ? menuReorderableRange(dragLocated.items, dragLocated.itemIndex)\n : null;\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 if (this.availableHeight !== null) {\n popupStyle['max-height'] = `${Math.floor(this.availableHeight)}px`;\n }\n\n return (\n <Host style={{ display: 'contents' }}>\n <div\n popover=\"manual\"\n class={{\n 'menu-popup': true,\n 'menu-popup--closing': this.closing,\n 'ds-choice-popup': true,\n 'ds-choice-popup--closing': this.closing,\n }}\n style={popupStyle}\n role={hasCompositeSections ? 'dialog' : 'menu'}\n aria-label={this.menuLabel}\n aria-orientation={hasCompositeSections ? undefined : 'vertical'}\n >\n <div class=\"ds-choice-list\">\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--swatch-picker': isMenuPickerSection(section),\n 'ds-choice-section': true,\n 'ds-chrome-column': true,\n 'ds-chrome-space--sm': true,\n 'ds-choice-section--divided': si < sections.length - 1,\n 'ds-choice-section--headed-after-first': si > 0 && Boolean(section.header),\n }}\n role={section.header ? 'group' : undefined}\n aria-label={section.header}\n >\n {section.header && (\n <ds-text\n class={`section-header ds-choice-section__header ds-control-section-heading ds-control--${this.size}`}\n as=\"span\"\n variant={CONTROL_SUPPORTING_TEXT_VARIANT[this.size]}\n emphasis\n color=\"primary\"\n aria-hidden=\"true\"\n >\n <span class=\"ds-choice-section__header-label\">{section.header}</span>\n </ds-text>\n )}\n {isMenuSwatchPickerSection(section) ? (\n <ds-swatch-picker\n value={section.value}\n groupLabel={section.groupLabel ?? section.header ?? 'Swatch options'}\n options={section.options ?? []}\n sections={section.sections ?? []}\n onDsChange={(e: CustomEvent<string>) => {\n e.stopPropagation();\n this.handleSwatchSelect(e.detail);\n }}\n />\n ) : (\n section.items.map((item, itemIndex) => {\n const idx = flatIdx++;\n const isFocused = this.focusedIndex === idx;\n const isSingleSelectionItem =\n !hasCompositeSections && this.selectionMode === 'single' && !item.showSwitch;\n const usesLeading = section.items.some(\n candidate => candidate.reorderable || !!candidate.icon\n );\n const locked = !!item.isInactive && !item.reorderable;\n const dragging = this.reorderFromFlat === idx;\n const dropBefore =\n dragLocated?.sectionIndex === si &&\n dragRange !== null &&\n itemIndex <= dragRange.end &&\n this.reorderInsertBefore === itemIndex;\n const dropAfter =\n dragLocated?.sectionIndex === si &&\n dragRange !== null &&\n this.reorderInsertBefore === dragRange.end + 1 &&\n itemIndex === dragRange.end;\n return (\n <button\n key={item.value ?? `${si}-${item.label}`}\n type=\"button\"\n class={{\n 'menu-item': true,\n 'ds-choice-item': true,\n 'ds-control-frame': true,\n [`ds-control--${this.size}`]: true,\n 'ds-focus-ring-inset': true,\n 'ds-focus-ring--visible': isFocused && this.focusRingVisible,\n 'ds-interaction-fill': !locked,\n 'ds-interaction-fill--selected': !!item.isSelected && !locked,\n 'menu-item--selected': !!item.isSelected,\n 'menu-item--switch': !!item.showSwitch,\n 'ds-control-inactive': locked,\n 'menu-item--destructive': !!item.isDestructive,\n 'menu-item--focused': isFocused,\n 'menu-item--dragging': dragging,\n }}\n role={\n hasCompositeSections\n ? undefined\n : item.showSwitch\n ? 'menuitemcheckbox'\n : isSingleSelectionItem\n ? 'menuitemradio'\n : 'menuitem'\n }\n aria-checked={\n !hasCompositeSections && item.showSwitch\n ? String(!!item.switchValue)\n : isSingleSelectionItem\n ? String(!!item.isSelected)\n : undefined\n }\n aria-pressed={\n hasCompositeSections\n ? String(item.showSwitch ? !!item.switchValue : !!item.isSelected)\n : undefined\n }\n aria-current={\n !hasCompositeSections &&\n !item.showSwitch &&\n !isSingleSelectionItem &&\n item.isSelected\n ? 'true'\n : undefined\n }\n aria-description={\n item.reorderable\n ? item.isInactive\n ? 'Visibility cannot be changed. Alt + Arrow Up or Alt + Arrow Down moves this row.'\n : 'Drag to reorder. Alt + Arrow Up or Alt + Arrow Down moves this row.'\n : undefined\n }\n aria-disabled={item.isInactive ? 'true' : undefined}\n disabled={locked}\n tabIndex={hasCompositeSections ? 0 : isFocused ? 0 : -1}\n onMouseDown={() => {\n this.focusRingVisible = false;\n }}\n onClick={() => this.handleItemClick(item)}\n onFocus={() => {\n this.focusedIndex = idx;\n }}\n >\n {(dropBefore || dropAfter) && (\n <span\n class={{\n 'menu-item__drop-rail': true,\n 'menu-item__drop-rail--before': dropBefore,\n 'menu-item__drop-rail--after': dropAfter,\n }}\n data-menu-drop-rail\n aria-hidden=\"true\"\n />\n )}\n {item.reorderable ? (\n <span\n class=\"menu-item__handle ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n data-menu-handle\n aria-hidden=\"true\"\n onPointerDown={event =>\n this.onReorderPointerDown(event, si, itemIndex, idx)\n }\n onClick={event => {\n event.preventDefault();\n event.stopPropagation();\n }}\n >\n <ds-icon name=\"Drag\" size={this.size} color=\"inherit\" />\n </span>\n ) : usesLeading && item.icon ? (\n <span\n class=\"menu-item__icon ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name={item.icon} size={this.size} color=\"inherit\" />\n </span>\n ) : usesLeading ? (\n <span\n class=\"menu-item__icon-spacer ds-choice-item__icon ds-control-icon-box\"\n aria-hidden=\"true\"\n />\n ) : null}\n <div class=\"menu-item__content ds-choice-item__content ds-interaction-fill__content\">\n <ds-text\n class=\"menu-item__label ds-choice-item__label ds-control-label-box\"\n as=\"span\"\n variant={CONTROL_TEXT_VARIANT[this.size]}\n color={item.isSelected ? 'primary' : 'secondary'}\n >\n {item.label}\n </ds-text>\n {item.subtext && (\n <ds-text\n class=\"menu-item__subtext ds-choice-item__subtext ds-control-label-box\"\n as=\"span\"\n variant={CONTROL_SUPPORTING_TEXT_VARIANT[this.size]}\n color=\"secondary\"\n >\n {item.subtext}\n </ds-text>\n )}\n </div>\n {item.tag && (\n <ds-tag\n class=\"ds-choice-item__tag ds-interaction-fill__content\"\n label={item.tag.label}\n size={MENU_ITEM_TAG_SIZE[this.size]}\n intent={item.tag.intent ?? 'neutral'}\n contrast={item.tag.contrast ?? 'faint'}\n rounded={item.tag.rounded ?? false}\n isInset\n />\n )}\n {item.dot && (\n <span\n class=\"menu-item__dot-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-badge\n class=\"menu-item__dot\"\n variant=\"dot\"\n hasRing={false}\n label=\"\"\n />\n </span>\n )}\n {item.showSwitch && (\n <ds-switch\n class=\"menu-item__switch ds-interaction-fill__content\"\n size={this.size}\n checked={!!item.switchValue}\n isInactive={!!item.isInactive}\n presentation\n />\n )}\n </button>\n );\n })\n )}\n </div>\n ))}\n </div>\n </div>\n <div class=\"ds-visually-hidden\" role=\"status\" aria-live=\"polite\">\n {this.reorderAnnouncement}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"keAgEM,SAAUA,EACdC,GAEA,MAAO,YAAaA,GAAWA,EAAQC,UAAY,eACrD,CAEM,SAAUC,EACdF,GAEA,OAAOD,EAA0BC,EACnC,CCtEM,SAAUG,EAAqBC,GACnC,OAAOA,EAASC,KAAIL,IAClB,GAAID,EAA0BC,GAAU,CACtC,MAAO,IACFA,KACCA,EAAQM,QACR,CAAEA,QAASN,EAAQM,QAAQD,KAAIE,IAAM,IAAUA,OAC/C,MACAP,EAAQI,SACR,CACEA,SAAUJ,EAAQI,SAASC,KAAIG,IAAa,IACvCA,EACHF,QAASE,EAAcF,QAAQD,KAAIE,IAAM,IAAUA,WAGvD,G,CAGR,MAAO,IAAKP,EAASS,MAAOT,EAAQS,MAAMJ,KAAIK,IAAI,IAAUA,MAAU,GAE1E,CCXM,SAAUC,EACdF,EACAG,GAEA,IAAKH,EAAMG,IAAQC,YAAa,OAAO,KAEvC,IAAIC,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,aACEe,MAAM,iDACNvN,KAAMF,KAAKE,KACX+P,UAAW9S,EAAK6R,YAChBrF,aAAcxM,EAAKwM,WACnBuG,aAAY,OAGT,SAQvBxD,EAAA,OAAKe,MAAM,qBAAqBC,KAAK,SAAQ,YAAW,UACrD1N,KAAKwB,qB","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{p as e,H as s,c as i,h as d,a,t as o}from"./index.js";import{g as r}from"./p-BQq26pt9.js";import{d as t}from"./p-DbJahF86.js";import{d as n}from"./p-BFfLvMZd.js";import{d as c}from"./p-DKY3IJqt.js";import{d as m}from"./p-CbZ0RU2c.js";import{d as h}from"./p-Dl3gciej.js";import{d as l}from"./p-HZz5aJKz.js";import{d as b}from"./p-CHEt4mW8.js";import{d as p}from"./p-3WlVHGUe.js";import{d as g}from"./p-LHzBS95u.js";const u=()=>`.ds-chrome-space--sm.sc-ds-mobile-header-h,.ds-chrome-space--sm.sc-ds-mobile-header{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-mobile-header-h,.ds-chrome-space--md.sc-ds-mobile-header{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-mobile-header-h,.ds-chrome-space--lg.sc-ds-mobile-header{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-mobile-header-h,.ds-chrome-row.sc-ds-mobile-header,.ds-chrome-column.sc-ds-mobile-header-h,.ds-chrome-column.sc-ds-mobile-header,.ds-chrome-grid.sc-ds-mobile-header-h,.ds-chrome-grid.sc-ds-mobile-header{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-mobile-header-h,.ds-chrome-row.sc-ds-mobile-header{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-mobile-header-h,.ds-chrome-column.sc-ds-mobile-header{flex-direction:column}.ds-chrome-grid.sc-ds-mobile-header-h,.ds-chrome-grid.sc-ds-mobile-header{display:grid;align-items:center}.sc-ds-mobile-header-h{display:block;min-width:0;box-sizing:border-box;background:var(--color-background-primary);color:var(--color-foreground-primary)}[tone='brand'].sc-ds-mobile-header-h{background:var(--color-background-bold-brand);color:var(--color-foreground-on-bold)}.mobile-header.sc-ds-mobile-header{position:relative;display:flex;flex-direction:column;width:100%;min-width:0;box-sizing:border-box;background:inherit;color:inherit}.mobile-header__primary.sc-ds-mobile-header{grid-template-columns:minmax(var(--dimension-size-400), 1fr) minmax(0, auto) minmax(var(--dimension-size-400), 1fr);width:100%;height:calc(var(--dimension-size-500) + var(--dimension-space-200));min-width:0;background:inherit;color:inherit}.mobile-header__primary--segmented.sc-ds-mobile-header{grid-template-columns:minmax(var(--dimension-size-500), 1fr) minmax(0, 4fr) minmax(var(--dimension-size-500), 1fr)}.mobile-header__primary--segmented.sc-ds-mobile-header .mobile-header__center.sc-ds-mobile-header,.mobile-header__primary--segmented.sc-ds-mobile-header ds-tab-group.sc-ds-mobile-header{width:100%}.sc-ds-mobile-header-h:not([tone='brand']) .mobile-header.sc-ds-mobile-header::after{content:'';position:absolute;inset-inline:0;inset-block-end:0;height:var(--dimension-stroke-width-012);background:var(--color-border-tertiary);pointer-events:none}.mobile-header__subsections.sc-ds-mobile-header{display:flex;align-items:center;justify-content:center;min-width:0;height:var(--dimension-size-600);padding:var(--dimension-space-100) var(--dimension-space-200);box-sizing:border-box}.mobile-header__subsections.sc-ds-mobile-header ds-mobile-section-switcher.sc-ds-mobile-header{min-width:0;max-width:100%}.mobile-header__lane.sc-ds-mobile-header{display:flex;align-items:center;gap:var(--dimension-space-050);min-width:0}.mobile-header__lane--leading.sc-ds-mobile-header{justify-content:flex-start}.mobile-header__lane--trailing.sc-ds-mobile-header{justify-content:flex-end}.mobile-header__center.sc-ds-mobile-header{position:relative;min-width:0;max-width:100%;justify-self:center}.mobile-header__heading.sc-ds-mobile-header{display:block;min-width:0;max-width:100%;text-align:center}.mobile-header__semantic-heading.sc-ds-mobile-header{position:absolute;width:var(--dimension-stroke-width-012);height:var(--dimension-stroke-width-012);padding:0;margin:calc(var(--dimension-stroke-width-012) * -1);overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.sc-ds-mobile-header-s>[slot='leading'],.sc-ds-mobile-header-s>[slot='trailing']{flex:0 0 auto}`;const f=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsSectionChange=i(this,"dsSectionChange",7);this.dsSubsectionChange=i(this,"dsSubsectionChange",7);this.heading="";this.headingLevel="h1";this.sections=[];this.value="";this.sectionsAriaLabel="Change page section";this.sectionsPresentation="switcher";this.sectionsSize="md";this.subsections=[];this.subvalue="";this.subsectionsAriaLabel="Change page subsection";this.tone="default";this.handleSectionChange=e=>{e.stopPropagation();this.dsSectionChange.emit(e.detail)};this.handleSubsectionChange=e=>{e.stopPropagation();this.dsSubsectionChange.emit(e.detail)}}get resolvedSections(){return this.sections??[]}get resolvedSubsections(){return this.subsections??[]}get selectedLabel(){const e=r(this.resolvedSections);return e.find((e=>e.id===this.value))?.label??e[0]?.label??this.heading}render(){const e=this.headingLevel;const s=r(this.resolvedSections);const i=s.length>1;const o=r(this.resolvedSubsections).length>1;const t=i&&this.sectionsPresentation==="segmented";const n=this.tone==="brand"?"on-bold":"primary";return d(a,{key:"c89b9ed48fb346e9cf753e994e9450f85249d63c"},d("header",{key:"4692a52f5e940b09d96a04efef7604fa4d29639c",class:"mobile-header"},d("div",{key:"efc2e1435d6ae5a95de4f77d2b3ca06ee7ef1f20",class:{"mobile-header__primary":true,"mobile-header__primary--segmented":t,"ds-chrome-grid":true,"ds-chrome-space--md":true}},d("div",{key:"dd3e54545edabb80659226b6381769875033a2e1",class:"mobile-header__lane mobile-header__lane--leading"},d("slot",{key:"dbee48994dd571a4b5e0d477c12ff941ef27e03b",name:"leading"})),d("div",{key:"df112979a9d737883b9d2c1b00addece879d328a",class:"mobile-header__center"},i?[d("span",{class:"mobile-header__semantic-heading",role:"heading","aria-level":this.headingLevel==="h1"?"1":"2"},this.selectedLabel),this.sectionsPresentation==="segmented"?d("ds-tab-group",{tabs:this.resolvedSections,value:this.value,size:this.sectionsSize,width:"fill",ariaLabel:this.sectionsAriaLabel,onDsChange:this.handleSectionChange}):d("ds-mobile-section-switcher",{sections:this.resolvedSections,value:this.value,navigationLabel:this.sectionsAriaLabel,onDsChange:this.handleSectionChange})]:d("ds-text",{class:"mobile-header__heading",as:e,variant:"text-body-medium",emphasis:true,color:n,lineTruncation:1},this.selectedLabel)),d("div",{key:"20fd8c550bfae143e0609067e2f5cc7d452dfcb8",class:"mobile-header__lane mobile-header__lane--trailing"},d("slot",{key:"05861343a348656a14594fbb24f9660bde95bf3d",name:"trailing"}))),o?d("nav",{class:"mobile-header__subsections","aria-label":this.subsectionsAriaLabel},d("ds-mobile-section-switcher",{sections:this.resolvedSubsections,value:this.subvalue,navigationLabel:this.subsectionsAriaLabel,onDsChange:this.handleSubsectionChange})):null))}static get style(){return u()}},[262,"ds-mobile-header",{heading:[1],headingLevel:[1,"heading-level"],sections:[16],value:[1],sectionsAriaLabel:[1,"sections-aria-label"],sectionsPresentation:[1,"sections-presentation"],sectionsSize:[1,"sections-size"],subsections:[16],subvalue:[1],subsectionsAriaLabel:[1,"subsections-aria-label"],tone:[513]}]);function v(){if(typeof customElements==="undefined"){return}const e=["ds-mobile-header","ds-badge","ds-icon","ds-menu","ds-mobile-section-switcher","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text"];e.forEach((e=>{switch(e){case"ds-mobile-header":if(!customElements.get(o(e))){customElements.define(o(e),f)}break;case"ds-badge":if(!customElements.get(o(e))){t()}break;case"ds-icon":if(!customElements.get(o(e))){n()}break;case"ds-menu":if(!customElements.get(o(e))){c()}break;case"ds-mobile-section-switcher":if(!customElements.get(o(e))){m()}break;case"ds-swatch-picker":if(!customElements.get(o(e))){h()}break;case"ds-switch":if(!customElements.get(o(e))){l()}break;case"ds-tab-group":if(!customElements.get(o(e))){b()}break;case"ds-tag":if(!customElements.get(o(e))){p()}break;case"ds-text":if(!customElements.get(o(e))){g()}break}}))}v();export{f as M,v as d};
2
- //# sourceMappingURL=p-DMaQkEYP.js.map
@@ -1,2 +0,0 @@
1
- import{p as t,H as i,c as e,h as s,a as n,t as o}from"./index.js";import{d as r}from"./p-DbJahF86.js";import{d}from"./p-DC_8dK55.js";import{d as a}from"./p-BFfLvMZd.js";import{d as c}from"./p-JPTkZ3Ji.js";import{d as l}from"./p-LHzBS95u.js";import{d as p}from"./p-Cj5Hkt6Y.js";import{D as u,s as h}from"./p-DOUk4KoT.js";import{s as f,r as v}from"./p-B8q-6a03.js";import{C as g}from"./p-CuwopElg.js";import{c as m}from"./p-DuFm-ieS.js";const b=()=>`@media (forced-colors: active){.sc-ds-input:root,.sc-ds-input-h,.ds-forced-colors-scope.sc-ds-input{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-interaction-fill.sc-ds-input-h,.ds-interaction-fill.sc-ds-input{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}.ds-interaction-fill.sc-ds-input-h::before,.ds-interaction-fill.sc-ds-input::before,.ds-interaction-fill.sc-ds-input-h::after,.ds-interaction-fill.sc-ds-input::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}.ds-interaction-fill.sc-ds-input-h::before,.ds-interaction-fill.sc-ds-input::before{z-index:1}.ds-interaction-fill.sc-ds-input-h::after,.ds-interaction-fill.sc-ds-input::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-input-h,.ds-interaction-fill--bordered.sc-ds-input{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-input-h::before,.ds-interaction-fill--selected.sc-ds-input::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-input-h,.ds-interaction-fill--selected.sc-ds-input{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-input-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-input:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}.ds-interaction-fill.sc-ds-input-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-input:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill--grouped.sc-ds-input-h::after,.ds-interaction-fill--grouped.sc-ds-input::after,.ds-interaction-fill--grouped.sc-ds-input-h:active:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-input:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill--grouped.sc-ds-input-h:hover:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-input:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}.ds-interaction-fill--grouped.sc-ds-input-h,.ds-interaction-fill--grouped.sc-ds-input{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}.ds-interaction-fill.sc-ds-input-h>.ds-interaction-fill__content.sc-ds-input,.ds-interaction-fill.sc-ds-input>.ds-interaction-fill__content.sc-ds-input,.ds-interaction-fill__content.sc-ds-input{position:relative;z-index:2;cursor:inherit}.ds-interaction-fill--on-faint.sc-ds-input-h,.ds-interaction-fill--on-faint.sc-ds-input{--ds-interaction-active:var(--color-interaction-active)}.ds-interaction-fill--on-medium.sc-ds-input-h,.ds-interaction-fill--on-medium.sc-ds-input{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-input-h,.ds-interaction-fill--on-bold.sc-ds-input{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-input-h,.ds-interaction-fill--on-strong.sc-ds-input{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-input-h,.ds-interaction-fill--on-translucent.sc-ds-input{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active-brand);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-input-h,.ds-interaction-fill--on-inverted.sc-ds-input{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active-brand);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-input-h,.ds-interaction-fill--on-media.sc-ds-input{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-input-h,.ds-interaction-fill--on-always-dark.sc-ds-input{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active-brand);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-input-h,.ds-interaction-fill--on-navigation.sc-ds-input{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}@media (forced-colors: active){.ds-interaction-fill.sc-ds-input-h::after,.ds-interaction-fill.sc-ds-input::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}.ds-interaction-fill--selected.sc-ds-input-h::before,.ds-interaction-fill--selected.sc-ds-input::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-input-h:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill.sc-ds-input:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}@media (forced-colors: active){.sc-ds-input:root,.sc-ds-input-h,.ds-forced-colors-scope.sc-ds-input{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-control-inactive.sc-ds-input-h,.ds-control-inactive.sc-ds-input{opacity:var(--effect-opacity-medium);pointer-events:none;cursor:not-allowed}@media (forced-colors: active){.ds-control-inactive.sc-ds-input-h,.ds-control-inactive.sc-ds-input{color:var(--ds-forced-color-disabled);opacity:1}}.ds-control--lg.sc-ds-input,.ds-control--lg.sc-ds-input-h,.ds-control--md.sc-ds-input-h,.ds-control--md.sc-ds-input,.ds-control--sm.sc-ds-input-h,.ds-control--sm.sc-ds-input,.ds-control--xs.sc-ds-input-h,.ds-control--xs.sc-ds-input{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-input-h,.ds-control--lg.sc-ds-input{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-input-h,.ds-control--md.sc-ds-input{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-input-h,.ds-control--sm.sc-ds-input{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-input-h,.ds-control--xs.sc-ds-input{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-control-frame.sc-ds-input{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-input{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-input{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-input{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-label-dot.sc-ds-input{position:relative;padding-inline-end:calc( var(--ds-control-label-inset, var(--dimension-space-025)) + var(--ds-control-gap, var(--dimension-space-050)) )}.ds-control-label-dot__badge.sc-ds-input{position:absolute;inset-block-start:0;inset-inline-end:0;pointer-events:none}.ds-control-width--hug.sc-ds-input-h,.ds-control-width--hug.sc-ds-input{width:fit-content;max-width:100%;flex:0 0 auto;align-self:flex-start}.ds-control-width--fill.sc-ds-input-h,.ds-control-width--fill.sc-ds-input{width:100%;min-width:0;flex:1 1 auto;align-self:stretch}.ds-field-stack.sc-ds-input-h,.ds-field-stack.sc-ds-input{display:flex;flex-direction:column;gap:var(--dimension-space-050)}.ds-text--display-medium.sc-ds-input-h,.ds-text--display-medium.sc-ds-input{font-size:var(--typography-fontsize-3xl);line-height:var(--typography-lineheight-3xl)}.ds-text--display-small.sc-ds-input-h,.ds-text--display-small.sc-ds-input{font-size:var(--typography-fontsize-2xl);line-height:var(--typography-lineheight-2xl)}.ds-text--title-large.sc-ds-input-h,.ds-text--title-large.sc-ds-input{font-size:var(--typography-fontsize-xl);line-height:var(--typography-lineheight-xl)}.ds-text--title-medium.sc-ds-input-h,.ds-text--title-medium.sc-ds-input{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--title-small.sc-ds-input-h,.ds-text--title-small.sc-ds-input{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-large.sc-ds-input-h,.ds-text--body-large.sc-ds-input{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--body-medium.sc-ds-input-h,.ds-text--body-medium.sc-ds-input{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-small.sc-ds-input-h,.ds-text--body-small.sc-ds-input{font-size:var(--typography-fontsize-sm);line-height:var(--typography-lineheight-sm)}.ds-text--caption.sc-ds-input-h,.ds-text--caption.sc-ds-input{font-size:var(--typography-fontsize-xs);line-height:var(--typography-lineheight-xs);text-transform:uppercase}.ds-text--display-medium.ds-text--emphasis.sc-ds-input-h,.ds-text--display-small.ds-text--emphasis.sc-ds-input-h,.ds-text--display-medium.ds-text--emphasis.sc-ds-input,.ds-text--display-small.ds-text--emphasis.sc-ds-input{font-weight:var(--typography-weight-bold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--display-medium.ds-text--regular.sc-ds-input-h,.ds-text--display-small.ds-text--regular.sc-ds-input-h,.ds-text--display-medium.ds-text--regular.sc-ds-input,.ds-text--display-small.ds-text--regular.sc-ds-input{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-large.ds-text--emphasis.sc-ds-input-h,.ds-text--title-large.ds-text--emphasis.sc-ds-input{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--title-large.ds-text--regular.sc-ds-input-h,.ds-text--title-large.ds-text--regular.sc-ds-input{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--emphasis.sc-ds-input-h,.ds-text--title-small.ds-text--emphasis.sc-ds-input-h,.ds-text--title-medium.ds-text--emphasis.sc-ds-input,.ds-text--title-small.ds-text--emphasis.sc-ds-input{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--regular.sc-ds-input-h,.ds-text--title-small.ds-text--regular.sc-ds-input-h,.ds-text--title-medium.ds-text--regular.sc-ds-input,.ds-text--title-small.ds-text--regular.sc-ds-input{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-large.ds-text--emphasis.sc-ds-input-h,.ds-text--body-medium.ds-text--emphasis.sc-ds-input-h,.ds-text--body-large.ds-text--emphasis.sc-ds-input,.ds-text--body-medium.ds-text--emphasis.sc-ds-input{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--body-large.ds-text--regular.sc-ds-input-h,.ds-text--body-medium.ds-text--regular.sc-ds-input-h,.ds-text--body-large.ds-text--regular.sc-ds-input,.ds-text--body-medium.ds-text--regular.sc-ds-input{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--emphasis.sc-ds-input-h,.ds-text--body-small.ds-text--emphasis.sc-ds-input{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--regular.sc-ds-input-h,.ds-text--body-small.ds-text--regular.sc-ds-input{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-none)}.ds-text--caption.ds-text--emphasis.sc-ds-input-h,.ds-text--caption.ds-text--emphasis.sc-ds-input{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-positive)}.ds-text--caption.ds-text--regular.sc-ds-input-h,.ds-text--caption.ds-text--regular.sc-ds-input{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-positive)}@media (forced-colors: active){.sc-ds-input:root,.sc-ds-input-h,.ds-forced-colors-scope.sc-ds-input{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.input-host.sc-ds-input-h{display:inline-flex;--ds-input-fg:var(--color-foreground-primary);--ds-input-placeholder:var(--color-foreground-secondary);--ds-input-placeholder-active:var(--color-foreground-quaternary);--ds-input-adornment-fg:var(--color-foreground-secondary);--ds-input-border:var(--color-border-secondary)}.ds-control-width--fill.sc-ds-input-h,.ds-control-width--fill.sc-ds-input-h .input-control.sc-ds-input{width:100%}.input-control.sc-ds-input{overflow:hidden;background:transparent;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));color:var(--ds-input-fg)}.input-control--bordered.sc-ds-input{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--ds-input-border)}.input-control--error.sc-ds-input{--ds-interaction-border-width:var(--dimension-stroke-width-018);--ds-interaction-border-color:var(--color-border-bold-negative)}.input-control--bordered.sc-ds-input:focus-within:not(.input-control--error){--ds-interaction-border-width:var(--dimension-stroke-width-018);--ds-interaction-border-color:var(--color-border-bold-brand)}.ds-control-inactive.sc-ds-input-h .input-control.sc-ds-input::after{background:transparent}.native-input.sc-ds-input{position:relative;z-index:2;flex:1 1 auto;min-width:0;height:100%;background:transparent;border:none;border-radius:inherit;outline:none;color:var(--ds-input-fg);font-family:inherit;text-overflow:ellipsis;-webkit-appearance:none;appearance:none}.native-input.sc-ds-input:disabled{cursor:not-allowed}.native-input.sc-ds-input:read-only:not(:disabled){cursor:default}.native-input.sc-ds-input::placeholder{color:var(--ds-input-placeholder)}.native-input.sc-ds-input:focus::placeholder{color:var(--ds-input-placeholder-active)}.native-input[type='search'].sc-ds-input::-webkit-search-cancel-button,.native-input[type='search'].sc-ds-input::-webkit-search-decoration{display:none}.input-control__prefix.sc-ds-input,.input-control__suffix.sc-ds-input{position:relative;z-index:2;color:var(--ds-input-adornment-fg)}.input-control__suffix--empty.sc-ds-input{display:none}.input-control.sc-ds-input>.input-control__clear.sc-ds-input{position:relative;z-index:2;flex-shrink:0;align-self:center}.input-control.ds-control--lg.sc-ds-input:has(.input-control__clear),.input-control.ds-control--md.sc-ds-input:has(.input-control__clear),.input-control.ds-control--sm.sc-ds-input:has(.input-control__clear){padding-right:var(--dimension-space-050)}.input-control.ds-control--xs.sc-ds-input:has(.input-control__clear){padding-right:0}.error-text.sc-ds-input{width:100%}@media (forced-colors: active){.input-control--bordered.sc-ds-input:focus-within:not(.input-control--error)::after{outline-color:var(--ds-forced-color-selected)}.input-control--error.sc-ds-input::after{outline-style:dashed}}`;const y={lg:"lg",md:"md",sm:"sm",xs:"xs"};const x={lg:"md",md:"sm",sm:"xs",xs:"xs"};let w=0;const k=t(class t extends i{constructor(t){super();if(t!==false){this.__registerHost()}this.dsChange=e(this,"dsChange",7);this.dsClear=e(this,"dsClear",7);this.internals=this.attachInternals();this.generatedId=`ds-input-${++w}`;this.errorId=`${this.generatedId}-error`;this.value="";this.disabled=false;this.readOnly=false;this.required=false;this.requiredMessage=u;this.clearLabel="Clear";this.type="text";this.inputMode="";this.enterKeyHint="";this.size="md";this.width="fill";this.hasBorder=true;this.isInactive=false;this.autoFocus=false;this.error=false;this.ariaLabel=null;this.initialValue="";this.formDisabled=false;this.hasSuffix=false;this.focused=false;this.touched=false;this.handleInput=t=>{this.value=t.target.value;this.dsChange.emit(this.value)};this.handleFocus=()=>{this.focused=true};this.handleBlur=()=>{this.focused=false;this.touched=true};this.handleClear=()=>{this.value="";this.dsChange.emit("");this.dsClear.emit();this.el.querySelector("input")?.focus()}}componentWillLoad(){this.initialValue=this.value;this.hasSuffix=Boolean(this.el.querySelector('[slot="suffix"]'));this.syncFormValue()}componentDidRender(){const t=Boolean(this.el.querySelector('[slot="suffix"]'));if(t!==this.hasSuffix)this.hasSuffix=t}syncFormValue(){const t=this.isInactive||this.disabled||this.formDisabled;f(this.internals,this.value,{inactive:t});const i=this.required&&!t&&this.value.length===0;h(this.internals,i,this.requiredMessage)}formDisabledCallback(t){this.formDisabled=t;this.syncFormValue()}formResetCallback(){this.value=this.initialValue}formStateRestoreCallback(t){this.value=v(t)}async setFocus(){this.el.querySelector("input")?.focus()}render(){const t=this.inputId??this.generatedId;const i=this.isInactive||this.disabled||this.formDisabled;const e=this.value.length>0;const o=this.value!==this.initialValue;const r=this.type==="search"&&e&&!i&&!this.readOnly;const d=this.error&&Boolean(this.errorMessage);const a=g[this.size];const c=y[this.size];const l=this.type==="number";const p=[this.ariaDescribedby,d?this.errorId:undefined].filter(Boolean).join(" ")||undefined;return s(n,{key:"fbd4d7d613ff843c6c2df605f9a0e218f8cafb69",class:{"input-host":true,"ds-field-stack":true,"ds-control-inactive":i,[`ds-control--${this.size}`]:true,...m(this.width)},"data-disabled":i?"":undefined,"data-readonly":this.readOnly?"":undefined,"data-required":this.required?"":undefined,"data-invalid":this.error?"":undefined,"data-filled":e?"":undefined,"data-focused":this.focused?"":undefined,"data-dirty":o?"":undefined,"data-touched":this.touched?"":undefined},s("div",{key:"675c0e1db9692b5a860ed554cdd5f52bd020abd6",class:{"input-control":true,"ds-control-frame":true,"input-control--bordered":this.hasBorder,"input-control--error":this.hasBorder&&this.error,"ds-interaction-fill":true,[`ds-control--${this.size}`]:true}},this.icon&&s("span",{key:"6431ce6baf7b39808ce3047bdb5273a287370725",class:"input-control__prefix ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},s("ds-icon",{key:"799c90e17400f216d643f222db1f05d07980cd0f",name:this.icon,size:c,color:"inherit"})),s("input",{key:"3a057ff058549eea3732740eb75c6db30be1db33",type:this.type,id:t,value:this.value,placeholder:this.placeholder,min:l?this.min:undefined,max:l?this.max:undefined,step:l?this.step:undefined,disabled:i,readOnly:this.readOnly,required:this.required,autoFocus:this.autoFocus,autoComplete:this.autoComplete,inputMode:this.inputMode||undefined,enterKeyHint:this.enterKeyHint||undefined,class:`native-input ds-control-label-box ds-text--${a.replace("text-","")} ds-text--regular ds-interaction-fill__content`,"aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledby,"aria-describedby":p,"aria-invalid":this.error?"true":undefined,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur}),s("span",{key:"cc834ce711d8cfc27cee2f82a27eba3c47b0a5e3",class:{"input-control__suffix":true,"ds-control-icon-box":true,"input-control__suffix--empty":!this.hasSuffix}},s("slot",{key:"725146e230d6c2c50ccf75617d883b64b10800df",name:"suffix"})),r&&s("ds-button-unfilled",{key:"7562489f80adbb73e190330053efc541d1cf67c7",class:"input-control__clear",variant:"icon",size:x[this.size],icon:"CrossCircle",hasBorder:false,rounded:true,ariaLabel:this.clearLabel,onDsClick:this.handleClear})),d&&s("ds-text",{key:"f95abb4ce28abb9c4aca0960455e5f9314115184",class:"error-text",as:"div",variant:"text-body-small",color:"negative",textId:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return true}get el(){return this}static get watchers(){return{value:[{syncFormValue:0}],disabled:[{syncFormValue:0}],isInactive:[{syncFormValue:0}],required:[{syncFormValue:0}]}}static get style(){return b()}},[326,"ds-input",{value:[1025],name:[513],form:[513],disabled:[516],readOnly:[516,"read-only"],required:[516],requiredMessage:[1,"required-message"],clearLabel:[1,"clear-label"],placeholder:[1],type:[1],min:[2],max:[2],step:[2],autoComplete:[1,"autocomplete"],inputMode:[1,"inputmode"],enterKeyHint:[1,"enterkeyhint"],size:[1],width:[1],hasBorder:[4,"has-border"],icon:[1],isInactive:[4,"is-inactive"],autoFocus:[4,"auto-focus"],error:[4],errorMessage:[1,"error-message"],inputId:[1,"input-id"],ariaLabel:[1,"aria-label"],ariaLabelledby:[1,"aria-labelledby"],ariaDescribedby:[1,"aria-describedby"],formDisabled:[32],hasSuffix:[32],focused:[32],touched:[32],setFocus:[64]},undefined,{value:[{syncFormValue:0}],disabled:[{syncFormValue:0}],isInactive:[{syncFormValue:0}],required:[{syncFormValue:0}]}]);function z(){if(typeof customElements==="undefined"){return}const t=["ds-input","ds-badge","ds-button-unfilled","ds-icon","ds-loader","ds-text","ds-tooltip"];t.forEach((t=>{switch(t){case"ds-input":if(!customElements.get(o(t))){customElements.define(o(t),k)}break;case"ds-badge":if(!customElements.get(o(t))){r()}break;case"ds-button-unfilled":if(!customElements.get(o(t))){d()}break;case"ds-icon":if(!customElements.get(o(t))){a()}break;case"ds-loader":if(!customElements.get(o(t))){c()}break;case"ds-text":if(!customElements.get(o(t))){l()}break;case"ds-tooltip":if(!customElements.get(o(t))){p()}break}}))}z();export{k as I,z as d};
2
- //# sourceMappingURL=p-DQyvAN44.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["inputCss","ICON_SIZE","lg","md","sm","xs","CLEAR_BUTTON_SIZE","idCounter","Input","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","generatedId","errorId","value","disabled","readOnly","required","requiredMessage","DEFAULT_REQUIRED_MESSAGE","clearLabel","type","inputMode","enterKeyHint","size","width","hasBorder","isInactive","autoFocus","error","ariaLabel","initialValue","formDisabled","hasSuffix","focused","touched","handleInput","e","target","dsChange","emit","handleFocus","handleBlur","handleClear","dsClear","el","querySelector","focus","componentWillLoad","Boolean","syncFormValue","componentDidRender","inactive","setFormControlValue","internals","missing","length","setRequiredValidity","formDisabledCallback","formResetCallback","formStateRestoreCallback","state","restoreStringFormState","setFocus","render","inputId","filled","dirty","showClear","showError","errorMessage","textVariant","CONTROL_TEXT_VARIANT","iconSize","numeric","describedBy","ariaDescribedby","undefined","filter","join","h","Host","key","class","controlWidthClass","icon","name","color","id","placeholder","min","max","step","autoComplete","replace","ariaLabelledby","onInput","onFocus","onBlur","variant","rounded","onDsClick","as","textId","role"],"sources":["src/wc/components/Input/Input.css?tag=ds-input&encapsulation=scoped","src/wc/components/Input/Input.tsx"],"sourcesContent":["@import '../../utils/interaction-fill.css';\n@import '../../utils/control-inactive.css';\n@import '../../utils/control-density.css';\n@import '../../utils/control-parts.css';\n@import '../../utils/control-width.css';\n@import '../../utils/field-stack.css';\n@import '../../utils/typography.css';\n@import '../../utils/forced-colors.css';\n\n:host(.input-host) {\n display: inline-flex;\n --ds-input-fg: var(--color-foreground-primary);\n --ds-input-placeholder: var(--color-foreground-secondary);\n --ds-input-placeholder-active: var(--color-foreground-quaternary);\n --ds-input-adornment-fg: var(--color-foreground-secondary);\n --ds-input-border: var(--color-border-secondary);\n}\n\n:host(.ds-control-width--fill),\n:host(.ds-control-width--fill) .input-control {\n width: 100%;\n}\n\n.input-control {\n overflow: hidden;\n background: transparent;\n border: none;\n border-radius: var(--ds-control-radius, var(--dimension-radius-025));\n color: var(--ds-input-fg);\n}\n\n.input-control--bordered {\n --ds-interaction-border-width: var(--dimension-stroke-width-012);\n --ds-interaction-border-color: var(--ds-input-border);\n}\n\n.input-control--error {\n --ds-interaction-border-width: var(--dimension-stroke-width-018);\n --ds-interaction-border-color: var(--color-border-bold-negative);\n}\n\n.input-control--bordered:focus-within:not(.input-control--error) {\n --ds-interaction-border-width: var(--dimension-stroke-width-018);\n --ds-interaction-border-color: var(--color-border-bold-brand);\n}\n\n:host(.ds-control-inactive) .input-control::after {\n background: transparent;\n}\n\n.native-input {\n position: relative;\n z-index: 2;\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n background: transparent;\n border: none;\n border-radius: inherit;\n outline: none;\n color: var(--ds-input-fg);\n font-family: inherit;\n text-overflow: ellipsis;\n -webkit-appearance: none;\n appearance: none;\n}\n\n.native-input:disabled {\n cursor: not-allowed;\n}\n\n.native-input:read-only:not(:disabled) {\n cursor: default;\n}\n\n.native-input::placeholder {\n color: var(--ds-input-placeholder);\n}\n\n.native-input:focus::placeholder {\n color: var(--ds-input-placeholder-active);\n}\n\n.native-input[type='search']::-webkit-search-cancel-button,\n.native-input[type='search']::-webkit-search-decoration {\n display: none;\n}\n\n.input-control__prefix,\n.input-control__suffix {\n position: relative;\n z-index: 2;\n color: var(--ds-input-adornment-fg);\n}\n\n.input-control__suffix--empty {\n display: none;\n}\n\n/* Keep this more specific than ButtonUnfilled's host-level hug alignment so\n component stylesheet hydration order cannot move the nested action. */\n.input-control > .input-control__clear {\n position: relative;\n z-index: 2;\n flex-shrink: 0;\n align-self: center;\n}\n\n.input-control.ds-control--lg:has(.input-control__clear),\n.input-control.ds-control--md:has(.input-control__clear),\n.input-control.ds-control--sm:has(.input-control__clear) {\n padding-right: var(--dimension-space-050);\n}\n\n.input-control.ds-control--xs:has(.input-control__clear) {\n padding-right: 0;\n}\n\n.error-text {\n width: 100%;\n}\n\n@media (forced-colors: active) {\n .input-control--bordered:focus-within:not(.input-control--error)::after {\n outline-color: var(--ds-forced-color-selected);\n }\n\n .input-control--error::after {\n outline-style: dashed;\n }\n}\n","import { AttachInternals, Component, Prop, State, Event, EventEmitter, Element, Method, Watch, h, Host } from '@stencil/core';\nimport {\n controlWidthClass,\n CONTROL_TEXT_VARIANT,\n DEFAULT_REQUIRED_MESSAGE,\n restoreStringFormState,\n setFormControlValue,\n setRequiredValidity,\n type ControlWidth,\n} from '../../utils';\n\nexport type InputType = 'text' | 'email' | 'tel' | 'url' | 'search' | 'password' | 'number';\nexport type InputSize = 'lg' | 'md' | 'sm' | 'xs';\nexport type InputWidth = ControlWidth;\n\nconst ICON_SIZE: Record<InputSize, 'lg' | 'md' | 'sm' | 'xs'> = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\nconst CLEAR_BUTTON_SIZE: Record<InputSize, 'md' | 'sm' | 'xs'> = {\n lg: 'md',\n md: 'sm',\n sm: 'xs',\n xs: 'xs',\n};\n\nlet idCounter = 0;\n\n@Component({\n tag: 'ds-input',\n styleUrl: 'Input.css',\n scoped: true,\n formAssociated: true,\n})\nexport class Input {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n private generatedId = `ds-input-${++idCounter}`;\n private errorId = `${this.generatedId}-error`;\n\n @Prop({ mutable: true }) value: string = '';\n @Prop({ reflect: true }) name: string | undefined;\n @Prop({ reflect: true }) form: string | undefined;\n @Prop({ reflect: true }) disabled: boolean = false;\n /** Keeps the value focusable and submittable while preventing edits. */\n @Prop({ reflect: true }) readOnly: boolean = false;\n @Prop({ reflect: true }) required: boolean = false;\n @Prop() requiredMessage: string = DEFAULT_REQUIRED_MESSAGE;\n @Prop() clearLabel: string = 'Clear';\n @Prop() placeholder: string | undefined;\n @Prop() type: InputType = 'text';\n /** Minimum accepted value when type is number. */\n @Prop() min: number | undefined;\n /** Maximum accepted value when type is number. */\n @Prop() max: number | undefined;\n /** Numeric increment used by native stepping and constraint validation. */\n @Prop() step: number | undefined;\n /** Native browser autofill hint. */\n @Prop({ attribute: 'autocomplete' }) autoComplete: string | undefined;\n /** Preferred virtual keyboard without changing the value semantics. */\n @Prop({ attribute: 'inputmode' }) inputMode: string = '';\n /** Preferred virtual-keyboard action label. */\n @Prop({ attribute: 'enterkeyhint' }) enterKeyHint: string = '';\n /** Control density. */\n @Prop() size: InputSize = 'md';\n /** Width fit — fill the parent (default) or hug the available content. */\n @Prop() width: InputWidth = 'fill';\n /** Show the standard inset border, including focused and invalid strokes. */\n @Prop() hasBorder: boolean = true;\n /** Optional leading icon name. */\n @Prop() icon: string | undefined;\n @Prop() isInactive: boolean = false;\n @Prop() autoFocus: boolean = false;\n @Prop() error: boolean = false;\n @Prop() errorMessage: string | undefined;\n /** Associates the internal input with an external <label>. */\n @Prop() inputId: string | undefined;\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n @Prop({ attribute: 'aria-labelledby' }) ariaLabelledby: string | undefined;\n @Prop({ attribute: 'aria-describedby' }) ariaDescribedby: string | undefined;\n\n @Event() dsChange!: EventEmitter<string>;\n @Event() dsClear!: EventEmitter<void>;\n\n private initialValue = '';\n @State() private formDisabled = false;\n @State() private hasSuffix = false;\n @State() private focused = false;\n @State() private touched = false;\n\n componentWillLoad() {\n this.initialValue = this.value;\n this.hasSuffix = Boolean(this.el.querySelector('[slot=\"suffix\"]'));\n this.syncFormValue();\n }\n\n componentDidRender() {\n const hasSuffix = Boolean(this.el.querySelector('[slot=\"suffix\"]'));\n if (hasSuffix !== this.hasSuffix) this.hasSuffix = hasSuffix;\n }\n\n @Watch('value')\n @Watch('disabled')\n @Watch('isInactive')\n @Watch('required')\n syncFormValue() {\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n setFormControlValue(this.internals, this.value, { inactive });\n const missing = this.required && !inactive && this.value.length === 0;\n setRequiredValidity(this.internals, missing, this.requiredMessage);\n }\n\n formDisabledCallback(disabled: boolean) {\n this.formDisabled = disabled;\n this.syncFormValue();\n }\n\n formResetCallback() {\n this.value = this.initialValue;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.value = restoreStringFormState(state);\n }\n\n @Method()\n async setFocus() {\n this.el.querySelector('input')?.focus();\n }\n\n private handleInput = (e: Event) => {\n this.value = (e.target as HTMLInputElement).value;\n this.dsChange.emit(this.value);\n };\n\n private handleFocus = () => {\n this.focused = true;\n };\n\n private handleBlur = () => {\n this.focused = false;\n this.touched = true;\n };\n\n private handleClear = () => {\n this.value = '';\n this.dsChange.emit('');\n this.dsClear.emit();\n this.el.querySelector('input')?.focus();\n };\n\n render() {\n const inputId = this.inputId ?? this.generatedId;\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n const filled = this.value.length > 0;\n const dirty = this.value !== this.initialValue;\n const showClear = this.type === 'search' && filled && !inactive && !this.readOnly;\n const showError = this.error && Boolean(this.errorMessage);\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n const numeric = this.type === 'number';\n\n const describedBy = [\n this.ariaDescribedby,\n showError ? this.errorId : undefined,\n ].filter(Boolean).join(' ') || undefined;\n\n return (\n <Host\n class={{\n 'input-host': true,\n 'ds-field-stack': true,\n 'ds-control-inactive': inactive,\n [`ds-control--${this.size}`]: true,\n ...controlWidthClass(this.width),\n }}\n data-disabled={inactive ? '' : undefined}\n data-readonly={this.readOnly ? '' : undefined}\n data-required={this.required ? '' : undefined}\n data-invalid={this.error ? '' : undefined}\n data-filled={filled ? '' : undefined}\n data-focused={this.focused ? '' : undefined}\n data-dirty={dirty ? '' : undefined}\n data-touched={this.touched ? '' : undefined}\n >\n <div\n class={{\n 'input-control': true,\n 'ds-control-frame': true,\n 'input-control--bordered': this.hasBorder,\n 'input-control--error': this.hasBorder && this.error,\n 'ds-interaction-fill': true,\n [`ds-control--${this.size}`]: true,\n }}\n >\n {this.icon && (\n <span class=\"input-control__prefix ds-control-icon-box ds-interaction-fill__content\" aria-hidden=\"true\">\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n </span>\n )}\n <input\n type={this.type}\n id={inputId}\n value={this.value}\n placeholder={this.placeholder}\n min={numeric ? this.min : undefined}\n max={numeric ? this.max : undefined}\n step={numeric ? this.step : undefined}\n disabled={inactive}\n readOnly={this.readOnly}\n required={this.required}\n autoFocus={this.autoFocus}\n autoComplete={this.autoComplete}\n inputMode={this.inputMode || undefined}\n enterKeyHint={this.enterKeyHint || undefined}\n class={`native-input ds-control-label-box ds-text--${textVariant.replace('text-', '')} ds-text--regular ds-interaction-fill__content`}\n aria-label={this.ariaLabel}\n aria-labelledby={this.ariaLabelledby}\n aria-describedby={describedBy}\n aria-invalid={this.error ? 'true' : undefined}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n <span class={{ 'input-control__suffix': true, 'ds-control-icon-box': true, 'input-control__suffix--empty': !this.hasSuffix }}>\n <slot name=\"suffix\" />\n </span>\n {showClear && (\n <ds-button-unfilled\n class=\"input-control__clear\"\n variant=\"icon\"\n size={CLEAR_BUTTON_SIZE[this.size]}\n icon=\"CrossCircle\"\n hasBorder={false}\n rounded\n ariaLabel={this.clearLabel}\n onDsClick={this.handleClear}\n />\n )}\n </div>\n {showError && (\n <ds-text\n class=\"error-text\"\n as=\"div\"\n variant=\"text-body-small\"\n color=\"negative\"\n textId={this.errorId}\n role=\"alert\"\n >\n {this.errorMessage}\n </ds-text>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"mbAAA,MAAMA,EAAW,IAAM,8+mBCevB,MAAMC,EAA0D,CAC9DC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,MAGN,MAAMC,EAA2D,CAC/DJ,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,MAGN,IAAIE,EAAY,E,MAQHC,EAAKC,EAAA,MAAAD,UAAAE,EANlB,WAAAC,CAAAC,G,sJAUUC,KAAAC,YAAc,cAAcP,IAC5BM,KAAAE,QAAU,GAAGF,KAAKC,oBAEDD,KAAAG,MAAgB,GAGhBH,KAAAI,SAAoB,MAEpBJ,KAAAK,SAAoB,MACpBL,KAAAM,SAAoB,MACrCN,KAAAO,gBAA0BC,EAC1BR,KAAAS,WAAqB,QAErBT,KAAAU,KAAkB,OAUQV,KAAAW,UAAoB,GAEjBX,KAAAY,aAAuB,GAEpDZ,KAAAa,KAAkB,KAElBb,KAAAc,MAAoB,OAEpBd,KAAAe,UAAqB,KAGrBf,KAAAgB,WAAsB,MACtBhB,KAAAiB,UAAqB,MACrBjB,KAAAkB,MAAiB,MAIUlB,KAAAmB,UAA2B,KAOtDnB,KAAAoB,aAAe,GACNpB,KAAAqB,aAAe,MACfrB,KAAAsB,UAAY,MACZtB,KAAAuB,QAAU,MACVvB,KAAAwB,QAAU,MA0CnBxB,KAAAyB,YAAeC,IACrB1B,KAAKG,MAASuB,EAAEC,OAA4BxB,MAC5CH,KAAK4B,SAASC,KAAK7B,KAAKG,MAAM,EAGxBH,KAAA8B,YAAc,KACpB9B,KAAKuB,QAAU,IAAI,EAGbvB,KAAA+B,WAAa,KACnB/B,KAAKuB,QAAU,MACfvB,KAAKwB,QAAU,IAAI,EAG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AUN,KAAKM,SACfW,UAAWjB,KAAKiB,UAChBiE,aAAclF,KAAKkF,aACnBvE,UAAWX,KAAKW,WAAauD,UAC7BtD,aAAcZ,KAAKY,cAAgBsD,UACnCM,MAAO,8CAA8CZ,EAAYuB,QAAQ,QAAS,oDAAmD,aACzHnF,KAAKmB,UAAS,kBACTnB,KAAKoF,eAAc,mBAClBpB,EAAW,eACfhE,KAAKkB,MAAQ,OAASgD,UACpCmB,QAASrF,KAAKyB,YACd6D,QAAStF,KAAK8B,YACdyD,OAAQvF,KAAK+B,aAEfsC,EAAA,QAAAE,IAAA,2CAAMC,MAAO,CAAE,wBAAyB,KAAM,sBAAuB,KAAM,gCAAiCxE,KAAKsB,YAC/G+C,EAAA,QAAAE,IAAA,2CAAMI,KAAK,YAEZlB,GACCY,EAAA,sBAAAE,IAAA,2CACEC,MAAM,uBACNgB,QAAQ,OACR3E,KAAMpB,EAAkBO,KAAKa,MAC7B6D,KAAK,cACL3D,UAAW,MACX0E,QAAO,KACPtE,UAAWnB,KAAKS,WAChBiF,UAAW1F,KAAKgC,eAIrB0B,GACCW,EAAA,WAAAE,IAAA,2CACEC,MAAM,aACNmB,GAAG,MACHH,QAAQ,kBACRZ,MAAM,WACNgB,OAAQ5F,KAAKE,QACb2F,KAAK,SAEJ7F,KAAK2D,c","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{p as e,H as s,c as t,h as i,a as o,t as l}from"./index.js";import{o as a,a as r,r as n,b as h,d}from"./p-CI5Ce8VF.js";import{i as c,r as m,a as u}from"./p-B0Byw6OX.js";import{d as b}from"./p-DbJahF86.js";import{d as p}from"./p-DC_8dK55.js";import{d as f}from"./p-BFfLvMZd.js";import{d as g}from"./p-JPTkZ3Ji.js";import{d as v}from"./p-DKY3IJqt.js";import{d as k}from"./p-DMaQkEYP.js";import{d as w}from"./p-CbZ0RU2c.js";import{d as _}from"./p-BTTxl3ro.js";import{d as y}from"./p-Dl3gciej.js";import{d as C}from"./p-HZz5aJKz.js";import{d as E}from"./p-CHEt4mW8.js";import{d as j}from"./p-3WlVHGUe.js";import{d as x}from"./p-LHzBS95u.js";import{d as H}from"./p-Cj5Hkt6Y.js";const T=()=>`:host{display:block;min-width:0;min-height:0;height:100%;background:transparent}:host([responsive-mode='mobile']){width:100%;background:var(--color-background-primary)}.shell-tools__desktop,.shell-tools__desktop ds-panel-tools,.shell-tools__mobile{display:block;min-width:0;min-height:0;height:100%}.shell-tools__slot-proxy{display:block;width:100%;height:100%;min-width:0;min-height:0}.shell-tools__mobile{display:grid;grid-template-rows:auto minmax(0, 1fr);background:var(--color-background-primary)}.shell-tools__mobile-header{grid-row:1}.shell-tools__mobile-body,.shell-tools__view{min-width:0;min-height:0;height:100%}.shell-tools__mobile-body{grid-row:2;overflow:hidden}.shell-tools__view{overflow:auto;overscroll-behavior:contain}.shell-tools__view[hidden]{display:none}.shell-tools__view ::slotted(*){min-height:0}`;const D=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.dsToolChange=t(this,"dsToolChange",7);this.dsPresentationChange=t(this,"dsPresentationChange",7);this.dsHeaderBack=t(this,"dsHeaderBack",7);this.dsHeaderAction=t(this,"dsHeaderAction",7);this.responsiveMode="desktop";this.open=false;this.activeTool="";this.presentation="drawer";this.fullscreenHeaderMode="shared";this.items=[];this.headers={};this.storageKey="";this.toolsLabel="Tools";this.toolShortcutsLabel="Tool shortcuts";this.inboxLabel="Inbox";this.inboxNavigationLabel="Inbox sections";this.panelToolsEl=null;this.selectInboxTool=e=>{const s=e.detail;if(!this.availableInboxTools.includes(s)||s===this.mobileActiveTool)return;this.open=true;this.activeTool=s;this.dsToolChange.emit({id:s,selected:true})};this.handlePanelToolChange=e=>{this.activeTool=e.detail.id;this.open=e.detail.selected};this.handlePanelPresentationChange=e=>{this.presentation=e.detail.presentation};this.handleMobileHeaderAction=(e,s,t)=>{t.stopPropagation();this.dsHeaderAction.emit({tool:e,id:s})}}presentationChanged(e,s){if(e===s)return;if(this.panelToolsEl&&this.panelToolsEl.getAttribute("presentation")!==e){this.panelToolsEl.setAttribute("presentation",e)}}get resolvedItems(){return this.items??[]}get availableInboxTools(){return this.resolvedItems.filter((e=>!e.isInactive&&c(e))).map((e=>e.id))}get mobileViewOrder(){return a(this.resolvedItems).map((e=>e.id))}toolLabel(e){const s=this.resolvedItems.find((s=>s.id===e));return s?.label??s?.ariaLabel??r[e]??e}get mobileActiveTool(){const e=this.resolvedItems.find((e=>e.id===this.activeTool));const s=e?c(e):u(this.activeTool);if(!s)return this.activeTool;return m(this.activeTool,this.availableInboxTools)}componentWillLoad(){this.reconcileAvailability()}handleItemsChange(){this.reconcileAvailability()}reconcileAvailability(){const e=n(this.resolvedItems,this.open,this.activeTool);this.open=e.open;this.activeTool=e.activeTool}resolvedHeaders(){return this.headers??{}}activeHeader(e){return this.resolvedHeaders()[e]??{}}activateMobileTool(e){const s=this.resolvedItems.find((s=>s.id===e));if(!s||s.isInactive)return;const t=h(this.open,this.activeTool,e);this.open=t.open;this.activeTool=t.activeTool;this.dsToolChange.emit({id:e,selected:t.selected})}async activateTool(e){if(this.responsiveMode!=="mobile"){await(this.panelToolsEl?.activateTool(e));return}this.activateMobileTool(e)}async closeDrawer(){if(this.responsiveMode!=="mobile"){await(this.panelToolsEl?.closeDrawer());return}if(!this.open)return;const e=this.activeTool;this.open=false;if(e)this.dsToolChange.emit({id:e,selected:false})}async focusHeaderAction(e){if(this.responsiveMode!=="mobile"){await(this.panelToolsEl?.focusHeaderAction(e));return}const s=(this.el.shadowRoot??this.el).querySelector(`[data-header-action-id="${CSS.escape(e)}"]`);await(s?.setFocus?.())}renderForwardedSlots(){return this.mobileViewOrder.flatMap((e=>[i("div",{key:`tool:${e}`,class:"shell-tools__slot-proxy",slot:e},i("slot",{name:e})),i("div",{key:`tool-view:${e}`,class:"shell-tools__slot-proxy",slot:`${e}-view`},i("slot",{name:`${e}-view`}))]))}renderDesktop(){return i("div",{class:"shell-tools__desktop"},i("ds-panel-tools",{open:this.open,activeTool:this.activeTool,presentation:this.presentation,fullscreenHeaderMode:this.fullscreenHeaderMode,items:this.resolvedItems,headers:this.resolvedHeaders(),storageKey:this.storageKey,toolsLabel:this.toolsLabel,toolShortcutsLabel:this.toolShortcutsLabel,ref:e=>{this.panelToolsEl=e},onDsToolChange:this.handlePanelToolChange,onDsPresentationChange:this.handlePanelPresentationChange},this.renderForwardedSlots()))}renderMobileHeader(e){const s=this.activeHeader(e);const t=s.title?.trim();const o=t||this.toolLabel(e);const l=(s.actions??[]).filter((e=>e.id!=="fullscreen"));const a=this.resolvedItems.find((s=>s.id===e));const r=Boolean(a&&c(a)&&!s.showBack);const n=r?this.availableInboxTools.map((e=>{const s=this.resolvedItems.find((s=>s.id===e));return{id:e,label:this.toolLabel(e),variant:"label",dot:s?.dot}})):[];return i("ds-mobile-header",{class:"shell-tools__mobile-header",heading:o,headingLevel:"h2",sections:n,value:e,sectionsAriaLabel:this.inboxNavigationLabel,sectionsPresentation:r?"segmented":"switcher",sectionsSize:"lg",onDsSectionChange:this.selectInboxTool},s.showBack?i("ds-tooltip",{slot:"leading",label:s.backAriaLabel||"Back",side:"bottom",size:"sm"},i("ds-button-unfilled",{variant:"icon",icon:s.backIcon||"ChevronLeft",size:"md","aria-label":s.backAriaLabel||"Back",activeFill:false,hasBorder:false,onDsClick:()=>this.dsHeaderBack.emit({tool:e})})):null,l.map((s=>i("ds-tooltip",{slot:"trailing",key:s.id,label:s.ariaLabel,side:"bottom",size:"sm"},i("ds-button-unfilled",{id:s.triggerId||undefined,"data-header-action-id":s.id,variant:"icon",icon:s.icon,size:"md","aria-label":s.ariaLabel,haspopup:s.haspopup,controls:s.controls,expanded:s.expanded,pressed:s.pressed,isInactive:s.isInactive,activeFill:false,hasBorder:false,onDsClick:t=>this.handleMobileHeaderAction(e,s.id,t)})))))}renderMobile(){const e=this.mobileActiveTool;return i("div",{class:"shell-tools__mobile","aria-hidden":this.open&&e?undefined:"true",inert:this.open&&e?undefined:true},e?this.renderMobileHeader(e):null,i("div",{class:"shell-tools__mobile-body"},this.mobileViewOrder.map((s=>{const t=this.open&&s===e;return i("div",{key:`mobile-tool-view:${s}`,class:{"shell-tools__view":true,"shell-tools__view--active":t},hidden:!t,"aria-hidden":t?undefined:"true",inert:t?undefined:true},i("slot",{name:`${s}-view`},i("slot",{name:s})))}))))}render(){const e=this.responsiveMode==="mobile";return i(o,{key:"1c50483713d3d74177ba286ecb69f056c1764559",role:e?this.presentation==="fullscreen"?"dialog":"complementary":undefined,"aria-modal":e&&this.presentation==="fullscreen"?"true":undefined,"aria-label":e?this.toolsLabel:undefined},e?this.renderMobile():this.renderDesktop())}get el(){return this}static get watchers(){return{presentation:[{presentationChanged:0}],items:[{handleItemsChange:0}]}}static get style(){return T()}},[257,"ds-shell-tools",{responsiveMode:[513,"responsive-mode"],open:[1540],activeTool:[1537,"active-tool"],presentation:[1537],fullscreenHeaderMode:[513,"fullscreen-header-mode"],items:[16],headers:[16],storageKey:[1,"storage-key"],toolsLabel:[1,"tools-label"],toolShortcutsLabel:[1,"tool-shortcuts-label"],inboxLabel:[1,"inbox-label"],inboxNavigationLabel:[1,"inbox-navigation-label"],activateTool:[64],closeDrawer:[64],focusHeaderAction:[64]},undefined,{presentation:[{presentationChanged:0}],items:[{handleItemsChange:0}]}]);function L(){if(typeof customElements==="undefined"){return}const e=["ds-shell-tools","ds-badge","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-mobile-header","ds-mobile-section-switcher","ds-panel-tool-header","ds-panel-tools","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-shell-tools":if(!customElements.get(l(e))){customElements.define(l(e),D)}break;case"ds-badge":if(!customElements.get(l(e))){b()}break;case"ds-button-unfilled":if(!customElements.get(l(e))){p()}break;case"ds-icon":if(!customElements.get(l(e))){f()}break;case"ds-loader":if(!customElements.get(l(e))){g()}break;case"ds-menu":if(!customElements.get(l(e))){v()}break;case"ds-mobile-header":if(!customElements.get(l(e))){k()}break;case"ds-mobile-section-switcher":if(!customElements.get(l(e))){w()}break;case"ds-panel-tool-header":if(!customElements.get(l(e))){_()}break;case"ds-panel-tools":if(!customElements.get(l(e))){d()}break;case"ds-swatch-picker":if(!customElements.get(l(e))){y()}break;case"ds-switch":if(!customElements.get(l(e))){C()}break;case"ds-tab-group":if(!customElements.get(l(e))){E()}break;case"ds-tag":if(!customElements.get(l(e))){j()}break;case"ds-text":if(!customElements.get(l(e))){x()}break;case"ds-tooltip":if(!customElements.get(l(e))){H()}break}}))}L();export{D as S,L as d};
2
- //# sourceMappingURL=p-DaxKVtZG.js.map
@@ -1,2 +0,0 @@
1
- import{p as e,H as a,h as d,a as n,t as r}from"./index.js";import{d as i}from"./p-LHzBS95u.js";const s="--_badge-gradient-position";function t(e,a){let d=e;while(d){const e=d.closest(a);if(e)return e;if(typeof d.getRootNode!=="function")return null;const n=d.getRootNode();const r=n.host;d=r&&typeof r.closest==="function"?r:null}return null}function o(e){const a=t(e,"ds-shell-app");return a!==null&&a.getAttribute("gradient-preset")!=="none"}const c=()=>`.ds-visually-hidden.sc-ds-badge-h,.ds-visually-hidden.sc-ds-badge{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}@media (forced-colors: active){.sc-ds-badge:root,.sc-ds-badge-h,.ds-forced-colors-scope.sc-ds-badge{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.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--no-ring.sc-ds-badge-h{--_badge-ring-width:0}.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:auto;min-width:var(--dimension-size-150);height:var(--dimension-size-150);padding:0 var(--dimension-space-025);border-radius:var(--dimension-radius-half)}.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)}@media (forced-colors: active){.badge__mark.sc-ds-badge{color:var(--ds-forced-color-on-selected);background:var(--ds-forced-color-selected);box-shadow:none;outline:var(--_badge-ring-width) solid var(--ds-forced-color-surface)}.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{display:none}}`;const g={primary:"var(--color-background-primary)",secondary:"var(--color-background-secondary)",faint:"var(--color-background-faint-neutral)",medium:"var(--color-background-medium-neutral)",bold:"var(--color-background-bold-neutral)",strong:"var(--color-background-strong-neutral)",translucent:"var(--color-translucent-translucent)",inverted:"var(--color-inverted-background)",media:"var(--color-media-background)",navigation:"var(--color-navigation-background)","always-dark":"var(--color-always-dark-background)"};const b=e(class e extends a{constructor(e){super();if(e!==false){this.__registerHost()}this.variant="counter";this.count=0;this.max=9;this.surface="primary";this.hasRing=true;this.gradientBackground=false;this.gradientLayoutVersion=0;this.gradientObserver=null;this.gradientWindowListener=null}componentDidLoad(){this.enableShellGradientRingIfNeeded()}disconnectedCallback(){this.unbindGradientRingSync()}gradientBackgroundChanged(){if(!this.hasRing){this.unbindGradientRingSync();return}if(!this.gradientBackground&&o(this.el)){this.gradientBackground=true;return}this.bindGradientRingSync()}enableShellGradientRingIfNeeded(){if(!this.hasRing)return;if(!this.gradientBackground&&o(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-shell-app");if(a)this.gradientObserver.observe(a);const d=this.el.closest("ds-bar-nav");if(d)this.gradientObserver.observe(d);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||!o(this.el))return a;a[s]="0 0";return a}render(){const e=this.variant==="dot";if(!e&&this.count<=0)return d(n,{style:{display:"none"}});const a=this.count>this.max?`${this.max}+`:String(this.count);const r=this.background??g[this.surface];return d(n,{class:{badge:true,"badge--counter":!e,"badge--dot":e,"badge--no-ring":!this.hasRing,"badge--on-gradient-background":this.hasRing&&this.gradientBackground},style:this.ringHostStyle(r)},d("span",{class:"badge__mark","aria-hidden":"true"},!e&&d("ds-text",{as:"span",variant:"text-caption",emphasis:true,color:"inherit"},a)),this.label&&d("span",{class:"badge__a11y ds-visually-hidden"},this.label))}get el(){return this}static get watchers(){return{gradientBackground:[{gradientBackgroundChanged:0}],hasRing:[{gradientBackgroundChanged:0}]}}static get style(){return c()}},[2,"ds-badge",{variant:[1],count:[2],max:[2],surface:[1],background:[1],hasRing:[4,"has-ring"],gradientBackground:[516,"gradient-background"],label:[1],gradientLayoutVersion:[32]},undefined,{gradientBackground:[{gradientBackgroundChanged:0}],hasRing:[{gradientBackgroundChanged:0}]}]);function l(){if(typeof customElements==="undefined"){return}const e=["ds-badge","ds-text"];e.forEach((e=>{switch(e){case"ds-badge":if(!customElements.get(r(e))){customElements.define(r(e),b)}break;case"ds-text":if(!customElements.get(r(e))){i()}break}}))}l();export{b as B,l as d};
2
- //# sourceMappingURL=p-DbJahF86.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["BADGE_GRADIENT_POSITION_VAR","closestComposed","from","selector","current","match","closest","getRootNode","composedRoot","shadowHost","host","isShellGradientActive","shell","getAttribute","badgeCss","SURFACE_RING","primary","secondary","faint","medium","bold","strong","translucent","inverted","media","navigation","Badge","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","variant","count","max","surface","hasRing","gradientBackground","gradientLayoutVersion","gradientObserver","gradientWindowListener","componentDidLoad","enableShellGradientRingIfNeeded","disconnectedCallback","unbindGradientRingSync","gradientBackgroundChanged","el","bindGradientRingSync","update","window","addEventListener","ResizeObserver","observe","bar","panel","removeEventListener","disconnect","ringHostStyle","ring","style","render","isDot","h","Host","display","String","background","class","badge","as","emphasis","color","label"],"sources":["src/wc/shell/badge-gradient-ring.ts","src/wc/components/Badge/Badge.css?tag=ds-badge&encapsulation=scoped","src/wc/components/Badge/Badge.tsx"],"sourcesContent":["import {\n SHELL_GRADIENT_POSITION_BAR_VAR,\n SHELL_GRADIENT_POSITION_PANEL_VAR,\n} from './shell-gradient';\n\n/** Per-badge background-position for shell gradient ring sampling. */\nexport const BADGE_GRADIENT_POSITION_VAR = '--_badge-gradient-position';\n\nexport interface GradientSurface {\n element: HTMLElement;\n chromeHost: HTMLElement;\n positionVar: string;\n}\n\nfunction closestComposed(from: HTMLElement, selector: string): HTMLElement | null {\n let current: HTMLElement | null = from;\n while (current) {\n const match = current.closest<HTMLElement>(selector);\n if (match) return match;\n if (typeof current.getRootNode !== 'function') return null;\n const composedRoot = current.getRootNode() as Node & { readonly host?: Element };\n const shadowHost: Element | undefined = composedRoot.host;\n current = shadowHost && typeof (shadowHost as HTMLElement).closest === 'function'\n ? shadowHost as HTMLElement\n : null;\n }\n return null;\n}\n\n/** Whether the badge sits under a shell with an active wash preset. */\nexport function isShellGradientActive(from: HTMLElement): boolean {\n // Explicit <HTMLElement>: the inferred HTMLDsShellAppElement type only\n // resolves where @stencil/core types are installed — consumers importing\n // `@ds-mo/ui/shell` (raw TS) compile this without them.\n const shell = closestComposed(from, 'ds-shell-app');\n return shell !== null && shell.getAttribute('gradient-preset') !== 'none';\n}\n\n/** Bar or panel chrome surface that owns the shell gradient stack. */\nexport function findGradientSurface(from: HTMLElement): GradientSurface | null {\n const barHost = closestComposed(from, 'ds-bar-nav');\n if (barHost) {\n const root = barHost.shadowRoot ?? barHost;\n const element = root.querySelector('.bar-nav');\n if (element) {\n return {\n element: element as HTMLElement,\n chromeHost: barHost,\n positionVar: SHELL_GRADIENT_POSITION_BAR_VAR,\n };\n }\n }\n\n const panelHost = closestComposed(from, 'ds-panel-nav');\n if (panelHost) {\n const root = panelHost.shadowRoot ?? panelHost;\n const element = root.querySelector('.panel-nav');\n if (element) {\n return {\n element: element as HTMLElement,\n chromeHost: panelHost,\n positionVar: SHELL_GRADIENT_POSITION_PANEL_VAR,\n };\n }\n }\n\n return null;\n}\n\ninterface ParsedPosition {\n x: number;\n y: number;\n}\n\n/** Parse a two-value CSS background-position (e.g. `-200px 0`). */\nexport function parseCssBackgroundPosition(value: string): ParsedPosition {\n const trimmed = value.trim();\n if (!trimmed) return { x: 0, y: 0 };\n\n const parts = trimmed.split(/\\s+/);\n const x = parseLength(parts[0] ?? '0');\n const y = parseLength(parts[1] ?? '0');\n return { x, y };\n}\n\nfunction parseLength(token: string): number {\n const px = token.match(/^(-?[\\d.]+)px$/);\n if (px) return Number(px[1]);\n return 0;\n}\n\n/**\n * Background position for a badge ring so the shell gradient aligns with nav chrome.\n * Uses badge center relative to the painted chrome surface.\n */\nexport function badgeGradientPosition(\n badgeHost: HTMLElement,\n surface: GradientSurface,\n shellPosition: string,\n): string {\n const badgeRect = badgeHost.getBoundingClientRect();\n const surfaceRect = surface.element.getBoundingClientRect();\n const anchorX = badgeRect.left + badgeRect.width / 2 - surfaceRect.left;\n const anchorY = badgeRect.top + badgeRect.height / 2 - surfaceRect.top;\n const { x, y } = parseCssBackgroundPosition(shellPosition);\n\n return `${Math.round(x - anchorX)}px ${Math.round(y - anchorY)}px`;\n}\n\n/** Resolve shell gradient position from chrome host custom properties. */\nexport function readShellGradientPosition(surface: GradientSurface): string {\n const styles = getComputedStyle(surface.chromeHost);\n return styles.getPropertyValue(surface.positionVar).trim() || '0 0';\n}\n\n/** Stamp `--_badge-gradient-position` on the badge host (fixed viewport chrome). */\nexport function syncBadgeGradientPosition(badgeHost: HTMLElement): void {\n if (!isShellGradientActive(badgeHost)) {\n badgeHost.style.removeProperty(BADGE_GRADIENT_POSITION_VAR);\n return;\n }\n\n badgeHost.style.setProperty(BADGE_GRADIENT_POSITION_VAR, '0 0');\n}\n","@import '../../utils/visually-hidden.css';\n@import '../../utils/forced-colors.css';\n\n: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--no-ring) {\n --_badge-ring-width: 0;\n}\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: auto;\n min-width: var(--dimension-size-150);\n height: var(--dimension-size-150);\n padding: 0 var(--dimension-space-025);\n border-radius: var(--dimension-radius-half);\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 /* stylelint-disable color-no-hex -- mask luminance stops for ring cutout, not theme colors */\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 /* stylelint-enable color-no-hex */\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\n@media (forced-colors: active) {\n .badge__mark {\n color: var(--ds-forced-color-on-selected);\n background: var(--ds-forced-color-selected);\n box-shadow: none;\n outline: var(--_badge-ring-width) solid var(--ds-forced-color-surface);\n }\n\n :host(.badge--on-gradient-background) .badge__mark::before,\n :host(.badge--on-gradient-background) .badge__mark::after {\n display: none;\n }\n}\n","import { Component, Prop, Element, State, Watch, h, Host } from '@stencil/core';\nimport {\n BADGE_GRADIENT_POSITION_VAR,\n isShellGradientActive,\n} from '../../shell/badge-gradient-ring';\n\nexport type BadgeVariant = 'counter' | 'dot';\nexport type BadgeSurface =\n | 'primary'\n | 'secondary'\n | 'faint'\n | 'medium'\n | 'bold'\n | 'strong'\n | 'translucent'\n | 'inverted'\n | 'media'\n | 'navigation'\n | 'always-dark';\n\nconst SURFACE_RING: Record<BadgeSurface, string> = {\n primary: 'var(--color-background-primary)',\n secondary: 'var(--color-background-secondary)',\n faint: 'var(--color-background-faint-neutral)',\n medium: 'var(--color-background-medium-neutral)',\n bold: 'var(--color-background-bold-neutral)',\n strong: 'var(--color-background-strong-neutral)',\n translucent: 'var(--color-translucent-translucent)',\n inverted: 'var(--color-inverted-background)',\n media: 'var(--color-media-background)',\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 \"{max}+\". */\n @Prop() max: number = 9;\n\n /** Immediate backing surface matched by the ring around either variant. */\n @Prop() surface: BadgeSurface = 'primary';\n\n /** Direct ring background override for component-local surfaces. */\n @Prop() background: string | undefined;\n\n /** Show the separation ring when the badge overlaps an icon or other content. */\n @Prop() hasRing: boolean = true;\n\n /**\n * Ring samples the shell gradient stack (base fill + wash) instead of a flat\n * `box-shadow`. Auto-enabled under an ShellApp with an active gradient preset;\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 /** Contextual supplemental text. Omit when the owner hides the badge from assistive technology. */\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 @Watch('hasRing')\n gradientBackgroundChanged() {\n if (!this.hasRing) {\n this.unbindGradientRingSync();\n return;\n }\n if (!this.gradientBackground && isShellGradientActive(this.el)) {\n this.gradientBackground = true;\n return;\n }\n this.bindGradientRingSync();\n }\n\n /** Imperative opt-in avoids Stencil aborting parent render for nested badges. */\n private enableShellGradientRingIfNeeded() {\n if (!this.hasRing) return;\n\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-shell-app');\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 ? `${this.max}+` : 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--no-ring': !this.hasRing,\n 'badge--on-gradient-background': this.hasRing && this.gradientBackground,\n }}\n style={this.ringHostStyle(ring)}\n >\n <span class=\"badge__mark\" aria-hidden=\"true\">\n {!isDot && (\n <ds-text as=\"span\" variant=\"text-caption\" emphasis color=\"inherit\">\n {display}\n </ds-text>\n )}\n </span>\n {this.label && <span class=\"badge__a11y ds-visually-hidden\">{this.label}</span>}\n </Host>\n );\n }\n}\n"],"mappings":"+FAMO,MAAMA,EAA8B,6BAQ3C,SAASC,EAAgBC,EAAmBC,GAC1C,IAAIC,EAA8BF,EAClC,MAAOE,EAAS,CACd,MAAMC,EAAQD,EAAQE,QAAqBH,GAC3C,GAAIE,EAAO,OAAOA,EAClB,UAAWD,EAAQG,cAAgB,WAAY,OAAO,KACtD,MAAMC,EAAeJ,EAAQG,cAC7B,MAAME,EAAkCD,EAAaE,KACrDN,EAAUK,UAAsBA,EAA2BH,UAAY,WACnEG,EACA,I,CAEN,OAAO,IACT,CAGM,SAAUE,EAAsBT,GAIpC,MAAMU,EAAQX,EAAgBC,EAAM,gBACpC,OAAOU,IAAU,MAAQA,EAA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@ -1,2 +0,0 @@
1
- function n({align:n,alignOffsetPx:e,sectionInsetPx:t,anchorAlignment:r="choice-cell"}){if(r==="popup-frame"||n==="center")return e;return e+(n==="start"?-t:t)}function e(n,e){return n+e*2}export{e as c,n as r};
2
- //# sourceMappingURL=p-DhKvqh5G.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["resolveChoicePopupAlignOffset","align","alignOffsetPx","sectionInsetPx","anchorAlignment","choicePopupMinWidth","anchorWidth"],"sources":["src/wc/utils/choice-popup-alignment.ts"],"sourcesContent":["import type { AnchoredAlign } from './anchored-position';\n\n/**\n * `choice-cell` aligns the first/last interactive row edge with the anchor,\n * allowing the popup frame to extend by the section inset. `popup-frame`\n * aligns the popup frame itself and is reserved for deliberate custom geometry.\n */\nexport type ChoicePopupAnchorAlignment = 'choice-cell' | 'popup-frame';\n\nexport interface ChoicePopupAlignOffsetInput {\n align: AnchoredAlign;\n alignOffsetPx: number;\n sectionInsetPx: number;\n anchorAlignment?: ChoicePopupAnchorAlignment;\n}\n\n/**\n * Resolve the cross-axis offset for a choice popup. Authored `alignOffsetPx`\n * remains an additive nudge after the shared inner-cell alignment is applied.\n */\nexport function resolveChoicePopupAlignOffset({\n align,\n alignOffsetPx,\n sectionInsetPx,\n anchorAlignment = 'choice-cell',\n}: ChoicePopupAlignOffsetInput): number {\n if (anchorAlignment === 'popup-frame' || align === 'center') return alignOffsetPx;\n return alignOffsetPx + (align === 'start' ? -sectionInsetPx : sectionInsetPx);\n}\n\n/** Minimum popup width that keeps both choice-cell edges aligned to a trigger. */\nexport function choicePopupMinWidth(anchorWidth: number, sectionInsetPx: number): number {\n return anchorWidth + sectionInsetPx * 2;\n}\n"],"mappings":"AAoBM,SAAUA,GAA8BC,MAC5CA,EAAKC,cACLA,EAAaC,eACbA,EAAcC,gBACdA,EAAkB,gBAElB,GAAIA,IAAoB,eAAiBH,IAAU,SAAU,OAAOC,EACpE,OAAOA,GAAiBD,IAAU,SAAWE,EAAiBA,EAChE,CAGM,SAAUE,EAAoBC,EAAqBH,GACvD,OAAOG,EAAcH,EAAiB,CACxC,Q","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{p as t,H as e,h as s,a,t as c}from"./index.js";import{d as i}from"./p-BFfLvMZd.js";import{d as n}from"./p-LHzBS95u.js";const d=()=>`.sc-ds-empty-state-h{display:block;width:100%;height:100%}.sc-ds-empty-state-h,.empty-state.sc-ds-empty-state,.empty-state__text.sc-ds-empty-state{box-sizing:border-box}.empty-state.sc-ds-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--dimension-space-100);height:100%;width:100%;text-align:center}.empty-state__icon.sc-ds-empty-state{flex:0 0 auto}.empty-state__text.sc-ds-empty-state{display:flex;flex-direction:column;align-items:center;gap:var(--dimension-space-050);width:100%}`;const o=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.body=""}render(){const t=Boolean(this.heading?.trim());const e=t&&Boolean(this.icon);return s(a,{key:"d08624b1beb2f29aee685908fec2e64accf98756"},s("div",{key:"487fb739d0611b4e0031dabc757664f633f7c1c2",class:"empty-state"},e&&s("ds-icon",{key:"a4ea3e91833ca293252342149ec396bc363c0c2a",class:"empty-state__icon",name:this.icon,size:"xl",color:"primary"}),s("div",{key:"7b464c6be927016dc299f30588ca263b5b128a12",class:"empty-state__text"},t&&s("ds-text",{key:"b5d4e61a52f8219e6683f6201d4e3c679444c9b4",class:"empty-state__title",as:"div",variant:"text-title-small",color:"primary",align:"center"},this.heading),this.body&&s("ds-text",{key:"224011907be75c3355858228f6c5773ffd8ee554",class:"empty-state__body",as:"p",variant:"text-body-medium",color:"secondary",align:"center"},this.body))))}static get style(){return d()}},[2,"ds-empty-state",{icon:[1],heading:[1],body:[1]}]);function m(){if(typeof customElements==="undefined"){return}const t=["ds-empty-state","ds-icon","ds-text"];t.forEach((t=>{switch(t){case"ds-empty-state":if(!customElements.get(c(t))){customElements.define(c(t),o)}break;case"ds-icon":if(!customElements.get(c(t))){i()}break;case"ds-text":if(!customElements.get(c(t))){n()}break}}))}m();export{o as E,m as d};
2
- //# sourceMappingURL=p-Drcl4zS9.js.map
@@ -1,2 +0,0 @@
1
- const t={top:"bottom",right:"left",bottom:"top",left:"right"};function i(t,i){const{anchorRect:s,popupWidth:e,popupHeight:n,align:h,sideOffsetPx:r,alignOffsetPx:o}=t;if(i==="top"||i==="bottom"){return{x:h==="start"?s.left+o:h==="end"?s.right-e+o:s.left+s.width/2-e/2+o,y:i==="top"?s.top-n-r:s.bottom+r}}return{x:i==="left"?s.left-e-r:s.right+r,y:h==="start"?s.top+o:h==="end"?s.bottom-n+o:s.top+s.height/2-n/2+o}}function s(t,i,s){const{popupWidth:e,popupHeight:n,viewportPadPx:h,viewportWidth:r,viewportHeight:o}=t;if(i==="top"||i==="bottom"){return Math.max(h-s.y,0)+Math.max(s.y+n-(o-h),0)}return Math.max(h-s.x,0)+Math.max(s.x+e-(r-h),0)}function e(t,i,s,e){const n=Math.max(e,s-i-e);return Math.min(Math.max(t,e),n)}function n(n){const h=i(n,n.side);const r=t[n.side];const o=i(n,r);const l=s(n,n.side,h);const u=s(n,r,o);const a=l>0&&u<l;const c=a?r:n.side;const f=a?o:h;const p=c==="top"?n.anchorRect.top-n.viewportPadPx-n.sideOffsetPx:c==="bottom"?n.viewportHeight-n.viewportPadPx-n.anchorRect.bottom-n.sideOffsetPx:n.viewportHeight-n.viewportPadPx*2;return{x:e(f.x,n.popupWidth,n.viewportWidth,n.viewportPadPx),y:e(f.y,n.popupHeight,n.viewportHeight,n.viewportPadPx),resolvedSide:c,availableHeight:Math.max(0,p)}}const h=8;class r{constructor(t){this.scrollResizeHandler=null;this.resizeObserver=null;this.retryRaf=null;this.liveRaf=null;this.last=null;this.isReady=false;this.options=t}get ready(){return this.isReady}observe(){this.bindListeners()}unobserve(){this.unbindListeners();this.cancel();this.last=null;this.isReady=false}schedule(t){this.cancelRetry();this.isReady=false;let i=this.options.retryBudget??h;const s=()=>{this.retryRaf=null;if(this.update()){this.isReady=true;this.options.onReady?.();t?.();return}if(i>0){i-=1;this.retryRaf=requestAnimationFrame(s)}};this.retryRaf=requestAnimationFrame(s)}update(){const t=this.options.getAnchor();if(!t)return false;const i=this.options.getPopup();if(!i)return false;if(this.options.topLayer&&typeof i.showPopover==="function"&&!i.matches(":popover-open")){try{i.showPopover()}catch{return false}}const s=this.options.measure(t,i);if(!s)return false;const e=n(s);if(!this.last||this.last.x!==e.x||this.last.y!==e.y||this.last.resolvedSide!==e.resolvedSide||this.last.availableHeight!==e.availableHeight){this.last=e;this.options.apply(e)}return true}scheduleLiveUpdate(){const t=this.options.liveUpdate??"sync";if(t==="sync"){this.update();return}if(this.liveRaf!==null)return;if(t==="frame"){this.liveRaf=requestAnimationFrame((()=>{this.liveRaf=null;this.update()}));return}this.liveRaf=requestAnimationFrame((()=>{this.update();this.liveRaf=requestAnimationFrame((()=>{this.liveRaf=null;this.update()}))}))}cancel(){this.cancelRetry();if(this.liveRaf!==null){cancelAnimationFrame(this.liveRaf);this.liveRaf=null}}cancelRetry(){if(this.retryRaf===null)return;cancelAnimationFrame(this.retryRaf);this.retryRaf=null}bindListeners(){this.unbindListeners();this.scrollResizeHandler=()=>this.scheduleLiveUpdate();window.addEventListener("scroll",this.scrollResizeHandler,true);window.addEventListener("resize",this.scrollResizeHandler);if(this.options.observeResize&&typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver((()=>this.update()));this.observeResizeTargets()}}unbindListeners(){if(this.scrollResizeHandler){window.removeEventListener("scroll",this.scrollResizeHandler,true);window.removeEventListener("resize",this.scrollResizeHandler);this.scrollResizeHandler=null}this.resizeObserver?.disconnect();this.resizeObserver=null}observeResizeTargets(){if(!this.resizeObserver)return;const t=this.options.getPopup();if(t)this.resizeObserver.observe(t);const i=this.options.getAnchor();if(i)this.resizeObserver.observe(i)}}export{r as A,n as c};
2
- //# sourceMappingURL=p-DzPw6aDK.js.map