@kanunilabs/datagrid-react 1.8.11 → 1.8.13

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
@@ -3018,6 +3018,125 @@
3018
3018
  padding-inline: max(0px, calc(var(--dg-cell-padding-x) - 4px)) 0;
3019
3019
  }
3020
3020
 
3021
+ /* `lookup.onPickerOpen` (Tekax B.4.1): the box and its "…" button share the
3022
+ cell, edge to edge — the box no longer takes the full width, the button
3023
+ takes the cell's end padding. */
3024
+ .kanuni-datagrid-root .kanuni-datagrid-cell > .kanuni-datagrid-editor--with-picker {
3025
+ flex: 1 1 auto;
3026
+ width: auto;
3027
+ min-width: 0;
3028
+ margin-inline-end: 0;
3029
+ }
3030
+ .kanuni-datagrid-root .kanuni-datagrid-lookup-picker {
3031
+ flex: none;
3032
+ align-self: stretch;
3033
+ width: 24px;
3034
+ margin-inline-end: calc(var(--dg-cell-padding-x) * -1);
3035
+ padding: 0;
3036
+ border: 0;
3037
+ border-inline-start: 1px solid var(--dg-border);
3038
+ background: var(--dg-surface-header);
3039
+ color: var(--dg-text);
3040
+ font: inherit;
3041
+ cursor: pointer;
3042
+ }
3043
+ .kanuni-datagrid-root .kanuni-datagrid-lookup-picker:hover {
3044
+ background: var(--dg-surface-hover);
3045
+ }
3046
+ /* `lookup.dropButton` (B.4.2): the ▾ that opens the list, beside "…" when both. */
3047
+ .kanuni-datagrid-root .kanuni-datagrid-lookup-drop,
3048
+ .kanuni-lookup-box .kanuni-datagrid-lookup-drop,
3049
+ .kanuni-lookup-box .kanuni-datagrid-lookup-picker {
3050
+ flex: none;
3051
+ align-self: stretch;
3052
+ width: 24px;
3053
+ padding: 0;
3054
+ border: 0;
3055
+ border-inline-start: 1px solid var(--dg-border);
3056
+ background: var(--dg-surface-header);
3057
+ color: var(--dg-text);
3058
+ font: inherit;
3059
+ cursor: pointer;
3060
+ }
3061
+ .kanuni-datagrid-root .kanuni-datagrid-cell > .kanuni-datagrid-lookup-drop:last-of-type,
3062
+ .kanuni-datagrid-root .kanuni-datagrid-cell > .kanuni-datagrid-lookup-picker {
3063
+ margin-inline-end: calc(var(--dg-cell-padding-x) * -1);
3064
+ }
3065
+ .kanuni-datagrid-root .kanuni-datagrid-lookup-drop:hover,
3066
+ .kanuni-lookup-box .kanuni-datagrid-lookup-drop:hover,
3067
+ .kanuni-lookup-box .kanuni-datagrid-lookup-picker:hover {
3068
+ background: var(--dg-surface-hover);
3069
+ }
3070
+
3071
+ /* B.9.6: the item under the pointer, when the pointer does not move the highlight. */
3072
+ .kanuni-datagrid-lookup-item--hover {
3073
+ background: var(--dg-surface-hover);
3074
+ }
3075
+ /* B.9.12: finger-sized buttons on a touch screen. */
3076
+ @media (pointer: coarse) {
3077
+ .kanuni-datagrid-root .kanuni-datagrid-lookup-drop,
3078
+ .kanuni-datagrid-root .kanuni-datagrid-lookup-picker,
3079
+ .kanuni-lookup-box .kanuni-datagrid-lookup-drop,
3080
+ .kanuni-lookup-box .kanuni-datagrid-lookup-picker {
3081
+ width: 44px;
3082
+ min-height: 44px;
3083
+ }
3084
+ }
3085
+ .kanuni-lookup-box-error {
3086
+ display: block;
3087
+ margin-top: 4px;
3088
+ color: var(--dg-danger);
3089
+ font-size: var(--dg-font-size);
3090
+ }
3091
+
3092
+ /* `LookupBox` (Tekax B.4.2): the grid's lookup as a FORM field — the same box,
3093
+ list and keys, drawn like the row form's inputs. */
3094
+ .kanuni-lookup-box {
3095
+ display: inline-flex;
3096
+ align-items: stretch;
3097
+ min-width: 0;
3098
+ /* B.9.15: the app's own field height — set --kanuni-lookup-box-height on the
3099
+ box or any ancestor (the grid's stylesheet is unlayered, so a utility class
3100
+ cannot override the declaration itself). */
3101
+ height: var(--kanuni-lookup-box-height, 32px);
3102
+ border: 1px solid var(--dg-border-strong);
3103
+ border-radius: var(--dg-radius-control);
3104
+ background: var(--dg-surface);
3105
+ color: var(--dg-text);
3106
+ font-size: var(--dg-font-size);
3107
+ overflow: hidden;
3108
+ }
3109
+ .kanuni-lookup-box:focus-within {
3110
+ outline: 2px solid var(--dg-focus-ring);
3111
+ outline-offset: -1px;
3112
+ }
3113
+ .kanuni-lookup-box--invalid {
3114
+ border-color: var(--dg-danger);
3115
+ }
3116
+ .kanuni-lookup-box .kanuni-datagrid-editor {
3117
+ flex: 1 1 auto;
3118
+ min-width: 0;
3119
+ height: 100%;
3120
+ margin: 0;
3121
+ padding: 0 8px;
3122
+ border: 0;
3123
+ background: transparent;
3124
+ color: inherit;
3125
+ font: inherit;
3126
+ outline: none;
3127
+ }
3128
+ .kanuni-lookup-box .kanuni-datagrid-editor:disabled {
3129
+ color: var(--dg-text-muted);
3130
+ }
3131
+ @media (pointer: coarse) {
3132
+ .kanuni-lookup-box {
3133
+ height: var(--kanuni-lookup-box-height, 44px);
3134
+ }
3135
+ .kanuni-lookup-box .kanuni-datagrid-editor {
3136
+ font-size: max(16px, var(--dg-font-size));
3137
+ }
3138
+ }
3139
+
3021
3140
  /* In a WRAPPED cell the editor takes the LINE BOX, not the row height.
3022
3141
  A wrapping cell is as tall as its own text: one line of it is
3023
3142
  `padding-block x2 + --dg-wrap-line-height`, which is shorter than a standard
@@ -3287,6 +3406,93 @@
3287
3406
  font-size: var(--dg-font-size);
3288
3407
  }
3289
3408
 
3409
+ /* `lookup.listResizable` (Tekax B.4.3): the corner grip, a sibling of the list
3410
+ so it does not scroll away with the items. Drawn as two short diagonals. */
3411
+ .kanuni-datagrid-lookup-grip {
3412
+ position: fixed;
3413
+ z-index: 1201;
3414
+ width: 14px;
3415
+ height: 14px;
3416
+ cursor: nwse-resize;
3417
+ touch-action: none;
3418
+ background: linear-gradient(
3419
+ 135deg,
3420
+ transparent 55%,
3421
+ var(--dg-border-strong) 55%,
3422
+ var(--dg-border-strong) 62%,
3423
+ transparent 62%,
3424
+ transparent 75%,
3425
+ var(--dg-border-strong) 75%,
3426
+ var(--dg-border-strong) 82%,
3427
+ transparent 82%
3428
+ );
3429
+ }
3430
+ .kanuni-datagrid-lookup-grip--top {
3431
+ cursor: nesw-resize;
3432
+ transform: scaleY(-1);
3433
+ }
3434
+
3435
+ /* `lookup.listColumns` (Tekax B.4.2): the list as a table. The header row is
3436
+ sticky inside the scrolling list; items and header share one column grid. */
3437
+ .kanuni-datagrid-lookup-head {
3438
+ position: sticky;
3439
+ top: 0;
3440
+ z-index: 1;
3441
+ display: grid;
3442
+ align-items: center;
3443
+ padding: 0 8px;
3444
+ column-gap: 12px;
3445
+ background: var(--dg-surface-header);
3446
+ border-bottom: 1px solid var(--dg-border);
3447
+ color: var(--dg-text-muted);
3448
+ font-weight: 600;
3449
+ }
3450
+ .kanuni-datagrid-lookup-item--table {
3451
+ display: grid;
3452
+ align-items: center;
3453
+ column-gap: 12px;
3454
+ }
3455
+ .kanuni-datagrid-lookup-col {
3456
+ min-width: 0;
3457
+ overflow: hidden;
3458
+ text-overflow: ellipsis;
3459
+ white-space: nowrap;
3460
+ }
3461
+ .kanuni-datagrid-lookup-col--end {
3462
+ text-align: end;
3463
+ font-variant-numeric: tabular-nums;
3464
+ }
3465
+
3466
+ /* `lookup.multiple` (Tekax B.6): a column of check boxes. */
3467
+ .kanuni-datagrid-multi-popup {
3468
+ overflow-y: auto;
3469
+ }
3470
+ .kanuni-datagrid-multi-item {
3471
+ display: flex;
3472
+ align-items: center;
3473
+ gap: 8px;
3474
+ cursor: pointer;
3475
+ }
3476
+ .kanuni-datagrid-multi-item input {
3477
+ margin: 0;
3478
+ pointer-events: none;
3479
+ }
3480
+ .kanuni-datagrid-multi-label {
3481
+ flex: 1 1 auto;
3482
+ min-width: 0;
3483
+ overflow: hidden;
3484
+ text-overflow: ellipsis;
3485
+ white-space: nowrap;
3486
+ }
3487
+ .kanuni-datagrid-multi-item--disabled {
3488
+ cursor: not-allowed;
3489
+ opacity: 0.6;
3490
+ }
3491
+ .kanuni-datagrid-multi-reason {
3492
+ flex: none;
3493
+ font-size: 0.85em;
3494
+ }
3495
+
3290
3496
  .kanuni-datagrid-lookup-item {
3291
3497
  /* The editor windows the list by the item height it sets inline; the
3292
3498
  padding has to sit INSIDE it, or each item overlaps the next (and a
@@ -4004,6 +4210,44 @@ input[type='checkbox'].kanuni-datagrid-edit-form-input {
4004
4210
  }
4005
4211
  }
4006
4212
 
4213
+ /* ── Totals row pinned to the bottom edge (`pinFooterToBottom`, Tekax B.3) ──
4214
+ The totals row is sticky INSIDE the canvas, and the canvas is only as tall
4215
+ as its rows: with a few rows the row sat right under them. The scroller and
4216
+ the canvas become column flex boxes and the first bottom-edge part (rows
4217
+ pinned to the bottom, else the totals row) takes the free space above it.
4218
+ Tekax ran this as page CSS against these class names, checked by their e2e,
4219
+ before it moved here. */
4220
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-scroller {
4221
+ display: flex;
4222
+ flex-direction: column;
4223
+ }
4224
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-canvas {
4225
+ flex: 1 0 auto;
4226
+ display: flex;
4227
+ flex-direction: column;
4228
+ }
4229
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-canvas > * {
4230
+ flex-shrink: 0;
4231
+ }
4232
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-pinned-rows--bottom,
4233
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-footer-row--bottom {
4234
+ margin-top: auto;
4235
+ }
4236
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-pinned-rows--bottom ~ .kanuni-datagrid-footer-row--bottom {
4237
+ margin-top: 0;
4238
+ }
4239
+ /* An empty grid: the "no rows" text is the scroller's SIBLING and would shorten
4240
+ it, lifting the totals row to the middle of a fixed-height grid. It is laid
4241
+ over the body instead, between the header and the totals row. */
4242
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-empty {
4243
+ position: absolute;
4244
+ top: calc(var(--dg-header-actual, var(--dg-header-height)) + 1px);
4245
+ bottom: calc(var(--dg-header-height) + 1px);
4246
+ inset-inline: 0;
4247
+ padding: 0 16px;
4248
+ pointer-events: none;
4249
+ }
4250
+
4007
4251
  /* ─────────────────────────────────────────────────────────────
4008
4252
  KANUNILABS DataGrid — packaged themes
4009
4253
  ─────────────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanunilabs/datagrid-react",
3
- "version": "1.8.11",
3
+ "version": "1.8.13",
4
4
  "description": "High-performance React data grid — virtualized rows and columns, sticky pinned columns, sorting, filtering and theming",
5
5
  "keywords": [
6
6
  "react",
@@ -57,7 +57,7 @@
57
57
  "access": "public"
58
58
  },
59
59
  "dependencies": {
60
- "@kanunilabs/datagrid-core": "1.10.11"
60
+ "@kanunilabs/datagrid-core": "1.10.13"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "react": ">=18.0.0",