@helixui/library 1.0.0 → 1.0.1

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 (208) hide show
  1. package/custom-elements.json +213 -22
  2. package/dist/components/hx-accordion/hx-accordion-item.d.ts +20 -0
  3. package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
  4. package/dist/components/hx-accordion/index.js +1 -1
  5. package/dist/components/hx-alert/hx-alert.d.ts +10 -0
  6. package/dist/components/hx-alert/hx-alert.d.ts.map +1 -1
  7. package/dist/components/hx-alert/hx-alert.styles.d.ts.map +1 -1
  8. package/dist/components/hx-alert/index.js +1 -1
  9. package/dist/components/hx-badge/hx-badge.d.ts +2 -0
  10. package/dist/components/hx-badge/hx-badge.d.ts.map +1 -1
  11. package/dist/components/hx-badge/hx-badge.styles.d.ts.map +1 -1
  12. package/dist/components/hx-badge/index.js +1 -1
  13. package/dist/components/hx-banner/hx-banner.d.ts +6 -0
  14. package/dist/components/hx-banner/hx-banner.d.ts.map +1 -1
  15. package/dist/components/hx-banner/index.js +1 -1
  16. package/dist/components/hx-breadcrumb/hx-breadcrumb-item.styles.d.ts.map +1 -1
  17. package/dist/components/hx-breadcrumb/index.js +1 -1
  18. package/dist/components/hx-card/hx-card.d.ts +1 -0
  19. package/dist/components/hx-card/hx-card.d.ts.map +1 -1
  20. package/dist/components/hx-card/hx-card.styles.d.ts.map +1 -1
  21. package/dist/components/hx-card/index.js +1 -1
  22. package/dist/components/hx-carousel/hx-carousel.styles.d.ts.map +1 -1
  23. package/dist/components/hx-carousel/index.js +1 -1
  24. package/dist/components/hx-checkbox/hx-checkbox.styles.d.ts.map +1 -1
  25. package/dist/components/hx-checkbox/index.js +1 -1
  26. package/dist/components/hx-code-snippet/index.js +1 -1
  27. package/dist/components/hx-color-picker/hx-color-picker.d.ts +44 -10
  28. package/dist/components/hx-color-picker/hx-color-picker.d.ts.map +1 -1
  29. package/dist/components/hx-color-picker/index.js +1 -1
  30. package/dist/components/hx-combobox/hx-combobox.styles.d.ts.map +1 -1
  31. package/dist/components/hx-combobox/index.js +1 -1
  32. package/dist/components/hx-data-table/hx-data-table.styles.d.ts.map +1 -1
  33. package/dist/components/hx-data-table/index.js +1 -1
  34. package/dist/components/hx-date-picker/hx-date-picker.styles.d.ts.map +1 -1
  35. package/dist/components/hx-date-picker/index.js +1 -1
  36. package/dist/components/hx-dialog/hx-dialog.styles.d.ts.map +1 -1
  37. package/dist/components/hx-dialog/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.d.ts +20 -5
  42. package/dist/components/hx-dropdown/hx-dropdown.d.ts.map +1 -1
  43. package/dist/components/hx-dropdown/index.js +1 -1
  44. package/dist/components/hx-file-upload/hx-file-upload.styles.d.ts.map +1 -1
  45. package/dist/components/hx-file-upload/index.js +1 -1
  46. package/dist/components/hx-icon-button/hx-icon-button.styles.d.ts.map +1 -1
  47. package/dist/components/hx-icon-button/index.js +1 -1
  48. package/dist/components/hx-menu/hx-menu-item.d.ts +1 -0
  49. package/dist/components/hx-menu/hx-menu-item.d.ts.map +1 -1
  50. package/dist/components/hx-menu/hx-menu.d.ts +1 -0
  51. package/dist/components/hx-menu/hx-menu.d.ts.map +1 -1
  52. package/dist/components/hx-menu/index.js +1 -1
  53. package/dist/components/hx-meter/hx-meter.d.ts +1 -0
  54. package/dist/components/hx-meter/hx-meter.d.ts.map +1 -1
  55. package/dist/components/hx-meter/hx-meter.styles.d.ts.map +1 -1
  56. package/dist/components/hx-meter/index.js +1 -1
  57. package/dist/components/hx-nav/hx-nav.styles.d.ts.map +1 -1
  58. package/dist/components/hx-nav/index.js +1 -1
  59. package/dist/components/hx-overflow-menu/hx-overflow-menu.styles.d.ts.map +1 -1
  60. package/dist/components/hx-overflow-menu/index.js +1 -1
  61. package/dist/components/hx-pagination/hx-pagination.styles.d.ts.map +1 -1
  62. package/dist/components/hx-pagination/index.js +1 -1
  63. package/dist/components/hx-popover/hx-popover.d.ts +41 -9
  64. package/dist/components/hx-popover/hx-popover.d.ts.map +1 -1
  65. package/dist/components/hx-popover/hx-popover.styles.d.ts.map +1 -1
  66. package/dist/components/hx-popover/index.js +1 -1
  67. package/dist/components/hx-progress-bar/hx-progress-bar.d.ts +2 -0
  68. package/dist/components/hx-progress-bar/hx-progress-bar.d.ts.map +1 -1
  69. package/dist/components/hx-progress-bar/index.js +1 -1
  70. package/dist/components/hx-radio-group/hx-radio.styles.d.ts.map +1 -1
  71. package/dist/components/hx-radio-group/index.js +1 -1
  72. package/dist/components/hx-select/hx-select.styles.d.ts.map +1 -1
  73. package/dist/components/hx-select/index.js +1 -1
  74. package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
  75. package/dist/components/hx-slider/index.js +1 -1
  76. package/dist/components/hx-split-button/index.js +1 -1
  77. package/dist/components/hx-split-panel/hx-split-panel.d.ts +44 -11
  78. package/dist/components/hx-split-panel/hx-split-panel.d.ts.map +1 -1
  79. package/dist/components/hx-split-panel/hx-split-panel.styles.d.ts.map +1 -1
  80. package/dist/components/hx-split-panel/index.js +1 -1
  81. package/dist/components/hx-tabs/hx-tabs.d.ts.map +1 -1
  82. package/dist/components/hx-tabs/index.js +1 -1
  83. package/dist/components/hx-tag/hx-tag.d.ts +2 -0
  84. package/dist/components/hx-tag/hx-tag.d.ts.map +1 -1
  85. package/dist/components/hx-tag/hx-tag.styles.d.ts.map +1 -1
  86. package/dist/components/hx-tag/index.js +1 -1
  87. package/dist/components/hx-text-input/hx-text-input.d.ts +1 -1
  88. package/dist/components/hx-text-input/index.js +1 -1
  89. package/dist/components/hx-time-picker/hx-time-picker.d.ts +80 -19
  90. package/dist/components/hx-time-picker/hx-time-picker.d.ts.map +1 -1
  91. package/dist/components/hx-time-picker/index.js +1 -1
  92. package/dist/components/hx-toast/hx-toast.d.ts +10 -0
  93. package/dist/components/hx-toast/hx-toast.d.ts.map +1 -1
  94. package/dist/components/hx-toast/hx-toast.styles.d.ts.map +1 -1
  95. package/dist/components/hx-toast/index.js +1 -1
  96. package/dist/components/hx-top-nav/index.js +1 -1
  97. package/dist/components/hx-tree-view/hx-tree-item.d.ts +11 -1
  98. package/dist/components/hx-tree-view/hx-tree-item.d.ts.map +1 -1
  99. package/dist/components/hx-tree-view/hx-tree-item.styles.d.ts.map +1 -1
  100. package/dist/components/hx-tree-view/hx-tree-view.d.ts +1 -0
  101. package/dist/components/hx-tree-view/hx-tree-view.d.ts.map +1 -1
  102. package/dist/components/hx-tree-view/index.js +1 -1
  103. package/dist/index.js +37 -37
  104. package/dist/shared/{hx-accordion-Cyswa6J3.js → hx-accordion-DT8qHOay.js} +54 -37
  105. package/dist/shared/hx-accordion-DT8qHOay.js.map +1 -0
  106. package/dist/shared/{hx-alert-Cg-zxRiU.js → hx-alert-D6uok29t.js} +95 -28
  107. package/dist/shared/hx-alert-D6uok29t.js.map +1 -0
  108. package/dist/shared/{hx-badge-CjT0d8NK.js → hx-badge-BeuWuUj_.js} +57 -31
  109. package/dist/shared/hx-badge-BeuWuUj_.js.map +1 -0
  110. package/dist/shared/{hx-banner-lxAIJ2kR.js → hx-banner-DnCBJtRR.js} +27 -23
  111. package/dist/shared/{hx-banner-lxAIJ2kR.js.map → hx-banner-DnCBJtRR.js.map} +1 -1
  112. package/dist/shared/{hx-breadcrumb-item-C0rz0fzV.js → hx-breadcrumb-item-Bj2UqhzR.js} +12 -8
  113. package/dist/shared/{hx-breadcrumb-item-C0rz0fzV.js.map → hx-breadcrumb-item-Bj2UqhzR.js.map} +1 -1
  114. package/dist/shared/{hx-card-Bg4W4uXC.js → hx-card-B9j2SHyI.js} +15 -11
  115. package/dist/shared/hx-card-B9j2SHyI.js.map +1 -0
  116. package/dist/shared/{hx-carousel-item-BKpmFbUT.js → hx-carousel-item-Be0bC-7o.js} +91 -77
  117. package/dist/shared/hx-carousel-item-Be0bC-7o.js.map +1 -0
  118. package/dist/shared/{hx-checkbox-BMayOpAM.js → hx-checkbox-CuaJqEo7.js} +3 -1
  119. package/dist/shared/hx-checkbox-CuaJqEo7.js.map +1 -0
  120. package/dist/shared/{hx-code-snippet-B4hV7rWG.js → hx-code-snippet-DBwIjl5p.js} +11 -11
  121. package/dist/shared/{hx-code-snippet-B4hV7rWG.js.map → hx-code-snippet-DBwIjl5p.js.map} +1 -1
  122. package/dist/shared/{hx-color-picker-BvfJ_h16.js → hx-color-picker-Bb2UPVc3.js} +2 -2
  123. package/dist/shared/hx-color-picker-Bb2UPVc3.js.map +1 -0
  124. package/dist/shared/{hx-combobox-BBi3izKJ.js → hx-combobox-CNvY-es8.js} +42 -39
  125. package/dist/shared/hx-combobox-CNvY-es8.js.map +1 -0
  126. package/dist/shared/{hx-data-table-DNiDVWR2.js → hx-data-table-BwoJCFgs.js} +9 -8
  127. package/dist/shared/hx-data-table-BwoJCFgs.js.map +1 -0
  128. package/dist/shared/{hx-date-picker-D7yCK0nk.js → hx-date-picker-DDcIBJir.js} +43 -37
  129. package/dist/shared/hx-date-picker-DDcIBJir.js.map +1 -0
  130. package/dist/shared/{hx-dialog-Z7Ou_AZ9.js → hx-dialog-M7so0sRT.js} +41 -34
  131. package/dist/shared/hx-dialog-M7so0sRT.js.map +1 -0
  132. package/dist/shared/{hx-drawer-Dk-_xzy0.js → hx-drawer-CYxuhIQ0.js} +50 -43
  133. package/dist/shared/hx-drawer-CYxuhIQ0.js.map +1 -0
  134. package/dist/shared/{hx-dropdown-DnjLnkTj.js → hx-dropdown-7cfowTWv.js} +30 -30
  135. package/dist/shared/hx-dropdown-7cfowTWv.js.map +1 -0
  136. package/dist/shared/{hx-file-upload-CUORgnKc.js → hx-file-upload-9HbONfqt.js} +49 -43
  137. package/dist/shared/hx-file-upload-9HbONfqt.js.map +1 -0
  138. package/dist/shared/{hx-icon-button-C83bCR0K.js → hx-icon-button-iu0i_faq.js} +39 -29
  139. package/dist/shared/hx-icon-button-iu0i_faq.js.map +1 -0
  140. package/dist/shared/{hx-menu-divider-11Dp2VfM.js → hx-menu-divider-DR8klkFT.js} +32 -26
  141. package/dist/shared/hx-menu-divider-DR8klkFT.js.map +1 -0
  142. package/dist/shared/{hx-meter-UinDQjl6.js → hx-meter-CZ7lnMra.js} +67 -35
  143. package/dist/shared/hx-meter-CZ7lnMra.js.map +1 -0
  144. package/dist/shared/{hx-nav-DSpwWYUX.js → hx-nav-DM6-cGKF.js} +49 -47
  145. package/dist/shared/hx-nav-DM6-cGKF.js.map +1 -0
  146. package/dist/shared/{hx-overflow-menu-C7k5wlZy.js → hx-overflow-menu-CobkjAb8.js} +17 -9
  147. package/dist/shared/{hx-overflow-menu-C7k5wlZy.js.map → hx-overflow-menu-CobkjAb8.js.map} +1 -1
  148. package/dist/shared/{hx-pagination-BQ0cLTuB.js → hx-pagination-10dpXS95.js} +14 -12
  149. package/dist/shared/hx-pagination-10dpXS95.js.map +1 -0
  150. package/dist/shared/hx-popover-ULjonbaO.js +269 -0
  151. package/dist/shared/hx-popover-ULjonbaO.js.map +1 -0
  152. package/dist/shared/{hx-progress-bar-C_mdPVF-.js → hx-progress-bar-CnTibV63.js} +67 -57
  153. package/dist/shared/{hx-progress-bar-C_mdPVF-.js.map → hx-progress-bar-CnTibV63.js.map} +1 -1
  154. package/dist/shared/{hx-radio-Bqyi8re3.js → hx-radio-BnKcRuQu.js} +10 -8
  155. package/dist/shared/{hx-radio-Bqyi8re3.js.map → hx-radio-BnKcRuQu.js.map} +1 -1
  156. package/dist/shared/{hx-select-BBae2LqN.js → hx-select-C50lD7NS.js} +4 -3
  157. package/dist/shared/hx-select-C50lD7NS.js.map +1 -0
  158. package/dist/shared/{hx-slider-CpnxH2UP.js → hx-slider-CprSNrRi.js} +3 -2
  159. package/dist/shared/hx-slider-CprSNrRi.js.map +1 -0
  160. package/dist/shared/{hx-split-button-BvwoG8h2.js → hx-split-button-CHGy4FUc.js} +11 -11
  161. package/dist/shared/{hx-split-button-BvwoG8h2.js.map → hx-split-button-CHGy4FUc.js.map} +1 -1
  162. package/dist/shared/{hx-split-panel-Cxkeauwe.js → hx-split-panel-DYtB45Tr.js} +16 -8
  163. package/dist/shared/hx-split-panel-DYtB45Tr.js.map +1 -0
  164. package/dist/shared/{hx-tab-panel-CHB0u1zF.js → hx-tab-panel-BRNcLICw.js} +55 -52
  165. package/dist/shared/hx-tab-panel-BRNcLICw.js.map +1 -0
  166. package/dist/shared/{hx-tag-SJJtMlOS.js → hx-tag-B3N-vZ6B.js} +80 -55
  167. package/dist/shared/hx-tag-B3N-vZ6B.js.map +1 -0
  168. package/dist/shared/{hx-text-input-BrCjo4fJ.js → hx-text-input-CCZZbWQ9.js} +6 -6
  169. package/dist/shared/hx-text-input-CCZZbWQ9.js.map +1 -0
  170. package/dist/shared/{hx-time-picker-DRRAFuVd.js → hx-time-picker-CJcIjH3C.js} +5 -2
  171. package/dist/shared/hx-time-picker-CJcIjH3C.js.map +1 -0
  172. package/dist/shared/{hx-top-nav-DzW7XLv-.js → hx-top-nav-D2bQpns3.js} +2 -2
  173. package/dist/shared/{hx-top-nav-DzW7XLv-.js.map → hx-top-nav-D2bQpns3.js.map} +1 -1
  174. package/dist/shared/{hx-tree-item-DdH6RbMs.js → hx-tree-item-BobGN76x.js} +119 -96
  175. package/dist/shared/hx-tree-item-BobGN76x.js.map +1 -0
  176. package/dist/shared/{toast-factory-B8jicczW.js → toast-factory-MvMMreTu.js} +178 -94
  177. package/dist/shared/toast-factory-MvMMreTu.js.map +1 -0
  178. package/package.json +1 -1
  179. package/dist/shared/hx-accordion-Cyswa6J3.js.map +0 -1
  180. package/dist/shared/hx-alert-Cg-zxRiU.js.map +0 -1
  181. package/dist/shared/hx-badge-CjT0d8NK.js.map +0 -1
  182. package/dist/shared/hx-card-Bg4W4uXC.js.map +0 -1
  183. package/dist/shared/hx-carousel-item-BKpmFbUT.js.map +0 -1
  184. package/dist/shared/hx-checkbox-BMayOpAM.js.map +0 -1
  185. package/dist/shared/hx-color-picker-BvfJ_h16.js.map +0 -1
  186. package/dist/shared/hx-combobox-BBi3izKJ.js.map +0 -1
  187. package/dist/shared/hx-data-table-DNiDVWR2.js.map +0 -1
  188. package/dist/shared/hx-date-picker-D7yCK0nk.js.map +0 -1
  189. package/dist/shared/hx-dialog-Z7Ou_AZ9.js.map +0 -1
  190. package/dist/shared/hx-drawer-Dk-_xzy0.js.map +0 -1
  191. package/dist/shared/hx-dropdown-DnjLnkTj.js.map +0 -1
  192. package/dist/shared/hx-file-upload-CUORgnKc.js.map +0 -1
  193. package/dist/shared/hx-icon-button-C83bCR0K.js.map +0 -1
  194. package/dist/shared/hx-menu-divider-11Dp2VfM.js.map +0 -1
  195. package/dist/shared/hx-meter-UinDQjl6.js.map +0 -1
  196. package/dist/shared/hx-nav-DSpwWYUX.js.map +0 -1
  197. package/dist/shared/hx-pagination-BQ0cLTuB.js.map +0 -1
  198. package/dist/shared/hx-popover-BQsgrJCW.js +0 -226
  199. package/dist/shared/hx-popover-BQsgrJCW.js.map +0 -1
  200. package/dist/shared/hx-select-BBae2LqN.js.map +0 -1
  201. package/dist/shared/hx-slider-CpnxH2UP.js.map +0 -1
  202. package/dist/shared/hx-split-panel-Cxkeauwe.js.map +0 -1
  203. package/dist/shared/hx-tab-panel-CHB0u1zF.js.map +0 -1
  204. package/dist/shared/hx-tag-SJJtMlOS.js.map +0 -1
  205. package/dist/shared/hx-text-input-BrCjo4fJ.js.map +0 -1
  206. package/dist/shared/hx-time-picker-DRRAFuVd.js.map +0 -1
  207. package/dist/shared/hx-tree-item-DdH6RbMs.js.map +0 -1
  208. package/dist/shared/toast-factory-B8jicczW.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { css as x, LitElement as f, html as p, nothing as h } from "lit";
2
- import { property as r, state as c, customElement as b } from "lit/decorators.js";
1
+ import { css as x, LitElement as b, html as p, nothing as c } from "lit";
2
+ import { property as r, state as h, customElement as f } from "lit/decorators.js";
3
3
  import { classMap as u } from "lit/directives/class-map.js";
4
4
  import { tokenStyles as m } from "@helixui/tokens/lit";
5
5
  const v = x`
@@ -169,7 +169,7 @@ var _ = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (e, o, n
169
169
  (d = e[l]) && (s = (a ? d(o, n, s) : d(s)) || s);
170
170
  return a && s && _(o, n, s), s;
171
171
  };
172
- let t = class extends f {
172
+ let t = class extends b {
173
173
  constructor() {
174
174
  super(...arguments), this.language = "", this.inline = !1, this.wrap = !1, this.copyable = !1, this.maxLines = 0, this.lineNumbers = !1, this.labelCopy = "Copy code", this.labelCopied = "Copied!", this.labelShowMore = "Show more", this.labelShowLess = "Show less", this._copied = !1, this._expanded = !1, this._codeText = "", this._copyTimer = null;
175
175
  }
@@ -249,7 +249,7 @@ let t = class extends f {
249
249
  >
250
250
  ${this._copied ? this.labelCopied : this.labelCopy}
251
251
  </button>
252
- ` : h}
252
+ ` : c}
253
253
  </div>
254
254
 
255
255
  <!-- Visually-hidden live region announces copy confirmation to assistive technology -->
@@ -276,12 +276,12 @@ let t = class extends f {
276
276
  part="expand-button"
277
277
  class="code-snippet__expand-button"
278
278
  type="button"
279
- aria-expanded=${this._expanded ? "true" : "false"}
279
+ aria-expanded=${this._expanded ? "true" : c}
280
280
  @click=${this._handleExpand}
281
281
  >
282
282
  ${this._expanded ? this.labelShowLess : this.labelShowMore}
283
283
  </button>
284
- ` : h}
284
+ ` : c}
285
285
  </div>
286
286
  `;
287
287
  }
@@ -318,18 +318,18 @@ i([
318
318
  r({ type: String, attribute: "label-show-less" })
319
319
  ], t.prototype, "labelShowLess", 2);
320
320
  i([
321
- c()
321
+ h()
322
322
  ], t.prototype, "_copied", 2);
323
323
  i([
324
- c()
324
+ h()
325
325
  ], t.prototype, "_expanded", 2);
326
326
  i([
327
- c()
327
+ h()
328
328
  ], t.prototype, "_codeText", 2);
329
329
  t = i([
330
- b("hx-code-snippet")
330
+ f("hx-code-snippet")
331
331
  ], t);
332
332
  export {
333
333
  t as H
334
334
  };
335
- //# sourceMappingURL=hx-code-snippet-B4hV7rWG.js.map
335
+ //# sourceMappingURL=hx-code-snippet-DBwIjl5p.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hx-code-snippet-B4hV7rWG.js","sources":["../../src/components/hx-code-snippet/hx-code-snippet.styles.ts","../../src/components/hx-code-snippet/hx-code-snippet.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixCodeSnippetStyles = css`\n :host {\n display: block;\n }\n\n :host([inline]) {\n display: inline;\n }\n\n /* ─── Inline Mode ─── */\n\n .code-snippet--inline {\n display: inline;\n font-family: var(--hx-code-snippet-font-family, var(--hx-font-family-mono, monospace));\n font-size: var(--hx-code-snippet-font-size, var(--hx-font-size-sm, 0.875em));\n background-color: var(--hx-code-snippet-inline-bg, var(--hx-color-neutral-100, #f1f5f9));\n color: var(--hx-code-snippet-inline-color, var(--hx-color-neutral-900, #0f172a));\n padding: var(--hx-code-snippet-inline-padding-y, 0.125em)\n var(--hx-code-snippet-inline-padding-x, 0.375em);\n border-radius: var(--hx-code-snippet-border-radius, var(--hx-border-radius-sm, 0.25rem));\n }\n\n /* ─── Block Mode Container ─── */\n\n .code-snippet {\n position: relative;\n background-color: var(--hx-code-snippet-bg, var(--hx-color-neutral-900, #0f172a));\n border-radius: var(--hx-code-snippet-border-radius, var(--hx-border-radius-md, 0.375rem));\n overflow: hidden;\n }\n\n /* ─── Hidden Slot ─── */\n\n .code-snippet__slot {\n display: none;\n }\n\n /* ─── Header ─── */\n\n .code-snippet__header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n padding: var(--hx-space-2, 0.5rem) var(--hx-space-2, 0.5rem) 0;\n min-height: var(--hx-space-8, 2rem);\n }\n\n /* ─── Pre / Code ─── */\n\n .code-snippet__pre {\n margin: 0;\n padding: var(--hx-code-snippet-padding, var(--hx-space-4, 1rem));\n overflow-x: auto;\n white-space: pre;\n }\n\n .code-snippet__pre--wrap {\n white-space: pre-wrap;\n word-break: break-word;\n }\n\n .code-snippet__code {\n display: block;\n font-family: var(--hx-code-snippet-font-family, var(--hx-font-family-mono, monospace));\n font-size: var(--hx-code-snippet-font-size, var(--hx-font-size-sm, 0.875rem));\n line-height: var(--hx-line-height-relaxed, 1.625);\n color: var(--hx-code-snippet-color, var(--hx-color-neutral-100, #f1f5f9));\n tab-size: var(--hx-code-snippet-tab-size, 2);\n }\n\n /* ─── Copy Button ─── */\n\n .code-snippet__copy-button {\n display: inline-flex;\n align-items: center;\n gap: var(--hx-space-1, 0.25rem);\n padding: var(--hx-space-1, 0.25rem) var(--hx-space-2, 0.5rem);\n border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-600, #475569);\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n background-color: var(--hx-color-neutral-800, #1e293b);\n color: var(--hx-color-neutral-200, #e2e8f0);\n font-family: var(--hx-font-family-sans, sans-serif);\n font-size: var(--hx-font-size-xs, 0.75rem);\n font-weight: var(--hx-font-weight-medium, 500);\n line-height: var(--hx-line-height-none, 1);\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n color var(--hx-transition-fast, 150ms ease),\n border-color var(--hx-transition-fast, 150ms ease);\n white-space: nowrap;\n z-index: var(--hx-z-index-raised, 1);\n }\n\n .code-snippet__copy-button:hover {\n background-color: var(--hx-color-neutral-700, #334155);\n border-color: var(--hx-color-neutral-500, #64748b);\n }\n\n .code-snippet__copy-button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .code-snippet__copy-button:active {\n /* Non-standard token — fallback 0.8 applies if token is absent */\n filter: brightness(var(--hx-filter-brightness-active, 0.8));\n }\n\n /* ─── Expand Button ─── */\n\n .code-snippet__expand-button {\n display: block;\n width: 100%;\n padding: var(--hx-space-2, 0.5rem) var(--hx-space-4, 1rem);\n border: none;\n border-top: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-700, #334155);\n background-color: var(--hx-color-neutral-800, #1e293b);\n color: var(--hx-color-neutral-300, #cbd5e1);\n font-family: var(--hx-font-family-sans, sans-serif);\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-weight: var(--hx-font-weight-medium, 500);\n text-align: center;\n cursor: pointer;\n transition: background-color var(--hx-transition-fast, 150ms ease);\n }\n\n .code-snippet__expand-button:hover {\n background-color: var(--hx-color-neutral-700, #334155);\n color: var(--hx-color-neutral-100, #f1f5f9);\n }\n\n .code-snippet__expand-button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n /* ─── Line Numbers ─── */\n\n .code-snippet__line-number {\n display: inline-block;\n min-width: var(--hx-space-8, 2rem);\n padding-right: var(--hx-space-3, 0.75rem);\n color: var(--hx-code-snippet-line-number-color, var(--hx-color-neutral-500, #64748b));\n user-select: none;\n text-align: right;\n }\n\n /* ─── Screen-reader only ─── */\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n`;\n","import { LitElement, html, nothing, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixCodeSnippetStyles } from './hx-code-snippet.styles.js';\n\n/**\n * A styled code block with optional copy button and max-lines truncation.\n * Supports block (`<pre><code>`) and inline (`<code>`) rendering modes.\n * No external syntax highlighting dependency — use the `language` attribute\n * as a hint for consumers integrating their own highlighter via slotted content.\n *\n * @summary Styled code display component with copy-to-clipboard and expand/collapse.\n *\n * @tag hx-code-snippet\n *\n * @slot - Code content as plain text. Note: HTML markup in slot content will be\n * stripped — only text content is extracted. Pre-highlighted HTML is not supported.\n *\n * @fires {CustomEvent<{text: string}>} hx-copy - Dispatched when the copy button is clicked.\n *\n * @csspart base - The outermost container (block: `<div>`, inline: `<code>`).\n * @csspart header - The header bar containing the copy button (block mode only).\n * @csspart code - The `<code>` element containing the content.\n * @csspart copy-button - The copy-to-clipboard button.\n * @csspart expand-button - The \"Show more / Show less\" button.\n *\n * @cssprop [--hx-code-snippet-bg=var(--hx-color-neutral-900,#0f172a)] - Background color.\n * @cssprop [--hx-code-snippet-color=var(--hx-color-neutral-100,#f1f5f9)] - Text color.\n * @cssprop [--hx-code-snippet-font-family=var(--hx-font-family-mono,monospace)] - Font family.\n * @cssprop [--hx-code-snippet-font-size=var(--hx-font-size-sm,0.875rem)] - Font size.\n * @cssprop [--hx-code-snippet-border-radius=var(--hx-border-radius-md,0.375rem)] - Border radius.\n * @cssprop [--hx-code-snippet-padding=var(--hx-space-4,1rem)] - Inner padding (block mode).\n */\n@customElement('hx-code-snippet')\nexport class HelixCodeSnippet extends LitElement {\n static override styles = [tokenStyles, helixCodeSnippetStyles];\n\n // ─── Public Properties ───\n\n /**\n * Language hint for consumers to apply syntax highlighting.\n * Does not affect rendering directly; it is applied as a `language-*` class\n * on the `<code>` element so external highlighters can target it.\n * @attr language\n */\n @property({ type: String, reflect: true })\n language: string = '';\n\n /**\n * When true, renders as an inline `<code>` element instead of a `<pre><code>` block.\n * @attr inline\n */\n @property({ type: Boolean, reflect: true })\n inline: boolean = false;\n\n /**\n * When true, enables word-wrap in block mode.\n * @attr wrap\n */\n @property({ type: Boolean, reflect: true })\n wrap: boolean = false;\n\n /**\n * When true, shows a copy-to-clipboard button. Add the `copyable` attribute to enable it.\n * @attr copyable\n */\n @property({ type: Boolean, reflect: true })\n copyable: boolean = false;\n\n /**\n * Maximum number of lines to display before showing a \"Show more\" button.\n * Set to 0 (default) to disable truncation.\n * @attr max-lines\n */\n @property({ type: Number, attribute: 'max-lines', reflect: true })\n maxLines: number = 0;\n\n /**\n * When true, prepends line numbers to each displayed line in block mode.\n * Line numbers are rendered as `aria-hidden` spans so screen readers skip them.\n * @attr line-numbers\n */\n @property({ type: Boolean, attribute: 'line-numbers', reflect: true })\n lineNumbers: boolean = false;\n\n /**\n * Label for the copy button in idle state.\n * @attr label-copy\n */\n @property({ type: String, attribute: 'label-copy' })\n labelCopy = 'Copy code';\n\n /**\n * Label for the copy button after successful copy.\n * @attr label-copied\n */\n @property({ type: String, attribute: 'label-copied' })\n labelCopied = 'Copied!';\n\n /**\n * Label for the expand button when content is collapsed.\n * @attr label-show-more\n */\n @property({ type: String, attribute: 'label-show-more' })\n labelShowMore = 'Show more';\n\n /**\n * Label for the expand button when content is expanded.\n * @attr label-show-less\n */\n @property({ type: String, attribute: 'label-show-less' })\n labelShowLess = 'Show less';\n\n // ─── Internal State ───\n\n @state() private _copied: boolean = false;\n @state() private _expanded: boolean = false;\n @state() private _codeText: string = '';\n\n private _copyTimer: ReturnType<typeof setTimeout> | null = null;\n\n // ─── Lifecycle ───\n\n override firstUpdated(): void {\n // Prevent flash of empty <code> before slotchange fires by eagerly reading\n // text content from host children that are already present on first render.\n if (!this._codeText) {\n const text = this.textContent?.trim() ?? '';\n if (text) {\n this._codeText = text;\n }\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this._copyTimer !== null) {\n clearTimeout(this._copyTimer);\n this._copyTimer = null;\n }\n }\n\n // ─── Event Handlers ───\n\n private _handleSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement | null;\n if (!slot) return;\n const nodes = slot.assignedNodes({ flatten: true });\n this._codeText = nodes.map((n) => n.textContent ?? '').join('');\n }\n\n private _handleCopy(): void {\n const text = this._codeText;\n\n navigator.clipboard.writeText(text).catch(() => {\n // Clipboard API unavailable (non-HTTPS environments such as Drupal staging) — emit event only.\n // Note: navigator.clipboard requires a secure context (HTTPS or localhost).\n // On HTTP, the copy event still fires but the clipboard is not populated.\n });\n\n this.dispatchEvent(\n new CustomEvent('hx-copy', {\n bubbles: true,\n composed: true,\n detail: { text },\n }),\n );\n\n this._copied = true;\n if (this._copyTimer !== null) clearTimeout(this._copyTimer);\n this._copyTimer = setTimeout(() => {\n this._copied = false;\n }, 2000);\n }\n\n private _handleExpand(): void {\n this._expanded = !this._expanded;\n }\n\n // ─── Helpers ───\n\n private _getDisplayLines(): string[] {\n const lines = this._codeText.split('\\n');\n if (!this.maxLines || this.maxLines <= 0 || this._expanded) {\n return lines;\n }\n if (lines.length <= this.maxLines) {\n return lines;\n }\n return lines.slice(0, this.maxLines);\n }\n\n private _isTruncated(): boolean {\n if (!this.maxLines || this.maxLines <= 0) return false;\n const lines = this._codeText.split('\\n');\n return lines.length > this.maxLines;\n }\n\n private _renderLines(lines: string[]): TemplateResult {\n if (!this.lineNumbers) {\n return html`${lines.join('\\n')}`;\n }\n return html`${lines.map(\n (line, i) =>\n html`<span aria-hidden=\"true\" class=\"code-snippet__line-number\">${i + 1}</span>${line +\n '\\n'}`,\n )}`;\n }\n\n // ─── Render ───\n\n override render(): TemplateResult | typeof nothing {\n if (this.inline) {\n return html`\n <code part=\"base code\" class=\"code-snippet code-snippet--inline\">\n <slot @slotchange=${this._handleSlotChange}></slot>\n </code>\n `;\n }\n\n const displayLines = this._getDisplayLines();\n const truncated = this._isTruncated();\n const preLabel = this.language ? `Code snippet: ${this.language}` : 'Code snippet';\n const codeClasses = classMap({\n 'code-snippet__code': true,\n [`language-${this.language}`]: Boolean(this.language),\n });\n\n return html`\n <div part=\"base\" class=\"code-snippet\">\n <div part=\"header\" class=\"code-snippet__header\">\n ${this.copyable\n ? html`\n <button\n part=\"copy-button\"\n class=\"code-snippet__copy-button\"\n type=\"button\"\n aria-label=${this._copied ? this.labelCopied : this.labelCopy}\n @click=${this._handleCopy}\n >\n ${this._copied ? this.labelCopied : this.labelCopy}\n </button>\n `\n : nothing}\n </div>\n\n <!-- Visually-hidden live region announces copy confirmation to assistive technology -->\n <span\n aria-live=\"polite\"\n style=\"position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;\"\n >${this._copied ? this.labelCopied : ''}</span\n >\n\n <pre\n role=\"region\"\n aria-label=${preLabel}\n class=${classMap({\n 'code-snippet__pre': true,\n 'code-snippet__pre--wrap': this.wrap,\n })}\n ><code part=\"code\" class=${codeClasses}>${this._renderLines(displayLines)}</code></pre>\n\n <!-- Hidden slot to capture text content for display and copy -->\n <slot class=\"code-snippet__slot\" @slotchange=${this._handleSlotChange}></slot>\n\n ${truncated\n ? html`\n <button\n part=\"expand-button\"\n class=\"code-snippet__expand-button\"\n type=\"button\"\n aria-expanded=${this._expanded ? 'true' : 'false'}\n @click=${this._handleExpand}\n >\n ${this._expanded ? this.labelShowLess : this.labelShowMore}\n </button>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-code-snippet': HelixCodeSnippet;\n }\n}\n"],"names":["helixCodeSnippetStyles","css","HelixCodeSnippet","LitElement","text","_a","slot","nodes","n","lines","html","line","i","displayLines","truncated","preLabel","codeClasses","classMap","nothing","tokenStyles","__decorateClass","property","state","customElement"],"mappings":";;;;AAEO,MAAMA,IAAyBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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p.js","sources":["../../src/components/hx-code-snippet/hx-code-snippet.styles.ts","../../src/components/hx-code-snippet/hx-code-snippet.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixCodeSnippetStyles = css`\n :host {\n display: block;\n }\n\n :host([inline]) {\n display: inline;\n }\n\n /* ─── Inline Mode ─── */\n\n .code-snippet--inline {\n display: inline;\n font-family: var(--hx-code-snippet-font-family, var(--hx-font-family-mono, monospace));\n font-size: var(--hx-code-snippet-font-size, var(--hx-font-size-sm, 0.875em));\n background-color: var(--hx-code-snippet-inline-bg, var(--hx-color-neutral-100, #f1f5f9));\n color: var(--hx-code-snippet-inline-color, var(--hx-color-neutral-900, #0f172a));\n padding: var(--hx-code-snippet-inline-padding-y, 0.125em)\n var(--hx-code-snippet-inline-padding-x, 0.375em);\n border-radius: var(--hx-code-snippet-border-radius, var(--hx-border-radius-sm, 0.25rem));\n }\n\n /* ─── Block Mode Container ─── */\n\n .code-snippet {\n position: relative;\n background-color: var(--hx-code-snippet-bg, var(--hx-color-neutral-900, #0f172a));\n border-radius: var(--hx-code-snippet-border-radius, var(--hx-border-radius-md, 0.375rem));\n overflow: hidden;\n }\n\n /* ─── Hidden Slot ─── */\n\n .code-snippet__slot {\n display: none;\n }\n\n /* ─── Header ─── */\n\n .code-snippet__header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n padding: var(--hx-space-2, 0.5rem) var(--hx-space-2, 0.5rem) 0;\n min-height: var(--hx-space-8, 2rem);\n }\n\n /* ─── Pre / Code ─── */\n\n .code-snippet__pre {\n margin: 0;\n padding: var(--hx-code-snippet-padding, var(--hx-space-4, 1rem));\n overflow-x: auto;\n white-space: pre;\n }\n\n .code-snippet__pre--wrap {\n white-space: pre-wrap;\n word-break: break-word;\n }\n\n .code-snippet__code {\n display: block;\n font-family: var(--hx-code-snippet-font-family, var(--hx-font-family-mono, monospace));\n font-size: var(--hx-code-snippet-font-size, var(--hx-font-size-sm, 0.875rem));\n line-height: var(--hx-line-height-relaxed, 1.625);\n color: var(--hx-code-snippet-color, var(--hx-color-neutral-100, #f1f5f9));\n tab-size: var(--hx-code-snippet-tab-size, 2);\n }\n\n /* ─── Copy Button ─── */\n\n .code-snippet__copy-button {\n display: inline-flex;\n align-items: center;\n gap: var(--hx-space-1, 0.25rem);\n padding: var(--hx-space-1, 0.25rem) var(--hx-space-2, 0.5rem);\n border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-600, #475569);\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n background-color: var(--hx-color-neutral-800, #1e293b);\n color: var(--hx-color-neutral-200, #e2e8f0);\n font-family: var(--hx-font-family-sans, sans-serif);\n font-size: var(--hx-font-size-xs, 0.75rem);\n font-weight: var(--hx-font-weight-medium, 500);\n line-height: var(--hx-line-height-none, 1);\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n color var(--hx-transition-fast, 150ms ease),\n border-color var(--hx-transition-fast, 150ms ease);\n white-space: nowrap;\n z-index: var(--hx-z-index-raised, 1);\n }\n\n .code-snippet__copy-button:hover {\n background-color: var(--hx-color-neutral-700, #334155);\n border-color: var(--hx-color-neutral-500, #64748b);\n }\n\n .code-snippet__copy-button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .code-snippet__copy-button:active {\n /* Non-standard token — fallback 0.8 applies if token is absent */\n filter: brightness(var(--hx-filter-brightness-active, 0.8));\n }\n\n /* ─── Expand Button ─── */\n\n .code-snippet__expand-button {\n display: block;\n width: 100%;\n padding: var(--hx-space-2, 0.5rem) var(--hx-space-4, 1rem);\n border: none;\n border-top: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-700, #334155);\n background-color: var(--hx-color-neutral-800, #1e293b);\n color: var(--hx-color-neutral-300, #cbd5e1);\n font-family: var(--hx-font-family-sans, sans-serif);\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-weight: var(--hx-font-weight-medium, 500);\n text-align: center;\n cursor: pointer;\n transition: background-color var(--hx-transition-fast, 150ms ease);\n }\n\n .code-snippet__expand-button:hover {\n background-color: var(--hx-color-neutral-700, #334155);\n color: var(--hx-color-neutral-100, #f1f5f9);\n }\n\n .code-snippet__expand-button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n /* ─── Line Numbers ─── */\n\n .code-snippet__line-number {\n display: inline-block;\n min-width: var(--hx-space-8, 2rem);\n padding-right: var(--hx-space-3, 0.75rem);\n color: var(--hx-code-snippet-line-number-color, var(--hx-color-neutral-500, #64748b));\n user-select: none;\n text-align: right;\n }\n\n /* ─── Screen-reader only ─── */\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n`;\n","import { LitElement, html, nothing, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixCodeSnippetStyles } from './hx-code-snippet.styles.js';\n\n/**\n * A styled code block with optional copy button and max-lines truncation.\n * Supports block (`<pre><code>`) and inline (`<code>`) rendering modes.\n * No external syntax highlighting dependency — use the `language` attribute\n * as a hint for consumers integrating their own highlighter via slotted content.\n *\n * @summary Styled code display component with copy-to-clipboard and expand/collapse.\n *\n * @tag hx-code-snippet\n *\n * @slot - Code content as plain text. Note: HTML markup in slot content will be\n * stripped — only text content is extracted. Pre-highlighted HTML is not supported.\n *\n * @fires {CustomEvent<{text: string}>} hx-copy - Dispatched when the copy button is clicked.\n *\n * @csspart base - The outermost container (block: `<div>`, inline: `<code>`).\n * @csspart header - The header bar containing the copy button (block mode only).\n * @csspart code - The `<code>` element containing the content.\n * @csspart copy-button - The copy-to-clipboard button.\n * @csspart expand-button - The \"Show more / Show less\" button.\n *\n * @cssprop [--hx-code-snippet-bg=var(--hx-color-neutral-900,#0f172a)] - Background color.\n * @cssprop [--hx-code-snippet-color=var(--hx-color-neutral-100,#f1f5f9)] - Text color.\n * @cssprop [--hx-code-snippet-font-family=var(--hx-font-family-mono,monospace)] - Font family.\n * @cssprop [--hx-code-snippet-font-size=var(--hx-font-size-sm,0.875rem)] - Font size.\n * @cssprop [--hx-code-snippet-border-radius=var(--hx-border-radius-md,0.375rem)] - Border radius.\n * @cssprop [--hx-code-snippet-padding=var(--hx-space-4,1rem)] - Inner padding (block mode).\n */\n@customElement('hx-code-snippet')\nexport class HelixCodeSnippet extends LitElement {\n static override styles = [tokenStyles, helixCodeSnippetStyles];\n\n // ─── Public Properties ───\n\n /**\n * Language hint for consumers to apply syntax highlighting.\n * Does not affect rendering directly; it is applied as a `language-*` class\n * on the `<code>` element so external highlighters can target it.\n * @attr language\n */\n @property({ type: String, reflect: true })\n language: string = '';\n\n /**\n * When true, renders as an inline `<code>` element instead of a `<pre><code>` block.\n * @attr inline\n */\n @property({ type: Boolean, reflect: true })\n inline: boolean = false;\n\n /**\n * When true, enables word-wrap in block mode.\n * @attr wrap\n */\n @property({ type: Boolean, reflect: true })\n wrap: boolean = false;\n\n /**\n * When true, shows a copy-to-clipboard button. Add the `copyable` attribute to enable it.\n * @attr copyable\n */\n @property({ type: Boolean, reflect: true })\n copyable: boolean = false;\n\n /**\n * Maximum number of lines to display before showing a \"Show more\" button.\n * Set to 0 (default) to disable truncation.\n * @attr max-lines\n */\n @property({ type: Number, attribute: 'max-lines', reflect: true })\n maxLines: number = 0;\n\n /**\n * When true, prepends line numbers to each displayed line in block mode.\n * Line numbers are rendered as `aria-hidden` spans so screen readers skip them.\n * @attr line-numbers\n */\n @property({ type: Boolean, attribute: 'line-numbers', reflect: true })\n lineNumbers: boolean = false;\n\n /**\n * Label for the copy button in idle state.\n * @attr label-copy\n */\n @property({ type: String, attribute: 'label-copy' })\n labelCopy = 'Copy code';\n\n /**\n * Label for the copy button after successful copy.\n * @attr label-copied\n */\n @property({ type: String, attribute: 'label-copied' })\n labelCopied = 'Copied!';\n\n /**\n * Label for the expand button when content is collapsed.\n * @attr label-show-more\n */\n @property({ type: String, attribute: 'label-show-more' })\n labelShowMore = 'Show more';\n\n /**\n * Label for the expand button when content is expanded.\n * @attr label-show-less\n */\n @property({ type: String, attribute: 'label-show-less' })\n labelShowLess = 'Show less';\n\n // ─── Internal State ───\n\n @state() private _copied: boolean = false;\n @state() private _expanded: boolean = false;\n @state() private _codeText: string = '';\n\n private _copyTimer: ReturnType<typeof setTimeout> | null = null;\n\n // ─── Lifecycle ───\n\n override firstUpdated(): void {\n // Prevent flash of empty <code> before slotchange fires by eagerly reading\n // text content from host children that are already present on first render.\n if (!this._codeText) {\n const text = this.textContent?.trim() ?? '';\n if (text) {\n this._codeText = text;\n }\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this._copyTimer !== null) {\n clearTimeout(this._copyTimer);\n this._copyTimer = null;\n }\n }\n\n // ─── Event Handlers ───\n\n private _handleSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement | null;\n if (!slot) return;\n const nodes = slot.assignedNodes({ flatten: true });\n this._codeText = nodes.map((n) => n.textContent ?? '').join('');\n }\n\n private _handleCopy(): void {\n const text = this._codeText;\n\n navigator.clipboard.writeText(text).catch(() => {\n // Clipboard API unavailable (non-HTTPS environments such as Drupal staging) — emit event only.\n // Note: navigator.clipboard requires a secure context (HTTPS or localhost).\n // On HTTP, the copy event still fires but the clipboard is not populated.\n });\n\n this.dispatchEvent(\n new CustomEvent('hx-copy', {\n bubbles: true,\n composed: true,\n detail: { text },\n }),\n );\n\n this._copied = true;\n if (this._copyTimer !== null) clearTimeout(this._copyTimer);\n this._copyTimer = setTimeout(() => {\n this._copied = false;\n }, 2000);\n }\n\n private _handleExpand(): void {\n this._expanded = !this._expanded;\n }\n\n // ─── Helpers ───\n\n private _getDisplayLines(): string[] {\n const lines = this._codeText.split('\\n');\n if (!this.maxLines || this.maxLines <= 0 || this._expanded) {\n return lines;\n }\n if (lines.length <= this.maxLines) {\n return lines;\n }\n return lines.slice(0, this.maxLines);\n }\n\n private _isTruncated(): boolean {\n if (!this.maxLines || this.maxLines <= 0) return false;\n const lines = this._codeText.split('\\n');\n return lines.length > this.maxLines;\n }\n\n private _renderLines(lines: string[]): TemplateResult {\n if (!this.lineNumbers) {\n return html`${lines.join('\\n')}`;\n }\n return html`${lines.map(\n (line, i) =>\n html`<span aria-hidden=\"true\" class=\"code-snippet__line-number\">${i + 1}</span>${line +\n '\\n'}`,\n )}`;\n }\n\n // ─── Render ───\n\n override render(): TemplateResult | typeof nothing {\n if (this.inline) {\n return html`\n <code part=\"base code\" class=\"code-snippet code-snippet--inline\">\n <slot @slotchange=${this._handleSlotChange}></slot>\n </code>\n `;\n }\n\n const displayLines = this._getDisplayLines();\n const truncated = this._isTruncated();\n const preLabel = this.language ? `Code snippet: ${this.language}` : 'Code snippet';\n const codeClasses = classMap({\n 'code-snippet__code': true,\n [`language-${this.language}`]: Boolean(this.language),\n });\n\n return html`\n <div part=\"base\" class=\"code-snippet\">\n <div part=\"header\" class=\"code-snippet__header\">\n ${this.copyable\n ? html`\n <button\n part=\"copy-button\"\n class=\"code-snippet__copy-button\"\n type=\"button\"\n aria-label=${this._copied ? this.labelCopied : this.labelCopy}\n @click=${this._handleCopy}\n >\n ${this._copied ? this.labelCopied : this.labelCopy}\n </button>\n `\n : nothing}\n </div>\n\n <!-- Visually-hidden live region announces copy confirmation to assistive technology -->\n <span\n aria-live=\"polite\"\n style=\"position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;\"\n >${this._copied ? this.labelCopied : ''}</span\n >\n\n <pre\n role=\"region\"\n aria-label=${preLabel}\n class=${classMap({\n 'code-snippet__pre': true,\n 'code-snippet__pre--wrap': this.wrap,\n })}\n ><code part=\"code\" class=${codeClasses}>${this._renderLines(displayLines)}</code></pre>\n\n <!-- Hidden slot to capture text content for display and copy -->\n <slot class=\"code-snippet__slot\" @slotchange=${this._handleSlotChange}></slot>\n\n ${truncated\n ? html`\n <button\n part=\"expand-button\"\n class=\"code-snippet__expand-button\"\n type=\"button\"\n aria-expanded=${this._expanded ? 'true' : nothing}\n @click=${this._handleExpand}\n >\n ${this._expanded ? this.labelShowLess : this.labelShowMore}\n </button>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-code-snippet': HelixCodeSnippet;\n }\n}\n"],"names":["helixCodeSnippetStyles","css","HelixCodeSnippet","LitElement","text","_a","slot","nodes","n","lines","html","line","i","displayLines","truncated","preLabel","codeClasses","classMap","nothing","tokenStyles","__decorateClass","property","state","customElement"],"mappings":";;;;AAEO,MAAMA,IAAyBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAhC/BnB,EAiCX,WAAA,YAAA,CAAA;AAQAkB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,aAAa,SAAS,IAAM;AAAA,GAxCtDnB,EAyCX,WAAA,YAAA,CAAA;AAQAkB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,WAAW,gBAAgB,SAAS,IAAM;AAAA,GAhD1DnB,EAiDX,WAAA,eAAA,CAAA;AAOAkB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,GAvDxCnB,EAwDX,WAAA,aAAA,CAAA;AAOAkB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,GA9D1CnB,EA+DX,WAAA,eAAA,CAAA;AAOAkB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,mBAAmB;AAAA,GArE7CnB,EAsEX,WAAA,iBAAA,CAAA;AAOAkB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,mBAAmB;AAAA,GA5E7CnB,EA6EX,WAAA,iBAAA,CAAA;AAIiBkB,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAjFIpB,EAiFM,WAAA,WAAA,CAAA;AACAkB,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAlFIpB,EAkFM,WAAA,aAAA,CAAA;AACAkB,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAnFIpB,EAmFM,WAAA,aAAA,CAAA;AAnFNA,IAANkB,EAAA;AAAA,EADNG,EAAc,iBAAiB;AAAA,GACnBrB,CAAA;"}
@@ -745,7 +745,7 @@ let d = class extends O {
745
745
  type="button"
746
746
  class="trigger"
747
747
  aria-label="Choose color: ${this._inputValue}"
748
- aria-expanded=${this._open ? "true" : "false"}
748
+ aria-expanded=${this._open ? "true" : k}
749
749
  ?disabled=${this.disabled}
750
750
  style=${f({ "--_preview-color": t })}
751
751
  @click=${this._handleTriggerClick}
@@ -800,4 +800,4 @@ d = c([
800
800
  export {
801
801
  d as H
802
802
  };
803
- //# sourceMappingURL=hx-color-picker-BvfJ_h16.js.map
803
+ //# sourceMappingURL=hx-color-picker-Bb2UPVc3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-color-picker-Bb2UPVc3.js","sources":["../../src/components/hx-color-picker/hx-color-picker.styles.ts","../../src/components/hx-color-picker/hx-color-picker.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixColorPickerStyles = css`\n :host {\n display: inline-block;\n position: relative;\n font-family: var(--hx-font-family-base, sans-serif);\n font-size: var(--hx-font-size-sm, 0.875rem);\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled, 0.4);\n }\n\n /* ─── Trigger ─── */\n\n .trigger {\n display: inline-flex;\n align-items: center;\n gap: var(--hx-space-2, 0.5rem);\n padding: var(--hx-space-1, 0.25rem);\n border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-300, #d1d5db);\n border-radius: var(--hx-border-radius-md, 0.375rem);\n background: var(--hx-color-neutral-0, #fff);\n cursor: pointer;\n transition: border-color var(--hx-transition-fast, 0.15s ease);\n }\n\n .trigger:hover:not([disabled]) {\n border-color: var(--hx-color-primary-500, #3b82f6);\n }\n\n .trigger:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .trigger-swatch {\n width: 1.5rem;\n height: 1.5rem;\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n /* P1-6: was hardcoded rgba(0,0,0,0.1) */\n border: var(--hx-border-width-thin, 1px) solid\n var(--hx-color-picker-swatch-border, var(--hx-overlay-black-10, rgba(0, 0, 0, 0.1)));\n background: var(--_preview-color, #000);\n display: block;\n flex-shrink: 0;\n }\n\n .trigger-label {\n font-size: var(--hx-font-size-sm, 0.875rem);\n color: var(--hx-color-neutral-700, #374151);\n font-family: var(--hx-font-family-mono, monospace);\n white-space: nowrap;\n }\n\n /* ─── Panel ─── */\n\n .panel {\n position: absolute;\n z-index: var(--hx-color-picker-z-index, 1000);\n top: calc(100% + 4px);\n left: 0;\n background: var(--hx-color-neutral-0, #fff);\n /* P1-6: border width now uses token */\n border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-200, #e5e7eb);\n border-radius: var(--hx-border-radius-lg, 0.5rem);\n /* P1-6: panel shadow uses component token */\n box-shadow: 0 8px 24px\n var(--hx-color-picker-panel-shadow, var(--hx-overlay-black-15, rgba(0, 0, 0, 0.15)));\n padding: var(--hx-space-4, 1rem);\n /* P2-8: panel width is now a CSS custom property */\n width: var(--hx-color-picker-width, 260px);\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-3, 0.75rem);\n outline: none;\n }\n\n :host([inline]) .panel {\n position: static;\n box-shadow: none;\n border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-200, #e5e7eb);\n border-radius: var(--hx-border-radius-lg, 0.5rem);\n }\n\n /* ─── Gradient Grid ─── */\n\n .gradient-grid {\n position: relative;\n width: 100%;\n /* P2-8: grid height is now a CSS custom property */\n height: var(--hx-color-picker-grid-height, 160px);\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n cursor: crosshair;\n overflow: hidden;\n touch-action: none;\n flex-shrink: 0;\n }\n\n /* P0-1: focus ring for keyboard-operable gradient grid */\n .gradient-grid:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .gradient-grid-bg {\n position: absolute;\n inset: 0;\n background:\n linear-gradient(to bottom, transparent, #000),\n linear-gradient(to right, #fff, var(--_hue-color, hsl(0, 100%, 50%)));\n pointer-events: none;\n }\n\n .gradient-thumb {\n position: absolute;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n /* A11y fix (WCAG 1.4.11): double-ring ensures thumb visibility on light hue backgrounds\n (yellow, cyan) where a white-only border falls below 3:1 non-text contrast.\n Inner dark ring at 1px provides contrast against light backgrounds;\n outer white ring at 2px provides contrast against dark backgrounds. */\n border: none;\n box-shadow:\n 0 0 0 2px var(--hx-color-picker-thumb-border, var(--hx-color-neutral-0, #fff)),\n 0 0 0 3px var(--hx-color-picker-thumb-shadow, var(--hx-overlay-black-30, rgba(0, 0, 0, 0.3)));\n transform: translate(-50%, -50%);\n pointer-events: none;\n top: var(--_thumb-y, 0%);\n left: var(--_thumb-x, 100%);\n }\n\n /* ─── Sliders ─── */\n\n .slider-track {\n position: relative;\n width: 100%;\n height: 12px;\n border-radius: 6px;\n cursor: pointer;\n touch-action: none;\n flex-shrink: 0;\n }\n\n .slider-track:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .hue-track {\n background: linear-gradient(\n to right,\n hsl(0, 100%, 50%),\n hsl(30, 100%, 50%),\n hsl(60, 100%, 50%),\n hsl(90, 100%, 50%),\n hsl(120, 100%, 50%),\n hsl(150, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(210, 100%, 50%),\n hsl(240, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(300, 100%, 50%),\n hsl(330, 100%, 50%),\n hsl(360, 100%, 50%)\n );\n }\n\n .opacity-track {\n background-image:\n linear-gradient(to right, transparent, var(--_hue-color, hsl(0, 100%, 50%))),\n repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 0 0 / 12px 12px;\n }\n\n .slider-thumb {\n position: absolute;\n top: 50%;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n /* A11y fix (WCAG 1.4.11): double-ring ensures thumb visibility on light hue backgrounds\n (yellow, cyan) where a white-only border falls below 3:1 non-text contrast.\n Inner dark ring at 1px provides contrast against light backgrounds;\n outer white ring at 2px provides contrast against dark backgrounds. */\n border: none;\n box-shadow:\n 0 0 0 2px var(--hx-color-picker-thumb-border, var(--hx-color-neutral-0, #fff)),\n 0 0 0 3px var(--hx-color-picker-thumb-shadow, var(--hx-overlay-black-30, rgba(0, 0, 0, 0.3)));\n transform: translate(-50%, -50%);\n pointer-events: none;\n left: var(--_slider-pct, 0%);\n background: var(--_thumb-color, hsl(0, 100%, 50%));\n }\n\n /* ─── Swatches ─── */\n\n .swatches {\n display: flex;\n flex-wrap: wrap;\n gap: var(--hx-space-1, 0.25rem);\n }\n\n .swatch-btn {\n width: 20px;\n height: 20px;\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n /* P1-6: was hardcoded rgba(0,0,0,0.1) */\n border: var(--hx-border-width-thin, 1px) solid\n var(--hx-color-picker-swatch-border, var(--hx-overlay-black-10, rgba(0, 0, 0, 0.1)));\n cursor: pointer;\n padding: 0;\n flex-shrink: 0;\n transition: transform var(--hx-transition-fast, 0.15s ease);\n }\n\n .swatch-btn:hover {\n transform: scale(1.15);\n /* P1-6: was hardcoded rgba(0,0,0,0.3) */\n border-color: var(\n --hx-color-picker-swatch-border-hover,\n var(--hx-overlay-black-30, rgba(0, 0, 0, 0.3))\n );\n }\n\n .swatch-btn:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n /* ─── Input ─── */\n\n .input-area {\n display: flex;\n align-items: center;\n gap: var(--hx-space-2, 0.5rem);\n }\n\n .format-btn {\n flex-shrink: 0;\n padding: var(--hx-space-1, 0.25rem) var(--hx-space-2, 0.5rem);\n background: var(--hx-color-neutral-100, #f3f4f6);\n border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-300, #d1d5db);\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n cursor: pointer;\n font-size: var(--hx-font-size-xs, 0.75rem);\n color: var(--hx-color-neutral-600, #4b5563);\n text-transform: uppercase;\n font-weight: var(--hx-font-weight-semibold, 600);\n letter-spacing: 0.05em;\n }\n\n .format-btn:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .color-input {\n flex: 1;\n min-width: 0;\n padding: var(--hx-space-1, 0.25rem) var(--hx-space-2, 0.5rem);\n border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-300, #d1d5db);\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n font-family: var(--hx-font-family-mono, monospace);\n font-size: var(--hx-font-size-sm, 0.875rem);\n color: var(--hx-color-neutral-900, #111827);\n background: var(--hx-color-neutral-0, #fff);\n outline: none;\n }\n\n .color-input:focus {\n border-color: var(--hx-focus-ring-color, #2563eb);\n /* P1-5: was invalid \"box-shadow: ... / 0.2\" syntax; replaced with valid box-shadow */\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--hx-focus-ring-color, #2563eb) 20%, transparent);\n }\n\n /* ─── Color preview strip in input area ─── */\n\n .input-preview {\n width: 24px;\n height: 24px;\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n /* P1-6: was hardcoded rgba(0,0,0,0.1) */\n border: var(--hx-border-width-thin, 1px) solid\n var(--hx-color-picker-swatch-border, var(--hx-overlay-black-10, rgba(0, 0, 0, 0.1)));\n background: var(--_preview-color, #000);\n flex-shrink: 0;\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .trigger,\n .swatch-btn {\n transition: none;\n }\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixColorPickerStyles } from './hx-color-picker.styles.js';\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\nexport type ColorFormat = 'hex' | 'rgb' | 'hsl' | 'hsv';\n\ninterface HSV {\n h: number; // 0-360\n s: number; // 0-100\n v: number; // 0-100\n a: number; // 0-1\n}\n\ninterface RGB {\n r: number; // 0-255\n g: number; // 0-255\n b: number; // 0-255\n a: number; // 0-1\n}\n\n// ─── Color utilities ──────────────────────────────────────────────────────────\n\nfunction clamp(n: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, n));\n}\n\nfunction hexToRgb(hex: string): RGB | null {\n let h = hex.trim().replace(/^#/, '');\n if (h.length === 3) h = h.replace(/(.)/g, '$1$1');\n if (h.length === 4) h = h.replace(/(.)/g, '$1$1');\n if (h.length === 6) h += 'ff';\n if (h.length !== 8) return null;\n const n = parseInt(h, 16);\n if (isNaN(n)) return null;\n return {\n r: (n >>> 24) & 0xff,\n g: (n >>> 16) & 0xff,\n b: (n >>> 8) & 0xff,\n a: (n & 0xff) / 255,\n };\n}\n\nfunction toHex2(n: number): string {\n return Math.round(clamp(n, 0, 255))\n .toString(16)\n .padStart(2, '0');\n}\n\nfunction rgbToHex(rgb: RGB, includeAlpha: boolean): string {\n const base = `#${toHex2(rgb.r)}${toHex2(rgb.g)}${toHex2(rgb.b)}`;\n if (includeAlpha && rgb.a < 1) return base + toHex2(rgb.a * 255);\n return base;\n}\n\nfunction rgbToHsv(rgb: RGB): HSV {\n const r = rgb.r / 255;\n const g = rgb.g / 255;\n const b = rgb.b / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const d = max - min;\n const s = max === 0 ? 0 : d / max;\n const v = max;\n let h = 0;\n if (d !== 0) {\n if (max === r) h = ((g - b) / d + (g < b ? 6 : 0)) / 6;\n else if (max === g) h = ((b - r) / d + 2) / 6;\n else h = ((r - g) / d + 4) / 6;\n }\n return { h: h * 360, s: s * 100, v: v * 100, a: rgb.a };\n}\n\nfunction hsvToRgb(hsv: HSV): RGB {\n const h = hsv.h / 360;\n const s = hsv.s / 100;\n const v = hsv.v / 100;\n const i = Math.floor(h * 6);\n const f = h * 6 - i;\n const p = v * (1 - s);\n const q = v * (1 - f * s);\n const t = v * (1 - (1 - f) * s);\n let r = 0;\n let g = 0;\n let b = 0;\n switch (i % 6) {\n case 0:\n r = v;\n g = t;\n b = p;\n break;\n case 1:\n r = q;\n g = v;\n b = p;\n break;\n case 2:\n r = p;\n g = v;\n b = t;\n break;\n case 3:\n r = p;\n g = q;\n b = v;\n break;\n case 4:\n r = t;\n g = p;\n b = v;\n break;\n case 5:\n r = v;\n g = p;\n b = q;\n break;\n }\n return { r: Math.round(r * 255), g: Math.round(g * 255), b: Math.round(b * 255), a: hsv.a };\n}\n\nfunction rgbToHsl(rgb: RGB): { h: number; s: number; l: number; a: number } {\n const r = rgb.r / 255;\n const g = rgb.g / 255;\n const b = rgb.b / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n let h = 0;\n let s = 0;\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n if (max === r) h = ((g - b) / d + (g < b ? 6 : 0)) / 6;\n else if (max === g) h = ((b - r) / d + 2) / 6;\n else h = ((r - g) / d + 4) / 6;\n }\n return { h: h * 360, s: s * 100, l: l * 100, a: rgb.a };\n}\n\n// P2-1: parseColor now handles HSV/HSVA input strings for round-trip correctness\nfunction parseColor(value: string): HSV | null {\n if (!value) return null;\n\n if (value.startsWith('#')) {\n const rgb = hexToRgb(value);\n return rgb ? rgbToHsv(rgb) : null;\n }\n\n const rgbMatch = value.match(\n /rgba?\\(\\s*(\\d+)(?:\\s*,\\s*|\\s+)(\\d+)(?:\\s*,\\s*|\\s+)(\\d+)(?:\\s*(?:\\/|,)\\s*([\\d.]+))?\\s*\\)/,\n );\n if (rgbMatch) {\n const [, rm1, rm2, rm3, rm4] = rgbMatch;\n return rgbToHsv({\n r: parseInt(rm1 ?? '0', 10),\n g: parseInt(rm2 ?? '0', 10),\n b: parseInt(rm3 ?? '0', 10),\n a: rm4 !== undefined ? parseFloat(rm4) : 1,\n });\n }\n\n const hslMatch = value.match(\n /hsla?\\(\\s*([\\d.]+)(?:\\s*,\\s*|\\s+)([\\d.]+)%(?:\\s*,\\s*|\\s+)([\\d.]+)%(?:\\s*(?:\\/|,)\\s*([\\d.]+))?\\s*\\)/,\n );\n if (hslMatch) {\n const [, hm1, hm2, hm3, hm4] = hslMatch;\n const h = parseFloat(hm1 ?? '0');\n const s = parseFloat(hm2 ?? '0') / 100;\n const l = parseFloat(hm3 ?? '0') / 100;\n const a = hm4 !== undefined ? parseFloat(hm4) : 1;\n const c = (1 - Math.abs(2 * l - 1)) * s;\n const x = c * (1 - Math.abs(((h / 60) % 2) - 1));\n const m = l - c / 2;\n let r = 0;\n let g = 0;\n let b = 0;\n if (h < 60) {\n r = c;\n g = x;\n } else if (h < 120) {\n r = x;\n g = c;\n } else if (h < 180) {\n g = c;\n b = x;\n } else if (h < 240) {\n g = x;\n b = c;\n } else if (h < 300) {\n r = x;\n b = c;\n } else {\n r = c;\n b = x;\n }\n return rgbToHsv({\n r: Math.round((r + m) * 255),\n g: Math.round((g + m) * 255),\n b: Math.round((b + m) * 255),\n a,\n });\n }\n\n // P2-1: Support HSV/HSVA input strings (component's own output format)\n const hsvMatch = value.match(\n /hsva?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%(?:\\s*,\\s*([\\d.]+))?\\s*\\)/,\n );\n if (hsvMatch) {\n const [, hm1, hm2, hm3, hm4] = hsvMatch;\n return {\n h: parseFloat(hm1 ?? '0'),\n s: parseFloat(hm2 ?? '0'),\n v: parseFloat(hm3 ?? '0'),\n a: hm4 !== undefined ? parseFloat(hm4) : 1,\n };\n }\n\n return null;\n}\n\nfunction formatColor(hsv: HSV, format: ColorFormat, includeAlpha: boolean): string {\n const rgb = hsvToRgb(hsv);\n switch (format) {\n case 'hex':\n return rgbToHex(rgb, includeAlpha);\n case 'rgb': {\n if (includeAlpha && hsv.a < 1) {\n return `rgb(${rgb.r} ${rgb.g} ${rgb.b} / ${Math.round(hsv.a * 100) / 100})`;\n }\n return `rgb(${rgb.r} ${rgb.g} ${rgb.b})`;\n }\n case 'hsl': {\n const hsl = rgbToHsl(rgb);\n if (includeAlpha && hsv.a < 1) {\n return `hsl(${Math.round(hsl.h)} ${Math.round(hsl.s)}% ${Math.round(hsl.l)}% / ${Math.round(hsv.a * 100) / 100})`;\n }\n return `hsl(${Math.round(hsl.h)} ${Math.round(hsl.s)}% ${Math.round(hsl.l)}%)`;\n }\n case 'hsv': {\n if (includeAlpha && hsv.a < 1) {\n return `hsva(${Math.round(hsv.h)}, ${Math.round(hsv.s)}%, ${Math.round(hsv.v)}%, ${Math.round(hsv.a * 100) / 100})`;\n }\n return `hsv(${Math.round(hsv.h)}, ${Math.round(hsv.s)}%, ${Math.round(hsv.v)}%)`;\n }\n }\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * A color picker control with gradient picker, hue/opacity sliders, swatches,\n * and formatted text input. Supports hex, rgb, hsl, and hsv output formats.\n *\n * @summary Color selection control with swatches, gradient picker, and formatted input.\n *\n * @tag hx-color-picker\n *\n * @slot trigger - Custom trigger element. Default: a color swatch button.\n *\n * @fires {CustomEvent<{value: string}>} hx-input - Dispatched while dragging sliders or grid.\n * @fires {CustomEvent<{value: string}>} hx-change - Dispatched when a color is committed.\n *\n * @csspart trigger - The trigger button element.\n * @csspart swatches - The swatch color buttons container.\n * @csspart grid - The 2D saturation/value gradient picker area.\n * @csspart slider - Shared slider container (also on hue-slider and opacity-slider).\n * @csspart hue-slider - The hue slider track.\n * @csspart opacity-slider - The alpha/opacity slider track.\n * @csspart input - The text input area.\n *\n * @cssprop [--hx-color-picker-z-index=1000] - z-index of the popover panel.\n * @cssprop [--hx-color-picker-width=260px] - Width of the picker panel.\n * @cssprop [--hx-color-picker-grid-height=160px] - Height of the gradient grid.\n * @cssprop [--hx-color-picker-thumb-border=#fff] - Border color of slider/grid thumbs.\n * @cssprop [--hx-color-picker-thumb-shadow=rgba(0,0,0,0.3)] - Shadow color of slider/grid thumbs.\n * @cssprop [--hx-color-picker-panel-shadow=rgba(0,0,0,0.15)] - Panel drop-shadow color.\n * @cssprop [--hx-color-picker-swatch-border=rgba(0,0,0,0.1)] - Swatch button border color.\n * @cssprop [--hx-color-picker-swatch-border-hover=rgba(0,0,0,0.3)] - Swatch button border on hover.\n *\n * @example\n * ```html\n * <hx-color-picker value=\"#3b82f6\" format=\"hex\"></hx-color-picker>\n * ```\n *\n * @example Drupal / Twig usage\n * The `swatches` property must be set via JavaScript (Drupal behavior) because arrays\n * cannot be serialized as HTML attributes:\n * ```js\n * // my-theme/js/color-picker-behavior.js\n * Drupal.behaviors.helixColorPicker = {\n * attach(context) {\n * context.querySelectorAll('hx-color-picker[data-swatches]').forEach((el) => {\n * el.swatches = JSON.parse(el.dataset.swatches);\n * });\n * },\n * };\n * ```\n * ```twig\n * <hx-color-picker\n * value=\"{{ color }}\"\n * data-swatches='{{ swatches | json_encode }}'\n * ></hx-color-picker>\n * ```\n */\n@customElement('hx-color-picker')\nexport class HelixColorPicker extends LitElement {\n static override styles = [tokenStyles, helixColorPickerStyles];\n\n /**\n * Declares this element as form-associated so it participates in native form submission.\n * @internal\n */\n static formAssociated = true;\n\n /**\n * ElementInternals instance used for form participation and constraint validation.\n * @internal\n */\n private _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n // P1-1: Store bound references so connectedCallback/disconnectedCallback use the same object\n this._boundPointerMove = this._handlePointerMove.bind(this);\n this._boundPointerUp = this._handlePointerUp.bind(this);\n this._boundDocumentClick = this._handleDocumentClick.bind(this);\n }\n\n // ─── Public Properties ───────────────────────────────────────────────────\n\n /**\n * Current color value as a CSS color string.\n * @attr value\n */\n @property({ type: String, reflect: true })\n value = '#000000';\n\n /**\n * Output format for the color value.\n * @attr format\n */\n @property({ type: String, reflect: true })\n format: ColorFormat = 'hex';\n\n /**\n * Whether to show the alpha/opacity channel slider and include alpha in the output.\n * @attr opacity\n */\n @property({ type: Boolean, reflect: true })\n opacity = false;\n\n /**\n * Array of preset swatch color strings.\n * Set via JS property only — arrays cannot be serialized as HTML attributes.\n * In Drupal/Twig, use a behavior to read `data-swatches` and set this property.\n * See JSDoc example above.\n */\n @property({ attribute: false })\n swatches: string[] = [];\n\n /**\n * When true, hides the gradient grid and sliders, showing only swatches and the input.\n * Useful for compact preset-only color selection UIs.\n * @attr swatches-only\n */\n @property({ type: Boolean, reflect: true, attribute: 'swatches-only' })\n swatchesOnly = false;\n\n /**\n * Whether the control is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Form field name for form participation.\n * @attr name\n */\n @property({ type: String, reflect: true })\n name = '';\n\n /**\n * When true the picker is shown inline instead of in a popover.\n * @attr inline\n */\n @property({ type: Boolean, reflect: true })\n inline = false;\n\n // ─── Internal State ──────────────────────────────────────────────────────\n\n /**\n * Internal HSV representation of the current color, used to drive all picker UI elements.\n * @internal\n */\n @state() private _hsv: HSV = { h: 0, s: 0, v: 0, a: 1 };\n /**\n * Whether the color picker popover panel is currently open.\n * @internal\n */\n @state() private _open = false;\n /**\n * The formatted color string displayed in the text input, kept in sync with `_hsv` and `format`.\n * @internal\n */\n @state() private _inputValue = '#000000';\n\n // ─── Dragging state (not reactive, managed manually) ─────────────────────\n\n /**\n * Whether the user is actively dragging within the gradient grid.\n * @internal\n */\n private _draggingGrid = false;\n /**\n * Whether the user is actively dragging the hue slider thumb.\n * @internal\n */\n private _draggingHue = false;\n /**\n * Whether the user is actively dragging the opacity slider thumb.\n * @internal\n */\n private _draggingOpacity = false;\n\n // P1-1: Stored bound references to prevent memory leaks\n /**\n * Stable bound reference to the pointermove handler, stored to allow correct listener removal.\n * @internal\n */\n private _boundPointerMove: (e: PointerEvent) => void;\n /**\n * Stable bound reference to the pointerup handler, stored to allow correct listener removal.\n * @internal\n */\n private _boundPointerUp: () => void;\n /**\n * Stable bound reference to the document click handler, stored to allow correct listener removal.\n * @internal\n */\n private _boundDocumentClick: (e: MouseEvent) => void;\n\n // ─── Lifecycle ───────────────────────────────────────────────────────────\n\n override connectedCallback(): void {\n super.connectedCallback();\n this._syncFromValue();\n // P1-1: Use stored bound references (not inline .bind() which creates new objects)\n document.addEventListener('click', this._boundDocumentClick, true);\n document.addEventListener('pointermove', this._boundPointerMove);\n document.addEventListener('pointerup', this._boundPointerUp);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n // P1-1: Remove using the same stored references added in connectedCallback\n document.removeEventListener('click', this._boundDocumentClick, true);\n document.removeEventListener('pointermove', this._boundPointerMove);\n document.removeEventListener('pointerup', this._boundPointerUp);\n }\n\n override willUpdate(changedProperties: Map<string, unknown>): void {\n if (changedProperties.has('value')) {\n this._syncFromValue();\n }\n }\n\n // ─── Sync ────────────────────────────────────────────────────────────────\n\n private _syncFromValue(): void {\n const parsed = parseColor(this.value);\n if (parsed) {\n this._hsv = parsed;\n }\n this._inputValue = formatColor(this._hsv, this.format, this.opacity);\n this._internals.setFormValue(this.value);\n }\n\n /** Called when a parent fieldset is disabled/enabled. */\n formDisabledCallback(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n private _commit(source: 'drag' | 'change'): void {\n const formatted = formatColor(this._hsv, this.format, this.opacity);\n this.value = formatted;\n this._inputValue = formatted;\n this._internals.setFormValue(formatted);\n const detail = { value: formatted };\n const opts: CustomEventInit<{ value: string }> = {\n bubbles: true,\n composed: true,\n detail,\n };\n if (source === 'drag') {\n this.dispatchEvent(new CustomEvent('hx-input', opts));\n } else {\n this.dispatchEvent(new CustomEvent('hx-change', opts));\n }\n }\n\n // ─── Panel open/close ────────────────────────────────────────────────────\n\n private _show(): void {\n if (this._open || this.inline) return;\n this._open = true;\n }\n\n private _hide(): void {\n if (!this._open) return;\n this._open = false;\n }\n\n private _handleDocumentClick(e: MouseEvent): void {\n if (!this._open) return;\n if (!e.composedPath().includes(this)) {\n this._hide();\n }\n }\n\n private _handleTriggerClick(e: MouseEvent): void {\n e.stopPropagation();\n if (this._open) {\n this._hide();\n } else {\n this._show();\n }\n }\n\n private _handlePanelKeydown(e: KeyboardEvent): void {\n if (e.key === 'Escape') {\n e.stopPropagation();\n this._hide();\n this.shadowRoot?.querySelector<HTMLElement>('[part=\"trigger\"]')?.focus();\n }\n }\n\n // ─── Gradient grid dragging ───────────────────────────────────────────────\n\n private _handleGridPointerDown(e: PointerEvent): void {\n if (this.disabled) return;\n e.preventDefault();\n this._draggingGrid = true;\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n this._updateGridFromPointer(e);\n }\n\n private _updateGridFromPointer(e: PointerEvent): void {\n const grid = this.shadowRoot?.querySelector<HTMLElement>('[part=\"grid\"]');\n if (!grid) return;\n const rect = grid.getBoundingClientRect();\n const x = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n const y = clamp((e.clientY - rect.top) / rect.height, 0, 1);\n this._hsv = { ...this._hsv, s: x * 100, v: (1 - y) * 100 };\n this._commit('drag');\n this.requestUpdate();\n }\n\n // P0-1: Keyboard support for gradient grid — fixes WCAG 2.1 SC 2.1.1 failure\n private _handleGridKeydown(e: KeyboardEvent): void {\n let sDelta = 0;\n let vDelta = 0;\n if (e.key === 'ArrowLeft') sDelta = -1;\n else if (e.key === 'ArrowRight') sDelta = 1;\n else if (e.key === 'ArrowUp') vDelta = 1;\n else if (e.key === 'ArrowDown') vDelta = -1;\n else if (e.key === 'PageUp') vDelta = 10;\n else if (e.key === 'PageDown') vDelta = -10;\n else if (e.key === 'Home') {\n this._hsv = { ...this._hsv, s: 0, v: 100 };\n this._commit('change');\n return;\n } else if (e.key === 'End') {\n this._hsv = { ...this._hsv, s: 100, v: 0 };\n this._commit('change');\n return;\n }\n if (sDelta !== 0 || vDelta !== 0) {\n e.preventDefault();\n this._hsv = {\n ...this._hsv,\n s: clamp(this._hsv.s + sDelta, 0, 100),\n v: clamp(this._hsv.v + vDelta, 0, 100),\n };\n this._commit('change');\n }\n }\n\n // ─── Hue slider dragging ─────────────────────────────────────────────────\n\n private _handleHuePointerDown(e: PointerEvent): void {\n if (this.disabled) return;\n e.preventDefault();\n this._draggingHue = true;\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n this._updateHueFromPointer(e);\n }\n\n private _updateHueFromPointer(e: PointerEvent): void {\n const track = this.shadowRoot?.querySelector<HTMLElement>('[part=\"hue-slider\"]');\n if (!track) return;\n const rect = track.getBoundingClientRect();\n const pct = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n this._hsv = { ...this._hsv, h: pct * 360 };\n this._commit('drag');\n this.requestUpdate();\n }\n\n // ─── Opacity slider dragging ──────────────────────────────────────────────\n\n private _handleOpacityPointerDown(e: PointerEvent): void {\n if (this.disabled) return;\n e.preventDefault();\n this._draggingOpacity = true;\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n this._updateOpacityFromPointer(e);\n }\n\n private _updateOpacityFromPointer(e: PointerEvent): void {\n const track = this.shadowRoot?.querySelector<HTMLElement>('[part=\"opacity-slider\"]');\n if (!track) return;\n const rect = track.getBoundingClientRect();\n const pct = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n this._hsv = { ...this._hsv, a: pct };\n this._commit('drag');\n this.requestUpdate();\n }\n\n // ─── Document-level pointer handlers ─────────────────────────────────────\n\n private _handlePointerMove(e: PointerEvent): void {\n if (this._draggingGrid) this._updateGridFromPointer(e);\n else if (this._draggingHue) this._updateHueFromPointer(e);\n else if (this._draggingOpacity) this._updateOpacityFromPointer(e);\n }\n\n private _handlePointerUp(): void {\n if (this._draggingGrid || this._draggingHue || this._draggingOpacity) {\n this._draggingGrid = false;\n this._draggingHue = false;\n this._draggingOpacity = false;\n this._commit('change');\n }\n }\n\n // ─── Keyboard handling for sliders ───────────────────────────────────────\n\n private _handleHueKeydown(e: KeyboardEvent): void {\n let delta = 0;\n if (e.key === 'ArrowLeft' || e.key === 'ArrowDown') delta = -1;\n else if (e.key === 'ArrowRight' || e.key === 'ArrowUp') delta = 1;\n else if (e.key === 'PageDown') delta = -10;\n else if (e.key === 'PageUp') delta = 10;\n else if (e.key === 'Home') {\n this._hsv = { ...this._hsv, h: 0 };\n this._commit('change');\n return;\n } else if (e.key === 'End') {\n this._hsv = { ...this._hsv, h: 360 };\n this._commit('change');\n return;\n }\n if (delta !== 0) {\n e.preventDefault();\n this._hsv = { ...this._hsv, h: clamp(this._hsv.h + delta, 0, 360) };\n this._commit('change');\n }\n }\n\n private _handleOpacityKeydown(e: KeyboardEvent): void {\n let delta = 0;\n if (e.key === 'ArrowLeft' || e.key === 'ArrowDown') delta = -0.01;\n else if (e.key === 'ArrowRight' || e.key === 'ArrowUp') delta = 0.01;\n else if (e.key === 'PageDown') delta = -0.1;\n else if (e.key === 'PageUp') delta = 0.1;\n else if (e.key === 'Home') {\n this._hsv = { ...this._hsv, a: 0 };\n this._commit('change');\n return;\n } else if (e.key === 'End') {\n this._hsv = { ...this._hsv, a: 1 };\n this._commit('change');\n return;\n }\n if (delta !== 0) {\n e.preventDefault();\n this._hsv = { ...this._hsv, a: clamp(this._hsv.a + delta, 0, 1) };\n this._commit('change');\n }\n }\n\n // ─── Input ───────────────────────────────────────────────────────────────\n\n // P1-7: Bound to @input (was @change) for real-time color preview while typing\n private _handleInputChange(e: Event): void {\n const input = e.target as HTMLInputElement;\n const parsed = parseColor(input.value.trim());\n if (parsed) {\n this._hsv = parsed;\n this._commit('change');\n }\n this._inputValue = input.value;\n }\n\n private _handleInputBlur(e: FocusEvent): void {\n const input = e.target as HTMLInputElement;\n const parsed = parseColor(input.value.trim());\n if (parsed) {\n this._hsv = parsed;\n this._commit('change');\n } else {\n // Revert to current valid value\n this._inputValue = formatColor(this._hsv, this.format, this.opacity);\n }\n }\n\n private _handleFormatCycle(): void {\n const formats: ColorFormat[] = ['hex', 'rgb', 'hsl', 'hsv'];\n const idx = formats.indexOf(this.format);\n const next = formats[(idx + 1) % formats.length];\n if (next !== undefined) this.format = next;\n this._inputValue = formatColor(this._hsv, this.format, this.opacity);\n }\n\n // ─── Swatches ────────────────────────────────────────────────────────────\n\n private _handleSwatchClick(color: string): void {\n const parsed = parseColor(color);\n if (parsed) {\n this._hsv = parsed;\n this._commit('change');\n }\n }\n\n // ─── Computed values ──────────────────────────────────────────────────────\n\n private _hueColor(): string {\n return `hsl(${Math.round(this._hsv.h)}, 100%, 50%)`;\n }\n\n private _previewColor(): string {\n const rgb = hsvToRgb(this._hsv);\n if (this.opacity && this._hsv.a < 1) {\n return `rgb(${rgb.r} ${rgb.g} ${rgb.b} / ${Math.round(this._hsv.a * 100) / 100})`;\n }\n return `rgb(${rgb.r} ${rgb.g} ${rgb.b})`;\n }\n\n // ─── Render helpers ───────────────────────────────────────────────────────\n\n private _renderGrid() {\n const thumbX = `${this._hsv.s}%`;\n const thumbY = `${100 - this._hsv.v}%`;\n const hueColor = this._hueColor();\n\n // P0-1: Grid is now keyboard-operable — WCAG 2.1 SC 2.1.1 compliance\n // Arrow keys adjust saturation (left/right) and value (up/down)\n //\n // A11y note (WCAG 4.1.2 — 2D slider aria-valuenow limitation): The ARIA slider role\n // requires a single numeric aria-valuenow. This 2D control has two axes (saturation and\n // value), so aria-valuenow reports only saturation (the primary/horizontal axis) per\n // the ARIA 1.2 \"slider\" pattern. aria-valuetext compensates by announcing both axes\n // (\"Saturation X%, Value Y%\") for all assistive technologies that support it.\n return html`\n <div\n part=\"grid\"\n class=\"gradient-grid\"\n role=\"slider\"\n tabindex=\"0\"\n aria-label=\"Color gradient\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow=${Math.round(this._hsv.s)}\n aria-valuetext=\"Saturation ${Math.round(this._hsv.s)}%, Value ${Math.round(this._hsv.v)}%\"\n @pointerdown=${this._handleGridPointerDown}\n @keydown=${this._handleGridKeydown}\n >\n <div class=\"gradient-grid-bg\" style=${styleMap({ '--_hue-color': hueColor })}></div>\n <div\n class=\"gradient-thumb\"\n style=${styleMap({ '--_thumb-x': thumbX, '--_thumb-y': thumbY })}\n aria-hidden=\"true\"\n ></div>\n </div>\n `;\n }\n\n private _renderHueSlider() {\n const pct = `${(this._hsv.h / 360) * 100}%`;\n const hueColor = this._hueColor();\n\n // P1-8: part=\"slider hue-slider\" — exposes the documented shared \"slider\" CSS part\n // P1-4: aria-valuetext announces the hue angle with degree symbol\n return html`\n <div\n part=\"slider hue-slider\"\n class=\"slider-track hue-track\"\n role=\"slider\"\n tabindex=\"0\"\n aria-label=\"Hue\"\n aria-valuemin=\"0\"\n aria-valuemax=\"360\"\n aria-valuenow=${Math.round(this._hsv.h)}\n aria-valuetext=\"${Math.round(this._hsv.h)}°\"\n @pointerdown=${this._handleHuePointerDown}\n @keydown=${this._handleHueKeydown}\n >\n <div\n class=\"slider-thumb\"\n style=${styleMap({ '--_slider-pct': pct, '--_thumb-color': hueColor })}\n aria-hidden=\"true\"\n ></div>\n </div>\n `;\n }\n\n private _renderOpacitySlider() {\n if (!this.opacity) return nothing;\n const pct = `${this._hsv.a * 100}%`;\n const rgb = hsvToRgb(this._hsv);\n const thumbColor = `rgb(${rgb.r} ${rgb.g} ${rgb.b} / ${Math.round(this._hsv.a * 100) / 100})`;\n const hueColor = this._hueColor();\n\n // P1-8: part=\"slider opacity-slider\" — exposes the documented shared \"slider\" CSS part\n // P1-4: aria-valuetext announces the opacity as a percentage\n return html`\n <div\n part=\"slider opacity-slider\"\n class=\"slider-track opacity-track\"\n role=\"slider\"\n tabindex=\"0\"\n aria-label=\"Opacity\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow=${Math.round(this._hsv.a * 100)}\n aria-valuetext=\"${Math.round(this._hsv.a * 100)}%\"\n style=${styleMap({ '--_hue-color': hueColor })}\n @pointerdown=${this._handleOpacityPointerDown}\n @keydown=${this._handleOpacityKeydown}\n >\n <div\n class=\"slider-thumb\"\n style=${styleMap({ '--_slider-pct': pct, '--_thumb-color': thumbColor })}\n aria-hidden=\"true\"\n ></div>\n </div>\n `;\n }\n\n private _renderSwatches() {\n if (!this.swatches?.length) return nothing;\n return html`\n <div part=\"swatches\" class=\"swatches\" role=\"group\" aria-label=\"Preset colors\">\n ${this.swatches.map(\n (color) => html`\n <button\n type=\"button\"\n class=\"swatch-btn\"\n style=${styleMap({ background: color })}\n aria-label=${color}\n title=${color}\n @click=${() => this._handleSwatchClick(color)}\n ></button>\n `,\n )}\n </div>\n `;\n }\n\n private _renderInput() {\n return html`\n <div part=\"input\" class=\"input-area\">\n <div\n class=\"input-preview\"\n style=${styleMap({ '--_preview-color': this._previewColor() })}\n aria-hidden=\"true\"\n ></div>\n <button\n type=\"button\"\n class=\"format-btn\"\n aria-label=\"Switch color format\"\n title=\"Switch format\"\n @click=${this._handleFormatCycle}\n >\n ${this.format}\n </button>\n <input\n type=\"text\"\n class=\"color-input\"\n .value=${this._inputValue}\n aria-label=\"Color value\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n @input=${this._handleInputChange}\n @blur=${this._handleInputBlur}\n />\n </div>\n `;\n }\n\n private _renderPanel() {\n // A11y fix (WCAG 4.1.2): use role=\"group\" instead of role=\"dialog\" + aria-modal=\"true\".\n // aria-modal=\"true\" requires a programmatic focus trap so screen readers restrict virtual\n // cursor navigation to the dialog. Without Tab-key trapping, aria-modal causes JAWS/NVDA\n // to hide all content outside the panel, stranding keyboard users who Tab out. role=\"group\"\n // with aria-label provides the same grouping semantics without the false modal contract.\n return html`\n <div\n class=\"panel\"\n role=\"group\"\n aria-label=\"Color picker\"\n tabindex=\"-1\"\n @keydown=${this._handlePanelKeydown}\n >\n ${this.swatchesOnly\n ? nothing\n : html`${this._renderGrid()} ${this._renderHueSlider()} ${this._renderOpacitySlider()}`}\n ${this._renderSwatches()} ${this._renderInput()}\n </div>\n `;\n }\n\n // ─── Main render ─────────────────────────────────────────────────────────\n\n override render() {\n const previewColor = this._previewColor();\n\n if (this.inline) {\n return html`\n <div style=${styleMap({ '--_preview-color': previewColor })}>${this._renderPanel()}</div>\n `;\n }\n\n // P1-3: aria-label includes the current color value so AT users know the selected color\n return html`\n <button\n part=\"trigger\"\n type=\"button\"\n class=\"trigger\"\n aria-label=\"Choose color: ${this._inputValue}\"\n aria-expanded=${this._open ? 'true' : nothing}\n ?disabled=${this.disabled}\n style=${styleMap({ '--_preview-color': previewColor })}\n @click=${this._handleTriggerClick}\n >\n <slot name=\"trigger\">\n <span class=\"trigger-swatch\" aria-hidden=\"true\"></span>\n <span class=\"trigger-label\">${this._inputValue}</span>\n </slot>\n </button>\n ${this._open ? this._renderPanel() : nothing}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-color-picker': HelixColorPicker;\n }\n}\n"],"names":["helixColorPickerStyles","css","clamp","n","min","max","hexToRgb","hex","h","toHex2","rgbToHex","rgb","includeAlpha","base","rgbToHsv","r","g","b","d","s","v","hsvToRgb","hsv","i","f","p","q","t","rgbToHsl","l","parseColor","value","rgbMatch","rm1","rm2","rm3","rm4","hslMatch","hm1","hm2","hm3","hm4","a","c","x","m","hsvMatch","formatColor","format","hsl","HelixColorPicker","LitElement","changedProperties","parsed","disabled","source","formatted","opts","e","_b","_a","grid","rect","y","sDelta","vDelta","track","pct","delta","input","formats","idx","next","color","thumbX","thumbY","hueColor","html","styleMap","nothing","thumbColor","previewColor","tokenStyles","__decorateClass","property","state","customElement"],"mappings":";;;;AAEO,MAAMA,IAAyBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAc,iBAAiB;AAAA,GACnBpC,CAAA;"}
@@ -1,5 +1,5 @@
1
1
  import { css as v, LitElement as m, html as h, nothing as n } from "lit";
2
- import { property as a, state as u, query as g, customElement as y } from "lit/decorators.js";
2
+ import { property as s, state as u, query as g, customElement as y } from "lit/decorators.js";
3
3
  import { classMap as x } from "lit/directives/class-map.js";
4
4
  import { ifDefined as c } from "lit/directives/if-defined.js";
5
5
  import { tokenStyles as w } from "@helixui/tokens/lit";
@@ -165,8 +165,9 @@ const $ = v`
165
165
  }
166
166
 
167
167
  .field__clear-button:focus-visible {
168
- outline: 2px solid var(--hx-combobox-focus-ring-color, var(--hx-focus-ring-color, #2563eb));
169
- outline-offset: 1px;
168
+ outline: var(--hx-focus-ring-width, 2px) solid
169
+ var(--hx-combobox-focus-ring-color, var(--hx-focus-ring-color, var(--hx-color-primary-500)));
170
+ outline-offset: var(--hx-focus-ring-offset, 2px);
170
171
  }
171
172
 
172
173
  /* ─── Loading Indicator ─── */
@@ -265,8 +266,9 @@ const $ = v`
265
266
 
266
267
  .field__option--focused {
267
268
  background-color: var(--hx-combobox-option-hover-bg, var(--hx-color-primary-50, #eff6ff));
268
- outline: 2px solid var(--hx-combobox-focus-ring-color, var(--hx-focus-ring-color, #2563eb));
269
- outline-offset: -2px;
269
+ outline: var(--hx-focus-ring-width, 2px) solid
270
+ var(--hx-combobox-focus-ring-color, var(--hx-focus-ring-color, var(--hx-color-primary-500)));
271
+ outline-offset: var(--hx-combobox-option-focus-ring-offset, -2px);
270
272
  }
271
273
 
272
274
  .field__option--focused.field__option--selected {
@@ -392,15 +394,16 @@ const $ = v`
392
394
  }
393
395
 
394
396
  .field__chip-remove:focus-visible {
395
- outline: 2px solid var(--hx-combobox-focus-ring-color, var(--hx-focus-ring-color, #2563eb));
396
- outline-offset: 1px;
397
+ outline: var(--hx-focus-ring-width, 2px) solid
398
+ var(--hx-combobox-focus-ring-color, var(--hx-focus-ring-color, var(--hx-color-primary-500)));
399
+ outline-offset: var(--hx-focus-ring-offset, 2px);
397
400
  opacity: 1;
398
401
  }
399
402
  `;
400
403
  var k = Object.defineProperty, I = Object.getOwnPropertyDescriptor, l = (e, t, i, o) => {
401
- for (var s = o > 1 ? void 0 : o ? I(t, i) : t, d = e.length - 1, p; d >= 0; d--)
402
- (p = e[d]) && (s = (o ? p(t, i, s) : p(s)) || s);
403
- return o && s && k(t, i, s), s;
404
+ for (var a = o > 1 ? void 0 : o ? I(t, i) : t, d = e.length - 1, p; d >= 0; d--)
405
+ (p = e[d]) && (a = (o ? p(t, i, a) : p(a)) || a);
406
+ return o && a && k(t, i, a), a;
404
407
  };
405
408
  let O = 0, r = class extends m {
406
409
  constructor() {
@@ -490,8 +493,8 @@ let O = 0, r = class extends m {
490
493
  if (o instanceof HTMLOptionElement)
491
494
  t.push(this._parseOption(o));
492
495
  else if (o instanceof HTMLOptGroupElement)
493
- for (const s of Array.from(o.children))
494
- s instanceof HTMLOptionElement && t.push(this._parseOption(s));
496
+ for (const a of Array.from(o.children))
497
+ a instanceof HTMLOptionElement && t.push(this._parseOption(a));
495
498
  this._options = t;
496
499
  }
497
500
  // ─── Slot Change Handlers ───
@@ -532,14 +535,14 @@ let O = 0, r = class extends m {
532
535
  // ─── Keyboard Navigation ───
533
536
  _handleKeydown(e) {
534
537
  if (this.disabled) return;
535
- const t = this._filteredOptions, i = t.map((o, s) => ({ o, i: s })).filter(({ o }) => !o.disabled).map(({ i: o }) => o);
538
+ const t = this._filteredOptions, i = t.map((o, a) => ({ o, i: a })).filter(({ o }) => !o.disabled).map(({ i: o }) => o);
536
539
  switch (e.key) {
537
540
  case "ArrowDown": {
538
541
  if (e.preventDefault(), !this._open) {
539
542
  this._openDropdown(), this._focusedOptionIndex = i.length > 0 ? i[0] ?? 0 : -1;
540
543
  break;
541
544
  }
542
- const o = i.find((s) => s > this._focusedOptionIndex);
545
+ const o = i.find((a) => a > this._focusedOptionIndex);
543
546
  this._focusedOptionIndex = o !== void 0 ? o : i[0] ?? this._focusedOptionIndex;
544
547
  break;
545
548
  }
@@ -550,8 +553,8 @@ let O = 0, r = class extends m {
550
553
  this._focusedOptionIndex = d !== void 0 ? d : -1;
551
554
  break;
552
555
  }
553
- const o = [...i].reverse().find((d) => d < this._focusedOptionIndex), s = i[i.length - 1];
554
- this._focusedOptionIndex = o !== void 0 ? o : s ?? this._focusedOptionIndex;
556
+ const o = [...i].reverse().find((d) => d < this._focusedOptionIndex), a = i[i.length - 1];
557
+ this._focusedOptionIndex = o !== void 0 ? o : a ?? this._focusedOptionIndex;
555
558
  break;
556
559
  }
557
560
  case "Enter": {
@@ -637,7 +640,7 @@ let O = 0, r = class extends m {
637
640
  <div class="field__no-options">${this.labelNoOptions}</div>
638
641
  </slot>
639
642
  ` : e.map((t, i) => {
640
- const o = this.multiple ? this._selectedValuesSet.has(t.value) : t.value === this.value, s = i === this._focusedOptionIndex;
643
+ const o = this.multiple ? this._selectedValuesSet.has(t.value) : t.value === this.value, a = i === this._focusedOptionIndex;
641
644
  return h`
642
645
  <div
643
646
  id=${this._optionId(i)}
@@ -646,10 +649,10 @@ let O = 0, r = class extends m {
646
649
  class=${x({
647
650
  field__option: !0,
648
651
  "field__option--selected": o,
649
- "field__option--focused": s,
652
+ "field__option--focused": a,
650
653
  "field__option--disabled": t.disabled
651
654
  })}
652
- aria-selected=${o ? "true" : "false"}
655
+ aria-selected=${o ? "true" : n}
653
656
  aria-disabled=${t.disabled ? "true" : n}
654
657
  @click=${() => this._selectOption(t)}
655
658
  >
@@ -669,7 +672,7 @@ let O = 0, r = class extends m {
669
672
  }, o = {
670
673
  field__input: !0,
671
674
  [`field__input--${this.size}`]: !0
672
- }, s = [
675
+ }, a = [
673
676
  e || this._hasErrorSlot ? this._errorId : null,
674
677
  this.helpText ? this._helpTextId : null
675
678
  ].filter(Boolean).join(" ") || void 0, d = this._open && this._focusedOptionIndex >= 0 ? this._optionId(this._focusedOptionIndex) : void 0;
@@ -734,7 +737,7 @@ let O = 0, r = class extends m {
734
737
  aria-controls=${this._listboxId}
735
738
  aria-activedescendant=${c(d)}
736
739
  aria-invalid=${e ? "true" : n}
737
- aria-describedby=${c(s)}
740
+ aria-describedby=${c(a)}
738
741
  aria-required=${this.required ? "true" : n}
739
742
  aria-label=${c(this.ariaLabel || void 0)}
740
743
  aria-labelledby=${c(this.label && !this.ariaLabel ? this._labelId : void 0)}
@@ -763,7 +766,7 @@ let O = 0, r = class extends m {
763
766
  part="clear-button"
764
767
  type="button"
765
768
  class="field__clear-button"
766
- aria-label="Clear"
769
+ aria-label=${`Clear ${this.label || this.ariaLabel || "selection"}`}
767
770
  tabindex="0"
768
771
  @click=${this._handleClear}
769
772
  >
@@ -830,52 +833,52 @@ let O = 0, r = class extends m {
830
833
  r.styles = [w, $];
831
834
  r.formAssociated = !0;
832
835
  l([
833
- a({ type: String })
836
+ s({ type: String })
834
837
  ], r.prototype, "label", 2);
835
838
  l([
836
- a({ type: String })
839
+ s({ type: String })
837
840
  ], r.prototype, "placeholder", 2);
838
841
  l([
839
- a({ type: String, reflect: !0 })
842
+ s({ type: String, reflect: !0 })
840
843
  ], r.prototype, "value", 2);
841
844
  l([
842
- a({ type: Boolean, reflect: !0 })
845
+ s({ type: Boolean, reflect: !0 })
843
846
  ], r.prototype, "required", 2);
844
847
  l([
845
- a({ type: Boolean, reflect: !0 })
848
+ s({ type: Boolean, reflect: !0 })
846
849
  ], r.prototype, "disabled", 2);
847
850
  l([
848
- a({ type: String })
851
+ s({ type: String })
849
852
  ], r.prototype, "name", 2);
850
853
  l([
851
- a({ type: String })
854
+ s({ type: String })
852
855
  ], r.prototype, "error", 2);
853
856
  l([
854
- a({ type: String, attribute: "help-text" })
857
+ s({ type: String, attribute: "help-text" })
855
858
  ], r.prototype, "helpText", 2);
856
859
  l([
857
- a({ type: String, attribute: "hx-size", reflect: !0 })
860
+ s({ type: String, attribute: "hx-size", reflect: !0 })
858
861
  ], r.prototype, "size", 2);
859
862
  l([
860
- a({ type: Boolean, reflect: !0 })
863
+ s({ type: Boolean, reflect: !0 })
861
864
  ], r.prototype, "multiple", 2);
862
865
  l([
863
- a({ type: Boolean, reflect: !0 })
866
+ s({ type: Boolean, reflect: !0 })
864
867
  ], r.prototype, "clearable", 2);
865
868
  l([
866
- a({ type: Boolean, reflect: !0 })
869
+ s({ type: Boolean, reflect: !0 })
867
870
  ], r.prototype, "loading", 2);
868
871
  l([
869
- a({ type: Number, attribute: "filter-debounce" })
872
+ s({ type: Number, attribute: "filter-debounce" })
870
873
  ], r.prototype, "filterDebounce", 2);
871
874
  l([
872
- a({ type: String, attribute: "aria-label" })
875
+ s({ type: String, attribute: "aria-label" })
873
876
  ], r.prototype, "ariaLabel", 2);
874
877
  l([
875
- a({ type: String, attribute: "label-no-options" })
878
+ s({ type: String, attribute: "label-no-options" })
876
879
  ], r.prototype, "labelNoOptions", 2);
877
880
  l([
878
- a({ type: String, attribute: "label-required" })
881
+ s({ type: String, attribute: "label-required" })
879
882
  ], r.prototype, "labelRequired", 2);
880
883
  l([
881
884
  u()
@@ -904,4 +907,4 @@ r = l([
904
907
  export {
905
908
  r as H
906
909
  };
907
- //# sourceMappingURL=hx-combobox-BBi3izKJ.js.map
910
+ //# sourceMappingURL=hx-combobox-CNvY-es8.js.map