@helixui/library 3.2.0-next.85 → 3.2.0-next.89
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 +87 -303
- package/dist/components/hx-button/hx-button.d.ts +29 -49
- package/dist/components/hx-button/hx-button.d.ts.map +1 -1
- 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-side-nav/hx-side-nav.d.ts +4 -19
- package/dist/components/hx-side-nav/hx-side-nav.d.ts.map +1 -1
- package/dist/components/hx-text-input/hx-text-input.d.ts +13 -30
- package/dist/components/hx-text-input/hx-text-input.d.ts.map +1 -1
- package/dist/components/hx-toast/hx-toast.d.ts.map +1 -1
- package/dist/components/hx-toast/hx-toast.styles.d.ts.map +1 -1
- package/dist/components/hx-toast/index.js +1 -1
- package/dist/css/helix-all.css +35 -6
- package/dist/css/helix-core.css +28 -5
- package/dist/css/helix-feedback.css +7 -1
- package/dist/css/hx-button.css +28 -5
- package/dist/css/hx-toast.css +7 -1
- package/dist/css/index.css +1 -1
- package/dist/css/manifest.json +4 -1
- package/dist/index.js +2 -2
- package/dist/shared/{hx-button-kWxjKqo-.js → hx-button-D3Royxqp.js} +34 -11
- package/dist/shared/hx-button-D3Royxqp.js.map +1 -0
- package/dist/shared/hx-nav-item-C9zXD1zK.js.map +1 -1
- package/dist/shared/hx-text-input-ClrrmoE1.js.map +1 -1
- package/dist/shared/{toast-factory-Mz1GaaFF.js → toast-factory-YSznocIV.js} +38 -33
- package/dist/shared/toast-factory-YSznocIV.js.map +1 -0
- package/figma-inventory.json +126 -373
- package/package.json +2 -2
- package/dist/shared/hx-button-kWxjKqo-.js.map +0 -1
- package/dist/shared/toast-factory-Mz1GaaFF.js.map +0 -1
|
@@ -30,25 +30,10 @@ import { HelixElement } from '../../base/index.js';
|
|
|
30
30
|
* @cssprop [--hx-side-nav-footer-padding=var(--hx-space-4)] - Footer padding.
|
|
31
31
|
* @cssprop [--hx-side-nav-toggle-color=var(--hx-color-text-inverse)] - Toggle button icon color (resting).
|
|
32
32
|
* @cssprop [--hx-side-nav-toggle-hover-color=var(--hx-color-text-inverse)] - Toggle button icon color on hover.
|
|
33
|
-
* @cssprop [--hx-color-neutral-900
|
|
34
|
-
* @cssprop [--hx-color-
|
|
35
|
-
* @cssprop [--hx-
|
|
36
|
-
* @cssprop [--hx-border-
|
|
37
|
-
* @cssprop [--hx-color-neutral-700] - Color.
|
|
38
|
-
* @cssprop [--hx-space-4] - Spacing token.
|
|
39
|
-
* @cssprop [--hx-space-14] - Spacing token.
|
|
40
|
-
* @cssprop [--hx-space-3] - Spacing token.
|
|
41
|
-
* @cssprop [--hx-space-2] - Spacing token.
|
|
42
|
-
* @cssprop [--hx-space-8] - Spacing token.
|
|
43
|
-
* @cssprop [--hx-border-radius-sm] - CSS custom property.
|
|
44
|
-
* @cssprop [--hx-color-neutral-400] - Color.
|
|
45
|
-
* @cssprop [--hx-transition-fast] - Transition timing.
|
|
46
|
-
* @cssprop [--hx-overlay-white-10] - Overlay color.
|
|
47
|
-
* @cssprop [--hx-focus-ring-width] - Width.
|
|
48
|
-
* @cssprop [--hx-focus-ring-color] - Color.
|
|
49
|
-
* @cssprop [--hx-color-primary-400] - Color.
|
|
50
|
-
* @cssprop [--hx-focus-ring-offset] - CSS custom property.
|
|
51
|
-
* @cssprop [--hx-space-5] - Spacing token.
|
|
33
|
+
* @cssprop [--hx-color-surface-inverse] - Side-nav surface fill (resolves to neutral-900 light, near-black dark).
|
|
34
|
+
* @cssprop [--hx-color-text-inverse] - Side-nav text color (resolves to neutral-0).
|
|
35
|
+
* @cssprop [--hx-color-border-strong] - Header/footer divider border.
|
|
36
|
+
* @cssprop [--hx-color-border-on-dark-subtle] - Toggle button hover surface (overlay-white-10 primitive — semantic layer for inverted affordances).
|
|
52
37
|
*/
|
|
53
38
|
export declare class HelixSideNav extends HelixElement {
|
|
54
39
|
static styles: import('lit').CSSResult[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-side-nav.d.ts","sourceRoot":"","sources":["../../../src/components/hx-side-nav/hx-side-nav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,4CAA4C,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD
|
|
1
|
+
{"version":3,"file":"hx-side-nav.d.ts","sourceRoot":"","sources":["../../../src/components/hx-side-nav/hx-side-nav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,4CAA4C,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBACa,YAAa,SAAQ,YAAY;IAI5C,OAAgB,MAAM,4BAAwB;IAI9C;;;OAGG;IAEH,SAAS,UAAS;IAElB;;;OAGG;IAEH,KAAK,SAAqB;IAIjB,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAS/D;;;;OAIG;IACH,gBAAgB;IAChB,OAAO,CAAC,6BAA6B;IAkBrC;;;OAGG;IACH,gBAAgB;IAChB,OAAO,CAAC,oBAAoB;IAM5B;;;;;OAKG;IACH,gBAAgB;IAChB,OAAO,CAAC,cAAc;IAgItB,gBAAgB;IAChB,OAAO,CAAC,aAAa;IAgCrB,gBAAgB;IAChB,OAAO,CAAC,iBAAiB;IAQhB,MAAM;CA0BhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,YAAY,CAAC;KAC7B;CACF;AAED,YAAY,EAAE,YAAY,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -41,36 +41,19 @@ declare const HelixTextInput_base: typeof HelixElement & (new (...args: any[]) =
|
|
|
41
41
|
* @cssprop [--hx-input-label-color=var(--hx-color-text-strong)] - Label text color.
|
|
42
42
|
* @cssprop [--hx-input-sm-font-size=0.875rem] - Font size for the sm size variant.
|
|
43
43
|
* @cssprop [--hx-input-lg-font-size=1.125rem] - Font size for the lg size variant.
|
|
44
|
-
*
|
|
45
|
-
* @cssprop [--hx-
|
|
46
|
-
* @cssprop [--hx-
|
|
47
|
-
* @cssprop [--hx-
|
|
48
|
-
* @cssprop [--hx-
|
|
49
|
-
* @cssprop [--hx-
|
|
50
|
-
* @cssprop [--hx-font-
|
|
51
|
-
*
|
|
52
|
-
* @cssprop [--hx-
|
|
53
|
-
* @cssprop [--hx-color-
|
|
54
|
-
* @cssprop [--hx-
|
|
55
|
-
* @cssprop [--hx-color-error-text] -
|
|
56
|
-
* @cssprop [--hx-
|
|
57
|
-
* @cssprop [--hx-border-width-thin] - Width.
|
|
58
|
-
* @cssprop [--hx-color-neutral-300] - Color.
|
|
59
|
-
* @cssprop [--hx-border-radius-md] - CSS custom property.
|
|
60
|
-
* @cssprop [--hx-color-neutral-0] - Color.
|
|
61
|
-
* @cssprop [--hx-transition-fast] - Transition timing.
|
|
62
|
-
* @cssprop [--hx-color-error-500] - Color.
|
|
63
|
-
* @cssprop [--hx-color-neutral-500] - Color.
|
|
64
|
-
* @cssprop [--hx-space-3] - Spacing token.
|
|
65
|
-
* @cssprop [--hx-space-2] - Spacing token.
|
|
66
|
-
* @cssprop [--hx-font-size-md] - Font size.
|
|
67
|
-
* @cssprop [--hx-color-neutral-800] - Color.
|
|
68
|
-
* @cssprop [--hx-size-10] - Size token.
|
|
69
|
-
* @cssprop [--hx-color-neutral-400] - Color.
|
|
70
|
-
* @cssprop [--hx-size-8] - Size token.
|
|
71
|
-
* @cssprop [--hx-space-4] - Spacing token.
|
|
72
|
-
* @cssprop [--hx-size-12] - Size token.
|
|
73
|
-
* @cssprop [--hx-font-size-xs] - Font size.
|
|
44
|
+
*
|
|
45
|
+
* @cssprop [--hx-text-input-border-width=var(--hx-border-width-thin)] - Outer border-width override (canonical hx-{tag}-* prefix; sits above --hx-input-* aliases in the cascade).
|
|
46
|
+
* @cssprop [--hx-text-input-padding-x=var(--hx-space-3)] - Outer horizontal padding override.
|
|
47
|
+
* @cssprop [--hx-text-input-padding-y=var(--hx-space-2)] - Outer vertical padding override.
|
|
48
|
+
* @cssprop [--hx-text-input-font-size=var(--hx-font-size-md)] - Outer font-size override.
|
|
49
|
+
* @cssprop [--hx-text-input-sm-font-size] - Outer sm-variant font-size override (falls through to --hx-input-sm-font-size).
|
|
50
|
+
* @cssprop [--hx-text-input-lg-font-size] - Outer lg-variant font-size override (falls through to --hx-input-lg-font-size).
|
|
51
|
+
*
|
|
52
|
+
* @cssprop [--hx-color-surface-default] - Resting field surface (semantic).
|
|
53
|
+
* @cssprop [--hx-color-text-strong] - Resting input text + label color (semantic).
|
|
54
|
+
* @cssprop [--hx-color-border-strong] - Resting border color (semantic).
|
|
55
|
+
* @cssprop [--hx-color-error-text] - Error state text + border color (semantic).
|
|
56
|
+
* @cssprop [--hx-color-error-600] - Error border primitive fallback inside the focus-state cascade.
|
|
74
57
|
*/
|
|
75
58
|
export declare class HelixTextInput extends HelixTextInput_base {
|
|
76
59
|
static styles: import('lit').CSSResult[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-text-input.d.ts","sourceRoot":"","sources":["../../../src/components/hx-text-input/hx-text-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,4CAA4C,CAAC;AAKpD,OAAO,EAAE,YAAY,EAAmB,MAAM,qBAAqB,CAAC;AASpE,4EAA4E;AAC5E,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;;AAED
|
|
1
|
+
{"version":3,"file":"hx-text-input.d.ts","sourceRoot":"","sources":["../../../src/components/hx-text-input/hx-text-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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HhB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,WAAW,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3C,WAAW,EAAE,WAAW,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,cAAc,CAAC;KACjC;IACD,UAAU,mBAAmB;QAC3B,UAAU,EAAE,WAAW,CAAC;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC5C;CACF;AAED,2CAA2C;AAC3C,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-toast.d.ts","sourceRoot":"","sources":["../../../src/components/hx-toast/hx-toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,4CAA4C,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"hx-toast.d.ts","sourceRoot":"","sources":["../../../src/components/hx-toast/hx-toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,4CAA4C,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,qBACa,UAAW,SAAQ,YAAY;IAO1C,OAAgB,MAAM,4BAAsB;IAI5C;;;OAGG;IAEH,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,S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OAAO,CAAC,kBAAkB;IAS1B,gBAAgB;IAChB,OAAO,CAAC,kBAAkB;IAS1B,gBAAgB;IAChB,OAAO,CAAC,iBAAiB;IASzB,gBAAgB;IAChB,OAAO,CAAC,eAAe;IASvB,4FAA4F;IAC5F,OAAO,KAAK,YAAY,GAavB;IAID,gBAAgB;IAChB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAKtC;IAEF,gBAAgB;IAChB,OAAO,KAAK,cAAc,GAEzB;IAIQ,MAAM;CA6DhB;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,UAAU,CAAC;KACxB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-toast.styles.d.ts","sourceRoot":"","sources":["../../../src/components/hx-toast/hx-toast.styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"hx-toast.styles.d.ts","sourceRoot":"","sources":["../../../src/components/hx-toast/hx-toast.styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,yBAiM5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,yBAyEjC,CAAC"}
|
package/dist/css/helix-all.css
CHANGED
|
@@ -1120,8 +1120,8 @@
|
|
|
1120
1120
|
|
|
1121
1121
|
.button--secondary {
|
|
1122
1122
|
--hx-button-bg: transparent;
|
|
1123
|
-
/* primary-500 (#429797) text on white surface = 3.
|
|
1124
|
-
primary-600 (#0F7078) on white =
|
|
1123
|
+
/* primary-500 (#429797) text on white surface = 3.44:1 — fails AA.
|
|
1124
|
+
primary-600 (#0F7078) on white = 5.82:1 — AA pass. */
|
|
1125
1125
|
--hx-button-color: var(--hx-color-action-secondary-fg, #0f7078);
|
|
1126
1126
|
--hx-button-border-color: var(--hx-color-action-secondary-border, #0f7078);
|
|
1127
1127
|
}
|
|
@@ -1150,7 +1150,7 @@
|
|
|
1150
1150
|
}
|
|
1151
1151
|
|
|
1152
1152
|
/* on-error tokens are tuned for error-500 (neutral-900 on #E5493E ≈ 4.59:1).
|
|
1153
|
-
error-600 (#C92A2A) drops that to
|
|
1153
|
+
error-600 (#C92A2A) drops that to 3.28:1 — AA fail. text.on-error-strong
|
|
1154
1154
|
resolves to neutral-0 across modes (no dark flip) so the darker hover fill
|
|
1155
1155
|
stays legible. Mirrors hx-toast precedent (commit 300e21ab0); routed
|
|
1156
1156
|
through the semantic tier in 3.2.1 token-cascade remediation. */
|
|
@@ -1159,10 +1159,22 @@
|
|
|
1159
1159
|
--hx-button-color: var(--hx-color-text-on-error-strong, #ffffff);
|
|
1160
1160
|
}
|
|
1161
1161
|
|
|
1162
|
+
/* Pressed state binds explicitly to action.danger.bg-active (error-700,
|
|
1163
|
+
#A21312) + text.on-error-strong (neutral-0) = 7.96:1 AA. Base
|
|
1164
|
+
.button:active filter:brightness(0.8) would compound on top of bg-hover
|
|
1165
|
+
(#C92A2A) and produce ~3.3:1 sub-AA on the bound colors. Override the
|
|
1166
|
+
filter to none. HC override on action.danger.bg-active flips to HC
|
|
1167
|
+
error-500 so the on-error-strong (HC = #000) pair is AA in HC too. */
|
|
1168
|
+
.button--danger:active {
|
|
1169
|
+
--hx-button-bg: var(--hx-button-active-bg, var(--hx-color-action-danger-bg-active, #a21312));
|
|
1170
|
+
--hx-button-color: var(--hx-color-text-on-error-strong, #ffffff);
|
|
1171
|
+
filter: none;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1162
1174
|
.button--ghost {
|
|
1163
1175
|
--hx-button-bg: transparent;
|
|
1164
|
-
/* primary-500 (#429797) text on white surface = 3.
|
|
1165
|
-
primary-600 (#0F7078) on white =
|
|
1176
|
+
/* primary-500 (#429797) text on white surface = 3.44:1 — fails AA.
|
|
1177
|
+
primary-600 (#0F7078) on white = 5.82:1 — AA pass. */
|
|
1166
1178
|
--hx-button-color: var(--hx-color-action-ghost-fg, #0f7078);
|
|
1167
1179
|
--hx-button-border-color: transparent;
|
|
1168
1180
|
}
|
|
@@ -1191,6 +1203,17 @@
|
|
|
1191
1203
|
--hx-button-color: var(--hx-color-text-on-primary-strong, #ffffff);
|
|
1192
1204
|
}
|
|
1193
1205
|
|
|
1206
|
+
/* Pressed state binds explicitly to action.primary.bg-active (primary-700,
|
|
1207
|
+
#0F6363) + text.on-primary-strong (neutral-0) = 7.03:1 AA. The base
|
|
1208
|
+
.button:active filter:brightness(0.8) would compound on top of bg-hover
|
|
1209
|
+
(#0F7078) and produce ~3.7:1 sub-AA on the bound colors. Override the
|
|
1210
|
+
filter to none so the action.*.bg-active token is what actually paints. */
|
|
1211
|
+
.button--primary:active {
|
|
1212
|
+
--hx-button-bg: var(--hx-button-active-bg, var(--hx-color-action-primary-bg-active, #0f6363));
|
|
1213
|
+
--hx-button-color: var(--hx-color-text-on-primary-strong, #ffffff);
|
|
1214
|
+
filter: none;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1194
1217
|
/* ─── Disabled ─── */
|
|
1195
1218
|
|
|
1196
1219
|
/* Note: opacity is applied on :host([disabled]) above — do NOT add opacity here.
|
|
@@ -12340,10 +12363,16 @@ export const helixTableSectionBaseStyles = css`
|
|
|
12340
12363
|
}
|
|
12341
12364
|
|
|
12342
12365
|
/* ─── Forced Colors (Windows High Contrast) ─── */
|
|
12343
|
-
/*
|
|
12366
|
+
/* Sole owner: bespoke per-class HC overrides on .toast and .toast__close.
|
|
12367
|
+
The shared forcedColorsSurface mixin was dropped in 3.2.1 (XOR rule);
|
|
12368
|
+
this block now carries the surface contract the mixin used to provide
|
|
12369
|
+
(background:Canvas + color:CanvasText + border:1px solid CanvasText)
|
|
12370
|
+
plus the per-class affordances the mixin never touched. */
|
|
12344
12371
|
|
|
12345
12372
|
@media (forced-colors: active) {
|
|
12346
12373
|
.toast {
|
|
12374
|
+
background: Canvas;
|
|
12375
|
+
color: CanvasText;
|
|
12347
12376
|
border: 1px solid CanvasText;
|
|
12348
12377
|
}
|
|
12349
12378
|
|
package/dist/css/helix-core.css
CHANGED
|
@@ -443,8 +443,8 @@
|
|
|
443
443
|
|
|
444
444
|
.button--secondary {
|
|
445
445
|
--hx-button-bg: transparent;
|
|
446
|
-
/* primary-500 (#429797) text on white surface = 3.
|
|
447
|
-
primary-600 (#0F7078) on white =
|
|
446
|
+
/* primary-500 (#429797) text on white surface = 3.44:1 — fails AA.
|
|
447
|
+
primary-600 (#0F7078) on white = 5.82:1 — AA pass. */
|
|
448
448
|
--hx-button-color: var(--hx-color-action-secondary-fg, #0f7078);
|
|
449
449
|
--hx-button-border-color: var(--hx-color-action-secondary-border, #0f7078);
|
|
450
450
|
}
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
}
|
|
474
474
|
|
|
475
475
|
/* on-error tokens are tuned for error-500 (neutral-900 on #E5493E ≈ 4.59:1).
|
|
476
|
-
error-600 (#C92A2A) drops that to
|
|
476
|
+
error-600 (#C92A2A) drops that to 3.28:1 — AA fail. text.on-error-strong
|
|
477
477
|
resolves to neutral-0 across modes (no dark flip) so the darker hover fill
|
|
478
478
|
stays legible. Mirrors hx-toast precedent (commit 300e21ab0); routed
|
|
479
479
|
through the semantic tier in 3.2.1 token-cascade remediation. */
|
|
@@ -482,10 +482,22 @@
|
|
|
482
482
|
--hx-button-color: var(--hx-color-text-on-error-strong, #ffffff);
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
+
/* Pressed state binds explicitly to action.danger.bg-active (error-700,
|
|
486
|
+
#A21312) + text.on-error-strong (neutral-0) = 7.96:1 AA. Base
|
|
487
|
+
.button:active filter:brightness(0.8) would compound on top of bg-hover
|
|
488
|
+
(#C92A2A) and produce ~3.3:1 sub-AA on the bound colors. Override the
|
|
489
|
+
filter to none. HC override on action.danger.bg-active flips to HC
|
|
490
|
+
error-500 so the on-error-strong (HC = #000) pair is AA in HC too. */
|
|
491
|
+
.button--danger:active {
|
|
492
|
+
--hx-button-bg: var(--hx-button-active-bg, var(--hx-color-action-danger-bg-active, #a21312));
|
|
493
|
+
--hx-button-color: var(--hx-color-text-on-error-strong, #ffffff);
|
|
494
|
+
filter: none;
|
|
495
|
+
}
|
|
496
|
+
|
|
485
497
|
.button--ghost {
|
|
486
498
|
--hx-button-bg: transparent;
|
|
487
|
-
/* primary-500 (#429797) text on white surface = 3.
|
|
488
|
-
primary-600 (#0F7078) on white =
|
|
499
|
+
/* primary-500 (#429797) text on white surface = 3.44:1 — fails AA.
|
|
500
|
+
primary-600 (#0F7078) on white = 5.82:1 — AA pass. */
|
|
489
501
|
--hx-button-color: var(--hx-color-action-ghost-fg, #0f7078);
|
|
490
502
|
--hx-button-border-color: transparent;
|
|
491
503
|
}
|
|
@@ -514,6 +526,17 @@
|
|
|
514
526
|
--hx-button-color: var(--hx-color-text-on-primary-strong, #ffffff);
|
|
515
527
|
}
|
|
516
528
|
|
|
529
|
+
/* Pressed state binds explicitly to action.primary.bg-active (primary-700,
|
|
530
|
+
#0F6363) + text.on-primary-strong (neutral-0) = 7.03:1 AA. The base
|
|
531
|
+
.button:active filter:brightness(0.8) would compound on top of bg-hover
|
|
532
|
+
(#0F7078) and produce ~3.7:1 sub-AA on the bound colors. Override the
|
|
533
|
+
filter to none so the action.*.bg-active token is what actually paints. */
|
|
534
|
+
.button--primary:active {
|
|
535
|
+
--hx-button-bg: var(--hx-button-active-bg, var(--hx-color-action-primary-bg-active, #0f6363));
|
|
536
|
+
--hx-button-color: var(--hx-color-text-on-primary-strong, #ffffff);
|
|
537
|
+
filter: none;
|
|
538
|
+
}
|
|
539
|
+
|
|
517
540
|
/* ─── Disabled ─── */
|
|
518
541
|
|
|
519
542
|
/* Note: opacity is applied on :host([disabled]) above — do NOT add opacity here.
|
|
@@ -1357,10 +1357,16 @@
|
|
|
1357
1357
|
}
|
|
1358
1358
|
|
|
1359
1359
|
/* ─── Forced Colors (Windows High Contrast) ─── */
|
|
1360
|
-
/*
|
|
1360
|
+
/* Sole owner: bespoke per-class HC overrides on .toast and .toast__close.
|
|
1361
|
+
The shared forcedColorsSurface mixin was dropped in 3.2.1 (XOR rule);
|
|
1362
|
+
this block now carries the surface contract the mixin used to provide
|
|
1363
|
+
(background:Canvas + color:CanvasText + border:1px solid CanvasText)
|
|
1364
|
+
plus the per-class affordances the mixin never touched. */
|
|
1361
1365
|
|
|
1362
1366
|
@media (forced-colors: active) {
|
|
1363
1367
|
.toast {
|
|
1368
|
+
background: Canvas;
|
|
1369
|
+
color: CanvasText;
|
|
1364
1370
|
border: 1px solid CanvasText;
|
|
1365
1371
|
}
|
|
1366
1372
|
|
package/dist/css/hx-button.css
CHANGED
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
|
|
95
95
|
.button--secondary {
|
|
96
96
|
--hx-button-bg: transparent;
|
|
97
|
-
/* primary-500 (#429797) text on white surface = 3.
|
|
98
|
-
primary-600 (#0F7078) on white =
|
|
97
|
+
/* primary-500 (#429797) text on white surface = 3.44:1 — fails AA.
|
|
98
|
+
primary-600 (#0F7078) on white = 5.82:1 — AA pass. */
|
|
99
99
|
--hx-button-color: var(--hx-color-action-secondary-fg, #0f7078);
|
|
100
100
|
--hx-button-border-color: var(--hx-color-action-secondary-border, #0f7078);
|
|
101
101
|
}
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/* on-error tokens are tuned for error-500 (neutral-900 on #E5493E ≈ 4.59:1).
|
|
127
|
-
error-600 (#C92A2A) drops that to
|
|
127
|
+
error-600 (#C92A2A) drops that to 3.28:1 — AA fail. text.on-error-strong
|
|
128
128
|
resolves to neutral-0 across modes (no dark flip) so the darker hover fill
|
|
129
129
|
stays legible. Mirrors hx-toast precedent (commit 300e21ab0); routed
|
|
130
130
|
through the semantic tier in 3.2.1 token-cascade remediation. */
|
|
@@ -133,10 +133,22 @@
|
|
|
133
133
|
--hx-button-color: var(--hx-color-text-on-error-strong, #ffffff);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
/* Pressed state binds explicitly to action.danger.bg-active (error-700,
|
|
137
|
+
#A21312) + text.on-error-strong (neutral-0) = 7.96:1 AA. Base
|
|
138
|
+
.button:active filter:brightness(0.8) would compound on top of bg-hover
|
|
139
|
+
(#C92A2A) and produce ~3.3:1 sub-AA on the bound colors. Override the
|
|
140
|
+
filter to none. HC override on action.danger.bg-active flips to HC
|
|
141
|
+
error-500 so the on-error-strong (HC = #000) pair is AA in HC too. */
|
|
142
|
+
.button--danger:active {
|
|
143
|
+
--hx-button-bg: var(--hx-button-active-bg, var(--hx-color-action-danger-bg-active, #a21312));
|
|
144
|
+
--hx-button-color: var(--hx-color-text-on-error-strong, #ffffff);
|
|
145
|
+
filter: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
136
148
|
.button--ghost {
|
|
137
149
|
--hx-button-bg: transparent;
|
|
138
|
-
/* primary-500 (#429797) text on white surface = 3.
|
|
139
|
-
primary-600 (#0F7078) on white =
|
|
150
|
+
/* primary-500 (#429797) text on white surface = 3.44:1 — fails AA.
|
|
151
|
+
primary-600 (#0F7078) on white = 5.82:1 — AA pass. */
|
|
140
152
|
--hx-button-color: var(--hx-color-action-ghost-fg, #0f7078);
|
|
141
153
|
--hx-button-border-color: transparent;
|
|
142
154
|
}
|
|
@@ -165,6 +177,17 @@
|
|
|
165
177
|
--hx-button-color: var(--hx-color-text-on-primary-strong, #ffffff);
|
|
166
178
|
}
|
|
167
179
|
|
|
180
|
+
/* Pressed state binds explicitly to action.primary.bg-active (primary-700,
|
|
181
|
+
#0F6363) + text.on-primary-strong (neutral-0) = 7.03:1 AA. The base
|
|
182
|
+
.button:active filter:brightness(0.8) would compound on top of bg-hover
|
|
183
|
+
(#0F7078) and produce ~3.7:1 sub-AA on the bound colors. Override the
|
|
184
|
+
filter to none so the action.*.bg-active token is what actually paints. */
|
|
185
|
+
.button--primary:active {
|
|
186
|
+
--hx-button-bg: var(--hx-button-active-bg, var(--hx-color-action-primary-bg-active, #0f6363));
|
|
187
|
+
--hx-button-color: var(--hx-color-text-on-primary-strong, #ffffff);
|
|
188
|
+
filter: none;
|
|
189
|
+
}
|
|
190
|
+
|
|
168
191
|
/* ─── Disabled ─── */
|
|
169
192
|
|
|
170
193
|
/* Note: opacity is applied on :host([disabled]) above — do NOT add opacity here.
|
package/dist/css/hx-toast.css
CHANGED
|
@@ -173,10 +173,16 @@
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
/* ─── Forced Colors (Windows High Contrast) ─── */
|
|
176
|
-
/*
|
|
176
|
+
/* Sole owner: bespoke per-class HC overrides on .toast and .toast__close.
|
|
177
|
+
The shared forcedColorsSurface mixin was dropped in 3.2.1 (XOR rule);
|
|
178
|
+
this block now carries the surface contract the mixin used to provide
|
|
179
|
+
(background:Canvas + color:CanvasText + border:1px solid CanvasText)
|
|
180
|
+
plus the per-class affordances the mixin never touched. */
|
|
177
181
|
|
|
178
182
|
@media (forced-colors: active) {
|
|
179
183
|
.toast {
|
|
184
|
+
background: Canvas;
|
|
185
|
+
color: CanvasText;
|
|
180
186
|
border: 1px solid CanvasText;
|
|
181
187
|
}
|
|
182
188
|
|
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-25T23:24:47.443Z",
|
|
3
3
|
"components": [
|
|
4
4
|
{
|
|
5
5
|
"name": "hx-accordion",
|
|
@@ -251,6 +251,7 @@
|
|
|
251
251
|
"tokens": [
|
|
252
252
|
"--hx-border-radius-md",
|
|
253
253
|
"--hx-border-width-thin",
|
|
254
|
+
"--hx-button-active-bg",
|
|
254
255
|
"--hx-button-bg",
|
|
255
256
|
"--hx-button-border-color",
|
|
256
257
|
"--hx-button-border-radius",
|
|
@@ -261,10 +262,12 @@
|
|
|
261
262
|
"--hx-button-hover-bg",
|
|
262
263
|
"--hx-button-inverted-color",
|
|
263
264
|
"--hx-color-action-danger-bg",
|
|
265
|
+
"--hx-color-action-danger-bg-active",
|
|
264
266
|
"--hx-color-action-danger-bg-hover",
|
|
265
267
|
"--hx-color-action-ghost-bg-hover",
|
|
266
268
|
"--hx-color-action-ghost-fg",
|
|
267
269
|
"--hx-color-action-primary-bg",
|
|
270
|
+
"--hx-color-action-primary-bg-active",
|
|
268
271
|
"--hx-color-action-primary-bg-hover",
|
|
269
272
|
"--hx-color-action-primary-bg-inverted-hover",
|
|
270
273
|
"--hx-color-action-secondary-bg-hover",
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { H as v } from "./shared/hx-avatar-C9hOmlAb.js";
|
|
|
6
6
|
import { H as E } from "./shared/hx-badge-CQXgOXJM.js";
|
|
7
7
|
import { H as k } from "./shared/hx-banner-DT7Zn9Bo.js";
|
|
8
8
|
import { H as B, a as P } from "./shared/hx-breadcrumb-item-COeYcB2x.js";
|
|
9
|
-
import { H as M } from "./shared/hx-button-
|
|
9
|
+
import { H as M } from "./shared/hx-button-D3Royxqp.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-CU1QnjNb.js";
|
|
12
12
|
import { H as G, a as U } from "./shared/hx-carousel-item-BaE4hpLl.js";
|
|
@@ -74,7 +74,7 @@ import { F as St, H as yt } from "./shared/hx-text-input-ClrrmoE1.js";
|
|
|
74
74
|
import { H as bt } from "./shared/hx-textarea-D9O4U8cb.js";
|
|
75
75
|
import { H as gt } from "./shared/hx-theme-BiyQ7UUK.js";
|
|
76
76
|
import { H as vt } from "./shared/hx-time-picker-m0z4nFB-.js";
|
|
77
|
-
import { H as Et, a as Dt, t as kt } from "./shared/toast-factory-
|
|
77
|
+
import { H as Et, a as Dt, t as kt } from "./shared/toast-factory-YSznocIV.js";
|
|
78
78
|
import { H as Bt } from "./shared/hx-toggle-button-Dd8clXB4.js";
|
|
79
79
|
import { H as Ft } from "./shared/hx-tooltip-nYOv9OLu.js";
|
|
80
80
|
import { H as Lt } from "./shared/hx-top-nav-CchPYaiV.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css as f, html as d, nothing as s } from "lit";
|
|
2
2
|
import { property as a, customElement as v } from "lit/decorators.js";
|
|
3
|
-
import { classMap as
|
|
3
|
+
import { classMap as u } from "lit/directives/class-map.js";
|
|
4
4
|
import { ifDefined as c } from "lit/directives/if-defined.js";
|
|
5
5
|
import { d as p } from "./dev-warn-YlwPHjtX.js";
|
|
6
6
|
import { m as x } from "./aria-delegation-Doq6RRUy.js";
|
|
@@ -101,8 +101,8 @@ const m = f`
|
|
|
101
101
|
|
|
102
102
|
.button--secondary {
|
|
103
103
|
--hx-button-bg: transparent;
|
|
104
|
-
/* primary-500 (#429797) text on white surface = 3.
|
|
105
|
-
primary-600 (#0F7078) on white =
|
|
104
|
+
/* primary-500 (#429797) text on white surface = 3.44:1 — fails AA.
|
|
105
|
+
primary-600 (#0F7078) on white = 5.82:1 — AA pass. */
|
|
106
106
|
--hx-button-color: var(--hx-color-action-secondary-fg, #0f7078);
|
|
107
107
|
--hx-button-border-color: var(--hx-color-action-secondary-border, #0f7078);
|
|
108
108
|
}
|
|
@@ -131,7 +131,7 @@ const m = f`
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
/* on-error tokens are tuned for error-500 (neutral-900 on #E5493E ≈ 4.59:1).
|
|
134
|
-
error-600 (#C92A2A) drops that to
|
|
134
|
+
error-600 (#C92A2A) drops that to 3.28:1 — AA fail. text.on-error-strong
|
|
135
135
|
resolves to neutral-0 across modes (no dark flip) so the darker hover fill
|
|
136
136
|
stays legible. Mirrors hx-toast precedent (commit 300e21ab0); routed
|
|
137
137
|
through the semantic tier in 3.2.1 token-cascade remediation. */
|
|
@@ -140,10 +140,22 @@ const m = f`
|
|
|
140
140
|
--hx-button-color: var(--hx-color-text-on-error-strong, #ffffff);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
/* Pressed state binds explicitly to action.danger.bg-active (error-700,
|
|
144
|
+
#A21312) + text.on-error-strong (neutral-0) = 7.96:1 AA. Base
|
|
145
|
+
.button:active filter:brightness(0.8) would compound on top of bg-hover
|
|
146
|
+
(#C92A2A) and produce ~3.3:1 sub-AA on the bound colors. Override the
|
|
147
|
+
filter to none. HC override on action.danger.bg-active flips to HC
|
|
148
|
+
error-500 so the on-error-strong (HC = #000) pair is AA in HC too. */
|
|
149
|
+
.button--danger:active {
|
|
150
|
+
--hx-button-bg: var(--hx-button-active-bg, var(--hx-color-action-danger-bg-active, #a21312));
|
|
151
|
+
--hx-button-color: var(--hx-color-text-on-error-strong, #ffffff);
|
|
152
|
+
filter: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
143
155
|
.button--ghost {
|
|
144
156
|
--hx-button-bg: transparent;
|
|
145
|
-
/* primary-500 (#429797) text on white surface = 3.
|
|
146
|
-
primary-600 (#0F7078) on white =
|
|
157
|
+
/* primary-500 (#429797) text on white surface = 3.44:1 — fails AA.
|
|
158
|
+
primary-600 (#0F7078) on white = 5.82:1 — AA pass. */
|
|
147
159
|
--hx-button-color: var(--hx-color-action-ghost-fg, #0f7078);
|
|
148
160
|
--hx-button-border-color: transparent;
|
|
149
161
|
}
|
|
@@ -172,6 +184,17 @@ const m = f`
|
|
|
172
184
|
--hx-button-color: var(--hx-color-text-on-primary-strong, #ffffff);
|
|
173
185
|
}
|
|
174
186
|
|
|
187
|
+
/* Pressed state binds explicitly to action.primary.bg-active (primary-700,
|
|
188
|
+
#0F6363) + text.on-primary-strong (neutral-0) = 7.03:1 AA. The base
|
|
189
|
+
.button:active filter:brightness(0.8) would compound on top of bg-hover
|
|
190
|
+
(#0F7078) and produce ~3.7:1 sub-AA on the bound colors. Override the
|
|
191
|
+
filter to none so the action.*.bg-active token is what actually paints. */
|
|
192
|
+
.button--primary:active {
|
|
193
|
+
--hx-button-bg: var(--hx-button-active-bg, var(--hx-color-action-primary-bg-active, #0f6363));
|
|
194
|
+
--hx-button-color: var(--hx-color-text-on-primary-strong, #ffffff);
|
|
195
|
+
filter: none;
|
|
196
|
+
}
|
|
197
|
+
|
|
175
198
|
/* ─── Disabled ─── */
|
|
176
199
|
|
|
177
200
|
/* Note: opacity is applied on :host([disabled]) above — do NOT add opacity here.
|
|
@@ -343,8 +366,8 @@ const m = f`
|
|
|
343
366
|
}
|
|
344
367
|
`;
|
|
345
368
|
var y = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, n = (t, r, l, i) => {
|
|
346
|
-
for (var o = i > 1 ? void 0 : i ? _(r, l) : r, h = t.length - 1,
|
|
347
|
-
(
|
|
369
|
+
for (var o = i > 1 ? void 0 : i ? _(r, l) : r, h = t.length - 1, b; h >= 0; h--)
|
|
370
|
+
(b = t[h]) && (o = (i ? b(r, l, o) : b(o)) || o);
|
|
348
371
|
return i && o && y(r, l, o), o;
|
|
349
372
|
};
|
|
350
373
|
let e = class extends x(g) {
|
|
@@ -473,7 +496,7 @@ let e = class extends x(g) {
|
|
|
473
496
|
return this.href !== void 0 ? d`
|
|
474
497
|
<a
|
|
475
498
|
part="button"
|
|
476
|
-
class=${
|
|
499
|
+
class=${u(t)}
|
|
477
500
|
href=${this.disabled || this.loading ? s : c(this.href)}
|
|
478
501
|
target=${c(this.target)}
|
|
479
502
|
rel=${this.target === "_blank" ? "noopener noreferrer" : s}
|
|
@@ -488,7 +511,7 @@ let e = class extends x(g) {
|
|
|
488
511
|
` : d`
|
|
489
512
|
<button
|
|
490
513
|
part="button"
|
|
491
|
-
class=${
|
|
514
|
+
class=${u(t)}
|
|
492
515
|
?disabled=${this.disabled}
|
|
493
516
|
type=${this.type}
|
|
494
517
|
aria-label=${this._effectiveLabel || s}
|
|
@@ -552,4 +575,4 @@ e = n([
|
|
|
552
575
|
export {
|
|
553
576
|
e as H
|
|
554
577
|
};
|
|
555
|
-
//# sourceMappingURL=hx-button-
|
|
578
|
+
//# sourceMappingURL=hx-button-D3Royxqp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-button-D3Royxqp.js","sources":["../../src/components/hx-button/hx-button.styles.ts","../../src/components/hx-button/hx-button.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixButtonStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled, 0.5);\n }\n\n :host([full]) {\n display: block;\n width: 100%;\n }\n\n :host([full]) .button {\n width: 100%;\n justify-content: center;\n }\n\n /* ─── Base Button ─── */\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--hx-space-2, 0.5rem);\n border: var(--hx-border-width-thin, 1px) solid var(--hx-button-border-color, transparent);\n border-radius: var(--hx-button-border-radius, var(--hx-border-radius-md, 0.375rem));\n background-color: var(--hx-button-bg, var(--hx-color-primary-500, #429797));\n color: var(--hx-button-color, var(--hx-color-neutral-0, #ffffff));\n font-family: var(--hx-button-font-family, var(--hx-font-family-sans, sans-serif));\n font-weight: var(--hx-button-font-weight, var(--hx-font-weight-semibold, 600));\n line-height: var(--hx-line-height-tight, 1.25);\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n color var(--hx-transition-fast, 150ms ease),\n border-color var(--hx-transition-fast, 150ms ease),\n box-shadow var(--hx-transition-fast, 150ms ease);\n text-decoration: none;\n white-space: nowrap;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-button-focus-ring-color, var(--hx-focus-ring-color, #6ab1b1));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .button:hover {\n filter: brightness(var(--hx-filter-brightness-hover, 0.9));\n }\n\n .button:active {\n filter: brightness(var(--hx-filter-brightness-active, 0.8));\n }\n\n /* ─── Size Variants ─── */\n\n /* WCAG 2.5.5 (healthcare mandate): minimum 44px touch target for sm variant.\n min-height uses --hx-touch-target-min to guarantee the interactive area\n meets the threshold even though the visual size token is smaller. */\n .button--sm {\n padding: var(--hx-space-1, 0.25rem) var(--hx-space-3, 0.75rem);\n font-size: var(--hx-font-size-sm, 0.875rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n }\n\n .button--md {\n padding: var(--hx-space-2, 0.5rem) var(--hx-space-4, 1rem);\n font-size: var(--hx-font-size-md, 1rem);\n min-height: var(--hx-size-10, 2.5rem);\n }\n\n .button--lg {\n padding: var(--hx-space-3, 0.75rem) var(--hx-space-6, 1.5rem);\n font-size: var(--hx-font-size-lg, 1.125rem);\n min-height: var(--hx-size-12, 3rem);\n }\n\n /* ─── Style Variants ─── */\n\n .button--primary {\n --hx-button-bg: var(--hx-color-action-primary-bg, #429797);\n /* Inline #0d1825 matches text.on-primary's resolved primitive (neutral-900);\n cold-start without the semantic still paints AA-tuned dark-on-primary\n rather than white-on-primary (3.43:1 fail). */\n --hx-button-color: var(--hx-color-text-on-primary, #0d1825);\n --hx-button-border-color: transparent;\n }\n\n .button--secondary {\n --hx-button-bg: transparent;\n /* primary-500 (#429797) text on white surface = 3.44:1 — fails AA.\n primary-600 (#0F7078) on white = 5.82:1 — AA pass. */\n --hx-button-color: var(--hx-color-action-secondary-fg, #0f7078);\n --hx-button-border-color: var(--hx-color-action-secondary-border, #0f7078);\n }\n\n .button--secondary:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-action-secondary-bg-hover, #ebf8f8));\n }\n\n .button--tertiary {\n --hx-button-bg: var(--hx-color-surface-sunken, #ebeee9);\n --hx-button-color: var(--hx-color-text-primary, #0d1825);\n --hx-button-border-color: transparent;\n }\n\n .button--tertiary:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-surface-raised, #f5f8f3));\n }\n\n .button--danger {\n --hx-button-bg: var(--hx-color-action-danger-bg, #e5493e);\n /* Inline #0d1825 matches text.on-error's resolved primitive (neutral-900);\n cold-start without the semantic still paints AA-tuned dark-on-error\n rather than white-on-error (3.92:1 fail). */\n --hx-button-color: var(--hx-color-text-on-error, #0d1825);\n --hx-button-border-color: transparent;\n }\n\n /* on-error tokens are tuned for error-500 (neutral-900 on #E5493E ≈ 4.59:1).\n error-600 (#C92A2A) drops that to 3.28:1 — AA fail. text.on-error-strong\n resolves to neutral-0 across modes (no dark flip) so the darker hover fill\n stays legible. Mirrors hx-toast precedent (commit 300e21ab0); routed\n through the semantic tier in 3.2.1 token-cascade remediation. */\n .button--danger:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-action-danger-bg-hover, #c92a2a));\n --hx-button-color: var(--hx-color-text-on-error-strong, #ffffff);\n }\n\n /* Pressed state binds explicitly to action.danger.bg-active (error-700,\n #A21312) + text.on-error-strong (neutral-0) = 7.96:1 AA. Base\n .button:active filter:brightness(0.8) would compound on top of bg-hover\n (#C92A2A) and produce ~3.3:1 sub-AA on the bound colors. Override the\n filter to none. HC override on action.danger.bg-active flips to HC\n error-500 so the on-error-strong (HC = #000) pair is AA in HC too. */\n .button--danger:active {\n --hx-button-bg: var(--hx-button-active-bg, var(--hx-color-action-danger-bg-active, #a21312));\n --hx-button-color: var(--hx-color-text-on-error-strong, #ffffff);\n filter: none;\n }\n\n .button--ghost {\n --hx-button-bg: transparent;\n /* primary-500 (#429797) text on white surface = 3.44:1 — fails AA.\n primary-600 (#0F7078) on white = 5.82:1 — AA pass. */\n --hx-button-color: var(--hx-color-action-ghost-fg, #0f7078);\n --hx-button-border-color: transparent;\n }\n\n .button--ghost:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-action-ghost-bg-hover, #ebf8f8));\n }\n\n .button--outline {\n --hx-button-bg: transparent;\n --hx-button-color: var(--hx-color-text-primary, #0d1825);\n --hx-button-border-color: var(--hx-color-border-strong, #8e9c98);\n }\n\n .button--outline:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-surface-raised, #f5f8f3));\n }\n\n /* on-primary token resolves to neutral-900 (#0D1825) — tuned for primary-500.\n primary-600 (#0F7078) drops the pair to 3.07:1 — AA fail. text.on-primary-strong\n resolves to neutral-0 across modes (no dark flip) for the darker hover fill.\n Mirrors hx-toast precedent (commit 300e21ab0); routed through the semantic\n tier in 3.2.1 token-cascade remediation. */\n .button--primary:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-action-primary-bg-hover, #0f7078));\n --hx-button-color: var(--hx-color-text-on-primary-strong, #ffffff);\n }\n\n /* Pressed state binds explicitly to action.primary.bg-active (primary-700,\n #0F6363) + text.on-primary-strong (neutral-0) = 7.03:1 AA. The base\n .button:active filter:brightness(0.8) would compound on top of bg-hover\n (#0F7078) and produce ~3.7:1 sub-AA on the bound colors. Override the\n filter to none so the action.*.bg-active token is what actually paints. */\n .button--primary:active {\n --hx-button-bg: var(--hx-button-active-bg, var(--hx-color-action-primary-bg-active, #0f6363));\n --hx-button-color: var(--hx-color-text-on-primary-strong, #ffffff);\n filter: none;\n }\n\n /* ─── Disabled ─── */\n\n /* Note: opacity is applied on :host([disabled]) above — do NOT add opacity here.\n Stacking opacity on both :host and .button[disabled] would multiply to 0.25. */\n .button[disabled] {\n cursor: not-allowed;\n }\n\n /* ─── Loading State ─── */\n\n .button--loading {\n position: relative;\n cursor: wait;\n }\n\n .button__spinner {\n width: 1em;\n height: 1em;\n flex-shrink: 0;\n animation: hx-spin var(--hx-duration-spinner, 750ms) linear infinite;\n }\n\n @keyframes hx-spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .button {\n transition: none;\n }\n\n .button__spinner {\n animation: none;\n opacity: var(--hx-opacity-muted, 0.6);\n }\n }\n\n /* ─── Inverted Mode ─── */\n\n /* Override text color and filter-based hover/active for all variants */\n :host([inverted]) .button {\n color: var(--hx-button-inverted-color, var(--hx-color-text-inverse, #ffffff));\n filter: none;\n }\n\n :host([inverted]) .button:hover {\n filter: none;\n }\n\n :host([inverted]) .button:active {\n filter: none;\n }\n\n :host([inverted]) .button:focus-visible {\n /* WCAG 1.4.11: focus indicator needs ≥3:1 against adjacent colors.\n border-on-dark-default (overlay-white-30) ≈ 2.7:1 on neutral-900 — fails.\n border-on-dark-strong (overlay-white-70) ≈ 5:1 — passes. */\n outline-color: var(\n --hx-button-inverted-focus-ring-color,\n var(--hx-color-border-on-dark-strong, rgba(255, 255, 255, 0.7))\n );\n }\n\n /* Primary inverted — slight transparent white overlay on hover */\n :host([inverted]) .button--primary:hover {\n --hx-button-bg: var(--hx-color-action-primary-bg-inverted-hover, #6ab1b1);\n }\n\n /* Secondary inverted — white border and translucent hover fill */\n :host([inverted]) .button--secondary {\n --hx-button-border-color: var(--hx-color-border-on-dark-strong, rgba(255, 255, 255, 0.7));\n }\n\n :host([inverted]) .button--secondary:hover {\n --hx-button-bg: var(--hx-color-border-on-dark-default, rgba(255, 255, 255, 0.3));\n }\n\n /* Tertiary inverted — resting at subtle (10%) lifts to default (30%) on hover\n so the runtime hover delta is visually distinct, not collapsed onto a\n single token. */\n :host([inverted]) .button--tertiary {\n --hx-button-bg: var(--hx-color-border-on-dark-subtle, rgba(255, 255, 255, 0.1));\n --hx-button-border-color: transparent;\n }\n\n :host([inverted]) .button--tertiary:hover {\n --hx-button-bg: var(--hx-color-border-on-dark-default, rgba(255, 255, 255, 0.3));\n }\n\n /* Ghost inverted — transparent base, translucent hover bg */\n :host([inverted]) .button--ghost {\n --hx-button-bg: transparent;\n --hx-button-border-color: transparent;\n }\n\n :host([inverted]) .button--ghost:hover {\n --hx-button-bg: var(\n --hx-button-inverted-ghost-hover-bg,\n var(--hx-color-border-on-dark-default, rgba(255, 255, 255, 0.3))\n );\n }\n\n /* Outline inverted — white border */\n :host([inverted]) .button--outline {\n --hx-button-border-color: var(--hx-color-border-on-dark-strong, rgba(255, 255, 255, 0.7));\n }\n\n :host([inverted]) .button--outline:hover {\n --hx-button-bg: var(--hx-color-border-on-dark-default, rgba(255, 255, 255, 0.3));\n }\n\n /* ─── Prefix / Suffix / Label ─── */\n\n .button__prefix,\n .button__suffix {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n .button__label {\n flex: 1 1 auto;\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n .button {\n /* Ensure button outline is visible in Windows High Contrast mode.\n ButtonText/ButtonFace are system colors recognized by the browser. */\n forced-color-adjust: none;\n background-color: ButtonFace;\n color: ButtonText;\n border: 2px solid ButtonText;\n }\n\n .button:hover {\n /* Hover affordance must survive in HC. Highlight/HighlightText is the\n OS-level \"selected\" pair, mirroring the forcedColorsInteractive mixin's\n hover contract — kept inline since this component owns its bespoke HC\n block (XOR rule). */\n background-color: Highlight;\n color: HighlightText;\n border-color: Highlight;\n }\n\n .button:focus-visible {\n outline: 3px solid Highlight;\n outline-offset: 2px;\n }\n\n .button[disabled] {\n background-color: ButtonFace;\n color: GrayText;\n border-color: GrayText;\n opacity: 1;\n }\n\n :host([disabled]) {\n opacity: 1;\n }\n\n .button--loading .button__spinner {\n /* Ensure spinner is visible in HCM */\n forced-color-adjust: auto;\n }\n }\n`;\n","import { html, nothing, type TemplateResult, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { HelixElement } from '../../base/index.js';\nimport { mixinDelegatesAria } from '../../mixins/index.js';\nimport { helixButtonStyles } from './hx-button.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/** Detail for the hx-click event dispatched by hx-button. */\nexport interface HxButtonClickDetail {\n originalEvent: MouseEvent;\n}\n\n/**\n * A production-grade button component for user interaction. Supports multiple\n * visual variants, sizes, loading state, prefix/suffix slots, anchor rendering,\n * and full ElementInternals form association.\n *\n * @summary Primary interactive element for triggering actions and form submission.\n *\n * @tag hx-button\n *\n * @slot - Default slot for button label text or content.\n * @slot prefix - Icon or content rendered before the label.\n * @slot suffix - Icon or content rendered after the label.\n *\n * @fires {CustomEvent<{originalEvent: MouseEvent}>} hx-click - Dispatched when\n * the button is clicked and is neither disabled nor loading.\n *\n * @csspart button - The native button or anchor element.\n * @csspart label - The label text wrapper span.\n * @csspart prefix - The prefix slot container span.\n * @csspart suffix - The suffix slot container span.\n * @csspart spinner - The loading spinner SVG element.\n *\n * @cssprop [--hx-button-bg=var(--hx-color-action-primary-bg)] - Button background color (3.2.1 cascade — variant rules route through action.{primary,secondary,ghost,danger}.bg).\n * @cssprop [--hx-button-hover-bg] - Hover background override; when set, overrides the variant default hover background from outside the shadow DOM.\n * @cssprop [--hx-button-color=var(--hx-color-text-on-primary)] - Button text color (variants route through text.on-{role} / text.on-{role}-strong).\n * @cssprop [--hx-button-border-color=transparent] - Button border color (secondary/outline variants route through action.secondary.border).\n * @cssprop [--hx-button-border-radius=var(--hx-border-radius-md)] - Button border radius.\n * @cssprop [--hx-button-font-family=var(--hx-font-family-sans)] - Button font family.\n * @cssprop [--hx-button-font-weight=var(--hx-font-weight-semibold)] - Button font weight.\n * @cssprop [--hx-button-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n *\n * @cssprop [--hx-button-inverted-color=var(--hx-color-text-inverse)] - Text color when inverted (resolves to neutral-0).\n * @cssprop [--hx-button-inverted-ghost-hover-bg=var(--hx-color-border-on-dark-default)] - Ghost hover bg when inverted (overlay-white-30 ≈ 5:1 vs neutral-900).\n * @cssprop [--hx-button-inverted-focus-ring-color=var(--hx-color-border-on-dark-strong)] - Focus ring color when inverted (overlay-white-70 = ~5:1 vs neutral-900).\n *\n * @cssprop [--hx-color-action-primary-bg] - Primary variant resting fill (3.2.1 semantic action layer).\n * @cssprop [--hx-color-action-primary-bg-hover] - Primary variant hover fill.\n * @cssprop [--hx-color-action-primary-bg-active] - Primary variant active/pressed fill.\n * @cssprop [--hx-color-action-secondary-fg] - Secondary/outline variant fg (resolves to primary-600 light, primary-400 dark).\n * @cssprop [--hx-color-action-secondary-border] - Secondary/outline variant border.\n * @cssprop [--hx-color-action-secondary-bg-hover] - Secondary/outline variant hover fill.\n * @cssprop [--hx-color-action-ghost-fg] - Ghost variant fg.\n * @cssprop [--hx-color-action-ghost-bg-hover] - Ghost variant hover fill.\n * @cssprop [--hx-color-action-danger-bg] - Danger variant resting fill.\n * @cssprop [--hx-color-action-danger-bg-hover] - Danger variant hover fill.\n * @cssprop [--hx-color-action-danger-bg-active] - Danger variant active fill.\n * @cssprop [--hx-color-text-on-primary] - Foreground for primary fill (resolves to neutral-900 — AA-tuned for primary-500).\n * @cssprop [--hx-color-text-on-primary-strong] - Foreground for primary-hover fill (resolves to neutral-0 across modes).\n * @cssprop [--hx-color-text-on-error] - Foreground for danger fill (resolves to neutral-900).\n * @cssprop [--hx-color-text-on-error-strong] - Foreground for danger-hover fill (resolves to neutral-0 across modes).\n * @cssprop [--hx-color-text-primary] - Foreground for tertiary variant on surface.sunken.\n * @cssprop [--hx-color-surface-sunken] - Tertiary variant resting fill.\n * @cssprop [--hx-color-surface-raised] - Tertiary variant hover fill.\n * @cssprop [--hx-color-border-on-dark-subtle] - Inverted-tertiary resting border (overlay-white-10).\n * @cssprop [--hx-color-border-on-dark-default] - Inverted-tertiary hover border + inverted-secondary/ghost hover border (overlay-white-30).\n * @cssprop [--hx-color-border-on-dark-strong] - Inverted focus-visible outline (overlay-white-70).\n */\n@customElement('hx-button')\nexport class HelixButton extends mixinDelegatesAria(HelixElement) {\n // 3.2.1: forced-colors deference is owned by the bespoke @media block in\n // hx-button.styles.ts (covers loading/disabled/focus, not just the base).\n // Do NOT also compose forcedColorsInteractive here — the mixin's docstring\n // forbids dual composition (XOR rule) and the dual approach was flagged in\n // the token-cascade campaign findings.\n static override styles = [helixButtonStyles];\n\n // ─── Form Association ───\n\n /** @internal */\n static override formAssociated = true;\n\n // ─── Public Properties ───\n\n /**\n * Visual style variant of the button.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'ghost' | 'outline' = 'primary';\n\n /**\n * Size of the button.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Whether the button is disabled. Prevents all interaction and form actions.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Whether the button is in a loading state. Shows spinner, prevents interaction,\n * and sets aria-busy. Does not set the disabled attribute.\n * @attr loading\n */\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n /**\n * The type attribute for the underlying button element. Ignored when href is set.\n * @attr type\n */\n @property({ type: String })\n type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * When set, renders an anchor element instead of a button.\n * @attr href\n */\n @property({ type: String })\n href: string | undefined = undefined;\n\n /**\n * Anchor target attribute. Only used when href is set.\n * @attr target\n */\n @property({ type: String })\n target: string | undefined = undefined;\n\n /**\n * Form field name submitted via ElementInternals.setFormValue on submit.\n * @attr name\n */\n @property({ type: String })\n name: string | undefined = undefined;\n\n /**\n * Form field value submitted via ElementInternals.setFormValue on submit.\n * @attr value\n */\n @property({ type: String })\n value: string | undefined = undefined;\n\n /**\n * When true, the button stretches to fill its container width.\n * Sets the host to `display: block` and the inner element to `width: 100%`.\n * @attr full\n */\n @property({ type: Boolean, reflect: true })\n full = false;\n\n /**\n * When true, flips button colors for placement on dark or gradient backgrounds.\n * Forces text to white and adjusts hover/focus ring colors across all variants.\n * @attr inverted\n */\n @property({ type: Boolean, reflect: true })\n inverted = false;\n\n /**\n * Accessible label for icon-only or text-less buttons.\n * Required when the button has no visible text content.\n *\n * Accepts both `accessible-label` and the standard `aria-label` HTML attribute.\n * `accessible-label` takes precedence when both are set.\n *\n * @attr accessible-label\n */\n @property({ type: String, attribute: 'accessible-label' })\n accessibleLabel: string = '';\n\n /**\n * Returns the effective label for the button, checking accessible-label first,\n * then the aria-label attribute, falling back to empty string.\n * @internal\n */\n private get _effectiveLabel(): string {\n return this.accessibleLabel?.trim() || this.ariaLabel?.trim() || '';\n }\n\n // ─── Form API ───\n\n protected override _onFormDisabled(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n // ─── Lifecycle ───\n\n /** @internal */\n private static readonly _VALID_VARIANTS = [\n 'primary',\n 'secondary',\n 'tertiary',\n 'danger',\n 'ghost',\n 'outline',\n ] as const;\n\n // Prevents double-warn on browsers that fire slotchange for empty initial slots.\n private _emptySlotWarnEmitted = false;\n\n override firstUpdated(changedProperties: PropertyValues<this>): void {\n super.firstUpdated(changedProperties);\n const slot = this.shadowRoot?.querySelector<HTMLSlotElement>('slot:not([name])');\n const hasContent = (slot?.assignedNodes({ flatten: true }) ?? []).some(\n (n) => n.nodeType !== Node.TEXT_NODE || (n.textContent?.trim().length ?? 0) > 0,\n );\n if (!hasContent && !this._effectiveLabel) {\n this._emptySlotWarnEmitted = true;\n devWarn(\n 'hx-button',\n 'hx-button has no slot content and no accessible-label — button will have no accessible name.',\n );\n }\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('variant')) {\n const validVariants: string[] = [...HelixButton._VALID_VARIANTS];\n if (!validVariants.includes(this.variant)) {\n devWarn(\n 'hx-button',\n `Invalid variant \"${this.variant}\". Expected one of: ${validVariants.join(', ')}. Clamping to \"primary\".`,\n );\n this.variant = 'primary';\n }\n }\n }\n\n // ─── Slot Handlers ───\n\n /** @internal */\n private _handleDefaultSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n const hasContent = slot\n .assignedNodes({ flatten: true })\n .some((n) => n.nodeType !== Node.TEXT_NODE || (n.textContent?.trim().length ?? 0) > 0);\n if (!hasContent && !this._effectiveLabel && !this._emptySlotWarnEmitted) {\n devWarn(\n 'hx-button',\n 'hx-button has no slot content and no accessible-label — button will have no accessible name.',\n );\n }\n // Only reset once content arrives so the guard stays armed for browsers\n // that fire a second slotchange for the same empty initial slot.\n if (hasContent) {\n this._emptySlotWarnEmitted = false;\n }\n }\n\n // ─── Event Handling ───\n\n /**\n * @private\n * @internal\n */\n private _handleClick(e: MouseEvent): void {\n if (this.disabled || this.loading) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n /**\n * Dispatched when the button is clicked.\n * @event hx-click\n */\n this.dispatchEvent(\n new CustomEvent<{ originalEvent: MouseEvent }>('hx-click', {\n bubbles: true,\n composed: true,\n detail: { originalEvent: e },\n }),\n );\n\n // Handle form submission/reset if form-associated and not in anchor mode\n if (this.href === undefined && this.type === 'submit' && this._internals.form) {\n if (this.name !== undefined && this.value !== undefined) {\n this._internals.setFormValue(this.value);\n }\n this._internals.form.requestSubmit();\n } else if (this.href === undefined && this.type === 'reset' && this._internals.form) {\n this._internals.form.reset();\n }\n }\n\n // ─── Render Helpers ───\n\n /**\n * @private\n * @internal\n */\n private _renderSpinner(): TemplateResult {\n return html`\n <svg\n class=\"button__spinner\"\n part=\"spinner\"\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <circle\n class=\"button__spinner-track\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n opacity=\"0.3\"\n />\n <path\n class=\"button__spinner-arc\"\n d=\"M12 2a10 10 0 0 1 10 10\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n `;\n }\n\n /**\n * @private\n * @internal\n */\n private _renderInner(): TemplateResult {\n return html`\n ${this.loading ? this._renderSpinner() : nothing}\n <span part=\"prefix\" class=\"button__prefix\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot @slotchange=${this._handleDefaultSlotChange}></slot>\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot name=\"suffix\"></slot>\n </span>\n `;\n }\n\n // ─── Render ───\n\n override render() {\n const classes = {\n button: true,\n [`button--${this.variant}`]: true,\n [`button--${this.size}`]: true,\n 'button--loading': this.loading,\n };\n\n if (this.href !== undefined) {\n return html`\n <a\n part=\"button\"\n class=${classMap(classes)}\n href=${this.disabled || this.loading ? nothing : ifDefined(this.href)}\n target=${ifDefined(this.target)}\n rel=${this.target === '_blank' ? 'noopener noreferrer' : nothing}\n aria-label=${this._effectiveLabel || nothing}\n aria-disabled=${this.disabled ? 'true' : nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n tabindex=${this.disabled ? '-1' : nothing}\n @click=${this._handleClick}\n >\n ${this._renderInner()}\n </a>\n `;\n }\n\n return html`\n <button\n part=\"button\"\n class=${classMap(classes)}\n ?disabled=${this.disabled}\n type=${this.type}\n aria-label=${this._effectiveLabel || nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n @click=${this._handleClick}\n >\n ${this._renderInner()}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-button': HelixButton;\n }\n interface HTMLElementEventMap {\n 'hx-click': CustomEvent<{ originalEvent: MouseEvent }>;\n }\n}\n"],"names":["helixButtonStyles","css","HelixButton","mixinDelegatesAria","HelixElement","_a","_b","disabled","changedProperties","slot","n","validVariants","devWarn","e","hasContent","html","nothing","classes","classMap","ifDefined","__decorateClass","property","customElement"],"mappings":";;;;;;;AAEO,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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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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