@kanunilabs/pivotgrid-react 1.8.1 → 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/styles.css CHANGED
@@ -507,6 +507,15 @@
507
507
  .kanuni-pivot-density-comfortable .kanuni-pivot-table .kanuni-pivot-header-cell {
508
508
  line-height: 27px;
509
509
  }
510
+ /* `touch` (B.22): 45px rows and headers (pivotRowHeight) — every cell, header
511
+ +/- and funnel is a full 44px target inside the cell's 1px border. For a
512
+ touch screen; the app chooses it. */
513
+ .kanuni-pivot-density-touch .kanuni-pivot-table .kanuni-pivot-cell {
514
+ line-height: 44px;
515
+ }
516
+ .kanuni-pivot-density-touch .kanuni-pivot-table .kanuni-pivot-header-cell {
517
+ line-height: 36px;
518
+ }
510
519
  /* The field chips in the header corner inherit the header cell's line
511
520
  height, so the rules above would resize them — and, chips having
512
521
  `transition: all`, animate them for 0.2s after a switch. The pane-balancing
@@ -514,7 +523,8 @@
514
523
  panes ended 0.06-0.3px apart (tree layout, 2026-10-11; exact with this
515
524
  rule). The chips keep their normal metrics in every density. */
516
525
  .kanuni-pivot-density-compact .kanuni-pivot-table .kanuni-pivot-header-cell .kanuni-pivot-field-chip,
517
- .kanuni-pivot-density-comfortable .kanuni-pivot-table .kanuni-pivot-header-cell .kanuni-pivot-field-chip {
526
+ .kanuni-pivot-density-comfortable .kanuni-pivot-table .kanuni-pivot-header-cell .kanuni-pivot-field-chip,
527
+ .kanuni-pivot-density-touch .kanuni-pivot-table .kanuni-pivot-header-cell .kanuni-pivot-field-chip {
518
528
  line-height: 19px;
519
529
  }
520
530
 
@@ -834,9 +844,15 @@
834
844
  position: fixed;
835
845
  left: 50%;
836
846
  top: 50%;
837
- transform: translate(-50%, -50%);
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%;
838
851
  width: 100%;
839
- max-width: 450px;
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));
840
856
  background-color: var(--pivot-modal-bg);
841
857
  border: 1px solid var(--pivot-border);
842
858
  border-radius: var(--pivot-border-radius-lg);
@@ -1099,59 +1115,180 @@
1099
1115
  compact chrome, a tablet in landscape still gets targets a finger can hit.
1100
1116
  The footer has no fixed height, so it simply grows. */
1101
1117
  @media (pointer: coarse) {
1118
+ /* 44px (Tekax B.22, 2026-11-14): their acceptance rule for every screen; the
1119
+ first pass stopped at 40. */
1102
1120
  .kanuni-pivot-footer-btn {
1103
- min-width: 40px;
1104
- min-height: 40px;
1121
+ min-width: 44px;
1122
+ min-height: 44px;
1105
1123
  }
1106
1124
  .kanuni-pivot-dropdown-item {
1107
- min-height: 40px;
1125
+ min-height: 44px;
1108
1126
  }
1109
1127
  /* The saved-views button sits beside the footer icons and stayed 21px tall
1110
1128
  because its size comes from padding + font size, not from the icon rule. */
1111
1129
  .kanuni-pivot-report-btn {
1112
- min-height: 40px;
1130
+ min-height: 44px;
1113
1131
  }
1114
1132
  /* The field chips' own controls were the worst of the lot: 12x12 (an 8px
1115
1133
  icon in 2px padding), sixteen of them on the playground at 375px.
1116
1134
 
1117
- They are NOT blown up to 40x40 like the footer. The two controls sit side
1118
- by side inside one chip and one of them DELETES the field, so equal-sized
1119
- 40px targets would overlap and a mis-tap would be destructive. Instead the
1120
- visual target reaches the WCAG 2.5.8 AA minimum (24x24) and the hit area
1121
- is extended VERTICALLY only — 24x40, no horizontal bleed into the
1122
- neighbour (same ::after technique as the DataGrid filter button). */
1135
+ 44x44 real boxes (B.22). The first pass kept them 24x24 with a vertical
1136
+ ::after, because an ENLARGED HIT AREA on two side-by-side controls — one of
1137
+ which deletes the field — would overlap. Real boxes do not: each 44px
1138
+ control is its own 44px of chip, so the chip grows instead and a tap
1139
+ cannot land on the neighbour. */
1123
1140
  .kanuni-pivot-chip-btn {
1124
- min-width: 24px;
1125
- min-height: 24px;
1141
+ min-width: 44px;
1142
+ min-height: 44px;
1126
1143
  padding: 6px;
1127
1144
  display: inline-flex;
1128
1145
  align-items: center;
1129
1146
  justify-content: center;
1147
+ }
1148
+ /* The column header's own controls — the +/- box and the filter funnel —
1149
+ are 10-12px glyphs between the header's text: a 44px hit area centred on
1150
+ each, without changing the header's layout. The funnel is shown: there is
1151
+ no hover to reveal it on a touch screen. */
1152
+ .kanuni-pivot-table th .kanuni-pivot-expand-icon,
1153
+ .kanuni-pivot-head-filter {
1130
1154
  position: relative;
1155
+ z-index: 1; /* over the header text beside it */
1131
1156
  }
1132
- .kanuni-pivot-chip-btn::after {
1157
+ .kanuni-pivot-table th .kanuni-pivot-expand-icon::after,
1158
+ .kanuni-pivot-head-filter::after {
1133
1159
  content: '';
1134
1160
  position: absolute;
1135
- inset: -8px 0;
1161
+ left: 50%;
1162
+ top: 50%;
1163
+ width: 44px;
1164
+ height: 44px;
1165
+ transform: translate(-50%, -50%);
1166
+ }
1167
+ .kanuni-pivot-head-filter.opacity-0 {
1168
+ opacity: 0.7;
1169
+ }
1170
+ /* At the cell's end edge: beside a short label ("2025") its 44px area lay
1171
+ over the +/- box's, two targets under one finger. */
1172
+ .kanuni-pivot-head-filter {
1173
+ margin-inline-start: auto;
1174
+ }
1175
+ /* …and, at that edge, its area grows inward, not into the next cell. */
1176
+ .kanuni-pivot-head-filter::after {
1177
+ left: auto;
1178
+ inset-inline-end: -3px;
1179
+ transform: translateY(-50%);
1180
+ }
1181
+ /* The +/- box sits at its cell's start edge, so a centred area would hang
1182
+ into the previous cell and be clipped there: it grows to the right. */
1183
+ .kanuni-pivot-table th .kanuni-pivot-expand-icon::after {
1184
+ left: -4px;
1185
+ transform: translateY(-50%);
1136
1186
  }
1137
1187
 
1138
1188
  /* Touch drag needs the gesture, and the browser claims it first.
1139
- Both renderers activate a touch drag after a 200ms hold (dnd-kit's
1140
- TouchSensor in React, the same constants in the vanilla pointer engine),
1141
- but without `touch-action: none` the browser has already started panning
1142
- by then and the drag never begins — the documented dnd-kit requirement,
1143
- never declared here (#195).
1144
-
1145
- Scope matters: a strip chip drags from anywhere, so the whole chip claims
1146
- the gesture. A CHOOSER chip drags only from its grip and lives in a long
1147
- scrollable list, so claiming the whole chip would trap the finger — only
1148
- the grip does. */
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. */
1149
1202
  .kanuni-pivot-field-chip:not([data-drag-scope='grip']) {
1150
1203
  touch-action: none;
1151
1204
  }
1152
1205
  [data-drag-grip] {
1153
1206
  touch-action: none;
1154
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;
1155
1292
  }
1156
1293
  .kanuni-pivot-footer-divider {
1157
1294
  height: 16px;
@@ -1220,6 +1357,49 @@
1220
1357
  letter-spacing: 0.05em;
1221
1358
  }
1222
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
+
1223
1403
  .kanuni-pivot-area-content {
1224
1404
  flex: 1;
1225
1405
  display: flex;
@@ -1253,6 +1433,16 @@
1253
1433
  box-shadow: 0 0 0 2px var(--pivot-primary);
1254
1434
  cursor: grabbing !important;
1255
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
+ }
1256
1446
 
1257
1447
  .kanuni-pivot-field-chip-actions {
1258
1448
  display: flex;
@@ -1266,6 +1456,15 @@
1266
1456
  .kanuni-pivot-field-chip:focus-within .kanuni-pivot-field-chip-actions {
1267
1457
  opacity: 1;
1268
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
+ }
1269
1468
  /* Chips are keyboard-operable (#207): the ring is the only sign of focus. */
1270
1469
  .kanuni-pivot-field-chip:focus-visible {
1271
1470
  outline: 2px solid var(--pivot-primary);
@@ -1295,6 +1494,19 @@
1295
1494
  color: var(--pivot-danger);
1296
1495
  }
1297
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
+
1298
1510
  /* The field chooser's backdrop (both renderers). */
1299
1511
  .kanuni-pivot-chooser-backdrop {
1300
1512
  background-color: var(--pivot-chooser-overlay-bg);
@@ -1343,6 +1555,13 @@
1343
1555
  .kanuni-pivot-dropdown-item:hover svg {
1344
1556
  color: var(--pivot-text);
1345
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
+ }
1346
1565
  .kanuni-pivot-dropdown-item-danger {
1347
1566
  color: var(--pivot-danger);
1348
1567
  }
@@ -1839,6 +2058,9 @@
1839
2058
  .kanuni-pivot-root .h-full {
1840
2059
  height: 100%;
1841
2060
  }
2061
+ .kanuni-pivot-root .min-h-0 {
2062
+ min-height: 0;
2063
+ }
1842
2064
  .kanuni-pivot-root .w-1\.5 {
1843
2065
  width: calc(var(--spacing) * 1.5);
1844
2066
  }
@@ -1921,6 +2143,9 @@
1921
2143
  .kanuni-pivot-root .grid-cols-1 {
1922
2144
  grid-template-columns: repeat(1, minmax(0, 1fr));
1923
2145
  }
2146
+ .kanuni-pivot-root .grid-cols-2 {
2147
+ grid-template-columns: repeat(2, minmax(0, 1fr));
2148
+ }
1924
2149
  .kanuni-pivot-root .flex-col {
1925
2150
  flex-direction: column;
1926
2151
  }
@@ -2106,10 +2331,6 @@
2106
2331
  .kanuni-pivot-root .italic {
2107
2332
  font-style: italic;
2108
2333
  }
2109
- .kanuni-pivot-root .tabular-nums {
2110
- --tw-numeric-spacing: tabular-nums;
2111
- font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
2112
- }
2113
2334
  .kanuni-pivot-root .opacity-0 {
2114
2335
  opacity: 0%;
2115
2336
  }
@@ -2122,6 +2343,10 @@
2122
2343
  .kanuni-pivot-root .opacity-100 {
2123
2344
  opacity: 100%;
2124
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
+ }
2125
2350
  .kanuni-pivot-root .shadow-2xl {
2126
2351
  --tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));
2127
2352
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -2338,26 +2563,6 @@
2338
2563
  syntax: "*";
2339
2564
  inherits: false;
2340
2565
  }
2341
- @property --tw-ordinal {
2342
- syntax: "*";
2343
- inherits: false;
2344
- }
2345
- @property --tw-slashed-zero {
2346
- syntax: "*";
2347
- inherits: false;
2348
- }
2349
- @property --tw-numeric-figure {
2350
- syntax: "*";
2351
- inherits: false;
2352
- }
2353
- @property --tw-numeric-spacing {
2354
- syntax: "*";
2355
- inherits: false;
2356
- }
2357
- @property --tw-numeric-fraction {
2358
- syntax: "*";
2359
- inherits: false;
2360
- }
2361
2566
  @property --tw-shadow {
2362
2567
  syntax: "*";
2363
2568
  inherits: false;
@@ -2544,11 +2749,6 @@
2544
2749
  --tw-border-style: solid;
2545
2750
  --tw-font-weight: initial;
2546
2751
  --tw-tracking: initial;
2547
- --tw-ordinal: initial;
2548
- --tw-slashed-zero: initial;
2549
- --tw-numeric-figure: initial;
2550
- --tw-numeric-spacing: initial;
2551
- --tw-numeric-fraction: initial;
2552
2752
  --tw-shadow: 0 0 #0000;
2553
2753
  --tw-shadow-color: initial;
2554
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.1",
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.1"
68
+ "@kanunilabs/pivotgrid-core": "1.11.3"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@tailwindcss/postcss": "^4.3.0",