@visns-studio/visns-components 6.16.1 → 6.16.2

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/package.json CHANGED
@@ -95,7 +95,7 @@
95
95
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
96
96
  },
97
97
  "name": "@visns-studio/visns-components",
98
- "version": "6.16.1",
98
+ "version": "6.16.2",
99
99
  "description": "Various packages to assist in the development of our Custom Applications.",
100
100
  "main": "src/index.js",
101
101
  "files": [
@@ -180,6 +180,19 @@ const NativeDateInput = ({
180
180
  {...rest}
181
181
  ref={inputRef}
182
182
  type={withTime ? 'datetime-local' : 'date'}
183
+ // The picker glyph is hidden in the grid (it cost the year); a
184
+ // click anywhere in the field opens the picker instead, where the
185
+ // browser supports it. Typing still works.
186
+ onClick={(event) => {
187
+ if (event.currentTarget.disabled) return;
188
+
189
+ try {
190
+ event.currentTarget.showPicker?.();
191
+ } catch (error) {
192
+ // Some browsers only allow showPicker from a user gesture
193
+ // in certain contexts; the field still accepts typing.
194
+ }
195
+ }}
183
196
  className="visns-native-date-filter__input"
184
197
  value={inputValue}
185
198
  disabled={disabled}
@@ -485,17 +485,22 @@ body.tablet-mode .InovuaReactDataGrid__cell.cell-word-wrap > div {
485
485
  min-width: 0;
486
486
  height: auto;
487
487
  margin: 0;
488
- padding: 0 2px 0 6px;
488
+ /* Fill the 32px row the theme pins the filter to, and centre the text in
489
+ it: Chrome lays the date segments out in an internal box that otherwise
490
+ sits high in a taller parent. */
491
+ height: 100%;
492
+ align-self: stretch;
493
+ padding: 0 4px;
489
494
  border: none;
490
495
  outline: none;
491
496
  background: none;
492
497
  color: inherit;
493
498
  font-family: inherit;
494
- /* A notch under the grid's 14px: the locale mask is ten characters and
495
- the default filter row is narrow. */
496
- font-size: 13px;
499
+ /* Two notches under the grid's 14px: the locale mask is ten characters
500
+ plus Chrome's segment padding, and the filter row is narrow. */
501
+ font-size: 12px;
497
502
  letter-spacing: -0.01em;
498
- line-height: 1;
503
+ line-height: normal;
499
504
  font-variant-numeric: tabular-nums;
500
505
  -webkit-appearance: none;
501
506
  appearance: none;
@@ -509,32 +514,15 @@ body.tablet-mode .InovuaReactDataGrid__cell.cell-word-wrap > div {
509
514
  color: rgba(85, 94, 104, 0.7);
510
515
  }
511
516
 
512
- /* The calendar glyph IS how the picker opens on desktop — keep it, just
513
- shrink it into the 32px row. */
517
+ /* No calendar glyph in the grid: it cost the year in a narrow column, and a
518
+ click anywhere in the field opens the picker (showPicker) instead. */
514
519
  .visns-native-date-filter__input::-webkit-calendar-picker-indicator {
515
- margin: 0;
516
- padding: 0 2px;
517
- opacity: 0.55;
518
- cursor: pointer;
519
- }
520
-
521
- .visns-native-date-filter__input::-webkit-calendar-picker-indicator:hover {
522
- opacity: 1;
520
+ display: none;
523
521
  }
524
522
 
525
523
  /* In a narrow column the glyph costs the last two digits of the year; the
526
524
  field still opens the picker on click/Space, so drop the glyph first and the
527
525
  clear button only when there is really no room. */
528
- @container (max-width: 128px) {
529
- .visns-native-date-filter__input::-webkit-calendar-picker-indicator {
530
- display: none;
531
- }
532
-
533
- .visns-native-date-filter__input {
534
- padding-right: 0;
535
- }
536
- }
537
-
538
526
  @container (max-width: 104px) {
539
527
  .visns-native-date-filter__clear {
540
528
  display: none;
@@ -550,8 +538,7 @@ body.tablet-mode .InovuaReactDataGrid__cell.cell-word-wrap > div {
550
538
  }
551
539
 
552
540
  .visns-native-date-filter__input::-moz-calendar-picker-indicator {
553
- opacity: 0.55;
554
- cursor: pointer;
541
+ display: none;
555
542
  }
556
543
 
557
544
  .visns-native-date-filter__clear {