@kanunilabs/datagrid 1.9.10 → 1.9.12

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,101 @@
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
+ /* `LookupBox` (Tekax B.4.2): the grid's lookup as a FORM field — the same box,
3072
+ list and keys, drawn like the row form's inputs. */
3073
+ .kanuni-lookup-box {
3074
+ display: inline-flex;
3075
+ align-items: stretch;
3076
+ min-width: 0;
3077
+ height: 32px;
3078
+ border: 1px solid var(--dg-border-strong);
3079
+ border-radius: var(--dg-radius-control);
3080
+ background: var(--dg-surface);
3081
+ color: var(--dg-text);
3082
+ font-size: var(--dg-font-size);
3083
+ overflow: hidden;
3084
+ }
3085
+ .kanuni-lookup-box:focus-within {
3086
+ outline: 2px solid var(--dg-focus-ring);
3087
+ outline-offset: -1px;
3088
+ }
3089
+ .kanuni-lookup-box--invalid {
3090
+ border-color: var(--dg-danger);
3091
+ }
3092
+ .kanuni-lookup-box .kanuni-datagrid-editor {
3093
+ flex: 1 1 auto;
3094
+ min-width: 0;
3095
+ height: 100%;
3096
+ margin: 0;
3097
+ padding: 0 8px;
3098
+ border: 0;
3099
+ background: transparent;
3100
+ color: inherit;
3101
+ font: inherit;
3102
+ outline: none;
3103
+ }
3104
+ .kanuni-lookup-box .kanuni-datagrid-editor:disabled {
3105
+ color: var(--dg-text-muted);
3106
+ }
3107
+ @media (pointer: coarse) {
3108
+ .kanuni-lookup-box {
3109
+ height: 44px;
3110
+ }
3111
+ .kanuni-lookup-box .kanuni-datagrid-editor {
3112
+ font-size: max(16px, var(--dg-font-size));
3113
+ }
3114
+ }
3115
+
3021
3116
  /* In a WRAPPED cell the editor takes the LINE BOX, not the row height.
3022
3117
  A wrapping cell is as tall as its own text: one line of it is
3023
3118
  `padding-block x2 + --dg-wrap-line-height`, which is shorter than a standard
@@ -3287,6 +3382,93 @@
3287
3382
  font-size: var(--dg-font-size);
3288
3383
  }
3289
3384
 
3385
+ /* `lookup.listResizable` (Tekax B.4.3): the corner grip, a sibling of the list
3386
+ so it does not scroll away with the items. Drawn as two short diagonals. */
3387
+ .kanuni-datagrid-lookup-grip {
3388
+ position: fixed;
3389
+ z-index: 1201;
3390
+ width: 14px;
3391
+ height: 14px;
3392
+ cursor: nwse-resize;
3393
+ touch-action: none;
3394
+ background: linear-gradient(
3395
+ 135deg,
3396
+ transparent 55%,
3397
+ var(--dg-border-strong) 55%,
3398
+ var(--dg-border-strong) 62%,
3399
+ transparent 62%,
3400
+ transparent 75%,
3401
+ var(--dg-border-strong) 75%,
3402
+ var(--dg-border-strong) 82%,
3403
+ transparent 82%
3404
+ );
3405
+ }
3406
+ .kanuni-datagrid-lookup-grip--top {
3407
+ cursor: nesw-resize;
3408
+ transform: scaleY(-1);
3409
+ }
3410
+
3411
+ /* `lookup.listColumns` (Tekax B.4.2): the list as a table. The header row is
3412
+ sticky inside the scrolling list; items and header share one column grid. */
3413
+ .kanuni-datagrid-lookup-head {
3414
+ position: sticky;
3415
+ top: 0;
3416
+ z-index: 1;
3417
+ display: grid;
3418
+ align-items: center;
3419
+ padding: 0 8px;
3420
+ column-gap: 12px;
3421
+ background: var(--dg-surface-header);
3422
+ border-bottom: 1px solid var(--dg-border);
3423
+ color: var(--dg-text-muted);
3424
+ font-weight: 600;
3425
+ }
3426
+ .kanuni-datagrid-lookup-item--table {
3427
+ display: grid;
3428
+ align-items: center;
3429
+ column-gap: 12px;
3430
+ }
3431
+ .kanuni-datagrid-lookup-col {
3432
+ min-width: 0;
3433
+ overflow: hidden;
3434
+ text-overflow: ellipsis;
3435
+ white-space: nowrap;
3436
+ }
3437
+ .kanuni-datagrid-lookup-col--end {
3438
+ text-align: end;
3439
+ font-variant-numeric: tabular-nums;
3440
+ }
3441
+
3442
+ /* `lookup.multiple` (Tekax B.6): a column of check boxes. */
3443
+ .kanuni-datagrid-multi-popup {
3444
+ overflow-y: auto;
3445
+ }
3446
+ .kanuni-datagrid-multi-item {
3447
+ display: flex;
3448
+ align-items: center;
3449
+ gap: 8px;
3450
+ cursor: pointer;
3451
+ }
3452
+ .kanuni-datagrid-multi-item input {
3453
+ margin: 0;
3454
+ pointer-events: none;
3455
+ }
3456
+ .kanuni-datagrid-multi-label {
3457
+ flex: 1 1 auto;
3458
+ min-width: 0;
3459
+ overflow: hidden;
3460
+ text-overflow: ellipsis;
3461
+ white-space: nowrap;
3462
+ }
3463
+ .kanuni-datagrid-multi-item--disabled {
3464
+ cursor: not-allowed;
3465
+ opacity: 0.6;
3466
+ }
3467
+ .kanuni-datagrid-multi-reason {
3468
+ flex: none;
3469
+ font-size: 0.85em;
3470
+ }
3471
+
3290
3472
  .kanuni-datagrid-lookup-item {
3291
3473
  /* The editor windows the list by the item height it sets inline; the
3292
3474
  padding has to sit INSIDE it, or each item overlaps the next (and a
@@ -4004,6 +4186,44 @@ input[type='checkbox'].kanuni-datagrid-edit-form-input {
4004
4186
  }
4005
4187
  }
4006
4188
 
4189
+ /* ── Totals row pinned to the bottom edge (`pinFooterToBottom`, Tekax B.3) ──
4190
+ The totals row is sticky INSIDE the canvas, and the canvas is only as tall
4191
+ as its rows: with a few rows the row sat right under them. The scroller and
4192
+ the canvas become column flex boxes and the first bottom-edge part (rows
4193
+ pinned to the bottom, else the totals row) takes the free space above it.
4194
+ Tekax ran this as page CSS against these class names, checked by their e2e,
4195
+ before it moved here. */
4196
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-scroller {
4197
+ display: flex;
4198
+ flex-direction: column;
4199
+ }
4200
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-canvas {
4201
+ flex: 1 0 auto;
4202
+ display: flex;
4203
+ flex-direction: column;
4204
+ }
4205
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-canvas > * {
4206
+ flex-shrink: 0;
4207
+ }
4208
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-pinned-rows--bottom,
4209
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-footer-row--bottom {
4210
+ margin-top: auto;
4211
+ }
4212
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-pinned-rows--bottom ~ .kanuni-datagrid-footer-row--bottom {
4213
+ margin-top: 0;
4214
+ }
4215
+ /* An empty grid: the "no rows" text is the scroller's SIBLING and would shorten
4216
+ it, lifting the totals row to the middle of a fixed-height grid. It is laid
4217
+ over the body instead, between the header and the totals row. */
4218
+ .kanuni-datagrid--footer-pinned .kanuni-datagrid-empty {
4219
+ position: absolute;
4220
+ top: calc(var(--dg-header-actual, var(--dg-header-height)) + 1px);
4221
+ bottom: calc(var(--dg-header-height) + 1px);
4222
+ inset-inline: 0;
4223
+ padding: 0 16px;
4224
+ pointer-events: none;
4225
+ }
4226
+
4007
4227
  /* ─────────────────────────────────────────────────────────────
4008
4228
  KANUNILABS DataGrid — packaged themes
4009
4229
  ─────────────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanunilabs/datagrid",
3
- "version": "1.9.10",
3
+ "version": "1.9.12",
4
4
  "description": "High-performance data grid for vanilla JavaScript — no framework required. Virtualized rows and columns, a Web Worker pipeline, sorting, filtering, grouping and theming, with a UMD build for script-tag use.",
5
5
  "keywords": [
6
6
  "data-grid",
@@ -60,7 +60,7 @@
60
60
  "access": "public"
61
61
  },
62
62
  "dependencies": {
63
- "@kanunilabs/datagrid-core": "1.10.10"
63
+ "@kanunilabs/datagrid-core": "1.10.12"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/node": "^22.0.0",
@@ -68,8 +68,8 @@
68
68
  "jsdom": "^30.0.1",
69
69
  "react": "^19.0.0",
70
70
  "react-dom": "^19.0.0",
71
- "@kanunilabs/datagrid-react": "1.8.10",
72
- "@kanunilabs/foundation": "1.0.4"
71
+ "@kanunilabs/foundation": "1.0.4",
72
+ "@kanunilabs/datagrid-react": "1.8.12"
73
73
  },
74
74
  "scripts": {
75
75
  "build": "tsup && node scripts/build-css.mjs && node scripts/build-umd.mjs && node ../../scripts/check-esm-load.mjs",