@kanunilabs/pivotgrid-react 1.8.2 → 1.8.3
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 +172 -34
- package/dist/index.d.ts +172 -34
- package/dist/index.js +2 -2
- package/dist/styles.css +197 -41
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -844,9 +844,15 @@
|
|
|
844
844
|
position: fixed;
|
|
845
845
|
left: 50%;
|
|
846
846
|
top: 50%;
|
|
847
|
-
transform
|
|
847
|
+
/* `translate`, not `transform`: the zoom-in animation animates `transform`,
|
|
848
|
+
and while it ran (0.2s) the centring was lost and the dialog flew in from
|
|
849
|
+
the lower right — on a phone, half off the screen. */
|
|
850
|
+
translate: -50% -50%;
|
|
848
851
|
width: 100%;
|
|
849
|
-
|
|
852
|
+
/* Never wider than the window (Tekax B.42): the settings dialog's 400px
|
|
853
|
+
ran off a 360-390px phone. An inline width still asks for its own size,
|
|
854
|
+
this caps it; both renderers share the rule. */
|
|
855
|
+
max-width: min(450px, calc(100vw - 16px));
|
|
850
856
|
background-color: var(--pivot-modal-bg);
|
|
851
857
|
border: 1px solid var(--pivot-border);
|
|
852
858
|
border-radius: var(--pivot-border-radius-lg);
|
|
@@ -1180,22 +1186,109 @@
|
|
|
1180
1186
|
}
|
|
1181
1187
|
|
|
1182
1188
|
/* Touch drag needs the gesture, and the browser claims it first.
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
the
|
|
1189
|
+
|
|
1190
|
+
The plain JS renderer drags on POINTER events and starts after a hold
|
|
1191
|
+
(touchDragDelay, 200 ms by default). Once the browser starts panning it
|
|
1192
|
+
sends pointercancel, so its chips must claim the gesture outright with
|
|
1193
|
+
`touch-action: none` (#195). Scope matters: a strip chip drags from
|
|
1194
|
+
anywhere, so the whole chip claims it; a CHOOSER chip drags only from its
|
|
1195
|
+
grip and lives in a long scrollable list, so only the grip does.
|
|
1196
|
+
|
|
1197
|
+
The React renderer drags on TOUCH events after the same hold (Tekax
|
|
1198
|
+
B.35). Its sensor cancels the hold when the finger moves first and
|
|
1199
|
+
prevents the default of every touchmove after it, so a chip can let the
|
|
1200
|
+
page pan: a quick swipe over a chip scrolls, a hold then a move drags.
|
|
1201
|
+
Its chips carry data-touch-hold. */
|
|
1193
1202
|
.kanuni-pivot-field-chip:not([data-drag-scope='grip']) {
|
|
1194
1203
|
touch-action: none;
|
|
1195
1204
|
}
|
|
1196
1205
|
[data-drag-grip] {
|
|
1197
1206
|
touch-action: none;
|
|
1198
1207
|
}
|
|
1208
|
+
.kanuni-pivot-field-chip[data-touch-hold],
|
|
1209
|
+
[data-drag-grip][data-touch-hold] {
|
|
1210
|
+
touch-action: manipulation;
|
|
1211
|
+
-webkit-touch-callout: none;
|
|
1212
|
+
-webkit-user-select: none;
|
|
1213
|
+
user-select: none;
|
|
1214
|
+
}
|
|
1215
|
+
/* The chooser's drag handle is a 44x44 target on touch (B.41, the B.22
|
|
1216
|
+
standard), the same size as the chip's own buttons. */
|
|
1217
|
+
.kanuni-pivot-field-chip [data-drag-grip] {
|
|
1218
|
+
min-width: 44px;
|
|
1219
|
+
min-height: 44px;
|
|
1220
|
+
display: inline-flex;
|
|
1221
|
+
align-items: center;
|
|
1222
|
+
justify-content: center;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
/* Tekax B.48 / B.49: the pivot's chips on touch. The filter and remove
|
|
1226
|
+
buttons were 2 x 44px that never shrank: in a 109px (iPad) or 56px
|
|
1227
|
+
(phone) row header the caption went to 0, and the buttons — at opacity
|
|
1228
|
+
0, with no hover to raise them — still took the taps (a tap filtered,
|
|
1229
|
+
the right edge removed the field). Now they are gone, not hidden: one
|
|
1230
|
+
"…" opens the chip menu, which filters, removes and moves. In a row
|
|
1231
|
+
header cell even that gives way to the caption; a hold opens the menu.
|
|
1232
|
+
Every chip stays a 44x44 target. */
|
|
1233
|
+
.kanuni-pivot-field-chip[data-chip-menu] > .kanuni-pivot-field-chip-actions {
|
|
1234
|
+
display: none;
|
|
1235
|
+
}
|
|
1236
|
+
.kanuni-pivot-field-chip[data-chip-menu] {
|
|
1237
|
+
min-width: 44px;
|
|
1238
|
+
min-height: 44px;
|
|
1239
|
+
}
|
|
1240
|
+
.kanuni-pivot-field-chip[data-chip-menu] > .pivot-truncate {
|
|
1241
|
+
flex: 0 1 auto;
|
|
1242
|
+
min-width: 0;
|
|
1243
|
+
}
|
|
1244
|
+
.kanuni-pivot-field-chip[data-chip-menu] > .kanuni-pivot-chip-more {
|
|
1245
|
+
display: inline-flex;
|
|
1246
|
+
align-items: center;
|
|
1247
|
+
justify-content: center;
|
|
1248
|
+
flex: 0 0 auto;
|
|
1249
|
+
min-width: 44px;
|
|
1250
|
+
min-height: 44px;
|
|
1251
|
+
margin-inline: auto -6px;
|
|
1252
|
+
font-size: 16px;
|
|
1253
|
+
font-weight: 700;
|
|
1254
|
+
line-height: 1;
|
|
1255
|
+
color: var(--pivot-text-muted);
|
|
1256
|
+
cursor: pointer;
|
|
1257
|
+
}
|
|
1258
|
+
.kanuni-pivot-chip-more.is-filtered {
|
|
1259
|
+
color: var(--pivot-danger);
|
|
1260
|
+
}
|
|
1261
|
+
.kanuni-pivot-header-corner .kanuni-pivot-field-chip[data-chip-menu] > .kanuni-pivot-chip-more {
|
|
1262
|
+
display: none;
|
|
1263
|
+
}
|
|
1264
|
+
.kanuni-pivot-header-corner .kanuni-pivot-field-chip[data-chip-menu] > .kanuni-pivot-chip-filtered-mark {
|
|
1265
|
+
display: inline-block;
|
|
1266
|
+
flex: 0 0 auto;
|
|
1267
|
+
color: var(--pivot-danger);
|
|
1268
|
+
}
|
|
1269
|
+
/* The cell's 8px sides left a 56px column (the narrowest the budget
|
|
1270
|
+
paints) a 40px chip; 4px leaves it 48. */
|
|
1271
|
+
.kanuni-pivot-table .kanuni-pivot-header-corner {
|
|
1272
|
+
padding-inline: 4px !important;
|
|
1273
|
+
}
|
|
1274
|
+
.kanuni-pivot-header-corner .kanuni-pivot-field-chip[data-chip-menu] {
|
|
1275
|
+
padding-inline: 4px;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
.kanuni-pivot-chip-more,
|
|
1279
|
+
.kanuni-pivot-chip-filtered-mark {
|
|
1280
|
+
display: none;
|
|
1281
|
+
}
|
|
1282
|
+
/* Drawn, not text: a chip's textContent stays its caption (tests and apps read it). */
|
|
1283
|
+
.kanuni-pivot-chip-more::before {
|
|
1284
|
+
content: '\2026';
|
|
1285
|
+
}
|
|
1286
|
+
.kanuni-pivot-density-touch .kanuni-pivot-field-chip [data-drag-grip] {
|
|
1287
|
+
min-width: 44px;
|
|
1288
|
+
min-height: 44px;
|
|
1289
|
+
display: inline-flex;
|
|
1290
|
+
align-items: center;
|
|
1291
|
+
justify-content: center;
|
|
1199
1292
|
}
|
|
1200
1293
|
.kanuni-pivot-footer-divider {
|
|
1201
1294
|
height: 16px;
|
|
@@ -1264,6 +1357,49 @@
|
|
|
1264
1357
|
letter-spacing: 0.05em;
|
|
1265
1358
|
}
|
|
1266
1359
|
|
|
1360
|
+
/* The filter strip's collapse button and, collapsed, its count of filtering
|
|
1361
|
+
fields (Tekax B.38). Root-qualified: the root's button reset (0,1,1) beats
|
|
1362
|
+
a single class. */
|
|
1363
|
+
.kanuni-pivot-root .kanuni-pivot-area-collapse {
|
|
1364
|
+
margin-inline-start: auto;
|
|
1365
|
+
display: inline-flex;
|
|
1366
|
+
align-items: center;
|
|
1367
|
+
justify-content: center;
|
|
1368
|
+
padding: 2px;
|
|
1369
|
+
border: 0;
|
|
1370
|
+
border-radius: var(--pivot-border-radius-sm);
|
|
1371
|
+
background: transparent;
|
|
1372
|
+
color: inherit;
|
|
1373
|
+
cursor: pointer;
|
|
1374
|
+
}
|
|
1375
|
+
.kanuni-pivot-root .kanuni-pivot-area-collapse:hover {
|
|
1376
|
+
background-color: var(--pivot-surface-hover);
|
|
1377
|
+
color: var(--pivot-primary);
|
|
1378
|
+
}
|
|
1379
|
+
.kanuni-pivot-root .kanuni-pivot-area-collapse:focus-visible {
|
|
1380
|
+
outline: 2px solid var(--pivot-primary);
|
|
1381
|
+
outline-offset: 1px;
|
|
1382
|
+
}
|
|
1383
|
+
@media (pointer: coarse) {
|
|
1384
|
+
.kanuni-pivot-root .kanuni-pivot-area-collapse {
|
|
1385
|
+
min-width: 44px;
|
|
1386
|
+
min-height: 44px;
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
.kanuni-pivot-area-filtered-count {
|
|
1390
|
+
text-transform: none;
|
|
1391
|
+
letter-spacing: 0;
|
|
1392
|
+
font-weight: 600;
|
|
1393
|
+
padding: 0 6px;
|
|
1394
|
+
border-radius: 999px;
|
|
1395
|
+
color: var(--pivot-danger);
|
|
1396
|
+
background-color: color-mix(in srgb, var(--pivot-danger) 10%, transparent);
|
|
1397
|
+
}
|
|
1398
|
+
/* A capped strip scrolls inside itself; the page does not take over at its ends. */
|
|
1399
|
+
.kanuni-pivot-area-content {
|
|
1400
|
+
overscroll-behavior-y: contain;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1267
1403
|
.kanuni-pivot-area-content {
|
|
1268
1404
|
flex: 1;
|
|
1269
1405
|
display: flex;
|
|
@@ -1297,6 +1433,16 @@
|
|
|
1297
1433
|
box-shadow: 0 0 0 2px var(--pivot-primary);
|
|
1298
1434
|
cursor: grabbing !important;
|
|
1299
1435
|
}
|
|
1436
|
+
/* B.34: the area under the pointer will not take the dragged field. (The
|
|
1437
|
+
chooser box carries inline over/out colours, hence !important there.) */
|
|
1438
|
+
.kanuni-pivot-area-dropzone.is-drop-denied {
|
|
1439
|
+
box-shadow: inset 0 0 0 1px var(--pivot-danger);
|
|
1440
|
+
background-color: color-mix(in srgb, var(--pivot-danger) 6%, transparent);
|
|
1441
|
+
}
|
|
1442
|
+
.is-drop-denied[data-chooser-area] {
|
|
1443
|
+
box-shadow: inset 0 0 0 1px var(--pivot-danger) !important;
|
|
1444
|
+
background-color: color-mix(in srgb, var(--pivot-danger) 6%, transparent) !important;
|
|
1445
|
+
}
|
|
1300
1446
|
|
|
1301
1447
|
.kanuni-pivot-field-chip-actions {
|
|
1302
1448
|
display: flex;
|
|
@@ -1310,6 +1456,15 @@
|
|
|
1310
1456
|
.kanuni-pivot-field-chip:focus-within .kanuni-pivot-field-chip-actions {
|
|
1311
1457
|
opacity: 1;
|
|
1312
1458
|
}
|
|
1459
|
+
/* A chip that is a table header cell's only child is as wide as the cell; its
|
|
1460
|
+
filter and remove buttons then sat right after the caption, in the middle
|
|
1461
|
+
of the chip, invisible until hovered — a click on the middle of "Region"
|
|
1462
|
+
in the row header opened the filter or removed the field instead of
|
|
1463
|
+
sorting. At the chip's end they are where the strip's compact chips have
|
|
1464
|
+
them, and the rest of the chip sorts. */
|
|
1465
|
+
th > .kanuni-pivot-field-chip > .kanuni-pivot-field-chip-actions {
|
|
1466
|
+
margin-inline-start: auto;
|
|
1467
|
+
}
|
|
1313
1468
|
/* Chips are keyboard-operable (#207): the ring is the only sign of focus. */
|
|
1314
1469
|
.kanuni-pivot-field-chip:focus-visible {
|
|
1315
1470
|
outline: 2px solid var(--pivot-primary);
|
|
@@ -1339,6 +1494,19 @@
|
|
|
1339
1494
|
color: var(--pivot-danger);
|
|
1340
1495
|
}
|
|
1341
1496
|
|
|
1497
|
+
/* The field chooser as a side panel (React, `fieldChooserMode: 'panel'`,
|
|
1498
|
+
Tekax B.37): at the pivot's end side, its full height, no backdrop. */
|
|
1499
|
+
.kanuni-pivot-chooser-panel {
|
|
1500
|
+
flex: 0 0 auto;
|
|
1501
|
+
width: var(--pivot-chooser-panel-width, 320px);
|
|
1502
|
+
max-width: 50%;
|
|
1503
|
+
height: 100%;
|
|
1504
|
+
min-height: 0;
|
|
1505
|
+
margin-inline-start: 8px;
|
|
1506
|
+
border: 1px solid var(--pivot-border);
|
|
1507
|
+
border-radius: var(--pivot-radius-md);
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1342
1510
|
/* The field chooser's backdrop (both renderers). */
|
|
1343
1511
|
.kanuni-pivot-chooser-backdrop {
|
|
1344
1512
|
background-color: var(--pivot-chooser-overlay-bg);
|
|
@@ -1387,6 +1555,13 @@
|
|
|
1387
1555
|
.kanuni-pivot-dropdown-item:hover svg {
|
|
1388
1556
|
color: var(--pivot-text);
|
|
1389
1557
|
}
|
|
1558
|
+
/* B.34: "Move to" an area the field's allowedAreas leave out. */
|
|
1559
|
+
.kanuni-pivot-dropdown-item:disabled,
|
|
1560
|
+
.kanuni-pivot-dropdown-item:disabled:hover {
|
|
1561
|
+
opacity: 0.45;
|
|
1562
|
+
cursor: not-allowed;
|
|
1563
|
+
background-color: transparent;
|
|
1564
|
+
}
|
|
1390
1565
|
.kanuni-pivot-dropdown-item-danger {
|
|
1391
1566
|
color: var(--pivot-danger);
|
|
1392
1567
|
}
|
|
@@ -1883,6 +2058,9 @@
|
|
|
1883
2058
|
.kanuni-pivot-root .h-full {
|
|
1884
2059
|
height: 100%;
|
|
1885
2060
|
}
|
|
2061
|
+
.kanuni-pivot-root .min-h-0 {
|
|
2062
|
+
min-height: 0;
|
|
2063
|
+
}
|
|
1886
2064
|
.kanuni-pivot-root .w-1\.5 {
|
|
1887
2065
|
width: calc(var(--spacing) * 1.5);
|
|
1888
2066
|
}
|
|
@@ -1965,6 +2143,9 @@
|
|
|
1965
2143
|
.kanuni-pivot-root .grid-cols-1 {
|
|
1966
2144
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
1967
2145
|
}
|
|
2146
|
+
.kanuni-pivot-root .grid-cols-2 {
|
|
2147
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
2148
|
+
}
|
|
1968
2149
|
.kanuni-pivot-root .flex-col {
|
|
1969
2150
|
flex-direction: column;
|
|
1970
2151
|
}
|
|
@@ -2150,10 +2331,6 @@
|
|
|
2150
2331
|
.kanuni-pivot-root .italic {
|
|
2151
2332
|
font-style: italic;
|
|
2152
2333
|
}
|
|
2153
|
-
.kanuni-pivot-root .tabular-nums {
|
|
2154
|
-
--tw-numeric-spacing: tabular-nums;
|
|
2155
|
-
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
2156
|
-
}
|
|
2157
2334
|
.kanuni-pivot-root .opacity-0 {
|
|
2158
2335
|
opacity: 0%;
|
|
2159
2336
|
}
|
|
@@ -2166,6 +2343,10 @@
|
|
|
2166
2343
|
.kanuni-pivot-root .opacity-100 {
|
|
2167
2344
|
opacity: 100%;
|
|
2168
2345
|
}
|
|
2346
|
+
.kanuni-pivot-root .shadow {
|
|
2347
|
+
--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));
|
|
2348
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2349
|
+
}
|
|
2169
2350
|
.kanuni-pivot-root .shadow-2xl {
|
|
2170
2351
|
--tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));
|
|
2171
2352
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -2382,26 +2563,6 @@
|
|
|
2382
2563
|
syntax: "*";
|
|
2383
2564
|
inherits: false;
|
|
2384
2565
|
}
|
|
2385
|
-
@property --tw-ordinal {
|
|
2386
|
-
syntax: "*";
|
|
2387
|
-
inherits: false;
|
|
2388
|
-
}
|
|
2389
|
-
@property --tw-slashed-zero {
|
|
2390
|
-
syntax: "*";
|
|
2391
|
-
inherits: false;
|
|
2392
|
-
}
|
|
2393
|
-
@property --tw-numeric-figure {
|
|
2394
|
-
syntax: "*";
|
|
2395
|
-
inherits: false;
|
|
2396
|
-
}
|
|
2397
|
-
@property --tw-numeric-spacing {
|
|
2398
|
-
syntax: "*";
|
|
2399
|
-
inherits: false;
|
|
2400
|
-
}
|
|
2401
|
-
@property --tw-numeric-fraction {
|
|
2402
|
-
syntax: "*";
|
|
2403
|
-
inherits: false;
|
|
2404
|
-
}
|
|
2405
2566
|
@property --tw-shadow {
|
|
2406
2567
|
syntax: "*";
|
|
2407
2568
|
inherits: false;
|
|
@@ -2588,11 +2749,6 @@
|
|
|
2588
2749
|
--tw-border-style: solid;
|
|
2589
2750
|
--tw-font-weight: initial;
|
|
2590
2751
|
--tw-tracking: initial;
|
|
2591
|
-
--tw-ordinal: initial;
|
|
2592
|
-
--tw-slashed-zero: initial;
|
|
2593
|
-
--tw-numeric-figure: initial;
|
|
2594
|
-
--tw-numeric-spacing: initial;
|
|
2595
|
-
--tw-numeric-fraction: initial;
|
|
2596
2752
|
--tw-shadow: 0 0 #0000;
|
|
2597
2753
|
--tw-shadow-color: initial;
|
|
2598
2754
|
--tw-shadow-alpha: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanunilabs/pivotgrid-react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
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.
|
|
68
|
+
"@kanunilabs/pivotgrid-core": "1.11.3"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@tailwindcss/postcss": "^4.3.0",
|