@pretable/ui 0.0.2 → 0.0.8
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 +15 -1
- package/dist/grid.css +602 -183
- package/dist/themes/excel.css +21 -0
- package/dist/themes/material.css +23 -0
- package/dist/tokens.css +0 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,7 +51,21 @@ The full token set lives in [`src/tokens.css`](./src/tokens.css). Override any t
|
|
|
51
51
|
|
|
52
52
|
### Data-attribute hooks
|
|
53
53
|
|
|
54
|
-
Pretable surfaces emit a stable set of data attributes on rendered DOM. The CSS files in this package target them; your custom styles can too. The full set lives in `grid.css` — common ones include `[data-pretable-cell]`, `[data-pretable-row]`, `[data-pretable-header]`, `[data-pretable-cell-focused]`, and `[data-pretable-cell-
|
|
54
|
+
Pretable surfaces emit a stable set of data attributes on rendered DOM. The CSS files in this package target them; your custom styles can too. The full set lives in `grid.css` — common ones include `[data-pretable-cell]`, `[data-pretable-row]`, `[data-pretable-header]`, `[data-pretable-cell][data-pretable-focused="true"]`, `[data-pretable-cell][data-pretable-selected="true"]`, `[data-pretable-cell][data-pretable-pinned="left"]`, and `[data-pretable-cell][data-pretable-numeric="true"]`. Renaming or removing these attributes is a breaking change.
|
|
55
|
+
|
|
56
|
+
### Cascade layer
|
|
57
|
+
|
|
58
|
+
`grid.css` ships inside a single `@layer pretable` cascade layer, and every
|
|
59
|
+
selector is wrapped in `:where()` (specificity `(0,0,0)`). Consumer CSS wins by
|
|
60
|
+
layer order or specificity without `!important`. In a Tailwind v4 app declare:
|
|
61
|
+
|
|
62
|
+
```css
|
|
63
|
+
@layer theme, base, pretable, components, utilities;
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Token files (`tokens.css`, `themes/*.css`) are intentionally **unlayered** —
|
|
67
|
+
override tokens after importing the theme. See the website's "Cascade &
|
|
68
|
+
overrides" theming page for the full contract.
|
|
55
69
|
|
|
56
70
|
## JS API
|
|
57
71
|
|
package/dist/grid.css
CHANGED
|
@@ -3,211 +3,630 @@
|
|
|
3
3
|
* Selector-based grid skin. Targets data attributes exposed by @pretable/react;
|
|
4
4
|
* values reference --pretable-* tokens defined by theme files.
|
|
5
5
|
*
|
|
6
|
+
* All rules live in the `pretable` cascade layer and use :where() so every
|
|
7
|
+
* default is specificity (0,0,0). Consumers override by writing any selector
|
|
8
|
+
* (it wins on specificity) or any unlayered / later-layer rule (it wins on
|
|
9
|
+
* layer order). Recommended layer order in your app:
|
|
10
|
+
* @layer theme, base, pretable, components, utilities;
|
|
11
|
+
*
|
|
6
12
|
* Consumer recipe:
|
|
7
13
|
* @import "@pretable/ui/themes/excel.css";
|
|
8
14
|
* @import "@pretable/ui/grid.css";
|
|
9
15
|
*/
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
@layer pretable {
|
|
18
|
+
/* Visually hidden — used for ARIA live region announcements. */
|
|
19
|
+
:where(.pt-sr-only) {
|
|
20
|
+
position: absolute;
|
|
21
|
+
width: 1px;
|
|
22
|
+
height: 1px;
|
|
23
|
+
padding: 0;
|
|
24
|
+
margin: -1px;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
clip: rect(0, 0, 0, 0);
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
border: 0;
|
|
29
|
+
}
|
|
23
30
|
|
|
24
|
-
/* Outer viewport (scrollable container) */
|
|
25
|
-
[data-pretable-scroll-viewport] {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
31
|
+
/* Outer viewport (scrollable container) */
|
|
32
|
+
:where([data-pretable-scroll-viewport]) {
|
|
33
|
+
background: var(--pretable-bg-grid);
|
|
34
|
+
border: 1px solid var(--pretable-rule-strong);
|
|
35
|
+
border-radius: var(--pretable-radius);
|
|
36
|
+
font-family: var(--pretable-font-sans);
|
|
37
|
+
color: var(--pretable-text-cell);
|
|
38
|
+
}
|
|
32
39
|
|
|
33
|
-
/* Header row */
|
|
34
|
-
[data-pretable-header-row] {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
40
|
+
/* Header row */
|
|
41
|
+
:where([data-pretable-header-row]) {
|
|
42
|
+
background: var(--pretable-bg-header);
|
|
43
|
+
border-bottom: 1px solid var(--pretable-rule-strong);
|
|
44
|
+
height: var(--pretable-header-height);
|
|
45
|
+
}
|
|
39
46
|
|
|
40
|
-
[data-pretable-header-cell] {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
:where([data-pretable-header-cell]) {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
padding: 0 var(--pretable-cell-padding-x);
|
|
51
|
+
font-size: var(--pretable-font-size-header);
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
color: var(--pretable-text-header);
|
|
54
|
+
border: 0;
|
|
55
|
+
border-right: 1px solid var(--pretable-rule);
|
|
56
|
+
box-sizing: border-box;
|
|
57
|
+
}
|
|
50
58
|
|
|
51
|
-
[data-pretable-header-cell]:last-of-type {
|
|
52
|
-
|
|
53
|
-
}
|
|
59
|
+
:where([data-pretable-header-cell]:last-of-type) {
|
|
60
|
+
border-right: none;
|
|
61
|
+
}
|
|
54
62
|
|
|
55
|
-
/*
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
63
|
+
/* Pinned header cells — the header row paints --pretable-bg-header behind
|
|
64
|
+
the whole strip, but each header cell on top of it is a transparent box,
|
|
65
|
+
so an unpinned header's label reads straight through a pinned one once it
|
|
66
|
+
scrolls underneath. Pinned header cells need their own opaque fill, the
|
|
67
|
+
same one their body counterparts get below. */
|
|
68
|
+
:where(
|
|
69
|
+
[data-pretable-header-cell][data-pretable-pinned="left"],
|
|
70
|
+
[data-pretable-header-cell][data-pretable-pinned="right"]
|
|
71
|
+
) {
|
|
72
|
+
background: var(--pretable-bg-header);
|
|
73
|
+
}
|
|
67
74
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
/* Multi-sort priority badge (rendered only when 2+ columns are sorted) */
|
|
76
|
+
:where([data-pretable-sort-priority]) {
|
|
77
|
+
margin-left: 2px;
|
|
78
|
+
font-size: 9px;
|
|
79
|
+
font-weight: 600;
|
|
80
|
+
color: var(--pretable-text-dim);
|
|
81
|
+
vertical-align: super;
|
|
82
|
+
}
|
|
71
83
|
|
|
72
|
-
/*
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
84
|
+
/* Body cells */
|
|
85
|
+
:where([data-pretable-cell]) {
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
padding: var(--pretable-cell-padding-y) var(--pretable-cell-padding-x);
|
|
90
|
+
font-size: var(--pretable-font-size-cell);
|
|
91
|
+
color: var(--pretable-text-cell);
|
|
92
|
+
background: var(--pretable-bg-grid);
|
|
93
|
+
border-right: 1px solid var(--pretable-rule);
|
|
94
|
+
border-bottom: 1px solid var(--pretable-rule);
|
|
95
|
+
/* Cells are absolutely positioned, so a value wider than its column paints
|
|
96
|
+
straight over the next one. Clip at the column edge instead.
|
|
97
|
+
NOTE: the cell is a flex container, and `text-overflow: ellipsis` has no
|
|
98
|
+
effect on one — the text is an anonymous flex item. For an ellipsis,
|
|
99
|
+
render the value inside an element that can shrink:
|
|
100
|
+
<span style="min-width:0; overflow:hidden; text-overflow:ellipsis">
|
|
101
|
+
via a column's `render`. */
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
}
|
|
76
104
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
105
|
+
:where([data-pretable-cell]:last-of-type) {
|
|
106
|
+
border-right: none;
|
|
107
|
+
}
|
|
81
108
|
|
|
82
|
-
/*
|
|
83
|
-
[data-pretable-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
z-index: 1;
|
|
87
|
-
}
|
|
109
|
+
/* Zebra striping — only effective when --pretable-bg-grid-alt differs */
|
|
110
|
+
:where([data-pretable-row]:nth-child(even) [data-pretable-cell]) {
|
|
111
|
+
background: var(--pretable-bg-grid-alt);
|
|
112
|
+
}
|
|
88
113
|
|
|
89
|
-
/*
|
|
90
|
-
[data-pretable-cell][data-selected="true"] {
|
|
91
|
-
background: var(--pretable-bg-selected);
|
|
92
|
-
color: var(--pretable-text-selected);
|
|
93
|
-
}
|
|
114
|
+
/* ---- Row grouping ---------------------------------------------------- */
|
|
94
115
|
|
|
95
|
-
/*
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
116
|
+
/* Group headers borrow the header fill so the eye reads them as structure
|
|
117
|
+
rather than as another record. */
|
|
118
|
+
:where([data-pretable-group-row] [data-pretable-cell]) {
|
|
119
|
+
background: var(--pretable-bg-header);
|
|
120
|
+
color: var(--pretable-text-header);
|
|
121
|
+
font-weight: 600;
|
|
122
|
+
}
|
|
100
123
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
124
|
+
/* Depth indent is padding INSIDE the cell box. Indenting the row instead
|
|
125
|
+
would scroll the indent away from a pinned group column, compute ellipsis
|
|
126
|
+
truncation against the wrong width, and misplace the focus outline.
|
|
127
|
+
The literal fallback matters: a third-party theme that predates
|
|
128
|
+
--pretable-group-indent degrades to a visible indent, not a flat list. */
|
|
129
|
+
:where([data-pretable-group-cell]) {
|
|
130
|
+
gap: var(--pretable-cell-padding-x);
|
|
131
|
+
padding-left: calc(
|
|
132
|
+
var(--pretable-cell-padding-x) + var(--pretable-group-depth, 0) *
|
|
133
|
+
var(--pretable-group-indent, 16px)
|
|
134
|
+
);
|
|
135
|
+
}
|
|
111
136
|
|
|
112
|
-
[
|
|
113
|
-
|
|
114
|
-
|
|
137
|
+
:where([data-pretable-group-twisty]) {
|
|
138
|
+
flex: none;
|
|
139
|
+
width: 1em;
|
|
140
|
+
height: 1em;
|
|
141
|
+
padding: 0;
|
|
142
|
+
border: 0;
|
|
143
|
+
background: none;
|
|
144
|
+
color: inherit;
|
|
145
|
+
font: inherit;
|
|
146
|
+
line-height: 1;
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
transition: rotate 120ms ease;
|
|
149
|
+
}
|
|
115
150
|
|
|
116
|
-
/*
|
|
117
|
-
[data-pretable-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
justify-content: flex-end;
|
|
121
|
-
font-variant-numeric: tabular-nums;
|
|
122
|
-
}
|
|
151
|
+
/* The glyph points down when open; rotate it closed. */
|
|
152
|
+
:where([data-pretable-group-twisty][aria-expanded="false"]) {
|
|
153
|
+
rotate: -90deg;
|
|
154
|
+
}
|
|
123
155
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
color: var(--pretable-text-dim);
|
|
129
|
-
font-family: var(--pretable-font-sans);
|
|
130
|
-
font-size: var(--pretable-font-size-cell);
|
|
131
|
-
}
|
|
156
|
+
:where([data-pretable-group-twisty]:focus-visible) {
|
|
157
|
+
outline: 2px solid var(--pretable-focus-ring);
|
|
158
|
+
outline-offset: 1px;
|
|
159
|
+
}
|
|
132
160
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
padding: 0;
|
|
140
|
-
}
|
|
141
|
-
button[data-pretable-row-select],
|
|
142
|
-
button[data-pretable-row-select-all] {
|
|
143
|
-
width: 16px;
|
|
144
|
-
height: 16px;
|
|
145
|
-
border: 1px solid var(--pt-color-checkbox-border);
|
|
146
|
-
background: var(--pt-color-checkbox-bg);
|
|
147
|
-
border-radius: 3px;
|
|
148
|
-
cursor: pointer;
|
|
149
|
-
padding: 0;
|
|
150
|
-
display: inline-flex;
|
|
151
|
-
align-items: center;
|
|
152
|
-
justify-content: center;
|
|
153
|
-
font-size: 11px;
|
|
154
|
-
line-height: 1;
|
|
155
|
-
color: var(--pt-color-checkbox-checked-fg);
|
|
156
|
-
}
|
|
157
|
-
button[data-pretable-row-select][aria-checked="true"],
|
|
158
|
-
button[data-pretable-row-select-all][aria-checked="true"] {
|
|
159
|
-
background: var(--pt-color-checkbox-checked-bg);
|
|
160
|
-
border-color: var(--pt-color-checkbox-checked-bg);
|
|
161
|
-
color: var(--pt-color-checkbox-checked-fg);
|
|
162
|
-
}
|
|
163
|
-
button[data-pretable-row-select][aria-checked="mixed"],
|
|
164
|
-
button[data-pretable-row-select-all][aria-checked="mixed"] {
|
|
165
|
-
background: var(--pt-color-checkbox-checked-bg);
|
|
166
|
-
border-color: var(--pt-color-checkbox-checked-bg);
|
|
167
|
-
color: var(--pt-color-checkbox-checked-fg);
|
|
168
|
-
}
|
|
161
|
+
:where([data-pretable-group-label]) {
|
|
162
|
+
min-width: 0;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
text-overflow: ellipsis;
|
|
165
|
+
white-space: nowrap;
|
|
166
|
+
}
|
|
169
167
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
width: 4px;
|
|
176
|
-
height: 100%;
|
|
177
|
-
cursor: col-resize;
|
|
178
|
-
background: var(--pt-color-resize-handle);
|
|
179
|
-
z-index: 2;
|
|
180
|
-
user-select: none;
|
|
181
|
-
touch-action: none;
|
|
182
|
-
}
|
|
183
|
-
[data-pretable-resize-handle]:hover,
|
|
184
|
-
[data-pretable-resize-handle][data-dragging="true"] {
|
|
185
|
-
background: var(--pt-color-resize-handle-hover);
|
|
186
|
-
}
|
|
168
|
+
:where([data-pretable-group-count]) {
|
|
169
|
+
flex: none;
|
|
170
|
+
color: var(--pretable-text-dim);
|
|
171
|
+
font-weight: 400;
|
|
172
|
+
}
|
|
187
173
|
|
|
188
|
-
/*
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
174
|
+
/* Data rows sit one twisty-width in, so their content lines up with sibling
|
|
175
|
+
group labels instead of hanging a chevron to the left. Only visible once
|
|
176
|
+
leaf and group rows share a depth — invisible in a screenshot, ragged in
|
|
177
|
+
every real grid. */
|
|
178
|
+
:where([data-pretable-group-leaf]) {
|
|
179
|
+
padding-left: calc(
|
|
180
|
+
var(--pretable-cell-padding-x) * 2 + 1em +
|
|
181
|
+
var(--pretable-group-depth, 0) * var(--pretable-group-indent, 16px)
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* Hover */
|
|
186
|
+
:where([data-pretable-row]:hover [data-pretable-cell]) {
|
|
187
|
+
background: var(--pretable-bg-hover);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Pinned cells (sticky left) — reuse header background */
|
|
191
|
+
:where([data-pretable-cell][data-pretable-pinned="left"]) {
|
|
192
|
+
background: var(--pretable-bg-header);
|
|
193
|
+
z-index: 1;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* Pinned cells (sticky right) — mirror of the left rule */
|
|
197
|
+
:where([data-pretable-cell][data-pretable-pinned="right"]) {
|
|
198
|
+
background: var(--pretable-bg-header);
|
|
199
|
+
z-index: 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* The left-pinned group is bounded by the base cell's border-right; the
|
|
203
|
+
right-pinned group's boundary is its LEADING edge, so draw the rule on the
|
|
204
|
+
first right-pinned cell only (avoids doubling up with the previous cell's
|
|
205
|
+
border-right between two right-pinned columns). */
|
|
206
|
+
:where(
|
|
207
|
+
[data-pretable-cell]:not([data-pretable-pinned="right"])
|
|
208
|
+
+ [data-pretable-cell][data-pretable-pinned="right"]
|
|
209
|
+
) {
|
|
210
|
+
border-left: 1px solid var(--pretable-rule);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Selection — wins over zebra/hover via source order (they precede it) */
|
|
214
|
+
:where([data-pretable-cell][data-pretable-selected="true"]) {
|
|
215
|
+
background: var(--pretable-bg-selected);
|
|
216
|
+
color: var(--pretable-text-selected);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Focus */
|
|
220
|
+
:where([data-pretable-cell][data-pretable-focused="true"]) {
|
|
221
|
+
outline: 2px solid var(--pretable-focus-ring);
|
|
222
|
+
outline-offset: -2px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Theme-agnostic cell-range selection visuals (Phase 3).
|
|
227
|
+
* Targets the ARIA role + aria-selected attribute exposed by @pretable/react,
|
|
228
|
+
* so consumers using only @pretable/ui's tokens.css (no theme file) still get
|
|
229
|
+
* a usable visual.
|
|
230
|
+
*/
|
|
231
|
+
:where([role="gridcell"][aria-selected="true"]) {
|
|
232
|
+
background: var(--pretable-selection-bg);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
:where([role="gridcell"][data-pretable-focused="true"]) {
|
|
236
|
+
box-shadow: inset 0 0 0 2px var(--pretable-focus-ring);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* Numeric cells (opt-in via [data-pretable-numeric="true"]) */
|
|
240
|
+
:where([data-pretable-cell][data-pretable-numeric="true"]) {
|
|
241
|
+
font-family: var(--pretable-font-mono);
|
|
242
|
+
text-align: right;
|
|
243
|
+
justify-content: flex-end;
|
|
244
|
+
font-variant-numeric: tabular-nums;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/* Toolbar / status bar — applied if engine wraps in named data attribute */
|
|
248
|
+
:where([data-pretable-toolbar], [data-pretable-status-bar]) {
|
|
249
|
+
background: var(--pretable-bg-toolbar);
|
|
250
|
+
color: var(--pretable-text-dim);
|
|
251
|
+
font-family: var(--pretable-font-sans);
|
|
252
|
+
font-size: var(--pretable-font-size-cell);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* Row-selection checkbox column (Phase 4) */
|
|
256
|
+
:where(
|
|
257
|
+
[data-pretable-cell][data-pretable-row-select-cell="true"],
|
|
258
|
+
[data-pretable-header-cell][data-pretable-row-select-header]
|
|
259
|
+
) {
|
|
260
|
+
display: flex;
|
|
261
|
+
align-items: center;
|
|
262
|
+
justify-content: center;
|
|
263
|
+
padding: 0;
|
|
264
|
+
}
|
|
265
|
+
:where(
|
|
266
|
+
button[data-pretable-row-select],
|
|
267
|
+
button[data-pretable-row-select-all],
|
|
268
|
+
button[data-pretable-bool-cell]
|
|
269
|
+
) {
|
|
270
|
+
width: 16px;
|
|
271
|
+
height: 16px;
|
|
272
|
+
border: 1px solid var(--pretable-checkbox-border);
|
|
273
|
+
background: var(--pretable-checkbox-bg);
|
|
274
|
+
border-radius: 3px;
|
|
275
|
+
cursor: pointer;
|
|
276
|
+
padding: 0;
|
|
277
|
+
display: inline-flex;
|
|
278
|
+
align-items: center;
|
|
279
|
+
justify-content: center;
|
|
280
|
+
font-size: 11px;
|
|
281
|
+
line-height: 1;
|
|
282
|
+
color: var(--pretable-checkbox-checked-fg);
|
|
283
|
+
}
|
|
284
|
+
:where(
|
|
285
|
+
button[data-pretable-row-select][aria-checked="true"],
|
|
286
|
+
button[data-pretable-row-select-all][aria-checked="true"],
|
|
287
|
+
button[data-pretable-bool-cell][aria-checked="true"]
|
|
288
|
+
) {
|
|
289
|
+
background: var(--pretable-checkbox-checked-bg);
|
|
290
|
+
border-color: var(--pretable-checkbox-checked-bg);
|
|
291
|
+
color: var(--pretable-checkbox-checked-fg);
|
|
292
|
+
}
|
|
293
|
+
:where(
|
|
294
|
+
button[data-pretable-row-select][aria-checked="mixed"],
|
|
295
|
+
button[data-pretable-row-select-all][aria-checked="mixed"]
|
|
296
|
+
) {
|
|
297
|
+
background: var(--pretable-checkbox-checked-bg);
|
|
298
|
+
border-color: var(--pretable-checkbox-checked-bg);
|
|
299
|
+
color: var(--pretable-checkbox-checked-fg);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* Boolean toggle cell (typed editors) */
|
|
303
|
+
:where(button[data-pretable-bool-cell]) {
|
|
304
|
+
margin: 0 auto;
|
|
305
|
+
display: flex;
|
|
306
|
+
align-items: center;
|
|
307
|
+
justify-content: center;
|
|
308
|
+
}
|
|
309
|
+
:where(button[data-pretable-bool-cell]:disabled) {
|
|
310
|
+
cursor: default;
|
|
311
|
+
}
|
|
312
|
+
:where(button[data-pretable-bool-cell][aria-busy="true"]) {
|
|
313
|
+
opacity: 0.5;
|
|
314
|
+
cursor: wait;
|
|
315
|
+
}
|
|
316
|
+
:where(button[data-pretable-bool-cell][aria-invalid="true"]) {
|
|
317
|
+
outline: 1px solid var(--pretable-text-error);
|
|
318
|
+
outline-offset: 1px;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* Column resize handle (sub-project C) */
|
|
322
|
+
:where([data-pretable-resize-handle]) {
|
|
323
|
+
position: absolute;
|
|
324
|
+
top: 0;
|
|
325
|
+
right: 0;
|
|
326
|
+
width: 4px;
|
|
327
|
+
height: 100%;
|
|
328
|
+
cursor: col-resize;
|
|
329
|
+
background: var(--pretable-resize-handle);
|
|
330
|
+
z-index: 2;
|
|
331
|
+
user-select: none;
|
|
332
|
+
touch-action: none;
|
|
333
|
+
}
|
|
334
|
+
:where(
|
|
335
|
+
[data-pretable-resize-handle]:hover,
|
|
336
|
+
[data-pretable-resize-handle][data-pretable-dragging="true"]
|
|
337
|
+
) {
|
|
338
|
+
background: var(--pretable-resize-handle-hover);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* Column reorder gesture (sub-project C) */
|
|
342
|
+
:where([data-pretable-reorder-ghost]) {
|
|
343
|
+
position: fixed;
|
|
344
|
+
pointer-events: none;
|
|
345
|
+
background: var(--pretable-reorder-ghost-bg);
|
|
346
|
+
box-shadow: var(--pretable-reorder-ghost-shadow);
|
|
347
|
+
opacity: 0.6;
|
|
348
|
+
z-index: 10;
|
|
349
|
+
user-select: none;
|
|
350
|
+
/* Portaled into <body> — see the filter menu below. The font-family and
|
|
351
|
+
color declared on the scroll viewport are no longer inherited. */
|
|
352
|
+
font-family: var(--pretable-font-sans);
|
|
353
|
+
color: var(--pretable-text-cell);
|
|
354
|
+
}
|
|
355
|
+
:where([data-pretable-reorder-drop-indicator]) {
|
|
356
|
+
position: absolute;
|
|
357
|
+
top: 0;
|
|
358
|
+
width: 2px;
|
|
359
|
+
background: var(--pretable-reorder-drop-indicator);
|
|
360
|
+
z-index: 9;
|
|
361
|
+
pointer-events: none;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/* Built-in column filter menu (sub-project 2/3) */
|
|
365
|
+
:where([data-pretable-filter-funnel]) {
|
|
366
|
+
display: inline-flex;
|
|
367
|
+
align-items: center;
|
|
368
|
+
justify-content: center;
|
|
369
|
+
width: 18px;
|
|
370
|
+
height: 18px;
|
|
371
|
+
padding: 0;
|
|
372
|
+
border: 0;
|
|
373
|
+
border-radius: var(--pretable-radius);
|
|
374
|
+
background: transparent;
|
|
375
|
+
color: var(--pretable-text-dim);
|
|
376
|
+
cursor: pointer;
|
|
377
|
+
opacity: 0;
|
|
378
|
+
transition: opacity 0.1s ease;
|
|
379
|
+
}
|
|
380
|
+
/* Reveal funnels on header-row hover, on funnel keyboard focus, or when a
|
|
381
|
+
filter is active. The header row is a flat list of sibling header cells,
|
|
382
|
+
resize handles, and funnel slots (see pretable-surface.tsx), so a
|
|
383
|
+
per-column `~` hover selector would over-match every column to the right
|
|
384
|
+
of the hovered one; hovering the whole header row is the structurally
|
|
385
|
+
correct trigger. Active/focus-visible funnels stay lit regardless. */
|
|
386
|
+
:where([data-pretable-header-row]:hover [data-pretable-filter-funnel]),
|
|
387
|
+
:where([data-pretable-filter-funnel]:focus-visible),
|
|
388
|
+
:where([data-pretable-filter-funnel][data-pretable-filter-active="true"]) {
|
|
389
|
+
opacity: 1;
|
|
390
|
+
}
|
|
391
|
+
:where([data-pretable-filter-funnel][data-pretable-filter-active="true"]) {
|
|
392
|
+
color: var(--pretable-accent);
|
|
393
|
+
}
|
|
394
|
+
:where([data-pretable-filter-funnel]:hover) {
|
|
395
|
+
background: var(--pretable-bg-hover);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
:where([data-pretable-filter-menu]) {
|
|
399
|
+
display: flex;
|
|
400
|
+
flex-direction: column;
|
|
401
|
+
gap: 8px;
|
|
402
|
+
padding: 10px;
|
|
403
|
+
box-shadow: var(--pretable-reorder-ghost-shadow);
|
|
404
|
+
font: inherit;
|
|
405
|
+
/* Portaled into <body>, so the font-family declared on the scroll
|
|
406
|
+
viewport is no longer inherited — declare it here. */
|
|
407
|
+
font-family: var(--pretable-font-sans);
|
|
408
|
+
}
|
|
409
|
+
:where([data-pretable-filter-menu]) select,
|
|
410
|
+
:where([data-pretable-filter-menu]) input[type="text"],
|
|
411
|
+
:where([data-pretable-filter-menu]) input[type="date"],
|
|
412
|
+
:where([data-pretable-filter-menu]) input:not([type]) {
|
|
413
|
+
width: 100%;
|
|
414
|
+
box-sizing: border-box;
|
|
415
|
+
padding: 5px 7px;
|
|
416
|
+
border: 1px solid var(--pretable-rule);
|
|
417
|
+
border-radius: var(--pretable-radius);
|
|
418
|
+
background: var(--pretable-bg-grid);
|
|
419
|
+
color: var(--pretable-text-cell);
|
|
420
|
+
font: inherit;
|
|
421
|
+
}
|
|
422
|
+
:where([data-pretable-filter-set]) label {
|
|
423
|
+
display: flex;
|
|
424
|
+
gap: 6px;
|
|
425
|
+
align-items: center;
|
|
426
|
+
}
|
|
427
|
+
:where([data-pretable-filter-clear]) {
|
|
428
|
+
align-self: flex-end;
|
|
429
|
+
background: transparent;
|
|
430
|
+
border: 0;
|
|
431
|
+
color: var(--pretable-accent);
|
|
432
|
+
cursor: pointer;
|
|
433
|
+
padding: 2px 4px;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/* Enum combobox listbox (cell editor) */
|
|
437
|
+
:where([data-pretable-enum-editor]) {
|
|
438
|
+
display: block;
|
|
439
|
+
width: 100%;
|
|
440
|
+
height: 100%;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
:where([data-pretable-enum-listbox]) {
|
|
444
|
+
margin: 0;
|
|
445
|
+
padding: 4px 0;
|
|
446
|
+
list-style: none;
|
|
447
|
+
max-height: 220px;
|
|
448
|
+
overflow-y: auto;
|
|
449
|
+
background: var(--pretable-bg-grid);
|
|
450
|
+
border: 1px solid var(--pretable-rule-strong);
|
|
451
|
+
border-radius: var(--pretable-radius);
|
|
452
|
+
box-shadow: var(--pretable-reorder-ghost-shadow);
|
|
453
|
+
/* Portaled into <body> — see the filter menu above. */
|
|
454
|
+
font-family: var(--pretable-font-sans);
|
|
455
|
+
font-size: var(--pretable-font-size-cell);
|
|
456
|
+
color: var(--pretable-text-cell);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/* Typed text matching nothing leaves an empty list; don't paint a bare box. */
|
|
460
|
+
:where([data-pretable-enum-listbox]:empty) {
|
|
461
|
+
display: none;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
:where([data-pretable-enum-option]) {
|
|
465
|
+
padding: var(--pretable-cell-padding-y) var(--pretable-cell-padding-x);
|
|
466
|
+
cursor: pointer;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
:where([data-pretable-enum-option]:hover) {
|
|
470
|
+
background: var(--pretable-bg-hover);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
:where([data-pretable-enum-option][aria-selected="true"]) {
|
|
474
|
+
background: var(--pretable-bg-selected);
|
|
475
|
+
color: var(--pretable-text-selected);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/* Date calendar (cell editor) */
|
|
479
|
+
:where([data-pretable-date-editor]) {
|
|
480
|
+
display: block;
|
|
481
|
+
width: 100%;
|
|
482
|
+
height: 100%;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
:where([data-pretable-date-popover]) {
|
|
486
|
+
padding: 8px;
|
|
487
|
+
background: var(--pretable-bg-grid);
|
|
488
|
+
border: 1px solid var(--pretable-rule-strong);
|
|
489
|
+
border-radius: var(--pretable-radius);
|
|
490
|
+
box-shadow: var(--pretable-reorder-ghost-shadow);
|
|
491
|
+
/* Portaled into <body> — see the filter menu above. */
|
|
492
|
+
font-family: var(--pretable-font-sans);
|
|
493
|
+
font-size: var(--pretable-font-size-cell);
|
|
494
|
+
color: var(--pretable-text-cell);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
:where([data-pretable-date-header]) {
|
|
498
|
+
display: flex;
|
|
499
|
+
align-items: center;
|
|
500
|
+
justify-content: space-between;
|
|
501
|
+
font-weight: 600;
|
|
502
|
+
padding-bottom: 6px;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
:where([data-pretable-date-header] button) {
|
|
506
|
+
border: none;
|
|
507
|
+
background: none;
|
|
508
|
+
color: var(--pretable-text-header);
|
|
509
|
+
cursor: pointer;
|
|
510
|
+
padding: 0 6px;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
:where([data-pretable-date-header] button:hover) {
|
|
514
|
+
color: var(--pretable-accent);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
:where([data-pretable-date-popover] [role="row"]) {
|
|
518
|
+
display: grid;
|
|
519
|
+
grid-template-columns: repeat(7, 1fr);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
:where([data-pretable-date-weekdays] [role="columnheader"]) {
|
|
523
|
+
text-align: center;
|
|
524
|
+
padding: 2px 0;
|
|
525
|
+
color: var(--pretable-text-dim);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
:where([data-pretable-date-day]) {
|
|
529
|
+
text-align: center;
|
|
530
|
+
padding: 4px 0;
|
|
531
|
+
border-radius: var(--pretable-radius);
|
|
532
|
+
cursor: pointer;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
:where([data-pretable-date-day]:hover) {
|
|
536
|
+
background: var(--pretable-bg-hover);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
:where([data-pretable-date-day][data-pretable-date-outside]) {
|
|
540
|
+
color: var(--pretable-text-dim);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
:where([data-pretable-date-day][data-pretable-date-today]) {
|
|
544
|
+
box-shadow: inset 0 0 0 1px var(--pretable-focus-ring);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
:where([data-pretable-date-day][aria-selected="true"]) {
|
|
548
|
+
background: var(--pretable-bg-selected);
|
|
549
|
+
color: var(--pretable-text-selected);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/* Tooltip / popover */
|
|
553
|
+
:where([data-pretable-popover]) {
|
|
554
|
+
background: var(--pretable-bg-tooltip);
|
|
555
|
+
color: var(--pretable-text-cell);
|
|
556
|
+
border: 1px solid var(--pretable-rule);
|
|
557
|
+
border-radius: var(--pretable-radius);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/* Cell editor (inline editing) */
|
|
561
|
+
:where(.pretable-cell-editor) {
|
|
562
|
+
width: 100%;
|
|
563
|
+
height: 100%;
|
|
564
|
+
box-sizing: border-box;
|
|
565
|
+
padding: var(--pretable-cell-padding-y) var(--pretable-cell-padding-x);
|
|
566
|
+
border: none;
|
|
567
|
+
outline: 2px solid var(--pretable-focus-ring);
|
|
568
|
+
outline-offset: -2px;
|
|
569
|
+
background: var(--pretable-edit-bg);
|
|
570
|
+
color: var(--pretable-text-cell);
|
|
571
|
+
font-family: var(--pretable-font-sans);
|
|
572
|
+
font-size: var(--pretable-font-size-cell);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
:where(.pretable-cell-editor[aria-invalid="true"]) {
|
|
576
|
+
outline-color: var(--pretable-text-error);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
:where(.pretable-cell-editor[aria-busy="true"]) {
|
|
580
|
+
opacity: 0.7;
|
|
581
|
+
cursor: wait;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/* Multi-line cell editor (wrapped text columns) */
|
|
585
|
+
:where(textarea.pretable-cell-editor) {
|
|
586
|
+
resize: none;
|
|
587
|
+
overflow: auto;
|
|
588
|
+
max-height: 160px;
|
|
589
|
+
line-height: inherit;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/* Number cell editor: input + stacked steppers */
|
|
593
|
+
:where([data-pretable-number-editor]) {
|
|
594
|
+
display: flex;
|
|
595
|
+
align-items: stretch;
|
|
596
|
+
width: 100%;
|
|
597
|
+
height: 100%;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
:where([data-pretable-number-editor] .pretable-cell-editor) {
|
|
601
|
+
text-align: right;
|
|
602
|
+
flex: 1;
|
|
603
|
+
min-width: 0;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
:where([data-pretable-number-steppers]) {
|
|
607
|
+
display: flex;
|
|
608
|
+
flex-direction: column;
|
|
609
|
+
justify-content: center;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
:where([data-pretable-number-steppers] button) {
|
|
613
|
+
border: none;
|
|
614
|
+
background: var(--pretable-bg-header);
|
|
615
|
+
color: var(--pretable-text-header);
|
|
616
|
+
font-size: 8px;
|
|
617
|
+
line-height: 1;
|
|
618
|
+
padding: 2px 4px;
|
|
619
|
+
cursor: pointer;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
:where([data-pretable-number-steppers] button:hover) {
|
|
623
|
+
background: var(--pretable-bg-hover);
|
|
624
|
+
}
|
|
206
625
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
626
|
+
:where([data-pretable-edit-error]) {
|
|
627
|
+
margin-top: 2px;
|
|
628
|
+
color: var(--pretable-text-error);
|
|
629
|
+
font-family: var(--pretable-font-sans);
|
|
630
|
+
font-size: var(--pretable-font-size-cell);
|
|
631
|
+
}
|
|
213
632
|
}
|
package/dist/themes/excel.css
CHANGED
|
@@ -30,14 +30,33 @@
|
|
|
30
30
|
--pretable-bg-selected: rgba(16, 124, 65, 0.1); /* Excel green range tint */
|
|
31
31
|
--pretable-text-selected: #1f1f1f; /* Don't invert selection text */
|
|
32
32
|
--pretable-focus-ring: #107c41; /* Excel app brand green active-cell border */
|
|
33
|
+
--pretable-edit-bg: #ffffff; /* editor field — matches grid surface */
|
|
34
|
+
--pretable-text-error: #b91c1c; /* invalid outline + error text */
|
|
33
35
|
|
|
34
36
|
/* Accent */
|
|
35
37
|
--pretable-accent: #107c41; /* Excel brand green */
|
|
36
38
|
|
|
39
|
+
/* Grid controls — derived from this theme's tokens so they recolor coherently */
|
|
40
|
+
--pretable-selection-bg: color-mix(
|
|
41
|
+
in srgb,
|
|
42
|
+
var(--pretable-accent) 8%,
|
|
43
|
+
transparent
|
|
44
|
+
);
|
|
45
|
+
--pretable-checkbox-bg: var(--pretable-bg-grid);
|
|
46
|
+
--pretable-checkbox-border: var(--pretable-rule-strong);
|
|
47
|
+
--pretable-checkbox-checked-bg: var(--pretable-accent);
|
|
48
|
+
--pretable-checkbox-checked-fg: #fff;
|
|
49
|
+
--pretable-resize-handle: transparent;
|
|
50
|
+
--pretable-resize-handle-hover: var(--pretable-accent);
|
|
51
|
+
--pretable-reorder-ghost-bg: var(--pretable-bg-header);
|
|
52
|
+
--pretable-reorder-ghost-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
|
|
53
|
+
--pretable-reorder-drop-indicator: var(--pretable-accent);
|
|
54
|
+
|
|
37
55
|
/* Density — natural default = compact (Excel "Compact" tier) */
|
|
38
56
|
--pretable-row-height: 20px; /* 15pt at 96 DPI */
|
|
39
57
|
--pretable-header-height: 24px;
|
|
40
58
|
--pretable-cell-padding-x: 6px;
|
|
59
|
+
--pretable-group-indent: 12px;
|
|
41
60
|
--pretable-cell-padding-y: 2px;
|
|
42
61
|
--pretable-font-size-cell: 15px; /* Aptos Narrow 11pt */
|
|
43
62
|
--pretable-font-size-header: 13px;
|
|
@@ -56,6 +75,7 @@
|
|
|
56
75
|
--pretable-row-height: 24px;
|
|
57
76
|
--pretable-header-height: 32px;
|
|
58
77
|
--pretable-cell-padding-x: 8px;
|
|
78
|
+
--pretable-group-indent: 16px;
|
|
59
79
|
--pretable-cell-padding-y: 4px;
|
|
60
80
|
--pretable-font-size-cell: 15px;
|
|
61
81
|
--pretable-font-size-header: 14px;
|
|
@@ -65,6 +85,7 @@
|
|
|
65
85
|
--pretable-row-height: 32px;
|
|
66
86
|
--pretable-header-height: 40px;
|
|
67
87
|
--pretable-cell-padding-x: 12px;
|
|
88
|
+
--pretable-group-indent: 20px;
|
|
68
89
|
--pretable-cell-padding-y: 8px;
|
|
69
90
|
--pretable-font-size-cell: 15px;
|
|
70
91
|
--pretable-font-size-header: 14px;
|
package/dist/themes/material.css
CHANGED
|
@@ -33,14 +33,33 @@
|
|
|
33
33
|
--pretable-bg-selected: #d1e4ff; /* secondary-container — M3 baseline blue */
|
|
34
34
|
--pretable-text-selected: #001d36; /* on-secondary-container */
|
|
35
35
|
--pretable-focus-ring: #0061a4; /* primary */
|
|
36
|
+
--pretable-edit-bg: #fcfcfc; /* N99 — matches grid surface */
|
|
37
|
+
--pretable-text-error: #b3261e; /* M3 error (light) */
|
|
36
38
|
|
|
37
39
|
/* Accent */
|
|
38
40
|
--pretable-accent: #0061a4; /* primary — M3 baseline blue */
|
|
39
41
|
|
|
42
|
+
/* Grid controls — derived from this theme's tokens so they recolor coherently */
|
|
43
|
+
--pretable-selection-bg: color-mix(
|
|
44
|
+
in srgb,
|
|
45
|
+
var(--pretable-accent) 8%,
|
|
46
|
+
transparent
|
|
47
|
+
);
|
|
48
|
+
--pretable-checkbox-bg: var(--pretable-bg-grid);
|
|
49
|
+
--pretable-checkbox-border: var(--pretable-rule-strong);
|
|
50
|
+
--pretable-checkbox-checked-bg: var(--pretable-accent);
|
|
51
|
+
--pretable-checkbox-checked-fg: #fff;
|
|
52
|
+
--pretable-resize-handle: transparent;
|
|
53
|
+
--pretable-resize-handle-hover: var(--pretable-accent);
|
|
54
|
+
--pretable-reorder-ghost-bg: var(--pretable-bg-header);
|
|
55
|
+
--pretable-reorder-ghost-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
|
|
56
|
+
--pretable-reorder-drop-indicator: var(--pretable-accent);
|
|
57
|
+
|
|
40
58
|
/* Density — natural default = standard */
|
|
41
59
|
--pretable-row-height: 48px;
|
|
42
60
|
--pretable-header-height: 52px;
|
|
43
61
|
--pretable-cell-padding-x: 16px;
|
|
62
|
+
--pretable-group-indent: 24px;
|
|
44
63
|
--pretable-cell-padding-y: 12px;
|
|
45
64
|
--pretable-font-size-cell: 14px; /* body-medium */
|
|
46
65
|
--pretable-font-size-header: 14px; /* label-large (px equal; weight differs in grid.css) */
|
|
@@ -58,6 +77,7 @@
|
|
|
58
77
|
--pretable-row-height: 40px;
|
|
59
78
|
--pretable-header-height: 44px;
|
|
60
79
|
--pretable-cell-padding-x: 12px;
|
|
80
|
+
--pretable-group-indent: 20px;
|
|
61
81
|
--pretable-cell-padding-y: 6px;
|
|
62
82
|
--pretable-font-size-cell: 12px; /* body-small */
|
|
63
83
|
--pretable-font-size-header: 12px;
|
|
@@ -67,6 +87,7 @@
|
|
|
67
87
|
--pretable-row-height: 56px;
|
|
68
88
|
--pretable-header-height: 64px;
|
|
69
89
|
--pretable-cell-padding-x: 24px;
|
|
90
|
+
--pretable-group-indent: 32px;
|
|
70
91
|
--pretable-cell-padding-y: 16px;
|
|
71
92
|
--pretable-font-size-cell: 14px;
|
|
72
93
|
--pretable-font-size-header: 14px;
|
|
@@ -92,6 +113,8 @@
|
|
|
92
113
|
--pretable-bg-selected: #00497d; /* secondary-container — M3 baseline blue (dark) */
|
|
93
114
|
--pretable-text-selected: #d1e4ff; /* on-secondary-container */
|
|
94
115
|
--pretable-focus-ring: #9ecaff; /* primary (dark) */
|
|
116
|
+
--pretable-edit-bg: #1c1c1c; /* surface-container-low (dark) */
|
|
117
|
+
--pretable-text-error: #f2b8b5; /* M3 error (dark) */
|
|
95
118
|
|
|
96
119
|
--pretable-accent: #9ecaff;
|
|
97
120
|
}
|
package/dist/tokens.css
CHANGED
|
@@ -63,26 +63,6 @@
|
|
|
63
63
|
--pt-fs-eyebrow: 11px;
|
|
64
64
|
--pt-fs-data: 12.5px;
|
|
65
65
|
|
|
66
|
-
/* Cell-range selection (Phase 3 — derived from accent) */
|
|
67
|
-
--pt-color-selection-bg: rgb(234 88 12 / 0.08);
|
|
68
|
-
--pt-color-selection-border: rgb(234 88 12 / 0.6);
|
|
69
|
-
--pt-color-focus-ring: var(--pt-accent);
|
|
70
|
-
|
|
71
|
-
/* Column resize handle (sub-project C) */
|
|
72
|
-
--pt-color-resize-handle: transparent;
|
|
73
|
-
--pt-color-resize-handle-hover: var(--pt-color-selection-border);
|
|
74
|
-
|
|
75
|
-
/* Column reorder ghost + drop indicator (sub-project C) */
|
|
76
|
-
--pt-color-reorder-ghost-bg: var(--pt-color-surface, #fff);
|
|
77
|
-
--pt-color-reorder-ghost-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
|
|
78
|
-
--pt-color-reorder-drop-indicator: var(--pt-color-focus-ring);
|
|
79
|
-
|
|
80
|
-
/* Row-selection checkbox column (Phase 4) */
|
|
81
|
-
--pt-color-checkbox-bg: #fff;
|
|
82
|
-
--pt-color-checkbox-border: #d1d5db;
|
|
83
|
-
--pt-color-checkbox-checked-bg: var(--pt-accent);
|
|
84
|
-
--pt-color-checkbox-checked-fg: #fff;
|
|
85
|
-
|
|
86
66
|
/* Layout tokens */
|
|
87
67
|
--pt-page-max: 1440px;
|
|
88
68
|
--pt-header-h: 60px;
|