@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
@@ -1,4 +1,4 @@
1
- import { css as d, LitElement as v, html as t, nothing as b } from "lit";
1
+ import { css as d, LitElement as v, html as o, nothing as b } from "lit";
2
2
  import "./document-token-adoption-DuYNKd4k.js";
3
3
  import { property as a, customElement as f } from "lit/decorators.js";
4
4
  import { classMap as p } from "lit/directives/class-map.js";
@@ -206,11 +206,28 @@ const x = d`
206
206
  transition: none;
207
207
  }
208
208
  }
209
+
210
+ /* ─── Forced Colors (Windows High Contrast) ─── */
211
+
212
+ @media (forced-colors: active) {
213
+ .banner {
214
+ border-bottom-color: CanvasText;
215
+ }
216
+
217
+ .banner__icon svg {
218
+ fill: CanvasText;
219
+ }
220
+
221
+ .banner__close-button {
222
+ color: ButtonText;
223
+ border: 1px solid ButtonText;
224
+ }
225
+ }
209
226
  `;
210
227
  var g = Object.defineProperty, m = Object.getOwnPropertyDescriptor, r = (n, i, s, l) => {
211
- for (var o = l > 1 ? void 0 : l ? m(i, s) : i, c = n.length - 1, h; c >= 0; c--)
212
- (h = n[c]) && (o = (l ? h(i, s, o) : h(o)) || o);
213
- return l && o && g(i, s, o), o;
228
+ for (var t = l > 1 ? void 0 : l ? m(i, s) : i, c = n.length - 1, h; c >= 0; c--)
229
+ (h = n[c]) && (t = (l ? h(i, s, t) : h(t)) || t);
230
+ return l && t && g(i, s, t), t;
214
231
  };
215
232
  let e = class extends v {
216
233
  constructor() {
@@ -254,7 +271,7 @@ let e = class extends v {
254
271
  // ─── Default Icons ───
255
272
  /** @internal */
256
273
  _renderInfoIcon() {
257
- return t`<svg viewBox="0 0 20 20" aria-hidden="true">
274
+ return o`<svg viewBox="0 0 20 20" aria-hidden="true">
258
275
  <path
259
276
  d="M10 2a8 8 0 100 16 8 8 0 000-16zm.75 4.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM9.25 9a.75.75 0 011.5 0v4a.75.75 0 01-1.5 0V9z"
260
277
  />
@@ -262,7 +279,7 @@ let e = class extends v {
262
279
  }
263
280
  /** @internal */
264
281
  _renderSuccessIcon() {
265
- return t`<svg viewBox="0 0 20 20" aria-hidden="true">
282
+ return o`<svg viewBox="0 0 20 20" aria-hidden="true">
266
283
  <path
267
284
  d="M10 2a8 8 0 100 16 8 8 0 000-16zm3.03 6.28a.75.75 0 00-1.06-1.06L9 10.19 7.78 8.97a.75.75 0 00-1.06 1.06l1.75 1.75a.75.75 0 001.06 0l3.5-3.5z"
268
285
  />
@@ -270,7 +287,7 @@ let e = class extends v {
270
287
  }
271
288
  /** @internal */
272
289
  _renderWarningIcon() {
273
- return t`<svg viewBox="0 0 20 20" aria-hidden="true">
290
+ return o`<svg viewBox="0 0 20 20" aria-hidden="true">
274
291
  <path
275
292
  d="M8.49 2.92a1.75 1.75 0 013.02 0l6.25 10.83A1.75 1.75 0 0116.25 16H3.75a1.75 1.75 0 01-1.51-2.25L8.49 2.92zM10 7a.75.75 0 01.75.75v3a.75.75 0 01-1.5 0v-3A.75.75 0 0110 7zm0 7.5a.75.75 0 100-1.5.75.75 0 000 1.5z"
276
293
  />
@@ -278,7 +295,7 @@ let e = class extends v {
278
295
  }
279
296
  /** @internal */
280
297
  _renderErrorIcon() {
281
- return t`<svg viewBox="0 0 20 20" aria-hidden="true">
298
+ return o`<svg viewBox="0 0 20 20" aria-hidden="true">
282
299
  <path
283
300
  d="M10 2a8 8 0 100 16 8 8 0 000-16zm-1.72 5.22a.75.75 0 011.06 0L10 7.94l.66-.72a.75.75 0 111.06 1.06L11.06 9l.66.72a.75.75 0 11-1.06 1.06L10 10.06l-.66.72a.75.75 0 01-1.06-1.06L8.94 9l-.66-.72a.75.75 0 010-1.06z"
284
301
  />
@@ -300,7 +317,7 @@ let e = class extends v {
300
317
  }
301
318
  /** @internal */
302
319
  _renderCloseIcon() {
303
- return t`<svg viewBox="0 0 20 20" aria-hidden="true">
320
+ return o`<svg viewBox="0 0 20 20" aria-hidden="true">
304
321
  <path
305
322
  d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"
306
323
  />
@@ -330,7 +347,7 @@ let e = class extends v {
330
347
  banner: !0,
331
348
  [`banner--${this.variant}`]: !0
332
349
  }, i = this.actionLabel.length > 0 && this.actionHref.length > 0, s = this._effectiveSeverityLabel;
333
- return t`
350
+ return o`
334
351
  <div part="banner" class=${p(n)}>
335
352
  <span class="banner__severity-label">${s}</span>
336
353
  <div part="icon" class="banner__icon">${this._renderDefaultIcon()}</div>
@@ -339,7 +356,7 @@ let e = class extends v {
339
356
  <slot></slot>
340
357
  </div>
341
358
 
342
- ${i ? t`
359
+ ${i ? o`
343
360
  <a
344
361
  part="action"
345
362
  class="banner__action"
@@ -349,7 +366,7 @@ let e = class extends v {
349
366
  <slot name="action">${this.actionLabel}</slot>
350
367
  </a>
351
368
  ` : b}
352
- ${this.dismissible ? t`
369
+ ${this.dismissible ? o`
353
370
  <button
354
371
  part="close-button"
355
372
  class="banner__close-button"
@@ -397,4 +414,4 @@ e = r([
397
414
  export {
398
415
  e as H
399
416
  };
400
- //# sourceMappingURL=hx-banner-B-WEDiq7.js.map
417
+ //# sourceMappingURL=hx-banner-D8AxkCfc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-banner-D8AxkCfc.js","sources":["../../src/components/hx-banner/hx-banner.styles.ts","../../src/components/hx-banner/hx-banner.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixBannerStyles = css`\n :host {\n display: block;\n width: 100%;\n position: var(--hx-banner-position, sticky);\n top: 0;\n left: 0;\n right: 0;\n z-index: var(--hx-banner-z-index, 100);\n }\n\n :host(:not([open])) {\n display: none;\n }\n\n * {\n box-sizing: border-box;\n }\n\n /* ─── Severity Label (WCAG 1.4.1) ─── */\n /* Visually hidden — ensures variant is never conveyed by color alone. */\n /* Always rendered so screen readers can identify the banner severity. */\n\n .banner__severity-label {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n /* ─── Banner Container ─── */\n\n .banner {\n display: flex;\n align-items: center;\n gap: var(--hx-banner-gap, var(--hx-space-3, 0.75rem));\n padding: var(--hx-banner-padding, var(--hx-space-3, 0.75rem) var(--hx-space-4, 1rem));\n background-color: var(--hx-banner-bg, var(--hx-color-info-50, #e8f4fd));\n color: var(--hx-banner-color, var(--hx-color-info-800, #1a3a4a));\n border-bottom: var(--hx-banner-border-width, var(--hx-border-width-thin, 1px)) solid\n var(--hx-banner-border-color, var(--hx-color-info-200, #b3d9ef));\n font-family: var(--hx-banner-font-family, var(--hx-font-family-sans, sans-serif));\n font-size: var(--hx-font-size-sm, 0.875rem);\n line-height: var(--hx-line-height-normal, 1.5);\n width: 100%;\n }\n\n /* ─── Icon ─── */\n\n .banner__icon {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n color: var(--hx-banner-icon-color, var(--hx-color-info-500, #3b82f6));\n }\n\n .banner__icon svg {\n width: var(--hx-space-5, 1.25rem);\n height: var(--hx-space-5, 1.25rem);\n fill: currentColor;\n }\n\n /* ─── Message ─── */\n\n .banner__message {\n flex: 1;\n min-width: 0;\n }\n\n /* ─── Action Link ─── */\n\n .banner__action {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n color: var(--hx-banner-action-color, var(--hx-banner-color, var(--hx-color-info-800, #1a3a4a)));\n font-weight: var(--hx-font-weight-semibold, 600);\n text-decoration: underline;\n text-underline-offset: 2px;\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n font-size: inherit;\n font-family: inherit;\n }\n\n .banner__action:hover {\n opacity: var(--hx-opacity-90, 0.9);\n }\n\n .banner__action:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n }\n\n /* ─── Close Button ─── */\n /* Minimum 44px touch target per WCAG 2.5.8 (Target Size Minimum, AA) and */\n /* Apple HIG / Google Material guidelines. Uses absolute px units to ensure */\n /* the target size is independent of the consumer's base font size. */\n\n .banner__close-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n min-width: var(--hx-touch-target-size, 44px);\n min-height: var(--hx-touch-target-size, 44px);\n margin-inline-start: auto;\n padding: 0;\n border: none;\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n background: transparent;\n color: var(--hx-banner-color, var(--hx-color-info-800, #1a3a4a));\n cursor: pointer;\n font-size: var(--hx-font-size-md, 1rem);\n line-height: 1;\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n opacity var(--hx-transition-fast, 150ms ease);\n opacity: var(--hx-opacity-75, 0.75);\n }\n\n .banner__close-button:hover {\n opacity: var(--hx-opacity-100, 1);\n /* color-mix() is supported in Chrome 111+, Firefox 113+, Safari 16.2+. */\n /* Falls back to transparent (no hover background) in older environments. */\n background-color: color-mix(in srgb, currentColor 10%, transparent);\n }\n\n .banner__close-button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n opacity: 1;\n }\n\n .banner__close-button svg {\n width: var(--hx-space-4, 1rem);\n height: var(--hx-space-4, 1rem);\n fill: currentColor;\n }\n\n /* ─── Variant: info ─── */\n\n :host([variant='info']) .banner,\n :host(:not([variant])) .banner {\n --hx-banner-bg: var(--hx-color-info-50, #e8f4fd);\n --hx-banner-border-color: var(--hx-color-info-200, #b3d9ef);\n --hx-banner-color: var(--hx-color-info-800, #1a3a4a);\n --hx-banner-icon-color: var(--hx-color-info-500, #3b82f6);\n }\n\n /* ─── Variant: success ─── */\n\n :host([variant='success']) .banner {\n --hx-banner-bg: var(--hx-color-success-50, #ecfdf5);\n --hx-banner-border-color: var(--hx-color-success-200, #a7f3d0);\n --hx-banner-color: var(--hx-color-success-800, #065f46);\n --hx-banner-icon-color: var(--hx-color-success-500, #10b981);\n }\n\n /* ─── Variant: warning ─── */\n\n :host([variant='warning']) .banner {\n --hx-banner-bg: var(--hx-color-warning-50, #fffbeb);\n --hx-banner-border-color: var(--hx-color-warning-200, #fde68a);\n --hx-banner-color: var(--hx-color-warning-800, #92400e);\n --hx-banner-icon-color: var(--hx-color-warning-500, #f59e0b);\n }\n\n /* ─── Variant: error ─── */\n\n :host([variant='error']) .banner {\n --hx-banner-bg: var(--hx-color-error-50, #fef2f2);\n --hx-banner-border-color: var(--hx-color-error-200, #fecaca);\n --hx-banner-color: var(--hx-color-error-800, #991b1b);\n --hx-banner-icon-color: var(--hx-color-error-500, #ef4444);\n }\n\n /* ─── Position: fixed ─── */\n /* When position=\"fixed\", override the host-level CSS custom property. */\n /* The :host rule above sets position via var(--hx-banner-position). */\n /* We use an attribute selector to override it cleanly without duplication. */\n\n :host([position='fixed']) {\n position: fixed;\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .banner__close-button {\n transition: none;\n }\n }\n\n /* ─── Forced Colors (Windows High Contrast) ─── */\n\n @media (forced-colors: active) {\n .banner {\n border-bottom-color: CanvasText;\n }\n\n .banner__icon svg {\n fill: CanvasText;\n }\n\n .banner__close-button {\n color: ButtonText;\n border: 1px solid ButtonText;\n }\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } 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 { helixBannerStyles } from './hx-banner.styles.js';\n\n/** Banner variant determines visual styling and ARIA semantics. */\nexport type BannerVariant = 'info' | 'success' | 'warning' | 'error';\n\n/** Banner position determines CSS positioning behavior. */\nexport type BannerPosition = 'sticky' | 'fixed';\n\n/**\n * A full-width page-level banner for persistent notifications and announcements.\n * Designed for healthcare applications requiring prominent system-level messaging.\n *\n * @summary Full-width page-level banner for persistent notifications with variant-based styling and ARIA live regions.\n *\n * @tag hx-banner\n *\n * @slot - Default slot for banner message content.\n * @slot action - Optional slot to override the built-in action link with custom content.\n *\n * @fires {CustomEvent<{reason: string}>} hx-dismiss - Dispatched when the user dismisses the banner.\n *\n * @csspart banner - The outer banner container.\n * @csspart icon - The icon container.\n * @csspart message - The message content area.\n * @csspart action - The action link element (only rendered when action-label and action-href are set).\n * @csspart close-button - The dismiss button (only rendered when dismissible).\n *\n * @cssprop [--hx-banner-bg=var(--hx-color-info-50)] - Banner background color.\n * @cssprop [--hx-banner-color=var(--hx-color-info-800)] - Banner text color.\n * @cssprop [--hx-banner-border-color=var(--hx-color-info-200)] - Banner bottom border color.\n * @cssprop [--hx-banner-border-width=var(--hx-border-width-thin)] - Banner bottom border width.\n * @cssprop [--hx-banner-padding=var(--hx-space-3) var(--hx-space-4)] - Banner padding.\n * @cssprop [--hx-banner-gap=var(--hx-space-3)] - Gap between banner elements.\n * @cssprop [--hx-banner-icon-color=var(--hx-color-info-500)] - Banner icon color.\n * @cssprop [--hx-banner-font-family=var(--hx-font-family-sans)] - Banner font family.\n * @cssprop [--hx-banner-action-color=var(--hx-banner-color)] - Action link color.\n * @cssprop [--hx-banner-position=sticky] - CSS position value (sticky or fixed).\n * @cssprop [--hx-banner-z-index=100] - Banner z-index for stacking context.\n * @cssprop [--hx-touch-target-size=44px] - Minimum touch target size for the close button.\n */\n@customElement('hx-banner')\nexport class HelixBanner extends LitElement {\n static override styles = [helixBannerStyles];\n\n // ─── Properties ───\n\n /**\n * Visual variant of the banner that determines colors and ARIA semantics.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'info' | 'success' | 'warning' | 'error' = 'info';\n\n /**\n * CSS positioning behavior. \"sticky\" keeps the banner in flow; \"fixed\" pins it to the viewport.\n * @attr position\n */\n @property({ type: String, reflect: true })\n position: 'sticky' | 'fixed' = 'sticky';\n\n /**\n * Whether the banner can be dismissed by the user.\n * @attr dismissible\n */\n @property({ type: Boolean, reflect: true })\n dismissible = false;\n\n /**\n * Heading text for the banner, used to provide context in the action link's and\n * close button's accessible labels.\n * @attr heading\n */\n @property({ type: String })\n heading = '';\n\n /**\n * Label text for the optional action link. Requires action-href to render.\n * @attr action-label\n */\n @property({ type: String, attribute: 'action-label' })\n actionLabel = '';\n\n /**\n * URL for the optional action link. Requires action-label to render.\n * @attr action-href\n */\n @property({ type: String, attribute: 'action-href' })\n actionHref = '';\n\n /**\n * Whether the banner is visible. Defaults to true — banners are shown by default.\n * @attr open\n */\n @property({ type: Boolean, reflect: true })\n open = true;\n\n /** Accessible label for the dismiss button. Override for localized text. */\n @property({ type: String, attribute: 'label-close' })\n labelClose = 'Dismiss banner';\n\n /**\n * Override for the severity prefix announced to screen readers (e.g., \"Info:\", \"Error:\").\n * When not set, defaults to the English label matching the current variant.\n * @attr severity-label\n */\n @property({ attribute: 'severity-label' })\n severityLabel: string | undefined;\n\n // ─── Private Helpers ───\n\n /** Returns the default English severity label for the current variant. */\n private _defaultSeverityLabel(): string {\n const labels: Record<string, string> = {\n info: 'Info:',\n success: 'Success:',\n warning: 'Warning:',\n error: 'Error:',\n };\n return labels[this.variant] ?? '';\n }\n\n /** Returns the effective severity label, using the override if provided. */\n private get _effectiveSeverityLabel(): string {\n return this.severityLabel ?? this._defaultSeverityLabel();\n }\n\n /** Returns true when the variant requires assertive announcement. */\n /** @internal */\n private get _isAssertive(): boolean {\n return this.variant === 'error' || this.variant === 'warning';\n }\n\n /**\n * Returns the appropriate ARIA role based on variant.\n * role=\"alert\" implies aria-live=\"assertive\"; role=\"status\" implies aria-live=\"polite\".\n * We do NOT set aria-live explicitly to avoid double-announcements in JAWS.\n */\n /** @internal */\n private get _role(): string {\n return this._isAssertive ? 'alert' : 'status';\n }\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Apply ARIA role to the host element for reliable screen reader support across\n // Shadow DOM boundaries. Placing role on a shadow-internal element has inconsistent\n // AT support in JAWS+Chrome and VoiceOver+Safari combinations (particularly pre-2024).\n this.setAttribute('role', this._role);\n if (!this.open) {\n this.setAttribute('aria-hidden', 'true');\n }\n }\n\n protected override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('variant')) {\n // Keep host ARIA role in sync with variant (assertive vs. polite).\n this.setAttribute('role', this._role);\n }\n if (changedProperties.has('open')) {\n // Manage aria-hidden in addition to display:none for reliable AT exclusion.\n // When open transitions from false→true, removing aria-hidden signals to AT\n // that the live region content should be announced.\n if (this.open) {\n this.removeAttribute('aria-hidden');\n } else {\n this.setAttribute('aria-hidden', 'true');\n }\n }\n }\n\n // ─── Default Icons ───\n\n /** @internal */\n private _renderInfoIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm.75 4.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM9.25 9a.75.75 0 011.5 0v4a.75.75 0 01-1.5 0V9z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderSuccessIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm3.03 6.28a.75.75 0 00-1.06-1.06L9 10.19 7.78 8.97a.75.75 0 00-1.06 1.06l1.75 1.75a.75.75 0 001.06 0l3.5-3.5z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderWarningIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M8.49 2.92a1.75 1.75 0 013.02 0l6.25 10.83A1.75 1.75 0 0116.25 16H3.75a1.75 1.75 0 01-1.51-2.25L8.49 2.92zM10 7a.75.75 0 01.75.75v3a.75.75 0 01-1.5 0v-3A.75.75 0 0110 7zm0 7.5a.75.75 0 100-1.5.75.75 0 000 1.5z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderErrorIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm-1.72 5.22a.75.75 0 011.06 0L10 7.94l.66-.72a.75.75 0 111.06 1.06L11.06 9l.66.72a.75.75 0 11-1.06 1.06L10 10.06l-.66.72a.75.75 0 01-1.06-1.06L8.94 9l-.66-.72a.75.75 0 010-1.06z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderDefaultIcon() {\n switch (this.variant) {\n case 'success':\n return this._renderSuccessIcon();\n case 'warning':\n return this._renderWarningIcon();\n case 'error':\n return this._renderErrorIcon();\n case 'info':\n default:\n return this._renderInfoIcon();\n }\n }\n\n /** @internal */\n private _renderCloseIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z\"\n />\n </svg>`;\n }\n\n // ─── Public Methods ───\n\n /**\n * Programmatically dismisses the banner. Sets open=false and dispatches hx-dismiss.\n */\n dismiss(): void {\n this._handleDismiss();\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleDismiss(): void {\n this.open = false;\n\n /**\n * Dispatched when the user (or caller) dismisses the banner.\n * @event hx-dismiss\n */\n this.dispatchEvent(\n new CustomEvent<{ reason: string }>('hx-dismiss', {\n bubbles: true,\n composed: true,\n detail: { reason: 'user' },\n }),\n );\n }\n\n // ─── Render ───\n\n override render() {\n const classes = {\n banner: true,\n [`banner--${this.variant}`]: true,\n };\n\n const hasAction = this.actionLabel.length > 0 && this.actionHref.length > 0;\n\n // WCAG 1.4.1: Always render a visually-hidden severity label so the variant\n // is never conveyed by color alone.\n const severityLabel = this._effectiveSeverityLabel;\n\n return html`\n <div part=\"banner\" class=${classMap(classes)}>\n <span class=\"banner__severity-label\">${severityLabel}</span>\n <div part=\"icon\" class=\"banner__icon\">${this._renderDefaultIcon()}</div>\n\n <div part=\"message\" class=\"banner__message\">\n <slot></slot>\n </div>\n\n ${hasAction\n ? html`\n <a\n part=\"action\"\n class=\"banner__action\"\n href=${ifDefined(this.actionHref || undefined)}\n aria-label=${this.heading\n ? `${this.actionLabel}: ${this.heading}`\n : this.actionLabel}\n >\n <slot name=\"action\">${this.actionLabel}</slot>\n </a>\n `\n : nothing}\n ${this.dismissible\n ? html`\n <button\n part=\"close-button\"\n class=\"banner__close-button\"\n aria-label=${this.labelClose}\n @click=${this._handleDismiss}\n >\n ${this._renderCloseIcon()}\n </button>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-banner': HelixBanner;\n }\n}\n\nexport type { HelixBanner as HxBanner };\n"],"names":["helixBannerStyles","css","HelixBanner","LitElement","changedProperties","html","classes","hasAction","severityLabel","classMap","ifDefined","nothing","__decorateClass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AA;AAQAU,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,iBAAA,CAAkB;AAAA,GAhE9BX,EAiEX,WAAA,iBAAA,CAAA;AAjEWA,IAANU,EAAA;AAAA,EADNE,EAAc,WAAW;AAAA,GACbZ,CAAA;"}
@@ -1,7 +1,8 @@
1
1
  import { css as m, LitElement as u, html as d, nothing as f } from "lit";
2
2
  import "./document-token-adoption-DuYNKd4k.js";
3
3
  import { property as n, customElement as b } from "lit/decorators.js";
4
- const x = m`
4
+ import { c as x } from "./id-counter-PTgF-zcG.js";
5
+ const y = m`
5
6
  :host {
6
7
  display: block;
7
8
  font-family: var(
@@ -38,14 +39,15 @@ const x = m`
38
39
  display: none;
39
40
  }
40
41
  `;
41
- var y = Object.defineProperty, v = Object.getOwnPropertyDescriptor, p = (t, e, s, i) => {
42
- for (var r = i > 1 ? void 0 : i ? v(e, s) : e, a = t.length - 1, l; a >= 0; a--)
42
+ var v = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, p = (t, e, s, i) => {
43
+ for (var r = i > 1 ? void 0 : i ? _(e, s) : e, a = t.length - 1, l; a >= 0; a--)
43
44
  (l = t[a]) && (r = (i ? l(e, s, r) : l(r)) || r);
44
- return i && r && y(e, s, r), r;
45
+ return i && r && v(e, s, r), r;
45
46
  };
47
+ const g = x("hx-breadcrumb");
46
48
  let o = class extends u {
47
49
  constructor() {
48
- super(...arguments), this.separator = "/", this.label = "Breadcrumb", this.maxItems = 0, this.labelEllipsis = "Show all breadcrumb items", this.jsonLd = !1, this._ellipsisItem = null, this._jsonLdScript = null, this._boundEllipsisClick = (t) => this._handleEllipsisClick(t), this._boundEllipsisKeydown = (t) => this._handleEllipsisKeydown(t), this._managedCurrentItems = /* @__PURE__ */ new WeakSet(), this._jsonLdId = `hx-breadcrumb-ld-${++o._instanceCounter}`;
50
+ super(...arguments), this.separator = "/", this.label = "Breadcrumb", this.maxItems = 0, this.labelEllipsis = "Show all breadcrumb items", this.jsonLd = !1, this._ellipsisItem = null, this._jsonLdScript = null, this._boundEllipsisClick = (t) => this._handleEllipsisClick(t), this._boundEllipsisKeydown = (t) => this._handleEllipsisKeydown(t), this._managedCurrentItems = /* @__PURE__ */ new WeakSet(), this._jsonLdId = `${g()}-ld`;
49
51
  }
50
52
  // ─── Item Helpers ───
51
53
  /**
@@ -165,7 +167,7 @@ let o = class extends u {
165
167
  }
166
168
  // ─── Lifecycle ───
167
169
  connectedCallback() {
168
- super.connectedCallback(), this.hasAttribute("role") || this.setAttribute("role", "list"), this.addEventListener("click", this._boundEllipsisClick), this.addEventListener("keydown", this._boundEllipsisKeydown);
170
+ super.connectedCallback(), this.addEventListener("click", this._boundEllipsisClick), this.addEventListener("keydown", this._boundEllipsisKeydown);
169
171
  }
170
172
  disconnectedCallback() {
171
173
  super.disconnectedCallback(), this.removeEventListener("click", this._boundEllipsisClick), this.removeEventListener("keydown", this._boundEllipsisKeydown), this._removeJsonLd();
@@ -202,8 +204,7 @@ let o = class extends u {
202
204
  `;
203
205
  }
204
206
  };
205
- o.styles = [x];
206
- o._instanceCounter = 0;
207
+ o.styles = [y];
207
208
  p([
208
209
  n({ type: String })
209
210
  ], o.prototype, "separator", 2);
@@ -222,7 +223,7 @@ p([
222
223
  o = p([
223
224
  b("hx-breadcrumb")
224
225
  ], o);
225
- const _ = m`
226
+ const L = m`
226
227
  :host {
227
228
  display: inline-flex;
228
229
  align-items: center;
@@ -295,18 +296,34 @@ const _ = m`
295
296
  color: inherit;
296
297
  padding: 0;
297
298
  }
299
+
300
+ /* ─── Forced Colors (Windows High Contrast) ─── */
301
+
302
+ @media (forced-colors: active) {
303
+ [part='link'] {
304
+ color: LinkText;
305
+ }
306
+
307
+ [part='link']:hover {
308
+ color: LinkText;
309
+ }
310
+
311
+ .separator {
312
+ color: CanvasText;
313
+ }
314
+ }
298
315
  `;
299
- var g = Object.defineProperty, L = Object.getOwnPropertyDescriptor, h = (t, e, s, i) => {
300
- for (var r = i > 1 ? void 0 : i ? L(e, s) : e, a = t.length - 1, l; a >= 0; a--)
316
+ var C = Object.defineProperty, I = Object.getOwnPropertyDescriptor, h = (t, e, s, i) => {
317
+ for (var r = i > 1 ? void 0 : i ? I(e, s) : e, a = t.length - 1, l; a >= 0; a--)
301
318
  (l = t[a]) && (r = (i ? l(e, s, r) : l(r)) || r);
302
- return i && r && g(e, s, r), r;
319
+ return i && r && C(e, s, r), r;
303
320
  };
304
321
  let c = class extends u {
305
322
  constructor() {
306
323
  super(...arguments), this.href = void 0, this.dataBcLast = !1, this.current = !1;
307
324
  }
308
325
  connectedCallback() {
309
- super.connectedCallback(), this.closest("hx-breadcrumb") !== null ? this.setAttribute("role", "listitem") : this.removeAttribute("role");
326
+ super.connectedCallback();
310
327
  }
311
328
  render() {
312
329
  return d`
@@ -317,7 +334,7 @@ let c = class extends u {
317
334
  `;
318
335
  }
319
336
  };
320
- c.styles = [_];
337
+ c.styles = [L];
321
338
  h([
322
339
  n({ type: String, reflect: !0 })
323
340
  ], c.prototype, "href", 2);
@@ -334,4 +351,4 @@ export {
334
351
  o as H,
335
352
  c as a
336
353
  };
337
- //# sourceMappingURL=hx-breadcrumb-item-jLAKK038.js.map
354
+ //# sourceMappingURL=hx-breadcrumb-item-BCUIvpYX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-breadcrumb-item-BCUIvpYX.js","sources":["../../src/components/hx-breadcrumb/hx-breadcrumb.styles.ts","../../src/components/hx-breadcrumb/hx-breadcrumb.ts","../../src/components/hx-breadcrumb/hx-breadcrumb-item.styles.ts","../../src/components/hx-breadcrumb/hx-breadcrumb-item.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixBreadcrumbStyles = css`\n :host {\n display: block;\n font-family: var(\n --hx-breadcrumb-font-family,\n var(--hx-font-family-sans, system-ui, sans-serif)\n );\n font-size: var(--hx-breadcrumb-font-size, var(--hx-font-size-sm, 0.875rem));\n }\n\n [part='nav'] {\n /* nav landmark — no additional styling needed */\n }\n\n [part='list'] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n gap: 0;\n }\n\n /* Hide middle items when collapsed via maxItems */\n ::slotted([data-bc-hidden]) {\n display: none;\n }\n\n /* Visually hide the separator slot — used only to read text content.\n * display:none is intentional: the slot contains no interactive or focusable\n * content. If a future change adds focusable elements to this slot, switch to\n * visibility:hidden + position:absolute to preserve focus reachability. */\n .separator-slot {\n display: none;\n }\n`;\n","import { LitElement, html, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { createIdCounter } from '../../base/index.js';\nimport { helixBreadcrumbStyles } from './hx-breadcrumb.styles.js';\n\n/** Typed schema.org ListItem entry for JSON-LD BreadcrumbList structured data. */\ninterface JsonLdListItem {\n '@type': string;\n position: number;\n name: string;\n item?: string;\n}\n\nconst _nextBreadcrumbId = createIdCounter('hx-breadcrumb');\n\n/**\n * Hierarchical page path navigation showing current location in site structure.\n *\n * @summary Navigation breadcrumb showing the page hierarchy. Works with Drupal's breadcrumb system.\n *\n * @tag hx-breadcrumb\n *\n * @slot - Default slot for hx-breadcrumb-item children.\n * @slot separator - Optional separator element. Its text content overrides the `separator` property.\n *\n * @csspart nav - The nav landmark element.\n * @csspart list - The ordered list containing items.\n *\n * @cssprop [--hx-breadcrumb-separator-content='/'] - Separator character between items.\n * NOTE: If overriding this custom property directly in CSS (rather than via the `separator`\n * attribute), the value MUST be quoted: `--hx-breadcrumb-separator-content: \">\"`. An unquoted\n * value is invalid for the CSS `content` property and will silently render nothing.\n * @cssprop [--hx-breadcrumb-separator-color=var(--hx-color-neutral-400)] - Separator color.\n * @cssprop [--hx-breadcrumb-separator-gap=var(--hx-space-1)] - Horizontal gap around separators.\n * @cssprop [--hx-breadcrumb-font-size=var(--hx-font-size-sm)] - Font size.\n * @cssprop [--hx-breadcrumb-link-color=var(--hx-color-primary-600)] - Link color.\n * @cssprop [--hx-breadcrumb-link-hover-color=var(--hx-color-primary-700)] - Link hover color.\n * @cssprop [--hx-breadcrumb-text-color=var(--hx-color-neutral-700)] - Current page text color.\n * @cssprop [--hx-breadcrumb-item-max-width] - Max-width for item text truncation (e.g. `12rem`).\n */\n@customElement('hx-breadcrumb')\nexport class HelixBreadcrumb extends LitElement {\n static override styles = [helixBreadcrumbStyles];\n\n /**\n * The separator character displayed between breadcrumb items.\n * @attr separator\n */\n @property({ type: String })\n separator = '/';\n\n /**\n * The accessible label for the nav landmark.\n * @attr label\n */\n @property({ type: String })\n label = 'Breadcrumb';\n\n /**\n * Maximum number of items to show before collapsing middle items with an ellipsis.\n * Set to 0 (default) to show all items. The ellipsis is a keyboard-accessible\n * button; activating it expands the full breadcrumb by setting maxItems to 0.\n * @attr max-items\n */\n @property({ type: Number, attribute: 'max-items' })\n maxItems = 0;\n\n /**\n * Accessible label for the expand ellipsis button. Override for i18n.\n * @attr label-ellipsis\n */\n @property({ attribute: 'label-ellipsis' }) labelEllipsis = 'Show all breadcrumb items';\n\n /**\n * When true, injects a JSON-LD BreadcrumbList structured data script into the document head.\n *\n * NOTE: Drupal manages `<head>` content via its own render pipeline. Injecting a\n * `<script>` directly via `document.head.appendChild()` in a Drupal context:\n * 1. Bypasses Drupal's deduplication and `hook_html_head_alter()` hook.\n * 2. Is not cacheable by Drupal's page cache.\n * 3. Will be wiped on BigPipe partial page replacements.\n *\n * For Drupal integrations, leave `json-ld` false and use the structured data\n * Twig template instead (see `hx-breadcrumb.twig` in the component directory).\n *\n * @attr json-ld\n */\n @property({ type: Boolean, attribute: 'json-ld' })\n jsonLd = false;\n\n /** @internal */\n private _ellipsisItem: Element | null = null;\n /** @internal */\n private _jsonLdScript: HTMLScriptElement | null = null;\n /** @internal */\n private readonly _boundEllipsisClick = (e: Event) => this._handleEllipsisClick(e);\n /** @internal */\n private readonly _boundEllipsisKeydown = (e: Event) => this._handleEllipsisKeydown(e);\n\n /**\n * Tracks which items had their `current` attribute set by this component\n * (as opposed to set by a consumer/Drupal template). This lets us re-evaluate\n * positional current-page detection on each slotchange without incorrectly\n * treating a previously component-set `current` attribute as a consumer-set\n * explicit override.\n * @internal\n */\n private readonly _managedCurrentItems = new WeakSet<Element>();\n\n /**\n * Stable per-instance ID used to tag the injected script element so that\n * multiple hx-breadcrumb instances on the same page don't produce conflicting\n * or duplicate structured-data blocks. Each instance owns exactly one script\n * tag identified by this ID; any stale tag from a previous render cycle is\n * removed before a new one is inserted.\n *\n * Uses a static counter (not Math.random()) so IDs are deterministic across\n * server and client renders, enabling SSR hydration matching.\n * @internal\n */\n private readonly _jsonLdId = `${_nextBreadcrumbId()}-ld`;\n\n // ─── Item Helpers ───\n\n /**\n * Returns only real breadcrumb items, excluding the managed ellipsis element.\n * @internal\n */\n private _getBreadcrumbItems(slot: HTMLSlotElement): Element[] {\n return slot\n .assignedElements({ flatten: true })\n .filter(\n (el) =>\n el.tagName.toLowerCase() === 'hx-breadcrumb-item' &&\n !el.classList.contains('hx-bc-ellipsis'),\n );\n }\n\n /**\n * Applies aria/state attributes to the item list.\n *\n * Current-page detection: if any item has an explicit `current` attribute\n * (e.g. set by a Drupal Twig template), that item is treated as the current\n * page. Otherwise the last item is the current page (default behaviour).\n *\n * This separation allows Drupal to control current-page marking without\n * relying on item order.\n * @internal\n */\n private _applyItemAttributes(items: Element[]): void {\n // Detect consumer-set 'current' attributes. An item has an explicit consumer\n // current if it has the 'current' attribute AND the component did not set it\n // (tracked via _managedCurrentItems). This prevents component-managed state\n // from being misread as a consumer override on subsequent slotchange events.\n const hasExplicitCurrent = items.some(\n (el) => el.hasAttribute('current') && !this._managedCurrentItems.has(el),\n );\n\n items.forEach((item, i) => {\n const el = item as HTMLElement;\n const isLast = i === items.length - 1;\n\n // Separator hiding: always positional — last item has no trailing separator.\n if (isLast) {\n el.setAttribute('data-bc-last', '');\n } else {\n el.removeAttribute('data-bc-last');\n }\n\n // Current-page marker: explicit consumer attribute wins over positional last.\n // The item component renders aria-current=\"page\" on its inner element\n // based on this attribute (see hx-breadcrumb-item.ts).\n if (!hasExplicitCurrent) {\n if (isLast) {\n el.setAttribute('current', '');\n this._managedCurrentItems.add(el);\n } else {\n el.removeAttribute('current');\n this._managedCurrentItems.delete(el);\n }\n }\n // When hasExplicitCurrent is true, leave 'current' attributes as-is so\n // consumer or Drupal template markup is not overridden.\n });\n }\n\n // ─── Slot Handling ───\n\n /** @internal */\n private _handleSlotChange(e: Event): void {\n if (!(e.target instanceof HTMLSlotElement)) return;\n const items = this._getBreadcrumbItems(e.target);\n\n // Handle collapse behaviour\n if (this.maxItems > 0 && items.length > this.maxItems) {\n this._applyCollapse(items);\n } else {\n this._removeCollapse(items);\n }\n\n this._applyItemAttributes(items);\n\n if (this.jsonLd) {\n this._updateJsonLd(items);\n }\n }\n\n /** @internal */\n private _handleSeparatorSlotChange(e: Event): void {\n if (!(e.target instanceof HTMLSlotElement)) return;\n const assigned = e.target.assignedElements({ flatten: true });\n if (assigned.length > 0) {\n const text = (assigned[0] as HTMLElement).textContent?.trim() ?? '';\n this.style.setProperty('--hx-breadcrumb-separator-content', JSON.stringify(text));\n }\n }\n\n // ─── Collapse ───\n\n /** @internal */\n private _applyCollapse(items: Element[]): void {\n // Show only first and last; hide all middle items\n items.forEach((item, i) => {\n const el = item as HTMLElement;\n if (i === 0 || i === items.length - 1) {\n el.removeAttribute('data-bc-hidden');\n } else {\n el.setAttribute('data-bc-hidden', '');\n }\n });\n\n // Create the ellipsis element once (guard for SSR — document is unavailable server-side)\n if (!this._ellipsisItem && typeof document !== 'undefined') {\n const ellipsis = document.createElement('hx-breadcrumb-item');\n ellipsis.classList.add('hx-bc-ellipsis');\n\n // Keyboard-accessible expand button. Events handled via host-level delegation\n // in _handleEllipsisClick / _handleEllipsisKeydown.\n const btn = document.createElement('button');\n btn.type = 'button';\n btn.textContent = '…';\n btn.setAttribute('aria-label', this.labelEllipsis);\n ellipsis.appendChild(btn);\n\n this._ellipsisItem = ellipsis;\n }\n\n // Insert ellipsis after first item only if not already correctly placed\n const firstItem = items[0];\n if (!firstItem || !this._ellipsisItem) return;\n if (this._ellipsisItem.previousElementSibling !== firstItem) {\n firstItem.after(this._ellipsisItem);\n }\n }\n\n /** @internal */\n private _removeCollapse(items: Element[]): void {\n items.forEach((item) => {\n (item as HTMLElement).removeAttribute('data-bc-hidden');\n });\n\n if (this._ellipsisItem?.isConnected) {\n this._ellipsisItem.remove();\n }\n }\n\n /** @internal */\n private _handleEllipsisClick(e: Event): void {\n if ((e.target as Element)?.closest?.('.hx-bc-ellipsis')) {\n this._expandBreadcrumb();\n }\n }\n\n /** @internal */\n private _handleEllipsisKeydown(e: Event): void {\n if (!(e instanceof KeyboardEvent)) return;\n if (e.key === 'Enter' || e.key === ' ') {\n if ((e.target as Element)?.closest?.('.hx-bc-ellipsis')) {\n e.preventDefault();\n this._expandBreadcrumb();\n }\n }\n }\n\n /**\n * Expands a collapsed breadcrumb by resetting maxItems to 0.\n * Called by the ellipsis expand button (click or Enter/Space).\n * @internal\n */\n private _expandBreadcrumb(): void {\n this.maxItems = 0;\n // updated() will detect the maxItems change and call _removeCollapse.\n }\n\n // ─── JSON-LD ───\n\n /**\n * JSON-LD ListItem entry with typed fields to avoid Record<string, unknown>.\n * @internal\n */\n private _buildListItem(item: Element, position: number): JsonLdListItem {\n const href = (item as HTMLElement).getAttribute('href');\n const name = (item as HTMLElement).textContent?.trim() ?? '';\n const entry: JsonLdListItem = {\n '@type': 'ListItem',\n position,\n name,\n };\n if (href) entry.item = href;\n return entry;\n }\n\n /** @internal */\n private _updateJsonLd(items: Element[]): void {\n const schema = {\n '@context': 'https://schema.org',\n '@type': 'BreadcrumbList',\n itemListElement: items.map((item, i) => this._buildListItem(item, i + 1)),\n };\n\n // Guard for SSR — document is unavailable server-side\n if (typeof document === 'undefined') return;\n\n if (!this._jsonLdScript) {\n // Dedup guard: remove any stale script with this instance's ID before\n // creating a fresh one. This handles the edge case where the element was\n // reconnected to the DOM after being disconnected without the script\n // reference being re-established.\n document.getElementById(this._jsonLdId)?.remove();\n\n this._jsonLdScript = document.createElement('script');\n this._jsonLdScript.type = 'application/ld+json';\n this._jsonLdScript.id = this._jsonLdId;\n this._jsonLdScript.setAttribute('data-hx-breadcrumb', '');\n document.head.appendChild(this._jsonLdScript);\n }\n\n this._jsonLdScript.textContent = JSON.stringify(schema);\n }\n\n /** @internal */\n private _removeJsonLd(): void {\n this._jsonLdScript?.remove();\n this._jsonLdScript = null;\n }\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Do NOT set role=\"list\" on the host. The shadow-DOM <nav><ol> provides\n // both navigation landmark and list semantics. Setting role=\"list\" on\n // the host conflicts with the <nav> child — axe-core flags\n // aria-required-children because a list cannot own a navigation landmark.\n // Slotted items no longer need role=\"listitem\" either; the native <ol>\n // handles list semantics in the composed accessibility tree.\n this.addEventListener('click', this._boundEllipsisClick);\n this.addEventListener('keydown', this._boundEllipsisKeydown);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('click', this._boundEllipsisClick);\n this.removeEventListener('keydown', this._boundEllipsisKeydown);\n this._removeJsonLd();\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n\n if (changedProperties.has('separator')) {\n // JSON.stringify wraps the string in quotes so the value is valid\n // for use in the CSS `content` property (e.g. '/' becomes '\"/\"').\n this.style.setProperty('--hx-breadcrumb-separator-content', JSON.stringify(this.separator));\n }\n\n if (changedProperties.has('maxItems')) {\n // Re-evaluate collapse state when maxItems changes programmatically\n // (e.g. when the expand button resets maxItems to 0).\n const slot = this.shadowRoot?.querySelector<HTMLSlotElement>('slot:not([name])');\n if (slot) {\n const items = this._getBreadcrumbItems(slot);\n if (this.maxItems > 0 && items.length > this.maxItems) {\n this._applyCollapse(items);\n } else {\n this._removeCollapse(items);\n }\n this._applyItemAttributes(items);\n }\n }\n\n if (changedProperties.has('jsonLd')) {\n if (this.jsonLd) {\n // json-ld toggled on after initial render — inject script immediately.\n const slot = this.shadowRoot?.querySelector<HTMLSlotElement>('slot:not([name])');\n if (slot) {\n this._updateJsonLd(this._getBreadcrumbItems(slot));\n }\n } else {\n // json-ld toggled off — remove existing script.\n this._removeJsonLd();\n }\n }\n }\n\n // ─── Render ───\n\n override render() {\n return html`\n <nav part=\"nav\" aria-label=${this.label}>\n <ol part=\"list\">\n <slot @slotchange=${this._handleSlotChange}></slot>\n </ol>\n </nav>\n <slot\n name=\"separator\"\n class=\"separator-slot\"\n @slotchange=${this._handleSeparatorSlotChange}\n ></slot>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-breadcrumb': HelixBreadcrumb;\n }\n}\n","import { css } from 'lit';\n\nexport const helixBreadcrumbItemStyles = css`\n :host {\n display: inline-flex;\n align-items: center;\n }\n\n /*\n * display: contents removes [part='item'] from the box model entirely.\n * This is intentional — the wrapper exists only for slot selection purposes.\n * Consumers using ::part(item) CANNOT apply box-model properties (padding,\n * margin, background, border) to this part. Use ::part(link) or ::part(text)\n * for visual styling of breadcrumb item content.\n */\n [part='item'] {\n display: contents;\n }\n\n [part='link'] {\n color: var(--hx-breadcrumb-link-color, var(--hx-color-primary-600));\n text-decoration: none;\n cursor: pointer;\n font-family: inherit;\n font-size: inherit;\n max-width: var(--hx-breadcrumb-item-max-width);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n [part='link']:hover {\n color: var(--hx-breadcrumb-link-hover-color, var(--hx-color-primary-700));\n text-decoration: underline;\n }\n\n [part='link']:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(\n --hx-breadcrumb-link-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-radius: var(--hx-border-radius-sm, 0.125rem);\n }\n\n [part='text'] {\n color: var(--hx-breadcrumb-text-color, var(--hx-color-neutral-700));\n font-family: inherit;\n font-size: inherit;\n max-width: var(--hx-breadcrumb-item-max-width);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .separator {\n margin-inline: var(--hx-breadcrumb-separator-gap, var(--hx-space-1, 0.25rem));\n color: var(--hx-breadcrumb-separator-color, var(--hx-color-neutral-400));\n user-select: none;\n }\n\n .separator::before {\n content: var(--hx-breadcrumb-separator-content, '/');\n }\n\n /* Normalize buttons slotted into breadcrumb items (e.g. the expand-ellipsis button). */\n ::slotted(button) {\n background: none;\n border: none;\n cursor: pointer;\n font: inherit;\n color: inherit;\n padding: 0;\n }\n\n /* ─── Forced Colors (Windows High Contrast) ─── */\n\n @media (forced-colors: active) {\n [part='link'] {\n color: LinkText;\n }\n\n [part='link']:hover {\n color: LinkText;\n }\n\n .separator {\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 { helixBreadcrumbItemStyles } from './hx-breadcrumb-item.styles.js';\n\n/**\n * A single breadcrumb navigation item.\n *\n * @summary A navigation item within an hx-breadcrumb component. Renders as a link when `href` is\n * provided, or as static text for the current page item. The current page item is determined by\n * the `current` attribute (set explicitly or automatically by the parent `hx-breadcrumb`).\n *\n * @tag hx-breadcrumb-item\n *\n * @slot - The link or page text content. Accepts text, HTML, or icon elements.\n *\n * @csspart item - Wrapper around the link or text content.\n * @csspart link - The anchor element when href is provided (non-current items only).\n * @csspart text - The span element for the current page or items without href.\n * @csspart separator - The separator element rendered after non-last items.\n *\n * @cssprop [--hx-breadcrumb-link-color=var(--hx-color-primary-600)] - Link text color.\n * @cssprop [--hx-breadcrumb-link-hover-color=var(--hx-color-primary-700)] - Link hover text color.\n * @cssprop [--hx-breadcrumb-text-color=var(--hx-color-neutral-700)] - Current page text color.\n * @cssprop [--hx-breadcrumb-separator-content='/'] - Separator character displayed after non-last items.\n * @cssprop [--hx-breadcrumb-separator-color=var(--hx-color-neutral-400)] - Separator color.\n * @cssprop [--hx-breadcrumb-separator-gap=var(--hx-space-1)] - Horizontal margin around separator.\n * @cssprop [--hx-breadcrumb-item-max-width] - Optional max-width for text truncation.\n * @cssprop [--hx-breadcrumb-link-focus-ring-color=var(--hx-focus-ring-color, var(--hx-color-primary-500))] - Focus ring color for breadcrumb links.\n */\n@customElement('hx-breadcrumb-item')\nexport class HelixBreadcrumbItem extends LitElement {\n static override styles = [helixBreadcrumbItemStyles];\n\n override connectedCallback(): void {\n super.connectedCallback();\n // No explicit role needed. The shadow-DOM <ol> inside hx-breadcrumb\n // provides native list semantics; slotted items are projected into it.\n // Previously role=\"listitem\" was set here, but it conflicted with the\n // host's role=\"list\" + shadow-DOM <nav> structure (aria-required-children).\n // The native <ol> handles the accessibility tree correctly without\n // explicit ARIA roles on host or items.\n }\n\n /**\n * The URL for this breadcrumb link. Omit for the current page item.\n * When `current` is true, this attribute is ignored and the item always\n * renders as static text per WAI-ARIA APG breadcrumb guidance.\n * @attr href\n */\n @property({ type: String, reflect: true })\n href: string | undefined = undefined;\n\n /**\n * Whether this is the last item in the breadcrumb trail. Set by the parent\n * hx-breadcrumb component via the `data-bc-last` boolean attribute. When\n * present the trailing separator is hidden.\n *\n * @attr data-bc-last\n * @internal\n */\n @property({ type: Boolean, attribute: 'data-bc-last', reflect: true })\n dataBcLast = false;\n\n /**\n * Marks this item as the current page. When set, the item always renders as\n * static text (never a navigable link) and `aria-current=\"page\"` is placed on\n * the inner text element per WAI-ARIA APG breadcrumb guidance, yielding the\n * canonical AT announcement (\"current page, Patient Records\").\n *\n * Can be set explicitly by consumers (e.g. Drupal Twig templates) to override\n * the default positional last-item detection in `hx-breadcrumb`. When any item\n * in the breadcrumb has an explicit `current` attribute, the parent will not\n * override it.\n *\n * @attr current\n */\n @property({ type: Boolean, reflect: true })\n current = false;\n\n override render() {\n // Per WAI-ARIA APG, the current page item MUST NOT be a navigable link.\n // aria-current=\"page\" is placed on the inner element (not the listitem host)\n // for canonical AT announcement (\"current page, Patient Records\" vs\n // \"current page, list item\").\n return html`\n <span part=\"item\">\n ${this.current\n ? html`<span part=\"text\" aria-current=\"page\"><slot></slot></span>`\n : this.href\n ? html`<a part=\"link\" href=${this.href}><slot></slot></a>`\n : html`<span part=\"text\"><slot></slot></span>`}\n </span>\n ${!this.dataBcLast\n ? html`<span class=\"separator\" part=\"separator\" aria-hidden=\"true\"></span>`\n : nothing}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-breadcrumb-item': HelixBreadcrumbItem;\n }\n}\n"],"names":["helixBreadcrumbStyles","css","_nextBreadcrumbId","createIdCounter","HelixBreadcrumb","LitElement","e","slot","el","items","hasExplicitCurrent","item","isLast","assigned","text","_a","ellipsis","btn","firstItem","_b","position","href","name","entry","schema","i","changedProperties","html","__decorateClass","property","customElement","helixBreadcrumbItemStyles","HelixBreadcrumbItem","nothing"],"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;;;;;;ACYrC,MAAMC,IAAoBC,EAAgB,eAAe;AA4BlD,IAAMC,IAAN,cAA8BC,EAAW;AAAA,EAAzC,cAAA;AAAA,UAAA,GAAA,SAAA,GAQL,KAAA,YAAY,KAOZ,KAAA,QAAQ,cASR,KAAA,WAAW,GAMgC,KAAA,gBAAgB,6BAiB3D,KAAA,SAAS,IAGT,KAAQ,gBAAgC,MAExC,KAAQ,gBAA0C,MAElD,KAAiB,sBAAsB,CAACC,MAAa,KAAK,qBAAqBA,CAAC,GAEhF,KAAiB,wBAAwB,CAACA,MAAa,KAAK,uBAAuBA,CAAC,GAUpF,KAAiB,2CAA2B,QAAA,GAa5C,KAAiB,YAAY,GAAGJ,EAAA,CAAmB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,E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QAW3B,KAAA,aAAa,IAgBb,KAAA,UAAU;AAAA,EAAA;AAAA,EA5CD,oBAA0B;AACjC,UAAM,kBAAA;AAAA,EAOR;AAAA,EAsCS,SAAS;AAKhB,WAAOsB;AAAA;AAAA,UAED,KAAK,UACHA,gEACA,KAAK,OACHA,wBAA2B,KAAK,IAAI,uBACpCA,yCAA4C;AAAA;AAAA,QAEjD,KAAK,aAEJM,IADAN,sEACO;AAAA;AAAA,EAEf;AACF;AAnEaK,EACK,SAAS,CAACD,CAAyB;AAmBnDH,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAnB9BG,EAoBX,WAAA,QAAA,CAAA;AAWAJ,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,WAAW,gBAAgB,SAAS,IAAM;AAAA,GA9B1DG,EA+BX,WAAA,cAAA,CAAA;AAgBAJ,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA9C/BG,EA+CX,WAAA,WAAA,CAAA;AA/CWA,IAANJ,EAAA;AAAA,EADNE,EAAc,oBAAoB;AAAA,GACtBE,CAAA;"}
@@ -1,10 +1,11 @@
1
- import { css as c, html as l, nothing as n, LitElement as p } from "lit";
1
+ import { css as c, html as l, nothing as n } from "lit";
2
2
  import "./document-token-adoption-DuYNKd4k.js";
3
- import { property as o, customElement as x } from "lit/decorators.js";
3
+ import { property as o, customElement as p } from "lit/decorators.js";
4
4
  import { classMap as d } from "lit/directives/class-map.js";
5
5
  import { ifDefined as v } from "lit/directives/if-defined.js";
6
- import { d as f } from "./dev-warn-YlwPHjtX.js";
7
- import { m as g } from "./aria-delegation-CBP9eQ0M.js";
6
+ import { d as x } from "./dev-warn-YlwPHjtX.js";
7
+ import { m as f } from "./aria-delegation-Doq6RRUy.js";
8
+ import { H as g } from "./helix-element-BJh1Ffvi.js";
8
9
  const m = c`
9
10
  :host {
10
11
  display: inline-block;
@@ -67,10 +68,13 @@ const m = c`
67
68
 
68
69
  /* ─── Size Variants ─── */
69
70
 
71
+ /* WCAG 2.5.5 (healthcare mandate): minimum 44px touch target for sm variant.
72
+ min-height uses --hx-touch-target-min to guarantee the interactive area
73
+ meets the threshold even though the visual size token is smaller. */
70
74
  .button--sm {
71
75
  padding: var(--hx-space-1, 0.25rem) var(--hx-space-3, 0.75rem);
72
76
  font-size: var(--hx-font-size-sm, 0.875rem);
73
- min-height: var(--hx-size-8, 2rem);
77
+ min-height: var(--hx-touch-target-min, 2.75rem);
74
78
  }
75
79
 
76
80
  .button--md {
@@ -307,23 +311,18 @@ var y = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (r, a, s
307
311
  (b = r[u]) && (i = (h ? b(a, s, i) : b(i)) || i);
308
312
  return h && i && y(a, s, i), i;
309
313
  };
310
- let t = class extends g(p) {
314
+ let t = class extends f(g) {
311
315
  constructor() {
312
- super(), this.variant = "primary", this.size = "md", this.disabled = !1, this.loading = !1, this.type = "button", this.href = void 0, this.target = void 0, this.name = void 0, this.value = void 0, this.full = !1, this.inverted = !1, this._internals = this.attachInternals();
316
+ super(...arguments), this.variant = "primary", this.size = "md", this.disabled = !1, this.loading = !1, this.type = "button", this.href = void 0, this.target = void 0, this.name = void 0, this.value = void 0, this.full = !1, this.inverted = !1;
313
317
  }
314
318
  // ─── Form API ───
315
- /** Returns the associated form element, if any. */
316
- get form() {
317
- return this._internals.form;
318
- }
319
- /** @internal */
320
- formDisabledCallback(r) {
319
+ _onFormDisabled(r) {
321
320
  this.disabled = r;
322
321
  }
323
322
  updated(r) {
324
323
  if (super.updated(r), r.has("variant")) {
325
324
  const a = [...t._VALID_VARIANTS];
326
- a.includes(this.variant) || (f(
325
+ a.includes(this.variant) || (x(
327
326
  "hx-button",
328
327
  `Invalid variant "${this.variant}". Expected one of: ${a.join(", ")}. Clamping to "primary".`
329
328
  ), this.variant = "primary");
@@ -485,9 +484,9 @@ e([
485
484
  o({ type: Boolean, reflect: !0 })
486
485
  ], t.prototype, "inverted", 2);
487
486
  t = e([
488
- x("hx-button")
487
+ p("hx-button")
489
488
  ], t);
490
489
  export {
491
490
  t as H
492
491
  };
493
- //# sourceMappingURL=hx-button-DoN8jjQT.js.map
492
+ //# sourceMappingURL=hx-button-BzqsDHmZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-button-BzqsDHmZ.js","sources":["../../src/components/hx-button/hx-button.styles.ts","../../src/components/hx-button/hx-button.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixButtonStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled, 0.5);\n }\n\n :host([full]) {\n display: block;\n width: 100%;\n }\n\n :host([full]) .button {\n width: 100%;\n justify-content: center;\n }\n\n /* ─── Base Button ─── */\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--hx-space-2, 0.5rem);\n border: var(--hx-border-width-thin, 1px) solid var(--hx-button-border-color, transparent);\n border-radius: var(--hx-button-border-radius, var(--hx-border-radius-md, 0.375rem));\n background-color: var(--hx-button-bg, var(--hx-color-primary-500, #2563eb));\n color: var(--hx-button-color, var(--hx-color-neutral-0, #ffffff));\n font-family: var(--hx-button-font-family, var(--hx-font-family-sans, sans-serif));\n font-weight: var(--hx-button-font-weight, var(--hx-font-weight-semibold, 600));\n line-height: var(--hx-line-height-tight, 1.25);\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n color var(--hx-transition-fast, 150ms ease),\n border-color var(--hx-transition-fast, 150ms ease),\n box-shadow var(--hx-transition-fast, 150ms ease);\n text-decoration: none;\n white-space: nowrap;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-button-focus-ring-color, var(--hx-focus-ring-color, var(--hx-color-primary-500)));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .button:hover {\n filter: brightness(var(--hx-filter-brightness-hover, 0.9));\n }\n\n .button:active {\n filter: brightness(var(--hx-filter-brightness-active, 0.8));\n }\n\n /* ─── Size Variants ─── */\n\n /* WCAG 2.5.5 (healthcare mandate): minimum 44px touch target for sm variant.\n min-height uses --hx-touch-target-min to guarantee the interactive area\n meets the threshold even though the visual size token is smaller. */\n .button--sm {\n padding: var(--hx-space-1, 0.25rem) var(--hx-space-3, 0.75rem);\n font-size: var(--hx-font-size-sm, 0.875rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n }\n\n .button--md {\n padding: var(--hx-space-2, 0.5rem) var(--hx-space-4, 1rem);\n font-size: var(--hx-font-size-md, 1rem);\n min-height: var(--hx-size-10, 2.5rem);\n }\n\n .button--lg {\n padding: var(--hx-space-3, 0.75rem) var(--hx-space-6, 1.5rem);\n font-size: var(--hx-font-size-lg, 1.125rem);\n min-height: var(--hx-size-12, 3rem);\n }\n\n /* ─── Style Variants ─── */\n\n .button--primary {\n --hx-button-bg: var(--hx-color-primary-500);\n --hx-button-color: var(--hx-color-neutral-0);\n --hx-button-border-color: transparent;\n }\n\n .button--secondary {\n --hx-button-bg: transparent;\n --hx-button-color: var(--hx-color-primary-500);\n --hx-button-border-color: var(--hx-color-primary-500);\n }\n\n .button--secondary:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-primary-50));\n }\n\n .button--tertiary {\n --hx-button-bg: var(--hx-color-neutral-100);\n --hx-button-color: var(--hx-color-neutral-900);\n --hx-button-border-color: transparent;\n }\n\n .button--tertiary:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-neutral-200));\n }\n\n .button--danger {\n --hx-button-bg: var(--hx-color-error-500);\n --hx-button-color: var(--hx-color-neutral-0);\n --hx-button-border-color: transparent;\n }\n\n .button--danger:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-error-600));\n }\n\n .button--ghost {\n --hx-button-bg: transparent;\n --hx-button-color: var(--hx-color-primary-500);\n --hx-button-border-color: transparent;\n }\n\n .button--ghost:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-neutral-100));\n }\n\n .button--outline {\n --hx-button-bg: transparent;\n --hx-button-color: var(--hx-color-neutral-900);\n --hx-button-border-color: var(--hx-color-neutral-300);\n }\n\n .button--outline:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-neutral-50));\n }\n\n .button--primary:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-primary-500));\n }\n\n /* ─── Disabled ─── */\n\n /* Note: opacity is applied on :host([disabled]) above — do NOT add opacity here.\n Stacking opacity on both :host and .button[disabled] would multiply to 0.25. */\n .button[disabled] {\n cursor: not-allowed;\n }\n\n /* ─── Loading State ─── */\n\n .button--loading {\n position: relative;\n cursor: wait;\n }\n\n .button__spinner {\n width: 1em;\n height: 1em;\n flex-shrink: 0;\n animation: hx-spin var(--hx-duration-spinner, 750ms) linear infinite;\n }\n\n @keyframes hx-spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .button {\n transition: none;\n }\n\n .button__spinner {\n animation: none;\n opacity: var(--hx-opacity-muted, 0.6);\n }\n }\n\n /* ─── Inverted Mode ─── */\n\n /* Override text color and filter-based hover/active for all variants */\n :host([inverted]) .button {\n color: var(--hx-button-inverted-color, var(--hx-color-neutral-0));\n filter: none;\n }\n\n :host([inverted]) .button:hover {\n filter: none;\n }\n\n :host([inverted]) .button:active {\n filter: none;\n }\n\n :host([inverted]) .button:focus-visible {\n outline-color: var(\n --hx-button-inverted-focus-ring-color,\n var(--hx-overlay-white-50, rgba(255, 255, 255, 0.5))\n );\n }\n\n /* Primary inverted — slight transparent white overlay on hover */\n :host([inverted]) .button--primary:hover {\n --hx-button-bg: var(--hx-color-primary-400, #3b82f6);\n }\n\n /* Secondary inverted — white border and text */\n :host([inverted]) .button--secondary {\n --hx-button-border-color: var(--hx-overlay-white-70, rgba(255, 255, 255, 0.7));\n }\n\n :host([inverted]) .button--secondary:hover {\n --hx-button-bg: var(--hx-overlay-white-15, rgba(255, 255, 255, 0.15));\n }\n\n /* Tertiary inverted */\n :host([inverted]) .button--tertiary {\n --hx-button-bg: var(--hx-overlay-white-15, rgba(255, 255, 255, 0.15));\n --hx-button-border-color: transparent;\n }\n\n :host([inverted]) .button--tertiary:hover {\n --hx-button-bg: var(--hx-overlay-white-25, rgba(255, 255, 255, 0.25));\n }\n\n /* Ghost inverted — transparent base, white hover bg */\n :host([inverted]) .button--ghost {\n --hx-button-bg: transparent;\n --hx-button-border-color: transparent;\n }\n\n :host([inverted]) .button--ghost:hover {\n --hx-button-bg: var(\n --hx-button-inverted-ghost-hover-bg,\n var(--hx-overlay-white-20, rgba(255, 255, 255, 0.2))\n );\n }\n\n /* Outline inverted — white border */\n :host([inverted]) .button--outline {\n --hx-button-border-color: var(--hx-overlay-white-70, rgba(255, 255, 255, 0.7));\n }\n\n :host([inverted]) .button--outline:hover {\n --hx-button-bg: var(--hx-overlay-white-15, rgba(255, 255, 255, 0.15));\n }\n\n /* ─── Prefix / Suffix / Label ─── */\n\n .button__prefix,\n .button__suffix {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n .button__label {\n flex: 1 1 auto;\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n .button {\n /* Ensure button outline is visible in Windows High Contrast mode.\n ButtonText/ButtonFace are system colors recognized by the browser. */\n forced-color-adjust: none;\n background-color: ButtonFace;\n color: ButtonText;\n border: 2px solid ButtonText;\n }\n\n .button:focus-visible {\n outline: 3px solid Highlight;\n outline-offset: 2px;\n }\n\n .button[disabled] {\n background-color: ButtonFace;\n color: GrayText;\n border-color: GrayText;\n opacity: 1;\n }\n\n :host([disabled]) {\n opacity: 1;\n }\n\n .button--loading .button__spinner {\n /* Ensure spinner is visible in HCM */\n forced-color-adjust: auto;\n }\n }\n`;\n","import { html, nothing, type TemplateResult, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { HelixElement } from '../../base/index.js';\nimport { mixinDelegatesAria } from '../../mixins/index.js';\nimport { helixButtonStyles } from './hx-button.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * A production-grade button component for user interaction. Supports multiple\n * visual variants, sizes, loading state, prefix/suffix slots, anchor rendering,\n * and full ElementInternals form association.\n *\n * @summary Primary interactive element for triggering actions and form submission.\n *\n * @tag hx-button\n *\n * @slot - Default slot for button label text or content.\n * @slot prefix - Icon or content rendered before the label.\n * @slot suffix - Icon or content rendered after the label.\n *\n * @fires {CustomEvent<{originalEvent: MouseEvent}>} hx-click - Dispatched when\n * the button is clicked and is neither disabled nor loading.\n *\n * @csspart button - The native button or anchor element.\n * @csspart label - The label text wrapper span.\n * @csspart prefix - The prefix slot container span.\n * @csspart suffix - The suffix slot container span.\n * @csspart spinner - The loading spinner SVG element.\n *\n * @cssprop [--hx-button-bg=var(--hx-color-primary-500)] - Button background color.\n * @cssprop [--hx-button-hover-bg] - Hover background color override. When set, overrides the variant default hover background from outside the shadow DOM.\n * @cssprop [--hx-button-color=var(--hx-color-neutral-0)] - Button text color.\n * @cssprop [--hx-button-border-color=transparent] - Button border color.\n * @cssprop [--hx-button-border-radius=var(--hx-border-radius-md)] - Button border radius.\n * @cssprop [--hx-button-font-family=var(--hx-font-family-sans)] - Button font family.\n * @cssprop [--hx-button-font-weight=var(--hx-font-weight-semibold)] - Button font weight.\n * @cssprop [--hx-button-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n *\n * @cssprop [--hx-button-inverted-color=#ffffff] - Text color when inverted.\n * @cssprop [--hx-button-inverted-ghost-hover-bg=rgba(255,255,255,0.15)] - Ghost hover bg when inverted.\n * @cssprop [--hx-button-inverted-focus-ring-color=rgba(255,255,255,0.5)] - Focus ring color when inverted.\n */\n@customElement('hx-button')\nexport class HelixButton extends mixinDelegatesAria(HelixElement) {\n static override styles = [helixButtonStyles];\n\n // ─── Form Association ───\n\n /** @internal */\n static override formAssociated = true;\n\n // ─── Public Properties ───\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' | 'outline' = 'primary';\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 * Whether the button is disabled. Prevents all interaction and form actions.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Whether the button is in a loading state. Shows spinner, prevents interaction,\n * and sets aria-busy. Does not set the disabled attribute.\n * @attr loading\n */\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n /**\n * The type attribute for the underlying button element. Ignored when href is set.\n * @attr type\n */\n @property({ type: String })\n type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * When set, renders an anchor element instead of a button.\n * @attr href\n */\n @property({ type: String })\n href: string | undefined = undefined;\n\n /**\n * Anchor target attribute. Only used when href is set.\n * @attr target\n */\n @property({ type: String })\n target: string | undefined = undefined;\n\n /**\n * Form field name submitted via ElementInternals.setFormValue on submit.\n * @attr name\n */\n @property({ type: String })\n name: string | undefined = undefined;\n\n /**\n * Form field value submitted via ElementInternals.setFormValue on submit.\n * @attr value\n */\n @property({ type: String })\n value: string | undefined = undefined;\n\n /**\n * When true, the button stretches to fill its container width.\n * Sets the host to `display: block` and the inner element to `width: 100%`.\n * @attr full\n */\n @property({ type: Boolean, reflect: true })\n full = false;\n\n /**\n * When true, flips button colors for placement on dark or gradient backgrounds.\n * Forces text to white and adjusts hover/focus ring colors across all variants.\n * @attr inverted\n */\n @property({ type: Boolean, reflect: true })\n inverted = false;\n\n // ─── Form API ───\n\n protected override _onFormDisabled(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n // ─── Lifecycle ───\n\n /** @internal */\n private static readonly _VALID_VARIANTS = [\n 'primary',\n 'secondary',\n 'tertiary',\n 'danger',\n 'ghost',\n 'outline',\n ] as const;\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('variant')) {\n const validVariants: string[] = [...HelixButton._VALID_VARIANTS];\n if (!validVariants.includes(this.variant)) {\n devWarn(\n 'hx-button',\n `Invalid variant \"${this.variant}\". Expected one of: ${validVariants.join(', ')}. Clamping to \"primary\".`,\n );\n this.variant = 'primary';\n }\n }\n }\n\n // ─── Slot Handlers ───\n\n /** @internal */\n private _handleDefaultSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n const hasContent = slot.assignedNodes({ flatten: true }).length > 0;\n if (!hasContent && !this.ariaLabel) {\n devWarn(\n 'hx-button',\n 'hx-button has no label and no aria-label — button will have no accessible name.',\n );\n }\n }\n\n // ─── Event Handling ───\n\n /**\n * @private\n * @internal\n */\n private _handleClick(e: MouseEvent): void {\n if (this.disabled || this.loading) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n /**\n * Dispatched when the button is clicked.\n * @event hx-click\n */\n this.dispatchEvent(\n new CustomEvent<{ originalEvent: MouseEvent }>('hx-click', {\n bubbles: true,\n composed: true,\n detail: { originalEvent: e },\n }),\n );\n\n // Handle form submission/reset if form-associated and not in anchor mode\n if (this.href === undefined && this.type === 'submit' && this._internals.form) {\n if (this.name !== undefined && this.value !== undefined) {\n this._internals.setFormValue(this.value);\n }\n this._internals.form.requestSubmit();\n } else if (this.href === undefined && this.type === 'reset' && this._internals.form) {\n this._internals.form.reset();\n }\n }\n\n // ─── Render Helpers ───\n\n /**\n * @private\n * @internal\n */\n private _renderSpinner(): TemplateResult {\n return html`\n <svg\n class=\"button__spinner\"\n part=\"spinner\"\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <circle\n class=\"button__spinner-track\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n opacity=\"0.3\"\n />\n <path\n class=\"button__spinner-arc\"\n d=\"M12 2a10 10 0 0 1 10 10\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n `;\n }\n\n /**\n * @private\n * @internal\n */\n private _renderInner(): TemplateResult {\n return html`\n ${this.loading ? this._renderSpinner() : nothing}\n <span part=\"prefix\" class=\"button__prefix\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot @slotchange=${this._handleDefaultSlotChange}></slot>\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot name=\"suffix\"></slot>\n </span>\n `;\n }\n\n // ─── Render ───\n\n override render() {\n const classes = {\n button: true,\n [`button--${this.variant}`]: true,\n [`button--${this.size}`]: true,\n 'button--loading': this.loading,\n };\n\n if (this.href !== undefined) {\n return html`\n <a\n part=\"button\"\n class=${classMap(classes)}\n href=${this.disabled || this.loading ? nothing : ifDefined(this.href)}\n target=${ifDefined(this.target)}\n rel=${this.target === '_blank' ? 'noopener noreferrer' : nothing}\n aria-label=${this.ariaLabel ?? nothing}\n aria-disabled=${this.disabled ? 'true' : nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n tabindex=${this.disabled ? '-1' : nothing}\n @click=${this._handleClick}\n >\n ${this._renderInner()}\n </a>\n `;\n }\n\n return html`\n <button\n part=\"button\"\n class=${classMap(classes)}\n ?disabled=${this.disabled}\n type=${this.type}\n aria-label=${this.ariaLabel ?? nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n @click=${this._handleClick}\n >\n ${this._renderInner()}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-button': HelixButton;\n }\n interface HTMLElementEventMap {\n 'hx-click': CustomEvent<{ originalEvent: MouseEvent }>;\n }\n}\n"],"names":["helixButtonStyles","css","HelixButton","mixinDelegatesAria","HelixElement","disabled","changedProperties","validVariants","devWarn","e","html","nothing","classes","classMap","if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AAA,GArBpDd,EAsBX,WAAA,QAAA,CAAA;AAOAa,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA5B/Bd,EA6BX,WAAA,YAAA,CAAA;AAQAa,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GApC/Bd,EAqCX,WAAA,WAAA,CAAA;AAOAa,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA3Cfd,EA4CX,WAAA,QAAA,CAAA;AAOAa,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAlDfd,EAmDX,WAAA,QAAA,CAAA;AAOAa,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAzDfd,EA0DX,WAAA,UAAA,CAAA;AAOAa,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAhEfd,EAiEX,WAAA,QAAA,CAAA;AAOAa,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAvEfd,EAwEX,WAAA,SAAA,CAAA;AAQAa,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA/E/Bd,EAgFX,WAAA,QAAA,CAAA;AAQAa,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAvF/Bd,EAwFX,WAAA,YAAA,CAAA;AAxFWA,IAANa,EAAA;AAAA,EADNE,EAAc,WAAW;AAAA,GACbf,CAAA;"}
@@ -94,15 +94,14 @@ const m = h`
94
94
  position: relative;
95
95
  }
96
96
  `;
97
- var x = Object.defineProperty, g = Object.getOwnPropertyDescriptor, l = (r, i, s, e) => {
98
- for (var t = e > 1 ? void 0 : e ? g(i, s) : i, a = r.length - 1, d; a >= 0; a--)
99
- (d = r[a]) && (t = (e ? d(i, s, t) : d(t)) || t);
100
- return e && t && x(i, s, t), t;
97
+ var x = Object.defineProperty, g = Object.getOwnPropertyDescriptor, l = (r, e, s, i) => {
98
+ for (var t = i > 1 ? void 0 : i ? g(e, s) : e, a = r.length - 1, d; a >= 0; a--)
99
+ (d = r[a]) && (t = (i ? d(e, s, t) : d(t)) || t);
100
+ return i && t && x(e, s, t), t;
101
101
  };
102
102
  let o = class extends u {
103
- // ─── Constructor ───
104
103
  constructor() {
105
- super(), this._orientation = "horizontal", this.size = "md", this.label = "", this.internals = this.attachInternals(), this.internals.role = "group";
104
+ super(...arguments), this._orientation = "horizontal", this.size = "md", this.label = "";
106
105
  }
107
106
  get orientation() {
108
107
  return this._orientation;
@@ -112,10 +111,10 @@ let o = class extends u {
112
111
  }
113
112
  // ─── Lifecycle ───
114
113
  updated(r) {
115
- super.updated(r), r.has("size") && this.style.setProperty("--hx-button-group-size", this.size), r.has("label") && (this.internals.ariaLabel = this.label || null);
114
+ super.updated(r), r.has("size") && this.style.setProperty("--hx-button-group-size", this.size), r.has("label") && (this.label ? this.setAttribute("aria-label", this.label) : this.removeAttribute("aria-label"));
116
115
  }
117
116
  connectedCallback() {
118
- super.connectedCallback(), this.style.setProperty("--hx-button-group-size", this.size), this.label && (this.internals.ariaLabel = this.label);
117
+ super.connectedCallback(), this.setAttribute("role", "group"), this.style.setProperty("--hx-button-group-size", this.size), this.label && this.setAttribute("aria-label", this.label);
119
118
  }
120
119
  // ─── Render ───
121
120
  render() {
@@ -149,4 +148,4 @@ o = l([
149
148
  export {
150
149
  o as H
151
150
  };
152
- //# sourceMappingURL=hx-button-group-BXlMQTt_.js.map
151
+ //# sourceMappingURL=hx-button-group-a5Pb_9fU.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hx-button-group-BXlMQTt_.js","sources":["../../src/components/hx-button-group/hx-button-group.styles.ts","../../src/components/hx-button-group/hx-button-group.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixButtonGroupStyles = css`\n :host {\n display: inline-flex;\n contain: layout style;\n }\n\n .group {\n display: inline-flex;\n align-items: stretch;\n }\n\n /* ─── Orientation Variants ─── */\n\n .group--horizontal {\n flex-direction: row;\n }\n\n .group--vertical {\n flex-direction: column;\n }\n\n /* ─── No Double Borders: Horizontal ─── */\n\n .group--horizontal ::slotted(*:not(:first-child)) {\n margin-inline-start: calc(-1 * var(--hx-border-width-thin, 1px));\n }\n\n /* ─── No Double Borders: Vertical ─── */\n\n .group--vertical ::slotted(*:not(:first-child)) {\n margin-top: calc(-1 * var(--hx-border-width-thin, 1px));\n }\n\n /* ─── Border Radius: Horizontal — Single child keeps all corners ─── */\n\n .group--horizontal ::slotted(:only-child) {\n --hx-button-border-radius: var(--hx-border-radius-md, 0.375rem);\n }\n\n /* ─── Border Radius: Horizontal — First child keeps left corners ─── */\n\n .group--horizontal ::slotted(:first-child:not(:only-child)) {\n --hx-button-border-radius: var(--hx-border-radius-md, 0.375rem) 0 0\n var(--hx-border-radius-md, 0.375rem);\n }\n\n /* ─── Border Radius: Horizontal — Last child keeps right corners ─── */\n\n .group--horizontal ::slotted(:last-child:not(:only-child)) {\n --hx-button-border-radius: 0 var(--hx-border-radius-md, 0.375rem)\n var(--hx-border-radius-md, 0.375rem) 0;\n }\n\n /* ─── Border Radius: Horizontal — Middle children have no radius ─── */\n\n .group--horizontal ::slotted(:not(:first-child):not(:last-child)) {\n --hx-button-border-radius: 0;\n }\n\n /* ─── Border Radius: Vertical — Single child keeps all corners ─── */\n\n .group--vertical ::slotted(:only-child) {\n --hx-button-border-radius: var(--hx-border-radius-md, 0.375rem);\n }\n\n /* ─── Border Radius: Vertical — First child keeps top corners ─── */\n\n .group--vertical ::slotted(:first-child:not(:only-child)) {\n --hx-button-border-radius: var(--hx-border-radius-md, 0.375rem)\n var(--hx-border-radius-md, 0.375rem) 0 0;\n }\n\n /* ─── Border Radius: Vertical — Last child keeps bottom corners ─── */\n\n .group--vertical ::slotted(:last-child:not(:only-child)) {\n --hx-button-border-radius: 0 0 var(--hx-border-radius-md, 0.375rem)\n var(--hx-border-radius-md, 0.375rem);\n }\n\n /* ─── Border Radius: Vertical — Middle children have no radius ─── */\n\n .group--vertical ::slotted(:not(:first-child):not(:last-child)) {\n --hx-button-border-radius: 0;\n }\n\n /* ─── Z-index: Raise focused child above siblings to show full focus ring ─── */\n\n .group ::slotted(:focus-within) {\n z-index: 1;\n position: relative;\n }\n`;\n","import { LitElement, html, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { helixButtonGroupStyles } from './hx-button-group.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * A container component that groups related hx-button elements into a cohesive\n * horizontal or vertical action set. Eliminates double borders between adjacent\n * buttons and squares off inner border-radius for a unified visual appearance.\n *\n * **Accessibility:** Always provide an accessible label via `aria-label` or\n * `aria-labelledby` so screen readers can announce the group purpose.\n *\n * @summary Groups hx-button elements into a horizontal or vertical action set with shared borders.\n *\n * @tag hx-button-group\n *\n * @slot - Default slot accepting hx-button children.\n *\n * @csspart group - The container div element wrapping all slotted buttons.\n *\n * @cssprop [--hx-button-group-size=md] - Size token forwarded to child buttons. Accepts 'sm', 'md', or 'lg'.\n */\n@customElement('hx-button-group')\nexport class HelixButtonGroup extends LitElement {\n static override styles = [helixButtonGroupStyles];\n\n /** @internal */\n private internals: ElementInternals;\n\n /**\n * Layout orientation of the button group.\n * @attr orientation\n */\n @property({ type: String, reflect: true })\n get orientation(): 'horizontal' | 'vertical' {\n return this._orientation;\n }\n set orientation(value: string) {\n if (value !== 'horizontal' && value !== 'vertical') {\n devWarn('hx-button-group', `Invalid orientation \"${value}\", defaulting to \"horizontal\".`);\n value = 'horizontal';\n }\n this._orientation = value as 'horizontal' | 'vertical';\n }\n /**\n * Backing store for the orientation property, holding the validated orientation value.\n * @internal\n */\n private _orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Size applied to the button group and cascaded to child buttons via\n * the --hx-button-group-size CSS custom property.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Accessible label for the button group. Sets aria-label via ElementInternals.\n * **Strongly recommended** for WCAG 2.1 AA compliance — without it, screen\n * readers announce an unnamed \"group\". For Drupal/Twig compatibility, prefer\n * applying `aria-label` directly as an HTML attribute instead.\n * @attr label\n */\n @property({ type: String })\n label: string = '';\n\n // ─── Constructor ───\n\n constructor() {\n super();\n this.internals = this.attachInternals();\n this.internals.role = 'group';\n }\n\n // ─── Lifecycle ───\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n\n if (changedProperties.has('size')) {\n this.style.setProperty('--hx-button-group-size', this.size);\n }\n\n if (changedProperties.has('label')) {\n this.internals.ariaLabel = this.label || null;\n }\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.style.setProperty('--hx-button-group-size', this.size);\n if (this.label) {\n this.internals.ariaLabel = this.label;\n } else {\n devWarn(\n 'hx-button-group',\n 'Missing accessible label. Provide a `label` attribute so screen readers can announce the group purpose (WCAG 4.1.2).',\n );\n }\n }\n\n // ─── Render ───\n\n override render() {\n return html`\n <div\n part=\"group\"\n class=${classMap({\n group: true,\n 'group--horizontal': this.orientation === 'horizontal',\n 'group--vertical': this.orientation === 'vertical',\n })}\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-button-group': HelixButtonGroup;\n }\n}\n"],"names":["helixButtonGroupStyles","css","HelixButtonGroup","LitElement","value","changedProperties","html","classMap","__decorateClass","property","customElement"],"mappings":";;;;AAEO,MAAMA,IAAyBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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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AAK,gBAAgB;AAAA,IAAA,CACzC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKR;AACF;AAhGaL,EACK,SAAS,CAACF,CAAsB;AAU5CQ,EAAA;AAAA,EADHC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAV9BP,EAWP,WAAA,eAAA,CAAA;AAsBJM,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM,WAAW,WAAW;AAAA,GAhCpDP,EAiCX,WAAA,QAAA,CAAA;AAUAM,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA1CfP,EA2CX,WAAA,SAAA,CAAA;AA3CWA,IAANM,EAAA;AAAA,EADNE,EAAc,iBAAiB;AAAA,GACnBR,CAAA;"}
1
+ {"version":3,"file":"hx-button-group-a5Pb_9fU.js","sources":["../../src/components/hx-button-group/hx-button-group.styles.ts","../../src/components/hx-button-group/hx-button-group.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixButtonGroupStyles = css`\n :host {\n display: inline-flex;\n contain: layout style;\n }\n\n .group {\n display: inline-flex;\n align-items: stretch;\n }\n\n /* ─── Orientation Variants ─── */\n\n .group--horizontal {\n flex-direction: row;\n }\n\n .group--vertical {\n flex-direction: column;\n }\n\n /* ─── No Double Borders: Horizontal ─── */\n\n .group--horizontal ::slotted(*:not(:first-child)) {\n margin-inline-start: calc(-1 * var(--hx-border-width-thin, 1px));\n }\n\n /* ─── No Double Borders: Vertical ─── */\n\n .group--vertical ::slotted(*:not(:first-child)) {\n margin-top: calc(-1 * var(--hx-border-width-thin, 1px));\n }\n\n /* ─── Border Radius: Horizontal — Single child keeps all corners ─── */\n\n .group--horizontal ::slotted(:only-child) {\n --hx-button-border-radius: var(--hx-border-radius-md, 0.375rem);\n }\n\n /* ─── Border Radius: Horizontal — First child keeps left corners ─── */\n\n .group--horizontal ::slotted(:first-child:not(:only-child)) {\n --hx-button-border-radius: var(--hx-border-radius-md, 0.375rem) 0 0\n var(--hx-border-radius-md, 0.375rem);\n }\n\n /* ─── Border Radius: Horizontal — Last child keeps right corners ─── */\n\n .group--horizontal ::slotted(:last-child:not(:only-child)) {\n --hx-button-border-radius: 0 var(--hx-border-radius-md, 0.375rem)\n var(--hx-border-radius-md, 0.375rem) 0;\n }\n\n /* ─── Border Radius: Horizontal — Middle children have no radius ─── */\n\n .group--horizontal ::slotted(:not(:first-child):not(:last-child)) {\n --hx-button-border-radius: 0;\n }\n\n /* ─── Border Radius: Vertical — Single child keeps all corners ─── */\n\n .group--vertical ::slotted(:only-child) {\n --hx-button-border-radius: var(--hx-border-radius-md, 0.375rem);\n }\n\n /* ─── Border Radius: Vertical — First child keeps top corners ─── */\n\n .group--vertical ::slotted(:first-child:not(:only-child)) {\n --hx-button-border-radius: var(--hx-border-radius-md, 0.375rem)\n var(--hx-border-radius-md, 0.375rem) 0 0;\n }\n\n /* ─── Border Radius: Vertical — Last child keeps bottom corners ─── */\n\n .group--vertical ::slotted(:last-child:not(:only-child)) {\n --hx-button-border-radius: 0 0 var(--hx-border-radius-md, 0.375rem)\n var(--hx-border-radius-md, 0.375rem);\n }\n\n /* ─── Border Radius: Vertical — Middle children have no radius ─── */\n\n .group--vertical ::slotted(:not(:first-child):not(:last-child)) {\n --hx-button-border-radius: 0;\n }\n\n /* ─── Z-index: Raise focused child above siblings to show full focus ring ─── */\n\n .group ::slotted(:focus-within) {\n z-index: 1;\n position: relative;\n }\n`;\n","import { LitElement, html, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { helixButtonGroupStyles } from './hx-button-group.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * A container component that groups related hx-button elements into a cohesive\n * horizontal or vertical action set. Eliminates double borders between adjacent\n * buttons and squares off inner border-radius for a unified visual appearance.\n *\n * **Accessibility:** Always provide an accessible label via `aria-label` or\n * `aria-labelledby` so screen readers can announce the group purpose.\n *\n * @summary Groups hx-button elements into a horizontal or vertical action set with shared borders.\n *\n * @tag hx-button-group\n *\n * @slot - Default slot accepting hx-button children.\n *\n * @csspart group - The container div element wrapping all slotted buttons.\n *\n * @cssprop [--hx-button-group-size=md] - Size token forwarded to child buttons. Accepts 'sm', 'md', or 'lg'.\n */\n@customElement('hx-button-group')\nexport class HelixButtonGroup extends LitElement {\n static override styles = [helixButtonGroupStyles];\n\n /**\n * Layout orientation of the button group.\n * @attr orientation\n */\n @property({ type: String, reflect: true })\n get orientation(): 'horizontal' | 'vertical' {\n return this._orientation;\n }\n set orientation(value: string) {\n if (value !== 'horizontal' && value !== 'vertical') {\n devWarn('hx-button-group', `Invalid orientation \"${value}\", defaulting to \"horizontal\".`);\n value = 'horizontal';\n }\n this._orientation = value as 'horizontal' | 'vertical';\n }\n /**\n * Backing store for the orientation property, holding the validated orientation value.\n * @internal\n */\n private _orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Size applied to the button group and cascaded to child buttons via\n * the --hx-button-group-size CSS custom property.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Accessible label for the button group. Sets aria-label on the host element.\n * **Strongly recommended** for WCAG 2.1 AA compliance — without it, screen\n * readers announce an unnamed \"group\". For Drupal/Twig compatibility, prefer\n * applying `aria-label` directly as an HTML attribute instead.\n * @attr label\n */\n @property({ type: String })\n label: string = '';\n\n // ─── Lifecycle ───\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n\n if (changedProperties.has('size')) {\n this.style.setProperty('--hx-button-group-size', this.size);\n }\n\n if (changedProperties.has('label')) {\n if (this.label) {\n this.setAttribute('aria-label', this.label);\n } else {\n this.removeAttribute('aria-label');\n }\n }\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('role', 'group');\n this.style.setProperty('--hx-button-group-size', this.size);\n if (this.label) {\n this.setAttribute('aria-label', this.label);\n } else {\n devWarn(\n 'hx-button-group',\n 'Missing accessible label. Provide a `label` attribute so screen readers can announce the group purpose (WCAG 4.1.2).',\n );\n }\n }\n\n // ─── Render ───\n\n override render() {\n return html`\n <div\n part=\"group\"\n class=${classMap({\n group: true,\n 'group--horizontal': this.orientation === 'horizontal',\n 'group--vertical': this.orientation === 'vertical',\n })}\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-button-group': HelixButtonGroup;\n }\n}\n"],"names":["helixButtonGroupStyles","css","HelixButtonGroup","LitElement","value","changedProperties","html","classMap","__decorateClass","property","customElement"],"mappings":";;;;AAEO,MAAMA,IAAyBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;ACwB/B,IAAMC,IAAN,cAA+BC,EAAW;AAAA,EAA1C,cAAA;AAAA,UAAA,GAAA,SAAA,GAsBL,KAAQ,eAA0C,cAQlD,KAAA,OAA2B,MAU3B,KAAA,QAAgB;AAAA,EAAA;AAAA,EAhChB,IAAI,cAAyC;AAC3C,WAAO,KAAK;AAAA,EACd;AAAA,EACA,IA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