@scalewing/react 1.11.0 → 1.13.0
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/CHANGELOG.md +100 -0
- package/README.md +62 -7
- package/dist/anchored-position.d.ts +14 -6
- package/dist/anchored-position.js +10 -9
- package/dist/components/ActionMenu.d.ts +9 -1
- package/dist/components/ActionMenu.js +2 -2
- package/dist/components/Checkbox.js +2 -1
- package/dist/components/DateField.js +4 -2
- package/dist/components/DenominationGrid.d.ts +1 -1
- package/dist/components/DenominationGrid.js +4 -2
- package/dist/components/Field.js +9 -6
- package/dist/components/FieldErrorRegion.d.ts +14 -0
- package/dist/components/FieldErrorRegion.js +13 -0
- package/dist/components/FieldLabelText.d.ts +13 -0
- package/dist/components/FieldLabelText.js +12 -0
- package/dist/components/RadioGroup.d.ts +7 -0
- package/dist/components/RadioGroup.js +2 -1
- package/dist/components/SegmentedControl.d.ts +8 -0
- package/dist/components/SegmentedControl.js +16 -11
- package/dist/components/Select.d.ts +10 -1
- package/dist/components/Select.js +17 -86
- package/dist/components/Toast.d.ts +15 -1
- package/dist/components/Toast.js +15 -5
- package/dist/components/action-menu/ActionMenuList.d.ts +6 -4
- package/dist/components/action-menu/ActionMenuList.js +5 -4
- package/dist/components/denomination-grid/DenominationStrip.d.ts +2 -2
- package/dist/components/denomination-grid/DenominationStrip.js +13 -3
- package/dist/components/denomination-grid/DenominationTiles.js +27 -8
- package/dist/components/denomination-grid/types.d.ts +5 -0
- package/dist/components/select/SelectListbox.d.ts +20 -0
- package/dist/components/select/SelectListbox.js +16 -0
- package/dist/components/select/SelectValue.d.ts +15 -0
- package/dist/components/select/SelectValue.js +16 -0
- package/dist/components/select/use-select-list.d.ts +26 -0
- package/dist/components/select/use-select-list.js +85 -0
- package/dist/components/use-anchored-popover.d.ts +5 -2
- package/dist/components/use-anchored-popover.js +6 -5
- package/dist/css/chevron.d.ts +5 -0
- package/dist/css/chevron.js +9 -0
- package/dist/css/css-accordion.js +2 -5
- package/dist/css/css-button.d.ts +2 -0
- package/dist/css/css-button.js +28 -4
- package/dist/css/css-checkbox.js +1 -0
- package/dist/css/css-components.js +6 -0
- package/dist/css/css-data.js +17 -163
- package/dist/css/css-date-field.js +14 -6
- package/dist/css/css-denomination-grid.js +11 -1
- package/dist/css/css-document.d.ts +2 -0
- package/dist/css/css-document.js +35 -0
- package/dist/css/css-field.js +15 -2
- package/dist/css/css-filter-chips.js +8 -2
- package/dist/css/css-radio-group.js +12 -2
- package/dist/css/css-segmented.d.ts +2 -0
- package/dist/css/css-segmented.js +127 -0
- package/dist/css/css-select.js +57 -19
- package/dist/css/css-table.d.ts +2 -0
- package/dist/css/css-table.js +99 -0
- package/dist/css/css-toast.d.ts +2 -0
- package/dist/css/css-toast.js +42 -1
- package/dist/css/css-utilities.d.ts +2 -0
- package/dist/css/css-utilities.js +3 -1
- package/dist/css/stylesheet.js +4 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/styles.css +216 -48
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -660,6 +660,31 @@ body {
|
|
|
660
660
|
outline-offset: var(--sw-focus-ring-offset);
|
|
661
661
|
}
|
|
662
662
|
|
|
663
|
+
/* The browser's placeholder gray is one fixed #757575 (2.3:1 on a dark
|
|
664
|
+
field); muted is tuned per palette and scheme. */
|
|
665
|
+
[data-theme] :is(input[type='text'], input[type='email'], input[type='number'], input[type='search'], input[type='url'], input[type='password'], input:not([type]), textarea)::placeholder {
|
|
666
|
+
color: var(--sw-color-muted);
|
|
667
|
+
opacity: 1;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
[data-theme] :is(input[type='text'], input[type='email'], input[type='number'], input[type='search'], input[type='url'], input[type='password'], input:not([type]), textarea):disabled,
|
|
671
|
+
[data-theme] select:disabled {
|
|
672
|
+
background-color: var(--sw-color-subtle);
|
|
673
|
+
border-style: dashed;
|
|
674
|
+
cursor: not-allowed;
|
|
675
|
+
opacity: 1;
|
|
676
|
+
-webkit-text-fill-color: currentColor;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
@media (forced-colors: active) {
|
|
680
|
+
[data-theme] :is(input[type='text'], input[type='email'], input[type='number'], input[type='search'], input[type='url'], input[type='password'], input:not([type]), textarea):disabled,
|
|
681
|
+
[data-theme] select:disabled {
|
|
682
|
+
border-color: GrayText;
|
|
683
|
+
color: GrayText;
|
|
684
|
+
-webkit-text-fill-color: GrayText;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
|
|
663
688
|
.sw-padding-0 { padding: var(--sw-space-0); }
|
|
664
689
|
.sw-padding-1 { padding: var(--sw-space-1); }
|
|
665
690
|
.sw-padding-2 { padding: var(--sw-space-2); }
|
|
@@ -849,15 +874,17 @@ body {
|
|
|
849
874
|
opacity: var(--sw-disabled-opacity);
|
|
850
875
|
}
|
|
851
876
|
|
|
852
|
-
.sw-button[aria-pressed='false'] {
|
|
853
|
-
opacity: var(--sw-quiet-opacity);
|
|
854
|
-
}
|
|
855
|
-
|
|
856
877
|
.sw-button-primary { background: var(--sw-color-accent); border-color: transparent; color: var(--sw-color-onAccent); }
|
|
857
878
|
.sw-button-secondary { background: var(--sw-color-secondary); border-color: var(--sw-button-secondary-border); color: var(--sw-color-onSecondary); }
|
|
858
879
|
.sw-button-tertiary { background: var(--sw-color-tertiary); border-color: transparent; color: var(--sw-color-onTertiary); }
|
|
859
880
|
.sw-button-ghost { background: transparent; border-color: transparent; color: var(--sw-color-accent); }
|
|
860
881
|
.sw-button-danger { background: var(--sw-color-danger); border-color: transparent; color: var(--sw-color-onDanger); }
|
|
882
|
+
.sw-button[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--sw-color-background), 0 0 0 4px var(--sw-color-accent); }
|
|
883
|
+
.sw-button[aria-pressed='true']:focus-visible { outline-offset: calc(var(--sw-focus-ring-offset) + 4px); }
|
|
884
|
+
@media (forced-colors: active) {
|
|
885
|
+
.sw-button[aria-pressed='true'] { border-color: Highlight; position: relative; }
|
|
886
|
+
.sw-button[aria-pressed='true']::after { border: 2px solid Highlight; border-radius: inherit; content: ''; inset: calc(-1px - 4px); pointer-events: none; position: absolute; }
|
|
887
|
+
}
|
|
861
888
|
.sw-button-xs { min-height: 28px; padding-inline: 10px; }
|
|
862
889
|
.sw-button-sm { min-height: 32px; padding-inline: 12px; }
|
|
863
890
|
.sw-button-md { min-height: 44px; padding-inline: 16px; }
|
|
@@ -968,6 +995,7 @@ body {
|
|
|
968
995
|
|
|
969
996
|
.sw-checkbox-description { color: var(--sw-color-muted); }
|
|
970
997
|
.sw-checkbox-error { color: var(--sw-color-danger); }
|
|
998
|
+
.sw-checkbox-error:empty { position: absolute; }
|
|
971
999
|
|
|
972
1000
|
@media (prefers-reduced-transparency: reduce) {
|
|
973
1001
|
.sw-checkbox-mark { background: var(--sw-color-surface); }
|
|
@@ -1071,7 +1099,7 @@ body {
|
|
|
1071
1099
|
outline-offset: var(--sw-focus-ring-offset);
|
|
1072
1100
|
}
|
|
1073
1101
|
|
|
1074
|
-
.sw-radio-group
|
|
1102
|
+
.sw-radio-group[aria-invalid='true'] .sw-radio-group-mark {
|
|
1075
1103
|
border-color: var(--sw-color-danger);
|
|
1076
1104
|
}
|
|
1077
1105
|
|
|
@@ -1080,6 +1108,14 @@ body {
|
|
|
1080
1108
|
opacity: var(--sw-disabled-opacity);
|
|
1081
1109
|
}
|
|
1082
1110
|
|
|
1111
|
+
/* A consumer glyph beside the label, in the label's color and the option's gap. */
|
|
1112
|
+
.sw-radio-group-icon {
|
|
1113
|
+
align-items: center;
|
|
1114
|
+
color: var(--sw-color-text);
|
|
1115
|
+
display: inline-flex;
|
|
1116
|
+
flex: none;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1083
1119
|
.sw-radio-group-text {
|
|
1084
1120
|
color: var(--sw-color-text);
|
|
1085
1121
|
font-family: var(--sw-font-sans);
|
|
@@ -1098,6 +1134,7 @@ body {
|
|
|
1098
1134
|
|
|
1099
1135
|
.sw-radio-group-description { color: var(--sw-color-muted); }
|
|
1100
1136
|
.sw-radio-group-error { color: var(--sw-color-danger); }
|
|
1137
|
+
.sw-radio-group-error:empty { position: absolute; }
|
|
1101
1138
|
|
|
1102
1139
|
@media (prefers-reduced-transparency: reduce) {
|
|
1103
1140
|
.sw-radio-group-mark { background: var(--sw-color-surface); }
|
|
@@ -1108,7 +1145,7 @@ body {
|
|
|
1108
1145
|
.sw-radio-group-mark { background: Canvas; border-color: CanvasText; }
|
|
1109
1146
|
.sw-radio-group-input:checked + .sw-radio-group-mark { background: Highlight; border-color: Highlight; }
|
|
1110
1147
|
.sw-radio-group-input:checked + .sw-radio-group-mark::after { background: HighlightText; }
|
|
1111
|
-
.sw-radio-group
|
|
1148
|
+
.sw-radio-group[aria-invalid='true'] .sw-radio-group-mark { border-color: CanvasText; }
|
|
1112
1149
|
}
|
|
1113
1150
|
|
|
1114
1151
|
.sw-badge {
|
|
@@ -1163,6 +1200,38 @@ body {
|
|
|
1163
1200
|
color: var(--sw-color-warning);
|
|
1164
1201
|
}
|
|
1165
1202
|
|
|
1203
|
+
:is(.sw-button-primary, .sw-button-secondary, .sw-button-tertiary, .sw-button-danger) .sw-badge { background: var(--sw-color-surface); color: var(--sw-color-text); }
|
|
1204
|
+
|
|
1205
|
+
.sw-segmented-field {
|
|
1206
|
+
display: inline-flex;
|
|
1207
|
+
flex-direction: column;
|
|
1208
|
+
gap: var(--sw-space-1);
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
.sw-segmented-field-filled {
|
|
1212
|
+
display: flex;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
.sw-segmented-field > .sw-field-error {
|
|
1216
|
+
contain: inline-size;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
.sw-segmented-field:has(> .sw-field-error:not(:empty)) {
|
|
1220
|
+
min-inline-size: min(100%, 24ch);
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
.sw-inline > .sw-segmented-field > .sw-segmented {
|
|
1224
|
+
align-self: flex-start;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
.sw-segmented[aria-invalid='true'] {
|
|
1228
|
+
border-color: var(--sw-color-danger);
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
@media (forced-colors: active) {
|
|
1232
|
+
.sw-segmented[aria-invalid='true'] { border-color: Mark; }
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1166
1235
|
.sw-segmented {
|
|
1167
1236
|
background: var(--sw-glass-fill);
|
|
1168
1237
|
border: 1px solid var(--sw-glass-border);
|
|
@@ -1293,28 +1362,20 @@ body {
|
|
|
1293
1362
|
}
|
|
1294
1363
|
|
|
1295
1364
|
.sw-table-row-selected > :first-child {
|
|
1296
|
-
padding-inline-start: var(--sw-space-5);
|
|
1297
1365
|
position: relative;
|
|
1298
1366
|
}
|
|
1299
1367
|
|
|
1300
|
-
.sw-table-compact .sw-table-row-selected > :first-child {
|
|
1301
|
-
padding-inline-start: var(--sw-space-4);
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
1368
|
.sw-table-row-selected > :first-child::before {
|
|
1305
|
-
|
|
1306
|
-
border-radius: var(--sw-radius-pill);
|
|
1369
|
+
border-inline-start: var(--sw-space-1) solid var(--sw-color-accent);
|
|
1307
1370
|
content: '';
|
|
1308
|
-
|
|
1309
|
-
inset-
|
|
1310
|
-
|
|
1371
|
+
inset-block: 0;
|
|
1372
|
+
inset-inline-start: 0;
|
|
1373
|
+
pointer-events: none;
|
|
1311
1374
|
position: absolute;
|
|
1312
|
-
transform: translateY(-50%);
|
|
1313
|
-
width: var(--sw-space-2);
|
|
1314
1375
|
}
|
|
1315
1376
|
|
|
1316
|
-
|
|
1317
|
-
|
|
1377
|
+
@media (forced-colors: active) {
|
|
1378
|
+
.sw-table-row-selected > :first-child::before { border-color: Highlight; }
|
|
1318
1379
|
}
|
|
1319
1380
|
|
|
1320
1381
|
.sw-date-field {
|
|
@@ -1326,12 +1387,11 @@ body {
|
|
|
1326
1387
|
width: max-content;
|
|
1327
1388
|
}
|
|
1328
1389
|
|
|
1390
|
+
/* The label inherits the canvas's body type, as Field's does; the label
|
|
1391
|
+
words inside it are a Text label span. The same line box gives the same
|
|
1392
|
+
gap to the entry as a Field beside it. */
|
|
1329
1393
|
.sw-date-field-label {
|
|
1330
1394
|
color: var(--sw-color-text);
|
|
1331
|
-
font-family: var(--sw-font-sans);
|
|
1332
|
-
font-size: 15px;
|
|
1333
|
-
font-weight: 600;
|
|
1334
|
-
line-height: 20px;
|
|
1335
1395
|
}
|
|
1336
1396
|
|
|
1337
1397
|
.sw-date-field-control {
|
|
@@ -1378,7 +1438,15 @@ body {
|
|
|
1378
1438
|
border-color: var(--sw-color-danger);
|
|
1379
1439
|
}
|
|
1380
1440
|
|
|
1381
|
-
|
|
1441
|
+
/* The entry looks locked as every text control does; its button fades as buttons do. */
|
|
1442
|
+
.sw-date-field .sw-date-field-control > .sw-date-field-input:disabled {
|
|
1443
|
+
background-color: var(--sw-color-subtle);
|
|
1444
|
+
border-style: dashed;
|
|
1445
|
+
cursor: not-allowed;
|
|
1446
|
+
opacity: 1;
|
|
1447
|
+
-webkit-text-fill-color: currentColor;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1382
1450
|
.sw-date-field-button:disabled {
|
|
1383
1451
|
cursor: not-allowed;
|
|
1384
1452
|
opacity: var(--sw-disabled-opacity);
|
|
@@ -1431,6 +1499,7 @@ body {
|
|
|
1431
1499
|
|
|
1432
1500
|
.sw-date-field-description { color: var(--sw-color-muted); }
|
|
1433
1501
|
.sw-date-field-error { color: var(--sw-color-danger); }
|
|
1502
|
+
.sw-date-field-error:empty { position: absolute; }
|
|
1434
1503
|
|
|
1435
1504
|
.sw-date-field-calendar {
|
|
1436
1505
|
background: var(--sw-glass-fill);
|
|
@@ -1574,6 +1643,11 @@ body {
|
|
|
1574
1643
|
|
|
1575
1644
|
@media (forced-colors: active) {
|
|
1576
1645
|
.sw-date-field .sw-date-field-control > .sw-date-field-input[aria-invalid='true'] { border-color: CanvasText; }
|
|
1646
|
+
.sw-date-field .sw-date-field-control > .sw-date-field-input:disabled {
|
|
1647
|
+
border-color: GrayText;
|
|
1648
|
+
color: GrayText;
|
|
1649
|
+
-webkit-text-fill-color: GrayText;
|
|
1650
|
+
}
|
|
1577
1651
|
.sw-date-field-calendar { border-color: CanvasText; }
|
|
1578
1652
|
.sw-date-field-day[aria-current='date'] { border-color: CanvasText; }
|
|
1579
1653
|
.sw-date-field-day[aria-selected='true'] {
|
|
@@ -1811,12 +1885,12 @@ body {
|
|
|
1811
1885
|
border-bottom: 2px solid var(--sw-color-muted);
|
|
1812
1886
|
border-right: 2px solid var(--sw-color-muted);
|
|
1813
1887
|
box-sizing: border-box;
|
|
1814
|
-
flex: none;
|
|
1815
1888
|
height: var(--sw-space-2);
|
|
1889
|
+
width: var(--sw-space-2);
|
|
1890
|
+
flex: none;
|
|
1816
1891
|
margin-inline-end: var(--sw-space-1);
|
|
1817
1892
|
transform: rotate(-45deg);
|
|
1818
1893
|
transition: transform var(--sw-motion-default) var(--sw-motion-easing);
|
|
1819
|
-
width: var(--sw-space-2);
|
|
1820
1894
|
}
|
|
1821
1895
|
|
|
1822
1896
|
.sw-accordion-marker:dir(rtl) { transform: rotate(135deg); }
|
|
@@ -1843,18 +1917,10 @@ body {
|
|
|
1843
1917
|
}
|
|
1844
1918
|
|
|
1845
1919
|
.sw-select-trigger {
|
|
1920
|
+
align-items: center;
|
|
1846
1921
|
appearance: none;
|
|
1847
1922
|
-webkit-appearance: none;
|
|
1848
1923
|
background-color: var(--sw-glass-fill);
|
|
1849
|
-
background-image:
|
|
1850
|
-
linear-gradient(45deg, transparent 50%, var(--sw-color-muted) 50%),
|
|
1851
|
-
linear-gradient(135deg, var(--sw-color-muted) 50%, transparent 50%);
|
|
1852
|
-
background-repeat: no-repeat;
|
|
1853
|
-
background-size: var(--sw-space-1) var(--sw-space-1),
|
|
1854
|
-
var(--sw-space-1) var(--sw-space-1);
|
|
1855
|
-
background-position:
|
|
1856
|
-
calc(100% - var(--sw-space-4)) calc(50% - 1px),
|
|
1857
|
-
calc(100% - calc(var(--sw-space-4) - var(--sw-space-1))) calc(50% - 1px);
|
|
1858
1924
|
border: 1px solid var(--sw-color-border);
|
|
1859
1925
|
border-radius: var(--sw-radius-sm);
|
|
1860
1926
|
box-sizing: border-box;
|
|
@@ -1863,19 +1929,64 @@ body {
|
|
|
1863
1929
|
display: inline-flex;
|
|
1864
1930
|
font-family: inherit;
|
|
1865
1931
|
font-size: inherit;
|
|
1932
|
+
gap: var(--sw-space-3);
|
|
1866
1933
|
letter-spacing: inherit;
|
|
1867
1934
|
line-height: inherit;
|
|
1868
1935
|
margin: 0;
|
|
1936
|
+
max-width: 100%;
|
|
1869
1937
|
min-height: var(--sw-control-md-min-height);
|
|
1870
1938
|
padding-block: 0;
|
|
1871
1939
|
padding-inline: var(--sw-control-md-padding-inline);
|
|
1872
|
-
padding-inline-end: calc(
|
|
1873
|
-
var(--sw-control-md-padding-inline) + var(--sw-space-5)
|
|
1874
|
-
);
|
|
1875
1940
|
text-align: start;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
/* The chevron Accordion uses, pointing down, centred on the text. */
|
|
1944
|
+
.sw-select-trigger::after {
|
|
1945
|
+
border-bottom: 2px solid var(--sw-color-muted);
|
|
1946
|
+
border-right: 2px solid var(--sw-color-muted);
|
|
1947
|
+
box-sizing: border-box;
|
|
1948
|
+
height: var(--sw-space-2);
|
|
1949
|
+
width: var(--sw-space-2);
|
|
1950
|
+
content: '';
|
|
1951
|
+
flex: none;
|
|
1952
|
+
transform: translateY(-25%) rotate(45deg);
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
/*
|
|
1956
|
+
* The current label and a hidden copy of every option's label share one grid
|
|
1957
|
+
* cell, so the trigger is as wide as the longest option and keeps that width
|
|
1958
|
+
* when the value changes; past the available width the label ellipsizes.
|
|
1959
|
+
*/
|
|
1960
|
+
.sw-select-value {
|
|
1961
|
+
display: grid;
|
|
1962
|
+
flex: 1 1 auto;
|
|
1963
|
+
min-width: 0;
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
.sw-select-value > * {
|
|
1967
|
+
grid-area: 1 / 1;
|
|
1968
|
+
min-width: 0;
|
|
1969
|
+
overflow: hidden;
|
|
1970
|
+
text-overflow: ellipsis;
|
|
1876
1971
|
white-space: nowrap;
|
|
1877
1972
|
}
|
|
1878
1973
|
|
|
1974
|
+
.sw-select-value-sizer {
|
|
1975
|
+
visibility: hidden;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
.sw-select-placeholder {
|
|
1979
|
+
color: var(--sw-color-muted);
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
.sw-select-invalid .sw-select-trigger {
|
|
1983
|
+
border-color: var(--sw-color-danger);
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
.sw-select-value-sizer::before {
|
|
1987
|
+
content: attr(data-label);
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1879
1990
|
.sw-select-trigger:focus {
|
|
1880
1991
|
box-shadow: none;
|
|
1881
1992
|
outline: none;
|
|
@@ -1887,17 +1998,17 @@ body {
|
|
|
1887
1998
|
}
|
|
1888
1999
|
|
|
1889
2000
|
.sw-select-xs .sw-select-trigger {
|
|
1890
|
-
background-position:
|
|
1891
|
-
calc(100% - var(--sw-space-3)) calc(50% - 1px),
|
|
1892
|
-
calc(100% - calc(var(--sw-space-3) - var(--sw-space-1))) calc(50% - 1px);
|
|
1893
2001
|
font-size: 13px;
|
|
2002
|
+
gap: var(--sw-space-2);
|
|
1894
2003
|
letter-spacing: -0.08px;
|
|
1895
2004
|
line-height: 18px;
|
|
1896
2005
|
min-height: var(--sw-control-xs-min-height);
|
|
1897
2006
|
padding-inline: var(--sw-control-xs-padding-inline);
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
@media (forced-colors: active) {
|
|
2010
|
+
.sw-select-trigger::after { border-color: CanvasText; }
|
|
2011
|
+
.sw-select-invalid .sw-select-trigger { border-color: Mark; }
|
|
1901
2012
|
}
|
|
1902
2013
|
|
|
1903
2014
|
.sw-select-list {
|
|
@@ -2544,8 +2655,15 @@ body {
|
|
|
2544
2655
|
line-height: 18px;
|
|
2545
2656
|
}
|
|
2546
2657
|
|
|
2658
|
+
/*
|
|
2659
|
+
* A zero-count chip is quiet without fading: it drops the glass fill and
|
|
2660
|
+
* sets its label in the muted color, which is 4.5:1 on the canvas, surface
|
|
2661
|
+
* and subtle fill in every palette. It can still be chosen, so it never
|
|
2662
|
+
* reads as disabled.
|
|
2663
|
+
*/
|
|
2547
2664
|
.sw-filter-chip-quiet:not(:has(.sw-filter-chip-input:checked)) .sw-filter-chip-face {
|
|
2548
|
-
|
|
2665
|
+
background: transparent;
|
|
2666
|
+
color: var(--sw-color-muted);
|
|
2549
2667
|
}
|
|
2550
2668
|
|
|
2551
2669
|
.sw-filter-chip-input:checked + .sw-filter-chip-face {
|
|
@@ -2573,7 +2691,6 @@ body {
|
|
|
2573
2691
|
.sw-filter-chip-input:checked + .sw-filter-chip-face { background: Highlight; border-color: Highlight; color: HighlightText; }
|
|
2574
2692
|
.sw-filter-chip-input:focus-visible + .sw-filter-chip-face { outline-color: Highlight; }
|
|
2575
2693
|
.sw-filter-chip-count { color: inherit; }
|
|
2576
|
-
.sw-filter-chip-quiet:not(:has(.sw-filter-chip-input:checked)) .sw-filter-chip-face { opacity: 1; color: GrayText; border-color: GrayText; }
|
|
2577
2694
|
}
|
|
2578
2695
|
|
|
2579
2696
|
.sw-grid {
|
|
@@ -2837,8 +2954,15 @@ body {
|
|
|
2837
2954
|
text-align: center;
|
|
2838
2955
|
}
|
|
2839
2956
|
|
|
2957
|
+
/*
|
|
2958
|
+
* Below md the aria-hidden copy under each row label is what shows; the
|
|
2959
|
+
* total cell stays in the table, visually hidden, so a screen reader still
|
|
2960
|
+
* reads each total in its row and under its column header.
|
|
2961
|
+
*/
|
|
2840
2962
|
@media not all and (min-width: 48rem) {
|
|
2841
|
-
.sw-denomination-strip .sw-denomination-total
|
|
2963
|
+
.sw-denomination-strip .sw-denomination-total,
|
|
2964
|
+
.sw-denomination-strip .sw-denomination-total-head { padding: 0; position: relative; }
|
|
2965
|
+
.sw-denomination-total-value { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
2842
2966
|
.sw-denomination-total-inline { display: block; }
|
|
2843
2967
|
.sw-denomination-label-body { flex-direction: column; align-items: flex-start; gap: var(--sw-space-1); }
|
|
2844
2968
|
.sw-denomination-strip th,
|
|
@@ -2869,6 +2993,9 @@ body {
|
|
|
2869
2993
|
.sw-field-description { color: var(--sw-color-muted); }
|
|
2870
2994
|
.sw-field-error { color: var(--sw-color-danger); }
|
|
2871
2995
|
|
|
2996
|
+
/* An error region is always rendered as a live region; empty, it leaves the layout (and its gap) but stays in the accessibility tree. */
|
|
2997
|
+
.sw-field-error:empty { position: absolute; }
|
|
2998
|
+
|
|
2872
2999
|
[data-theme] .sw-field-invalid :is(input, select, textarea) {
|
|
2873
3000
|
border-color: var(--sw-color-danger);
|
|
2874
3001
|
}
|
|
@@ -2925,10 +3052,26 @@ body {
|
|
|
2925
3052
|
|
|
2926
3053
|
.sw-field-invalid .sw-field-adorned { border-color: var(--sw-color-danger); }
|
|
2927
3054
|
|
|
3055
|
+
/* The frame draws the surface, so it carries the disabled look for its input. */
|
|
3056
|
+
.sw-field-adorned:has(> input:disabled) {
|
|
3057
|
+
background-color: var(--sw-color-subtle);
|
|
3058
|
+
border-style: dashed;
|
|
3059
|
+
cursor: not-allowed;
|
|
3060
|
+
opacity: 1;
|
|
3061
|
+
-webkit-text-fill-color: currentColor;
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
[data-theme] .sw-field-adorned > input:disabled { background: transparent; }
|
|
3065
|
+
|
|
2928
3066
|
@media (forced-colors: active) {
|
|
2929
3067
|
[data-theme] .sw-field-invalid :is(input, select, textarea),
|
|
2930
3068
|
.sw-field-invalid .sw-field-adorned { border-color: Mark; }
|
|
2931
3069
|
.sw-field-prefix, .sw-field-suffix { color: CanvasText; }
|
|
3070
|
+
.sw-field-adorned:has(> input:disabled) {
|
|
3071
|
+
border-color: GrayText;
|
|
3072
|
+
color: GrayText;
|
|
3073
|
+
-webkit-text-fill-color: GrayText;
|
|
3074
|
+
}
|
|
2932
3075
|
.sw-field-error, .sw-field-required { color: Mark; }
|
|
2933
3076
|
}
|
|
2934
3077
|
|
|
@@ -3015,6 +3158,31 @@ body {
|
|
|
3015
3158
|
width: max-content;
|
|
3016
3159
|
}
|
|
3017
3160
|
|
|
3161
|
+
.sw-toast-success { --sw-toast-tone: var(--sw-color-success); border-color: var(--sw-toast-tone); }
|
|
3162
|
+
.sw-toast-warning { --sw-toast-tone: var(--sw-color-warning); border-color: var(--sw-toast-tone); }
|
|
3163
|
+
.sw-toast-danger { --sw-toast-tone: var(--sw-color-danger); border-color: var(--sw-toast-tone); }
|
|
3164
|
+
|
|
3165
|
+
.sw-toast-row {
|
|
3166
|
+
align-items: center;
|
|
3167
|
+
display: flex;
|
|
3168
|
+
gap: var(--sw-space-2);
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
.sw-toast-icon {
|
|
3172
|
+
color: var(--sw-toast-tone, currentColor);
|
|
3173
|
+
display: inline-flex;
|
|
3174
|
+
flex: none;
|
|
3175
|
+
}
|
|
3176
|
+
|
|
3177
|
+
.sw-toast-body {
|
|
3178
|
+
min-width: 0;
|
|
3179
|
+
}
|
|
3180
|
+
|
|
3181
|
+
@media (forced-colors: active) {
|
|
3182
|
+
.sw-toast { border-color: CanvasText; }
|
|
3183
|
+
.sw-toast-icon { color: CanvasText; }
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3018
3186
|
.sw-toast:popover-open {
|
|
3019
3187
|
animation: sw-toast-float var(--sw-motion-default) var(--sw-motion-easing);
|
|
3020
3188
|
}
|