@dialpad/dialtone 6.11.0 → 6.15.0-beta.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.
- package/CHANGELOG.md +41 -0
- package/lib/build/less/components/button.less +8 -11
- package/lib/build/less/components/link.less +7 -7
- package/lib/build/less/components/popover.less +49 -0
- package/lib/build/less/components/radio-checkbox.less +25 -25
- package/lib/build/less/components/selects.less +5 -5
- package/lib/build/less/components/skeleton.less +43 -0
- package/lib/build/less/components/tabs.less +1 -1
- package/lib/build/less/components/toast.less +1 -1
- package/lib/build/less/components/toggle.less +96 -0
- package/lib/build/less/components/tooltip.less +78 -58
- package/lib/build/less/dialtone-globals.less +11 -0
- package/lib/build/less/dialtone.less +3 -0
- package/lib/build/less/utilities/grid.less +1 -1
- package/lib/build/less/utilities/internals.less +39 -0
- package/lib/build/less/utilities/layout.less +16 -15
- package/lib/build/less/variables/layout.less +2 -0
- package/lib/build/less/variables/typography.less +1 -0
- package/lib/build/svg/system/background-replacement.svg +3 -89
- package/lib/build/svg/system/device-settings.svg +3 -0
- package/lib/dist/css/dialtone.css +3224 -74
- package/lib/dist/css/dialtone.min.css +1 -1
- package/lib/dist/svg/system/background-replacement.svg +1 -1
- package/lib/dist/svg/system/device-settings.svg +1 -0
- package/lib/dist/vue/icons/IconBackgroundReplacement.vue +1 -1
- package/lib/dist/vue/icons/IconDeviceSettings.vue +3 -0
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
+
# [6.15.0-beta.1](https://github.com/dialpad/dialtone/compare/v6.14.0...v6.15.0-beta.1) (2022-02-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add popover css and documentation ([df3d204](https://github.com/dialpad/dialtone/commit/df3d2049a8391918e72c912e79da00b00e00bb07))
|
|
7
|
+
* **device settings:** gear icon for device settings ([#539](https://github.com/dialpad/dialtone/issues/539)) ([805f17f](https://github.com/dialpad/dialtone/commit/805f17ff777419877cf36f49a24b75982bc1eac4))
|
|
8
|
+
|
|
9
|
+
# [6.14.0](https://github.com/dialpad/dialtone/compare/v6.13.0...v6.14.0) (2022-01-28)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* uc-11528 updating background replacement icon in dialtone ([#536](https://github.com/dialpad/dialtone/issues/536)) ([eab4a92](https://github.com/dialpad/dialtone/commit/eab4a9291856e8d260e7e0dcdc5d0846db362ca8))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* add about page ([#537](https://github.com/dialpad/dialtone/issues/537)) ([0d45b71](https://github.com/dialpad/dialtone/commit/0d45b715837dc00a2caaca099c5e02a0d2ed0f0f))
|
|
20
|
+
|
|
21
|
+
# [6.13.0](https://github.com/dialpad/dialtone/compare/v6.12.0...v6.13.0) (2022-01-21)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **button:** loading spinner off center ([#532](https://github.com/dialpad/dialtone/issues/532)) ([9595374](https://github.com/dialpad/dialtone/commit/9595374fadea5c006f0146b9691ea4e06d85a4ea))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* add toggle styles ([#533](https://github.com/dialpad/dialtone/issues/533)) ([4aeeece](https://github.com/dialpad/dialtone/commit/4aeeecea4748d56003d1242980af1b438620fdcb))
|
|
32
|
+
|
|
33
|
+
# [6.12.0](https://github.com/dialpad/dialtone/compare/v6.11.0...v6.12.0) (2022-01-13)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* add documentation for new skeleton component ([#521](https://github.com/dialpad/dialtone/issues/521)) ([574f976](https://github.com/dialpad/dialtone/commit/574f97679619e730050d5a75cadb4fbb020e5af8))
|
|
39
|
+
* implement focus visible ([#524](https://github.com/dialpad/dialtone/issues/524)) ([20938ee](https://github.com/dialpad/dialtone/commit/20938ee94efed2a8ea8c7632a631e2f41ff9a1da))
|
|
40
|
+
* implement focus visible polyfill ([#528](https://github.com/dialpad/dialtone/issues/528)) ([0c3a661](https://github.com/dialpad/dialtone/commit/0c3a661eb2748e03a2a2bfcf75642e7b241bd8bf))
|
|
41
|
+
|
|
1
42
|
# [6.11.0](https://github.com/dialpad/dialtone/compare/v6.10.0...v6.11.0) (2022-01-04)
|
|
2
43
|
|
|
3
44
|
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
--button--bgc: hsla(var(--primary-color-hsl) ~' / ' 10%);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
&:focus {
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
&:focus-visible {
|
|
62
|
+
outline: none;
|
|
63
|
+
box-shadow: var(--bs-focus-ring);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
&[disabled] {
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
--button--bgc: var(--black-100);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
&:focus {
|
|
195
|
+
&:focus-visible {
|
|
196
196
|
box-shadow: var(--bs-focus-ring-circle);
|
|
197
197
|
}
|
|
198
198
|
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
--button--bgc: hsla(var(--muted-color-hsl) ~' / ' 7.5%);
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
&:focus {
|
|
270
|
+
&:focus-visible {
|
|
271
271
|
box-shadow: var(--bs-focus-ring-muted);
|
|
272
272
|
}
|
|
273
273
|
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
--button--fc: var(--error-color-hover);
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
&:focus {
|
|
289
|
+
&:focus-visible {
|
|
290
290
|
box-shadow: var(--bs-focus-ring-error);
|
|
291
291
|
}
|
|
292
292
|
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
--button--bgc: hsla(var(--white-hsl) ~' / ' 15%);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
&:focus {
|
|
320
|
+
&:focus-visible {
|
|
321
321
|
box-shadow: var(--bs-focus-ring-inverted);
|
|
322
322
|
}
|
|
323
323
|
|
|
@@ -363,13 +363,12 @@
|
|
|
363
363
|
background-color: hsl(var(--brand-color-h) var(--brand-color-s) var(--brand-color-l));
|
|
364
364
|
|
|
365
365
|
&:hover,
|
|
366
|
-
&:focus,
|
|
367
366
|
&:active {
|
|
368
367
|
color: hsla(var(--white-hsl) ~' / ' 90%);
|
|
369
368
|
background-color: hsl(var(--brand-color-h) calc(var(--brand-color-s) + 2.5%) calc(var(--brand-color-l) - 5%));
|
|
370
369
|
}
|
|
371
370
|
|
|
372
|
-
&:focus {
|
|
371
|
+
&:focus-visible {
|
|
373
372
|
box-shadow: 0 0 0 var(--su1) var(--white), 0 0 0 0.25em hsla(var(--brand-color-h) var(--brand-color-s) var(--brand-color-l) ~' / ' 90%);
|
|
374
373
|
}
|
|
375
374
|
|
|
@@ -432,8 +431,6 @@
|
|
|
432
431
|
// Show the loading animation
|
|
433
432
|
&::before {
|
|
434
433
|
position: absolute;
|
|
435
|
-
top: calc(50% - var(--su8));
|
|
436
|
-
left: calc(50% - var(--su8));
|
|
437
434
|
width: var(--su16);
|
|
438
435
|
height: var(--su16);
|
|
439
436
|
border: var(--su2) solid currentColor;
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
cursor: pointer;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
&:focus {
|
|
44
|
-
border-radius:
|
|
43
|
+
&:focus-visible {
|
|
44
|
+
border-radius: var(--br4);
|
|
45
45
|
outline: none;
|
|
46
46
|
box-shadow: 0 0 0 var(--su2) var(--focus-ring);
|
|
47
47
|
}
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
color: var(--fc-warning-hover);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
&:focus {
|
|
63
|
+
&:focus-visible {
|
|
64
64
|
box-shadow: 0 0 0 var(--su2) var(--focus-ring-warning);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
color: var(--error-color-hover);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
&:focus {
|
|
77
|
+
&:focus-visible {
|
|
78
78
|
box-shadow: 0 0 0 var(--su2) var(--focus-ring-error);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
color: var(--success-color-hover);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
&:focus {
|
|
91
|
+
&:focus-visible {
|
|
92
92
|
box-shadow: 0 0 0 var(--su2) var(--focus-ring-success);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
color: var(--muted-color-hover);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
&:focus {
|
|
105
|
+
&:focus-visible {
|
|
106
106
|
box-shadow: 0 0 0 var(--su2) var(--focus-ring-muted);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
color: var(--inverted-color-hover);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
&:focus {
|
|
138
|
+
&:focus-visible {
|
|
139
139
|
box-shadow: 0 0 0 var(--su2) var(--focus-ring-inverted);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.d-popover__dialog {
|
|
2
|
+
&,
|
|
3
|
+
*,
|
|
4
|
+
*::before,
|
|
5
|
+
*::after {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
z-index: var(--zi-popover);
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-rows: auto 1fr;
|
|
12
|
+
overflow: auto;
|
|
13
|
+
background-color: var(--white);
|
|
14
|
+
border-color: var(--black-100);
|
|
15
|
+
border-radius: var(--su8);
|
|
16
|
+
box-shadow: var(--bs-card);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.d-popover__content {
|
|
20
|
+
overflow: auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.d-popover__header-footer-base {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
width: 100%;
|
|
27
|
+
min-height: var(--size48);
|
|
28
|
+
padding: var(--su6) var(--su8) var(--su6) var(--su12);
|
|
29
|
+
overflow: auto;
|
|
30
|
+
font-weight: var(--fw-bold);
|
|
31
|
+
font-size: var(--fs16);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.d-popover__header {
|
|
35
|
+
.d-popover__header-footer-base();
|
|
36
|
+
|
|
37
|
+
border-bottom: var(--su1) solid var(--black-075);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.d-popover__footer {
|
|
41
|
+
.d-popover__header-footer-base();
|
|
42
|
+
|
|
43
|
+
border-top: var(--su1) solid var(--black-075);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//When modal overlay is displayed, put the popover anchor on top of it.
|
|
47
|
+
.d-modal[aria-hidden='false'] + .d-popover > * {
|
|
48
|
+
z-index: var(--zi-modal-element);
|
|
49
|
+
}
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
display: none;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
&:focus,
|
|
56
|
-
&:checked:focus {
|
|
57
|
-
|
|
55
|
+
&:focus-visible,
|
|
56
|
+
&:checked:focus-visible {
|
|
57
|
+
--check-radio--bc: var(--check-radio--color);
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
outline: 0;
|
|
60
|
+
box-shadow: var(--bs-focus-ring);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
&:checked {
|
|
@@ -149,8 +149,8 @@
|
|
|
149
149
|
background-size: contain;
|
|
150
150
|
border-radius: var(--br2);
|
|
151
151
|
|
|
152
|
-
&:focus,
|
|
153
|
-
&:checked:focus {
|
|
152
|
+
&:focus-visible,
|
|
153
|
+
&:checked:focus-visible {
|
|
154
154
|
border-radius: var(--br2);
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -209,8 +209,8 @@
|
|
|
209
209
|
--check-radio--color: var(--warning-color);
|
|
210
210
|
--check-radio--bc: var(--check-radio--color);
|
|
211
211
|
|
|
212
|
-
&:focus,
|
|
213
|
-
&:checked:focus {
|
|
212
|
+
&:focus-visible,
|
|
213
|
+
&:checked:focus-visible {
|
|
214
214
|
box-shadow: var(--bs-focus-ring-warning);
|
|
215
215
|
}
|
|
216
216
|
}
|
|
@@ -219,8 +219,8 @@
|
|
|
219
219
|
--check-radio--color: var(--error-color);
|
|
220
220
|
--check-radio--bc: var(--check-radio--color);
|
|
221
221
|
|
|
222
|
-
&:focus,
|
|
223
|
-
&:checked:focus {
|
|
222
|
+
&:focus-visible,
|
|
223
|
+
&:checked:focus-visible {
|
|
224
224
|
box-shadow: var(--bs-focus-ring-error);
|
|
225
225
|
}
|
|
226
226
|
}
|
|
@@ -229,8 +229,8 @@
|
|
|
229
229
|
--check-radio--color: var(--success-color);
|
|
230
230
|
--check-radio--bc: var(--check-radio--color);
|
|
231
231
|
|
|
232
|
-
&:focus,
|
|
233
|
-
&:checked:focus {
|
|
232
|
+
&:focus-visible,
|
|
233
|
+
&:checked:focus-visible {
|
|
234
234
|
box-shadow: var(--bs-focus-ring-success);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
@@ -251,9 +251,9 @@
|
|
|
251
251
|
--check-radio--bgc: var(--black-075);
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
&:focus,
|
|
255
|
-
&:checked:focus {
|
|
256
|
-
|
|
254
|
+
&:focus-visible,
|
|
255
|
+
&:checked:focus-visible {
|
|
256
|
+
box-shadow: var(--bs-focus-ring), inset 0 0 0 var(--su2) var(--white);
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
&:checked {
|
|
@@ -279,9 +279,9 @@
|
|
|
279
279
|
--check-radio--color: var(--warning-color);
|
|
280
280
|
--check-radio--bc: var(--check-radio--color);
|
|
281
281
|
|
|
282
|
-
&:focus,
|
|
283
|
-
&:checked:focus {
|
|
284
|
-
|
|
282
|
+
&:focus-visible,
|
|
283
|
+
&:checked:focus-visible {
|
|
284
|
+
box-shadow: var(--bs-focus-ring-warning), inset 0 0 0 var(--su2) var(--white);
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
|
|
@@ -289,9 +289,9 @@
|
|
|
289
289
|
--check-radio--color: var(--error-color);
|
|
290
290
|
--check-radio--bc: var(--check-radio--color);
|
|
291
291
|
|
|
292
|
-
&:focus,
|
|
293
|
-
&:checked:focus {
|
|
294
|
-
|
|
292
|
+
&:focus-visible,
|
|
293
|
+
&:checked:focus-visible {
|
|
294
|
+
box-shadow: var(--bs-focus-ring-error), inset 0 0 0 var(--su2) var(--white);
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
|
|
@@ -299,8 +299,8 @@
|
|
|
299
299
|
--check-radio--color: var(--success-color);
|
|
300
300
|
--check-radio--bc: var(--check-radio--color);
|
|
301
301
|
|
|
302
|
-
&:focus,
|
|
303
|
-
&:checked:focus {
|
|
304
|
-
|
|
302
|
+
&:focus-visible,
|
|
303
|
+
&:checked:focus-visible {
|
|
304
|
+
box-shadow: var(--bs-focus-ring-success), inset 0 0 0 var(--su2) var(--white);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
border-color: var(--select--bc);
|
|
107
107
|
// [1] Reset the appearance
|
|
108
108
|
-webkit-appearance: none;
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
-moz-appearance: none;
|
|
110
|
+
appearance: none;
|
|
111
111
|
|
|
112
112
|
// [2] Update the styles
|
|
113
113
|
.d-input();
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
&:focus {
|
|
149
149
|
--select--bc: var(--success-color);
|
|
150
150
|
|
|
151
|
-
box-shadow: var(--bs-focus-ring-success);
|
|
151
|
+
box-shadow: var(--bs-focus-ring-success) !important;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
&:focus {
|
|
159
159
|
--select--bc: var(--error-color);
|
|
160
160
|
|
|
161
|
-
box-shadow: var(--bs-focus-ring-error);
|
|
161
|
+
box-shadow: var(--bs-focus-ring-error) !important;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
&:focus {
|
|
169
169
|
--select--bc: var(--warning-color);
|
|
170
170
|
|
|
171
|
-
box-shadow: var(--bs-focus-ring-warning);
|
|
171
|
+
box-shadow: var(--bs-focus-ring-warning) !important;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//
|
|
2
|
+
// DIALTONE
|
|
3
|
+
// COMPONENTS: SKELETON
|
|
4
|
+
//
|
|
5
|
+
// These are the styles for skeleton component.
|
|
6
|
+
// The --placeholder-from-color and --placeholder-to-color custom properties can be set on the parent class of the
|
|
7
|
+
// placeholder to control the animation colors.
|
|
8
|
+
// For further documentation of these styles, please visit https://dialpad.design/components/skeleton
|
|
9
|
+
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// @ SKELETON CONTAINER
|
|
12
|
+
// ----------------------------------------------------------------------------
|
|
13
|
+
.skeleton-placeholder {
|
|
14
|
+
display: flex;
|
|
15
|
+
width: 100%;
|
|
16
|
+
background: var(--placeholder-from-color, @black-075);
|
|
17
|
+
animation-duration: 1000ms;
|
|
18
|
+
fill: var(--placeholder-from-color, @black-075);
|
|
19
|
+
stroke: none;
|
|
20
|
+
|
|
21
|
+
&--animate {
|
|
22
|
+
animation-name: placeholder-throb;
|
|
23
|
+
animation-iteration-count: infinite;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// the animation is used by the skeleton component
|
|
28
|
+
@keyframes placeholder-throb {
|
|
29
|
+
10% {
|
|
30
|
+
background: var(--placeholder-from-color, @black-075);
|
|
31
|
+
fill: var(--placeholder-from-color, @black-075);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
50% {
|
|
35
|
+
background: var(--placeholder-to-color, @black-050);
|
|
36
|
+
fill: var(--placeholder-to-color, @black-050);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
90% {
|
|
40
|
+
background: var(--placeholder-from-color, @black-075);
|
|
41
|
+
fill: var(--placeholder-from-color, @black-075);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
//@import (reference) '../variables/icons.less';
|
|
2
|
+
|
|
3
|
+
//
|
|
4
|
+
// DIALTONE
|
|
5
|
+
// COMPONENTS: TOGGLE
|
|
6
|
+
//
|
|
7
|
+
// These are toggle classes for Dialpad's design system Dialtone.
|
|
8
|
+
// For further documentation of these and other classes,
|
|
9
|
+
// visit https://dialpad.design/components/toggle
|
|
10
|
+
//
|
|
11
|
+
// TABLE OF CONTENTS
|
|
12
|
+
// • BASE STYLE
|
|
13
|
+
// • CHECKED STYLES
|
|
14
|
+
// • DISABLED STYLES
|
|
15
|
+
//
|
|
16
|
+
//
|
|
17
|
+
// ============================================================================
|
|
18
|
+
// $ BASE STYLE
|
|
19
|
+
// ----------------------------------------------------------------------------
|
|
20
|
+
.d-toggle {
|
|
21
|
+
// Component specific CSS Vars
|
|
22
|
+
// ------------------------------------------------------------------------
|
|
23
|
+
--toggle--ta: var(--ttf-in-out);
|
|
24
|
+
--toggle-ts: var(--td200);
|
|
25
|
+
--toggle-bc: var(--black-200);
|
|
26
|
+
|
|
27
|
+
position: relative;
|
|
28
|
+
display: inline-block;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
width: var(--su48);
|
|
31
|
+
height: var(--su24);
|
|
32
|
+
padding: 0;
|
|
33
|
+
line-height: var(--lh4);
|
|
34
|
+
vertical-align: middle;
|
|
35
|
+
background-color: var(--toggle-bc);
|
|
36
|
+
border: var(--su1) solid var(--toggle-bc);
|
|
37
|
+
border-radius: var(--su48);
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
|
|
40
|
+
&__inner {
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: calc(var(--su4) - var(--su1));
|
|
43
|
+
left: var(--su24);
|
|
44
|
+
width: var(--su16);
|
|
45
|
+
height: var(--su16);
|
|
46
|
+
color: var(--white);
|
|
47
|
+
background-image: url("data:image/svg+xml;charset=UTF-8, %3csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3e%3cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z' fill='%23fff' /%3e%3c/svg%3e");
|
|
48
|
+
background-repeat: no-repeat;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&::after {
|
|
52
|
+
position: absolute;
|
|
53
|
+
top: var(--su1);
|
|
54
|
+
left: var(--su1);
|
|
55
|
+
width: calc(var(--su16) + var(--su4));
|
|
56
|
+
height: calc(var(--su16) + var(--su4));
|
|
57
|
+
background-color: var(--white);
|
|
58
|
+
border-radius: var(--br-circle);
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
transition: left var(--toggle-ts) var(--toggle--ta);
|
|
61
|
+
content: ' ';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:focus-visible {
|
|
65
|
+
outline: none;
|
|
66
|
+
box-shadow: var(--bs-focus-ring);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// $$ CHECKED TOGGLE
|
|
71
|
+
// ----------------------------------------------------------------------------
|
|
72
|
+
.d-toggle--checked {
|
|
73
|
+
--toggle-bc: var(--primary-color);
|
|
74
|
+
|
|
75
|
+
.d-toggle__inner {
|
|
76
|
+
left: var(--su6);
|
|
77
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z' fill='%23fff'/%3E%3C/svg%3E");
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&::after {
|
|
81
|
+
left: calc(var(--su24) + var(--su1));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// $$ DISABLED TOGGLE
|
|
86
|
+
// ----------------------------------------------------------------------------
|
|
87
|
+
.d-toggle--disabled,
|
|
88
|
+
.d-toggle[disabled] {
|
|
89
|
+
cursor: not-allowed;
|
|
90
|
+
opacity: 0.5;
|
|
91
|
+
|
|
92
|
+
&::after {
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
transition-property: none;
|
|
95
|
+
}
|
|
96
|
+
}
|