@clayui/css 3.92.0 → 3.93.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.
Files changed (45) hide show
  1. package/lib/css/atlas.css +99 -1
  2. package/lib/css/atlas.css.map +1 -1
  3. package/lib/css/base.css +92 -1
  4. package/lib/css/base.css.map +1 -1
  5. package/lib/css/cadmin.css +127 -69
  6. package/lib/css/cadmin.css.map +1 -1
  7. package/lib/images/icons/icons.svg +1 -1
  8. package/package.json +2 -2
  9. package/src/scss/_license-text.scss +1 -1
  10. package/src/scss/cadmin/components/_drilldown.scss +1 -1
  11. package/src/scss/cadmin/components/_forms.scss +1 -1
  12. package/src/scss/cadmin/components/_input-groups.scss +2 -1
  13. package/src/scss/cadmin/components/_multi-step-nav.scss +3 -1
  14. package/src/scss/cadmin/components/_side-navigation.scss +2 -2
  15. package/src/scss/components/_alerts.scss +24 -22
  16. package/src/scss/components/_aspect-ratio.scss +33 -31
  17. package/src/scss/components/_badges.scss +28 -26
  18. package/src/scss/components/_buttons.scss +105 -97
  19. package/src/scss/components/_drilldown.scss +1 -1
  20. package/src/scss/components/_dropdowns.scss +10 -8
  21. package/src/scss/components/_forms.scss +12 -9
  22. package/src/scss/components/_input-groups.scss +2 -1
  23. package/src/scss/components/_labels.scss +48 -44
  24. package/src/scss/components/_list-group.scss +13 -11
  25. package/src/scss/components/_loaders.scss +22 -18
  26. package/src/scss/components/_modals.scss +4 -2
  27. package/src/scss/components/_multi-step-nav.scss +3 -1
  28. package/src/scss/components/_navs.scss +10 -8
  29. package/src/scss/components/_popovers.scss +33 -27
  30. package/src/scss/components/_progress-bars.scss +39 -33
  31. package/src/scss/components/_sheets.scss +39 -0
  32. package/src/scss/components/_side-navigation.scss +2 -2
  33. package/src/scss/components/_sidebar.scss +12 -10
  34. package/src/scss/components/_spinners.scss +20 -0
  35. package/src/scss/components/_stickers.scss +50 -46
  36. package/src/scss/components/_tables.scss +32 -30
  37. package/src/scss/components/_utilities-functional-important.scss +75 -63
  38. package/src/scss/functions/_global-functions.scss +25 -1
  39. package/src/scss/mixins/_alerts.scss +11 -9
  40. package/src/scss/mixins/_buttons.scss +60 -0
  41. package/src/scss/mixins/_dropdown-menu.scss +36 -0
  42. package/src/scss/mixins/_globals.scss +29 -1
  43. package/src/scss/mixins/_links.scss +9 -7
  44. package/src/scss/mixins/_transition.scss +7 -1
  45. package/src/scss/variables/_sheets.scss +17 -0
@@ -61,6 +61,10 @@
61
61
  animation: none;
62
62
  }
63
63
  }
64
+
65
+ .c-prefers-reduced-motion & {
66
+ animation: none;
67
+ }
64
68
  }
65
69
  }
66
70
 
@@ -122,40 +126,42 @@
122
126
  // Progress Variants
123
127
 
124
128
  @each $color, $value in $progress-palette {
125
- .progress-#{$color} {
126
- .progress-bar {
127
- $progress-bar: setter(map-get($value, progress-bar), ());
128
- $progress-bar: map-merge(
129
- $progress-bar,
130
- (
131
- background-color:
132
- setter(
133
- map-get($progress-bar, background-color),
134
- map-get($value, bar-bg)
135
- ),
136
- )
137
- );
138
-
139
- @include clay-css($progress-bar);
140
- }
129
+ @if not clay-is-map-unset($value) {
130
+ .progress-#{$color} {
131
+ .progress-bar {
132
+ $progress-bar: setter(map-get($value, progress-bar), ());
133
+ $progress-bar: map-merge(
134
+ $progress-bar,
135
+ (
136
+ background-color:
137
+ setter(
138
+ map-get($progress-bar, background-color),
139
+ map-get($value, bar-bg)
140
+ ),
141
+ )
142
+ );
143
+
144
+ @include clay-css($progress-bar);
145
+ }
141
146
 
142
- .progress-group-feedback {
143
- $progress-group-feedback: setter(
144
- map-get($value, progress-group-feedback),
145
- ()
146
- );
147
- $progress-group-feedback: map-merge(
148
- $progress-group-feedback,
149
- (
150
- color:
151
- setter(
152
- map-get($progress-group-feedback, color),
153
- map-get($value, group-feedback-color)
154
- ),
155
- )
156
- );
157
-
158
- @include clay-css($progress-group-feedback);
147
+ .progress-group-feedback {
148
+ $progress-group-feedback: setter(
149
+ map-get($value, progress-group-feedback),
150
+ ()
151
+ );
152
+ $progress-group-feedback: map-merge(
153
+ $progress-group-feedback,
154
+ (
155
+ color:
156
+ setter(
157
+ map-get($progress-group-feedback, color),
158
+ map-get($value, group-feedback-color)
159
+ ),
160
+ )
161
+ );
162
+
163
+ @include clay-css($progress-group-feedback);
164
+ }
159
165
  }
160
166
  }
161
167
  }
@@ -64,6 +64,45 @@
64
64
  }
65
65
  }
66
66
 
67
+ .sheet-row {
68
+ @include clay-css($sheet-row);
69
+
70
+ @if (map-get($sheet-row, media-breakpoint-up)) {
71
+ @each $breakpoint in map-keys(map-get($sheet-row, media-breakpoint-up))
72
+ {
73
+ $media-breakpoint-up: map-deep-get(
74
+ $sheet-row,
75
+ media-breakpoint-up,
76
+ $breakpoint
77
+ );
78
+
79
+ @if ($breakpoint) {
80
+ @include media-breakpoint-up($breakpoint) {
81
+ @include clay-css($media-breakpoint-up);
82
+ }
83
+ }
84
+ }
85
+ }
86
+
87
+ @if (map-get($sheet-row, media-breakpoint-down)) {
88
+ @each $breakpoint
89
+ in map-keys(map-get($sheet-row, media-breakpoint-down))
90
+ {
91
+ $media-breakpoint-down: map-deep-get(
92
+ $sheet-row,
93
+ media-breakpoint-down,
94
+ $breakpoint
95
+ );
96
+
97
+ @if ($breakpoint) {
98
+ @include media-breakpoint-down($breakpoint) {
99
+ @include clay-css($media-breakpoint-down);
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }
105
+
67
106
  .sheet-header {
68
107
  margin-bottom: $sheet-header-margin-bottom;
69
108
 
@@ -91,14 +91,14 @@
91
91
  .sidenav-content,
92
92
  .sidenav-menu,
93
93
  .sidenav-menu-slider {
94
- transition: $sidenav-transition;
94
+ @include transition($sidenav-transition);
95
95
  }
96
96
  }
97
97
 
98
98
  // Simple Sidenav Transition
99
99
 
100
100
  .sidenav-transition {
101
- transition: $sidenav-transition;
101
+ @include transition($sidenav-transition);
102
102
  }
103
103
 
104
104
  // Simple Sidenav
@@ -105,15 +105,17 @@
105
105
  // Sidebar Variants
106
106
 
107
107
  @each $color, $value in $sidebar-palette {
108
- $selector: if(
109
- starts-with($color, '.') or
110
- starts-with($color, '#') or
111
- starts-with($color, '%'),
112
- $color,
113
- str-insert($color, '.', 1)
114
- );
115
-
116
- #{$selector} {
117
- @include clay-sidebar-variant($value);
108
+ @if not clay-is-map-unset($value) {
109
+ $selector: if(
110
+ starts-with($color, '.') or
111
+ starts-with($color, '#') or
112
+ starts-with($color, '%'),
113
+ $color,
114
+ str-insert($color, '.', 1)
115
+ );
116
+
117
+ #{$selector} {
118
+ @include clay-sidebar-variant($value);
119
+ }
118
120
  }
119
121
  }
@@ -17,6 +17,16 @@
17
17
  height: $spinner-height;
18
18
  vertical-align: text-bottom;
19
19
  width: $spinner-width;
20
+
21
+ @if $enable-prefers-reduced-motion-media-query {
22
+ @media (prefers-reduced-motion: reduce) {
23
+ animation: none;
24
+ }
25
+ }
26
+
27
+ .c-prefers-reduced-motion & {
28
+ animation: none;
29
+ }
20
30
  }
21
31
 
22
32
  .spinner-border-sm {
@@ -45,6 +55,16 @@
45
55
  opacity: 0;
46
56
  vertical-align: text-bottom;
47
57
  width: $spinner-width;
58
+
59
+ @if $enable-prefers-reduced-motion-media-query {
60
+ @media (prefers-reduced-motion: reduce) {
61
+ animation: none;
62
+ }
63
+ }
64
+
65
+ .c-prefers-reduced-motion & {
66
+ animation: none;
67
+ }
48
68
  }
49
69
 
50
70
  .spinner-grow-sm {
@@ -54,31 +54,33 @@
54
54
  // Sticker Sizes
55
55
 
56
56
  @each $selector, $value in $sticker-sizes {
57
- $selector: if(
58
- starts-with($selector, '.') or
59
- starts-with($selector, '#') or
60
- starts-with($selector, '%'),
61
- $selector,
62
- str-insert($selector, '.', 1)
63
- );
64
-
65
- @if (starts-with($selector, '%') or map-get($value, extend)) {
66
- #{$selector} {
67
- @include clay-sticker-variant($value);
68
- }
69
- } @else {
70
- $placeholder: if(
71
- starts-with($selector, '.') or starts-with($selector, '#'),
72
- '%#{str-slice($selector, 2)}',
73
- '%#{$selector}'
57
+ @if not clay-is-map-unset($value) {
58
+ $selector: if(
59
+ starts-with($selector, '.') or
60
+ starts-with($selector, '#') or
61
+ starts-with($selector, '%'),
62
+ $selector,
63
+ str-insert($selector, '.', 1)
74
64
  );
75
65
 
76
- #{$placeholder} {
77
- @include clay-sticker-variant($value);
78
- }
79
-
80
- #{$selector} {
81
- @extend #{$placeholder} !optional;
66
+ @if (starts-with($selector, '%') or map-get($value, extend)) {
67
+ #{$selector} {
68
+ @include clay-sticker-variant($value);
69
+ }
70
+ } @else {
71
+ $placeholder: if(
72
+ starts-with($selector, '.') or starts-with($selector, '#'),
73
+ '%#{str-slice($selector, 2)}',
74
+ '%#{$selector}'
75
+ );
76
+
77
+ #{$placeholder} {
78
+ @include clay-sticker-variant($value);
79
+ }
80
+
81
+ #{$selector} {
82
+ @extend #{$placeholder} !optional;
83
+ }
82
84
  }
83
85
  }
84
86
  }
@@ -86,31 +88,33 @@
86
88
  // Sticker Variants
87
89
 
88
90
  @each $color, $value in $sticker-palette {
89
- $selector: if(
90
- starts-with($color, '.') or
91
- starts-with($color, '#') or
92
- starts-with($color, '%'),
93
- $color,
94
- str-insert($color, '.sticker-', 1)
95
- );
96
-
97
- @if (starts-with($color, '%') or map-get($value, extend)) {
98
- #{$selector} {
99
- @include clay-sticker-variant($value);
100
- }
101
- } @else {
102
- $placeholder: if(
103
- starts-with($color, '.') or starts-with($color, '#'),
104
- '%#{str-slice($color, 2)}',
105
- '%sticker-#{$color}'
91
+ @if not clay-is-map-unset($value) {
92
+ $selector: if(
93
+ starts-with($color, '.') or
94
+ starts-with($color, '#') or
95
+ starts-with($color, '%'),
96
+ $color,
97
+ str-insert($color, '.sticker-', 1)
106
98
  );
107
99
 
108
- #{$placeholder} {
109
- @include clay-sticker-variant($value);
110
- }
111
-
112
- #{$selector} {
113
- @extend #{$placeholder} !optional;
100
+ @if (starts-with($color, '%') or map-get($value, extend)) {
101
+ #{$selector} {
102
+ @include clay-sticker-variant($value);
103
+ }
104
+ } @else {
105
+ $placeholder: if(
106
+ starts-with($color, '.') or starts-with($color, '#'),
107
+ '%#{str-slice($color, 2)}',
108
+ '%sticker-#{$color}'
109
+ );
110
+
111
+ #{$placeholder} {
112
+ @include clay-sticker-variant($value);
113
+ }
114
+
115
+ #{$selector} {
116
+ @extend #{$placeholder} !optional;
117
+ }
114
118
  }
115
119
  }
116
120
  }
@@ -78,44 +78,46 @@ caption {
78
78
  // Table Row Backgrounds
79
79
 
80
80
  @each $color, $value in $table-row-theme-colors {
81
- .table {
82
- .table-#{$color} {
83
- $table-row: setter($value, ());
84
-
85
- &,
86
- > th,
87
- > td {
88
- @include clay-css($table-row);
89
-
90
- .table-title {
91
- @include clay-text-typography(
92
- map-get($table-row, table-title)
93
- );
81
+ @if not clay-is-map-unset($value) {
82
+ .table {
83
+ .table-#{$color} {
84
+ $table-row: setter($value, ());
85
+
86
+ &,
87
+ > th,
88
+ > td {
89
+ @include clay-css($table-row);
90
+
91
+ .table-title {
92
+ @include clay-text-typography(
93
+ map-get($table-row, table-title)
94
+ );
95
+ }
94
96
  }
95
- }
96
97
 
97
- th,
98
- td,
99
- thead th,
100
- tbody + tbody {
101
- border-color: map-get($table-row, border-color);
98
+ th,
99
+ td,
100
+ thead th,
101
+ tbody + tbody {
102
+ border-color: map-get($table-row, border-color);
103
+ }
102
104
  }
103
105
  }
104
- }
105
106
 
106
- // Hover states for `.table-hover`
107
- // Note: this is not available for cells or rows within `thead` or `tfoot`.
107
+ // Hover states for `.table-hover`
108
+ // Note: this is not available for cells or rows within `thead` or `tfoot`.
108
109
 
109
- .table-hover {
110
- $hover: setter(map-get($value, hover), ());
110
+ .table-hover {
111
+ $hover: setter(map-get($value, hover), ());
111
112
 
112
- .table-#{$color} {
113
- &:hover {
114
- @include clay-css($hover);
113
+ .table-#{$color} {
114
+ &:hover {
115
+ @include clay-css($hover);
115
116
 
116
- > td,
117
- > th {
118
- background-color: map-get($hover, background-color);
117
+ > td,
118
+ > th {
119
+ background-color: map-get($hover, background-color);
120
+ }
119
121
  }
120
122
  }
121
123
  }
@@ -25,31 +25,35 @@
25
25
  // Background
26
26
 
27
27
  @each $color, $value in $bg-theme-colors {
28
- $selector: if(
29
- starts-with($color, '.') or
30
- starts-with($color, '#') or
31
- starts-with($color, '%'),
32
- $color,
33
- str-insert($color, '.bg-', 1)
34
- );
35
-
36
- #{$selector} {
37
- @include clay-css($value);
38
- }
28
+ @if not clay-is-map-unset($value) {
29
+ $selector: if(
30
+ starts-with($color, '.') or
31
+ starts-with($color, '#') or
32
+ starts-with($color, '%'),
33
+ $color,
34
+ str-insert($color, '.bg-', 1)
35
+ );
36
+
37
+ #{$selector} {
38
+ @include clay-css($value);
39
+ }
39
40
 
40
- a#{$selector},
41
- button#{$selector} {
42
- &:hover,
43
- &:focus {
44
- @include clay-css(map-get($value, hover));
41
+ a#{$selector},
42
+ button#{$selector} {
43
+ &:hover,
44
+ &:focus {
45
+ @include clay-css(map-get($value, hover));
46
+ }
45
47
  }
46
48
  }
47
49
  }
48
50
 
49
51
  @if $enable-gradients {
50
52
  @each $color, $value in $bg-gradient-theme-colors {
51
- .bg-gradient-#{$color} {
52
- @include clay-css($value);
53
+ @if not clay-is-map-unset($value) {
54
+ .bg-gradient-#{$color} {
55
+ @include clay-css($value);
56
+ }
53
57
  }
54
58
  }
55
59
  }
@@ -97,16 +101,18 @@
97
101
  }
98
102
 
99
103
  @each $color, $value in $border-theme-colors {
100
- $selector: if(
101
- starts-with($color, '.') or
102
- starts-with($color, '#') or
103
- starts-with($color, '%'),
104
- $color,
105
- str-insert($color, '.border-', 1)
106
- );
107
-
108
- #{$selector} {
109
- @include clay-css($value);
104
+ @if not clay-is-map-unset($value) {
105
+ $selector: if(
106
+ starts-with($color, '.') or
107
+ starts-with($color, '#') or
108
+ starts-with($color, '%'),
109
+ $color,
110
+ str-insert($color, '.border-', 1)
111
+ );
112
+
113
+ #{$selector} {
114
+ @include clay-css($value);
115
+ }
110
116
  }
111
117
  }
112
118
 
@@ -732,16 +738,18 @@
732
738
  // Font Sizes
733
739
 
734
740
  @each $selector, $value in $font-sizes {
735
- $selector: if(
736
- starts-with($selector, '.') or
737
- starts-with($selector, '#') or
738
- starts-with($selector, '%'),
739
- $selector,
740
- str-insert($selector, '.', 1)
741
- );
742
-
743
- #{$selector} {
744
- @include clay-css($value);
741
+ @if not clay-is-map-unset($value) {
742
+ $selector: if(
743
+ starts-with($selector, '.') or
744
+ starts-with($selector, '#') or
745
+ starts-with($selector, '%'),
746
+ $selector,
747
+ str-insert($selector, '.', 1)
748
+ );
749
+
750
+ #{$selector} {
751
+ @include clay-css($value);
752
+ }
745
753
  }
746
754
  }
747
755
 
@@ -752,22 +760,24 @@
752
760
  }
753
761
 
754
762
  @each $color, $value in $text-theme-colors {
755
- $selector: if(
756
- starts-with($color, '.') or
757
- starts-with($color, '#') or
758
- starts-with($color, '%'),
759
- $color,
760
- str-insert($color, '.text-', 1)
761
- );
762
-
763
- #{$selector} {
764
- @include clay-css($value);
765
- }
763
+ @if not clay-is-map-unset($value) {
764
+ $selector: if(
765
+ starts-with($color, '.') or
766
+ starts-with($color, '#') or
767
+ starts-with($color, '%'),
768
+ $color,
769
+ str-insert($color, '.text-', 1)
770
+ );
771
+
772
+ #{$selector} {
773
+ @include clay-css($value);
774
+ }
766
775
 
767
- a#{$selector} {
768
- &:hover,
769
- &:focus {
770
- @include clay-css(map-get($value, hover));
776
+ a#{$selector} {
777
+ &:hover,
778
+ &:focus {
779
+ @include clay-css(map-get($value, hover));
780
+ }
771
781
  }
772
782
  }
773
783
  }
@@ -783,16 +793,18 @@
783
793
  }
784
794
 
785
795
  @each $key, $value in $text-decorations {
786
- $selector: if(
787
- starts-with($key, '.') or
788
- starts-with($key, '#') or
789
- starts-with($key, '%'),
790
- $key,
791
- str-insert($key, '.', 1)
792
- );
793
-
794
- #{$selector} {
795
- @include clay-link($value);
796
+ @if not clay-is-map-unset($value) {
797
+ $selector: if(
798
+ starts-with($key, '.') or
799
+ starts-with($key, '#') or
800
+ starts-with($key, '%'),
801
+ $key,
802
+ str-insert($key, '.', 1)
803
+ );
804
+
805
+ #{$selector} {
806
+ @include clay-link($value);
807
+ }
796
808
  }
797
809
  }
798
810
 
@@ -8,6 +8,13 @@
8
8
  @import '_lx-icons-generated.scss';
9
9
  @import '_type-conversion-functions.scss';
10
10
 
11
+ /// A function that checks if the value contains the key word `c-unset` or `clay-unset`
12
+ /// @param {Any} $value The value to check
13
+
14
+ @function clay-is-map-unset($value) {
15
+ @return if(($value == c-unset) or ($value == clay-unset), true, false);
16
+ }
17
+
11
18
  /// A helper function that calculates text-indent of data-label-on and data-label-off in a `.toggle-switch`.
12
19
  /// @param {Number} $toggle-switch-width - Width of switch bar
13
20
  /// @param {Number} $toggle-switch-padding - Space between button and bar
@@ -52,6 +59,10 @@
52
59
  /// @param {Map, Null} $map2[()]
53
60
 
54
61
  @function map-deep-merge($map1: (), $map2: ()) {
62
+ // @if ($map1 == c-unset or $map2 == c-unset) or ($map1 == clay-unset or $map2 == clay-unset) {
63
+ // @return null;
64
+ // }
65
+
55
66
  @if (type-of($map1) == 'list' and length($map1) == 0) or
56
67
  (type-of($map1) == 'null')
57
68
  {
@@ -140,7 +151,20 @@
140
151
  @return nth($selector-list, length($selector-list));
141
152
  }
142
153
 
143
- /// A function that inserts a CSS selector at a specific place (e.g., clay-insert-at('.container', '#content ', '#wrapper .container .row')) will return `#wrapper #content .container .row`.
154
+ /// A function that appends to a specific place in a CSS selector (e.g., clay-insert-after('.container ', '.myselector ', '.container .row .col-md-12')) will return `.container .myselector .row .col-md-12`.
155
+ /// @param {String} $location - The string to target
156
+ /// @param {String} $insert - The string to insert after the location
157
+ /// @param {String} $selector - The full selector
158
+
159
+ @function clay-insert-after($location, $insert, $selector: &) {
160
+ @return clay-str-replace(
161
+ '#{$selector}',
162
+ '#{$location}',
163
+ '#{$location}#{$insert}'
164
+ );
165
+ }
166
+
167
+ /// A function that prepends to a specific place in a CSS selector (e.g., clay-insert-before('.container ', '.myselector ', '.container .row .col-md-12')) will return `.myselector .container .row .col-md-12`.
144
168
  /// @param {String} $location - The string to target
145
169
  /// @param {String} $insert - The string to insert before the location
146
170
  /// @param {String} $selector - The full selector
@@ -236,15 +236,17 @@
236
236
  }
237
237
 
238
238
  @each $key, $properties in map-get($map, custom-selectors) {
239
- @if ($key) {
240
- $selector: if(
241
- starts-with($key, '.') or starts-with($key, '#'),
242
- $key,
243
- str-insert($key, '.', 1)
244
- );
245
-
246
- #{$selector} {
247
- @include clay-button-variant($properties);
239
+ @if not clay-is-map-unset($properties) {
240
+ @if ($key) {
241
+ $selector: if(
242
+ starts-with($key, '.') or starts-with($key, '#'),
243
+ $key,
244
+ str-insert($key, '.', 1)
245
+ );
246
+
247
+ #{$selector} {
248
+ @include clay-button-variant($properties);
249
+ }
248
250
  }
249
251
  }
250
252
  }