@helixui/library 1.0.1 → 1.1.2

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 (466) hide show
  1. package/custom-elements.json +2936 -9700
  2. package/dist/components/hx-accordion/hx-accordion-item.d.ts +7 -0
  3. package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
  4. package/dist/components/hx-accordion/hx-accordion.d.ts +3 -0
  5. package/dist/components/hx-accordion/hx-accordion.d.ts.map +1 -1
  6. package/dist/components/hx-accordion/index.js +1 -1
  7. package/dist/components/hx-action-bar/hx-action-bar.d.ts +13 -3
  8. package/dist/components/hx-action-bar/hx-action-bar.d.ts.map +1 -1
  9. package/dist/components/hx-action-bar/index.js +1 -1
  10. package/dist/components/hx-alert/hx-alert.d.ts +23 -0
  11. package/dist/components/hx-alert/hx-alert.d.ts.map +1 -1
  12. package/dist/components/hx-alert/hx-alert.styles.d.ts.map +1 -1
  13. package/dist/components/hx-alert/index.js +1 -1
  14. package/dist/components/hx-avatar/hx-avatar.d.ts +8 -1
  15. package/dist/components/hx-avatar/hx-avatar.d.ts.map +1 -1
  16. package/dist/components/hx-avatar/index.js +1 -1
  17. package/dist/components/hx-badge/hx-badge.d.ts +8 -1
  18. package/dist/components/hx-badge/hx-badge.d.ts.map +1 -1
  19. package/dist/components/hx-badge/index.js +1 -1
  20. package/dist/components/hx-banner/hx-banner.d.ts +11 -0
  21. package/dist/components/hx-banner/hx-banner.d.ts.map +1 -1
  22. package/dist/components/hx-banner/index.js +1 -1
  23. package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts +17 -2
  24. package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts.map +1 -1
  25. package/dist/components/hx-breadcrumb/index.js +1 -1
  26. package/dist/components/hx-button/hx-button.d.ts +6 -0
  27. package/dist/components/hx-button/hx-button.d.ts.map +1 -1
  28. package/dist/components/hx-button/hx-button.styles.d.ts.map +1 -1
  29. package/dist/components/hx-button/index.js +1 -1
  30. package/dist/components/hx-card/hx-card.d.ts +7 -0
  31. package/dist/components/hx-card/hx-card.d.ts.map +1 -1
  32. package/dist/components/hx-card/index.js +1 -1
  33. package/dist/components/hx-carousel/hx-carousel-item.d.ts +2 -0
  34. package/dist/components/hx-carousel/hx-carousel-item.d.ts.map +1 -1
  35. package/dist/components/hx-carousel/hx-carousel-item.styles.d.ts +2 -0
  36. package/dist/components/hx-carousel/hx-carousel-item.styles.d.ts.map +1 -0
  37. package/dist/components/hx-carousel/hx-carousel.d.ts +27 -0
  38. package/dist/components/hx-carousel/hx-carousel.d.ts.map +1 -1
  39. package/dist/components/hx-carousel/index.js +1 -1
  40. package/dist/components/hx-checkbox/hx-checkbox.d.ts +18 -2
  41. package/dist/components/hx-checkbox/hx-checkbox.d.ts.map +1 -1
  42. package/dist/components/hx-checkbox/index.js +1 -1
  43. package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts +20 -4
  44. package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts.map +1 -1
  45. package/dist/components/hx-checkbox-group/index.js +1 -1
  46. package/dist/components/hx-code-snippet/hx-code-snippet.d.ts +10 -0
  47. package/dist/components/hx-code-snippet/hx-code-snippet.d.ts.map +1 -1
  48. package/dist/components/hx-code-snippet/hx-code-snippet.styles.d.ts.map +1 -1
  49. package/dist/components/hx-code-snippet/index.js +1 -1
  50. package/dist/components/hx-color-picker/hx-color-picker.d.ts +70 -2
  51. package/dist/components/hx-color-picker/hx-color-picker.d.ts.map +1 -1
  52. package/dist/components/hx-color-picker/hx-color-picker.styles.d.ts.map +1 -1
  53. package/dist/components/hx-color-picker/index.js +1 -1
  54. package/dist/components/hx-combobox/hx-combobox.d.ts +37 -2
  55. package/dist/components/hx-combobox/hx-combobox.d.ts.map +1 -1
  56. package/dist/components/hx-combobox/hx-combobox.styles.d.ts.map +1 -1
  57. package/dist/components/hx-combobox/index.js +1 -1
  58. package/dist/components/hx-copy-button/hx-copy-button.d.ts +11 -0
  59. package/dist/components/hx-copy-button/hx-copy-button.d.ts.map +1 -1
  60. package/dist/components/hx-copy-button/index.js +1 -1
  61. package/dist/components/hx-counter/hx-counter.d.ts +12 -3
  62. package/dist/components/hx-counter/hx-counter.d.ts.map +1 -1
  63. package/dist/components/hx-counter/index.js +1 -1
  64. package/dist/components/hx-data-table/hx-data-table.d.ts +19 -2
  65. package/dist/components/hx-data-table/hx-data-table.d.ts.map +1 -1
  66. package/dist/components/hx-data-table/hx-data-table.styles.d.ts.map +1 -1
  67. package/dist/components/hx-data-table/index.js +1 -1
  68. package/dist/components/hx-date-picker/hx-date-picker.d.ts +62 -3
  69. package/dist/components/hx-date-picker/hx-date-picker.d.ts.map +1 -1
  70. package/dist/components/hx-date-picker/hx-date-picker.styles.d.ts.map +1 -1
  71. package/dist/components/hx-date-picker/index.js +1 -1
  72. package/dist/components/hx-dialog/hx-dialog.d.ts +31 -4
  73. package/dist/components/hx-dialog/hx-dialog.d.ts.map +1 -1
  74. package/dist/components/hx-dialog/hx-dialog.styles.d.ts.map +1 -1
  75. package/dist/components/hx-dialog/index.js +1 -1
  76. package/dist/components/hx-divider/hx-divider.d.ts +4 -1
  77. package/dist/components/hx-divider/hx-divider.d.ts.map +1 -1
  78. package/dist/components/hx-divider/index.js +1 -1
  79. package/dist/components/hx-drawer/hx-drawer.d.ts +25 -3
  80. package/dist/components/hx-drawer/hx-drawer.d.ts.map +1 -1
  81. package/dist/components/hx-drawer/hx-drawer.styles.d.ts.map +1 -1
  82. package/dist/components/hx-drawer/index.js +1 -1
  83. package/dist/components/hx-dropdown/hx-dropdown.d.ts +15 -2
  84. package/dist/components/hx-dropdown/hx-dropdown.d.ts.map +1 -1
  85. package/dist/components/hx-dropdown/index.js +1 -1
  86. package/dist/components/hx-field/hx-field.d.ts +10 -2
  87. package/dist/components/hx-field/hx-field.d.ts.map +1 -1
  88. package/dist/components/hx-field/index.js +1 -1
  89. package/dist/components/hx-file-upload/hx-file-upload.d.ts +39 -2
  90. package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
  91. package/dist/components/hx-file-upload/hx-file-upload.styles.d.ts.map +1 -1
  92. package/dist/components/hx-file-upload/index.js +1 -1
  93. package/dist/components/hx-form/hx-form.d.ts.map +1 -1
  94. package/dist/components/hx-form/index.js +1 -1
  95. package/dist/components/hx-format-date/hx-format-date.d.ts +8 -0
  96. package/dist/components/hx-format-date/hx-format-date.d.ts.map +1 -1
  97. package/dist/components/hx-format-date/index.js +1 -1
  98. package/dist/components/hx-grid/hx-grid.d.ts +9 -3
  99. package/dist/components/hx-grid/hx-grid.d.ts.map +1 -1
  100. package/dist/components/hx-grid/index.js +1 -1
  101. package/dist/components/hx-help-text/index.js +1 -1
  102. package/dist/components/hx-icon/hx-icon.d.ts +10 -2
  103. package/dist/components/hx-icon/hx-icon.d.ts.map +1 -1
  104. package/dist/components/hx-icon/index.js +1 -1
  105. package/dist/components/hx-icon-button/hx-icon-button.d.ts +11 -0
  106. package/dist/components/hx-icon-button/hx-icon-button.d.ts.map +1 -1
  107. package/dist/components/hx-icon-button/index.js +1 -1
  108. package/dist/components/hx-image/hx-image.d.ts +8 -0
  109. package/dist/components/hx-image/hx-image.d.ts.map +1 -1
  110. package/dist/components/hx-image/index.js +1 -1
  111. package/dist/components/hx-link/hx-link.d.ts +3 -0
  112. package/dist/components/hx-link/hx-link.d.ts.map +1 -1
  113. package/dist/components/hx-link/hx-link.styles.d.ts.map +1 -1
  114. package/dist/components/hx-link/index.js +1 -1
  115. package/dist/components/hx-list/hx-list-item.d.ts +8 -2
  116. package/dist/components/hx-list/hx-list-item.d.ts.map +1 -1
  117. package/dist/components/hx-list/hx-list-item.styles.d.ts.map +1 -1
  118. package/dist/components/hx-list/hx-list.d.ts +6 -2
  119. package/dist/components/hx-list/hx-list.d.ts.map +1 -1
  120. package/dist/components/hx-list/index.js +1 -1
  121. package/dist/components/hx-menu/hx-menu-item.d.ts +11 -0
  122. package/dist/components/hx-menu/hx-menu-item.d.ts.map +1 -1
  123. package/dist/components/hx-menu/hx-menu-item.styles.d.ts.map +1 -1
  124. package/dist/components/hx-menu/hx-menu.d.ts +10 -1
  125. package/dist/components/hx-menu/hx-menu.d.ts.map +1 -1
  126. package/dist/components/hx-menu/index.js +1 -1
  127. package/dist/components/hx-meter/hx-meter.d.ts +8 -0
  128. package/dist/components/hx-meter/hx-meter.d.ts.map +1 -1
  129. package/dist/components/hx-meter/hx-meter.styles.d.ts.map +1 -1
  130. package/dist/components/hx-meter/index.js +1 -1
  131. package/dist/components/hx-nav/hx-nav.d.ts +15 -0
  132. package/dist/components/hx-nav/hx-nav.d.ts.map +1 -1
  133. package/dist/components/hx-nav/index.js +1 -1
  134. package/dist/components/hx-number-input/hx-number-input.d.ts +47 -1
  135. package/dist/components/hx-number-input/hx-number-input.d.ts.map +1 -1
  136. package/dist/components/hx-number-input/index.js +1 -1
  137. package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts +15 -0
  138. package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts.map +1 -1
  139. package/dist/components/hx-overflow-menu/index.js +1 -1
  140. package/dist/components/hx-pagination/hx-pagination.d.ts +30 -0
  141. package/dist/components/hx-pagination/hx-pagination.d.ts.map +1 -1
  142. package/dist/components/hx-pagination/index.js +1 -1
  143. package/dist/components/hx-popover/hx-popover.d.ts +53 -2
  144. package/dist/components/hx-popover/hx-popover.d.ts.map +1 -1
  145. package/dist/components/hx-popover/index.js +1 -1
  146. package/dist/components/hx-popup/hx-popup.d.ts +8 -0
  147. package/dist/components/hx-popup/hx-popup.d.ts.map +1 -1
  148. package/dist/components/hx-popup/hx-popup.styles.d.ts.map +1 -1
  149. package/dist/components/hx-popup/index.js +1 -1
  150. package/dist/components/hx-progress-bar/hx-progress-bar.d.ts +8 -2
  151. package/dist/components/hx-progress-bar/hx-progress-bar.d.ts.map +1 -1
  152. package/dist/components/hx-progress-bar/hx-progress-bar.styles.d.ts.map +1 -1
  153. package/dist/components/hx-progress-bar/index.js +1 -1
  154. package/dist/components/hx-progress-ring/hx-progress-ring.d.ts +8 -2
  155. package/dist/components/hx-progress-ring/hx-progress-ring.d.ts.map +1 -1
  156. package/dist/components/hx-progress-ring/index.js +1 -1
  157. package/dist/components/hx-prose/hx-prose.d.ts +5 -3
  158. package/dist/components/hx-prose/hx-prose.d.ts.map +1 -1
  159. package/dist/components/hx-prose/index.js +1 -1
  160. package/dist/components/hx-radio-group/hx-radio-group.d.ts.map +1 -1
  161. package/dist/components/hx-radio-group/hx-radio.d.ts +4 -2
  162. package/dist/components/hx-radio-group/hx-radio.d.ts.map +1 -1
  163. package/dist/components/hx-radio-group/hx-radio.styles.d.ts.map +1 -1
  164. package/dist/components/hx-radio-group/index.js +1 -1
  165. package/dist/components/hx-rating/hx-rating.d.ts +54 -2
  166. package/dist/components/hx-rating/hx-rating.d.ts.map +1 -1
  167. package/dist/components/hx-rating/index.js +1 -1
  168. package/dist/components/hx-select/hx-select.d.ts +22 -2
  169. package/dist/components/hx-select/hx-select.d.ts.map +1 -1
  170. package/dist/components/hx-select/hx-select.styles.d.ts.map +1 -1
  171. package/dist/components/hx-select/index.js +1 -1
  172. package/dist/components/hx-side-nav/hx-nav-item.d.ts +6 -0
  173. package/dist/components/hx-side-nav/hx-nav-item.d.ts.map +1 -1
  174. package/dist/components/hx-side-nav/hx-nav-item.styles.d.ts.map +1 -1
  175. package/dist/components/hx-side-nav/hx-side-nav.d.ts +6 -1
  176. package/dist/components/hx-side-nav/hx-side-nav.d.ts.map +1 -1
  177. package/dist/components/hx-side-nav/hx-side-nav.styles.d.ts.map +1 -1
  178. package/dist/components/hx-side-nav/index.js +1 -1
  179. package/dist/components/hx-slider/hx-slider.d.ts +22 -1
  180. package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
  181. package/dist/components/hx-slider/hx-slider.styles.d.ts.map +1 -1
  182. package/dist/components/hx-slider/index.js +1 -1
  183. package/dist/components/hx-spinner/hx-spinner.d.ts +3 -1
  184. package/dist/components/hx-spinner/hx-spinner.d.ts.map +1 -1
  185. package/dist/components/hx-spinner/index.js +1 -1
  186. package/dist/components/hx-split-button/hx-split-button.d.ts +12 -0
  187. package/dist/components/hx-split-button/hx-split-button.d.ts.map +1 -1
  188. package/dist/components/hx-split-button/index.js +1 -1
  189. package/dist/components/hx-split-panel/hx-split-panel.d.ts +32 -2
  190. package/dist/components/hx-split-panel/hx-split-panel.d.ts.map +1 -1
  191. package/dist/components/hx-split-panel/hx-split-panel.styles.d.ts.map +1 -1
  192. package/dist/components/hx-split-panel/index.js +1 -1
  193. package/dist/components/hx-stack/index.js +1 -1
  194. package/dist/components/hx-stat/hx-stat.d.ts +5 -1
  195. package/dist/components/hx-stat/hx-stat.d.ts.map +1 -1
  196. package/dist/components/hx-stat/index.js +1 -1
  197. package/dist/components/hx-status-indicator/hx-status-indicator.d.ts +13 -12
  198. package/dist/components/hx-status-indicator/hx-status-indicator.d.ts.map +1 -1
  199. package/dist/components/hx-status-indicator/index.js +1 -1
  200. package/dist/components/hx-steps/hx-step.d.ts +7 -9
  201. package/dist/components/hx-steps/hx-step.d.ts.map +1 -1
  202. package/dist/components/hx-steps/hx-step.styles.d.ts.map +1 -1
  203. package/dist/components/hx-steps/hx-steps.d.ts +3 -3
  204. package/dist/components/hx-steps/hx-steps.d.ts.map +1 -1
  205. package/dist/components/hx-steps/index.js +1 -1
  206. package/dist/components/hx-switch/hx-switch.d.ts +21 -1
  207. package/dist/components/hx-switch/hx-switch.d.ts.map +1 -1
  208. package/dist/components/hx-switch/index.js +1 -1
  209. package/dist/components/hx-table/hx-table.d.ts +7 -2
  210. package/dist/components/hx-table/hx-table.d.ts.map +1 -1
  211. package/dist/components/hx-table/hx-table.styles.d.ts.map +1 -1
  212. package/dist/components/hx-table/hx-th.d.ts +4 -0
  213. package/dist/components/hx-table/hx-th.d.ts.map +1 -1
  214. package/dist/components/hx-table/index.js +1 -1
  215. package/dist/components/hx-tabs/hx-tab.d.ts +3 -0
  216. package/dist/components/hx-tabs/hx-tab.d.ts.map +1 -1
  217. package/dist/components/hx-tabs/hx-tabs.d.ts +6 -0
  218. package/dist/components/hx-tabs/hx-tabs.d.ts.map +1 -1
  219. package/dist/components/hx-tabs/index.js +1 -1
  220. package/dist/components/hx-tag/hx-tag.d.ts +2 -0
  221. package/dist/components/hx-tag/hx-tag.d.ts.map +1 -1
  222. package/dist/components/hx-tag/index.js +1 -1
  223. package/dist/components/hx-text/hx-text.d.ts +1 -0
  224. package/dist/components/hx-text/hx-text.d.ts.map +1 -1
  225. package/dist/components/hx-text/index.js +1 -1
  226. package/dist/components/hx-text-input/hx-text-input.d.ts +8 -3
  227. package/dist/components/hx-text-input/hx-text-input.d.ts.map +1 -1
  228. package/dist/components/hx-text-input/index.js +1 -1
  229. package/dist/components/hx-textarea/hx-textarea.d.ts +9 -3
  230. package/dist/components/hx-textarea/hx-textarea.d.ts.map +1 -1
  231. package/dist/components/hx-textarea/hx-textarea.styles.d.ts.map +1 -1
  232. package/dist/components/hx-textarea/index.js +1 -1
  233. package/dist/components/hx-theme/hx-theme.d.ts +2 -2
  234. package/dist/components/hx-theme/hx-theme.d.ts.map +1 -1
  235. package/dist/components/hx-time-picker/hx-time-picker.d.ts +22 -3
  236. package/dist/components/hx-time-picker/hx-time-picker.d.ts.map +1 -1
  237. package/dist/components/hx-time-picker/hx-time-picker.styles.d.ts.map +1 -1
  238. package/dist/components/hx-time-picker/index.js +1 -1
  239. package/dist/components/hx-toast/hx-toast.d.ts +8 -0
  240. package/dist/components/hx-toast/hx-toast.d.ts.map +1 -1
  241. package/dist/components/hx-toast/hx-toast.styles.d.ts.map +1 -1
  242. package/dist/components/hx-toast/index.js +1 -1
  243. package/dist/components/hx-toggle-button/hx-toggle-button.d.ts +23 -0
  244. package/dist/components/hx-toggle-button/hx-toggle-button.d.ts.map +1 -1
  245. package/dist/components/hx-toggle-button/index.js +1 -1
  246. package/dist/components/hx-tooltip/hx-tooltip.d.ts +57 -0
  247. package/dist/components/hx-tooltip/hx-tooltip.d.ts.map +1 -1
  248. package/dist/components/hx-tooltip/index.js +1 -1
  249. package/dist/components/hx-top-nav/hx-top-nav.d.ts +4 -0
  250. package/dist/components/hx-top-nav/hx-top-nav.d.ts.map +1 -1
  251. package/dist/components/hx-top-nav/index.js +1 -1
  252. package/dist/components/hx-tree-view/hx-tree-item.d.ts +2 -0
  253. package/dist/components/hx-tree-view/hx-tree-item.d.ts.map +1 -1
  254. package/dist/components/hx-tree-view/hx-tree-view.d.ts +11 -0
  255. package/dist/components/hx-tree-view/hx-tree-view.d.ts.map +1 -1
  256. package/dist/components/hx-tree-view/index.js +1 -1
  257. package/dist/index.js +70 -70
  258. package/dist/shared/{hx-accordion-DT8qHOay.js → hx-accordion-D1kFhdeQ.js} +15 -3
  259. package/dist/shared/hx-accordion-D1kFhdeQ.js.map +1 -0
  260. package/dist/shared/{hx-action-bar-we_WJety.js → hx-action-bar-D4bulGQP.js} +38 -31
  261. package/dist/shared/hx-action-bar-D4bulGQP.js.map +1 -0
  262. package/dist/shared/{hx-alert-D6uok29t.js → hx-alert-CSxCF2rr.js} +74 -53
  263. package/dist/shared/hx-alert-CSxCF2rr.js.map +1 -0
  264. package/dist/shared/{hx-avatar-Cep6Urm3.js → hx-avatar-Cun-O99h.js} +5 -1
  265. package/dist/shared/hx-avatar-Cun-O99h.js.map +1 -0
  266. package/dist/shared/{hx-badge-BeuWuUj_.js → hx-badge-CsFd2xtw.js} +53 -43
  267. package/dist/shared/hx-badge-CsFd2xtw.js.map +1 -0
  268. package/dist/shared/{hx-banner-DnCBJtRR.js → hx-banner-BTV-X2xF.js} +55 -43
  269. package/dist/shared/{hx-banner-DnCBJtRR.js.map → hx-banner-BTV-X2xF.js.map} +1 -1
  270. package/dist/shared/{hx-breadcrumb-item-Bj2UqhzR.js → hx-breadcrumb-item-4IwaLgaO.js} +34 -22
  271. package/dist/shared/hx-breadcrumb-item-4IwaLgaO.js.map +1 -0
  272. package/dist/shared/{hx-button-Cbhqpm5i.js → hx-button-7k-KeCYU.js} +29 -15
  273. package/dist/shared/hx-button-7k-KeCYU.js.map +1 -0
  274. package/dist/shared/{hx-card-B9j2SHyI.js → hx-card-0hT3G5hi.js} +10 -3
  275. package/dist/shared/hx-card-0hT3G5hi.js.map +1 -0
  276. package/dist/shared/{hx-carousel-item-Be0bC-7o.js → hx-carousel-item-DgeYyYZJ.js} +106 -89
  277. package/dist/shared/hx-carousel-item-DgeYyYZJ.js.map +1 -0
  278. package/dist/shared/{hx-checkbox-CuaJqEo7.js → hx-checkbox-BvjO-O41.js} +13 -6
  279. package/dist/shared/hx-checkbox-BvjO-O41.js.map +1 -0
  280. package/dist/shared/{hx-checkbox-group-ydUdV9Sx.js → hx-checkbox-group-Z5VvWzcj.js} +50 -37
  281. package/dist/shared/hx-checkbox-group-Z5VvWzcj.js.map +1 -0
  282. package/dist/shared/{hx-code-snippet-DBwIjl5p.js → hx-code-snippet-DqzPkH4K.js} +17 -1
  283. package/dist/shared/hx-code-snippet-DqzPkH4K.js.map +1 -0
  284. package/dist/shared/hx-color-picker-Da8z6AlQ.js +596 -0
  285. package/dist/shared/hx-color-picker-Da8z6AlQ.js.map +1 -0
  286. package/dist/shared/{hx-combobox-CNvY-es8.js → hx-combobox-CivfelTS.js} +93 -459
  287. package/dist/shared/hx-combobox-CivfelTS.js.map +1 -0
  288. package/dist/shared/{hx-copy-button-CLBA31to.js → hx-copy-button--0dymSvw.js} +9 -1
  289. package/dist/shared/{hx-copy-button-CLBA31to.js.map → hx-copy-button--0dymSvw.js.map} +1 -1
  290. package/dist/shared/{hx-counter-D-1NXzGs.js → hx-counter-Duf00H7p.js} +58 -49
  291. package/dist/shared/hx-counter-Duf00H7p.js.map +1 -0
  292. package/dist/shared/{hx-data-table-BwoJCFgs.js → hx-data-table-BWvd5NNx.js} +123 -89
  293. package/dist/shared/hx-data-table-BWvd5NNx.js.map +1 -0
  294. package/dist/shared/{hx-date-picker-DDcIBJir.js → hx-date-picker-6voxxxNE.js} +119 -485
  295. package/dist/shared/hx-date-picker-6voxxxNE.js.map +1 -0
  296. package/dist/shared/{hx-dialog-M7so0sRT.js → hx-dialog-DkUSnVgw.js} +72 -52
  297. package/dist/shared/hx-dialog-DkUSnVgw.js.map +1 -0
  298. package/dist/shared/{hx-divider-XgWIz4Mr.js → hx-divider-DNNs4e8q.js} +2 -1
  299. package/dist/shared/{hx-divider-XgWIz4Mr.js.map → hx-divider-DNNs4e8q.js.map} +1 -1
  300. package/dist/shared/{hx-drawer-CYxuhIQ0.js → hx-drawer-CJcRZcns.js} +85 -56
  301. package/dist/shared/hx-drawer-CJcRZcns.js.map +1 -0
  302. package/dist/shared/{hx-dropdown-7cfowTWv.js → hx-dropdown-Bo0KTM1A.js} +29 -20
  303. package/dist/shared/hx-dropdown-Bo0KTM1A.js.map +1 -0
  304. package/dist/shared/{hx-field-CDP8EXuj.js → hx-field-3MmzJ4kZ.js} +21 -13
  305. package/dist/shared/hx-field-3MmzJ4kZ.js.map +1 -0
  306. package/dist/shared/{hx-file-upload-9HbONfqt.js → hx-file-upload-ByjAgfNy.js} +103 -64
  307. package/dist/shared/hx-file-upload-ByjAgfNy.js.map +1 -0
  308. package/dist/shared/hx-form-BpS6v3Iu.js +258 -0
  309. package/dist/shared/hx-form-BpS6v3Iu.js.map +1 -0
  310. package/dist/shared/{hx-format-date-BsVr8gpD.js → hx-format-date-BdnWV2kX.js} +7 -1
  311. package/dist/shared/hx-format-date-BdnWV2kX.js.map +1 -0
  312. package/dist/shared/{hx-grid-BsDBCTbt.js → hx-grid-gEjuF0cR.js} +25 -18
  313. package/dist/shared/hx-grid-gEjuF0cR.js.map +1 -0
  314. package/dist/shared/{hx-help-text-DaOPN1iB.js → hx-help-text-BAcEGRUE.js} +2 -2
  315. package/dist/shared/{hx-help-text-DaOPN1iB.js.map → hx-help-text-BAcEGRUE.js.map} +1 -1
  316. package/dist/shared/{hx-icon--xsJztDh.js → hx-icon-CP6OnLoM.js} +6 -1
  317. package/dist/shared/hx-icon-CP6OnLoM.js.map +1 -0
  318. package/dist/shared/{hx-icon-button-iu0i_faq.js → hx-icon-button-DzH_bRtC.js} +15 -1
  319. package/dist/shared/{hx-icon-button-iu0i_faq.js.map → hx-icon-button-DzH_bRtC.js.map} +1 -1
  320. package/dist/shared/{hx-image-xyb_tHCR.js → hx-image-C6pGiI6c.js} +6 -1
  321. package/dist/shared/hx-image-C6pGiI6c.js.map +1 -0
  322. package/dist/shared/{hx-link-DfNy_UU8.js → hx-link-Tmk_YPvW.js} +46 -37
  323. package/dist/shared/hx-link-Tmk_YPvW.js.map +1 -0
  324. package/dist/shared/{hx-list-CdRNgeoP.js → hx-list-DwInEX2H.js} +63 -37
  325. package/dist/shared/hx-list-DwInEX2H.js.map +1 -0
  326. package/dist/shared/{hx-menu-divider-DR8klkFT.js → hx-menu-divider-DR4G_rqw.js} +71 -40
  327. package/dist/shared/hx-menu-divider-DR4G_rqw.js.map +1 -0
  328. package/dist/shared/{hx-meter-CZ7lnMra.js → hx-meter-uXkTZq-W.js} +77 -61
  329. package/dist/shared/hx-meter-uXkTZq-W.js.map +1 -0
  330. package/dist/shared/{hx-nav-DM6-cGKF.js → hx-nav-3JsN2Oak.js} +64 -47
  331. package/dist/shared/hx-nav-3JsN2Oak.js.map +1 -0
  332. package/dist/shared/{hx-nav-item-D54-5eUM.js → hx-nav-item-D3EJatzc.js} +40 -16
  333. package/dist/shared/hx-nav-item-D3EJatzc.js.map +1 -0
  334. package/dist/shared/{hx-number-input-BP6TIA92.js → hx-number-input-CIpL2BEh.js} +65 -34
  335. package/dist/shared/hx-number-input-CIpL2BEh.js.map +1 -0
  336. package/dist/shared/{hx-overflow-menu-CobkjAb8.js → hx-overflow-menu-2kgOJ_ht.js} +76 -64
  337. package/dist/shared/hx-overflow-menu-2kgOJ_ht.js.map +1 -0
  338. package/dist/shared/{hx-pagination-10dpXS95.js → hx-pagination-Blt-fFqV.js} +113 -94
  339. package/dist/shared/hx-pagination-Blt-fFqV.js.map +1 -0
  340. package/dist/shared/{hx-popover-ULjonbaO.js → hx-popover-DxE67miP.js} +71 -66
  341. package/dist/shared/hx-popover-DxE67miP.js.map +1 -0
  342. package/dist/shared/{hx-popup-CYf9Q5sj.js → hx-popup-Dg6n_PbY.js} +13 -1
  343. package/dist/shared/hx-popup-Dg6n_PbY.js.map +1 -0
  344. package/dist/shared/{hx-progress-bar-CnTibV63.js → hx-progress-bar-Dm_EHyng.js} +65 -47
  345. package/dist/shared/hx-progress-bar-Dm_EHyng.js.map +1 -0
  346. package/dist/shared/{hx-progress-ring-BHJBaXNk.js → hx-progress-ring-DpxBDD5d.js} +35 -28
  347. package/dist/shared/hx-progress-ring-DpxBDD5d.js.map +1 -0
  348. package/dist/shared/hx-prose-Ml_L2zje.js +59 -0
  349. package/dist/shared/hx-prose-Ml_L2zje.js.map +1 -0
  350. package/dist/shared/{hx-radio-BnKcRuQu.js → hx-radio-BywgVSEu.js} +7 -8
  351. package/dist/shared/hx-radio-BywgVSEu.js.map +1 -0
  352. package/dist/shared/{hx-rating-Y_t7Z4qb.js → hx-rating-CUWBQ0fZ.js} +131 -64
  353. package/dist/shared/hx-rating-CUWBQ0fZ.js.map +1 -0
  354. package/dist/shared/{hx-select-C50lD7NS.js → hx-select-BwDwxk-M.js} +107 -169
  355. package/dist/shared/hx-select-BwDwxk-M.js.map +1 -0
  356. package/dist/shared/hx-skeleton-BHvALyd7.js.map +1 -1
  357. package/dist/shared/{hx-slider-CprSNrRi.js → hx-slider-D_0EKJyk.js} +23 -7
  358. package/dist/shared/hx-slider-D_0EKJyk.js.map +1 -0
  359. package/dist/shared/{hx-spinner-BOApJ-g9.js → hx-spinner-DMn4SChS.js} +35 -28
  360. package/dist/shared/hx-spinner-DMn4SChS.js.map +1 -0
  361. package/dist/shared/{hx-split-button-CHGy4FUc.js → hx-split-button-CypgLXw1.js} +14 -3
  362. package/dist/shared/{hx-split-button-CHGy4FUc.js.map → hx-split-button-CypgLXw1.js.map} +1 -1
  363. package/dist/shared/{hx-split-panel-DYtB45Tr.js → hx-split-panel-CV_Kr4EK.js} +58 -37
  364. package/dist/shared/hx-split-panel-CV_Kr4EK.js.map +1 -0
  365. package/dist/shared/{hx-stack-CfoW7jU7.js → hx-stack-BStY1RmV.js} +29 -29
  366. package/dist/shared/hx-stack-BStY1RmV.js.map +1 -0
  367. package/dist/shared/{hx-stat-C2wfph8W.js → hx-stat-CHntLHJM.js} +18 -10
  368. package/dist/shared/hx-stat-CHntLHJM.js.map +1 -0
  369. package/dist/shared/{hx-status-indicator-oYWOkWlD.js → hx-status-indicator-C1BwEvUw.js} +15 -12
  370. package/dist/shared/hx-status-indicator-C1BwEvUw.js.map +1 -0
  371. package/dist/shared/{hx-step-DYoIumpR.js → hx-step-BIVWSPxd.js} +45 -33
  372. package/dist/shared/hx-step-BIVWSPxd.js.map +1 -0
  373. package/dist/shared/{hx-switch-DkKchcuP.js → hx-switch-BgX8kuWt.js} +12 -3
  374. package/dist/shared/hx-switch-BgX8kuWt.js.map +1 -0
  375. package/dist/shared/{hx-tab-panel-BRNcLICw.js → hx-tab-panel-DhOq67jj.js} +11 -2
  376. package/dist/shared/hx-tab-panel-DhOq67jj.js.map +1 -0
  377. package/dist/shared/{hx-tag-B3N-vZ6B.js → hx-tag-CzOTDcXI.js} +2 -1
  378. package/dist/shared/{hx-tag-B3N-vZ6B.js.map → hx-tag-CzOTDcXI.js.map} +1 -1
  379. package/dist/shared/{hx-td-CVwCGBYf.js → hx-td-h6oeW6YC.js} +43 -41
  380. package/dist/shared/hx-td-h6oeW6YC.js.map +1 -0
  381. package/dist/shared/{hx-text-NjKoQATI.js → hx-text-DTXjiviE.js} +2 -1
  382. package/dist/shared/{hx-text-NjKoQATI.js.map → hx-text-DTXjiviE.js.map} +1 -1
  383. package/dist/shared/{hx-text-input-CCZZbWQ9.js → hx-text-input-CqEdDHMU.js} +82 -65
  384. package/dist/shared/hx-text-input-CqEdDHMU.js.map +1 -0
  385. package/dist/shared/{hx-textarea-BsQdB1Rk.js → hx-textarea-BgX7rxyo.js} +21 -12
  386. package/dist/shared/hx-textarea-BgX7rxyo.js.map +1 -0
  387. package/dist/shared/hx-theme-6GDoUG8j.js.map +1 -1
  388. package/dist/shared/{hx-time-picker-CJcIjH3C.js → hx-time-picker-DmLu7WUC.js} +73 -273
  389. package/dist/shared/hx-time-picker-DmLu7WUC.js.map +1 -0
  390. package/dist/shared/{hx-toggle-button-D4F1soEM.js → hx-toggle-button-D1jpDvSA.js} +75 -38
  391. package/dist/shared/hx-toggle-button-D1jpDvSA.js.map +1 -0
  392. package/dist/shared/{hx-tooltip-Bk1iQRHs.js → hx-tooltip-kh7QFPKu.js} +66 -49
  393. package/dist/shared/hx-tooltip-kh7QFPKu.js.map +1 -0
  394. package/dist/shared/{hx-top-nav-D2bQpns3.js → hx-top-nav-DYlnzDaU.js} +3 -1
  395. package/dist/shared/{hx-top-nav-D2bQpns3.js.map → hx-top-nav-DYlnzDaU.js.map} +1 -1
  396. package/dist/shared/{hx-tree-item-BobGN76x.js → hx-tree-item-BP6UF_H1.js} +29 -16
  397. package/dist/shared/hx-tree-item-BP6UF_H1.js.map +1 -0
  398. package/dist/shared/{toast-factory-MvMMreTu.js → toast-factory-DTy-qN8r.js} +70 -59
  399. package/dist/shared/toast-factory-DTy-qN8r.js.map +1 -0
  400. package/dist/styles/shared-field.styles.d.ts +6 -0
  401. package/dist/styles/shared-field.styles.d.ts.map +1 -0
  402. package/package.json +2 -5
  403. package/dist/shared/hx-accordion-DT8qHOay.js.map +0 -1
  404. package/dist/shared/hx-action-bar-we_WJety.js.map +0 -1
  405. package/dist/shared/hx-alert-D6uok29t.js.map +0 -1
  406. package/dist/shared/hx-avatar-Cep6Urm3.js.map +0 -1
  407. package/dist/shared/hx-badge-BeuWuUj_.js.map +0 -1
  408. package/dist/shared/hx-breadcrumb-item-Bj2UqhzR.js.map +0 -1
  409. package/dist/shared/hx-button-Cbhqpm5i.js.map +0 -1
  410. package/dist/shared/hx-card-B9j2SHyI.js.map +0 -1
  411. package/dist/shared/hx-carousel-item-Be0bC-7o.js.map +0 -1
  412. package/dist/shared/hx-checkbox-CuaJqEo7.js.map +0 -1
  413. package/dist/shared/hx-checkbox-group-ydUdV9Sx.js.map +0 -1
  414. package/dist/shared/hx-code-snippet-DBwIjl5p.js.map +0 -1
  415. package/dist/shared/hx-color-picker-Bb2UPVc3.js +0 -803
  416. package/dist/shared/hx-color-picker-Bb2UPVc3.js.map +0 -1
  417. package/dist/shared/hx-combobox-CNvY-es8.js.map +0 -1
  418. package/dist/shared/hx-counter-D-1NXzGs.js.map +0 -1
  419. package/dist/shared/hx-data-table-BwoJCFgs.js.map +0 -1
  420. package/dist/shared/hx-date-picker-DDcIBJir.js.map +0 -1
  421. package/dist/shared/hx-dialog-M7so0sRT.js.map +0 -1
  422. package/dist/shared/hx-drawer-CYxuhIQ0.js.map +0 -1
  423. package/dist/shared/hx-dropdown-7cfowTWv.js.map +0 -1
  424. package/dist/shared/hx-field-CDP8EXuj.js.map +0 -1
  425. package/dist/shared/hx-file-upload-9HbONfqt.js.map +0 -1
  426. package/dist/shared/hx-form-BFv_N1dm.js +0 -1272
  427. package/dist/shared/hx-form-BFv_N1dm.js.map +0 -1
  428. package/dist/shared/hx-format-date-BsVr8gpD.js.map +0 -1
  429. package/dist/shared/hx-grid-BsDBCTbt.js.map +0 -1
  430. package/dist/shared/hx-icon--xsJztDh.js.map +0 -1
  431. package/dist/shared/hx-image-xyb_tHCR.js.map +0 -1
  432. package/dist/shared/hx-link-DfNy_UU8.js.map +0 -1
  433. package/dist/shared/hx-list-CdRNgeoP.js.map +0 -1
  434. package/dist/shared/hx-menu-divider-DR8klkFT.js.map +0 -1
  435. package/dist/shared/hx-meter-CZ7lnMra.js.map +0 -1
  436. package/dist/shared/hx-nav-DM6-cGKF.js.map +0 -1
  437. package/dist/shared/hx-nav-item-D54-5eUM.js.map +0 -1
  438. package/dist/shared/hx-number-input-BP6TIA92.js.map +0 -1
  439. package/dist/shared/hx-overflow-menu-CobkjAb8.js.map +0 -1
  440. package/dist/shared/hx-pagination-10dpXS95.js.map +0 -1
  441. package/dist/shared/hx-popover-ULjonbaO.js.map +0 -1
  442. package/dist/shared/hx-popup-CYf9Q5sj.js.map +0 -1
  443. package/dist/shared/hx-progress-bar-CnTibV63.js.map +0 -1
  444. package/dist/shared/hx-progress-ring-BHJBaXNk.js.map +0 -1
  445. package/dist/shared/hx-prose-DZh2KrMb.js +0 -876
  446. package/dist/shared/hx-prose-DZh2KrMb.js.map +0 -1
  447. package/dist/shared/hx-radio-BnKcRuQu.js.map +0 -1
  448. package/dist/shared/hx-rating-Y_t7Z4qb.js.map +0 -1
  449. package/dist/shared/hx-select-C50lD7NS.js.map +0 -1
  450. package/dist/shared/hx-slider-CprSNrRi.js.map +0 -1
  451. package/dist/shared/hx-spinner-BOApJ-g9.js.map +0 -1
  452. package/dist/shared/hx-split-panel-DYtB45Tr.js.map +0 -1
  453. package/dist/shared/hx-stack-CfoW7jU7.js.map +0 -1
  454. package/dist/shared/hx-stat-C2wfph8W.js.map +0 -1
  455. package/dist/shared/hx-status-indicator-oYWOkWlD.js.map +0 -1
  456. package/dist/shared/hx-step-DYoIumpR.js.map +0 -1
  457. package/dist/shared/hx-switch-DkKchcuP.js.map +0 -1
  458. package/dist/shared/hx-tab-panel-BRNcLICw.js.map +0 -1
  459. package/dist/shared/hx-td-CVwCGBYf.js.map +0 -1
  460. package/dist/shared/hx-text-input-CCZZbWQ9.js.map +0 -1
  461. package/dist/shared/hx-textarea-BsQdB1Rk.js.map +0 -1
  462. package/dist/shared/hx-time-picker-CJcIjH3C.js.map +0 -1
  463. package/dist/shared/hx-toggle-button-D4F1soEM.js.map +0 -1
  464. package/dist/shared/hx-tooltip-Bk1iQRHs.js.map +0 -1
  465. package/dist/shared/hx-tree-item-BobGN76x.js.map +0 -1
  466. package/dist/shared/toast-factory-MvMMreTu.js.map +0 -1
@@ -1,23 +1,24 @@
1
1
  import { css as m, LitElement as c, html as d } from "lit";
2
2
  import { property as s, customElement as g } from "lit/decorators.js";
3
+ import { styleMap as f } from "lit/directives/style-map.js";
3
4
  import { tokenStyles as y } from "@helixui/tokens/lit";
4
- const f = m`
5
+ const v = m`
5
6
  :host {
6
7
  display: block;
7
8
  box-sizing: border-box;
8
9
  width: 100%;
9
10
  }
10
- `, v = m`
11
+ `, x = m`
11
12
  :host {
12
13
  display: block;
13
14
  min-width: 0;
14
15
  min-height: 0;
15
16
  }
16
17
  `;
17
- var x = Object.defineProperty, G = Object.getOwnPropertyDescriptor, e = (t, l, a, p) => {
18
- for (var o = p > 1 ? void 0 : p ? G(l, a) : l, n = t.length - 1, u; n >= 0; n--)
18
+ var G = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (t, l, a, p) => {
19
+ for (var o = p > 1 ? void 0 : p ? _(l, a) : l, n = t.length - 1, u; n >= 0; n--)
19
20
  (u = t[n]) && (o = (p ? u(l, a, o) : u(o)) || o);
20
- return p && o && x(l, a, o), o;
21
+ return p && o && G(l, a, o), o;
21
22
  };
22
23
  const h = {
23
24
  none: "0",
@@ -31,38 +32,43 @@ let r = class extends c {
31
32
  constructor() {
32
33
  super(...arguments), this.columns = 1, this.gap = "md", this.align = "stretch", this.justify = "stretch";
33
34
  }
35
+ /** @internal */
34
36
  _gridTemplateColumns() {
35
37
  const t = this.columns;
36
38
  return typeof t == "number" || /^\d+$/.test(String(t)) ? `var(--hx-grid-columns, repeat(${t}, 1fr))` : `var(--hx-grid-columns, ${t})`;
37
39
  }
40
+ /** @internal */
38
41
  _resolveGap(t) {
39
42
  return h[t] ?? h.md;
40
43
  }
44
+ /** @internal */
41
45
  _computedRowGap() {
42
46
  return this.rowGap ? `var(--hx-grid-row-gap, ${this._resolveGap(this.rowGap)})` : `var(--hx-grid-row-gap, var(--hx-grid-gap, ${this._resolveGap(this.gap)}))`;
43
47
  }
48
+ /** @internal */
44
49
  _computedColumnGap() {
45
50
  return this.columnGap ? `var(--hx-grid-column-gap, ${this._resolveGap(this.columnGap)})` : `var(--hx-grid-column-gap, var(--hx-grid-gap, ${this._resolveGap(this.gap)}))`;
46
51
  }
47
- _baseStyle() {
48
- return [
49
- "display: grid",
50
- `grid-template-columns: ${this._gridTemplateColumns()}`,
51
- `row-gap: ${this._computedRowGap()}`,
52
- `column-gap: ${this._computedColumnGap()}`,
53
- `align-items: ${this.align}`,
54
- `justify-items: ${this.justify}`
55
- ].join("; ");
52
+ /** @internal */
53
+ _baseStyleMap() {
54
+ return {
55
+ display: "grid",
56
+ "grid-template-columns": this._gridTemplateColumns(),
57
+ "row-gap": this._computedRowGap(),
58
+ "column-gap": this._computedColumnGap(),
59
+ "align-items": this.align,
60
+ "justify-items": this.justify
61
+ };
56
62
  }
57
63
  render() {
58
64
  return d`
59
- <div part="base" role="presentation" style=${this._baseStyle()}>
65
+ <div part="base" role="presentation" style=${f(this._baseStyleMap())}>
60
66
  <slot></slot>
61
67
  </div>
62
68
  `;
63
69
  }
64
70
  };
65
- r.styles = [y, f];
71
+ r.styles = [y, v];
66
72
  e([
67
73
  s({ reflect: !0 })
68
74
  ], r.prototype, "columns", 2);
@@ -91,6 +97,7 @@ let i = class extends c {
91
97
  connectedCallback() {
92
98
  super.connectedCallback(), this._applyHostGridStyles();
93
99
  }
100
+ /** @internal */
94
101
  _applyHostGridStyles() {
95
102
  this.column ? this.style.gridColumn = this.column : this.span !== void 0 ? this.style.gridColumn = `span ${this.span}` : this.style.gridColumn = "", this.row ? this.style.gridRow = this.row : this.style.gridRow = "";
96
103
  }
@@ -98,7 +105,7 @@ let i = class extends c {
98
105
  return d`<slot></slot>`;
99
106
  }
100
107
  };
101
- i.styles = [y, v];
108
+ i.styles = [y, x];
102
109
  e([
103
110
  s({ reflect: !0 })
104
111
  ], i.prototype, "column", 2);
@@ -115,4 +122,4 @@ export {
115
122
  r as H,
116
123
  i as a
117
124
  };
118
- //# sourceMappingURL=hx-grid-BsDBCTbt.js.map
125
+ //# sourceMappingURL=hx-grid-gEjuF0cR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-grid-gEjuF0cR.js","sources":["../../src/components/hx-grid/hx-grid.styles.ts","../../src/components/hx-grid/hx-grid.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixGridStyles = css`\n :host {\n display: block;\n box-sizing: border-box;\n width: 100%;\n }\n`;\n\nexport const helixGridItemStyles = css`\n :host {\n display: block;\n min-width: 0;\n min-height: 0;\n }\n`;\n","import { LitElement, html, type PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixGridStyles, helixGridItemStyles } from './hx-grid.styles.js';\n\ntype GapSize = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\ntype AlignValue = 'start' | 'center' | 'end' | 'stretch';\ntype JustifyValue = 'start' | 'center' | 'end' | 'stretch';\n\nconst GAP_TOKENS: Record<GapSize, string> = {\n none: '0',\n xs: 'var(--hx-space-1, 0.25rem)',\n sm: 'var(--hx-space-2, 0.5rem)',\n md: 'var(--hx-space-4, 1rem)',\n lg: 'var(--hx-space-6, 1.5rem)',\n xl: 'var(--hx-space-8, 2rem)',\n};\n\n/**\n * A CSS Grid layout wrapper with design-token-based column and gap system.\n *\n * @summary CSS Grid layout primitive for building responsive grid layouts.\n *\n * @tag hx-grid\n *\n * @slot - Default slot for grid content (use `hx-grid-item` for precise placement).\n *\n * @csspart base - The grid container element.\n *\n * @cssprop [--hx-grid-columns] - Override the computed grid-template-columns.\n * @cssprop [--hx-grid-gap] - Override the computed gap.\n * @cssprop [--hx-grid-row-gap] - Override the computed row-gap.\n * @cssprop [--hx-grid-column-gap] - Override the computed column-gap.\n */\n@customElement('hx-grid')\nexport class HelixGrid extends LitElement {\n static override styles = [tokenStyles, helixGridStyles];\n\n /**\n * Number of equal columns (`repeat(N, 1fr)`) or a CSS grid-template-columns string.\n * @attr columns\n */\n @property({ reflect: true })\n columns: number | string = 1;\n\n /**\n * Gap size applied to both row and column gaps.\n * @attr gap\n */\n @property({ reflect: true })\n gap: GapSize = 'md';\n\n /**\n * Row gap override. When set, takes precedence over `gap` for row spacing.\n * @attr row-gap\n */\n @property({ attribute: 'row-gap', reflect: true })\n rowGap: GapSize | undefined;\n\n /**\n * Column gap override. When set, takes precedence over `gap` for column spacing.\n * @attr column-gap\n */\n @property({ attribute: 'column-gap', reflect: true })\n columnGap: GapSize | undefined;\n\n /**\n * Aligns grid items along the block axis (align-items).\n * @attr align\n */\n @property({ reflect: true })\n align: AlignValue = 'stretch';\n\n /**\n * Justifies grid items along the inline axis (justify-items).\n * @attr justify\n */\n @property({ reflect: true })\n justify: JustifyValue = 'stretch';\n\n /** @internal */\n private _gridTemplateColumns(): string {\n const cols = this.columns;\n if (typeof cols === 'number' || /^\\d+$/.test(String(cols))) {\n return `var(--hx-grid-columns, repeat(${cols}, 1fr))`;\n }\n return `var(--hx-grid-columns, ${cols})`;\n }\n\n /** @internal */\n private _resolveGap(size: GapSize): string {\n return GAP_TOKENS[size] ?? GAP_TOKENS.md;\n }\n\n /** @internal */\n private _computedRowGap(): string {\n if (this.rowGap) {\n return `var(--hx-grid-row-gap, ${this._resolveGap(this.rowGap)})`;\n }\n return `var(--hx-grid-row-gap, var(--hx-grid-gap, ${this._resolveGap(this.gap)}))`;\n }\n\n /** @internal */\n private _computedColumnGap(): string {\n if (this.columnGap) {\n return `var(--hx-grid-column-gap, ${this._resolveGap(this.columnGap)})`;\n }\n return `var(--hx-grid-column-gap, var(--hx-grid-gap, ${this._resolveGap(this.gap)}))`;\n }\n\n /** @internal */\n private _baseStyleMap(): Record<string, string> {\n return {\n display: 'grid',\n 'grid-template-columns': this._gridTemplateColumns(),\n 'row-gap': this._computedRowGap(),\n 'column-gap': this._computedColumnGap(),\n 'align-items': this.align,\n 'justify-items': this.justify,\n };\n }\n\n override render() {\n return html`\n <div part=\"base\" role=\"presentation\" style=${styleMap(this._baseStyleMap())}>\n <slot></slot>\n </div>\n `;\n }\n}\n\n/**\n * Optional companion element for precise grid item placement.\n * Applies grid-column and grid-row directly to the host element\n * so it participates correctly in the parent CSS grid layout.\n *\n * @summary Grid item with explicit column/row placement.\n *\n * @tag hx-grid-item\n *\n * @slot - Default slot for item content.\n */\n@customElement('hx-grid-item')\nexport class HelixGridItem extends LitElement {\n static override styles = [tokenStyles, helixGridItemStyles];\n\n /**\n * CSS grid-column value (e.g., \"1 / 3\", \"span 2\").\n * @attr column\n */\n @property({ reflect: true })\n column: string | undefined;\n\n /**\n * CSS grid-row value (e.g., \"1 / 2\").\n * @attr row\n */\n @property({ reflect: true })\n row: string | undefined;\n\n /**\n * Column span shorthand — equivalent to setting `column: \"span N\"`.\n * @attr span\n */\n @property({ type: Number, reflect: true })\n span: number | undefined;\n\n override updated(changed: PropertyValues<this>): void {\n if (changed.has('column') || changed.has('row') || changed.has('span')) {\n this._applyHostGridStyles();\n }\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this._applyHostGridStyles();\n }\n\n /** @internal */\n private _applyHostGridStyles(): void {\n if (this.column) {\n this.style.gridColumn = this.column;\n } else if (this.span !== undefined) {\n this.style.gridColumn = `span ${this.span}`;\n } else {\n this.style.gridColumn = '';\n }\n if (this.row) {\n this.style.gridRow = this.row;\n } else {\n this.style.gridRow = '';\n }\n }\n\n override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-grid': HelixGrid;\n 'hx-grid-item': HelixGridItem;\n }\n}\n"],"names":["helixGridStyles","css","helixGridItemStyles","GAP_TOKENS","HelixGrid","LitElement","cols","size","html","styleMap","tokenStyles","__decorateClass","property","customElement","HelixGridItem","changed"],"mappings":";;;;AAEO,MAAMA,IAAkBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQlBC,IAAsBD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;ACAnC,MAAME,IAAsC;AAAA,EAC1C,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAA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,EAAS,EAAE,SAAS,GAAA,CAAM;AAAA,GAdhBE,EAeX,WAAA,OAAA,CAAA;AAOAH,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GArB9BE,EAsBX,WAAA,QAAA,CAAA;AAtBWA,IAANH,EAAA;AAAA,EADNE,EAAc,cAAc;AAAA,GAChBC,CAAA;"}
@@ -1,4 +1,4 @@
1
- import { css as p, html as n, LitElement as v, nothing as c } from "lit";
1
+ import { css as p, LitElement as v, nothing as c, html as n } from "lit";
2
2
  import { property as f, customElement as u } from "lit/decorators.js";
3
3
  import { classMap as d } from "lit/directives/class-map.js";
4
4
  import { ifDefined as h } from "lit/directives/if-defined.js";
@@ -132,4 +132,4 @@ i = x([
132
132
  export {
133
133
  i as H
134
134
  };
135
- //# sourceMappingURL=hx-help-text-DaOPN1iB.js.map
135
+ //# sourceMappingURL=hx-help-text-BAcEGRUE.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hx-help-text-DaOPN1iB.js","sources":["../../src/components/hx-help-text/hx-help-text.styles.ts","../../src/components/hx-help-text/hx-help-text.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixHelpTextStyles = css`\n :host {\n display: block;\n }\n\n .help-text {\n display: inline-flex;\n align-items: baseline;\n gap: var(--hx-help-text-icon-gap, 0.375rem);\n font-family: var(--hx-help-text-font-family, var(--hx-font-family-sans, sans-serif));\n font-size: var(--hx-help-text-font-size, var(--hx-font-size-sm, 0.875rem));\n font-weight: var(--hx-help-text-font-weight, var(--hx-font-weight-normal, 400));\n line-height: var(--hx-help-text-line-height, var(--hx-line-height-normal, 1.5));\n color: var(--hx-help-text-color, var(--hx-color-neutral-500, #6b7280));\n margin: 0;\n }\n\n .help-text__icon {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n }\n\n .help-text__text {\n min-width: 0;\n }\n\n /* ─── Variant: default ─── */\n\n .help-text--default {\n --hx-help-text-color: var(--hx-color-neutral-500, #6b7280);\n }\n\n /* ─── Variant: error ─── */\n\n .help-text--error {\n --hx-help-text-color: var(--hx-color-error-600, #dc2626);\n }\n\n /* ─── Variant: warning ─── */\n\n .help-text--warning {\n --hx-help-text-color: var(--hx-color-warning-700, #b45309);\n }\n\n /* ─── Variant: success ─── */\n\n .help-text--success {\n --hx-help-text-color: var(--hx-color-success-700, #15803d);\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixHelpTextStyles } from './hx-help-text.styles.js';\n\n/** Icon SVG for error variant (circle with exclamation mark). */\nconst errorIcon = html`<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\" width=\"1em\" height=\"1em\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" />\n <line\n x1=\"8\"\n y1=\"4.5\"\n x2=\"8\"\n y2=\"8.5\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <circle cx=\"8\" cy=\"11\" r=\"0.75\" fill=\"currentColor\" />\n</svg>`;\n\n/** Icon SVG for warning variant (triangle with exclamation mark). */\nconst warningIcon = html`<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\" width=\"1em\" height=\"1em\">\n <path\n d=\"M7.134 2.5a1 1 0 011.732 0l5.196 9a1 1 0 01-.866 1.5H2.804a1 1 0 01-.866-1.5l5.196-9z\"\n stroke=\"currentColor\"\n stroke-width=\"1.25\"\n fill=\"none\"\n />\n <line\n x1=\"8\"\n y1=\"6\"\n x2=\"8\"\n y2=\"9\"\n stroke=\"currentColor\"\n stroke-width=\"1.25\"\n stroke-linecap=\"round\"\n />\n <circle cx=\"8\" cy=\"11\" r=\"0.625\" fill=\"currentColor\" />\n</svg>`;\n\n/** Icon SVG for success variant (circle with checkmark). */\nconst successIcon = html`<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\" width=\"1em\" height=\"1em\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" />\n <path\n d=\"M5.25 8.25l1.75 1.75 3.75-3.75\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n fill=\"none\"\n />\n</svg>`;\n\n/** Map of variant to icon template. Default has no icon. */\nconst variantIcons = {\n default: nothing,\n error: errorIcon,\n warning: warningIcon,\n success: successIcon,\n} as const;\n\n/**\n * Standardized help/hint text displayed below form fields.\n * Used by hx-field as a consistent sub-component for guidance and validation messages.\n *\n * Non-default variants render an inline icon alongside the text to satisfy\n * WCAG 1.4.1 (color is not the sole visual indicator). The `error` variant\n * uses `role=\"alert\"` for immediate screen-reader announcement; `warning`\n * and `success` use `aria-live=\"polite\"` for non-intrusive announcements.\n *\n * @summary Help text displayed below form controls for guidance or validation feedback.\n *\n * @tag hx-help-text\n *\n * @slot - The help text content.\n *\n * @csspart base - The root element of the help text.\n * @csspart icon - The icon wrapper (only rendered for non-default variants).\n * @csspart text - The text wrapper around the default slot.\n *\n * @cssprop [--hx-help-text-color=var(--hx-color-neutral-500)] - Text color.\n * @cssprop [--hx-help-text-font-family=var(--hx-font-family-sans)] - Font family.\n * @cssprop [--hx-help-text-font-size=var(--hx-font-size-sm)] - Font size.\n * @cssprop [--hx-help-text-font-weight=var(--hx-font-weight-normal)] - Font weight.\n * @cssprop [--hx-help-text-line-height=var(--hx-line-height-normal)] - Line height.\n * @cssprop [--hx-help-text-icon-gap=0.375rem] - Gap between icon and text.\n */\n@customElement('hx-help-text')\nexport class HelixHelpText extends LitElement {\n static override styles = [tokenStyles, helixHelpTextStyles];\n\n /**\n * Visual variant that determines the text color and icon.\n * Use `error` for validation errors, `warning` for cautions, `success` for confirmation.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'error' | 'warning' | 'success' = 'default';\n\n override render() {\n const classes = {\n 'help-text': true,\n [`help-text--${this.variant}`]: true,\n };\n\n const icon = variantIcons[this.variant];\n const role = this.variant === 'error' ? 'alert' : undefined;\n const ariaLive =\n this.variant === 'warning' || this.variant === 'success' ? 'polite' : undefined;\n\n return html`<span\n part=\"base\"\n class=${classMap(classes)}\n role=${ifDefined(role)}\n aria-live=${ifDefined(ariaLive)}\n >${icon !== nothing\n ? html`<span part=\"icon\" class=\"help-text__icon\">${icon}</span>`\n : nothing}<span part=\"text\" class=\"help-text__text\"><slot></slot></span>\n </span>`;\n }\n}\n\n/** Canonical type alias for the hx-help-text component. */\nexport type HxHelpText = HelixHelpText;\n\n/** @deprecated Use {@link HxHelpText} instead. The `Wc` prefix was a legacy naming convention. */\nexport type WcHelpText = HelixHelpText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-help-text': HelixHelpText;\n }\n}\n"],"names":["helixHelpTextStyles","css","errorIcon","html","warningIcon","successIcon","variantIcons","nothing","HelixHelpText","LitElement","classes","icon","role","ariaLive","classMap","ifDefined","tokenStyles","__decorateClass","property","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAsBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;ACMnC,MAAMC,IAAYC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAeZC,IAAcD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAoBdE,IAAcF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAadG,IAAe;AAAA,EACnB,SAASC;AAAA,EACT,OAAOL;AAAA,EACP,SAASE;AAAA,EACT,SAASC;AACX;AA6BO,IAAMG,IAAN,cAA4BC,EAAW;AAAA,EAAvC,cAAA;AAAA,UAAA,GAAA,SAAA,GASL,KAAA,UAAuD;AAAA,EAAA;AAAA,EAE9C,SAAS;AAChB,UAAMC,IAAU;AAAA,MACd,aAAa;AAAA,MACb,CAAC,cAAc,KAAK,OAAO,EAAE,GAAG;AAAA,IAAA,GAG5BC,IAAOL,EAAa,KAAK,OAAO,GAChCM,IAAO,KAAK,YAAY,UAAU,UAAU,QAC5CC,IACJ,KAAK,YAAY,aAAa,KAAK,YAAY,YAAY,WAAW;AAExE,WAAOV;AAAA;AAAA,cAEGW,EAASJ,CAAO,CAAC;AAAA,aAClBK,EAAUH,CAAI,CAAC;AAAA,kBACVG,EAAUF,CAAQ,CAAC;AAAA,SAC5BF,MAASJ,IACRJ,8CAAiDQ,CAAI,YACrDJ,CAAO;AAAA;AAAA,EAEf;AACF;AAhCaC,EACK,SAAS,CAACQ,GAAahB,CAAmB;AAQ1DiB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAR9BV,EASX,WAAA,WAAA,CAAA;AATWA,IAANS,EAAA;AAAA,EADNE,EAAc,cAAc;AAAA,GAChBX,CAAA;"}
1
+ {"version":3,"file":"hx-help-text-BAcEGRUE.js","sources":["../../src/components/hx-help-text/hx-help-text.styles.ts","../../src/components/hx-help-text/hx-help-text.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixHelpTextStyles = css`\n :host {\n display: block;\n }\n\n .help-text {\n display: inline-flex;\n align-items: baseline;\n gap: var(--hx-help-text-icon-gap, 0.375rem);\n font-family: var(--hx-help-text-font-family, var(--hx-font-family-sans, sans-serif));\n font-size: var(--hx-help-text-font-size, var(--hx-font-size-sm, 0.875rem));\n font-weight: var(--hx-help-text-font-weight, var(--hx-font-weight-normal, 400));\n line-height: var(--hx-help-text-line-height, var(--hx-line-height-normal, 1.5));\n color: var(--hx-help-text-color, var(--hx-color-neutral-500, #6b7280));\n margin: 0;\n }\n\n .help-text__icon {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n }\n\n .help-text__text {\n min-width: 0;\n }\n\n /* ─── Variant: default ─── */\n\n .help-text--default {\n --hx-help-text-color: var(--hx-color-neutral-500, #6b7280);\n }\n\n /* ─── Variant: error ─── */\n\n .help-text--error {\n --hx-help-text-color: var(--hx-color-error-600, #dc2626);\n }\n\n /* ─── Variant: warning ─── */\n\n .help-text--warning {\n --hx-help-text-color: var(--hx-color-warning-700, #b45309);\n }\n\n /* ─── Variant: success ─── */\n\n .help-text--success {\n --hx-help-text-color: var(--hx-color-success-700, #15803d);\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixHelpTextStyles } from './hx-help-text.styles.js';\n\n/** Icon SVG for error variant (circle with exclamation mark). */\nconst errorIcon = html`<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\" width=\"1em\" height=\"1em\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" />\n <line\n x1=\"8\"\n y1=\"4.5\"\n x2=\"8\"\n y2=\"8.5\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <circle cx=\"8\" cy=\"11\" r=\"0.75\" fill=\"currentColor\" />\n</svg>`;\n\n/** Icon SVG for warning variant (triangle with exclamation mark). */\nconst warningIcon = html`<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\" width=\"1em\" height=\"1em\">\n <path\n d=\"M7.134 2.5a1 1 0 011.732 0l5.196 9a1 1 0 01-.866 1.5H2.804a1 1 0 01-.866-1.5l5.196-9z\"\n stroke=\"currentColor\"\n stroke-width=\"1.25\"\n fill=\"none\"\n />\n <line\n x1=\"8\"\n y1=\"6\"\n x2=\"8\"\n y2=\"9\"\n stroke=\"currentColor\"\n stroke-width=\"1.25\"\n stroke-linecap=\"round\"\n />\n <circle cx=\"8\" cy=\"11\" r=\"0.625\" fill=\"currentColor\" />\n</svg>`;\n\n/** Icon SVG for success variant (circle with checkmark). */\nconst successIcon = html`<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\" width=\"1em\" height=\"1em\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" />\n <path\n d=\"M5.25 8.25l1.75 1.75 3.75-3.75\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n fill=\"none\"\n />\n</svg>`;\n\n/** Map of variant to icon template. Default has no icon. */\nconst variantIcons = {\n default: nothing,\n error: errorIcon,\n warning: warningIcon,\n success: successIcon,\n} as const;\n\n/**\n * Standardized help/hint text displayed below form fields.\n * Used by hx-field as a consistent sub-component for guidance and validation messages.\n *\n * Non-default variants render an inline icon alongside the text to satisfy\n * WCAG 1.4.1 (color is not the sole visual indicator). The `error` variant\n * uses `role=\"alert\"` for immediate screen-reader announcement; `warning`\n * and `success` use `aria-live=\"polite\"` for non-intrusive announcements.\n *\n * @summary Help text displayed below form controls for guidance or validation feedback.\n *\n * @tag hx-help-text\n *\n * @slot - The help text content.\n *\n * @csspart base - The root element of the help text.\n * @csspart icon - The icon wrapper (only rendered for non-default variants).\n * @csspart text - The text wrapper around the default slot.\n *\n * @cssprop [--hx-help-text-color=var(--hx-color-neutral-500)] - Text color.\n * @cssprop [--hx-help-text-font-family=var(--hx-font-family-sans)] - Font family.\n * @cssprop [--hx-help-text-font-size=var(--hx-font-size-sm)] - Font size.\n * @cssprop [--hx-help-text-font-weight=var(--hx-font-weight-normal)] - Font weight.\n * @cssprop [--hx-help-text-line-height=var(--hx-line-height-normal)] - Line height.\n * @cssprop [--hx-help-text-icon-gap=0.375rem] - Gap between icon and text.\n */\n@customElement('hx-help-text')\nexport class HelixHelpText extends LitElement {\n static override styles = [tokenStyles, helixHelpTextStyles];\n\n /**\n * Visual variant that determines the text color and icon.\n * Use `error` for validation errors, `warning` for cautions, `success` for confirmation.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'error' | 'warning' | 'success' = 'default';\n\n override render() {\n const classes = {\n 'help-text': true,\n [`help-text--${this.variant}`]: true,\n };\n\n const icon = variantIcons[this.variant];\n const role = this.variant === 'error' ? 'alert' : undefined;\n const ariaLive =\n this.variant === 'warning' || this.variant === 'success' ? 'polite' : undefined;\n\n return html`<span\n part=\"base\"\n class=${classMap(classes)}\n role=${ifDefined(role)}\n aria-live=${ifDefined(ariaLive)}\n >${icon !== nothing\n ? html`<span part=\"icon\" class=\"help-text__icon\">${icon}</span>`\n : nothing}<span part=\"text\" class=\"help-text__text\"><slot></slot></span>\n </span>`;\n }\n}\n\n/** Canonical type alias for the hx-help-text component. */\nexport type HxHelpText = HelixHelpText;\n\n/** @deprecated Use {@link HxHelpText} instead. The `Wc` prefix was a legacy naming convention. */\nexport type WcHelpText = HelixHelpText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-help-text': HelixHelpText;\n }\n}\n"],"names":["helixHelpTextStyles","css","errorIcon","html","warningIcon","successIcon","variantIcons","nothing","HelixHelpText","LitElement","classes","icon","role","ariaLive","classMap","ifDefined","tokenStyles","__decorateClass","property","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAsBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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A;AAAA,EADNE,EAAc,cAAc;AAAA,GAChBX,CAAA;"}
@@ -90,6 +90,7 @@ let s = class extends S {
90
90
  e.has("src") && this.src !== this._fetchedSrc && this._fetchInlineSvg(this.src);
91
91
  }
92
92
  // ─── Inline SVG Fetch ───
93
+ /** @internal */
93
94
  async _fetchInlineSvg(e) {
94
95
  const i = ++this._fetchSeq;
95
96
  if (!e) {
@@ -123,6 +124,7 @@ let s = class extends S {
123
124
  * any ARIA attributes from the inner SVG to prevent conflicts with the
124
125
  * wrapper's own ARIA semantics.
125
126
  */
127
+ /** @internal */
126
128
  _sanitizeSvg(e) {
127
129
  const r = new DOMParser().parseFromString(e, "image/svg+xml");
128
130
  if (r.querySelector("parsererror"))
@@ -157,6 +159,7 @@ let s = class extends S {
157
159
  * Returns the href used in the `<use>` element for sprite mode.
158
160
  * If `name` already begins with `#` it is treated as an inline reference.
159
161
  */
162
+ /** @internal */
160
163
  _spriteHref() {
161
164
  const e = this.name;
162
165
  if (e.startsWith("#"))
@@ -164,6 +167,7 @@ let s = class extends S {
164
167
  const i = this.spriteUrl ?? "";
165
168
  return i ? `${i}#${e}` : `#${e}`;
166
169
  }
170
+ /** @internal */
167
171
  _renderSprite() {
168
172
  const e = !this.label.trim();
169
173
  return m`
@@ -182,6 +186,7 @@ let s = class extends S {
182
186
  </svg>
183
187
  `;
184
188
  }
189
+ /** @internal */
185
190
  _renderInline() {
186
191
  if (!this._inlineSvg)
187
192
  return n;
@@ -232,4 +237,4 @@ const v = /* @__PURE__ */ new Map();
232
237
  export {
233
238
  s as H
234
239
  };
235
- //# sourceMappingURL=hx-icon--xsJztDh.js.map
240
+ //# sourceMappingURL=hx-icon-CP6OnLoM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-icon-CP6OnLoM.js","sources":["../../src/components/hx-icon/hx-icon.styles.ts","../../src/components/hx-icon/hx-icon.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixIconStyles = css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n /* vertical-align: middle ensures the icon aligns to the visual centre of\n adjacent inline text rather than the text baseline. */\n vertical-align: middle;\n /* overflow: hidden prevents malformed or oversized icons from painting\n outside the component boundary. The inner SVG may still set\n overflow: visible for its own viewBox content. */\n overflow: hidden;\n width: var(--hx-icon-size, var(--hx-size-6, 1.5rem));\n height: var(--hx-icon-size, var(--hx-size-6, 1.5rem));\n color: var(--hx-icon-color, currentColor);\n flex-shrink: 0;\n }\n\n /* ─── Size Variants ───\n Fallback pixel values mirror the design token values at time of writing.\n If token values are updated the fallbacks should be updated to match. */\n\n :host([hx-size='xs']) {\n --hx-icon-size: var(--hx-size-4, 1rem);\n }\n\n :host([hx-size='sm']) {\n --hx-icon-size: var(--hx-size-5, 1.25rem);\n }\n\n :host([hx-size='md']) {\n --hx-icon-size: var(--hx-size-6, 1.5rem);\n }\n\n :host([hx-size='lg']) {\n --hx-icon-size: var(--hx-size-8, 2rem);\n }\n\n :host([hx-size='xl']) {\n --hx-icon-size: var(--hx-size-10, 2.5rem);\n }\n\n /* ─── SVG (sprite mode) ───\n In sprite mode [part=\"svg\"] is an actual <svg> element. The selector\n targets it specifically. In inline mode the part is applied to a <span>\n wrapper — see .icon__inline below. */\n\n svg[part='svg'] {\n width: 100%;\n height: 100%;\n fill: currentColor;\n display: block;\n overflow: visible;\n }\n\n /* ─── Inline SVG wrapper ───\n In inline mode [part=\"svg\"] is a <span> that wraps the fetched SVG.\n The inner <svg> is sized to fill the wrapper. */\n\n .icon__inline {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n .icon__inline svg {\n width: 100%;\n height: 100%;\n fill: currentColor;\n display: block;\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixIconStyles } from './hx-icon.styles.js';\n\n/**\n * An icon component that supports inline SVG fetching and SVG sprite sheet references.\n * Decorative icons are automatically hidden from assistive technology.\n * When a label is provided the icon is announced as an image with that label.\n *\n * **Render modes:**\n * - **Sprite mode** (recommended for Drupal/SSR): Set `name` and optionally `sprite-url`.\n * Renders an `<svg><use href=\"...#name\">` — works server-side without JavaScript.\n * - **Inline mode**: Set `src` to a URL of a standalone SVG file. The component fetches,\n * sanitizes, and embeds the SVG markup. Requires JavaScript; not server-side renderable.\n * For Drupal/Twig templates use sprite mode to avoid content shift before hydration.\n *\n * @summary SVG icon with sprite and inline fetch modes for healthcare applications.\n *\n * @tag hx-icon\n *\n * @csspart svg - The SVG element rendered in sprite mode, or the inline SVG container\n * in inline mode. In sprite mode this is an `<svg>` element; in inline mode it is a\n * `<span>` element wrapping the fetched SVG. Both expose the same `part` name for\n * consistent external styling via `::part(svg)`.\n *\n * @cssprop [--hx-icon-size=var(--hx-size-6,1.5rem)] - Width and height of the icon.\n * @cssprop [--hx-icon-color=currentColor] - Icon color.\n */\n@customElement('hx-icon')\nexport class HelixIcon extends LitElement {\n static override styles = [tokenStyles, helixIconStyles];\n\n /**\n * Icon name used as the fragment identifier when referencing a sprite sheet.\n * For sprite mode provide the bare symbol id (e.g. `check`). The component\n * will build the full href as `${spriteUrl}#${name}`. If `name` already\n * starts with `#` it is used as-is (inline sprite reference without a base\n * URL).\n * @attr name\n */\n @property({ type: String })\n name = '';\n\n /**\n * URL of a standalone SVG file to fetch and render inline. Takes precedence\n * over sprite mode when both `src` and `spriteUrl`/`name` are set.\n *\n * **Note:** Inline mode requires browser JavaScript (`fetch` + `DOMParser`).\n * It is not server-side renderable. For Drupal/Twig use sprite mode instead.\n * @attr src\n */\n @property({ type: String })\n src: string | undefined = undefined;\n\n /**\n * Base URL of the SVG sprite sheet. Used together with `name` to construct\n * the `<use>` href: `${spriteUrl}#${name}`.\n * @attr sprite-url\n */\n @property({ type: String, attribute: 'sprite-url' })\n spriteUrl: string | undefined = undefined;\n\n /**\n * Size variant of the icon.\n *\n * Set via the `hx-size` HTML attribute (e.g. `hx-size=\"lg\"`) or via the\n * `size` JavaScript property (e.g. `el.size = 'lg'`). Both are equivalent —\n * the `attribute: 'hx-size'` mapping is used to avoid colliding with the\n * native `<input>` `size` attribute in Drupal attribute-passthrough scenarios.\n * The CEM exposes both the JS property name (`size`) and the HTML attribute\n * name (`hx-size`).\n *\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'md';\n\n /**\n * Accessible label for the icon. When non-empty, `role=\"img\"` and\n * `aria-label` are applied so assistive technology announces the icon.\n * When empty the icon is treated as decorative and `aria-hidden=\"true\"` is\n * applied.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Stores the sanitized inner markup of an externally fetched SVG.\n * @internal\n */\n @state()\n private _inlineSvg = '';\n\n /**\n * Tracks the `src` URL that was last successfully fetched so that we only\n * refetch when it genuinely changes.\n * @internal\n */\n @state()\n private _fetchedSrc: string | undefined = undefined;\n\n /**\n * Monotonically-increasing sequence number. Incremented before each fetch so\n * that stale out-of-order responses can be discarded.\n */\n /** @internal */\n private _fetchSeq = 0;\n\n // ─── Lifecycle ───\n\n override updated(changed: PropertyValues<this>): void {\n if (changed.has('src') && this.src !== this._fetchedSrc) {\n void this._fetchInlineSvg(this.src);\n }\n }\n\n // ─── Inline SVG Fetch ───\n\n /** @internal */\n private async _fetchInlineSvg(url: string | undefined): Promise<void> {\n const seq = ++this._fetchSeq;\n\n if (!url) {\n this._inlineSvg = '';\n this._fetchedSrc = undefined;\n return;\n }\n\n // Use module-level cache to avoid duplicate network requests for the same URL.\n // Multiple hx-icon instances sharing the same src will share one in-flight fetch.\n try {\n let pending = _svgCache.get(url);\n if (!pending) {\n pending = fetch(url).then(async (response) => {\n if (!response.ok) {\n _svgCache.delete(url);\n return '';\n }\n return response.text();\n });\n _svgCache.set(url, pending);\n }\n\n const text = await pending;\n if (seq !== this._fetchSeq) return;\n\n if (!text) {\n this._inlineSvg = '';\n this._fetchedSrc = undefined;\n return;\n }\n\n const sanitized = this._sanitizeSvg(text);\n this._inlineSvg = sanitized;\n this._fetchedSrc = url;\n } catch {\n if (seq !== this._fetchSeq) return;\n _svgCache.delete(url);\n this._inlineSvg = '';\n this._fetchedSrc = undefined;\n }\n }\n\n /**\n * Parses the raw SVG text, strips dangerous content (script elements,\n * foreignObject, on* event-handler attributes, javascript:/data: URIs,\n * and style attributes that could carry CSS injection payloads), and\n * returns the outer SVG markup safe for rendering via `unsafeHTML`.\n *\n * Additionally injects `focusable=\"false\"` on the root SVG element to\n * prevent IE11/old-Edge from making the SVG keyboard-focusable, and strips\n * any ARIA attributes from the inner SVG to prevent conflicts with the\n * wrapper's own ARIA semantics.\n */\n /** @internal */\n private _sanitizeSvg(raw: string): string {\n const parser = new DOMParser();\n const doc = parser.parseFromString(raw, 'image/svg+xml');\n\n const parseError = doc.querySelector('parsererror');\n if (parseError) {\n return '';\n }\n\n const svgEl = doc.querySelector('svg');\n if (!svgEl) {\n return '';\n }\n\n // Remove dangerous embedded elements.\n svgEl.querySelectorAll('script, foreignObject').forEach((s) => {\n s.remove();\n });\n\n // URL-bearing attributes that can carry javascript:/data: payloads.\n const urlAttrs = new Set(['href', 'xlink:href', 'src', 'action', 'formaction']);\n\n // ARIA attributes that may conflict with the wrapper element's own semantics.\n // The wrapper <span part=\"svg\"> owns role/aria-label/aria-hidden — the inner\n // SVG must not duplicate or contradict these.\n const ariaAttrs = new Set(['role', 'aria-label', 'aria-labelledby', 'aria-hidden']);\n\n // Sanitize every element including the root svg.\n const allElements: Element[] = [svgEl, ...Array.from(svgEl.querySelectorAll('*'))];\n allElements.forEach((el) => {\n const attrs = Array.from(el.attributes);\n attrs.forEach((attr) => {\n const attrName = attr.name.toLowerCase();\n // Strip event-handler attributes.\n if (attrName.startsWith('on')) {\n el.removeAttribute(attr.name);\n return;\n }\n // Strip style attributes — CSS can carry injection payloads via\n // url(javascript:...), expression(), or external filter/clip-path references.\n if (attrName === 'style') {\n el.removeAttribute(attr.name);\n return;\n }\n // Strip javascript: and data: URIs from URL-bearing attributes.\n if (urlAttrs.has(attrName)) {\n const val = attr.value.replace(/\\s/g, '').toLowerCase();\n if (val.startsWith('javascript:') || val.startsWith('data:')) {\n el.removeAttribute(attr.name);\n }\n }\n });\n });\n\n // Strip ARIA attributes from the root SVG only — they conflict with the\n // wrapper element's ARIA. Child elements' ARIA is left intact.\n ariaAttrs.forEach((a) => svgEl.removeAttribute(a));\n\n // Inject focusable=\"false\" so IE11/old-Edge do not tab into the SVG.\n svgEl.setAttribute('focusable', 'false');\n\n return svgEl.outerHTML;\n }\n\n // ─── Render Helpers ───\n\n /**\n * Returns the href used in the `<use>` element for sprite mode.\n * If `name` already begins with `#` it is treated as an inline reference.\n */\n /** @internal */\n private _spriteHref(): string {\n const n = this.name;\n if (n.startsWith('#')) {\n return n;\n }\n const base = this.spriteUrl ?? '';\n return base ? `${base}#${n}` : `#${n}`;\n }\n\n /** @internal */\n private _renderSprite() {\n const isDecorative = !this.label.trim();\n\n return html`\n <svg\n part=\"svg\"\n class=\"icon__svg\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=${isDecorative ? nothing : 'img'}\n aria-label=${isDecorative ? nothing : this.label}\n aria-hidden=${isDecorative ? 'true' : nothing}\n focusable=\"false\"\n >\n ${isDecorative ? nothing : html`<title>${this.label}</title>`}\n <use href=${this._spriteHref()}></use>\n </svg>\n `;\n }\n\n /** @internal */\n private _renderInline() {\n if (!this._inlineSvg) {\n return nothing;\n }\n\n const isDecorative = !this.label.trim();\n\n // The fetched SVG is rendered inside a wrapper span that carries the\n // csspart and ARIA semantics. The inner SVG from unsafeHTML fills the\n // container via the `.icon__inline svg` CSS rule. ARIA attributes and\n // focusable=\"false\" are injected into the inner SVG by _sanitizeSvg.\n return html`\n <span\n part=\"svg\"\n class=\"icon__inline\"\n role=${isDecorative ? nothing : 'img'}\n aria-label=${isDecorative ? nothing : this.label}\n aria-hidden=${isDecorative ? 'true' : nothing}\n >\n ${unsafeHTML(this._inlineSvg)}\n </span>\n `;\n }\n\n // ─── Render ───\n\n override render() {\n // Inline fetch mode takes precedence when src is a non-empty string.\n if (typeof this.src === 'string' && this.src.trim().length > 0) {\n return this._renderInline();\n }\n\n // Sprite mode: requires at least a name.\n if (this.name) {\n return this._renderSprite();\n }\n\n return nothing;\n }\n}\n\n/**\n * Module-level SVG fetch cache. Shared across all `hx-icon` instances so that\n * multiple icons sharing the same `src` URL issue only one network request.\n * The cache stores in-flight `Promise<string>` values — resolved entries remain\n * cached for the lifetime of the page to prevent redundant re-fetches.\n */\nconst _svgCache = new Map<string, Promise<string>>();\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-icon': HelixIcon;\n }\n}\n"],"names":["helixIconStyles","css","HelixIcon","LitElement","changed","url","seq","pending","_svgCache","response","text","sanitized","raw","doc","svgEl","s","urlAttrs","ariaAttrs","el","attr","attrName","val","a","n","base","isDecorative","html","nothing","unsafeHTML","tokenStyles","__decorateClass","property","state","customElement"],"mappings":";;;;AAEO,MAAMA,IAAkBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AC6BxB,IAAMC,IAAN,cAAwBC,EAAW;AAAA,EAAnC,cAAA;AAAA,UAAA,GAAA,SAA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AA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM,WAAW,WAAW;AAAA,GA7CpD7B,EA8CX,WAAA,QAAA,CAAA;AAUA4B,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAvDf7B,EAwDX,WAAA,SAAA,CAAA;AAOQ4B,EAAA;AAAA,EADPE,EAAA;AAAM,GA9DI9B,EA+DH,WAAA,cAAA,CAAA;AAQA4B,EAAA;AAAA,EADPE,EAAA;AAAM,GAtEI9B,EAuEH,WAAA,eAAA,CAAA;AAvEGA,IAAN4B,EAAA;AAAA,EADNG,EAAc,SAAS;AAAA,GACX/B,CAAA;AAwSb,MAAMM,wBAAgB,IAAA;"}
@@ -169,7 +169,18 @@ let r = class extends p {
169
169
  get form() {
170
170
  return this._internals.form;
171
171
  }
172
+ /** Called by the browser when the form is reset. No value to reset. */
173
+ formResetCallback() {
174
+ }
175
+ /** Called by the browser to restore form state. No value to restore. */
176
+ formStateRestoreCallback(t, n) {
177
+ }
178
+ /** Called when a parent fieldset is disabled/enabled. */
179
+ formDisabledCallback(t) {
180
+ this.disabled = t;
181
+ }
172
182
  // ─── Event Handling ───
183
+ /** @internal */
173
184
  _handleClick(t) {
174
185
  if (this.disabled) {
175
186
  t.preventDefault(), t.stopPropagation();
@@ -184,9 +195,11 @@ let r = class extends p {
184
195
  ), this.href || (this.type === "submit" && this._internals.form ? this._internals.form.requestSubmit() : this.type === "reset" && this._internals.form && this._internals.form.reset());
185
196
  }
186
197
  // ─── Render Helpers ───
198
+ /** @internal */
187
199
  _normalizedLabel() {
188
200
  return this.label.trim();
189
201
  }
202
+ /** @internal */
190
203
  _classes() {
191
204
  return {
192
205
  button: !0,
@@ -194,6 +207,7 @@ let r = class extends p {
194
207
  [`button--${this.size}`]: !0
195
208
  };
196
209
  }
210
+ /** @internal */
197
211
  _iconSlot() {
198
212
  return c`<span part="icon" class="icon"><slot></slot></span>`;
199
213
  }
@@ -262,4 +276,4 @@ r = o([
262
276
  export {
263
277
  r as H
264
278
  };
265
- //# sourceMappingURL=hx-icon-button-iu0i_faq.js.map
279
+ //# sourceMappingURL=hx-icon-button-DzH_bRtC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hx-icon-button-iu0i_faq.js","sources":["../../src/components/hx-icon-button/hx-icon-button.styles.ts","../../src/components/hx-icon-button/hx-icon-button.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixIconButtonStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled);\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: var(--hx-border-width-thin) solid var(--hx-icon-button-border-color);\n border-radius: var(--hx-icon-button-border-radius, var(--hx-border-radius-md));\n background-color: var(--hx-icon-button-bg);\n color: var(--hx-icon-button-color, var(--hx-color-primary-500));\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast),\n color var(--hx-transition-fast),\n border-color var(--hx-transition-fast),\n box-shadow var(--hx-transition-fast);\n text-decoration: none;\n user-select: none;\n -webkit-user-select: none;\n flex-shrink: 0;\n }\n\n .button:focus-visible {\n outline: var(--hx-focus-ring-width) solid\n var(--hx-icon-button-focus-ring-color, var(--hx-focus-ring-color));\n outline-offset: var(--hx-focus-ring-offset);\n }\n\n .button:active {\n filter: brightness(var(--hx-filter-brightness-active, 0.8));\n }\n\n /* ─── Size Variants ─── */\n\n /* WCAG 2.5.5 (healthcare mandate): minimum 44x44px touch target for all sizes.\n min-width/min-height override the explicit size tokens when they fall below\n the 2.75rem (44px) threshold, preserving the visual icon size via font-size. */\n\n .button--sm {\n padding: var(--hx-space-1);\n width: var(--hx-icon-button-size, var(--hx-size-8));\n height: var(--hx-icon-button-size, var(--hx-size-8));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-sm);\n }\n\n .button--md {\n padding: var(--hx-space-2);\n width: var(--hx-icon-button-size, var(--hx-size-10));\n height: var(--hx-icon-button-size, var(--hx-size-10));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-md);\n }\n\n .button--lg {\n padding: var(--hx-space-3);\n width: var(--hx-icon-button-size, var(--hx-size-12));\n height: var(--hx-icon-button-size, var(--hx-size-12));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-lg);\n }\n\n /* ─── Style Variants ─── */\n\n .button--primary {\n --hx-icon-button-bg: var(--hx-color-primary-500);\n --hx-icon-button-color: var(--hx-color-neutral-0);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--primary:hover {\n --hx-icon-button-bg: var(--hx-color-primary-600);\n }\n\n .button--secondary {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-primary-500);\n --hx-icon-button-border-color: var(--hx-color-primary-500);\n }\n\n .button--secondary:hover {\n --hx-icon-button-bg: var(--hx-color-primary-50);\n }\n\n .button--tertiary {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-neutral-700);\n --hx-icon-button-border-color: var(--hx-color-neutral-300);\n }\n\n .button--tertiary:hover {\n --hx-icon-button-bg: var(--hx-color-neutral-100);\n }\n\n .button--danger {\n --hx-icon-button-bg: var(--hx-color-error-500);\n --hx-icon-button-color: var(--hx-color-neutral-0);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--danger:hover {\n --hx-icon-button-bg: var(--hx-color-error-600);\n }\n\n .button--ghost {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-primary-500);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--ghost:hover {\n --hx-icon-button-bg: var(--hx-color-neutral-100);\n }\n\n /* ─── Icon Container ─── */\n\n .icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1em;\n height: 1em;\n line-height: 1;\n pointer-events: none;\n }\n\n /* ─── Disabled ─── */\n\n .button[disabled] {\n cursor: not-allowed;\n /* P1-02 fix: opacity is set only on :host([disabled]) above to prevent\n multiplicative stacking (0.5 * 0.5 = 0.25). Do not add opacity here. */\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .button {\n transition: none;\n }\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixIconButtonStyles } from './hx-icon-button.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * An icon-only button component for compact, accessible actions.\n * Renders a square button or anchor element containing a single icon.\n * The `label` property is required and provides the accessible name\n * via `aria-label` and a native tooltip via the `title` attribute.\n *\n * @summary Icon-only action button with full accessibility support.\n *\n * @tag hx-icon-button\n *\n * @slot - Icon element to display (hx-icon, svg, or img).\n *\n * @fires {CustomEvent<{originalEvent: MouseEvent}>} hx-click - Dispatched when the button is clicked (not disabled).\n *\n * @csspart button - The native button or anchor element.\n * @csspart icon - The icon container span wrapping the default slot.\n *\n * @cssprop [--hx-icon-button-bg=transparent] - Button background color.\n * @cssprop [--hx-icon-button-color=var(--hx-color-primary-500)] - Icon color.\n * @cssprop [--hx-icon-button-border-color=transparent] - Button border color.\n * @cssprop [--hx-icon-button-border-radius=var(--hx-border-radius-md)] - Button border radius.\n * @cssprop [--hx-icon-button-size] - Explicit width and height override for the button.\n * @cssprop [--hx-icon-button-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n */\n@customElement('hx-icon-button')\nexport class HelixIconButton extends LitElement {\n static override styles = [tokenStyles, helixIconButtonStyles];\n\n /**\n * Accessible name for the button. Required. Rendered as `aria-label` and\n * `title` on the underlying element. The component renders nothing when absent,\n * and a console warning is emitted to alert developers during authoring.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Visual style variant of the button.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'ghost' = 'ghost';\n\n /**\n * Size of the button.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * The type attribute for the underlying button element.\n * Has no effect when `href` is set.\n * @attr type\n */\n @property({ type: String })\n type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * Whether the button is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * When set, renders an `<a>` element instead of a `<button>`.\n * @attr href\n */\n @property({ type: String })\n href: string | undefined = undefined;\n\n /**\n * Name submitted with form data. Only applicable when rendering as a button.\n * @attr name\n */\n @property({ type: String })\n name: string | undefined = undefined;\n\n /**\n * Value submitted with form data. Only applicable when rendering as a button.\n * @attr value\n */\n @property({ type: String })\n value: string | undefined = undefined;\n\n // ─── Form Association via ElementInternals ───\n\n static formAssociated = true;\n\n private _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n /** Returns the associated form element, if any. */\n get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n // ─── Event Handling ───\n\n private _handleClick(e: MouseEvent): void {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n /**\n * Dispatched when the button is clicked.\n * @event hx-click\n */\n this.dispatchEvent(\n new CustomEvent('hx-click', {\n bubbles: true,\n composed: true,\n detail: { originalEvent: e },\n }),\n );\n\n // Handle form submission/reset if form-associated and not in href/link mode\n if (!this.href) {\n if (this.type === 'submit' && this._internals.form) {\n this._internals.form.requestSubmit();\n } else if (this.type === 'reset' && this._internals.form) {\n this._internals.form.reset();\n }\n }\n }\n\n // ─── Render Helpers ───\n\n private _normalizedLabel(): string {\n return this.label.trim();\n }\n\n private _classes() {\n return {\n button: true,\n [`button--${this.variant}`]: true,\n [`button--${this.size}`]: true,\n };\n }\n\n private _iconSlot() {\n return html`<span part=\"icon\" class=\"icon\"><slot></slot></span>`;\n }\n\n // ─── Render ───\n\n override render() {\n const normalizedLabel = this._normalizedLabel();\n if (!normalizedLabel) {\n devWarn(\n 'hx-icon-button',\n 'The `label` property is required for accessibility. Render suppressed.',\n );\n return nothing;\n }\n\n if (this.href !== undefined) {\n // P1-03 fix: disabled anchor must set tabindex=\"-1\" explicitly — an <a>\n // without href is non-focusable by default in most browsers, but this is\n // browser-dependent. Explicit tabindex=\"-1\" guarantees keyboard exclusion\n // across all conforming browsers.\n // P1-07 note: aria-disabled IS required on the anchor branch because\n // <a> elements have no native disabled attribute; aria-disabled is the\n // only AT signal available.\n return html`\n <a\n part=\"button\"\n class=${classMap(this._classes())}\n href=${ifDefined(this.disabled ? undefined : this.href)}\n aria-label=${normalizedLabel}\n title=${normalizedLabel}\n aria-disabled=${this.disabled ? 'true' : nothing}\n tabindex=${this.disabled ? '-1' : nothing}\n @click=${this._handleClick}\n >\n ${this._iconSlot()}\n </a>\n `;\n }\n\n // P1-07 fix: aria-disabled is redundant on a natively disabled <button>.\n // The native disabled attribute already exposes aria-disabled=\"true\"\n // implicitly in the accessibility tree. Duplicate explicit aria-disabled\n // creates ambiguity about design intent. Keep only native ?disabled.\n return html`\n <button\n part=\"button\"\n class=${classMap(this._classes())}\n ?disabled=${this.disabled}\n type=${this.type}\n aria-label=${normalizedLabel}\n title=${normalizedLabel}\n name=${ifDefined(this.name)}\n value=${ifDefined(this.value)}\n @click=${this._handleClick}\n >\n ${this._iconSlot()}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-icon-button': HelixIconButton;\n }\n}\n"],"names":["helixIconButtonStyles","css","HelixIconButton","LitElement","e","html","normalizedLabel","classMap","ifDefined","nothing","tokenStyles","__decorateClass","property","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAwBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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KAAK,IAAI,CAAC;AAAA,gBACnBA,EAAU,KAAK,KAAK,CAAC;AAAA,iBACpB,KAAK,YAAY;AAAA;AAAA,UAExB,KAAK,WAAW;AAAA;AAAA,QA3CbC;AAAA,EA8CX;AACF;AAvLaP,EACK,SAAS,CAACQ,GAAaV,CAAqB;AADjDE,EAgEJ,iBAAiB;AAtDxBS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GATfV,EAUX,WAAA,SAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAhB9BV,EAiBX,WAAA,WAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM,WAAW,WAAW;AAAA,GAvBpDV,EAwBX,WAAA,QAAA,CAAA;AAQAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA/BfV,EAgCX,WAAA,QAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAtC/BV,EAuCX,WAAA,YAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA7CfV,EA8CX,WAAA,QAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GApDfV,EAqDX,WAAA,QAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA3DfV,EA4DX,WAAA,SAAA,CAAA;AA5DWA,IAANS,EAAA;AAAA,EADNE,EAAc,gBAAgB;AAAA,GAClBX,CAAA;"}
1
+ {"version":3,"file":"hx-icon-button-DzH_bRtC.js","sources":["../../src/components/hx-icon-button/hx-icon-button.styles.ts","../../src/components/hx-icon-button/hx-icon-button.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixIconButtonStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled);\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: var(--hx-border-width-thin) solid var(--hx-icon-button-border-color);\n border-radius: var(--hx-icon-button-border-radius, var(--hx-border-radius-md));\n background-color: var(--hx-icon-button-bg);\n color: var(--hx-icon-button-color, var(--hx-color-primary-500));\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast),\n color var(--hx-transition-fast),\n border-color var(--hx-transition-fast),\n box-shadow var(--hx-transition-fast);\n text-decoration: none;\n user-select: none;\n -webkit-user-select: none;\n flex-shrink: 0;\n }\n\n .button:focus-visible {\n outline: var(--hx-focus-ring-width) solid\n var(--hx-icon-button-focus-ring-color, var(--hx-focus-ring-color));\n outline-offset: var(--hx-focus-ring-offset);\n }\n\n .button:active {\n filter: brightness(var(--hx-filter-brightness-active, 0.8));\n }\n\n /* ─── Size Variants ─── */\n\n /* WCAG 2.5.5 (healthcare mandate): minimum 44x44px touch target for all sizes.\n min-width/min-height override the explicit size tokens when they fall below\n the 2.75rem (44px) threshold, preserving the visual icon size via font-size. */\n\n .button--sm {\n padding: var(--hx-space-1);\n width: var(--hx-icon-button-size, var(--hx-size-8));\n height: var(--hx-icon-button-size, var(--hx-size-8));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-sm);\n }\n\n .button--md {\n padding: var(--hx-space-2);\n width: var(--hx-icon-button-size, var(--hx-size-10));\n height: var(--hx-icon-button-size, var(--hx-size-10));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-md);\n }\n\n .button--lg {\n padding: var(--hx-space-3);\n width: var(--hx-icon-button-size, var(--hx-size-12));\n height: var(--hx-icon-button-size, var(--hx-size-12));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-lg);\n }\n\n /* ─── Style Variants ─── */\n\n .button--primary {\n --hx-icon-button-bg: var(--hx-color-primary-500);\n --hx-icon-button-color: var(--hx-color-neutral-0);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--primary:hover {\n --hx-icon-button-bg: var(--hx-color-primary-600);\n }\n\n .button--secondary {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-primary-500);\n --hx-icon-button-border-color: var(--hx-color-primary-500);\n }\n\n .button--secondary:hover {\n --hx-icon-button-bg: var(--hx-color-primary-50);\n }\n\n .button--tertiary {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-neutral-700);\n --hx-icon-button-border-color: var(--hx-color-neutral-300);\n }\n\n .button--tertiary:hover {\n --hx-icon-button-bg: var(--hx-color-neutral-100);\n }\n\n .button--danger {\n --hx-icon-button-bg: var(--hx-color-error-500);\n --hx-icon-button-color: var(--hx-color-neutral-0);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--danger:hover {\n --hx-icon-button-bg: var(--hx-color-error-600);\n }\n\n .button--ghost {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-primary-500);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--ghost:hover {\n --hx-icon-button-bg: var(--hx-color-neutral-100);\n }\n\n /* ─── Icon Container ─── */\n\n .icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1em;\n height: 1em;\n line-height: 1;\n pointer-events: none;\n }\n\n /* ─── Disabled ─── */\n\n .button[disabled] {\n cursor: not-allowed;\n /* P1-02 fix: opacity is set only on :host([disabled]) above to prevent\n multiplicative stacking (0.5 * 0.5 = 0.25). Do not add opacity here. */\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .button {\n transition: none;\n }\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixIconButtonStyles } from './hx-icon-button.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * An icon-only button component for compact, accessible actions.\n * Renders a square button or anchor element containing a single icon.\n * The `label` property is required and provides the accessible name\n * via `aria-label` and a native tooltip via the `title` attribute.\n *\n * @summary Icon-only action button with full accessibility support.\n *\n * @tag hx-icon-button\n *\n * @slot - Icon element to display (hx-icon, svg, or img).\n *\n * @fires {CustomEvent<{originalEvent: MouseEvent}>} hx-click - Dispatched when the button is clicked (not disabled).\n *\n * @csspart button - The native button or anchor element.\n * @csspart icon - The icon container span wrapping the default slot.\n *\n * @cssprop [--hx-icon-button-bg=transparent] - Button background color.\n * @cssprop [--hx-icon-button-color=var(--hx-color-primary-500)] - Icon color.\n * @cssprop [--hx-icon-button-border-color=transparent] - Button border color.\n * @cssprop [--hx-icon-button-border-radius=var(--hx-border-radius-md)] - Button border radius.\n * @cssprop [--hx-icon-button-size] - Explicit width and height override for the button.\n * @cssprop [--hx-icon-button-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n */\n@customElement('hx-icon-button')\nexport class HelixIconButton extends LitElement {\n static override styles = [tokenStyles, helixIconButtonStyles];\n\n /**\n * Accessible name for the button. Required. Rendered as `aria-label` and\n * `title` on the underlying element. The component renders nothing when absent,\n * and a console warning is emitted to alert developers during authoring.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Visual style variant of the button.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'ghost' = 'ghost';\n\n /**\n * Size of the button.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * The type attribute for the underlying button element.\n * Has no effect when `href` is set.\n * @attr type\n */\n @property({ type: String })\n type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * Whether the button is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * When set, renders an `<a>` element instead of a `<button>`.\n * @attr href\n */\n @property({ type: String })\n href: string | undefined = undefined;\n\n /**\n * Name submitted with form data. Only applicable when rendering as a button.\n * @attr name\n */\n @property({ type: String })\n name: string | undefined = undefined;\n\n /**\n * Value submitted with form data. Only applicable when rendering as a button.\n * @attr value\n */\n @property({ type: String })\n value: string | undefined = undefined;\n\n // ─── Form Association via ElementInternals ───\n\n static formAssociated = true;\n\n /** @internal */\n private _internals: ElementInternals;\n\n constructor() {\n super();\n /** @internal */\n this._internals = this.attachInternals();\n }\n\n /** Returns the associated form element, if any. */\n get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n /** Called by the browser when the form is reset. No value to reset. */\n formResetCallback(): void {\n // hx-icon-button does not submit a value; no state to reset.\n }\n\n /** Called by the browser to restore form state. No value to restore. */\n formStateRestoreCallback(\n _state: string | File | FormData | null,\n _mode: 'restore' | 'autocomplete',\n ): void {\n // hx-icon-button does not submit a value; no state to restore.\n }\n\n /** Called when a parent fieldset is disabled/enabled. */\n formDisabledCallback(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleClick(e: MouseEvent): void {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n /**\n * Dispatched when the button is clicked.\n * @event hx-click\n */\n this.dispatchEvent(\n new CustomEvent<{ originalEvent: MouseEvent }>('hx-click', {\n bubbles: true,\n composed: true,\n detail: { originalEvent: e },\n }),\n );\n\n // Handle form submission/reset if form-associated and not in href/link mode\n if (!this.href) {\n if (this.type === 'submit' && this._internals.form) {\n this._internals.form.requestSubmit();\n } else if (this.type === 'reset' && this._internals.form) {\n this._internals.form.reset();\n }\n }\n }\n\n // ─── Render Helpers ───\n\n /** @internal */\n private _normalizedLabel(): string {\n return this.label.trim();\n }\n\n /** @internal */\n private _classes() {\n return {\n button: true,\n [`button--${this.variant}`]: true,\n [`button--${this.size}`]: true,\n };\n }\n\n /** @internal */\n private _iconSlot() {\n return html`<span part=\"icon\" class=\"icon\"><slot></slot></span>`;\n }\n\n // ─── Render ───\n\n override render() {\n const normalizedLabel = this._normalizedLabel();\n if (!normalizedLabel) {\n devWarn(\n 'hx-icon-button',\n 'The `label` property is required for accessibility. Render suppressed.',\n );\n return nothing;\n }\n\n if (this.href !== undefined) {\n // P1-03 fix: disabled anchor must set tabindex=\"-1\" explicitly — an <a>\n // without href is non-focusable by default in most browsers, but this is\n // browser-dependent. Explicit tabindex=\"-1\" guarantees keyboard exclusion\n // across all conforming browsers.\n // P1-07 note: aria-disabled IS required on the anchor branch because\n // <a> elements have no native disabled attribute; aria-disabled is the\n // only AT signal available.\n return html`\n <a\n part=\"button\"\n class=${classMap(this._classes())}\n href=${ifDefined(this.disabled ? undefined : this.href)}\n aria-label=${normalizedLabel}\n title=${normalizedLabel}\n aria-disabled=${this.disabled ? 'true' : nothing}\n tabindex=${this.disabled ? '-1' : nothing}\n @click=${this._handleClick}\n >\n ${this._iconSlot()}\n </a>\n `;\n }\n\n // P1-07 fix: aria-disabled is redundant on a natively disabled <button>.\n // The native disabled attribute already exposes aria-disabled=\"true\"\n // implicitly in the accessibility tree. Duplicate explicit aria-disabled\n // creates ambiguity about design intent. Keep only native ?disabled.\n return html`\n <button\n part=\"button\"\n class=${classMap(this._classes())}\n ?disabled=${this.disabled}\n type=${this.type}\n aria-label=${normalizedLabel}\n title=${normalizedLabel}\n name=${ifDefined(this.name)}\n value=${ifDefined(this.value)}\n @click=${this._handleClick}\n >\n ${this._iconSlot()}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-icon-button': HelixIconButton;\n }\n}\n"],"names":["helixIconButtonStyles","css","HelixIconButton","LitElement","_state","_mode","disabled","e","html","normalizedLabel","classMap","ifDefined","nothing","tokenStyles","__decorateClass","property","customElement"],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,MAAM,OAAA,CAAQ;AAAA,GA3Dfb,EA4DX,WAAA,SAAA,CAAA;AA5DWA,IAANY,EAAA;AAAA,EADNE,EAAc,gBAAgB;AAAA,GAClBd,CAAA;"}
@@ -54,9 +54,11 @@ let t = class extends f {
54
54
  constructor() {
55
55
  super(...arguments), this.src = "", this.alt = void 0, this.decorative = !1, this.width = void 0, this.height = void 0, this.loading = "lazy", this.fit = void 0, this.ratio = void 0, this.rounded = void 0, this.fallbackSrc = void 0, this.srcset = void 0, this.sizes = void 0, this._error = !1, this._usedFallbackSrc = !1, this._hasCaptionSlot = !1;
56
56
  }
57
+ /** @internal */
57
58
  _handleLoad() {
58
59
  this.dispatchEvent(new CustomEvent("hx-load", { bubbles: !0, composed: !0 }));
59
60
  }
61
+ /** @internal */
60
62
  _handleError() {
61
63
  if (!this._error && this.fallbackSrc && !this._usedFallbackSrc) {
62
64
  this._usedFallbackSrc = !0;
@@ -64,16 +66,19 @@ let t = class extends f {
64
66
  }
65
67
  this._error = !0, this.dispatchEvent(new CustomEvent("hx-error", { bubbles: !0, composed: !0 }));
66
68
  }
69
+ /** @internal */
67
70
  _onCaptionSlotChange(s) {
68
71
  const o = s.target;
69
72
  this._hasCaptionSlot = o.assignedNodes({ flatten: !0 }).length > 0;
70
73
  }
74
+ /** @internal */
71
75
  _computeBorderRadius() {
72
76
  if (this.rounded === !0 || this.rounded === "" || this.rounded === "true")
73
77
  return "var(--hx-border-radius-md, 0.375rem)";
74
78
  if (typeof this.rounded == "string" && this.rounded.length > 0 && this.rounded !== "false")
75
79
  return this.rounded;
76
80
  }
81
+ /** @internal */
77
82
  _currentSrc() {
78
83
  return this._usedFallbackSrc && this.fallbackSrc ? this.fallbackSrc : this.src;
79
84
  }
@@ -172,4 +177,4 @@ t = e([
172
177
  export {
173
178
  t as H
174
179
  };
175
- //# sourceMappingURL=hx-image-xyb_tHCR.js.map
180
+ //# sourceMappingURL=hx-image-C6pGiI6c.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-image-C6pGiI6c.js","sources":["../../src/components/hx-image/hx-image.styles.ts","../../src/components/hx-image/hx-image.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixImageStyles = css`\n :host {\n display: block;\n }\n\n .image__container {\n position: relative;\n display: block;\n overflow: hidden;\n margin: 0;\n padding: 0;\n aspect-ratio: var(--_ratio, var(--hx-image-aspect-ratio));\n border-radius: var(--_radius, var(--hx-image-border-radius, 0));\n }\n\n .image__container--error {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: var(--hx-image-fallback-min-height, 3rem);\n background-color: var(--hx-color-neutral-100, #f3f4f6);\n color: var(--hx-color-neutral-500, #6b7280);\n }\n\n .image__img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: var(--_fit, var(--hx-image-object-fit, cover));\n }\n\n .image__caption {\n display: none;\n padding: var(--hx-image-caption-padding, 0.5rem 0 0);\n color: var(--hx-image-caption-color, var(--hx-color-neutral-600, #4b5563));\n font-size: var(--hx-image-caption-font-size, 0.875rem);\n }\n\n .image__caption--visible {\n display: block;\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixImageStyles } from './hx-image.styles.js';\n\n/**\n * An accessible image wrapper with lazy loading, fallback support, aspect ratio control,\n * responsive image (srcset/sizes) support, and optional caption.\n *\n * @summary Accessible image wrapper with lazy loading, fallback, srcset, and aspect ratio control.\n *\n * @tag hx-image\n *\n * @slot fallback - Custom content shown when the image fails to load and no fallback-src is set.\n * @slot caption - Optional caption content rendered in a figcaption element below the image.\n *\n * @csspart base - The inner img element.\n * @csspart caption - The figcaption element (visible only when caption content is present).\n *\n * @cssprop [--hx-image-object-fit] - Controls how the image fills its container. Maps to object-fit.\n * @cssprop [--hx-image-border-radius] - Border radius of the image. Overridden by the `rounded` prop.\n * @cssprop [--hx-image-aspect-ratio] - Aspect ratio of the image container. Overridden by the `ratio` prop.\n * @cssprop [--hx-image-caption-color] - Text color for the caption.\n * @cssprop [--hx-image-caption-font-size] - Font size for the caption.\n * @cssprop [--hx-image-caption-padding] - Padding for the caption.\n * @cssprop [--hx-image-fallback-min-height] - Minimum height of the error/fallback container.\n *\n * @fires hx-load - Dispatched when the image has successfully loaded.\n * @fires hx-error - Dispatched when the image fails to load (including after fallback-src also fails).\n */\n@customElement('hx-image')\nexport class HelixImage extends LitElement {\n static override styles = [tokenStyles, helixImageStyles];\n\n /**\n * The URL of the image to display.\n * @attr src\n */\n @property({ type: String, reflect: true })\n src = '';\n\n /**\n * Accessible text description of the image.\n * Required for informative images. Use the `decorative` prop for decorative images\n * instead of setting this to an empty string — explicit decorative intent is preferred.\n * @attr alt\n */\n @property({ type: String, reflect: true })\n alt: string | undefined = undefined;\n\n /**\n * Marks the image as decorative (hidden from screen readers).\n * Use this instead of `alt=\"\"` to make decorative intent explicit in markup.\n * When set, the inner img receives `alt=\"\"` and `role=\"presentation\"`.\n * @attr decorative\n */\n @property({ type: Boolean, reflect: true })\n decorative = false;\n\n /**\n * Width of the image element.\n * @attr width\n */\n @property({ reflect: true })\n width: number | string | undefined = undefined;\n\n /**\n * Height of the image element.\n * @attr height\n */\n @property({ reflect: true })\n height: number | string | undefined = undefined;\n\n /**\n * Loading strategy for the image.\n * @attr loading\n */\n @property({ type: String, reflect: true })\n loading: 'lazy' | 'eager' = 'lazy';\n\n /**\n * How the image should be resized to fit its container.\n * Maps to CSS object-fit.\n * @attr fit\n */\n @property({ type: String, reflect: true })\n fit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' | undefined = undefined;\n\n /**\n * CSS aspect-ratio value (e.g. \"16/9\", \"1\", \"4/3\").\n * When set, the container maintains this ratio.\n * @attr ratio\n */\n @property({ type: String, reflect: true })\n ratio: string | undefined = undefined;\n\n /**\n * Border radius for the image.\n * Boolean attribute (or `true`) applies the theme's medium radius token.\n * A string value is used directly as a CSS border-radius value (e.g. \"1rem\", \"50%\").\n *\n * Note: When set as an HTML attribute (`<hx-image rounded>`), Lit receives the value as\n * an empty string (`''`). When set programmatically (`el.rounded = true`), it receives\n * a boolean. Both forms apply the theme radius token.\n *\n * @attr rounded\n */\n @property({ type: String, reflect: true })\n rounded: boolean | string | undefined = undefined;\n\n /**\n * Fallback image URL shown when the primary src fails to load.\n * @attr fallback-src\n */\n @property({ type: String, attribute: 'fallback-src', reflect: true })\n fallbackSrc: string | undefined = undefined;\n\n /**\n * A comma-separated list of image candidates for responsive images.\n * Passed directly to the inner img's srcset attribute.\n * Enables Drupal responsive image styles and browser-native image selection.\n * @attr srcset\n */\n @property({ type: String, reflect: true })\n srcset: string | undefined = undefined;\n\n /**\n * Media conditions indicating which image size to use alongside srcset.\n * Works in conjunction with the `srcset` attribute.\n * @attr sizes\n */\n @property({ type: String, reflect: true })\n sizes: string | undefined = undefined;\n\n /** @internal */\n @state()\n private _error = false;\n\n /** @internal */\n @state()\n private _usedFallbackSrc = false;\n\n /** @internal */\n @state()\n private _hasCaptionSlot = false;\n\n /** @internal */\n private _handleLoad(): void {\n this.dispatchEvent(new CustomEvent<void>('hx-load', { bubbles: true, composed: true }));\n }\n\n /** @internal */\n private _handleError(): void {\n if (!this._error && this.fallbackSrc && !this._usedFallbackSrc) {\n // Try the fallback-src before showing the fallback slot\n this._usedFallbackSrc = true;\n return;\n }\n this._error = true;\n this.dispatchEvent(new CustomEvent<void>('hx-error', { bubbles: true, composed: true }));\n }\n\n /** @internal */\n private _onCaptionSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasCaptionSlot = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** @internal */\n private _computeBorderRadius(): string | undefined {\n if (this.rounded === true || this.rounded === '' || this.rounded === 'true') {\n return 'var(--hx-border-radius-md, 0.375rem)';\n }\n if (typeof this.rounded === 'string' && this.rounded.length > 0 && this.rounded !== 'false') {\n return this.rounded;\n }\n return undefined;\n }\n\n /** @internal */\n private _currentSrc(): string {\n if (this._usedFallbackSrc && this.fallbackSrc) {\n return this.fallbackSrc;\n }\n return this.src;\n }\n\n override render() {\n const isDecorative = this.decorative || this.alt === '';\n const altText = isDecorative ? '' : (this.alt ?? '');\n const borderRadius = this._computeBorderRadius();\n const showCaption = this._hasCaptionSlot;\n\n const containerStyles = {\n ...(this.ratio ? { '--_ratio': this.ratio } : {}),\n ...(this.fit ? { '--_fit': this.fit } : {}),\n ...(borderRadius ? { '--_radius': borderRadius } : {}),\n ...(this.width != null\n ? { width: typeof this.width === 'number' ? `${this.width}px` : this.width }\n : {}),\n ...(this.height != null\n ? { height: typeof this.height === 'number' ? `${this.height}px` : this.height }\n : {}),\n };\n\n if (this._error) {\n return html`\n <figure\n class=\"image__container image__container--error\"\n style=${styleMap(containerStyles)}\n role=\"alert\"\n aria-live=\"polite\"\n >\n <slot name=\"fallback\"></slot>\n </figure>\n `;\n }\n\n return html`\n <figure class=\"image__container\" style=${styleMap(containerStyles)}>\n <img\n part=\"base\"\n class=\"image__img\"\n src=${this._currentSrc() || nothing}\n alt=${altText}\n role=${isDecorative ? 'presentation' : nothing}\n loading=${this.loading}\n width=${this.width != null ? this.width : nothing}\n height=${this.height != null ? this.height : nothing}\n srcset=${this.srcset ?? nothing}\n sizes=${this.sizes ?? nothing}\n @load=${this._handleLoad}\n @error=${this._handleError}\n />\n <figcaption\n part=\"caption\"\n class=${classMap({ image__caption: true, 'image__caption--visible': showCaption })}\n >\n <slot name=\"caption\" @slotchange=${this._onCaptionSlotChange}></slot>\n </figcaption>\n </figure>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-image': HelixImage;\n }\n}\n"],"names":["helixImageStyles","css","HelixImage","LitElement","e","slot","isDecorative","altText","borderRadius","showCaption","containerStyles","html","styleMap","nothing","classMap","tokenStyles","__decorateClass","property","state","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAmBC;AAAA;AAAA;AAAA;AAAA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