@helixui/library 3.8.0 → 3.9.0-next.149

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 (250) hide show
  1. package/README.md +41 -0
  2. package/aaa-verdicts.json +2036 -0
  3. package/custom-elements.json +532 -569
  4. package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
  5. package/dist/components/hx-accordion/hx-accordion-item.styles.d.ts.map +1 -1
  6. package/dist/components/hx-accordion/index.js +1 -1
  7. package/dist/components/hx-alert/hx-alert.d.ts +0 -8
  8. package/dist/components/hx-alert/hx-alert.d.ts.map +1 -1
  9. package/dist/components/hx-alert/hx-alert.styles.d.ts.map +1 -1
  10. package/dist/components/hx-alert/index.js +1 -1
  11. package/dist/components/hx-avatar/hx-avatar.d.ts +4 -1
  12. package/dist/components/hx-avatar/hx-avatar.d.ts.map +1 -1
  13. package/dist/components/hx-avatar/hx-avatar.styles.d.ts.map +1 -1
  14. package/dist/components/hx-avatar/index.js +1 -1
  15. package/dist/components/hx-badge/hx-badge.d.ts.map +1 -1
  16. package/dist/components/hx-badge/hx-badge.styles.d.ts.map +1 -1
  17. package/dist/components/hx-badge/index.js +1 -1
  18. package/dist/components/hx-banner/hx-banner.d.ts +0 -8
  19. package/dist/components/hx-banner/hx-banner.d.ts.map +1 -1
  20. package/dist/components/hx-banner/hx-banner.styles.d.ts.map +1 -1
  21. package/dist/components/hx-banner/index.js +1 -1
  22. package/dist/components/hx-carousel/hx-carousel.d.ts.map +1 -1
  23. package/dist/components/hx-carousel/hx-carousel.styles.d.ts.map +1 -1
  24. package/dist/components/hx-carousel/index.js +1 -1
  25. package/dist/components/hx-checkbox/hx-checkbox.d.ts.map +1 -1
  26. package/dist/components/hx-checkbox/hx-checkbox.styles.d.ts.map +1 -1
  27. package/dist/components/hx-checkbox/index.js +1 -1
  28. package/dist/components/hx-clinical-status/hx-clinical-status.d.ts +7 -9
  29. package/dist/components/hx-clinical-status/hx-clinical-status.d.ts.map +1 -1
  30. package/dist/components/hx-clinical-status/hx-clinical-status.styles.d.ts.map +1 -1
  31. package/dist/components/hx-clinical-status/index.js +1 -1
  32. package/dist/components/hx-combobox/hx-combobox.d.ts.map +1 -1
  33. package/dist/components/hx-combobox/hx-combobox.styles.d.ts.map +1 -1
  34. package/dist/components/hx-combobox/index.js +1 -1
  35. package/dist/components/hx-date-picker/hx-date-picker.d.ts.map +1 -1
  36. package/dist/components/hx-date-picker/hx-date-picker.styles.d.ts.map +1 -1
  37. package/dist/components/hx-date-picker/index.js +1 -1
  38. package/dist/components/hx-drawer/hx-drawer.d.ts.map +1 -1
  39. package/dist/components/hx-drawer/hx-drawer.styles.d.ts.map +1 -1
  40. package/dist/components/hx-drawer/index.js +1 -1
  41. package/dist/components/hx-dropdown/hx-dropdown.styles.d.ts.map +1 -1
  42. package/dist/components/hx-dropdown/index.js +1 -1
  43. package/dist/components/hx-file-upload/hx-file-upload.d.ts +28 -0
  44. package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
  45. package/dist/components/hx-file-upload/hx-file-upload.styles.d.ts.map +1 -1
  46. package/dist/components/hx-file-upload/index.js +1 -1
  47. package/dist/components/hx-help-text/hx-help-text.d.ts.map +1 -1
  48. package/dist/components/hx-help-text/hx-help-text.styles.d.ts.map +1 -1
  49. package/dist/components/hx-help-text/index.js +1 -1
  50. package/dist/components/hx-icon/hx-icon.d.ts +108 -12
  51. package/dist/components/hx-icon/hx-icon.d.ts.map +1 -1
  52. package/dist/components/hx-icon/hx-icon.styles.d.ts.map +1 -1
  53. package/dist/components/hx-icon/index.js +1 -1
  54. package/dist/components/hx-link/hx-link.d.ts.map +1 -1
  55. package/dist/components/hx-link/hx-link.styles.d.ts.map +1 -1
  56. package/dist/components/hx-link/index.js +1 -1
  57. package/dist/components/hx-menu/hx-menu-item.d.ts.map +1 -1
  58. package/dist/components/hx-menu/hx-menu-item.styles.d.ts.map +1 -1
  59. package/dist/components/hx-menu/index.js +1 -1
  60. package/dist/components/hx-nav/hx-nav.d.ts.map +1 -1
  61. package/dist/components/hx-nav/hx-nav.styles.d.ts.map +1 -1
  62. package/dist/components/hx-nav/index.js +1 -1
  63. package/dist/components/hx-number-input/hx-number-input.d.ts.map +1 -1
  64. package/dist/components/hx-number-input/hx-number-input.styles.d.ts.map +1 -1
  65. package/dist/components/hx-number-input/index.js +1 -1
  66. package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts +5 -1
  67. package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts.map +1 -1
  68. package/dist/components/hx-overflow-menu/hx-overflow-menu.styles.d.ts.map +1 -1
  69. package/dist/components/hx-overflow-menu/index.js +1 -1
  70. package/dist/components/hx-phi-field/hx-phi-field.d.ts.map +1 -1
  71. package/dist/components/hx-phi-field/hx-phi-field.styles.d.ts.map +1 -1
  72. package/dist/components/hx-phi-field/index.js +1 -1
  73. package/dist/components/hx-radio-group/hx-radio-group.d.ts.map +1 -1
  74. package/dist/components/hx-radio-group/index.js +1 -1
  75. package/dist/components/hx-rating/hx-rating.d.ts.map +1 -1
  76. package/dist/components/hx-rating/hx-rating.styles.d.ts.map +1 -1
  77. package/dist/components/hx-rating/index.js +1 -1
  78. package/dist/components/hx-side-nav/hx-nav-item.d.ts.map +1 -1
  79. package/dist/components/hx-side-nav/hx-nav-item.styles.d.ts.map +1 -1
  80. package/dist/components/hx-side-nav/hx-side-nav.d.ts.map +1 -1
  81. package/dist/components/hx-side-nav/hx-side-nav.styles.d.ts.map +1 -1
  82. package/dist/components/hx-side-nav/index.js +1 -1
  83. package/dist/components/hx-slider/hx-slider.d.ts +28 -0
  84. package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
  85. package/dist/components/hx-slider/index.js +1 -1
  86. package/dist/components/hx-split-button/hx-split-button.d.ts.map +1 -1
  87. package/dist/components/hx-split-button/hx-split-button.styles.d.ts.map +1 -1
  88. package/dist/components/hx-split-button/index.js +1 -1
  89. package/dist/components/hx-stat/hx-stat.d.ts.map +1 -1
  90. package/dist/components/hx-stat/hx-stat.styles.d.ts.map +1 -1
  91. package/dist/components/hx-stat/index.js +1 -1
  92. package/dist/components/hx-steps/hx-step.d.ts.map +1 -1
  93. package/dist/components/hx-steps/hx-step.styles.d.ts.map +1 -1
  94. package/dist/components/hx-steps/index.js +1 -1
  95. package/dist/components/hx-tag/hx-tag.d.ts.map +1 -1
  96. package/dist/components/hx-tag/hx-tag.styles.d.ts.map +1 -1
  97. package/dist/components/hx-tag/index.js +1 -1
  98. package/dist/components/hx-time-picker/hx-time-picker.d.ts.map +1 -1
  99. package/dist/components/hx-time-picker/hx-time-picker.styles.d.ts.map +1 -1
  100. package/dist/components/hx-time-picker/index.js +1 -1
  101. package/dist/components/hx-toast/hx-toast.d.ts +0 -8
  102. package/dist/components/hx-toast/hx-toast.d.ts.map +1 -1
  103. package/dist/components/hx-toast/hx-toast.styles.d.ts.map +1 -1
  104. package/dist/components/hx-toast/index.js +1 -1
  105. package/dist/components/hx-top-nav/hx-top-nav.d.ts.map +1 -1
  106. package/dist/components/hx-top-nav/hx-top-nav.styles.d.ts.map +1 -1
  107. package/dist/components/hx-top-nav/index.js +1 -1
  108. package/dist/components/hx-tree-view/hx-tree-item.d.ts.map +1 -1
  109. package/dist/components/hx-tree-view/hx-tree-item.styles.d.ts.map +1 -1
  110. package/dist/components/hx-tree-view/index.js +1 -1
  111. package/dist/css/helix-all.css +116 -54
  112. package/dist/css/helix-core.css +19 -4
  113. package/dist/css/helix-feedback.css +15 -18
  114. package/dist/css/helix-forms.css +39 -12
  115. package/dist/css/helix-media.css +6 -3
  116. package/dist/css/helix-navigation.css +16 -7
  117. package/dist/css/helix-overlay.css +10 -0
  118. package/dist/css/helix-tokens.css +3 -2
  119. package/dist/css/helix-utility.css +5 -0
  120. package/dist/css/hx-alert.css +4 -8
  121. package/dist/css/hx-avatar.css +1 -2
  122. package/dist/css/hx-badge.css +5 -0
  123. package/dist/css/hx-banner.css +4 -8
  124. package/dist/css/hx-carousel.css +6 -3
  125. package/dist/css/hx-checkbox.css +4 -9
  126. package/dist/css/hx-clinical-status.css +4 -7
  127. package/dist/css/hx-combobox.css +8 -0
  128. package/dist/css/hx-date-picker.css +5 -0
  129. package/dist/css/hx-drawer.css +5 -0
  130. package/dist/css/hx-dropdown.css +5 -0
  131. package/dist/css/hx-file-upload.css +4 -0
  132. package/dist/css/hx-help-text.css +5 -0
  133. package/dist/css/hx-icon.css +7 -0
  134. package/dist/css/hx-link.css +1 -2
  135. package/dist/css/hx-nav.css +7 -0
  136. package/dist/css/hx-number-input.css +2 -3
  137. package/dist/css/hx-overflow-menu.css +5 -0
  138. package/dist/css/hx-phi-field.css +2 -3
  139. package/dist/css/hx-rating.css +6 -0
  140. package/dist/css/hx-side-nav.css +3 -5
  141. package/dist/css/hx-split-button.css +5 -0
  142. package/dist/css/hx-stat.css +1 -2
  143. package/dist/css/hx-tag.css +5 -0
  144. package/dist/css/hx-time-picker.css +5 -0
  145. package/dist/css/hx-toast.css +6 -0
  146. package/dist/css/hx-top-nav.css +1 -2
  147. package/dist/css/index.css +1 -1
  148. package/dist/css/manifest.json +4 -1
  149. package/dist/index.js +33 -33
  150. package/dist/shared/{hx-accordion-ZVzgDzTG.js → hx-accordion-DR--Ev4t.js} +48 -54
  151. package/dist/shared/hx-accordion-DR--Ev4t.js.map +1 -0
  152. package/dist/shared/{hx-alert-Bto8-TIi.js → hx-alert-C0axS32J.js} +40 -79
  153. package/dist/shared/hx-alert-C0axS32J.js.map +1 -0
  154. package/dist/shared/{hx-avatar-C9hOmlAb.js → hx-avatar-ChAYWnK8.js} +22 -24
  155. package/dist/shared/hx-avatar-ChAYWnK8.js.map +1 -0
  156. package/dist/shared/{hx-badge-DFL35nzi.js → hx-badge-vX-1cuLA.js} +16 -11
  157. package/dist/shared/hx-badge-vX-1cuLA.js.map +1 -0
  158. package/dist/shared/{hx-banner-fpRnciIO.js → hx-banner-PbHwFNSb.js} +51 -90
  159. package/dist/shared/hx-banner-PbHwFNSb.js.map +1 -0
  160. package/dist/shared/{hx-carousel-item-z1Lc24op.js → hx-carousel-item-BVIKgQ4i.js} +72 -102
  161. package/dist/shared/hx-carousel-item-BVIKgQ4i.js.map +1 -0
  162. package/dist/shared/{hx-checkbox-DcgyGS9V.js → hx-checkbox-DDSXXhps.js} +31 -38
  163. package/dist/shared/hx-checkbox-DDSXXhps.js.map +1 -0
  164. package/dist/shared/{hx-clinical-status-D3XQIOqX.js → hx-clinical-status-ZSVEc3Qg.js} +68 -87
  165. package/dist/shared/hx-clinical-status-ZSVEc3Qg.js.map +1 -0
  166. package/dist/shared/{hx-combobox-NgJaLbs2.js → hx-combobox-Be-mqOv4.js} +35 -45
  167. package/dist/shared/hx-combobox-Be-mqOv4.js.map +1 -0
  168. package/dist/shared/{hx-date-picker-0PtEav0K.js → hx-date-picker-CziP3Hm1.js} +15 -22
  169. package/dist/shared/hx-date-picker-CziP3Hm1.js.map +1 -0
  170. package/dist/shared/{hx-drawer-CM_upadk.js → hx-drawer-BlU2oX8-.js} +32 -36
  171. package/dist/shared/hx-drawer-BlU2oX8-.js.map +1 -0
  172. package/dist/shared/{hx-dropdown-xHwTJecv.js → hx-dropdown-DREqpIpm.js} +16 -11
  173. package/dist/shared/hx-dropdown-DREqpIpm.js.map +1 -0
  174. package/dist/shared/{hx-file-upload-D3rKROK5.js → hx-file-upload-CU5QGZSP.js} +137 -80
  175. package/dist/shared/hx-file-upload-CU5QGZSP.js.map +1 -0
  176. package/dist/shared/hx-help-text-CNaZ82LT.js +137 -0
  177. package/dist/shared/hx-help-text-CNaZ82LT.js.map +1 -0
  178. package/dist/shared/hx-icon-bxz9eB9a.js +386 -0
  179. package/dist/shared/hx-icon-bxz9eB9a.js.map +1 -0
  180. package/dist/shared/{hx-link-CMnZRUtQ.js → hx-link-BURSdYLp.js} +19 -26
  181. package/dist/shared/hx-link-BURSdYLp.js.map +1 -0
  182. package/dist/shared/{hx-menu-divider-A6Guuzi_.js → hx-menu-divider-g0grbWV9.js} +19 -31
  183. package/dist/shared/hx-menu-divider-g0grbWV9.js.map +1 -0
  184. package/dist/shared/{hx-nav-ChMTfn7o.js → hx-nav-GTsAZGOx.js} +46 -59
  185. package/dist/shared/hx-nav-GTsAZGOx.js.map +1 -0
  186. package/dist/shared/{hx-nav-item-ClN17f1y.js → hx-nav-item-CxE7Mp3M.js} +62 -64
  187. package/dist/shared/hx-nav-item-CxE7Mp3M.js.map +1 -0
  188. package/dist/shared/{hx-number-input-MggsT7F0.js → hx-number-input-Bvyc9kOi.js} +48 -53
  189. package/dist/shared/hx-number-input-Bvyc9kOi.js.map +1 -0
  190. package/dist/shared/{hx-overflow-menu-DFjJAziP.js → hx-overflow-menu-LrTteeR1.js} +32 -39
  191. package/dist/shared/hx-overflow-menu-LrTteeR1.js.map +1 -0
  192. package/dist/shared/{hx-phi-field-C19oxlrr.js → hx-phi-field-sZt_rYIL.js} +46 -66
  193. package/dist/shared/hx-phi-field-sZt_rYIL.js.map +1 -0
  194. package/dist/shared/{hx-radio-BY4zpwdh.js → hx-radio-BD_c9NJy.js} +51 -56
  195. package/dist/shared/{hx-radio-BY4zpwdh.js.map → hx-radio-BD_c9NJy.js.map} +1 -1
  196. package/dist/shared/{hx-rating-C3QP53k9.js → hx-rating-BGK4AxvI.js} +45 -71
  197. package/dist/shared/hx-rating-BGK4AxvI.js.map +1 -0
  198. package/dist/shared/{hx-slider-Blmv_rwS.js → hx-slider-CkOk5BCY.js} +83 -23
  199. package/dist/shared/{hx-slider-Blmv_rwS.js.map → hx-slider-CkOk5BCY.js.map} +1 -1
  200. package/dist/shared/{hx-split-button-CdNz1XAu.js → hx-split-button-Bg9FHrFK.js} +12 -16
  201. package/dist/shared/hx-split-button-Bg9FHrFK.js.map +1 -0
  202. package/dist/shared/{hx-stat-Gtw_SpK8.js → hx-stat-wKxbyep6.js} +22 -55
  203. package/dist/shared/hx-stat-wKxbyep6.js.map +1 -0
  204. package/dist/shared/{hx-step-CUzliIK_.js → hx-step-CyGQAuiB.js} +5 -25
  205. package/dist/shared/hx-step-CyGQAuiB.js.map +1 -0
  206. package/dist/shared/{hx-tag-C5aCUpVi.js → hx-tag-BqO6HY6V.js} +26 -21
  207. package/dist/shared/hx-tag-BqO6HY6V.js.map +1 -0
  208. package/dist/shared/{hx-time-picker-DfJkBwcX.js → hx-time-picker-if5Cl0Ei.js} +32 -38
  209. package/dist/shared/hx-time-picker-if5Cl0Ei.js.map +1 -0
  210. package/dist/shared/{hx-top-nav-CsTxOtVI.js → hx-top-nav-vP6oDWMV.js} +24 -38
  211. package/dist/shared/hx-top-nav-vP6oDWMV.js.map +1 -0
  212. package/dist/shared/{hx-tree-item-CXyspGxI.js → hx-tree-item-D8hwKd5m.js} +54 -57
  213. package/dist/shared/hx-tree-item-D8hwKd5m.js.map +1 -0
  214. package/dist/shared/{toast-factory-Dht3pVsw.js → toast-factory-DgnbFxVs.js} +127 -153
  215. package/dist/shared/toast-factory-DgnbFxVs.js.map +1 -0
  216. package/figma-inventory.json +283 -304
  217. package/package.json +8 -4
  218. package/dist/shared/hx-accordion-ZVzgDzTG.js.map +0 -1
  219. package/dist/shared/hx-alert-Bto8-TIi.js.map +0 -1
  220. package/dist/shared/hx-avatar-C9hOmlAb.js.map +0 -1
  221. package/dist/shared/hx-badge-DFL35nzi.js.map +0 -1
  222. package/dist/shared/hx-banner-fpRnciIO.js.map +0 -1
  223. package/dist/shared/hx-carousel-item-z1Lc24op.js.map +0 -1
  224. package/dist/shared/hx-checkbox-DcgyGS9V.js.map +0 -1
  225. package/dist/shared/hx-clinical-status-D3XQIOqX.js.map +0 -1
  226. package/dist/shared/hx-combobox-NgJaLbs2.js.map +0 -1
  227. package/dist/shared/hx-date-picker-0PtEav0K.js.map +0 -1
  228. package/dist/shared/hx-drawer-CM_upadk.js.map +0 -1
  229. package/dist/shared/hx-dropdown-xHwTJecv.js.map +0 -1
  230. package/dist/shared/hx-file-upload-D3rKROK5.js.map +0 -1
  231. package/dist/shared/hx-help-text-Xb2Yr8x2.js +0 -156
  232. package/dist/shared/hx-help-text-Xb2Yr8x2.js.map +0 -1
  233. package/dist/shared/hx-icon-fuVm4-bk.js +0 -283
  234. package/dist/shared/hx-icon-fuVm4-bk.js.map +0 -1
  235. package/dist/shared/hx-link-CMnZRUtQ.js.map +0 -1
  236. package/dist/shared/hx-menu-divider-A6Guuzi_.js.map +0 -1
  237. package/dist/shared/hx-nav-ChMTfn7o.js.map +0 -1
  238. package/dist/shared/hx-nav-item-ClN17f1y.js.map +0 -1
  239. package/dist/shared/hx-number-input-MggsT7F0.js.map +0 -1
  240. package/dist/shared/hx-overflow-menu-DFjJAziP.js.map +0 -1
  241. package/dist/shared/hx-phi-field-C19oxlrr.js.map +0 -1
  242. package/dist/shared/hx-rating-C3QP53k9.js.map +0 -1
  243. package/dist/shared/hx-split-button-CdNz1XAu.js.map +0 -1
  244. package/dist/shared/hx-stat-Gtw_SpK8.js.map +0 -1
  245. package/dist/shared/hx-step-CUzliIK_.js.map +0 -1
  246. package/dist/shared/hx-tag-C5aCUpVi.js.map +0 -1
  247. package/dist/shared/hx-time-picker-DfJkBwcX.js.map +0 -1
  248. package/dist/shared/hx-top-nav-CsTxOtVI.js.map +0 -1
  249. package/dist/shared/hx-tree-item-CXyspGxI.js.map +0 -1
  250. package/dist/shared/toast-factory-Dht3pVsw.js.map +0 -1
@@ -1,9 +1,9 @@
1
- import { css as V, html as f, nothing as E } from "lit";
2
- import { property as T, query as U, state as Z, customElement as G } from "lit/decorators.js";
1
+ import { css as z, nothing as E, html as C } from "lit";
2
+ import { property as A, query as U, state as Z, customElement as G } from "lit/decorators.js";
3
3
  import { classMap as X } from "lit/directives/class-map.js";
4
4
  import { d as ee } from "./dev-warn-YlwPHjtX.js";
5
5
  import { H as J } from "./helix-element-BNEYeiys.js";
6
- const te = V`
6
+ const te = z`
7
7
  /* ─── hx-toast host ─── */
8
8
 
9
9
  :host {
@@ -117,6 +117,12 @@ const te = V`
117
117
  display: none;
118
118
  }
119
119
 
120
+ /* Match the previous inline 16x16 SVG sizing for both the variant icon and
121
+ the close-button glyph migrated to hx-icon (library="helix"). */
122
+ .toast__glyph {
123
+ --hx-icon-size: 16px;
124
+ }
125
+
120
126
  /* ─── Message ─── */
121
127
 
122
128
  .toast__message {
@@ -196,7 +202,7 @@ const te = V`
196
202
  border: 1px solid ButtonText;
197
203
  }
198
204
  }
199
- `, se = V`
205
+ `, se = z`
200
206
  :host {
201
207
  display: block;
202
208
  position: fixed;
@@ -270,7 +276,7 @@ const te = V`
270
276
  --hx-toast-enter-translate: calc(var(--hx-space-2, 0.5rem) * -1);
271
277
  }
272
278
  `;
273
- var ne = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, _ = (e, t, n, s) => {
279
+ var ne = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, g = (e, t, n, s) => {
274
280
  for (var o = s > 1 ? void 0 : s ? oe(t, n) : t, l = e.length - 1, h; l >= 0; l--)
275
281
  (h = e[l]) && (o = (s ? h(t, n, o) : h(o)) || o);
276
282
  return s && o && ne(t, n, o), o;
@@ -408,56 +414,31 @@ let d = class extends J {
408
414
  // ─── WCAG 1.4.1: Default Icons ───
409
415
  // Each semantic variant renders a default icon when no icon is slotted,
410
416
  // ensuring the severity is not conveyed by color alone.
411
- /** @internal */
412
- _renderSuccessIcon() {
413
- return f`<svg viewBox="0 0 20 20" aria-hidden="true" width="16" height="16">
414
- <path
415
- fill="currentColor"
416
- d="M10 2a8 8 0 100 16 8 8 0 000-16zm3.03 6.28a.75.75 0 00-1.06-1.06L9 10.19 7.78 8.97a.75.75 0 00-1.06 1.06l1.75 1.75a.75.75 0 001.06 0l3.5-3.5z"
417
- />
418
- </svg>`;
419
- }
420
- /** @internal */
421
- _renderWarningIcon() {
422
- return f`<svg viewBox="0 0 20 20" aria-hidden="true" width="16" height="16">
423
- <path
424
- fill="currentColor"
425
- d="M8.49 2.92a1.75 1.75 0 013.02 0l6.25 10.83A1.75 1.75 0 0116.25 16H3.75a1.75 1.75 0 01-1.51-2.25L8.49 2.92zM10 7a.75.75 0 01.75.75v3a.75.75 0 01-1.5 0v-3A.75.75 0 0110 7zm0 7.5a.75.75 0 100-1.5.75.75 0 000 1.5z"
426
- />
427
- </svg>`;
428
- }
429
- /** @internal */
430
- _renderDangerIcon() {
431
- return f`<svg viewBox="0 0 20 20" aria-hidden="true" width="16" height="16">
432
- <path
433
- fill="currentColor"
434
- d="M10 2a8 8 0 100 16 8 8 0 000-16zm-1.72 5.22a.75.75 0 011.06 0L10 7.94l.66-.72a.75.75 0 111.06 1.06L11.06 9l.66.72a.75.75 0 11-1.06 1.06L10 10.06l-.66.72a.75.75 0 01-1.06-1.06L8.94 9l-.66-.72a.75.75 0 010-1.06z"
435
- />
436
- </svg>`;
437
- }
438
- /** @internal */
439
- _renderInfoIcon() {
440
- return f`<svg viewBox="0 0 20 20" aria-hidden="true" width="16" height="16">
441
- <path
442
- fill="currentColor"
443
- d="M10 2a8 8 0 100 16 8 8 0 000-16zm.75 4.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM9.25 9a.75.75 0 011.5 0v4a.75.75 0 01-1.5 0V9z"
444
- />
445
- </svg>`;
446
- }
447
417
  /** @internal Returns the default icon for the current variant, or nothing for 'default'. */
448
418
  get _defaultIcon() {
419
+ let e;
449
420
  switch (this.variant) {
450
421
  case "success":
451
- return this._renderSuccessIcon();
422
+ e = "success";
423
+ break;
452
424
  case "warning":
453
- return this._renderWarningIcon();
425
+ e = "warning";
426
+ break;
454
427
  case "danger":
455
- return this._renderDangerIcon();
428
+ e = "error";
429
+ break;
456
430
  case "info":
457
- return this._renderInfoIcon();
431
+ e = "info";
432
+ break;
458
433
  default:
459
- return E;
434
+ e = null;
460
435
  }
436
+ return e ? C`<hx-icon
437
+ class="toast__glyph"
438
+ library="helix"
439
+ name=${e}
440
+ aria-hidden="true"
441
+ ></hx-icon>` : E;
461
442
  }
462
443
  /** @internal */
463
444
  get _severityLabel() {
@@ -474,7 +455,7 @@ let d = class extends J {
474
455
  // regions).
475
456
  render() {
476
457
  const e = this._severityLabel;
477
- return f`
458
+ return C`
478
459
  <div
479
460
  part="base"
480
461
  class=${X({
@@ -486,8 +467,8 @@ let d = class extends J {
486
467
  @focusin=${this._handleFocusIn}
487
468
  @focusout=${this._handleFocusOut}
488
469
  >
489
- ${this.open ? f`
490
- ${e ? f`<span class="toast__severity-label">${e}: </span>` : E}
470
+ ${this.open ? C`
471
+ ${e ? C`<span class="toast__severity-label">${e}: </span>` : E}
491
472
  <span part="icon" class="toast__icon">
492
473
  <slot name="icon">${this._defaultIcon}</slot>
493
474
  </span>
@@ -497,26 +478,19 @@ let d = class extends J {
497
478
  <span part="action" class="toast__action">
498
479
  <slot name="action" @slotchange=${this._handleActionSlotChange}></slot>
499
480
  </span>
500
- ${this.closable ? f`
481
+ ${this.closable ? C`
501
482
  <button
502
483
  part="close-button"
503
484
  class="toast__close"
504
485
  aria-label=${this.labelClose}
505
486
  @click=${this._handleClose}
506
487
  >
507
- <svg
488
+ <hx-icon
489
+ class="toast__glyph"
490
+ library="helix"
491
+ name="close"
508
492
  aria-hidden="true"
509
- width="16"
510
- height="16"
511
- viewBox="0 0 24 24"
512
- fill="none"
513
- stroke="currentColor"
514
- stroke-width="2"
515
- stroke-linecap="round"
516
- stroke-linejoin="round"
517
- >
518
- <path d="M18 6L6 18M6 6l12 12" />
519
- </svg>
493
+ ></hx-icon>
520
494
  </button>
521
495
  ` : E}
522
496
  ` : E}
@@ -531,41 +505,41 @@ d._SEVERITY_LABELS = {
531
505
  danger: "Error",
532
506
  info: "Info"
533
507
  };
534
- _([
535
- T({ type: String, reflect: !0 })
508
+ g([
509
+ A({ type: String, reflect: !0 })
536
510
  ], d.prototype, "variant", 2);
537
- _([
538
- T({ type: Number })
511
+ g([
512
+ A({ type: Number })
539
513
  ], d.prototype, "duration", 2);
540
- _([
541
- T({ type: Boolean, reflect: !0 })
514
+ g([
515
+ A({ type: Boolean, reflect: !0 })
542
516
  ], d.prototype, "closable", 2);
543
- _([
544
- T({ type: Boolean, reflect: !0 })
517
+ g([
518
+ A({ type: Boolean, reflect: !0 })
545
519
  ], d.prototype, "open", 2);
546
- _([
547
- T({ attribute: "label-close" })
520
+ g([
521
+ A({ attribute: "label-close" })
548
522
  ], d.prototype, "labelClose", 2);
549
- _([
523
+ g([
550
524
  U(".toast")
551
525
  ], d.prototype, "_toastEl", 2);
552
- _([
526
+ g([
553
527
  Z()
554
528
  ], d.prototype, "_hasActionContent", 2);
555
- d = _([
529
+ d = g([
556
530
  G("hx-toast")
557
531
  ], d);
558
- var ae = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, B = (e, t, n, s) => {
532
+ var ae = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, N = (e, t, n, s) => {
559
533
  for (var o = s > 1 ? void 0 : s ? ie(t, n) : t, l = e.length - 1, h; l >= 0; l--)
560
534
  (h = e[l]) && (o = (s ? h(t, n, o) : h(o)) || o);
561
535
  return s && o && ae(t, n, o), o;
562
536
  };
563
- let L = class extends J {
537
+ let M = class extends J {
564
538
  constructor() {
565
539
  super(...arguments), this.placement = "bottom-end", this.stackLimit = 3;
566
540
  }
567
541
  render() {
568
- return f`
542
+ return C`
569
543
  <div
570
544
  part="base"
571
545
  class=${X({
@@ -578,46 +552,46 @@ let L = class extends J {
578
552
  `;
579
553
  }
580
554
  };
581
- L.styles = [se];
582
- B([
583
- T({ type: String, reflect: !0 })
584
- ], L.prototype, "placement", 2);
585
- B([
586
- T({ type: Number, attribute: "stack-limit" })
587
- ], L.prototype, "stackLimit", 2);
588
- L = B([
555
+ M.styles = [se];
556
+ N([
557
+ A({ type: String, reflect: !0 })
558
+ ], M.prototype, "placement", 2);
559
+ N([
560
+ A({ type: Number, attribute: "stack-limit" })
561
+ ], M.prototype, "stackLimit", 2);
562
+ M = N([
589
563
  G("hx-toast-stack")
590
- ], L);
591
- const W = 1500, A = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakSet(), S = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap();
592
- function z(e, t, n) {
564
+ ], M);
565
+ const P = 1500, w = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakSet(), D = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap();
566
+ function W(e, t, n) {
593
567
  const s = e.get(t);
594
568
  s ? (s.push(n), s.sort((o, l) => o - l)) : e.set(t, [n]);
595
569
  }
596
- function D(e, t, n) {
570
+ function I(e, t, n) {
597
571
  const s = e.get(t);
598
572
  if (!s) return;
599
573
  const o = s.indexOf(n);
600
574
  o >= 0 && s.splice(o, 1), s.length === 0 && e.delete(t);
601
575
  }
602
576
  function K(e) {
603
- const t = (S.get(e) ?? 1) - 1;
604
- t > 0 ? S.set(e, t) : S.delete(e);
577
+ const t = (D.get(e) ?? 1) - 1;
578
+ t > 0 ? D.set(e, t) : D.delete(e);
605
579
  }
606
- function P(e) {
607
- const t = A.get(e);
580
+ function q(e) {
581
+ const t = w.get(e);
608
582
  if (!(!t || t.status !== "queued")) {
609
- if (t.status = "cancelled", t.removalObserver !== null && (t.removalObserver.disconnect(), t.removalObserver = null), t.timerId !== null && (clearTimeout(t.timerId), t.timerId = null), K(t.stack), D(H, t.stack, t.fireAt), t.displacement) {
583
+ if (t.status = "cancelled", t.removalObserver !== null && (t.removalObserver.disconnect(), t.removalObserver = null), t.timerId !== null && (clearTimeout(t.timerId), t.timerId = null), K(t.stack), I(H, t.stack, t.fireAt), t.displacement) {
610
584
  const { target: n, fireAt: s, timerId: o } = t.displacement;
611
- clearTimeout(o), I.delete(n), D(y, t.stack, s);
585
+ clearTimeout(o), S.delete(n), I(y, t.stack, s);
612
586
  }
613
587
  for (const n of t.synthDisplacements)
614
- clearTimeout(n.timerId), D(y, t.stack, n.fireAt);
615
- t.synthDisplacements = [], e.style.removeProperty("display"), e.remove(), A.delete(e);
588
+ clearTimeout(n.timerId), I(y, t.stack, n.fireAt);
589
+ t.synthDisplacements = [], e.style.removeProperty("display"), e.remove(), w.delete(e);
616
590
  }
617
591
  }
618
592
  function le(e, t) {
619
- const n = A.get(e);
620
- !n || n.status !== "queued" || (n.status = "showing", n.timerId = null, n.removalObserver !== null && (n.removalObserver.disconnect(), n.removalObserver = null), K(n.stack), D(H, n.stack, n.fireAt), e.style.removeProperty("display"), t(), e.show(), $.set(e, Date.now()), A.delete(e));
593
+ const n = w.get(e);
594
+ !n || n.status !== "queued" || (n.status = "showing", n.timerId = null, n.removalObserver !== null && (n.removalObserver.disconnect(), n.removalObserver = null), K(n.stack), I(H, n.stack, n.fireAt), e.style.removeProperty("display"), t(), e.show(), L.set(e, Date.now()), w.delete(e));
621
595
  }
622
596
  function me(e) {
623
597
  if (typeof document > "u") throw new Error("toast() requires a browser environment");
@@ -627,76 +601,76 @@ function me(e) {
627
601
  let o = 0;
628
602
  const l = [], h = [];
629
603
  if (s.stackLimit > 0) {
630
- const x = [...s.querySelectorAll("hx-toast")].filter((c) => c.open).filter((c) => !I.has(c)), b = S.get(s) ?? 0, m = x.length + b + 1 - s.stackLimit, w = [];
604
+ const x = [...s.querySelectorAll("hx-toast")].filter((c) => c.open).filter((c) => !S.has(c)), _ = D.get(s) ?? 0, m = x.length + _ + 1 - s.stackLimit, b = [];
631
605
  for (let c = 0; c < m; c++) {
632
606
  const u = x[c];
633
607
  if (u) {
634
- const i = $.get(u), a = i === void 0 ? Number.POSITIVE_INFINITY : Date.now() - i;
635
- if (a >= W) {
608
+ const i = L.get(u), a = i === void 0 ? Number.POSITIVE_INFINITY : Date.now() - i;
609
+ if (a >= P) {
636
610
  u.hide();
637
611
  continue;
638
612
  }
639
- const C = W - a, v = Date.now() + C;
640
- I.add(u), z(y, s, v);
641
- const R = s, g = setTimeout(() => {
642
- I.delete(u), D(y, R, v), u.open && u.hide();
643
- }, C);
644
- w.push(v), l.push({ target: u, fireAt: v, timerId: g }), C > o && (o = C);
613
+ const k = P - a, f = Date.now() + k;
614
+ S.add(u), W(y, s, f);
615
+ const R = s, v = setTimeout(() => {
616
+ S.delete(u), I(y, R, f), u.open && u.hide();
617
+ }, k);
618
+ b.push(f), l.push({ target: u, fireAt: f, timerId: v }), k > o && (o = k);
645
619
  continue;
646
620
  }
647
- const O = y.get(s) ?? [], N = H.get(s) ?? [], k = [...O].sort((i, a) => i - a), Q = [...N].sort((i, a) => i - a);
621
+ const $ = y.get(s) ?? [], B = H.get(s) ?? [], T = [...$].sort((i, a) => i - a), Q = [...B].sort((i, a) => i - a);
648
622
  for (const i of Q)
649
- for (let a = 0; a < k.length; a++)
650
- if (k[a] <= i) {
651
- k.splice(a, 1);
623
+ for (let a = 0; a < T.length; a++)
624
+ if (T[a] <= i) {
625
+ T.splice(a, 1);
652
626
  break;
653
627
  }
654
- for (const i of w) {
655
- const a = k.indexOf(i);
656
- a >= 0 && k.splice(a, 1);
628
+ for (const i of b) {
629
+ const a = T.indexOf(i);
630
+ a >= 0 && T.splice(a, 1);
657
631
  }
658
- let M = k[0];
659
- if (M === void 0) {
632
+ let O = T[0];
633
+ if (O === void 0) {
660
634
  const i = [];
661
- for (const g of O) i.push(g);
662
- for (const g of N) i.push(g);
663
- for (const g of w) i.push(g);
635
+ for (const v of $) i.push(v);
636
+ for (const v of B) i.push(v);
637
+ for (const v of b) i.push(v);
664
638
  if (i.length === 0)
665
639
  break;
666
- M = Math.max(...i) + W;
667
- const a = M, C = a - Date.now(), v = s;
668
- z(y, v, a);
640
+ O = Math.max(...i) + P;
641
+ const a = O, k = a - Date.now(), f = s;
642
+ W(y, f, a);
669
643
  const R = setTimeout(() => {
670
- D(y, v, a);
671
- const Y = [...v.querySelectorAll("hx-toast")].filter(
672
- (j) => j.open && !I.has(j)
644
+ I(y, f, a);
645
+ const V = [...f.querySelectorAll("hx-toast")].filter(
646
+ (j) => j.open && !S.has(j)
673
647
  )[0];
674
- Y && Y.hide();
675
- }, C);
648
+ V && V.hide();
649
+ }, k);
676
650
  h.push({ fireAt: a, timerId: R });
677
651
  }
678
- w.push(M);
679
- const F = M - Date.now();
680
- F > o && (o = Math.max(0, F));
652
+ b.push(O);
653
+ const Y = O - Date.now();
654
+ Y > o && (o = Math.max(0, Y));
681
655
  }
682
656
  }
683
657
  const r = document.createElement("hx-toast");
684
658
  r.variant = e.variant ?? "default", r.duration = e.duration ?? 3e3, r.closable = !0, r.textContent = e.message;
685
- const q = () => {
659
+ const F = () => {
686
660
  r.addEventListener("hx-after-hide", () => {
687
- $.delete(r), I.delete(r), r.remove();
661
+ L.delete(r), S.delete(r), r.remove();
688
662
  });
689
663
  };
690
664
  if (o > 0) {
691
- const p = (b) => {
692
- b.stopImmediatePropagation(), b.stopPropagation();
665
+ const p = (_) => {
666
+ _.stopImmediatePropagation(), _.stopPropagation();
693
667
  };
694
668
  r.addEventListener("hx-hide", p, { once: !0 }), r.addEventListener("hx-after-hide", p, { once: !0 }), r.style.display = "none";
695
669
  const x = r.hide.bind(r);
696
670
  r.hide = function() {
697
- const m = A.get(r);
671
+ const m = w.get(r);
698
672
  if ((m == null ? void 0 : m.status) === "queued") {
699
- P(r);
673
+ q(r);
700
674
  return;
701
675
  }
702
676
  x();
@@ -704,42 +678,42 @@ function me(e) {
704
678
  }
705
679
  if (s.appendChild(r), o > 0) {
706
680
  const p = s, x = Date.now() + o;
707
- S.set(p, (S.get(p) ?? 0) + 1), z(H, p, x);
708
- const b = l.length > 0 ? l[0] : null, m = {
681
+ D.set(p, (D.get(p) ?? 0) + 1), W(H, p, x);
682
+ const _ = l.length > 0 ? l[0] : null, m = {
709
683
  status: "queued",
710
684
  stack: p,
711
685
  fireAt: x,
712
686
  timerId: null,
713
- displacement: b,
687
+ displacement: _,
714
688
  synthDisplacements: [...h],
715
689
  removalObserver: null
716
690
  };
717
- A.set(r, m);
718
- const w = new MutationObserver((c) => {
691
+ w.set(r, m);
692
+ const b = new MutationObserver((c) => {
719
693
  for (const u of c)
720
- for (const O of u.removedNodes)
721
- if (O === r) {
722
- P(r);
694
+ for (const $ of u.removedNodes)
695
+ if ($ === r) {
696
+ q(r);
723
697
  return;
724
698
  }
725
699
  });
726
- w.observe(p, { childList: !0 }), m.removalObserver = w, m.timerId = setTimeout(() => {
727
- const c = A.get(r);
700
+ b.observe(p, { childList: !0 }), m.removalObserver = b, m.timerId = setTimeout(() => {
701
+ const c = w.get(r);
728
702
  if (!(!c || c.status === "cancelled")) {
729
703
  if (!r.isConnected) {
730
- P(r);
704
+ q(r);
731
705
  return;
732
706
  }
733
- le(r, q);
707
+ le(r, F);
734
708
  }
735
709
  }, o);
736
710
  } else
737
- q(), r.show(), $.set(r, Date.now());
711
+ F(), r.show(), L.set(r, Date.now());
738
712
  return r;
739
713
  }
740
714
  export {
741
715
  d as H,
742
- L as a,
716
+ M as a,
743
717
  me as t
744
718
  };
745
- //# sourceMappingURL=toast-factory-Dht3pVsw.js.map
719
+ //# sourceMappingURL=toast-factory-DgnbFxVs.js.map