@kanunilabs/pivotgrid-react 1.0.7 → 1.2.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 +2 -2
- package/dist/index.d.cts +49 -8
- package/dist/index.d.ts +49 -8
- package/dist/index.js +2 -2
- package/dist/styles.css +122 -12
- package/package.json +5 -4
package/dist/styles.css
CHANGED
|
@@ -76,6 +76,15 @@
|
|
|
76
76
|
--pivot-radius-xl: 12px;
|
|
77
77
|
--pivot-radius-full: 9999px;
|
|
78
78
|
|
|
79
|
+
/* Aliases for the OLD token names. ~27 rules below and 3 component inline
|
|
80
|
+
styles use --pivot-border-radius(-sm/-lg); they were never defined, so
|
|
81
|
+
every one of those corners rendered square. Defined here as aliases
|
|
82
|
+
rather than migrating the usages, so a consumer who themed the old names
|
|
83
|
+
keeps winning over these defaults. */
|
|
84
|
+
--pivot-border-radius-sm: var(--pivot-radius-sm);
|
|
85
|
+
--pivot-border-radius: var(--pivot-radius-md);
|
|
86
|
+
--pivot-border-radius-lg: var(--pivot-radius-lg);
|
|
87
|
+
|
|
79
88
|
/* Default text and background for the component */
|
|
80
89
|
color: var(--pivot-text);
|
|
81
90
|
background-color: var(--pivot-bg);
|
|
@@ -208,24 +217,24 @@
|
|
|
208
217
|
|
|
209
218
|
/* Custom Scrollbar for Pivot */
|
|
210
219
|
.pivot-custom-scrollbar,
|
|
211
|
-
.custom-scrollbar {
|
|
220
|
+
.kanuni-pivot-root .custom-scrollbar {
|
|
212
221
|
scrollbar-width: thin;
|
|
213
222
|
scrollbar-color: color-mix(in srgb, var(--pivot-border) 80%, transparent) transparent;
|
|
214
223
|
}
|
|
215
224
|
|
|
216
225
|
.pivot-custom-scrollbar::-webkit-scrollbar,
|
|
217
|
-
.custom-scrollbar::-webkit-scrollbar {
|
|
226
|
+
.kanuni-pivot-root .custom-scrollbar::-webkit-scrollbar {
|
|
218
227
|
width: 8px;
|
|
219
228
|
height: 8px;
|
|
220
229
|
}
|
|
221
230
|
|
|
222
231
|
.pivot-custom-scrollbar::-webkit-scrollbar-track,
|
|
223
|
-
.custom-scrollbar::-webkit-scrollbar-track {
|
|
232
|
+
.kanuni-pivot-root .custom-scrollbar::-webkit-scrollbar-track {
|
|
224
233
|
background: transparent;
|
|
225
234
|
}
|
|
226
235
|
|
|
227
236
|
.pivot-custom-scrollbar::-webkit-scrollbar-thumb,
|
|
228
|
-
.custom-scrollbar::-webkit-scrollbar-thumb {
|
|
237
|
+
.kanuni-pivot-root .custom-scrollbar::-webkit-scrollbar-thumb {
|
|
229
238
|
background-color: color-mix(in srgb, var(--pivot-border) 80%, transparent);
|
|
230
239
|
border-radius: var(--pivot-radius-full);
|
|
231
240
|
border: 2px solid transparent;
|
|
@@ -233,7 +242,7 @@
|
|
|
233
242
|
}
|
|
234
243
|
|
|
235
244
|
.pivot-custom-scrollbar::-webkit-scrollbar-thumb:hover,
|
|
236
|
-
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
245
|
+
.kanuni-pivot-root .custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
237
246
|
background-color: var(--pivot-text-muted);
|
|
238
247
|
}
|
|
239
248
|
|
|
@@ -492,25 +501,28 @@
|
|
|
492
501
|
}
|
|
493
502
|
|
|
494
503
|
/* Focused cell */
|
|
504
|
+
/* Focused/selected blends are mixed over the SURFACE, not over transparent.
|
|
505
|
+
In the React two-pane layout the transparent blend always landed on a
|
|
506
|
+
surface-colored pane, so the computed color is identical — but the vanilla
|
|
507
|
+
renderer's K1 single scroller slides data cells UNDER sticky row headers,
|
|
508
|
+
and a 92%-transparent focused header let them show through (#191/5). */
|
|
495
509
|
.kanuni-pivot-table .kanuni-pivot-cell-focused {
|
|
496
510
|
outline: 2px solid var(--pivot-primary);
|
|
497
511
|
outline-offset: -2px;
|
|
498
|
-
background: color-mix(in srgb, var(--pivot-primary) 8%,
|
|
512
|
+
background: color-mix(in srgb, var(--pivot-primary) 8%, var(--pivot-surface)) !important;
|
|
499
513
|
}
|
|
500
514
|
|
|
501
515
|
/* Selected cell */
|
|
502
516
|
.kanuni-pivot-table .kanuni-pivot-cell-selected {
|
|
503
|
-
background: color-mix(in srgb, var(--pivot-primary) 12%,
|
|
517
|
+
background: color-mix(in srgb, var(--pivot-primary) 12%, var(--pivot-surface)) !important;
|
|
504
518
|
color: var(--pivot-primary) !important;
|
|
505
519
|
font-weight: 500;
|
|
506
520
|
}
|
|
507
521
|
|
|
508
522
|
|
|
509
523
|
|
|
510
|
-
.kanuni-pivot-dropdown-divider
|
|
511
|
-
|
|
512
|
-
border-top: 1px solid var(--pivot-border);
|
|
513
|
-
}
|
|
524
|
+
/* (duplicate .kanuni-pivot-dropdown-divider removed — the later
|
|
525
|
+
height/background definition was already winning the cascade) */
|
|
514
526
|
|
|
515
527
|
/* Filter icon state */
|
|
516
528
|
.kanuni-pivot-filter-icon.kanuni-pivot-is-filtered {
|
|
@@ -845,6 +857,69 @@
|
|
|
845
857
|
color: var(--pivot-primary-foreground);
|
|
846
858
|
box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
|
|
847
859
|
}
|
|
860
|
+
|
|
861
|
+
/* ── Touch targets ────────────────────────────────────────────
|
|
862
|
+
Measured on the live playground at 375px (2026-08-27): every footer control
|
|
863
|
+
was 27px — 6px padding around a 15px icon — under any touch guideline.
|
|
864
|
+
|
|
865
|
+
Gated on the POINTER, not the viewport: a narrow desktop window keeps the
|
|
866
|
+
compact chrome, a tablet in landscape still gets targets a finger can hit.
|
|
867
|
+
The footer has no fixed height, so it simply grows. */
|
|
868
|
+
@media (pointer: coarse) {
|
|
869
|
+
.kanuni-pivot-footer-btn {
|
|
870
|
+
min-width: 40px;
|
|
871
|
+
min-height: 40px;
|
|
872
|
+
}
|
|
873
|
+
.kanuni-pivot-dropdown-item {
|
|
874
|
+
min-height: 40px;
|
|
875
|
+
}
|
|
876
|
+
/* The saved-views button sits beside the footer icons and stayed 21px tall
|
|
877
|
+
because its size comes from padding + font size, not from the icon rule. */
|
|
878
|
+
.kanuni-pivot-report-btn {
|
|
879
|
+
min-height: 40px;
|
|
880
|
+
}
|
|
881
|
+
/* The field chips' own controls were the worst of the lot: 12x12 (an 8px
|
|
882
|
+
icon in 2px padding), sixteen of them on the playground at 375px.
|
|
883
|
+
|
|
884
|
+
They are NOT blown up to 40x40 like the footer. The two controls sit side
|
|
885
|
+
by side inside one chip and one of them DELETES the field, so equal-sized
|
|
886
|
+
40px targets would overlap and a mis-tap would be destructive. Instead the
|
|
887
|
+
visual target reaches the WCAG 2.5.8 AA minimum (24x24) and the hit area
|
|
888
|
+
is extended VERTICALLY only — 24x40, no horizontal bleed into the
|
|
889
|
+
neighbour (same ::after technique as the DataGrid filter button). */
|
|
890
|
+
.kanuni-pivot-chip-btn {
|
|
891
|
+
min-width: 24px;
|
|
892
|
+
min-height: 24px;
|
|
893
|
+
padding: 6px;
|
|
894
|
+
display: inline-flex;
|
|
895
|
+
align-items: center;
|
|
896
|
+
justify-content: center;
|
|
897
|
+
position: relative;
|
|
898
|
+
}
|
|
899
|
+
.kanuni-pivot-chip-btn::after {
|
|
900
|
+
content: '';
|
|
901
|
+
position: absolute;
|
|
902
|
+
inset: -8px 0;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
/* Touch drag needs the gesture, and the browser claims it first.
|
|
906
|
+
Both renderers activate a touch drag after a 200ms hold (dnd-kit's
|
|
907
|
+
TouchSensor in React, the same constants in the vanilla pointer engine),
|
|
908
|
+
but without `touch-action: none` the browser has already started panning
|
|
909
|
+
by then and the drag never begins — the documented dnd-kit requirement,
|
|
910
|
+
never declared here (#195).
|
|
911
|
+
|
|
912
|
+
Scope matters: a strip chip drags from anywhere, so the whole chip claims
|
|
913
|
+
the gesture. A CHOOSER chip drags only from its grip and lives in a long
|
|
914
|
+
scrollable list, so claiming the whole chip would trap the finger — only
|
|
915
|
+
the grip does. */
|
|
916
|
+
.kanuni-pivot-field-chip:not([data-drag-scope='grip']) {
|
|
917
|
+
touch-action: none;
|
|
918
|
+
}
|
|
919
|
+
[data-drag-grip] {
|
|
920
|
+
touch-action: none;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
848
923
|
.kanuni-pivot-footer-divider {
|
|
849
924
|
height: 16px;
|
|
850
925
|
width: 1px;
|
|
@@ -926,9 +1001,15 @@
|
|
|
926
1001
|
opacity: 0;
|
|
927
1002
|
transition: opacity 0.2s;
|
|
928
1003
|
}
|
|
929
|
-
.kanuni-pivot-field-chip:hover .kanuni-pivot-field-chip-actions
|
|
1004
|
+
.kanuni-pivot-field-chip:hover .kanuni-pivot-field-chip-actions,
|
|
1005
|
+
.kanuni-pivot-field-chip:focus-within .kanuni-pivot-field-chip-actions {
|
|
930
1006
|
opacity: 1;
|
|
931
1007
|
}
|
|
1008
|
+
/* Chips are keyboard-operable (#207): the ring is the only sign of focus. */
|
|
1009
|
+
.kanuni-pivot-field-chip:focus-visible {
|
|
1010
|
+
outline: 2px solid var(--pivot-primary);
|
|
1011
|
+
outline-offset: 2px;
|
|
1012
|
+
}
|
|
932
1013
|
.kanuni-pivot-field-chip-actions.is-filtered {
|
|
933
1014
|
opacity: 1;
|
|
934
1015
|
}
|
|
@@ -1342,6 +1423,9 @@
|
|
|
1342
1423
|
.kanuni-pivot-root .collapse {
|
|
1343
1424
|
visibility: collapse;
|
|
1344
1425
|
}
|
|
1426
|
+
.kanuni-pivot-root .invisible {
|
|
1427
|
+
visibility: hidden;
|
|
1428
|
+
}
|
|
1345
1429
|
.kanuni-pivot-root .visible {
|
|
1346
1430
|
visibility: visible;
|
|
1347
1431
|
}
|
|
@@ -1390,6 +1474,15 @@
|
|
|
1390
1474
|
.kanuni-pivot-root .z-\[100\] {
|
|
1391
1475
|
z-index: 100;
|
|
1392
1476
|
}
|
|
1477
|
+
.kanuni-pivot-root .row-0 {
|
|
1478
|
+
grid-row: 0;
|
|
1479
|
+
}
|
|
1480
|
+
.kanuni-pivot-root .row-1 {
|
|
1481
|
+
grid-row: 1;
|
|
1482
|
+
}
|
|
1483
|
+
.kanuni-pivot-root .row-2 {
|
|
1484
|
+
grid-row: 2;
|
|
1485
|
+
}
|
|
1393
1486
|
.kanuni-pivot-root .container {
|
|
1394
1487
|
width: 100%;
|
|
1395
1488
|
@media (width >= 40rem) {
|
|
@@ -1480,6 +1573,12 @@
|
|
|
1480
1573
|
.kanuni-pivot-root .flex-1 {
|
|
1481
1574
|
flex: 1;
|
|
1482
1575
|
}
|
|
1576
|
+
.kanuni-pivot-root .shrink {
|
|
1577
|
+
flex-shrink: 1;
|
|
1578
|
+
}
|
|
1579
|
+
.kanuni-pivot-root .grow {
|
|
1580
|
+
flex-grow: 1;
|
|
1581
|
+
}
|
|
1483
1582
|
.kanuni-pivot-root .-translate-y-1\/2 {
|
|
1484
1583
|
--tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
|
|
1485
1584
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
@@ -1523,6 +1622,9 @@
|
|
|
1523
1622
|
.kanuni-pivot-root .resize {
|
|
1524
1623
|
resize: both;
|
|
1525
1624
|
}
|
|
1625
|
+
.kanuni-pivot-root .columns-3 {
|
|
1626
|
+
columns: 3;
|
|
1627
|
+
}
|
|
1526
1628
|
.kanuni-pivot-root .auto-rows-fr {
|
|
1527
1629
|
grid-auto-rows: minmax(0, 1fr);
|
|
1528
1630
|
}
|
|
@@ -1744,10 +1846,18 @@
|
|
|
1744
1846
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
1745
1847
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1746
1848
|
}
|
|
1849
|
+
.kanuni-pivot-root .ring {
|
|
1850
|
+
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
1851
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1852
|
+
}
|
|
1747
1853
|
.kanuni-pivot-root .outline {
|
|
1748
1854
|
outline-style: var(--tw-outline-style);
|
|
1749
1855
|
outline-width: 1px;
|
|
1750
1856
|
}
|
|
1857
|
+
.kanuni-pivot-root .blur {
|
|
1858
|
+
--tw-blur: blur(8px);
|
|
1859
|
+
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
1860
|
+
}
|
|
1751
1861
|
.kanuni-pivot-root .filter {
|
|
1752
1862
|
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
1753
1863
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanunilabs/pivotgrid-react",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
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",
|
|
@@ -64,13 +64,14 @@
|
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@kanunilabs/pivotgrid-core": "1.
|
|
67
|
+
"@kanunilabs/pivotgrid-core": "1.3.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@tailwindcss/postcss": "^4.3.0",
|
|
71
71
|
"postcss": "^8.5.15",
|
|
72
72
|
"postcss-prefixwrap": "^1.51.0",
|
|
73
|
-
"tailwindcss": "^4.3.0"
|
|
73
|
+
"tailwindcss": "^4.3.0",
|
|
74
|
+
"jsdom": "^30.0.1"
|
|
74
75
|
},
|
|
75
76
|
"peerDependencies": {
|
|
76
77
|
"@dnd-kit/core": ">=6.0.0",
|
|
@@ -84,6 +85,6 @@
|
|
|
84
85
|
"build": "tsup && node scripts/build-css.mjs",
|
|
85
86
|
"build:css": "node scripts/build-css.mjs",
|
|
86
87
|
"build:check": "tsc --noEmit",
|
|
87
|
-
"test": "vitest run
|
|
88
|
+
"test": "vitest run"
|
|
88
89
|
}
|
|
89
90
|
}
|