@gridkitjs/theme-tailwind 0.8.0 → 0.8.1
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 +31 -19
- package/package.json +1 -1
- package/src/styles.css +1 -29
package/README.md
CHANGED
|
@@ -62,17 +62,17 @@ Tailwind config:
|
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
| Token | What it colours
|
|
66
|
-
| --------------------------- |
|
|
67
|
-
| `--gridkit-surface` | Header background
|
|
68
|
-
| `--gridkit-surface-muted` | Hover background
|
|
69
|
-
| `--gridkit-line` | Borders
|
|
70
|
-
| `--gridkit-hover-line` | Cell hover outline, resize edge
|
|
71
|
-
| `--gridkit-fg` | Text
|
|
72
|
-
| `--gridkit-fg-muted` | Secondary text
|
|
73
|
-
| `--gridkit-accent` |
|
|
74
|
-
| `--gridkit-selected` | Selected row, column or cell
|
|
75
|
-
| `--gridkit-selected-strong` | A selected row or cell also hovered
|
|
65
|
+
| Token | What it colours |
|
|
66
|
+
| --------------------------- | ------------------------------------------------------------------------ |
|
|
67
|
+
| `--gridkit-surface` | Header background |
|
|
68
|
+
| `--gridkit-surface-muted` | Hover background |
|
|
69
|
+
| `--gridkit-line` | Borders |
|
|
70
|
+
| `--gridkit-hover-line` | Cell hover outline, resize edge |
|
|
71
|
+
| `--gridkit-fg` | Text |
|
|
72
|
+
| `--gridkit-fg-muted` | Secondary text and icons |
|
|
73
|
+
| `--gridkit-accent` | Focus rings, drop indicators, and the active sort, group and check marks |
|
|
74
|
+
| `--gridkit-selected` | Selected row, column or cell |
|
|
75
|
+
| `--gridkit-selected-strong` | A selected row or cell also hovered |
|
|
76
76
|
|
|
77
77
|
Redefine them inside `@variant dark { }` (or under `.gridkit-dark`) to change
|
|
78
78
|
the dark palette too:
|
|
@@ -95,18 +95,30 @@ highlight under the pointer.
|
|
|
95
95
|
|
|
96
96
|
The grid marks its own state, so a consumer's CSS can reach it too:
|
|
97
97
|
|
|
98
|
-
| Class | On
|
|
99
|
-
| ------------------------------------------------------------- |
|
|
100
|
-
| `is-selected` | A selected `grid-row`, `header-cell` or `grid-cell`
|
|
101
|
-
| `is-resizing` / `is-dragging` | The column being resized or dragged
|
|
102
|
-
| `is-drop-before` / `is-drop-after` | Where a dragged column would land
|
|
103
|
-
| `is-reorderable` / `is-wrapped` | A header that drags; a cell that wraps
|
|
104
|
-
| `selectable-rows` / `selectable-columns` / `selectable-cells` | On the grid, per `selectable`
|
|
105
|
-
| `no-hover-rows` / `no-hover-columns` / `no-hover-cells` | On the grid, per `hoverable`
|
|
98
|
+
| Class | On |
|
|
99
|
+
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
100
|
+
| `is-selected` | A selected `grid-row`, `header-cell` or `grid-cell` |
|
|
101
|
+
| `is-resizing` / `is-dragging` | The column being resized or dragged |
|
|
102
|
+
| `is-drop-before` / `is-drop-after` | Where a dragged column would land |
|
|
103
|
+
| `is-reorderable` / `is-wrapped` | A header that drags; a cell that wraps |
|
|
104
|
+
| `selectable-rows` / `selectable-columns` / `selectable-cells` | On the grid, per `selectable` |
|
|
105
|
+
| `no-hover-rows` / `no-hover-columns` / `no-hover-cells` | On the grid, per `hoverable` |
|
|
106
|
+
| `is-sorted-asc` / `is-sorted-desc` | A header's `header-sort-toggle` while its column sorts |
|
|
107
|
+
| `is-grouped` | A header's `header-group-toggle` while its column is grouped |
|
|
108
|
+
| `is-expanded` | A group row's `group-toggle` while the group is open |
|
|
109
|
+
| `is-drag-target` / `is-drag-blocked` | The group-by bar while a drag can drop on it; while a header already grouped is dragged at it |
|
|
106
110
|
|
|
107
111
|
The `selectable-*` classes enable and the `no-hover-*` classes disable, because
|
|
108
112
|
selection is off by default and hover is on — each follows its own default.
|
|
109
113
|
|
|
114
|
+
The toolbar (`gridkit-toolbar`), the overlay around every menu and panel
|
|
115
|
+
(`gridkit-overlay`), menus (`gridkit-menu`) and the column chooser
|
|
116
|
+
(`gridkit-column-chooser`) mark their state with ARIA attributes rather than
|
|
117
|
+
classes — `aria-disabled`, `aria-pressed`, `aria-checked`, `aria-expanded` —
|
|
118
|
+
and the stylesheet targets those. An overlay renders into `document.body` and
|
|
119
|
+
carries the grid's `gridkit-light`/`gridkit-dark`, so its selectors are
|
|
120
|
+
top-level, not under `gridkit-data-grid`.
|
|
121
|
+
|
|
110
122
|
## License
|
|
111
123
|
|
|
112
124
|
MIT © Blagoja Blazhevski
|
package/package.json
CHANGED
package/src/styles.css
CHANGED
|
@@ -342,33 +342,6 @@
|
|
|
342
342
|
box-shadow: inset -2px 0 0 0 var(--gridkit-accent);
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
/*
|
|
346
|
-
* `pointer-events: none` keeps the grab zone exactly the handle's 6px — the
|
|
347
|
-
* grip only says where to click.
|
|
348
|
-
*/
|
|
349
|
-
.gridkit-data-grid .header-resize-grip {
|
|
350
|
-
position: absolute;
|
|
351
|
-
top: 50%;
|
|
352
|
-
right: 0;
|
|
353
|
-
transform: translateY(-50%);
|
|
354
|
-
color: var(--gridkit-fg-muted);
|
|
355
|
-
fill: currentColor;
|
|
356
|
-
opacity: 0;
|
|
357
|
-
pointer-events: none;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
/*
|
|
361
|
-
* Unscoped by `no-hover-columns`: the grip is a resize affordance, not part
|
|
362
|
-
* of the hover styling a consumer can turn off.
|
|
363
|
-
*/
|
|
364
|
-
.gridkit-data-grid .grid-header .header-cell:hover .header-resize-grip {
|
|
365
|
-
opacity: 1;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
.gridkit-data-grid .header-cell.is-resizing .header-resize-grip {
|
|
369
|
-
opacity: 0;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
345
|
/*
|
|
373
346
|
* Docked to the header's own right edge, absolutely — like the resize
|
|
374
347
|
* handle, and for the same reason: sitting in the label's normal flow, a
|
|
@@ -400,8 +373,7 @@
|
|
|
400
373
|
|
|
401
374
|
/*
|
|
402
375
|
* Hidden until the column has a direction or the header is hovered or
|
|
403
|
-
* focused — an unsorted, un-hovered header stays quiet
|
|
404
|
-
* `.header-resize-grip` uses.
|
|
376
|
+
* focused — an unsorted, un-hovered header stays quiet.
|
|
405
377
|
*/
|
|
406
378
|
.gridkit-data-grid
|
|
407
379
|
.header-sort-toggle:not(.is-sorted-asc):not(.is-sorted-desc) {
|