@helixui/library 3.6.0 → 3.8.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 (280) hide show
  1. package/custom-elements.json +2633 -805
  2. package/dist/components/hx-action-bar/hx-action-bar.d.ts +18 -0
  3. package/dist/components/hx-action-bar/hx-action-bar.d.ts.map +1 -1
  4. package/dist/components/hx-action-bar/hx-action-bar.styles.d.ts.map +1 -1
  5. package/dist/components/hx-action-bar/index.js +1 -1
  6. package/dist/components/hx-alert/hx-alert.d.ts +18 -0
  7. package/dist/components/hx-alert/hx-alert.d.ts.map +1 -1
  8. package/dist/components/hx-badge/index.js +1 -1
  9. package/dist/components/hx-banner/hx-banner.d.ts +19 -0
  10. package/dist/components/hx-banner/hx-banner.d.ts.map +1 -1
  11. package/dist/components/hx-breadcrumb/hx-breadcrumb-item.d.ts.map +1 -1
  12. package/dist/components/hx-breadcrumb/hx-breadcrumb-item.styles.d.ts.map +1 -1
  13. package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts +18 -0
  14. package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts.map +1 -1
  15. package/dist/components/hx-breadcrumb/index.js +1 -1
  16. package/dist/components/hx-button/hx-button.d.ts +18 -0
  17. package/dist/components/hx-button/hx-button.d.ts.map +1 -1
  18. package/dist/components/hx-button/hx-button.styles.d.ts.map +1 -1
  19. package/dist/components/hx-button/index.js +1 -1
  20. package/dist/components/hx-button-group/hx-button-group.d.ts +47 -0
  21. package/dist/components/hx-button-group/hx-button-group.d.ts.map +1 -1
  22. package/dist/components/hx-button-group/index.js +1 -1
  23. package/dist/components/hx-checkbox/hx-checkbox.d.ts +18 -0
  24. package/dist/components/hx-checkbox/hx-checkbox.d.ts.map +1 -1
  25. package/dist/components/hx-checkbox/hx-checkbox.styles.d.ts.map +1 -1
  26. package/dist/components/hx-checkbox/index.js +1 -1
  27. package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts +36 -0
  28. package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts.map +1 -1
  29. package/dist/components/hx-checkbox-group/hx-checkbox-group.styles.d.ts.map +1 -1
  30. package/dist/components/hx-checkbox-group/index.js +1 -1
  31. package/dist/components/hx-clinical-status/hx-clinical-status.d.ts +19 -0
  32. package/dist/components/hx-clinical-status/hx-clinical-status.d.ts.map +1 -1
  33. package/dist/components/hx-color-picker/hx-color-picker.d.ts +18 -0
  34. package/dist/components/hx-color-picker/hx-color-picker.d.ts.map +1 -1
  35. package/dist/components/hx-color-picker/hx-color-picker.styles.d.ts.map +1 -1
  36. package/dist/components/hx-color-picker/index.js +1 -1
  37. package/dist/components/hx-combobox/hx-combobox.d.ts +18 -0
  38. package/dist/components/hx-combobox/hx-combobox.d.ts.map +1 -1
  39. package/dist/components/hx-copy-button/hx-copy-button.d.ts +18 -0
  40. package/dist/components/hx-copy-button/hx-copy-button.d.ts.map +1 -1
  41. package/dist/components/hx-copy-button/hx-copy-button.styles.d.ts.map +1 -1
  42. package/dist/components/hx-copy-button/index.js +1 -1
  43. package/dist/components/hx-date-picker/hx-date-picker.d.ts +18 -0
  44. package/dist/components/hx-date-picker/hx-date-picker.d.ts.map +1 -1
  45. package/dist/components/hx-date-picker/hx-date-picker.styles.d.ts.map +1 -1
  46. package/dist/components/hx-date-picker/index.js +1 -1
  47. package/dist/components/hx-dialog/hx-dialog.d.ts +18 -0
  48. package/dist/components/hx-dialog/hx-dialog.d.ts.map +1 -1
  49. package/dist/components/hx-drawer/hx-drawer.d.ts +18 -0
  50. package/dist/components/hx-drawer/hx-drawer.d.ts.map +1 -1
  51. package/dist/components/hx-dropdown/hx-dropdown.d.ts +18 -0
  52. package/dist/components/hx-dropdown/hx-dropdown.d.ts.map +1 -1
  53. package/dist/components/hx-dropdown/hx-dropdown.styles.d.ts.map +1 -1
  54. package/dist/components/hx-dropdown/index.js +1 -1
  55. package/dist/components/hx-field/hx-field.d.ts +17 -0
  56. package/dist/components/hx-field/hx-field.d.ts.map +1 -1
  57. package/dist/components/hx-field-label/hx-field-label.d.ts +17 -0
  58. package/dist/components/hx-field-label/hx-field-label.d.ts.map +1 -1
  59. package/dist/components/hx-file-upload/hx-file-upload.d.ts +18 -0
  60. package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
  61. package/dist/components/hx-form/hx-form.d.ts +19 -0
  62. package/dist/components/hx-form/hx-form.d.ts.map +1 -1
  63. package/dist/components/hx-help-text/hx-help-text.d.ts +17 -0
  64. package/dist/components/hx-help-text/hx-help-text.d.ts.map +1 -1
  65. package/dist/components/hx-icon-button/hx-icon-button.d.ts +18 -0
  66. package/dist/components/hx-icon-button/hx-icon-button.d.ts.map +1 -1
  67. package/dist/components/hx-icon-button/hx-icon-button.styles.d.ts.map +1 -1
  68. package/dist/components/hx-icon-button/index.js +1 -1
  69. package/dist/components/hx-menu/hx-menu.d.ts +18 -0
  70. package/dist/components/hx-menu/hx-menu.d.ts.map +1 -1
  71. package/dist/components/hx-nav/hx-nav.d.ts +18 -0
  72. package/dist/components/hx-nav/hx-nav.d.ts.map +1 -1
  73. package/dist/components/hx-nav/hx-nav.styles.d.ts.map +1 -1
  74. package/dist/components/hx-nav/index.js +1 -1
  75. package/dist/components/hx-number-input/hx-number-input.d.ts +18 -0
  76. package/dist/components/hx-number-input/hx-number-input.d.ts.map +1 -1
  77. package/dist/components/hx-number-input/index.js +1 -1
  78. package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts +18 -0
  79. package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts.map +1 -1
  80. package/dist/components/hx-pagination/hx-pagination.styles.d.ts.map +1 -1
  81. package/dist/components/hx-pagination/index.js +1 -1
  82. package/dist/components/hx-popover/hx-popover.d.ts +18 -0
  83. package/dist/components/hx-popover/hx-popover.d.ts.map +1 -1
  84. package/dist/components/hx-popover/hx-popover.styles.d.ts.map +1 -1
  85. package/dist/components/hx-popover/index.js +1 -1
  86. package/dist/components/hx-popup/hx-popup.d.ts +18 -0
  87. package/dist/components/hx-popup/hx-popup.d.ts.map +1 -1
  88. package/dist/components/hx-popup/hx-popup.styles.d.ts.map +1 -1
  89. package/dist/components/hx-popup/index.js +1 -1
  90. package/dist/components/hx-radio-group/hx-radio-group.d.ts +18 -0
  91. package/dist/components/hx-radio-group/hx-radio-group.d.ts.map +1 -1
  92. package/dist/components/hx-radio-group/hx-radio-group.styles.d.ts.map +1 -1
  93. package/dist/components/hx-radio-group/hx-radio.styles.d.ts.map +1 -1
  94. package/dist/components/hx-radio-group/index.js +1 -1
  95. package/dist/components/hx-rating/hx-rating.d.ts +19 -0
  96. package/dist/components/hx-rating/hx-rating.d.ts.map +1 -1
  97. package/dist/components/hx-select/hx-select.d.ts +18 -0
  98. package/dist/components/hx-select/hx-select.d.ts.map +1 -1
  99. package/dist/components/hx-side-nav/hx-side-nav.d.ts +18 -0
  100. package/dist/components/hx-side-nav/hx-side-nav.d.ts.map +1 -1
  101. package/dist/components/hx-side-nav/hx-side-nav.styles.d.ts.map +1 -1
  102. package/dist/components/hx-side-nav/index.js +1 -1
  103. package/dist/components/hx-slider/hx-slider.d.ts +19 -0
  104. package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
  105. package/dist/components/hx-split-button/hx-split-button.d.ts +18 -0
  106. package/dist/components/hx-split-button/hx-split-button.d.ts.map +1 -1
  107. package/dist/components/hx-split-button/hx-split-button.styles.d.ts.map +1 -1
  108. package/dist/components/hx-split-button/index.js +1 -1
  109. package/dist/components/hx-steps/index.js +1 -1
  110. package/dist/components/hx-switch/hx-switch.d.ts +18 -0
  111. package/dist/components/hx-switch/hx-switch.d.ts.map +1 -1
  112. package/dist/components/hx-switch/hx-switch.styles.d.ts.map +1 -1
  113. package/dist/components/hx-switch/index.js +1 -1
  114. package/dist/components/hx-tabs/hx-tab.styles.d.ts.map +1 -1
  115. package/dist/components/hx-tabs/hx-tabs.d.ts +18 -0
  116. package/dist/components/hx-tabs/hx-tabs.d.ts.map +1 -1
  117. package/dist/components/hx-tabs/index.js +1 -1
  118. package/dist/components/hx-text-input/hx-text-input.d.ts +18 -0
  119. package/dist/components/hx-text-input/hx-text-input.d.ts.map +1 -1
  120. package/dist/components/hx-text-input/hx-text-input.styles.d.ts.map +1 -1
  121. package/dist/components/hx-text-input/index.js +1 -1
  122. package/dist/components/hx-textarea/hx-textarea.d.ts +18 -0
  123. package/dist/components/hx-textarea/hx-textarea.d.ts.map +1 -1
  124. package/dist/components/hx-time-picker/hx-time-picker.d.ts +18 -0
  125. package/dist/components/hx-time-picker/hx-time-picker.d.ts.map +1 -1
  126. package/dist/components/hx-time-picker/hx-time-picker.styles.d.ts.map +1 -1
  127. package/dist/components/hx-time-picker/index.js +1 -1
  128. package/dist/components/hx-toast/hx-toast.d.ts +19 -0
  129. package/dist/components/hx-toast/hx-toast.d.ts.map +1 -1
  130. package/dist/components/hx-toggle-button/hx-toggle-button.d.ts +18 -0
  131. package/dist/components/hx-toggle-button/hx-toggle-button.d.ts.map +1 -1
  132. package/dist/components/hx-toggle-button/hx-toggle-button.styles.d.ts.map +1 -1
  133. package/dist/components/hx-toggle-button/index.js +1 -1
  134. package/dist/components/hx-tooltip/hx-tooltip.d.ts +18 -0
  135. package/dist/components/hx-tooltip/hx-tooltip.d.ts.map +1 -1
  136. package/dist/components/hx-tooltip/hx-tooltip.styles.d.ts.map +1 -1
  137. package/dist/components/hx-tooltip/index.js +1 -1
  138. package/dist/components/hx-top-nav/hx-top-nav.d.ts +18 -0
  139. package/dist/components/hx-top-nav/hx-top-nav.d.ts.map +1 -1
  140. package/dist/components/hx-top-nav/hx-top-nav.styles.d.ts.map +1 -1
  141. package/dist/components/hx-top-nav/index.js +1 -1
  142. package/dist/css/helix-all.css +298 -64
  143. package/dist/css/helix-core.css +24 -15
  144. package/dist/css/helix-forms.css +133 -32
  145. package/dist/css/helix-navigation.css +49 -5
  146. package/dist/css/helix-overlay.css +53 -0
  147. package/dist/css/helix-tokens.css +15 -13
  148. package/dist/css/helix-utility.css +39 -12
  149. package/dist/css/hx-action-bar.css +12 -0
  150. package/dist/css/hx-badge.css +5 -5
  151. package/dist/css/hx-button.css +15 -5
  152. package/dist/css/hx-checkbox-group.css +11 -0
  153. package/dist/css/hx-checkbox.css +20 -4
  154. package/dist/css/hx-color-picker.css +14 -1
  155. package/dist/css/hx-copy-button.css +5 -2
  156. package/dist/css/hx-date-picker.css +11 -3
  157. package/dist/css/hx-dropdown.css +13 -0
  158. package/dist/css/hx-icon-button.css +4 -5
  159. package/dist/css/hx-nav.css +24 -2
  160. package/dist/css/hx-number-input.css +8 -8
  161. package/dist/css/hx-pagination.css +6 -3
  162. package/dist/css/hx-popover.css +13 -0
  163. package/dist/css/hx-popup.css +14 -0
  164. package/dist/css/hx-radio-group.css +10 -0
  165. package/dist/css/hx-side-nav.css +7 -0
  166. package/dist/css/hx-split-button.css +22 -10
  167. package/dist/css/hx-switch.css +19 -1
  168. package/dist/css/hx-text-input.css +4 -1
  169. package/dist/css/hx-time-picker.css +7 -2
  170. package/dist/css/hx-toggle-button.css +29 -12
  171. package/dist/css/hx-tooltip.css +13 -0
  172. package/dist/css/hx-top-nav.css +12 -0
  173. package/dist/css/index.css +1 -1
  174. package/dist/css/manifest.json +57 -20
  175. package/dist/index.js +28 -28
  176. package/dist/shared/{hx-action-bar-CitgcpGv.js → hx-action-bar-BlEG4aZv.js} +41 -29
  177. package/dist/shared/hx-action-bar-BlEG4aZv.js.map +1 -0
  178. package/dist/shared/hx-alert-Bto8-TIi.js.map +1 -1
  179. package/dist/shared/{hx-badge-JlFtAdxS.js → hx-badge-DFL35nzi.js} +16 -16
  180. package/dist/shared/hx-badge-DFL35nzi.js.map +1 -0
  181. package/dist/shared/hx-banner-fpRnciIO.js.map +1 -1
  182. package/dist/shared/{hx-breadcrumb-item-3tKppF9h.js → hx-breadcrumb-item-D8xYqe3s.js} +56 -43
  183. package/dist/shared/hx-breadcrumb-item-D8xYqe3s.js.map +1 -0
  184. package/dist/shared/{hx-button-BOwAEcF1.js → hx-button-DOZTZnz-.js} +29 -19
  185. package/dist/shared/hx-button-DOZTZnz-.js.map +1 -0
  186. package/dist/shared/hx-button-group-D3QUmSzl.js +248 -0
  187. package/dist/shared/hx-button-group-D3QUmSzl.js.map +1 -0
  188. package/dist/shared/{hx-checkbox-CYd0YV_u.js → hx-checkbox-DcgyGS9V.js} +27 -11
  189. package/dist/shared/hx-checkbox-DcgyGS9V.js.map +1 -0
  190. package/dist/shared/{hx-checkbox-group-D5piJLY8.js → hx-checkbox-group-C0q6HDqn.js} +101 -58
  191. package/dist/shared/hx-checkbox-group-C0q6HDqn.js.map +1 -0
  192. package/dist/shared/hx-clinical-status-D3XQIOqX.js.map +1 -1
  193. package/dist/shared/{hx-color-picker-DBwJzT5f.js → hx-color-picker-CYjx8i8R.js} +97 -84
  194. package/dist/shared/hx-color-picker-CYjx8i8R.js.map +1 -0
  195. package/dist/shared/hx-combobox-NgJaLbs2.js.map +1 -1
  196. package/dist/shared/{hx-copy-button-sUVuikyH.js → hx-copy-button-DJirFCUL.js} +18 -15
  197. package/dist/shared/hx-copy-button-DJirFCUL.js.map +1 -0
  198. package/dist/shared/{hx-date-picker-B49yo4Vm.js → hx-date-picker-0PtEav0K.js} +71 -63
  199. package/dist/shared/hx-date-picker-0PtEav0K.js.map +1 -0
  200. package/dist/shared/hx-dialog-B4weoj_1.js.map +1 -1
  201. package/dist/shared/hx-drawer-CM_upadk.js.map +1 -1
  202. package/dist/shared/{hx-dropdown-D626S2ZG.js → hx-dropdown-xHwTJecv.js} +44 -31
  203. package/dist/shared/hx-dropdown-xHwTJecv.js.map +1 -0
  204. package/dist/shared/hx-field-label-BVRyyKeh.js.map +1 -1
  205. package/dist/shared/hx-field-zw0U1KVi.js.map +1 -1
  206. package/dist/shared/hx-file-upload-D3rKROK5.js.map +1 -1
  207. package/dist/shared/hx-form-CkChEATa.js.map +1 -1
  208. package/dist/shared/hx-help-text-Xb2Yr8x2.js.map +1 -1
  209. package/dist/shared/{hx-icon-button-a6OpeQz5.js → hx-icon-button-B2BdVdyK.js} +10 -11
  210. package/dist/shared/hx-icon-button-B2BdVdyK.js.map +1 -0
  211. package/dist/shared/hx-menu-divider-A6Guuzi_.js.map +1 -1
  212. package/dist/shared/{hx-nav-ldFM3Fle.js → hx-nav-ChMTfn7o.js} +66 -44
  213. package/dist/shared/hx-nav-ChMTfn7o.js.map +1 -0
  214. package/dist/shared/{hx-nav-item-CODtUlew.js → hx-nav-item-ClN17f1y.js} +62 -55
  215. package/dist/shared/hx-nav-item-ClN17f1y.js.map +1 -0
  216. package/dist/shared/{hx-number-input-yUzFOSC1.js → hx-number-input-MggsT7F0.js} +13 -13
  217. package/dist/shared/hx-number-input-MggsT7F0.js.map +1 -0
  218. package/dist/shared/hx-overflow-menu-DFjJAziP.js.map +1 -1
  219. package/dist/shared/{hx-pagination-C7y8GVyU.js → hx-pagination-D726PyTM.js} +7 -4
  220. package/dist/shared/hx-pagination-D726PyTM.js.map +1 -0
  221. package/dist/shared/{hx-popover-BAlAFOH9.js → hx-popover-BjB0nkcq.js} +51 -38
  222. package/dist/shared/hx-popover-BjB0nkcq.js.map +1 -0
  223. package/dist/shared/{hx-popup-COUXXZ9X.js → hx-popup-BiV_2evC.js} +59 -45
  224. package/dist/shared/hx-popup-BiV_2evC.js.map +1 -0
  225. package/dist/shared/{hx-radio-C7eTj5YI.js → hx-radio-BY4zpwdh.js} +81 -63
  226. package/dist/shared/hx-radio-BY4zpwdh.js.map +1 -0
  227. package/dist/shared/hx-rating-C3QP53k9.js.map +1 -1
  228. package/dist/shared/hx-select-DahFehiZ.js.map +1 -1
  229. package/dist/shared/hx-slider-Blmv_rwS.js.map +1 -1
  230. package/dist/shared/{hx-split-button-Ddle8iVx.js → hx-split-button-CdNz1XAu.js} +62 -50
  231. package/dist/shared/hx-split-button-CdNz1XAu.js.map +1 -0
  232. package/dist/shared/{hx-step-R2rjp1fT.js → hx-step-CUzliIK_.js} +3 -3
  233. package/dist/shared/hx-step-CUzliIK_.js.map +1 -0
  234. package/dist/shared/{hx-switch-TvKGvZJz.js → hx-switch-BCXuNxEH.js} +42 -24
  235. package/dist/shared/hx-switch-BCXuNxEH.js.map +1 -0
  236. package/dist/shared/{hx-tab-panel-DzsX8BHV.js → hx-tab-panel-BfisavKo.js} +47 -32
  237. package/dist/shared/hx-tab-panel-BfisavKo.js.map +1 -0
  238. package/dist/shared/{hx-text-input-D6FlOZM-.js → hx-text-input-V5sQOpDh.js} +5 -2
  239. package/dist/shared/hx-text-input-V5sQOpDh.js.map +1 -0
  240. package/dist/shared/hx-textarea-CNG590KY.js.map +1 -1
  241. package/dist/shared/{hx-time-picker-Bo7FWzmf.js → hx-time-picker-DfJkBwcX.js} +41 -36
  242. package/dist/shared/hx-time-picker-DfJkBwcX.js.map +1 -0
  243. package/dist/shared/{hx-toggle-button-DwBers3A.js → hx-toggle-button-xNVYeA3X.js} +64 -47
  244. package/dist/shared/hx-toggle-button-xNVYeA3X.js.map +1 -0
  245. package/dist/shared/{hx-tooltip-DVqtKPCD.js → hx-tooltip-CamO-9nd.js} +24 -11
  246. package/dist/shared/hx-tooltip-CamO-9nd.js.map +1 -0
  247. package/dist/shared/{hx-top-nav-DP6OFS8C.js → hx-top-nav-CsTxOtVI.js} +26 -14
  248. package/dist/shared/hx-top-nav-CsTxOtVI.js.map +1 -0
  249. package/dist/shared/toast-factory-Dht3pVsw.js.map +1 -1
  250. package/figma-inventory.json +1258 -386
  251. package/package.json +2 -2
  252. package/dist/shared/hx-action-bar-CitgcpGv.js.map +0 -1
  253. package/dist/shared/hx-badge-JlFtAdxS.js.map +0 -1
  254. package/dist/shared/hx-breadcrumb-item-3tKppF9h.js.map +0 -1
  255. package/dist/shared/hx-button-BOwAEcF1.js.map +0 -1
  256. package/dist/shared/hx-button-group-4NUBpkyC.js +0 -181
  257. package/dist/shared/hx-button-group-4NUBpkyC.js.map +0 -1
  258. package/dist/shared/hx-checkbox-CYd0YV_u.js.map +0 -1
  259. package/dist/shared/hx-checkbox-group-D5piJLY8.js.map +0 -1
  260. package/dist/shared/hx-color-picker-DBwJzT5f.js.map +0 -1
  261. package/dist/shared/hx-copy-button-sUVuikyH.js.map +0 -1
  262. package/dist/shared/hx-date-picker-B49yo4Vm.js.map +0 -1
  263. package/dist/shared/hx-dropdown-D626S2ZG.js.map +0 -1
  264. package/dist/shared/hx-icon-button-a6OpeQz5.js.map +0 -1
  265. package/dist/shared/hx-nav-item-CODtUlew.js.map +0 -1
  266. package/dist/shared/hx-nav-ldFM3Fle.js.map +0 -1
  267. package/dist/shared/hx-number-input-yUzFOSC1.js.map +0 -1
  268. package/dist/shared/hx-pagination-C7y8GVyU.js.map +0 -1
  269. package/dist/shared/hx-popover-BAlAFOH9.js.map +0 -1
  270. package/dist/shared/hx-popup-COUXXZ9X.js.map +0 -1
  271. package/dist/shared/hx-radio-C7eTj5YI.js.map +0 -1
  272. package/dist/shared/hx-split-button-Ddle8iVx.js.map +0 -1
  273. package/dist/shared/hx-step-R2rjp1fT.js.map +0 -1
  274. package/dist/shared/hx-switch-TvKGvZJz.js.map +0 -1
  275. package/dist/shared/hx-tab-panel-DzsX8BHV.js.map +0 -1
  276. package/dist/shared/hx-text-input-D6FlOZM-.js.map +0 -1
  277. package/dist/shared/hx-time-picker-Bo7FWzmf.js.map +0 -1
  278. package/dist/shared/hx-toggle-button-DwBers3A.js.map +0 -1
  279. package/dist/shared/hx-tooltip-DVqtKPCD.js.map +0 -1
  280. package/dist/shared/hx-top-nav-DP6OFS8C.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"hx-copy-button-sUVuikyH.js","sources":["../../src/components/hx-copy-button/hx-copy-button.styles.ts","../../src/components/hx-copy-button/hx-copy-button.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixCopyButtonStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n pointer-events: none;\n }\n\n .button {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--hx-space-2);\n border: var(--hx-border-width-thin) solid var(--hx-copy-button-border-color, transparent);\n border-radius: var(--hx-copy-button-border-radius, var(--hx-border-radius-md));\n background-color: var(--hx-copy-button-bg, transparent);\n color: var(--hx-copy-button-color, var(--hx-color-primary-500, #429797));\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast),\n color var(--hx-transition-fast),\n border-color var(--hx-transition-fast),\n box-shadow var(--hx-transition-fast);\n text-decoration: none;\n user-select: none;\n -webkit-user-select: none;\n flex-shrink: 0;\n font-family: var(--hx-copy-button-font-family, var(--hx-font-family-sans));\n font-weight: var(--hx-font-weight-medium);\n white-space: nowrap;\n }\n\n .button:focus-visible {\n outline: var(--hx-focus-ring-width) solid\n var(--hx-copy-button-focus-ring-color, var(--hx-focus-ring-color));\n outline-offset: var(--hx-focus-ring-offset);\n }\n\n .button:hover {\n filter: brightness(var(--hx-filter-brightness-hover, 0.9));\n }\n\n .button:active {\n filter: brightness(var(--hx-filter-brightness-active, 0.8));\n }\n\n /* ─── Size Variants ─── */\n\n .button--sm {\n padding: var(--hx-space-1);\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-sm);\n }\n\n .button--md {\n padding: var(--hx-space-2);\n min-width: var(--hx-size-10);\n height: var(--hx-size-10);\n font-size: var(--hx-font-size-md);\n }\n\n .button--lg {\n padding: var(--hx-space-3);\n min-width: var(--hx-size-12);\n height: var(--hx-size-12);\n font-size: var(--hx-font-size-lg);\n }\n\n /* ─── Copied / Success State ─── */\n\n .button--copied {\n color: var(\n --hx-copy-button-copied-color,\n var(--hx-color-success-text, var(--hx-color-success-700, #146831))\n );\n /* Secondary non-color indicator required per WCAG 1.4.1 (use of color).\n A border provides visual differentiation for users with color blindness. */\n border-color: var(--hx-copy-button-copied-border-color, var(--hx-color-success-500, #3b9e58));\n }\n\n /* ─── Icon Container ─── */\n\n .icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1em;\n height: 1em;\n line-height: 1;\n pointer-events: none;\n flex-shrink: 0;\n }\n\n /* ─── Disabled ─── */\n\n .button[disabled] {\n cursor: not-allowed;\n opacity: var(--hx-opacity-disabled);\n }\n\n /* ─── Screen Reader Only ─── */\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .button {\n transition: none;\n }\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n .button {\n forced-color-adjust: none;\n background-color: ButtonFace;\n color: ButtonText;\n border: 2px solid ButtonText;\n }\n\n .button:focus-visible {\n outline: 3px solid Highlight;\n outline-offset: 2px;\n }\n\n .button[disabled] {\n background-color: ButtonFace;\n color: GrayText;\n border-color: GrayText;\n opacity: 1;\n }\n\n .button--copied {\n border-color: Highlight;\n color: Highlight;\n }\n }\n`;\n","import { html, nothing } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HelixElement } from '../../base/index.js';\nimport { helixCopyButtonStyles } from './hx-copy-button.styles.js';\nimport { forcedColorsInteractive } from '../../styles/forced-colors.js';\n\n/** Minimum allowed value for feedbackDuration (ms). */\nconst MIN_FEEDBACK_DURATION = 300;\n\n/** Allowed size values for runtime validation. */\nconst VALID_SIZES = new Set(['sm', 'md', 'lg']);\n\n/**\n * A clipboard copy button component that writes a given value to the system\n * clipboard. Provides idle and success states with configurable feedback\n * duration, slot-based icon overrides, and an accessible live region that\n * announces copy completion to screen reader users.\n *\n * The `aria-label` reflects the current copy state: idle shows `label`,\n * copied state appends \" — Copied\" so screen reader users who re-focus the\n * button after copy receive an accurate accessible name.\n *\n * Note: `aria-pressed` is intentionally NOT used. This is not a toggle button;\n * copied is a transient feedback state, not a persistent on/off toggle.\n *\n * @summary One-click clipboard copy with accessible success feedback.\n *\n * @tag hx-copy-button\n *\n * @slot - Optional label text rendered inside the button alongside the icon.\n * @slot copy-icon - Icon shown in the idle (pre-copy) state.\n * @slot success-icon - Icon shown after a successful clipboard write.\n *\n * @fires {CustomEvent<{value: string}>} hx-copy - Dispatched after the value\n * has been successfully written to the clipboard.\n * @fires {CustomEvent<{value: string; error: Error}>} hx-copy-error - Dispatched\n * when the clipboard write fails (permission denied, iframe restriction, etc.).\n * The `error` detail contains the caught error for diagnostic use.\n *\n * @csspart button - The native button element.\n * @csspart icon - The icon container span wrapping the active icon slot.\n *\n * @cssprop [--hx-copy-button-bg=transparent] - Button background color.\n * @cssprop [--hx-copy-button-color=var(--hx-color-primary-500)] - Icon and text color.\n * @cssprop [--hx-copy-button-border-color=transparent] - Button border color.\n * @cssprop [--hx-copy-button-border-radius=var(--hx-border-radius-md)] - Button border radius.\n * @cssprop [--hx-copy-button-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n * @cssprop [--hx-border-radius-md] - CSS custom property.\n * @cssprop [--hx-border-width-thin] - Width.\n * @cssprop [--hx-color-primary-500] - Color.\n * @cssprop [--hx-color-success-500] - Color.\n * @cssprop [--hx-color-success-text] - Color.\n * @cssprop [--hx-copy-button-font-family=var(--hx-font-family-sans)] - CSS custom property.\n * @cssprop [--hx-filter-brightness-active] - CSS filter.\n * @cssprop [--hx-filter-brightness-hover] - CSS filter.\n * @cssprop [--hx-focus-ring-color] - Color.\n * @cssprop [--hx-focus-ring-offset] - CSS custom property.\n * @cssprop [--hx-focus-ring-width] - Width.\n * @cssprop [--hx-font-family-sans] - Font family.\n * @cssprop [--hx-font-size-lg] - Font size.\n * @cssprop [--hx-font-size-md] - Font size.\n * @cssprop [--hx-font-size-sm] - Font size.\n * @cssprop [--hx-font-weight-medium] - Font weight.\n * @cssprop [--hx-opacity-disabled] - Opacity.\n * @cssprop [--hx-size-10] - Size token.\n * @cssprop [--hx-size-12] - Size token.\n * @cssprop [--hx-space-1] - Spacing token.\n * @cssprop [--hx-space-2] - Spacing token.\n * @cssprop [--hx-space-3] - Spacing token.\n * @cssprop [--hx-touch-target-min] - Minimum touch target size.\n * @cssprop [--hx-transition-fast] - Transition timing.\n */\n@customElement('hx-copy-button')\nexport class HelixCopyButton extends HelixElement {\n static override styles = [helixCopyButtonStyles, forcedColorsInteractive];\n\n // ─── Public Properties ───\n\n /**\n * The text value to write to the clipboard on click. Required for the\n * component to perform a copy operation.\n * @attr value\n */\n @property({ type: String })\n value = '';\n\n /**\n * Accessible label applied as `aria-label` and `title` on the button.\n * @attr label\n */\n @property({ type: String })\n label = 'Copy to clipboard';\n\n /**\n * Duration in milliseconds to display the success (copied) state before\n * reverting to the idle state. Values below 300 ms are clamped to 300 ms\n * to ensure the success announcement remains visible long enough for\n * assistive technology and human perception.\n * @attr feedback-duration\n */\n @property({ type: Number, attribute: 'feedback-duration' })\n feedbackDuration = 2000;\n\n /**\n * Visual size of the button. Maps to fixed height and padding tokens.\n * Accepts: 'sm' | 'md' | 'lg'. Invalid values are silently coerced to 'md'.\n *\n * **Accessibility (WCAG 2.5.8):** The `sm` variant uses `--hx-size-8` for\n * its minimum width and height. Ensure this token resolves to at least 24×24 px\n * (WCAG 2.5.8 AA minimum target size). For touch-primary interfaces such as\n * mobile clinical apps, prefer `md` or `lg` to meet the 44×44 px recommended\n * target size (WCAG 2.5.5 AAA / Apple HIG / Android guidelines).\n *\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Whether the button is disabled. When true, click events are suppressed\n * and clipboard writes do not occur.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Text announced to screen readers and appended to aria-label after a\n * successful copy. Also used as the content of the aria-live announcement.\n * @attr label-copied\n */\n @property({ type: String, attribute: 'label-copied' })\n labelCopied = 'Copied';\n\n /**\n * Accessible label announced when copy fails. Override for i18n.\n * @attr label-error\n */\n @property({ type: String, attribute: 'label-error' })\n labelError = 'Copy failed';\n\n // ─── Private State ───\n\n /** True while the success feedback window is active. */\n /** @internal */\n @state() private _copied = false;\n\n /** Non-empty string shown in the aria-live region; cleared when not active. */\n /** @internal */\n @state() private _announcement = '';\n\n /** Timeout handle used to revert the copied state. */\n /** @internal */\n private _feedbackTimer: ReturnType<typeof setTimeout> | null = null;\n\n // ─── Lifecycle ───\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._clearFeedbackTimer();\n }\n\n // ─── Private Helpers ───\n\n /**\n * Returns the effective feedback duration, clamped to the minimum allowed\n * value. Prevents zero/negative timeouts that would cause the success state\n * to immediately revert with no visible or audible feedback.\n */\n /** @internal */\n private _effectiveDuration(): number {\n return Math.max(this.feedbackDuration, MIN_FEEDBACK_DURATION);\n }\n\n /**\n * Returns the effective size, falling back to 'md' if the runtime value is\n * not in the set of valid sizes. Prevents `button--xl` and similar class\n * names that have no matching CSS rule.\n */\n /** @internal */\n private _effectiveSize(): 'sm' | 'md' | 'lg' {\n return VALID_SIZES.has(this.size) ? this.size : 'md';\n }\n\n /** @internal */\n private _clearFeedbackTimer(): void {\n if (this._feedbackTimer !== null) {\n clearTimeout(this._feedbackTimer);\n this._feedbackTimer = null;\n }\n }\n\n /** @internal */\n private async _copyToClipboard(): Promise<void> {\n await navigator?.clipboard?.writeText(this.value);\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleClick(): void {\n if (this.disabled) {\n return;\n }\n\n void this._performCopy();\n }\n\n /** @internal */\n private async _performCopy(): Promise<void> {\n try {\n await this._copyToClipboard();\n } catch (error: unknown) {\n // Clipboard write failed — notify consumers and announce failure.\n this._announcement = this.labelError;\n\n /**\n * Dispatched when the clipboard write fails (permission denied, iframe\n * restriction, browser security policy, etc.).\n * @event hx-copy-error\n */\n this.dispatchEvent(\n new CustomEvent<{ value: string; error: Error }>('hx-copy-error', {\n bubbles: true,\n composed: true,\n detail: {\n value: this.value,\n error: error instanceof Error ? error : new Error(String(error)),\n },\n }),\n );\n return;\n }\n\n this._clearFeedbackTimer();\n this._copied = true;\n this._announcement = this.labelCopied;\n\n /**\n * Dispatched after the value has been successfully written to the\n * clipboard.\n * @event hx-copy\n */\n this.dispatchEvent(\n new CustomEvent<{ value: string }>('hx-copy', {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n\n this._feedbackTimer = setTimeout(() => {\n this._copied = false;\n this._announcement = '';\n this._feedbackTimer = null;\n }, this._effectiveDuration());\n }\n\n // ─── Render Helpers ───\n\n /** @internal */\n private _buttonClasses() {\n const size = this._effectiveSize();\n return {\n button: true,\n [`button--${size}`]: true,\n 'button--copied': this._copied,\n };\n }\n\n /** @internal */\n private _renderIcon() {\n // Show success-icon slot when copied, copy-icon slot otherwise.\n return html`\n <span part=\"icon\" class=\"icon\">\n ${this._copied\n ? html`<slot name=\"success-icon\"></slot>`\n : html`<slot name=\"copy-icon\"></slot>`}\n </span>\n `;\n }\n\n // ─── Render ───\n\n override render() {\n // Reflect copied state in aria-label so re-focused button has an accurate\n // accessible name (WCAG 1.3.1). The live region handles the initial\n // announcement; this covers re-focus scenarios.\n const ariaLabel = this._copied ? `${this.label} — ${this.labelCopied}` : this.label;\n\n return html`\n <button\n part=\"button\"\n class=${classMap(this._buttonClasses())}\n type=\"button\"\n ?disabled=${this.disabled}\n aria-label=${ariaLabel}\n title=${this.label}\n @click=${this._handleClick}\n >\n ${this._renderIcon()}\n <slot></slot>\n </button>\n\n <span aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">\n ${this._announcement || nothing}\n </span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-copy-button': HelixCopyButton;\n }\n}\n"],"names":["helixCopyButtonStyles","css","MIN_FEEDBACK_DURATION","VALID_SIZES","HelixCopyButton","HelixElement","_a","error","html","ariaLabel","classMap","nothing","forcedColorsInteractive","__decorateClass","property","state","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAwBC;AAAA;AAAA;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AAS,IAAM,WAAW,WAAW;AAAA,GA1CpDV,EA2CX,WAAA,QAAA,CAAA;AAQAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAlD/BV,EAmDX,WAAA,YAAA,CAAA;AAQAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,GA1D1CV,EA2DX,WAAA,eAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,eAAe;AAAA,GAjEzCV,EAkEX,WAAA,cAAA,CAAA;AAMiBS,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAxEIX,EAwEM,WAAA,WAAA,CAAA;AAIAS,EAAA;AAAA,EAAhBE,EAAA;AAAM,GA5EIX,EA4EM,WAAA,iBAAA,CAAA;AA5ENA,IAANS,EAAA;AAAA,EADNG,EAAc,gBAAgB;AAAA,GAClBZ,CAAA;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hx-date-picker-B49yo4Vm.js","sources":["../../src/components/hx-date-picker/hx-date-picker.styles.ts","../../src/components/hx-date-picker/hx-date-picker.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixDatePickerStyles = css`\n /* ============================================================\n Host\n ============================================================ */\n\n :host {\n display: block;\n position: relative;\n }\n\n :host([disabled]) {\n opacity: var(--hx-opacity-disabled, 0.5);\n pointer-events: none;\n }\n\n * {\n box-sizing: border-box;\n }\n\n /* ============================================================\n Field layout\n ============================================================ */\n\n .field {\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-1, 0.25rem);\n font-family: var(--hx-date-picker-font-family, var(--hx-font-family-sans, sans-serif));\n position: relative;\n }\n\n .field__label-wrapper {\n display: contents;\n }\n\n .field__label {\n display: flex;\n align-items: baseline;\n gap: var(--hx-space-1, 0.25rem);\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-weight: var(--hx-font-weight-medium, 500);\n color: var(--hx-date-picker-label-color, var(--hx-color-text-strong, #202b39));\n line-height: var(--hx-line-height-normal, 1.5);\n }\n\n .field__required-marker {\n color: var(--hx-date-picker-error-color, var(--hx-color-error-text, #c92a2a));\n font-weight: var(--hx-font-weight-bold, 700);\n }\n\n /* ============================================================\n Input wrapper\n ============================================================ */\n\n .field__input-wrapper {\n display: flex;\n align-items: stretch;\n border: var(--hx-border-width-thin, 1px) solid\n var(--hx-date-picker-border-color, var(--hx-color-border-strong, #66787b));\n border-radius: var(--hx-date-picker-border-radius, var(--hx-border-radius-md, 0.375rem));\n background-color: var(--hx-date-picker-bg, var(--hx-color-surface-default, #ffffff));\n transition:\n border-color var(--hx-transition-fast, 150ms ease),\n box-shadow var(--hx-transition-fast, 150ms ease);\n overflow: hidden;\n }\n\n .field__input-wrapper:focus-within {\n border-color: var(--hx-date-picker-focus-ring-color, var(--hx-focus-ring-color, #0f7078));\n box-shadow: 0 0 0 var(--hx-focus-ring-width, 2px)\n color-mix(\n in srgb,\n var(--hx-date-picker-focus-ring-color, var(--hx-focus-ring-color, #0f7078))\n calc(var(--hx-focus-ring-opacity, 0.25) * 100%),\n transparent\n );\n }\n\n .field--error .field__input-wrapper {\n border-color: var(--hx-date-picker-error-color, var(--hx-color-error-500, #e5493e));\n }\n\n .field--error .field__input-wrapper:focus-within {\n border-color: var(--hx-date-picker-error-color, var(--hx-color-error-500, #e5493e));\n box-shadow: 0 0 0 var(--hx-focus-ring-width, 2px)\n color-mix(\n in srgb,\n var(--hx-date-picker-error-color, var(--hx-color-error-500, #e5493e))\n calc(var(--hx-focus-ring-opacity, 0.25) * 100%),\n transparent\n );\n }\n\n /* ============================================================\n Input element\n ============================================================ */\n\n .field__input {\n flex: 1;\n border: none;\n outline: none;\n background: transparent;\n padding: var(--hx-space-2, 0.5rem) var(--hx-space-3, 0.75rem);\n font-family: inherit;\n font-size: var(--hx-font-size-md, 1rem);\n color: var(--hx-date-picker-color, var(--hx-color-text-strong, #202b39));\n line-height: var(--hx-line-height-normal, 1.5);\n min-height: var(--hx-size-10, 2.5rem);\n width: 100%;\n cursor: default;\n }\n\n .field__input::placeholder {\n color: var(--hx-color-text-placeholder, #66787b);\n }\n\n .field__input:disabled {\n cursor: not-allowed;\n }\n\n /* ============================================================\n Calendar trigger button\n ============================================================ */\n\n .field__trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 var(--hx-space-3, 0.75rem);\n border: none;\n border-left: var(--hx-border-width-thin, 1px) solid\n var(--hx-date-picker-border-color, var(--hx-color-border-strong, #66787b));\n background: transparent;\n color: var(--hx-date-picker-trigger-color, var(--hx-color-text-muted, #4a5362));\n cursor: pointer;\n flex-shrink: 0;\n transition: color var(--hx-transition-fast, 150ms ease);\n outline: none;\n }\n\n .field__trigger:focus-visible {\n color: var(--hx-date-picker-focus-ring-color, var(--hx-focus-ring-color, #0f7078));\n background-color: color-mix(\n in srgb,\n var(--hx-date-picker-focus-ring-color, var(--hx-focus-ring-color, #0f7078)) 8%,\n transparent\n );\n }\n\n .field__trigger:hover:not(:disabled) {\n color: var(--hx-date-picker-trigger-hover-color, var(--hx-color-text-strong, #202b39));\n background-color: color-mix(in srgb, var(--hx-color-neutral-900, #0d1825) 4%, transparent);\n }\n\n .field__trigger:disabled {\n cursor: not-allowed;\n }\n\n /* ============================================================\n Calendar popover\n ============================================================ */\n\n .calendar {\n position: absolute;\n top: calc(100% + var(--hx-space-1, 0.25rem));\n left: 0;\n z-index: var(--hx-z-index-dropdown, 1000);\n min-width: var(--hx-date-picker-calendar-min-width, 18rem);\n background-color: var(--hx-date-picker-calendar-bg, var(--hx-color-surface-default, #ffffff));\n border: var(--hx-border-width-thin, 1px) solid\n var(--hx-date-picker-calendar-border-color, var(--hx-color-border-default, #d6dbd5));\n border-radius: var(--hx-date-picker-calendar-border-radius, var(--hx-border-radius-lg, 0.5rem));\n box-shadow: var(\n --hx-date-picker-calendar-shadow,\n var(--hx-shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1))\n );\n padding: var(--hx-space-3, 0.75rem);\n outline: none;\n }\n\n @media (prefers-reduced-motion: no-preference) {\n .calendar {\n animation: calendar-appear var(--hx-transition-fast, 150ms ease) forwards;\n }\n }\n\n @keyframes calendar-appear {\n 0% {\n opacity: 0;\n transform: translateY(-0.25rem);\n }\n\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n /* ============================================================\n Calendar navigation\n ============================================================ */\n\n .calendar__nav {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: var(--hx-space-3, 0.75rem);\n }\n\n :is(.calendar__nav-btn, .calendar__day, .calendar__day-cell, .calendar__weekday) {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n :is(.calendar__nav-btn, .calendar__day) {\n width: var(--hx-touch-target-min, 2.75rem);\n height: var(--hx-touch-target-min, 2.75rem);\n border: none;\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n background: transparent;\n cursor: pointer;\n outline: none;\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n color var(--hx-transition-fast, 150ms ease);\n }\n\n .calendar__nav-btn {\n color: var(--hx-color-text-secondary, #313e4b);\n font-size: var(--hx-font-size-lg, 1.125rem);\n line-height: 1;\n }\n\n .calendar__nav-btn:hover {\n background-color: var(--hx-date-picker-day-hover-bg, var(--hx-color-surface-sunken, #ebeee9));\n color: var(--hx-color-text-primary, #0d1825);\n }\n\n :is(.calendar__nav-btn, .calendar__day):focus-visible {\n box-shadow: 0 0 0 var(--hx-focus-ring-width, 2px)\n var(--hx-date-picker-focus-ring-color, var(--hx-focus-ring-color, #0f7078));\n z-index: 1;\n }\n\n .calendar__nav-btn:disabled {\n opacity: var(--hx-opacity-disabled, 0.5);\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .calendar__month-label {\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-weight: var(--hx-font-weight-semibold, 600);\n color: var(--hx-color-text-strong, #202b39);\n flex: 1;\n text-align: center;\n }\n\n /* ============================================================\n Calendar grid\n ============================================================ */\n\n .calendar__grid {\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-1, 0.25rem);\n }\n\n .calendar__row {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: var(--hx-space-1, 0.25rem);\n }\n\n .calendar__weekday {\n height: var(--hx-size-8, 2rem);\n font-size: var(--hx-font-size-xs, 0.75rem);\n font-weight: var(--hx-font-weight-semibold, 600);\n color: var(--hx-color-text-muted, #4a5362);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n }\n\n /* ============================================================\n Calendar day cells\n ============================================================ */\n\n .calendar__day {\n color: var(--hx-color-text-strong, #202b39);\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-family: inherit;\n position: relative;\n }\n\n .calendar__day:hover:not(.calendar__day--disabled):not(.calendar__day--selected) {\n background-color: var(--hx-date-picker-day-hover-bg, var(--hx-color-surface-sunken, #ebeee9));\n color: var(--hx-color-text-primary, #0d1825);\n }\n\n .calendar__day--selected {\n background-color: var(--hx-date-picker-selected-bg, var(--hx-color-primary-500, #429797));\n color: var(--hx-date-picker-selected-color, var(--hx-color-text-on-primary, #ffffff));\n font-weight: var(--hx-font-weight-semibold, 600);\n }\n\n .calendar__day--selected:hover {\n background-color: var(--hx-date-picker-selected-hover-bg, var(--hx-color-primary-600, #0f7078));\n }\n\n .calendar__day--today:not(.calendar__day--selected) {\n font-weight: var(--hx-font-weight-bold, 700);\n color: var(--hx-date-picker-today-color, var(--hx-color-primary-600, #0f7078));\n }\n\n .calendar__day--today:not(.calendar__day--selected)::after {\n content: '';\n position: absolute;\n bottom: 0.2rem;\n left: 50%;\n transform: translate(-50%);\n width: 0.25rem;\n height: 0.25rem;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n .calendar__day--disabled {\n opacity: var(--hx-opacity-disabled, 0.5);\n cursor: not-allowed;\n pointer-events: none;\n }\n\n /* ============================================================\n Live region (screen reader announcements)\n ============================================================ */\n\n .calendar__live-region,\n .field__sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n /* ============================================================\n Help text and error message\n ============================================================ */\n\n .field__help-text,\n .field__error {\n font-size: var(--hx-font-size-xs, 0.75rem);\n line-height: var(--hx-line-height-normal, 1.5);\n }\n\n .field__help-text {\n color: var(--hx-color-text-muted, #4a5362);\n }\n\n .field__error {\n color: var(--hx-date-picker-error-color, var(--hx-color-error-text, #c92a2a));\n }\n\n /* ============================================================\n Reduced motion\n ============================================================ */\n\n @media (prefers-reduced-motion: reduce) {\n .field__input-wrapper,\n .field__trigger,\n .calendar__nav-btn,\n .calendar__day {\n transition: none;\n }\n }\n\n /* ============================================================\n Forced colors (Windows High Contrast)\n ============================================================ */\n\n @media (forced-colors: active) {\n .field__input-wrapper {\n border: 1px solid ButtonText;\n }\n\n .field__input-wrapper:focus-within {\n outline: 2px solid Highlight;\n outline-offset: 1px;\n box-shadow: none;\n }\n\n :is(.calendar__day:focus-visible, .calendar__nav-btn:focus-visible) {\n outline: 2px solid Highlight;\n box-shadow: none;\n }\n\n .calendar__day--selected {\n background-color: Highlight;\n color: HighlightText;\n border: 1px solid Highlight;\n }\n\n .calendar__day--today:not(.calendar__day--selected) {\n border: 2px solid LinkText;\n }\n\n .calendar__day--today:not(.calendar__day--selected)::after {\n display: none;\n }\n\n .calendar__day--disabled {\n color: GrayText;\n }\n\n .field--error .field__input-wrapper {\n border-color: LinkText;\n }\n }\n`;\n","import { html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport { HelixElement, createIdCounter } from '../../base/index.js';\nimport { FormMixin } from '../../mixins/FormMixin.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { helixDatePickerStyles } from './hx-date-picker.styles.js';\nimport { forcedColorsField } from '../../styles/forced-colors.js';\nimport { devWarn } from '../../utils/dev-warn.js';\nimport {\n installAriaIdrefMirror,\n resolveIdrefTokens,\n supportsIdrefElementReferences,\n type AriaIdrefMirrorHandle,\n} from '../../utils/aria-idref.js';\nimport { flattenAccName } from '../../utils/aria-flatten.js';\n\n// PERF: hx-date-picker exceeds 5KB budget (7.98kb gzipped) -- calendar grid, date parsing, keyboard navigation, localization\n\nconst _nextDatePickerId = createIdCounter('hx-date-picker');\n\n/** Detail for the hx-change event dispatched by hx-date-picker. */\nexport interface HxDatePickerChangeDetail {\n value: string;\n date: Date | null;\n}\n\n/**\n * Date picker component for selecting dates with keyboard-accessible calendar popup.\n *\n * @summary Form-associated date picker with calendar popup and WCAG 2.1 AA accessibility.\n *\n * @tag hx-date-picker\n *\n * @slot label - Custom label content (overrides the label property).\n * @slot help-text - Custom help text content (overrides the helpText property).\n * @slot error - Custom error content (overrides the error property).\n *\n * @fires {CustomEvent<{value: string, date: Date | null}>} hx-change - Emitted when the selected date changes.\n *\n * @csspart field - The outer field container.\n * @csspart label - The label element.\n * @csspart input-wrapper - The wrapper around input and trigger.\n * @csspart input - The readonly text input displaying the formatted date.\n * @csspart trigger - The calendar icon button.\n * @csspart calendar - The calendar popup dialog.\n * @csspart month-nav - The month navigation header.\n * @csspart day - An individual day button in the calendar grid.\n * @csspart help-text - The help text container.\n * @csspart error - The error message container.\n *\n * @cssprop [--hx-date-picker-bg=var(--hx-color-neutral-0)] - Input background color.\n * @cssprop [--hx-date-picker-color=var(--hx-color-neutral-800)] - Input text color.\n * @cssprop [--hx-date-picker-border-color=var(--hx-color-neutral-300)] - Border color.\n * @cssprop [--hx-date-picker-border-radius=var(--hx-border-radius-md)] - Border radius.\n * @cssprop [--hx-date-picker-font-family=var(--hx-font-family-sans)] - Font family.\n * @cssprop [--hx-date-picker-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n * @cssprop [--hx-date-picker-error-color=var(--hx-color-error-500)] - Error state color.\n * @cssprop [--hx-date-picker-label-color=var(--hx-color-neutral-700)] - Label text color.\n * @cssprop [--hx-date-picker-trigger-color=var(--hx-color-neutral-500)] - Trigger icon color.\n * @cssprop [--hx-date-picker-calendar-bg=var(--hx-color-neutral-0)] - Calendar background color.\n * @cssprop [--hx-date-picker-calendar-border-color=var(--hx-color-neutral-200)] - Calendar border color.\n * @cssprop [--hx-date-picker-calendar-min-width=18rem] - Calendar minimum width.\n * @cssprop [--hx-date-picker-selected-bg=var(--hx-color-primary-500)] - Selected day background.\n * @cssprop [--hx-date-picker-selected-color=var(--hx-color-neutral-0)] - Selected day text color.\n * @cssprop [--hx-date-picker-today-color=var(--hx-color-primary-600)] - Today indicator color.\n * @cssprop [--hx-date-picker-calendar-shadow=0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -2px rgba(0,0,0,0.1)] - Calendar popup box shadow.\n * @cssprop [--hx-date-picker-calendar-border-radius=var(--hx-border-radius-lg)] - Border radius.\n * @cssprop [--hx-date-picker-selected-hover-bg=var(--hx-color-primary-600)] - Background color.\n * @cssprop [--hx-date-picker-trigger-hover-color=var(--hx-color-neutral-700)] - Color.\n * @cssprop [--hx-border-radius-lg] - CSS custom property.\n * @cssprop [--hx-border-radius-md] - CSS custom property.\n * @cssprop [--hx-border-radius-sm] - CSS custom property.\n * @cssprop [--hx-border-width-thin] - Width.\n * @cssprop [--hx-color-error-500] - Color.\n * @cssprop [--hx-color-error-text] - Color.\n * @cssprop [--hx-color-neutral-0] - Color.\n * @cssprop [--hx-color-neutral-100] - Color.\n * @cssprop [--hx-color-neutral-200] - Color.\n * @cssprop [--hx-color-neutral-300] - Color.\n * @cssprop [--hx-color-neutral-400] - Color.\n * @cssprop [--hx-color-neutral-500] - Color.\n * @cssprop [--hx-color-neutral-600] - Color.\n * @cssprop [--hx-color-neutral-700] - Color.\n * @cssprop [--hx-color-neutral-800] - Color.\n * @cssprop [--hx-color-neutral-900] - Color.\n * @cssprop [--hx-color-primary-400] - Color.\n * @cssprop [--hx-color-primary-500] - Color.\n * @cssprop [--hx-color-primary-600] - Color.\n * @cssprop [--hx-focus-ring-color] - Color.\n * @cssprop [--hx-focus-ring-opacity] - CSS custom property.\n * @cssprop [--hx-focus-ring-width] - Width.\n * @cssprop [--hx-font-family-sans] - Font family.\n * @cssprop [--hx-font-size-lg] - Font size.\n * @cssprop [--hx-font-size-md] - Font size.\n * @cssprop [--hx-font-size-sm] - Font size.\n * @cssprop [--hx-font-size-xs] - Font size.\n * @cssprop [--hx-font-weight-bold] - Font weight.\n * @cssprop [--hx-font-weight-medium] - Font weight.\n * @cssprop [--hx-font-weight-semibold] - Font weight.\n * @cssprop [--hx-line-height-normal] - Line height.\n * @cssprop [--hx-opacity-disabled] - Opacity.\n * @cssprop [--hx-shadow-md] - Box shadow.\n * @cssprop [--hx-size-10] - Size token.\n * @cssprop [--hx-size-8] - Size token.\n * @cssprop [--hx-space-1] - Spacing token.\n * @cssprop [--hx-space-2] - Spacing token.\n * @cssprop [--hx-space-3] - Spacing token.\n * @cssprop [--hx-touch-target-min] - Minimum touch target size.\n * @cssprop [--hx-transition-fast] - Transition timing.\n * @cssprop [--hx-z-index-dropdown] - Z-index layer.\n */\n@customElement('hx-date-picker')\nexport class HelixDatePicker extends FormMixin(HelixElement) {\n static override styles = [helixDatePickerStyles, forcedColorsField];\n\n // ─── Form Association ───\n\n /**\n * Marks this component as form-associated for native form participation.\n * @internal\n */\n static override formAssociated = true;\n\n /**\n * Test seam: when set to `true` or `false`, overrides the platform\n * `supportsIdrefElementReferences` probe before `connectedCallback` seeds\n * `_supportsIdrefRefs`. Production code MUST NOT touch this field. It is a\n * `static` so the test stub cleanup is global and obvious.\n * @internal\n */\n static __testSupportsIdrefRefsOverride: boolean | null = null;\n\n // ─── Properties ───\n\n /**\n * The name of the field, used for form submission.\n * @attr name\n */\n @property({ type: String, reflect: true })\n name = '';\n\n /**\n * The current value as an ISO 8601 date string (e.g. 2026-03-04).\n * @attr value\n */\n @property({ type: String })\n value = '';\n\n /**\n * The minimum selectable date as an ISO 8601 string.\n * @attr min\n */\n @property({ type: String })\n min = '';\n\n /**\n * The maximum selectable date as an ISO 8601 string.\n * @attr max\n */\n @property({ type: String })\n max = '';\n\n /**\n * The visible label text.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Whether the field is required for form submission.\n * @attr required\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * Whether the field is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Error message to display. When set, the field enters an error state.\n * @attr error\n */\n @property({ type: String })\n error = '';\n\n /**\n * Help text displayed below the field for guidance.\n * @attr help-text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText = '';\n\n /**\n * Display format hint shown as placeholder (e.g. MM/DD/YYYY).\n * @attr format\n */\n @property({ type: String })\n format = 'MM/DD/YYYY';\n\n /**\n * Locale string used for formatting the display value.\n * @attr locale\n */\n @property({ type: String })\n locale = 'en-US';\n\n /**\n * Validation message shown when the field is required but empty.\n * @attr required-message\n */\n @property({ type: String, attribute: 'required-message' })\n requiredMessage = 'This field is required.';\n\n /**\n * Accessible label for the calendar dialog.\n * @attr choose-date-label\n */\n @property({ type: String, attribute: 'choose-date-label' })\n chooseDateLabel = 'Choose a date';\n\n /**\n * Accessible label for the calendar trigger button when the calendar is closed.\n * @attr open-calendar-label\n */\n @property({ type: String, attribute: 'open-calendar-label' })\n openCalendarLabel = 'Open calendar';\n\n /**\n * Accessible label for the calendar trigger button when the calendar is open.\n * @attr close-calendar-label\n */\n @property({ type: String, attribute: 'close-calendar-label' })\n closeCalendarLabel = 'Close calendar';\n\n /**\n * Accessible label for the previous month navigation button.\n * @attr previous-month-label\n */\n @property({ type: String, attribute: 'previous-month-label' })\n previousMonthLabel = 'Previous month';\n\n /**\n * Accessible label for the next month navigation button.\n * @attr next-month-label\n */\n @property({ type: String, attribute: 'next-month-label' })\n nextMonthLabel = 'Next month';\n\n /**\n * Accessible name for screen readers, if different from the visible label.\n * Uses `accessible-label` attribute instead of `aria-label` to avoid\n * ARIAMixin shadowing on the host element. Highest-precedence naming source.\n * @attr accessible-label\n */\n @property({ type: String, attribute: 'accessible-label' })\n accessibleLabel: string | null = null;\n\n // ─── Internal State ───\n\n /**\n * Tracks whether the calendar popup is currently visible.\n * @internal\n */\n @state() private _isOpen = false;\n /**\n * The year currently displayed in the calendar view.\n * @internal\n */\n @state() private _viewYear: number = new Date().getFullYear();\n /**\n * The month (0-indexed) currently displayed in the calendar view.\n * @internal\n */\n @state() private _viewMonth: number = new Date().getMonth();\n /**\n * The day number currently focused within the calendar grid, or null when the calendar is closed.\n * @internal\n */\n @state() private _focusedDay: number | null = null;\n /**\n * The message announced to screen readers when the calendar month changes.\n * @internal\n */\n @state() private _liveMessage = '';\n\n /**\n * Cached calendar day grid for the current view month/year.\n * Recomputed in willUpdate() only when _viewMonth or _viewYear changes.\n * @internal\n */\n private _dayGrid: (Date | null)[] = [];\n\n /**\n * Cached aria-label strings for each date in the current grid, keyed by ISO date string.\n * Recomputed in willUpdate() alongside _dayGrid.\n * @internal\n */\n private _dayAriaLabels: Map<string, string> = new Map();\n\n // ─── Memoized formatters ───\n\n /** @internal */\n private _weekdayFormatter: Intl.DateTimeFormat | null = null;\n /** @internal */\n private _monthFormatter: Intl.DateTimeFormat | null = null;\n /** @internal */\n private _formatterLocale = '';\n /** @internal */\n private _cachedWeekdayNames: string[] | null = null;\n\n // ─── Internal References ───\n\n /** @internal */\n @query('.field__input')\n private _input: HTMLInputElement | undefined;\n\n /** @internal */\n @query('.field__trigger')\n private _trigger: HTMLButtonElement | undefined;\n\n /** @internal */\n @query('.calendar')\n private _calendar: HTMLDialogElement | undefined;\n\n // ─── Unique IDs ───\n\n /** @internal */\n private _id = _nextDatePickerId();\n /** @internal */\n private _inputId = `${this._id}-input`;\n /** @internal */\n private _helpTextId = `${this._id}-help`;\n /** @internal */\n private _errorId = `${this._id}-error`;\n /** @internal */\n private _calendarId = `${this._id}-calendar`;\n /** @internal */\n private _liveRegionId = `${this._id}-live`;\n /** @internal */\n private _labelId = `${this._id}-label`;\n /**\n * Id of the synthesized in-shadow span that mirrors the consumer-resolved\n * description text. Appended to the inner input's `aria-describedby` so AT\n * picks the consumer description up through the standard described-by\n * channel — `aria-description` is intentionally NOT written, because the\n * W3C AccName algorithm ignores `aria-description` whenever\n * `aria-describedby` is also present.\n * @internal\n */\n private _consumerDescId = `${this._id}-consumer-desc`;\n\n // ─── Slot Tracking (host-canonical naming) ───\n\n /**\n * Whether the label slot has any assigned elements with a useful name.\n * Per AccName 1.2 §4.3.10, an empty/whitespace-only slot does NOT count.\n * @internal\n */\n @state() private _hasLabelSlot = false;\n /**\n * Whether the error slot has any meaningful (non-empty, non-hidden) content.\n * @internal\n */\n @state() private _hasErrorSlot = false;\n /**\n * Whether the help-text slot has any meaningful (non-empty, non-hidden) content.\n * @internal\n */\n @state() private _hasHelpSlot = false;\n /**\n * Discriminated label source — drives precedence between slotted label,\n * `label` property, and unnamed.\n * @internal\n */\n @state() private _labelSource: 'string' | 'slot' | 'none' = 'none';\n /**\n * Flattened, trimmed text content from all label-slot nodes — used to drive\n * the inner input's `aria-label` on the no-IDL-ref fallback path and to\n * gate `_hasLabelSlot` per AccName 1.2.\n * @internal\n */\n @state() private _labelSlotText = '';\n /**\n * Whether the platform supports IDL element references on `ElementInternals`.\n * Drives the cross-shadow naming strategy for the inner `<input>`.\n * @internal\n */\n @state() private _supportsIdrefRefs = true;\n /**\n * Cached invalidity flag derived from `internals.validity.valid`, the\n * `error` property, and the slotted error content. Drives `aria-invalid`\n * on the inner input.\n * @internal\n */\n @state() private _invalid = false;\n /**\n * Deferred copy of `error` driven through reactive state so the persistent\n * live region can re-announce on transitions without direct DOM mutation.\n * @internal\n */\n @state() private _announcedError = '';\n\n // ─── Host-canonical ARIA bookkeeping ───\n\n /** Handle for the shared IDREF observer. @internal */\n private _ariaMirror: AriaIdrefMirrorHandle | null = null;\n /** @internal */\n private _helpSlotTextObserver: MutationObserver | null = null;\n /** @internal */\n private _errorSlotTextObserver: MutationObserver | null = null;\n /** @internal */\n private _hostDescribedByObserver: MutationObserver | null = null;\n /** @internal */\n private _consumerLabelledBy: string | null = null;\n /** @internal */\n private _consumerDescribedBy: string | null = null;\n /**\n * Direct references to ALL labellable elements projected into\n * `<slot name=\"label\">`. Aggregating every assigned element preserves\n * composed labels such as\n * `<svg slot=\"label\" aria-hidden=\"true\">…</svg><span slot=\"label\">Date</span>`.\n * @internal\n */\n private _slottedLabelEls: Element[] = [];\n /** @internal */\n private _labelSlotTextObserver: MutationObserver | null = null;\n /** @internal */\n private _externalRefsObserver: MutationObserver | null = null;\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n\n // Honour the static test override so synthetic environments choose the\n // path BEFORE connect runs.\n const ctor = this.constructor as typeof HelixDatePicker;\n this._supportsIdrefRefs =\n ctor.__testSupportsIdrefRefsOverride !== null\n ? ctor.__testSupportsIdrefRefsOverride\n : supportsIdrefElementReferences(this._internals);\n\n // Install the dedicated `aria-describedby` retraction observer BEFORE\n // the seeded `_syncHostAriaSemantics()` call below.\n this._hostDescribedByObserver = new MutationObserver((records) => {\n let consumerCleared = false;\n for (const record of records) {\n if (record.attributeName !== 'aria-describedby') continue;\n const oldValue = record.oldValue;\n const newValue = this.getAttribute('aria-describedby');\n if (oldValue !== null && newValue === null) {\n this._consumerDescribedBy = null;\n consumerCleared = true;\n }\n }\n if (consumerCleared) {\n this._syncHostAriaSemantics();\n }\n });\n this._hostDescribedByObserver.observe(this, {\n attributes: true,\n attributeFilter: ['aria-describedby'],\n attributeOldValue: true,\n });\n\n // Seed root-independent semantics from connect so the inner input\n // resolves naming before first paint.\n this._syncHostAriaSemantics();\n this._ariaMirror = installAriaIdrefMirror(this, () => {\n this._syncHostAriaSemantics();\n });\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n document.removeEventListener('click', this._handleDocumentClick, true);\n this._ariaMirror?.disconnect();\n this._ariaMirror = null;\n this._helpSlotTextObserver?.disconnect();\n this._helpSlotTextObserver = null;\n this._errorSlotTextObserver?.disconnect();\n this._errorSlotTextObserver = null;\n this._labelSlotTextObserver?.disconnect();\n this._labelSlotTextObserver = null;\n this._hostDescribedByObserver?.disconnect();\n this._hostDescribedByObserver = null;\n this._externalRefsObserver?.disconnect();\n this._externalRefsObserver = null;\n }\n\n override willUpdate(changedProperties: PropertyValues<this>): void {\n super.willUpdate(changedProperties);\n\n // Sync form state before render so the browser form participation is\n // always up-to-date without causing an extra render cycle.\n if (changedProperties.has('value')) {\n this._internals.setFormValue(this.value);\n }\n\n // Seed `_announcedError` BEFORE render so the persistent live region\n // renders with the error text in the SAME frame that the alert container\n // appears. Covers first paint AND runtime transitions to a non-empty error.\n if (changedProperties.has('error') || !this.hasUpdated) {\n this._announcedError = this.error ?? '';\n }\n\n if (changedProperties.has('label')) {\n this._refreshLabelSource();\n }\n\n // Recompute the day grid and aria-labels only when the viewed month/year\n // or locale changes — not on every render.\n const gridChanged =\n (changedProperties as Map<PropertyKey, unknown>).has('_viewMonth') ||\n (changedProperties as Map<PropertyKey, unknown>).has('_viewYear') ||\n changedProperties.has('locale') ||\n this._dayGrid.length === 0;\n\n if (gridChanged) {\n this._dayGrid = this._getDaysInGrid();\n this._dayAriaLabels = new Map(\n this._dayGrid\n .filter((d): d is Date => d !== null)\n .map((d) => [\n this._toISO(d),\n d.toLocaleDateString(this.locale, {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n }),\n ]),\n );\n }\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n\n // Host-elevated ARIA semantics — runs after every render so the inner\n // input's announced name/description follow consumer-IDREF / slot /\n // property changes within the same frame.\n this._syncHostAriaSemantics();\n\n // Drive re-announcement from reactive state on error→error transitions\n // (rAF clear-and-re-set forces AT to re-read role=\"alert\" content).\n if (changedProperties.has('error')) {\n const previousError = changedProperties.get('error') as string | undefined;\n if (previousError && this.error) {\n this._announcedError = '';\n requestAnimationFrame(() => {\n this._announcedError = this.error;\n });\n } else {\n this._announcedError = this.error;\n }\n }\n\n if ((changedProperties as Map<PropertyKey, unknown>).has('_isOpen')) {\n if (this._isOpen) {\n // Sync view to the currently selected date when opening.\n const selected = this._parseISODate(this.value);\n if (selected) {\n this._viewYear = selected.getFullYear();\n this._viewMonth = selected.getMonth();\n }\n void this.updateComplete.then(() => {\n this._calendar?.show();\n this._focusActiveDay();\n document.addEventListener('click', this._handleDocumentClick, true);\n });\n } else {\n this._calendar?.close();\n this._focusedDay = null;\n document.removeEventListener('click', this._handleDocumentClick, true);\n }\n }\n\n if (\n (changedProperties as Map<PropertyKey, unknown>).has('_viewMonth') ||\n (changedProperties as Map<PropertyKey, unknown>).has('_viewYear')\n ) {\n if (this._isOpen) {\n const monthName = this._getMonthName(this._viewMonth);\n this._liveMessage = `${monthName} ${this._viewYear}`;\n void this.updateComplete.then(() => {\n this._focusActiveDay();\n });\n }\n }\n }\n\n override firstUpdated(changed: PropertyValues<this>): void {\n super.firstUpdated(changed);\n // `slotchange` fires as a microtask after the initial synchronous render.\n // Without proactive seeding, the first `_syncHostAriaSemantics()` call\n // (driven from `updated()`) observes stale empty slot state. Seed\n // synchronously here so first paint announces the correct name/description.\n this._seedSlotStateSync();\n this._syncHostAriaSemantics();\n\n // WCAG 4.1.2: warn when no accessible name is available.\n if (\n !this.label &&\n !this.accessibleLabel &&\n !this._hasLabelSlot &&\n !this.getAttribute('aria-label') &&\n !this.getAttribute('aria-labelledby')\n ) {\n devWarn(\n 'hx-date-picker',\n 'No accessible label provided. Set the `label` attribute, `accessible-label`, `aria-label`, `aria-labelledby`, or project a `<slot name=\"label\">` child. An unlabeled date picker violates WCAG 2.1 AA (4.1.2 Name, Role, Value).',\n );\n }\n }\n\n /**\n * Synchronous slot-state seed. Mirrors the side effects of the three\n * `_handle*SlotChange` handlers (label / help-text / error) but is driven by\n * direct `slot.assignedNodes()` reads so we can populate state BEFORE the\n * microtask `slotchange` events fire after the first render.\n * @internal\n */\n private _seedSlotStateSync(): void {\n const root = this.shadowRoot;\n if (!root) return;\n const labelSlot = root.querySelector<HTMLSlotElement>('slot[name=\"label\"]');\n if (labelSlot) {\n const state = this._readLabelSlotState(labelSlot);\n this._hasLabelSlot = state.hasUsefulName;\n this._slottedLabelEls = state.elements;\n this._labelSlotText = state.text;\n this._installLabelSlotTextObserver(state.elements);\n this._refreshLabelSource();\n }\n const helpSlot = root.querySelector<HTMLSlotElement>('slot[name=\"help-text\"]');\n if (helpSlot) {\n this._hasHelpSlot = this._readHelpSlotStateSync(helpSlot);\n this._installHelpSlotTextObserver(helpSlot);\n }\n const errorSlot = root.querySelector<HTMLSlotElement>('slot[name=\"error\"]');\n if (errorSlot) {\n this._hasErrorSlot = this._readErrorSlotStateSync(errorSlot);\n this._installErrorSlotTextObserver(errorSlot);\n }\n }\n\n /**\n * Reads the label slot's assigned nodes and computes the discriminated\n * naming state. An empty whitespace-only slot does NOT count as a useful\n * name. Per AccName 1.2 §4.3.10, `aria-hidden=\"true\"` and `[hidden]`\n * elements contribute zero to the accessible name.\n * @internal\n */\n private _readLabelSlotState(slot: HTMLSlotElement): {\n hasUsefulName: boolean;\n elements: Element[];\n text: string;\n } {\n // Use `assignedNodes()` WITHOUT `flatten: true` so we read only consumer-\n // projected nodes — never the slot's fallback content (the rendered\n // internal `<label>` element when `this.label` is set). Conflating\n // fallback content with consumer slot content makes `_hasLabelSlot`\n // truthy in the label-only case.\n const nodes = slot.assignedNodes();\n const elements: Element[] = [];\n const fragments: string[] = [];\n for (const node of nodes) {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const el = node as Element;\n elements.push(el);\n if (el.getAttribute('aria-hidden') === 'true') continue;\n const elText = flattenAccName(el);\n if (elText) fragments.push(elText);\n } else if (node.nodeType === Node.TEXT_NODE) {\n const txt = (node.textContent ?? '').trim();\n if (txt) fragments.push(txt);\n }\n }\n const trimmedText = fragments.join(' ').replace(/\\s+/g, ' ').trim();\n return {\n hasUsefulName: trimmedText.length > 0,\n elements,\n text: trimmedText,\n };\n }\n\n /**\n * Re-evaluate the help-text slot's \"has meaningful content\" state from its\n * current effective text. AccName-aware so descendants carrying\n * `aria-hidden=\"true\"` or `hidden` do NOT count.\n * @internal\n */\n private _readHelpSlotStateSync(slot: HTMLSlotElement): boolean {\n const nodes = slot.assignedNodes({ flatten: true });\n for (const node of nodes) {\n if (node.nodeType === Node.TEXT_NODE) {\n if ((node.textContent ?? '').trim().length > 0) return true;\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n if (flattenAccName(node as Element).length > 0) return true;\n }\n }\n return false;\n }\n\n /**\n * Re-evaluate the error slot's \"has meaningful content\" state from its\n * current effective text.\n * @internal\n */\n private _readErrorSlotStateSync(slot: HTMLSlotElement): boolean {\n const nodes = slot.assignedNodes({ flatten: true });\n for (const node of nodes) {\n if (node.nodeType === Node.TEXT_NODE) {\n if ((node.textContent ?? '').trim().length > 0) return true;\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n if (flattenAccName(node as Element).length > 0) return true;\n }\n }\n return false;\n }\n\n /**\n * Recomputes the discriminated label source. Slot takes precedence over\n * the `label` property because the render path suppresses the internal\n * `<label>` when slotted content is present.\n * @internal\n */\n private _refreshLabelSource(): void {\n if (this._hasLabelSlot) {\n this._labelSource = 'slot';\n } else if (this.label) {\n this._labelSource = 'string';\n } else {\n this._labelSource = 'none';\n }\n }\n\n /**\n * (Re-)installs a `MutationObserver` against the deduped union of\n * consumer-resolved label/description elements.\n * @internal\n */\n private _installExternalRefsObserver(elements: Element[]): void {\n if (this._externalRefsObserver) {\n this._externalRefsObserver.disconnect();\n this._externalRefsObserver = null;\n }\n if (elements.length === 0) return;\n const unique = new Set<Element>(elements);\n const observer = new MutationObserver(() => {\n this._syncHostAriaSemantics();\n });\n for (const el of unique) {\n observer.observe(el, {\n characterData: true,\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: ['aria-hidden', 'hidden'],\n });\n }\n this._externalRefsObserver = observer;\n }\n\n /**\n * Resolves consumer-supplied label/description IDREFs on the host and\n * writes the canonical ARIA onto the **inner readonly `<input>`** for the\n * W3C APG date-picker dialog pattern.\n *\n * The inner input is INTENTIONALLY NOT a `role=\"combobox\"` — it is a\n * readonly text input with `aria-haspopup=\"dialog\"` per W3C APG date picker\n * dialog. A separate trigger button owns `aria-expanded` /\n * `aria-controls=${calendarId}` for the dialog. (Cross-shadow `aria-controls`\n * referencing an in-shadow id is a documented limitation, mirrored from\n * hx-popover and hx-dropdown.)\n *\n * Cross-shadow naming uses a belt-and-suspenders strategy:\n *\n * 1. **Modern path** (`_supportsIdrefRefs === true`): consumer-resolved\n * label/description elements are written onto\n * `internals.ariaLabelledByElements` / `ariaDescribedByElements` on\n * the host. Host-level `aria-labelledby` / `aria-describedby`\n * attributes are LEFT IN PLACE so AT walking up the DOM also sees them.\n * Resolved-element text is also flattened onto the inner input as\n * `aria-label` so AT that does NOT walk up still announces the right\n * name.\n *\n * 2. **Legacy fallback** (`_supportsIdrefRefs === false`): the resolved-\n * element text is flattened onto the inner input as `aria-label` and\n * mirrored into a synthesized in-shadow span pointed at by the inner\n * input's `aria-describedby`.\n *\n * Writing `aria-labelledby=\"<light-DOM id>\"` directly on the shadow-DOM\n * inner input is INTENTIONALLY avoided: light-DOM ids do not resolve from\n * inside a shadow root.\n * @internal\n */\n private _syncHostAriaSemantics(): void {\n const internals = this._internals;\n\n const input = this._input;\n if (!input) {\n // Inner input not yet rendered; defer. Still derive `_invalid` so\n // `aria-invalid` first-paint is correct once the input renders.\n const isInvalidEarly = !internals.validity.valid || !!(this.error || this._hasErrorSlot);\n if (this._invalid !== isInvalidEarly) this._invalid = isInvalidEarly;\n return;\n }\n\n const liveAriaLabel = this.getAttribute('aria-label');\n const hostAriaLabel = liveAriaLabel !== null ? liveAriaLabel.trim() || '' : '';\n\n const internalLabel = this.shadowRoot?.getElementById(this._labelId) ?? null;\n const slottedLabelEls = this._slottedLabelEls;\n const helpEl = this.shadowRoot?.getElementById(this._helpTextId) ?? null;\n const errorEl = this.shadowRoot?.getElementById(this._errorId) ?? null;\n\n const liveLabelledBy = this.getAttribute('aria-labelledby');\n this._consumerLabelledBy = liveLabelledBy;\n const liveDescribedBy = this.getAttribute('aria-describedby');\n this._consumerDescribedBy = liveDescribedBy;\n\n const consumerLabelEls = resolveIdrefTokens(this, this._consumerLabelledBy);\n const hasEffectiveLabelledBy = consumerLabelEls.length > 0;\n\n const consumerDescEls = resolveIdrefTokens(this, this._consumerDescribedBy);\n\n // Observe in-place text mutations on the resolved external IDREF targets.\n this._installExternalRefsObserver([...consumerLabelEls, ...consumerDescEls]);\n\n const hasError = !!(this.error || this._hasErrorSlot);\n\n // `aria-invalid` reflects EVERY signal the consumer can use to express\n // invalidity: `setValidity()` (required-empty), explicit `error` property,\n // and slotted error content.\n const isInvalid = !internals.validity.valid || hasError;\n if (this._invalid !== isInvalid) this._invalid = isInvalid;\n\n // `accessibleLabel` is the canonical AT name when explicitly set; it\n // outranks visible label / aria-labelledby per the helix override.\n const explicitAccessibleLabel =\n typeof this.accessibleLabel === 'string' && this.accessibleLabel.trim().length > 0\n ? this.accessibleLabel\n : null;\n\n // Top-level `aria-hidden=\"true\"` / `hidden` elements MUST NOT be forwarded\n // to `internals.ariaLabelledByElements` / `ariaDescribedByElements`.\n const isVisibleForAccName = (el: Element): boolean =>\n el.getAttribute('aria-hidden') !== 'true' && !el.hasAttribute('hidden');\n\n // Build the augmented element lists used by the modern (IDL-refs) path.\n const labelElsForInternals: Element[] = [];\n if (!explicitAccessibleLabel) {\n labelElsForInternals.push(...consumerLabelEls.filter(isVisibleForAccName));\n if (!hasEffectiveLabelledBy && !hostAriaLabel) {\n if (this._labelSource === 'slot' && slottedLabelEls.length > 0) {\n labelElsForInternals.push(...slottedLabelEls.filter(isVisibleForAccName));\n } else if (this._labelSource === 'string' && internalLabel) {\n labelElsForInternals.push(internalLabel);\n }\n }\n }\n\n const descElsForInternals: Element[] = [...consumerDescEls.filter(isVisibleForAccName)];\n if (helpEl && !hasError && this._hasHelpSlot) {\n descElsForInternals.push(helpEl);\n }\n if (errorEl && hasError) {\n descElsForInternals.push(errorEl);\n }\n\n // ─── Modern-path: ElementInternals IDL element references ───\n type InternalsWithIdrefRefs = ElementInternals & {\n ariaLabelledByElements: Element[] | null;\n ariaDescribedByElements: Element[] | null;\n };\n if (this._supportsIdrefRefs) {\n const refsInternals = internals as InternalsWithIdrefRefs;\n refsInternals.ariaLabelledByElements =\n labelElsForInternals.length > 0 ? labelElsForInternals : null;\n refsInternals.ariaDescribedByElements =\n descElsForInternals.length > 0 ? descElsForInternals : null;\n // Forward `accessibleLabel` to `internals.ariaLabel` when set; CLEAR\n // with `null` (NOT `''`) when absent, because per W3C AccName an empty\n // `aria-label` STILL outranks `aria-labelledby` and would erase the\n // name resolved from element references / fallbacks.\n if (explicitAccessibleLabel) {\n internals.ariaLabel = explicitAccessibleLabel;\n } else {\n internals.ariaLabel = null;\n }\n }\n\n // ─── Compute the inner input's accessible name (text-flatten path) ───\n const flattenText = (els: Element[]): string =>\n els\n .filter(isVisibleForAccName)\n .map((el) => flattenAccName(el))\n .filter((t) => t.length > 0)\n .join(' ');\n\n let inputAriaLabel: string | null = null;\n let inputAriaLabelledBy: string | null = null;\n\n // Precedence (per AccName 1.2 §4.3.1 with helix override):\n // 1. accessibleLabel (helix-specific override)\n // 2. consumer aria-labelledby resolves → text-flatten\n // 3. consumer aria-label on the host\n // 4. slotted label → text content (NEVER cross-shadow id reference)\n // 5. label property → internal `<label>` id (same shadow root)\n // 6. else: unnamed\n let labelledByFlat = '';\n if (!explicitAccessibleLabel && hasEffectiveLabelledBy) {\n labelledByFlat = flattenText(consumerLabelEls);\n }\n if (explicitAccessibleLabel) {\n inputAriaLabel = explicitAccessibleLabel;\n } else if (labelledByFlat) {\n inputAriaLabel = labelledByFlat;\n } else if (hostAriaLabel) {\n inputAriaLabel = hostAriaLabel;\n } else if (this._labelSource === 'slot') {\n // Light-DOM ids do not resolve from inside a shadow root, so we MUST\n // text-flatten on the legacy/fallback path.\n if (this._labelSlotText) {\n inputAriaLabel = this._labelSlotText;\n } else if (slottedLabelEls.length > 0) {\n const flat = flattenText(slottedLabelEls);\n if (flat) inputAriaLabel = flat;\n }\n } else if (this._labelSource === 'string') {\n if (internalLabel?.id) {\n inputAriaLabelledBy = internalLabel.id;\n } else if (this.label) {\n inputAriaLabel = this.label;\n }\n }\n\n if (inputAriaLabelledBy) {\n if (input.getAttribute('aria-labelledby') !== inputAriaLabelledBy) {\n input.setAttribute('aria-labelledby', inputAriaLabelledBy);\n }\n if (input.hasAttribute('aria-label')) input.removeAttribute('aria-label');\n } else if (inputAriaLabel) {\n if (input.getAttribute('aria-label') !== inputAriaLabel) {\n input.setAttribute('aria-label', inputAriaLabel);\n }\n if (input.hasAttribute('aria-labelledby')) input.removeAttribute('aria-labelledby');\n } else {\n if (input.hasAttribute('aria-label')) input.removeAttribute('aria-label');\n if (input.hasAttribute('aria-labelledby')) input.removeAttribute('aria-labelledby');\n }\n\n // ─── Write the inner input's aria-describedby chain ───\n // Unify ALL descriptions through a single `aria-describedby` channel.\n // The W3C AccName algorithm ignores `aria-description` whenever\n // `aria-describedby` is also present, so consumer descriptions are\n // mirrored into a synthesized in-shadow span and that same-root id is\n // added to the chain.\n const consumerDescSpan = this.shadowRoot?.getElementById(this._consumerDescId) ?? null;\n const consumerDescText = flattenText(consumerDescEls);\n if (consumerDescSpan && consumerDescSpan.textContent !== consumerDescText) {\n consumerDescSpan.textContent = consumerDescText;\n }\n\n const describedByIds: string[] = [];\n if (consumerDescText && consumerDescSpan) {\n describedByIds.push(this._consumerDescId);\n }\n if (helpEl && !hasError && this._hasHelpSlot) {\n describedByIds.push(this._helpTextId);\n }\n if (errorEl && hasError) {\n describedByIds.push(this._errorId);\n }\n // The component's own helpText property renders an in-shadow help div;\n // chain that id when no slotted help is present (it's the same id and\n // the fallback content lives in the same div).\n if (\n !this._hasHelpSlot &&\n this.helpText &&\n !hasError &&\n helpEl &&\n !describedByIds.includes(this._helpTextId)\n ) {\n describedByIds.push(this._helpTextId);\n }\n if (describedByIds.length > 0) {\n const value = describedByIds.join(' ');\n if (input.getAttribute('aria-describedby') !== value) {\n input.setAttribute('aria-describedby', value);\n }\n } else if (input.hasAttribute('aria-describedby')) {\n input.removeAttribute('aria-describedby');\n }\n\n // Never write `aria-description` on the inner input — silently dropped by\n // AccName whenever `aria-describedby` is also present. Strip defensively.\n if (input.hasAttribute('aria-description')) {\n input.removeAttribute('aria-description');\n }\n }\n\n /**\n * (Re-)installs the help-text slot text/visibility observer.\n * @internal\n */\n private _installHelpSlotTextObserver(slot: HTMLSlotElement | null): void {\n this._helpSlotTextObserver?.disconnect();\n if (!slot) {\n this._helpSlotTextObserver = null;\n return;\n }\n const observer = new MutationObserver(() => {\n this._hasHelpSlot = this._readHelpSlotStateSync(slot);\n this._syncHostAriaSemantics();\n });\n slot.assignedNodes().forEach((node) => {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n return;\n }\n observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['aria-hidden', 'hidden'],\n });\n });\n this._helpSlotTextObserver = observer;\n }\n\n /**\n * (Re-)installs the error slot text/visibility observer.\n * @internal\n */\n private _installErrorSlotTextObserver(slot: HTMLSlotElement | null): void {\n this._errorSlotTextObserver?.disconnect();\n if (!slot) {\n this._errorSlotTextObserver = null;\n return;\n }\n const observer = new MutationObserver(() => {\n this._hasErrorSlot = this._readErrorSlotStateSync(slot);\n this._syncHostAriaSemantics();\n });\n slot.assignedNodes().forEach((node) => {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n return;\n }\n observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['aria-hidden', 'hidden'],\n });\n });\n this._errorSlotTextObserver = observer;\n }\n\n /**\n * (Re-)installs the label slot text/visibility observer over the current\n * set of slotted label elements.\n * @internal\n */\n private _installLabelSlotTextObserver(elements: Element[]): void {\n this._labelSlotTextObserver?.disconnect();\n if (elements.length === 0) {\n this._labelSlotTextObserver = null;\n return;\n }\n const observer = new MutationObserver(() => {\n const fragments: string[] = [];\n for (const el of elements) {\n if (el.getAttribute('aria-hidden') === 'true') continue;\n const t = flattenAccName(el);\n if (t) fragments.push(t);\n }\n const trimmed = fragments.join(' ').replace(/\\s+/g, ' ').trim();\n this._labelSlotText = trimmed;\n this._hasLabelSlot = trimmed.length > 0;\n this._refreshLabelSource();\n this._syncHostAriaSemantics();\n });\n for (const el of elements) {\n observer.observe(el, {\n characterData: true,\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['aria-hidden', 'hidden'],\n });\n }\n this._labelSlotTextObserver = observer;\n }\n\n // ─── Slot Change Handlers ───\n\n /** @internal */\n private _handleLabelSlotChange(e: Event): void {\n if (!(e.target instanceof HTMLSlotElement)) return;\n const state = this._readLabelSlotState(e.target);\n this._hasLabelSlot = state.hasUsefulName;\n this._slottedLabelEls = state.elements;\n this._labelSlotText = state.text;\n // Preserve back-compat: if the first slotted label element lacks an id,\n // assign a stable one — earlier callers relied on this for `for=…`-style\n // associations.\n if (state.elements.length > 0) {\n const slottedLabel = state.elements[0];\n if (slottedLabel && !slottedLabel.id) {\n slottedLabel.id = `${this._inputId}-slotted-label`;\n }\n }\n this._installLabelSlotTextObserver(state.elements);\n this._refreshLabelSource();\n this._syncHostAriaSemantics();\n }\n\n /** @internal */\n private _handleErrorSlotChange(e: Event): void {\n if (!(e.target instanceof HTMLSlotElement)) return;\n this._hasErrorSlot = this._readErrorSlotStateSync(e.target);\n this._installErrorSlotTextObserver(e.target);\n this._syncHostAriaSemantics();\n }\n\n /** @internal */\n private _handleHelpSlotChange(e: Event): void {\n if (!(e.target instanceof HTMLSlotElement)) return;\n this._hasHelpSlot = this._readHelpSlotStateSync(e.target);\n this._installHelpSlotTextObserver(e.target);\n this._syncHostAriaSemantics();\n }\n\n // ─── Document Click ───\n\n private readonly _handleDocumentClick = (e: MouseEvent): void => {\n if (!this._isOpen) return;\n const path = e.composedPath();\n if (!path.includes(this)) {\n this._closeCalendar();\n }\n };\n\n // ─── Form Integration ───\n\n /** @internal */\n override _updateValidity(): void {\n if (this.required && !this.value) {\n this._internals.setValidity(\n { valueMissing: true },\n this.error || this.requiredMessage,\n this._input,\n );\n } else {\n this._internals.setValidity({});\n }\n // Re-sync ARIA after every setValidity() so `aria-invalid` reflects\n // freshly computed validity.\n this._syncHostAriaSemantics();\n }\n\n /** @internal */\n protected override _onFormReset(): void {\n this.value = '';\n this._internals.setFormValue(null);\n this._isOpen = false;\n this._resetInteractionState();\n }\n\n /** @internal */\n protected override _onFormStateRestore(\n state: File | string | FormData | null,\n _mode: 'restore' | 'autocomplete',\n ): void {\n if (typeof state === 'string') {\n this.value = state;\n }\n }\n\n /** @internal */\n protected override _onFormDisabled(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n // ─── Public Methods ───\n\n override focus(options?: FocusOptions): void {\n this._trigger?.focus(options);\n }\n\n // ─── Date Utilities ───\n\n /** @internal */\n private _parseISODate(iso: string): Date | null {\n if (!iso) return null;\n const d = new Date(iso + 'T00:00:00');\n return isNaN(d.getTime()) ? null : d;\n }\n\n /** @internal */\n private _toISO(date: Date): string {\n const y = date.getFullYear();\n const m = String(date.getMonth() + 1).padStart(2, '0');\n const d = String(date.getDate()).padStart(2, '0');\n return `${y}-${m}-${d}`;\n }\n\n /** @internal */\n private _formatForDisplay(iso: string): string {\n const date = this._parseISODate(iso);\n if (!date) return '';\n return date.toLocaleDateString(this.locale, {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n });\n }\n\n /** @internal */\n private _isDateDisabled(date: Date): boolean {\n const iso = this._toISO(date);\n if (this.min && iso < this.min) return true;\n if (this.max && iso > this.max) return true;\n return false;\n }\n\n /** @internal */\n private _isSameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n }\n\n /** @internal */\n private _isToday(date: Date): boolean {\n return this._isSameDay(date, new Date());\n }\n\n /** @internal */\n private _ensureFormatters(): void {\n if (this._formatterLocale === this.locale && this._weekdayFormatter && this._monthFormatter) {\n return;\n }\n this._weekdayFormatter = new Intl.DateTimeFormat(this.locale, { weekday: 'short' });\n this._monthFormatter = new Intl.DateTimeFormat(this.locale, { month: 'long' });\n this._formatterLocale = this.locale;\n this._cachedWeekdayNames = null;\n }\n\n /** @internal */\n private _getMonthName(month: number): string {\n this._ensureFormatters();\n const fmt = this._monthFormatter ?? new Intl.DateTimeFormat(this.locale, { month: 'long' });\n return fmt.format(new Date(2000, month, 1));\n }\n\n /** @internal */\n private _getDayName(dayIndex: number): string {\n this._ensureFormatters();\n const fmt =\n this._weekdayFormatter ?? new Intl.DateTimeFormat(this.locale, { weekday: 'short' });\n return fmt.format(new Date(2000, 0, 2 + dayIndex));\n }\n\n /** @internal */\n private _getWeekdayNames(): string[] {\n this._ensureFormatters();\n if (!this._cachedWeekdayNames) {\n this._cachedWeekdayNames = Array.from({ length: 7 }, (_, i) => this._getDayName(i));\n }\n return this._cachedWeekdayNames;\n }\n\n // ─── Calendar Grid ───\n\n /** @internal */\n private _getDaysInGrid(): (Date | null)[] {\n const firstOfMonth = new Date(this._viewYear, this._viewMonth, 1);\n const leadingBlanks = firstOfMonth.getDay(); // 0=Sun\n const daysInMonth = new Date(this._viewYear, this._viewMonth + 1, 0).getDate();\n\n const cells: (Date | null)[] = [];\n\n for (let i = 0; i < leadingBlanks; i++) {\n cells.push(null);\n }\n\n for (let d = 1; d <= daysInMonth; d++) {\n cells.push(new Date(this._viewYear, this._viewMonth, d));\n }\n\n const remainder = cells.length % 7;\n if (remainder !== 0) {\n for (let i = 0; i < 7 - remainder; i++) {\n cells.push(null);\n }\n }\n\n return cells;\n }\n\n // ─── Calendar Open/Close ───\n\n /** @internal */\n private _openCalendar(): void {\n if (this.disabled) return;\n this._isOpen = true;\n }\n\n /** @internal */\n private _closeCalendar(): void {\n this._isOpen = false;\n void this.updateComplete.then(() => {\n this._trigger?.focus();\n });\n }\n\n /** @internal */\n private _toggleCalendar(): void {\n if (this._isOpen) {\n this._closeCalendar();\n } else {\n this._openCalendar();\n }\n }\n\n // ─── Focus Management ───\n\n /** @internal */\n private _focusActiveDay(): void {\n if (!this._calendar) return;\n\n const selectedISO = this.value;\n const selected = this._parseISODate(selectedISO);\n\n let targetDay: number | null = null;\n\n if (\n selected &&\n selected.getFullYear() === this._viewYear &&\n selected.getMonth() === this._viewMonth\n ) {\n targetDay = selected.getDate();\n } else {\n const today = new Date();\n if (today.getFullYear() === this._viewYear && today.getMonth() === this._viewMonth) {\n const todayDate = new Date(this._viewYear, this._viewMonth, today.getDate());\n if (!this._isDateDisabled(todayDate)) {\n targetDay = today.getDate();\n }\n }\n }\n\n if (targetDay === null) {\n const daysInMonth = new Date(this._viewYear, this._viewMonth + 1, 0).getDate();\n for (let d = 1; d <= daysInMonth; d++) {\n const date = new Date(this._viewYear, this._viewMonth, d);\n if (!this._isDateDisabled(date)) {\n targetDay = d;\n break;\n }\n }\n }\n\n if (targetDay !== null) {\n this._focusedDay = targetDay;\n void this.updateComplete.then(() => {\n const btn = this._calendar?.querySelector<HTMLButtonElement>(`[data-day=\"${targetDay}\"]`);\n btn?.focus();\n });\n }\n }\n\n // ─── Month Navigation ───\n\n /** @internal */\n private _prevMonth(): void {\n if (this._viewMonth === 0) {\n this._viewMonth = 11;\n this._viewYear = this._viewYear - 1;\n } else {\n this._viewMonth = this._viewMonth - 1;\n }\n }\n\n /** @internal */\n private _nextMonth(): void {\n if (this._viewMonth === 11) {\n this._viewMonth = 0;\n this._viewYear = this._viewYear + 1;\n } else {\n this._viewMonth = this._viewMonth + 1;\n }\n }\n\n // ─── Day Selection ───\n\n /** @internal */\n private _selectDay(date: Date): void {\n if (this._isDateDisabled(date)) return;\n\n const iso = this._toISO(date);\n this.value = iso;\n this._internals.setFormValue(iso);\n this._handleInteractionInput();\n this._handleInteractionBlur();\n\n this.dispatchEvent(\n new CustomEvent<{ value: string; date: Date }>('hx-change', {\n bubbles: true,\n composed: true,\n detail: { value: iso, date },\n }),\n );\n\n this._closeCalendar();\n }\n\n /** @internal */\n private readonly _handleGridClick = (e: Event): void => {\n const target = (e.target as Element).closest<HTMLElement>('[data-date]');\n if (!target) return;\n const iso = target.dataset['date'];\n if (!iso) return;\n const date = this._parseISODate(iso);\n if (date) {\n this._selectDay(date);\n }\n };\n\n // ─── Calendar Keyboard Navigation ───\n\n /** @internal */\n private _handleCalendarKeydown(e: KeyboardEvent): void {\n const { key } = e;\n\n if (key === 'Tab') {\n this._handleCalendarTab(e);\n return;\n }\n\n if (key === 'Escape') {\n e.stopPropagation();\n this._closeCalendar();\n return;\n }\n\n if (\n key !== 'ArrowLeft' &&\n key !== 'ArrowRight' &&\n key !== 'ArrowUp' &&\n key !== 'ArrowDown' &&\n key !== 'Enter' &&\n key !== ' ' &&\n key !== 'Home' &&\n key !== 'End' &&\n key !== 'PageUp' &&\n key !== 'PageDown'\n ) {\n return;\n }\n\n e.preventDefault();\n\n const currentFocused = this._focusedDay ?? 1;\n const daysInMonth = new Date(this._viewYear, this._viewMonth + 1, 0).getDate();\n\n if (key === 'Enter' || key === ' ') {\n const date = new Date(this._viewYear, this._viewMonth, currentFocused);\n if (!this._isDateDisabled(date)) {\n this._selectDay(date);\n }\n return;\n }\n\n if (key === 'PageUp') {\n this._prevMonth();\n return;\n }\n\n if (key === 'PageDown') {\n this._nextMonth();\n return;\n }\n\n if (key === 'Home') {\n const currentDate = new Date(this._viewYear, this._viewMonth, currentFocused);\n const dayOfWeek = currentDate.getDay();\n const newDay = currentFocused - dayOfWeek;\n if (newDay >= 1) {\n this._focusedDay = newDay;\n void this.updateComplete.then(() => {\n this._calendar?.querySelector<HTMLButtonElement>(`[data-day=\"${newDay}\"]`)?.focus();\n });\n }\n return;\n }\n\n if (key === 'End') {\n const currentDate = new Date(this._viewYear, this._viewMonth, currentFocused);\n const dayOfWeek = currentDate.getDay();\n const daysToSaturday = 6 - dayOfWeek;\n const newDay = currentFocused + daysToSaturday;\n if (newDay <= daysInMonth) {\n this._focusedDay = newDay;\n void this.updateComplete.then(() => {\n this._calendar?.querySelector<HTMLButtonElement>(`[data-day=\"${newDay}\"]`)?.focus();\n });\n }\n return;\n }\n\n let newDay = currentFocused;\n\n if (key === 'ArrowLeft') newDay = currentFocused - 1;\n if (key === 'ArrowRight') newDay = currentFocused + 1;\n if (key === 'ArrowUp') newDay = currentFocused - 7;\n if (key === 'ArrowDown') newDay = currentFocused + 7;\n\n if (newDay < 1) {\n this._prevMonth();\n const prevDaysInMonth = new Date(this._viewYear, this._viewMonth + 1, 0).getDate();\n this._focusedDay = prevDaysInMonth + newDay;\n void this.updateComplete.then(() => {\n const day = this._focusedDay;\n this._calendar?.querySelector<HTMLButtonElement>(`[data-day=\"${day}\"]`)?.focus();\n });\n return;\n }\n\n if (newDay > daysInMonth) {\n const overflow = newDay - daysInMonth;\n this._nextMonth();\n this._focusedDay = overflow;\n void this.updateComplete.then(() => {\n const day = this._focusedDay;\n this._calendar?.querySelector<HTMLButtonElement>(`[data-day=\"${day}\"]`)?.focus();\n });\n return;\n }\n\n this._focusedDay = newDay;\n void this.updateComplete.then(() => {\n this._calendar?.querySelector<HTMLButtonElement>(`[data-day=\"${newDay}\"]`)?.focus();\n });\n }\n\n // ─── Navigation Boundary Checks ───\n\n /** @internal */\n private _isPrevMonthDisabled(): boolean {\n if (!this.min) return false;\n const firstOfCurrentView = new Date(this._viewYear, this._viewMonth, 1);\n const minDate = this._parseISODate(this.min);\n if (!minDate) return false;\n return firstOfCurrentView <= minDate;\n }\n\n /** @internal */\n private _isNextMonthDisabled(): boolean {\n if (!this.max) return false;\n const lastOfCurrentView = new Date(this._viewYear, this._viewMonth + 1, 0);\n const maxDate = this._parseISODate(this.max);\n if (!maxDate) return false;\n return lastOfCurrentView >= maxDate;\n }\n\n // ─── Focus Trap ───\n\n /** @internal */\n private _handleCalendarTab(e: KeyboardEvent): void {\n if (e.key !== 'Tab' || !this._isOpen) return;\n\n const focusableEls = this._calendar?.querySelectorAll<HTMLElement>(\n 'button:not([disabled]), [tabindex=\"0\"]',\n );\n if (!focusableEls || focusableEls.length === 0) return;\n\n const first = focusableEls[0];\n const last = focusableEls[focusableEls.length - 1];\n\n // In shadow DOM, document.activeElement returns the host element, not the\n // focused inner element. Use shadowRoot.activeElement exclusively so the\n // comparison is accurate and the trap cannot malfunction and strand users.\n const shadowActive = this.shadowRoot?.activeElement;\n\n if (e.shiftKey) {\n if (shadowActive === first) {\n e.preventDefault();\n last?.focus();\n }\n } else {\n if (shadowActive === last) {\n e.preventDefault();\n first?.focus();\n }\n }\n }\n\n // ─── Render Helpers ───\n\n /** @internal */\n private _renderWeekdayHeaders() {\n const names = this._getWeekdayNames();\n const headers = names.map(\n (name) =>\n html`<div class=\"calendar__weekday\" role=\"columnheader\" aria-label=${name}>\n ${name.slice(0, 2)}\n </div>`,\n );\n return html`<div class=\"calendar__row\" role=\"row\">${headers}</div>`;\n }\n\n /** @internal */\n private _renderDayGrid() {\n const cells = this._dayGrid;\n const selectedDate = this._parseISODate(this.value);\n const today = new Date();\n\n const rows: ReturnType<typeof html>[] = [];\n\n for (let rowStart = 0; rowStart < cells.length; rowStart += 7) {\n const rowCells = cells.slice(rowStart, rowStart + 7).map((date) => {\n if (date === null) {\n return html`<div class=\"calendar__day-cell\" role=\"gridcell\" aria-hidden=\"true\"></div>`;\n }\n\n const isSelected = selectedDate ? this._isSameDay(date, selectedDate) : false;\n const isToday = this._isSameDay(date, today);\n const isDisabled = this._isDateDisabled(date);\n const isFocused = this._focusedDay === date.getDate();\n const dayNumber = date.getDate();\n const iso = this._toISO(date);\n const ariaLabel = this._dayAriaLabels.get(iso) ?? iso;\n\n const dayClasses = {\n calendar__day: true,\n 'calendar__day--selected': isSelected,\n 'calendar__day--today': isToday,\n 'calendar__day--disabled': isDisabled,\n };\n\n return html`<div\n class=\"calendar__day-cell\"\n role=\"gridcell\"\n aria-selected=${isSelected ? 'true' : 'false'}\n aria-disabled=${isDisabled ? 'true' : nothing}\n aria-current=${isToday ? 'date' : nothing}\n >\n <button\n part=\"day\"\n class=${classMap(dayClasses)}\n type=\"button\"\n data-day=${dayNumber}\n data-date=${iso}\n aria-label=${ariaLabel}\n tabindex=${isFocused ? '0' : '-1'}\n ?disabled=${isDisabled}\n >\n ${dayNumber}\n </button>\n </div>`;\n });\n\n rows.push(html`<div class=\"calendar__row\" role=\"row\">${rowCells}</div>`);\n }\n\n return rows;\n }\n\n // ─── Render ───\n\n override render() {\n const hasError = !!this.error || this._hasErrorSlot;\n const displayValue = this._formatForDisplay(this.value);\n const monthName = this._getMonthName(this._viewMonth);\n\n const fieldClasses = {\n field: true,\n 'field--error': hasError,\n 'field--disabled': this.disabled,\n 'field--required': this.required,\n };\n\n return html`\n <div part=\"field\" class=${classMap(fieldClasses)}>\n <!-- Label -->\n <div class=\"field__label-wrapper\">\n <slot name=\"label\" @slotchange=${this._handleLabelSlotChange}>\n ${this.label\n ? html`\n <label part=\"label\" id=${this._labelId} class=\"field__label\" for=${this._inputId}>\n ${this.label}\n ${this.required\n ? html`<span class=\"field__required-marker\" aria-hidden=\"true\">*</span>`\n : nothing}\n </label>\n `\n : nothing}\n </slot>\n </div>\n\n <!-- Input + Trigger -->\n <!--\n W3C APG date picker dialog pattern: the inner input is a readonly\n text input, NOT a combobox. Users do not type — they open the dialog\n via the trigger button (or by clicking the input). The trigger button\n owns aria-expanded and aria-controls (pointed at the in-shadow\n calendar id) for the dialog. Cross-shadow aria-controls referencing\n an in-shadow id is a documented limitation and matches the precedent\n set by hx-popover and hx-dropdown.\n -->\n <div part=\"input-wrapper\" class=\"field__input-wrapper\">\n <input\n part=\"input\"\n class=\"field__input\"\n id=${this._inputId}\n type=\"text\"\n readonly\n .value=${displayValue}\n placeholder=${ifDefined(this.format || undefined)}\n ?disabled=${this.disabled}\n aria-invalid=${this._invalid ? 'true' : 'false'}\n aria-required=${this.required ? 'true' : 'false'}\n aria-disabled=${this.disabled ? 'true' : nothing}\n aria-haspopup=\"dialog\"\n @click=${this._openCalendar}\n />\n <button\n part=\"trigger\"\n class=\"field__trigger\"\n type=\"button\"\n aria-label=${this._isOpen ? this.closeCalendarLabel : this.openCalendarLabel}\n aria-haspopup=\"dialog\"\n aria-expanded=${this._isOpen ? 'true' : 'false'}\n aria-controls=${this._calendarId}\n ?disabled=${this.disabled}\n @click=${this._toggleCalendar}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"></line>\n </svg>\n </button>\n </div>\n\n <!-- Calendar Popup -->\n <dialog\n part=\"calendar\"\n class=\"calendar\"\n id=${this._calendarId}\n aria-label=${this.chooseDateLabel}\n @keydown=${this._handleCalendarKeydown}\n >\n <!-- Screen reader live region -->\n <div\n id=${this._liveRegionId}\n class=\"calendar__live-region\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${this._liveMessage}\n </div>\n\n <!-- Month Navigation -->\n <div part=\"month-nav\" class=\"calendar__nav\">\n <button\n class=\"calendar__nav-btn\"\n type=\"button\"\n aria-label=${this.previousMonthLabel}\n ?disabled=${this._isPrevMonthDisabled()}\n @click=${this._prevMonth}\n >\n &#8249;\n </button>\n <span class=\"calendar__month-label\" aria-hidden=\"true\">\n ${monthName} ${this._viewYear}\n </span>\n <button\n class=\"calendar__nav-btn\"\n type=\"button\"\n aria-label=${this.nextMonthLabel}\n ?disabled=${this._isNextMonthDisabled()}\n @click=${this._nextMonth}\n >\n &#8250;\n </button>\n </div>\n\n <!-- Day Grid -->\n <div\n class=\"calendar__grid\"\n role=\"grid\"\n aria-label=\"${monthName} ${this._viewYear}\"\n @click=${this._handleGridClick}\n >\n ${this._renderWeekdayHeaders()} ${this._renderDayGrid()}\n </div>\n </dialog>\n\n <!--\n Persistent error live region. role=\"alert\" is set from first paint\n so the WAI-ARIA contract for live updates is honoured.\n -->\n <div\n part=\"error\"\n class=\"field__error\"\n id=${this._errorId}\n role=\"alert\"\n ?hidden=${!hasError}\n >\n <slot name=\"error\" @slotchange=${this._handleErrorSlotChange}\n >${this._announcedError}</slot\n >\n </div>\n\n <!-- Help Text -->\n <div\n part=\"help-text\"\n class=\"field__help-text\"\n id=${this._helpTextId}\n ?hidden=${(!this.helpText && !this._hasHelpSlot) || hasError}\n >\n <slot name=\"help-text\" @slotchange=${this._handleHelpSlotChange}>${this.helpText}</slot>\n </div>\n\n <!--\n Synthesized in-shadow mirror of the consumer-resolved description\n text. Its id is appended to the inner input's aria-describedby chain\n so AT picks the consumer description up through the standard\n described-by channel without needing aria-description (which W3C\n AccName drops whenever aria-describedby is also present).\n -->\n <span id=${this._consumerDescId} class=\"field__sr-only\" aria-hidden=\"false\"></span>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-date-picker': HelixDatePicker;\n }\n}\n"],"names":["helixDatePickerStyles","css","_nextDatePickerId","createIdCounter","HelixDatePicker","FormMixin","HelixElement","e","target","iso","date","ctor","supportsIdrefElementReferences","records","consumerCleared","record","oldValue","newValue","installAriaIdrefMirror","_a","_b","_c","_d","_e","_f","changedProperties","d","selected","monthName","changed","root","labelSlot","state","helpSlot","errorSlot","slot","nodes","elements","fragments","node","el","elText","flattenAccName","txt","trimmedText","unique","observer","internals","input","isInvalidEarly","liveAriaLabel","hostAriaLabel","internalLabel","slottedLabelEls","helpEl","errorEl","liveLabelledBy","liveDescribedBy","consumerLabelEls","resolveIdrefTokens","hasEffectiveLabelledBy","consumerDescEls","hasError","isInvalid","explicitAccessibleLabel","isVisibleForAccName","labelElsForInternals","descElsForInternals","refsInternals","flattenText","els","t","inputAriaLabel","inputAriaLabelledBy","labelledByFlat","flat","consumerDescSpan","consumerDescText","describedByIds","value","trimmed","slottedLabel","_mode","disabled","options","y","m","a","b","month","dayIndex","_","i","leadingBlanks","daysInMonth","cells","remainder","selectedISO","targetDay","today","todayDate","btn","key","currentFocused","dayOfWeek","newDay","daysToSaturday","prevDaysInMonth","day","overflow","firstOfCurrentView","minDate","lastOfCurrentView","maxDate","focusableEls","first","last","shadowActive","headers","name","html","selectedDate","rows","rowStart","rowCells","isSelected","isToday","isDisabled","isFocused","dayNumber","ariaLabel","nothing","classMap","displayValue","fieldClasses","ifDefined","forcedColorsField","__decorateClass","property","query","customElement"],"mappings":";;;;;;;;;;AAEO,MAAMA,IAAwBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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+0,0 @@
1
- {"version":3,"file":"hx-dropdown-D626S2ZG.js","sources":["../../src/components/hx-dropdown/hx-dropdown.styles.ts","../../src/components/hx-dropdown/hx-dropdown.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixDropdownStyles = css`\n :host {\n display: inline-block;\n position: relative;\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled, 0.5);\n }\n\n .trigger-wrapper {\n display: inline-block;\n }\n\n [part='panel'] {\n position: fixed;\n z-index: var(--hx-dropdown-panel-z-index, 1000);\n min-width: var(--hx-dropdown-panel-min-width, 160px);\n background: var(--hx-dropdown-panel-bg, var(--hx-color-surface-default, #ffffff));\n border: 1px solid var(--hx-dropdown-panel-border-color, var(--hx-color-border-default, #d6dbd5));\n border-radius: var(--hx-dropdown-panel-border-radius, var(--hx-border-radius-md, 0.375rem));\n box-shadow: var(\n --hx-dropdown-panel-shadow,\n 0 4px 16px var(--hx-overlay-black-12, rgba(0, 0, 0, 0.12))\n );\n visibility: hidden;\n opacity: 0;\n pointer-events: none;\n transition:\n opacity var(--hx-transition-fast, 150ms ease),\n visibility var(--hx-transition-fast, 150ms ease);\n outline: none;\n }\n\n [part='panel'].panel--visible {\n visibility: visible;\n opacity: 1;\n pointer-events: auto;\n }\n\n @media (prefers-reduced-motion: reduce) {\n [part='panel'] {\n transition: none;\n }\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n [part='panel'] {\n background-color: Canvas;\n border: 2px solid CanvasText;\n }\n }\n`;\n","import { html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport { devWarn } from '../../utils/dev-warn.js';\nimport { HelixElement } from '../../base/index.js';\nimport type { Placement as FloatingPlacement } from '@floating-ui/dom';\nimport { createIdCounter } from '../../base/index.js';\nimport { forcedColorsInteractive } from '../../styles/forced-colors.js';\nimport { helixDropdownStyles } from './hx-dropdown.styles.js';\nimport { flattenAccName } from '../../utils/aria-flatten.js';\nimport { getMenuItemTypeaheadLabel } from '../../utils/menu-label.js';\nimport { writeMenuItemRovingTabIndex } from '../../utils/menu-roving.js';\nimport { findClosestMenuAncestor } from '../../utils/menu-tree.js';\nimport {\n installAriaIdrefMirror,\n resolveIdrefTokens,\n type AriaIdrefMirrorHandle,\n} from '../../utils/aria-idref.js';\n\n// P2-03: Export so TypeScript consumers can import this type for prop typing.\nexport type DropdownPlacement =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'start'\n | 'end';\n\nconst _nextDropdownId = createIdCounter('hx-dropdown');\n\n/**\n * A dropdown component — a button that opens a floating panel on click.\n *\n * ## Architecture Note: Host-Attribute Label Mirror (group-4 round-1)\n *\n * The announced surface is the inner `[part=\"panel\"]` element, which carries\n * `role=\"menu\"`. The host wraps a slotted trigger and the floating panel and\n * does NOT claim a role itself (apart from the round-35-style host\n * `aria-expanded` fallback used only when the trigger slot is empty).\n *\n * Because the panel lives in shadow DOM and `ElementInternals` IDL refs on\n * the host project semantics OUTWARD (host → AT) rather than INWARD\n * (host → shadow descendant), we use the **host-attribute mirror** pattern:\n * resolve consumer `aria-labelledby` IDREFs against the host's composed-tree\n * roots, text-flatten via `flattenAccName`, and write the result to the\n * panel's `aria-label`. Host `aria-label` outranks the `label` property in\n * the same precedence used by every host-canonical hx-* control.\n *\n * Naming precedence (W3C AccName 1.2 §4.3.1):\n * 1. Host `aria-labelledby` (resolved IDREFs, text-flattened)\n * 2. Host `aria-label`\n * 3. `label` property\n * 4. Hard-coded literal `\"Menu\"` (last-resort accessible name)\n *\n * **Group 4b → Group 5b boundary:** Group 4b added the host-attribute\n * label mirror **only** — additive on top of the existing dropdown\n * behaviour. Group 5b (this commit) adds the composite-navigation\n * portion that 4b explicitly deferred:\n * - **Roving tabindex** inside the panel (`_applyRovingTabIndex` +\n * `_rovingIndex`). Only the focused item carries `tabindex=0`.\n * - **First-character typeahead** with 500ms timeout (`_handleTypeahead`)\n * matching `hx-menu`, `hx-overflow-menu`, `hx-split-button`.\n * - Submenu auto-handling is delegated to slotted `hx-menu` /\n * `hx-menu-item` (whose `hx-item-submenu-open` / `hx-item-submenu-close`\n * events are auto-handled by the parent `hx-menu` after Group 5b).\n *\n * The panel's inner-div `role=\"menu\"` is intentionally NOT migrated to\n * the host: the host wraps a slotted consumer trigger AND the panel,\n * so it cannot canonically carry the menu role. Slotted `hx-menu-item`\n * children carry `role=\"menuitem\"` on their HOST after Group 5b's menu\n * migration, which fixes the cross-shadow walk concern from the\n * consumer's perspective.\n *\n * `aria-controls` is intentionally omitted on the trigger: the panel lives\n * in shadow DOM and IDREF values cannot be resolved across shadow\n * boundaries by assistive technology (axe-core flags this as a critical\n * violation if attempted). See `_setupTriggerAria` for the inline note.\n *\n * @summary Button that opens a floating menu panel on click.\n *\n * @tag hx-dropdown\n *\n * @slot trigger - The element that opens the dropdown (e.g. hx-button).\n * @slot - Default slot for dropdown panel content (e.g. menu items).\n *\n * @fires {CustomEvent<void>} hx-show - Dispatched when the dropdown is opened.\n * @fires {CustomEvent<void>} hx-hide - Dispatched when the dropdown is closed.\n * @fires {CustomEvent<{value: string | null; label: string}>} hx-select - Dispatched when a menu item is selected.\n *\n * @csspart trigger - The trigger wrapper element.\n * @csspart panel - The floating panel element.\n *\n * @cssprop [--hx-dropdown-panel-bg=var(--hx-color-neutral-0)] - Panel background color.\n * @cssprop [--hx-dropdown-panel-border-color=var(--hx-color-neutral-200)] - Panel border color.\n * @cssprop [--hx-dropdown-panel-border-radius=var(--hx-border-radius-md)] - Panel border radius.\n * @cssprop [--hx-dropdown-panel-shadow=0 4px 16px rgba(0,0,0,0.12)] - Panel box shadow.\n * @cssprop [--hx-dropdown-panel-z-index=1000] - Panel z-index.\n * @cssprop [--hx-dropdown-panel-min-width=160px] - Panel minimum width.\n *\n * @example\n * ```html\n * <hx-dropdown>\n * <button slot=\"trigger\">Open Menu</button>\n * <ul>\n * <li data-value=\"edit\">Edit</li>\n * <li data-value=\"delete\">Delete</li>\n * </ul>\n * </hx-dropdown>\n * ```\n * @cssprop [--hx-opacity-disabled] - Opacity.\n * @cssprop [--hx-color-neutral-0] - Color.\n * @cssprop [--hx-color-neutral-200] - Color.\n * @cssprop [--hx-border-radius-md] - CSS custom property.\n * @cssprop [--hx-overlay-black-12] - Overlay color.\n * @cssprop [--hx-transition-fast] - Transition timing.\n */\n@customElement('hx-dropdown')\nexport class HelixDropdown extends HelixElement {\n static override styles = [helixDropdownStyles, forcedColorsInteractive];\n\n // ─── Public Properties ───\n\n /**\n * Whether the dropdown panel is open.\n * @attr open\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Preferred placement of the panel relative to the trigger.\n * @attr placement\n */\n @property({ type: String, reflect: true })\n placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'start'\n | 'end' = 'bottom-start';\n\n /**\n * Accessible label for the dropdown menu panel. Override for i18n.\n * @attr label\n */\n @property() label = 'Menu';\n\n /**\n * Whether the dropdown is disabled. Prevents opening.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Gap in pixels between the trigger and the panel.\n * @attr distance\n */\n @property({ type: Number })\n distance = 4;\n\n // ─── Internal State ───\n\n /**\n * Whether the dropdown panel is currently visible.\n * @internal\n */\n @state() private _panelVisible = false;\n\n /**\n * Index within the panel's focusable menu items of the item currently\n * holding the roving tabindex (and thus visual focus). −1 means the\n * panel has not been keyboard-focused yet.\n * @internal\n */\n private _rovingIndex = -1;\n\n /**\n * Accumulated character buffer for typeahead search within the panel's\n * menu items. Cleared after 500ms of inactivity.\n * @internal\n */\n private _typeaheadBuffer = '';\n\n /**\n * Timer handle that clears the typeahead buffer after a period of inactivity.\n * @internal\n */\n private _typeaheadTimer: ReturnType<typeof setTimeout> | null = null;\n\n /**\n * Resolved accessible name for the menu panel — the value written to the\n * inner `[part=\"panel\"]` `aria-label`. Recomputed on every sync per\n * AccName 1.2 §4.3.1 precedence: host `aria-labelledby` (flattened) >\n * host `aria-label` > `label` property > literal `\"Menu\"`.\n * @internal\n */\n @state() private _resolvedLabel = '';\n\n /**\n * Most recently observed consumer-supplied `aria-labelledby` token list on\n * the host. Refreshed every sync via `getAttribute()`.\n * @internal\n */\n private _consumerLabelledBy: string | null = null;\n\n /**\n * Handle for the shared host attribute / root id observer.\n * @internal\n */\n private _ariaMirror: AriaIdrefMirrorHandle | null = null;\n\n /**\n * Watches in-place text / visibility mutations on consumer light-DOM\n * elements resolved from the host's `aria-labelledby`.\n * @internal\n */\n private _externalRefsObserver: MutationObserver | null = null;\n\n /**\n * Guards against accumulating multiple document click listeners when open state\n * changes faster than the microtask queue can process removeEventListener calls.\n * @internal\n */\n private _documentListenerAttached = false;\n\n // P1-02: Unique panel ID for aria-controls.\n /**\n * Unique ID assigned to the floating panel element, referenced by `aria-controls` on the trigger.\n * @internal\n */\n private _panelId = `${_nextDropdownId()}-panel`;\n\n /**\n * Reference to the floating panel element inside the shadow DOM.\n * @internal\n */\n @query('[part=\"panel\"]') private _panel: HTMLElement | undefined;\n /**\n * Reference to the trigger wrapper element inside the shadow DOM.\n * @internal\n */\n @query('[part=\"trigger\"]') private _triggerWrapper: HTMLElement | undefined;\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('keydown', this._handleKeydown);\n // Seed the host-attribute label mirror BEFORE first paint so the panel's\n // `aria-label` carries the resolved name on its very first render.\n this._syncResolvedLabel();\n this._ariaMirror = installAriaIdrefMirror(this, () => {\n this._syncResolvedLabel();\n });\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('keydown', this._handleKeydown);\n if (this._documentListenerAttached) {\n document.removeEventListener('click', this._handleOutsideClick, { capture: true });\n this._documentListenerAttached = false;\n }\n if (this._typeaheadTimer !== null) {\n clearTimeout(this._typeaheadTimer);\n this._typeaheadTimer = null;\n }\n this._ariaMirror?.disconnect();\n this._ariaMirror = null;\n this._externalRefsObserver?.disconnect();\n this._externalRefsObserver = null;\n }\n\n // ─── Open/Close ───\n\n /** @internal */\n private async _show(): Promise<void> {\n if (this.open || this.disabled) return;\n this.open = true;\n this._panelVisible = true;\n // Add outside-click listener synchronously before any await so it is registered\n // by the time the test fires an outside click after a single await el.updateComplete.\n if (!this._documentListenerAttached) {\n document.addEventListener('click', this._handleOutsideClick, { capture: true });\n this._documentListenerAttached = true;\n }\n await this.updateComplete;\n // P0-01: Fix focus management — use slot.assignedElements() to traverse slotted (light DOM) content.\n // Focus is set after updateComplete (panel is rendered) but before _updatePosition so\n // it executes in the same microtask as the test's await-continuation.\n const panel = this._panel;\n if (panel) {\n // Group 5b: initialize roving tabindex on slotted menu items\n // before focusing the first one. Tab from outside lands on the\n // same item that has visual focus.\n const items = this._getFocusableMenuItems();\n if (items.length > 0) {\n this._rovingIndex = 0;\n this._applyRovingTabIndex(items);\n }\n const firstFocusable = this._getFirstFocusableItem();\n firstFocusable?.focus();\n }\n await this._updatePosition();\n this.dispatchEvent(new CustomEvent<void>('hx-show', { bubbles: true, composed: true }));\n }\n\n // P2-02: returnFocus=true only on Escape; Tab should let focus advance naturally.\n /** @internal */\n private _hide(returnFocus = true): void {\n if (!this.open) return;\n this.open = false;\n this._panelVisible = false;\n this._rovingIndex = -1;\n if (this._typeaheadTimer !== null) {\n clearTimeout(this._typeaheadTimer);\n this._typeaheadTimer = null;\n }\n this._typeaheadBuffer = '';\n if (this._documentListenerAttached) {\n document.removeEventListener('click', this._handleOutsideClick, { capture: true });\n this._documentListenerAttached = false;\n }\n this.dispatchEvent(new CustomEvent<void>('hx-hide', { bubbles: true, composed: true }));\n if (returnFocus) {\n const slot = this.shadowRoot?.querySelector<HTMLSlotElement>('slot[name=\"trigger\"]');\n const trigger = slot?.assignedElements()[0] as HTMLElement | undefined;\n trigger?.focus();\n }\n }\n\n // ─── Positioning ───\n\n /** @internal */\n private async _updatePosition(): Promise<void> {\n const reference = this._triggerWrapper;\n const panel = this._panel;\n if (!reference || !panel) return;\n\n // Map 'start' and 'end' to floating-ui's 'left'/'right'\n const floatingPlacement = this.placement\n .replace(/^start$/, 'left')\n .replace(/^end$/, 'right') as FloatingPlacement;\n\n const { computePosition, flip, shift, offset } = await import('@floating-ui/dom');\n const { x, y } = await computePosition(reference, panel, {\n placement: floatingPlacement,\n strategy: 'fixed',\n middleware: [offset(this.distance), flip(), shift({ padding: 8 })],\n });\n\n Object.assign(panel.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n }\n\n // ─── Event Handlers ───\n\n /** @internal */\n private _handleTriggerClick(e: MouseEvent): void {\n e.stopPropagation();\n if (this.open) {\n this._hide();\n } else {\n void this._show();\n }\n }\n\n /** @internal */\n private _handleTriggerKeydown(e: KeyboardEvent): void {\n if (e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown') {\n e.preventDefault();\n void this._show();\n }\n }\n\n /** @internal */\n private _handleKeydown = (e: KeyboardEvent): void => {\n if (e.key === 'Escape' && this.open) {\n e.stopPropagation();\n this._hide(true); // return focus to trigger on Escape\n } else if (e.key === 'Tab' && this.open) {\n // P2-02: Do not return focus to trigger on Tab — let focus advance naturally to next page element.\n this._hide(false);\n } else if (\n this.open &&\n (e.key === 'ArrowDown' || e.key === 'ArrowUp' || e.key === 'Home' || e.key === 'End')\n ) {\n // P2-01: Arrow key roving within panel per APG Menu Button pattern.\n e.preventDefault();\n this._handleMenuNavigation(e.key);\n } else if (\n this.open &&\n e.key.length === 1 &&\n e.key !== ' ' &&\n !e.ctrlKey &&\n !e.metaKey &&\n !e.altKey\n ) {\n // Group 5b: first-character typeahead within the panel's menu\n // items. 500ms timeout matching hx-menu / hx-overflow-menu.\n this._handleTypeahead(e.key);\n }\n };\n\n // P2-01: Move focus among menuitem elements using arrow keys.\n /** @internal */\n private _handleMenuNavigation(key: string): void {\n const items = this._getFocusableMenuItems();\n if (items.length === 0) return;\n const currentIndex = items.indexOf(document.activeElement as HTMLElement);\n let nextIndex: number;\n if (key === 'ArrowDown') {\n nextIndex = currentIndex < items.length - 1 ? currentIndex + 1 : 0;\n } else if (key === 'ArrowUp') {\n nextIndex = currentIndex > 0 ? currentIndex - 1 : items.length - 1;\n } else if (key === 'Home') {\n nextIndex = 0;\n } else {\n nextIndex = items.length - 1;\n }\n this._rovingIndex = nextIndex;\n this._applyRovingTabIndex(items);\n items[nextIndex]?.focus();\n }\n\n /**\n * Roving tabindex inside the panel: only the focused item carries\n * tabindex=0; the rest are tabindex=-1. APG-compliant for the menu\n * button pattern. Closing-Tab semantics are preserved by the\n * `_handleKeydown` Tab branch above (which lets focus advance\n * naturally and closes the panel).\n *\n * Group 5b: introduced to align hx-dropdown's panel keyboard contract\n * with hx-menu / hx-overflow-menu / hx-split-button. Group 4b only\n * added the host-attribute label mirror (additive); this is the\n * keyboard portion deferred until Group 5.\n *\n * Codex push-gate round-8 finding 2: route through\n * `writeMenuItemRovingTabIndex` so host-canonical `hx-menu-item` items\n * land their roving tabindex on the correct surface (host on the\n * modern path, inner `.menu-item` on the fallback path). A direct\n * `item.tabIndex = value` write on the host fails on the fallback\n * path because the host is forced to `tabindex=-1` to keep exactly\n * one focusable surface per item.\n * @internal\n */\n private _applyRovingTabIndex(items: HTMLElement[]): void {\n items.forEach((item, i) => {\n writeMenuItemRovingTabIndex(item, i === this._rovingIndex ? 0 : -1);\n });\n }\n\n /** @internal */\n private _handleTypeahead(char: string): void {\n if (this._typeaheadTimer !== null) {\n clearTimeout(this._typeaheadTimer);\n }\n this._typeaheadBuffer += char.toLowerCase();\n this._typeaheadTimer = setTimeout(() => {\n this._typeaheadBuffer = '';\n this._typeaheadTimer = null;\n }, 500);\n\n const items = this._getFocusableMenuItems();\n // Codex push-gate round-7 finding 3: read item label via the shared\n // submenu-aware extractor so a parent menuitem with a nested\n // `<hx-menu slot=\"submenu\">` does not match grandchild text and steal\n // focus from a sibling. Single source of truth across hx-menu /\n // hx-dropdown / hx-overflow-menu / hx-split-button.\n const match = items.findIndex((item) => {\n const text = getMenuItemTypeaheadLabel(item).toLowerCase();\n return text.startsWith(this._typeaheadBuffer);\n });\n\n if (match !== -1) {\n this._rovingIndex = match;\n this._applyRovingTabIndex(items);\n items[match]?.focus();\n }\n }\n\n // P0-01 / P2-01: Get focusable menu items from slotted content.\n /** @internal */\n private _getFocusableMenuItems(): HTMLElement[] {\n const panel = this._panel;\n if (!panel) return [];\n const slot = panel.querySelector<HTMLSlotElement>('slot');\n const assignedNodes = slot?.assignedElements({ flatten: true }) ?? [];\n const items: HTMLElement[] = [];\n // `hx-menu-item` carries `role=\"menuitem\"` (or menuitemcheckbox /\n // menuitemradio) via `_internals.role` — AT-only, not a DOM attribute —\n // so `[role=\"menuitem\"]` selectors miss the host. Match the tag name in\n // tandem with the legacy attribute selector so both shapes traverse.\n const isHostCanonicalMenuItem = (el: Element): boolean => el.localName === 'hx-menu-item';\n const collectFrom = (root: ParentNode): HTMLElement[] => {\n const found: HTMLElement[] = [];\n root.querySelectorAll<HTMLElement>('[role=\"menuitem\"]').forEach((item) => found.push(item));\n root.querySelectorAll<HTMLElement>('hx-menu-item').forEach((item) => found.push(item));\n return found;\n };\n for (const node of assignedNodes) {\n if (!(node instanceof HTMLElement)) continue;\n if (node.matches('[role=\"menuitem\"]') || isHostCanonicalMenuItem(node)) {\n items.push(node);\n } else {\n collectFrom(node).forEach((item) => items.push(item));\n }\n }\n return items;\n }\n\n // P0-01: Find the first focusable element in slotted panel content.\n /** @internal */\n private _getFirstFocusableItem(): HTMLElement | null {\n const panel = this._panel;\n if (!panel) return null;\n const slot = panel.querySelector<HTMLSlotElement>('slot');\n const assignedNodes = slot?.assignedElements({ flatten: true }) ?? [];\n // `hx-menu-item` host carries `role=\"menuitem\"` via `_internals.role`\n // (invisible to attribute selectors). Add the literal tag name to the\n // focusable selector so the host-canonical menu-item is found.\n const focusableSelector =\n 'hx-menu-item, [role=\"menuitem\"], button, [tabindex]:not([tabindex=\"-1\"]), a[href], input, select, textarea';\n for (const node of assignedNodes) {\n if (!(node instanceof HTMLElement)) continue;\n if (node.matches(focusableSelector)) return node;\n const found = node.querySelector<HTMLElement>(focusableSelector);\n if (found) return found;\n }\n return null;\n }\n\n /** @internal */\n private _handleOutsideClick = (e: MouseEvent): void => {\n const path = e.composedPath();\n if (!path.includes(this)) {\n this._hide();\n }\n };\n\n /** @internal */\n private _handlePanelClick(e: MouseEvent): void {\n const target = e.target as HTMLElement;\n // P2-06: Narrow selector — bare 'li' and 'button' cause spurious hx-select events.\n // Group 5b round-3 (codex): bail FIRST on host-canonical `hx-menu-item`,\n // independently of what `closest()` resolves with the legacy selectors.\n // If a consumer slots `<hx-menu-item><span data-value=\"…\">…</span></hx-menu-item>`\n // and the click lands on the inner span, `closest('hx-menu-item, …, [data-value]')`\n // resolves to the inner span (nearest match) — the legacy localName guard\n // misses, and we'd dispatch `hx-select` here AND again from\n // `_handlePanelItemSelect` when the host's bubbled `hx-item-select` arrives.\n // The host owns its own dispatch path; descendants of the host must defer.\n if (target.closest('hx-menu-item')) return;\n const item = target.closest<HTMLElement>('[role=\"menuitem\"], [data-value]');\n if (!item) return;\n\n const value = item.dataset['value'] ?? item.getAttribute('value') ?? null;\n const label = item.textContent?.trim() ?? '';\n\n this.dispatchEvent(\n new CustomEvent<{ value: string | null; label: string }>('hx-select', {\n bubbles: true,\n composed: true,\n detail: { value, label },\n }),\n );\n\n this._hide();\n }\n\n /**\n * Bubbled `hx-item-select` from a slotted `hx-menu-item` host. Forwards\n * the activation through the composite's `hx-select` contract using the\n * item's `value` property and label text. Disabled items never emit\n * `hx-item-select`, so no disabled-guard is needed here.\n * @internal\n */\n private _handlePanelItemSelect(e: Event): void {\n const detail = (e as CustomEvent<{ item: HTMLElement; value: string }>).detail;\n const item = detail?.item;\n const value = detail?.value ?? null;\n const label = item?.textContent?.trim() ?? '';\n this.dispatchEvent(\n new CustomEvent<{ value: string | null; label: string }>('hx-select', {\n bubbles: true,\n composed: true,\n detail: { value, label },\n }),\n );\n this._hide();\n }\n\n /**\n * Bubbled `hx-item-submenu-open` from a slotted `hx-menu-item` host.\n * Codex push-gate round-9 P1: when slotted `hx-menu-item`s open / close\n * a nested submenu inside this composite's panel (no enclosing\n * `hx-menu`), the events fly past with no handler. Match the round-4\n * `hx-menu._handleSubmenuOpen` shape so APG behaviour holds.\n *\n * If the dispatching item is enclosed by an inner `hx-menu` (a true\n * nested submenu inside the panel), that menu owns the toggle — defer.\n * Otherwise this composite's panel is the enclosing menu surface, so\n * call `setSubmenuOpen(true)` on the item and focus the first child.\n * @internal\n */\n private _handlePanelSubmenuOpen = (e: Event): void => {\n if (!(e instanceof CustomEvent)) return;\n const detail = (e as CustomEvent<{ item: HTMLElement }>).detail;\n const item = detail?.item;\n if (!item) return;\n // Defer to a closer enclosing `hx-menu` (a nested submenu) when one\n // exists — that menu's own handler will own the toggle.\n if (findClosestMenuAncestor(item) !== null) return;\n queueMicrotask(() => {\n if (e.defaultPrevented) return;\n const setter = (item as HTMLElement & { setSubmenuOpen?: (v: boolean) => void })\n .setSubmenuOpen;\n if (typeof setter !== 'function') return;\n setter.call(item, true);\n const updateComplete = (item as HTMLElement & { updateComplete?: Promise<unknown> })\n .updateComplete;\n if (updateComplete) {\n void updateComplete\n .then(() => {\n const submenuSlot = (\n item as HTMLElement & { shadowRoot?: ShadowRoot | null }\n ).shadowRoot?.querySelector<HTMLSlotElement>('slot[name=\"submenu\"]');\n const nested = submenuSlot\n ?.assignedElements({ flatten: true })\n .find((el) => el.tagName.toLowerCase() === 'hx-menu') as\n | (HTMLElement & { focusFirst?: () => void })\n | undefined;\n nested?.focusFirst?.();\n })\n .catch(() => undefined);\n }\n });\n };\n\n /**\n * Bubbled `hx-item-submenu-close` from a slotted `hx-menu-item` host.\n * Codex push-gate round-9 P1: routes the close to the right surface.\n *\n * - Nested submenu close (the dispatching item lives inside an inner\n * `hx-menu` slotted into a parent's `slot=\"submenu\"`): defer to that\n * inner menu's own handler. The composite's panel must NOT close.\n * - Top-level item ArrowLeft (no enclosing `hx-menu` between the item\n * and this composite): there is no parent submenu to close, so\n * collapse the composite's panel and return focus to the trigger,\n * matching APG menu-button behaviour.\n * @internal\n */\n private _handlePanelSubmenuClose = (e: Event): void => {\n if (!(e instanceof CustomEvent)) return;\n const detail = (e as CustomEvent<{ item: HTMLElement }>).detail;\n const item = detail?.item;\n if (!item) return;\n // A closer enclosing `hx-menu` owns the close — defer.\n if (findClosestMenuAncestor(item) !== null) return;\n if (e.defaultPrevented) return;\n this._hide(true);\n };\n\n // ─── Render ───\n\n override render() {\n return html`\n <div\n part=\"trigger\"\n class=\"trigger-wrapper\"\n @click=${this._handleTriggerClick}\n @keydown=${this._handleTriggerKeydown}\n >\n <slot name=\"trigger\" @slotchange=${this._onTriggerSlotChange}></slot>\n </div>\n <div\n part=\"panel\"\n id=${this._panelId}\n role=\"menu\"\n aria-hidden=${this._panelVisible ? nothing : 'true'}\n aria-label=${this._resolvedLabel}\n class=${this._panelVisible ? 'panel panel--visible' : 'panel'}\n @click=${this._handlePanelClick}\n @hx-item-select=${this._handlePanelItemSelect}\n @hx-item-submenu-open=${this._handlePanelSubmenuOpen}\n @hx-item-submenu-close=${this._handlePanelSubmenuClose}\n >\n <slot @slotchange=${this._onPanelSlotChange}></slot>\n </div>\n `;\n }\n\n // ─── Panel slot validation ───\n\n /** @internal */\n private _onPanelSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n const assigned = slot.assignedElements({ flatten: true });\n const nonItems = assigned.filter((el) => el.tagName.toLowerCase() !== 'hx-dropdown-item');\n if (nonItems.length > 0) {\n devWarn(\n 'hx-dropdown',\n `Default slot should contain only hx-dropdown-item elements. Found unexpected: ${nonItems.map((el) => `<${el.tagName.toLowerCase()}>`).join(', ')}. Non-hx-dropdown-item children will be included in keyboard navigation incorrectly.`,\n );\n }\n }\n\n // ─── ARIA setup for trigger slot ───\n\n /** @internal */\n private _onTriggerSlotChange(): void {\n this._setupTriggerAria();\n }\n\n override firstUpdated(): void {\n this._setupTriggerAria();\n }\n\n /** @internal */\n private _setupTriggerAria(): void {\n const slot = this.shadowRoot?.querySelector<HTMLSlotElement>('slot[name=\"trigger\"]');\n if (!slot) return;\n const trigger = slot.assignedElements()[0] as HTMLElement | undefined;\n if (trigger) {\n // P1-01: Use aria-haspopup=\"menu\" per ARIA 1.1+ / APG Menu Button pattern.\n trigger.setAttribute('aria-haspopup', 'menu');\n trigger.setAttribute('aria-expanded', String(this.open));\n // aria-controls is intentionally omitted: the panel lives in Shadow DOM and\n // IDREF values cannot be resolved across shadow boundaries by assistive technology.\n // P2-06: Remove host fallback when a trigger element is present.\n this.removeAttribute('aria-expanded');\n } else {\n // P2-06: Fallback — set aria-expanded on host when trigger slot is empty or unassigned.\n this.setAttribute('aria-expanded', String(this.open));\n }\n }\n\n override willUpdate(changedProperties: PropertyValues<this>): void {\n super.willUpdate(changedProperties);\n // `label` property changes must flow into the resolved name BEFORE\n // render so the new fallback is in place on the same paint. See\n // `hx-popover.willUpdate()` for the same rationale.\n if (changedProperties.has('label')) {\n this._syncResolvedLabel();\n }\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('open')) {\n // Keep aria-expanded in sync\n const slot = this.shadowRoot?.querySelector<HTMLSlotElement>('slot[name=\"trigger\"]');\n const trigger = slot?.assignedElements()[0] as HTMLElement | undefined;\n if (trigger) {\n trigger.setAttribute('aria-expanded', String(this.open));\n } else {\n // P2-06: Fallback — keep host aria-expanded in sync when trigger slot is empty.\n this.setAttribute('aria-expanded', String(this.open));\n }\n }\n }\n\n // ─── Host-attribute label mirror ───\n\n /**\n * (Re-)installs a `MutationObserver` over the deduped union of\n * consumer-resolved label elements, watching for in-place text /\n * visibility mutations so the panel's `aria-label` tracks live consumer\n * text. See `hx-popover._installExternalRefsObserver` for the matching\n * shape used across the host-attribute-mirror family.\n * @internal\n */\n private _installExternalRefsObserver(elements: Element[]): void {\n if (this._externalRefsObserver) {\n this._externalRefsObserver.disconnect();\n this._externalRefsObserver = null;\n }\n if (elements.length === 0) return;\n const unique = new Set<Element>(elements);\n const observer = new MutationObserver(() => {\n this._syncResolvedLabel();\n });\n for (const el of unique) {\n observer.observe(el, {\n characterData: true,\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: ['aria-hidden', 'hidden'],\n });\n }\n this._externalRefsObserver = observer;\n }\n\n /**\n * Resolves the menu panel's accessible name from host attributes and the\n * `label` property. AccName 1.2 §4.3.1 precedence:\n * 1. Host `aria-labelledby` (resolved IDREFs, flattened)\n * 2. Host `aria-label`\n * 3. `label` property\n * 4. Literal `\"Menu\"` (last-resort)\n * @internal\n */\n private _syncResolvedLabel(): void {\n const liveLabelledBy = this.getAttribute('aria-labelledby');\n this._consumerLabelledBy = liveLabelledBy;\n const consumerLabelEls = resolveIdrefTokens(this, liveLabelledBy);\n\n this._installExternalRefsObserver(consumerLabelEls);\n\n const isVisibleForAccName = (el: Element): boolean =>\n el.getAttribute('aria-hidden') !== 'true' && !el.hasAttribute('hidden');\n\n const flattenedFromIdrefs = consumerLabelEls\n .filter(isVisibleForAccName)\n .map((el) => flattenAccName(el))\n .filter((t) => t.length > 0)\n .join(' ')\n .replace(/\\s+/g, ' ')\n .trim();\n\n const liveAriaLabel = this.getAttribute('aria-label');\n const hostAriaLabel = liveAriaLabel !== null ? liveAriaLabel.trim() : '';\n\n let resolved = '';\n if (flattenedFromIdrefs) {\n resolved = flattenedFromIdrefs;\n } else if (hostAriaLabel) {\n resolved = hostAriaLabel;\n } else if (this.label) {\n resolved = this.label;\n } else {\n resolved = 'Menu';\n }\n\n this._resolvedLabel = resolved;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-dropdown': HelixDropdown;\n }\n interface HTMLElementEventMap {\n 'hx-show': CustomEvent<void>;\n 'hx-hide': CustomEvent<void>;\n 'hx-select': CustomEvent<{ value: string | null; label: string }>;\n }\n}\n"],"names":["helixDropdownStyles","css","_nextDropdownId","createIdCounter","HelixDropdown","HelixElement","detail","item","findClosestMenuAncestor","setter","updateComplete","submenuSlot","_a","nested","el","_b","installAriaIdrefMirror","items","firstFocusable","returnFocus","slot","trigger","reference","panel","floatingPlacement","computePosition","flip","shift","offset","x","y","key","currentIndex","nextIndex","writeMenuItemRovingTabIndex","char","match","getMenuItemTypeaheadLabel","assignedNodes","isHostCanonicalMenuItem","collectFrom","root","found","node","focusableSelector","target","value","label","html","nothing","nonItems","devWarn","changedProperties","elements","unique","observer","liveLabelledBy","consumerLabelEls","resolveIdrefTokens","isVisibleForAccName","flattenedFromIdrefs","flattenAccName","t","liveAriaLabel","hostAriaLabel","resolved","forcedColorsInteractive","__decorateClass","property","state","query","customElement"],"mappings":";;;;;;;;;;AAEO,MAAMA,IAAsBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AC4BnC,MAAMC,IAAkBC,EAAgB,aAAa;AAyF9C,IAAMC,IAAN,cAA4BC,EAAa;AAAA,EAAzC,cAAA;AAAA,UAAA,GAAA,SAAA,GAUL,KAAA,OAAO,IAOP,KAAA,YAQY,gBAMA,KAAA,QAAQ,QAOpB,KAAA,WAAW,IAOX,KAAA,WAAW,GAQF,KAAQ,gBAAgB,IAQjC,KAAQ,eAAe,IAOvB,KAAQ,mBAAmB,IAM3B,KAAQ,kBAAwD,MASvD,KAAQ,iBAAiB,IAOlC,KAAQ,sBAAqC,MAM7C,KAAQ,cAA4C,MAOpD,KAAQ,wBAAiD,MAOzD,KAAQ,4BAA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AAA,kBAAA,CAAA;AAwCgB+D,EAAA;AAAA,EAAhCG,EAAM,gBAAgB;AAAA,GA3HZlE,EA2HsB,WAAA,UAAA,CAAA;AAKE+D,EAAA;AAAA,EAAlCG,EAAM,kBAAkB;AAAA,GAhIdlE,EAgIwB,WAAA,mBAAA,CAAA;AAhIxBA,IAAN+D,EAAA;AAAA,EADNI,EAAc,aAAa;AAAA,GACfnE,CAAA;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hx-icon-button-a6OpeQz5.js","sources":["../../src/components/hx-icon-button/hx-icon-button.styles.ts","../../src/components/hx-icon-button/hx-icon-button.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixIconButtonStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled, 0.5);\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: var(--hx-border-width-thin, 1px) solid var(--hx-icon-button-border-color, transparent);\n border-radius: var(--hx-icon-button-border-radius, var(--hx-border-radius-md, 0.375rem));\n background-color: var(--hx-icon-button-bg, transparent);\n color: var(--hx-icon-button-color, var(--hx-color-primary-500, #429797));\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n color var(--hx-transition-fast, 150ms ease),\n border-color var(--hx-transition-fast, 150ms ease),\n box-shadow var(--hx-transition-fast, 150ms ease);\n text-decoration: none;\n user-select: none;\n -webkit-user-select: none;\n flex-shrink: 0;\n }\n\n .button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-icon-button-focus-ring-color, var(--hx-focus-ring-color, #0f7078));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .button:active {\n filter: brightness(var(--hx-filter-brightness-active, 0.8));\n }\n\n /* ─── Size Variants ─── */\n\n /* WCAG 2.5.5 (healthcare mandate): minimum 44x44px touch target for all sizes.\n min-width/min-height override the explicit size tokens when they fall below\n the 2.75rem (44px) threshold, preserving the visual icon size via font-size. */\n\n .button--sm {\n padding: var(--hx-space-1, 0.25rem);\n width: var(--hx-icon-button-size, var(--hx-size-8, 2rem));\n height: var(--hx-icon-button-size, var(--hx-size-8, 2rem));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-sm, 0.875rem);\n }\n\n .button--md {\n padding: var(--hx-space-2, 0.5rem);\n width: var(--hx-icon-button-size, var(--hx-size-10, 2.5rem));\n height: var(--hx-icon-button-size, var(--hx-size-10, 2.5rem));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-md, 1rem);\n }\n\n .button--lg {\n padding: var(--hx-space-3, 0.75rem);\n width: var(--hx-icon-button-size, var(--hx-size-12, 3rem));\n height: var(--hx-icon-button-size, var(--hx-size-12, 3rem));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-lg, 1.125rem);\n }\n\n /* ─── Style Variants ─── */\n\n .button--primary {\n --hx-icon-button-bg: var(--hx-color-primary-500, #429797);\n --hx-icon-button-color: var(--hx-color-text-on-primary, #ffffff);\n --hx-icon-button-border-color: transparent;\n }\n\n /* on-primary tokens are tuned for primary-500. primary-600 + on-primary\n drops icon contrast to 3.07:1 — fails the 4.5:1 floor for meaningful\n icons. Pin fg at neutral-0 (5.82:1 on primary-600). Mirrors hx-button. */\n .button--primary:hover {\n --hx-icon-button-bg: var(--hx-color-primary-600, #0f7078);\n --hx-icon-button-color: var(--hx-color-neutral-0, #ffffff);\n }\n\n .button--secondary {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-primary-500, #429797);\n --hx-icon-button-border-color: var(--hx-color-primary-500, #429797);\n }\n\n .button--secondary:hover {\n --hx-icon-button-bg: var(--hx-color-primary-50, #ebf8f8);\n }\n\n .button--tertiary {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-text-strong, #202b39);\n --hx-icon-button-border-color: var(--hx-color-border-strong, #66787b);\n }\n\n .button--tertiary:hover {\n --hx-icon-button-bg: var(--hx-color-surface-sunken, #ebeee9);\n }\n\n .button--danger {\n --hx-icon-button-bg: var(--hx-color-error-500, #e5493e);\n --hx-icon-button-color: var(--hx-color-text-on-error, #ffffff);\n --hx-icon-button-border-color: transparent;\n }\n\n /* on-error tokens are tuned for error-500. error-600 + on-error drops\n icon contrast to 2.25:1 — fails AA. Pin fg at neutral-0\n (6.47:1 on error-600). Mirrors hx-button danger:hover. */\n .button--danger:hover {\n --hx-icon-button-bg: var(--hx-color-error-600, #c92a2a);\n --hx-icon-button-color: var(--hx-color-neutral-0, #ffffff);\n }\n\n .button--ghost {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-primary-500, #429797);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--ghost:hover {\n --hx-icon-button-bg: var(--hx-color-surface-raised, #f5f8f3);\n }\n\n /* ─── Icon Container ─── */\n\n .icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1em;\n height: 1em;\n line-height: 1;\n pointer-events: none;\n }\n\n /* ─── Disabled ─── */\n\n .button[disabled] {\n cursor: not-allowed;\n /* P1-02 fix: opacity is set only on :host([disabled]) above to prevent\n multiplicative stacking (0.5 * 0.5 = 0.25). Do not add opacity here. */\n }\n\n /* ─── Loading State ─── */\n\n .button--loading {\n position: relative;\n cursor: wait;\n }\n\n .button__spinner {\n width: 1em;\n height: 1em;\n flex-shrink: 0;\n animation: hx-icon-button-spin var(--hx-duration-spinner, 750ms) linear infinite;\n }\n\n @keyframes hx-icon-button-spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .button {\n transition: none;\n }\n\n .button__spinner {\n animation: none;\n opacity: var(--hx-opacity-muted, 0.6);\n }\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n .button {\n forced-color-adjust: none;\n background-color: ButtonFace;\n color: ButtonText;\n border: 2px solid ButtonText;\n }\n\n .button:focus-visible {\n outline: 3px solid Highlight;\n outline-offset: 2px;\n }\n\n .button[disabled] {\n background-color: ButtonFace;\n color: GrayText;\n border-color: GrayText;\n opacity: 1;\n }\n\n :host([disabled]) {\n opacity: 1;\n }\n\n .button--loading .button__spinner {\n stroke: ButtonText;\n forced-color-adjust: none;\n }\n }\n`;\n","import { html, nothing, type TemplateResult } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { HelixElement } from '../../base/index.js';\nimport { mixinDelegatesAria } from '../../mixins/index.js';\nimport { helixIconButtonStyles } from './hx-icon-button.styles.js';\nimport { forcedColorsInteractive } from '../../styles/forced-colors.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * An icon-only button component for compact, accessible actions.\n * Renders a square button or anchor element containing a single icon.\n * The `label` property is required and provides the accessible name\n * via `aria-label` and a native tooltip via the `title` attribute.\n *\n * @summary Icon-only action button with full accessibility support.\n *\n * @tag hx-icon-button\n *\n * @slot - Icon element to display (hx-icon, svg, or img).\n *\n * @fires {CustomEvent<{originalEvent: MouseEvent}>} hx-click - Dispatched when the button is clicked (not disabled).\n *\n * @csspart button - The native button or anchor element.\n * @csspart icon - The icon container span wrapping the default slot.\n * @csspart spinner - The loading spinner SVG element shown when `loading` is true.\n *\n * @cssprop [--hx-icon-button-bg=transparent] - Button background color.\n * @cssprop [--hx-icon-button-color=var(--hx-color-primary-500)] - Icon color.\n * @cssprop [--hx-icon-button-border-color=transparent] - Button border color.\n * @cssprop [--hx-icon-button-border-radius=var(--hx-border-radius-md)] - Button border radius.\n * @cssprop [--hx-icon-button-size] - Explicit width and height override for the button.\n * @cssprop [--hx-icon-button-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n * @cssprop [--hx-opacity-disabled] - Opacity.\n * @cssprop [--hx-border-width-thin] - Width.\n * @cssprop [--hx-border-radius-md] - CSS custom property.\n * @cssprop [--hx-color-primary-500] - Color.\n * @cssprop [--hx-transition-fast] - Transition timing.\n * @cssprop [--hx-focus-ring-width] - Width.\n * @cssprop [--hx-focus-ring-color] - Color.\n * @cssprop [--hx-focus-ring-offset] - CSS custom property.\n * @cssprop [--hx-filter-brightness-active] - CSS filter.\n * @cssprop [--hx-space-1] - Spacing token.\n * @cssprop [--hx-size-8] - Size token.\n * @cssprop [--hx-touch-target-min] - Minimum touch target size.\n * @cssprop [--hx-font-size-sm] - Font size.\n * @cssprop [--hx-space-2] - Spacing token.\n * @cssprop [--hx-size-10] - Size token.\n * @cssprop [--hx-font-size-md] - Font size.\n * @cssprop [--hx-space-3] - Spacing token.\n * @cssprop [--hx-size-12] - Size token.\n * @cssprop [--hx-font-size-lg] - Font size.\n * @cssprop [--hx-color-neutral-0] - Color.\n * @cssprop [--hx-color-primary-600] - Color.\n * @cssprop [--hx-color-primary-50] - Color.\n * @cssprop [--hx-color-neutral-700] - Color.\n * @cssprop [--hx-color-neutral-300] - Color.\n * @cssprop [--hx-color-neutral-100] - Color.\n * @cssprop [--hx-color-error-500] - Color.\n * @cssprop [--hx-color-error-600] - Color.\n */\n@customElement('hx-icon-button')\nexport class HelixIconButton extends mixinDelegatesAria(HelixElement) {\n static override styles = [helixIconButtonStyles, forcedColorsInteractive];\n\n /**\n * Accessible name for the button. Required. Rendered as `aria-label` and\n * `title` on the underlying element. The component renders nothing when absent,\n * and a console warning is emitted to alert developers during authoring.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Visual style variant of the button.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'ghost' = 'ghost';\n\n /**\n * Size of the button.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * The type attribute for the underlying button element.\n * Has no effect when `href` is set.\n * @attr type\n */\n @property({ type: String })\n type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * Whether the button is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Whether the button is in a loading state. Shows the spinner, prevents\n * activation, and sets `aria-busy=\"true\"` on the inner element. Does NOT\n * set the native `disabled` attribute (loading is transient; disabled is\n * persistent, and AT announces them differently).\n * @attr loading\n */\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n /**\n * When set, renders an `<a>` element instead of a `<button>`.\n * @attr href\n */\n @property({ type: String })\n href: string | undefined = undefined;\n\n /**\n * Name submitted with form data. Only applicable when rendering as a button.\n * @attr name\n */\n @property({ type: String })\n name: string | undefined = undefined;\n\n /**\n * Value submitted with form data. Only applicable when rendering as a button.\n * @attr value\n */\n @property({ type: String })\n value: string | undefined = undefined;\n\n // ─── Form Association ───\n\n /** Marks this element as form-associated for ElementInternals support. @internal */\n static override formAssociated = true;\n\n protected override _onFormDisabled(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleClick(e: MouseEvent): void {\n if (this.disabled || this.loading) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n /**\n * Dispatched when the button is clicked.\n * @event hx-click\n */\n this.dispatchEvent(\n new CustomEvent<{ originalEvent: MouseEvent }>('hx-click', {\n bubbles: true,\n composed: true,\n detail: { originalEvent: e },\n }),\n );\n\n // Handle form submission/reset if form-associated and not in href/link mode\n if (!this.href) {\n if (this.type === 'submit' && this._internals.form) {\n this._internals.form.requestSubmit();\n } else if (this.type === 'reset' && this._internals.form) {\n this._internals.form.reset();\n }\n }\n }\n\n // ─── Render Helpers ───\n\n /** @internal */\n private _normalizedLabel(): string {\n return this.label.trim();\n }\n\n /** @internal */\n private _classes() {\n return {\n button: true,\n [`button--${this.variant}`]: true,\n [`button--${this.size}`]: true,\n 'button--loading': this.loading,\n };\n }\n\n /** @internal */\n private _iconSlot() {\n return html`<span part=\"icon\" class=\"icon\"><slot></slot></span>`;\n }\n\n /** @internal */\n private _renderSpinner(): TemplateResult {\n return html`\n <svg\n class=\"button__spinner\"\n part=\"spinner\"\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <circle\n class=\"button__spinner-track\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n opacity=\"0.3\"\n />\n <path\n class=\"button__spinner-arc\"\n d=\"M12 2a10 10 0 0 1 10 10\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n `;\n }\n\n // ─── Render ───\n\n override render() {\n const normalizedLabel = this._normalizedLabel();\n if (!normalizedLabel) {\n devWarn(\n 'hx-icon-button',\n 'The `label` property is required for accessibility. Render suppressed.',\n );\n return nothing;\n }\n\n // mixinDelegatesAria forwarding: consumer-set aria-* (aria-pressed,\n // aria-expanded, aria-haspopup, aria-controls, aria-describedby) lands\n // in data-aria-* on the host. Project them onto the inner element so the\n // a11y tree sees them on the role-bearing native element.\n const projectedDescribedBy = this.getAttribute('data-aria-describedby');\n const projectedPressed = this.getAttribute('data-aria-pressed');\n const projectedExpanded = this.getAttribute('data-aria-expanded');\n const projectedHasPopup = this.getAttribute('data-aria-haspopup');\n const projectedControls = this.getAttribute('data-aria-controls');\n const projectedCurrent = this.getAttribute('data-aria-current');\n\n if (this.href !== undefined) {\n // P1-03 fix: disabled anchor must set tabindex=\"-1\" explicitly — an <a>\n // without href is non-focusable by default in most browsers, but this is\n // browser-dependent. Explicit tabindex=\"-1\" guarantees keyboard exclusion\n // across all conforming browsers. Loading anchors are also tab-skipped\n // for consistency with disabled.\n // P1-07 note: aria-disabled IS required on the anchor branch because\n // <a> elements have no native disabled attribute; aria-disabled is the\n // only AT signal available.\n return html`\n <a\n part=\"button\"\n class=${classMap(this._classes())}\n href=${ifDefined(this.disabled || this.loading ? undefined : this.href)}\n aria-label=${normalizedLabel}\n title=${normalizedLabel}\n aria-disabled=${this.disabled ? 'true' : nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n aria-pressed=${ifDefined(projectedPressed ?? undefined)}\n aria-expanded=${ifDefined(projectedExpanded ?? undefined)}\n aria-haspopup=${ifDefined(projectedHasPopup ?? undefined)}\n aria-controls=${ifDefined(projectedControls ?? undefined)}\n aria-describedby=${ifDefined(projectedDescribedBy ?? undefined)}\n aria-current=${ifDefined(projectedCurrent ?? undefined)}\n tabindex=${this.disabled || this.loading ? '-1' : nothing}\n @click=${this._handleClick}\n >\n ${this.loading ? this._renderSpinner() : this._iconSlot()}\n </a>\n `;\n }\n\n // P1-07 fix: aria-disabled is redundant on a natively disabled <button>.\n // The native disabled attribute already exposes aria-disabled=\"true\"\n // implicitly in the accessibility tree. Duplicate explicit aria-disabled\n // creates ambiguity about design intent. Keep only native ?disabled.\n return html`\n <button\n part=\"button\"\n class=${classMap(this._classes())}\n ?disabled=${this.disabled}\n type=${this.type}\n aria-label=${normalizedLabel}\n title=${normalizedLabel}\n aria-busy=${this.loading ? 'true' : nothing}\n aria-pressed=${ifDefined(projectedPressed ?? undefined)}\n aria-expanded=${ifDefined(projectedExpanded ?? undefined)}\n aria-haspopup=${ifDefined(projectedHasPopup ?? undefined)}\n aria-controls=${ifDefined(projectedControls ?? undefined)}\n aria-describedby=${ifDefined(projectedDescribedBy ?? undefined)}\n aria-current=${ifDefined(projectedCurrent ?? undefined)}\n name=${ifDefined(this.name)}\n value=${ifDefined(this.value)}\n @click=${this._handleClick}\n >\n ${this.loading ? this._renderSpinner() : this._iconSlot()}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-icon-button': HelixIconButton;\n }\n interface HTMLElementEventMap {\n 'hx-click': CustomEvent<{ originalEvent: MouseEvent }>;\n }\n}\n"],"names":["helixIconButtonStyles","css","HelixIconButton","mixinDelegatesAria","HelixElement","disabled","e","html","normalizedLabel","nothing","projectedDescribedBy","projectedPressed","projectedExpanded","projectedHasPopup","projectedControls","projectedCurrent","classMap","ifDefined","forcedColorsInteractive","__decorateClass","property","customElement"],"mappings":";;;;;;;AAEO,MAAMA,IAAwBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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