@kanunilabs/datagrid-react 1.8.2 → 1.8.4

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
@@ -679,6 +679,48 @@
679
679
  font-size: 11px;
680
680
  }
681
681
 
682
+ /* The search box's own refusal (`toolbar.search.validate`), right after it. */
683
+ .kanuni-datagrid-toolbar-search-error {
684
+ color: var(--dg-danger-text);
685
+ font-size: 11px;
686
+ }
687
+
688
+ .kanuni-datagrid-toolbar-search[aria-invalid='true'] {
689
+ border-color: var(--dg-danger);
690
+ }
691
+
692
+ /* An app's own button (GridToolbarButton / toolbarButton()), drawn like the
693
+ grid's commands wherever it sits: the toolbar's rule above reaches only its
694
+ DIRECT children, and the status bar has none. */
695
+ .kanuni-datagrid-app-button {
696
+ display: inline-flex;
697
+ align-items: center;
698
+ justify-content: center;
699
+ gap: 5px;
700
+ padding: 3px 10px;
701
+ border: 1px solid var(--dg-border-strong);
702
+ border-radius: var(--dg-radius-control);
703
+ background: var(--dg-surface);
704
+ color: inherit;
705
+ font: inherit;
706
+ font-size: var(--dg-control-font-size);
707
+ cursor: pointer;
708
+ }
709
+
710
+ .kanuni-datagrid-app-button.kanuni-datagrid-toolbar-icon-button {
711
+ padding: 0;
712
+ }
713
+
714
+ .kanuni-datagrid-app-button:hover:not([aria-disabled='true']) {
715
+ background: var(--dg-surface-hover);
716
+ }
717
+
718
+ /* Unavailable but still focusable, so its reason can be read. */
719
+ .kanuni-datagrid-app-button[aria-disabled='true'] {
720
+ opacity: 0.6;
721
+ cursor: not-allowed;
722
+ }
723
+
682
724
  /*
683
725
  * The same message, but floating where a context menu just was — the cell
684
726
  * menu's Export entries have nowhere else to report a missing optional peer.
@@ -1827,6 +1869,7 @@
1827
1869
  gap: 6px;
1828
1870
  }
1829
1871
 
1872
+ .kanuni-datagrid-filter-custom,
1830
1873
  .kanuni-datagrid-filter-actions button,
1831
1874
  .kanuni-datagrid-filter-footer button {
1832
1875
  padding: 3px 8px;
@@ -1839,6 +1882,11 @@
1839
1882
  cursor: pointer;
1840
1883
  }
1841
1884
 
1885
+ .kanuni-datagrid-filter-custom {
1886
+ align-self: flex-start;
1887
+ }
1888
+
1889
+ .kanuni-datagrid-filter-custom:hover,
1842
1890
  .kanuni-datagrid-filter-actions button:hover,
1843
1891
  .kanuni-datagrid-filter-footer button:hover {
1844
1892
  background: var(--dg-surface-hover);
@@ -1886,6 +1934,23 @@
1886
1934
  flex: none;
1887
1935
  }
1888
1936
 
1937
+ /* The popup takes focus itself when its padding is clicked (tabIndex -1), so
1938
+ typing there reaches its search box; it is not a control, so no ring. */
1939
+ .kanuni-datagrid-filter-popup:focus {
1940
+ outline: none;
1941
+ }
1942
+
1943
+ /* A row of a server's list whose piece has not arrived: the slot is held (the
1944
+ scroll bar describes the whole list), the value is not known yet. */
1945
+ .kanuni-datagrid-filter-item--pending {
1946
+ color: var(--dg-text-muted);
1947
+ cursor: default;
1948
+ }
1949
+
1950
+ .kanuni-datagrid-filter-item--pending:hover {
1951
+ background: transparent;
1952
+ }
1953
+
1889
1954
  .kanuni-datagrid-filter-item:hover,
1890
1955
  .kanuni-datagrid-filter-item--active {
1891
1956
  background: var(--dg-surface-hover);
@@ -2846,6 +2911,19 @@
2846
2911
  margin: 0 calc(var(--dg-cell-padding-x) * -1);
2847
2912
  }
2848
2913
 
2914
+ /* ...but the TEXT stays where the cell drew it. Widened to the cell's edges
2915
+ with only 4px of padding, the value jumped left by the cell padding as the
2916
+ editor opened; in row mode, with every cell open, no value lined up with the
2917
+ column above it (2026-10-19, content session). The date editor's own input
2918
+ keeps its 4px, so its wrapper makes up the rest. */
2919
+ .kanuni-datagrid-root .kanuni-datagrid-cell > .kanuni-datagrid-editor:not([type='checkbox']) {
2920
+ padding-inline: var(--dg-cell-padding-x);
2921
+ }
2922
+
2923
+ .kanuni-datagrid-root .kanuni-datagrid-cell > .kanuni-datagrid-date-editor {
2924
+ padding-inline: max(0px, calc(var(--dg-cell-padding-x) - 4px)) 0;
2925
+ }
2926
+
2849
2927
  /* In a WRAPPED cell the editor takes the LINE BOX, not the row height.
2850
2928
  A wrapping cell is as tall as its own text: one line of it is
2851
2929
  `padding-block x2 + --dg-wrap-line-height`, which is shorter than a standard
@@ -2883,6 +2961,38 @@
2883
2961
  background: var(--dg-surface);
2884
2962
  }
2885
2963
 
2964
+ /* Row mode opens every cell of the row at once and marks none of them
2965
+ `--editing`, so the focused one kept its ring around the underlined editor —
2966
+ the double rectangle above, on one cell of the row (2026-10-19, content
2967
+ session). Any cell that holds an editor drops the ring. */
2968
+ .kanuni-datagrid-root .kanuni-datagrid-cell--focused:has(> .kanuni-datagrid-editor),
2969
+ .kanuni-datagrid-root .kanuni-datagrid-cell--focused:has(> .kanuni-datagrid-date-editor) {
2970
+ outline: none;
2971
+ }
2972
+
2973
+ /* A number is typed where it is read: right-aligned, as the cell shows it.
2974
+ Left-aligned editors made the value jump across the column the moment the
2975
+ cell opened, and in row mode two number editors side by side read as one
2976
+ field. */
2977
+ .kanuni-datagrid-root .kanuni-datagrid-cell--number > .kanuni-datagrid-editor {
2978
+ text-align: right;
2979
+ }
2980
+
2981
+ /* Chrome keeps ~15px at the end of a number input for its spin buttons, shown
2982
+ or not, so a right-aligned value still stopped short of the column's
2983
+ numbers. In a row-high cell the arrows are too small to use anyway; the
2984
+ keyboard's arrow keys move between cells here. */
2985
+ .kanuni-datagrid-root input.kanuni-datagrid-editor[type='number'] {
2986
+ appearance: textfield;
2987
+ -moz-appearance: textfield;
2988
+ }
2989
+
2990
+ .kanuni-datagrid-root input.kanuni-datagrid-editor[type='number']::-webkit-inner-spin-button,
2991
+ .kanuni-datagrid-root input.kanuni-datagrid-editor[type='number']::-webkit-outer-spin-button {
2992
+ -webkit-appearance: none;
2993
+ margin: 0;
2994
+ }
2995
+
2886
2996
  .kanuni-datagrid-root input.kanuni-datagrid-editor[type='checkbox'] {
2887
2997
  width: auto;
2888
2998
  height: auto;
@@ -3366,6 +3476,51 @@ input[type='checkbox'].kanuni-datagrid-edit-form-input {
3366
3476
  outline-offset: -1px;
3367
3477
  }
3368
3478
 
3479
+ /* The date and lookup editors in a form are the CELL editors (one control per
3480
+ column), whose look is an underline sized to a row. In a form that read as a
3481
+ different kind of field from its boxed neighbours (2026-10-19, content
3482
+ session), so here they take the form's box: on the date editor's wrapper,
3483
+ which holds the calendar button too, and on a lookup's input directly. */
3484
+ .kanuni-datagrid-root .kanuni-datagrid-edit-form-lookup > .kanuni-datagrid-editor,
3485
+ .kanuni-datagrid-edit-form-lookup > .kanuni-datagrid-date-editor {
3486
+ height: auto;
3487
+ padding: 4px 6px;
3488
+ border: 1px solid var(--dg-border-strong);
3489
+ border-radius: var(--dg-radius-control);
3490
+ background: var(--dg-surface);
3491
+ }
3492
+
3493
+ .kanuni-datagrid-root .kanuni-datagrid-edit-form-lookup > .kanuni-datagrid-date-editor > .kanuni-datagrid-editor {
3494
+ height: auto;
3495
+ padding: 0;
3496
+ border: none;
3497
+ }
3498
+
3499
+ .kanuni-datagrid-root .kanuni-datagrid-edit-form-lookup > .kanuni-datagrid-editor:focus,
3500
+ .kanuni-datagrid-edit-form-lookup > .kanuni-datagrid-date-editor:focus-within {
3501
+ outline: 2px solid var(--dg-primary);
3502
+ outline-offset: -1px;
3503
+ }
3504
+
3505
+ /* A field the user cannot change must not look like one they can.
3506
+ `editable: false` columns were drawn as disabled inputs with the same
3507
+ surface, border and text as the open ones: readers clicked them and nothing
3508
+ happened (2026-10-19, content session). Recessed surface, muted text, a
3509
+ lighter border and the not-allowed cursor — the value stays readable. */
3510
+ .kanuni-datagrid-edit-form-input:disabled,
3511
+ .kanuni-datagrid-root .kanuni-datagrid-edit-form-lookup > .kanuni-datagrid-editor:disabled,
3512
+ .kanuni-datagrid-edit-form-lookup > .kanuni-datagrid-date-editor:has(.kanuni-datagrid-editor:disabled) {
3513
+ border-color: var(--dg-border);
3514
+ background: var(--dg-surface-header);
3515
+ color: var(--dg-text-muted);
3516
+ cursor: not-allowed;
3517
+ }
3518
+
3519
+ .kanuni-datagrid-root .kanuni-datagrid-edit-form-lookup .kanuni-datagrid-date-editor .kanuni-datagrid-editor:disabled {
3520
+ color: var(--dg-text-muted);
3521
+ cursor: not-allowed;
3522
+ }
3523
+
3369
3524
  .kanuni-datagrid-edit-form-field[data-invalid] .kanuni-datagrid-edit-form-input {
3370
3525
  border-color: var(--dg-danger);
3371
3526
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanunilabs/datagrid-react",
3
- "version": "1.8.2",
3
+ "version": "1.8.4",
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.2"
60
+ "@kanunilabs/datagrid-core": "1.10.4"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "react": ">=18.0.0",