@coldsmirk/ledger-mantine 0.1.1 → 0.3.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 +30 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +31 -7
- package/dist/index.js.map +1 -1
- package/dist/styles.css +43 -33
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -28,10 +28,17 @@
|
|
|
28
28
|
height: 100%;
|
|
29
29
|
min-height: 0;
|
|
30
30
|
overflow: hidden;
|
|
31
|
+
|
|
32
|
+
/* `radius` (the --ledger-radius variable): the root rounds with the frame so a `bg` or the
|
|
33
|
+
pagination bar follows the same corners. */
|
|
34
|
+
border-radius: var(--ledger-radius, 0);
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
/* The frame around header + body — the elastic middle; carries the outer table border
|
|
34
|
-
(painted in the Borders section:
|
|
38
|
+
(painted in the Borders section: four real sides). It clips its
|
|
39
|
+
own content so a `radius` rounds the header tint, the rows, and the frame together — every
|
|
40
|
+
positioned thing inside it (header actions, the empty state, the seam overlays) lives within
|
|
41
|
+
its box, and the row-drag ghost is portaled to the body. */
|
|
35
42
|
.ledger-main {
|
|
36
43
|
position: relative;
|
|
37
44
|
display: flex;
|
|
@@ -39,6 +46,8 @@
|
|
|
39
46
|
flex-direction: column;
|
|
40
47
|
min-width: 0;
|
|
41
48
|
min-height: 0;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
border-radius: var(--ledger-radius, 0);
|
|
42
51
|
}
|
|
43
52
|
|
|
44
53
|
/* The header viewport never scrolls by itself; its scrollLeft mirrors the body scroller. */
|
|
@@ -599,11 +608,10 @@
|
|
|
599
608
|
border-block-start: 1px solid var(--mantine-color-default-border);
|
|
600
609
|
}
|
|
601
610
|
|
|
602
|
-
/* The seam above the bar is owned by the table's own bottom edge (frame
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
.ledger-root[data-with-
|
|
606
|
-
.ledger-root[data-with-table-border] > .ledger-pagination-bar {
|
|
611
|
+
/* The seam above the bar is owned by the table's own bottom edge (the frame, or the closing
|
|
612
|
+
line — Borders section); the bar draws its own line only when no such edge exists. */
|
|
613
|
+
.ledger-root[data-with-table-border] > .ledger-pagination-bar,
|
|
614
|
+
.ledger-root[data-with-bottom-border] > .ledger-pagination-bar {
|
|
607
615
|
border-block-start: 0;
|
|
608
616
|
}
|
|
609
617
|
|
|
@@ -804,9 +812,18 @@
|
|
|
804
812
|
* border-collapse: collapse, and Chrome does not repaint collapsed borders at stuck sticky
|
|
805
813
|
* positions; our tables are border-collapse: separate (inline), so every cell carries its
|
|
806
814
|
* border wherever it sticks.
|
|
815
|
+
*
|
|
816
|
+
* Three edges, one line each (docs/styling.md#borders): row separators sit BETWEEN rows and
|
|
817
|
+
* never under the last one (Mantine's Table rule — a bordered host closes the table with its
|
|
818
|
+
* own edge); the closing line under the body is the opt-in `withBottomBorder` seam; the
|
|
819
|
+
* `withTableBorder` frame is four real borders and owns every edge, so under it the body's
|
|
820
|
+
* seam and the footer's trailing line stay off.
|
|
807
821
|
* ------------------------------------------------------------------------------------------ */
|
|
808
|
-
|
|
809
|
-
|
|
822
|
+
|
|
823
|
+
/* Row separators, header half: the header's bottom edge. (The body half follows the column
|
|
824
|
+
rule — the two share `th`/`td` targets with crossing specificities, and each half must sit
|
|
825
|
+
on its ascending side.) */
|
|
826
|
+
.ledger-root[data-with-row-borders] .ledger-thead th {
|
|
810
827
|
border-block-end: 1px solid var(--ledger-border-color, var(--mantine-color-default-border));
|
|
811
828
|
}
|
|
812
829
|
|
|
@@ -819,15 +836,20 @@
|
|
|
819
836
|
border-inline-start: 1px solid var(--ledger-border-color, var(--mantine-color-default-border));
|
|
820
837
|
}
|
|
821
838
|
|
|
822
|
-
/*
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
839
|
+
/* Row separators, body half: every body row but the last (`data-last`, a `spanRows` anchor
|
|
840
|
+
ending there included). */
|
|
841
|
+
.ledger-root[data-with-row-borders] .ledger-tbody .ledger-row:not([data-last]) > td:not([data-last]) {
|
|
842
|
+
border-block-end: 1px solid var(--ledger-border-color, var(--mantine-color-default-border));
|
|
843
|
+
}
|
|
826
844
|
|
|
827
|
-
/*
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
845
|
+
/* The body's bottom seam: an inset overlay on the scroller's last pixel — it adds no height
|
|
846
|
+
and stays put under scroll. It paints as the closing line (`withBottomBorder`, unframed: the
|
|
847
|
+
frame's own bottom border would stack under it) and, with row borders, as the separator
|
|
848
|
+
above a footer. z-index 2 = the pinned-cell tier: generated after every cell, so it paints
|
|
849
|
+
over scrolling pinned cells (their opaque backgrounds would erase the line mid-scroll) while
|
|
850
|
+
staying under the scrollbars (3). */
|
|
851
|
+
.ledger-root[data-with-bottom-border]:not([data-with-table-border]) .ledger-scroller::after,
|
|
852
|
+
.ledger-root[data-with-row-borders][data-with-footer] .ledger-scroller::after {
|
|
831
853
|
position: absolute;
|
|
832
854
|
inset-block-end: 0;
|
|
833
855
|
inset-inline: 0;
|
|
@@ -838,28 +860,16 @@
|
|
|
838
860
|
background-color: var(--ledger-border-color, var(--mantine-color-default-border));
|
|
839
861
|
}
|
|
840
862
|
|
|
841
|
-
/* The footer separates with
|
|
842
|
-
|
|
843
|
-
.ledger-root[data-with-
|
|
863
|
+
/* The footer separates from the body with the seam above it; its trailing edge is the closing
|
|
864
|
+
line, on the body's own terms. */
|
|
865
|
+
.ledger-root[data-with-bottom-border]:not([data-with-table-border]) .ledger-footer {
|
|
844
866
|
border-block-end: 1px solid var(--ledger-border-color, var(--mantine-color-default-border));
|
|
845
867
|
}
|
|
846
868
|
|
|
847
|
-
/* The frame:
|
|
848
|
-
|
|
869
|
+
/* The frame: four real borders, so a `radius` draws continuous corners; nothing inside paints
|
|
870
|
+
on its bottom pixel (no last-row separator, no closing seam, no footer trailing line). */
|
|
849
871
|
.ledger-root[data-with-table-border] .ledger-main {
|
|
850
872
|
border: 1px solid var(--ledger-border-color, var(--mantine-color-default-border));
|
|
851
|
-
border-block-end: 0;
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
.ledger-root[data-with-table-border] .ledger-main::after {
|
|
855
|
-
position: absolute;
|
|
856
|
-
inset-block-end: 0;
|
|
857
|
-
inset-inline: 0;
|
|
858
|
-
z-index: 2;
|
|
859
|
-
height: 1px;
|
|
860
|
-
pointer-events: none;
|
|
861
|
-
content: "";
|
|
862
|
-
background-color: var(--ledger-border-color, var(--mantine-color-default-border));
|
|
863
873
|
}
|
|
864
874
|
}
|
|
865
875
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coldsmirk/ledger-mantine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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",
|