@kanunilabs/pivotgrid-react 1.8.9 → 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. */
@@ -648,6 +664,23 @@
648
664
  background: var(--pivot-header-total-bg, var(--pivot-total-bg, color-mix(in srgb, var(--pivot-border) 40%, var(--pivot-surface)))) !important;
649
665
  }
650
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
+ }
683
+
651
684
  /* The column-header band reads --pivot-header-bg. Both renderers paint the
652
685
  header cells with an inline `var(--pivot-surface-header)`; redefining that
653
686
  variable ON the cell points it at the band colour without touching the
@@ -1365,7 +1398,8 @@
1365
1398
  flex-direction: column;
1366
1399
  /* B.90: `--pivot-area-bg`, the body of the filter, Values and Columns zones. */
1367
1400
  background-color: var(--pivot-area-bg, var(--pivot-bg));
1368
- border: 1px solid color-mix(in srgb, var(--pivot-border) 60%, transparent);
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));
1369
1403
  border-radius: var(--pivot-border-radius-sm);
1370
1404
  overflow: hidden;
1371
1405
  min-height: 42px;
@@ -1374,6 +1408,10 @@
1374
1408
  .kanuni-pivot-area-dropzone:hover {
1375
1409
  border-color: var(--pivot-border);
1376
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
+ }
1377
1415
 
1378
1416
  .kanuni-pivot-area-header {
1379
1417
  display: flex;
@@ -1592,6 +1630,23 @@
1592
1630
  font-size: var(--pivot-chip-font-size, 12px);
1593
1631
  font-weight: var(--pivot-font-weight-chip, 500);
1594
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);
1595
1650
  }
1596
1651
  .kanuni-pivot-field-chip:hover {
1597
1652
  border-color: color-mix(in srgb, var(--pivot-primary) 50%, transparent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanunilabs/pivotgrid-react",
3
- "version": "1.8.9",
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.9"
68
+ "@kanunilabs/pivotgrid-core": "1.11.10"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@tailwindcss/postcss": "^4.3.0",