@kanunilabs/datagrid-react 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -4
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +128 -15
- package/dist/index.d.ts +128 -15
- package/dist/index.js +2 -2
- package/dist/styles.css +157 -74
- package/dist/themes/all.css +1588 -0
- package/dist/themes/amber.css +41 -0
- package/dist/themes/aubergine.css +49 -0
- package/dist/themes/azure.css +41 -0
- package/dist/themes/burgundy.css +49 -0
- package/dist/themes/charcoal.css +49 -0
- package/dist/themes/contrast-dark.css +49 -0
- package/dist/themes/contrast-light.css +41 -0
- package/dist/themes/coral.css +41 -0
- package/dist/themes/corporate.css +41 -0
- package/dist/themes/deep-sea.css +49 -0
- package/dist/themes/editorial.css +41 -0
- package/dist/themes/ember.css +49 -0
- package/dist/themes/emerald.css +41 -0
- package/dist/themes/forest.css +49 -0
- package/dist/themes/glacier.css +41 -0
- package/dist/themes/graphite.css +49 -0
- package/dist/themes/indigo-night.css +49 -0
- package/dist/themes/indigo.css +41 -0
- package/dist/themes/ivory.css +41 -0
- package/dist/themes/lagoon.css +41 -0
- package/dist/themes/linen.css +41 -0
- package/dist/themes/midnight.css +49 -0
- package/dist/themes/mist.css +41 -0
- package/dist/themes/monochrome.css +41 -0
- package/dist/themes/onyx.css +49 -0
- package/dist/themes/orchid.css +41 -0
- package/dist/themes/porcelain.css +41 -0
- package/dist/themes/rose.css +41 -0
- package/dist/themes/sandstone.css +41 -0
- package/dist/themes/slate-night.css +49 -0
- package/dist/themes/slate.css +41 -0
- package/dist/themes/steel.css +49 -0
- package/dist/themes/stone.css +41 -0
- package/dist/themes/taupe.css +41 -0
- package/dist/themes/teal.css +41 -0
- package/dist/themes/terminal.css +49 -0
- package/package.json +9 -5
package/dist/styles.css
CHANGED
|
@@ -47,6 +47,11 @@
|
|
|
47
47
|
--dg-primary: #0369a1; /* sky-700 */
|
|
48
48
|
--dg-primary-soft: #e0f2fe; /* sky-100 */
|
|
49
49
|
--dg-focus-ring: #0369a1; /* matches the accent */
|
|
50
|
+
/* Find without filtering (P-FIND-01): every match tinted, the current one
|
|
51
|
+
stronger and ringed. Translucent, so selection and zebra show through. */
|
|
52
|
+
--dg-find-match-bg: color-mix(in srgb, #facc15 24%, transparent);
|
|
53
|
+
--dg-find-active-bg: color-mix(in srgb, #f59e0b 45%, transparent);
|
|
54
|
+
--dg-find-active-ring: #b45309;
|
|
50
55
|
/* Cell flash (P1.7). Translucent so the row's own background — striped,
|
|
51
56
|
selected, dirty — stays visible under the pulse rather than being
|
|
52
57
|
replaced by it. */
|
|
@@ -93,7 +98,7 @@
|
|
|
93
98
|
--dg-scrollbar-track: transparent;
|
|
94
99
|
|
|
95
100
|
/* ── Elevation ──
|
|
96
|
-
A flat theme sets these to `none`;
|
|
101
|
+
A flat theme sets these to `none`; Elevated raises them. */
|
|
97
102
|
--dg-shadow-popup: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
|
|
98
103
|
--dg-shadow-popup-sm: 0 8px 24px rgba(15, 23, 42, 0.16);
|
|
99
104
|
--dg-shadow-menu: 0 12px 28px rgba(15, 23, 42, 0.22);
|
|
@@ -114,14 +119,14 @@
|
|
|
114
119
|
/* ── Line work ─────────────────────────────────────────────
|
|
115
120
|
Whole SHORTHANDS rather than a colour and a width, so a theme can drop a
|
|
116
121
|
line entirely (`none`) instead of only fading it. This is most of what
|
|
117
|
-
separates the presets:
|
|
118
|
-
rules rows only,
|
|
122
|
+
separates the presets: Ledger rules every column and every row, Elevated
|
|
123
|
+
rules rows only, Minimal keeps the rows faint and skips the columns. */
|
|
119
124
|
--dg-cell-border: 1px solid var(--dg-border);
|
|
120
125
|
--dg-row-border: 1px solid var(--dg-border);
|
|
121
126
|
--dg-header-cell-border: 1px solid var(--dg-border);
|
|
122
127
|
--dg-header-border: 1px solid var(--dg-border-strong);
|
|
123
128
|
/* A band's EDGE is not a column separator, so it gets its own token rather
|
|
124
|
-
than riding on `--dg-header-cell-border`.
|
|
129
|
+
than riding on `--dg-header-cell-border`. Minimal and Elevated set that one
|
|
125
130
|
to `none` on purpose — they rule rows, not columns — and the bands went
|
|
126
131
|
with it: "Where" and "Sales" sat over their columns with nothing marking
|
|
127
132
|
where either one started or stopped. Same argument the band row's
|
|
@@ -130,7 +135,7 @@
|
|
|
130
135
|
|
|
131
136
|
Mixed from the header TEXT rather than taken from a border token, because
|
|
132
137
|
both border tokens are too faint for a 24px vertical segment: measured on
|
|
133
|
-
|
|
138
|
+
Minimal against the header background, `--dg-border` gives 1.17:1 and
|
|
134
139
|
`--dg-border-strong` 1.39:1 — lines that are technically drawn and
|
|
135
140
|
practically invisible, i.e. a fix that changes nothing the user sees. The
|
|
136
141
|
mix lands near 2:1 and follows the theme in both light and dark, since the
|
|
@@ -206,6 +211,7 @@
|
|
|
206
211
|
--dg-primary: #38bdf8;
|
|
207
212
|
--dg-primary-soft: #0c4a6e;
|
|
208
213
|
--dg-focus-ring: #7dd3fc;
|
|
214
|
+
--dg-find-active-ring: #fbbf24;
|
|
209
215
|
/* Lifted for a dark surface: crimson on near-black reads as brown. */
|
|
210
216
|
--dg-note-marker: #f87171;
|
|
211
217
|
--dg-shadow-pinned: 2px 0 4px -2px rgba(0, 0, 0, 0.55);
|
|
@@ -487,7 +493,7 @@
|
|
|
487
493
|
out at 17.55px, so every wrapped row landed on a fractional boundary and
|
|
488
494
|
its 1px border rendered a pixel thick on some rows and two on others.
|
|
489
495
|
A token now, because a theme moves the body font under it — 18px is right
|
|
490
|
-
for 13px text and cramped for
|
|
496
|
+
for 13px text and cramped for Elevated's 14px. */
|
|
491
497
|
line-height: var(--dg-wrap-line-height);
|
|
492
498
|
}
|
|
493
499
|
|
|
@@ -706,6 +712,29 @@
|
|
|
706
712
|
font-variant-numeric: tabular-nums;
|
|
707
713
|
}
|
|
708
714
|
|
|
715
|
+
/* Numbered page buttons (`pagination.pageButtons`). The current page is the
|
|
716
|
+
one marked `aria-current`, so the style follows the same attribute a screen
|
|
717
|
+
reader announces — the two cannot disagree. */
|
|
718
|
+
.kanuni-datagrid-pager-buttons .kanuni-datagrid-pager-page {
|
|
719
|
+
padding: 0 6px;
|
|
720
|
+
font-variant-numeric: tabular-nums;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
/* `button` in the selector so it outranks the generic hover rule above. */
|
|
724
|
+
.kanuni-datagrid-pager-buttons button.kanuni-datagrid-pager-page[aria-current='page'] {
|
|
725
|
+
border-color: var(--dg-primary);
|
|
726
|
+
background: var(--dg-primary-soft);
|
|
727
|
+
color: var(--dg-primary);
|
|
728
|
+
font-weight: 600;
|
|
729
|
+
cursor: default;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.kanuni-datagrid-pager-gap {
|
|
733
|
+
min-width: 16px;
|
|
734
|
+
color: var(--dg-text-muted);
|
|
735
|
+
text-align: center;
|
|
736
|
+
}
|
|
737
|
+
|
|
709
738
|
/* ── Group panel ──────────────────────────────────────────── */
|
|
710
739
|
.kanuni-datagrid-group-panel {
|
|
711
740
|
display: flex;
|
|
@@ -1060,6 +1089,13 @@
|
|
|
1060
1089
|
cursor: pointer;
|
|
1061
1090
|
}
|
|
1062
1091
|
|
|
1092
|
+
/* A row `selection.isRowSelectable` refuses: the box stays (the column keeps
|
|
1093
|
+
its rhythm) but cannot be ticked. */
|
|
1094
|
+
.kanuni-datagrid-select-cell input:disabled {
|
|
1095
|
+
cursor: not-allowed;
|
|
1096
|
+
opacity: 0.45;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1063
1099
|
/* ── Row numbers (gap analysis P3.5) ───────────────────────── */
|
|
1064
1100
|
/* Muted and tabular on purpose. The number is an address, not data: at full
|
|
1065
1101
|
text weight it competes with the first real column, and proportional digits
|
|
@@ -1084,6 +1120,16 @@
|
|
|
1084
1120
|
outline-offset: -2px;
|
|
1085
1121
|
}
|
|
1086
1122
|
|
|
1123
|
+
/* Find without filtering (P-FIND-01): every match tinted, the current one
|
|
1124
|
+
stronger and outlined so it reads at a glance among the others. */
|
|
1125
|
+
.kanuni-datagrid-cell--find-match {
|
|
1126
|
+
background: var(--dg-find-match-bg);
|
|
1127
|
+
}
|
|
1128
|
+
.kanuni-datagrid-cell--find-active {
|
|
1129
|
+
background: var(--dg-find-active-bg);
|
|
1130
|
+
box-shadow: inset 0 0 0 2px var(--dg-find-active-ring);
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1087
1133
|
.kanuni-datagrid-scroller:focus {
|
|
1088
1134
|
outline: none;
|
|
1089
1135
|
}
|
|
@@ -1499,6 +1545,14 @@
|
|
|
1499
1545
|
overflow-wrap: anywhere;
|
|
1500
1546
|
}
|
|
1501
1547
|
|
|
1548
|
+
/* An interactive tooltip (P-TOOL-01) takes the pointer: its text can be
|
|
1549
|
+
selected and a link in it clicked. The grace period in the hook lets the
|
|
1550
|
+
pointer cross the gap from the cell without closing it. */
|
|
1551
|
+
.kanuni-datagrid-tooltip--interactive {
|
|
1552
|
+
pointer-events: auto;
|
|
1553
|
+
user-select: text;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1502
1556
|
.kanuni-datagrid-filter-popup {
|
|
1503
1557
|
position: fixed;
|
|
1504
1558
|
z-index: 1000;
|
|
@@ -1681,6 +1735,35 @@
|
|
|
1681
1735
|
}
|
|
1682
1736
|
}
|
|
1683
1737
|
|
|
1738
|
+
/* A block the server failed to send (P-SSRM-01): a message and a Retry button
|
|
1739
|
+
on each of its rows instead of a skeleton that never resolves. */
|
|
1740
|
+
.kanuni-datagrid-row--load-failed .kanuni-datagrid-loading-cell {
|
|
1741
|
+
display: flex;
|
|
1742
|
+
align-items: center;
|
|
1743
|
+
gap: 8px;
|
|
1744
|
+
color: var(--dg-text-muted);
|
|
1745
|
+
font-size: var(--dg-control-font-size);
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
.kanuni-datagrid-retry-button {
|
|
1749
|
+
padding: 2px 10px;
|
|
1750
|
+
border: 1px solid var(--dg-border-strong);
|
|
1751
|
+
border-radius: var(--dg-radius-control);
|
|
1752
|
+
background: var(--dg-surface);
|
|
1753
|
+
color: var(--dg-text);
|
|
1754
|
+
font: inherit;
|
|
1755
|
+
cursor: pointer;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
.kanuni-datagrid-retry-button:hover {
|
|
1759
|
+
background: var(--dg-surface-hover);
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
.kanuni-datagrid-retry-button:focus-visible {
|
|
1763
|
+
outline: 2px solid var(--dg-focus-ring);
|
|
1764
|
+
outline-offset: 1px;
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1684
1767
|
/* Respect a reduced-motion preference: the pulse is decoration, and a user who
|
|
1685
1768
|
asked for stillness should get a static placeholder. */
|
|
1686
1769
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -2480,10 +2563,10 @@
|
|
|
2480
2563
|
─────────────────────────────────────────────────────────────
|
|
2481
2564
|
Six presets, each in a light and a dark palette, each at three densities.
|
|
2482
2565
|
Nothing here is copied from a third-party stylesheet: every rule is a
|
|
2483
|
-
KanuniLabs class overriding a KanuniLabs --dg-* token
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2566
|
+
KanuniLabs class overriding a KanuniLabs --dg-* token, and the names say
|
|
2567
|
+
what each theme does (minimal, ledger, elevated, framed). Until 2026-10-11
|
|
2568
|
+
four of them carried names another grid vendor also uses for its themes;
|
|
2569
|
+
they were renamed so nothing public reads as borrowed.
|
|
2487
2570
|
|
|
2488
2571
|
── How a theme is expressed ───────────────────────────────
|
|
2489
2572
|
A theme is a token override and (almost) nothing else. That is the whole
|
|
@@ -2506,15 +2589,15 @@
|
|
|
2506
2589
|
───────────────────────────────────────────────────────────── */
|
|
2507
2590
|
|
|
2508
2591
|
/* ═══════════════════════════════════════════════════════════
|
|
2509
|
-
|
|
2592
|
+
MINIMAL — modern, minimal chrome
|
|
2510
2593
|
═══════════════════════════════════════════════════════════
|
|
2511
2594
|
The least furniture that still reads as a table: no column separators at
|
|
2512
2595
|
all, hairline row rules, and a header that is the same white as the body,
|
|
2513
2596
|
separated only by one firm line. Generous radii. For product UIs where the
|
|
2514
2597
|
grid sits among cards rather than inside a terminal. */
|
|
2515
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
2516
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
2517
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
2598
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-minimal,
|
|
2599
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-minimal,
|
|
2600
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-minimal {
|
|
2518
2601
|
--dg-bg: #ffffff;
|
|
2519
2602
|
--dg-surface: #ffffff;
|
|
2520
2603
|
--dg-surface-header: #ffffff;
|
|
@@ -2559,9 +2642,9 @@
|
|
|
2559
2642
|
--dg-chrome-padding-y: 8px;
|
|
2560
2643
|
}
|
|
2561
2644
|
|
|
2562
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
2563
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
2564
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
2645
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-minimal.kanuni-datagrid-dark,
|
|
2646
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-minimal.kanuni-datagrid-dark,
|
|
2647
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-minimal.kanuni-datagrid-dark {
|
|
2565
2648
|
--dg-bg: #0d1117;
|
|
2566
2649
|
--dg-surface: #0d1117;
|
|
2567
2650
|
--dg-surface-header: #0d1117;
|
|
@@ -2582,14 +2665,14 @@
|
|
|
2582
2665
|
}
|
|
2583
2666
|
|
|
2584
2667
|
/* ═══════════════════════════════════════════════════════════
|
|
2585
|
-
|
|
2668
|
+
LEDGER — dense, ruled, financial
|
|
2586
2669
|
═══════════════════════════════════════════════════════════
|
|
2587
2670
|
Every column and every row is ruled, the type is small, the padding is
|
|
2588
2671
|
tight and the corners are nearly square. Built for the case where the grid
|
|
2589
2672
|
IS the application and the user is counting rows on screen. */
|
|
2590
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
2591
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
2592
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
2673
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-ledger,
|
|
2674
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-ledger,
|
|
2675
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-ledger {
|
|
2593
2676
|
--dg-bg: #ffffff;
|
|
2594
2677
|
--dg-surface: #ffffff;
|
|
2595
2678
|
--dg-surface-header: #f2f4f6;
|
|
@@ -2644,9 +2727,9 @@
|
|
|
2644
2727
|
--dg-chrome-padding-y: 4px;
|
|
2645
2728
|
}
|
|
2646
2729
|
|
|
2647
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
2648
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
2649
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
2730
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-ledger.kanuni-datagrid-dark,
|
|
2731
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-ledger.kanuni-datagrid-dark,
|
|
2732
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-ledger.kanuni-datagrid-dark {
|
|
2650
2733
|
--dg-bg: #1a2029;
|
|
2651
2734
|
--dg-surface: #1a2029;
|
|
2652
2735
|
--dg-surface-header: #232b36;
|
|
@@ -2667,14 +2750,14 @@
|
|
|
2667
2750
|
}
|
|
2668
2751
|
|
|
2669
2752
|
/* ═══════════════════════════════════════════════════════════
|
|
2670
|
-
|
|
2753
|
+
ELEVATED — tall, quiet lines, real elevation
|
|
2671
2754
|
═══════════════════════════════════════════════════════════
|
|
2672
2755
|
Rows only, no column rules; larger rhythm; a header set in medium weight
|
|
2673
2756
|
with open tracking rather than bold; pill-shaped controls; and shadows that
|
|
2674
2757
|
actually lift. The one preset whose type scale grows rather than shrinks. */
|
|
2675
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
2676
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
2677
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
2758
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-elevated,
|
|
2759
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-elevated,
|
|
2760
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-elevated {
|
|
2678
2761
|
--dg-bg: #ffffff;
|
|
2679
2762
|
--dg-surface: #ffffff;
|
|
2680
2763
|
--dg-surface-header: #ffffff;
|
|
@@ -2726,9 +2809,9 @@
|
|
|
2726
2809
|
--dg-chrome-padding-y: 10px;
|
|
2727
2810
|
}
|
|
2728
2811
|
|
|
2729
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
2730
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
2731
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
2812
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-elevated.kanuni-datagrid-dark,
|
|
2813
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-elevated.kanuni-datagrid-dark,
|
|
2814
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-elevated.kanuni-datagrid-dark {
|
|
2732
2815
|
--dg-bg: #141218;
|
|
2733
2816
|
--dg-surface: #141218;
|
|
2734
2817
|
--dg-surface-header: #141218;
|
|
@@ -2750,14 +2833,14 @@
|
|
|
2750
2833
|
}
|
|
2751
2834
|
|
|
2752
2835
|
/* ═══════════════════════════════════════════════════════════
|
|
2753
|
-
|
|
2836
|
+
FRAMED — airy, fully framed, high-chroma accent
|
|
2754
2837
|
═══════════════════════════════════════════════════════════
|
|
2755
2838
|
The middle position: both sets of rules are drawn but kept light, the rhythm
|
|
2756
2839
|
is roomy, and the header is anchored by a doubled rule and a heavy weight so
|
|
2757
2840
|
it reads as a distinct band even though it shares the body's palette. */
|
|
2758
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
2759
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
2760
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
2841
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-framed,
|
|
2842
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-framed,
|
|
2843
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-framed {
|
|
2761
2844
|
--dg-bg: #ffffff;
|
|
2762
2845
|
--dg-surface: #ffffff;
|
|
2763
2846
|
--dg-surface-header: #f8f9fa;
|
|
@@ -2804,9 +2887,9 @@
|
|
|
2804
2887
|
--dg-chrome-padding-y: 7px;
|
|
2805
2888
|
}
|
|
2806
2889
|
|
|
2807
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
2808
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
2809
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
2890
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-framed.kanuni-datagrid-dark,
|
|
2891
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-framed.kanuni-datagrid-dark,
|
|
2892
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-framed.kanuni-datagrid-dark {
|
|
2810
2893
|
--dg-bg: #181d1f;
|
|
2811
2894
|
--dg-surface: #181d1f;
|
|
2812
2895
|
--dg-surface-header: #222628;
|
|
@@ -2974,7 +3057,7 @@
|
|
|
2974
3057
|
together — row, header, cell padding, control height, toolbar and pager
|
|
2975
3058
|
padding, filter field — so the proportions hold and the grid stays usable
|
|
2976
3059
|
rather than merely smaller. Each theme scales from its OWN normal, because a
|
|
2977
|
-
|
|
3060
|
+
Elevated row starts at 40px and a Ledger row at 25px; one shared compact
|
|
2978
3061
|
value would have flattened the presets into each other at that density.
|
|
2979
3062
|
|
|
2980
3063
|
The ROW HEIGHT is deliberately absent here: it is a core value the
|
|
@@ -2987,10 +3070,10 @@
|
|
|
2987
3070
|
base sheet's presets are root-only, which left popup controls at their
|
|
2988
3071
|
normal size whatever the grid was set to. */
|
|
2989
3072
|
|
|
2990
|
-
/* ──
|
|
2991
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
2992
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
2993
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
3073
|
+
/* ── Minimal ── */
|
|
3074
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-minimal.kanuni-datagrid-density-compact,
|
|
3075
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-minimal.kanuni-datagrid-density-compact,
|
|
3076
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-minimal.kanuni-datagrid-density-compact {
|
|
2994
3077
|
--dg-header-height: 30px;
|
|
2995
3078
|
--dg-cell-padding-x: 8px;
|
|
2996
3079
|
--dg-font-size: 12px;
|
|
@@ -3003,9 +3086,9 @@
|
|
|
3003
3086
|
--dg-chrome-padding-y: 4px;
|
|
3004
3087
|
}
|
|
3005
3088
|
|
|
3006
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
3007
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
3008
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
3089
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-minimal.kanuni-datagrid-density-comfortable,
|
|
3090
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-minimal.kanuni-datagrid-density-comfortable,
|
|
3091
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-minimal.kanuni-datagrid-density-comfortable {
|
|
3009
3092
|
--dg-header-height: 48px;
|
|
3010
3093
|
--dg-cell-padding-x: 16px;
|
|
3011
3094
|
--dg-font-size: 14px;
|
|
@@ -3018,10 +3101,10 @@
|
|
|
3018
3101
|
--dg-chrome-padding-y: 10px;
|
|
3019
3102
|
}
|
|
3020
3103
|
|
|
3021
|
-
/* ──
|
|
3022
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
3023
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
3024
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
3104
|
+
/* ── Ledger ── */
|
|
3105
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-ledger.kanuni-datagrid-density-compact,
|
|
3106
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-ledger.kanuni-datagrid-density-compact,
|
|
3107
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-ledger.kanuni-datagrid-density-compact {
|
|
3025
3108
|
--dg-header-height: 22px;
|
|
3026
3109
|
--dg-cell-padding-x: 4px;
|
|
3027
3110
|
--dg-font-size: 11px;
|
|
@@ -3034,9 +3117,9 @@
|
|
|
3034
3117
|
--dg-chrome-padding-y: 2px;
|
|
3035
3118
|
}
|
|
3036
3119
|
|
|
3037
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
3038
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
3039
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
3120
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-ledger.kanuni-datagrid-density-comfortable,
|
|
3121
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-ledger.kanuni-datagrid-density-comfortable,
|
|
3122
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-ledger.kanuni-datagrid-density-comfortable {
|
|
3040
3123
|
--dg-header-height: 36px;
|
|
3041
3124
|
--dg-cell-padding-x: 10px;
|
|
3042
3125
|
--dg-font-size: 13px;
|
|
@@ -3049,10 +3132,10 @@
|
|
|
3049
3132
|
--dg-chrome-padding-y: 6px;
|
|
3050
3133
|
}
|
|
3051
3134
|
|
|
3052
|
-
/* ──
|
|
3053
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
3054
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
3055
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
3135
|
+
/* ── Elevated ── */
|
|
3136
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-elevated.kanuni-datagrid-density-compact,
|
|
3137
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-elevated.kanuni-datagrid-density-compact,
|
|
3138
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-elevated.kanuni-datagrid-density-compact {
|
|
3056
3139
|
--dg-header-height: 36px;
|
|
3057
3140
|
--dg-cell-padding-x: 12px;
|
|
3058
3141
|
--dg-font-size: 13px;
|
|
@@ -3065,9 +3148,9 @@
|
|
|
3065
3148
|
--dg-chrome-padding-y: 6px;
|
|
3066
3149
|
}
|
|
3067
3150
|
|
|
3068
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
3069
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
3070
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
3151
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-elevated.kanuni-datagrid-density-comfortable,
|
|
3152
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-elevated.kanuni-datagrid-density-comfortable,
|
|
3153
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-elevated.kanuni-datagrid-density-comfortable {
|
|
3071
3154
|
--dg-header-height: 56px;
|
|
3072
3155
|
--dg-cell-padding-x: 20px;
|
|
3073
3156
|
--dg-font-size: 15px;
|
|
@@ -3080,10 +3163,10 @@
|
|
|
3080
3163
|
--dg-chrome-padding-y: 12px;
|
|
3081
3164
|
}
|
|
3082
3165
|
|
|
3083
|
-
/* ──
|
|
3084
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
3085
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
3086
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
3166
|
+
/* ── Framed ── */
|
|
3167
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-framed.kanuni-datagrid-density-compact,
|
|
3168
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-framed.kanuni-datagrid-density-compact,
|
|
3169
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-framed.kanuni-datagrid-density-compact {
|
|
3087
3170
|
--dg-header-height: 28px;
|
|
3088
3171
|
--dg-cell-padding-x: 8px;
|
|
3089
3172
|
--dg-font-size: 12px;
|
|
@@ -3096,9 +3179,9 @@
|
|
|
3096
3179
|
--dg-chrome-padding-y: 4px;
|
|
3097
3180
|
}
|
|
3098
3181
|
|
|
3099
|
-
.kanuni-datagrid-root.kanuni-datagrid-theme-
|
|
3100
|
-
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-
|
|
3101
|
-
.kanuni-datagrid-detached.kanuni-datagrid-theme-
|
|
3182
|
+
.kanuni-datagrid-root.kanuni-datagrid-theme-framed.kanuni-datagrid-density-comfortable,
|
|
3183
|
+
.kanuni-datagrid-enterprise.kanuni-datagrid-theme-framed.kanuni-datagrid-density-comfortable,
|
|
3184
|
+
.kanuni-datagrid-detached.kanuni-datagrid-theme-framed.kanuni-datagrid-density-comfortable {
|
|
3102
3185
|
--dg-header-height: 46px;
|
|
3103
3186
|
--dg-cell-padding-x: 16px;
|
|
3104
3187
|
--dg-font-size: 14px;
|
|
@@ -3204,17 +3287,17 @@
|
|
|
3204
3287
|
the edge element (there is exactly one per side, not one per cell) restores
|
|
3205
3288
|
it without bringing the column rules back.
|
|
3206
3289
|
|
|
3207
|
-
Every ruled preset —
|
|
3290
|
+
Every ruled preset — Ledger, Framed — needs nothing here: the seam is
|
|
3208
3291
|
already drawn by the cell borders they keep. */
|
|
3209
|
-
.kanuni-datagrid-theme-
|
|
3210
|
-
.kanuni-datagrid-theme-
|
|
3292
|
+
.kanuni-datagrid-theme-minimal .kanuni-datagrid-pin-edge-left,
|
|
3293
|
+
.kanuni-datagrid-theme-elevated .kanuni-datagrid-pin-edge-left,
|
|
3211
3294
|
.kanuni-datagrid-theme-kanuni .kanuni-datagrid-pin-edge-left,
|
|
3212
3295
|
.kanuni-datagrid-theme-kanuni-midnight .kanuni-datagrid-pin-edge-left {
|
|
3213
3296
|
border-inline-end: 1px solid var(--dg-border-strong);
|
|
3214
3297
|
}
|
|
3215
3298
|
|
|
3216
|
-
.kanuni-datagrid-theme-
|
|
3217
|
-
.kanuni-datagrid-theme-
|
|
3299
|
+
.kanuni-datagrid-theme-minimal .kanuni-datagrid-pin-edge-right,
|
|
3300
|
+
.kanuni-datagrid-theme-elevated .kanuni-datagrid-pin-edge-right,
|
|
3218
3301
|
.kanuni-datagrid-theme-kanuni .kanuni-datagrid-pin-edge-right,
|
|
3219
3302
|
.kanuni-datagrid-theme-kanuni-midnight .kanuni-datagrid-pin-edge-right {
|
|
3220
3303
|
border-inline-start: 1px solid var(--dg-border-strong);
|
|
@@ -3226,8 +3309,8 @@
|
|
|
3226
3309
|
A palette is a SECOND, independent axis: it changes the colours and nothing
|
|
3227
3310
|
else. The theme keeps deciding the structure — where the rules are drawn, how
|
|
3228
3311
|
tall a row is, how round a control is, how much the popups lift — so
|
|
3229
|
-
`theme="
|
|
3230
|
-
blues, and `theme="
|
|
3312
|
+
`theme="ledger" palette="nord"` is Ledger's dense ruled grid in Nord's arctic
|
|
3313
|
+
blues, and `theme="elevated" palette="nord"` is Elevated's tall airy one in
|
|
3231
3314
|
the same blues. Four themes and six palettes is twenty-four looks out of ten
|
|
3232
3315
|
class names, not twenty-four stylesheets.
|
|
3233
3316
|
|