@pretable/ui 0.17.0 → 0.19.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/grid.css +331 -158
- package/package.json +1 -1
package/grid.css
CHANGED
|
@@ -229,15 +229,15 @@
|
|
|
229
229
|
cursor: pointer;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
:where([data-pretable-option]:hover) {
|
|
232
|
+
:where([data-pretable-option]:hover:not([aria-disabled="true"])) {
|
|
233
233
|
background: var(--pretable-bg-hover);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
/* The roving highlight: keyboard navigation's `data-active`, painted like
|
|
236
|
+
/* The roving highlight: keyboard navigation's `data-pretable-active`, painted like
|
|
237
237
|
a hover. DECLARED BEFORE the selected rule on purpose — an option that
|
|
238
238
|
is both active and committed should read as SELECTED, and at equal
|
|
239
239
|
(0,0,0) specificity source order is what decides that. */
|
|
240
|
-
:where([data-pretable-option][data-active]) {
|
|
240
|
+
:where([data-pretable-option][data-pretable-active]) {
|
|
241
241
|
background: var(--pretable-bg-hover);
|
|
242
242
|
}
|
|
243
243
|
|
|
@@ -246,6 +246,70 @@
|
|
|
246
246
|
color: var(--pretable-text-selected);
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
+
/* Disabled may also be committed. Keep its selection fill, but let the
|
|
250
|
+
disabled ink and cursor win after the selected rule. */
|
|
251
|
+
:where([data-pretable-option][aria-disabled="true"]) {
|
|
252
|
+
color: var(--pretable-text-dim);
|
|
253
|
+
cursor: default;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/* ---- Kit components: text input --------------------------------------
|
|
257
|
+
The native input in the grid's box: the same rule border, grid surface
|
|
258
|
+
and cell ink the select trigger draws, so a field and the picker beside
|
|
259
|
+
it are one family. Sites keep their size, inset and flex participation
|
|
260
|
+
(the site rules below win by order); the element stays native, so the
|
|
261
|
+
date type keeps its picker. */
|
|
262
|
+
:where([data-pretable-text-input]) {
|
|
263
|
+
box-sizing: border-box;
|
|
264
|
+
padding-inline: 6px;
|
|
265
|
+
border: 1px solid var(--pretable-rule);
|
|
266
|
+
border-radius: var(--pretable-radius-control);
|
|
267
|
+
background: var(--pretable-bg-grid);
|
|
268
|
+
color: var(--pretable-text-cell);
|
|
269
|
+
font: inherit;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
:where([data-pretable-textarea]) {
|
|
273
|
+
box-sizing: border-box;
|
|
274
|
+
padding-inline: 6px;
|
|
275
|
+
border: 1px solid var(--pretable-rule);
|
|
276
|
+
border-radius: var(--pretable-radius-control);
|
|
277
|
+
background: var(--pretable-bg-grid);
|
|
278
|
+
color: var(--pretable-text-cell);
|
|
279
|
+
font: inherit;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* ---- Kit components: checkbox ----------------------------------------
|
|
283
|
+
The 16px square every checkbox in the grid is — the row-select cell, the
|
|
284
|
+
header select-all, the boolean cell, the column toggle, the checklists
|
|
285
|
+
and the hide-grouped switch — from one rule, so a theme edit reaches all
|
|
286
|
+
of them and two hand-kept copies cannot drift. aria-checked is the state
|
|
287
|
+
channel; the glyph is the kit icon, sized by the font-size here.
|
|
288
|
+
The tool panel's visibility toggle is enrolled here rather than restyled
|
|
289
|
+
in its own section: it IS this checkbox, and two hand-kept copies of the
|
|
290
|
+
same control are how a theme edit makes them drift apart. */
|
|
291
|
+
:where([data-pretable-checkbox]) {
|
|
292
|
+
width: 16px;
|
|
293
|
+
height: 16px;
|
|
294
|
+
border: 1px solid var(--pretable-checkbox-border);
|
|
295
|
+
background: var(--pretable-checkbox-bg);
|
|
296
|
+
border-radius: 3px;
|
|
297
|
+
cursor: pointer;
|
|
298
|
+
padding: 0;
|
|
299
|
+
display: inline-flex;
|
|
300
|
+
align-items: center;
|
|
301
|
+
justify-content: center;
|
|
302
|
+
font-size: 11px;
|
|
303
|
+
line-height: 1;
|
|
304
|
+
color: var(--pretable-checkbox-checked-fg);
|
|
305
|
+
}
|
|
306
|
+
:where([data-pretable-checkbox][aria-checked="true"]),
|
|
307
|
+
:where([data-pretable-checkbox][aria-checked="mixed"]) {
|
|
308
|
+
background: var(--pretable-checkbox-checked-bg);
|
|
309
|
+
border-color: var(--pretable-checkbox-checked-bg);
|
|
310
|
+
color: var(--pretable-checkbox-checked-fg);
|
|
311
|
+
}
|
|
312
|
+
|
|
249
313
|
/* Multi-sort priority badge (rendered only when 2+ columns are sorted) */
|
|
250
314
|
:where([data-pretable-sort-priority]) {
|
|
251
315
|
margin-left: 2px;
|
|
@@ -862,63 +926,30 @@
|
|
|
862
926
|
padding-top: var(--pretable-cell-padding-y);
|
|
863
927
|
}
|
|
864
928
|
|
|
865
|
-
/*
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
button[data-pretable-row-select-all],
|
|
871
|
-
button[data-pretable-bool-cell],
|
|
872
|
-
button[data-pretable-tool-column-toggle]
|
|
873
|
-
) {
|
|
874
|
-
width: 16px;
|
|
875
|
-
height: 16px;
|
|
876
|
-
border: 1px solid var(--pretable-checkbox-border);
|
|
877
|
-
background: var(--pretable-checkbox-bg);
|
|
878
|
-
border-radius: 3px;
|
|
879
|
-
cursor: pointer;
|
|
880
|
-
padding: 0;
|
|
881
|
-
display: inline-flex;
|
|
882
|
-
align-items: center;
|
|
883
|
-
justify-content: center;
|
|
884
|
-
font-size: 11px;
|
|
885
|
-
line-height: 1;
|
|
886
|
-
color: var(--pretable-checkbox-checked-fg);
|
|
887
|
-
}
|
|
888
|
-
:where(
|
|
889
|
-
button[data-pretable-row-select][aria-checked="true"],
|
|
890
|
-
button[data-pretable-row-select-all][aria-checked="true"],
|
|
891
|
-
button[data-pretable-bool-cell][aria-checked="true"],
|
|
892
|
-
button[data-pretable-tool-column-toggle][aria-checked="true"]
|
|
893
|
-
) {
|
|
894
|
-
background: var(--pretable-checkbox-checked-bg);
|
|
895
|
-
border-color: var(--pretable-checkbox-checked-bg);
|
|
896
|
-
color: var(--pretable-checkbox-checked-fg);
|
|
897
|
-
}
|
|
898
|
-
:where(
|
|
899
|
-
button[data-pretable-row-select][aria-checked="mixed"],
|
|
900
|
-
button[data-pretable-row-select-all][aria-checked="mixed"]
|
|
901
|
-
) {
|
|
902
|
-
background: var(--pretable-checkbox-checked-bg);
|
|
903
|
-
border-color: var(--pretable-checkbox-checked-bg);
|
|
904
|
-
color: var(--pretable-checkbox-checked-fg);
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
/* Boolean toggle cell (typed editors) */
|
|
908
|
-
:where(button[data-pretable-bool-cell]) {
|
|
929
|
+
/* Boolean toggle cell (typed editors). The box, the glyph colour and the
|
|
930
|
+
checked fill all come from the kit checkbox rule; what is left here is
|
|
931
|
+
the cell's own placement — centred in a data cell — and the two states
|
|
932
|
+
no other checkbox has, busy and invalid. */
|
|
933
|
+
:where([data-pretable-bool-cell]) {
|
|
909
934
|
margin: 0 auto;
|
|
910
935
|
display: flex;
|
|
911
936
|
align-items: center;
|
|
912
937
|
justify-content: center;
|
|
913
938
|
}
|
|
914
|
-
:where(
|
|
915
|
-
cursor: default;
|
|
916
|
-
}
|
|
917
|
-
:where(button[data-pretable-bool-cell][aria-busy="true"]) {
|
|
939
|
+
:where([data-pretable-bool-cell][aria-busy="true"]) {
|
|
918
940
|
opacity: 0.5;
|
|
919
941
|
cursor: wait;
|
|
920
942
|
}
|
|
921
|
-
|
|
943
|
+
/* This outline shares the kit's focus-ring property. The kit rule at the end
|
|
944
|
+
of the layer now matches `[data-pretable-checkbox]:focus-visible`, which
|
|
945
|
+
this cell is one of, and both selectors flatten to (0,0,0) — so if the two
|
|
946
|
+
ever matched at once the later kit rule would take the outline. Latent
|
|
947
|
+
today: the control is `tabIndex={-1}`, so a click never gives it
|
|
948
|
+
`:focus-visible`. And that precedence is the RIGHT one if it ever fires —
|
|
949
|
+
while a control is focused the focus ring must be the visible state, and
|
|
950
|
+
the invalid state is still carried to assistive tech by `aria-invalid` and
|
|
951
|
+
`aria-errormessage`, which no outline can say. Left alone deliberately. */
|
|
952
|
+
:where([data-pretable-bool-cell][aria-invalid="true"]) {
|
|
922
953
|
outline: 1px solid var(--pretable-text-error);
|
|
923
954
|
outline-offset: 1px;
|
|
924
955
|
}
|
|
@@ -1119,43 +1150,31 @@
|
|
|
1119
1150
|
line-height: 1.5;
|
|
1120
1151
|
color: var(--pretable-text-cell);
|
|
1121
1152
|
}
|
|
1122
|
-
:
|
|
1123
|
-
|
|
1124
|
-
|
|
1153
|
+
/* The dialog's three value fields. Kit text inputs: the kit rule at the top
|
|
1154
|
+
of this file draws the box, the rule border and the ink. What is the
|
|
1155
|
+
dialog's own is the size and the inset — full width, the 28px the
|
|
1156
|
+
operator picker beside them stands at (an input left to its own padding
|
|
1157
|
+
comes out several pixels taller, and a stacked pair that does not line
|
|
1158
|
+
up is what this height buys), and this dialog's 7px rather than the
|
|
1159
|
+
kit's 6px. */
|
|
1160
|
+
:where(
|
|
1161
|
+
[data-pretable-filter-value],
|
|
1162
|
+
[data-pretable-filter-min],
|
|
1163
|
+
[data-pretable-filter-max]
|
|
1164
|
+
) {
|
|
1125
1165
|
width: 100%;
|
|
1126
|
-
box-sizing: border-box;
|
|
1127
|
-
/* An explicit box, like the tool pane's identical controls: the operator
|
|
1128
|
-
picker beside these is a kit select with its own fixed block-size, and
|
|
1129
|
-
an input left to its own padding comes out several pixels taller — a
|
|
1130
|
-
stacked pair that does not line up. Both centre their own text
|
|
1131
|
-
vertically once the height is set, so the block padding goes. */
|
|
1132
1166
|
block-size: 28px;
|
|
1133
1167
|
padding-inline: 7px;
|
|
1134
|
-
border: 1px solid var(--pretable-rule);
|
|
1135
|
-
border-radius: var(--pretable-radius-control);
|
|
1136
|
-
background: var(--pretable-bg-grid);
|
|
1137
|
-
color: var(--pretable-text-cell);
|
|
1138
|
-
font: inherit;
|
|
1139
1168
|
}
|
|
1140
|
-
/* The dialog's operator picker. A kit select: the
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
the kit's 6px. */
|
|
1169
|
+
/* The dialog's operator picker. A kit select: the kit rules at the top of
|
|
1170
|
+
this file draw both this box and the fields' beside it. What is the
|
|
1171
|
+
dialog's own is the size — full width, the 28px the fields beside it
|
|
1172
|
+
stand at, and this dialog's 7px inset rather than the kit's 6px. */
|
|
1145
1173
|
:where([data-pretable-filter-operator]) {
|
|
1146
1174
|
width: 100%;
|
|
1147
1175
|
block-size: 28px;
|
|
1148
1176
|
padding-inline: 7px;
|
|
1149
1177
|
}
|
|
1150
|
-
/* The product's focus ring, not the host page's. Without this the dialog's
|
|
1151
|
-
fields keep the UA ring — which takes the CONSUMER's accent-color, so
|
|
1152
|
-
tabbing from the pane's copy of these same controls to this one changed
|
|
1153
|
-
the ring's colour, width and offset. The declaration the builder rows
|
|
1154
|
-
already share. */
|
|
1155
|
-
:where([data-pretable-filter-menu] input:focus-visible) {
|
|
1156
|
-
outline: 2px solid var(--pretable-focus-ring);
|
|
1157
|
-
outline-offset: -2px;
|
|
1158
|
-
}
|
|
1159
1178
|
:where([data-pretable-filter-set]) label {
|
|
1160
1179
|
display: flex;
|
|
1161
1180
|
gap: 6px;
|
|
@@ -1407,6 +1426,7 @@
|
|
|
1407
1426
|
/* Portaled into <body> — see the filter menu above. */
|
|
1408
1427
|
font-family: var(--pretable-font-sans);
|
|
1409
1428
|
font-size: var(--pretable-font-size-cell);
|
|
1429
|
+
line-height: 1.4;
|
|
1410
1430
|
color: var(--pretable-text-cell);
|
|
1411
1431
|
}
|
|
1412
1432
|
|
|
@@ -1418,7 +1438,10 @@
|
|
|
1418
1438
|
padding-bottom: 6px;
|
|
1419
1439
|
}
|
|
1420
1440
|
|
|
1421
|
-
:where(
|
|
1441
|
+
:where(
|
|
1442
|
+
[data-pretable-date-header]
|
|
1443
|
+
:is([data-pretable-date-previous-month], [data-pretable-date-next-month])
|
|
1444
|
+
) {
|
|
1422
1445
|
border: none;
|
|
1423
1446
|
background: none;
|
|
1424
1447
|
color: var(--pretable-text-header);
|
|
@@ -1426,13 +1449,25 @@
|
|
|
1426
1449
|
padding: 0 6px;
|
|
1427
1450
|
}
|
|
1428
1451
|
|
|
1429
|
-
:where(
|
|
1452
|
+
:where(
|
|
1453
|
+
[data-pretable-date-header]
|
|
1454
|
+
:is(
|
|
1455
|
+
[data-pretable-date-previous-month],
|
|
1456
|
+
[data-pretable-date-next-month]
|
|
1457
|
+
):hover:not(:disabled)
|
|
1458
|
+
) {
|
|
1430
1459
|
color: var(--pretable-accent);
|
|
1431
1460
|
}
|
|
1432
1461
|
/* The month steppers disable at the calendar's min/max month. Without this
|
|
1433
1462
|
they kept the enabled colour, the pointer cursor and the hover accent —
|
|
1434
1463
|
the same defect the menu items had. */
|
|
1435
|
-
:where(
|
|
1464
|
+
:where(
|
|
1465
|
+
[data-pretable-date-header]
|
|
1466
|
+
:is(
|
|
1467
|
+
[data-pretable-date-previous-month],
|
|
1468
|
+
[data-pretable-date-next-month]
|
|
1469
|
+
):disabled
|
|
1470
|
+
) {
|
|
1436
1471
|
color: var(--pretable-text-dim);
|
|
1437
1472
|
cursor: default;
|
|
1438
1473
|
}
|
|
@@ -1455,7 +1490,7 @@
|
|
|
1455
1490
|
cursor: pointer;
|
|
1456
1491
|
}
|
|
1457
1492
|
|
|
1458
|
-
:where([data-pretable-date-day]:hover) {
|
|
1493
|
+
:where([data-pretable-date-day]:hover:not([aria-disabled="true"])) {
|
|
1459
1494
|
background: var(--pretable-bg-hover);
|
|
1460
1495
|
}
|
|
1461
1496
|
|
|
@@ -1472,6 +1507,15 @@
|
|
|
1472
1507
|
color: var(--pretable-text-selected);
|
|
1473
1508
|
}
|
|
1474
1509
|
|
|
1510
|
+
:where([data-pretable-date-day][data-pretable-date-active]) {
|
|
1511
|
+
outline: 2px solid var(--pretable-focus-ring);
|
|
1512
|
+
outline-offset: -2px;
|
|
1513
|
+
}
|
|
1514
|
+
:where([data-pretable-date-day][aria-disabled="true"]) {
|
|
1515
|
+
color: var(--pretable-text-dim);
|
|
1516
|
+
cursor: default;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1475
1519
|
/* Tooltip / popover */
|
|
1476
1520
|
:where([data-pretable-popover]) {
|
|
1477
1521
|
background: var(--pretable-bg-tooltip);
|
|
@@ -1480,12 +1524,38 @@
|
|
|
1480
1524
|
border-radius: var(--pretable-radius);
|
|
1481
1525
|
}
|
|
1482
1526
|
|
|
1527
|
+
/* Validation messages occupy their own line; the field keeps the full
|
|
1528
|
+
column width instead of shrinking beside the error text. */
|
|
1529
|
+
:where(
|
|
1530
|
+
[data-pretable-cell][data-pretable-edit-status]:has(.pretable-cell-editor)
|
|
1531
|
+
) {
|
|
1532
|
+
flex-direction: column;
|
|
1533
|
+
align-items: stretch;
|
|
1534
|
+
justify-content: flex-start;
|
|
1535
|
+
padding: 0;
|
|
1536
|
+
}
|
|
1537
|
+
:where(
|
|
1538
|
+
[data-pretable-cell][data-pretable-edit-status]
|
|
1539
|
+
> :is(
|
|
1540
|
+
[data-pretable-number-editor],
|
|
1541
|
+
[data-pretable-enum-editor],
|
|
1542
|
+
[data-pretable-date-editor]
|
|
1543
|
+
)
|
|
1544
|
+
) {
|
|
1545
|
+
flex: 1;
|
|
1546
|
+
min-height: 0;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1483
1549
|
/* Cell editor (inline editing) */
|
|
1484
1550
|
:where(.pretable-cell-editor) {
|
|
1551
|
+
border-radius: 0;
|
|
1552
|
+
min-height: 0;
|
|
1553
|
+
min-width: 0;
|
|
1554
|
+
flex: 1;
|
|
1485
1555
|
width: 100%;
|
|
1486
1556
|
height: 100%;
|
|
1487
1557
|
box-sizing: border-box;
|
|
1488
|
-
padding:
|
|
1558
|
+
padding: 2px var(--pretable-cell-padding-x);
|
|
1489
1559
|
border: none;
|
|
1490
1560
|
outline: 2px solid var(--pretable-focus-ring);
|
|
1491
1561
|
outline-offset: -2px;
|
|
@@ -1532,7 +1602,10 @@
|
|
|
1532
1602
|
justify-content: center;
|
|
1533
1603
|
}
|
|
1534
1604
|
|
|
1535
|
-
:where(
|
|
1605
|
+
:where(
|
|
1606
|
+
[data-pretable-number-steppers]
|
|
1607
|
+
:is([data-pretable-number-increment], [data-pretable-number-decrement])
|
|
1608
|
+
) {
|
|
1536
1609
|
border: none;
|
|
1537
1610
|
background: var(--pretable-bg-header);
|
|
1538
1611
|
color: var(--pretable-text-header);
|
|
@@ -1542,11 +1615,27 @@
|
|
|
1542
1615
|
cursor: pointer;
|
|
1543
1616
|
}
|
|
1544
1617
|
|
|
1545
|
-
:where(
|
|
1618
|
+
:where(
|
|
1619
|
+
[data-pretable-number-steppers]
|
|
1620
|
+
:is(
|
|
1621
|
+
[data-pretable-number-increment],
|
|
1622
|
+
[data-pretable-number-decrement]
|
|
1623
|
+
):hover:not(:disabled)
|
|
1624
|
+
) {
|
|
1546
1625
|
background: var(--pretable-bg-hover);
|
|
1547
1626
|
}
|
|
1548
1627
|
|
|
1628
|
+
/* Preserve room for an ISO date and caret in narrow date columns. */
|
|
1629
|
+
:where([data-pretable-date-editor] .pretable-cell-editor) {
|
|
1630
|
+
padding-inline: 4px;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1549
1633
|
:where([data-pretable-edit-error]) {
|
|
1634
|
+
white-space: nowrap;
|
|
1635
|
+
flex: none;
|
|
1636
|
+
overflow: hidden;
|
|
1637
|
+
text-overflow: ellipsis;
|
|
1638
|
+
line-height: 1.2;
|
|
1550
1639
|
margin-top: 2px;
|
|
1551
1640
|
color: var(--pretable-text-error);
|
|
1552
1641
|
font-family: var(--pretable-font-sans);
|
|
@@ -1750,19 +1839,14 @@
|
|
|
1750
1839
|
overflow-y: auto;
|
|
1751
1840
|
}
|
|
1752
1841
|
|
|
1753
|
-
/*
|
|
1754
|
-
|
|
1755
|
-
|
|
1842
|
+
/* A kit text input: the kit rule at the top of this file draws the box, the
|
|
1843
|
+
rule border and the ink. What is the pane's own is the size and the
|
|
1844
|
+
spacing — full width, the 6px gap to the list below, and this pane's
|
|
1845
|
+
5px/7px inset rather than the kit's 6px inline. */
|
|
1756
1846
|
:where([data-pretable-tool-search]) {
|
|
1757
|
-
box-sizing: border-box;
|
|
1758
1847
|
inline-size: 100%;
|
|
1759
1848
|
margin-block-end: 6px;
|
|
1760
1849
|
padding: 5px 7px;
|
|
1761
|
-
border: 1px solid var(--pretable-rule);
|
|
1762
|
-
border-radius: var(--pretable-radius-control);
|
|
1763
|
-
background: var(--pretable-bg-grid);
|
|
1764
|
-
color: var(--pretable-text-cell);
|
|
1765
|
-
font: inherit;
|
|
1766
1850
|
}
|
|
1767
1851
|
|
|
1768
1852
|
/* Group labels split the list by pin state. Size and tracking do the
|
|
@@ -1983,11 +2067,11 @@
|
|
|
1983
2067
|
color: var(--pretable-text-dim);
|
|
1984
2068
|
}
|
|
1985
2069
|
|
|
1986
|
-
/* The single-value field.
|
|
1987
|
-
draws
|
|
1988
|
-
and
|
|
1989
|
-
the difference between "which column", "which operator"
|
|
1990
|
-
is the words inside the box, not the frame around it.
|
|
2070
|
+
/* The single-value field. A kit text input: the kit rule at the top of this
|
|
2071
|
+
file draws the frame, the surface, the ink and the font, so what is left
|
|
2072
|
+
here is size and flex participation — the same 24px the pickers beside it
|
|
2073
|
+
stand at, because the difference between "which column", "which operator"
|
|
2074
|
+
and "what value" is the words inside the box, not the frame around it.
|
|
1991
2075
|
`flex: 1 1 auto` WITH an explicit `min-inline-size`, which is the pair
|
|
1992
2076
|
that makes the wrapping row above work: a field's automatic minimum size
|
|
1993
2077
|
is its content, so one long value would hold the row wider than the pane
|
|
@@ -1999,22 +2083,11 @@
|
|
|
1999
2083
|
one states nothing.
|
|
2000
2084
|
24px is the height this section bought for the join and the add actions,
|
|
2001
2085
|
so the whole row clears 2.5.8 on every pointer rather than only where a
|
|
2002
|
-
coarse-pointer block applies.
|
|
2003
|
-
|
|
2004
|
-
join's longhands: UA stylesheets set their own font on form controls, and
|
|
2005
|
-
this rule sets no size of its own, so there is nothing for the shorthand
|
|
2006
|
-
to overwrite. */
|
|
2007
|
-
:where(input[data-pretable-filter-row-value]) {
|
|
2008
|
-
box-sizing: border-box;
|
|
2086
|
+
coarse-pointer block applies. */
|
|
2087
|
+
:where([data-pretable-filter-row-value]) {
|
|
2009
2088
|
flex: 1 1 auto;
|
|
2010
2089
|
min-inline-size: 24px;
|
|
2011
2090
|
block-size: 24px;
|
|
2012
|
-
padding-inline: 6px;
|
|
2013
|
-
border: 1px solid var(--pretable-rule);
|
|
2014
|
-
border-radius: var(--pretable-radius-control);
|
|
2015
|
-
background: var(--pretable-bg-grid);
|
|
2016
|
-
color: var(--pretable-text-cell);
|
|
2017
|
-
font: inherit;
|
|
2018
2091
|
}
|
|
2019
2092
|
/* The builder's pickers: size and flex participation only — the kit select
|
|
2020
2093
|
rule at the top of this file draws the box. `min-inline-size` matters for
|
|
@@ -2039,16 +2112,18 @@
|
|
|
2039
2112
|
/* The set shape's checklist, which is not a field: it takes its own line
|
|
2040
2113
|
(`flex-basis: 100%` in a wrapping row) because a column of checkboxes
|
|
2041
2114
|
beside three 24px controls would set the row's height to the number of
|
|
2042
|
-
choices.
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2115
|
+
choices. Its OWN attribute, not the field's: the wrapper wore
|
|
2116
|
+
`data-pretable-filter-row-value` while the field was a bare <input> and
|
|
2117
|
+
an element-type selector could tell the two apart. Both are kit controls
|
|
2118
|
+
now — the field is the kit's <input> — so one attribute on both would
|
|
2119
|
+
hand the wrapper the field's size rule. */
|
|
2120
|
+
:where([data-pretable-filter-row-set]) {
|
|
2046
2121
|
display: flex;
|
|
2047
2122
|
flex-direction: column;
|
|
2048
2123
|
gap: 2px;
|
|
2049
2124
|
flex-basis: 100%;
|
|
2050
2125
|
}
|
|
2051
|
-
:where(
|
|
2126
|
+
:where([data-pretable-filter-row-set]) label {
|
|
2052
2127
|
display: flex;
|
|
2053
2128
|
align-items: center;
|
|
2054
2129
|
gap: 6px;
|
|
@@ -2083,32 +2158,11 @@
|
|
|
2083
2158
|
);
|
|
2084
2159
|
color: var(--pretable-text-cell);
|
|
2085
2160
|
}
|
|
2086
|
-
/* The
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
`input[...-value]`, not the bare attribute: the set shape wears the same
|
|
2092
|
-
attribute on a <div> wrapper, which takes no focus. A rule that matched it
|
|
2093
|
-
would be inert today and would paint a ring around the whole checklist the
|
|
2094
|
-
day anything made that wrapper focusable — a state nobody would have
|
|
2095
|
-
designed. The FIELDS are what focus, so the field is what the selector
|
|
2096
|
-
names. */
|
|
2097
|
-
:where(input[data-pretable-filter-row-value]:focus-visible) {
|
|
2098
|
-
outline: 2px solid var(--pretable-focus-ring);
|
|
2099
|
-
outline-offset: -2px;
|
|
2100
|
-
}
|
|
2101
|
-
/* The checklist's checkboxes, which the rule above deliberately does not
|
|
2102
|
-
reach — they are inside the wrapper, not the wrapper. Without this they
|
|
2103
|
-
keep the UA's own focus ring, so tabbing through a set filter would change
|
|
2104
|
-
ring colour and shape halfway down a row that is otherwise entirely this
|
|
2105
|
-
section's. A POSITIVE offset, unlike every other ring here: a checkbox is
|
|
2106
|
-
~13px and paints to its own edge, so an inset ring would sit on top of the
|
|
2107
|
-
box instead of around it. */
|
|
2108
|
-
:where(div[data-pretable-filter-row-value]) input:focus-visible {
|
|
2109
|
-
outline: 2px solid var(--pretable-focus-ring);
|
|
2110
|
-
outline-offset: 1px;
|
|
2111
|
-
}
|
|
2161
|
+
/* The field's ring and the checklist's are both the KIT's now — the shared
|
|
2162
|
+
ring rule in the state section, plus the kit-level positive offset every
|
|
2163
|
+
checkbox takes. This section declared two of its own while these controls
|
|
2164
|
+
were bare elements; keeping them would be two more copies of one
|
|
2165
|
+
declaration to drift. */
|
|
2112
2166
|
|
|
2113
2167
|
/* The connective, which is the thing users misread — so it sits between
|
|
2114
2168
|
rows carrying the run's join rather than hiding in a group header. Two
|
|
@@ -2213,9 +2267,9 @@
|
|
|
2213
2267
|
flex-direction: row;
|
|
2214
2268
|
gap: 4px;
|
|
2215
2269
|
}
|
|
2216
|
-
/* The hide-grouped switch: a
|
|
2270
|
+
/* The hide-grouped switch: a kit checkbox and its clickable label on
|
|
2217
2271
|
one line, sized to the add button's 24px row so the stack keeps the
|
|
2218
|
-
rail's rhythm. */
|
|
2272
|
+
rail's rhythm. The ring is the kit's, here and in the checklists. */
|
|
2219
2273
|
:where([data-pretable-tool-grouping] label) {
|
|
2220
2274
|
display: inline-flex;
|
|
2221
2275
|
align-items: center;
|
|
@@ -2224,13 +2278,6 @@
|
|
|
2224
2278
|
block-size: 24px;
|
|
2225
2279
|
cursor: pointer;
|
|
2226
2280
|
}
|
|
2227
|
-
/* The checklist checkboxes' ring (its comment argues the POSITIVE offset:
|
|
2228
|
-
a ~13px box painting to its own edge would be covered by an inset
|
|
2229
|
-
ring), restated here because that rule is scoped to the filter rows. */
|
|
2230
|
-
:where(input[data-pretable-hide-grouped]:focus-visible) {
|
|
2231
|
-
outline: 2px solid var(--pretable-focus-ring);
|
|
2232
|
-
outline-offset: 1px;
|
|
2233
|
-
}
|
|
2234
2281
|
|
|
2235
2282
|
/* ---- Kit components: state -------------------------------------------
|
|
2236
2283
|
The ring and the disabled ink come LAST in the layer, after every site
|
|
@@ -2246,20 +2293,53 @@
|
|
|
2246
2293
|
:where(
|
|
2247
2294
|
[data-pretable-button]:focus-visible,
|
|
2248
2295
|
[data-pretable-icon-button]:focus-visible,
|
|
2249
|
-
[data-pretable-select]:focus-visible
|
|
2296
|
+
[data-pretable-select]:focus-visible,
|
|
2297
|
+
[data-pretable-text-input]:focus-visible,
|
|
2298
|
+
[data-pretable-textarea]:focus-visible,
|
|
2299
|
+
[data-pretable-checkbox]:focus-visible
|
|
2250
2300
|
) {
|
|
2251
2301
|
outline: 2px solid var(--pretable-focus-ring);
|
|
2252
2302
|
outline-offset: -2px;
|
|
2253
2303
|
}
|
|
2254
|
-
/*
|
|
2304
|
+
/* Editor errors win over the generic focused-field shorthand. */
|
|
2305
|
+
:where(.pretable-cell-editor[aria-invalid="true"]) {
|
|
2306
|
+
outline-color: var(--pretable-text-error);
|
|
2307
|
+
}
|
|
2308
|
+
/* A checkbox rings OUTSIDE its box, alone among the kit controls. The
|
|
2309
|
+
square is 16px and paints to its own edge — border, fill and glyph all
|
|
2310
|
+
the way out — so the inset ring above would land ON the box rather than
|
|
2311
|
+
around it, and the state would read as a recoloured border. The
|
|
2312
|
+
checklists' own rules said exactly this while they had one each; every
|
|
2313
|
+
checkbox gets it now, the four button sites included, which had the UA's
|
|
2314
|
+
ring before this component existed.
|
|
2315
|
+
AFTER the shared rule, not merged into it: both selectors are
|
|
2316
|
+
:where()-flattened to (0,0,0), so this only wins by source order. */
|
|
2317
|
+
:where([data-pretable-checkbox]:focus-visible) {
|
|
2318
|
+
outline-offset: 1px;
|
|
2319
|
+
}
|
|
2320
|
+
/* The standard disabled treatment (#573): dim by token, drop the pointer.
|
|
2321
|
+
These four controls all draw TEXT — a label, a committed value, typed
|
|
2322
|
+
input — so dimming the ink is what "disabled" looks like on them. */
|
|
2255
2323
|
:where(
|
|
2256
2324
|
[data-pretable-button]:disabled,
|
|
2257
2325
|
[data-pretable-icon-button]:disabled,
|
|
2258
|
-
[data-pretable-select]:disabled
|
|
2326
|
+
[data-pretable-select]:disabled,
|
|
2327
|
+
[data-pretable-text-input]:disabled,
|
|
2328
|
+
[data-pretable-textarea]:disabled
|
|
2259
2329
|
) {
|
|
2260
2330
|
color: var(--pretable-text-dim);
|
|
2261
2331
|
cursor: default;
|
|
2262
2332
|
}
|
|
2333
|
+
/* A disabled checkbox keeps a legible tick on the grid surface. Changing
|
|
2334
|
+
fill together with ink avoids dim ink on an accent fill. A dashed border
|
|
2335
|
+
distinguishes the unchecked disabled state without relying on opacity. */
|
|
2336
|
+
:where([data-pretable-checkbox]:disabled) {
|
|
2337
|
+
background: var(--pretable-bg-grid);
|
|
2338
|
+
color: var(--pretable-text-dim);
|
|
2339
|
+
border-color: var(--pretable-text-dim);
|
|
2340
|
+
border-style: dashed;
|
|
2341
|
+
cursor: default;
|
|
2342
|
+
}
|
|
2263
2343
|
|
|
2264
2344
|
/* ---- Coarse pointers -------------------------------------------------- */
|
|
2265
2345
|
|
|
@@ -2466,7 +2546,10 @@
|
|
|
2466
2546
|
[data-pretable-menu-item]:disabled,
|
|
2467
2547
|
[data-pretable-button]:disabled,
|
|
2468
2548
|
[data-pretable-icon-button]:disabled,
|
|
2469
|
-
[data-pretable-select]:disabled
|
|
2549
|
+
[data-pretable-select]:disabled,
|
|
2550
|
+
[data-pretable-text-input]:disabled,
|
|
2551
|
+
[data-pretable-textarea]:disabled,
|
|
2552
|
+
[data-pretable-checkbox]:disabled
|
|
2470
2553
|
) {
|
|
2471
2554
|
color: GrayText;
|
|
2472
2555
|
}
|
|
@@ -2480,6 +2563,96 @@
|
|
|
2480
2563
|
background-color: Highlight;
|
|
2481
2564
|
color: HighlightText;
|
|
2482
2565
|
}
|
|
2566
|
+
/* A checked box is an author fill and an author glyph colour, both of
|
|
2567
|
+
which the UA erases — leaving a checked checkbox identical to an
|
|
2568
|
+
unchecked one, which is the whole of what the control says. Answered
|
|
2569
|
+
exactly as the committed option above: the system's guaranteed pair,
|
|
2570
|
+
and `forced-color-adjust: none` so the pair survives. The glyph is
|
|
2571
|
+
drawn in currentColor, so HighlightText carries it too. */
|
|
2572
|
+
:where([data-pretable-checkbox][aria-checked="true"]),
|
|
2573
|
+
:where([data-pretable-checkbox][aria-checked="mixed"]) {
|
|
2574
|
+
forced-color-adjust: none;
|
|
2575
|
+
background-color: Highlight;
|
|
2576
|
+
border-color: Highlight;
|
|
2577
|
+
outline-color: CanvasText;
|
|
2578
|
+
color: HighlightText;
|
|
2579
|
+
}
|
|
2580
|
+
/* Disabled wins over both committed selection and checked/mixed state.
|
|
2581
|
+
Canvas/GrayText is the platform disabled pair. The dashed selected
|
|
2582
|
+
outline preserves the committed mark without using an enabled fill. */
|
|
2583
|
+
:where([data-pretable-option][aria-disabled="true"]) {
|
|
2584
|
+
forced-color-adjust: none;
|
|
2585
|
+
background-color: Canvas;
|
|
2586
|
+
color: GrayText;
|
|
2587
|
+
border-color: GrayText;
|
|
2588
|
+
}
|
|
2589
|
+
:where([data-pretable-option][aria-disabled="true"][aria-selected="true"]) {
|
|
2590
|
+
outline: 1px dashed GrayText;
|
|
2591
|
+
outline-offset: -2px;
|
|
2592
|
+
}
|
|
2593
|
+
/* DOM focus stays on the trigger; this is the visible roving focus.
|
|
2594
|
+
currentColor pairs with Canvas, Highlight, or the disabled surface. */
|
|
2595
|
+
:where([data-pretable-option][data-pretable-active]) {
|
|
2596
|
+
outline: 2px solid currentColor;
|
|
2597
|
+
outline-offset: -2px;
|
|
2598
|
+
}
|
|
2599
|
+
:where([data-pretable-checkbox]:disabled) {
|
|
2600
|
+
forced-color-adjust: none;
|
|
2601
|
+
background-color: Canvas;
|
|
2602
|
+
color: GrayText;
|
|
2603
|
+
border-color: GrayText;
|
|
2604
|
+
outline-color: GrayText;
|
|
2605
|
+
}
|
|
2606
|
+
:where(
|
|
2607
|
+
[data-pretable-number-increment],
|
|
2608
|
+
[data-pretable-number-decrement],
|
|
2609
|
+
[data-pretable-date-previous-month],
|
|
2610
|
+
[data-pretable-date-next-month]
|
|
2611
|
+
) {
|
|
2612
|
+
forced-color-adjust: none;
|
|
2613
|
+
background-color: Canvas;
|
|
2614
|
+
color: CanvasText;
|
|
2615
|
+
border-color: CanvasText;
|
|
2616
|
+
outline-color: CanvasText;
|
|
2617
|
+
}
|
|
2618
|
+
:where(
|
|
2619
|
+
[data-pretable-number-increment]:disabled,
|
|
2620
|
+
[data-pretable-number-decrement]:disabled,
|
|
2621
|
+
[data-pretable-date-previous-month]:disabled,
|
|
2622
|
+
[data-pretable-date-next-month]:disabled
|
|
2623
|
+
) {
|
|
2624
|
+
color: GrayText;
|
|
2625
|
+
}
|
|
2626
|
+
:where([data-pretable-date-day]) {
|
|
2627
|
+
box-shadow: none;
|
|
2628
|
+
forced-color-adjust: none;
|
|
2629
|
+
background-color: Canvas;
|
|
2630
|
+
color: CanvasText;
|
|
2631
|
+
}
|
|
2632
|
+
:where([data-pretable-date-day][aria-selected="true"]) {
|
|
2633
|
+
background-color: Highlight;
|
|
2634
|
+
color: HighlightText;
|
|
2635
|
+
}
|
|
2636
|
+
:where([data-pretable-date-day][data-pretable-date-today]) {
|
|
2637
|
+
text-decoration: underline;
|
|
2638
|
+
}
|
|
2639
|
+
:where([data-pretable-date-day][aria-disabled="true"]) {
|
|
2640
|
+
background-color: Canvas;
|
|
2641
|
+
color: GrayText;
|
|
2642
|
+
}
|
|
2643
|
+
:where([data-pretable-date-day][data-pretable-date-active]) {
|
|
2644
|
+
outline: 2px solid currentColor;
|
|
2645
|
+
outline-offset: -2px;
|
|
2646
|
+
}
|
|
2647
|
+
:where(.pretable-cell-editor) {
|
|
2648
|
+
forced-color-adjust: none;
|
|
2649
|
+
background-color: Canvas;
|
|
2650
|
+
color: CanvasText;
|
|
2651
|
+
outline-color: Highlight;
|
|
2652
|
+
}
|
|
2653
|
+
:where(.pretable-cell-editor[aria-invalid="true"]) {
|
|
2654
|
+
outline: 2px dashed CanvasText;
|
|
2655
|
+
}
|
|
2483
2656
|
}
|
|
2484
2657
|
|
|
2485
2658
|
/* Reduced motion. Every animated declaration in this file is named here:
|