@clayui/css 3.92.0 → 3.94.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 (51) hide show
  1. package/lib/css/atlas.css +258 -34
  2. package/lib/css/atlas.css.map +1 -1
  3. package/lib/css/base.css +127 -1
  4. package/lib/css/base.css.map +1 -1
  5. package/lib/css/cadmin.css +157 -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/atlas/variables/_custom-forms.scss +4 -5
  11. package/src/scss/atlas/variables/_menubar.scss +57 -17
  12. package/src/scss/atlas/variables/_pagination.scss +78 -5
  13. package/src/scss/cadmin/components/_drilldown.scss +1 -1
  14. package/src/scss/cadmin/components/_forms.scss +1 -1
  15. package/src/scss/cadmin/components/_input-groups.scss +2 -1
  16. package/src/scss/cadmin/components/_multi-step-nav.scss +3 -1
  17. package/src/scss/cadmin/components/_side-navigation.scss +2 -2
  18. package/src/scss/cadmin/components/_utilities-functional-important.scss +4 -0
  19. package/src/scss/cadmin/variables/_utilities.scss +35 -0
  20. package/src/scss/components/_alerts.scss +24 -22
  21. package/src/scss/components/_aspect-ratio.scss +33 -31
  22. package/src/scss/components/_badges.scss +28 -26
  23. package/src/scss/components/_buttons.scss +105 -97
  24. package/src/scss/components/_drilldown.scss +1 -1
  25. package/src/scss/components/_dropdowns.scss +10 -8
  26. package/src/scss/components/_forms.scss +12 -9
  27. package/src/scss/components/_input-groups.scss +2 -1
  28. package/src/scss/components/_labels.scss +48 -44
  29. package/src/scss/components/_list-group.scss +13 -11
  30. package/src/scss/components/_loaders.scss +22 -18
  31. package/src/scss/components/_modals.scss +4 -2
  32. package/src/scss/components/_multi-step-nav.scss +3 -1
  33. package/src/scss/components/_navs.scss +10 -8
  34. package/src/scss/components/_popovers.scss +33 -27
  35. package/src/scss/components/_progress-bars.scss +39 -33
  36. package/src/scss/components/_sheets.scss +39 -0
  37. package/src/scss/components/_side-navigation.scss +2 -2
  38. package/src/scss/components/_sidebar.scss +12 -10
  39. package/src/scss/components/_spinners.scss +20 -0
  40. package/src/scss/components/_stickers.scss +50 -46
  41. package/src/scss/components/_tables.scss +32 -30
  42. package/src/scss/components/_utilities-functional-important.scss +79 -63
  43. package/src/scss/functions/_global-functions.scss +25 -1
  44. package/src/scss/mixins/_alerts.scss +11 -9
  45. package/src/scss/mixins/_buttons.scss +60 -0
  46. package/src/scss/mixins/_dropdown-menu.scss +36 -0
  47. package/src/scss/mixins/_globals.scss +83 -1
  48. package/src/scss/mixins/_links.scss +9 -7
  49. package/src/scss/mixins/_transition.scss +15 -1
  50. package/src/scss/variables/_sheets.scss +17 -0
  51. package/src/scss/variables/_utilities.scss +35 -0
@@ -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
 
@@ -184,6 +190,10 @@
184
190
  display: none !important;
185
191
  }
186
192
 
193
+ // Display C Reduced Motion
194
+
195
+ @include clay-map-to-css($displays-c-prefers-reduced-motion);
196
+
187
197
  // Display Print
188
198
 
189
199
  @media print {
@@ -732,16 +742,18 @@
732
742
  // Font Sizes
733
743
 
734
744
  @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);
745
+ @if not clay-is-map-unset($value) {
746
+ $selector: if(
747
+ starts-with($selector, '.') or
748
+ starts-with($selector, '#') or
749
+ starts-with($selector, '%'),
750
+ $selector,
751
+ str-insert($selector, '.', 1)
752
+ );
753
+
754
+ #{$selector} {
755
+ @include clay-css($value);
756
+ }
745
757
  }
746
758
  }
747
759
 
@@ -752,22 +764,24 @@
752
764
  }
753
765
 
754
766
  @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
- }
767
+ @if not clay-is-map-unset($value) {
768
+ $selector: if(
769
+ starts-with($color, '.') or
770
+ starts-with($color, '#') or
771
+ starts-with($color, '%'),
772
+ $color,
773
+ str-insert($color, '.text-', 1)
774
+ );
775
+
776
+ #{$selector} {
777
+ @include clay-css($value);
778
+ }
766
779
 
767
- a#{$selector} {
768
- &:hover,
769
- &:focus {
770
- @include clay-css(map-get($value, hover));
780
+ a#{$selector} {
781
+ &:hover,
782
+ &:focus {
783
+ @include clay-css(map-get($value, hover));
784
+ }
771
785
  }
772
786
  }
773
787
  }
@@ -783,16 +797,18 @@
783
797
  }
784
798
 
785
799
  @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);
800
+ @if not clay-is-map-unset($value) {
801
+ $selector: if(
802
+ starts-with($key, '.') or
803
+ starts-with($key, '#') or
804
+ starts-with($key, '%'),
805
+ $key,
806
+ str-insert($key, '.', 1)
807
+ );
808
+
809
+ #{$selector} {
810
+ @include clay-link($value);
811
+ }
796
812
  }
797
813
  }
798
814
 
@@ -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
  }
@@ -616,6 +616,66 @@
616
616
  @include clay-css(map-get($map, after));
617
617
  }
618
618
 
619
+ &:link {
620
+ $_link: setter(map-get($map, link), ());
621
+
622
+ @include clay-css($_link);
623
+
624
+ &::before {
625
+ @include clay-css(map-get($_link, before));
626
+ }
627
+
628
+ &::after {
629
+ @include clay-css(map-get($_link, after));
630
+ }
631
+
632
+ .inline-item {
633
+ @include clay-css(map-get($_link, inline-item));
634
+ }
635
+
636
+ .inline-item-before {
637
+ @include clay-css(map-get($_link, inline-item-before));
638
+ }
639
+
640
+ .inline-item-middle {
641
+ @include clay-css(map-get($_link, inline-item-middle));
642
+ }
643
+
644
+ .inline-item-after {
645
+ @include clay-css(map-get($_link, inline-item-after));
646
+ }
647
+ }
648
+
649
+ &:visited {
650
+ $_visited: setter(map-get($map, visited), ());
651
+
652
+ @include clay-css($_visited);
653
+
654
+ &::before {
655
+ @include clay-css(map-get($_visited, before));
656
+ }
657
+
658
+ &::after {
659
+ @include clay-css(map-get($_visited, after));
660
+ }
661
+
662
+ .inline-item {
663
+ @include clay-css(map-get($_visited, inline-item));
664
+ }
665
+
666
+ .inline-item-before {
667
+ @include clay-css(map-get($_visited, inline-item-before));
668
+ }
669
+
670
+ .inline-item-middle {
671
+ @include clay-css(map-get($_visited, inline-item-middle));
672
+ }
673
+
674
+ .inline-item-after {
675
+ @include clay-css(map-get($_visited, inline-item-after));
676
+ }
677
+ }
678
+
619
679
  &:hover {
620
680
  @include clay-css($hover);
621
681
 
@@ -549,6 +549,42 @@
549
549
  @if ($enabled) {
550
550
  @include clay-css($base);
551
551
 
552
+ &:link {
553
+ $_link: setter(map-get($map, link), ());
554
+
555
+ @include clay-css($_link);
556
+
557
+ &::before {
558
+ @include clay-css(map-get($_link, before));
559
+ }
560
+
561
+ &::after {
562
+ @include clay-css(map-get($_link, after));
563
+ }
564
+
565
+ .c-kbd-inline {
566
+ @include clay-css(map-get($_link, c-kbd-inline));
567
+ }
568
+ }
569
+
570
+ &:visited {
571
+ $_visited: setter(map-get($map, visited), ());
572
+
573
+ @include clay-css($_visited);
574
+
575
+ &::before {
576
+ @include clay-css(map-get($_visited, before));
577
+ }
578
+
579
+ &::after {
580
+ @include clay-css(map-get($_visited, after));
581
+ }
582
+
583
+ .c-kbd-inline {
584
+ @include clay-css(map-get($_visited, c-kbd-inline));
585
+ }
586
+ }
587
+
552
588
  &:hover,
553
589
  &.hover {
554
590
  @include clay-css($hover);
@@ -260,6 +260,30 @@
260
260
  }
261
261
 
262
262
  appearance: $value;
263
+ } @else if ($key == 'animation') {
264
+ animation: $value;
265
+
266
+ @if ($value != 'none' and $value != null) {
267
+ @at-root {
268
+ $selector: '.c-prefers-reduced-motion &';
269
+
270
+ @if (variable-exists(cadmin-selector)) {
271
+ $selector: clay-insert-after(
272
+ '.cadmin ',
273
+ '.c-prefers-reduced-motion '
274
+ );
275
+ $selector: clay-insert-after(
276
+ '.cadmin.',
277
+ 'c-prefers-reduced-motion.',
278
+ $selector
279
+ );
280
+ }
281
+
282
+ #{$selector} {
283
+ animation: none;
284
+ }
285
+ }
286
+ }
263
287
  } @else if ($key == 'content') {
264
288
  content: $value;
265
289
  } @else if ($key == 'word-wrap') {
@@ -277,7 +301,21 @@
277
301
  }
278
302
 
279
303
  @at-root {
280
- .c-prefers-reduced-motion & {
304
+ $selector: '.c-prefers-reduced-motion &';
305
+
306
+ @if (variable-exists(cadmin-selector)) {
307
+ $selector: clay-insert-after(
308
+ '.cadmin ',
309
+ '.c-prefers-reduced-motion '
310
+ );
311
+ $selector: clay-insert-after(
312
+ '.cadmin.',
313
+ 'c-prefers-reduced-motion.',
314
+ $selector
315
+ );
316
+ }
317
+
318
+ #{$selector} {
281
319
  transition: none;
282
320
  }
283
321
  }
@@ -296,3 +334,47 @@
296
334
  }
297
335
  }
298
336
  }
337
+
338
+ /// A mixin that outputs CSS based on the structure of a Sass map.
339
+
340
+ @mixin clay-map-to-css($map) {
341
+ @each $key, $value in $map {
342
+ @if not clay-is-map-unset($value) {
343
+ @each $nestedKey, $nestedValue in $value {
344
+ @if (type-of($nestedValue) == 'map') {
345
+ $parentSelector: if(
346
+ starts-with($key, '.') or
347
+ starts-with($key, '#') or
348
+ starts-with($key, '@'),
349
+ $key,
350
+ str-insert($key, '.', 1)
351
+ );
352
+
353
+ $nestedMap: (#{$nestedKey}: $nestedValue);
354
+
355
+ @if (starts-with($parentSelector, '@media ')) {
356
+ @media #{clay-str-replace('#{$parentSelector}', '@media ', '')} {
357
+ @include clay-map-to-css($nestedMap);
358
+ }
359
+ } @else {
360
+ #{$parentSelector} {
361
+ @include clay-map-to-css($nestedMap);
362
+ }
363
+ }
364
+ } @else {
365
+ $selector: if(
366
+ starts-with($key, '.') or
367
+ starts-with($key, '#') or
368
+ starts-with($key, '@'),
369
+ $key,
370
+ str-insert($key, '.', 1)
371
+ );
372
+
373
+ #{$selector} {
374
+ @include clay-css($value);
375
+ }
376
+ }
377
+ }
378
+ }
379
+ }
380
+ }
@@ -852,14 +852,16 @@
852
852
 
853
853
  @if ($c-link-variants) {
854
854
  @each $key, $value in $c-link-variants {
855
- $selector: if(
856
- starts-with($key, '.') or starts-with($key, '#'),
857
- $key,
858
- str-insert($key, '.', 1)
859
- );
855
+ @if not clay-is-map-unset($value) {
856
+ $selector: if(
857
+ starts-with($key, '.') or starts-with($key, '#'),
858
+ $key,
859
+ str-insert($key, '.', 1)
860
+ );
860
861
 
861
- &#{$selector} {
862
- @include clay-link($value);
862
+ &#{$selector} {
863
+ @include clay-link($value);
864
+ }
863
865
  }
864
866
  }
865
867
  }
@@ -34,7 +34,21 @@
34
34
  }
35
35
 
36
36
  @at-root {
37
- .c-prefers-reduced-motion & {
37
+ $selector: '.c-prefers-reduced-motion &';
38
+
39
+ @if (variable-exists(cadmin-selector)) {
40
+ $selector: clay-insert-after(
41
+ '.cadmin ',
42
+ '.c-prefers-reduced-motion '
43
+ );
44
+ $selector: clay-insert-after(
45
+ '.cadmin.',
46
+ 'c-prefers-reduced-motion.',
47
+ $selector
48
+ );
49
+ }
50
+
51
+ #{$selector} {
38
52
  transition: none;
39
53
  }
40
54
  }
@@ -27,6 +27,23 @@ $sheet-plus-sheet: map-merge(
27
27
  $sheet-plus-sheet
28
28
  );
29
29
 
30
+ // Sheet Row
31
+
32
+ $sheet-row: () !default;
33
+ $sheet-row: map-merge(
34
+ (
35
+ margin-left: math-sign($sheet-padding-left),
36
+ margin-right: math-sign($sheet-padding-right),
37
+ media-breakpoint-down: (
38
+ sm: (
39
+ margin-left: math-sign($sheet-padding-left-mobile),
40
+ margin-right: math-sign($sheet-padding-right-mobile),
41
+ ),
42
+ ),
43
+ ),
44
+ $sheet-row
45
+ );
46
+
30
47
  // Sheet Header
31
48
 
32
49
  $sheet-header-margin-bottom: 3rem !default; // 48px
@@ -360,6 +360,41 @@ $border-theme-colors: map-deep-merge(
360
360
  $displays: none, inline, inline-block, block, grid, contents, table, table-row,
361
361
  table-cell, flex, inline-flex !default;
362
362
 
363
+ $displays-c-prefers-reduced-motion: () !default;
364
+ $displays-c-prefers-reduced-motion: map-deep-merge(
365
+ (
366
+ d-block-c-prefers-reduced-motion: (
367
+ display: none !important,
368
+ ),
369
+ d-inline-block-c-prefers-reduced-motion: (
370
+ display: none !important,
371
+ ),
372
+ '@media (prefers-reduced-motion: reduce)': (
373
+ d-none-c-prefers-reduced-motion: (
374
+ display: none !important,
375
+ ),
376
+ d-block-c-prefers-reduced-motion: (
377
+ display: block !important,
378
+ ),
379
+ d-inline-block-c-prefers-reduced-motion: (
380
+ display: inline-block !important,
381
+ ),
382
+ ),
383
+ c-prefers-reduced-motion: (
384
+ d-none-c-prefers-reduced-motion: (
385
+ display: none !important,
386
+ ),
387
+ d-block-c-prefers-reduced-motion: (
388
+ display: block !important,
389
+ ),
390
+ d-inline-block-c-prefers-reduced-motion: (
391
+ display: inline-block !important,
392
+ ),
393
+ ),
394
+ ),
395
+ $displays-c-prefers-reduced-motion
396
+ );
397
+
363
398
  // Overflow
364
399
 
365
400
  $overflows: auto, hidden !default;