@gridkitjs/theme-tailwind 0.8.1 → 0.10.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/README.md +1 -1
- package/package.json +3 -3
- package/src/styles.css +698 -22
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @gridkitjs/theme-tailwind
|
|
2
2
|
|
|
3
|
-
Tailwind v4 theme for [GridKit](https://github.com/
|
|
3
|
+
Tailwind v4 theme for [GridKit](https://github.com/gridkitjs/gridkitjs) —
|
|
4
4
|
palette tokens, dark mode and the grid's styles.
|
|
5
5
|
|
|
6
6
|
> **Early development.** The API is still moving and may break between minor
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridkitjs/theme-tailwind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Tailwind v4 theme for GridKit — palette tokens, dark mode and grid styles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Blagoja Blazhevski",
|
|
7
|
-
"homepage": "https://github.com/
|
|
7
|
+
"homepage": "https://github.com/gridkitjs/gridkitjs#readme",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/gridkitjs/gridkitjs.git",
|
|
11
11
|
"directory": "packages/theme-tailwind"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [
|
package/src/styles.css
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
* than `:root` simply wins.
|
|
25
25
|
*/
|
|
26
26
|
:root {
|
|
27
|
+
--gridkit-radius: 0.25rem;
|
|
27
28
|
--gridkit-surface-light: oklch(1 0 0);
|
|
28
29
|
--gridkit-surface-dark: oklch(0.21 0.01 250);
|
|
29
30
|
--gridkit-surface-muted-light: oklch(0.97 0.003 250);
|
|
@@ -126,6 +127,7 @@
|
|
|
126
127
|
*/
|
|
127
128
|
.gridkit-data-grid-viewport {
|
|
128
129
|
overflow-x: auto;
|
|
130
|
+
border-radius: var(--gridkit-radius);
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
/*
|
|
@@ -148,6 +150,61 @@
|
|
|
148
150
|
height: var(--gridkit-body-height, auto);
|
|
149
151
|
}
|
|
150
152
|
|
|
153
|
+
/*
|
|
154
|
+
* Slim scrollbars on the grid's own scroll regions, never on the page: the
|
|
155
|
+
* viewport, the row area, the menus, and the column chooser and filter
|
|
156
|
+
* checklist lists. The thumb is the muted text colour thinned out, so it
|
|
157
|
+
* follows the light/dark swap above with no tokens of its own. Chromium
|
|
158
|
+
* and Firefox honour `scrollbar-width`/`scrollbar-color`; the
|
|
159
|
+
* `::-webkit-scrollbar` rules are only for engines that do not, since a
|
|
160
|
+
* browser that supports the standard properties ignores them anyway.
|
|
161
|
+
*/
|
|
162
|
+
.gridkit-data-grid-viewport,
|
|
163
|
+
.gridkit-data-grid-body,
|
|
164
|
+
.gridkit-menu,
|
|
165
|
+
.column-chooser-list,
|
|
166
|
+
.filter-menu-checklist {
|
|
167
|
+
scrollbar-width: thin;
|
|
168
|
+
scrollbar-color: color-mix(
|
|
169
|
+
in oklch,
|
|
170
|
+
var(--gridkit-fg-muted) 45%,
|
|
171
|
+
transparent
|
|
172
|
+
)
|
|
173
|
+
transparent;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@supports not (scrollbar-color: auto) {
|
|
177
|
+
.gridkit-data-grid-viewport::-webkit-scrollbar,
|
|
178
|
+
.gridkit-data-grid-body::-webkit-scrollbar,
|
|
179
|
+
.gridkit-menu::-webkit-scrollbar,
|
|
180
|
+
.column-chooser-list::-webkit-scrollbar,
|
|
181
|
+
.filter-menu-checklist::-webkit-scrollbar {
|
|
182
|
+
width: 8px;
|
|
183
|
+
height: 8px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.gridkit-data-grid-viewport::-webkit-scrollbar-track,
|
|
187
|
+
.gridkit-data-grid-body::-webkit-scrollbar-track,
|
|
188
|
+
.gridkit-menu::-webkit-scrollbar-track,
|
|
189
|
+
.column-chooser-list::-webkit-scrollbar-track,
|
|
190
|
+
.filter-menu-checklist::-webkit-scrollbar-track {
|
|
191
|
+
background: transparent;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.gridkit-data-grid-viewport::-webkit-scrollbar-thumb,
|
|
195
|
+
.gridkit-data-grid-body::-webkit-scrollbar-thumb,
|
|
196
|
+
.gridkit-menu::-webkit-scrollbar-thumb,
|
|
197
|
+
.column-chooser-list::-webkit-scrollbar-thumb,
|
|
198
|
+
.filter-menu-checklist::-webkit-scrollbar-thumb {
|
|
199
|
+
background-color: color-mix(
|
|
200
|
+
in oklch,
|
|
201
|
+
var(--gridkit-fg-muted) 45%,
|
|
202
|
+
transparent
|
|
203
|
+
);
|
|
204
|
+
border-radius: 4px;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
151
208
|
/*
|
|
152
209
|
* Read but not seen — the grid's live region, which reports a reorder or a
|
|
153
210
|
* resize that only a sighted user could otherwise notice.
|
|
@@ -441,6 +498,54 @@
|
|
|
441
498
|
color: var(--gridkit-accent);
|
|
442
499
|
}
|
|
443
500
|
|
|
501
|
+
/*
|
|
502
|
+
* Docked to the header's end, absolutely, for the sort toggle's reasons —
|
|
503
|
+
* at the very end, where a spreadsheet keeps its filter button, with a
|
|
504
|
+
* sortable column's sort toggle moved over beside it. Hidden until the
|
|
505
|
+
* header is hovered or focused, as an unsorted sort toggle is, and shown,
|
|
506
|
+
* filled in accent, while the column is filtered: the one sign of it on
|
|
507
|
+
* screen.
|
|
508
|
+
*/
|
|
509
|
+
.gridkit-data-grid .header-filter-toggle {
|
|
510
|
+
display: inline-flex;
|
|
511
|
+
position: absolute;
|
|
512
|
+
top: 50%;
|
|
513
|
+
right: 0.75rem;
|
|
514
|
+
transform: translateY(-50%);
|
|
515
|
+
align-items: center;
|
|
516
|
+
cursor: pointer;
|
|
517
|
+
color: var(--gridkit-fg-muted);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.gridkit-data-grid .header-filter-toggle svg {
|
|
521
|
+
width: 14px;
|
|
522
|
+
height: 14px;
|
|
523
|
+
flex-shrink: 0;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.gridkit-data-grid .header-filter-toggle:not(.is-filtered) {
|
|
527
|
+
opacity: 0;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.gridkit-data-grid .grid-header .header-cell:hover .header-filter-toggle,
|
|
531
|
+
.gridkit-data-grid .header-cell:focus-visible .header-filter-toggle {
|
|
532
|
+
opacity: 1;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.gridkit-data-grid .header-filter-toggle.is-filtered {
|
|
536
|
+
color: var(--gridkit-accent);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.gridkit-data-grid .header-filter-toggle.is-filtered svg {
|
|
540
|
+
fill: currentColor;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.gridkit-data-grid
|
|
544
|
+
.header-cell:has(> .header-filter-toggle)
|
|
545
|
+
.header-sort-toggle {
|
|
546
|
+
right: 2rem;
|
|
547
|
+
}
|
|
548
|
+
|
|
444
549
|
.gridkit-data-grid .grid-cell {
|
|
445
550
|
padding: 0.5rem;
|
|
446
551
|
}
|
|
@@ -1029,7 +1134,7 @@
|
|
|
1029
1134
|
display: flex;
|
|
1030
1135
|
flex-wrap: wrap;
|
|
1031
1136
|
align-items: center;
|
|
1032
|
-
gap: 1rem;
|
|
1137
|
+
gap: 0.5rem 1rem;
|
|
1033
1138
|
padding: 0.5rem;
|
|
1034
1139
|
font-size: 0.8125rem;
|
|
1035
1140
|
color: var(--gridkit-fg);
|
|
@@ -1037,14 +1142,75 @@
|
|
|
1037
1142
|
border-top: 1px solid var(--gridkit-line);
|
|
1038
1143
|
}
|
|
1039
1144
|
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1145
|
+
/*
|
|
1146
|
+
* First, previous, the page numbers (or the compact status), next and
|
|
1147
|
+
* last as adjoining segments of one bar: an outer hairline, a shared one
|
|
1148
|
+
* between segments, and the radius on the bar's outer corners only. Every
|
|
1149
|
+
* number slot is the same width, sized by `--gridkit-pager-digits` (the
|
|
1150
|
+
* page count's digits, which the pager sets) in tabular numerals, so with
|
|
1151
|
+
* `paginationWindow`'s constant slot count the arrows never move.
|
|
1152
|
+
*/
|
|
1153
|
+
.grid-pager-bar {
|
|
1154
|
+
--gridkit-pager-segment: 2rem;
|
|
1155
|
+
display: inline-flex;
|
|
1156
|
+
align-items: stretch;
|
|
1157
|
+
height: var(--gridkit-pager-segment);
|
|
1158
|
+
font-variant-numeric: tabular-nums;
|
|
1045
1159
|
background-color: var(--gridkit-surface);
|
|
1046
1160
|
border: 1px solid var(--gridkit-line);
|
|
1047
|
-
border-radius:
|
|
1161
|
+
border-radius: var(--gridkit-radius);
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
.grid-pager-button,
|
|
1165
|
+
.grid-pager-ellipsis,
|
|
1166
|
+
.grid-pager-status-slot {
|
|
1167
|
+
position: relative;
|
|
1168
|
+
box-sizing: border-box;
|
|
1169
|
+
display: inline-flex;
|
|
1170
|
+
align-items: center;
|
|
1171
|
+
justify-content: center;
|
|
1172
|
+
min-width: var(--gridkit-pager-segment);
|
|
1173
|
+
margin: 0;
|
|
1174
|
+
padding: 0;
|
|
1175
|
+
font: inherit;
|
|
1176
|
+
line-height: 1;
|
|
1177
|
+
color: var(--gridkit-fg);
|
|
1178
|
+
background-color: transparent;
|
|
1179
|
+
border: 0;
|
|
1180
|
+
border-inline-start: 1px solid var(--gridkit-line);
|
|
1181
|
+
border-radius: 0;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
.grid-pager-bar > :first-child {
|
|
1185
|
+
border-inline-start: 0;
|
|
1186
|
+
border-start-start-radius: calc(var(--gridkit-radius) - 1px);
|
|
1187
|
+
border-end-start-radius: calc(var(--gridkit-radius) - 1px);
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
.grid-pager-bar > :last-child {
|
|
1191
|
+
border-start-end-radius: calc(var(--gridkit-radius) - 1px);
|
|
1192
|
+
border-end-end-radius: calc(var(--gridkit-radius) - 1px);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
.grid-pager-button {
|
|
1196
|
+
cursor: pointer;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
.grid-pager-page,
|
|
1200
|
+
.grid-pager-ellipsis {
|
|
1201
|
+
width: max(
|
|
1202
|
+
var(--gridkit-pager-segment),
|
|
1203
|
+
calc(var(--gridkit-pager-digits, 1) * 1ch + 1rem)
|
|
1204
|
+
);
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
.grid-pager-nav svg {
|
|
1208
|
+
width: 1rem;
|
|
1209
|
+
height: 1rem;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
.grid-pager-nav:dir(rtl) svg {
|
|
1213
|
+
transform: scaleX(-1);
|
|
1048
1214
|
}
|
|
1049
1215
|
|
|
1050
1216
|
.grid-pager-button:hover:not(:disabled) {
|
|
@@ -1052,46 +1218,68 @@
|
|
|
1052
1218
|
}
|
|
1053
1219
|
|
|
1054
1220
|
.grid-pager-button:focus-visible {
|
|
1221
|
+
z-index: 2;
|
|
1055
1222
|
outline: 2px solid var(--gridkit-accent);
|
|
1056
|
-
outline-offset:
|
|
1223
|
+
outline-offset: -2px;
|
|
1057
1224
|
}
|
|
1058
1225
|
|
|
1059
1226
|
.grid-pager-button:disabled {
|
|
1060
1227
|
color: var(--gridkit-fg-muted);
|
|
1061
1228
|
cursor: default;
|
|
1062
|
-
opacity: 0.
|
|
1229
|
+
opacity: 0.45;
|
|
1063
1230
|
}
|
|
1064
1231
|
|
|
1065
|
-
.grid-pager-button[aria-current="page"]
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1232
|
+
.grid-pager-button[aria-current="page"],
|
|
1233
|
+
.grid-pager-button[aria-current="page"]:hover:not(:disabled) {
|
|
1234
|
+
z-index: 1;
|
|
1235
|
+
color: var(--gridkit-accent);
|
|
1236
|
+
background-color: var(--gridkit-selected);
|
|
1237
|
+
box-shadow: inset 0 0 0 1px var(--gridkit-accent);
|
|
1069
1238
|
}
|
|
1070
1239
|
|
|
1071
|
-
.grid-pager-
|
|
1072
|
-
|
|
1240
|
+
.grid-pager-ellipsis {
|
|
1241
|
+
color: var(--gridkit-fg-muted);
|
|
1242
|
+
cursor: default;
|
|
1243
|
+
user-select: none;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
/*
|
|
1247
|
+
* The compact status, stacked on an invisible copy of its widest text so
|
|
1248
|
+
* its segment keeps one width from the first page to the last.
|
|
1249
|
+
*/
|
|
1250
|
+
.grid-pager-status-slot {
|
|
1251
|
+
display: inline-grid;
|
|
1252
|
+
padding: 0 0.75rem;
|
|
1253
|
+
white-space: nowrap;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
.grid-pager-status,
|
|
1257
|
+
.grid-pager-status-sizer {
|
|
1258
|
+
grid-area: 1 / 1;
|
|
1259
|
+
text-align: center;
|
|
1073
1260
|
}
|
|
1074
1261
|
|
|
1075
1262
|
.grid-pager-status {
|
|
1076
1263
|
color: var(--gridkit-fg-muted);
|
|
1077
1264
|
}
|
|
1078
1265
|
|
|
1079
|
-
.grid-pager-
|
|
1080
|
-
|
|
1081
|
-
font-size: 0.8125rem;
|
|
1082
|
-
color: var(--gridkit-fg-muted);
|
|
1266
|
+
.grid-pager-status-sizer {
|
|
1267
|
+
visibility: hidden;
|
|
1083
1268
|
}
|
|
1084
1269
|
|
|
1085
1270
|
.grid-pager-page-size {
|
|
1086
1271
|
display: inline-flex;
|
|
1087
1272
|
align-items: center;
|
|
1088
|
-
gap: 0.
|
|
1089
|
-
margin-inline-start: auto;
|
|
1273
|
+
gap: 0.5rem;
|
|
1090
1274
|
color: var(--gridkit-fg-muted);
|
|
1091
1275
|
}
|
|
1092
1276
|
|
|
1093
1277
|
.grid-pager-page-size select {
|
|
1094
|
-
|
|
1278
|
+
box-sizing: border-box;
|
|
1279
|
+
height: 2rem;
|
|
1280
|
+
padding: 0 0.375rem;
|
|
1281
|
+
font: inherit;
|
|
1282
|
+
font-variant-numeric: tabular-nums;
|
|
1095
1283
|
color: var(--gridkit-fg);
|
|
1096
1284
|
background-color: var(--gridkit-surface);
|
|
1097
1285
|
border: 1px solid var(--gridkit-line);
|
|
@@ -1323,4 +1511,492 @@
|
|
|
1323
1511
|
padding: 0.25rem;
|
|
1324
1512
|
color: var(--gridkit-fg-muted);
|
|
1325
1513
|
}
|
|
1514
|
+
|
|
1515
|
+
/*
|
|
1516
|
+
* A column's filter menu, an overlay like the chooser: the column's sort
|
|
1517
|
+
* entries, its editor, then its buttons. A fixed width, so the panel does
|
|
1518
|
+
* not jump sideways as its editor changes.
|
|
1519
|
+
*/
|
|
1520
|
+
.gridkit-filter-menu {
|
|
1521
|
+
box-sizing: border-box;
|
|
1522
|
+
width: 18rem;
|
|
1523
|
+
padding: 0.5rem;
|
|
1524
|
+
font-size: 0.875rem;
|
|
1525
|
+
background-color: var(--gridkit-surface);
|
|
1526
|
+
border: 1px solid var(--gridkit-line);
|
|
1527
|
+
border-radius: 0.375rem;
|
|
1528
|
+
box-shadow: 0 4px 12px oklch(0 0 0 / 0.15);
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
.filter-menu-form {
|
|
1532
|
+
display: flex;
|
|
1533
|
+
flex-direction: column;
|
|
1534
|
+
gap: 0.5rem;
|
|
1535
|
+
margin: 0;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
/* The sort entries, drawn as a menu's items and set apart from the editor. */
|
|
1539
|
+
.filter-menu-sort {
|
|
1540
|
+
display: flex;
|
|
1541
|
+
flex-direction: column;
|
|
1542
|
+
padding-bottom: 0.375rem;
|
|
1543
|
+
border-bottom: 1px solid var(--gridkit-line);
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
.filter-menu-sort-item {
|
|
1547
|
+
display: flex;
|
|
1548
|
+
align-items: center;
|
|
1549
|
+
gap: 0.5rem;
|
|
1550
|
+
padding: 0.375rem 0.5rem;
|
|
1551
|
+
font: inherit;
|
|
1552
|
+
color: inherit;
|
|
1553
|
+
text-align: start;
|
|
1554
|
+
background: none;
|
|
1555
|
+
border: 0;
|
|
1556
|
+
border-radius: 0.25rem;
|
|
1557
|
+
cursor: pointer;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
.filter-menu-sort-item:hover {
|
|
1561
|
+
background-color: var(--gridkit-surface-muted);
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
.filter-menu-sort-item:focus-visible {
|
|
1565
|
+
outline: 2px solid var(--gridkit-accent);
|
|
1566
|
+
outline-offset: -2px;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
.filter-menu-sort-item:disabled {
|
|
1570
|
+
color: var(--gridkit-fg-muted);
|
|
1571
|
+
background: none;
|
|
1572
|
+
cursor: default;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
/* Always there, empty for "Clear sort", so every label starts in line. */
|
|
1576
|
+
.filter-menu-sort-icon {
|
|
1577
|
+
display: inline-flex;
|
|
1578
|
+
flex-shrink: 0;
|
|
1579
|
+
align-items: center;
|
|
1580
|
+
justify-content: center;
|
|
1581
|
+
width: 1rem;
|
|
1582
|
+
height: 1rem;
|
|
1583
|
+
color: var(--gridkit-fg-muted);
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
.filter-menu-sort-icon svg {
|
|
1587
|
+
width: 1rem;
|
|
1588
|
+
height: 1rem;
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
/* The direction the column sorts in now. */
|
|
1592
|
+
.filter-menu-sort-item[aria-pressed="true"] .filter-menu-sort-icon {
|
|
1593
|
+
color: var(--gridkit-accent);
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
/*
|
|
1597
|
+
* The simple editor: its conditions in a column, And/Or between them, and
|
|
1598
|
+
* the message under them while one is marked invalid.
|
|
1599
|
+
*/
|
|
1600
|
+
.filter-menu-conditions {
|
|
1601
|
+
display: flex;
|
|
1602
|
+
flex-direction: column;
|
|
1603
|
+
gap: 0.5rem;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
/*
|
|
1607
|
+
* "Custom filter", or "Filtered by condition" above a checklist: a filter
|
|
1608
|
+
* the editor can't show, until it applies one in its place.
|
|
1609
|
+
*/
|
|
1610
|
+
.filter-menu-custom {
|
|
1611
|
+
margin: 0;
|
|
1612
|
+
padding: 0.25rem 0.5rem;
|
|
1613
|
+
color: var(--gridkit-fg-muted);
|
|
1614
|
+
background-color: var(--gridkit-surface-muted);
|
|
1615
|
+
border-radius: 0.25rem;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
/*
|
|
1619
|
+
* The operator picker on a line of its own, the value boxes sharing the
|
|
1620
|
+
* next: one fills it, and a "Between"'s two halve it.
|
|
1621
|
+
*/
|
|
1622
|
+
.filter-menu-condition {
|
|
1623
|
+
display: flex;
|
|
1624
|
+
flex-wrap: wrap;
|
|
1625
|
+
gap: 0.375rem;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
.filter-menu-operator,
|
|
1629
|
+
.filter-menu-value {
|
|
1630
|
+
box-sizing: border-box;
|
|
1631
|
+
min-width: 0;
|
|
1632
|
+
padding: 0.25rem 0.5rem;
|
|
1633
|
+
font: inherit;
|
|
1634
|
+
color: var(--gridkit-fg);
|
|
1635
|
+
background-color: var(--gridkit-surface);
|
|
1636
|
+
border: 1px solid var(--gridkit-line);
|
|
1637
|
+
border-radius: 0.25rem;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
.filter-menu-operator {
|
|
1641
|
+
flex-basis: 100%;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
.filter-menu-value {
|
|
1645
|
+
flex: 1 1 0;
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
.filter-menu-operator:focus-visible,
|
|
1649
|
+
.filter-menu-value:focus-visible {
|
|
1650
|
+
outline: 2px solid var(--gridkit-accent);
|
|
1651
|
+
outline-offset: 1px;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
/*
|
|
1655
|
+
* No palette token names an error colour, so a marked box and its message
|
|
1656
|
+
* take the accent turned red — as light or dark as the accent, in either
|
|
1657
|
+
* palette — over the text colour where that syntax is not supported.
|
|
1658
|
+
*/
|
|
1659
|
+
.filter-menu-value[aria-invalid="true"] {
|
|
1660
|
+
border-color: var(--gridkit-fg);
|
|
1661
|
+
border-color: oklch(from var(--gridkit-accent) l c 25);
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
.filter-menu-invalid {
|
|
1665
|
+
margin: 0;
|
|
1666
|
+
color: var(--gridkit-fg);
|
|
1667
|
+
color: oklch(from var(--gridkit-accent) l c 25);
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
/* And/Or, native radio buttons between the two conditions. */
|
|
1671
|
+
.filter-menu-combinator {
|
|
1672
|
+
display: flex;
|
|
1673
|
+
gap: 1rem;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
.filter-menu-combinator-option {
|
|
1677
|
+
display: inline-flex;
|
|
1678
|
+
align-items: center;
|
|
1679
|
+
gap: 0.375rem;
|
|
1680
|
+
cursor: pointer;
|
|
1681
|
+
user-select: none;
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
.filter-menu-combinator-option input {
|
|
1685
|
+
margin: 0;
|
|
1686
|
+
accent-color: var(--gridkit-accent);
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
.filter-menu-combinator-option input:focus-visible {
|
|
1690
|
+
outline: 2px solid var(--gridkit-accent);
|
|
1691
|
+
outline-offset: 1px;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
/*
|
|
1695
|
+
* The excel editor: a search box, "Select all", then the checklist of the
|
|
1696
|
+
* column's values, with a note above or below it when one applies.
|
|
1697
|
+
*/
|
|
1698
|
+
.filter-menu-values {
|
|
1699
|
+
display: flex;
|
|
1700
|
+
flex-direction: column;
|
|
1701
|
+
gap: 0.375rem;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
/*
|
|
1705
|
+
* The excel editor's "Number filters" button, drawn as a menu item whose
|
|
1706
|
+
* submenu opens beside it, and "Back to values" above a condition it
|
|
1707
|
+
* chose: the sort entries' look, an icon before the label in line with
|
|
1708
|
+
* theirs.
|
|
1709
|
+
*/
|
|
1710
|
+
.filter-menu-submenu,
|
|
1711
|
+
.filter-menu-back {
|
|
1712
|
+
display: flex;
|
|
1713
|
+
align-items: center;
|
|
1714
|
+
gap: 0.5rem;
|
|
1715
|
+
padding: 0.375rem 0.5rem;
|
|
1716
|
+
font: inherit;
|
|
1717
|
+
color: inherit;
|
|
1718
|
+
text-align: start;
|
|
1719
|
+
background: none;
|
|
1720
|
+
border: 0;
|
|
1721
|
+
border-radius: 0.25rem;
|
|
1722
|
+
cursor: pointer;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
.filter-menu-submenu:hover,
|
|
1726
|
+
.filter-menu-submenu[aria-expanded="true"],
|
|
1727
|
+
.filter-menu-back:hover {
|
|
1728
|
+
background-color: var(--gridkit-surface-muted);
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
.filter-menu-submenu:focus-visible,
|
|
1732
|
+
.filter-menu-back:focus-visible {
|
|
1733
|
+
outline: 2px solid var(--gridkit-accent);
|
|
1734
|
+
outline-offset: -2px;
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
.filter-menu-submenu-icon,
|
|
1738
|
+
.filter-menu-submenu-indicator,
|
|
1739
|
+
.filter-menu-back-icon {
|
|
1740
|
+
display: inline-flex;
|
|
1741
|
+
flex-shrink: 0;
|
|
1742
|
+
align-items: center;
|
|
1743
|
+
justify-content: center;
|
|
1744
|
+
width: 1rem;
|
|
1745
|
+
height: 1rem;
|
|
1746
|
+
color: var(--gridkit-fg-muted);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
.filter-menu-submenu svg,
|
|
1750
|
+
.filter-menu-back svg {
|
|
1751
|
+
width: 1rem;
|
|
1752
|
+
height: 1rem;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
/* Ticked while the column is filtered by conditions, as Excel's is. */
|
|
1756
|
+
.filter-menu-submenu-icon {
|
|
1757
|
+
color: var(--gridkit-accent);
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
/* The submenu's chevron, at the end of the line. */
|
|
1761
|
+
.filter-menu-submenu-indicator {
|
|
1762
|
+
margin-inline-start: auto;
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
.filter-menu-search {
|
|
1766
|
+
box-sizing: border-box;
|
|
1767
|
+
width: 100%;
|
|
1768
|
+
padding: 0.25rem 0.5rem;
|
|
1769
|
+
font: inherit;
|
|
1770
|
+
color: var(--gridkit-fg);
|
|
1771
|
+
background-color: var(--gridkit-surface);
|
|
1772
|
+
border: 1px solid var(--gridkit-line);
|
|
1773
|
+
border-radius: 0.25rem;
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
.filter-menu-search::placeholder {
|
|
1777
|
+
color: var(--gridkit-fg-muted);
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
.filter-menu-search:focus-visible {
|
|
1781
|
+
outline: 2px solid var(--gridkit-accent);
|
|
1782
|
+
outline-offset: 1px;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
/* A native checkbox, in line with the drawn ones in the list below. */
|
|
1786
|
+
.filter-menu-select-all {
|
|
1787
|
+
display: flex;
|
|
1788
|
+
align-items: center;
|
|
1789
|
+
gap: 0.5rem;
|
|
1790
|
+
padding: 0.25rem calc(0.5rem + 1px);
|
|
1791
|
+
cursor: pointer;
|
|
1792
|
+
user-select: none;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
.filter-menu-select-all input {
|
|
1796
|
+
flex-shrink: 0;
|
|
1797
|
+
width: 1rem;
|
|
1798
|
+
height: 1rem;
|
|
1799
|
+
margin: 0;
|
|
1800
|
+
accent-color: var(--gridkit-accent);
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
.filter-menu-select-all input:focus-visible {
|
|
1804
|
+
outline: 2px solid var(--gridkit-accent);
|
|
1805
|
+
outline-offset: 1px;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
/* Nothing to select: the search matches no value. */
|
|
1809
|
+
.filter-menu-select-all:has(> input:disabled) {
|
|
1810
|
+
color: var(--gridkit-fg-muted);
|
|
1811
|
+
cursor: default;
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
/*
|
|
1815
|
+
* The list scrolls inside itself, at a fixed height: the menu keeps its
|
|
1816
|
+
* size as a search narrows the list, and the virtualizer windowing it
|
|
1817
|
+
* knows from the start how many values it shows. "Type to search …"
|
|
1818
|
+
* takes the same box while the list waits for a search.
|
|
1819
|
+
*/
|
|
1820
|
+
.filter-menu-checklist,
|
|
1821
|
+
.filter-menu-search-first {
|
|
1822
|
+
box-sizing: border-box;
|
|
1823
|
+
height: 12rem;
|
|
1824
|
+
margin: 0;
|
|
1825
|
+
border: 1px solid var(--gridkit-line);
|
|
1826
|
+
border-radius: 0.25rem;
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
.filter-menu-checklist {
|
|
1830
|
+
overflow-y: auto;
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
.filter-menu-search-first {
|
|
1834
|
+
padding: 0.5rem;
|
|
1835
|
+
color: var(--gridkit-fg-muted);
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
/* One value: a drawn checkbox, its label, and its count when shown. */
|
|
1839
|
+
.filter-menu-option {
|
|
1840
|
+
display: flex;
|
|
1841
|
+
align-items: center;
|
|
1842
|
+
gap: 0.5rem;
|
|
1843
|
+
padding: 0.25rem 0.5rem;
|
|
1844
|
+
line-height: 1.25rem;
|
|
1845
|
+
cursor: pointer;
|
|
1846
|
+
user-select: none;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
.filter-menu-option:hover {
|
|
1850
|
+
background-color: var(--gridkit-surface-muted);
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
.filter-menu-option:focus-visible {
|
|
1854
|
+
outline: 2px solid var(--gridkit-accent);
|
|
1855
|
+
outline-offset: -2px;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
/*
|
|
1859
|
+
* An outline, filled with the accent and ticked in the surface colour
|
|
1860
|
+
* while the option is checked, as the native "Select all" above it is.
|
|
1861
|
+
*/
|
|
1862
|
+
.filter-menu-option-check {
|
|
1863
|
+
display: inline-flex;
|
|
1864
|
+
flex-shrink: 0;
|
|
1865
|
+
align-items: center;
|
|
1866
|
+
justify-content: center;
|
|
1867
|
+
box-sizing: border-box;
|
|
1868
|
+
width: 1rem;
|
|
1869
|
+
height: 1rem;
|
|
1870
|
+
color: var(--gridkit-surface);
|
|
1871
|
+
border: 1px solid var(--gridkit-fg-muted);
|
|
1872
|
+
border-radius: 0.1875rem;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
.filter-menu-option-check svg {
|
|
1876
|
+
width: 0.75rem;
|
|
1877
|
+
height: 0.75rem;
|
|
1878
|
+
visibility: hidden;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
.filter-menu-option[aria-checked="true"] .filter-menu-option-check {
|
|
1882
|
+
background-color: var(--gridkit-accent);
|
|
1883
|
+
border-color: var(--gridkit-accent);
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
.filter-menu-option[aria-checked="true"] .filter-menu-option-check svg {
|
|
1887
|
+
visibility: visible;
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
/* A label too long for the menu ends in an ellipsis. */
|
|
1891
|
+
.filter-menu-option-label {
|
|
1892
|
+
flex: 1;
|
|
1893
|
+
min-width: 0;
|
|
1894
|
+
overflow: hidden;
|
|
1895
|
+
text-overflow: ellipsis;
|
|
1896
|
+
white-space: nowrap;
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
/* How many rows hold the value, muted at the end of its line. */
|
|
1900
|
+
.filter-menu-option-count {
|
|
1901
|
+
flex-shrink: 0;
|
|
1902
|
+
font-size: 0.75rem;
|
|
1903
|
+
font-variant-numeric: tabular-nums;
|
|
1904
|
+
color: var(--gridkit-fg-muted);
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
/* "250 more, refine the search", under a list the value limit cut short. */
|
|
1908
|
+
.filter-menu-more {
|
|
1909
|
+
margin: 0;
|
|
1910
|
+
padding: 0 0.5rem;
|
|
1911
|
+
color: var(--gridkit-fg-muted);
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
/* "Clear filter" at the start; Cancel and OK at the end. */
|
|
1915
|
+
.filter-menu-actions {
|
|
1916
|
+
display: flex;
|
|
1917
|
+
align-items: center;
|
|
1918
|
+
gap: 0.5rem;
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
.filter-menu-actions button {
|
|
1922
|
+
padding: 0.25rem 0.75rem;
|
|
1923
|
+
font: inherit;
|
|
1924
|
+
color: var(--gridkit-fg);
|
|
1925
|
+
background-color: var(--gridkit-surface);
|
|
1926
|
+
border: 1px solid var(--gridkit-line);
|
|
1927
|
+
border-radius: 0.25rem;
|
|
1928
|
+
cursor: pointer;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
.filter-menu-actions button:hover {
|
|
1932
|
+
background-color: var(--gridkit-surface-muted);
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
.filter-menu-actions button:focus-visible {
|
|
1936
|
+
outline: 2px solid var(--gridkit-accent);
|
|
1937
|
+
outline-offset: 1px;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
.filter-menu-actions button:disabled {
|
|
1941
|
+
color: var(--gridkit-fg-muted);
|
|
1942
|
+
background-color: var(--gridkit-surface);
|
|
1943
|
+
cursor: default;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
.filter-menu-actions .filter-menu-clear {
|
|
1947
|
+
margin-inline-end: auto;
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
/*
|
|
1951
|
+
* OK, the button Enter presses: tinted rather than filled with the accent,
|
|
1952
|
+
* which the text on it would not stand out from in the light palette.
|
|
1953
|
+
*/
|
|
1954
|
+
.filter-menu-actions .filter-menu-apply {
|
|
1955
|
+
background-color: var(--gridkit-selected);
|
|
1956
|
+
border-color: var(--gridkit-accent);
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
.filter-menu-actions .filter-menu-apply:hover {
|
|
1960
|
+
background-color: var(--gridkit-selected-strong);
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
/*
|
|
1965
|
+
* The browser's own Ctrl+P of a page holding a grid: the grid as a plain
|
|
1966
|
+
* table, every row it has drawn flowing onto as many pages as it takes. Only
|
|
1967
|
+
* those rows — not one a virtualised grid has not mounted, nor another
|
|
1968
|
+
* page's — which is why printing through the grid's own Print, building a
|
|
1969
|
+
* document of every row in a hidden frame, is the supported path.
|
|
1970
|
+
*/
|
|
1971
|
+
@layer base {
|
|
1972
|
+
@media print {
|
|
1973
|
+
/* What is for using the grid, not reading it. */
|
|
1974
|
+
.gridkit-data-grid-viewport .gridkit-toolbar,
|
|
1975
|
+
.gridkit-data-grid-viewport .gridkit-group-by-bar,
|
|
1976
|
+
.gridkit-data-grid-viewport .gridkit-grid-pager,
|
|
1977
|
+
.gridkit-data-grid-viewport .header-resize-handle {
|
|
1978
|
+
display: none;
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
/* No height bound, and nothing scrolls, so no row is cut off. */
|
|
1982
|
+
.gridkit-data-grid-viewport,
|
|
1983
|
+
.gridkit-data-grid-viewport .gridkit-data-grid-body {
|
|
1984
|
+
height: auto;
|
|
1985
|
+
overflow: visible;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
.gridkit-data-grid-viewport :focus-visible {
|
|
1989
|
+
outline: none;
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
/* Shading printed as it is, not dropped to save ink. */
|
|
1993
|
+
.gridkit-data-grid {
|
|
1994
|
+
-webkit-print-color-adjust: exact;
|
|
1995
|
+
print-color-adjust: exact;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
.gridkit-data-grid tr {
|
|
1999
|
+
break-inside: avoid;
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
1326
2002
|
}
|