@natec/mef-dev-ui-kit 22.0.317 → 22.0.350

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.
@@ -1,3 +1,4 @@
1
+ @use '../../styles/cards-grid-theme' as grid-theme;
1
2
  @use '../../styles/vars.scss' as *;
2
3
  @use 'sass:color' as color;
3
4
 
@@ -203,7 +204,8 @@
203
204
  // ═════════════════════════════════════════════════════════════════════════
204
205
 
205
206
  .md-grid-body {
206
- padding: 8px;
207
+ // Columns already fill the viewport; horizontal padding would add overflow.
208
+ padding: 8px 0;
207
209
  background: $light-gray-3;
208
210
  }
209
211
 
@@ -250,6 +252,8 @@
250
252
  .md-grid-card {
251
253
  background: $white;
252
254
  border: 1px solid $light-gray-2;
255
+ // The host supplies the side borders; row borders must not widen columns.
256
+ border-inline-width: 0;
253
257
  border-radius: $default-border-size;
254
258
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
255
259
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
@@ -407,7 +411,7 @@
407
411
  // RESPONSIVE
408
412
  // ═════════════════════════════════════════════════════════════════════════
409
413
 
410
- @media (max-width: 768px) {
414
+ @media (max-width: 767.98px) {
411
415
  &.md-grid,
412
416
  .md-grid {
413
417
  font-size: 12px;
@@ -488,7 +492,7 @@
488
492
  }
489
493
 
490
494
  .md-grid-body {
491
- padding: 6px;
495
+ padding: 6px 0;
492
496
  }
493
497
 
494
498
  .md-grid-group-rows {
@@ -710,3 +714,190 @@
710
714
  }
711
715
  }
712
716
  }
717
+
718
+ @include grid-theme.dark-theme;
719
+
720
+ @include grid-theme.light-header;
721
+
722
+ // Bordered grids form a continuous table, including compact and zebra variants.
723
+ .md-grid-bordered.md-grid {
724
+ .md-grid-actions-toolbar {
725
+ padding: 4px 8px;
726
+ border: 0;
727
+ border-bottom: 1px solid var(--md-color-border, #{$light-gray-2});
728
+ border-radius: 0;
729
+ background: var(--md-color-surface, #{$white});
730
+
731
+ + .md-grid-scroll-container {
732
+ box-shadow: none;
733
+ border-radius: 0;
734
+ }
735
+
736
+ .md-grid-sizing-action {
737
+ min-height: 28px;
738
+ padding: 4px 8px;
739
+ font-size: 12px;
740
+ line-height: 20px;
741
+ color: var(--md-color-text-muted, #{$dark-gray-2});
742
+ background: transparent;
743
+ border: 0;
744
+ box-shadow: none;
745
+
746
+ &:hover {
747
+ color: var(--md-color-text, #{$black-color});
748
+ background: var(--md-color-surface-muted, #{$light-gray-3});
749
+ }
750
+ }
751
+ }
752
+
753
+ .md-grid-header .md-grid-resize-handle {
754
+ right: -1px;
755
+ width: 10px;
756
+
757
+ &::after {
758
+ inset: 0 0 0 auto;
759
+ width: 1px;
760
+ height: auto;
761
+ border-radius: 0;
762
+ background: transparent;
763
+ }
764
+
765
+ &:hover::after,
766
+ &:focus-visible::after,
767
+ &:active::after {
768
+ width: 2px;
769
+ background: var(--md-color-focus, #{$link});
770
+ }
771
+
772
+ &:focus-visible {
773
+ outline: none;
774
+ background: transparent;
775
+ }
776
+ }
777
+
778
+ .md-grid-header .md-grid-header-cell {
779
+ font-family: $font-header;
780
+ font-size: 14px;
781
+ font-weight: 300;
782
+ text-transform: uppercase;
783
+ letter-spacing: 0.5px;
784
+ border-right: 1px solid var(--md-color-border, #{$light-gray-2});
785
+
786
+ &:not(:first-child) {
787
+ border-left: 0;
788
+ }
789
+
790
+ &:last-child {
791
+ border-right: 0;
792
+ }
793
+ }
794
+
795
+ .md-grid-body {
796
+ padding: 0;
797
+ width: 100%;
798
+ }
799
+
800
+ .horizontal-scroll-container,
801
+ .md-grid-group-rows,
802
+ .md-grid-card {
803
+ min-width: 100%;
804
+ }
805
+
806
+ .md-grid-body,
807
+ .horizontal-scroll-container,
808
+ .md-grid-group-rows {
809
+ // Override the grid's inline card-spacing input for continuous table rows.
810
+ gap: 0 !important;
811
+ }
812
+
813
+ .md-grid-group,
814
+ .md-grid-group-header {
815
+ margin-bottom: 0;
816
+ }
817
+
818
+ .md-grid-group-header {
819
+ border-radius: 0;
820
+ }
821
+
822
+ .md-grid-card {
823
+ border: 0;
824
+ border-bottom: 1px solid var(--md-color-border, #{$light-gray-2});
825
+ border-radius: 0;
826
+ box-shadow: none;
827
+
828
+ &:hover {
829
+ box-shadow: none;
830
+ }
831
+ }
832
+
833
+ .md-grid-body > .md-grid-card:last-child,
834
+ .md-grid-group:last-child .md-grid-card:last-child {
835
+ border-bottom: 0;
836
+ }
837
+ }
838
+
839
+ // On phones each record becomes a labelled card instead of a squeezed table.
840
+ @media (max-width: 767.98px) {
841
+ .md-grid-bordered.md-grid {
842
+ border: 0;
843
+ background: transparent;
844
+ box-shadow: none;
845
+ overflow: visible;
846
+
847
+ .md-grid-actions-toolbar + .md-grid-scroll-container,
848
+ .md-grid-scroll-container {
849
+ border: 0;
850
+ border-radius: 0;
851
+ box-shadow: none;
852
+ background: transparent;
853
+ }
854
+
855
+ .md-grid-body {
856
+ padding: 6px;
857
+ background: transparent;
858
+ box-sizing: border-box;
859
+ }
860
+
861
+ .horizontal-scroll-container,
862
+ .md-grid-group-rows {
863
+ gap: 12px !important;
864
+ }
865
+
866
+ .md-grid-card,
867
+ .md-grid-card:hover,
868
+ .md-grid-body > .md-grid-card:last-child,
869
+ .md-grid-group:last-child .md-grid-card:last-child {
870
+ flex-direction: row;
871
+ flex-wrap: wrap;
872
+ min-width: 0;
873
+ border: 1px solid color-mix(in srgb, var(--md-color-border, #{$light-gray-2}) 55%, transparent);
874
+ border-radius: 8px;
875
+ background: var(--md-color-surface, #{$white});
876
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
877
+ }
878
+
879
+ .md-grid-cell {
880
+ padding: 8px 12px;
881
+ border-right: 0;
882
+ border-bottom: 1px solid var(--md-color-border, #{$light-gray-2});
883
+ max-height: none;
884
+ color: var(--md-color-text, #{$black-color});
885
+ }
886
+
887
+ .md-grid-data-cell {
888
+ grid-template-columns: minmax(90px, 34%) minmax(0, 1fr);
889
+ font-size: 14px;
890
+ }
891
+
892
+ .md-grid-column-actions-cell,
893
+ .md-grid-actions-cell {
894
+ padding: 6px 4px;
895
+ border: 0;
896
+ background: transparent;
897
+ }
898
+
899
+ .md-grid-last-action-cell { padding-right: 12px; }
900
+ .md-grid-mobile-label { color: var(--md-color-text-muted, #{$dark-gray-2}); }
901
+ .md-grid-cell-content { min-width: 0; }
902
+ }
903
+ }