@helixui/library 3.7.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 (248) hide show
  1. package/custom-elements.json +1926 -303
  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-banner/hx-banner.d.ts +19 -0
  7. package/dist/components/hx-banner/hx-banner.d.ts.map +1 -1
  8. package/dist/components/hx-breadcrumb/hx-breadcrumb-item.d.ts.map +1 -1
  9. package/dist/components/hx-breadcrumb/hx-breadcrumb-item.styles.d.ts.map +1 -1
  10. package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts +18 -0
  11. package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts.map +1 -1
  12. package/dist/components/hx-breadcrumb/index.js +1 -1
  13. package/dist/components/hx-button/hx-button.styles.d.ts.map +1 -1
  14. package/dist/components/hx-button/index.js +1 -1
  15. package/dist/components/hx-button-group/hx-button-group.d.ts +47 -0
  16. package/dist/components/hx-button-group/hx-button-group.d.ts.map +1 -1
  17. package/dist/components/hx-button-group/index.js +1 -1
  18. package/dist/components/hx-checkbox/hx-checkbox.styles.d.ts.map +1 -1
  19. package/dist/components/hx-checkbox/index.js +1 -1
  20. package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts +36 -0
  21. package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts.map +1 -1
  22. package/dist/components/hx-checkbox-group/hx-checkbox-group.styles.d.ts.map +1 -1
  23. package/dist/components/hx-checkbox-group/index.js +1 -1
  24. package/dist/components/hx-clinical-status/hx-clinical-status.d.ts +19 -0
  25. package/dist/components/hx-clinical-status/hx-clinical-status.d.ts.map +1 -1
  26. package/dist/components/hx-color-picker/hx-color-picker.d.ts +18 -0
  27. package/dist/components/hx-color-picker/hx-color-picker.d.ts.map +1 -1
  28. package/dist/components/hx-color-picker/hx-color-picker.styles.d.ts.map +1 -1
  29. package/dist/components/hx-color-picker/index.js +1 -1
  30. package/dist/components/hx-combobox/hx-combobox.d.ts +18 -0
  31. package/dist/components/hx-combobox/hx-combobox.d.ts.map +1 -1
  32. package/dist/components/hx-copy-button/hx-copy-button.d.ts +18 -0
  33. package/dist/components/hx-copy-button/hx-copy-button.d.ts.map +1 -1
  34. package/dist/components/hx-copy-button/hx-copy-button.styles.d.ts.map +1 -1
  35. package/dist/components/hx-copy-button/index.js +1 -1
  36. package/dist/components/hx-date-picker/hx-date-picker.d.ts +18 -0
  37. package/dist/components/hx-date-picker/hx-date-picker.d.ts.map +1 -1
  38. package/dist/components/hx-date-picker/hx-date-picker.styles.d.ts.map +1 -1
  39. package/dist/components/hx-date-picker/index.js +1 -1
  40. package/dist/components/hx-drawer/hx-drawer.d.ts +18 -0
  41. package/dist/components/hx-drawer/hx-drawer.d.ts.map +1 -1
  42. package/dist/components/hx-dropdown/hx-dropdown.d.ts +18 -0
  43. package/dist/components/hx-dropdown/hx-dropdown.d.ts.map +1 -1
  44. package/dist/components/hx-dropdown/hx-dropdown.styles.d.ts.map +1 -1
  45. package/dist/components/hx-dropdown/index.js +1 -1
  46. package/dist/components/hx-field/hx-field.d.ts +17 -0
  47. package/dist/components/hx-field/hx-field.d.ts.map +1 -1
  48. package/dist/components/hx-field-label/hx-field-label.d.ts +17 -0
  49. package/dist/components/hx-field-label/hx-field-label.d.ts.map +1 -1
  50. package/dist/components/hx-file-upload/hx-file-upload.d.ts +18 -0
  51. package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
  52. package/dist/components/hx-form/hx-form.d.ts +19 -0
  53. package/dist/components/hx-form/hx-form.d.ts.map +1 -1
  54. package/dist/components/hx-help-text/hx-help-text.d.ts +17 -0
  55. package/dist/components/hx-help-text/hx-help-text.d.ts.map +1 -1
  56. package/dist/components/hx-icon-button/hx-icon-button.d.ts +18 -0
  57. package/dist/components/hx-icon-button/hx-icon-button.d.ts.map +1 -1
  58. package/dist/components/hx-menu/hx-menu.d.ts +18 -0
  59. package/dist/components/hx-menu/hx-menu.d.ts.map +1 -1
  60. package/dist/components/hx-nav/hx-nav.d.ts +18 -0
  61. package/dist/components/hx-nav/hx-nav.d.ts.map +1 -1
  62. package/dist/components/hx-nav/hx-nav.styles.d.ts.map +1 -1
  63. package/dist/components/hx-nav/index.js +1 -1
  64. package/dist/components/hx-number-input/hx-number-input.d.ts +18 -0
  65. package/dist/components/hx-number-input/hx-number-input.d.ts.map +1 -1
  66. package/dist/components/hx-number-input/index.js +1 -1
  67. package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts +18 -0
  68. package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts.map +1 -1
  69. package/dist/components/hx-popover/hx-popover.d.ts +18 -0
  70. package/dist/components/hx-popover/hx-popover.d.ts.map +1 -1
  71. package/dist/components/hx-popover/hx-popover.styles.d.ts.map +1 -1
  72. package/dist/components/hx-popover/index.js +1 -1
  73. package/dist/components/hx-popup/hx-popup.d.ts +18 -0
  74. package/dist/components/hx-popup/hx-popup.d.ts.map +1 -1
  75. package/dist/components/hx-popup/hx-popup.styles.d.ts.map +1 -1
  76. package/dist/components/hx-popup/index.js +1 -1
  77. package/dist/components/hx-radio-group/hx-radio-group.d.ts +18 -0
  78. package/dist/components/hx-radio-group/hx-radio-group.d.ts.map +1 -1
  79. package/dist/components/hx-radio-group/hx-radio-group.styles.d.ts.map +1 -1
  80. package/dist/components/hx-radio-group/hx-radio.styles.d.ts.map +1 -1
  81. package/dist/components/hx-radio-group/index.js +1 -1
  82. package/dist/components/hx-rating/hx-rating.d.ts +19 -0
  83. package/dist/components/hx-rating/hx-rating.d.ts.map +1 -1
  84. package/dist/components/hx-select/hx-select.d.ts +18 -0
  85. package/dist/components/hx-select/hx-select.d.ts.map +1 -1
  86. package/dist/components/hx-side-nav/hx-side-nav.d.ts +18 -0
  87. package/dist/components/hx-side-nav/hx-side-nav.d.ts.map +1 -1
  88. package/dist/components/hx-side-nav/hx-side-nav.styles.d.ts.map +1 -1
  89. package/dist/components/hx-side-nav/index.js +1 -1
  90. package/dist/components/hx-slider/hx-slider.d.ts +19 -0
  91. package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
  92. package/dist/components/hx-split-button/hx-split-button.d.ts +18 -0
  93. package/dist/components/hx-split-button/hx-split-button.d.ts.map +1 -1
  94. package/dist/components/hx-split-button/hx-split-button.styles.d.ts.map +1 -1
  95. package/dist/components/hx-split-button/index.js +1 -1
  96. package/dist/components/hx-switch/hx-switch.d.ts +18 -0
  97. package/dist/components/hx-switch/hx-switch.d.ts.map +1 -1
  98. package/dist/components/hx-switch/hx-switch.styles.d.ts.map +1 -1
  99. package/dist/components/hx-switch/index.js +1 -1
  100. package/dist/components/hx-tabs/hx-tab.styles.d.ts.map +1 -1
  101. package/dist/components/hx-tabs/hx-tabs.d.ts +18 -0
  102. package/dist/components/hx-tabs/hx-tabs.d.ts.map +1 -1
  103. package/dist/components/hx-tabs/index.js +1 -1
  104. package/dist/components/hx-text-input/hx-text-input.styles.d.ts.map +1 -1
  105. package/dist/components/hx-text-input/index.js +1 -1
  106. package/dist/components/hx-textarea/hx-textarea.d.ts +18 -0
  107. package/dist/components/hx-textarea/hx-textarea.d.ts.map +1 -1
  108. package/dist/components/hx-time-picker/hx-time-picker.d.ts +18 -0
  109. package/dist/components/hx-time-picker/hx-time-picker.d.ts.map +1 -1
  110. package/dist/components/hx-time-picker/hx-time-picker.styles.d.ts.map +1 -1
  111. package/dist/components/hx-time-picker/index.js +1 -1
  112. package/dist/components/hx-toast/hx-toast.d.ts +19 -0
  113. package/dist/components/hx-toast/hx-toast.d.ts.map +1 -1
  114. package/dist/components/hx-toggle-button/hx-toggle-button.d.ts +18 -0
  115. package/dist/components/hx-toggle-button/hx-toggle-button.d.ts.map +1 -1
  116. package/dist/components/hx-toggle-button/hx-toggle-button.styles.d.ts.map +1 -1
  117. package/dist/components/hx-toggle-button/index.js +1 -1
  118. package/dist/components/hx-tooltip/hx-tooltip.d.ts +18 -0
  119. package/dist/components/hx-tooltip/hx-tooltip.d.ts.map +1 -1
  120. package/dist/components/hx-tooltip/hx-tooltip.styles.d.ts.map +1 -1
  121. package/dist/components/hx-tooltip/index.js +1 -1
  122. package/dist/components/hx-top-nav/hx-top-nav.d.ts +18 -0
  123. package/dist/components/hx-top-nav/hx-top-nav.d.ts.map +1 -1
  124. package/dist/components/hx-top-nav/hx-top-nav.styles.d.ts.map +1 -1
  125. package/dist/components/hx-top-nav/index.js +1 -1
  126. package/dist/css/helix-all.css +239 -30
  127. package/dist/css/helix-core.css +4 -1
  128. package/dist/css/helix-forms.css +100 -15
  129. package/dist/css/helix-navigation.css +43 -2
  130. package/dist/css/helix-overlay.css +53 -0
  131. package/dist/css/helix-tokens.css +13 -12
  132. package/dist/css/helix-utility.css +39 -12
  133. package/dist/css/hx-action-bar.css +12 -0
  134. package/dist/css/hx-button.css +4 -1
  135. package/dist/css/hx-checkbox-group.css +11 -0
  136. package/dist/css/hx-checkbox.css +10 -0
  137. package/dist/css/hx-color-picker.css +14 -1
  138. package/dist/css/hx-copy-button.css +5 -2
  139. package/dist/css/hx-date-picker.css +6 -1
  140. package/dist/css/hx-dropdown.css +13 -0
  141. package/dist/css/hx-nav.css +24 -2
  142. package/dist/css/hx-number-input.css +8 -8
  143. package/dist/css/hx-popover.css +13 -0
  144. package/dist/css/hx-popup.css +14 -0
  145. package/dist/css/hx-radio-group.css +10 -0
  146. package/dist/css/hx-side-nav.css +7 -0
  147. package/dist/css/hx-split-button.css +22 -10
  148. package/dist/css/hx-switch.css +19 -1
  149. package/dist/css/hx-text-input.css +4 -1
  150. package/dist/css/hx-time-picker.css +7 -2
  151. package/dist/css/hx-toggle-button.css +11 -1
  152. package/dist/css/hx-tooltip.css +13 -0
  153. package/dist/css/hx-top-nav.css +12 -0
  154. package/dist/css/index.css +1 -1
  155. package/dist/css/manifest.json +40 -12
  156. package/dist/index.js +24 -24
  157. package/dist/shared/{hx-action-bar-CitgcpGv.js → hx-action-bar-BlEG4aZv.js} +41 -29
  158. package/dist/shared/hx-action-bar-BlEG4aZv.js.map +1 -0
  159. package/dist/shared/hx-banner-fpRnciIO.js.map +1 -1
  160. package/dist/shared/{hx-breadcrumb-item-3tKppF9h.js → hx-breadcrumb-item-D8xYqe3s.js} +56 -43
  161. package/dist/shared/hx-breadcrumb-item-D8xYqe3s.js.map +1 -0
  162. package/dist/shared/{hx-button-rRNmD4fd.js → hx-button-DOZTZnz-.js} +18 -15
  163. package/dist/shared/hx-button-DOZTZnz-.js.map +1 -0
  164. package/dist/shared/hx-button-group-D3QUmSzl.js +248 -0
  165. package/dist/shared/hx-button-group-D3QUmSzl.js.map +1 -0
  166. package/dist/shared/{hx-checkbox-hPlIw6Lb.js → hx-checkbox-DcgyGS9V.js} +30 -20
  167. package/dist/shared/hx-checkbox-DcgyGS9V.js.map +1 -0
  168. package/dist/shared/{hx-checkbox-group-D5piJLY8.js → hx-checkbox-group-C0q6HDqn.js} +101 -58
  169. package/dist/shared/hx-checkbox-group-C0q6HDqn.js.map +1 -0
  170. package/dist/shared/hx-clinical-status-D3XQIOqX.js.map +1 -1
  171. package/dist/shared/{hx-color-picker-DBwJzT5f.js → hx-color-picker-CYjx8i8R.js} +97 -84
  172. package/dist/shared/hx-color-picker-CYjx8i8R.js.map +1 -0
  173. package/dist/shared/hx-combobox-NgJaLbs2.js.map +1 -1
  174. package/dist/shared/{hx-copy-button-sUVuikyH.js → hx-copy-button-DJirFCUL.js} +18 -15
  175. package/dist/shared/hx-copy-button-DJirFCUL.js.map +1 -0
  176. package/dist/shared/{hx-date-picker-DSKDkCy1.js → hx-date-picker-0PtEav0K.js} +66 -61
  177. package/dist/shared/hx-date-picker-0PtEav0K.js.map +1 -0
  178. package/dist/shared/hx-drawer-CM_upadk.js.map +1 -1
  179. package/dist/shared/{hx-dropdown-D626S2ZG.js → hx-dropdown-xHwTJecv.js} +44 -31
  180. package/dist/shared/hx-dropdown-xHwTJecv.js.map +1 -0
  181. package/dist/shared/hx-field-label-BVRyyKeh.js.map +1 -1
  182. package/dist/shared/hx-field-zw0U1KVi.js.map +1 -1
  183. package/dist/shared/hx-file-upload-D3rKROK5.js.map +1 -1
  184. package/dist/shared/hx-form-CkChEATa.js.map +1 -1
  185. package/dist/shared/hx-help-text-Xb2Yr8x2.js.map +1 -1
  186. package/dist/shared/hx-icon-button-B2BdVdyK.js.map +1 -1
  187. package/dist/shared/hx-menu-divider-A6Guuzi_.js.map +1 -1
  188. package/dist/shared/{hx-nav-ldFM3Fle.js → hx-nav-ChMTfn7o.js} +66 -44
  189. package/dist/shared/hx-nav-ChMTfn7o.js.map +1 -0
  190. package/dist/shared/{hx-nav-item-CODtUlew.js → hx-nav-item-ClN17f1y.js} +62 -55
  191. package/dist/shared/hx-nav-item-ClN17f1y.js.map +1 -0
  192. package/dist/shared/{hx-number-input-yUzFOSC1.js → hx-number-input-MggsT7F0.js} +13 -13
  193. package/dist/shared/hx-number-input-MggsT7F0.js.map +1 -0
  194. package/dist/shared/hx-overflow-menu-DFjJAziP.js.map +1 -1
  195. package/dist/shared/{hx-popover-BAlAFOH9.js → hx-popover-BjB0nkcq.js} +51 -38
  196. package/dist/shared/hx-popover-BjB0nkcq.js.map +1 -0
  197. package/dist/shared/{hx-popup-COUXXZ9X.js → hx-popup-BiV_2evC.js} +59 -45
  198. package/dist/shared/hx-popup-BiV_2evC.js.map +1 -0
  199. package/dist/shared/{hx-radio-CY4kQfZw.js → hx-radio-BY4zpwdh.js} +45 -27
  200. package/dist/shared/hx-radio-BY4zpwdh.js.map +1 -0
  201. package/dist/shared/hx-rating-C3QP53k9.js.map +1 -1
  202. package/dist/shared/hx-select-DahFehiZ.js.map +1 -1
  203. package/dist/shared/hx-slider-Blmv_rwS.js.map +1 -1
  204. package/dist/shared/{hx-split-button-Ddle8iVx.js → hx-split-button-CdNz1XAu.js} +62 -50
  205. package/dist/shared/hx-split-button-CdNz1XAu.js.map +1 -0
  206. package/dist/shared/{hx-switch-TvKGvZJz.js → hx-switch-BCXuNxEH.js} +42 -24
  207. package/dist/shared/hx-switch-BCXuNxEH.js.map +1 -0
  208. package/dist/shared/{hx-tab-panel-DzsX8BHV.js → hx-tab-panel-BfisavKo.js} +47 -32
  209. package/dist/shared/hx-tab-panel-BfisavKo.js.map +1 -0
  210. package/dist/shared/{hx-text-input-D6FlOZM-.js → hx-text-input-V5sQOpDh.js} +5 -2
  211. package/dist/shared/hx-text-input-V5sQOpDh.js.map +1 -0
  212. package/dist/shared/hx-textarea-CNG590KY.js.map +1 -1
  213. package/dist/shared/{hx-time-picker-Bo7FWzmf.js → hx-time-picker-DfJkBwcX.js} +41 -36
  214. package/dist/shared/hx-time-picker-DfJkBwcX.js.map +1 -0
  215. package/dist/shared/{hx-toggle-button-DSJeFlb0.js → hx-toggle-button-xNVYeA3X.js} +37 -27
  216. package/dist/shared/hx-toggle-button-xNVYeA3X.js.map +1 -0
  217. package/dist/shared/{hx-tooltip-DVqtKPCD.js → hx-tooltip-CamO-9nd.js} +24 -11
  218. package/dist/shared/hx-tooltip-CamO-9nd.js.map +1 -0
  219. package/dist/shared/{hx-top-nav-DP6OFS8C.js → hx-top-nav-CsTxOtVI.js} +26 -14
  220. package/dist/shared/hx-top-nav-CsTxOtVI.js.map +1 -0
  221. package/dist/shared/toast-factory-Dht3pVsw.js.map +1 -1
  222. package/figma-inventory.json +1121 -345
  223. package/package.json +2 -2
  224. package/dist/shared/hx-action-bar-CitgcpGv.js.map +0 -1
  225. package/dist/shared/hx-breadcrumb-item-3tKppF9h.js.map +0 -1
  226. package/dist/shared/hx-button-group-4NUBpkyC.js +0 -181
  227. package/dist/shared/hx-button-group-4NUBpkyC.js.map +0 -1
  228. package/dist/shared/hx-button-rRNmD4fd.js.map +0 -1
  229. package/dist/shared/hx-checkbox-group-D5piJLY8.js.map +0 -1
  230. package/dist/shared/hx-checkbox-hPlIw6Lb.js.map +0 -1
  231. package/dist/shared/hx-color-picker-DBwJzT5f.js.map +0 -1
  232. package/dist/shared/hx-copy-button-sUVuikyH.js.map +0 -1
  233. package/dist/shared/hx-date-picker-DSKDkCy1.js.map +0 -1
  234. package/dist/shared/hx-dropdown-D626S2ZG.js.map +0 -1
  235. package/dist/shared/hx-nav-item-CODtUlew.js.map +0 -1
  236. package/dist/shared/hx-nav-ldFM3Fle.js.map +0 -1
  237. package/dist/shared/hx-number-input-yUzFOSC1.js.map +0 -1
  238. package/dist/shared/hx-popover-BAlAFOH9.js.map +0 -1
  239. package/dist/shared/hx-popup-COUXXZ9X.js.map +0 -1
  240. package/dist/shared/hx-radio-CY4kQfZw.js.map +0 -1
  241. package/dist/shared/hx-split-button-Ddle8iVx.js.map +0 -1
  242. package/dist/shared/hx-switch-TvKGvZJz.js.map +0 -1
  243. package/dist/shared/hx-tab-panel-DzsX8BHV.js.map +0 -1
  244. package/dist/shared/hx-text-input-D6FlOZM-.js.map +0 -1
  245. package/dist/shared/hx-time-picker-Bo7FWzmf.js.map +0 -1
  246. package/dist/shared/hx-toggle-button-DSJeFlb0.js.map +0 -1
  247. package/dist/shared/hx-tooltip-DVqtKPCD.js.map +0 -1
  248. package/dist/shared/hx-top-nav-DP6OFS8C.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { css as u, html as a, nothing as p } from "lit";
1
+ import { css as u, html as s, nothing as p } from "lit";
2
2
  import { property as i, state as d, customElement as b } from "lit/decorators.js";
3
3
  import { classMap as f } from "lit/directives/class-map.js";
4
- import { f as v } from "./forced-colors-CTEDFRGa.js";
5
- import { H as m } from "./helix-element-BNEYeiys.js";
4
+ import { f as m } from "./forced-colors-CTEDFRGa.js";
5
+ import { H as v } from "./helix-element-BNEYeiys.js";
6
6
  const x = u`
7
7
  :host {
8
8
  display: inline-block;
@@ -60,10 +60,13 @@ const x = u`
60
60
  font-size: var(--hx-font-size-sm);
61
61
  }
62
62
 
63
+ /* md — WCAG 2.5.5 AAA Target Size (Enhanced): 44×44 minimum.
64
+ Bound to --hx-touch-target-min so the default md variant clears the
65
+ AAA-strict floor without requiring consumers to opt into sm or lg. */
63
66
  .button--md {
64
67
  padding: var(--hx-space-2);
65
- min-width: var(--hx-size-10);
66
- height: var(--hx-size-10);
68
+ min-width: var(--hx-touch-target-min, 2.75rem);
69
+ min-height: var(--hx-touch-target-min, 2.75rem);
67
70
  font-size: var(--hx-font-size-md);
68
71
  }
69
72
 
@@ -156,13 +159,13 @@ const x = u`
156
159
  }
157
160
  }
158
161
  `;
159
- var y = Object.defineProperty, g = Object.getOwnPropertyDescriptor, o = (e, n, c, s) => {
160
- for (var r = s > 1 ? void 0 : s ? g(n, c) : n, l = e.length - 1, h; l >= 0; l--)
161
- (h = e[l]) && (r = (s ? h(n, c, r) : h(r)) || r);
162
- return s && r && y(n, c, r), r;
162
+ var y = Object.defineProperty, g = Object.getOwnPropertyDescriptor, o = (e, n, c, a) => {
163
+ for (var r = a > 1 ? void 0 : a ? g(n, c) : n, l = e.length - 1, h; l >= 0; l--)
164
+ (h = e[l]) && (r = (a ? h(n, c, r) : h(r)) || r);
165
+ return a && r && y(n, c, r), r;
163
166
  };
164
167
  const _ = 300, w = /* @__PURE__ */ new Set(["sm", "md", "lg"]);
165
- let t = class extends m {
168
+ let t = class extends v {
166
169
  constructor() {
167
170
  super(...arguments), this.value = "", this.label = "Copy to clipboard", this.feedbackDuration = 2e3, this.size = "md", this.disabled = !1, this.labelCopied = "Copied", this.labelError = "Copy failed", this._copied = !1, this._announcement = "", this._feedbackTimer = null;
168
171
  }
@@ -241,16 +244,16 @@ let t = class extends m {
241
244
  }
242
245
  /** @internal */
243
246
  _renderIcon() {
244
- return a`
247
+ return s`
245
248
  <span part="icon" class="icon">
246
- ${this._copied ? a`<slot name="success-icon"></slot>` : a`<slot name="copy-icon"></slot>`}
249
+ ${this._copied ? s`<slot name="success-icon"></slot>` : s`<slot name="copy-icon"></slot>`}
247
250
  </span>
248
251
  `;
249
252
  }
250
253
  // ─── Render ───
251
254
  render() {
252
255
  const e = this._copied ? `${this.label} — ${this.labelCopied}` : this.label;
253
- return a`
256
+ return s`
254
257
  <button
255
258
  part="button"
256
259
  class=${f(this._buttonClasses())}
@@ -270,7 +273,7 @@ let t = class extends m {
270
273
  `;
271
274
  }
272
275
  };
273
- t.styles = [x, v];
276
+ t.styles = [x, m];
274
277
  o([
275
278
  i({ type: String })
276
279
  ], t.prototype, "value", 2);
@@ -304,4 +307,4 @@ t = o([
304
307
  export {
305
308
  t as H
306
309
  };
307
- //# sourceMappingURL=hx-copy-button-sUVuikyH.js.map
310
+ //# sourceMappingURL=hx-copy-button-DJirFCUL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-copy-button-DJirFCUL.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 /* md — WCAG 2.5.5 AAA Target Size (Enhanced): 44×44 minimum.\n Bound to --hx-touch-target-min so the default md variant clears the\n AAA-strict floor without requiring consumers to opt into sm or lg. */\n .button--md {\n padding: var(--hx-space-2);\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);\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 * @aaa-certified 2026-05-08\n * @aaa-criteria 1.4.6, 1.4.9, 2.1.3, 2.3.3, 2.4.12, 2.4.13, 2.5.5, 3.2.5, 3.3.6, forced-colors, apg-keyboard\n * @aaa-audit src/components/hx-copy-button/AAA-AUDIT.md\n * @keyboard-contract activate=Enter,Space; disabled-suppresses=true\n * @aria-pattern button\n * @aria-pattern-source https://www.w3.org/WAI/ARIA/apg/patterns/button/\n * @forced-colors-supported true\n * @stability stable\n * @since 3.7.0\n * @form-associated false\n * @theme-aware true\n * @brand-aware true\n * @drupal-sdc-eligible true\n * @react-wrapper-status complete\n * @figma-component-name hx-copy-button\n * @priority-tier P0\n * @phi-handles false\n * @clinical-context none\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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qB;AAAA,GA3B/CV,EA4BX,WAAA,oBAAA,CAAA;AAeAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,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,5 +1,5 @@
1
- import { css as z, html as y, nothing as D } from "lit";
2
- import { property as h, state as _, query as N, customElement as W } from "lit/decorators.js";
1
+ import { css as z, html as m, nothing as D } from "lit";
2
+ import { property as d, state as _, query as N, customElement as W } from "lit/decorators.js";
3
3
  import { F as G } from "./FormMixin-B8PXk5RQ.js";
4
4
  import { classMap as B } from "lit/directives/class-map.js";
5
5
  import { ifDefined as U } from "lit/directives/if-defined.js";
@@ -115,7 +115,8 @@ const J = z`
115
115
  font-size: var(--hx-font-size-md, 1rem);
116
116
  color: var(--hx-date-picker-color, var(--hx-color-text-strong, #202b39));
117
117
  line-height: var(--hx-line-height-normal, 1.5);
118
- min-height: var(--hx-size-10, 2.5rem);
118
+ /* WCAG 2.5.5 (Enhanced) AAA — primary input surface must meet 44×44. */
119
+ min-height: var(--hx-touch-target-min, 2.75rem);
119
120
  width: 100%;
120
121
  cursor: default;
121
122
  }
@@ -136,6 +137,10 @@ const J = z`
136
137
  display: flex;
137
138
  align-items: center;
138
139
  justify-content: center;
140
+ /* WCAG 2.5.5 (Enhanced) AAA — calendar trigger must clear 44×44.
141
+ Without min-width the icon button collapses to ~41 px wide. */
142
+ min-width: var(--hx-touch-target-min, 2.75rem);
143
+ min-height: var(--hx-touch-target-min, 2.75rem);
139
144
  padding: 0 var(--hx-space-3, 0.75rem);
140
145
  border: none;
141
146
  border-left: var(--hx-border-width-thin, 1px) solid
@@ -548,8 +553,8 @@ let l = class extends G(K) {
548
553
  if (s.nodeType === Node.ELEMENT_NODE) {
549
554
  const o = s;
550
555
  if (r.push(o), o.getAttribute("aria-hidden") === "true") continue;
551
- const d = k(o);
552
- d && a.push(d);
556
+ const h = k(o);
557
+ h && a.push(h);
553
558
  } else if (s.nodeType === Node.TEXT_NODE) {
554
559
  const o = (s.textContent ?? "").trim();
555
560
  o && a.push(o);
@@ -660,42 +665,42 @@ let l = class extends G(K) {
660
665
  this._invalid !== u && (this._invalid = u);
661
666
  return;
662
667
  }
663
- const r = this.getAttribute("aria-label"), a = r !== null && r.trim() || "", i = ((H = this.shadowRoot) == null ? void 0 : H.getElementById(this._labelId)) ?? null, s = this._slottedLabelEls, o = ((F = this.shadowRoot) == null ? void 0 : F.getElementById(this._helpTextId)) ?? null, d = ((Y = this.shadowRoot) == null ? void 0 : Y.getElementById(this._errorId)) ?? null, c = this.getAttribute("aria-labelledby");
668
+ const r = this.getAttribute("aria-label"), a = r !== null && r.trim() || "", i = ((H = this.shadowRoot) == null ? void 0 : H.getElementById(this._labelId)) ?? null, s = this._slottedLabelEls, o = ((F = this.shadowRoot) == null ? void 0 : F.getElementById(this._helpTextId)) ?? null, h = ((Y = this.shadowRoot) == null ? void 0 : Y.getElementById(this._errorId)) ?? null, c = this.getAttribute("aria-labelledby");
664
669
  this._consumerLabelledBy = c;
665
670
  const p = this.getAttribute("aria-describedby");
666
671
  this._consumerDescribedBy = p;
667
- const f = q(this, this._consumerLabelledBy), w = f.length > 0, m = q(this, this._consumerDescribedBy);
668
- this._installExternalRefsObserver([...f, ...m]);
672
+ const f = q(this, this._consumerLabelledBy), w = f.length > 0, y = q(this, this._consumerDescribedBy);
673
+ this._installExternalRefsObserver([...f, ...y]);
669
674
  const v = !!(this.error || this._hasErrorSlot), L = !t.validity.valid || v;
670
675
  this._invalid !== L && (this._invalid = L);
671
676
  const x = typeof this.accessibleLabel == "string" && this.accessibleLabel.trim().length > 0 ? this.accessibleLabel : null, O = (u) => u.getAttribute("aria-hidden") !== "true" && !u.hasAttribute("hidden"), S = [];
672
677
  x || (S.push(...f.filter(O)), !w && !a && (this._labelSource === "slot" && s.length > 0 ? S.push(...s.filter(O)) : this._labelSource === "string" && i && S.push(i)));
673
- const M = [...m.filter(O)];
674
- if (o && !v && this._hasHelpSlot && M.push(o), d && v && M.push(d), this._supportsIdrefRefs) {
678
+ const E = [...y.filter(O)];
679
+ if (o && !v && this._hasHelpSlot && E.push(o), h && v && E.push(h), this._supportsIdrefRefs) {
675
680
  const u = t;
676
- u.ariaLabelledByElements = S.length > 0 ? S : null, u.ariaDescribedByElements = M.length > 0 ? M : null, x ? t.ariaLabel = x : t.ariaLabel = null;
681
+ u.ariaLabelledByElements = S.length > 0 ? S : null, u.ariaDescribedByElements = E.length > 0 ? E : null, x ? t.ariaLabel = x : t.ariaLabel = null;
677
682
  }
678
- const I = (u) => u.filter(O).map((A) => k(A)).filter((A) => A.length > 0).join(" ");
679
- let b = null, T = null, $ = "";
680
- if (!x && w && ($ = I(f)), x)
683
+ const A = (u) => u.filter(O).map((C) => k(C)).filter((C) => C.length > 0).join(" ");
684
+ let b = null, M = null, I = "";
685
+ if (!x && w && (I = A(f)), x)
681
686
  b = x;
682
- else if ($)
683
- b = $;
687
+ else if (I)
688
+ b = I;
684
689
  else if (a)
685
690
  b = a;
686
691
  else if (this._labelSource === "slot") {
687
692
  if (this._labelSlotText)
688
693
  b = this._labelSlotText;
689
694
  else if (s.length > 0) {
690
- const u = I(s);
695
+ const u = A(s);
691
696
  u && (b = u);
692
697
  }
693
- } else this._labelSource === "string" && (i != null && i.id ? T = i.id : this.label && (b = this.label));
694
- T ? (e.getAttribute("aria-labelledby") !== T && e.setAttribute("aria-labelledby", T), e.hasAttribute("aria-label") && e.removeAttribute("aria-label")) : b ? (e.getAttribute("aria-label") !== b && e.setAttribute("aria-label", b), e.hasAttribute("aria-labelledby") && e.removeAttribute("aria-labelledby")) : (e.hasAttribute("aria-label") && e.removeAttribute("aria-label"), e.hasAttribute("aria-labelledby") && e.removeAttribute("aria-labelledby"));
695
- const E = ((R = this.shadowRoot) == null ? void 0 : R.getElementById(this._consumerDescId)) ?? null, C = I(m);
696
- E && E.textContent !== C && (E.textContent = C);
698
+ } else this._labelSource === "string" && (i != null && i.id ? M = i.id : this.label && (b = this.label));
699
+ M ? (e.getAttribute("aria-labelledby") !== M && e.setAttribute("aria-labelledby", M), e.hasAttribute("aria-label") && e.removeAttribute("aria-label")) : b ? (e.getAttribute("aria-label") !== b && e.setAttribute("aria-label", b), e.hasAttribute("aria-labelledby") && e.removeAttribute("aria-labelledby")) : (e.hasAttribute("aria-label") && e.removeAttribute("aria-label"), e.hasAttribute("aria-labelledby") && e.removeAttribute("aria-labelledby"));
700
+ const T = ((R = this.shadowRoot) == null ? void 0 : R.getElementById(this._consumerDescId)) ?? null, $ = A(y);
701
+ T && T.textContent !== $ && (T.textContent = $);
697
702
  const g = [];
698
- if (C && E && g.push(this._consumerDescId), o && !v && this._hasHelpSlot && g.push(this._helpTextId), d && v && g.push(this._errorId), !this._hasHelpSlot && this.helpText && !v && o && !g.includes(this._helpTextId) && g.push(this._helpTextId), g.length > 0) {
703
+ if ($ && T && g.push(this._consumerDescId), o && !v && this._hasHelpSlot && g.push(this._helpTextId), h && v && g.push(this._errorId), !this._hasHelpSlot && this.helpText && !v && o && !g.includes(this._helpTextId) && g.push(this._helpTextId), g.length > 0) {
699
704
  const u = g.join(" ");
700
705
  e.getAttribute("aria-describedby") !== u && e.setAttribute("aria-describedby", u);
701
706
  } else e.hasAttribute("aria-describedby") && e.removeAttribute("aria-describedby");
@@ -1002,15 +1007,15 @@ let l = class extends G(K) {
1002
1007
  return;
1003
1008
  }
1004
1009
  if (e === "Home") {
1005
- const o = new Date(this._viewYear, this._viewMonth, r).getDay(), d = r - o;
1006
- d >= 1 && (this._focusedDay = d, this.updateComplete.then(() => {
1010
+ const o = new Date(this._viewYear, this._viewMonth, r).getDay(), h = r - o;
1011
+ h >= 1 && (this._focusedDay = h, this.updateComplete.then(() => {
1007
1012
  var c, p;
1008
- (p = (c = this._calendar) == null ? void 0 : c.querySelector(`[data-day="${d}"]`)) == null || p.focus();
1013
+ (p = (c = this._calendar) == null ? void 0 : c.querySelector(`[data-day="${h}"]`)) == null || p.focus();
1009
1014
  }));
1010
1015
  return;
1011
1016
  }
1012
1017
  if (e === "End") {
1013
- const d = 6 - new Date(this._viewYear, this._viewMonth, r).getDay(), c = r + d;
1018
+ const h = 6 - new Date(this._viewYear, this._viewMonth, r).getDay(), c = r + h;
1014
1019
  c <= a && (this._focusedDay = c, this.updateComplete.then(() => {
1015
1020
  var p, f;
1016
1021
  (f = (p = this._calendar) == null ? void 0 : p.querySelector(`[data-day="${c}"]`)) == null || f.focus();
@@ -1022,18 +1027,18 @@ let l = class extends G(K) {
1022
1027
  this._prevMonth();
1023
1028
  const s = new Date(this._viewYear, this._viewMonth + 1, 0).getDate();
1024
1029
  this._focusedDay = s + i, this.updateComplete.then(() => {
1025
- var d, c;
1030
+ var h, c;
1026
1031
  const o = this._focusedDay;
1027
- (c = (d = this._calendar) == null ? void 0 : d.querySelector(`[data-day="${o}"]`)) == null || c.focus();
1032
+ (c = (h = this._calendar) == null ? void 0 : h.querySelector(`[data-day="${o}"]`)) == null || c.focus();
1028
1033
  });
1029
1034
  return;
1030
1035
  }
1031
1036
  if (i > a) {
1032
1037
  const s = i - a;
1033
1038
  this._nextMonth(), this._focusedDay = s, this.updateComplete.then(() => {
1034
- var d, c;
1039
+ var h, c;
1035
1040
  const o = this._focusedDay;
1036
- (c = (d = this._calendar) == null ? void 0 : d.querySelector(`[data-day="${o}"]`)) == null || c.focus();
1041
+ (c = (h = this._calendar) == null ? void 0 : h.querySelector(`[data-day="${o}"]`)) == null || c.focus();
1037
1042
  });
1038
1043
  return;
1039
1044
  }
@@ -1071,11 +1076,11 @@ let l = class extends G(K) {
1071
1076
  /** @internal */
1072
1077
  _renderWeekdayHeaders() {
1073
1078
  const e = this._getWeekdayNames().map(
1074
- (r) => y`<div class="calendar__weekday" role="columnheader" aria-label=${r}>
1079
+ (r) => m`<div class="calendar__weekday" role="columnheader" aria-label=${r}>
1075
1080
  ${r.slice(0, 2)}
1076
1081
  </div>`
1077
1082
  );
1078
- return y`<div class="calendar__row" role="row">${e}</div>`;
1083
+ return m`<div class="calendar__row" role="row">${e}</div>`;
1079
1084
  }
1080
1085
  /** @internal */
1081
1086
  _renderDayGrid() {
@@ -1083,12 +1088,12 @@ let l = class extends G(K) {
1083
1088
  for (let i = 0; i < t.length; i += 7) {
1084
1089
  const s = t.slice(i, i + 7).map((o) => {
1085
1090
  if (o === null)
1086
- return y`<div class="calendar__day-cell" role="gridcell" aria-hidden="true"></div>`;
1087
- const d = e ? this._isSameDay(o, e) : !1, c = this._isSameDay(o, r), p = this._isDateDisabled(o), f = this._focusedDay === o.getDate(), w = o.getDate(), m = this._toISO(o), v = this._dayAriaLabels.get(m) ?? m;
1088
- return y`<div
1091
+ return m`<div class="calendar__day-cell" role="gridcell" aria-hidden="true"></div>`;
1092
+ const h = e ? this._isSameDay(o, e) : !1, c = this._isSameDay(o, r), p = this._isDateDisabled(o), f = this._focusedDay === o.getDate(), w = o.getDate(), y = this._toISO(o), v = this._dayAriaLabels.get(y) ?? y;
1093
+ return m`<div
1089
1094
  class="calendar__day-cell"
1090
1095
  role="gridcell"
1091
- aria-selected=${d ? "true" : "false"}
1096
+ aria-selected=${h ? "true" : "false"}
1092
1097
  aria-disabled=${p ? "true" : D}
1093
1098
  aria-current=${c ? "date" : D}
1094
1099
  >
@@ -1096,13 +1101,13 @@ let l = class extends G(K) {
1096
1101
  part="day"
1097
1102
  class=${B({
1098
1103
  calendar__day: !0,
1099
- "calendar__day--selected": d,
1104
+ "calendar__day--selected": h,
1100
1105
  "calendar__day--today": c,
1101
1106
  "calendar__day--disabled": p
1102
1107
  })}
1103
1108
  type="button"
1104
1109
  data-day=${w}
1105
- data-date=${m}
1110
+ data-date=${y}
1106
1111
  aria-label=${v}
1107
1112
  tabindex=${f ? "0" : "-1"}
1108
1113
  ?disabled=${p}
@@ -1111,7 +1116,7 @@ let l = class extends G(K) {
1111
1116
  </button>
1112
1117
  </div>`;
1113
1118
  });
1114
- a.push(y`<div class="calendar__row" role="row">${s}</div>`);
1119
+ a.push(m`<div class="calendar__row" role="row">${s}</div>`);
1115
1120
  }
1116
1121
  return a;
1117
1122
  }
@@ -1123,15 +1128,15 @@ let l = class extends G(K) {
1123
1128
  "field--disabled": this.disabled,
1124
1129
  "field--required": this.required
1125
1130
  };
1126
- return y`
1131
+ return m`
1127
1132
  <div part="field" class=${B(a)}>
1128
1133
  <!-- Label -->
1129
1134
  <div class="field__label-wrapper">
1130
1135
  <slot name="label" @slotchange=${this._handleLabelSlotChange}>
1131
- ${this.label ? y`
1136
+ ${this.label ? m`
1132
1137
  <label part="label" id=${this._labelId} class="field__label" for=${this._inputId}>
1133
1138
  ${this.label}
1134
- ${this.required ? y`<span class="field__required-marker" aria-hidden="true">*</span>` : D}
1139
+ ${this.required ? m`<span class="field__required-marker" aria-hidden="true">*</span>` : D}
1135
1140
  </label>
1136
1141
  ` : D}
1137
1142
  </slot>
@@ -1291,58 +1296,58 @@ l.styles = [J, V];
1291
1296
  l.formAssociated = !0;
1292
1297
  l.__testSupportsIdrefRefsOverride = null;
1293
1298
  n([
1294
- h({ type: String, reflect: !0 })
1299
+ d({ type: String, reflect: !0 })
1295
1300
  ], l.prototype, "name", 2);
1296
1301
  n([
1297
- h({ type: String })
1302
+ d({ type: String })
1298
1303
  ], l.prototype, "value", 2);
1299
1304
  n([
1300
- h({ type: String })
1305
+ d({ type: String })
1301
1306
  ], l.prototype, "min", 2);
1302
1307
  n([
1303
- h({ type: String })
1308
+ d({ type: String })
1304
1309
  ], l.prototype, "max", 2);
1305
1310
  n([
1306
- h({ type: String })
1311
+ d({ type: String })
1307
1312
  ], l.prototype, "label", 2);
1308
1313
  n([
1309
- h({ type: Boolean, reflect: !0 })
1314
+ d({ type: Boolean, reflect: !0 })
1310
1315
  ], l.prototype, "required", 2);
1311
1316
  n([
1312
- h({ type: Boolean, reflect: !0 })
1317
+ d({ type: Boolean, reflect: !0 })
1313
1318
  ], l.prototype, "disabled", 2);
1314
1319
  n([
1315
- h({ type: String })
1320
+ d({ type: String })
1316
1321
  ], l.prototype, "error", 2);
1317
1322
  n([
1318
- h({ type: String, attribute: "help-text" })
1323
+ d({ type: String, attribute: "help-text" })
1319
1324
  ], l.prototype, "helpText", 2);
1320
1325
  n([
1321
- h({ type: String })
1326
+ d({ type: String })
1322
1327
  ], l.prototype, "format", 2);
1323
1328
  n([
1324
- h({ type: String })
1329
+ d({ type: String })
1325
1330
  ], l.prototype, "locale", 2);
1326
1331
  n([
1327
- h({ type: String, attribute: "required-message" })
1332
+ d({ type: String, attribute: "required-message" })
1328
1333
  ], l.prototype, "requiredMessage", 2);
1329
1334
  n([
1330
- h({ type: String, attribute: "choose-date-label" })
1335
+ d({ type: String, attribute: "choose-date-label" })
1331
1336
  ], l.prototype, "chooseDateLabel", 2);
1332
1337
  n([
1333
- h({ type: String, attribute: "open-calendar-label" })
1338
+ d({ type: String, attribute: "open-calendar-label" })
1334
1339
  ], l.prototype, "openCalendarLabel", 2);
1335
1340
  n([
1336
- h({ type: String, attribute: "close-calendar-label" })
1341
+ d({ type: String, attribute: "close-calendar-label" })
1337
1342
  ], l.prototype, "closeCalendarLabel", 2);
1338
1343
  n([
1339
- h({ type: String, attribute: "previous-month-label" })
1344
+ d({ type: String, attribute: "previous-month-label" })
1340
1345
  ], l.prototype, "previousMonthLabel", 2);
1341
1346
  n([
1342
- h({ type: String, attribute: "next-month-label" })
1347
+ d({ type: String, attribute: "next-month-label" })
1343
1348
  ], l.prototype, "nextMonthLabel", 2);
1344
1349
  n([
1345
- h({ type: String, attribute: "accessible-label" })
1350
+ d({ type: String, attribute: "accessible-label" })
1346
1351
  ], l.prototype, "accessibleLabel", 2);
1347
1352
  n([
1348
1353
  _()
@@ -1398,4 +1403,4 @@ l = n([
1398
1403
  export {
1399
1404
  l as H
1400
1405
  };
1401
- //# sourceMappingURL=hx-date-picker-DSKDkCy1.js.map
1406
+ //# sourceMappingURL=hx-date-picker-0PtEav0K.js.map