@clayui/css 3.40.1 → 3.41.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.
@@ -62,7 +62,410 @@ $cadmin-toggle-switch-text-font-size: 12px !default;
62
62
 
63
63
  $cadmin-toggle-switch-text-disabled-color: $cadmin-input-label-disabled-color !default;
64
64
 
65
- // Simple Toggle Switch
65
+ // .toggle-switch
66
+
67
+ $cadmin-toggle-switch: () !default;
68
+ $cadmin-toggle-switch: map-deep-merge(
69
+ (
70
+ breakpoint-down: sm,
71
+ cursor: $cadmin-toggle-switch-cursor,
72
+ display: inline-block,
73
+ font-weight: $cadmin-toggle-switch-font-weight,
74
+ max-width: 100%,
75
+ position: relative,
76
+ disabled: (
77
+ cursor: $cadmin-toggle-switch-disabled-cursor,
78
+ toggle-switch-label: (
79
+ color: $cadmin-toggle-switch-label-disabled-color,
80
+ cursor: $cadmin-toggle-switch-disabled-cursor,
81
+ ),
82
+ toggle-switch-text: (
83
+ color: $cadmin-toggle-switch-text-disabled-color,
84
+ ),
85
+ ),
86
+ ),
87
+ $cadmin-toggle-switch
88
+ );
89
+
90
+ // .toggle-switch-check-bar
91
+
92
+ $cadmin-toggle-switch-check-bar: () !default;
93
+ $cadmin-toggle-switch-check-bar: map-merge(
94
+ (
95
+ display: inline-flex,
96
+ position: relative,
97
+ ),
98
+ $cadmin-toggle-switch-check-bar
99
+ );
100
+
101
+ // .toggle-switch-bar
102
+
103
+ $cadmin-toggle-switch-bar: () !default;
104
+ $cadmin-toggle-switch-bar: map-deep-merge(
105
+ (
106
+ toggle-switch-handle: (
107
+ display: block,
108
+ min-width: $cadmin-toggle-switch-bar-width,
109
+ text-transform: uppercase,
110
+ ),
111
+ toggle-switch-icon: (
112
+ font-size: $cadmin-toggle-switch-bar-font-size,
113
+ lexicon-icon: (
114
+ margin-top: -0.2em,
115
+ ),
116
+ ),
117
+ button-icon: (
118
+ font-size: $cadmin-toggle-switch-button-font-size,
119
+ ),
120
+ ),
121
+ $cadmin-toggle-switch-bar
122
+ );
123
+
124
+ // .toggle-switch-check
125
+
126
+ $cadmin-toggle-switch-check: () !default;
127
+ $cadmin-toggle-switch-check: map-deep-merge(
128
+ (
129
+ breakpoint-down: sm,
130
+ bottom: 0,
131
+ font-size: 62.5%,
132
+ height: $cadmin-toggle-switch-bar-height,
133
+ opacity: 0,
134
+ position: absolute,
135
+ width: $cadmin-toggle-switch-bar-width,
136
+ z-index: 2,
137
+ toggle-switch-bar: (
138
+ display: inline-flex,
139
+ font-size: $cadmin-toggle-switch-bar-font-size,
140
+ height: $cadmin-toggle-switch-bar-height,
141
+ line-height: $cadmin-toggle-switch-bar-height,
142
+ position: relative,
143
+ text-indent: 0,
144
+ user-select: none,
145
+ before: (
146
+ background-color: $cadmin-toggle-switch-bar-bg,
147
+ border-color: $cadmin-toggle-switch-bar-border-color,
148
+ border-radius:
149
+ clay-enable-rounded($cadmin-toggle-switch-bar-border-radius),
150
+ border-style: solid,
151
+ border-width: $cadmin-toggle-switch-bar-border-width,
152
+ bottom: 0,
153
+ content: ' ',
154
+ display: block,
155
+ left: 0,
156
+ position: absolute,
157
+ top: 0,
158
+ transition: $cadmin-toggle-switch-transition,
159
+ width: $cadmin-toggle-switch-bar-width,
160
+ ),
161
+ after: (
162
+ background-color: $cadmin-toggle-switch-button-bg,
163
+ border-color: $cadmin-toggle-switch-button-border-color,
164
+ border-radius:
165
+ clay-enable-rounded(
166
+ $cadmin-toggle-switch-button-border-radius
167
+ ),
168
+ border-style: solid,
169
+ border-width: $cadmin-toggle-switch-button-border-width,
170
+ bottom: $cadmin-toggle-switch-bar-padding,
171
+ content: '',
172
+ display: block,
173
+ height: $cadmin-toggle-switch-button-width,
174
+ left: $cadmin-toggle-switch-bar-padding,
175
+ position: absolute,
176
+ top: $cadmin-toggle-switch-bar-padding,
177
+ transition: $cadmin-toggle-switch-transition,
178
+ width: $cadmin-toggle-switch-button-width,
179
+ ),
180
+ toggle-switch-handle: (
181
+ before: (
182
+ transition: $cadmin-toggle-switch-transition,
183
+ ),
184
+ after: (
185
+ content: attr(data-label-off),
186
+ margin-left:
187
+ clay-data-label-text-position(
188
+ $cadmin-toggle-switch-bar-width,
189
+ $cadmin-toggle-switch-bar-padding
190
+ ),
191
+ transition: $cadmin-toggle-switch-transition,
192
+ white-space: nowrap,
193
+ ),
194
+ ),
195
+ toggle-switch-icon: (
196
+ color: $cadmin-toggle-switch-bar-icon-color,
197
+ left: $cadmin-toggle-switch-bar-padding,
198
+ line-height: $cadmin-toggle-switch-button-width,
199
+ position: absolute,
200
+ text-align: center,
201
+ text-indent: 0,
202
+ top: $cadmin-toggle-switch-bar-padding,
203
+ transition: $cadmin-toggle-switch-transition,
204
+ width: $cadmin-toggle-switch-button-width,
205
+ z-index: 1,
206
+ ),
207
+ toggle-switch-icon-on: (
208
+ left: $cadmin-toggle-switch-bar-padding,
209
+ opacity: 0,
210
+ ),
211
+ toggle-switch-icon-off: (
212
+ left: $cadmin-toggle-switch-bar-width -
213
+ $cadmin-toggle-switch-bar-padding -
214
+ $cadmin-toggle-switch-button-width,
215
+ ),
216
+ button-icon: (
217
+ color: $cadmin-toggle-switch-button-icon-color,
218
+ ),
219
+ button-icon-on: (
220
+ opacity: 0,
221
+ ),
222
+ ),
223
+ focus: (
224
+ toggle-switch-bar: (
225
+ before: (
226
+ box-shadow: $cadmin-toggle-switch-bar-focus-box-shadow,
227
+ ),
228
+ ),
229
+ ),
230
+ disabled: (
231
+ toggle-switch-bar: (
232
+ cursor: $cadmin-toggle-switch-disabled-cursor,
233
+ opacity: $cadmin-toggle-switch-disabled-opacity,
234
+ ),
235
+ ),
236
+ checked: (
237
+ toggle-switch-bar: (
238
+ before: (
239
+ background-color: $cadmin-toggle-switch-bar-on-bg,
240
+ border-color: $cadmin-toggle-switch-bar-on-border-color,
241
+ border-radius:
242
+ clay-enable-rounded(
243
+ $cadmin-toggle-switch-bar-border-radius
244
+ ),
245
+ border-style: solid,
246
+ border-width: $cadmin-toggle-switch-bar-border-width,
247
+ ),
248
+ after: (
249
+ background-color: $cadmin-toggle-switch-button-on-bg,
250
+ border-color: $cadmin-toggle-switch-button-on-border-color,
251
+ border-radius:
252
+ clay-enable-rounded(
253
+ $cadmin-toggle-switch-button-on-border-radius
254
+ ),
255
+ border-style: solid,
256
+ border-width: $cadmin-toggle-switch-button-border-width,
257
+ left: $cadmin-toggle-switch-bar-width -
258
+ $cadmin-toggle-switch-bar-padding -
259
+ $cadmin-toggle-switch-button-width,
260
+ ),
261
+ toggle-switch-handle: (
262
+ after: (
263
+ content: attr(data-label-on),
264
+ ),
265
+ ),
266
+ toggle-switch-icon: (
267
+ color: $cadmin-toggle-switch-bar-on-icon-color,
268
+ ),
269
+ toggle-switch-icon-on: (
270
+ opacity: 1,
271
+ ),
272
+ toggle-switch-icon-off: (
273
+ opacity: 0,
274
+ ),
275
+ button-icon: (
276
+ color: $cadmin-toggle-switch-button-on-icon-color,
277
+ left: $cadmin-toggle-switch-bar-width -
278
+ $cadmin-toggle-switch-bar-padding -
279
+ $cadmin-toggle-switch-button-width,
280
+ ),
281
+ button-icon-on: (
282
+ opacity: 1,
283
+ ),
284
+ button-icon-off: (
285
+ opacity: 0,
286
+ ),
287
+ ),
288
+ ),
289
+ mobile: (
290
+ height: $cadmin-toggle-switch-bar-height-mobile,
291
+ width: $cadmin-toggle-switch-bar-width-mobile,
292
+ toggle-switch-bar: (
293
+ height: $cadmin-toggle-switch-bar-height-mobile,
294
+ line-height: $cadmin-toggle-switch-bar-height-mobile,
295
+ text-indent: 0,
296
+ before: (
297
+ width: $cadmin-toggle-switch-bar-width-mobile,
298
+ ),
299
+ after: (
300
+ bottom: $cadmin-toggle-switch-bar-padding-mobile,
301
+ height: $cadmin-toggle-switch-button-width-mobile,
302
+ left: $cadmin-toggle-switch-bar-padding-mobile,
303
+ top: $cadmin-toggle-switch-bar-padding-mobile,
304
+ width: $cadmin-toggle-switch-button-width-mobile,
305
+ ),
306
+ toggle-switch-handle: (
307
+ min-width: $cadmin-toggle-switch-bar-width-mobile,
308
+ after: (
309
+ margin-left:
310
+ clay-data-label-text-position(
311
+ $cadmin-toggle-switch-bar-width-mobile,
312
+ $cadmin-toggle-switch-bar-padding-mobile
313
+ ),
314
+ ),
315
+ ),
316
+ toggle-switch-icon: (
317
+ font-size: $cadmin-toggle-switch-bar-font-size-mobile,
318
+ left: $cadmin-toggle-switch-bar-padding-mobile,
319
+ line-height: $cadmin-toggle-switch-button-width-mobile,
320
+ top: $cadmin-toggle-switch-bar-padding-mobile,
321
+ width: $cadmin-toggle-switch-button-width-mobile,
322
+ ),
323
+ toggle-switch-icon-on: (
324
+ left: $cadmin-toggle-switch-bar-padding-mobile,
325
+ ),
326
+ toggle-switch-icon-off: (
327
+ left: $cadmin-toggle-switch-bar-width-mobile -
328
+ $cadmin-toggle-switch-bar-padding-mobile -
329
+ $cadmin-toggle-switch-button-width-mobile,
330
+ ),
331
+ button-icon: (
332
+ font-size: $cadmin-toggle-switch-button-font-size-mobile,
333
+ ),
334
+ ),
335
+ checked: (
336
+ toggle-switch-bar: (
337
+ after: (
338
+ left: $cadmin-toggle-switch-bar-width-mobile -
339
+ $cadmin-toggle-switch-bar-padding-mobile -
340
+ $cadmin-toggle-switch-button-width-mobile,
341
+ ),
342
+ toggle-switch-handle: (
343
+ after: (
344
+ margin-left:
345
+ clay-data-label-text-position(
346
+ $cadmin-toggle-switch-bar-width-mobile,
347
+ $cadmin-toggle-switch-bar-padding-mobile
348
+ ),
349
+ ),
350
+ ),
351
+ button-icon: (
352
+ left: $cadmin-toggle-switch-bar-width-mobile -
353
+ $cadmin-toggle-switch-bar-padding-mobile -
354
+ $cadmin-toggle-switch-button-width-mobile,
355
+ ),
356
+ ),
357
+ ),
358
+ toggle-switch-text-left: (
359
+ line-height: $cadmin-toggle-switch-bar-height-mobile,
360
+ ),
361
+ toggle-switch-text-right: (
362
+ line-height: $cadmin-toggle-switch-bar-height-mobile,
363
+ ),
364
+ ),
365
+ ),
366
+ $cadmin-toggle-switch-check
367
+ );
368
+
369
+ // .toggle-switch-label
370
+
371
+ $cadmin-toggle-switch-label: () !default;
372
+ $cadmin-toggle-switch-label: map-merge(
373
+ (
374
+ display: block,
375
+ margin-bottom: 2px,
376
+ ),
377
+ $cadmin-toggle-switch-label
378
+ );
379
+
380
+ // .toggle-switch-text
381
+
382
+ $cadmin-toggle-switch-text: () !default;
383
+ $cadmin-toggle-switch-text: map-merge(
384
+ (
385
+ display: block,
386
+ font-size: $cadmin-toggle-switch-text-font-size,
387
+ ),
388
+ $cadmin-toggle-switch-text
389
+ );
390
+
391
+ // .toggle-switch-text-left
392
+
393
+ $cadmin-toggle-switch-text-left: () !default;
394
+ $cadmin-toggle-switch-text-left: map-deep-merge(
395
+ (
396
+ display: inline-flex,
397
+ line-height: $cadmin-toggle-switch-bar-height,
398
+ margin-right: 8px,
399
+ ),
400
+ $cadmin-toggle-switch-text-left
401
+ );
402
+
403
+ // .toggle-switch-text-right
404
+
405
+ $cadmin-toggle-switch-text-right: () !default;
406
+ $cadmin-toggle-switch-text-right: map-merge(
407
+ (
408
+ display: inline-flex,
409
+ line-height: $cadmin-toggle-switch-bar-height,
410
+ margin-left: 8px,
411
+ ),
412
+ $cadmin-toggle-switch-text-right
413
+ );
414
+
415
+ // .simple-toggle-switch
66
416
 
67
417
  $cadmin-simple-toggle-switch-label-line-height: 1 !default;
68
418
  $cadmin-simple-toggle-switch-label-spacer-x: 8px !default;
419
+
420
+ $cadmin-simple-toggle-switch: () !default;
421
+ $cadmin-simple-toggle-switch: map-deep-merge(
422
+ (
423
+ breakpoint-down: sm,
424
+ align-items: center,
425
+ display: inline-flex,
426
+ toggle-switch-label: (
427
+ line-height: $cadmin-simple-toggle-switch-label-line-height,
428
+ margin-bottom: 0,
429
+ max-width:
430
+ calc(
431
+ 100% - #{clay-data-label-text-position(
432
+ $cadmin-toggle-switch-bar-width,
433
+ $cadmin-toggle-switch-bar-padding
434
+ )}
435
+ ),
436
+ ),
437
+ mobile: (
438
+ toggle-switch-label: (
439
+ max-width:
440
+ calc(
441
+ 100% - #{clay-data-label-text-position(
442
+ $cadmin-toggle-switch-bar-width-mobile,
443
+ $cadmin-toggle-switch-bar-padding-mobile
444
+ )}
445
+ ),
446
+ ),
447
+ ),
448
+ ),
449
+ $cadmin-simple-toggle-switch
450
+ );
451
+
452
+ // .simple-toggle-switch-reverse
453
+
454
+ $cadmin-simple-toggle-switch-reverse: () !default;
455
+ $cadmin-simple-toggle-switch-reverse: map-deep-merge(
456
+ (
457
+ breakpoint-down: sm,
458
+ toggle-switch-label: (
459
+ margin-right: $cadmin-simple-toggle-switch-label-spacer-x,
460
+ ),
461
+ toggle-switch-check-bar: (
462
+ order: 5,
463
+ ),
464
+ toggle-switch-check: (
465
+ toggle-switch-bar: (
466
+ order: 5,
467
+ ),
468
+ ),
469
+ ),
470
+ $cadmin-simple-toggle-switch-reverse
471
+ );
@@ -25,33 +25,23 @@
25
25
  // Form Feedback
26
26
 
27
27
  .form-feedback-group {
28
- width: 100%;
29
- word-wrap: break-word;
28
+ @include clay-css($form-feedback-group);
30
29
  }
31
30
 
32
31
  .form-feedback-item {
33
- font-size: $form-feedback-font-size;
34
- font-weight: $form-feedback-font-weight;
35
- margin-top: $form-feedback-margin-top;
36
- word-wrap: break-word;
32
+ @include clay-css($form-feedback-item);
37
33
  }
38
34
 
39
35
  .form-feedback-indicator {
40
- margin-left: $form-feedback-indicator-margin-x;
41
- margin-right: $form-feedback-indicator-margin-x;
36
+ @include clay-css($form-feedback-indicator);
42
37
 
43
38
  &:first-child {
44
- margin-left: 0;
39
+ @include clay-css(map-get($form-feedback-indicator, first-child));
45
40
  }
46
41
  }
47
42
 
48
43
  .form-text {
49
- color: $form-text-color;
50
- display: block;
51
- font-size: $form-text-font-size;
52
- font-weight: $form-text-font-weight;
53
- margin-top: $form-text-margin-top;
54
- word-wrap: break-word;
44
+ @include clay-css($form-text);
55
45
  }
56
46
 
57
47
  @if ($enable-bs4-deprecated) {
@@ -89,232 +79,13 @@
89
79
  // Non HTML5 Form Validator
90
80
 
91
81
  .has-error {
92
- label {
93
- color: $input-danger-label-color;
94
- }
95
-
96
- .custom-control-label,
97
- .form-check-label {
98
- color: $input-danger-checkbox-label-color;
99
- }
100
-
101
- .form-control {
102
- @include clay-form-control-variant($input-danger);
103
- }
104
-
105
- .form-control[readonly] {
106
- @include clay-form-control-variant($input-danger-readonly);
107
- }
108
-
109
- .form-feedback-item {
110
- color: $form-feedback-invalid-color;
111
- }
112
-
113
- select.form-control {
114
- @include clay-select-variant($input-danger-select);
115
-
116
- &[size] {
117
- @include clay-select-variant($input-danger-select-size);
118
- }
119
-
120
- &[multiple] {
121
- @include clay-select-variant($input-danger-select-multiple);
122
- }
123
- }
124
-
125
- .input-group-item {
126
- &.focus {
127
- box-shadow: setter(
128
- $input-danger-focus-box-shadow,
129
- $input-danger-box-shadow
130
- );
131
-
132
- .form-control,
133
- .input-group-inset-item {
134
- background-color: setter(
135
- $input-danger-focus-bg,
136
- $input-danger-bg
137
- );
138
- border-color: setter(
139
- $input-danger-focus-border-color,
140
- $input-danger-border-color
141
- );
142
- }
143
- }
144
-
145
- .input-group-inset:focus {
146
- box-shadow: none;
147
-
148
- ~ .input-group-inset-item {
149
- background-color: setter(
150
- $input-danger-focus-bg,
151
- $input-danger-bg
152
- );
153
- border-color: setter(
154
- $input-danger-focus-border-color,
155
- $input-danger-border-color
156
- );
157
- }
158
- }
159
- }
160
-
161
- .input-group .input-group-inset-item {
162
- background-color: $input-danger-bg;
163
- border-color: $input-danger-border-color;
164
- box-shadow: $input-danger-box-shadow;
165
- }
82
+ @include clay-form-validation-variant($has-error);
166
83
  }
167
84
 
168
85
  .has-warning {
169
- label {
170
- color: $input-warning-label-color;
171
- }
172
-
173
- .custom-control-label,
174
- .form-check-label {
175
- color: $input-warning-checkbox-label-color;
176
- }
177
-
178
- .form-control {
179
- @include clay-form-control-variant($input-warning);
180
- }
181
-
182
- .form-control[readonly] {
183
- @include clay-form-control-variant($input-warning-readonly);
184
- }
185
-
186
- .form-feedback-item {
187
- color: $form-feedback-warning-color;
188
- }
189
-
190
- select.form-control {
191
- @include clay-select-variant($input-warning-select);
192
-
193
- &[size] {
194
- @include clay-select-variant($input-warning-select-size);
195
- }
196
-
197
- &[multiple] {
198
- @include clay-select-variant($input-warning-select-multiple);
199
- }
200
- }
201
-
202
- .input-group-item {
203
- &.focus {
204
- box-shadow: setter(
205
- $input-warning-focus-box-shadow,
206
- $input-warning-box-shadow
207
- );
208
-
209
- .form-control,
210
- .input-group-inset-item {
211
- background-color: setter(
212
- $input-warning-focus-bg,
213
- $input-warning-bg
214
- );
215
- border-color: setter(
216
- $input-warning-focus-border-color,
217
- $input-warning-border-color
218
- );
219
- }
220
- }
221
-
222
- .input-group-inset:focus {
223
- box-shadow: none;
224
-
225
- ~ .input-group-inset-item {
226
- background-color: setter(
227
- $input-warning-focus-bg,
228
- $input-warning-bg
229
- );
230
- border-color: setter(
231
- $input-warning-focus-border-color,
232
- $input-warning-border-color
233
- );
234
- }
235
- }
236
- }
237
-
238
- .input-group .input-group-inset-item {
239
- background-color: $input-warning-bg;
240
- border-color: $input-warning-border-color;
241
- box-shadow: $input-warning-box-shadow;
242
- }
86
+ @include clay-form-validation-variant($has-warning);
243
87
  }
244
88
 
245
89
  .has-success {
246
- label {
247
- color: $input-success-label-color;
248
- }
249
-
250
- .custom-control-label,
251
- .form-check-label {
252
- color: $input-success-checkbox-label-color;
253
- }
254
-
255
- .form-control {
256
- @include clay-form-control-variant($input-success);
257
- }
258
-
259
- .form-control[readonly] {
260
- @include clay-form-control-variant($input-success-readonly);
261
- }
262
-
263
- .form-feedback-item {
264
- color: $form-feedback-valid-color;
265
- }
266
-
267
- select.form-control {
268
- @include clay-select-variant($input-success-select);
269
-
270
- &[size] {
271
- @include clay-select-variant($input-success-select-size);
272
- }
273
-
274
- &[multiple] {
275
- @include clay-select-variant($input-success-select-multiple);
276
- }
277
- }
278
-
279
- .input-group-item {
280
- &.focus {
281
- box-shadow: setter(
282
- $input-success-focus-box-shadow,
283
- $input-success-box-shadow
284
- );
285
-
286
- .form-control,
287
- .input-group-inset-item {
288
- background-color: setter(
289
- $input-success-focus-bg,
290
- $input-success-bg
291
- );
292
- border-color: setter(
293
- $input-success-focus-border-color,
294
- $input-success-border-color
295
- );
296
- }
297
- }
298
-
299
- .input-group-inset:focus {
300
- box-shadow: none;
301
-
302
- ~ .input-group-inset-item {
303
- background-color: setter(
304
- $input-success-focus-bg,
305
- $input-success-bg
306
- );
307
- border-color: setter(
308
- $input-success-focus-border-color,
309
- $input-success-border-color
310
- );
311
- }
312
- }
313
- }
314
-
315
- .input-group .input-group-inset-item {
316
- background-color: $input-success-bg;
317
- border-color: $input-success-border-color;
318
- box-shadow: $input-success-box-shadow;
319
- }
90
+ @include clay-form-validation-variant($has-success);
320
91
  }
@@ -134,14 +134,7 @@ sup {
134
134
  }
135
135
 
136
136
  a {
137
- color: $link-color;
138
- cursor: $link-cursor;
139
- text-decoration: $link-decoration;
140
-
141
- &:hover {
142
- color: $link-hover-color;
143
- text-decoration: $link-hover-decoration;
144
- }
137
+ @include clay-link($link);
145
138
  }
146
139
 
147
140
  // Code