@helixui/library 1.1.2-next.4 → 1.1.2-next.6
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 +691 -755
- package/dist/components/hx-patient-banner/hx-patient-banner.d.ts +8 -0
- package/dist/components/hx-patient-banner/hx-patient-banner.d.ts.map +1 -1
- package/dist/components/hx-patient-banner/hx-patient-banner.styles.d.ts.map +1 -1
- package/dist/components/hx-patient-banner/index.js +1 -1
- package/dist/components/hx-phi-field/hx-phi-field.d.ts +27 -2
- package/dist/components/hx-phi-field/hx-phi-field.d.ts.map +1 -1
- package/dist/components/hx-phi-field/hx-phi-field.styles.d.ts.map +1 -1
- package/dist/components/hx-phi-field/index.js +1 -1
- package/dist/components/hx-select/hx-select.d.ts +1 -0
- package/dist/components/hx-select/hx-select.d.ts.map +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-status-indicator/hx-status-indicator.d.ts +17 -1
- package/dist/components/hx-status-indicator/hx-status-indicator.d.ts.map +1 -1
- package/dist/components/hx-status-indicator/hx-status-indicator.styles.d.ts.map +1 -1
- package/dist/components/hx-status-indicator/index.js +1 -1
- package/dist/css/helix-all.css +144 -48
- package/dist/css/helix-feedback.css +33 -4
- package/dist/css/helix-forms.css +68 -41
- package/dist/css/hx-patient-banner.css +31 -3
- package/dist/css/hx-phi-field.css +12 -0
- package/dist/css/hx-select.css +68 -41
- package/dist/css/hx-status-indicator.css +33 -4
- package/dist/css/index.css +1 -1
- package/dist/css/manifest.json +11 -5
- package/dist/index.js +4 -4
- package/dist/shared/{hx-patient-banner-BoJHddAL.js → hx-patient-banner-wk4qWmsH.js} +88 -47
- package/dist/shared/hx-patient-banner-wk4qWmsH.js.map +1 -0
- package/dist/shared/{hx-phi-field-EDWna59z.js → hx-phi-field-DX9z3nu0.js} +67 -33
- package/dist/shared/hx-phi-field-DX9z3nu0.js.map +1 -0
- package/dist/shared/{hx-select-4-nHL0vd.js → hx-select-BWzxWZs_.js} +82 -55
- package/dist/shared/hx-select-BWzxWZs_.js.map +1 -0
- package/dist/shared/{hx-status-indicator-4ClvA5mU.js → hx-status-indicator-Dl3Y34mc.js} +76 -35
- package/dist/shared/hx-status-indicator-Dl3Y34mc.js.map +1 -0
- package/package.json +2 -2
- package/dist/shared/hx-patient-banner-BoJHddAL.js.map +0 -1
- package/dist/shared/hx-phi-field-EDWna59z.js.map +0 -1
- package/dist/shared/hx-select-4-nHL0vd.js.map +0 -1
- package/dist/shared/hx-status-indicator-4ClvA5mU.js.map +0 -1
|
@@ -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-
|
|
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 ─── */
|
package/dist/css/helix-forms.css
CHANGED
|
@@ -1170,8 +1170,45 @@
|
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
1172
|
/* ── hx-select ── */
|
|
1173
|
-
:
|
|
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(--
|
|
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(--
|
|
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
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
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(--
|
|
1310
|
+
color: var(--_placeholder-color);
|
|
1282
1311
|
}
|
|
1283
1312
|
|
|
1284
1313
|
.field__chevron {
|
|
1285
1314
|
flex-shrink: 0;
|
|
1286
|
-
width:
|
|
1287
|
-
height:
|
|
1315
|
+
width: calc(var(--_chevron-size) * 1.5);
|
|
1316
|
+
height: var(--_chevron-size);
|
|
1288
1317
|
position: relative;
|
|
1289
|
-
color: var(--
|
|
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:
|
|
1300
|
-
height:
|
|
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(--
|
|
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(--
|
|
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(--
|
|
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(--
|
|
1333
|
-
border: var(--hx-border-width-thin, 1px) solid
|
|
1334
|
-
|
|
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(--
|
|
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(--
|
|
1397
|
+
background-color: var(--_option-hover-bg);
|
|
1371
1398
|
}
|
|
1372
1399
|
|
|
1373
1400
|
.field__option--selected {
|
|
1374
|
-
background-color: var(--
|
|
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(--
|
|
1406
|
+
background-color: var(--_option-hover-bg);
|
|
1380
1407
|
outline: var(--hx-focus-ring-width, 2px) solid
|
|
1381
|
-
var(--
|
|
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(--
|
|
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(--
|
|
1432
|
+
color: var(--_placeholder-color);
|
|
1406
1433
|
font-size: var(--hx-font-size-sm, 0.875rem);
|
|
1407
1434
|
}
|
|
1408
1435
|
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
--_value-color: var(--hx-patient-banner-value-color, var(--hx-color-neutral-900, #111827));
|
|
18
18
|
--_value-font-size: var(--hx-patient-banner-value-font-size, var(--hx-font-size-sm, 0.875rem));
|
|
19
19
|
--_photo-size: var(--hx-patient-banner-photo-size, var(--hx-space-10, 2.5rem));
|
|
20
|
+
--_photo-bg: var(--hx-patient-banner-photo-bg, var(--hx-color-neutral-200, #e5e7eb));
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
* {
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
border-bottom: var(--hx-border-width-thin, 1px) solid var(--_border-color);
|
|
35
36
|
font-family: var(--_font-family);
|
|
36
37
|
width: 100%;
|
|
38
|
+
position: relative;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
/* ─── Photo Area ─── */
|
|
@@ -42,12 +44,15 @@
|
|
|
42
44
|
flex-shrink: 0;
|
|
43
45
|
width: var(--_photo-size);
|
|
44
46
|
height: var(--_photo-size);
|
|
47
|
+
/* Minimum 44x44px touch target for interactive photo content. */
|
|
48
|
+
min-width: 44px;
|
|
49
|
+
min-height: 44px;
|
|
45
50
|
border-radius: var(--hx-border-radius-full, 9999px);
|
|
46
51
|
overflow: hidden;
|
|
47
52
|
display: flex;
|
|
48
53
|
align-items: center;
|
|
49
54
|
justify-content: center;
|
|
50
|
-
background-color: var(--
|
|
55
|
+
background-color: var(--_photo-bg);
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
/* ─── Fields Grid ─── */
|
|
@@ -93,9 +98,8 @@
|
|
|
93
98
|
:host([aria-invalid='true']) .banner {
|
|
94
99
|
border-bottom-color: var(--hx-color-error-400, #f87171);
|
|
95
100
|
background-color: var(--hx-color-error-50, #fef2f2);
|
|
96
|
-
/* Darken label color to maintain 4.5:1 contrast on error-50 background */
|
|
101
|
+
/* Darken label color to maintain 4.5:1 contrast on error-50 background. */
|
|
97
102
|
--_label-color: var(--hx-patient-banner-label-color, var(--hx-color-neutral-700, #374151));
|
|
98
|
-
position: relative;
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
:host([aria-invalid='true']) .banner::before {
|
|
@@ -109,3 +113,27 @@
|
|
|
109
113
|
background-color: var(--hx-color-error-500, #ef4444);
|
|
110
114
|
border-radius: 0;
|
|
111
115
|
}
|
|
116
|
+
|
|
117
|
+
/* ─── Visually-hidden violation live region ─── */
|
|
118
|
+
/* Announces identifier rule violations to screen readers without visible text. */
|
|
119
|
+
|
|
120
|
+
.violation-message {
|
|
121
|
+
position: absolute;
|
|
122
|
+
width: 1px;
|
|
123
|
+
height: 1px;
|
|
124
|
+
padding: 0;
|
|
125
|
+
margin: -1px;
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
clip: rect(0, 0, 0, 0);
|
|
128
|
+
white-space: nowrap;
|
|
129
|
+
border-width: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* ─── Motion reduction ─── */
|
|
133
|
+
|
|
134
|
+
@media (prefers-reduced-motion: reduce) {
|
|
135
|
+
* {
|
|
136
|
+
transition: none !important;
|
|
137
|
+
animation: none !important;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -76,6 +76,18 @@
|
|
|
76
76
|
pointer-events: none;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
/* ─── Disabled State ─── */
|
|
80
|
+
|
|
81
|
+
:host([disabled]) {
|
|
82
|
+
opacity: var(--hx-phi-field-disabled-opacity, var(--hx-opacity-50, 0.5));
|
|
83
|
+
pointer-events: none;
|
|
84
|
+
cursor: not-allowed;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.phi-field--disabled .phi-field__toggle {
|
|
88
|
+
cursor: not-allowed;
|
|
89
|
+
}
|
|
90
|
+
|
|
79
91
|
/* ─── Reduced Motion ─── */
|
|
80
92
|
|
|
81
93
|
@media (prefers-reduced-motion: reduce) {
|
package/dist/css/hx-select.css
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
/* hx-select — extracted from Shadow DOM styles */
|
|
2
|
-
:
|
|
2
|
+
/* ─── 3-tier token cascade: component → semantic → hardcoded fallback ─── */
|
|
3
|
+
:host {
|
|
3
4
|
display: block;
|
|
5
|
+
|
|
6
|
+
/* Background & foreground */
|
|
7
|
+
--_bg: var(--hx-select-bg, var(--hx-color-neutral-0, #ffffff));
|
|
8
|
+
--_color: var(--hx-select-color, var(--hx-color-neutral-800, #212529));
|
|
9
|
+
--_placeholder-color: var(--hx-select-placeholder-color, var(--hx-color-neutral-400, #adb5bd));
|
|
10
|
+
|
|
11
|
+
/* Label */
|
|
12
|
+
--_label-color: var(--hx-select-label-color, var(--hx-color-neutral-700, #343a40));
|
|
13
|
+
|
|
14
|
+
/* Border */
|
|
15
|
+
--_border-color: var(--hx-select-border-color, var(--hx-color-neutral-300, #ced4da));
|
|
16
|
+
--_border-radius: var(--hx-select-border-radius, var(--hx-border-radius-md, 0.375rem));
|
|
17
|
+
|
|
18
|
+
/* Focus ring */
|
|
19
|
+
--_focus-ring-color: var(
|
|
20
|
+
--hx-select-focus-ring-color,
|
|
21
|
+
var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa))
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
/* Error */
|
|
25
|
+
--_error-color: var(--hx-select-error-color, var(--hx-color-error-500, #dc3545));
|
|
26
|
+
|
|
27
|
+
/* Chevron */
|
|
28
|
+
--_chevron-color: var(--hx-select-chevron-color, var(--hx-color-neutral-500, #6c757d));
|
|
29
|
+
--_chevron-size: var(--hx-select-chevron-size, 0.5rem);
|
|
30
|
+
|
|
31
|
+
/* Listbox */
|
|
32
|
+
--_listbox-bg: var(--hx-select-listbox-bg, var(--hx-color-neutral-0, #ffffff));
|
|
33
|
+
--_option-hover-bg: var(--hx-select-option-hover-bg, var(--hx-color-primary-50, #eff6ff));
|
|
34
|
+
--_option-selected-bg: var(
|
|
35
|
+
--hx-select-option-selected-bg,
|
|
36
|
+
var(--hx-color-primary-100, #dbeafe)
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
/* Typography */
|
|
40
|
+
--_font-family: var(--hx-select-font-family, var(--hx-font-family-sans, sans-serif));
|
|
4
41
|
}
|
|
5
42
|
|
|
6
43
|
:host([disabled]) {
|
|
@@ -16,7 +53,7 @@
|
|
|
16
53
|
display: flex;
|
|
17
54
|
flex-direction: column;
|
|
18
55
|
gap: var(--hx-space-1, 0.25rem);
|
|
19
|
-
font-family: var(--
|
|
56
|
+
font-family: var(--_font-family);
|
|
20
57
|
position: relative;
|
|
21
58
|
}
|
|
22
59
|
|
|
@@ -26,7 +63,7 @@
|
|
|
26
63
|
gap: var(--hx-space-1, 0.25rem);
|
|
27
64
|
font-size: var(--hx-font-size-sm, 0.875rem);
|
|
28
65
|
font-weight: var(--hx-font-weight-medium, 500);
|
|
29
|
-
color: var(--
|
|
66
|
+
color: var(--_label-color);
|
|
30
67
|
line-height: var(--hx-line-height-normal, 1.5);
|
|
31
68
|
}
|
|
32
69
|
|
|
@@ -47,11 +84,10 @@
|
|
|
47
84
|
gap: var(--hx-space-2, 0.5rem);
|
|
48
85
|
width: 100%;
|
|
49
86
|
min-height: var(--hx-input-height-md, var(--hx-size-10, 2.5rem));
|
|
50
|
-
border: var(--hx-border-width-thin, 1px) solid
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
color: var(--hx-select-color, var(--hx-color-neutral-800, #212529));
|
|
87
|
+
border: var(--hx-border-width-thin, 1px) solid var(--_border-color);
|
|
88
|
+
border-radius: var(--_border-radius);
|
|
89
|
+
background-color: var(--_bg);
|
|
90
|
+
color: var(--_color);
|
|
55
91
|
font-family: inherit;
|
|
56
92
|
font-size: var(--hx-font-size-md, 1rem);
|
|
57
93
|
line-height: var(--hx-line-height-normal, 1.5);
|
|
@@ -66,18 +102,11 @@
|
|
|
66
102
|
|
|
67
103
|
.field__trigger:focus,
|
|
68
104
|
.field__trigger:focus-visible {
|
|
69
|
-
border-color: var(
|
|
70
|
-
--hx-select-focus-ring-color,
|
|
71
|
-
var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa))
|
|
72
|
-
);
|
|
105
|
+
border-color: var(--_focus-ring-color);
|
|
73
106
|
box-shadow: 0 0 0 var(--hx-focus-ring-width, 2px)
|
|
74
107
|
color-mix(
|
|
75
108
|
in srgb,
|
|
76
|
-
var(
|
|
77
|
-
--hx-select-focus-ring-color,
|
|
78
|
-
var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa))
|
|
79
|
-
)
|
|
80
|
-
calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
|
|
109
|
+
var(--_focus-ring-color) calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
|
|
81
110
|
transparent
|
|
82
111
|
);
|
|
83
112
|
}
|
|
@@ -107,15 +136,15 @@
|
|
|
107
136
|
}
|
|
108
137
|
|
|
109
138
|
.field__trigger--placeholder .field__trigger-value {
|
|
110
|
-
color: var(--
|
|
139
|
+
color: var(--_placeholder-color);
|
|
111
140
|
}
|
|
112
141
|
|
|
113
142
|
.field__chevron {
|
|
114
143
|
flex-shrink: 0;
|
|
115
|
-
width:
|
|
116
|
-
height:
|
|
144
|
+
width: calc(var(--_chevron-size) * 1.5);
|
|
145
|
+
height: var(--_chevron-size);
|
|
117
146
|
position: relative;
|
|
118
|
-
color: var(--
|
|
147
|
+
color: var(--_chevron-color);
|
|
119
148
|
pointer-events: none;
|
|
120
149
|
transition: transform var(--hx-transition-fast, 150ms ease);
|
|
121
150
|
}
|
|
@@ -124,11 +153,11 @@
|
|
|
124
153
|
content: '';
|
|
125
154
|
position: absolute;
|
|
126
155
|
top: 0;
|
|
127
|
-
left: 2px;
|
|
128
|
-
width:
|
|
129
|
-
height:
|
|
130
|
-
border-inline-end: 1.5px solid currentColor;
|
|
131
|
-
border-bottom: 1.5px solid currentColor;
|
|
156
|
+
left: var(--hx-space-px, 2px);
|
|
157
|
+
width: var(--_chevron-size);
|
|
158
|
+
height: var(--_chevron-size);
|
|
159
|
+
border-inline-end: var(--hx-border-width-thin, 1.5px) solid currentColor;
|
|
160
|
+
border-bottom: var(--hx-border-width-thin, 1.5px) solid currentColor;
|
|
132
161
|
transform: rotate(45deg);
|
|
133
162
|
}
|
|
134
163
|
|
|
@@ -137,17 +166,16 @@
|
|
|
137
166
|
}
|
|
138
167
|
|
|
139
168
|
.field--error .field__trigger {
|
|
140
|
-
border-color: var(--
|
|
169
|
+
border-color: var(--_error-color);
|
|
141
170
|
}
|
|
142
171
|
|
|
143
172
|
.field--error .field__trigger:focus,
|
|
144
173
|
.field--error .field__trigger:focus-visible {
|
|
145
|
-
border-color: var(--
|
|
174
|
+
border-color: var(--_error-color);
|
|
146
175
|
box-shadow: 0 0 0 var(--hx-focus-ring-width, 2px)
|
|
147
176
|
color-mix(
|
|
148
177
|
in srgb,
|
|
149
|
-
var(--
|
|
150
|
-
calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
|
|
178
|
+
var(--_error-color) calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
|
|
151
179
|
transparent
|
|
152
180
|
);
|
|
153
181
|
}
|
|
@@ -158,10 +186,9 @@
|
|
|
158
186
|
left: 0;
|
|
159
187
|
right: 0;
|
|
160
188
|
z-index: var(--hx-z-index-dropdown, 1000);
|
|
161
|
-
background-color: var(--
|
|
162
|
-
border: var(--hx-border-width-thin, 1px) solid
|
|
163
|
-
|
|
164
|
-
border-radius: var(--hx-select-border-radius, var(--hx-border-radius-md, 0.375rem));
|
|
189
|
+
background-color: var(--_listbox-bg);
|
|
190
|
+
border: var(--hx-border-width-thin, 1px) solid var(--_border-color);
|
|
191
|
+
border-radius: var(--_border-radius);
|
|
165
192
|
box-shadow: var(
|
|
166
193
|
--hx-select-listbox-shadow,
|
|
167
194
|
0 4px 16px var(--hx-overlay-neutral-12, rgba(13, 17, 23, 0.12))
|
|
@@ -188,7 +215,7 @@
|
|
|
188
215
|
gap: var(--hx-space-2, 0.5rem);
|
|
189
216
|
padding: var(--hx-space-2, 0.5rem) var(--hx-space-3, 0.75rem);
|
|
190
217
|
font-size: var(--hx-font-size-md, 1rem);
|
|
191
|
-
color: var(--
|
|
218
|
+
color: var(--_color);
|
|
192
219
|
cursor: pointer;
|
|
193
220
|
user-select: none;
|
|
194
221
|
-webkit-user-select: none;
|
|
@@ -196,23 +223,23 @@
|
|
|
196
223
|
}
|
|
197
224
|
|
|
198
225
|
.field__option:hover {
|
|
199
|
-
background-color: var(--
|
|
226
|
+
background-color: var(--_option-hover-bg);
|
|
200
227
|
}
|
|
201
228
|
|
|
202
229
|
.field__option--selected {
|
|
203
|
-
background-color: var(--
|
|
230
|
+
background-color: var(--_option-selected-bg);
|
|
204
231
|
font-weight: var(--hx-font-weight-medium, 500);
|
|
205
232
|
}
|
|
206
233
|
|
|
207
234
|
.field__option--focused {
|
|
208
|
-
background-color: var(--
|
|
235
|
+
background-color: var(--_option-hover-bg);
|
|
209
236
|
outline: var(--hx-focus-ring-width, 2px) solid
|
|
210
|
-
var(--
|
|
237
|
+
var(--_focus-ring-color, var(--hx-color-primary-500));
|
|
211
238
|
outline-offset: var(--hx-select-option-focus-ring-offset, -2px);
|
|
212
239
|
}
|
|
213
240
|
|
|
214
241
|
.field__option--focused.field__option--selected {
|
|
215
|
-
background-color: var(--
|
|
242
|
+
background-color: var(--_option-selected-bg);
|
|
216
243
|
}
|
|
217
244
|
|
|
218
245
|
.field__option--disabled {
|
|
@@ -231,7 +258,7 @@
|
|
|
231
258
|
.field__no-options {
|
|
232
259
|
padding: var(--hx-space-3, 0.75rem);
|
|
233
260
|
text-align: center;
|
|
234
|
-
color: var(--
|
|
261
|
+
color: var(--_placeholder-color);
|
|
235
262
|
font-size: var(--hx-font-size-sm, 0.875rem);
|
|
236
263
|
}
|
|
237
264
|
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: center;
|
|
6
|
+
gap: var(--hx-space-2, 0.5rem);
|
|
6
7
|
position: relative;
|
|
7
8
|
flex-shrink: 0;
|
|
8
9
|
--_dot-color: var(--hx-status-indicator-color-default, var(--hx-color-neutral-300, #ced4da));
|
|
10
|
+
/* Default size (md) — always defined so .indicator never collapses to 0x0 */
|
|
11
|
+
--_indicator-size: var(--hx-status-indicator-size-md, var(--hx-space-3, 0.75rem));
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
.indicator {
|
|
@@ -60,18 +63,44 @@
|
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
65
|
|
|
66
|
+
/* ─── Visible label (part="label") ─── */
|
|
67
|
+
|
|
68
|
+
.indicator__label {
|
|
69
|
+
font-size: var(
|
|
70
|
+
--hx-status-indicator-label-font-size,
|
|
71
|
+
var(--hx-font-size-sm, var(--hx-text-sm, 0.875rem))
|
|
72
|
+
);
|
|
73
|
+
color: var(--hx-status-indicator-label-color, var(--hx-color-neutral-700, #374151));
|
|
74
|
+
line-height: 1;
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* ─── aria-live announcement region (visually hidden) ─── */
|
|
79
|
+
|
|
80
|
+
.indicator__live-region {
|
|
81
|
+
position: absolute;
|
|
82
|
+
width: 1px;
|
|
83
|
+
height: 1px;
|
|
84
|
+
padding: 0;
|
|
85
|
+
margin: -1px;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
clip: rect(0, 0, 0, 0);
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
border: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
63
92
|
/* ─── Size Variants ─── */
|
|
64
93
|
|
|
65
|
-
:host([size='sm']) {
|
|
94
|
+
:host([hx-size='sm']) {
|
|
66
95
|
--_indicator-size: var(--hx-status-indicator-size-sm, var(--hx-space-2, 0.5rem));
|
|
67
96
|
}
|
|
68
97
|
|
|
69
|
-
:host([size='md']) {
|
|
98
|
+
:host([hx-size='md']) {
|
|
70
99
|
--_indicator-size: var(--hx-status-indicator-size-md, var(--hx-space-3, 0.75rem));
|
|
71
100
|
}
|
|
72
101
|
|
|
73
|
-
:host([size='lg']) {
|
|
74
|
-
--_indicator-size: var(--hx-status-indicator-size-lg, var(--hx-
|
|
102
|
+
:host([hx-size='lg']) {
|
|
103
|
+
--_indicator-size: var(--hx-status-indicator-size-lg, var(--hx-space-4, 1rem));
|
|
75
104
|
}
|
|
76
105
|
|
|
77
106
|
/* ─── Status Colors ─── */
|
package/dist/css/index.css
CHANGED