@helixui/library 3.2.0-next.100 → 3.2.0-next.102
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.
- package/custom-elements.json +10 -10
- package/dist/components/hx-alert/hx-alert.styles.d.ts.map +1 -1
- package/dist/components/hx-alert/index.js +1 -1
- package/dist/components/hx-banner/hx-banner.styles.d.ts.map +1 -1
- package/dist/components/hx-banner/index.js +1 -1
- package/dist/components/hx-button/hx-button.d.ts +5 -5
- package/dist/components/hx-button/hx-button.styles.d.ts.map +1 -1
- package/dist/components/hx-button/index.js +1 -1
- package/dist/components/hx-checkbox/hx-checkbox.styles.d.ts.map +1 -1
- package/dist/components/hx-checkbox/index.js +1 -1
- package/dist/components/hx-code-snippet/hx-code-snippet.styles.d.ts.map +1 -1
- package/dist/components/hx-code-snippet/index.js +1 -1
- package/dist/components/hx-combobox/hx-combobox.styles.d.ts.map +1 -1
- package/dist/components/hx-combobox/index.js +1 -1
- package/dist/components/hx-date-picker/hx-date-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-date-picker/index.js +1 -1
- package/dist/components/hx-link/hx-link.styles.d.ts.map +1 -1
- package/dist/components/hx-link/index.js +1 -1
- package/dist/components/hx-list/hx-list-item.styles.d.ts.map +1 -1
- package/dist/components/hx-list/index.js +1 -1
- package/dist/components/hx-radio-group/hx-radio.styles.d.ts.map +1 -1
- package/dist/components/hx-radio-group/index.js +1 -1
- package/dist/components/hx-rating/hx-rating.styles.d.ts.map +1 -1
- package/dist/components/hx-rating/index.js +1 -1
- package/dist/components/hx-select/hx-select.styles.d.ts.map +1 -1
- package/dist/components/hx-select/index.js +1 -1
- package/dist/components/hx-side-nav/hx-side-nav.d.ts +1 -1
- package/dist/components/hx-side-nav/index.js +1 -1
- package/dist/components/hx-slider/hx-slider.styles.d.ts.map +1 -1
- package/dist/components/hx-slider/index.js +1 -1
- package/dist/components/hx-split-button/hx-split-button.styles.d.ts.map +1 -1
- package/dist/components/hx-split-button/index.js +1 -1
- package/dist/components/hx-switch/hx-switch.styles.d.ts.map +1 -1
- package/dist/components/hx-switch/index.js +1 -1
- package/dist/components/hx-tabs/hx-tab-panel.styles.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tab.styles.d.ts.map +1 -1
- package/dist/components/hx-tabs/index.js +1 -1
- package/dist/components/hx-text-input/hx-text-input.styles.d.ts.map +1 -1
- package/dist/components/hx-text-input/index.js +1 -1
- package/dist/components/hx-textarea/hx-textarea.styles.d.ts.map +1 -1
- package/dist/components/hx-textarea/index.js +1 -1
- package/dist/components/hx-toggle-button/hx-toggle-button.styles.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/index.js +1 -1
- package/dist/components/hx-tree-view/hx-tree-view.styles.d.ts.map +1 -1
- package/dist/components/hx-tree-view/index.js +1 -1
- package/dist/css/helix-all.css +48 -111
- package/dist/css/helix-core.css +23 -21
- package/dist/css/helix-data.css +2 -4
- package/dist/css/helix-feedback.css +3 -12
- package/dist/css/helix-forms.css +16 -63
- package/dist/css/helix-navigation.css +2 -3
- package/dist/css/helix-tokens.css +8 -8
- package/dist/css/helix-utility.css +2 -8
- package/dist/css/hx-alert.css +1 -4
- package/dist/css/hx-banner.css +2 -8
- package/dist/css/hx-button.css +22 -17
- package/dist/css/hx-checkbox.css +1 -4
- package/dist/css/hx-code-snippet.css +2 -4
- package/dist/css/hx-combobox.css +2 -8
- package/dist/css/hx-date-picker.css +5 -21
- package/dist/css/hx-link.css +1 -4
- package/dist/css/hx-rating.css +1 -2
- package/dist/css/hx-select.css +1 -4
- package/dist/css/hx-side-nav.css +1 -1
- package/dist/css/hx-slider.css +1 -4
- package/dist/css/hx-split-button.css +2 -8
- package/dist/css/hx-switch.css +1 -4
- package/dist/css/hx-text-input.css +2 -8
- package/dist/css/hx-textarea.css +1 -4
- package/dist/css/hx-toggle-button.css +1 -4
- package/dist/css/hx-tree-view.css +1 -2
- package/dist/css/index.css +1 -1
- package/dist/css/manifest.json +16 -14
- package/dist/index.js +21 -21
- package/dist/shared/{hx-alert-C597yHpD.js → hx-alert-CLn7CstP.js} +2 -5
- package/dist/shared/hx-alert-CLn7CstP.js.map +1 -0
- package/dist/shared/{hx-banner-Cxd7eFUP.js → hx-banner-D3DzpfcP.js} +7 -13
- package/dist/shared/hx-banner-D3DzpfcP.js.map +1 -0
- package/dist/shared/{hx-button-9OUjJnk7.js → hx-button-CHlkRQTe.js} +31 -26
- package/dist/shared/hx-button-CHlkRQTe.js.map +1 -0
- package/dist/shared/{hx-checkbox-DBD-gMoz.js → hx-checkbox-D7xma9YH.js} +6 -9
- package/dist/shared/hx-checkbox-D7xma9YH.js.map +1 -0
- package/dist/shared/{hx-code-snippet-B26RM1_C.js → hx-code-snippet-Bi-arDKH.js} +3 -5
- package/dist/shared/hx-code-snippet-Bi-arDKH.js.map +1 -0
- package/dist/shared/{hx-combobox-ClhNRAS5.js → hx-combobox-DDzqNKEW.js} +6 -12
- package/dist/shared/hx-combobox-DDzqNKEW.js.map +1 -0
- package/dist/shared/{hx-date-picker-BJm7Yrda.js → hx-date-picker-2iRG1p74.js} +12 -28
- package/dist/shared/hx-date-picker-2iRG1p74.js.map +1 -0
- package/dist/shared/{hx-link-9Ig2DW6L.js → hx-link-C-O6vq0Q.js} +2 -5
- package/dist/shared/hx-link-C-O6vq0Q.js.map +1 -0
- package/dist/shared/{hx-list-CkphGi9T.js → hx-list-MyEhh8c7.js} +3 -5
- package/dist/shared/hx-list-MyEhh8c7.js.map +1 -0
- package/dist/shared/{hx-nav-item-CqbO5-T5.js → hx-nav-item-Dap3DYgB.js} +2 -2
- package/dist/shared/hx-nav-item-Dap3DYgB.js.map +1 -0
- package/dist/shared/{hx-radio-dFjUAost.js → hx-radio-CJvNU2yP.js} +2 -5
- package/dist/shared/{hx-radio-dFjUAost.js.map → hx-radio-CJvNU2yP.js.map} +1 -1
- package/dist/shared/{hx-rating-CGtsejNf.js → hx-rating-C3QP53k9.js} +2 -3
- package/dist/shared/hx-rating-C3QP53k9.js.map +1 -0
- package/dist/shared/{hx-select-Bf4usFts.js → hx-select-C8fEHQhC.js} +2 -5
- package/dist/shared/hx-select-C8fEHQhC.js.map +1 -0
- package/dist/shared/{hx-slider-m0aEClH1.js → hx-slider-Blmv_rwS.js} +23 -26
- package/dist/shared/hx-slider-Blmv_rwS.js.map +1 -0
- package/dist/shared/{hx-split-button-BxDFfx4D.js → hx-split-button-Djnc5Aeg.js} +3 -9
- package/dist/shared/hx-split-button-Djnc5Aeg.js.map +1 -0
- package/dist/shared/{hx-switch-DvAW4YY-.js → hx-switch-BrZFaRue.js} +6 -9
- package/dist/shared/hx-switch-BrZFaRue.js.map +1 -0
- package/dist/shared/{hx-tab-panel-SWOEHuJc.js → hx-tab-panel-DspCrKqo.js} +3 -9
- package/dist/shared/{hx-tab-panel-SWOEHuJc.js.map → hx-tab-panel-DspCrKqo.js.map} +1 -1
- package/dist/shared/{hx-text-input-Bn7Gn8CI.js → hx-text-input-D6FlOZM-.js} +3 -9
- package/dist/shared/hx-text-input-D6FlOZM-.js.map +1 -0
- package/dist/shared/{hx-textarea-Jx1xnhgv.js → hx-textarea-CNG590KY.js} +6 -9
- package/dist/shared/hx-textarea-CNG590KY.js.map +1 -0
- package/dist/shared/{hx-toggle-button-DPAIh_Xo.js → hx-toggle-button-iLiYrMbD.js} +2 -5
- package/dist/shared/hx-toggle-button-iLiYrMbD.js.map +1 -0
- package/dist/shared/{hx-tree-item-Dt0Ozqyr.js → hx-tree-item-C2CiWuDE.js} +2 -3
- package/dist/shared/hx-tree-item-C2CiWuDE.js.map +1 -0
- package/figma-inventory.json +12 -12
- package/package.json +2 -2
- package/dist/shared/hx-alert-C597yHpD.js.map +0 -1
- package/dist/shared/hx-banner-Cxd7eFUP.js.map +0 -1
- package/dist/shared/hx-button-9OUjJnk7.js.map +0 -1
- package/dist/shared/hx-checkbox-DBD-gMoz.js.map +0 -1
- package/dist/shared/hx-code-snippet-B26RM1_C.js.map +0 -1
- package/dist/shared/hx-combobox-ClhNRAS5.js.map +0 -1
- package/dist/shared/hx-date-picker-BJm7Yrda.js.map +0 -1
- package/dist/shared/hx-link-9Ig2DW6L.js.map +0 -1
- package/dist/shared/hx-list-CkphGi9T.js.map +0 -1
- package/dist/shared/hx-nav-item-CqbO5-T5.js.map +0 -1
- package/dist/shared/hx-rating-CGtsejNf.js.map +0 -1
- package/dist/shared/hx-select-Bf4usFts.js.map +0 -1
- package/dist/shared/hx-slider-m0aEClH1.js.map +0 -1
- package/dist/shared/hx-split-button-BxDFfx4D.js.map +0 -1
- package/dist/shared/hx-switch-DvAW4YY-.js.map +0 -1
- package/dist/shared/hx-text-input-Bn7Gn8CI.js.map +0 -1
- package/dist/shared/hx-textarea-Jx1xnhgv.js.map +0 -1
- package/dist/shared/hx-toggle-button-DPAIh_Xo.js.map +0 -1
- package/dist/shared/hx-tree-item-Dt0Ozqyr.js.map +0 -1
package/dist/css/index.css
CHANGED
package/dist/css/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generated": "2026-04-
|
|
2
|
+
"generated": "2026-04-26T14:24:50.890Z",
|
|
3
3
|
"components": [
|
|
4
4
|
{
|
|
5
5
|
"name": "hx-accordion",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"--hx-alert-border-color",
|
|
47
47
|
"--hx-alert-border-radius",
|
|
48
48
|
"--hx-alert-border-width",
|
|
49
|
+
"--hx-alert-close-btn-focus-ring-color",
|
|
49
50
|
"--hx-alert-color",
|
|
50
51
|
"--hx-alert-font-family",
|
|
51
52
|
"--hx-alert-gap",
|
|
@@ -62,7 +63,6 @@
|
|
|
62
63
|
"--hx-color-info-50",
|
|
63
64
|
"--hx-color-info-500",
|
|
64
65
|
"--hx-color-info-800",
|
|
65
|
-
"--hx-color-primary-600",
|
|
66
66
|
"--hx-color-success-200",
|
|
67
67
|
"--hx-color-success-50",
|
|
68
68
|
"--hx-color-success-500",
|
|
@@ -189,9 +189,11 @@
|
|
|
189
189
|
"file": "hx-banner.css",
|
|
190
190
|
"tokens": [
|
|
191
191
|
"--hx-banner-action-color",
|
|
192
|
+
"--hx-banner-action-focus-ring-color",
|
|
192
193
|
"--hx-banner-bg",
|
|
193
194
|
"--hx-banner-border-color",
|
|
194
195
|
"--hx-banner-border-width",
|
|
196
|
+
"--hx-banner-close-btn-focus-ring-color",
|
|
195
197
|
"--hx-banner-color",
|
|
196
198
|
"--hx-banner-font-family",
|
|
197
199
|
"--hx-banner-gap",
|
|
@@ -209,7 +211,6 @@
|
|
|
209
211
|
"--hx-color-info-50",
|
|
210
212
|
"--hx-color-info-500",
|
|
211
213
|
"--hx-color-info-800",
|
|
212
|
-
"--hx-color-primary-600",
|
|
213
214
|
"--hx-color-success-200",
|
|
214
215
|
"--hx-color-success-50",
|
|
215
216
|
"--hx-color-success-500",
|
|
@@ -275,12 +276,12 @@
|
|
|
275
276
|
"--hx-color-action-secondary-bg-hover",
|
|
276
277
|
"--hx-color-action-secondary-border",
|
|
277
278
|
"--hx-color-action-secondary-fg",
|
|
278
|
-
"--hx-color-border-on-dark-default",
|
|
279
279
|
"--hx-color-border-on-dark-strong",
|
|
280
|
-
"--hx-color-border-on-dark-subtle",
|
|
281
280
|
"--hx-color-border-strong",
|
|
282
281
|
"--hx-color-neutral-0",
|
|
283
282
|
"--hx-color-primary-500",
|
|
283
|
+
"--hx-color-surface-on-dark-overlay-default",
|
|
284
|
+
"--hx-color-surface-on-dark-overlay-subtle",
|
|
284
285
|
"--hx-color-surface-raised",
|
|
285
286
|
"--hx-color-surface-sunken",
|
|
286
287
|
"--hx-color-text-inverse",
|
|
@@ -425,6 +426,7 @@
|
|
|
425
426
|
"--hx-checkbox-checked-border-color",
|
|
426
427
|
"--hx-checkbox-checkmark-color",
|
|
427
428
|
"--hx-checkbox-error-color",
|
|
429
|
+
"--hx-checkbox-focus-ring-color",
|
|
428
430
|
"--hx-checkbox-focus-ring-offset",
|
|
429
431
|
"--hx-checkbox-focus-ring-width",
|
|
430
432
|
"--hx-checkbox-font-family",
|
|
@@ -435,7 +437,6 @@
|
|
|
435
437
|
"--hx-color-error-500",
|
|
436
438
|
"--hx-color-error-text",
|
|
437
439
|
"--hx-color-primary-500",
|
|
438
|
-
"--hx-color-primary-600",
|
|
439
440
|
"--hx-color-surface-default",
|
|
440
441
|
"--hx-color-text-muted",
|
|
441
442
|
"--hx-color-text-on-primary",
|
|
@@ -561,7 +562,6 @@
|
|
|
561
562
|
"--hx-code-snippet-tab-size",
|
|
562
563
|
"--hx-color-border-default",
|
|
563
564
|
"--hx-color-border-on-dark-strong",
|
|
564
|
-
"--hx-color-primary-600",
|
|
565
565
|
"--hx-color-surface-inverse",
|
|
566
566
|
"--hx-color-surface-sunken",
|
|
567
567
|
"--hx-color-text-inverse",
|
|
@@ -644,7 +644,6 @@
|
|
|
644
644
|
"--hx-color-primary-100",
|
|
645
645
|
"--hx-color-primary-200",
|
|
646
646
|
"--hx-color-primary-50",
|
|
647
|
-
"--hx-color-primary-600",
|
|
648
647
|
"--hx-color-primary-800",
|
|
649
648
|
"--hx-color-surface-default",
|
|
650
649
|
"--hx-color-text-muted",
|
|
@@ -848,6 +847,7 @@
|
|
|
848
847
|
"--hx-date-picker-color",
|
|
849
848
|
"--hx-date-picker-day-hover-bg",
|
|
850
849
|
"--hx-date-picker-error-color",
|
|
850
|
+
"--hx-date-picker-focus-ring-color",
|
|
851
851
|
"--hx-date-picker-font-family",
|
|
852
852
|
"--hx-date-picker-label-color",
|
|
853
853
|
"--hx-date-picker-selected-bg",
|
|
@@ -1243,6 +1243,7 @@
|
|
|
1243
1243
|
"--hx-link-color-disabled",
|
|
1244
1244
|
"--hx-link-color-hover",
|
|
1245
1245
|
"--hx-link-color-subtle",
|
|
1246
|
+
"--hx-link-focus-ring-color",
|
|
1246
1247
|
"--hx-link-font-family",
|
|
1247
1248
|
"--hx-link-text-decoration",
|
|
1248
1249
|
"--hx-link-text-decoration-hover",
|
|
@@ -1688,7 +1689,6 @@
|
|
|
1688
1689
|
"tokens": [
|
|
1689
1690
|
"--hx-border-radius-sm",
|
|
1690
1691
|
"--hx-color-border-strong",
|
|
1691
|
-
"--hx-color-primary-600",
|
|
1692
1692
|
"--hx-color-warning-300",
|
|
1693
1693
|
"--hx-color-warning-400",
|
|
1694
1694
|
"--hx-focus-ring-color",
|
|
@@ -1717,7 +1717,6 @@
|
|
|
1717
1717
|
"--hx-color-error-text",
|
|
1718
1718
|
"--hx-color-primary-100",
|
|
1719
1719
|
"--hx-color-primary-50",
|
|
1720
|
-
"--hx-color-primary-600",
|
|
1721
1720
|
"--hx-color-surface-default",
|
|
1722
1721
|
"--hx-color-text-muted",
|
|
1723
1722
|
"--hx-color-text-placeholder",
|
|
@@ -1745,6 +1744,7 @@
|
|
|
1745
1744
|
"--hx-select-chevron-size",
|
|
1746
1745
|
"--hx-select-color",
|
|
1747
1746
|
"--hx-select-error-color",
|
|
1747
|
+
"--hx-select-focus-ring-color",
|
|
1748
1748
|
"--hx-select-font-family",
|
|
1749
1749
|
"--hx-select-label-color",
|
|
1750
1750
|
"--hx-select-listbox-bg",
|
|
@@ -1822,7 +1822,6 @@
|
|
|
1822
1822
|
"--hx-color-border-default",
|
|
1823
1823
|
"--hx-color-border-strong",
|
|
1824
1824
|
"--hx-color-primary-500",
|
|
1825
|
-
"--hx-color-primary-600",
|
|
1826
1825
|
"--hx-color-surface-default",
|
|
1827
1826
|
"--hx-color-text-muted",
|
|
1828
1827
|
"--hx-color-text-secondary",
|
|
@@ -1844,6 +1843,7 @@
|
|
|
1844
1843
|
"--hx-size-8",
|
|
1845
1844
|
"--hx-slider-disabled-fill-bg",
|
|
1846
1845
|
"--hx-slider-fill-bg",
|
|
1846
|
+
"--hx-slider-focus-ring-color",
|
|
1847
1847
|
"--hx-slider-font-family",
|
|
1848
1848
|
"--hx-slider-help-text-color",
|
|
1849
1849
|
"--hx-slider-input-padding-block",
|
|
@@ -1938,6 +1938,7 @@
|
|
|
1938
1938
|
"--hx-split-button-border-radius",
|
|
1939
1939
|
"--hx-split-button-color",
|
|
1940
1940
|
"--hx-split-button-divider-color",
|
|
1941
|
+
"--hx-split-button-focus-ring-color",
|
|
1941
1942
|
"--hx-split-button-font-family",
|
|
1942
1943
|
"--hx-split-button-font-weight",
|
|
1943
1944
|
"--hx-split-button-menu-bg",
|
|
@@ -2137,6 +2138,7 @@
|
|
|
2137
2138
|
"--hx-space-1",
|
|
2138
2139
|
"--hx-space-2",
|
|
2139
2140
|
"--hx-switch-error-color",
|
|
2141
|
+
"--hx-switch-focus-ring-color",
|
|
2140
2142
|
"--hx-switch-font-family",
|
|
2141
2143
|
"--hx-switch-help-text-color",
|
|
2142
2144
|
"--hx-switch-label-color",
|
|
@@ -2314,7 +2316,6 @@
|
|
|
2314
2316
|
"--hx-color-border-strong",
|
|
2315
2317
|
"--hx-color-error-600",
|
|
2316
2318
|
"--hx-color-error-text",
|
|
2317
|
-
"--hx-color-primary-600",
|
|
2318
2319
|
"--hx-color-surface-default",
|
|
2319
2320
|
"--hx-color-surface-sunken",
|
|
2320
2321
|
"--hx-color-text-disabled",
|
|
@@ -2336,6 +2337,7 @@
|
|
|
2336
2337
|
"--hx-input-border-radius",
|
|
2337
2338
|
"--hx-input-color",
|
|
2338
2339
|
"--hx-input-error-color",
|
|
2340
|
+
"--hx-input-focus-ring-color",
|
|
2339
2341
|
"--hx-input-font-family",
|
|
2340
2342
|
"--hx-input-label-color",
|
|
2341
2343
|
"--hx-input-lg-font-size",
|
|
@@ -2367,7 +2369,6 @@
|
|
|
2367
2369
|
"--hx-color-border-strong",
|
|
2368
2370
|
"--hx-color-error-600",
|
|
2369
2371
|
"--hx-color-error-text",
|
|
2370
|
-
"--hx-color-primary-600",
|
|
2371
2372
|
"--hx-color-surface-default",
|
|
2372
2373
|
"--hx-color-text-muted",
|
|
2373
2374
|
"--hx-color-text-placeholder",
|
|
@@ -2386,6 +2387,7 @@
|
|
|
2386
2387
|
"--hx-input-border-radius",
|
|
2387
2388
|
"--hx-input-color",
|
|
2388
2389
|
"--hx-input-error-color",
|
|
2390
|
+
"--hx-input-focus-ring-color",
|
|
2389
2391
|
"--hx-input-font-family",
|
|
2390
2392
|
"--hx-input-label-color",
|
|
2391
2393
|
"--hx-line-height-normal",
|
|
@@ -2541,6 +2543,7 @@
|
|
|
2541
2543
|
"--hx-toggle-button-border-color",
|
|
2542
2544
|
"--hx-toggle-button-border-radius",
|
|
2543
2545
|
"--hx-toggle-button-color",
|
|
2546
|
+
"--hx-toggle-button-focus-ring-color",
|
|
2544
2547
|
"--hx-toggle-button-font-family",
|
|
2545
2548
|
"--hx-toggle-button-font-weight",
|
|
2546
2549
|
"--hx-toggle-button-pressed-bg",
|
|
@@ -2615,7 +2618,6 @@
|
|
|
2615
2618
|
"file": "hx-tree-view.css",
|
|
2616
2619
|
"tokens": [
|
|
2617
2620
|
"--hx-border-radius-sm",
|
|
2618
|
-
"--hx-color-primary-600",
|
|
2619
2621
|
"--hx-focus-ring-color",
|
|
2620
2622
|
"--hx-focus-ring-offset",
|
|
2621
2623
|
"--hx-focus-ring-width",
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { lightTokenCss as p } from "@helixui/tokens";
|
|
2
2
|
import { H as S, a as y } from "./shared/hx-accordion-ZVzgDzTG.js";
|
|
3
3
|
import { H as b } from "./shared/hx-action-bar-CitgcpGv.js";
|
|
4
|
-
import { H as g } from "./shared/hx-alert-
|
|
4
|
+
import { H as g } from "./shared/hx-alert-CLn7CstP.js";
|
|
5
5
|
import { H as v } from "./shared/hx-avatar-C9hOmlAb.js";
|
|
6
6
|
import { H as E } from "./shared/hx-badge-CQXgOXJM.js";
|
|
7
|
-
import { H as k } from "./shared/hx-banner-
|
|
7
|
+
import { H as k } from "./shared/hx-banner-D3DzpfcP.js";
|
|
8
8
|
import { H as B, a as P } from "./shared/hx-breadcrumb-item-3tKppF9h.js";
|
|
9
|
-
import { H as M } from "./shared/hx-button-
|
|
9
|
+
import { H as M } from "./shared/hx-button-CHlkRQTe.js";
|
|
10
10
|
import { H as N } from "./shared/hx-button-group-BI-QBqmO.js";
|
|
11
11
|
import { H as A } from "./shared/hx-card-qNAM2QNV.js";
|
|
12
12
|
import { H as G, a as U } from "./shared/hx-carousel-item-z1Lc24op.js";
|
|
13
|
-
import { H as O } from "./shared/hx-checkbox-
|
|
13
|
+
import { H as O } from "./shared/hx-checkbox-D7xma9YH.js";
|
|
14
14
|
import { H as K } from "./shared/hx-checkbox-group-C9n315Ju.js";
|
|
15
15
|
import { H as Y } from "./shared/hx-clinical-status-D3XQIOqX.js";
|
|
16
|
-
import { H as q } from "./shared/hx-code-snippet-
|
|
16
|
+
import { H as q } from "./shared/hx-code-snippet-Bi-arDKH.js";
|
|
17
17
|
import { H as J } from "./shared/hx-color-picker-uRc865FJ.js";
|
|
18
|
-
import { H as Z } from "./shared/hx-combobox-
|
|
18
|
+
import { H as Z } from "./shared/hx-combobox-DDzqNKEW.js";
|
|
19
19
|
import { H as oe } from "./shared/hx-container-DVI7sxfX.js";
|
|
20
20
|
import { H as re } from "./shared/hx-copy-button-sUVuikyH.js";
|
|
21
21
|
import { H as ie } from "./shared/hx-counter-0zYapFhf.js";
|
|
22
22
|
import { H as xe } from "./shared/hx-data-table-CLqVqdxr.js";
|
|
23
|
-
import { H as le } from "./shared/hx-date-picker-
|
|
23
|
+
import { H as le } from "./shared/hx-date-picker-2iRG1p74.js";
|
|
24
24
|
import { H as pe } from "./shared/hx-dialog-DRN_1-Y-.js";
|
|
25
25
|
import { H as fe } from "./shared/hx-divider-CYfcUjcr.js";
|
|
26
26
|
import { H as de } from "./shared/hx-drawer-Y1Ui2IWJ.js";
|
|
@@ -35,8 +35,8 @@ import { H as Pe } from "./shared/hx-help-text-Xb2Yr8x2.js";
|
|
|
35
35
|
import { H as Me } from "./shared/hx-icon-fuVm4-bk.js";
|
|
36
36
|
import { H as Ne } from "./shared/hx-icon-button-CGNdQSFM.js";
|
|
37
37
|
import { H as Ae } from "./shared/hx-image-Ben_4yM5.js";
|
|
38
|
-
import { H as Ge } from "./shared/hx-link-
|
|
39
|
-
import { H as Ve, a as Oe } from "./shared/hx-list-
|
|
38
|
+
import { H as Ge } from "./shared/hx-link-C-O6vq0Q.js";
|
|
39
|
+
import { H as Ve, a as Oe } from "./shared/hx-list-MyEhh8c7.js";
|
|
40
40
|
import { H as Ke, a as We, b as Ye } from "./shared/hx-menu-divider-C2omnPtj.js";
|
|
41
41
|
import { H as qe } from "./shared/hx-meter-BPscsw5t.js";
|
|
42
42
|
import { H as Je } from "./shared/hx-nav-ldFM3Fle.js";
|
|
@@ -50,14 +50,14 @@ import { H as po } from "./shared/hx-popup-COUXXZ9X.js";
|
|
|
50
50
|
import { H as fo } from "./shared/hx-progress-bar-Bn3JEPUf.js";
|
|
51
51
|
import { H as ho } from "./shared/hx-progress-ring-TwHyXeEp.js";
|
|
52
52
|
import { H as So } from "./shared/hx-prose-BThYcASV.js";
|
|
53
|
-
import { H as To, a as bo } from "./shared/hx-radio-
|
|
54
|
-
import { H as go } from "./shared/hx-rating-
|
|
55
|
-
import { H as vo } from "./shared/hx-select-
|
|
56
|
-
import { H as Eo, a as Do } from "./shared/hx-nav-item-
|
|
53
|
+
import { H as To, a as bo } from "./shared/hx-radio-CJvNU2yP.js";
|
|
54
|
+
import { H as go } from "./shared/hx-rating-C3QP53k9.js";
|
|
55
|
+
import { H as vo } from "./shared/hx-select-C8fEHQhC.js";
|
|
56
|
+
import { H as Eo, a as Do } from "./shared/hx-nav-item-Dap3DYgB.js";
|
|
57
57
|
import { H as wo } from "./shared/hx-skeleton-Cnieh5Uc.js";
|
|
58
|
-
import { H as Po } from "./shared/hx-slider-
|
|
58
|
+
import { H as Po } from "./shared/hx-slider-Blmv_rwS.js";
|
|
59
59
|
import { H as Mo } from "./shared/hx-spinner-DL5AYr16.js";
|
|
60
|
-
import { H as No } from "./shared/hx-split-button-
|
|
60
|
+
import { H as No } from "./shared/hx-split-button-Djnc5Aeg.js";
|
|
61
61
|
import { H as Ao } from "./shared/hx-split-panel-B-u0Z3mm.js";
|
|
62
62
|
import { H as Go } from "./shared/hx-stack-DGfcOfWJ.js";
|
|
63
63
|
import { H as Vo } from "./shared/hx-stat-WOcNV1Ry.js";
|
|
@@ -65,20 +65,20 @@ import { H as Xo } from "./shared/hx-status-indicator-BlQyen43.js";
|
|
|
65
65
|
import { H as Wo, a as Yo } from "./shared/hx-step-R2rjp1fT.js";
|
|
66
66
|
import { H as qo, a as zo } from "./shared/hx-structured-list-m_-dMJbC.js";
|
|
67
67
|
import { H as Qo } from "./shared/hx-style-scope-TDnR8H4O.js";
|
|
68
|
-
import { H as et } from "./shared/hx-switch-
|
|
68
|
+
import { H as et } from "./shared/hx-switch-BrZFaRue.js";
|
|
69
69
|
import { H as tt, a as rt, b as at, c as it, d as st, e as xt, f as Ht } from "./shared/hx-td-DnnEMIuA.js";
|
|
70
|
-
import { H as nt, a as pt, b as mt } from "./shared/hx-tab-panel-
|
|
70
|
+
import { H as nt, a as pt, b as mt } from "./shared/hx-tab-panel-DspCrKqo.js";
|
|
71
71
|
import { H as ct } from "./shared/hx-tag-CNSmdyaK.js";
|
|
72
72
|
import { H as ht } from "./shared/hx-text-Bz_9fJ3J.js";
|
|
73
|
-
import { F as St, H as yt } from "./shared/hx-text-input-
|
|
74
|
-
import { H as bt } from "./shared/hx-textarea-
|
|
73
|
+
import { F as St, H as yt } from "./shared/hx-text-input-D6FlOZM-.js";
|
|
74
|
+
import { H as bt } from "./shared/hx-textarea-CNG590KY.js";
|
|
75
75
|
import { H as gt } from "./shared/hx-theme-BiyQ7UUK.js";
|
|
76
76
|
import { H as vt } from "./shared/hx-time-picker-BoEIZwzv.js";
|
|
77
77
|
import { H as Et, a as Dt, t as kt } from "./shared/toast-factory-YSznocIV.js";
|
|
78
|
-
import { H as Bt } from "./shared/hx-toggle-button-
|
|
78
|
+
import { H as Bt } from "./shared/hx-toggle-button-iLiYrMbD.js";
|
|
79
79
|
import { H as Ft } from "./shared/hx-tooltip-nYOv9OLu.js";
|
|
80
80
|
import { H as Lt } from "./shared/hx-top-nav-DP6OFS8C.js";
|
|
81
|
-
import { H as Rt, a as At } from "./shared/hx-tree-item-
|
|
81
|
+
import { H as Rt, a as At } from "./shared/hx-tree-item-C2CiWuDE.js";
|
|
82
82
|
import { H as Gt } from "./shared/hx-visually-hidden-0bZKOWgT.js";
|
|
83
83
|
import { F as Vt } from "./shared/FormMixin-B8PXk5RQ.js";
|
|
84
84
|
import { H as Xt } from "./shared/helix-element-BNEYeiys.js";
|
|
@@ -163,10 +163,7 @@ const g = u`
|
|
|
163
163
|
|
|
164
164
|
.alert__close-button:focus-visible {
|
|
165
165
|
outline: var(--hx-focus-ring-width, 2px) solid
|
|
166
|
-
var(
|
|
167
|
-
--hx-alert-close-btn-focus-ring-color,
|
|
168
|
-
var(--hx-focus-ring-color, var(--hx-color-primary-600, #0f7078))
|
|
169
|
-
);
|
|
166
|
+
var(--hx-alert-close-btn-focus-ring-color, var(--hx-focus-ring-color, #0f7078));
|
|
170
167
|
outline-offset: var(--hx-focus-ring-offset, 2px);
|
|
171
168
|
opacity: 1;
|
|
172
169
|
}
|
|
@@ -479,4 +476,4 @@ r = o([
|
|
|
479
476
|
export {
|
|
480
477
|
r as H
|
|
481
478
|
};
|
|
482
|
-
//# sourceMappingURL=hx-alert-
|
|
479
|
+
//# sourceMappingURL=hx-alert-CLn7CstP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-alert-CLn7CstP.js","sources":["../../src/components/hx-alert/hx-alert.styles.ts","../../src/components/hx-alert/hx-alert.ts"],"sourcesContent":["import { css } from 'lit';\n\n/**\n * hx-alert styles.\n *\n * Component-tier tokens with two-level var() fallback:\n * var(--hx-alert-{prop}, var(--hx-color-{semantic}, #hex))\n * Inner hex fallbacks track the \"precision cool\" palette (3.2.0):\n * info-50 = #EFF6FE, info-200 = #BEDCFC, info-500 = #0C8BEB, info-800 = #064172,\n * success-50 = #EAFAEC, success-200 = #BAE6C2, success-500 = #3B9E58, success-800 = #0B4D23,\n * warning-50 = #FFF3EA, warning-200 = #FACFAE, warning-500 = #C2711C, warning-800 = #603301,\n * error-50 = #FFF2F0, error-200 = #FCCBC4, error-500 = #E5493E, error-800 = #7A090A,\n * primary-400 = #6AB1B1.\n */\nexport const helixAlertStyles = css`\n :host {\n display: block;\n }\n\n :host(:not([open])) {\n display: none;\n }\n\n /* ─── Screen-reader-only announcement region ─── */\n /* Always present in DOM so AT registers it before content is injected. */\n /* Visually hidden via clip-path technique (superior to display:none which */\n /* removes the element from the AT tree entirely). */\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 * {\n box-sizing: border-box;\n }\n\n /* ─── Alert Container ─── */\n\n .alert {\n display: flex;\n align-items: flex-start;\n gap: var(--hx-alert-gap, var(--hx-space-3, 0.75rem));\n padding: var(--hx-alert-padding, var(--hx-space-4, 1rem));\n border: var(--hx-alert-border-width, var(--hx-border-width-thin, 1px)) solid\n var(--hx-alert-border-color, var(--hx-color-info-200, #bedcfc));\n border-radius: var(--hx-alert-border-radius, var(--hx-border-radius-md, 0.375rem));\n background-color: var(--hx-alert-bg, var(--hx-color-info-50, #eff6fe));\n color: var(--hx-alert-color, var(--hx-color-info-800, #064172));\n font-family: var(--hx-alert-font-family, var(--hx-font-family-sans, sans-serif));\n font-size: var(--hx-font-size-sm, 0.875rem);\n line-height: var(--hx-line-height-normal, 1.5);\n }\n\n /* ─── Accent Variant (left border stripe) ─── */\n /* Removes full border and replaces with a left-side accent stripe. */\n /* Common healthcare/enterprise dashboard pattern for dense information UIs. */\n\n .alert--accent {\n border-width: 0;\n border-inline-start: var(--hx-alert-accent-width, 4px) solid\n var(--hx-alert-border-color, var(--hx-color-info-200, #bedcfc));\n border-radius: 0;\n }\n\n /* ─── Severity Label (WCAG 1.4.1) ─── */\n /* Visually hidden — provides a non-color cue for screen readers and users */\n /* who cannot distinguish variants by color alone (e.g. color-blind users). */\n /* Always present regardless of showIcon so severity is never color-only. */\n\n .alert__severity-label {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n /* ─── Icon ─── */\n\n .alert__icon {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n color: var(--hx-alert-icon-color, var(--hx-color-info-500, #0c8beb));\n }\n\n .alert__icon svg {\n width: var(--hx-space-5, 1.25rem);\n height: var(--hx-space-5, 1.25rem);\n fill: currentColor;\n }\n\n /* ─── Title ─── */\n\n .alert__title {\n display: none;\n font-weight: var(--hx-font-weight-semibold, 600);\n margin-bottom: var(--hx-space-1, 0.25rem);\n }\n\n .alert__title--visible {\n display: block;\n }\n\n /* ─── Message ─── */\n\n .alert__message {\n flex: 1;\n min-width: 0;\n }\n\n /* ─── Actions ─── */\n /* Hidden by default; shown via JS slotchange detection to avoid invisible */\n /* margin-top spacing when no actions are slotted. */\n\n .alert__actions {\n display: none;\n align-items: center;\n gap: var(--hx-space-2, 0.5rem);\n margin-top: var(--hx-space-2, 0.5rem);\n }\n\n .alert__actions--visible {\n display: flex;\n }\n\n /* ─── Close Button ─── */\n /* Minimum 44px touch target per WCAG 2.5.8 (Target Size Minimum, AA) and */\n /* Apple HIG / Google Material guidelines. Uses absolute px units to ensure */\n /* the target size is independent of the consumer's base font size. */\n\n .alert__close-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n min-width: var(--hx-touch-target-size, 44px);\n min-height: var(--hx-touch-target-size, 44px);\n margin-inline-start: auto;\n padding: 0;\n border: none;\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n background: transparent;\n color: var(--hx-alert-color, var(--hx-color-info-800, #064172));\n cursor: pointer;\n font-size: var(--hx-font-size-md, 1rem);\n line-height: 1;\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n opacity var(--hx-transition-fast, 150ms ease);\n opacity: var(--hx-opacity-75, 0.75);\n }\n\n .alert__close-button:hover {\n opacity: var(--hx-opacity-100, 1);\n /* color-mix() is supported in Chrome 111+, Firefox 113+, Safari 16.2+. */\n /* Falls back to transparent (no hover background) in older environments. */\n background-color: color-mix(in srgb, currentColor 10%, transparent);\n }\n\n .alert__close-button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-alert-close-btn-focus-ring-color, var(--hx-focus-ring-color, #0f7078));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n opacity: 1;\n }\n\n .alert__close-button svg {\n width: var(--hx-space-4, 1rem);\n height: var(--hx-space-4, 1rem);\n fill: currentColor;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .alert__close-button {\n transition: none;\n }\n }\n\n /* ─── Variant: info ─── */\n\n :host([variant='info']) .alert,\n :host(:not([variant])) .alert {\n --hx-alert-bg: var(--hx-color-info-50, #eff6fe);\n --hx-alert-border-color: var(--hx-color-info-200, #bedcfc);\n --hx-alert-color: var(--hx-color-info-800, #064172);\n --hx-alert-icon-color: var(--hx-color-info-500, #0c8beb);\n }\n\n /* ─── Variant: success ─── */\n\n :host([variant='success']) .alert {\n --hx-alert-bg: var(--hx-color-success-50, #eafaec);\n --hx-alert-border-color: var(--hx-color-success-200, #bae6c2);\n --hx-alert-color: var(--hx-color-success-800, #0b4d23);\n --hx-alert-icon-color: var(--hx-color-success-500, #3b9e58);\n }\n\n /* ─── Variant: warning ─── */\n\n :host([variant='warning']) .alert {\n --hx-alert-bg: var(--hx-color-warning-50, #fff3ea);\n --hx-alert-border-color: var(--hx-color-warning-200, #facfae);\n --hx-alert-color: var(--hx-color-warning-800, #603301);\n --hx-alert-icon-color: var(--hx-color-warning-500, #c2711c);\n }\n\n /* ─── Variant: error ─── */\n\n :host([variant='error']) .alert {\n --hx-alert-bg: var(--hx-color-error-50, #fff2f0);\n --hx-alert-border-color: var(--hx-color-error-200, #fccbc4);\n --hx-alert-color: var(--hx-color-error-800, #7a090a);\n --hx-alert-icon-color: var(--hx-color-error-500, #e5493e);\n }\n\n /* ─── Forced Colors (Windows High Contrast) ─── */\n /* Belt-and-suspenders: rich per-class HC overrides PLUS the forcedColorsSurface mixin. */\n\n @media (forced-colors: active) {\n .alert {\n border-color: CanvasText;\n }\n\n .alert--accent {\n border-inline-start-color: CanvasText;\n }\n\n .alert__icon svg {\n fill: CanvasText;\n }\n\n .alert__close-button {\n color: ButtonText;\n border: 1px solid ButtonText;\n }\n }\n`;\n","import { html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HelixElement } from '../../base/index.js';\nimport { helixAlertStyles } from './hx-alert.styles.js';\nimport { forcedColorsSurface } from '../../styles/forced-colors.js';\n\n/** Alert variant determines visual styling and ARIA semantics. */\nexport type AlertVariant = 'info' | 'success' | 'warning' | 'error';\n\n/** Detail for the hx-close event dispatched by hx-alert. */\nexport interface HxAlertCloseDetail {\n reason: string;\n}\n\n/**\n * A feedback component for communicating status messages, warnings, and errors.\n * Critical for healthcare patient safety alerts.\n *\n * @summary Feedback alert for status messages with variant-based styling and ARIA live regions.\n *\n * @tag hx-alert\n *\n * @slot - Default slot for alert message content.\n * @slot title - Optional title/headline for the alert.\n * @slot icon - Custom icon to override the default variant icon.\n * @slot actions - Action buttons rendered within the alert.\n *\n * @attr {string} heading - Text used to build the close button's contextual aria-label\n * (e.g., \"Close Low blood pressure alert\"). When absent the label falls back to \"Close alert\".\n *\n * @fires {CustomEvent<{reason: string}>} hx-close - Dispatched when the user dismisses the alert.\n * @fires {CustomEvent} hx-after-close - Dispatched after the alert is dismissed.\n *\n * @csspart alert - The outer alert container.\n * @csspart title - The title/headline container.\n * @csspart icon - The icon container.\n * @csspart message - The message content area.\n * @csspart close-button - The dismiss button (only rendered when dismissible).\n * @csspart actions - The actions container.\n *\n * @cssprop [--hx-alert-bg=var(--hx-color-info-50)] - Alert background color.\n * @cssprop [--hx-alert-color=var(--hx-color-info-800)] - Alert text color.\n * @cssprop [--hx-alert-border-color=var(--hx-color-info-200)] - Alert border color.\n * @cssprop [--hx-alert-border-radius=var(--hx-border-radius-md)] - Alert border radius.\n * @cssprop [--hx-alert-border-width=var(--hx-border-width-thin)] - Alert border width.\n * @cssprop [--hx-alert-padding=var(--hx-space-4)] - Alert padding.\n * @cssprop [--hx-alert-gap=var(--hx-space-3)] - Gap between alert elements.\n * @cssprop [--hx-alert-icon-color=var(--hx-color-info-500)] - Alert icon color.\n * @cssprop [--hx-alert-font-family=var(--hx-font-family-sans)] - Alert font family.\n * @cssprop [--hx-touch-target-size=44px] - Minimum touch target size for the close button.\n * @cssprop [--hx-alert-accent-width=4px] - Width of the left border accent stripe.\n * @cssprop [--hx-border-radius-md] - CSS custom property.\n * @cssprop [--hx-border-radius-sm] - CSS custom property.\n * @cssprop [--hx-border-width-thin] - Width.\n * @cssprop [--hx-color-error-200] - Color.\n * @cssprop [--hx-color-error-50] - Color.\n * @cssprop [--hx-color-error-500] - Color.\n * @cssprop [--hx-color-error-800] - Color.\n * @cssprop [--hx-color-info-200] - Color.\n * @cssprop [--hx-color-info-50] - Color.\n * @cssprop [--hx-color-info-500] - Color.\n * @cssprop [--hx-color-info-800] - Color.\n * @cssprop [--hx-color-primary-400] - Color.\n * @cssprop [--hx-color-success-200] - Color.\n * @cssprop [--hx-color-success-50] - Color.\n * @cssprop [--hx-color-success-500] - Color.\n * @cssprop [--hx-color-success-800] - Color.\n * @cssprop [--hx-color-warning-200] - Color.\n * @cssprop [--hx-color-warning-50] - Color.\n * @cssprop [--hx-color-warning-500] - Color.\n * @cssprop [--hx-color-warning-800] - Color.\n * @cssprop [--hx-focus-ring-color] - Color.\n * @cssprop [--hx-focus-ring-offset] - CSS custom property.\n * @cssprop [--hx-focus-ring-width] - Width.\n * @cssprop [--hx-font-family-sans] - Font family.\n * @cssprop [--hx-font-size-md] - Font size.\n * @cssprop [--hx-font-size-sm] - Font size.\n * @cssprop [--hx-font-weight-semibold] - Font weight.\n * @cssprop [--hx-line-height-normal] - Line height.\n * @cssprop [--hx-opacity-100] - Opacity.\n * @cssprop [--hx-opacity-75] - Opacity.\n * @cssprop [--hx-space-1] - Spacing token.\n * @cssprop [--hx-space-2] - Spacing token.\n * @cssprop [--hx-space-3] - Spacing token.\n * @cssprop [--hx-space-4] - Spacing token.\n * @cssprop [--hx-space-5] - Spacing token.\n * @cssprop [--hx-transition-fast] - Transition timing.\n */\n@customElement('hx-alert')\nexport class HelixAlert extends HelixElement {\n static override styles = [helixAlertStyles, forcedColorsSurface];\n\n // ─── Properties ───\n\n /**\n * Visual variant of the alert that determines colors and ARIA semantics.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'info' | 'success' | 'warning' | 'error' = 'info';\n\n /**\n * Whether the alert can be dismissed by the user.\n * @attr dismissible\n */\n @property({ type: Boolean, reflect: true })\n dismissible = false;\n\n /**\n * Optional heading text that provides context for the close button's accessible label.\n * When provided, the close button is announced as \"Close [heading] alert\".\n * When absent, the close button falls back to \"Close alert\".\n * @attr heading\n */\n @property({ type: String })\n heading = '';\n\n /**\n * Accessible label for the close button. Override for i18n.\n * @attr label-close\n */\n @property({ attribute: 'label-close' }) labelClose = 'Close alert';\n\n /**\n * Whether the alert is visible. Add the `open` attribute to show the alert.\n * @attr open\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Whether to show the default variant icon. Add `show-icon` attribute to display the icon.\n * @attr show-icon\n */\n @property({ type: Boolean, reflect: true, attribute: 'show-icon' })\n showIcon = false;\n\n /**\n * When true, applies a left border accent stripe instead of a full border.\n * Common healthcare/enterprise dashboard pattern for visual distinction of alert types.\n * @attr accent\n */\n @property({ type: Boolean, reflect: true })\n accent = false;\n\n /**\n * Override for the severity prefix announced to screen readers (e.g., \"Info:\", \"Error:\").\n * When not set, defaults to the English label matching the current variant.\n * @attr severity-label\n */\n @property({ attribute: 'severity-label' })\n severityLabel: string | undefined;\n\n /**\n * CSS selector for the element to return focus to after the alert is dismissed.\n * When set, the component will find and focus the matching element after dismissal.\n * If not set, focus management is the caller's responsibility via the hx-after-close event.\n * @attr return-focus-to\n */\n @property({ type: String, attribute: 'return-focus-to' })\n returnFocusTo: string | null = null;\n\n // ─── State ───\n\n /** @internal */\n @state()\n private _hasActions = false;\n\n /** @internal */\n @state()\n private _hasTitle = false;\n\n // ─── Private Handler References ───\n\n /** @internal */\n private _actionsSlotChangeHandler: (() => void) | null = null;\n /** @internal */\n private _titleSlotChangeHandler: (() => void) | null = null;\n\n // ─── Private Helpers ───\n\n /** @internal */\n private _defaultSeverityLabel(): string {\n const labels: Record<string, string> = {\n info: 'Info:',\n success: 'Success:',\n warning: 'Warning:',\n error: 'Error:',\n };\n return labels[this.variant] ?? '';\n }\n\n /** @internal */\n private get _effectiveSeverityLabel(): string {\n return this.severityLabel ?? this._defaultSeverityLabel();\n }\n\n /** Returns true when the variant requires assertive announcement. */\n /** @internal */\n private get _isAssertive(): boolean {\n return this.variant === 'error';\n }\n\n /**\n * Returns the appropriate ARIA role based on variant.\n * role=\"alert\" implies aria-live=\"assertive\"; role=\"status\" implies aria-live=\"polite\".\n * We do NOT set aria-live explicitly to avoid double-announcements in JAWS.\n */\n /** @internal */\n private get _role(): string {\n return this._isAssertive ? 'alert' : 'status';\n }\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Apply ARIA role to the host element for reliable screen reader support across\n // Shadow DOM boundaries. Placing role on a shadow-internal element has inconsistent\n // AT support in JAWS+Chrome and VoiceOver+Safari combinations (particularly pre-2024).\n this.setAttribute('role', this._role);\n if (!this.open) {\n this.setAttribute('aria-hidden', 'true');\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n const actionsSlot = this.renderRoot.querySelector<HTMLSlotElement>('slot[name=\"actions\"]');\n if (actionsSlot && this._actionsSlotChangeHandler) {\n actionsSlot.removeEventListener('slotchange', this._actionsSlotChangeHandler);\n }\n const titleSlot = this.renderRoot.querySelector<HTMLSlotElement>('slot[name=\"title\"]');\n if (titleSlot && this._titleSlotChangeHandler) {\n titleSlot.removeEventListener('slotchange', this._titleSlotChangeHandler);\n }\n }\n\n override firstUpdated(): void {\n // Track actions slot content to avoid invisible spacing when no actions are slotted.\n const actionsSlot = this.renderRoot.querySelector<HTMLSlotElement>('slot[name=\"actions\"]');\n if (actionsSlot) {\n this._actionsSlotChangeHandler = () => {\n this._hasActions = actionsSlot.assignedNodes({ flatten: true }).length > 0;\n };\n actionsSlot.addEventListener('slotchange', this._actionsSlotChangeHandler);\n }\n\n // Track title slot content so the title container doesn't create dead space when empty.\n const titleSlot = this.renderRoot.querySelector<HTMLSlotElement>('slot[name=\"title\"]');\n if (titleSlot) {\n this._titleSlotChangeHandler = () => {\n this._hasTitle = titleSlot.assignedNodes({ flatten: true }).length > 0;\n };\n titleSlot.addEventListener('slotchange', this._titleSlotChangeHandler);\n }\n }\n\n protected override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('variant')) {\n // Keep host ARIA role in sync with variant (assertive vs. polite).\n this.setAttribute('role', this._role);\n }\n if (changedProperties.has('open')) {\n // Manage aria-hidden in addition to display:none for reliable AT exclusion.\n // When open transitions from false→true, removing aria-hidden signals to AT\n // that the live region content should be announced.\n if (this.open) {\n this.removeAttribute('aria-hidden');\n // Trigger announcement via the sr-only polite live region for ATs (JAWS+Chrome,\n // NVDA) that do not re-announce existing content when aria-hidden is merely removed.\n // We inject text after a microtask so the DOM has settled and the live region\n // is registered by the AT before content arrives.\n const previousOpen = changedProperties.get('open');\n if (previousOpen === false) {\n Promise.resolve().then(() => {\n const announcer = this.renderRoot.querySelector<HTMLElement>('.sr-only');\n if (announcer) {\n announcer.textContent = '';\n // Second microtask ensures the clear is processed before re-injection,\n // guaranteeing the AT sees a content change rather than no-op.\n Promise.resolve().then(() => {\n const prefix = this._effectiveSeverityLabel;\n const message = this.textContent?.trim() ?? '';\n announcer.textContent = prefix ? `${prefix} ${message}` : message;\n });\n }\n });\n }\n } else {\n this.setAttribute('aria-hidden', 'true');\n // Clear the announcer when hidden so stale text is not re-read on next open.\n const announcer = this.renderRoot.querySelector<HTMLElement>('.sr-only');\n if (announcer) {\n announcer.textContent = '';\n }\n }\n }\n }\n\n // ─── Default Icons ───\n\n /** @internal */\n private _renderInfoIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm.75 4.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM9.25 9a.75.75 0 011.5 0v4a.75.75 0 01-1.5 0V9z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderSuccessIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm3.03 6.28a.75.75 0 00-1.06-1.06L9 10.19 7.78 8.97a.75.75 0 00-1.06 1.06l1.75 1.75a.75.75 0 001.06 0l3.5-3.5z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderWarningIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M8.49 2.92a1.75 1.75 0 013.02 0l6.25 10.83A1.75 1.75 0 0116.25 16H3.75a1.75 1.75 0 01-1.51-2.25L8.49 2.92zM10 7a.75.75 0 01.75.75v3a.75.75 0 01-1.5 0v-3A.75.75 0 0110 7zm0 7.5a.75.75 0 100-1.5.75.75 0 000 1.5z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderErrorIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm-1.72 5.22a.75.75 0 011.06 0L10 7.94l.66-.72a.75.75 0 111.06 1.06L11.06 9l.66.72a.75.75 0 11-1.06 1.06L10 10.06l-.66.72a.75.75 0 01-1.06-1.06L8.94 9l-.66-.72a.75.75 0 010-1.06z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderDefaultIcon() {\n switch (this.variant) {\n case 'success':\n return this._renderSuccessIcon();\n case 'warning':\n return this._renderWarningIcon();\n case 'error':\n return this._renderErrorIcon();\n case 'info':\n default:\n return this._renderInfoIcon();\n }\n }\n\n /** @internal */\n private _renderCloseIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z\"\n />\n </svg>`;\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleDismiss(): void {\n this.open = false;\n\n /**\n * Dispatched when the user dismisses the alert.\n * @event hx-close\n */\n this.dispatchEvent(\n new CustomEvent<{ reason: string }>('hx-close', {\n bubbles: true,\n composed: true,\n detail: { reason: 'user' },\n }),\n );\n\n /**\n * Dispatched after the alert is dismissed.\n * @event hx-after-close\n */\n this.dispatchEvent(\n new CustomEvent<void>('hx-after-close', {\n bubbles: true,\n composed: true,\n }),\n );\n\n // Return focus to a designated element if specified via returnFocusTo.\n if (this.returnFocusTo) {\n const target = document.querySelector(this.returnFocusTo);\n if (target instanceof HTMLElement) {\n target.focus();\n }\n }\n }\n\n // ─── Render ───\n\n override render() {\n const classes = {\n alert: true,\n [`alert--${this.variant}`]: true,\n 'alert--accent': this.accent,\n };\n\n // WCAG 1.4.1: Always render a visually-hidden severity label so the variant\n // is never conveyed by color alone, regardless of whether showIcon is set.\n const severityLabel = this._effectiveSeverityLabel;\n\n return html`\n <div\n class=\"sr-only\"\n aria-live=${this._isAssertive ? 'assertive' : 'polite'}\n aria-atomic=\"true\"\n ></div>\n <div part=\"alert\" class=${classMap(classes)}>\n <span class=\"alert__severity-label\">${severityLabel}</span>\n ${this.showIcon\n ? html`\n <div part=\"icon\" class=\"alert__icon\">\n <slot name=\"icon\">${this._renderDefaultIcon()}</slot>\n </div>\n `\n : nothing}\n\n <div part=\"message\" class=\"alert__message\">\n <div part=\"title\" class=\"alert__title ${this._hasTitle ? 'alert__title--visible' : ''}\">\n <slot name=\"title\"></slot>\n </div>\n <slot></slot>\n <div\n part=\"actions\"\n class=\"alert__actions ${this._hasActions ? 'alert__actions--visible' : ''}\"\n >\n <slot name=\"actions\"></slot>\n </div>\n </div>\n\n ${this.dismissible\n ? html`\n <button\n part=\"close-button\"\n class=\"alert__close-button\"\n aria-label=${this.labelClose}\n @click=${this._handleDismiss}\n >\n ${this._renderCloseIcon()}\n </button>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-alert': HelixAlert;\n }\n}\n\nexport type { HelixAlert as HxAlert };\n"],"names":["helixAlertStyles","css","HelixAlert","HelixElement","actionsSlot","titleSlot","changedProperties","announcer","prefix","message","_a","html","target","classes","severityLabel","classMap","nothing","forcedColorsSurface","__decorateClass","property","state","customElement"],"mappings":";;;;;AAcO,MAAMA,IAAmBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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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B,EAiFH,WAAA,aAAA,CAAA;AAjFGA,IAANgB,EAAA;AAAA,EADNG,EAAc,UAAU;AAAA,GACZnB,CAAA;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css as d, html as t, nothing as b } from "lit";
|
|
2
2
|
import { property as o, customElement as v } from "lit/decorators.js";
|
|
3
3
|
import { classMap as f } from "lit/directives/class-map.js";
|
|
4
|
-
import { ifDefined as
|
|
5
|
-
import { a as
|
|
4
|
+
import { ifDefined as u } from "lit/directives/if-defined.js";
|
|
5
|
+
import { a as p } from "./forced-colors-CTEDFRGa.js";
|
|
6
6
|
import { H as x } from "./helix-element-BNEYeiys.js";
|
|
7
7
|
const g = d`
|
|
8
8
|
:host {
|
|
@@ -102,10 +102,7 @@ const g = d`
|
|
|
102
102
|
|
|
103
103
|
.banner__action:focus-visible {
|
|
104
104
|
outline: var(--hx-focus-ring-width, 2px) solid
|
|
105
|
-
var(
|
|
106
|
-
--hx-banner-action-focus-ring-color,
|
|
107
|
-
var(--hx-focus-ring-color, var(--hx-color-primary-600, #0f7078))
|
|
108
|
-
);
|
|
105
|
+
var(--hx-banner-action-focus-ring-color, var(--hx-focus-ring-color, #0f7078));
|
|
109
106
|
outline-offset: var(--hx-focus-ring-offset, 2px);
|
|
110
107
|
border-radius: var(--hx-border-radius-sm, 0.25rem);
|
|
111
108
|
}
|
|
@@ -146,10 +143,7 @@ const g = d`
|
|
|
146
143
|
|
|
147
144
|
.banner__close-button:focus-visible {
|
|
148
145
|
outline: var(--hx-focus-ring-width, 2px) solid
|
|
149
|
-
var(
|
|
150
|
-
--hx-banner-close-btn-focus-ring-color,
|
|
151
|
-
var(--hx-focus-ring-color, var(--hx-color-primary-600, #0f7078))
|
|
152
|
-
);
|
|
146
|
+
var(--hx-banner-close-btn-focus-ring-color, var(--hx-focus-ring-color, #0f7078));
|
|
153
147
|
outline-offset: var(--hx-focus-ring-offset, 2px);
|
|
154
148
|
opacity: 1;
|
|
155
149
|
}
|
|
@@ -368,7 +362,7 @@ let e = class extends x {
|
|
|
368
362
|
<a
|
|
369
363
|
part="action"
|
|
370
364
|
class="banner__action"
|
|
371
|
-
href=${
|
|
365
|
+
href=${u(this.actionHref || void 0)}
|
|
372
366
|
aria-label=${this.heading ? `${this.actionLabel}: ${this.heading}` : this.actionLabel}
|
|
373
367
|
>
|
|
374
368
|
<slot name="action">${this.actionLabel}</slot>
|
|
@@ -388,7 +382,7 @@ let e = class extends x {
|
|
|
388
382
|
`;
|
|
389
383
|
}
|
|
390
384
|
};
|
|
391
|
-
e.styles = [g,
|
|
385
|
+
e.styles = [g, p];
|
|
392
386
|
r([
|
|
393
387
|
o({ type: String, reflect: !0 })
|
|
394
388
|
], e.prototype, "variant", 2);
|
|
@@ -422,4 +416,4 @@ e = r([
|
|
|
422
416
|
export {
|
|
423
417
|
e as H
|
|
424
418
|
};
|
|
425
|
-
//# sourceMappingURL=hx-banner-
|
|
419
|
+
//# sourceMappingURL=hx-banner-D3DzpfcP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-banner-D3DzpfcP.js","sources":["../../src/components/hx-banner/hx-banner.styles.ts","../../src/components/hx-banner/hx-banner.ts"],"sourcesContent":["import { css } from 'lit';\n\n/**\n * hx-banner styles.\n *\n * Component-tier tokens with two-level var() fallback:\n * var(--hx-banner-{prop}, var(--hx-color-{semantic}, #hex))\n * Inner hex fallbacks track the \"precision cool\" palette (3.2.0):\n * info-50 = #EFF6FE, info-200 = #BEDCFC, info-500 = #0C8BEB, info-800 = #064172,\n * success-50 = #EAFAEC, success-200 = #BAE6C2, success-500 = #3B9E58, success-800 = #0B4D23,\n * warning-50 = #FFF3EA, warning-200 = #FACFAE, warning-500 = #C2711C, warning-800 = #603301,\n * error-50 = #FFF2F0, error-200 = #FCCBC4, error-500 = #E5493E, error-800 = #7A090A,\n * primary-400 = #6AB1B1.\n */\nexport const helixBannerStyles = css`\n :host {\n display: block;\n width: 100%;\n position: var(--hx-banner-position, sticky);\n top: 0;\n left: 0;\n right: 0;\n z-index: var(--hx-banner-z-index, 100);\n }\n\n :host(:not([open])) {\n display: none;\n }\n\n * {\n box-sizing: border-box;\n }\n\n /* ─── Severity Label (WCAG 1.4.1) ─── */\n /* Visually hidden — ensures variant is never conveyed by color alone. */\n /* Always rendered so screen readers can identify the banner severity. */\n\n .banner__severity-label {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n /* ─── Banner Container ─── */\n\n .banner {\n display: flex;\n align-items: center;\n gap: var(--hx-banner-gap, var(--hx-space-3, 0.75rem));\n padding: var(--hx-banner-padding, var(--hx-space-3, 0.75rem) var(--hx-space-4, 1rem));\n background-color: var(--hx-banner-bg, var(--hx-color-info-50, #eff6fe));\n color: var(--hx-banner-color, var(--hx-color-info-800, #064172));\n border-bottom: var(--hx-banner-border-width, var(--hx-border-width-thin, 1px)) solid\n var(--hx-banner-border-color, var(--hx-color-info-200, #bedcfc));\n font-family: var(--hx-banner-font-family, var(--hx-font-family-sans, sans-serif));\n font-size: var(--hx-font-size-sm, 0.875rem);\n line-height: var(--hx-line-height-normal, 1.5);\n width: 100%;\n }\n\n /* ─── Icon ─── */\n\n .banner__icon {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n color: var(--hx-banner-icon-color, var(--hx-color-info-500, #0c8beb));\n }\n\n .banner__icon svg {\n width: var(--hx-space-5, 1.25rem);\n height: var(--hx-space-5, 1.25rem);\n fill: currentColor;\n }\n\n /* ─── Message ─── */\n\n .banner__message {\n flex: 1;\n min-width: 0;\n }\n\n /* ─── Action Link ─── */\n\n .banner__action {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n color: var(--hx-banner-action-color, var(--hx-banner-color, var(--hx-color-info-800, #064172)));\n font-weight: var(--hx-font-weight-semibold, 600);\n text-decoration: underline;\n text-underline-offset: 2px;\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n font-size: inherit;\n font-family: inherit;\n }\n\n .banner__action:hover {\n opacity: var(--hx-opacity-90, 0.9);\n }\n\n .banner__action:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-banner-action-focus-ring-color, var(--hx-focus-ring-color, #0f7078));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n }\n\n /* ─── Close Button ─── */\n /* Minimum 44px touch target per WCAG 2.5.8 (Target Size Minimum, AA) and */\n /* Apple HIG / Google Material guidelines. Uses absolute px units to ensure */\n /* the target size is independent of the consumer's base font size. */\n\n .banner__close-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n min-width: var(--hx-touch-target-size, 44px);\n min-height: var(--hx-touch-target-size, 44px);\n margin-inline-start: auto;\n padding: 0;\n border: none;\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n background: transparent;\n color: var(--hx-banner-color, var(--hx-color-info-800, #064172));\n cursor: pointer;\n font-size: var(--hx-font-size-md, 1rem);\n line-height: 1;\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n opacity var(--hx-transition-fast, 150ms ease);\n opacity: var(--hx-opacity-75, 0.75);\n }\n\n .banner__close-button:hover {\n opacity: var(--hx-opacity-100, 1);\n /* color-mix() is supported in Chrome 111+, Firefox 113+, Safari 16.2+. */\n /* Falls back to transparent (no hover background) in older environments. */\n background-color: color-mix(in srgb, currentColor 10%, transparent);\n }\n\n .banner__close-button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-banner-close-btn-focus-ring-color, var(--hx-focus-ring-color, #0f7078));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n opacity: 1;\n }\n\n .banner__close-button svg {\n width: var(--hx-space-4, 1rem);\n height: var(--hx-space-4, 1rem);\n fill: currentColor;\n }\n\n /* ─── Variant: info ─── */\n\n :host([variant='info']) .banner,\n :host(:not([variant])) .banner {\n --hx-banner-bg: var(--hx-color-info-50, #eff6fe);\n --hx-banner-border-color: var(--hx-color-info-200, #bedcfc);\n --hx-banner-color: var(--hx-color-info-800, #064172);\n --hx-banner-icon-color: var(--hx-color-info-500, #0c8beb);\n }\n\n /* ─── Variant: success ─── */\n\n :host([variant='success']) .banner {\n --hx-banner-bg: var(--hx-color-success-50, #eafaec);\n --hx-banner-border-color: var(--hx-color-success-200, #bae6c2);\n --hx-banner-color: var(--hx-color-success-800, #0b4d23);\n --hx-banner-icon-color: var(--hx-color-success-500, #3b9e58);\n }\n\n /* ─── Variant: warning ─── */\n\n :host([variant='warning']) .banner {\n --hx-banner-bg: var(--hx-color-warning-50, #fff3ea);\n --hx-banner-border-color: var(--hx-color-warning-200, #facfae);\n --hx-banner-color: var(--hx-color-warning-800, #603301);\n --hx-banner-icon-color: var(--hx-color-warning-500, #c2711c);\n }\n\n /* ─── Variant: error ─── */\n\n :host([variant='error']) .banner {\n --hx-banner-bg: var(--hx-color-error-50, #fff2f0);\n --hx-banner-border-color: var(--hx-color-error-200, #fccbc4);\n --hx-banner-color: var(--hx-color-error-800, #7a090a);\n --hx-banner-icon-color: var(--hx-color-error-500, #e5493e);\n }\n\n /* ─── Position: fixed ─── */\n /* When position=\"fixed\", override the host-level CSS custom property. */\n /* The :host rule above sets position via var(--hx-banner-position). */\n /* We use an attribute selector to override it cleanly without duplication. */\n\n :host([position='fixed']) {\n position: fixed;\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .banner__close-button {\n transition: none;\n }\n }\n\n /* ─── Forced Colors (Windows High Contrast) ─── */\n /* Belt-and-suspenders: rich per-class HC overrides PLUS the forcedColorsSurface mixin. */\n\n @media (forced-colors: active) {\n .banner {\n border-bottom-color: CanvasText;\n }\n\n .banner__icon svg {\n fill: CanvasText;\n }\n\n .banner__close-button {\n color: ButtonText;\n border: 1px solid ButtonText;\n }\n }\n`;\n","import { html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { HelixElement } from '../../base/index.js';\nimport { helixBannerStyles } from './hx-banner.styles.js';\nimport { forcedColorsSurface } from '../../styles/forced-colors.js';\n\n/** Banner variant determines visual styling and ARIA semantics. */\nexport type BannerVariant = 'info' | 'success' | 'warning' | 'error';\n\n/** Banner position determines CSS positioning behavior. */\nexport type BannerPosition = 'sticky' | 'fixed';\n\n/**\n * A full-width page-level banner for persistent notifications and announcements.\n * Designed for healthcare applications requiring prominent system-level messaging.\n *\n * @summary Full-width page-level banner for persistent notifications with variant-based styling and ARIA live regions.\n *\n * @tag hx-banner\n *\n * @slot - Default slot for banner message content.\n * @slot action - Optional slot to override the built-in action link with custom content.\n *\n * @fires {CustomEvent<{reason: string}>} hx-dismiss - Dispatched when the user dismisses the banner.\n *\n * @csspart banner - The outer banner container.\n * @csspart icon - The icon container.\n * @csspart message - The message content area.\n * @csspart action - The action link element (only rendered when action-label and action-href are set).\n * @csspart close-button - The dismiss button (only rendered when dismissible).\n *\n * @cssprop [--hx-banner-bg=var(--hx-color-info-50)] - Banner background color.\n * @cssprop [--hx-banner-color=var(--hx-color-info-800)] - Banner text color.\n * @cssprop [--hx-banner-border-color=var(--hx-color-info-200)] - Banner bottom border color.\n * @cssprop [--hx-banner-border-width=var(--hx-border-width-thin)] - Banner bottom border width.\n * @cssprop [--hx-banner-padding=var(--hx-space-3) var(--hx-space-4)] - Banner padding.\n * @cssprop [--hx-banner-gap=var(--hx-space-3)] - Gap between banner elements.\n * @cssprop [--hx-banner-icon-color=var(--hx-color-info-500)] - Banner icon color.\n * @cssprop [--hx-banner-font-family=var(--hx-font-family-sans)] - Banner font family.\n * @cssprop [--hx-banner-action-color=var(--hx-banner-color)] - Action link color.\n * @cssprop [--hx-banner-position=sticky] - CSS position value (sticky or fixed).\n * @cssprop [--hx-banner-z-index=100] - Banner z-index for stacking context.\n * @cssprop [--hx-touch-target-size=44px] - Minimum touch target size for the close button.\n * @cssprop [--hx-space-3] - Spacing token.\n * @cssprop [--hx-space-4] - Spacing token.\n * @cssprop [--hx-color-info-50] - Color.\n * @cssprop [--hx-color-info-800] - Color.\n * @cssprop [--hx-border-width-thin] - Width.\n * @cssprop [--hx-color-info-200] - Color.\n * @cssprop [--hx-font-family-sans] - Font family.\n * @cssprop [--hx-font-size-sm] - Font size.\n * @cssprop [--hx-line-height-normal] - Line height.\n * @cssprop [--hx-color-info-500] - Color.\n * @cssprop [--hx-space-5] - Spacing token.\n * @cssprop [--hx-font-weight-semibold] - Font weight.\n * @cssprop [--hx-opacity-90] - Opacity.\n * @cssprop [--hx-focus-ring-width] - Width.\n * @cssprop [--hx-focus-ring-color] - Color.\n * @cssprop [--hx-color-primary-400] - Color.\n * @cssprop [--hx-focus-ring-offset] - CSS custom property.\n * @cssprop [--hx-border-radius-sm] - CSS custom property.\n * @cssprop [--hx-font-size-md] - Font size.\n * @cssprop [--hx-transition-fast] - Transition timing.\n * @cssprop [--hx-opacity-75] - Opacity.\n * @cssprop [--hx-opacity-100] - Opacity.\n * @cssprop [--hx-color-success-50] - Color.\n * @cssprop [--hx-color-success-200] - Color.\n * @cssprop [--hx-color-success-800] - Color.\n * @cssprop [--hx-color-success-500] - Color.\n * @cssprop [--hx-color-warning-50] - Color.\n * @cssprop [--hx-color-warning-200] - Color.\n * @cssprop [--hx-color-warning-800] - Color.\n * @cssprop [--hx-color-warning-500] - Color.\n * @cssprop [--hx-color-error-50] - Color.\n * @cssprop [--hx-color-error-200] - Color.\n * @cssprop [--hx-color-error-800] - Color.\n * @cssprop [--hx-color-error-500] - Color.\n */\n@customElement('hx-banner')\nexport class HelixBanner extends HelixElement {\n static override styles = [helixBannerStyles, forcedColorsSurface];\n\n // ─── Properties ───\n\n /**\n * Visual variant of the banner that determines colors and ARIA semantics.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'info' | 'success' | 'warning' | 'error' = 'info';\n\n /**\n * CSS positioning behavior. \"sticky\" keeps the banner in flow; \"fixed\" pins it to the viewport.\n * @attr position\n */\n @property({ type: String, reflect: true })\n position: 'sticky' | 'fixed' = 'sticky';\n\n /**\n * Whether the banner can be dismissed by the user.\n * @attr dismissible\n */\n @property({ type: Boolean, reflect: true })\n dismissible = false;\n\n /**\n * Heading text for the banner, used to provide context in the action link's and\n * close button's accessible labels.\n * @attr heading\n */\n @property({ type: String })\n heading = '';\n\n /**\n * Label text for the optional action link. Requires action-href to render.\n * @attr action-label\n */\n @property({ type: String, attribute: 'action-label' })\n actionLabel = '';\n\n /**\n * URL for the optional action link. Requires action-label to render.\n * @attr action-href\n */\n @property({ type: String, attribute: 'action-href' })\n actionHref = '';\n\n /**\n * Whether the banner is visible. Defaults to true — banners are shown by default.\n * @attr open\n */\n @property({ type: Boolean, reflect: true })\n open = true;\n\n /** Accessible label for the dismiss button. Override for localized text. */\n @property({ type: String, attribute: 'label-close' })\n labelClose = 'Dismiss banner';\n\n /**\n * Override for the severity prefix announced to screen readers (e.g., \"Info:\", \"Error:\").\n * When not set, defaults to the English label matching the current variant.\n * @attr severity-label\n */\n @property({ attribute: 'severity-label' })\n severityLabel: string | undefined;\n\n // ─── Private Helpers ───\n\n /** Returns the default English severity label for the current variant. */\n private _defaultSeverityLabel(): string {\n const labels: Record<string, string> = {\n info: 'Info:',\n success: 'Success:',\n warning: 'Warning:',\n error: 'Error:',\n };\n return labels[this.variant] ?? '';\n }\n\n /** Returns the effective severity label, using the override if provided. */\n private get _effectiveSeverityLabel(): string {\n return this.severityLabel ?? this._defaultSeverityLabel();\n }\n\n /** Returns true when the variant requires assertive announcement. */\n /** @internal */\n private get _isAssertive(): boolean {\n return this.variant === 'error' || this.variant === 'warning';\n }\n\n /**\n * Returns the appropriate ARIA role based on variant.\n * role=\"alert\" implies aria-live=\"assertive\"; role=\"status\" implies aria-live=\"polite\".\n * We do NOT set aria-live explicitly to avoid double-announcements in JAWS.\n */\n /** @internal */\n private get _role(): string {\n return this._isAssertive ? 'alert' : 'status';\n }\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Apply ARIA role to the host element for reliable screen reader support across\n // Shadow DOM boundaries. Placing role on a shadow-internal element has inconsistent\n // AT support in JAWS+Chrome and VoiceOver+Safari combinations (particularly pre-2024).\n this.setAttribute('role', this._role);\n if (!this.open) {\n this.setAttribute('aria-hidden', 'true');\n }\n }\n\n protected override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('variant')) {\n // Keep host ARIA role in sync with variant (assertive vs. polite).\n this.setAttribute('role', this._role);\n }\n if (changedProperties.has('open')) {\n // Manage aria-hidden in addition to display:none for reliable AT exclusion.\n // When open transitions from false→true, removing aria-hidden signals to AT\n // that the live region content should be announced.\n if (this.open) {\n this.removeAttribute('aria-hidden');\n } else {\n this.setAttribute('aria-hidden', 'true');\n }\n }\n }\n\n // ─── Default Icons ───\n\n /** @internal */\n private _renderInfoIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm.75 4.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM9.25 9a.75.75 0 011.5 0v4a.75.75 0 01-1.5 0V9z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderSuccessIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm3.03 6.28a.75.75 0 00-1.06-1.06L9 10.19 7.78 8.97a.75.75 0 00-1.06 1.06l1.75 1.75a.75.75 0 001.06 0l3.5-3.5z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderWarningIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M8.49 2.92a1.75 1.75 0 013.02 0l6.25 10.83A1.75 1.75 0 0116.25 16H3.75a1.75 1.75 0 01-1.51-2.25L8.49 2.92zM10 7a.75.75 0 01.75.75v3a.75.75 0 01-1.5 0v-3A.75.75 0 0110 7zm0 7.5a.75.75 0 100-1.5.75.75 0 000 1.5z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderErrorIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm-1.72 5.22a.75.75 0 011.06 0L10 7.94l.66-.72a.75.75 0 111.06 1.06L11.06 9l.66.72a.75.75 0 11-1.06 1.06L10 10.06l-.66.72a.75.75 0 01-1.06-1.06L8.94 9l-.66-.72a.75.75 0 010-1.06z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderDefaultIcon() {\n switch (this.variant) {\n case 'success':\n return this._renderSuccessIcon();\n case 'warning':\n return this._renderWarningIcon();\n case 'error':\n return this._renderErrorIcon();\n case 'info':\n default:\n return this._renderInfoIcon();\n }\n }\n\n /** @internal */\n private _renderCloseIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z\"\n />\n </svg>`;\n }\n\n // ─── Public Methods ───\n\n /**\n * Programmatically dismisses the banner. Sets open=false and dispatches hx-dismiss.\n */\n dismiss(): void {\n this._handleDismiss();\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleDismiss(): void {\n this.open = false;\n\n /**\n * Dispatched when the user (or caller) dismisses the banner.\n * @event hx-dismiss\n */\n this.dispatchEvent(\n new CustomEvent<{ reason: string }>('hx-dismiss', {\n bubbles: true,\n composed: true,\n detail: { reason: 'user' },\n }),\n );\n }\n\n // ─── Render ───\n\n override render() {\n const classes = {\n banner: true,\n [`banner--${this.variant}`]: true,\n };\n\n const hasAction = this.actionLabel.length > 0 && this.actionHref.length > 0;\n\n // WCAG 1.4.1: Always render a visually-hidden severity label so the variant\n // is never conveyed by color alone.\n const severityLabel = this._effectiveSeverityLabel;\n\n return html`\n <div part=\"banner\" class=${classMap(classes)}>\n <span class=\"banner__severity-label\">${severityLabel}</span>\n <div part=\"icon\" class=\"banner__icon\">${this._renderDefaultIcon()}</div>\n\n <div part=\"message\" class=\"banner__message\">\n <slot></slot>\n </div>\n\n ${hasAction\n ? html`\n <a\n part=\"action\"\n class=\"banner__action\"\n href=${ifDefined(this.actionHref || undefined)}\n aria-label=${this.heading\n ? `${this.actionLabel}: ${this.heading}`\n : this.actionLabel}\n >\n <slot name=\"action\">${this.actionLabel}</slot>\n </a>\n `\n : nothing}\n ${this.dismissible\n ? html`\n <button\n part=\"close-button\"\n class=\"banner__close-button\"\n aria-label=${this.labelClose}\n @click=${this._handleDismiss}\n >\n ${this._renderCloseIcon()}\n </button>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-banner': HelixBanner;\n }\n}\n\nexport type { HelixBanner as HxBanner };\n"],"names":["helixBannerStyles","css","HelixBanner","HelixElement","changedProperties","html","classes","hasAction","severityLabel","classMap","ifDefined","nothing","forcedColorsSurface","__decorateClass","property","customElement"],"mappings":";;;;;;AAcO,MAAMA,IAAoBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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