@clayui/css 3.64.0 → 3.65.1

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 +19 -41
  2. package/lib/css/atlas.css.map +1 -1
  3. package/lib/css/base.css +20 -41
  4. package/lib/css/base.css.map +1 -1
  5. package/lib/css/cadmin.css +54 -14
  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/_alerts.scss +1 -0
  11. package/src/scss/atlas/variables/_globals.scss +1 -1
  12. package/src/scss/cadmin/components/_alerts.scss +26 -6
  13. package/src/scss/cadmin/components/_aspect-ratio.scss +29 -14
  14. package/src/scss/cadmin/components/_badges.scss +26 -6
  15. package/src/scss/cadmin/components/_buttons.scss +129 -63
  16. package/src/scss/cadmin/components/_labels.scss +52 -12
  17. package/src/scss/cadmin/components/_popovers.scss +12 -4
  18. package/src/scss/cadmin/components/_print.scss +3 -3
  19. package/src/scss/cadmin/components/_reboot.scss +3 -3
  20. package/src/scss/cadmin/components/_stickers.scss +52 -12
  21. package/src/scss/cadmin/components/_utilities-functional-important.scss +49 -62
  22. package/src/scss/cadmin/components/_utilities.scss +7 -6
  23. package/src/scss/cadmin/variables/_alerts.scss +2 -0
  24. package/src/scss/cadmin/variables/_buttons.scss +23 -0
  25. package/src/scss/cadmin/variables/_globals.scss +1 -1
  26. package/src/scss/cadmin/variables/_utilities.scss +309 -0
  27. package/src/scss/components/_alerts.scss +25 -5
  28. package/src/scss/components/_aspect-ratio.scss +29 -14
  29. package/src/scss/components/_badges.scss +25 -5
  30. package/src/scss/components/_buttons.scss +98 -70
  31. package/src/scss/components/_labels.scss +50 -10
  32. package/src/scss/components/_popovers.scss +12 -4
  33. package/src/scss/components/_print.scss +3 -3
  34. package/src/scss/components/_reboot.scss +3 -3
  35. package/src/scss/components/_sidebar.scss +3 -1
  36. package/src/scss/components/_stickers.scss +50 -10
  37. package/src/scss/components/_utilities-functional-important.scss +40 -18
  38. package/src/scss/components/_utilities.scss +7 -6
  39. package/src/scss/functions/_global-functions.scss +9 -9
  40. package/src/scss/functions/_type-conversion-functions.scss +6 -6
  41. package/src/scss/mixins/_globals.scss +2 -0
  42. package/src/scss/mixins/_utilities.scss +6 -6
  43. package/src/scss/variables/_alerts.scss +3 -0
  44. package/src/scss/variables/_globals.scss +1 -1
  45. package/src/scss/variables/_utilities.scss +22 -0
@@ -1,6 +1,28 @@
1
1
  $cadmin-bg-checkered-fg: $cadmin-gray-300 !default;
2
+
3
+ // .inline-scroller
4
+
2
5
  $cadmin-inline-scroller-max-height: 125px !default;
3
6
 
7
+ $cadmin-inline-scroller: () !default;
8
+ $cadmin-inline-scroller: map-deep-merge(
9
+ (
10
+ list-style: none,
11
+ margin: 0,
12
+ max-height: $cadmin-inline-scroller-max-height,
13
+ overflow: auto,
14
+ -webkit-overflow-scrolling: touch,
15
+ padding: 0,
16
+ focus: (
17
+ outline: 0,
18
+ ),
19
+ focus-visible: (
20
+ box-shadow: $cadmin-component-focus-box-shadow,
21
+ ),
22
+ ),
23
+ $cadmin-inline-scroller
24
+ );
25
+
4
26
  // Autofit Row
5
27
 
6
28
  $cadmin-autofit-col-expand-min-width: 50px !default; // 50px
@@ -150,6 +172,184 @@ $cadmin-inline-item: map-deep-merge(
150
172
 
151
173
  $cadmin-page-header-bg: $cadmin-white !default;
152
174
 
175
+ // Background
176
+
177
+ $cadmin-bg-theme-colors: () !default;
178
+ $cadmin-bg-theme-colors: map-deep-merge(
179
+ (
180
+ 'primary': (
181
+ background-color: $cadmin-primary !important,
182
+ hover: (
183
+ background-color: clay-darken($cadmin-primary, 10%) !important,
184
+ ),
185
+ ),
186
+ 'secondary': (
187
+ background-color: $cadmin-secondary !important,
188
+ hover: (
189
+ background-color: clay-darken($cadmin-secondary, 10%) !important,
190
+ ),
191
+ ),
192
+ 'success': (
193
+ background-color: $cadmin-success !important,
194
+ hover: (
195
+ background-color: clay-darken($cadmin-success, 10%) !important,
196
+ ),
197
+ ),
198
+ 'info': (
199
+ background-color: $cadmin-info !important,
200
+ hover: (
201
+ background-color: clay-darken($cadmin-info, 10%) !important,
202
+ ),
203
+ ),
204
+ 'warning': (
205
+ background-color: $cadmin-warning !important,
206
+ hover: (
207
+ background-color: clay-darken($cadmin-warning, 10%) !important,
208
+ ),
209
+ ),
210
+ 'danger': (
211
+ background-color: $cadmin-danger !important,
212
+ hover: (
213
+ background-color: clay-darken($cadmin-danger, 10%) !important,
214
+ ),
215
+ ),
216
+ 'light': (
217
+ background-color: $cadmin-light !important,
218
+ hover: (
219
+ background-color: clay-darken($cadmin-light, 10%) !important,
220
+ ),
221
+ ),
222
+ 'dark': (
223
+ background-color: $cadmin-dark !important,
224
+ hover: (
225
+ background-color: clay-darken($cadmin-dark, 10%) !important,
226
+ ),
227
+ ),
228
+ 'white': (
229
+ background-color: $cadmin-white !important,
230
+ ),
231
+ 'transparent': (
232
+ background-color: transparent !important,
233
+ ),
234
+ ),
235
+ $cadmin-bg-theme-colors
236
+ );
237
+
238
+ $cadmin-bg-gradient-theme-colors: () !default;
239
+ $cadmin-bg-gradient-theme-colors: map-deep-merge(
240
+ (
241
+ 'primary': (
242
+ background: $cadmin-primary
243
+ linear-gradient(
244
+ 180deg,
245
+ clay-mix($cadmin-body-bg, $cadmin-primary, 15%),
246
+ $cadmin-primary
247
+ )
248
+ repeat-x !important,
249
+ ),
250
+ 'secondary': (
251
+ background: $cadmin-secondary
252
+ linear-gradient(
253
+ 180deg,
254
+ clay-mix($cadmin-body-bg, $cadmin-secondary, 15%),
255
+ $cadmin-secondary
256
+ )
257
+ repeat-x !important,
258
+ ),
259
+ 'success': (
260
+ background: $cadmin-success
261
+ linear-gradient(
262
+ 180deg,
263
+ clay-clay-mix($cadmin-body-bg, $cadmin-success, 15%),
264
+ $cadmin-success
265
+ )
266
+ repeat-x !important,
267
+ ),
268
+ 'info': (
269
+ background: $cadmin-info
270
+ linear-gradient(
271
+ 180deg,
272
+ clay-mix($cadmin-body-bg, $cadmin-info, 15%),
273
+ $cadmin-info
274
+ )
275
+ repeat-x !important,
276
+ ),
277
+ 'warning': (
278
+ background: $cadmin-warning
279
+ linear-gradient(
280
+ 180deg,
281
+ clay-mix($cadmin-body-bg, $cadmin-warning, 15%),
282
+ $cadmin-warning
283
+ )
284
+ repeat-x !important,
285
+ ),
286
+ 'danger': (
287
+ background: $cadmin-danger
288
+ linear-gradient(
289
+ 180deg,
290
+ clay-mix($cadmin-body-bg, $cadmin-danger, 15%),
291
+ $cadmin-danger
292
+ )
293
+ repeat-x !important,
294
+ ),
295
+ 'light': (
296
+ background: $cadmin-light
297
+ linear-gradient(
298
+ 180deg,
299
+ clay-mix($cadmin-body-bg, $cadmin-light, 15%),
300
+ $cadmin-light
301
+ )
302
+ repeat-x !important,
303
+ ),
304
+ 'dark': (
305
+ background: $cadmin-dark
306
+ linear-gradient(
307
+ 180deg,
308
+ clay-mix($cadmin-body-bg, $cadmin-dark, 15%),
309
+ $cadmin-dark
310
+ )
311
+ repeat-x !important,
312
+ ),
313
+ ),
314
+ $cadmin-bg-gradient-theme-colors
315
+ );
316
+
317
+ // Border
318
+
319
+ $cadmin-border-theme-colors: () !default;
320
+ $cadmin-border-theme-colors: map-deep-merge(
321
+ (
322
+ 'primary': (
323
+ border-color: $cadmin-primary !important,
324
+ ),
325
+ 'secondary': (
326
+ border-color: $cadmin-secondary !important,
327
+ ),
328
+ 'success': (
329
+ border-color: $cadmin-success !important,
330
+ ),
331
+ 'info': (
332
+ border-color: $cadmin-info !important,
333
+ ),
334
+ 'warning': (
335
+ border-color: $cadmin-warning !important,
336
+ ),
337
+ 'danger': (
338
+ border-color: $cadmin-danger !important,
339
+ ),
340
+ 'light': (
341
+ border-color: $cadmin-light !important,
342
+ ),
343
+ 'dark': (
344
+ border-color: $cadmin-dark !important,
345
+ ),
346
+ 'white': (
347
+ border-color: $cadmin-white !important,
348
+ ),
349
+ ),
350
+ $cadmin-border-theme-colors
351
+ );
352
+
153
353
  // Display
154
354
 
155
355
  $cadmin-displays: none, inline, inline-block, block, table, table-row,
@@ -204,3 +404,112 @@ $cadmin-font-sizes: map-deep-merge(
204
404
  ),
205
405
  $cadmin-font-sizes
206
406
  );
407
+
408
+ // Text
409
+
410
+ $cadmin-text-theme-colors: () !default;
411
+ $cadmin-text-theme-colors: map-deep-merge(
412
+ (
413
+ 'primary': (
414
+ color: $cadmin-primary !important,
415
+ hover: (
416
+ color:
417
+ clay-darken(
418
+ $cadmin-primary,
419
+ $cadmin-emphasized-link-hover-darken-percentage
420
+ )
421
+ !important,
422
+ ),
423
+ ),
424
+ 'secondary': (
425
+ color: $cadmin-secondary !important,
426
+ hover: (
427
+ color:
428
+ clay-darken(
429
+ $cadmin-secondary,
430
+ $cadmin-emphasized-link-hover-darken-percentage
431
+ )
432
+ !important,
433
+ ),
434
+ ),
435
+ 'success': (
436
+ color: $cadmin-success !important,
437
+ hover: (
438
+ color:
439
+ clay-darken(
440
+ $cadmin-success,
441
+ $cadmin-emphasized-link-hover-darken-percentage
442
+ )
443
+ !important,
444
+ ),
445
+ ),
446
+ 'info': (
447
+ color: $cadmin-info !important,
448
+ hover: (
449
+ color:
450
+ clay-darken(
451
+ $cadmin-info,
452
+ $cadmin-emphasized-link-hover-darken-percentage
453
+ )
454
+ !important,
455
+ ),
456
+ ),
457
+ 'warning': (
458
+ color: $cadmin-warning !important,
459
+ hover: (
460
+ color:
461
+ clay-darken(
462
+ $cadmin-warning,
463
+ $cadmin-emphasized-link-hover-darken-percentage
464
+ )
465
+ !important,
466
+ ),
467
+ ),
468
+ 'danger': (
469
+ color: $cadmin-danger !important,
470
+ hover: (
471
+ color:
472
+ clay-darken(
473
+ $cadmin-danger,
474
+ $cadmin-emphasized-link-hover-darken-percentage
475
+ )
476
+ !important,
477
+ ),
478
+ ),
479
+ 'light': (
480
+ color: $cadmin-light !important,
481
+ hover: (
482
+ color:
483
+ clay-darken(
484
+ $cadmin-light,
485
+ $cadmin-emphasized-link-hover-darken-percentage
486
+ )
487
+ !important,
488
+ ),
489
+ ),
490
+ 'dark': (
491
+ color: $cadmin-dark !important,
492
+ hover: (
493
+ color:
494
+ clay-darken(
495
+ $cadmin-dark,
496
+ $cadmin-emphasized-link-hover-darken-percentage
497
+ )
498
+ !important,
499
+ ),
500
+ ),
501
+ 'body': (
502
+ color: $cadmin-body-color !important,
503
+ ),
504
+ 'muted': (
505
+ color: $cadmin-text-muted !important,
506
+ ),
507
+ 'black-50': (
508
+ color: rgba($cadmin-black, 0.5) !important,
509
+ ),
510
+ 'white-50': (
511
+ color: rgba($cadmin-white, 0.5) !important,
512
+ ),
513
+ ),
514
+ $cadmin-text-theme-colors
515
+ );
@@ -420,11 +420,31 @@
420
420
  // Alert Variants
421
421
 
422
422
  @each $color, $value in $alert-palette {
423
- %alert-#{$color} {
424
- @include clay-alert-variant($value);
425
- }
423
+ $selector: if(
424
+ starts-with($color, '.') or
425
+ starts-with($color, '#') or
426
+ starts-with($color, '%'),
427
+ $color,
428
+ str-insert($color, '.alert-', 1)
429
+ );
430
+
431
+ @if (starts-with($color, '%') or map-get($value, extend)) {
432
+ #{$selector} {
433
+ @include clay-alert-variant($value);
434
+ }
435
+ } @else {
436
+ $placeholder: if(
437
+ starts-with($color, '.') or starts-with($color, '#'),
438
+ '%#{str-slice($color, 2)}',
439
+ '%alert-#{$color}'
440
+ );
426
441
 
427
- .alert-#{$color} {
428
- @extend %alert-#{$color} !optional;
442
+ #{$placeholder} {
443
+ @include clay-alert-variant($value);
444
+ }
445
+
446
+ #{$selector} {
447
+ @extend %alert-#{$color} !optional;
448
+ }
429
449
  }
430
450
  }
@@ -162,26 +162,41 @@
162
162
 
163
163
  @each $selector, $value in $aspect-ratio-sizes {
164
164
  $selector: if(
165
- starts-with($selector, '.') or starts-with($selector, '#'),
165
+ starts-with($selector, '.') or
166
+ starts-with($selector, '#') or
167
+ starts-with($selector, '%'),
166
168
  $selector,
167
169
  str-insert($selector, '.', 1)
168
170
  );
169
171
 
170
- $placeholder: str-insert(
171
- str-slice($selector, 2, str-length($selector)),
172
- '%',
173
- 1
174
- );
175
-
176
- #{$placeholder} {
177
- @include clay-aspect-ratio(
178
- map-get($value, width),
179
- map-get($value, height)
172
+ @if (starts-with($selector, '%')) {
173
+ #{$selector} {
174
+ @include clay-aspect-ratio(
175
+ map-get($value, width),
176
+ map-get($value, height)
177
+ );
178
+ }
179
+ } @else if (map-get($value, extend)) {
180
+ #{$selector} {
181
+ @include clay-css($value);
182
+ }
183
+ } @else {
184
+ $placeholder: str-insert(
185
+ str-slice($selector, 2, str-length($selector)),
186
+ '%',
187
+ 1
180
188
  );
181
- }
182
189
 
183
- #{$selector} {
184
- @extend #{$placeholder} !optional;
190
+ #{$placeholder} {
191
+ @include clay-aspect-ratio(
192
+ map-get($value, width),
193
+ map-get($value, height)
194
+ );
195
+ }
196
+
197
+ #{$selector} {
198
+ @extend #{$placeholder} !optional;
199
+ }
185
200
  }
186
201
  }
187
202
 
@@ -108,11 +108,31 @@
108
108
  // Badge Variants
109
109
 
110
110
  @each $color, $value in $badge-palette {
111
- %badge-#{$color} {
112
- @include clay-badge-variant($value);
113
- }
111
+ $selector: if(
112
+ starts-with($color, '.') or
113
+ starts-with($color, '#') or
114
+ starts-with($color, '%'),
115
+ $color,
116
+ str-insert($color, '.badge-', 1)
117
+ );
118
+
119
+ @if (starts-with($color, '%') or map-get($value, extend)) {
120
+ #{$selector} {
121
+ @include clay-badge-variant($value);
122
+ }
123
+ } @else {
124
+ $placeholder: if(
125
+ starts-with($color, '.') or starts-with($color, '#'),
126
+ '%#{str-slice($color, 2)}',
127
+ '%badge-#{$color}'
128
+ );
129
+
130
+ #{$placeholder} {
131
+ @include clay-badge-variant($value);
132
+ }
114
133
 
115
- .badge-#{$color} {
116
- @extend %badge-#{$color} !optional;
134
+ #{$selector} {
135
+ @extend #{$placeholder} !optional;
136
+ }
117
137
  }
118
138
  }
@@ -19,24 +19,30 @@ fieldset:disabled a.btn {
19
19
  // Button Sizes
20
20
 
21
21
  @each $size, $value in $btn-sizes {
22
- $placeholder: if(
23
- starts-with($size, 'btn-'),
24
- '%clay-#{$size}',
25
- '%#{str-slice($size, 2)}'
26
- );
27
-
28
22
  $selector: if(
29
23
  starts-with($size, 'btn-'),
30
24
  clay-str-replace($size, 'btn-', '.btn-'),
31
25
  $size
32
26
  );
33
27
 
34
- #{$placeholder} {
35
- @include clay-button-variant($value);
36
- }
37
-
38
- #{$selector} {
39
- @extend #{$placeholder} !optional;
28
+ @if (starts-with($size, '%') or map-get($value, extend)) {
29
+ #{$selector} {
30
+ @include clay-button-variant($value);
31
+ }
32
+ } @else {
33
+ $placeholder: if(
34
+ starts-with($size, 'btn-'),
35
+ '%clay-#{$size}',
36
+ '%#{str-slice($size, 2)}'
37
+ );
38
+
39
+ #{$placeholder} {
40
+ @include clay-button-variant($value);
41
+ }
42
+
43
+ #{$selector} {
44
+ @extend #{$placeholder} !optional;
45
+ }
40
46
  }
41
47
  }
42
48
 
@@ -74,12 +80,6 @@ input[type='button'] {
74
80
  // Button Monospaced
75
81
 
76
82
  @each $size, $value in $btn-monospaced-sizes {
77
- $placeholder: if(
78
- starts-with($size, 'btn-monospaced'),
79
- '%clay-#{$size}',
80
- '%#{str-slice($size, 2)}'
81
- );
82
-
83
83
  $selector: if(
84
84
  starts-with($size, 'btn-monospaced-'),
85
85
  clay-str-replace($size, 'btn-monospaced', '.btn-monospaced.btn'),
@@ -90,80 +90,108 @@ input[type='button'] {
90
90
  )
91
91
  );
92
92
 
93
- #{$placeholder} {
94
- @include clay-button-variant($value);
95
- }
96
-
97
- #{$selector} {
98
- @extend #{$placeholder} !optional;
93
+ @if (starts-with($size, '%') or map-get($value, extend)) {
94
+ #{$selector} {
95
+ @include clay-button-variant($value);
96
+ }
97
+ } @else {
98
+ $placeholder: if(
99
+ starts-with($size, 'btn-monospaced'),
100
+ '%clay-#{$size}',
101
+ '%#{str-slice($size, 2)}'
102
+ );
103
+
104
+ #{$placeholder} {
105
+ @include clay-button-variant($value);
106
+ }
107
+
108
+ #{$selector} {
109
+ @extend #{$placeholder} !optional;
110
+ }
99
111
  }
100
112
  }
101
113
 
102
114
  // Button Variants
103
115
 
104
116
  @each $color, $value in $btn-palette {
105
- $placeholder: if(
106
- starts-with($color, '.') or starts-with($color, '#'),
107
- '%#{str-slice($color, 2)}',
108
- '%btn-#{$color}'
109
- );
110
-
111
- $placeholder-focus: if(
112
- starts-with($color, '.') or starts-with($color, '#'),
113
- '%#{str-slice($color, 2)}-focus',
114
- '%btn-#{$color}-focus'
115
- );
116
-
117
117
  $selector: if(
118
- starts-with($color, '.') or starts-with($color, '#'),
118
+ starts-with($color, '.') or
119
+ starts-with($color, '#') or
120
+ starts-with($color, '%'),
119
121
  $color,
120
122
  str-insert($color, '.btn-', 1)
121
123
  );
122
124
 
123
- #{$placeholder} {
124
- @include clay-button-variant($value);
125
- }
126
-
127
- #{$selector} {
128
- @extend #{$placeholder} !optional;
129
- }
130
-
131
- #{$placeholder-focus} {
132
- @include clay-button-variant(map-get($value, focus));
125
+ @if (starts-with($color, '%') or map-get($value, extend)) {
126
+ #{$selector} {
127
+ @include clay-button-variant($value);
128
+ }
129
+ } @else {
130
+ $placeholder: if(
131
+ starts-with($color, '.') or starts-with($color, '#'),
132
+ '%#{str-slice($color, 2)}',
133
+ '%btn-#{$color}'
134
+ );
135
+
136
+ $placeholder-focus: if(
137
+ starts-with($color, '.') or starts-with($color, '#'),
138
+ '%#{str-slice($color, 2)}-focus',
139
+ '%btn-#{$color}-focus'
140
+ );
141
+
142
+ #{$placeholder} {
143
+ @include clay-button-variant($value);
144
+ }
145
+
146
+ #{$selector} {
147
+ @extend #{$placeholder} !optional;
148
+ }
149
+
150
+ #{$placeholder-focus} {
151
+ @include clay-button-variant(map-get($value, focus));
152
+ }
133
153
  }
134
154
  }
135
155
 
136
156
  // Button Outline Variants
137
157
 
138
158
  @each $color, $value in $btn-outline-palette {
139
- $placeholder: if(
140
- starts-with($color, '.') or starts-with($color, '#'),
141
- '%#{str-slice($color, 2)}',
142
- '%btn-outline-#{$color}'
143
- );
144
-
145
- $placeholder-focus: if(
146
- starts-with($color, '.') or starts-with($color, '#'),
147
- '%#{str-slice($color, 2)}-focus',
148
- '%btn-outline-#{$color}-focus'
149
- );
150
-
151
159
  $selector: if(
152
- starts-with($color, '.') or starts-with($color, '#'),
160
+ starts-with($color, '.') or
161
+ starts-with($color, '#') or
162
+ starts-with($color, '%'),
153
163
  $color,
154
164
  str-insert($color, '.btn-outline-', 1)
155
165
  );
156
166
 
157
- #{$placeholder} {
158
- @include clay-button-variant($value);
159
- }
160
-
161
- #{$selector} {
162
- @extend #{$placeholder} !optional;
163
- }
164
-
165
- #{$placeholder-focus} {
166
- @include clay-button-variant(map-get($value, focus));
167
+ @if (starts-with($color, '%') or map-get($value, extend)) {
168
+ #{$selector} {
169
+ @include clay-button-variant($value);
170
+ }
171
+ } @else {
172
+ $placeholder: if(
173
+ starts-with($color, '.') or starts-with($color, '#'),
174
+ '%#{str-slice($color, 2)}',
175
+ '%btn-outline-#{$color}'
176
+ );
177
+
178
+ $placeholder-focus: if(
179
+ starts-with($color, '.') or starts-with($color, '#'),
180
+ '%#{str-slice($color, 2)}-focus',
181
+ '%btn-outline-#{$color}-focus'
182
+ );
183
+
184
+ #{$placeholder} {
185
+ @include clay-button-variant($value);
186
+ }
187
+
188
+ #{$selector} {
189
+ @extend #{$placeholder} !optional;
190
+ }
191
+
192
+ #{$placeholder-focus} {
193
+ @include clay-button-variant(map-get($value, focus));
194
+ }
167
195
  }
168
196
  }
169
197