@pretable/ui 0.15.3 → 0.17.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 CHANGED
@@ -102,6 +102,150 @@
102
102
  background: var(--pretable-bg-header);
103
103
  }
104
104
 
105
+ /* ---- Kit components: push-buttons ------------------------------------
106
+ The shared look every plain push-button in the grid used to carry per
107
+ site — twelve rule lists for one box — now lives on the component's own
108
+ attributes, and each site keeps only what is genuinely its own: a size,
109
+ a reveal, an alignment. These rules come FIRST in the file so a site
110
+ rule can still win at equal specificity by source order. The site
111
+ attribute (`data-pretable-filter-clear`) still arrives on the element,
112
+ so every selector keyed on it keeps working.
113
+ `font: inherit` resolves correctly here because every surface a labelled
114
+ button sits in declares its own font trio — see the filter menu's comment
115
+ about portaled surfaces below; a `PretableButton` rendered straight into
116
+ a bare portal would inherit the HOST PAGE instead. */
117
+ :where([data-pretable-button], [data-pretable-icon-button]) {
118
+ box-sizing: border-box;
119
+ display: inline-flex;
120
+ align-items: center;
121
+ justify-content: center;
122
+ border: 0;
123
+ border-radius: var(--pretable-radius-control);
124
+ background: transparent;
125
+ color: var(--pretable-text-dim);
126
+ font: inherit;
127
+ cursor: pointer;
128
+ }
129
+ /* A labelled button speaks in the accent; an icon button in the dim ink
130
+ its site may lift on hover or reveal. */
131
+ :where([data-pretable-button]) {
132
+ color: var(--pretable-accent);
133
+ }
134
+ /* `ghost`: the 24px action row box — `+ filter`, `Expand all` — with a
135
+ hover tint painted as a background-IMAGE layer so a site's own surface
136
+ colour underneath survives. */
137
+ :where([data-pretable-button][data-pretable-variant="ghost"]) {
138
+ gap: 4px;
139
+ block-size: 24px;
140
+ padding-inline: 6px;
141
+ }
142
+ :where(
143
+ [data-pretable-button][data-pretable-variant="ghost"]:hover:not(:disabled)
144
+ ) {
145
+ background-image: linear-gradient(
146
+ var(--pretable-bg-hover),
147
+ var(--pretable-bg-hover)
148
+ );
149
+ }
150
+ /* `link`: plain accent text — `Clear`, `Reset columns`. No hover tint;
151
+ the two sites that use it never had one. */
152
+ :where([data-pretable-button][data-pretable-variant="link"]) {
153
+ padding: 2px 4px;
154
+ }
155
+ /* An icon button is a fixed box its site sizes (14, 18 and 24px boxes all
156
+ exist). NO `position: relative` here: it moves an in-flow flex item into
157
+ the positioned paint phase, which for the two remove buttons that sit in
158
+ flow among later siblings would reorder painting. The three sites that
159
+ need a containing block for a ::after hit area declare it themselves. */
160
+ :where([data-pretable-icon-button]) {
161
+ flex: none;
162
+ padding: 0;
163
+ }
164
+
165
+ /* ---- Kit components: select ------------------------------------------
166
+ `PretableSelect`'s trigger. It is a FIELD, not a button: the rule
167
+ border, the grid surface, the cell ink, the label at the start and the
168
+ caret at the end. Each site keeps only its size and its flex
169
+ participation — the site rules further down win at equal specificity by
170
+ source order — and the list it opens is the kit list below.
171
+ `font: inherit` is safe here for the same reason it is on the buttons:
172
+ the trigger sits in a grid surface that declares its own font trio. */
173
+ :where([data-pretable-select]) {
174
+ box-sizing: border-box;
175
+ display: inline-flex;
176
+ align-items: center;
177
+ justify-content: space-between;
178
+ gap: 6px;
179
+ padding-inline: 6px;
180
+ border: 1px solid var(--pretable-rule);
181
+ border-radius: var(--pretable-radius-control);
182
+ background: var(--pretable-bg-grid);
183
+ color: var(--pretable-text-cell);
184
+ font: inherit;
185
+ text-align: start;
186
+ cursor: pointer;
187
+ }
188
+ /* The label takes the slack and ellipsizes; `min-inline-size: 0` is what
189
+ lets it, a flex item's automatic minimum being its content otherwise —
190
+ without it a long option widens the picker instead of truncating. */
191
+ :where([data-pretable-select-label]) {
192
+ flex: 1 1 auto;
193
+ min-inline-size: 0;
194
+ overflow: hidden;
195
+ text-overflow: ellipsis;
196
+ white-space: nowrap;
197
+ }
198
+ /* The caret never shrinks, and speaks in the dim ink like every other
199
+ affordance glyph in the grid. */
200
+ :where([data-pretable-select]) > :where([data-pretable-icon]) {
201
+ flex: none;
202
+ color: var(--pretable-text-dim);
203
+ }
204
+
205
+ /* ---- Kit components: the list ----------------------------------------
206
+ One popover list, two sites: the enum cell editor pops it open under its
207
+ field, and `PretableSelect` under its trigger. */
208
+ :where([data-pretable-listbox]) {
209
+ margin: 0;
210
+ padding: 4px 0;
211
+ list-style: none;
212
+ max-height: 220px;
213
+ overflow-y: auto;
214
+ background: var(--pretable-bg-grid);
215
+ border: 1px solid var(--pretable-rule-strong);
216
+ border-radius: var(--pretable-radius);
217
+ box-shadow: var(--pretable-shadow-overlay);
218
+ /* Portaled into <body> — see the filter menu below. Line-height joins the
219
+ trio (#580): the list is a kit surface now, and a kit control dropped
220
+ into it would otherwise read the HOST page's leading. */
221
+ font-family: var(--pretable-font-sans);
222
+ font-size: var(--pretable-font-size-cell);
223
+ color: var(--pretable-text-cell);
224
+ line-height: 1.5;
225
+ }
226
+
227
+ :where([data-pretable-option]) {
228
+ padding: var(--pretable-cell-padding-y) var(--pretable-cell-padding-x);
229
+ cursor: pointer;
230
+ }
231
+
232
+ :where([data-pretable-option]:hover) {
233
+ background: var(--pretable-bg-hover);
234
+ }
235
+
236
+ /* The roving highlight: keyboard navigation's `data-active`, painted like
237
+ a hover. DECLARED BEFORE the selected rule on purpose — an option that
238
+ is both active and committed should read as SELECTED, and at equal
239
+ (0,0,0) specificity source order is what decides that. */
240
+ :where([data-pretable-option][data-active]) {
241
+ background: var(--pretable-bg-hover);
242
+ }
243
+
244
+ :where([data-pretable-option][aria-selected="true"]) {
245
+ background: var(--pretable-bg-selected);
246
+ color: var(--pretable-text-selected);
247
+ }
248
+
105
249
  /* Multi-sort priority badge (rendered only when 2+ columns are sorted) */
106
250
  :where([data-pretable-sort-priority]) {
107
251
  margin-left: 2px;
@@ -884,21 +1028,12 @@
884
1028
  (css-cascade.test.ts). A new funnel-family attribute belongs on that
885
1029
  list; a new builder attribute does not. */
886
1030
  :where([data-pretable-filter-funnel]) {
887
- display: inline-flex;
888
- align-items: center;
889
- justify-content: center;
890
1031
  width: 18px;
891
1032
  height: 18px;
892
- padding: 0;
893
- border: 0;
894
- border-radius: var(--pretable-radius-control);
895
- background: transparent;
896
- color: var(--pretable-text-dim);
897
- cursor: pointer;
898
- opacity: 0;
899
- transition: opacity 0.1s ease;
900
1033
  /* Containing block for the ::after hit area below. */
901
1034
  position: relative;
1035
+ opacity: 0;
1036
+ transition: opacity 0.1s ease;
902
1037
  }
903
1038
  /* WCAG 2.5.8 (Target Size, Minimum) asks for 24x24 CSS px. The funnel drew
904
1039
  an 18x18 tap target on every filterable column, so a phone got an 18px
@@ -957,7 +1092,7 @@
957
1092
  :where([data-pretable-filter-funnel][data-pretable-filter-active="true"]) {
958
1093
  color: var(--pretable-accent);
959
1094
  }
960
- :where([data-pretable-filter-funnel]:hover) {
1095
+ :where([data-pretable-filter-funnel]:hover:not(:disabled)) {
961
1096
  background: var(--pretable-bg-hover);
962
1097
  }
963
1098
 
@@ -976,19 +1111,24 @@
976
1111
  popover sat at the cell size. */
977
1112
  font-family: var(--pretable-font-sans);
978
1113
  font-size: var(--pretable-font-size-cell);
1114
+ /* The fourth member of the trio. Every kit control inside says
1115
+ `font: inherit`, and a `link` button has no fixed block-size, so
1116
+ without this a consumer with no CSS reset gets the UA's `normal`
1117
+ here — 1.5 is what the grid's own body computes and what the pixel
1118
+ baseline measured. */
1119
+ line-height: 1.5;
979
1120
  color: var(--pretable-text-cell);
980
1121
  }
981
- :where([data-pretable-filter-menu]) select,
982
1122
  :where([data-pretable-filter-menu]) input[type="text"],
983
1123
  :where([data-pretable-filter-menu]) input[type="date"],
984
1124
  :where([data-pretable-filter-menu]) input:not([type]) {
985
1125
  width: 100%;
986
1126
  box-sizing: border-box;
987
- /* An explicit box, like the tool pane's identical controls: Chrome forces
988
- `line-height: normal` on a <select> and ignores what it is given, so a
989
- select and an input with the same padding come out different heights —
990
- 28 and 33 here, a stacked pair a few pixels apart. Both centre their
991
- own text vertically once the height is set, so the block padding goes. */
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. */
992
1132
  block-size: 28px;
993
1133
  padding-inline: 7px;
994
1134
  border: 1px solid var(--pretable-rule);
@@ -997,16 +1137,22 @@
997
1137
  color: var(--pretable-text-cell);
998
1138
  font: inherit;
999
1139
  }
1140
+ /* The dialog's operator picker. A kit select: the rule above draws the box
1141
+ for the INPUTS beside it, and the kit rule at the top of this file draws
1142
+ this one's. What is the dialog's own is the size — full width, the 28px
1143
+ the fields beside it stand at, and this dialog's 7px inset rather than
1144
+ the kit's 6px. */
1145
+ :where([data-pretable-filter-operator]) {
1146
+ width: 100%;
1147
+ block-size: 28px;
1148
+ padding-inline: 7px;
1149
+ }
1000
1150
  /* The product's focus ring, not the host page's. Without this the dialog's
1001
1151
  fields keep the UA ring — which takes the CONSUMER's accent-color, so
1002
1152
  tabbing from the pane's copy of these same controls to this one changed
1003
1153
  the ring's colour, width and offset. The declaration the builder rows
1004
1154
  already share. */
1005
- :where(
1006
- [data-pretable-filter-menu] select:focus-visible,
1007
- [data-pretable-filter-menu] input:focus-visible,
1008
- [data-pretable-filter-clear]:focus-visible
1009
- ) {
1155
+ :where([data-pretable-filter-menu] input:focus-visible) {
1010
1156
  outline: 2px solid var(--pretable-focus-ring);
1011
1157
  outline-offset: -2px;
1012
1158
  }
@@ -1017,11 +1163,6 @@
1017
1163
  }
1018
1164
  :where([data-pretable-filter-clear]) {
1019
1165
  align-self: flex-end;
1020
- background: transparent;
1021
- border: 0;
1022
- color: var(--pretable-accent);
1023
- cursor: pointer;
1024
- padding: 2px 4px;
1025
1166
  }
1026
1167
 
1027
1168
  /* ---- Drag-to-group panel (sub-project 3) ----------------------------- */
@@ -1125,22 +1266,13 @@
1125
1266
  }
1126
1267
 
1127
1268
  :where([data-pretable-chip-remove]) {
1128
- flex: none;
1129
- display: inline-flex;
1130
- align-items: center;
1131
- justify-content: center;
1269
+ /* 14px, one step under the 18px header buttons — the chip is a small
1270
+ object and its ✕ is a CloseIcon sized by --pretable-icon-size, so
1271
+ nothing here is type. */
1132
1272
  width: 14px;
1133
1273
  height: 14px;
1134
- padding: 0;
1135
- border: 0;
1136
- border-radius: var(--pretable-radius-control);
1137
- background: transparent;
1138
- color: var(--pretable-text-dim);
1139
- font-size: 10px;
1140
- line-height: 1;
1141
- cursor: pointer;
1142
1274
  }
1143
- :where([data-pretable-chip-remove]:hover) {
1275
+ :where([data-pretable-chip-remove]:hover:not(:disabled)) {
1144
1276
  background: var(--pretable-selection-bg);
1145
1277
  color: var(--pretable-text-cell);
1146
1278
  }
@@ -1162,19 +1294,8 @@
1162
1294
  open case matters — without it the button vanishes the moment the pointer
1163
1295
  leaves the header, while its own menu is still up. */
1164
1296
  :where([data-pretable-column-menu-button]) {
1165
- display: inline-flex;
1166
- align-items: center;
1167
- justify-content: center;
1168
1297
  width: 18px;
1169
1298
  height: 18px;
1170
- padding: 0;
1171
- border: 0;
1172
- border-radius: var(--pretable-radius-control);
1173
- background: transparent;
1174
- color: var(--pretable-text-dim);
1175
- cursor: pointer;
1176
- opacity: 0;
1177
- transition: opacity 0.1s ease;
1178
1299
  /* Containing block for the coarse-pointer hit area at the end of the file.
1179
1300
  Declared here rather than beside it so the two cannot drift apart, and
1180
1301
  unconditional because it changes nothing on its own: the button is
@@ -1182,13 +1303,15 @@
1182
1303
  moves no pixel and reorders no paint — both slots were already in the
1183
1304
  positioned phase, ordered by tree order. */
1184
1305
  position: relative;
1306
+ opacity: 0;
1307
+ transition: opacity 0.1s ease;
1185
1308
  }
1186
1309
  :where([data-pretable-header-row]:hover [data-pretable-column-menu-button]),
1187
1310
  :where([data-pretable-column-menu-button]:focus-visible),
1188
1311
  :where([data-pretable-column-menu-button][aria-expanded="true"]) {
1189
1312
  opacity: 1;
1190
1313
  }
1191
- :where([data-pretable-column-menu-button]:hover) {
1314
+ :where([data-pretable-column-menu-button]:hover:not(:disabled)) {
1192
1315
  background: var(--pretable-selection-bg);
1193
1316
  }
1194
1317
 
@@ -1201,6 +1324,12 @@
1201
1324
  /* Portaled into <body>, so nothing is inherited from the viewport. */
1202
1325
  font-family: var(--pretable-font-sans);
1203
1326
  font-size: var(--pretable-font-size-cell);
1327
+ /* The fourth member of the trio. Every kit control inside says
1328
+ `font: inherit`, and a `link` button has no fixed block-size, so
1329
+ without this a consumer with no CSS reset gets the UA's `normal`
1330
+ here — 1.5 is what the grid's own body computes and what the pixel
1331
+ baseline measured. */
1332
+ line-height: 1.5;
1204
1333
  color: var(--pretable-text-cell);
1205
1334
  }
1206
1335
  :where([data-pretable-menu-item]) {
@@ -1255,48 +1384,13 @@
1255
1384
  border-top: 1px solid var(--pretable-rule);
1256
1385
  }
1257
1386
 
1258
- /* Enum combobox listbox (cell editor) */
1387
+ /* Enum combobox anchor (cell editor) */
1259
1388
  :where([data-pretable-enum-editor]) {
1260
1389
  display: block;
1261
1390
  width: 100%;
1262
1391
  height: 100%;
1263
1392
  }
1264
1393
 
1265
- :where([data-pretable-enum-listbox]) {
1266
- margin: 0;
1267
- padding: 4px 0;
1268
- list-style: none;
1269
- max-height: 220px;
1270
- overflow-y: auto;
1271
- background: var(--pretable-bg-grid);
1272
- border: 1px solid var(--pretable-rule-strong);
1273
- border-radius: var(--pretable-radius);
1274
- box-shadow: var(--pretable-shadow-overlay);
1275
- /* Portaled into <body> — see the filter menu above. */
1276
- font-family: var(--pretable-font-sans);
1277
- font-size: var(--pretable-font-size-cell);
1278
- color: var(--pretable-text-cell);
1279
- }
1280
-
1281
- /* Typed text matching nothing leaves an empty list; don't paint a bare box. */
1282
- :where([data-pretable-enum-listbox]:empty) {
1283
- display: none;
1284
- }
1285
-
1286
- :where([data-pretable-enum-option]) {
1287
- padding: var(--pretable-cell-padding-y) var(--pretable-cell-padding-x);
1288
- cursor: pointer;
1289
- }
1290
-
1291
- :where([data-pretable-enum-option]:hover) {
1292
- background: var(--pretable-bg-hover);
1293
- }
1294
-
1295
- :where([data-pretable-enum-option][aria-selected="true"]) {
1296
- background: var(--pretable-bg-selected);
1297
- color: var(--pretable-text-selected);
1298
- }
1299
-
1300
1394
  /* Date calendar (cell editor) */
1301
1395
  :where([data-pretable-date-editor]) {
1302
1396
  display: block;
@@ -1694,7 +1788,7 @@
1694
1788
  rules — the grouping block below adds nothing of its own.
1695
1789
  [data-pretable-aggregate-row] (the aggregates block's rows) rides the
1696
1790
  BASE rule only: same box, but nothing in it hovers, drags or takes row
1697
- focus — its select carries its own states via the filter-field lists. */
1791
+ focus — its picker is a kit select and carries its own states. */
1698
1792
  :where(
1699
1793
  [data-pretable-tool-column-row],
1700
1794
  [data-pretable-tool-group-row],
@@ -1774,23 +1868,13 @@
1774
1868
  header's opens — [data-pretable-column-menu] holding
1775
1869
  [data-pretable-menu-item]s — so the menu needs no rules of its own. */
1776
1870
  :where([data-pretable-tool-row-menu-button]) {
1777
- flex: none;
1778
- display: inline-flex;
1779
- align-items: center;
1780
- justify-content: center;
1781
1871
  inline-size: 18px;
1782
1872
  block-size: 18px;
1783
- padding: 0;
1784
- border: 0;
1785
- border-radius: var(--pretable-radius-control);
1786
- background: transparent;
1787
- color: var(--pretable-text-dim);
1788
- cursor: pointer;
1789
1873
  /* Containing block for the coarse-pointer hit area at the end of the
1790
1874
  file, like the grip's. */
1791
1875
  position: relative;
1792
1876
  }
1793
- :where([data-pretable-tool-row-menu-button]:hover),
1877
+ :where([data-pretable-tool-row-menu-button]:hover:not(:disabled)),
1794
1878
  :where([data-pretable-tool-row-menu-button][aria-expanded="true"]) {
1795
1879
  background: var(--pretable-selection-bg);
1796
1880
  color: var(--pretable-text-cell);
@@ -1810,12 +1894,6 @@
1810
1894
  at the foot of the pane would outweigh every row above it. */
1811
1895
  :where([data-pretable-tool-reset]) {
1812
1896
  align-self: flex-end;
1813
- padding: 2px 4px;
1814
- border: 0;
1815
- background: transparent;
1816
- color: var(--pretable-accent);
1817
- cursor: pointer;
1818
- font: inherit;
1819
1897
  }
1820
1898
 
1821
1899
  /* ---- Filter builder (SP2b) -------------------------------------------- */
@@ -1905,18 +1983,20 @@
1905
1983
  color: var(--pretable-text-dim);
1906
1984
  }
1907
1985
 
1908
- /* The two pickers and the single-value field, in ONE rule: they are the same
1909
- box, and the difference between "which column", "which operator" and
1910
- "what value" is the words inside it, not the frame around them.
1986
+ /* The single-value field. NOT a kit control — an <input>, which no kit rule
1987
+ draws — so it keeps the whole box here: the frame, the surface, the ink
1988
+ and the font, at the same 24px the pickers beside it stand at, because
1989
+ the difference between "which column", "which operator" and "what value"
1990
+ is the words inside the box, not the frame around it.
1911
1991
  `flex: 1 1 auto` WITH an explicit `min-inline-size`, which is the pair
1912
- that makes the wrapping row above work: a <select>'s automatic minimum
1913
- size is its longest option, so one long header name would hold the row
1914
- wider than the pane and push the value onto a line of its own no matter
1915
- how the row wraps. ANY explicit value overrides that automatic minimum,
1916
- so 24px shrinks and ellipsizes exactly as 0 would — and unlike 0 it does
1917
- not hand back, on the inline axis, the WCAG 2.5.8 floor the block-size
1918
- below is claiming. A rule that states a 24px target and then permits a
1919
- 4px-wide one states nothing.
1992
+ that makes the wrapping row above work: a field's automatic minimum size
1993
+ is its content, so one long value would hold the row wider than the pane
1994
+ and push the controls onto a line of their own no matter how the row
1995
+ wraps. ANY explicit value overrides that automatic minimum, so 24px
1996
+ shrinks and ellipsizes exactly as 0 would — and unlike 0 it does not hand
1997
+ back, on the inline axis, the WCAG 2.5.8 floor the block-size is
1998
+ claiming. A rule that states a 24px target and then permits a 4px-wide
1999
+ one states nothing.
1920
2000
  24px is the height this section bought for the join and the add actions,
1921
2001
  so the whole row clears 2.5.8 on every pointer rather than only where a
1922
2002
  coarse-pointer block applies.
@@ -1924,17 +2004,7 @@
1924
2004
  join's longhands: UA stylesheets set their own font on form controls, and
1925
2005
  this rule sets no size of its own, so there is nothing for the shorthand
1926
2006
  to overwrite. */
1927
- /* [data-pretable-aggregate-row] select (the grouping section's aggregate
1928
- picker) rides this list and the focus ring below: it is the same box as
1929
- the builder's pickers, and the shared rule is what keeps the two panes'
1930
- selects from drifting apart. Appended AFTER the pinned head — the
1931
- cascade guard anchors on [data-pretable-filter-row-column] leading. */
1932
- :where(
1933
- [data-pretable-filter-row-column],
1934
- [data-pretable-filter-row-operator],
1935
- input[data-pretable-filter-row-value],
1936
- [data-pretable-aggregate-row] select
1937
- ) {
2007
+ :where(input[data-pretable-filter-row-value]) {
1938
2008
  box-sizing: border-box;
1939
2009
  flex: 1 1 auto;
1940
2010
  min-inline-size: 24px;
@@ -1946,6 +2016,25 @@
1946
2016
  color: var(--pretable-text-cell);
1947
2017
  font: inherit;
1948
2018
  }
2019
+ /* The builder's pickers: size and flex participation only — the kit select
2020
+ rule at the top of this file draws the box. `min-inline-size` matters for
2021
+ the same reason it does on the field above: without it the longest option
2022
+ sets the trigger's automatic minimum and one long header name holds the
2023
+ row wider than the pane.
2024
+ [data-pretable-aggregate] (the grouping section's aggregate picker) rides
2025
+ this rule: it is the same 24px flex item as the builder's two, and the
2026
+ shared rule is what keeps the two panes' pickers from drifting apart.
2027
+ Appended AFTER the pinned head — the cascade guard anchors on
2028
+ [data-pretable-filter-row-column] leading. */
2029
+ :where(
2030
+ [data-pretable-filter-row-column],
2031
+ [data-pretable-filter-row-operator],
2032
+ [data-pretable-aggregate]
2033
+ ) {
2034
+ flex: 1 1 auto;
2035
+ min-inline-size: 24px;
2036
+ block-size: 24px;
2037
+ }
1949
2038
 
1950
2039
  /* The set shape's checklist, which is not a field: it takes its own line
1951
2040
  (`flex-basis: 100%` in a wrapping row) because a column of checkboxes
@@ -1970,34 +2059,23 @@
1970
2059
  chip strip can argue its own case (a chip is a label with a glyph on the
1971
2060
  end); this row cannot, because it sits beside two 24px controls that
1972
2061
  already made the opposite choice. What IS taken from the chip is the
1973
- quiet-until-hover idea — dim by --pretable-text-dim, full text colour on
1974
- hover — and not its paint: the hover fill is this section's own
1975
- background-IMAGE gradient, the same one the row and the join use, rather
1976
- than the chip's --pretable-selection-bg.
1977
- `flex: none` and a square inline-size: it holds a glyph, so it must not
1978
- stretch the way the fields either side of it do. The glyph itself is a
1979
- CloseIcon from the set, sized by --pretable-icon-size through
1980
- [data-pretable-icon] — no font-size here, unlike the chip's Unicode. */
2062
+ quiet-until-hover idea — full text colour on hover — and not its paint:
2063
+ the hover fill is this section's own background-IMAGE gradient, the same
2064
+ one the row and the join use, rather than the chip's
2065
+ --pretable-selection-bg.
2066
+ A square 24px box. NO `position: relative`: unlike the two ⋮ buttons this
2067
+ one sits IN FLOW among later siblings, so making it a positioned box
2068
+ would paint it above them. It buys no hit area with a ::after and needs
2069
+ no containing block. */
1981
2070
  /* [data-pretable-tool-group-remove] (the group-by row's ✕) shares every
1982
2071
  rule: same glyph, same quiet treatment, one set of declarations. */
1983
2072
  :where([data-pretable-filter-row-remove], [data-pretable-tool-group-remove]) {
1984
- box-sizing: border-box;
1985
- flex: none;
1986
- display: inline-flex;
1987
- align-items: center;
1988
- justify-content: center;
1989
2073
  inline-size: 24px;
1990
2074
  block-size: 24px;
1991
- padding: 0;
1992
- border: 0;
1993
- border-radius: var(--pretable-radius-control);
1994
- background: transparent;
1995
- color: var(--pretable-text-dim);
1996
- cursor: pointer;
1997
2075
  }
1998
2076
  :where(
1999
- [data-pretable-filter-row-remove]:hover,
2000
- [data-pretable-tool-group-remove]:hover
2077
+ [data-pretable-filter-row-remove]:hover:not(:disabled),
2078
+ [data-pretable-tool-group-remove]:hover:not(:disabled)
2001
2079
  ) {
2002
2080
  background-image: linear-gradient(
2003
2081
  var(--pretable-bg-hover),
@@ -2005,24 +2083,18 @@
2005
2083
  );
2006
2084
  color: var(--pretable-text-cell);
2007
2085
  }
2008
- /* One ring for every control in the row, an OUTLINE like every other ring
2009
- in this file: a box-shadow would spend the one shadow slot these controls
2010
- might later want for elevation, and whichever declaration lost would lose
2011
- silently.
2086
+ /* The value field's ring, an OUTLINE like every other ring in this file: a
2087
+ box-shadow would spend the one shadow slot this control might later want
2088
+ for elevation, and whichever declaration lost would lose silently. The
2089
+ two pickers beside it take the KIT select's ring — same declaration, one
2090
+ source — so only the input is named here.
2012
2091
  `input[...-value]`, not the bare attribute: the set shape wears the same
2013
2092
  attribute on a <div> wrapper, which takes no focus. A rule that matched it
2014
2093
  would be inert today and would paint a ring around the whole checklist the
2015
2094
  day anything made that wrapper focusable — a state nobody would have
2016
2095
  designed. The FIELDS are what focus, so the field is what the selector
2017
2096
  names. */
2018
- :where(
2019
- [data-pretable-filter-row-column]:focus-visible,
2020
- [data-pretable-filter-row-operator]:focus-visible,
2021
- input[data-pretable-filter-row-value]:focus-visible,
2022
- [data-pretable-filter-row-remove]:focus-visible,
2023
- [data-pretable-tool-group-remove]:focus-visible,
2024
- [data-pretable-aggregate-row] select:focus-visible
2025
- ) {
2097
+ :where(input[data-pretable-filter-row-value]:focus-visible) {
2026
2098
  outline: 2px solid var(--pretable-focus-ring);
2027
2099
  outline-offset: -2px;
2028
2100
  }
@@ -2094,72 +2166,6 @@
2094
2166
  outline-offset: -2px;
2095
2167
  }
2096
2168
 
2097
- /* `+ filter` / `+ group`: the reset action's quiet-text-button voice,
2098
- because a bordered pair under the tree would outweigh the rows they add
2099
- to. 24px tall so the pair clears WCAG 2.5.8 on the same terms as the
2100
- join. */
2101
- /* [data-pretable-add-group] (the grouping section's `+ Add group`) rides
2102
- these four rules: same quiet-text-button voice, same disabled dimming
2103
- (there: tree depth; here: every column already grouped) — and so do the
2104
- expansion pair, [data-pretable-expand-all] / [data-pretable-collapse-all]
2105
- (disabled there: no groups to act on). One list per rule, extended in
2106
- place, so the sections cannot drift apart part by part. */
2107
- :where(
2108
- [data-pretable-filter-add],
2109
- [data-pretable-add-group],
2110
- [data-pretable-expand-all],
2111
- [data-pretable-collapse-all]
2112
- ) {
2113
- display: inline-flex;
2114
- align-items: center;
2115
- gap: 4px;
2116
- block-size: 24px;
2117
- padding-inline: 6px;
2118
- border: 0;
2119
- border-radius: var(--pretable-radius-control);
2120
- background: transparent;
2121
- color: var(--pretable-accent);
2122
- cursor: pointer;
2123
- /* The shorthand, unlike the join's longhands: this rule sets no size of
2124
- its own, so there is nothing for `font: inherit` to overwrite. */
2125
- font: inherit;
2126
- }
2127
- :where(
2128
- [data-pretable-filter-add]:hover:not(:disabled),
2129
- [data-pretable-add-group]:hover:not(:disabled),
2130
- [data-pretable-expand-all]:hover:not(:disabled),
2131
- [data-pretable-collapse-all]:hover:not(:disabled)
2132
- ) {
2133
- background-image: linear-gradient(
2134
- var(--pretable-bg-hover),
2135
- var(--pretable-bg-hover)
2136
- );
2137
- }
2138
- :where(
2139
- [data-pretable-filter-add]:focus-visible,
2140
- [data-pretable-add-group]:focus-visible,
2141
- [data-pretable-expand-all]:focus-visible,
2142
- [data-pretable-collapse-all]:focus-visible
2143
- ) {
2144
- outline: 2px solid var(--pretable-focus-ring);
2145
- outline-offset: -2px;
2146
- }
2147
-
2148
- /* `+ group` refuses at the engine's 64-level bound — a deeper tree throws
2149
- `invalid-query` out of setQuery, which no consumer catches. Disabled
2150
- dims by token like the hidden row does, and drops the pointer
2151
- affordance; the REASON is the button's business (a title/aria-disabled
2152
- description), not the stylesheet's. */
2153
- :where(
2154
- [data-pretable-filter-add]:disabled,
2155
- [data-pretable-add-group]:disabled,
2156
- [data-pretable-expand-all]:disabled,
2157
- [data-pretable-collapse-all]:disabled
2158
- ) {
2159
- color: var(--pretable-text-dim);
2160
- cursor: default;
2161
- }
2162
-
2163
2169
  /* What renders INSTEAD of the tree, so it sits with the actions that end
2164
2170
  it rather than opening the section. The group-label's voice: a dim line,
2165
2171
  not an empty box. A bordered placeholder would draw more attention than the
@@ -2226,6 +2232,35 @@
2226
2232
  outline-offset: 1px;
2227
2233
  }
2228
2234
 
2235
+ /* ---- Kit components: state -------------------------------------------
2236
+ The ring and the disabled ink come LAST in the layer, after every site
2237
+ rule, because every selector here is :where()-flattened to (0,0,0) and
2238
+ source order is the only cascade lever there is. A site's own state
2239
+ colour — `[data-pretable-filter-funnel][data-pretable-filter-active="true"]
2240
+ { color }`, a `:hover { color }` — would otherwise outrank the disabled
2241
+ ink at equal specificity. The ghost group's old local `:disabled` rule
2242
+ was protected only by being local and last; this is what replaces it.
2243
+ The two @media blocks that follow this section are the file's last word
2244
+ by construction, but they set only opacity and hit areas, never colour,
2245
+ so they cannot be the site rule this ordering guards against. */
2246
+ :where(
2247
+ [data-pretable-button]:focus-visible,
2248
+ [data-pretable-icon-button]:focus-visible,
2249
+ [data-pretable-select]:focus-visible
2250
+ ) {
2251
+ outline: 2px solid var(--pretable-focus-ring);
2252
+ outline-offset: -2px;
2253
+ }
2254
+ /* The standard disabled treatment (#573): dim by token, drop the pointer. */
2255
+ :where(
2256
+ [data-pretable-button]:disabled,
2257
+ [data-pretable-icon-button]:disabled,
2258
+ [data-pretable-select]:disabled
2259
+ ) {
2260
+ color: var(--pretable-text-dim);
2261
+ cursor: default;
2262
+ }
2263
+
2229
2264
  /* ---- Coarse pointers -------------------------------------------------- */
2230
2265
 
2231
2266
  /* A finger, not a mouse. The header's overlay controls were built on three
@@ -2427,9 +2462,24 @@
2427
2462
  /* GrayText is the system's own disabled ink. Without it a disabled item
2428
2463
  is forced to CanvasText — the enabled colour — and the menu goes back
2429
2464
  to offering the one thing that cannot be chosen. */
2430
- :where([data-pretable-menu-item]:disabled) {
2465
+ :where(
2466
+ [data-pretable-menu-item]:disabled,
2467
+ [data-pretable-button]:disabled,
2468
+ [data-pretable-icon-button]:disabled,
2469
+ [data-pretable-select]:disabled
2470
+ ) {
2431
2471
  color: GrayText;
2432
2472
  }
2473
+ /* The committed option's fill is an author background the UA would erase,
2474
+ leaving the chosen row indistinguishable from the rest of the list —
2475
+ the same failure the selected cell above has, answered the same way:
2476
+ the system's own guaranteed pair, and `forced-color-adjust: none` so
2477
+ the pair survives. */
2478
+ :where([data-pretable-option][aria-selected="true"]) {
2479
+ forced-color-adjust: none;
2480
+ background-color: Highlight;
2481
+ color: HighlightText;
2482
+ }
2433
2483
  }
2434
2484
 
2435
2485
  /* Reduced motion. Every animated declaration in this file is named here:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pretable/ui",
3
- "version": "0.15.3",
3
+ "version": "0.17.0",
4
4
  "description": "CSS themes, tokens, and grid styles for Pretable.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/themes/excel.css CHANGED
@@ -9,11 +9,14 @@
9
9
 
10
10
  :root {
11
11
  /* Declared for the same reason pretable.css does: the browser paints the
12
- scroll viewport's scrollbars and every native control inside the grid —
13
- the filter dialog's operator select, its popup list — from this, not from
14
- the tokens. Without it a dark-mode host keeps this grid's scrollbars light and a light
15
- select popup, which is the one part of the surface a theme cannot reach
16
- with a custom property. */
12
+ scroll viewport's scrollbars and the native chrome still left inside the
13
+ grid — the filter dialog's text and date inputs (and the date input's own
14
+ calendar popup), and the enum checklist's checkboxes — from this, not from
15
+ the tokens. Without it a dark-mode host keeps this grid's scrollbars
16
+ light and its inputs and checkboxes on a light field, which is the part
17
+ of the surface a theme cannot reach with a custom property. The operator picker is no longer
18
+ among them: it is the kit's own combobox, styled through
19
+ `data-pretable-select` and `data-pretable-listbox`. */
17
20
  color-scheme: light;
18
21
 
19
22
  /* Surfaces */
@@ -14,11 +14,14 @@
14
14
 
15
15
  :root {
16
16
  /* Declared for the same reason pretable.css does: the browser paints the
17
- scroll viewport's scrollbars and every native control inside the grid —
18
- the filter dialog's operator select, its popup list — from this, not from
19
- the tokens. Without it a dark-mode grid keeps light scrollbars and a light
20
- select popup, which is the one part of the surface a theme cannot reach
21
- with a custom property. */
17
+ scroll viewport's scrollbars and the native chrome still left inside the
18
+ grid — the filter dialog's text and date inputs (and the date input's own
19
+ calendar popup), and the enum checklist's checkboxes — from this, not from
20
+ the tokens. Without it a dark-mode grid keeps light scrollbars and its
21
+ inputs and checkboxes on a light field, which is the part of the surface
22
+ a theme cannot reach with a custom property. The operator picker is no longer
23
+ among them: it is the kit's own combobox, styled through
24
+ `data-pretable-select` and `data-pretable-listbox`. */
22
25
  color-scheme: light;
23
26
 
24
27
  /* Surfaces — M3 neutral grayscale (untinted by primary seed) */