@coldsmirk/ledger-mantine 0.5.0 → 0.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/dist/index.cjs +106 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +106 -26
- package/dist/index.js.map +1 -1
- package/dist/styles.css +32 -16
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -18,11 +18,19 @@
|
|
|
18
18
|
* degrades to content height when the parent is indefinite. min-width/min-height: 0
|
|
19
19
|
* pre-defuse the flex/grid min-size:auto shrink trap; overflow only ever appears on the
|
|
20
20
|
* internal scroller.
|
|
21
|
+
*
|
|
22
|
+
* The root is a one-column grid, the elastic row first and the pagination bar under it — not
|
|
23
|
+
* a flex column: under a max height (`mah`) a grid resolves its `1fr` row against the cap
|
|
24
|
+
* (CSS Grid §12.7.1), so the main region stretched into it has a definite height, and so does
|
|
25
|
+
* the scroller's viewport (`height: 100%`). A flex column leaves that height indefinite: the
|
|
26
|
+
* viewport grows to its content and nothing scrolls. A definite parent's row fills it, and an
|
|
27
|
+
* indefinite parent's follows the content, as before.
|
|
21
28
|
* ------------------------------------------------------------------------------------------ */
|
|
22
29
|
.ledger-root {
|
|
23
30
|
position: relative;
|
|
24
|
-
display:
|
|
25
|
-
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
33
|
+
grid-template-columns: minmax(0, 1fr);
|
|
26
34
|
width: 100%;
|
|
27
35
|
min-width: 0;
|
|
28
36
|
height: 100%;
|
|
@@ -38,16 +46,17 @@
|
|
|
38
46
|
border-radius: var(--ledger-radius, 0);
|
|
39
47
|
}
|
|
40
48
|
|
|
41
|
-
/* Secondary text (captions, counts, the state panels' titles, the pagination words):
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
/* Secondary text (captions, counts, the state panels' titles, the pagination words): the text
|
|
50
|
+
color at 78% opacity, so it is defined against whatever it sits on rather than as one fixed
|
|
51
|
+
gray. A fixed tone cannot hold 4.5:1 (WCAG AA) on every background a row takes; text that
|
|
52
|
+
blends with its background keeps a share of the text color's own contrast on each of them —
|
|
53
|
+
at 78%, 4.8:1 on the dark scheme's stripes and hover, its lowest neutral background (Mantine's
|
|
54
|
+
own `dimmed` is 3.3:1 on a light body). Overridable on these elements
|
|
46
55
|
(docs/styling.md#css-custom-properties). */
|
|
47
56
|
.ledger-root,
|
|
48
57
|
.ledger-pagination-bar,
|
|
49
58
|
.ledger-columns-panel {
|
|
50
|
-
--ledger-color-dimmed: color-mix(in srgb, var(--mantine-color-
|
|
59
|
+
--ledger-color-dimmed: color-mix(in srgb, var(--mantine-color-text) 78%, transparent);
|
|
51
60
|
}
|
|
52
61
|
|
|
53
62
|
/* The frame around header + body — the elastic middle; carries the outer table border
|
|
@@ -57,7 +66,6 @@
|
|
|
57
66
|
its box, and the row-drag ghost is portaled to the body. */
|
|
58
67
|
.ledger-main {
|
|
59
68
|
display: flex;
|
|
60
|
-
flex: 1 1 auto;
|
|
61
69
|
flex-direction: column;
|
|
62
70
|
min-width: 0;
|
|
63
71
|
min-height: 0;
|
|
@@ -119,7 +127,7 @@
|
|
|
119
127
|
.ledger-header-cell {
|
|
120
128
|
position: relative;
|
|
121
129
|
vertical-align: middle;
|
|
122
|
-
background-color: var(--ledger-header-bg, var(--mantine-color-body));
|
|
130
|
+
background-color: var(--ledger-header-bg, var(--ledger-body-bg, var(--mantine-color-body)));
|
|
123
131
|
}
|
|
124
132
|
|
|
125
133
|
.ledger-header-cell[data-pinned] {
|
|
@@ -308,7 +316,7 @@
|
|
|
308
316
|
* their hover step < the cursor inside a selection < pinned < the editing row (below).
|
|
309
317
|
* ------------------------------------------------------------------------------------------ */
|
|
310
318
|
.ledger-row {
|
|
311
|
-
--ledger-pinned-bg: var(--ledger-row-bg, var(--mantine-color-body));
|
|
319
|
+
--ledger-pinned-bg: var(--ledger-row-bg, var(--ledger-body-bg, var(--mantine-color-body)));
|
|
312
320
|
}
|
|
313
321
|
|
|
314
322
|
.ledger-row > td {
|
|
@@ -344,6 +352,14 @@
|
|
|
344
352
|
--ledger-row-bg: var(--mantine-primary-color-light-hover);
|
|
345
353
|
}
|
|
346
354
|
|
|
355
|
+
/* A primary tint leaves no room for a second tier of text: on its deepest step in the dark
|
|
356
|
+
scheme even the text color reaches only 5.8:1, so any lighter tone falls under AA. On a
|
|
357
|
+
selected or active row, secondary text takes the text color itself. */
|
|
358
|
+
.ledger-row[data-selected],
|
|
359
|
+
.ledger-row[data-active] {
|
|
360
|
+
--ledger-color-dimmed: var(--mantine-color-text);
|
|
361
|
+
}
|
|
362
|
+
|
|
347
363
|
.ledger-row[data-clickable] {
|
|
348
364
|
cursor: pointer;
|
|
349
365
|
}
|
|
@@ -351,7 +367,7 @@
|
|
|
351
367
|
/* Sticky pinned rows sit at the body scroller's edges, above the flow (the header lives
|
|
352
368
|
outside the scroller, so top offsets start at 0). */
|
|
353
369
|
.ledger-row[data-pinned-row] {
|
|
354
|
-
--ledger-row-bg: var(--mantine-color-body);
|
|
370
|
+
--ledger-row-bg: var(--ledger-body-bg, var(--mantine-color-body));
|
|
355
371
|
position: sticky;
|
|
356
372
|
z-index: 2;
|
|
357
373
|
}
|
|
@@ -380,7 +396,7 @@
|
|
|
380
396
|
.ledger-footer-cell[data-pinned] {
|
|
381
397
|
position: sticky;
|
|
382
398
|
z-index: 2;
|
|
383
|
-
background-color: var(--ledger-pinned-bg, var(--mantine-color-body));
|
|
399
|
+
background-color: var(--ledger-pinned-bg, var(--ledger-body-bg, var(--mantine-color-body)));
|
|
384
400
|
}
|
|
385
401
|
|
|
386
402
|
/* Pinned-edge scroll shadows, visible only while content is actually scrolled past. */
|
|
@@ -546,7 +562,7 @@
|
|
|
546
562
|
z-index: var(--mantine-z-index-popover);
|
|
547
563
|
overflow: hidden;
|
|
548
564
|
pointer-events: none;
|
|
549
|
-
background-color: var(--mantine-color-body);
|
|
565
|
+
background-color: var(--ledger-body-bg, var(--mantine-color-body));
|
|
550
566
|
border: 1px solid var(--mantine-color-default-border);
|
|
551
567
|
border-radius: var(--mantine-radius-default);
|
|
552
568
|
box-shadow: var(--mantine-shadow-md);
|
|
@@ -561,7 +577,7 @@
|
|
|
561
577
|
|
|
562
578
|
.ledger-footer-cell {
|
|
563
579
|
font-weight: 600;
|
|
564
|
-
background-color: var(--mantine-color-body);
|
|
580
|
+
background-color: var(--ledger-body-bg, var(--mantine-color-body));
|
|
565
581
|
}
|
|
566
582
|
|
|
567
583
|
/* Overlaid on the whole body region (the scroller is its positioning context): centered in
|
|
@@ -591,7 +607,7 @@
|
|
|
591
607
|
rows survive as a ghost that says "still here, not current". */
|
|
592
608
|
.ledger-empty[data-over-rows] {
|
|
593
609
|
z-index: 2;
|
|
594
|
-
background-color: color-mix(in srgb, var(--mantine-color-body) 92%, transparent);
|
|
610
|
+
background-color: color-mix(in srgb, var(--ledger-body-bg, var(--mantine-color-body)) 92%, transparent);
|
|
595
611
|
}
|
|
596
612
|
|
|
597
613
|
.ledger-loader-row td {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coldsmirk/ledger-mantine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Mantine-native <DataTable> on TanStack Table and TanStack Virtual: sorting, filtering, pagination, selection, pinning, inline editing, and adaptive row virtualization.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-table",
|