@clayui/css 3.38.0 → 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.
- package/index.js +7 -2
- package/lib/css/atlas.css +819 -966
- package/lib/css/atlas.css.map +1 -1
- package/lib/css/base.css +668 -814
- package/lib/css/base.css.map +1 -1
- package/lib/css/cadmin.css +1013 -881
- package/lib/css/cadmin.css.map +1 -1
- package/lib/images/icons/geolocation.svg +1 -1
- package/lib/images/icons/heading.svg +9 -0
- package/lib/images/icons/icons.svg +1 -1
- package/lib/images/icons/maps.svg +10 -0
- package/lib/images/icons/order-ascending.svg +11 -0
- package/lib/images/icons/order-descending.svg +11 -0
- package/package.json +5 -3
- package/src/images/icons/geolocation.svg +1 -1
- package/src/images/icons/heading.svg +9 -0
- package/src/images/icons/maps.svg +10 -0
- package/src/images/icons/order-ascending.svg +11 -0
- package/src/images/icons/order-descending.svg +11 -0
- package/src/scss/_mixins.scss +1 -0
- package/src/scss/atlas/variables/_alerts.scss +10 -0
- package/src/scss/atlas/variables/_breadcrumbs.scss +4 -2
- package/src/scss/atlas/variables/_cards.scss +2 -2
- package/src/scss/atlas/variables/_custom-forms.scss +190 -14
- package/src/scss/atlas/variables/_dropdowns.scss +188 -17
- package/src/scss/atlas/variables/_forms.scss +33 -1
- package/src/scss/atlas/variables/_globals.scss +14 -1
- package/src/scss/atlas/variables/_labels.scss +171 -71
- package/src/scss/atlas/variables/_navs.scss +20 -8
- package/src/scss/atlas/variables/_pagination.scss +2 -2
- package/src/scss/atlas/variables/_sheets.scss +4 -2
- package/src/scss/atlas/variables/_stickers.scss +167 -3
- package/src/scss/atlas/variables/_tables.scss +58 -28
- package/src/scss/cadmin/components/_alerts.scss +1 -17
- package/src/scss/cadmin/components/_cards.scss +14 -16
- package/src/scss/cadmin/components/_custom-forms.scss +15 -165
- package/src/scss/cadmin/components/_dropdowns.scss +66 -205
- package/src/scss/cadmin/components/_form-validation.scss +10 -237
- package/src/scss/cadmin/components/_forms.scss +1 -1
- package/src/scss/cadmin/components/_grid.scss +20 -20
- package/src/scss/cadmin/components/_icons.scss +1 -6
- package/src/scss/cadmin/components/_images.scss +1 -1
- package/src/scss/cadmin/components/_input-groups.scss +17 -14
- package/src/scss/cadmin/components/_labels.scss +33 -101
- package/src/scss/cadmin/components/_list-group.scss +4 -4
- package/src/scss/cadmin/components/_modals.scss +1 -1
- package/src/scss/cadmin/components/_multi-step-nav.scss +2 -2
- package/src/scss/cadmin/components/_navbar.scss +2 -2
- package/src/scss/cadmin/components/_popovers.scss +34 -30
- package/src/scss/cadmin/components/_reboot.scss +1 -8
- package/src/scss/cadmin/components/_sidebar.scss +1 -1
- package/src/scss/cadmin/components/_stickers.scss +39 -94
- package/src/scss/cadmin/components/_toggle-switch.scss +20 -358
- package/src/scss/cadmin/components/_tooltip.scss +16 -14
- package/src/scss/cadmin/components/_type.scss +9 -1
- package/src/scss/cadmin/variables/_alerts.scss +38 -14
- package/src/scss/cadmin/variables/_breadcrumbs.scss +10 -6
- package/src/scss/cadmin/variables/_cards.scss +96 -28
- package/src/scss/cadmin/variables/_custom-forms.scss +262 -20
- package/src/scss/cadmin/variables/_dropdowns.scss +449 -137
- package/src/scss/cadmin/variables/_forms.scss +356 -5
- package/src/scss/cadmin/variables/_globals.scss +15 -1
- package/src/scss/cadmin/variables/_icons.scss +15 -2
- package/src/scss/cadmin/variables/_labels.scss +288 -101
- package/src/scss/cadmin/variables/_links.scss +9 -7
- package/src/scss/cadmin/variables/_menubar.scss +4 -4
- package/src/scss/cadmin/variables/_multi-step-nav.scss +2 -2
- package/src/scss/cadmin/variables/_navbar.scss +2 -2
- package/src/scss/cadmin/variables/_navs.scss +2 -2
- package/src/scss/cadmin/variables/_stickers.scss +258 -45
- package/src/scss/cadmin/variables/_tables.scss +1 -1
- package/src/scss/cadmin/variables/_timelines.scss +1 -1
- package/src/scss/cadmin/variables/_toggle-switch.scss +404 -1
- package/src/scss/cadmin/variables/_type.scss +3 -0
- package/src/scss/components/_alerts.scss +5 -17
- package/src/scss/components/_cards.scss +7 -7
- package/src/scss/components/_carousel.scss +2 -2
- package/src/scss/components/_custom-forms.scss +20 -164
- package/src/scss/components/_dropdowns.scss +52 -209
- package/src/scss/components/_form-validation.scss +8 -237
- package/src/scss/components/_forms.scss +66 -9
- package/src/scss/components/_grid.scss +15 -17
- package/src/scss/components/_icons.scss +4 -9
- package/src/scss/components/_images.scss +1 -1
- package/src/scss/components/_input-groups.scss +17 -14
- package/src/scss/components/_jumbotron.scss +1 -1
- package/src/scss/components/_labels.scss +29 -99
- package/src/scss/components/_list-group.scss +4 -4
- package/src/scss/components/_modals.scss +1 -1
- package/src/scss/components/_multi-step-nav.scss +2 -2
- package/src/scss/components/_navbar.scss +2 -2
- package/src/scss/components/_popovers.scss +30 -30
- package/src/scss/components/_reboot.scss +3 -39
- package/src/scss/components/_side-navigation.scss +2 -2
- package/src/scss/components/_sidebar.scss +1 -1
- package/src/scss/components/_stickers.scss +36 -94
- package/src/scss/components/_toggle-switch.scss +36 -351
- package/src/scss/components/_tooltip.scss +14 -14
- package/src/scss/components/_type.scss +9 -1
- package/src/scss/components/_utilities-functional-important.scss +4 -3
- package/src/scss/functions/_global-functions.scss +26 -6
- package/src/scss/functions/_lx-icons-generated.scss +125 -117
- package/src/scss/functions/_polyfills.scss +17 -0
- package/src/scss/functions/_type-conversion-functions.scss +5 -4
- package/src/scss/mixins/_alerts.scss +25 -0
- package/src/scss/mixins/_aspect-ratio.scss +1 -1
- package/src/scss/mixins/_buttons.scss +256 -15
- package/src/scss/mixins/_cards.scss +610 -114
- package/src/scss/mixins/_custom-forms.scss +668 -0
- package/src/scss/mixins/_dropdown-menu.scss +168 -48
- package/src/scss/mixins/_forms.scss +427 -12
- package/src/scss/mixins/_globals.scss +244 -234
- package/src/scss/mixins/_grid.scss +13 -15
- package/src/scss/mixins/_labels.scss +331 -97
- package/src/scss/mixins/_links.scss +453 -33
- package/src/scss/mixins/_navbar.scss +10 -10
- package/src/scss/mixins/_rfs.scss +14 -9
- package/src/scss/mixins/_stickers.scss +168 -17
- package/src/scss/mixins/_toggle-switch.scss +1076 -14
- package/src/scss/variables/_alerts.scss +38 -14
- package/src/scss/variables/_breadcrumbs.scss +8 -4
- package/src/scss/variables/_cards.scss +46 -8
- package/src/scss/variables/_custom-forms.scss +253 -18
- package/src/scss/variables/_dropdowns.scss +583 -132
- package/src/scss/variables/_forms.scss +304 -2
- package/src/scss/variables/_globals.scss +54 -1
- package/src/scss/variables/_icons.scss +60 -9
- package/src/scss/variables/_labels.scss +303 -107
- package/src/scss/variables/_links.scss +15 -13
- package/src/scss/variables/_menubar.scss +4 -4
- package/src/scss/variables/_multi-step-nav.scss +2 -2
- package/src/scss/variables/_navbar.scss +2 -2
- package/src/scss/variables/_navs.scss +37 -17
- package/src/scss/variables/_pagination.scss +15 -13
- package/src/scss/variables/_sheets.scss +4 -2
- package/src/scss/variables/_stickers.scss +327 -50
- package/src/scss/variables/_tables.scss +25 -9
- package/src/scss/variables/_timelines.scss +1 -1
- package/src/scss/variables/_toggle-switch.scss +404 -5
- package/src/scss/variables/_type.scss +3 -0
|
@@ -1,386 +1,71 @@
|
|
|
1
|
-
// Simple Toggle Switch
|
|
2
|
-
|
|
3
|
-
.simple-toggle-switch {
|
|
4
|
-
&.toggle-switch {
|
|
5
|
-
align-items: center;
|
|
6
|
-
display: inline-flex;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.toggle-switch-check + .toggle-switch-label {
|
|
10
|
-
margin-right: $simple-toggle-switch-label-spacer-x;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.toggle-switch-label + .toggle-switch-check-bar {
|
|
14
|
-
margin-left: $simple-toggle-switch-label-spacer-x;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.toggle-switch-label {
|
|
18
|
-
line-height: $simple-toggle-switch-label-line-height;
|
|
19
|
-
margin-bottom: 0;
|
|
20
|
-
max-width: calc(
|
|
21
|
-
100% - #{clay-data-label-text-position(
|
|
22
|
-
$toggle-switch-bar-width,
|
|
23
|
-
$toggle-switch-bar-padding
|
|
24
|
-
)}
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
@include clay-scale-component {
|
|
28
|
-
max-width: calc(
|
|
29
|
-
100% - #{clay-data-label-text-position(
|
|
30
|
-
$toggle-switch-bar-width-mobile,
|
|
31
|
-
$toggle-switch-bar-padding-mobile
|
|
32
|
-
)}
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.simple-toggle-switch-reverse {
|
|
39
|
-
.toggle-switch-label {
|
|
40
|
-
margin-right: $simple-toggle-switch-label-spacer-x;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.toggle-switch-check-bar {
|
|
44
|
-
order: 5;
|
|
45
|
-
|
|
46
|
-
.toggle-switch-bar {
|
|
47
|
-
order: 0;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.toggle-switch-bar {
|
|
52
|
-
order: 5;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
1
|
// Toggle Switch
|
|
57
2
|
|
|
58
|
-
label.toggle-switch {
|
|
59
|
-
cursor: $toggle-switch-cursor;
|
|
60
|
-
|
|
61
|
-
&.disabled {
|
|
62
|
-
cursor: $toggle-switch-disabled-cursor;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
3
|
.toggle-switch {
|
|
67
|
-
|
|
68
|
-
font-weight: $toggle-switch-font-weight;
|
|
69
|
-
max-width: 100%;
|
|
70
|
-
position: relative;
|
|
71
|
-
|
|
72
|
-
&.disabled {
|
|
73
|
-
.toggle-switch-label {
|
|
74
|
-
color: $toggle-switch-label-disabled-color;
|
|
75
|
-
cursor: $toggle-switch-disabled-cursor;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.toggle-switch-text {
|
|
79
|
-
color: $toggle-switch-text-disabled-color;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
4
|
+
@include clay-toggle-switch-variant($toggle-switch);
|
|
82
5
|
}
|
|
83
6
|
|
|
84
7
|
.toggle-switch-check-bar {
|
|
85
|
-
|
|
86
|
-
position: relative;
|
|
8
|
+
@include clay-css($toggle-switch-check-bar);
|
|
87
9
|
}
|
|
88
10
|
|
|
89
11
|
.toggle-switch-bar {
|
|
90
|
-
|
|
91
|
-
display: block;
|
|
92
|
-
min-width: $toggle-switch-bar-width;
|
|
93
|
-
text-transform: uppercase;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.toggle-switch-icon {
|
|
97
|
-
font-size: $toggle-switch-bar-font-size;
|
|
98
|
-
|
|
99
|
-
.lexicon-icon {
|
|
100
|
-
margin-top: -0.2em;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.button-icon {
|
|
105
|
-
font-size: $toggle-switch-button-font-size;
|
|
106
|
-
}
|
|
12
|
+
@include clay-toggle-switch-bar-variant($toggle-switch-bar);
|
|
107
13
|
}
|
|
108
14
|
|
|
109
15
|
.toggle-switch-check {
|
|
110
|
-
|
|
111
|
-
font-size: 62.5%;
|
|
112
|
-
height: $toggle-switch-bar-height;
|
|
113
|
-
opacity: 0;
|
|
114
|
-
position: absolute;
|
|
115
|
-
width: $toggle-switch-bar-width;
|
|
116
|
-
z-index: 2;
|
|
117
|
-
|
|
118
|
-
@include clay-scale-component {
|
|
119
|
-
height: $toggle-switch-bar-height-mobile;
|
|
120
|
-
width: $toggle-switch-bar-width-mobile;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&:empty ~ .toggle-switch-bar {
|
|
124
|
-
display: inline-flex;
|
|
125
|
-
font-size: $toggle-switch-bar-font-size;
|
|
126
|
-
height: $toggle-switch-bar-height;
|
|
127
|
-
line-height: $toggle-switch-bar-height;
|
|
128
|
-
position: relative;
|
|
129
|
-
text-indent: 0;
|
|
130
|
-
|
|
131
|
-
-ms-user-select: none;
|
|
132
|
-
user-select: none;
|
|
133
|
-
|
|
134
|
-
&:after {
|
|
135
|
-
background-color: $toggle-switch-button-bg;
|
|
136
|
-
border-color: $toggle-switch-button-border-color;
|
|
137
|
-
|
|
138
|
-
@include border-radius($toggle-switch-button-border-radius);
|
|
139
|
-
|
|
140
|
-
border-style: solid;
|
|
141
|
-
border-width: $toggle-switch-button-border-width;
|
|
142
|
-
bottom: $toggle-switch-bar-padding;
|
|
143
|
-
content: '';
|
|
144
|
-
display: block;
|
|
145
|
-
height: $toggle-switch-button-width;
|
|
146
|
-
left: $toggle-switch-bar-padding;
|
|
147
|
-
position: absolute;
|
|
148
|
-
top: $toggle-switch-bar-padding;
|
|
149
|
-
transition: $toggle-switch-transition;
|
|
150
|
-
width: $toggle-switch-button-width;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
&:before {
|
|
154
|
-
background-color: $toggle-switch-bar-bg;
|
|
155
|
-
border-color: $toggle-switch-bar-border-color;
|
|
156
|
-
|
|
157
|
-
@include border-radius($toggle-switch-bar-border-radius);
|
|
158
|
-
|
|
159
|
-
border-style: solid;
|
|
160
|
-
border-width: $toggle-switch-bar-border-width;
|
|
161
|
-
bottom: 0;
|
|
162
|
-
content: ' ';
|
|
163
|
-
display: block;
|
|
164
|
-
left: 0;
|
|
165
|
-
position: absolute;
|
|
166
|
-
top: 0;
|
|
167
|
-
transition: $toggle-switch-transition;
|
|
168
|
-
width: $toggle-switch-bar-width;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.toggle-switch-handle {
|
|
172
|
-
&:after {
|
|
173
|
-
content: attr(data-label-off);
|
|
174
|
-
margin-left: clay-data-label-text-position(
|
|
175
|
-
$toggle-switch-bar-width,
|
|
176
|
-
$toggle-switch-bar-padding
|
|
177
|
-
);
|
|
178
|
-
transition: $toggle-switch-transition;
|
|
179
|
-
white-space: nowrap;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
&:before {
|
|
183
|
-
transition: $toggle-switch-transition;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.toggle-switch-icon {
|
|
188
|
-
color: $toggle-switch-bar-icon-color;
|
|
189
|
-
left: $toggle-switch-bar-padding;
|
|
190
|
-
line-height: $toggle-switch-button-width;
|
|
191
|
-
position: absolute;
|
|
192
|
-
text-align: center;
|
|
193
|
-
text-indent: 0;
|
|
194
|
-
top: $toggle-switch-bar-padding;
|
|
195
|
-
transition: $toggle-switch-transition;
|
|
196
|
-
width: $toggle-switch-button-width;
|
|
197
|
-
z-index: 1;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.toggle-switch-icon-on {
|
|
201
|
-
left: $toggle-switch-bar-padding;
|
|
202
|
-
opacity: 0;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.toggle-switch-icon-off {
|
|
206
|
-
left: $toggle-switch-bar-width - $toggle-switch-bar-padding -
|
|
207
|
-
$toggle-switch-button-width;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.button-icon {
|
|
211
|
-
color: $toggle-switch-button-icon-color;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.button-icon-on {
|
|
215
|
-
opacity: 0;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
&:checked ~ .toggle-switch-bar {
|
|
220
|
-
&:after {
|
|
221
|
-
background-color: $toggle-switch-button-on-bg;
|
|
222
|
-
border-color: $toggle-switch-button-on-border-color;
|
|
223
|
-
|
|
224
|
-
@include border-radius($toggle-switch-button-on-border-radius);
|
|
225
|
-
|
|
226
|
-
border-style: solid;
|
|
227
|
-
border-width: $toggle-switch-button-border-width;
|
|
228
|
-
left: $toggle-switch-bar-width - $toggle-switch-bar-padding -
|
|
229
|
-
$toggle-switch-button-width;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
&:before {
|
|
233
|
-
background-color: $toggle-switch-bar-on-bg;
|
|
234
|
-
border-color: $toggle-switch-bar-on-border-color;
|
|
235
|
-
|
|
236
|
-
@include border-radius($toggle-switch-bar-border-radius);
|
|
237
|
-
|
|
238
|
-
border-style: solid;
|
|
239
|
-
border-width: $toggle-switch-bar-border-width;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.toggle-switch-handle:after {
|
|
243
|
-
content: attr(data-label-on);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.toggle-switch-icon {
|
|
247
|
-
color: $toggle-switch-bar-on-icon-color;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.button-icon {
|
|
251
|
-
color: $toggle-switch-button-on-icon-color;
|
|
252
|
-
left: $toggle-switch-bar-width - $toggle-switch-bar-padding -
|
|
253
|
-
$toggle-switch-button-width;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.button-icon-on,
|
|
257
|
-
.toggle-switch-icon-on {
|
|
258
|
-
opacity: 1;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.button-icon-off,
|
|
262
|
-
.toggle-switch-icon-off {
|
|
263
|
-
opacity: 0;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
&:disabled,
|
|
268
|
-
&.disabled {
|
|
269
|
-
~ .toggle-switch-bar {
|
|
270
|
-
cursor: $toggle-switch-disabled-cursor;
|
|
271
|
-
opacity: $toggle-switch-disabled-opacity;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
&:focus ~ .toggle-switch-bar:before {
|
|
276
|
-
box-shadow: $toggle-switch-bar-focus-box-shadow;
|
|
277
|
-
}
|
|
16
|
+
@include clay-toggle-switch-check-variant($toggle-switch-check);
|
|
278
17
|
}
|
|
279
18
|
|
|
280
19
|
.toggle-switch-label {
|
|
281
|
-
|
|
282
|
-
margin-bottom: 2px;
|
|
20
|
+
@include clay-css($toggle-switch-label);
|
|
283
21
|
}
|
|
284
22
|
|
|
285
23
|
.toggle-switch-text {
|
|
286
|
-
|
|
287
|
-
font-size: $toggle-switch-text-font-size;
|
|
24
|
+
@include clay-css($toggle-switch-text);
|
|
288
25
|
}
|
|
289
26
|
|
|
290
27
|
.toggle-switch-text-left {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
.toggle-switch-text-right {
|
|
297
|
-
display: inline-flex;
|
|
298
|
-
line-height: $toggle-switch-bar-height;
|
|
299
|
-
margin-left: 8px;
|
|
300
|
-
}
|
|
28
|
+
$breakpoint-down: setter(
|
|
29
|
+
map-get($toggle-switch-text-left, breakpoint-down),
|
|
30
|
+
sm
|
|
31
|
+
);
|
|
301
32
|
|
|
302
|
-
@include clay-
|
|
303
|
-
.toggle-switch-bar {
|
|
304
|
-
.toggle-switch-handle {
|
|
305
|
-
min-width: $toggle-switch-bar-width-mobile;
|
|
306
|
-
}
|
|
33
|
+
@include clay-css($toggle-switch-text-left);
|
|
307
34
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
.button-icon {
|
|
313
|
-
font-size: $toggle-switch-button-font-size-mobile;
|
|
314
|
-
}
|
|
35
|
+
@include media-breakpoint-down($breakpoint-down) {
|
|
36
|
+
@include clay-css(map-get($toggle-switch-text-left, mobile));
|
|
315
37
|
}
|
|
38
|
+
}
|
|
316
39
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
&:after {
|
|
324
|
-
bottom: $toggle-switch-bar-padding-mobile;
|
|
325
|
-
height: $toggle-switch-button-width-mobile;
|
|
326
|
-
left: $toggle-switch-bar-padding-mobile;
|
|
327
|
-
top: $toggle-switch-bar-padding-mobile;
|
|
328
|
-
width: $toggle-switch-button-width-mobile;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
&:before {
|
|
332
|
-
width: $toggle-switch-bar-width-mobile;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.toggle-switch-handle:after {
|
|
336
|
-
margin-left: clay-data-label-text-position(
|
|
337
|
-
$toggle-switch-bar-width-mobile,
|
|
338
|
-
$toggle-switch-bar-padding-mobile
|
|
339
|
-
);
|
|
340
|
-
}
|
|
40
|
+
.toggle-switch-text-right {
|
|
41
|
+
$breakpoint-down: setter(
|
|
42
|
+
map-get($toggle-switch-text-right, breakpoint-down),
|
|
43
|
+
sm
|
|
44
|
+
);
|
|
341
45
|
|
|
342
|
-
|
|
343
|
-
left: $toggle-switch-bar-padding-mobile;
|
|
344
|
-
line-height: $toggle-switch-button-width-mobile;
|
|
345
|
-
top: $toggle-switch-bar-padding-mobile;
|
|
346
|
-
width: $toggle-switch-button-width-mobile;
|
|
347
|
-
}
|
|
46
|
+
@include clay-css($toggle-switch-text-right);
|
|
348
47
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
48
|
+
@include media-breakpoint-down($breakpoint-down) {
|
|
49
|
+
@include clay-css(map-get($toggle-switch-text-right, mobile));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
352
52
|
|
|
353
|
-
|
|
354
|
-
left: $toggle-switch-bar-width-mobile -
|
|
355
|
-
$toggle-switch-bar-padding-mobile -
|
|
356
|
-
$toggle-switch-button-width-mobile;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
53
|
+
// Simple Toggle Switch
|
|
359
54
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
left: $toggle-switch-bar-width-mobile -
|
|
363
|
-
$toggle-switch-bar-padding-mobile -
|
|
364
|
-
$toggle-switch-button-width-mobile;
|
|
365
|
-
}
|
|
55
|
+
.simple-toggle-switch {
|
|
56
|
+
@include clay-toggle-switch-variant($simple-toggle-switch);
|
|
366
57
|
|
|
367
|
-
|
|
368
|
-
margin-left: clay-data-label-text-position(
|
|
369
|
-
$toggle-switch-bar-width-mobile,
|
|
370
|
-
$toggle-switch-bar-padding-mobile
|
|
371
|
-
);
|
|
372
|
-
}
|
|
58
|
+
// deprecated
|
|
373
59
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
$toggle-switch-bar-padding-mobile -
|
|
377
|
-
$toggle-switch-button-width-mobile;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
60
|
+
.toggle-switch-check + .toggle-switch-label {
|
|
61
|
+
margin-right: $simple-toggle-switch-label-spacer-x;
|
|
380
62
|
}
|
|
381
63
|
|
|
382
|
-
.toggle-switch-
|
|
383
|
-
|
|
384
|
-
line-height: $toggle-switch-bar-height-mobile;
|
|
64
|
+
.toggle-switch-label + .toggle-switch-check-bar {
|
|
65
|
+
margin-left: $simple-toggle-switch-label-spacer-x;
|
|
385
66
|
}
|
|
386
67
|
}
|
|
68
|
+
|
|
69
|
+
.simple-toggle-switch-reverse {
|
|
70
|
+
@include clay-toggle-switch-variant($simple-toggle-switch-reverse);
|
|
71
|
+
}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
&::before {
|
|
71
71
|
border-top-color: $tooltip-arrow-color;
|
|
72
|
-
border-width: $tooltip-arrow-height ($tooltip-arrow-width
|
|
72
|
+
border-width: $tooltip-arrow-height ($tooltip-arrow-width * 0.5) 0;
|
|
73
73
|
top: 0;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
|
|
86
86
|
&::before {
|
|
87
87
|
border-right-color: $tooltip-arrow-color;
|
|
88
|
-
border-width: ($tooltip-arrow-width
|
|
89
|
-
($tooltip-arrow-width
|
|
88
|
+
border-width: ($tooltip-arrow-width * 0.5) $tooltip-arrow-height
|
|
89
|
+
($tooltip-arrow-width * 0.5) 0;
|
|
90
90
|
right: 0;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
|
|
101
101
|
&::before {
|
|
102
102
|
border-bottom-color: $tooltip-arrow-color;
|
|
103
|
-
border-width: 0 ($tooltip-arrow-width
|
|
103
|
+
border-width: 0 ($tooltip-arrow-width * 0.5) $tooltip-arrow-height;
|
|
104
104
|
bottom: 0;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
|
|
117
117
|
&::before {
|
|
118
118
|
border-left-color: $tooltip-arrow-color;
|
|
119
|
-
border-width: ($tooltip-arrow-width
|
|
120
|
-
($tooltip-arrow-width
|
|
119
|
+
border-width: ($tooltip-arrow-width * 0.5) 0
|
|
120
|
+
($tooltip-arrow-width * 0.5) $tooltip-arrow-height;
|
|
121
121
|
left: 0;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
.clay-tooltip-top {
|
|
150
150
|
.arrow {
|
|
151
151
|
left: 50%;
|
|
152
|
-
margin-left: -($tooltip-arrow-width
|
|
152
|
+
margin-left: math-sign($tooltip-arrow-width * 0.5);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
.clay-tooltip-left,
|
|
171
171
|
.clay-tooltip-right {
|
|
172
172
|
.arrow {
|
|
173
|
-
margin-top: -($tooltip-arrow-width
|
|
173
|
+
margin-top: math-sign($tooltip-arrow-width * 0.5);
|
|
174
174
|
top: 50%;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
|
|
202
202
|
&::before {
|
|
203
203
|
border-bottom-color: $tooltip-arrow-color;
|
|
204
|
-
border-width: 0 ($tooltip-arrow-width
|
|
204
|
+
border-width: 0 ($tooltip-arrow-width * 0.5) $tooltip-arrow-height;
|
|
205
205
|
bottom: 0;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
@@ -228,8 +228,8 @@
|
|
|
228
228
|
|
|
229
229
|
&::before {
|
|
230
230
|
border-left-color: $tooltip-arrow-color;
|
|
231
|
-
border-width: ($tooltip-arrow-width
|
|
232
|
-
($tooltip-arrow-width
|
|
231
|
+
border-width: ($tooltip-arrow-width * 0.5) 0
|
|
232
|
+
($tooltip-arrow-width * 0.5) $tooltip-arrow-height;
|
|
233
233
|
left: 0;
|
|
234
234
|
}
|
|
235
235
|
}
|
|
@@ -256,8 +256,8 @@
|
|
|
256
256
|
|
|
257
257
|
&::before {
|
|
258
258
|
border-right-color: $tooltip-arrow-color;
|
|
259
|
-
border-width: ($tooltip-arrow-width
|
|
260
|
-
($tooltip-arrow-width
|
|
259
|
+
border-width: ($tooltip-arrow-width * 0.5) $tooltip-arrow-height
|
|
260
|
+
($tooltip-arrow-width * 0.5) 0;
|
|
261
261
|
right: 0;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
|
|
283
283
|
&::before {
|
|
284
284
|
border-top-color: $tooltip-arrow-color;
|
|
285
|
-
border-width: $tooltip-arrow-height ($tooltip-arrow-width
|
|
285
|
+
border-width: $tooltip-arrow-height ($tooltip-arrow-width * 0.5) 0;
|
|
286
286
|
top: 0;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
@@ -202,7 +202,7 @@ strong {
|
|
|
202
202
|
@include clay-css($c-kbd-group);
|
|
203
203
|
|
|
204
204
|
> .c-kbd {
|
|
205
|
-
|
|
205
|
+
@include clay-css(setter(map-get($c-kbd-group, c-kbd), ()));
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
|
|
@@ -265,6 +265,10 @@ strong {
|
|
|
265
265
|
|
|
266
266
|
.c-kbd-group-sm {
|
|
267
267
|
@include clay-css($c-kbd-group-sm);
|
|
268
|
+
|
|
269
|
+
> .c-kbd {
|
|
270
|
+
@include clay-css(setter(map-get($c-kbd-group-sm, c-kbd), ()));
|
|
271
|
+
}
|
|
268
272
|
}
|
|
269
273
|
|
|
270
274
|
.c-kbd-sm,
|
|
@@ -280,6 +284,10 @@ strong {
|
|
|
280
284
|
|
|
281
285
|
.c-kbd-group-lg {
|
|
282
286
|
@include clay-css($c-kbd-group-lg);
|
|
287
|
+
|
|
288
|
+
> .c-kbd {
|
|
289
|
+
@include clay-css(setter(map-get($c-kbd-group-lg, c-kbd), ()));
|
|
290
|
+
}
|
|
283
291
|
}
|
|
284
292
|
|
|
285
293
|
.c-kbd-lg,
|
|
@@ -218,9 +218,10 @@
|
|
|
218
218
|
|
|
219
219
|
.embed-responsive-#{$embed-responsive-aspect-ratio-x}by#{$embed-responsive-aspect-ratio-y} {
|
|
220
220
|
&::before {
|
|
221
|
-
padding-top:
|
|
222
|
-
$embed-responsive-aspect-ratio-y /
|
|
223
|
-
$embed-responsive-aspect-ratio-x
|
|
221
|
+
padding-top: calc(
|
|
222
|
+
#{$embed-responsive-aspect-ratio-y} /
|
|
223
|
+
#{$embed-responsive-aspect-ratio-x} *
|
|
224
|
+
100%
|
|
224
225
|
);
|
|
225
226
|
}
|
|
226
227
|
}
|
|
@@ -2,10 +2,30 @@
|
|
|
2
2
|
/// @group globals
|
|
3
3
|
////
|
|
4
4
|
|
|
5
|
+
@import '_polyfills.scss';
|
|
6
|
+
|
|
5
7
|
@import '_color-functions.scss';
|
|
6
8
|
@import '_lx-icons-generated.scss';
|
|
7
9
|
@import '_type-conversion-functions.scss';
|
|
8
10
|
|
|
11
|
+
/// A helper function that calculates text-indent of data-label-on and data-label-off in a `.toggle-switch`.
|
|
12
|
+
/// @param {Number} $toggle-switch-width - Width of switch bar
|
|
13
|
+
/// @param {Number} $toggle-switch-padding - Space between button and bar
|
|
14
|
+
/// @param {Number} $label-spacer-x[8px] - Space between toggle-switch-bar and data-label
|
|
15
|
+
|
|
16
|
+
@function clay-data-label-text-position(
|
|
17
|
+
$toggle-switch-width,
|
|
18
|
+
$toggle-switch-padding,
|
|
19
|
+
$label-spacer-x: 8px
|
|
20
|
+
) {
|
|
21
|
+
@if ($toggle-switch-padding < 0) {
|
|
22
|
+
$toggle-switch-width: $toggle-switch-width +
|
|
23
|
+
abs($toggle-switch-padding);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@return $toggle-switch-width + $label-spacer-x;
|
|
27
|
+
}
|
|
28
|
+
|
|
9
29
|
/// A function that returns a new map with all the keys and values including nested keys and values from both `$map1` and `$map2`. If both `$map1` and `$map2` have the same key, `$map2`’s value takes precedence.
|
|
10
30
|
/// @param {Map, Null} $map1[()]
|
|
11
31
|
/// @param {Map, Null} $map2[()]
|
|
@@ -125,7 +145,7 @@
|
|
|
125
145
|
$str1: '#{$str1}#{$offset} + ';
|
|
126
146
|
}
|
|
127
147
|
|
|
128
|
-
$str2: '(((#{$font-size} * #{$line-height}) - 1em)
|
|
148
|
+
$str2: '(((#{$font-size} * #{$line-height}) - 1em) * 0.5)';
|
|
129
149
|
|
|
130
150
|
@return (calc(#{$str1}#{$str2}));
|
|
131
151
|
}
|
|
@@ -140,10 +160,10 @@
|
|
|
140
160
|
@function clay-px-to-rem($number, $add-unit: false, $base: 16) {
|
|
141
161
|
@if type-of($number) == 'number' {
|
|
142
162
|
@if unit($number) == 'px' {
|
|
143
|
-
$number: $number
|
|
144
|
-
$number: $number
|
|
163
|
+
$number: clay-div($number, 1px);
|
|
164
|
+
$number: clay-div($number, $base);
|
|
145
165
|
} @else if unitless($number) {
|
|
146
|
-
$number: $number
|
|
166
|
+
$number: clay-div($number, $base);
|
|
147
167
|
} @else {
|
|
148
168
|
@debug 'Unable to convert: #{$number} should be a `px` value.';
|
|
149
169
|
}
|
|
@@ -467,7 +487,7 @@
|
|
|
467
487
|
$g: clay-green($color);
|
|
468
488
|
$b: clay-blue($color);
|
|
469
489
|
|
|
470
|
-
$yiq: (($r * 299) + ($g * 587) + ($b * 114))
|
|
490
|
+
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) * 0.001;
|
|
471
491
|
|
|
472
492
|
$dark: setter(
|
|
473
493
|
$dark,
|
|
@@ -739,7 +759,7 @@
|
|
|
739
759
|
$index: 0;
|
|
740
760
|
$slice: 2000;
|
|
741
761
|
|
|
742
|
-
$loops: ceil(str-length($svg)
|
|
762
|
+
$loops: ceil(clay-div(str-length($svg), $slice));
|
|
743
763
|
|
|
744
764
|
@for $i from 1 through $loops {
|
|
745
765
|
$chunk: str-slice($svg, $index, $index + $slice - 1);
|