@helixui/library 2.1.2-next.52 → 2.1.2-next.53

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 (469) hide show
  1. package/custom-elements.json +520 -468
  2. package/dist/base/helix-element.d.ts.map +1 -1
  3. package/dist/components/hx-accordion/hx-accordion-item.d.ts +0 -2
  4. package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
  5. package/dist/components/hx-accordion/hx-accordion-item.styles.d.ts.map +1 -1
  6. package/dist/components/hx-accordion/hx-accordion.styles.d.ts.map +1 -1
  7. package/dist/components/hx-accordion/index.js +1 -1
  8. package/dist/components/hx-alert/hx-alert.styles.d.ts.map +1 -1
  9. package/dist/components/hx-alert/index.js +1 -1
  10. package/dist/components/hx-badge/hx-badge.styles.d.ts.map +1 -1
  11. package/dist/components/hx-badge/index.js +1 -1
  12. package/dist/components/hx-banner/hx-banner.styles.d.ts.map +1 -1
  13. package/dist/components/hx-banner/index.js +1 -1
  14. package/dist/components/hx-breadcrumb/hx-breadcrumb-item.d.ts.map +1 -1
  15. package/dist/components/hx-breadcrumb/hx-breadcrumb-item.styles.d.ts.map +1 -1
  16. package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts +0 -7
  17. package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts.map +1 -1
  18. package/dist/components/hx-breadcrumb/index.js +1 -1
  19. package/dist/components/hx-button/hx-button.d.ts +9 -9
  20. package/dist/components/hx-button/hx-button.d.ts.map +1 -1
  21. package/dist/components/hx-button/hx-button.styles.d.ts.map +1 -1
  22. package/dist/components/hx-button/index.js +1 -1
  23. package/dist/components/hx-button-group/hx-button-group.d.ts +1 -4
  24. package/dist/components/hx-button-group/hx-button-group.d.ts.map +1 -1
  25. package/dist/components/hx-button-group/index.js +1 -1
  26. package/dist/components/hx-card/hx-card.d.ts +16 -0
  27. package/dist/components/hx-card/hx-card.d.ts.map +1 -1
  28. package/dist/components/hx-card/hx-card.styles.d.ts.map +1 -1
  29. package/dist/components/hx-card/index.js +1 -1
  30. package/dist/components/hx-carousel/hx-carousel.d.ts.map +1 -1
  31. package/dist/components/hx-carousel/hx-carousel.styles.d.ts.map +1 -1
  32. package/dist/components/hx-carousel/index.js +1 -1
  33. package/dist/components/hx-checkbox/hx-checkbox.d.ts +8 -0
  34. package/dist/components/hx-checkbox/hx-checkbox.d.ts.map +1 -1
  35. package/dist/components/hx-checkbox/hx-checkbox.styles.d.ts.map +1 -1
  36. package/dist/components/hx-checkbox/index.js +1 -1
  37. package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts +6 -8
  38. package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts.map +1 -1
  39. package/dist/components/hx-checkbox-group/hx-checkbox-group.styles.d.ts.map +1 -1
  40. package/dist/components/hx-checkbox-group/index.js +1 -1
  41. package/dist/components/hx-clinical-status/hx-clinical-status.styles.d.ts.map +1 -1
  42. package/dist/components/hx-clinical-status/index.js +1 -1
  43. package/dist/components/hx-code-snippet/hx-code-snippet.styles.d.ts.map +1 -1
  44. package/dist/components/hx-code-snippet/index.js +1 -1
  45. package/dist/components/hx-color-picker/hx-color-picker.styles.d.ts.map +1 -1
  46. package/dist/components/hx-color-picker/index.js +1 -1
  47. package/dist/components/hx-combobox/hx-combobox.d.ts +20 -14
  48. package/dist/components/hx-combobox/hx-combobox.d.ts.map +1 -1
  49. package/dist/components/hx-combobox/hx-combobox.styles.d.ts.map +1 -1
  50. package/dist/components/hx-combobox/index.js +1 -1
  51. package/dist/components/hx-copy-button/hx-copy-button.styles.d.ts.map +1 -1
  52. package/dist/components/hx-copy-button/index.js +1 -1
  53. package/dist/components/hx-counter/hx-counter.styles.d.ts.map +1 -1
  54. package/dist/components/hx-counter/index.js +1 -1
  55. package/dist/components/hx-data-table/hx-data-table.d.ts +20 -0
  56. package/dist/components/hx-data-table/hx-data-table.d.ts.map +1 -1
  57. package/dist/components/hx-data-table/hx-data-table.styles.d.ts.map +1 -1
  58. package/dist/components/hx-data-table/index.js +1 -1
  59. package/dist/components/hx-date-picker/hx-date-picker.d.ts +6 -17
  60. package/dist/components/hx-date-picker/hx-date-picker.d.ts.map +1 -1
  61. package/dist/components/hx-date-picker/index.js +1 -1
  62. package/dist/components/hx-dialog/hx-dialog.d.ts +7 -0
  63. package/dist/components/hx-dialog/hx-dialog.d.ts.map +1 -1
  64. package/dist/components/hx-dialog/hx-dialog.styles.d.ts.map +1 -1
  65. package/dist/components/hx-dialog/index.js +1 -1
  66. package/dist/components/hx-divider/hx-divider.styles.d.ts.map +1 -1
  67. package/dist/components/hx-divider/index.js +1 -1
  68. package/dist/components/hx-drawer/hx-drawer.d.ts +7 -0
  69. package/dist/components/hx-drawer/hx-drawer.d.ts.map +1 -1
  70. package/dist/components/hx-drawer/hx-drawer.styles.d.ts.map +1 -1
  71. package/dist/components/hx-drawer/index.js +1 -1
  72. package/dist/components/hx-dropdown/hx-dropdown.d.ts +8 -5
  73. package/dist/components/hx-dropdown/hx-dropdown.d.ts.map +1 -1
  74. package/dist/components/hx-dropdown/hx-dropdown.styles.d.ts.map +1 -1
  75. package/dist/components/hx-dropdown/index.js +1 -1
  76. package/dist/components/hx-field/hx-field.d.ts.map +1 -1
  77. package/dist/components/hx-field/hx-field.styles.d.ts.map +1 -1
  78. package/dist/components/hx-field/index.js +1 -1
  79. package/dist/components/hx-field-label/hx-field-label.styles.d.ts.map +1 -1
  80. package/dist/components/hx-field-label/index.js +1 -1
  81. package/dist/components/hx-file-upload/hx-file-upload.d.ts +6 -14
  82. package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
  83. package/dist/components/hx-file-upload/index.js +1 -1
  84. package/dist/components/hx-help-text/hx-help-text.styles.d.ts.map +1 -1
  85. package/dist/components/hx-help-text/index.js +1 -1
  86. package/dist/components/hx-icon/hx-icon.styles.d.ts.map +1 -1
  87. package/dist/components/hx-icon/index.js +1 -1
  88. package/dist/components/hx-icon-button/hx-icon-button.d.ts +10 -14
  89. package/dist/components/hx-icon-button/hx-icon-button.d.ts.map +1 -1
  90. package/dist/components/hx-icon-button/hx-icon-button.styles.d.ts.map +1 -1
  91. package/dist/components/hx-icon-button/index.js +1 -1
  92. package/dist/components/hx-image/hx-image.styles.d.ts.map +1 -1
  93. package/dist/components/hx-image/index.js +1 -1
  94. package/dist/components/hx-link/hx-link.styles.d.ts.map +1 -1
  95. package/dist/components/hx-link/index.js +1 -1
  96. package/dist/components/hx-menu/hx-menu-divider.styles.d.ts.map +1 -1
  97. package/dist/components/hx-menu/hx-menu-item.styles.d.ts.map +1 -1
  98. package/dist/components/hx-menu/hx-menu.styles.d.ts.map +1 -1
  99. package/dist/components/hx-menu/index.js +1 -1
  100. package/dist/components/hx-meter/hx-meter.d.ts +0 -2
  101. package/dist/components/hx-meter/hx-meter.d.ts.map +1 -1
  102. package/dist/components/hx-meter/hx-meter.styles.d.ts.map +1 -1
  103. package/dist/components/hx-meter/index.js +1 -1
  104. package/dist/components/hx-nav/hx-nav.styles.d.ts.map +1 -1
  105. package/dist/components/hx-nav/index.js +1 -1
  106. package/dist/components/hx-number-input/hx-number-input.d.ts +6 -8
  107. package/dist/components/hx-number-input/hx-number-input.d.ts.map +1 -1
  108. package/dist/components/hx-number-input/hx-number-input.styles.d.ts.map +1 -1
  109. package/dist/components/hx-number-input/index.js +1 -1
  110. package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts.map +1 -1
  111. package/dist/components/hx-overflow-menu/hx-overflow-menu.styles.d.ts.map +1 -1
  112. package/dist/components/hx-overflow-menu/index.js +1 -1
  113. package/dist/components/hx-patient-banner/hx-patient-banner.styles.d.ts.map +1 -1
  114. package/dist/components/hx-patient-banner/index.js +1 -1
  115. package/dist/components/hx-popover/hx-popover.d.ts +1 -0
  116. package/dist/components/hx-popover/hx-popover.d.ts.map +1 -1
  117. package/dist/components/hx-popover/hx-popover.styles.d.ts.map +1 -1
  118. package/dist/components/hx-popover/index.js +1 -1
  119. package/dist/components/hx-popup/hx-popup.styles.d.ts.map +1 -1
  120. package/dist/components/hx-popup/index.js +1 -1
  121. package/dist/components/hx-progress-bar/hx-progress-bar.d.ts +0 -2
  122. package/dist/components/hx-progress-bar/hx-progress-bar.d.ts.map +1 -1
  123. package/dist/components/hx-progress-bar/index.js +1 -1
  124. package/dist/components/hx-radio-group/hx-radio-group.d.ts +6 -11
  125. package/dist/components/hx-radio-group/hx-radio-group.d.ts.map +1 -1
  126. package/dist/components/hx-radio-group/hx-radio-group.styles.d.ts.map +1 -1
  127. package/dist/components/hx-radio-group/hx-radio.d.ts.map +1 -1
  128. package/dist/components/hx-radio-group/hx-radio.styles.d.ts.map +1 -1
  129. package/dist/components/hx-radio-group/index.js +1 -1
  130. package/dist/components/hx-rating/hx-rating.d.ts +6 -11
  131. package/dist/components/hx-rating/hx-rating.d.ts.map +1 -1
  132. package/dist/components/hx-rating/hx-rating.styles.d.ts.map +1 -1
  133. package/dist/components/hx-rating/index.js +1 -1
  134. package/dist/components/hx-select/hx-select.d.ts +8 -0
  135. package/dist/components/hx-select/hx-select.d.ts.map +1 -1
  136. package/dist/components/hx-select/hx-select.styles.d.ts.map +1 -1
  137. package/dist/components/hx-select/index.js +1 -1
  138. package/dist/components/hx-side-nav/hx-nav-item.d.ts +0 -3
  139. package/dist/components/hx-side-nav/hx-nav-item.d.ts.map +1 -1
  140. package/dist/components/hx-side-nav/hx-nav-item.styles.d.ts.map +1 -1
  141. package/dist/components/hx-side-nav/hx-side-nav.styles.d.ts.map +1 -1
  142. package/dist/components/hx-side-nav/index.js +1 -1
  143. package/dist/components/hx-skeleton/hx-skeleton.styles.d.ts.map +1 -1
  144. package/dist/components/hx-skeleton/index.js +1 -1
  145. package/dist/components/hx-slider/hx-slider.d.ts +9 -9
  146. package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
  147. package/dist/components/hx-slider/index.js +1 -1
  148. package/dist/components/hx-spinner/hx-spinner.styles.d.ts.map +1 -1
  149. package/dist/components/hx-spinner/index.js +1 -1
  150. package/dist/components/hx-split-button/hx-split-button.d.ts.map +1 -1
  151. package/dist/components/hx-split-button/hx-split-button.styles.d.ts.map +1 -1
  152. package/dist/components/hx-split-button/index.js +1 -1
  153. package/dist/components/hx-split-panel/hx-split-panel.styles.d.ts.map +1 -1
  154. package/dist/components/hx-split-panel/index.js +1 -1
  155. package/dist/components/hx-stat/hx-stat.d.ts +2 -2
  156. package/dist/components/hx-stat/hx-stat.d.ts.map +1 -1
  157. package/dist/components/hx-status-indicator/hx-status-indicator.styles.d.ts.map +1 -1
  158. package/dist/components/hx-status-indicator/index.js +1 -1
  159. package/dist/components/hx-steps/hx-step.styles.d.ts.map +1 -1
  160. package/dist/components/hx-steps/index.js +1 -1
  161. package/dist/components/hx-structured-list/hx-structured-list.styles.d.ts.map +1 -1
  162. package/dist/components/hx-structured-list/index.js +1 -1
  163. package/dist/components/hx-switch/hx-switch.d.ts +14 -17
  164. package/dist/components/hx-switch/hx-switch.d.ts.map +1 -1
  165. package/dist/components/hx-switch/hx-switch.styles.d.ts.map +1 -1
  166. package/dist/components/hx-switch/index.js +1 -1
  167. package/dist/components/hx-table/hx-table.styles.d.ts.map +1 -1
  168. package/dist/components/hx-table/index.js +1 -1
  169. package/dist/components/hx-tabs/hx-tab-panel.styles.d.ts.map +1 -1
  170. package/dist/components/hx-tabs/hx-tab.styles.d.ts.map +1 -1
  171. package/dist/components/hx-tabs/hx-tabs.d.ts +6 -0
  172. package/dist/components/hx-tabs/hx-tabs.d.ts.map +1 -1
  173. package/dist/components/hx-tabs/hx-tabs.styles.d.ts.map +1 -1
  174. package/dist/components/hx-tabs/index.js +1 -1
  175. package/dist/components/hx-tag/hx-tag.styles.d.ts.map +1 -1
  176. package/dist/components/hx-tag/index.js +1 -1
  177. package/dist/components/hx-text-input/hx-text-input.d.ts +11 -0
  178. package/dist/components/hx-text-input/hx-text-input.d.ts.map +1 -1
  179. package/dist/components/hx-text-input/hx-text-input.styles.d.ts.map +1 -1
  180. package/dist/components/hx-text-input/index.js +1 -1
  181. package/dist/components/hx-textarea/hx-textarea.d.ts +17 -9
  182. package/dist/components/hx-textarea/hx-textarea.d.ts.map +1 -1
  183. package/dist/components/hx-textarea/hx-textarea.styles.d.ts.map +1 -1
  184. package/dist/components/hx-textarea/index.js +1 -1
  185. package/dist/components/hx-time-picker/hx-time-picker.d.ts +6 -17
  186. package/dist/components/hx-time-picker/hx-time-picker.d.ts.map +1 -1
  187. package/dist/components/hx-time-picker/index.js +1 -1
  188. package/dist/components/hx-toast/hx-toast.styles.d.ts.map +1 -1
  189. package/dist/components/hx-toast/index.js +1 -1
  190. package/dist/components/hx-toggle-button/hx-toggle-button.d.ts +6 -13
  191. package/dist/components/hx-toggle-button/hx-toggle-button.d.ts.map +1 -1
  192. package/dist/components/hx-toggle-button/hx-toggle-button.styles.d.ts.map +1 -1
  193. package/dist/components/hx-toggle-button/index.js +1 -1
  194. package/dist/components/hx-tooltip/hx-tooltip.d.ts.map +1 -1
  195. package/dist/components/hx-tooltip/hx-tooltip.styles.d.ts.map +1 -1
  196. package/dist/components/hx-tooltip/index.js +1 -1
  197. package/dist/components/hx-top-nav/hx-top-nav.styles.d.ts.map +1 -1
  198. package/dist/components/hx-top-nav/index.js +1 -1
  199. package/dist/components/hx-tree-view/hx-tree-item.styles.d.ts.map +1 -1
  200. package/dist/components/hx-tree-view/index.js +1 -1
  201. package/dist/css/helix-all.css +1268 -10
  202. package/dist/css/helix-core.css +137 -1
  203. package/dist/css/helix-data.css +69 -0
  204. package/dist/css/helix-feedback.css +77 -0
  205. package/dist/css/helix-forms.css +627 -3
  206. package/dist/css/helix-layout.css +22 -0
  207. package/dist/css/helix-media.css +24 -0
  208. package/dist/css/helix-navigation.css +110 -0
  209. package/dist/css/helix-overlay.css +87 -0
  210. package/dist/css/helix-utility.css +66 -0
  211. package/dist/css/hx-accordion.css +8 -0
  212. package/dist/css/hx-alert.css +21 -0
  213. package/dist/css/hx-badge.css +16 -0
  214. package/dist/css/hx-banner.css +17 -0
  215. package/dist/css/hx-button.css +4 -1
  216. package/dist/css/hx-card.css +12 -0
  217. package/dist/css/hx-carousel.css +24 -0
  218. package/dist/css/hx-checkbox-group.css +32 -0
  219. package/dist/css/hx-checkbox.css +66 -0
  220. package/dist/css/hx-clinical-status.css +23 -0
  221. package/dist/css/hx-code-snippet.css +22 -0
  222. package/dist/css/hx-color-picker.css +1 -1
  223. package/dist/css/hx-combobox.css +1 -1
  224. package/dist/css/hx-copy-button.css +28 -0
  225. package/dist/css/hx-counter.css +3 -0
  226. package/dist/css/hx-data-table.css +23 -0
  227. package/dist/css/hx-dialog.css +21 -0
  228. package/dist/css/hx-divider.css +8 -0
  229. package/dist/css/hx-drawer.css +21 -0
  230. package/dist/css/hx-dropdown.css +9 -0
  231. package/dist/css/hx-field-label.css +16 -0
  232. package/dist/css/hx-field.css +36 -0
  233. package/dist/css/hx-help-text.css +20 -0
  234. package/dist/css/hx-icon-button.css +27 -0
  235. package/dist/css/hx-icon.css +8 -0
  236. package/dist/css/hx-image.css +8 -0
  237. package/dist/css/hx-link.css +18 -0
  238. package/dist/css/hx-menu.css +9 -0
  239. package/dist/css/hx-meter.css +13 -0
  240. package/dist/css/hx-nav.css +16 -0
  241. package/dist/css/hx-number-input.css +78 -0
  242. package/dist/css/hx-overflow-menu.css +31 -0
  243. package/dist/css/hx-patient-banner.css +20 -0
  244. package/dist/css/hx-popover.css +12 -0
  245. package/dist/css/hx-popup.css +12 -0
  246. package/dist/css/hx-radio-group.css +32 -0
  247. package/dist/css/hx-rating.css +39 -0
  248. package/dist/css/hx-select.css +82 -0
  249. package/dist/css/hx-side-nav.css +21 -0
  250. package/dist/css/hx-skeleton.css +12 -0
  251. package/dist/css/hx-spinner.css +12 -0
  252. package/dist/css/hx-split-button.css +35 -0
  253. package/dist/css/hx-split-panel.css +14 -0
  254. package/dist/css/hx-status-indicator.css +13 -0
  255. package/dist/css/hx-structured-list.css +16 -0
  256. package/dist/css/hx-switch.css +62 -0
  257. package/dist/css/hx-table.css +8 -0
  258. package/dist/css/hx-tabs.css +12 -0
  259. package/dist/css/hx-tag.css +12 -0
  260. package/dist/css/hx-text-input.css +62 -0
  261. package/dist/css/hx-textarea.css +62 -0
  262. package/dist/css/hx-toast.css +13 -0
  263. package/dist/css/hx-toggle-button.css +38 -1
  264. package/dist/css/hx-tooltip.css +12 -0
  265. package/dist/css/hx-top-nav.css +21 -0
  266. package/dist/css/index.css +1 -1
  267. package/dist/css/manifest.json +4 -3
  268. package/dist/index.js +65 -65
  269. package/dist/mixins/aria-delegation.d.ts +3 -1
  270. package/dist/mixins/aria-delegation.d.ts.map +1 -1
  271. package/dist/mixins/index.d.ts +1 -1
  272. package/dist/mixins/index.d.ts.map +1 -1
  273. package/dist/shared/{aria-delegation-CBP9eQ0M.js → aria-delegation-Doq6RRUy.js} +6 -6
  274. package/dist/shared/aria-delegation-Doq6RRUy.js.map +1 -0
  275. package/dist/shared/{helix-element-CZvaIEQP.js → helix-element-BJh1Ffvi.js} +18 -21
  276. package/dist/shared/{helix-element-CZvaIEQP.js.map → helix-element-BJh1Ffvi.js.map} +1 -1
  277. package/dist/shared/{hx-accordion-CpfO0YQo.js → hx-accordion-SlwR2C6S.js} +109 -62
  278. package/dist/shared/hx-accordion-SlwR2C6S.js.map +1 -0
  279. package/dist/shared/{hx-alert-CHOjTBds.js → hx-alert-DdlSyJGk.js} +22 -1
  280. package/dist/shared/hx-alert-DdlSyJGk.js.map +1 -0
  281. package/dist/shared/{hx-badge-RPzd-t5l.js → hx-badge-B_PzGlUo.js} +17 -1
  282. package/dist/shared/hx-badge-B_PzGlUo.js.map +1 -0
  283. package/dist/shared/{hx-banner-B-WEDiq7.js → hx-banner-D8AxkCfc.js} +30 -13
  284. package/dist/shared/hx-banner-D8AxkCfc.js.map +1 -0
  285. package/dist/shared/{hx-breadcrumb-item-jLAKK038.js → hx-breadcrumb-item-BCUIvpYX.js} +32 -15
  286. package/dist/shared/hx-breadcrumb-item-BCUIvpYX.js.map +1 -0
  287. package/dist/shared/{hx-button-DoN8jjQT.js → hx-button-BzqsDHmZ.js} +15 -16
  288. package/dist/shared/hx-button-BzqsDHmZ.js.map +1 -0
  289. package/dist/shared/{hx-button-group-BXlMQTt_.js → hx-button-group-a5Pb_9fU.js} +8 -9
  290. package/dist/shared/{hx-button-group-BXlMQTt_.js.map → hx-button-group-a5Pb_9fU.js.map} +1 -1
  291. package/dist/shared/{hx-card-BgXZXDuc.js → hx-card-DYlaxQy0.js} +59 -33
  292. package/dist/shared/hx-card-DYlaxQy0.js.map +1 -0
  293. package/dist/shared/{hx-carousel-item-Dwt9Pphz.js → hx-carousel-item-KQfCekKF.js} +45 -19
  294. package/dist/shared/hx-carousel-item-KQfCekKF.js.map +1 -0
  295. package/dist/shared/{hx-checkbox-C82GjRXe.js → hx-checkbox-DyDbR1B9.js} +97 -31
  296. package/dist/shared/hx-checkbox-DyDbR1B9.js.map +1 -0
  297. package/dist/shared/{hx-checkbox-group-DThZeN5d.js → hx-checkbox-group-C8TaFqy0.js} +75 -40
  298. package/dist/shared/hx-checkbox-group-C8TaFqy0.js.map +1 -0
  299. package/dist/shared/{hx-clinical-status-BjtT5c0M.js → hx-clinical-status-dDyk5oj1.js} +53 -30
  300. package/dist/shared/hx-clinical-status-dDyk5oj1.js.map +1 -0
  301. package/dist/shared/{hx-code-snippet-DcVENSuC.js → hx-code-snippet-DasrRF9k.js} +27 -5
  302. package/dist/shared/hx-code-snippet-DasrRF9k.js.map +1 -0
  303. package/dist/shared/{hx-color-picker-C6EIuS9t.js → hx-color-picker-zv6wtok4.js} +81 -81
  304. package/dist/shared/hx-color-picker-zv6wtok4.js.map +1 -0
  305. package/dist/shared/{hx-combobox-BJ4lQocO.js → hx-combobox-C-DVLFpu.js} +36 -45
  306. package/dist/shared/hx-combobox-C-DVLFpu.js.map +1 -0
  307. package/dist/shared/{hx-copy-button-BoM0WsMd.js → hx-copy-button-DikpbhWY.js} +54 -26
  308. package/dist/shared/hx-copy-button-DikpbhWY.js.map +1 -0
  309. package/dist/shared/{hx-counter-B5NgKlw4.js → hx-counter-_m4cq45V.js} +21 -18
  310. package/dist/shared/hx-counter-_m4cq45V.js.map +1 -0
  311. package/dist/shared/{hx-data-table-D5Ne-goy.js → hx-data-table-609C-e9w.js} +215 -150
  312. package/dist/shared/hx-data-table-609C-e9w.js.map +1 -0
  313. package/dist/shared/{hx-date-picker-Cd3I3WkX.js → hx-date-picker-Bh8410Sf.js} +26 -35
  314. package/dist/shared/hx-date-picker-Bh8410Sf.js.map +1 -0
  315. package/dist/shared/{hx-dialog-D4ubstxx.js → hx-dialog-D_DeqcNS.js} +46 -25
  316. package/dist/shared/hx-dialog-D_DeqcNS.js.map +1 -0
  317. package/dist/shared/{hx-divider-BBtOLHRP.js → hx-divider-lfOMElo2.js} +18 -10
  318. package/dist/shared/hx-divider-lfOMElo2.js.map +1 -0
  319. package/dist/shared/{hx-drawer--WDLuWtS.js → hx-drawer-NleCbKuN.js} +95 -60
  320. package/dist/shared/hx-drawer-NleCbKuN.js.map +1 -0
  321. package/dist/shared/{hx-dropdown-n5-XSmiV.js → hx-dropdown-CA9WYdhm.js} +37 -27
  322. package/dist/shared/hx-dropdown-CA9WYdhm.js.map +1 -0
  323. package/dist/shared/{hx-field-CwT9tki1.js → hx-field-Duiib9Bj.js} +48 -12
  324. package/dist/shared/hx-field-Duiib9Bj.js.map +1 -0
  325. package/dist/shared/{hx-field-label-CcOK9VU3.js → hx-field-label-Dud-psvE.js} +37 -21
  326. package/dist/shared/hx-field-label-Dud-psvE.js.map +1 -0
  327. package/dist/shared/{hx-file-upload-Di_vpQaG.js → hx-file-upload-CmCCAvej.js} +24 -33
  328. package/dist/shared/hx-file-upload-CmCCAvej.js.map +1 -0
  329. package/dist/shared/{hx-help-text-Bmb80bP4.js → hx-help-text-DARi-Pfp.js} +37 -17
  330. package/dist/shared/hx-help-text-DARi-Pfp.js.map +1 -0
  331. package/dist/shared/{hx-icon-button-CJuy9xbw.js → hx-icon-button-BcZtVVtH.js} +58 -41
  332. package/dist/shared/hx-icon-button-BcZtVVtH.js.map +1 -0
  333. package/dist/shared/{hx-icon-BKHs3OLu.js → hx-icon-jWcGmn66.js} +9 -1
  334. package/dist/shared/hx-icon-jWcGmn66.js.map +1 -0
  335. package/dist/shared/{hx-image-ztiXumZB.js → hx-image-DOjPp-K5.js} +28 -20
  336. package/dist/shared/hx-image-DOjPp-K5.js.map +1 -0
  337. package/dist/shared/{hx-link-CN7AvGOW.js → hx-link-DCBct0f4.js} +44 -26
  338. package/dist/shared/hx-link-DCBct0f4.js.map +1 -0
  339. package/dist/shared/{hx-menu-divider-DRT8yHRZ.js → hx-menu-divider-DVWER7iT.js} +93 -50
  340. package/dist/shared/hx-menu-divider-DVWER7iT.js.map +1 -0
  341. package/dist/shared/{hx-meter-BcVC9yrt.js → hx-meter-ChZdWNF2.js} +42 -28
  342. package/dist/shared/hx-meter-ChZdWNF2.js.map +1 -0
  343. package/dist/shared/{hx-nav-l0Rp7WPW.js → hx-nav-CHX1JOWB.js} +28 -12
  344. package/dist/shared/hx-nav-CHX1JOWB.js.map +1 -0
  345. package/dist/shared/{hx-nav-item-CJN4VDrf.js → hx-nav-item-CRAESq9s.js} +56 -22
  346. package/dist/shared/hx-nav-item-CRAESq9s.js.map +1 -0
  347. package/dist/shared/{hx-number-input-0Waw7Z7u.js → hx-number-input-Cm682AVP.js} +154 -72
  348. package/dist/shared/hx-number-input-Cm682AVP.js.map +1 -0
  349. package/dist/shared/{hx-overflow-menu-DElwFSCd.js → hx-overflow-menu-BDl6QfUD.js} +52 -19
  350. package/dist/shared/hx-overflow-menu-BDl6QfUD.js.map +1 -0
  351. package/dist/shared/{hx-patient-banner-BKiN7nIE.js → hx-patient-banner-B4IjHeTx.js} +54 -34
  352. package/dist/shared/hx-patient-banner-B4IjHeTx.js.map +1 -0
  353. package/dist/shared/{hx-popover-CydNuVkT.js → hx-popover-ZGRFgBbx.js} +29 -15
  354. package/dist/shared/hx-popover-ZGRFgBbx.js.map +1 -0
  355. package/dist/shared/{hx-popup-DbzezTOd.js → hx-popup-Cc4qz89i.js} +24 -12
  356. package/dist/shared/hx-popup-Cc4qz89i.js.map +1 -0
  357. package/dist/shared/{hx-progress-bar-Cm0VihTN.js → hx-progress-bar-BY1uE6bN.js} +17 -16
  358. package/dist/shared/hx-progress-bar-BY1uE6bN.js.map +1 -0
  359. package/dist/shared/{hx-radio-f8c5ggHG.js → hx-radio-YEEsbUPN.js} +139 -54
  360. package/dist/shared/hx-radio-YEEsbUPN.js.map +1 -0
  361. package/dist/shared/{hx-rating-qRJZXskm.js → hx-rating-DjUJTT0M.js} +54 -17
  362. package/dist/shared/hx-rating-DjUJTT0M.js.map +1 -0
  363. package/dist/shared/{hx-select-CgcgsHU5.js → hx-select-DZ7wfcJx.js} +119 -37
  364. package/dist/shared/hx-select-DZ7wfcJx.js.map +1 -0
  365. package/dist/shared/{hx-skeleton-tiYvKO-t.js → hx-skeleton-aqa-gr1S.js} +28 -16
  366. package/dist/shared/hx-skeleton-aqa-gr1S.js.map +1 -0
  367. package/dist/shared/{hx-slider-BvXtvxmN.js → hx-slider-DAilFrR_.js} +28 -25
  368. package/dist/shared/hx-slider-DAilFrR_.js.map +1 -0
  369. package/dist/shared/{hx-spinner-D6nzuGmj.js → hx-spinner-Dw3cRY-9.js} +26 -14
  370. package/dist/shared/hx-spinner-Dw3cRY-9.js.map +1 -0
  371. package/dist/shared/{hx-split-button-CPndTJlC.js → hx-split-button-Dk-zMDDo.js} +51 -14
  372. package/dist/shared/hx-split-button-Dk-zMDDo.js.map +1 -0
  373. package/dist/shared/{hx-split-panel-Dx72NaET.js → hx-split-panel-Kdp4BiLz.js} +15 -1
  374. package/dist/shared/hx-split-panel-Kdp4BiLz.js.map +1 -0
  375. package/dist/shared/hx-stat-DKlyBL_K.js.map +1 -1
  376. package/dist/shared/{hx-status-indicator-ClWpK6zz.js → hx-status-indicator-DWSM0Ctm.js} +30 -17
  377. package/dist/shared/hx-status-indicator-DWSM0Ctm.js.map +1 -0
  378. package/dist/shared/{hx-step-C2Jk4mHa.js → hx-step-CuoOvcI8.js} +52 -18
  379. package/dist/shared/{hx-step-C2Jk4mHa.js.map → hx-step-CuoOvcI8.js.map} +1 -1
  380. package/dist/shared/{hx-structured-list-DKlrv7kS.js → hx-structured-list-CQCD7bCT.js} +21 -5
  381. package/dist/shared/hx-structured-list-CQCD7bCT.js.map +1 -0
  382. package/dist/shared/{hx-switch-BzMN37PV.js → hx-switch-BdxKN9WM.js} +89 -32
  383. package/dist/shared/hx-switch-BdxKN9WM.js.map +1 -0
  384. package/dist/shared/{hx-tab-panel-J58zOSjq.js → hx-tab-panel-CwClQoWP.js} +141 -88
  385. package/dist/shared/hx-tab-panel-CwClQoWP.js.map +1 -0
  386. package/dist/shared/{hx-tag-F0ZcYj9b.js → hx-tag-BL5qJJCN.js} +20 -8
  387. package/dist/shared/hx-tag-BL5qJJCN.js.map +1 -0
  388. package/dist/shared/{hx-td-CNCvzBwY.js → hx-td-CzSvVKdp.js} +21 -13
  389. package/dist/shared/hx-td-CzSvVKdp.js.map +1 -0
  390. package/dist/shared/{hx-text-input-Zuodg9s_.js → hx-text-input-BfMrvN9N.js} +110 -48
  391. package/dist/shared/hx-text-input-BfMrvN9N.js.map +1 -0
  392. package/dist/shared/{hx-textarea-BfSJJtA1.js → hx-textarea-C-i_Vam6.js} +108 -47
  393. package/dist/shared/hx-textarea-C-i_Vam6.js.map +1 -0
  394. package/dist/shared/{hx-time-picker-CZvmihHD.js → hx-time-picker-MZyLQPW9.js} +50 -61
  395. package/dist/shared/hx-time-picker-MZyLQPW9.js.map +1 -0
  396. package/dist/shared/{hx-toggle-button-BZUQUULm.js → hx-toggle-button-ClyNYNVI.js} +68 -37
  397. package/dist/shared/hx-toggle-button-ClyNYNVI.js.map +1 -0
  398. package/dist/shared/{hx-tooltip-Ny4i1Idj.js → hx-tooltip-ByWT987R.js} +33 -19
  399. package/dist/shared/hx-tooltip-ByWT987R.js.map +1 -0
  400. package/dist/shared/{hx-top-nav-CC4FW2Hp.js → hx-top-nav-k7hY78kt.js} +35 -14
  401. package/dist/shared/hx-top-nav-k7hY78kt.js.map +1 -0
  402. package/dist/shared/{hx-tree-item-CPQ9dJiK.js → hx-tree-item-D0ZphA45.js} +9 -1
  403. package/dist/shared/hx-tree-item-D0ZphA45.js.map +1 -0
  404. package/dist/shared/{toast-factory-CEMNOt1T.js → toast-factory-Cwd0PihS.js} +49 -36
  405. package/dist/shared/toast-factory-Cwd0PihS.js.map +1 -0
  406. package/package.json +2 -2
  407. package/dist/shared/aria-delegation-CBP9eQ0M.js.map +0 -1
  408. package/dist/shared/hx-accordion-CpfO0YQo.js.map +0 -1
  409. package/dist/shared/hx-alert-CHOjTBds.js.map +0 -1
  410. package/dist/shared/hx-badge-RPzd-t5l.js.map +0 -1
  411. package/dist/shared/hx-banner-B-WEDiq7.js.map +0 -1
  412. package/dist/shared/hx-breadcrumb-item-jLAKK038.js.map +0 -1
  413. package/dist/shared/hx-button-DoN8jjQT.js.map +0 -1
  414. package/dist/shared/hx-card-BgXZXDuc.js.map +0 -1
  415. package/dist/shared/hx-carousel-item-Dwt9Pphz.js.map +0 -1
  416. package/dist/shared/hx-checkbox-C82GjRXe.js.map +0 -1
  417. package/dist/shared/hx-checkbox-group-DThZeN5d.js.map +0 -1
  418. package/dist/shared/hx-clinical-status-BjtT5c0M.js.map +0 -1
  419. package/dist/shared/hx-code-snippet-DcVENSuC.js.map +0 -1
  420. package/dist/shared/hx-color-picker-C6EIuS9t.js.map +0 -1
  421. package/dist/shared/hx-combobox-BJ4lQocO.js.map +0 -1
  422. package/dist/shared/hx-copy-button-BoM0WsMd.js.map +0 -1
  423. package/dist/shared/hx-counter-B5NgKlw4.js.map +0 -1
  424. package/dist/shared/hx-data-table-D5Ne-goy.js.map +0 -1
  425. package/dist/shared/hx-date-picker-Cd3I3WkX.js.map +0 -1
  426. package/dist/shared/hx-dialog-D4ubstxx.js.map +0 -1
  427. package/dist/shared/hx-divider-BBtOLHRP.js.map +0 -1
  428. package/dist/shared/hx-drawer--WDLuWtS.js.map +0 -1
  429. package/dist/shared/hx-dropdown-n5-XSmiV.js.map +0 -1
  430. package/dist/shared/hx-field-CwT9tki1.js.map +0 -1
  431. package/dist/shared/hx-field-label-CcOK9VU3.js.map +0 -1
  432. package/dist/shared/hx-file-upload-Di_vpQaG.js.map +0 -1
  433. package/dist/shared/hx-help-text-Bmb80bP4.js.map +0 -1
  434. package/dist/shared/hx-icon-BKHs3OLu.js.map +0 -1
  435. package/dist/shared/hx-icon-button-CJuy9xbw.js.map +0 -1
  436. package/dist/shared/hx-image-ztiXumZB.js.map +0 -1
  437. package/dist/shared/hx-link-CN7AvGOW.js.map +0 -1
  438. package/dist/shared/hx-menu-divider-DRT8yHRZ.js.map +0 -1
  439. package/dist/shared/hx-meter-BcVC9yrt.js.map +0 -1
  440. package/dist/shared/hx-nav-item-CJN4VDrf.js.map +0 -1
  441. package/dist/shared/hx-nav-l0Rp7WPW.js.map +0 -1
  442. package/dist/shared/hx-number-input-0Waw7Z7u.js.map +0 -1
  443. package/dist/shared/hx-overflow-menu-DElwFSCd.js.map +0 -1
  444. package/dist/shared/hx-patient-banner-BKiN7nIE.js.map +0 -1
  445. package/dist/shared/hx-popover-CydNuVkT.js.map +0 -1
  446. package/dist/shared/hx-popup-DbzezTOd.js.map +0 -1
  447. package/dist/shared/hx-progress-bar-Cm0VihTN.js.map +0 -1
  448. package/dist/shared/hx-radio-f8c5ggHG.js.map +0 -1
  449. package/dist/shared/hx-rating-qRJZXskm.js.map +0 -1
  450. package/dist/shared/hx-select-CgcgsHU5.js.map +0 -1
  451. package/dist/shared/hx-skeleton-tiYvKO-t.js.map +0 -1
  452. package/dist/shared/hx-slider-BvXtvxmN.js.map +0 -1
  453. package/dist/shared/hx-spinner-D6nzuGmj.js.map +0 -1
  454. package/dist/shared/hx-split-button-CPndTJlC.js.map +0 -1
  455. package/dist/shared/hx-split-panel-Dx72NaET.js.map +0 -1
  456. package/dist/shared/hx-status-indicator-ClWpK6zz.js.map +0 -1
  457. package/dist/shared/hx-structured-list-DKlrv7kS.js.map +0 -1
  458. package/dist/shared/hx-switch-BzMN37PV.js.map +0 -1
  459. package/dist/shared/hx-tab-panel-J58zOSjq.js.map +0 -1
  460. package/dist/shared/hx-tag-F0ZcYj9b.js.map +0 -1
  461. package/dist/shared/hx-td-CNCvzBwY.js.map +0 -1
  462. package/dist/shared/hx-text-input-Zuodg9s_.js.map +0 -1
  463. package/dist/shared/hx-textarea-BfSJJtA1.js.map +0 -1
  464. package/dist/shared/hx-time-picker-CZvmihHD.js.map +0 -1
  465. package/dist/shared/hx-toggle-button-BZUQUULm.js.map +0 -1
  466. package/dist/shared/hx-tooltip-Ny4i1Idj.js.map +0 -1
  467. package/dist/shared/hx-top-nav-CC4FW2Hp.js.map +0 -1
  468. package/dist/shared/hx-tree-item-CPQ9dJiK.js.map +0 -1
  469. package/dist/shared/toast-factory-CEMNOt1T.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-file-upload-CmCCAvej.js","sources":["../../src/components/hx-file-upload/hx-file-upload.styles.ts","../../src/components/hx-file-upload/hx-file-upload.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixFileUploadStyles = css`\n :host {\n display: block;\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 .field {\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-2, 0.5rem);\n font-family: var(--hx-font-family-sans, sans-serif);\n }\n\n /* ─── Label ─── */\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-color-neutral-700, #343a40);\n line-height: var(--hx-line-height-normal, 1.5);\n }\n\n /* ─── Dropzone ─── */\n\n .dropzone {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--hx-space-2, 0.5rem);\n min-height: var(--hx-space-32, 8rem);\n padding: var(--hx-space-6, 1.5rem) var(--hx-space-4, 1rem);\n border: var(--hx-border-width-thin, 1px) dashed\n var(--hx-file-upload-dropzone-border-color, var(--hx-color-neutral-300, #ced4da));\n border-radius: var(--hx-file-upload-dropzone-border-radius, var(--hx-border-radius-lg, 0.5rem));\n background-color: var(--hx-file-upload-dropzone-bg, var(--hx-color-neutral-50, #f8f9fa));\n cursor: pointer;\n text-align: center;\n transition:\n border-color var(--hx-transition-fast, 150ms ease),\n background-color var(--hx-transition-fast, 150ms ease),\n box-shadow var(--hx-transition-fast, 150ms ease);\n user-select: none;\n color: var(--hx-color-neutral-600, #495057);\n font-size: var(--hx-font-size-sm, 0.875rem);\n }\n\n .dropzone:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(\n --hx-file-upload-focus-ring-color,\n var(--hx-focus-ring-color, var(--hx-color-primary-500))\n );\n outline-offset: var(--hx-focus-ring-offset, 2px);\n border-color: var(\n --hx-file-upload-focus-ring-color,\n var(--hx-focus-ring-color, var(--hx-color-primary-500))\n );\n }\n\n .dropzone--drag-over {\n border-color: var(--hx-color-primary-500, #2563eb);\n background-color: var(\n --hx-file-upload-dropzone-active-bg,\n color-mix(\n in srgb,\n var(--hx-color-primary-500, #2563eb) 8%,\n var(--hx-color-neutral-0, #ffffff)\n )\n );\n border-style: solid;\n }\n\n .dropzone--error {\n border-color: var(--hx-file-upload-error-color, var(--hx-color-error-500, #dc3545));\n }\n\n @media (prefers-reduced-motion: reduce) {\n .dropzone {\n transition: none;\n }\n }\n\n /* ─── Hidden file input ─── */\n\n .file-input {\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 /* ─── File list ─── */\n\n .file-list {\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-2, 0.5rem);\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .file-list:empty {\n display: none;\n }\n\n /* ─── File item ─── */\n\n .file-item {\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-1, 0.25rem);\n padding: var(--hx-space-2, 0.5rem) var(--hx-space-3, 0.75rem);\n border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-200, #e9ecef);\n border-radius: var(--hx-border-radius-md, 0.375rem);\n background-color: var(--hx-color-neutral-0, #ffffff);\n }\n\n .file-item__row {\n display: flex;\n align-items: center;\n gap: var(--hx-space-2, 0.5rem);\n }\n\n .file-item__name {\n flex: 1;\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-weight: var(--hx-font-weight-medium, 500);\n color: var(--hx-color-neutral-800, #212529);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .file-item__size {\n flex-shrink: 0;\n font-size: var(--hx-font-size-xs, 0.75rem);\n color: var(--hx-color-neutral-500, #6c757d);\n }\n\n .file-item__remove {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 44px;\n min-height: 44px;\n padding: var(--hx-space-1, 0.25rem);\n border: none;\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n background: transparent;\n color: var(--hx-color-neutral-500, #6c757d);\n cursor: pointer;\n line-height: 1;\n transition:\n color var(--hx-transition-fast, 150ms ease),\n background-color var(--hx-transition-fast, 150ms ease);\n }\n\n .file-item__remove:hover {\n color: var(--hx-file-upload-error-color, var(--hx-color-error-text, #b91c1c));\n background-color: color-mix(in srgb, var(--hx-color-error-500, #dc3545) 8%, transparent);\n }\n\n .file-item__remove:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(\n --hx-file-upload-focus-ring-color,\n var(--hx-focus-ring-color, var(--hx-color-primary-500))\n );\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .file-item__remove {\n transition: none;\n }\n }\n\n /* ─── Progress bar ─── */\n\n .progress-track {\n width: 100%;\n height: var(--hx-file-upload-progress-height, var(--hx-space-1, 0.25rem));\n background-color: var(--hx-color-neutral-200, #e9ecef);\n border-radius: var(--hx-border-radius-full, 9999px);\n overflow: hidden;\n }\n\n .progress-bar {\n height: 100%;\n width: 100%;\n background-color: var(--hx-file-upload-progress-color, var(--hx-color-primary-500, #2563eb));\n border-radius: inherit;\n transform-origin: left center;\n transform: scaleX(var(--_progress-ratio, 0));\n transition: transform var(--hx-transition-fast, 150ms ease);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .progress-bar {\n transition: none;\n }\n }\n\n /* ─── Screen-reader only utility ─── */\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 /* ─── Error message ─── */\n\n .field__error {\n font-size: var(--hx-font-size-xs, 0.75rem);\n color: var(--hx-file-upload-error-color, var(--hx-color-error-text, #b91c1c));\n line-height: var(--hx-line-height-normal, 1.5);\n }\n\n /* ─── Forced colors (Windows High Contrast / Forced Colors Mode) ─── */\n\n @media (forced-colors: active) {\n .dropzone {\n border: 2px dashed ButtonText;\n background-color: Canvas;\n color: ButtonText;\n }\n\n .dropzone--drag-over {\n border: 2px solid Highlight;\n outline: none;\n background-color: Canvas;\n }\n\n .dropzone--error {\n border: 2px solid LinkText;\n }\n\n .dropzone:focus-visible {\n outline: 2px solid Highlight;\n outline-offset: 2px;\n }\n\n .progress-bar {\n background: Highlight;\n forced-color-adjust: none;\n }\n\n .file-item__remove:hover {\n outline: 2px solid Highlight;\n background-color: transparent;\n color: ButtonText;\n }\n\n .file-item__remove:focus-visible {\n outline: 2px solid Highlight;\n }\n\n :host([disabled]) .dropzone {\n border-color: GrayText;\n color: GrayText;\n opacity: 1;\n }\n }\n`;\n","import { html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { HelixElement, createIdCounter } from '../../base/index.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport { mixinDelegatesAria } from '../../mixins/index.js';\nimport { helixFileUploadStyles } from './hx-file-upload.styles.js';\n\nconst _nextFileUploadId = createIdCounter('hx-file-upload');\n\ninterface FileEntry {\n file: File;\n progress: number;\n}\n\n/**\n * A drag-and-drop file upload component with client-side validation,\n * file list management, per-file progress, and native form association.\n *\n * @summary Form-associated file upload dropzone with drag-and-drop, validation, and progress tracking.\n *\n * @tag hx-file-upload\n *\n * @slot - Default dropzone content. Replaces the built-in \"Drag files here or click to browse\" prompt.\n * @slot file-list - Custom file list display. When provided, the built-in file list is hidden.\n *\n * @fires {CustomEvent<{files: File[]}>} hx-upload - Dispatched when valid files are selected via drag-and-drop or the file picker.\n * @fires {CustomEvent<{file: File, index: number}>} hx-remove - Dispatched when a file is removed from the list.\n * @fires {CustomEvent<{message: string, files: File[]}>} hx-error - Dispatched when file validation fails (type or size constraint).\n *\n * @csspart dropzone - The drag-and-drop target area.\n * @csspart file-list - The container wrapping the list of selected files.\n * @csspart file-item - An individual file entry in the list.\n * @csspart progress - The progress bar track for a file item.\n * @csspart label - The visible label element.\n * @csspart error - The error message container below the dropzone.\n *\n * @cssprop [--hx-file-upload-dropzone-bg=var(--hx-color-neutral-50)] - Dropzone background color.\n * @cssprop [--hx-file-upload-dropzone-border-color=var(--hx-color-neutral-300)] - Dropzone border color.\n * @cssprop [--hx-file-upload-dropzone-border-radius=var(--hx-border-radius-lg)] - Dropzone border radius.\n * @cssprop [--hx-file-upload-dropzone-active-bg] - Dropzone background when a file is dragged over.\n * @cssprop [--hx-file-upload-progress-color=var(--hx-color-primary-500)] - Progress bar fill color.\n * @cssprop [--hx-file-upload-error-color=var(--hx-color-error-500)] - Error state and remove-button hover color.\n */\n@customElement('hx-file-upload')\nexport class HelixFileUpload extends mixinDelegatesAria(HelixElement) {\n static override styles = [helixFileUploadStyles];\n\n // ─── Form Association ───\n\n /** Marks this element as form-associated for ElementInternals support. @internal */\n static override formAssociated = true;\n\n // ─── Properties ───\n\n /**\n * The form field name used during form submission.\n * @attr name\n */\n @property({ type: String, reflect: true })\n name = '';\n\n /**\n * Accepted file types as a comma-separated list of MIME types or extensions.\n * Mirrors the native `<input type=\"file\" accept>` attribute.\n * @attr accept\n */\n @property({ type: String })\n accept = '';\n\n /**\n * Maximum allowed file size in bytes. 0 means unlimited.\n * @attr max-size\n */\n @property({ type: Number, attribute: 'max-size' })\n maxSize = 0;\n\n /**\n * Maximum number of files that can be selected. 0 means unlimited.\n * @attr max-files\n */\n @property({ type: Number, attribute: 'max-files' })\n maxFiles = 0;\n\n /**\n * Whether multiple files may be selected at once.\n * @attr multiple\n */\n @property({ type: Boolean })\n multiple = false;\n\n /**\n * Visible label text for the dropzone.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Whether the component is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Error message displayed below the dropzone. Also puts the dropzone in an error visual state.\n * @attr error\n */\n @property({ type: String })\n error = '';\n\n /**\n * Instructional text shown in the dropzone when no custom slot content is provided.\n * Also used as the accessible label for the dropzone.\n * @attr label-dropzone\n */\n @property({ type: String, attribute: 'label-dropzone' })\n labelDropzone = 'Drag files here or click to browse';\n\n /** Accessible label for the selected files list. */\n @property({ type: String, attribute: 'label-file-list' })\n labelFileList = 'Selected files';\n\n /**\n * Generates upload progress description for screen readers.\n * @param name - file name\n * @param progress - progress percentage 0-100\n */\n @property({ attribute: false })\n labelUploadProgress: (name: string, progress: number) => string = (name, progress) =>\n `Upload progress for ${name}: ${progress}%`;\n\n /**\n * Screen reader announcement when file drag detected. Override for i18n.\n * @attr label-drag-detected\n */\n @property({ attribute: 'label-drag-detected' })\n labelDragDetected = 'File detected. Release to upload.';\n\n // ─── Internal State ───\n\n /** The list of currently selected file entries, each with a file reference and upload progress. @internal */\n @state() private _files: FileEntry[] = [];\n /** Whether a file is currently being dragged over the dropzone. @internal */\n @state() private _dragOver = false;\n /** Whether the named file-list slot contains projected content. @internal */\n @state() private _hasFileListSlot = false;\n\n // ─── Internal References ───\n\n /** Reference to the hidden native file input element used to open the OS file picker. @internal */\n @query('.file-input')\n private _fileInput: HTMLInputElement | null | undefined;\n\n // ─── Stable IDs ───\n\n /** @internal */\n private readonly _baseId = _nextFileUploadId();\n /** @internal */\n private readonly _labelId = `${this._baseId}-label`;\n /** @internal */\n private readonly _errorId = `${this._baseId}-error`;\n /** @internal */\n private readonly _dropzoneId = `${this._baseId}-dropzone`;\n /** @internal */\n private readonly _liveId = `${this._baseId}-live`;\n\n // ─── Slot Handling ───\n\n /** @internal */\n private _handleFileListSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasFileListSlot = slot.assignedElements({ flatten: true }).length > 0;\n }\n\n // ─── Lifecycle ───\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('_files' as keyof HelixFileUpload) || changedProperties.has('name')) {\n this._syncFormValue();\n }\n }\n\n // ─── Form Integration ───\n\n /** Checks whether the component satisfies its constraints. */\n checkValidity(): boolean {\n return this._internals.checkValidity();\n }\n\n /** Reports validity and shows the browser's constraint validation UI. */\n reportValidity(): boolean {\n return this._internals.reportValidity();\n }\n\n /** @internal */\n protected override _onFormReset(): void {\n this._files = [];\n this._internals.setFormValue(null);\n }\n\n /** @internal */\n protected override _onFormDisabled(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n /** @internal */\n protected override _onFormStateRestore(\n _state: File | string | FormData | null,\n _mode: 'restore' | 'autocomplete',\n ): void {\n if (_mode === 'restore' || _mode === 'autocomplete') {\n this._files = [];\n this._internals.setFormValue(null);\n }\n }\n\n /** @internal */\n private _syncFormValue(): void {\n if (this._files.length === 0) {\n this._internals.setFormValue(null);\n return;\n }\n\n if (this._files.length === 1) {\n // Single file — pass directly as File (accepted by setFormValue)\n const firstEntry = this._files[0];\n if (firstEntry) {\n this._internals.setFormValue(firstEntry.file);\n }\n return;\n }\n\n // Multiple files — use FormData so all files are submitted under the same name\n const formData = new FormData();\n for (const entry of this._files) {\n formData.append(this.name, entry.file, entry.file.name);\n }\n this._internals.setFormValue(formData);\n }\n\n // ─── Validation ───\n\n /**\n * Validates a file against `accept` and `maxSize` constraints.\n * Returns null on success, or an error message string on failure.\n */\n /** @internal */\n private _validateFile(file: File): string | null {\n if (this.accept) {\n const accepted = this._isAccepted(file);\n if (!accepted) {\n return `\"${file.name}\" has an unsupported file type. Accepted types: ${this.accept}`;\n }\n }\n\n if (this.maxSize > 0 && file.size > this.maxSize) {\n const maxMb = (this.maxSize / (1024 * 1024)).toFixed(1);\n return `\"${file.name}\" exceeds the maximum size of ${maxMb} MB.`;\n }\n\n return null;\n }\n\n /**\n * Checks whether a file is accepted given the `accept` attribute value.\n * Handles MIME types (e.g. \"image/png\"), wildcard MIME types (e.g. \"image/*\"),\n * and extensions (e.g. \".pdf\").\n */\n /** @internal */\n private _isAccepted(file: File): boolean {\n const tokens = this.accept.split(',').map((t) => t.trim().toLowerCase());\n\n for (const token of tokens) {\n if (token.startsWith('.')) {\n // Extension match\n if (file.name.toLowerCase().endsWith(token)) return true;\n } else if (token.endsWith('/*')) {\n // Wildcard MIME type e.g. \"image/*\"\n const baseType = token.slice(0, -2);\n if (file.type.toLowerCase().startsWith(baseType)) return true;\n } else {\n // Exact MIME type\n if (file.type.toLowerCase() === token) return true;\n }\n }\n\n return false;\n }\n\n // ─── File Processing ───\n\n /** @internal */\n private _processFiles(rawFiles: File[]): void {\n if (this.disabled) return;\n\n const candidateFiles = this.multiple ? rawFiles : rawFiles.slice(0, 1);\n const validFiles: File[] = [];\n const invalidFiles: File[] = [];\n const errorMessages: string[] = [];\n\n for (const file of candidateFiles) {\n const validationError = this._validateFile(file);\n if (validationError) {\n invalidFiles.push(file);\n errorMessages.push(validationError);\n } else {\n validFiles.push(file);\n }\n }\n\n if (invalidFiles.length > 0) {\n this.dispatchEvent(\n new CustomEvent<{ message: string; files: File[] }>('hx-error', {\n bubbles: true,\n composed: true,\n detail: { message: errorMessages.join(' '), files: invalidFiles },\n }),\n );\n }\n\n if (validFiles.length === 0) return;\n\n // Enforce maxFiles limit (only in multiple mode — single-file mode always replaces)\n const currentCount = this.multiple ? this._files.length : 0;\n const capacity =\n this.maxFiles > 0 ? Math.max(0, this.maxFiles - currentCount) : validFiles.length;\n const allowedFiles = validFiles.slice(0, capacity);\n\n if (allowedFiles.length === 0 && this.maxFiles > 0) {\n this.dispatchEvent(\n new CustomEvent<{ message: string; files: File[] }>('hx-error', {\n bubbles: true,\n composed: true,\n detail: {\n message: `Maximum of ${this.maxFiles} file${this.maxFiles === 1 ? '' : 's'} allowed.`,\n files: validFiles,\n },\n }),\n );\n return;\n }\n\n if (allowedFiles.length > 0) {\n const newEntries: FileEntry[] = allowedFiles.map((file) => ({ file, progress: 0 }));\n\n if (this.multiple) {\n this._files = [...this._files, ...newEntries];\n } else {\n this._files = newEntries;\n }\n\n this.dispatchEvent(\n new CustomEvent<{ files: File[] }>('hx-upload', {\n bubbles: true,\n composed: true,\n detail: { files: allowedFiles },\n }),\n );\n }\n\n // If remaining valid files were cut by maxFiles, report that too\n const overflow = validFiles.slice(capacity);\n if (overflow.length > 0 && this.maxFiles > 0) {\n this.dispatchEvent(\n new CustomEvent<{ message: string; files: File[] }>('hx-error', {\n bubbles: true,\n composed: true,\n detail: {\n message: `Maximum of ${this.maxFiles} file${this.maxFiles === 1 ? '' : 's'} allowed. ${overflow.length} file${overflow.length === 1 ? ' was' : 's were'} not added.`,\n files: overflow,\n },\n }),\n );\n }\n }\n\n // ─── Public Methods ───\n\n /**\n * Sets the upload progress for a file at the given index.\n * @param index - Zero-based index into the current file list.\n * @param percent - Progress percentage from 0 to 100.\n */\n setProgress(index: number, percent: number): void {\n if (index < 0 || index >= this._files.length) return;\n const clamped = Math.max(0, Math.min(100, percent));\n this._files = this._files.map((entry, i) =>\n i === index ? { ...entry, progress: clamped } : entry,\n );\n }\n\n /**\n * Returns a read-only copy of the currently selected files.\n */\n get files(): File[] {\n return this._files.map((e) => e.file);\n }\n\n // ─── Drag and Drop Handlers ───\n\n /** @internal */\n private _handleDragOver(e: DragEvent): void {\n e.preventDefault();\n if (this.disabled) return;\n this._dragOver = true;\n }\n\n /** @internal */\n private _handleDragLeave(e: DragEvent): void {\n // Only clear drag state when leaving the dropzone entirely\n const target = e.relatedTarget as Node | null;\n if (target && this.contains(target)) return;\n const dropzone = this.shadowRoot?.querySelector('.dropzone');\n if (dropzone && dropzone.contains(target)) return;\n this._dragOver = false;\n }\n\n /** @internal */\n private _handleDrop(e: DragEvent): void {\n e.preventDefault();\n this._dragOver = false;\n if (this.disabled) return;\n\n const dt = e.dataTransfer;\n if (!dt) return;\n\n const rawFiles = Array.from(dt.files);\n if (rawFiles.length === 0) return;\n\n this._processFiles(rawFiles);\n }\n\n // ─── Click / Keyboard Handlers ───\n\n /** @internal */\n private _handleDropzoneClick(): void {\n if (this.disabled) return;\n this._fileInput?.click();\n }\n\n /** @internal */\n private _handleDropzoneKeyDown(e: KeyboardEvent): void {\n if (this.disabled) return;\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this._fileInput?.click();\n }\n }\n\n /** @internal */\n private _handleFileInputChange(e: Event): void {\n const input = e.target as HTMLInputElement;\n if (!input.files || input.files.length === 0) return;\n\n const rawFiles = Array.from(input.files);\n // Reset the input so the same file can be re-selected after removal\n input.value = '';\n this._processFiles(rawFiles);\n }\n\n // ─── Remove Handler ───\n\n /** @internal */\n private _handleRemove(index: number): void {\n if (this.disabled) return;\n const entry = this._files[index];\n if (!entry) return;\n\n const removedFile = entry.file;\n this._files = this._files.filter((_, i) => i !== index);\n\n this.dispatchEvent(\n new CustomEvent<{ file: File; index: number }>('hx-remove', {\n bubbles: true,\n composed: true,\n detail: { file: removedFile, index },\n }),\n );\n\n // Restore focus after removal so keyboard users are not stranded.\n this.updateComplete\n .then(() => {\n if (this._files.length === 0) {\n // List is now empty — return focus to the dropzone.\n const dropzone = this.shadowRoot?.querySelector<HTMLElement>('[part=\"dropzone\"]');\n dropzone?.focus();\n } else {\n // Focus the remove button at the same position, or the previous one if\n // the removed item was the last in the list.\n const removeButtons =\n this.shadowRoot?.querySelectorAll<HTMLButtonElement>('.file-item__remove');\n if (removeButtons && removeButtons.length > 0) {\n const targetIndex = index < this._files.length ? index : this._files.length - 1;\n const targetButton = removeButtons[targetIndex];\n if (targetButton) {\n targetButton.focus();\n }\n }\n }\n })\n .catch(() => {\n // Focus restoration is best-effort; ignore errors.\n });\n }\n\n // ─── Formatters ───\n\n /** @internal */\n private _formatSize(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n }\n\n // ─── Render Helpers ───\n\n /** @internal */\n private _renderFileList() {\n if (this._hasFileListSlot) return nothing;\n if (this._files.length === 0) return nothing;\n\n return html`\n <ul part=\"file-list\" class=\"file-list\" aria-label=${this.labelFileList}>\n ${repeat(\n this._files,\n (entry) => entry.file.name + entry.file.size,\n (entry, index) => html`\n <li part=\"file-item\" class=\"file-item\">\n <div class=\"file-item__row\">\n <span class=\"file-item__name\" title=${entry.file.name}> ${entry.file.name} </span>\n <span class=\"file-item__size\">${this._formatSize(entry.file.size)}</span>\n <button\n type=\"button\"\n class=\"file-item__remove\"\n aria-label=${`Remove ${entry.file.name}`}\n @click=${() => this._handleRemove(index)}\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path\n d=\"M1 1L13 13M13 1L1 13\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n </div>\n <div\n part=\"progress\"\n class=\"progress-track\"\n role=\"progressbar\"\n aria-valuenow=${entry.progress}\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-label=${this.labelUploadProgress(entry.file.name, entry.progress)}\n >\n <div\n class=\"progress-bar\"\n style=\"--_progress-ratio: ${String(entry.progress / 100)}\"\n ></div>\n </div>\n </li>\n `,\n )}\n </ul>\n `;\n }\n\n // ─── Render ───\n\n override render() {\n const hasError = !!this.error;\n\n const dropzoneClasses = {\n dropzone: true,\n 'dropzone--drag-over': this._dragOver,\n 'dropzone--error': hasError,\n };\n\n const dropzoneLabel = this.label ? `${this.label} — ${this.labelDropzone}` : this.labelDropzone;\n\n return html`\n <div class=\"field\">\n ${this.label\n ? html`\n <label part=\"label\" class=\"field__label\" id=${this._labelId} for=${this._dropzoneId}>\n ${this.label}\n </label>\n `\n : nothing}\n\n <div\n part=\"dropzone\"\n class=${classMap(dropzoneClasses)}\n id=${this._dropzoneId}\n role=\"button\"\n tabindex=${this.disabled ? '-1' : '0'}\n aria-label=${ifDefined(!this.label ? (this.ariaLabel ?? dropzoneLabel) : undefined)}\n aria-labelledby=${ifDefined(this.label ? this._labelId : undefined)}\n aria-disabled=${this.disabled ? 'true' : nothing}\n aria-invalid=${hasError ? 'true' : nothing}\n aria-describedby=${ifDefined(hasError ? this._errorId : undefined)}\n @click=${this._handleDropzoneClick}\n @keydown=${this._handleDropzoneKeyDown}\n @dragover=${this._handleDragOver}\n @dragleave=${this._handleDragLeave}\n @drop=${this._handleDrop}\n >\n <slot>${this.labelDropzone}</slot>\n </div>\n\n <input\n class=\"file-input\"\n type=\"file\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n accept=${ifDefined(this.accept || undefined)}\n ?multiple=${this.multiple}\n ?disabled=${this.disabled}\n @change=${this._handleFileInputChange}\n />\n\n <slot name=\"file-list\" @slotchange=${this._handleFileListSlotChange}></slot>\n\n ${this._renderFileList()}\n ${hasError\n ? html`\n <div part=\"error\" class=\"field__error\" id=${this._errorId} role=\"alert\">\n ${this.error}\n </div>\n `\n : nothing}\n\n <div id=${this._liveId} class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">\n ${this._dragOver ? this.labelDragDetected : ''}\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-file-upload': HelixFileUpload;\n }\n}\n"],"names":["helixFileUploadStyles","css","_nextFileUploadId","createIdCounter","HelixFileUpload","mixinDelegatesAria","HelixElement","name","progress","slot","changedProperties","disabled","_state","_mode","firstEntry","formData","entry","file","maxMb","tokens","token","baseType","rawFiles","candidateFiles","validFiles","invalidFiles","errorMessages","validationError","currentCount","capacity","allowedFiles","newEntries","overflow","index","percent","clamped","i","target","dropzone","_a","dt","input","removedFile","_","removeButtons","_b","targetIndex","targetButton","bytes","nothing","html","repeat","hasError","dropzoneClasses","dropzoneLabel","classMap","ifDefined","__decorateClass","property","state","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;AAAA;AAAA;AAAA;AAAA;AAAA;A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AAM,OAAA,CAAQ;AAAA,GAlDftD,EAmDX,WAAA,SAAA,CAAA;AAOAqD,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAzD/BtD,EA0DX,WAAA,YAAA,CAAA;AAOAqD,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAhEftD,EAiEX,WAAA,SAAA,CAAA;AAQAqD,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,kBAAkB;AAAA,GAxE5CtD,EAyEX,WAAA,iBAAA,CAAA;AAIAqD,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,mBAAmB;AAAA,GA5E7CtD,EA6EX,WAAA,iBAAA,CAAA;AAQAqD,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,GAAA,CAAO;AAAA,GApFnBtD,EAqFX,WAAA,uBAAA,CAAA;AAQAqD,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,sBAAA,CAAuB;AAAA,GA5FnCtD,EA6FX,WAAA,qBAAA,CAAA;AAKiBqD,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAlGIvD,EAkGM,WAAA,UAAA,CAAA;AAEAqD,EAAA;AAAA,EAAhBE,EAAA;AAAM,GApGIvD,EAoGM,WAAA,aAAA,CAAA;AAEAqD,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAtGIvD,EAsGM,WAAA,oBAAA,CAAA;AAMTqD,EAAA;AAAA,EADPG,EAAM,aAAa;AAAA,GA3GTxD,EA4GH,WAAA,cAAA,CAAA;AA5GGA,IAANqD,EAAA;AAAA,EADNI,EAAc,gBAAgB;AAAA,GAClBzD,CAAA;"}
@@ -1,7 +1,7 @@
1
- import { css as p, LitElement as v, nothing as c, html as n } from "lit";
1
+ import { css as p, LitElement as v, nothing as c, html as l } from "lit";
2
2
  import "./document-token-adoption-DuYNKd4k.js";
3
- import { property as f, customElement as u } from "lit/decorators.js";
4
- import { classMap as d } from "lit/directives/class-map.js";
3
+ import { property as f, customElement as d } from "lit/decorators.js";
4
+ import { classMap as u } from "lit/directives/class-map.js";
5
5
  import { ifDefined as h } from "lit/directives/if-defined.js";
6
6
  const m = p`
7
7
  :host {
@@ -53,13 +53,33 @@ const m = p`
53
53
  .help-text--success {
54
54
  --hx-help-text-color: var(--hx-color-success-700, #15803d);
55
55
  }
56
+
57
+ /* ─── High Contrast Mode (forced-colors) ─── */
58
+
59
+ @media (forced-colors: active) {
60
+ .help-text {
61
+ color: GrayText;
62
+ }
63
+
64
+ .help-text--error {
65
+ color: LinkText;
66
+ }
67
+
68
+ .help-text--warning {
69
+ color: CanvasText;
70
+ }
71
+
72
+ .help-text--success {
73
+ color: CanvasText;
74
+ }
75
+ }
56
76
  `;
57
- var g = Object.defineProperty, w = Object.getOwnPropertyDescriptor, x = (l, e, o, r) => {
58
- for (var t = r > 1 ? void 0 : r ? w(e, o) : e, s = l.length - 1, a; s >= 0; s--)
59
- (a = l[s]) && (t = (r ? a(e, o, t) : a(t)) || t);
77
+ var g = Object.defineProperty, w = Object.getOwnPropertyDescriptor, x = (n, e, o, r) => {
78
+ for (var t = r > 1 ? void 0 : r ? w(e, o) : e, s = n.length - 1, a; s >= 0; s--)
79
+ (a = n[s]) && (t = (r ? a(e, o, t) : a(t)) || t);
60
80
  return r && t && g(e, o, t), t;
61
81
  };
62
- const y = n`<svg viewBox="0 0 16 16" aria-hidden="true" width="1em" height="1em">
82
+ const y = l`<svg viewBox="0 0 16 16" aria-hidden="true" width="1em" height="1em">
63
83
  <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-width="1.5" fill="none" />
64
84
  <line
65
85
  x1="8"
@@ -71,7 +91,7 @@ const y = n`<svg viewBox="0 0 16 16" aria-hidden="true" width="1em" height="1em"
71
91
  stroke-linecap="round"
72
92
  />
73
93
  <circle cx="8" cy="11" r="0.75" fill="currentColor" />
74
- </svg>`, _ = n`<svg viewBox="0 0 16 16" aria-hidden="true" width="1em" height="1em">
94
+ </svg>`, k = l`<svg viewBox="0 0 16 16" aria-hidden="true" width="1em" height="1em">
75
95
  <path
76
96
  d="M7.134 2.5a1 1 0 011.732 0l5.196 9a1 1 0 01-.866 1.5H2.804a1 1 0 01-.866-1.5l5.196-9z"
77
97
  stroke="currentColor"
@@ -88,7 +108,7 @@ const y = n`<svg viewBox="0 0 16 16" aria-hidden="true" width="1em" height="1em"
88
108
  stroke-linecap="round"
89
109
  />
90
110
  <circle cx="8" cy="11" r="0.625" fill="currentColor" />
91
- </svg>`, k = n`<svg viewBox="0 0 16 16" aria-hidden="true" width="1em" height="1em">
111
+ </svg>`, _ = l`<svg viewBox="0 0 16 16" aria-hidden="true" width="1em" height="1em">
92
112
  <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-width="1.5" fill="none" />
93
113
  <path
94
114
  d="M5.25 8.25l1.75 1.75 3.75-3.75"
@@ -101,24 +121,24 @@ const y = n`<svg viewBox="0 0 16 16" aria-hidden="true" width="1em" height="1em"
101
121
  </svg>`, C = {
102
122
  default: c,
103
123
  error: y,
104
- warning: _,
105
- success: k
124
+ warning: k,
125
+ success: _
106
126
  };
107
127
  let i = class extends v {
108
128
  constructor() {
109
129
  super(...arguments), this.variant = "default";
110
130
  }
111
131
  render() {
112
- const l = {
132
+ const n = {
113
133
  "help-text": !0,
114
134
  [`help-text--${this.variant}`]: !0
115
135
  }, e = C[this.variant], o = this.variant === "error" ? "alert" : void 0, r = this.variant === "warning" || this.variant === "success" ? "polite" : void 0;
116
- return n`<span
136
+ return l`<span
117
137
  part="base"
118
- class=${d(l)}
138
+ class=${u(n)}
119
139
  role=${h(o)}
120
140
  aria-live=${h(r)}
121
- >${e !== c ? n`<span part="icon" class="help-text__icon">${e}</span>` : c}<span part="text" class="help-text__text"><slot></slot></span>
141
+ >${e !== c ? l`<span part="icon" class="help-text__icon">${e}</span>` : c}<span part="text" class="help-text__text"><slot></slot></span>
122
142
  </span>`;
123
143
  }
124
144
  };
@@ -127,9 +147,9 @@ x([
127
147
  f({ type: String, reflect: !0 })
128
148
  ], i.prototype, "variant", 2);
129
149
  i = x([
130
- u("hx-help-text")
150
+ d("hx-help-text")
131
151
  ], i);
132
152
  export {
133
153
  i as H
134
154
  };
135
- //# sourceMappingURL=hx-help-text-Bmb80bP4.js.map
155
+ //# sourceMappingURL=hx-help-text-DARi-Pfp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-help-text-DARi-Pfp.js","sources":["../../src/components/hx-help-text/hx-help-text.styles.ts","../../src/components/hx-help-text/hx-help-text.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixHelpTextStyles = css`\n :host {\n display: block;\n }\n\n .help-text {\n display: inline-flex;\n align-items: baseline;\n gap: var(--hx-help-text-icon-gap, 0.375rem);\n font-family: var(--hx-help-text-font-family, var(--hx-font-family-sans, sans-serif));\n font-size: var(--hx-help-text-font-size, var(--hx-font-size-sm, 0.875rem));\n font-weight: var(--hx-help-text-font-weight, var(--hx-font-weight-normal, 400));\n line-height: var(--hx-help-text-line-height, var(--hx-line-height-normal, 1.5));\n color: var(--hx-help-text-color, var(--hx-color-neutral-500, #6b7280));\n margin: 0;\n }\n\n .help-text__icon {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n }\n\n .help-text__text {\n min-width: 0;\n }\n\n /* ─── Variant: default ─── */\n\n .help-text--default {\n --hx-help-text-color: var(--hx-color-neutral-500, #6b7280);\n }\n\n /* ─── Variant: error ─── */\n\n .help-text--error {\n --hx-help-text-color: var(--hx-color-error-600, #dc2626);\n }\n\n /* ─── Variant: warning ─── */\n\n .help-text--warning {\n --hx-help-text-color: var(--hx-color-warning-700, #b45309);\n }\n\n /* ─── Variant: success ─── */\n\n .help-text--success {\n --hx-help-text-color: var(--hx-color-success-700, #15803d);\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n .help-text {\n color: GrayText;\n }\n\n .help-text--error {\n color: LinkText;\n }\n\n .help-text--warning {\n color: CanvasText;\n }\n\n .help-text--success {\n color: CanvasText;\n }\n }\n`;\n","import { LitElement, html, nothing } 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 { helixHelpTextStyles } from './hx-help-text.styles.js';\n\n/** Icon SVG for error variant (circle with exclamation mark). */\nconst errorIcon = html`<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\" width=\"1em\" height=\"1em\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" />\n <line\n x1=\"8\"\n y1=\"4.5\"\n x2=\"8\"\n y2=\"8.5\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <circle cx=\"8\" cy=\"11\" r=\"0.75\" fill=\"currentColor\" />\n</svg>`;\n\n/** Icon SVG for warning variant (triangle with exclamation mark). */\nconst warningIcon = html`<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\" width=\"1em\" height=\"1em\">\n <path\n d=\"M7.134 2.5a1 1 0 011.732 0l5.196 9a1 1 0 01-.866 1.5H2.804a1 1 0 01-.866-1.5l5.196-9z\"\n stroke=\"currentColor\"\n stroke-width=\"1.25\"\n fill=\"none\"\n />\n <line\n x1=\"8\"\n y1=\"6\"\n x2=\"8\"\n y2=\"9\"\n stroke=\"currentColor\"\n stroke-width=\"1.25\"\n stroke-linecap=\"round\"\n />\n <circle cx=\"8\" cy=\"11\" r=\"0.625\" fill=\"currentColor\" />\n</svg>`;\n\n/** Icon SVG for success variant (circle with checkmark). */\nconst successIcon = html`<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\" width=\"1em\" height=\"1em\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" />\n <path\n d=\"M5.25 8.25l1.75 1.75 3.75-3.75\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n fill=\"none\"\n />\n</svg>`;\n\n/** Map of variant to icon template. Default has no icon. */\nconst variantIcons = {\n default: nothing,\n error: errorIcon,\n warning: warningIcon,\n success: successIcon,\n} as const;\n\n/**\n * Standardized help/hint text displayed below form fields.\n * Used by hx-field as a consistent sub-component for guidance and validation messages.\n *\n * Non-default variants render an inline icon alongside the text to satisfy\n * WCAG 1.4.1 (color is not the sole visual indicator). The `error` variant\n * uses `role=\"alert\"` for immediate screen-reader announcement; `warning`\n * and `success` use `aria-live=\"polite\"` for non-intrusive announcements.\n *\n * @summary Help text displayed below form controls for guidance or validation feedback.\n *\n * @tag hx-help-text\n *\n * @slot - The help text content.\n *\n * @csspart base - The root element of the help text.\n * @csspart icon - The icon wrapper (only rendered for non-default variants).\n * @csspart text - The text wrapper around the default slot.\n *\n * @cssprop [--hx-help-text-color=var(--hx-color-neutral-500)] - Text color.\n * @cssprop [--hx-help-text-font-family=var(--hx-font-family-sans)] - Font family.\n * @cssprop [--hx-help-text-font-size=var(--hx-font-size-sm)] - Font size.\n * @cssprop [--hx-help-text-font-weight=var(--hx-font-weight-normal)] - Font weight.\n * @cssprop [--hx-help-text-line-height=var(--hx-line-height-normal)] - Line height.\n * @cssprop [--hx-help-text-icon-gap=0.375rem] - Gap between icon and text.\n */\n@customElement('hx-help-text')\nexport class HelixHelpText extends LitElement {\n static override styles = [helixHelpTextStyles];\n\n /**\n * Visual variant that determines the text color and icon.\n * Use `error` for validation errors, `warning` for cautions, `success` for confirmation.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'error' | 'warning' | 'success' = 'default';\n\n override render() {\n const classes = {\n 'help-text': true,\n [`help-text--${this.variant}`]: true,\n };\n\n const icon = variantIcons[this.variant];\n const role = this.variant === 'error' ? 'alert' : undefined;\n const ariaLive =\n this.variant === 'warning' || this.variant === 'success' ? 'polite' : undefined;\n\n return html`<span\n part=\"base\"\n class=${classMap(classes)}\n role=${ifDefined(role)}\n aria-live=${ifDefined(ariaLive)}\n >${icon !== nothing\n ? html`<span part=\"icon\" class=\"help-text__icon\">${icon}</span>`\n : nothing}<span part=\"text\" class=\"help-text__text\"><slot></slot></span>\n </span>`;\n }\n}\n\n/** Canonical type alias for the hx-help-text component. */\nexport type HxHelpText = HelixHelpText;\n\n/** @deprecated Use {@link HxHelpText} instead. The `Wc` prefix was a legacy naming convention. */\nexport type WcHelpText = HelixHelpText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-help-text': HelixHelpText;\n }\n}\n"],"names":["helixHelpTextStyles","css","errorIcon","html","warningIcon","successIcon","variantIcons","nothing","HelixHelpText","LitElement","classes","icon","role","ariaLive","classMap","ifDefined","__decorateClass","property","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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;ACMnC,MAAMC,IAAYC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAeZC,IAAcD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAoBdE,IAAcF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAadG,IAAe;AAAA,EACnB,SAASC;AAAA,EACT,OAAOL;AAAA,EACP,SAASE;AAAA,EACT,SAASC;AACX;AA6BO,IAAMG,IAAN,cAA4BC,EAAW;AAAA,EAAvC,cAAA;AAAA,UAAA,GAAA,SAAA,GASL,KAAA,UAAuD;AAAA,EAAA;AAAA,EAE9C,SAAS;AAChB,UAAMC,IAAU;AAAA,MACd,aAAa;AAAA,MACb,CAAC,cAAc,KAAK,OAAO,EAAE,GAAG;AAAA,IAAA,GAG5BC,IAAOL,EAAa,KAAK,OAAO,GAChCM,IAAO,KAAK,YAAY,UAAU,UAAU,QAC5CC,IACJ,KAAK,YAAY,aAAa,KAAK,YAAY,YAAY,WAAW;AAExE,WAAOV;AAAA;AAAA,cAEGW,EAASJ,CAAO,CAAC;AAAA,aAClBK,EAAUH,CAAI,CAAC;AAAA,kBACVG,EAAUF,CAAQ,CAAC;AAAA,SAC5BF,MAASJ,IACRJ,8CAAiDQ,CAAI,YACrDJ,CAAO;AAAA;AAAA,EAEf;AACF;AAhCaC,EACK,SAAS,CAACR,CAAmB;AAQ7CgB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAR9BT,EASX,WAAA,WAAA,CAAA;AATWA,IAANQ,EAAA;AAAA,EADNE,EAAc,cAAc;AAAA,GAChBV,CAAA;"}
@@ -1,9 +1,10 @@
1
- import { css as v, LitElement as p, html as c, nothing as u } from "lit";
1
+ import { css as x, html as c, nothing as u } from "lit";
2
2
  import "./document-token-adoption-DuYNKd4k.js";
3
- import { property as e, customElement as x } from "lit/decorators.js";
3
+ import { property as e, customElement as p } from "lit/decorators.js";
4
4
  import { classMap as d } from "lit/directives/class-map.js";
5
5
  import { ifDefined as b } from "lit/directives/if-defined.js";
6
- const m = v`
6
+ import { H as v } from "./helix-element-BJh1Ffvi.js";
7
+ const m = x`
7
8
  :host {
8
9
  display: inline-block;
9
10
  }
@@ -155,28 +156,44 @@ const m = v`
155
156
  transition: none;
156
157
  }
157
158
  }
159
+
160
+ /* ─── High Contrast Mode (forced-colors) ─── */
161
+
162
+ @media (forced-colors: active) {
163
+ .button {
164
+ forced-color-adjust: none;
165
+ background-color: ButtonFace;
166
+ color: ButtonText;
167
+ border: 2px solid ButtonText;
168
+ }
169
+
170
+ .button:focus-visible {
171
+ outline: 3px solid Highlight;
172
+ outline-offset: 2px;
173
+ }
174
+
175
+ .button[disabled] {
176
+ background-color: ButtonFace;
177
+ color: GrayText;
178
+ border-color: GrayText;
179
+ opacity: 1;
180
+ }
181
+
182
+ :host([disabled]) {
183
+ opacity: 1;
184
+ }
185
+ }
158
186
  `;
159
- var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor, o = (t, n, s, a) => {
187
+ var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor, r = (t, n, s, a) => {
160
188
  for (var i = a > 1 ? void 0 : a ? g(n, s) : n, h = t.length - 1, l; h >= 0; h--)
161
189
  (l = t[h]) && (i = (a ? l(n, s, i) : l(i)) || i);
162
190
  return a && i && f(n, s, i), i;
163
191
  };
164
- let r = class extends p {
192
+ let o = class extends v {
165
193
  constructor() {
166
- super(), this.label = "", this.variant = "ghost", this.size = "md", this.type = "button", this.disabled = !1, this.href = void 0, this.name = void 0, this.value = void 0, this._internals = this.attachInternals();
167
- }
168
- /** Returns the associated form element, if any. */
169
- get form() {
170
- return this._internals.form;
171
- }
172
- /** @internal */
173
- formResetCallback() {
174
- }
175
- /** @internal */
176
- formStateRestoreCallback(t, n) {
194
+ super(...arguments), this.label = "", this.variant = "ghost", this.size = "md", this.type = "button", this.disabled = !1, this.href = void 0, this.name = void 0, this.value = void 0;
177
195
  }
178
- /** @internal */
179
- formDisabledCallback(t) {
196
+ _onFormDisabled(t) {
180
197
  this.disabled = t;
181
198
  }
182
199
  // ─── Event Handling ───
@@ -244,36 +261,36 @@ let r = class extends p {
244
261
  ` : u;
245
262
  }
246
263
  };
247
- r.styles = [m];
248
- r.formAssociated = !0;
249
- o([
264
+ o.styles = [m];
265
+ o.formAssociated = !0;
266
+ r([
250
267
  e({ type: String })
251
- ], r.prototype, "label", 2);
252
- o([
268
+ ], o.prototype, "label", 2);
269
+ r([
253
270
  e({ type: String, reflect: !0 })
254
- ], r.prototype, "variant", 2);
255
- o([
271
+ ], o.prototype, "variant", 2);
272
+ r([
256
273
  e({ type: String, reflect: !0, attribute: "hx-size" })
257
- ], r.prototype, "size", 2);
258
- o([
274
+ ], o.prototype, "size", 2);
275
+ r([
259
276
  e({ type: String })
260
- ], r.prototype, "type", 2);
261
- o([
277
+ ], o.prototype, "type", 2);
278
+ r([
262
279
  e({ type: Boolean, reflect: !0 })
263
- ], r.prototype, "disabled", 2);
264
- o([
280
+ ], o.prototype, "disabled", 2);
281
+ r([
265
282
  e({ type: String })
266
- ], r.prototype, "href", 2);
267
- o([
283
+ ], o.prototype, "href", 2);
284
+ r([
268
285
  e({ type: String })
269
- ], r.prototype, "name", 2);
270
- o([
286
+ ], o.prototype, "name", 2);
287
+ r([
271
288
  e({ type: String })
272
- ], r.prototype, "value", 2);
273
- r = o([
274
- x("hx-icon-button")
275
- ], r);
289
+ ], o.prototype, "value", 2);
290
+ o = r([
291
+ p("hx-icon-button")
292
+ ], o);
276
293
  export {
277
- r as H
294
+ o as H
278
295
  };
279
- //# sourceMappingURL=hx-icon-button-CJuy9xbw.js.map
296
+ //# sourceMappingURL=hx-icon-button-BcZtVVtH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-icon-button-BcZtVVtH.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);\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: var(--hx-border-width-thin) solid var(--hx-icon-button-border-color);\n border-radius: var(--hx-icon-button-border-radius, var(--hx-border-radius-md));\n background-color: var(--hx-icon-button-bg);\n color: var(--hx-icon-button-color, var(--hx-color-primary-500));\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 }\n\n .button:focus-visible {\n outline: var(--hx-focus-ring-width) solid\n var(--hx-icon-button-focus-ring-color, var(--hx-focus-ring-color));\n outline-offset: var(--hx-focus-ring-offset);\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);\n width: var(--hx-icon-button-size, var(--hx-size-8));\n height: var(--hx-icon-button-size, var(--hx-size-8));\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 width: var(--hx-icon-button-size, var(--hx-size-10));\n height: var(--hx-icon-button-size, var(--hx-size-10));\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 width: var(--hx-icon-button-size, var(--hx-size-12));\n height: var(--hx-icon-button-size, var(--hx-size-12));\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);\n }\n\n /* ─── Style Variants ─── */\n\n .button--primary {\n --hx-icon-button-bg: var(--hx-color-primary-500);\n --hx-icon-button-color: var(--hx-color-neutral-0);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--primary:hover {\n --hx-icon-button-bg: var(--hx-color-primary-600);\n }\n\n .button--secondary {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-primary-500);\n --hx-icon-button-border-color: var(--hx-color-primary-500);\n }\n\n .button--secondary:hover {\n --hx-icon-button-bg: var(--hx-color-primary-50);\n }\n\n .button--tertiary {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-neutral-700);\n --hx-icon-button-border-color: var(--hx-color-neutral-300);\n }\n\n .button--tertiary:hover {\n --hx-icon-button-bg: var(--hx-color-neutral-100);\n }\n\n .button--danger {\n --hx-icon-button-bg: var(--hx-color-error-500);\n --hx-icon-button-color: var(--hx-color-neutral-0);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--danger:hover {\n --hx-icon-button-bg: var(--hx-color-error-600);\n }\n\n .button--ghost {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-primary-500);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--ghost:hover {\n --hx-icon-button-bg: var(--hx-color-neutral-100);\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 /* ─── 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 :host([disabled]) {\n opacity: 1;\n }\n }\n`;\n","import { html, nothing } 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 { helixIconButtonStyles } from './hx-icon-button.styles.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 *\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 */\n@customElement('hx-icon-button')\nexport class HelixIconButton extends HelixElement {\n static override styles = [helixIconButtonStyles];\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 * 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) {\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 };\n }\n\n /** @internal */\n private _iconSlot() {\n return html`<span part=\"icon\" class=\"icon\"><slot></slot></span>`;\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 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.\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 ? undefined : this.href)}\n aria-label=${normalizedLabel}\n title=${normalizedLabel}\n aria-disabled=${this.disabled ? 'true' : nothing}\n tabindex=${this.disabled ? '-1' : nothing}\n @click=${this._handleClick}\n >\n ${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 name=${ifDefined(this.name)}\n value=${ifDefined(this.value)}\n @click=${this._handleClick}\n >\n ${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","HelixElement","disabled","e","html","normalizedLabel","classMap","ifDefined","nothing","__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;AA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ast) ─── */
80
+
81
+ @media (forced-colors: active) {
82
+ :host {
83
+ color: CanvasText;
84
+ }
85
+ }
78
86
  `;
79
87
  var w = Object.defineProperty, z = Object.getOwnPropertyDescriptor, h = (e, i, r, o) => {
80
88
  for (var t = o > 1 ? void 0 : o ? z(i, r) : i, a = e.length - 1, c; a >= 0; a--)
@@ -237,4 +245,4 @@ const v = /* @__PURE__ */ new Map();
237
245
  export {
238
246
  s as H
239
247
  };
240
- //# sourceMappingURL=hx-icon-BKHs3OLu.js.map
248
+ //# sourceMappingURL=hx-icon-jWcGmn66.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-icon-jWcGmn66.js","sources":["../../src/components/hx-icon/hx-icon.styles.ts","../../src/components/hx-icon/hx-icon.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixIconStyles = css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n /* vertical-align: middle ensures the icon aligns to the visual centre of\n adjacent inline text rather than the text baseline. */\n vertical-align: middle;\n /* overflow: hidden prevents malformed or oversized icons from painting\n outside the component boundary. The inner SVG may still set\n overflow: visible for its own viewBox content. */\n overflow: hidden;\n width: var(--hx-icon-size, var(--hx-size-6, 1.5rem));\n height: var(--hx-icon-size, var(--hx-size-6, 1.5rem));\n color: var(--hx-icon-color, currentColor);\n flex-shrink: 0;\n }\n\n /* ─── Size Variants ───\n Fallback pixel values mirror the design token values at time of writing.\n If token values are updated the fallbacks should be updated to match. */\n\n :host([hx-size='xs']) {\n --hx-icon-size: var(--hx-size-4, 1rem);\n }\n\n :host([hx-size='sm']) {\n --hx-icon-size: var(--hx-size-5, 1.25rem);\n }\n\n :host([hx-size='md']) {\n --hx-icon-size: var(--hx-size-6, 1.5rem);\n }\n\n :host([hx-size='lg']) {\n --hx-icon-size: var(--hx-size-8, 2rem);\n }\n\n :host([hx-size='xl']) {\n --hx-icon-size: var(--hx-size-10, 2.5rem);\n }\n\n /* ─── SVG (sprite mode) ───\n In sprite mode [part=\"svg\"] is an actual <svg> element. The selector\n targets it specifically. In inline mode the part is applied to a <span>\n wrapper — see .icon__inline below. */\n\n svg[part='svg'] {\n width: 100%;\n height: 100%;\n fill: currentColor;\n display: block;\n overflow: visible;\n }\n\n /* ─── Inline SVG wrapper ───\n In inline mode [part=\"svg\"] is a <span> that wraps the fetched SVG.\n The inner <svg> is sized to fill the wrapper. */\n\n .icon__inline {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n .icon__inline svg {\n width: 100%;\n height: 100%;\n fill: currentColor;\n display: block;\n }\n\n /* ─── Forced Colors (Windows High Contrast) ─── */\n\n @media (forced-colors: active) {\n :host {\n color: CanvasText;\n }\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { helixIconStyles } from './hx-icon.styles.js';\n\n/**\n * An icon component that supports inline SVG fetching and SVG sprite sheet references.\n * Decorative icons are automatically hidden from assistive technology.\n * When a label is provided the icon is announced as an image with that label.\n *\n * **Render modes:**\n * - **Sprite mode** (recommended for Drupal/SSR): Set `name` and optionally `sprite-url`.\n * Renders an `<svg><use href=\"...#name\">` — works server-side without JavaScript.\n * - **Inline mode**: Set `src` to a URL of a standalone SVG file. The component fetches,\n * sanitizes, and embeds the SVG markup. Requires JavaScript; not server-side renderable.\n * For Drupal/Twig templates use sprite mode to avoid content shift before hydration.\n *\n * @summary SVG icon with sprite and inline fetch modes for healthcare applications.\n *\n * @tag hx-icon\n *\n * @csspart svg - The SVG element rendered in sprite mode, or the inline SVG container\n * in inline mode. In sprite mode this is an `<svg>` element; in inline mode it is a\n * `<span>` element wrapping the fetched SVG. Both expose the same `part` name for\n * consistent external styling via `::part(svg)`.\n *\n * @cssprop [--hx-icon-size=var(--hx-size-6,1.5rem)] - Width and height of the icon.\n * @cssprop [--hx-icon-color=currentColor] - Icon color.\n */\n@customElement('hx-icon')\nexport class HelixIcon extends LitElement {\n static override styles = [helixIconStyles];\n\n /**\n * Icon name used as the fragment identifier when referencing a sprite sheet.\n * For sprite mode provide the bare symbol id (e.g. `check`). The component\n * will build the full href as `${spriteUrl}#${name}`. If `name` already\n * starts with `#` it is used as-is (inline sprite reference without a base\n * URL).\n * @attr name\n */\n @property({ type: String })\n name = '';\n\n /**\n * URL of a standalone SVG file to fetch and render inline. Takes precedence\n * over sprite mode when both `src` and `spriteUrl`/`name` are set.\n *\n * **Note:** Inline mode requires browser JavaScript (`fetch` + `DOMParser`).\n * It is not server-side renderable. For Drupal/Twig use sprite mode instead.\n * @attr src\n */\n @property({ type: String })\n src: string | undefined = undefined;\n\n /**\n * Base URL of the SVG sprite sheet. Used together with `name` to construct\n * the `<use>` href: `${spriteUrl}#${name}`.\n * @attr sprite-url\n */\n @property({ type: String, attribute: 'sprite-url' })\n spriteUrl: string | undefined = undefined;\n\n /**\n * Size variant of the icon.\n *\n * Set via the `hx-size` HTML attribute (e.g. `hx-size=\"lg\"`) or via the\n * `size` JavaScript property (e.g. `el.size = 'lg'`). Both are equivalent —\n * the `attribute: 'hx-size'` mapping is used to avoid colliding with the\n * native `<input>` `size` attribute in Drupal attribute-passthrough scenarios.\n * The CEM exposes both the JS property name (`size`) and the HTML attribute\n * name (`hx-size`).\n *\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'md';\n\n /**\n * Accessible label for the icon. When non-empty, `role=\"img\"` and\n * `aria-label` are applied so assistive technology announces the icon.\n * When empty the icon is treated as decorative and `aria-hidden=\"true\"` is\n * applied.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Stores the sanitized inner markup of an externally fetched SVG.\n * @internal\n */\n @state()\n private _inlineSvg = '';\n\n /**\n * Tracks the `src` URL that was last successfully fetched so that we only\n * refetch when it genuinely changes.\n * @internal\n */\n @state()\n private _fetchedSrc: string | undefined = undefined;\n\n /**\n * Monotonically-increasing sequence number. Incremented before each fetch so\n * that stale out-of-order responses can be discarded.\n */\n /** @internal */\n private _fetchSeq = 0;\n\n // ─── Lifecycle ───\n\n override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n if (changed.has('src') && this.src !== this._fetchedSrc) {\n void this._fetchInlineSvg(this.src);\n }\n }\n\n // ─── Inline SVG Fetch ───\n\n /** @internal */\n private async _fetchInlineSvg(url: string | undefined): Promise<void> {\n const seq = ++this._fetchSeq;\n\n if (!url) {\n this._inlineSvg = '';\n this._fetchedSrc = undefined;\n return;\n }\n\n // Use module-level cache to avoid duplicate network requests for the same URL.\n // Multiple hx-icon instances sharing the same src will share one in-flight fetch.\n try {\n let pending = _svgCache.get(url);\n if (!pending) {\n pending = fetch(url).then(async (response) => {\n if (!response.ok) {\n _svgCache.delete(url);\n return '';\n }\n return response.text();\n });\n _svgCache.set(url, pending);\n }\n\n const text = await pending;\n if (seq !== this._fetchSeq) return;\n\n if (!text) {\n this._inlineSvg = '';\n this._fetchedSrc = undefined;\n return;\n }\n\n const sanitized = this._sanitizeSvg(text);\n this._inlineSvg = sanitized;\n this._fetchedSrc = url;\n } catch {\n if (seq !== this._fetchSeq) return;\n _svgCache.delete(url);\n this._inlineSvg = '';\n this._fetchedSrc = undefined;\n }\n }\n\n /**\n * Parses the raw SVG text, strips dangerous content (script elements,\n * foreignObject, on* event-handler attributes, javascript:/data: URIs,\n * and style attributes that could carry CSS injection payloads), and\n * returns the outer SVG markup safe for rendering via `unsafeHTML`.\n *\n * Additionally injects `focusable=\"false\"` on the root SVG element to\n * prevent IE11/old-Edge from making the SVG keyboard-focusable, and strips\n * any ARIA attributes from the inner SVG to prevent conflicts with the\n * wrapper's own ARIA semantics.\n */\n /** @internal */\n private _sanitizeSvg(raw: string): string {\n const parser = new DOMParser();\n const doc = parser.parseFromString(raw, 'image/svg+xml');\n\n const parseError = doc.querySelector('parsererror');\n if (parseError) {\n return '';\n }\n\n const svgEl = doc.querySelector('svg');\n if (!svgEl) {\n return '';\n }\n\n // Remove dangerous embedded elements.\n svgEl.querySelectorAll('script, foreignObject').forEach((s) => {\n s.remove();\n });\n\n // URL-bearing attributes that can carry javascript:/data: payloads.\n const urlAttrs = new Set(['href', 'xlink:href', 'src', 'action', 'formaction']);\n\n // ARIA attributes that may conflict with the wrapper element's own semantics.\n // The wrapper <span part=\"svg\"> owns role/aria-label/aria-hidden — the inner\n // SVG must not duplicate or contradict these.\n const ariaAttrs = new Set(['role', 'aria-label', 'aria-labelledby', 'aria-hidden']);\n\n // Sanitize every element including the root svg.\n const allElements: Element[] = [svgEl, ...Array.from(svgEl.querySelectorAll('*'))];\n allElements.forEach((el) => {\n const attrs = Array.from(el.attributes);\n attrs.forEach((attr) => {\n const attrName = attr.name.toLowerCase();\n // Strip event-handler attributes.\n if (attrName.startsWith('on')) {\n el.removeAttribute(attr.name);\n return;\n }\n // Strip style attributes — CSS can carry injection payloads via\n // url(javascript:...), expression(), or external filter/clip-path references.\n if (attrName === 'style') {\n el.removeAttribute(attr.name);\n return;\n }\n // Strip javascript: and data: URIs from URL-bearing attributes.\n if (urlAttrs.has(attrName)) {\n const val = attr.value.replace(/\\s/g, '').toLowerCase();\n if (val.startsWith('javascript:') || val.startsWith('data:')) {\n el.removeAttribute(attr.name);\n }\n }\n });\n });\n\n // Strip ARIA attributes from the root SVG only — they conflict with the\n // wrapper element's ARIA. Child elements' ARIA is left intact.\n ariaAttrs.forEach((a) => svgEl.removeAttribute(a));\n\n // Inject focusable=\"false\" so IE11/old-Edge do not tab into the SVG.\n svgEl.setAttribute('focusable', 'false');\n\n return svgEl.outerHTML;\n }\n\n // ─── Render Helpers ───\n\n /**\n * Returns the href used in the `<use>` element for sprite mode.\n * If `name` already begins with `#` it is treated as an inline reference.\n */\n /** @internal */\n private _spriteHref(): string {\n const n = this.name;\n if (n.startsWith('#')) {\n return n;\n }\n const base = this.spriteUrl ?? '';\n return base ? `${base}#${n}` : `#${n}`;\n }\n\n /** @internal */\n private _renderSprite() {\n const isDecorative = !this.label.trim();\n\n return html`\n <svg\n part=\"svg\"\n class=\"icon__svg\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=${isDecorative ? nothing : 'img'}\n aria-label=${isDecorative ? nothing : this.label}\n aria-hidden=${isDecorative ? 'true' : nothing}\n focusable=\"false\"\n >\n ${isDecorative ? nothing : html`<title>${this.label}</title>`}\n <use href=${this._spriteHref()}></use>\n </svg>\n `;\n }\n\n /** @internal */\n private _renderInline() {\n if (!this._inlineSvg) {\n return nothing;\n }\n\n const isDecorative = !this.label.trim();\n\n // The fetched SVG is rendered inside a wrapper span that carries the\n // csspart and ARIA semantics. The inner SVG from unsafeHTML fills the\n // container via the `.icon__inline svg` CSS rule. ARIA attributes and\n // focusable=\"false\" are injected into the inner SVG by _sanitizeSvg.\n return html`\n <span\n part=\"svg\"\n class=\"icon__inline\"\n role=${isDecorative ? nothing : 'img'}\n aria-label=${isDecorative ? nothing : this.label}\n aria-hidden=${isDecorative ? 'true' : nothing}\n >\n ${unsafeHTML(this._inlineSvg)}\n </span>\n `;\n }\n\n // ─── Render ───\n\n override render() {\n // Inline fetch mode takes precedence when src is a non-empty string.\n if (typeof this.src === 'string' && this.src.trim().length > 0) {\n return this._renderInline();\n }\n\n // Sprite mode: requires at least a name.\n if (this.name) {\n return this._renderSprite();\n }\n\n return nothing;\n }\n}\n\n/**\n * Module-level SVG fetch cache. Shared across all `hx-icon` instances so that\n * multiple icons sharing the same `src` URL issue only one network request.\n * The cache stores in-flight `Promise<string>` values — resolved entries remain\n * cached for the lifetime of the page to prevent redundant re-fetches.\n */\nconst _svgCache = new Map<string, Promise<string>>();\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-icon': HelixIcon;\n }\n}\n"],"names":["helixIconStyles","css","HelixIcon","LitElement","changed","url","seq","pending","_svgCache","response","text","sanitized","raw","doc","svgEl","s","urlAttrs","ariaAttrs","el","attr","attrName","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AU,KAAK;AAAA,qBACxBF,IAAeE,IAAU,KAAK,KAAK;AAAA,sBAClCF,IAAe,SAASE,CAAO;AAAA;AAAA,UAE3CC,EAAW,KAAK,UAAU,CAAC;AAAA;AAAA;AAAA,EAGnC;AAAA;AAAA,EAIS,SAAS;AAEhB,WAAI,OAAO,KAAK,OAAQ,YAAY,KAAK,IAAI,KAAA,EAAO,SAAS,IACpD,KAAK,cAAA,IAIV,KAAK,OACA,KAAK,cAAA,IAGPD;AAAA,EACT;AACF;AAjSazB,EACK,SAAS,CAACF,CAAe;AAWzC6B,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAXf5B,EAYX,WAAA,QAAA,CAAA;AAWA2B,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAtBf5B,EAuBX,WAAA,OAAA,CAAA;AAQA2B,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,GA9BxC5B,EA+BX,WAAA,aAAA,CAAA;AAeA2B,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM,WAAW,WAAW;AAAA,GA7CpD5B,EA8CX,WAAA,QAAA,CAAA;AAUA2B,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAvDf5B,EAwDX,WAAA,SAAA,CAAA;AAOQ2B,EAAA;AAAA,EADPE,EAAA;AAAM,GA9DI7B,EA+DH,WAAA,cAAA,CAAA;AAQA2B,EAAA;AAAA,EADPE,EAAA;AAAM,GAtEI7B,EAuEH,WAAA,eAAA,CAAA;AAvEGA,IAAN2B,EAAA;AAAA,EADNG,EAAc,SAAS;AAAA,GACX9B,CAAA;AAySb,MAAMM,wBAAgB,IAAA;"}
@@ -1,6 +1,6 @@
1
- import { css as g, LitElement as f, html as d, nothing as l } from "lit";
1
+ import { css as g, LitElement as f, html as p, nothing as h } from "lit";
2
2
  import "./document-token-adoption-DuYNKd4k.js";
3
- import { property as r, state as p, customElement as _ } from "lit/decorators.js";
3
+ import { property as r, state as d, customElement as _ } from "lit/decorators.js";
4
4
  import { classMap as m } from "lit/directives/class-map.js";
5
5
  import { styleMap as u } from "lit/directives/style-map.js";
6
6
  const v = g`
@@ -44,11 +44,19 @@ const v = g`
44
44
  .image__caption--visible {
45
45
  display: block;
46
46
  }
47
+
48
+ /* ─── Forced Colors (Windows High Contrast) ─── */
49
+
50
+ @media (forced-colors: active) {
51
+ .image__container--error {
52
+ border: 1px solid GrayText;
53
+ }
54
+ }
47
55
  `;
48
- var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, e = (s, o, a, h) => {
49
- for (var i = h > 1 ? void 0 : h ? b(o, a) : o, n = s.length - 1, c; n >= 0; n--)
50
- (c = s[n]) && (i = (h ? c(o, a, i) : c(i)) || i);
51
- return h && i && y(o, a, i), i;
56
+ var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, e = (s, o, a, l) => {
57
+ for (var i = l > 1 ? void 0 : l ? b(o, a) : o, n = s.length - 1, c; n >= 0; n--)
58
+ (c = s[n]) && (i = (l ? c(o, a, i) : c(i)) || i);
59
+ return l && i && y(o, a, i), i;
52
60
  };
53
61
  let t = class extends f {
54
62
  constructor() {
@@ -84,14 +92,14 @@ let t = class extends f {
84
92
  }
85
93
  render() {
86
94
  !this.decorative && this.alt;
87
- const s = this.decorative || this.alt === "", o = s ? "" : this.alt ?? "", a = this._computeBorderRadius(), h = this._hasCaptionSlot, i = {
95
+ const s = this.decorative || this.alt === "", o = s ? "" : this.alt ?? "", a = this._computeBorderRadius(), l = this._hasCaptionSlot, i = {
88
96
  ...this.ratio ? { "--_ratio": this.ratio } : {},
89
97
  ...this.fit ? { "--_fit": this.fit } : {},
90
98
  ...a ? { "--_radius": a } : {},
91
99
  ...this.width != null ? { width: typeof this.width == "number" ? `${this.width}px` : this.width } : {},
92
100
  ...this.height != null ? { height: typeof this.height == "number" ? `${this.height}px` : this.height } : {}
93
101
  };
94
- return this._error ? d`
102
+ return this._error ? p`
95
103
  <figure
96
104
  class="image__container image__container--error"
97
105
  style=${u(i)}
@@ -99,25 +107,25 @@ let t = class extends f {
99
107
  >
100
108
  <slot name="fallback"></slot>
101
109
  </figure>
102
- ` : d`
110
+ ` : p`
103
111
  <figure class="image__container" style=${u(i)}>
104
112
  <img
105
113
  part="base"
106
114
  class="image__img"
107
- src=${this._currentSrc() || l}
115
+ src=${this._currentSrc() || h}
108
116
  alt=${o}
109
- role=${s ? "presentation" : l}
117
+ role=${s ? "presentation" : h}
110
118
  loading=${this.loading}
111
- width=${this.width != null ? this.width : l}
112
- height=${this.height != null ? this.height : l}
113
- srcset=${this.srcset ?? l}
114
- sizes=${this.sizes ?? l}
119
+ width=${this.width != null ? this.width : h}
120
+ height=${this.height != null ? this.height : h}
121
+ srcset=${this.srcset ?? h}
122
+ sizes=${this.sizes ?? h}
115
123
  @load=${this._handleLoad}
116
124
  @error=${this._handleError}
117
125
  />
118
126
  <figcaption
119
127
  part="caption"
120
- class=${m({ image__caption: !0, "image__caption--visible": h })}
128
+ class=${m({ image__caption: !0, "image__caption--visible": l })}
121
129
  >
122
130
  <slot name="caption" @slotchange=${this._onCaptionSlotChange}></slot>
123
131
  </figcaption>
@@ -163,13 +171,13 @@ e([
163
171
  r({ type: String, reflect: !0 })
164
172
  ], t.prototype, "sizes", 2);
165
173
  e([
166
- p()
174
+ d()
167
175
  ], t.prototype, "_error", 2);
168
176
  e([
169
- p()
177
+ d()
170
178
  ], t.prototype, "_usedFallbackSrc", 2);
171
179
  e([
172
- p()
180
+ d()
173
181
  ], t.prototype, "_hasCaptionSlot", 2);
174
182
  t = e([
175
183
  _("hx-image")
@@ -177,4 +185,4 @@ t = e([
177
185
  export {
178
186
  t as H
179
187
  };
180
- //# sourceMappingURL=hx-image-ztiXumZB.js.map
188
+ //# sourceMappingURL=hx-image-DOjPp-K5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-image-DOjPp-K5.js","sources":["../../src/components/hx-image/hx-image.styles.ts","../../src/components/hx-image/hx-image.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixImageStyles = css`\n :host {\n display: block;\n }\n\n .image__container {\n position: relative;\n display: block;\n overflow: hidden;\n margin: 0;\n padding: 0;\n aspect-ratio: var(--_ratio, var(--hx-image-aspect-ratio));\n border-radius: var(--_radius, var(--hx-image-border-radius, 0));\n }\n\n .image__container--error {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: var(--hx-image-fallback-min-height, 3rem);\n background-color: var(--hx-color-neutral-100, #f3f4f6);\n color: var(--hx-color-neutral-500, #6b7280);\n }\n\n .image__img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: var(--_fit, var(--hx-image-object-fit, cover));\n }\n\n .image__caption {\n display: none;\n padding: var(--hx-image-caption-padding, 0.5rem 0 0);\n color: var(--hx-image-caption-color, var(--hx-color-neutral-600, #4b5563));\n font-size: var(--hx-image-caption-font-size, 0.875rem);\n }\n\n .image__caption--visible {\n display: block;\n }\n\n /* ─── Forced Colors (Windows High Contrast) ─── */\n\n @media (forced-colors: active) {\n .image__container--error {\n border: 1px solid GrayText;\n }\n }\n`;\n","import { LitElement, 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 { styleMap } from 'lit/directives/style-map.js';\nimport { helixImageStyles } from './hx-image.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * An accessible image wrapper with lazy loading, fallback support, aspect ratio control,\n * responsive image (srcset/sizes) support, and optional caption.\n *\n * @summary Accessible image wrapper with lazy loading, fallback, srcset, and aspect ratio control.\n *\n * @tag hx-image\n *\n * @slot fallback - Custom content shown when the image fails to load and no fallback-src is set.\n * @slot caption - Optional caption content rendered in a figcaption element below the image.\n *\n * @csspart base - The inner img element.\n * @csspart caption - The figcaption element (visible only when caption content is present).\n *\n * @cssprop [--hx-image-object-fit] - Controls how the image fills its container. Maps to object-fit.\n * @cssprop [--hx-image-border-radius] - Border radius of the image. Overridden by the `rounded` prop.\n * @cssprop [--hx-image-aspect-ratio] - Aspect ratio of the image container. Overridden by the `ratio` prop.\n * @cssprop [--hx-image-caption-color] - Text color for the caption.\n * @cssprop [--hx-image-caption-font-size] - Font size for the caption.\n * @cssprop [--hx-image-caption-padding] - Padding for the caption.\n * @cssprop [--hx-image-fallback-min-height] - Minimum height of the error/fallback container.\n *\n * @fires hx-load - Dispatched when the image has successfully loaded.\n * @fires hx-error - Dispatched when the image fails to load (including after fallback-src also fails).\n */\n@customElement('hx-image')\nexport class HelixImage extends LitElement {\n static override styles = [helixImageStyles];\n\n /**\n * The URL of the image to display.\n * @attr src\n */\n @property({ type: String, reflect: true })\n src = '';\n\n /**\n * Accessible text description of the image.\n * Required for informative images. Use the `decorative` prop for decorative images\n * instead of setting this to an empty string — explicit decorative intent is preferred.\n * @attr alt\n */\n @property({ type: String, reflect: true })\n alt: string | undefined = undefined;\n\n /**\n * Marks the image as decorative (hidden from screen readers).\n * Use this instead of `alt=\"\"` to make decorative intent explicit in markup.\n * When set, the inner img receives `alt=\"\"` and `role=\"presentation\"`.\n * @attr decorative\n */\n @property({ type: Boolean, reflect: true })\n decorative = false;\n\n /**\n * Width of the image element.\n * @attr width\n */\n @property({ reflect: true })\n width: number | string | undefined = undefined;\n\n /**\n * Height of the image element.\n * @attr height\n */\n @property({ reflect: true })\n height: number | string | undefined = undefined;\n\n /**\n * Loading strategy for the image.\n * @attr loading\n */\n @property({ type: String, reflect: true })\n loading: 'lazy' | 'eager' = 'lazy';\n\n /**\n * How the image should be resized to fit its container.\n * Maps to CSS object-fit.\n * @attr fit\n */\n @property({ type: String, reflect: true })\n fit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' | undefined = undefined;\n\n /**\n * CSS aspect-ratio value (e.g. \"16/9\", \"1\", \"4/3\").\n * When set, the container maintains this ratio.\n * @attr ratio\n */\n @property({ type: String, reflect: true })\n ratio: string | undefined = undefined;\n\n /**\n * Border radius for the image.\n * Boolean attribute (or `true`) applies the theme's medium radius token.\n * A string value is used directly as a CSS border-radius value (e.g. \"1rem\", \"50%\").\n *\n * Note: When set as an HTML attribute (`<hx-image rounded>`), Lit receives the value as\n * an empty string (`''`). When set programmatically (`el.rounded = true`), it receives\n * a boolean. Both forms apply the theme radius token.\n *\n * @attr rounded\n */\n @property({ type: String, reflect: true })\n rounded: boolean | string | undefined = undefined;\n\n /**\n * Fallback image URL shown when the primary src fails to load.\n * @attr fallback-src\n */\n @property({ type: String, attribute: 'fallback-src', reflect: true })\n fallbackSrc: string | undefined = undefined;\n\n /**\n * A comma-separated list of image candidates for responsive images.\n * Passed directly to the inner img's srcset attribute.\n * Enables Drupal responsive image styles and browser-native image selection.\n * @attr srcset\n */\n @property({ type: String, reflect: true })\n srcset: string | undefined = undefined;\n\n /**\n * Media conditions indicating which image size to use alongside srcset.\n * Works in conjunction with the `srcset` attribute.\n * @attr sizes\n */\n @property({ type: String, reflect: true })\n sizes: string | undefined = undefined;\n\n /** @internal */\n @state()\n private _error = false;\n\n /** @internal */\n @state()\n private _usedFallbackSrc = false;\n\n /** @internal */\n @state()\n private _hasCaptionSlot = false;\n\n /** @internal */\n private _handleLoad(): void {\n this.dispatchEvent(new CustomEvent<void>('hx-load', { bubbles: true, composed: true }));\n }\n\n /** @internal */\n private _handleError(): void {\n if (!this._error && this.fallbackSrc && !this._usedFallbackSrc) {\n // Try the fallback-src before showing the fallback slot\n this._usedFallbackSrc = true;\n return;\n }\n this._error = true;\n this.dispatchEvent(new CustomEvent<void>('hx-error', { bubbles: true, composed: true }));\n }\n\n /** @internal */\n private _onCaptionSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasCaptionSlot = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** @internal */\n private _computeBorderRadius(): string | undefined {\n if (this.rounded === true || this.rounded === '' || this.rounded === 'true') {\n return 'var(--hx-border-radius-md, 0.375rem)';\n }\n if (typeof this.rounded === 'string' && this.rounded.length > 0 && this.rounded !== 'false') {\n return this.rounded;\n }\n return undefined;\n }\n\n /** @internal */\n private _currentSrc(): string {\n if (this._usedFallbackSrc && this.fallbackSrc) {\n return this.fallbackSrc;\n }\n return this.src;\n }\n\n override render() {\n if (!this.decorative && !this.alt) {\n devWarn(\n 'hx-image',\n 'Informative images require an `alt` attribute for accessibility (WCAG 1.1.1). ' +\n 'Provide a descriptive `alt` value, or set the `decorative` attribute if the image is decorative.',\n );\n }\n const isDecorative = this.decorative || this.alt === '';\n const altText = isDecorative ? '' : (this.alt ?? '');\n const borderRadius = this._computeBorderRadius();\n const showCaption = this._hasCaptionSlot;\n\n const containerStyles = {\n ...(this.ratio ? { '--_ratio': this.ratio } : {}),\n ...(this.fit ? { '--_fit': this.fit } : {}),\n ...(borderRadius ? { '--_radius': borderRadius } : {}),\n ...(this.width != null\n ? { width: typeof this.width === 'number' ? `${this.width}px` : this.width }\n : {}),\n ...(this.height != null\n ? { height: typeof this.height === 'number' ? `${this.height}px` : this.height }\n : {}),\n };\n\n if (this._error) {\n return html`\n <figure\n class=\"image__container image__container--error\"\n style=${styleMap(containerStyles)}\n role=\"alert\"\n >\n <slot name=\"fallback\"></slot>\n </figure>\n `;\n }\n\n return html`\n <figure class=\"image__container\" style=${styleMap(containerStyles)}>\n <img\n part=\"base\"\n class=\"image__img\"\n src=${this._currentSrc() || nothing}\n alt=${altText}\n role=${isDecorative ? 'presentation' : nothing}\n loading=${this.loading}\n width=${this.width != null ? this.width : nothing}\n height=${this.height != null ? this.height : nothing}\n srcset=${this.srcset ?? nothing}\n sizes=${this.sizes ?? nothing}\n @load=${this._handleLoad}\n @error=${this._handleError}\n />\n <figcaption\n part=\"caption\"\n class=${classMap({ image__caption: true, 'image__caption--visible': showCaption })}\n >\n <slot name=\"caption\" @slotchange=${this._onCaptionSlotChange}></slot>\n </figcaption>\n </figure>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-image': HelixImage;\n }\n}\n"],"names":["helixImageStyles","css","HelixImage","LitElement","e","slot","isDecorative","altText","borderRadius","showCaption","containerStyles","html","styleMap","nothing","classMap","__decorateClass","property","state","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAmBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;ACgCzB,IAAMC,IAAN,cAAyBC,EAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA,GAQL,KAAA,MAAM,IASN,KAAA,MAA0B,QAS1B,KAAA,aAAa,IAOb,KAAA,QAAqC,QAOrC,KAAA,SAAsC,QAOtC,KAAA,UAA4B,QAQ5B,KAAA,MAAwE,QAQxE,KAAA,QAA4B,QAc5B,KAAA,UAAwC,QAOxC,KAAA,cAAkC,QASlC,KAAA,SAA6B,QAQ7B,KAAA,QAA4B,QAI5B,KAAQ,SAAS,IAIjB,KAAQ,mBAAmB,IAI3B,KAAQ,kBAAkB;AAAA,EAAA;AAAA;AAAA,EAGlB,cAAoB;AAC1B,SAAK,cAAc,IAAI,YAAkB,WAAW,EAAE,SAAS,IAAM,UAAU,GAAA,CAAM,CAAC;AAAA,EACxF;AAAA;AAAA,EAGQ,eAAqB;AAC3B,QAAI,CAAC,KAAK,UAAU,KAAK,eAAe,CAAC,KAAK,kBAAkB;AAE9D,WAAK,mBAAmB;AACxB;AAAA,IACF;AACA,SAAK,SAAS,IACd,KAAK,cAAc,IAAI,YAAkB,YAAY,EAAE,SAAS,IAAM,UAAU,GAAA,CAAM,CAAC;AAAA,EACzF;AAAA;AAAA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