@coldsmirk/ledger-mantine 0.2.0 → 0.3.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/dist/styles.css CHANGED
@@ -35,12 +35,11 @@
35
35
  }
36
36
 
37
37
  /* The frame around header + body — the elastic middle; carries the outer table border
38
- (painted in the Borders section: three real sides + an inset overlay bottom). It clips its
38
+ (painted in the Borders section: four real sides). It clips its
39
39
  own content so a `radius` rounds the header tint, the rows, and the frame together — every
40
40
  positioned thing inside it (header actions, the empty state, the seam overlays) lives within
41
41
  its box, and the row-drag ghost is portaled to the body. */
42
42
  .ledger-main {
43
- position: relative;
44
43
  display: flex;
45
44
  flex: 1 1 auto;
46
45
  flex-direction: column;
@@ -608,11 +607,10 @@
608
607
  border-block-start: 1px solid var(--mantine-color-default-border);
609
608
  }
610
609
 
611
- /* The seam above the bar is owned by the table's own bottom edge (frame overlay, footer
612
- trailing border, or scroller seam — Borders section); the bar draws its own line only in
613
- the fully borderless look, where no other edge exists. */
614
- .ledger-root[data-with-row-borders] > .ledger-pagination-bar,
615
- .ledger-root[data-with-table-border] > .ledger-pagination-bar {
610
+ /* The seam above the bar is owned by the table's own bottom edge (the frame, or the closing
611
+ line — Borders section); the bar draws its own line only when no such edge exists. */
612
+ .ledger-root[data-with-table-border] > .ledger-pagination-bar,
613
+ .ledger-root[data-with-bottom-border] > .ledger-pagination-bar {
616
614
  border-block-start: 0;
617
615
  }
618
616
 
@@ -813,9 +811,18 @@
813
811
  * border-collapse: collapse, and Chrome does not repaint collapsed borders at stuck sticky
814
812
  * positions; our tables are border-collapse: separate (inline), so every cell carries its
815
813
  * border wherever it sticks.
814
+ *
815
+ * Three edges, one line each (docs/styling.md#borders): row separators sit BETWEEN rows and
816
+ * never under the last one (Mantine's Table rule — a bordered host closes the table with its
817
+ * own edge); the closing line under the body is the opt-in `withBottomBorder` seam; the
818
+ * `withTableBorder` frame is four real borders and owns every edge, so under it the body's
819
+ * seam and the footer's trailing line stay off.
816
820
  * ------------------------------------------------------------------------------------------ */
817
- .ledger-root[data-with-row-borders] .ledger-thead th,
818
- .ledger-root[data-with-row-borders] .ledger-tbody .ledger-row > td {
821
+
822
+ /* Row separators, header half: the header's bottom edge. (The body half follows the column
823
+ rule — the two share `th`/`td` targets with crossing specificities, and each half must sit
824
+ on its ascending side.) */
825
+ .ledger-root[data-with-row-borders] .ledger-thead th {
819
826
  border-block-end: 1px solid var(--ledger-border-color, var(--mantine-color-default-border));
820
827
  }
821
828
 
@@ -828,15 +835,20 @@
828
835
  border-inline-start: 1px solid var(--ledger-border-color, var(--mantine-color-default-border));
829
836
  }
830
837
 
831
- /* Seam ownership below the body (EP's inner-wrapper overlay technique): at scroll end the
832
- last row's border occupies the viewport's LAST pixel, so any line stacked outside the
833
- scroller would read as one thick border. Seam lines therefore paint as inset overlays that
834
- COINCIDE with that pixel — never as leading borders on the next region. */
838
+ /* Row separators, body half: every body row but the last (`data-last`, a `spanRows` anchor
839
+ ending there included). */
840
+ .ledger-root[data-with-row-borders] .ledger-tbody .ledger-row:not([data-last]) > td:not([data-last]) {
841
+ border-block-end: 1px solid var(--ledger-border-color, var(--mantine-color-default-border));
842
+ }
835
843
 
836
- /* z-index 2 = the pinned-cell tier: the overlay is generated after every cell, so it paints
837
- over scrolling pinned cells (their opaque backgrounds would erase the line mid-scroll)
838
- while staying under the scrollbars (3). */
839
- .ledger-root[data-with-row-borders] .ledger-scroller::after {
844
+ /* The body's bottom seam: an inset overlay on the scroller's last pixel — it adds no height
845
+ and stays put under scroll. It paints as the closing line (`withBottomBorder`, unframed: the
846
+ frame's own bottom border would stack under it) and, with row borders, as the separator
847
+ above a footer. z-index 2 = the pinned-cell tier: generated after every cell, so it paints
848
+ over scrolling pinned cells (their opaque backgrounds would erase the line mid-scroll) while
849
+ staying under the scrollbars (3). */
850
+ .ledger-root[data-with-bottom-border]:not([data-with-table-border]) .ledger-scroller::after,
851
+ .ledger-root[data-with-row-borders][data-with-footer] .ledger-scroller::after {
840
852
  position: absolute;
841
853
  inset-block-end: 0;
842
854
  inset-inline: 0;
@@ -847,28 +859,16 @@
847
859
  background-color: var(--ledger-border-color, var(--mantine-color-default-border));
848
860
  }
849
861
 
850
- /* The footer separates with its TRAILING edge only (the top seam is the scroller overlay);
851
- under the frame this pixel coincides with the frame's bottom overlay. */
852
- .ledger-root[data-with-row-borders] .ledger-footer {
862
+ /* The footer separates from the body with the seam above it; its trailing edge is the closing
863
+ line, on the body's own terms. */
864
+ .ledger-root[data-with-bottom-border]:not([data-with-table-border]) .ledger-footer {
853
865
  border-block-end: 1px solid var(--ledger-border-color, var(--mantine-color-default-border));
854
866
  }
855
867
 
856
- /* The frame: three real sides; the bottom edge is an inset overlay for the same coincidence
857
- reason — it lands on the scroller's (or footer's) last pixel instead of adding one below. */
868
+ /* The frame: four real borders, so a `radius` draws continuous corners; nothing inside paints
869
+ on its bottom pixel (no last-row separator, no closing seam, no footer trailing line). */
858
870
  .ledger-root[data-with-table-border] .ledger-main {
859
871
  border: 1px solid var(--ledger-border-color, var(--mantine-color-default-border));
860
- border-block-end: 0;
861
- }
862
-
863
- .ledger-root[data-with-table-border] .ledger-main::after {
864
- position: absolute;
865
- inset-block-end: 0;
866
- inset-inline: 0;
867
- z-index: 2;
868
- height: 1px;
869
- pointer-events: none;
870
- content: "";
871
- background-color: var(--ledger-border-color, var(--mantine-color-default-border));
872
872
  }
873
873
  }
874
874
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coldsmirk/ledger-mantine",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
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",