@visns-studio/visns-components 6.4.3 → 6.5.0

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.
@@ -448,3 +448,86 @@
448
448
  width: 300px;
449
449
  }
450
450
  }
451
+
452
+ /* ----------------------------------------------------------------------------
453
+ Mounted in the sidebar rail
454
+ ----------------------------------------------------------------------------
455
+ A project can opt its navigation into `actionsPlacement: 'sidebar'`, which
456
+ pins the account actions to the bottom of the rail instead of the content
457
+ header. The rail's block advertises itself with `data-nav-actions="sidebar"`
458
+ (see Navigation.jsx / Navigation.module.scss `.rail-actions`), which is all
459
+ this file needs to know.
460
+
461
+ Two things change. The trigger is a full-width row rather than a 36px chip,
462
+ so it carries a visible label — published by the row as `--nav-action-label`
463
+ because the component draws its own trigger and takes no label of its own.
464
+ And the panel anchors to the row's right edge: `top: 100%; right: 0` would
465
+ drop it below the foot of the viewport and off the left of the screen.
466
+
467
+ The row's own padding, colour and radius come from `.rail-actions`; only
468
+ what this file would otherwise force back is restated here.
469
+ ------------------------------------------------------------------------- */
470
+ [data-nav-actions='sidebar'] {
471
+ .notificationTrigger {
472
+ justify-content: flex-start;
473
+ /* The chip was a fixed 40px square; a row is as tall as the padding
474
+ the rail gives it, which is what the rows beside it measure. */
475
+ height: auto;
476
+
477
+ // The label. `content` reads the row's custom property; the fallback
478
+ // covers a settings entry that never carried a label — in the header
479
+ // the bell was an icon with a tooltip, so most don't.
480
+ &::after {
481
+ content: var(--nav-action-label, 'Notifications');
482
+ flex: 1 1 auto;
483
+ min-width: 0;
484
+ text-align: left;
485
+ }
486
+
487
+ // The chip's lift read as a stray button in a list of rows. The
488
+ // focus ring is left alone — it is the only keyboard affordance
489
+ // these rows have.
490
+ &:hover,
491
+ &:focus,
492
+ &:active {
493
+ transform: none;
494
+ }
495
+
496
+ &:hover {
497
+ background-color: rgba(var(--tertiary-color-rgb), 0.05);
498
+ color: var(--secondary-color);
499
+ }
500
+ }
501
+
502
+ // Was pinned to the corner of a round chip. On a wide row it belongs at
503
+ // the end of the line, where the eye lands after the label.
504
+ .badge {
505
+ top: 50%;
506
+ right: 14px;
507
+ transform: translateY(-50%);
508
+ }
509
+
510
+ // Beside the rail, bottom-aligned with the row that opened it.
511
+ .dropdownWrapper {
512
+ top: auto;
513
+ right: auto;
514
+ bottom: 0;
515
+ left: calc(100% + 10px);
516
+ margin-top: 0;
517
+ }
518
+
519
+ @media (max-width: 1024px) {
520
+ // Inside the drawer there is nothing to the right, so the panel
521
+ // opens upward from the row.
522
+ .dropdownWrapper {
523
+ left: 0;
524
+ bottom: calc(100% + 8px);
525
+ }
526
+
527
+ // Keeps the panel inside a phone's viewport when the list is long —
528
+ // it grows from the foot of the drawer towards the header.
529
+ .notiscrollwrap {
530
+ max-height: 40vh;
531
+ }
532
+ }
533
+ }
@@ -24,6 +24,28 @@
24
24
  z-index: 999;
25
25
  }
26
26
 
27
+ /* Mounted in the sidebar rail — `navConfig.actionsPlacement: 'sidebar'`.
28
+ The list is sized and shunted 470px left to hang off a chip at the top
29
+ right of the header; from a rail at the left edge that puts it off-screen.
30
+ The rail's action block advertises itself with `data-nav-actions`, which is
31
+ all this file needs to know. See Navigation.module.scss `.rail-actions`. */
32
+ [data-nav-actions='sidebar'] .notibox {
33
+ width: min(550px, calc(100vw - var(--sidebar-width) - 24px));
34
+ max-height: 60vh;
35
+ transform: none;
36
+ left: calc(100% + 10px);
37
+ bottom: 0;
38
+ }
39
+
40
+ @media (max-width: 1024px) {
41
+ /* Inside the drawer there is nothing to the right of the row. */
42
+ [data-nav-actions='sidebar'] .notibox {
43
+ width: min(550px, calc(100vw - 24px));
44
+ left: 0;
45
+ bottom: calc(100% + 8px);
46
+ }
47
+ }
48
+
27
49
  .notibox-item {
28
50
  width: 100%;
29
51
  display: block;
@@ -510,3 +510,144 @@ body.tablet-mode .InovuaReactDataGrid__cell.cell-word-wrap > div {
510
510
  .InovuaReactDataGrid__group-toolbar {
511
511
  display: none !important;
512
512
  }
513
+
514
+ /* =========================================================================
515
+ Native date column filters — see columns/NativeDateFilterEditor.jsx
516
+
517
+ The editor replaces Inovua's popup-calendar DateFilter with the platform's
518
+ own picker. Everything here exists to make an `<input type="date">` sit in
519
+ the filter row at exactly the size and weight of its text / dropdown
520
+ neighbours, whose look comes from the toolkit's own
521
+ `.inovua-react-toolkit-text-input--theme-default-light` rule (32px tall,
522
+ 1px #cdcecd border, 14px #555e68 text).
523
+
524
+ Height itself is not set here: the wrapper carries the grid's own
525
+ `.InovuaReactDataGrid__column-header__filter` class, which the datagrid
526
+ theme already pins to min/max-height 32px alongside every other filter.
527
+
528
+ Note: `global.css` excludes `.visns-native-date-filter__input` from the
529
+ app-wide `input[type]` rule, whose 1rem padding would otherwise burst the
530
+ 32px filter row.
531
+ ========================================================================= */
532
+ .visns-native-date-filter {
533
+ position: relative;
534
+ display: flex;
535
+ /* stretch, not center: the input has to fill the 32px the theme pins the
536
+ filter to, or the clickable area is smaller than the box it draws. */
537
+ align-items: stretch;
538
+ box-sizing: border-box;
539
+ width: 100%;
540
+ min-width: 0;
541
+ overflow: hidden;
542
+ border: 1px solid #cdcecd;
543
+ border-radius: 1px;
544
+ background: #fff;
545
+ color: #555e68;
546
+ font-size: 14px;
547
+ transition: border 0.2s, box-shadow 0.2s;
548
+ }
549
+
550
+ .visns-native-date-filter:hover {
551
+ border-color: #7986cb;
552
+ }
553
+
554
+ .visns-native-date-filter:focus-within {
555
+ border-color: #7986cb;
556
+ box-shadow: 0 0 0 2px rgba(121, 134, 203, 0.4);
557
+ }
558
+
559
+ .visns-native-date-filter--disabled {
560
+ opacity: 0.5;
561
+ }
562
+
563
+ .visns-native-date-filter--disabled:hover {
564
+ border-color: #cdcecd;
565
+ }
566
+
567
+ .visns-native-date-filter__input {
568
+ flex: 1 1 auto;
569
+ box-sizing: border-box;
570
+ width: 100%;
571
+ min-width: 0;
572
+ height: auto;
573
+ margin: 0;
574
+ padding: 0 2px 0 8px;
575
+ border: none;
576
+ outline: none;
577
+ background: none;
578
+ color: inherit;
579
+ font-family: inherit;
580
+ font-size: inherit;
581
+ line-height: 1;
582
+ -webkit-appearance: none;
583
+ appearance: none;
584
+ }
585
+
586
+ /* An empty native date input renders its locale mask (dd/mm/yyyy) at full
587
+ contrast, which reads as a value; mute it to the same placeholder weight
588
+ the toolkit's text filters use. (`:invalid` cannot express this — an empty
589
+ optional date input is valid — so the editor sets the modifier itself.) */
590
+ .visns-native-date-filter--empty .visns-native-date-filter__input {
591
+ color: rgba(85, 94, 104, 0.7);
592
+ }
593
+
594
+ /* The calendar glyph IS how the picker opens on desktop — keep it, just
595
+ shrink it into the 32px row. */
596
+ .visns-native-date-filter__input::-webkit-calendar-picker-indicator {
597
+ margin: 0;
598
+ padding: 0 2px;
599
+ opacity: 0.55;
600
+ cursor: pointer;
601
+ }
602
+
603
+ .visns-native-date-filter__input::-webkit-calendar-picker-indicator:hover {
604
+ opacity: 1;
605
+ }
606
+
607
+ /* Browser-supplied clear / spin affordances are replaced by our own button,
608
+ which is consistent across engines. */
609
+ .visns-native-date-filter__input::-webkit-clear-button,
610
+ .visns-native-date-filter__input::-webkit-inner-spin-button {
611
+ display: none;
612
+ -webkit-appearance: none;
613
+ }
614
+
615
+ .visns-native-date-filter__input::-moz-calendar-picker-indicator {
616
+ opacity: 0.55;
617
+ cursor: pointer;
618
+ }
619
+
620
+ .visns-native-date-filter__clear {
621
+ flex: none;
622
+ align-self: center;
623
+ display: flex;
624
+ align-items: center;
625
+ justify-content: center;
626
+ width: 18px;
627
+ height: 18px;
628
+ margin: 0 4px 0 0;
629
+ padding: 0;
630
+ border: none;
631
+ border-radius: 50%;
632
+ background: transparent;
633
+ color: #99a1aa;
634
+ cursor: pointer;
635
+ outline: none;
636
+ }
637
+
638
+ .visns-native-date-filter__clear:hover,
639
+ .visns-native-date-filter__clear:focus {
640
+ color: #555e68;
641
+ }
642
+
643
+ /* inrange / notinrange: two of the same input either side of the theme's
644
+ own separator. */
645
+ .visns-native-date-filter__range {
646
+ flex: 1;
647
+ min-width: 0;
648
+ align-items: center;
649
+ }
650
+
651
+ .visns-native-date-filter__range .visns-native-date-filter {
652
+ flex: 1 1 0;
653
+ }
@@ -245,7 +245,9 @@ input[type]:not([type='search']):not([type='url']):not([type='hidden']):not(
245
245
  .inovua-react-toolkit-text-input__input
246
246
  ):not(.inovua-react-toolkit-numeric-input__input):not(
247
247
  .variable-inserter-search-input
248
- ):not(.react-datepicker__month-select):not(.react-datepicker__year-select) {
248
+ ):not(.react-datepicker__month-select):not(
249
+ .react-datepicker__year-select
250
+ ):not(.visns-native-date-filter__input) {
249
251
  background: white;
250
252
  border-radius: var(--br);
251
253
  border: 1px solid rgba(var(--paragraph-color-rgb), 0.15);
package/src/index.js CHANGED
@@ -38,6 +38,7 @@ import AudioPlayer from './components/controls/AudioPlayer';
38
38
  import GalleryModal from './components/modals/GalleryModal';
39
39
  import ImageModal from './components/ImageModal';
40
40
  import DatePickerPortal from './components/utils/DatePickerPortal';
41
+ import NativeDateFilterEditor from './components/columns/NativeDateFilterEditor';
41
42
  import ImportWizardModal from './components/ImportWizardModal';
42
43
  export * from './components/columns/ColumnRenderers.jsx';
43
44
 
@@ -147,6 +148,7 @@ export {
147
148
  MergeEntity,
148
149
  MultiSelect,
149
150
  MultiCheckbox,
151
+ NativeDateFilterEditor,
150
152
  Navigation,
151
153
  Notification,
152
154
  NotificationList,