@helixui/library 1.1.2-next.3 → 1.1.2-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/custom-elements.json +85 -149
  2. package/dist/components/hx-patient-banner/hx-patient-banner.d.ts +8 -0
  3. package/dist/components/hx-patient-banner/hx-patient-banner.d.ts.map +1 -1
  4. package/dist/components/hx-patient-banner/hx-patient-banner.styles.d.ts.map +1 -1
  5. package/dist/components/hx-patient-banner/index.js +1 -1
  6. package/dist/components/hx-phi-field/hx-phi-field.d.ts +27 -2
  7. package/dist/components/hx-phi-field/hx-phi-field.d.ts.map +1 -1
  8. package/dist/components/hx-phi-field/hx-phi-field.styles.d.ts.map +1 -1
  9. package/dist/components/hx-phi-field/index.js +1 -1
  10. package/dist/components/hx-select/hx-select.d.ts +1 -0
  11. package/dist/components/hx-select/hx-select.d.ts.map +1 -1
  12. package/dist/components/hx-select/hx-select.styles.d.ts.map +1 -1
  13. package/dist/components/hx-select/index.js +1 -1
  14. package/dist/components/hx-status-indicator/hx-status-indicator.d.ts +17 -1
  15. package/dist/components/hx-status-indicator/hx-status-indicator.d.ts.map +1 -1
  16. package/dist/components/hx-status-indicator/hx-status-indicator.styles.d.ts.map +1 -1
  17. package/dist/components/hx-status-indicator/index.js +1 -1
  18. package/dist/css/helix-all.css +144 -48
  19. package/dist/css/helix-feedback.css +33 -4
  20. package/dist/css/helix-forms.css +68 -41
  21. package/dist/css/hx-patient-banner.css +31 -3
  22. package/dist/css/hx-phi-field.css +12 -0
  23. package/dist/css/hx-select.css +68 -41
  24. package/dist/css/hx-status-indicator.css +33 -4
  25. package/dist/css/index.css +1 -1
  26. package/dist/css/manifest.json +11 -5
  27. package/dist/index.js +4 -4
  28. package/dist/shared/{hx-patient-banner-BoJHddAL.js → hx-patient-banner-wk4qWmsH.js} +88 -47
  29. package/dist/shared/hx-patient-banner-wk4qWmsH.js.map +1 -0
  30. package/dist/shared/{hx-phi-field-EDWna59z.js → hx-phi-field-DX9z3nu0.js} +67 -33
  31. package/dist/shared/hx-phi-field-DX9z3nu0.js.map +1 -0
  32. package/dist/shared/{hx-select-4-nHL0vd.js → hx-select-BWzxWZs_.js} +82 -55
  33. package/dist/shared/hx-select-BWzxWZs_.js.map +1 -0
  34. package/dist/shared/{hx-status-indicator-4ClvA5mU.js → hx-status-indicator-Dl3Y34mc.js} +76 -35
  35. package/dist/shared/hx-status-indicator-Dl3Y34mc.js.map +1 -0
  36. package/package.json +2 -2
  37. package/dist/shared/hx-patient-banner-BoJHddAL.js.map +0 -1
  38. package/dist/shared/hx-phi-field-EDWna59z.js.map +0 -1
  39. package/dist/shared/hx-select-4-nHL0vd.js.map +0 -1
  40. package/dist/shared/hx-status-indicator-4ClvA5mU.js.map +0 -1
@@ -5283,6 +5283,7 @@ export const helixGridItemStyles = css`
5283
5283
  --_value-color: var(--hx-patient-banner-value-color, var(--hx-color-neutral-900, #111827));
5284
5284
  --_value-font-size: var(--hx-patient-banner-value-font-size, var(--hx-font-size-sm, 0.875rem));
5285
5285
  --_photo-size: var(--hx-patient-banner-photo-size, var(--hx-space-10, 2.5rem));
5286
+ --_photo-bg: var(--hx-patient-banner-photo-bg, var(--hx-color-neutral-200, #e5e7eb));
5286
5287
  }
5287
5288
 
5288
5289
  * {
@@ -5300,6 +5301,7 @@ export const helixGridItemStyles = css`
5300
5301
  border-bottom: var(--hx-border-width-thin, 1px) solid var(--_border-color);
5301
5302
  font-family: var(--_font-family);
5302
5303
  width: 100%;
5304
+ position: relative;
5303
5305
  }
5304
5306
 
5305
5307
  /* ─── Photo Area ─── */
@@ -5308,12 +5310,15 @@ export const helixGridItemStyles = css`
5308
5310
  flex-shrink: 0;
5309
5311
  width: var(--_photo-size);
5310
5312
  height: var(--_photo-size);
5313
+ /* Minimum 44x44px touch target for interactive photo content. */
5314
+ min-width: 44px;
5315
+ min-height: 44px;
5311
5316
  border-radius: var(--hx-border-radius-full, 9999px);
5312
5317
  overflow: hidden;
5313
5318
  display: flex;
5314
5319
  align-items: center;
5315
5320
  justify-content: center;
5316
- background-color: var(--hx-color-neutral-200, #e5e7eb);
5321
+ background-color: var(--_photo-bg);
5317
5322
  }
5318
5323
 
5319
5324
  /* ─── Fields Grid ─── */
@@ -5359,9 +5364,8 @@ export const helixGridItemStyles = css`
5359
5364
  :host([aria-invalid='true']) .banner {
5360
5365
  border-bottom-color: var(--hx-color-error-400, #f87171);
5361
5366
  background-color: var(--hx-color-error-50, #fef2f2);
5362
- /* Darken label color to maintain 4.5:1 contrast on error-50 background */
5367
+ /* Darken label color to maintain 4.5:1 contrast on error-50 background. */
5363
5368
  --_label-color: var(--hx-patient-banner-label-color, var(--hx-color-neutral-700, #374151));
5364
- position: relative;
5365
5369
  }
5366
5370
 
5367
5371
  :host([aria-invalid='true']) .banner::before {
@@ -5375,6 +5379,30 @@ export const helixGridItemStyles = css`
5375
5379
  background-color: var(--hx-color-error-500, #ef4444);
5376
5380
  border-radius: 0;
5377
5381
  }
5382
+
5383
+ /* ─── Visually-hidden violation live region ─── */
5384
+ /* Announces identifier rule violations to screen readers without visible text. */
5385
+
5386
+ .violation-message {
5387
+ position: absolute;
5388
+ width: 1px;
5389
+ height: 1px;
5390
+ padding: 0;
5391
+ margin: -1px;
5392
+ overflow: hidden;
5393
+ clip: rect(0, 0, 0, 0);
5394
+ white-space: nowrap;
5395
+ border-width: 0;
5396
+ }
5397
+
5398
+ /* ─── Motion reduction ─── */
5399
+
5400
+ @media (prefers-reduced-motion: reduce) {
5401
+ * {
5402
+ transition: none !important;
5403
+ animation: none !important;
5404
+ }
5405
+ }
5378
5406
  /* ── hx-phi-field ── */
5379
5407
  :host {
5380
5408
  display: inline-flex;
@@ -5453,6 +5481,18 @@ export const helixGridItemStyles = css`
5453
5481
  pointer-events: none;
5454
5482
  }
5455
5483
 
5484
+ /* ─── Disabled State ─── */
5485
+
5486
+ :host([disabled]) {
5487
+ opacity: var(--hx-phi-field-disabled-opacity, var(--hx-opacity-50, 0.5));
5488
+ pointer-events: none;
5489
+ cursor: not-allowed;
5490
+ }
5491
+
5492
+ .phi-field--disabled .phi-field__toggle {
5493
+ cursor: not-allowed;
5494
+ }
5495
+
5456
5496
  /* ─── Reduced Motion ─── */
5457
5497
 
5458
5498
  @media (prefers-reduced-motion: reduce) {
@@ -6001,8 +6041,45 @@ export const helixGridItemStyles = css`
6001
6041
  }
6002
6042
  }
6003
6043
  /* ── hx-select ── */
6004
- :host {
6044
+ /* ─── 3-tier token cascade: component → semantic → hardcoded fallback ─── */
6045
+ :host {
6005
6046
  display: block;
6047
+
6048
+ /* Background & foreground */
6049
+ --_bg: var(--hx-select-bg, var(--hx-color-neutral-0, #ffffff));
6050
+ --_color: var(--hx-select-color, var(--hx-color-neutral-800, #212529));
6051
+ --_placeholder-color: var(--hx-select-placeholder-color, var(--hx-color-neutral-400, #adb5bd));
6052
+
6053
+ /* Label */
6054
+ --_label-color: var(--hx-select-label-color, var(--hx-color-neutral-700, #343a40));
6055
+
6056
+ /* Border */
6057
+ --_border-color: var(--hx-select-border-color, var(--hx-color-neutral-300, #ced4da));
6058
+ --_border-radius: var(--hx-select-border-radius, var(--hx-border-radius-md, 0.375rem));
6059
+
6060
+ /* Focus ring */
6061
+ --_focus-ring-color: var(
6062
+ --hx-select-focus-ring-color,
6063
+ var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa))
6064
+ );
6065
+
6066
+ /* Error */
6067
+ --_error-color: var(--hx-select-error-color, var(--hx-color-error-500, #dc3545));
6068
+
6069
+ /* Chevron */
6070
+ --_chevron-color: var(--hx-select-chevron-color, var(--hx-color-neutral-500, #6c757d));
6071
+ --_chevron-size: var(--hx-select-chevron-size, 0.5rem);
6072
+
6073
+ /* Listbox */
6074
+ --_listbox-bg: var(--hx-select-listbox-bg, var(--hx-color-neutral-0, #ffffff));
6075
+ --_option-hover-bg: var(--hx-select-option-hover-bg, var(--hx-color-primary-50, #eff6ff));
6076
+ --_option-selected-bg: var(
6077
+ --hx-select-option-selected-bg,
6078
+ var(--hx-color-primary-100, #dbeafe)
6079
+ );
6080
+
6081
+ /* Typography */
6082
+ --_font-family: var(--hx-select-font-family, var(--hx-font-family-sans, sans-serif));
6006
6083
  }
6007
6084
 
6008
6085
  :host([disabled]) {
@@ -6018,7 +6095,7 @@ export const helixGridItemStyles = css`
6018
6095
  display: flex;
6019
6096
  flex-direction: column;
6020
6097
  gap: var(--hx-space-1, 0.25rem);
6021
- font-family: var(--hx-select-font-family, var(--hx-font-family-sans, sans-serif));
6098
+ font-family: var(--_font-family);
6022
6099
  position: relative;
6023
6100
  }
6024
6101
 
@@ -6028,7 +6105,7 @@ export const helixGridItemStyles = css`
6028
6105
  gap: var(--hx-space-1, 0.25rem);
6029
6106
  font-size: var(--hx-font-size-sm, 0.875rem);
6030
6107
  font-weight: var(--hx-font-weight-medium, 500);
6031
- color: var(--hx-select-label-color, var(--hx-color-neutral-700, #343a40));
6108
+ color: var(--_label-color);
6032
6109
  line-height: var(--hx-line-height-normal, 1.5);
6033
6110
  }
6034
6111
 
@@ -6049,11 +6126,10 @@ export const helixGridItemStyles = css`
6049
6126
  gap: var(--hx-space-2, 0.5rem);
6050
6127
  width: 100%;
6051
6128
  min-height: var(--hx-input-height-md, var(--hx-size-10, 2.5rem));
6052
- border: var(--hx-border-width-thin, 1px) solid
6053
- var(--hx-select-border-color, var(--hx-color-neutral-300, #ced4da));
6054
- border-radius: var(--hx-select-border-radius, var(--hx-border-radius-md, 0.375rem));
6055
- background-color: var(--hx-select-bg, var(--hx-color-neutral-0, #ffffff));
6056
- color: var(--hx-select-color, var(--hx-color-neutral-800, #212529));
6129
+ border: var(--hx-border-width-thin, 1px) solid var(--_border-color);
6130
+ border-radius: var(--_border-radius);
6131
+ background-color: var(--_bg);
6132
+ color: var(--_color);
6057
6133
  font-family: inherit;
6058
6134
  font-size: var(--hx-font-size-md, 1rem);
6059
6135
  line-height: var(--hx-line-height-normal, 1.5);
@@ -6068,18 +6144,11 @@ export const helixGridItemStyles = css`
6068
6144
 
6069
6145
  .field__trigger:focus,
6070
6146
  .field__trigger:focus-visible {
6071
- border-color: var(
6072
- --hx-select-focus-ring-color,
6073
- var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa))
6074
- );
6147
+ border-color: var(--_focus-ring-color);
6075
6148
  box-shadow: 0 0 0 var(--hx-focus-ring-width, 2px)
6076
6149
  color-mix(
6077
6150
  in srgb,
6078
- var(
6079
- --hx-select-focus-ring-color,
6080
- var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa))
6081
- )
6082
- calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
6151
+ var(--_focus-ring-color) calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
6083
6152
  transparent
6084
6153
  );
6085
6154
  }
@@ -6109,15 +6178,15 @@ export const helixGridItemStyles = css`
6109
6178
  }
6110
6179
 
6111
6180
  .field__trigger--placeholder .field__trigger-value {
6112
- color: var(--hx-select-placeholder-color, var(--hx-color-neutral-400, #adb5bd));
6181
+ color: var(--_placeholder-color);
6113
6182
  }
6114
6183
 
6115
6184
  .field__chevron {
6116
6185
  flex-shrink: 0;
6117
- width: 12px;
6118
- height: 8px;
6186
+ width: calc(var(--_chevron-size) * 1.5);
6187
+ height: var(--_chevron-size);
6119
6188
  position: relative;
6120
- color: var(--hx-select-chevron-color, var(--hx-color-neutral-500, #6c757d));
6189
+ color: var(--_chevron-color);
6121
6190
  pointer-events: none;
6122
6191
  transition: transform var(--hx-transition-fast, 150ms ease);
6123
6192
  }
@@ -6126,11 +6195,11 @@ export const helixGridItemStyles = css`
6126
6195
  content: '';
6127
6196
  position: absolute;
6128
6197
  top: 0;
6129
- left: 2px;
6130
- width: 7px;
6131
- height: 7px;
6132
- border-inline-end: 1.5px solid currentColor;
6133
- border-bottom: 1.5px solid currentColor;
6198
+ left: var(--hx-space-px, 2px);
6199
+ width: var(--_chevron-size);
6200
+ height: var(--_chevron-size);
6201
+ border-inline-end: var(--hx-border-width-thin, 1.5px) solid currentColor;
6202
+ border-bottom: var(--hx-border-width-thin, 1.5px) solid currentColor;
6134
6203
  transform: rotate(45deg);
6135
6204
  }
6136
6205
 
@@ -6139,17 +6208,16 @@ export const helixGridItemStyles = css`
6139
6208
  }
6140
6209
 
6141
6210
  .field--error .field__trigger {
6142
- border-color: var(--hx-select-error-color, var(--hx-color-error-500, #dc3545));
6211
+ border-color: var(--_error-color);
6143
6212
  }
6144
6213
 
6145
6214
  .field--error .field__trigger:focus,
6146
6215
  .field--error .field__trigger:focus-visible {
6147
- border-color: var(--hx-select-error-color, var(--hx-color-error-500, #dc3545));
6216
+ border-color: var(--_error-color);
6148
6217
  box-shadow: 0 0 0 var(--hx-focus-ring-width, 2px)
6149
6218
  color-mix(
6150
6219
  in srgb,
6151
- var(--hx-select-error-color, var(--hx-color-error-500, #dc3545))
6152
- calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
6220
+ var(--_error-color) calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
6153
6221
  transparent
6154
6222
  );
6155
6223
  }
@@ -6160,10 +6228,9 @@ export const helixGridItemStyles = css`
6160
6228
  left: 0;
6161
6229
  right: 0;
6162
6230
  z-index: var(--hx-z-index-dropdown, 1000);
6163
- background-color: var(--hx-select-listbox-bg, var(--hx-color-neutral-0, #ffffff));
6164
- border: var(--hx-border-width-thin, 1px) solid
6165
- var(--hx-select-border-color, var(--hx-color-neutral-300, #ced4da));
6166
- border-radius: var(--hx-select-border-radius, var(--hx-border-radius-md, 0.375rem));
6231
+ background-color: var(--_listbox-bg);
6232
+ border: var(--hx-border-width-thin, 1px) solid var(--_border-color);
6233
+ border-radius: var(--_border-radius);
6167
6234
  box-shadow: var(
6168
6235
  --hx-select-listbox-shadow,
6169
6236
  0 4px 16px var(--hx-overlay-neutral-12, rgba(13, 17, 23, 0.12))
@@ -6190,7 +6257,7 @@ export const helixGridItemStyles = css`
6190
6257
  gap: var(--hx-space-2, 0.5rem);
6191
6258
  padding: var(--hx-space-2, 0.5rem) var(--hx-space-3, 0.75rem);
6192
6259
  font-size: var(--hx-font-size-md, 1rem);
6193
- color: var(--hx-select-color, var(--hx-color-neutral-800, #212529));
6260
+ color: var(--_color);
6194
6261
  cursor: pointer;
6195
6262
  user-select: none;
6196
6263
  -webkit-user-select: none;
@@ -6198,23 +6265,23 @@ export const helixGridItemStyles = css`
6198
6265
  }
6199
6266
 
6200
6267
  .field__option:hover {
6201
- background-color: var(--hx-select-option-hover-bg, var(--hx-color-primary-50, #eff6ff));
6268
+ background-color: var(--_option-hover-bg);
6202
6269
  }
6203
6270
 
6204
6271
  .field__option--selected {
6205
- background-color: var(--hx-select-option-selected-bg, var(--hx-color-primary-100, #dbeafe));
6272
+ background-color: var(--_option-selected-bg);
6206
6273
  font-weight: var(--hx-font-weight-medium, 500);
6207
6274
  }
6208
6275
 
6209
6276
  .field__option--focused {
6210
- background-color: var(--hx-select-option-hover-bg, var(--hx-color-primary-50, #eff6ff));
6277
+ background-color: var(--_option-hover-bg);
6211
6278
  outline: var(--hx-focus-ring-width, 2px) solid
6212
- var(--hx-select-focus-ring-color, var(--hx-focus-ring-color, var(--hx-color-primary-500)));
6279
+ var(--_focus-ring-color, var(--hx-color-primary-500));
6213
6280
  outline-offset: var(--hx-select-option-focus-ring-offset, -2px);
6214
6281
  }
6215
6282
 
6216
6283
  .field__option--focused.field__option--selected {
6217
- background-color: var(--hx-select-option-selected-bg, var(--hx-color-primary-100, #dbeafe));
6284
+ background-color: var(--_option-selected-bg);
6218
6285
  }
6219
6286
 
6220
6287
  .field__option--disabled {
@@ -6233,7 +6300,7 @@ export const helixGridItemStyles = css`
6233
6300
  .field__no-options {
6234
6301
  padding: var(--hx-space-3, 0.75rem);
6235
6302
  text-align: center;
6236
- color: var(--hx-color-neutral-400, #adb5bd);
6303
+ color: var(--_placeholder-color);
6237
6304
  font-size: var(--hx-font-size-sm, 0.875rem);
6238
6305
  }
6239
6306
 
@@ -7594,9 +7661,12 @@ export const helixGridItemStyles = css`
7594
7661
  display: inline-flex;
7595
7662
  align-items: center;
7596
7663
  justify-content: center;
7664
+ gap: var(--hx-space-2, 0.5rem);
7597
7665
  position: relative;
7598
7666
  flex-shrink: 0;
7599
7667
  --_dot-color: var(--hx-status-indicator-color-default, var(--hx-color-neutral-300, #ced4da));
7668
+ /* Default size (md) — always defined so .indicator never collapses to 0x0 */
7669
+ --_indicator-size: var(--hx-status-indicator-size-md, var(--hx-space-3, 0.75rem));
7600
7670
  }
7601
7671
 
7602
7672
  .indicator {
@@ -7651,18 +7721,44 @@ export const helixGridItemStyles = css`
7651
7721
  }
7652
7722
  }
7653
7723
 
7724
+ /* ─── Visible label (part="label") ─── */
7725
+
7726
+ .indicator__label {
7727
+ font-size: var(
7728
+ --hx-status-indicator-label-font-size,
7729
+ var(--hx-font-size-sm, var(--hx-text-sm, 0.875rem))
7730
+ );
7731
+ color: var(--hx-status-indicator-label-color, var(--hx-color-neutral-700, #374151));
7732
+ line-height: 1;
7733
+ white-space: nowrap;
7734
+ }
7735
+
7736
+ /* ─── aria-live announcement region (visually hidden) ─── */
7737
+
7738
+ .indicator__live-region {
7739
+ position: absolute;
7740
+ width: 1px;
7741
+ height: 1px;
7742
+ padding: 0;
7743
+ margin: -1px;
7744
+ overflow: hidden;
7745
+ clip: rect(0, 0, 0, 0);
7746
+ white-space: nowrap;
7747
+ border: 0;
7748
+ }
7749
+
7654
7750
  /* ─── Size Variants ─── */
7655
7751
 
7656
- :host([size='sm']) {
7752
+ :host([hx-size='sm']) {
7657
7753
  --_indicator-size: var(--hx-status-indicator-size-sm, var(--hx-space-2, 0.5rem));
7658
7754
  }
7659
7755
 
7660
- :host([size='md']) {
7756
+ :host([hx-size='md']) {
7661
7757
  --_indicator-size: var(--hx-status-indicator-size-md, var(--hx-space-3, 0.75rem));
7662
7758
  }
7663
7759
 
7664
- :host([size='lg']) {
7665
- --_indicator-size: var(--hx-status-indicator-size-lg, var(--hx-size-4));
7760
+ :host([hx-size='lg']) {
7761
+ --_indicator-size: var(--hx-status-indicator-size-lg, var(--hx-space-4, 1rem));
7666
7762
  }
7667
7763
 
7668
7764
  /* ─── Status Colors ─── */
@@ -915,9 +915,12 @@
915
915
  display: inline-flex;
916
916
  align-items: center;
917
917
  justify-content: center;
918
+ gap: var(--hx-space-2, 0.5rem);
918
919
  position: relative;
919
920
  flex-shrink: 0;
920
921
  --_dot-color: var(--hx-status-indicator-color-default, var(--hx-color-neutral-300, #ced4da));
922
+ /* Default size (md) — always defined so .indicator never collapses to 0x0 */
923
+ --_indicator-size: var(--hx-status-indicator-size-md, var(--hx-space-3, 0.75rem));
921
924
  }
922
925
 
923
926
  .indicator {
@@ -972,18 +975,44 @@
972
975
  }
973
976
  }
974
977
 
978
+ /* ─── Visible label (part="label") ─── */
979
+
980
+ .indicator__label {
981
+ font-size: var(
982
+ --hx-status-indicator-label-font-size,
983
+ var(--hx-font-size-sm, var(--hx-text-sm, 0.875rem))
984
+ );
985
+ color: var(--hx-status-indicator-label-color, var(--hx-color-neutral-700, #374151));
986
+ line-height: 1;
987
+ white-space: nowrap;
988
+ }
989
+
990
+ /* ─── aria-live announcement region (visually hidden) ─── */
991
+
992
+ .indicator__live-region {
993
+ position: absolute;
994
+ width: 1px;
995
+ height: 1px;
996
+ padding: 0;
997
+ margin: -1px;
998
+ overflow: hidden;
999
+ clip: rect(0, 0, 0, 0);
1000
+ white-space: nowrap;
1001
+ border: 0;
1002
+ }
1003
+
975
1004
  /* ─── Size Variants ─── */
976
1005
 
977
- :host([size='sm']) {
1006
+ :host([hx-size='sm']) {
978
1007
  --_indicator-size: var(--hx-status-indicator-size-sm, var(--hx-space-2, 0.5rem));
979
1008
  }
980
1009
 
981
- :host([size='md']) {
1010
+ :host([hx-size='md']) {
982
1011
  --_indicator-size: var(--hx-status-indicator-size-md, var(--hx-space-3, 0.75rem));
983
1012
  }
984
1013
 
985
- :host([size='lg']) {
986
- --_indicator-size: var(--hx-status-indicator-size-lg, var(--hx-size-4));
1014
+ :host([hx-size='lg']) {
1015
+ --_indicator-size: var(--hx-status-indicator-size-lg, var(--hx-space-4, 1rem));
987
1016
  }
988
1017
 
989
1018
  /* ─── Status Colors ─── */
@@ -1170,8 +1170,45 @@
1170
1170
  }
1171
1171
  }
1172
1172
  /* ── hx-select ── */
1173
- :host {
1173
+ /* ─── 3-tier token cascade: component → semantic → hardcoded fallback ─── */
1174
+ :host {
1174
1175
  display: block;
1176
+
1177
+ /* Background & foreground */
1178
+ --_bg: var(--hx-select-bg, var(--hx-color-neutral-0, #ffffff));
1179
+ --_color: var(--hx-select-color, var(--hx-color-neutral-800, #212529));
1180
+ --_placeholder-color: var(--hx-select-placeholder-color, var(--hx-color-neutral-400, #adb5bd));
1181
+
1182
+ /* Label */
1183
+ --_label-color: var(--hx-select-label-color, var(--hx-color-neutral-700, #343a40));
1184
+
1185
+ /* Border */
1186
+ --_border-color: var(--hx-select-border-color, var(--hx-color-neutral-300, #ced4da));
1187
+ --_border-radius: var(--hx-select-border-radius, var(--hx-border-radius-md, 0.375rem));
1188
+
1189
+ /* Focus ring */
1190
+ --_focus-ring-color: var(
1191
+ --hx-select-focus-ring-color,
1192
+ var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa))
1193
+ );
1194
+
1195
+ /* Error */
1196
+ --_error-color: var(--hx-select-error-color, var(--hx-color-error-500, #dc3545));
1197
+
1198
+ /* Chevron */
1199
+ --_chevron-color: var(--hx-select-chevron-color, var(--hx-color-neutral-500, #6c757d));
1200
+ --_chevron-size: var(--hx-select-chevron-size, 0.5rem);
1201
+
1202
+ /* Listbox */
1203
+ --_listbox-bg: var(--hx-select-listbox-bg, var(--hx-color-neutral-0, #ffffff));
1204
+ --_option-hover-bg: var(--hx-select-option-hover-bg, var(--hx-color-primary-50, #eff6ff));
1205
+ --_option-selected-bg: var(
1206
+ --hx-select-option-selected-bg,
1207
+ var(--hx-color-primary-100, #dbeafe)
1208
+ );
1209
+
1210
+ /* Typography */
1211
+ --_font-family: var(--hx-select-font-family, var(--hx-font-family-sans, sans-serif));
1175
1212
  }
1176
1213
 
1177
1214
  :host([disabled]) {
@@ -1187,7 +1224,7 @@
1187
1224
  display: flex;
1188
1225
  flex-direction: column;
1189
1226
  gap: var(--hx-space-1, 0.25rem);
1190
- font-family: var(--hx-select-font-family, var(--hx-font-family-sans, sans-serif));
1227
+ font-family: var(--_font-family);
1191
1228
  position: relative;
1192
1229
  }
1193
1230
 
@@ -1197,7 +1234,7 @@
1197
1234
  gap: var(--hx-space-1, 0.25rem);
1198
1235
  font-size: var(--hx-font-size-sm, 0.875rem);
1199
1236
  font-weight: var(--hx-font-weight-medium, 500);
1200
- color: var(--hx-select-label-color, var(--hx-color-neutral-700, #343a40));
1237
+ color: var(--_label-color);
1201
1238
  line-height: var(--hx-line-height-normal, 1.5);
1202
1239
  }
1203
1240
 
@@ -1218,11 +1255,10 @@
1218
1255
  gap: var(--hx-space-2, 0.5rem);
1219
1256
  width: 100%;
1220
1257
  min-height: var(--hx-input-height-md, var(--hx-size-10, 2.5rem));
1221
- border: var(--hx-border-width-thin, 1px) solid
1222
- var(--hx-select-border-color, var(--hx-color-neutral-300, #ced4da));
1223
- border-radius: var(--hx-select-border-radius, var(--hx-border-radius-md, 0.375rem));
1224
- background-color: var(--hx-select-bg, var(--hx-color-neutral-0, #ffffff));
1225
- color: var(--hx-select-color, var(--hx-color-neutral-800, #212529));
1258
+ border: var(--hx-border-width-thin, 1px) solid var(--_border-color);
1259
+ border-radius: var(--_border-radius);
1260
+ background-color: var(--_bg);
1261
+ color: var(--_color);
1226
1262
  font-family: inherit;
1227
1263
  font-size: var(--hx-font-size-md, 1rem);
1228
1264
  line-height: var(--hx-line-height-normal, 1.5);
@@ -1237,18 +1273,11 @@
1237
1273
 
1238
1274
  .field__trigger:focus,
1239
1275
  .field__trigger:focus-visible {
1240
- border-color: var(
1241
- --hx-select-focus-ring-color,
1242
- var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa))
1243
- );
1276
+ border-color: var(--_focus-ring-color);
1244
1277
  box-shadow: 0 0 0 var(--hx-focus-ring-width, 2px)
1245
1278
  color-mix(
1246
1279
  in srgb,
1247
- var(
1248
- --hx-select-focus-ring-color,
1249
- var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa))
1250
- )
1251
- calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
1280
+ var(--_focus-ring-color) calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
1252
1281
  transparent
1253
1282
  );
1254
1283
  }
@@ -1278,15 +1307,15 @@
1278
1307
  }
1279
1308
 
1280
1309
  .field__trigger--placeholder .field__trigger-value {
1281
- color: var(--hx-select-placeholder-color, var(--hx-color-neutral-400, #adb5bd));
1310
+ color: var(--_placeholder-color);
1282
1311
  }
1283
1312
 
1284
1313
  .field__chevron {
1285
1314
  flex-shrink: 0;
1286
- width: 12px;
1287
- height: 8px;
1315
+ width: calc(var(--_chevron-size) * 1.5);
1316
+ height: var(--_chevron-size);
1288
1317
  position: relative;
1289
- color: var(--hx-select-chevron-color, var(--hx-color-neutral-500, #6c757d));
1318
+ color: var(--_chevron-color);
1290
1319
  pointer-events: none;
1291
1320
  transition: transform var(--hx-transition-fast, 150ms ease);
1292
1321
  }
@@ -1295,11 +1324,11 @@
1295
1324
  content: '';
1296
1325
  position: absolute;
1297
1326
  top: 0;
1298
- left: 2px;
1299
- width: 7px;
1300
- height: 7px;
1301
- border-inline-end: 1.5px solid currentColor;
1302
- border-bottom: 1.5px solid currentColor;
1327
+ left: var(--hx-space-px, 2px);
1328
+ width: var(--_chevron-size);
1329
+ height: var(--_chevron-size);
1330
+ border-inline-end: var(--hx-border-width-thin, 1.5px) solid currentColor;
1331
+ border-bottom: var(--hx-border-width-thin, 1.5px) solid currentColor;
1303
1332
  transform: rotate(45deg);
1304
1333
  }
1305
1334
 
@@ -1308,17 +1337,16 @@
1308
1337
  }
1309
1338
 
1310
1339
  .field--error .field__trigger {
1311
- border-color: var(--hx-select-error-color, var(--hx-color-error-500, #dc3545));
1340
+ border-color: var(--_error-color);
1312
1341
  }
1313
1342
 
1314
1343
  .field--error .field__trigger:focus,
1315
1344
  .field--error .field__trigger:focus-visible {
1316
- border-color: var(--hx-select-error-color, var(--hx-color-error-500, #dc3545));
1345
+ border-color: var(--_error-color);
1317
1346
  box-shadow: 0 0 0 var(--hx-focus-ring-width, 2px)
1318
1347
  color-mix(
1319
1348
  in srgb,
1320
- var(--hx-select-error-color, var(--hx-color-error-500, #dc3545))
1321
- calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
1349
+ var(--_error-color) calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
1322
1350
  transparent
1323
1351
  );
1324
1352
  }
@@ -1329,10 +1357,9 @@
1329
1357
  left: 0;
1330
1358
  right: 0;
1331
1359
  z-index: var(--hx-z-index-dropdown, 1000);
1332
- background-color: var(--hx-select-listbox-bg, var(--hx-color-neutral-0, #ffffff));
1333
- border: var(--hx-border-width-thin, 1px) solid
1334
- var(--hx-select-border-color, var(--hx-color-neutral-300, #ced4da));
1335
- border-radius: var(--hx-select-border-radius, var(--hx-border-radius-md, 0.375rem));
1360
+ background-color: var(--_listbox-bg);
1361
+ border: var(--hx-border-width-thin, 1px) solid var(--_border-color);
1362
+ border-radius: var(--_border-radius);
1336
1363
  box-shadow: var(
1337
1364
  --hx-select-listbox-shadow,
1338
1365
  0 4px 16px var(--hx-overlay-neutral-12, rgba(13, 17, 23, 0.12))
@@ -1359,7 +1386,7 @@
1359
1386
  gap: var(--hx-space-2, 0.5rem);
1360
1387
  padding: var(--hx-space-2, 0.5rem) var(--hx-space-3, 0.75rem);
1361
1388
  font-size: var(--hx-font-size-md, 1rem);
1362
- color: var(--hx-select-color, var(--hx-color-neutral-800, #212529));
1389
+ color: var(--_color);
1363
1390
  cursor: pointer;
1364
1391
  user-select: none;
1365
1392
  -webkit-user-select: none;
@@ -1367,23 +1394,23 @@
1367
1394
  }
1368
1395
 
1369
1396
  .field__option:hover {
1370
- background-color: var(--hx-select-option-hover-bg, var(--hx-color-primary-50, #eff6ff));
1397
+ background-color: var(--_option-hover-bg);
1371
1398
  }
1372
1399
 
1373
1400
  .field__option--selected {
1374
- background-color: var(--hx-select-option-selected-bg, var(--hx-color-primary-100, #dbeafe));
1401
+ background-color: var(--_option-selected-bg);
1375
1402
  font-weight: var(--hx-font-weight-medium, 500);
1376
1403
  }
1377
1404
 
1378
1405
  .field__option--focused {
1379
- background-color: var(--hx-select-option-hover-bg, var(--hx-color-primary-50, #eff6ff));
1406
+ background-color: var(--_option-hover-bg);
1380
1407
  outline: var(--hx-focus-ring-width, 2px) solid
1381
- var(--hx-select-focus-ring-color, var(--hx-focus-ring-color, var(--hx-color-primary-500)));
1408
+ var(--_focus-ring-color, var(--hx-color-primary-500));
1382
1409
  outline-offset: var(--hx-select-option-focus-ring-offset, -2px);
1383
1410
  }
1384
1411
 
1385
1412
  .field__option--focused.field__option--selected {
1386
- background-color: var(--hx-select-option-selected-bg, var(--hx-color-primary-100, #dbeafe));
1413
+ background-color: var(--_option-selected-bg);
1387
1414
  }
1388
1415
 
1389
1416
  .field__option--disabled {
@@ -1402,7 +1429,7 @@
1402
1429
  .field__no-options {
1403
1430
  padding: var(--hx-space-3, 0.75rem);
1404
1431
  text-align: center;
1405
- color: var(--hx-color-neutral-400, #adb5bd);
1432
+ color: var(--_placeholder-color);
1406
1433
  font-size: var(--hx-font-size-sm, 0.875rem);
1407
1434
  }
1408
1435