@kanunilabs/pivotgrid-react 1.8.8 → 1.8.10

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
@@ -534,6 +534,22 @@
534
534
  line-height: 19px;
535
535
  }
536
536
 
537
+ /* B.100: `--pivot-row-height` (Tekax: Delphi's 21px rows). The renderers read the variable, round it to whole px and
538
+ put kanuni-pivot-custom-row-height and that number (--pivot-row-h) on their element (the root in plain JS, the body
539
+ in React); the virtualizer runs on the same number, so the line heights below are the row height minus the body
540
+ cell's 1px border / the header cell's 8px padding + 1px border, as in the density rules above, which these
541
+ outrank. Unset, the class is never added: every density paints as before. Chips in the header corner keep their
542
+ normal metrics, as in every density. */
543
+ :is(.kanuni-pivot-root.kanuni-pivot-custom-row-height, .kanuni-pivot-root .kanuni-pivot-custom-row-height) .kanuni-pivot-table .kanuni-pivot-cell {
544
+ line-height: calc(var(--pivot-row-h) - 1px);
545
+ }
546
+ :is(.kanuni-pivot-root.kanuni-pivot-custom-row-height, .kanuni-pivot-root .kanuni-pivot-custom-row-height) .kanuni-pivot-table .kanuni-pivot-header-cell {
547
+ line-height: calc(var(--pivot-row-h) - 9px);
548
+ }
549
+ :is(.kanuni-pivot-root.kanuni-pivot-custom-row-height, .kanuni-pivot-root .kanuni-pivot-custom-row-height) .kanuni-pivot-table .kanuni-pivot-header-cell .kanuni-pivot-field-chip {
550
+ line-height: 19px;
551
+ }
552
+
537
553
  /* B.82: `layout.textOverflow: 'clip'` cuts text off at the edge instead of ending it in an ellipsis: the chips (every
538
554
  strip, the field list, the drag ghost) and the row-header values. The class is on the root (and on the portal host).
539
555
  Number cells are not listed. */
@@ -628,16 +644,42 @@
628
644
 
629
645
  /* Corner cell (row field headers in corner) */
630
646
  .kanuni-pivot-table .kanuni-pivot-header-corner {
631
- background: color-mix(in srgb, var(--pivot-border) 20%, var(--pivot-surface)) !important;
647
+ /* B.90: `--pivot-corner-bg`. */
648
+ background: var(--pivot-corner-bg, color-mix(in srgb, var(--pivot-border) 20%, var(--pivot-surface))) !important;
632
649
  border-right: 1px solid var(--pivot-border);
633
650
  border-bottom: 1px solid var(--pivot-border);
634
651
  }
635
652
 
636
653
  /* Header total columns */
637
654
  .kanuni-pivot-table .kanuni-pivot-header-total {
638
- background: color-mix(in srgb, var(--pivot-border) 40%, var(--pivot-surface)) !important;
655
+ /* B.90: `--pivot-header-total-bg`. */
656
+ background: var(--pivot-header-total-bg, color-mix(in srgb, var(--pivot-border) 40%, var(--pivot-surface))) !important;
639
657
  font-weight: var(--pivot-font-weight-header-total, 600) !important;
640
658
  }
659
+ /* B.90: the "Grand Total" label cell of the grand-total row (row headers) is a header too. Unset it keeps the look of a
660
+ total cell (`--pivot-total-bg`, else the same 40% mix). The row part is in :where() so the rule weighs (0,2,0), the same as
661
+ `.kanuni-pivot-table .kanuni-pivot-cell-total` above and the focus tint below (which comes later and wins): an app's own
662
+ total-cell rule and the focused label cell behave as in 1.11.8. */
663
+ :where(.kanuni-pivot-table .kanuni-pivot-grand-total-row) .kanuni-pivot-row-header.kanuni-pivot-cell-total {
664
+ background: var(--pivot-header-total-bg, var(--pivot-total-bg, color-mix(in srgb, var(--pivot-border) 40%, var(--pivot-surface)))) !important;
665
+ }
666
+
667
+ /* B.96: `layout.virtualization.placeholderRows`. The spacer cell that stands for rows not drawn yet (above the drawn
668
+ window, and below it) paints a line at the bottom of every row height, so a jump to the end or a fast fling shows empty
669
+ rows instead of a blank pane until the real rows are drawn. A background, no extra nodes: the left (row headers) and
670
+ right (data) spacers start at the same row boundary, so the lines meet. The renderer sets `--pivot-placeholder-row-h`
671
+ to its row height on the cell. Colours: `--pivot-placeholder-row-line` (default --pivot-border) and
672
+ `--pivot-placeholder-row-bg` (default transparent). */
673
+ .kanuni-pivot-table .kanuni-pivot-placeholder-rows {
674
+ background-color: var(--pivot-placeholder-row-bg, transparent);
675
+ background-image: repeating-linear-gradient(
676
+ to bottom,
677
+ transparent 0,
678
+ transparent calc(var(--pivot-placeholder-row-h, 28px) - 1px),
679
+ var(--pivot-placeholder-row-line, var(--pivot-border)) calc(var(--pivot-placeholder-row-h, 28px) - 1px),
680
+ var(--pivot-placeholder-row-line, var(--pivot-border)) var(--pivot-placeholder-row-h, 28px)
681
+ );
682
+ }
641
683
 
642
684
  /* The column-header band reads --pivot-header-bg. Both renderers paint the
643
685
  header cells with an inline `var(--pivot-surface-header)`; redefining that
@@ -676,8 +718,11 @@
676
718
 
677
719
  /* Selected cell */
678
720
  .kanuni-pivot-table .kanuni-pivot-cell-selected {
679
- background: color-mix(in srgb, var(--pivot-primary) 12%, var(--pivot-surface)) !important;
680
- color: var(--pivot-primary) !important;
721
+ /* B.90: `--pivot-cell-selected-bg` / `--pivot-cell-selected-text`. Unset, the look this rule always had. They paint
722
+ every selected cell: data cells, a selected total, a row header in a row-mode selection. The focused cell that is
723
+ NOT selected keeps its own tint above (and the ring is separate). */
724
+ background: var(--pivot-cell-selected-bg, color-mix(in srgb, var(--pivot-primary) 12%, var(--pivot-surface))) !important;
725
+ color: var(--pivot-cell-selected-text, var(--pivot-primary)) !important;
681
726
  font-weight: 500;
682
727
  }
683
728
 
@@ -1351,8 +1396,10 @@
1351
1396
  flex: 1;
1352
1397
  display: flex;
1353
1398
  flex-direction: column;
1354
- background-color: var(--pivot-bg);
1355
- border: 1px solid color-mix(in srgb, var(--pivot-border) 60%, transparent);
1399
+ /* B.90: `--pivot-area-bg`, the body of the filter, Values and Columns zones. */
1400
+ background-color: var(--pivot-area-bg, var(--pivot-bg));
1401
+ /* B.102: `--pivot-area-border`, the zones' own edge, apart from the grid lines `--pivot-border` paints. */
1402
+ border: 1px solid var(--pivot-area-border, color-mix(in srgb, var(--pivot-border) 60%, transparent));
1356
1403
  border-radius: var(--pivot-border-radius-sm);
1357
1404
  overflow: hidden;
1358
1405
  min-height: 42px;
@@ -1361,13 +1408,18 @@
1361
1408
  .kanuni-pivot-area-dropzone:hover {
1362
1409
  border-color: var(--pivot-border);
1363
1410
  }
1411
+ /* B.104: `layout.areaHeaders` without the title row: the zone is as tall as its chips (the 42px held the title too). */
1412
+ .kanuni-pivot-area-dropzone.kanuni-pivot-area-headerless {
1413
+ min-height: 0;
1414
+ }
1364
1415
 
1365
1416
  .kanuni-pivot-area-header {
1366
1417
  display: flex;
1367
1418
  align-items: center;
1368
1419
  gap: 6px;
1369
1420
  padding: 4px 8px;
1370
- background-color: color-mix(in srgb, var(--pivot-surface-header) 50%, var(--pivot-bg));
1421
+ /* B.90: `--pivot-area-header-bg`, the title row of those zones. */
1422
+ background-color: var(--pivot-area-header-bg, color-mix(in srgb, var(--pivot-surface-header) 50%, var(--pivot-bg)));
1371
1423
  border-bottom: 1px solid color-mix(in srgb, var(--pivot-border) 40%, transparent);
1372
1424
  font-size: 10px;
1373
1425
  font-weight: 700;
@@ -1566,11 +1618,35 @@
1566
1618
  background-color: var(--pivot-surface);
1567
1619
  color: var(--pivot-text);
1568
1620
  border: 1px solid color-mix(in srgb, var(--pivot-border) 80%, transparent);
1621
+ /* B.90: a raised edge. `--pivot-chip-border-light` is the top and start (left) edges, `--pivot-chip-border-dark` the
1622
+ bottom and end ones; each falls back to the single colour above, so with neither set the chip is as it was. */
1623
+ border-top-color: var(--pivot-chip-border-light, color-mix(in srgb, var(--pivot-border) 80%, transparent));
1624
+ border-left-color: var(--pivot-chip-border-light, color-mix(in srgb, var(--pivot-border) 80%, transparent));
1625
+ border-bottom-color: var(--pivot-chip-border-dark, color-mix(in srgb, var(--pivot-border) 80%, transparent));
1626
+ border-right-color: var(--pivot-chip-border-dark, color-mix(in srgb, var(--pivot-border) 80%, transparent));
1569
1627
  box-shadow: var(--pivot-shadow-sm);
1570
1628
  border-radius: var(--pivot-border-radius-sm);
1571
- font-size: 12px;
1629
+ /* B.90: `--pivot-chip-font-size`. */
1630
+ font-size: var(--pivot-chip-font-size, 12px);
1572
1631
  font-weight: var(--pivot-font-weight-chip, 500);
1573
1632
  transition: all 0.2s;
1633
+ /* B.101: `--pivot-chip-height` (Tekax: Delphi's ~22px chips). Unset, the height is the content's (auto) and the
1634
+ vertical padding is (28px - 20px) / 2 = 4px, exactly the padding above; set, the chip is that tall and the padding
1635
+ shrinks around its 18px line + 2px border. A touch chip's 44px min-height (B.48) still wins when larger. */
1636
+ height: var(--pivot-chip-height, auto);
1637
+ padding-block: max(0px, calc((var(--pivot-chip-height, 28px) - 20px) / 2));
1638
+ }
1639
+ /* B.101 review: on a touch screen the chip's own controls (the grip, the filter / sort / remove buttons) are 44px
1640
+ boxes (B.22, B.48). A chip without the menu (no `data-chip-menu`) had no 44px floor of its own, so a smaller
1641
+ `--pivot-chip-height` drew a 22px chip with its controls sticking out. Touch: never under 44px. Unset, the
1642
+ declaration is invalid and the height stays the content's (auto), as before. */
1643
+ @media (pointer: coarse) {
1644
+ .kanuni-pivot-field-chip {
1645
+ height: max(var(--pivot-chip-height), 44px);
1646
+ }
1647
+ }
1648
+ .kanuni-pivot-density-touch .kanuni-pivot-field-chip {
1649
+ height: max(var(--pivot-chip-height), 44px);
1574
1650
  }
1575
1651
  .kanuni-pivot-field-chip:hover {
1576
1652
  border-color: color-mix(in srgb, var(--pivot-primary) 50%, transparent);
@@ -1587,6 +1663,15 @@
1587
1663
  box-shadow: inset 0 0 0 1px var(--pivot-danger);
1588
1664
  background-color: color-mix(in srgb, var(--pivot-danger) 6%, transparent);
1589
1665
  }
1666
+ /* B.92: the whole Columns strip takes a drop; while a field is dragged into the
1667
+ column area the strip is tinted so the target reads as the whole strip. A
1668
+ background IMAGE, so the cell's inline background colour stays underneath. */
1669
+ .kanuni-pivot-column-strip[data-drop-over] {
1670
+ background-image: linear-gradient(
1671
+ color-mix(in srgb, var(--pivot-primary) 7%, transparent),
1672
+ color-mix(in srgb, var(--pivot-primary) 7%, transparent)
1673
+ );
1674
+ }
1590
1675
  .is-drop-denied[data-chooser-area] {
1591
1676
  box-shadow: inset 0 0 0 1px var(--pivot-danger) !important;
1592
1677
  background-color: color-mix(in srgb, var(--pivot-danger) 6%, transparent) !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanunilabs/pivotgrid-react",
3
- "version": "1.8.8",
3
+ "version": "1.8.10",
4
4
  "description": "High-performance React pivot table with a Web Worker engine — drag-and-drop pivoting, filtering, sorting, theming and export",
5
5
  "keywords": [
6
6
  "react",
@@ -65,7 +65,7 @@
65
65
  "access": "public"
66
66
  },
67
67
  "dependencies": {
68
- "@kanunilabs/pivotgrid-core": "1.11.8"
68
+ "@kanunilabs/pivotgrid-core": "1.11.10"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@tailwindcss/postcss": "^4.3.0",