@kanunilabs/pivotgrid-react 1.8.5 → 1.8.7

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,15 @@
534
534
  line-height: 19px;
535
535
  }
536
536
 
537
+ /* B.82: `layout.textOverflow: 'clip'` cuts text off at the edge instead of ending it in an ellipsis: the chips (every
538
+ strip, the field list, the drag ghost) and the row-header values. The class is on the root (and on the portal host).
539
+ Number cells are not listed. */
540
+ .kanuni-pivot-text-clip .pivot-truncate,
541
+ .kanuni-pivot-text-clip .truncate,
542
+ .kanuni-pivot-text-clip .kanuni-pivot-table .kanuni-pivot-row-header {
543
+ text-overflow: clip;
544
+ }
545
+
537
546
  /* Row header cells */
538
547
  .kanuni-pivot-table .kanuni-pivot-row-header {
539
548
  font-size: var(--pivot-text-sm);
@@ -590,7 +599,7 @@
590
599
  /* Total cells (subtotals & grand total) */
591
600
  .kanuni-pivot-table .kanuni-pivot-cell-total {
592
601
  background: var(--pivot-total-bg, color-mix(in srgb, var(--pivot-border) 40%, var(--pivot-surface))) !important;
593
- font-weight: 600;
602
+ font-weight: var(--pivot-font-weight-total, 600);
594
603
  }
595
604
 
596
605
  /* Subtotal row */
@@ -599,7 +608,7 @@
599
608
  }
600
609
 
601
610
  .kanuni-pivot-table .kanuni-pivot-subtotal-row .kanuni-pivot-cell {
602
- font-weight: 600;
611
+ font-weight: var(--pivot-font-weight-total, 600);
603
612
  background: var(--pivot-total-bg, color-mix(in srgb, var(--pivot-border) 30%, var(--pivot-surface)));
604
613
  }
605
614
 
@@ -609,7 +618,7 @@
609
618
  }
610
619
 
611
620
  .kanuni-pivot-table .kanuni-pivot-grand-total-row .kanuni-pivot-cell {
612
- font-weight: 700;
621
+ font-weight: var(--pivot-font-weight-grand-total, 700);
613
622
  background: var(--pivot-total-bg, color-mix(in srgb, var(--pivot-border) 50%, var(--pivot-surface)));
614
623
  /* Drawn as an inset shadow (not border-top) so the grand-total row stays
615
624
  exactly ROW_HEIGHT tall — a real border would add 2px and desync the
@@ -627,7 +636,7 @@
627
636
  /* Header total columns */
628
637
  .kanuni-pivot-table .kanuni-pivot-header-total {
629
638
  background: color-mix(in srgb, var(--pivot-border) 40%, var(--pivot-surface)) !important;
630
- font-weight: 600 !important;
639
+ font-weight: var(--pivot-font-weight-header-total, 600) !important;
631
640
  }
632
641
 
633
642
  /* The column-header band reads --pivot-header-bg. Both renderers paint the
@@ -1412,6 +1421,49 @@
1412
1421
  inset-inline-start: auto !important;
1413
1422
  }
1414
1423
 
1424
+ /* B.74: `layout.areaChipOverflow: 'scroll'` puts this class on the pivot's root. The Values and Columns zones above
1425
+ the table keep their chips on one line and scroll it sideways instead of starting a second one. */
1426
+ .kanuni-pivot-area-chips-scroll .kanuni-pivot-table thead .kanuni-pivot-area-content {
1427
+ flex-wrap: nowrap;
1428
+ overflow-x: auto;
1429
+ overflow-y: hidden;
1430
+ overscroll-behavior-x: contain;
1431
+ }
1432
+ .kanuni-pivot-area-chips-scroll .kanuni-pivot-table thead .kanuni-pivot-area-content > * {
1433
+ flex-shrink: 0;
1434
+ }
1435
+
1436
+ /* B.86: `layout.areaChipOverflow: 'shrink'` adds the class below to the one above (one line, scrolls only as a last
1437
+ resort). The chips shrink in proportion down to `--pivot-chip-shrink-min` (56px) instead of keeping their size; the
1438
+ caption is the part that gives (clipped, never an ellipsis, the full name is the chip's tooltip); the sort arrow,
1439
+ badge and buttons keep their size until the chip is at its floor. The ghost end zone gives up its 40px so it does not force the scroll. */
1440
+ .kanuni-pivot-area-chips-shrink .kanuni-pivot-table thead .kanuni-pivot-area-content > .kanuni-pivot-field-chip {
1441
+ flex: 0 1 auto;
1442
+ min-width: var(--pivot-chip-shrink-min, 56px);
1443
+ /* At the floor the badge and buttons are wider than the chip: they are cut off at its edge (and so add nothing to the
1444
+ line's scroll width), except for 8px, room for the drop mark that sits just outside the chip. */
1445
+ position: relative;
1446
+ overflow: clip;
1447
+ overflow-clip-margin: 8px;
1448
+ }
1449
+ .kanuni-pivot-area-chips-shrink .kanuni-pivot-table thead .kanuni-pivot-area-content > .kanuni-pivot-field-chip > .pivot-truncate {
1450
+ flex: 0 1 auto;
1451
+ min-width: 0;
1452
+ overflow: hidden;
1453
+ text-overflow: clip;
1454
+ }
1455
+ .kanuni-pivot-area-chips-shrink .kanuni-pivot-table thead .kanuni-pivot-area-content > :not(.kanuni-pivot-field-chip) {
1456
+ min-width: 12px !important;
1457
+ }
1458
+ .kanuni-pivot-area-chips-shrink .kanuni-pivot-table thead .kanuni-pivot-area-content > .kanuni-pivot-field-chip > :not(.pivot-truncate) {
1459
+ flex-shrink: 0;
1460
+ }
1461
+ @media (pointer: coarse) {
1462
+ .kanuni-pivot-area-chips-shrink .kanuni-pivot-table thead .kanuni-pivot-area-content > .kanuni-pivot-field-chip {
1463
+ min-width: max(var(--pivot-chip-shrink-min, 56px), 44px);
1464
+ }
1465
+ }
1466
+
1415
1467
  /* B.62: `layout.showSummaryBadge: false` puts this class on the pivot's root. */
1416
1468
  .kanuni-pivot-no-summary-badge .kanuni-pivot-chip-badge {
1417
1469
  display: none;
@@ -1483,6 +1535,27 @@
1483
1535
  overflow-y: auto;
1484
1536
  overscroll-behavior-y: contain;
1485
1537
  }
1538
+ /* B.61 (zoomed desktop): a short pivot (`data-pivot-short`, set below 480px by core watchShortPivot). A 1100x500
1539
+ window at 175% gives a ~240px pivot: the 30% strip and the 88px zones above left NO data row in view (strip 71,
1540
+ sticky header 145, measured in Chrome). Each part keeps one chip row and scrolls inside; the data keeps at least
1541
+ 40% of the pivot. Never on a wide pivot: this sits inside the narrow container query. */
1542
+ .kanuni-pivot-wrapper[data-pivot-short] .kanuni-pivot-filter-strip {
1543
+ max-height: 44px;
1544
+ }
1545
+ .kanuni-pivot-wrapper[data-pivot-short] .kanuni-pivot-table thead .kanuni-pivot-area-dropzone {
1546
+ max-height: 40px;
1547
+ }
1548
+ }
1549
+ @media (pointer: coarse) {
1550
+ /* Touch chips are 44px tall: one row of them. */
1551
+ @container kanuni-pivot (max-width: 768px) {
1552
+ .kanuni-pivot-wrapper[data-pivot-short] .kanuni-pivot-filter-strip {
1553
+ max-height: 60px;
1554
+ }
1555
+ .kanuni-pivot-wrapper[data-pivot-short] .kanuni-pivot-table thead .kanuni-pivot-area-dropzone {
1556
+ max-height: 56px;
1557
+ }
1558
+ }
1486
1559
  }
1487
1560
 
1488
1561
  .kanuni-pivot-field-chip {
@@ -1496,7 +1569,7 @@
1496
1569
  box-shadow: var(--pivot-shadow-sm);
1497
1570
  border-radius: var(--pivot-border-radius-sm);
1498
1571
  font-size: 12px;
1499
- font-weight: 500;
1572
+ font-weight: var(--pivot-font-weight-chip, 500);
1500
1573
  transition: all 0.2s;
1501
1574
  }
1502
1575
  .kanuni-pivot-field-chip:hover {
@@ -1996,6 +2069,9 @@ th > .kanuni-pivot-field-chip > .kanuni-pivot-field-chip-actions {
1996
2069
  }
1997
2070
  }
1998
2071
  @layer utilities {
2072
+ .kanuni-pivot-root .\@container {
2073
+ container-type: inline-size;
2074
+ }
1999
2075
  .kanuni-pivot-root .pointer-events-auto {
2000
2076
  pointer-events: auto;
2001
2077
  }
@@ -2225,6 +2301,9 @@ th > .kanuni-pivot-field-chip > .kanuni-pivot-field-chip-actions {
2225
2301
  .kanuni-pivot-root .flex-col {
2226
2302
  flex-direction: column;
2227
2303
  }
2304
+ .kanuni-pivot-root .flex-wrap {
2305
+ flex-wrap: wrap;
2306
+ }
2228
2307
  .kanuni-pivot-root .items-center {
2229
2308
  align-items: center;
2230
2309
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanunilabs/pivotgrid-react",
3
- "version": "1.8.5",
3
+ "version": "1.8.7",
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.5"
68
+ "@kanunilabs/pivotgrid-core": "1.11.7"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@tailwindcss/postcss": "^4.3.0",