@pretable/ui 0.19.0 → 0.20.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
@@ -45,27 +45,45 @@
45
45
  }
46
46
 
47
47
  /* Outer viewport (scrollable container).
48
- The card shadow lets a theme separate the grid from the host page with
49
- elevation instead of a drawn frame — the frame alone cannot go faint,
50
- because --pretable-rule-strong is also the sticky header's underline and
51
- owes 3:1 there. Both compatibility skins set it to `none` and are
52
- unchanged. */
48
+ The frame is a token, not a literal: the house theme is frameless and
49
+ sets --pretable-frame to 0, the compatibility skins set it to a 1px line.
50
+ The container's corners are their own token too: --pretable-radius-frame
51
+ rounds only the container sites (this viewport, the tool-layout wrapper,
52
+ the group panel, the error strip), so a frameless theme can square the
53
+ container without squaring the menus, popovers and chips that read
54
+ --pretable-radius. --pretable-rule-strong no longer takes part here — its
55
+ remaining consumers are the select listbox, the date popover and the
56
+ badge. */
53
57
  :where([data-pretable-scroll-viewport]) {
54
58
  background: var(--pretable-bg-grid);
55
- border: 1px solid var(--pretable-rule-strong);
56
- border-radius: var(--pretable-radius);
59
+ border: var(--pretable-frame);
60
+ border-radius: var(--pretable-radius-frame);
57
61
  box-shadow: var(--pretable-shadow-card);
58
62
  font-family: var(--pretable-font-sans);
59
63
  color: var(--pretable-text-cell);
60
64
  }
61
65
 
62
- /* Header row */
66
+ /* Header row. The resting underline is decorative and reads
67
+ --pretable-rule-header; the load-bearing seam against rows scrolling
68
+ underneath is the shadow keyed on [data-pretable-scrolled] below. */
63
69
  :where([data-pretable-header-row]) {
64
70
  background: var(--pretable-bg-header);
65
- border-bottom: 1px solid var(--pretable-rule-strong);
71
+ border-bottom: 1px solid var(--pretable-rule-header);
66
72
  height: var(--pretable-header-height);
67
73
  }
68
74
 
75
+ /* The sticky header earns its seam only once rows pass under it. The
76
+ surface sets [data-pretable-scrolled] on the viewport at scrollTop > 0;
77
+ the header's stacking comes from the surface's inline sticky style, so
78
+ the shadow paints over the first row without this rule saying anything
79
+ about z-index. */
80
+ :where(
81
+ [data-pretable-scroll-viewport][data-pretable-scrolled]
82
+ [data-pretable-header-row]
83
+ ) {
84
+ box-shadow: var(--pretable-shadow-header);
85
+ }
86
+
69
87
  :where([data-pretable-header-cell]) {
70
88
  display: flex;
71
89
  align-items: center;
@@ -1199,9 +1217,9 @@
1199
1217
  gap: var(--pretable-cell-padding-x);
1200
1218
  padding: 0 var(--pretable-cell-padding-x);
1201
1219
  background: var(--pretable-bg-toolbar);
1202
- border: 1px solid var(--pretable-rule-strong);
1220
+ border: var(--pretable-frame);
1203
1221
  border-bottom: 0;
1204
- border-radius: var(--pretable-radius) var(--pretable-radius) 0 0;
1222
+ border-radius: var(--pretable-radius-frame) var(--pretable-radius-frame) 0 0;
1205
1223
  color: var(--pretable-text-header);
1206
1224
  font-family: var(--pretable-font-sans);
1207
1225
  font-size: var(--pretable-font-size-header);
@@ -1665,12 +1683,12 @@
1665
1683
  }
1666
1684
 
1667
1685
  /* The strip is a card stacked on top of the box below it, so it carries that
1668
- box's border and rounds only its own top. `border-bottom: 0` is what stops
1669
- the seam being drawn twice. */
1686
+ box's border and rounds only its own top, with the container's radius
1687
+ token. `border-bottom: 0` is what stops the seam being drawn twice. */
1670
1688
  :where([data-pretable-body-state="error-strip"]) {
1671
- border: 1px solid var(--pretable-rule-strong);
1689
+ border: var(--pretable-frame);
1672
1690
  border-bottom: 0;
1673
- border-radius: var(--pretable-radius) var(--pretable-radius) 0 0;
1691
+ border-radius: var(--pretable-radius-frame) var(--pretable-radius-frame) 0 0;
1674
1692
  }
1675
1693
 
1676
1694
  /* …and the box below squares the two corners that now meet in the middle,
@@ -1698,8 +1716,8 @@
1698
1716
  This is the same border redistribution the group-panel wrapper performs
1699
1717
  vertically, one axis over. */
1700
1718
  :where([data-pretable-tool-layout]) {
1701
- border: 1px solid var(--pretable-rule-strong);
1702
- border-radius: var(--pretable-radius);
1719
+ border: var(--pretable-frame);
1720
+ border-radius: var(--pretable-radius-frame);
1703
1721
  box-shadow: var(--pretable-shadow-card);
1704
1722
  /* The children keep square corners and the wrapper's radius clips them.
1705
1723
  Safe to clip: every floating grid child (menus, editors, the reorder
@@ -1718,7 +1736,7 @@
1718
1736
  :where([data-pretable-body-state="error-strip"]) {
1719
1737
  border: 0;
1720
1738
  border-radius: 0;
1721
- border-bottom: 1px solid var(--pretable-rule-strong);
1739
+ border-bottom: 1px solid var(--pretable-rule-header);
1722
1740
  }
1723
1741
 
1724
1742
  /* A rail of section tabs at the grid's right edge plus a full-height pane.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pretable/ui",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "CSS themes, tokens, and grid styles for Pretable.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/themes/excel.css CHANGED
@@ -40,13 +40,18 @@
40
40
  /* Lines */
41
41
  --pretable-rule: #d4d4d4; /* Excel desktop default RGB 211,211,211 */
42
42
  --pretable-rule-strong: #a6a6a6;
43
+ --pretable-rule-header: var(
44
+ --pretable-rule-strong
45
+ ); /* Excel underlines its header with the frame colour */
46
+ --pretable-frame: 1px solid var(--pretable-rule-strong);
43
47
  /* Excel draws the full cage: the vertical divider tracks the horizontal rule.
44
48
  A theme that wants horizontal-only separation sets this to `transparent`.
45
49
  --pretable-rule-width only governs the per-cell row/column dividers — the
46
50
  -strong frame borders and popover/menu/editor borders are still hardcoded 1px. */
47
51
  --pretable-rule-vertical: var(--pretable-rule);
48
52
  --pretable-rule-width: 1px;
49
- --pretable-radius: 0; /* Sharp edges — Excel never rounds */
53
+ --pretable-radius-frame: 0; /* Sharp edges — Excel never rounds */
54
+ --pretable-radius: 0;
50
55
  --pretable-radius-control: 0; /* Buttons and menu items don't round either */
51
56
 
52
57
  /* State */
@@ -99,6 +104,7 @@
99
104
  --pretable-shadow-overlay: 0 4px 12px rgb(0 0 0 / 0.12);
100
105
  /* No card shadow: this theme draws a frame instead. pretable.css uses it. */
101
106
  --pretable-shadow-card: none;
107
+ --pretable-shadow-header: none; /* The drawn underline is the seam */
102
108
  /* The frozen-column edge, as a COLOUR rather than a whole shadow: the right
103
109
  edge needs the mirror of the left one's offset, and a single shadow value
104
110
  cannot be flipped. grid.css owns the geometry — which is structural — and
@@ -45,6 +45,8 @@
45
45
  /* Lines */
46
46
  --pretable-rule: #cccccc; /* outline-variant — decorative dividers */
47
47
  --pretable-rule-strong: #797979; /* outline */
48
+ --pretable-rule-header: var(--pretable-rule-strong);
49
+ --pretable-frame: 1px solid var(--pretable-rule-strong);
48
50
  /* Aliased to --pretable-rule so this theme's appearance is unchanged by the
49
51
  axis split. Material's own list spec has no vertical rules; revisiting that
50
52
  is a deliberate change, not a side effect of introducing the token.
@@ -52,7 +54,8 @@
52
54
  -strong frame borders and popover/menu/editor borders are still hardcoded 1px. */
53
55
  --pretable-rule-vertical: var(--pretable-rule);
54
56
  --pretable-rule-width: 1px;
55
- --pretable-radius: 12px; /* M3 medium shape scale (matches Card) */
57
+ --pretable-radius-frame: 12px; /* M3 medium shape scale (matches Card) */
58
+ --pretable-radius: 12px; /* Menus and popovers share the medium scale */
56
59
  /* Small affordances need their own step: the card radius applied to a 14–18px
57
60
  control (funnel, ⋮ button, chip remove) rounds it into a circle. M3 small
58
61
  shape scale. */
@@ -113,8 +116,9 @@
113
116
  scale is named for what is lifted, not for the drag ghost that happened to
114
117
  need one first. */
115
118
  --pretable-shadow-overlay: 0 4px 12px rgb(0 0 0 / 0.12);
116
- /* No card shadow: this theme draws a frame instead. pretable.css uses it. */
119
+ /* No card shadow: this theme draws a frame instead. */
117
120
  --pretable-shadow-card: none;
121
+ --pretable-shadow-header: none;
118
122
  /* The frozen-column edge, as a COLOUR rather than a whole shadow: the right
119
123
  edge needs the mirror of the left one's offset, and a single shadow value
120
124
  cannot be flipped. grid.css owns the geometry — which is structural — and
@@ -30,11 +30,12 @@
30
30
  * dark — all three separate by TONE; shadows are invisible on dark ground,
31
31
  * so tier 3 is the lightest surface in the theme.
32
32
  *
33
- * The container edge is a hairline plus --pretable-shadow-card, not a drawn
34
- * frame. --pretable-rule-strong does three jobs at once (container edge,
35
- * sticky-header seam, popover edge) and is the only thing separating a pinned
36
- * header from rows scrolling under it, so it is held at >= 3:1 against BOTH
37
- * the header it sits on and the grid it sits above. It is not near-white.
33
+ * There is no container edge. The grid is frameless: --pretable-frame is 0,
34
+ * --pretable-shadow-card is none, --pretable-radius-frame is 0. Embedded in a host
35
+ * page it is one plane with the page, separated from it by whitespace and by
36
+ * the header's tint alone. The sticky header's seam against rows scrolling
37
+ * under it is --pretable-shadow-header, drawn only while the surface reports
38
+ * [data-pretable-scrolled]; at rest the header ends in a decorative hairline.
38
39
  *
39
40
  * Default density: standard. Designed against a #ffffff to #f4f4f6 page.
40
41
  *
@@ -46,17 +47,18 @@
46
47
  color-scheme: light;
47
48
 
48
49
  /* --- Tier 1: chrome / the inset canvas ------------------------------- */
49
- /* The header is TINTED on purpose. A white header would leave the sticky
50
- rail separated from scrolling rows by tone alone at ~1.0:1, and would give
51
- every hairline drawn on it nothing to read against. 1.14:1 off the data
52
- surface is a whisper — enough to register as a plane, not as a fill. */
53
- --pretable-bg-header: #eff0f4;
54
- --pretable-bg-toolbar: #f1f1f4;
50
+ /* The header is TINTED on purpose, but only just. A white header would give
51
+ every hairline drawn on it nothing to read against; 1.07:1 off the data
52
+ surface is a whisper — enough to register as a plane, not as a fill. The
53
+ rail no longer needs the tint to separate it from rows scrolling under
54
+ it: that is --pretable-shadow-header's job, in Elevation below. */
55
+ --pretable-bg-header: #f7f7f9;
56
+ --pretable-bg-toolbar: #f7f7f9;
55
57
 
56
58
  /* --- Tier 1.5: structure inside the data plane ----------------------- */
57
59
  /* Group rows no longer borrow the header token. They sit between the canvas
58
60
  and the paper: heavier than a record, lighter than the rail. */
59
- --pretable-bg-group-row: #f7f7f9;
61
+ --pretable-bg-group-row: #fafafb;
60
62
 
61
63
  /* --- Tier 2: paper / the records ------------------------------------- */
62
64
  --pretable-bg-grid: #ffffff;
@@ -74,21 +76,29 @@
74
76
  text-dim is deliberately NOT a clone of text-header — the two shipped
75
77
  themes set them to the same literal, which makes the header and the
76
78
  secondary content impossible to tune apart. Here the header is the
77
- quietest text in the grid (5.61:1 on the header it sits on) because it is
78
- chrome; text-dim is secondary CONTENT (6.78:1 there, 7.72:1 on the grid) and includes a 9px sort-priority badge, so it
79
- gets more contrast, not less. Both clear AA on every surface they touch. */
79
+ quietest text in the grid (4.92:1 on the header it sits on, 5.26:1 on
80
+ the grid) because it is chrome; text-dim is secondary CONTENT (7.22:1 on
81
+ the header, 7.72:1 on the grid) and includes a 9px sort-priority badge, so
82
+ it gets more contrast, not less. Both clear AA on every surface they
83
+ touch. */
80
84
  --pretable-text-cell: #1a1a1f;
81
- --pretable-text-header: #5e5e6a;
85
+ --pretable-text-header: #6b6b76;
82
86
  --pretable-text-dim: #52525c;
83
87
 
84
88
  /* --- Lines ----------------------------------------------------------- */
85
- /* The row hairline. Decorative, so it is allowed to be faint (1.33:1). */
86
- --pretable-rule: #dfdfe5;
87
- /* Load-bearing. Container edge, sticky-header seam, popover edge, and the
88
- boundary a pinned header presents to rows sliding underneath it.
89
- 3.52:1 on the header, 4.00:1 on the grid — clears the 3:1 non-text floor
90
- against both of its backgrounds. Near-white here is the classic trap. */
91
- --pretable-rule-strong: #7e7e8b;
89
+ /* The row hairline. Decorative, faint on purpose (1.18:1 on the grid). */
90
+ --pretable-rule: #ececf0;
91
+ /* The header's resting underline: one step darker than the row hairline so
92
+ the rail ends somewhere (1.16:1 on the header), still decorative. The
93
+ load-bearing seam is the scrolled shadow in Elevation below, not this
94
+ line. */
95
+ --pretable-rule-header: #e6e6eb;
96
+ /* One job now: the edge of the kit listbox, the date popover and the badge.
97
+ It no longer frames the container or underlines the header, so it no
98
+ longer owes 3:1 against either. 1.77:1 on the white surfaces it edges. */
99
+ --pretable-rule-strong: #c2c2cb;
100
+ /* No frame. The compatibility skins set this to a 1px line. */
101
+ --pretable-frame: 0;
92
102
  /* No cage. This is the single biggest visual difference from a spreadsheet,
93
103
  and it matters more as rows get taller: in a wrapped 90px row a vertical
94
104
  divider becomes a long empty channel running through whitespace. */
@@ -96,6 +106,10 @@
96
106
  --pretable-rule-width: 1px;
97
107
 
98
108
  /* --- Radii ----------------------------------------------------------- */
109
+ /* The container is square because it has no frame: with no edge and no
110
+ shadow there is no corner for a radius to round. Menus, popovers and the
111
+ group chips are lifted, edged surfaces and keep the 10px radius. */
112
+ --pretable-radius-frame: 0;
99
113
  --pretable-radius: 10px;
100
114
  --pretable-radius-control: 6px;
101
115
 
@@ -115,7 +129,7 @@
115
129
  else. The other two values live elsewhere in this block, because they do
116
130
  different jobs and cannot be one literal:
117
131
  #2554cf the loud one — focus ring, checked checkbox, resize
118
- handle on hover, drop indicator, and at 10% the range
132
+ handle on hover, drop indicator, and at 7% the range
119
133
  tint in --pretable-selection-bg.
120
134
  --pretable-bg-selected (#dfe6fb) + --pretable-text-selected (#131826)
121
135
  a pale blue SURFACE and its ink, behind a selected
@@ -132,8 +146,8 @@
132
146
  "and nothing else" above is guarding: the checked checkbox is painted by
133
147
  --pretable-checkbox-checked-bg (#2554cf), and the white mark on it is
134
148
  6.47:1 there without this token taking part. 7.11:1 as text on the
135
- #ffffff popover the Clear button and the calendar sit on; 6.24:1 as the
136
- funnel icon on the #eff0f4 header rail, where the floor is the 3:1
149
+ #ffffff popover the Clear button and the calendar sit on; 6.64:1 as the
150
+ funnel icon on the #f7f7f9 header rail, where the floor is the 3:1
137
151
  non-text one. */
138
152
  --pretable-accent: #3f5a7a;
139
153
 
@@ -168,9 +182,12 @@
168
182
  /* Written as literals rather than var() aliases so the dark block can move
169
183
  them independently — aliasing checkbox-border to rule-strong is what lets
170
184
  an affordance inherit a decorative value. */
171
- --pretable-selection-bg: rgba(37, 84, 207, 0.1);
185
+ --pretable-selection-bg: rgba(37, 84, 207, 0.07);
172
186
  --pretable-checkbox-bg: #ffffff;
173
- --pretable-checkbox-border: #787885;
187
+ /* An affordance, so it owes the 3:1 non-text floor on BOTH surfaces it sits
188
+ on: 3.24:1 on the paper, 3.03:1 on the header rail under the select-all
189
+ box. */
190
+ --pretable-checkbox-border: #8e8e99;
174
191
  --pretable-checkbox-checked-bg: #2554cf;
175
192
  --pretable-checkbox-checked-fg: #ffffff;
176
193
  --pretable-resize-handle: transparent;
@@ -184,11 +201,13 @@
184
201
  tell of a theme that was eyeballed. */
185
202
  --pretable-shadow-overlay:
186
203
  0 1px 2px rgba(16, 17, 26, 0.06), 0 8px 24px -6px rgba(16, 17, 26, 0.16);
187
- /* The container. This theme does NOT draw a frame — a hairline plus real
188
- elevation. Requires grid.css to apply it to the scroll viewport; without
189
- that the token is inert. */
190
- --pretable-shadow-card:
191
- 0 1px 2px rgba(16, 17, 26, 0.05), 0 2px 8px -4px rgba(16, 17, 26, 0.1);
204
+ /* The container casts nothing. It is not a card. */
205
+ --pretable-shadow-card: none;
206
+ /* The sticky header's seam, present only while rows are underneath it. A
207
+ contact layer plus a short ambient; the ambient's negative spread keeps
208
+ it under the first row instead of washing three rows. */
209
+ --pretable-shadow-header:
210
+ 0 1px 2px rgba(16, 17, 26, 0.06), 0 6px 12px -8px rgba(16, 17, 26, 0.18);
192
211
  /* The frozen-column edge, now that pinned cells no longer announce
193
212
  themselves with a grey fill. Spread must be <= -blur/2 or the blur bleeds
194
213
  above and below each pinned cell and bands every row boundary. */
@@ -263,11 +282,11 @@
263
282
  color-scheme: dark;
264
283
 
265
284
  /* Tier 1 — chrome / the inset canvas */
266
- --pretable-bg-header: #1e1e24;
267
- --pretable-bg-toolbar: #1e1e24;
285
+ --pretable-bg-header: #1a1a20;
286
+ --pretable-bg-toolbar: #1a1a20;
268
287
 
269
288
  /* Tier 1.5 — structure */
270
- --pretable-bg-group-row: #191920;
289
+ --pretable-bg-group-row: #17171c;
271
290
 
272
291
  /* Tier 2 — paper / the records */
273
292
  --pretable-bg-grid: #141418;
@@ -281,12 +300,14 @@
281
300
 
282
301
  /* Text */
283
302
  --pretable-text-cell: #ededf2;
284
- --pretable-text-header: #9a9aa8;
303
+ --pretable-text-header: #8f8f9c; /* 5.42:1 on the header, 5.75:1 on the grid */
285
304
  --pretable-text-dim: #adadbb;
286
305
 
287
306
  /* Lines */
288
- --pretable-rule: #2c2c34;
289
- --pretable-rule-strong: #70707e; /* 3.40:1 on the header, 3.77:1 on the grid */
307
+ --pretable-rule: #25252c; /* 1.21:1 on the grid */
308
+ --pretable-rule-header: #2a2a32; /* 1.22:1 on the header */
309
+ --pretable-rule-strong: #3a3a44; /* 1.63:1 on the grid, 1.40:1 on the lifted tier */
310
+ --pretable-frame: 0;
290
311
  --pretable-rule-vertical: transparent;
291
312
 
292
313
  /* State */
@@ -312,9 +333,9 @@
312
333
  --pretable-info: #93b4ff;
313
334
 
314
335
  /* Grid controls */
315
- --pretable-selection-bg: rgba(138, 176, 255, 0.16);
336
+ --pretable-selection-bg: rgba(138, 176, 255, 0.12);
316
337
  --pretable-checkbox-bg: #141418;
317
- --pretable-checkbox-border: #727281;
338
+ --pretable-checkbox-border: #6a6a78; /* 3.45:1 on the paper, 3.25:1 on the rail */
318
339
  --pretable-checkbox-checked-bg: #8ab0ff;
319
340
  /* Dark ink, not white. White on a light-blue chip is 1.70:1 — the defect
320
341
  Material ships because it left this token out of its dark block. */
@@ -328,7 +349,8 @@
328
349
  glow; the separation comes from the tonal step above, not from the shadow. */
329
350
  --pretable-shadow-overlay:
330
351
  0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 28px -8px rgba(0, 0, 0, 0.7);
331
- --pretable-shadow-card:
332
- 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 10px -6px rgba(0, 0, 0, 0.5);
352
+ --pretable-shadow-card: none;
353
+ --pretable-shadow-header:
354
+ 0 1px 0 rgba(0, 0, 0, 0.6), 0 6px 12px -8px rgba(0, 0, 0, 0.7);
333
355
  --pretable-seam-color: rgba(0, 0, 0, 0.62);
334
356
  }