fu-kit 0.7.2 → 1.0.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/LICENCE.txt +20 -20
- package/README.md +21 -21
- package/package.json +44 -42
- package/src/components/UIButtonRoute.vue +79 -0
- package/src/components/UiButton.vue +202 -169
- package/src/components/UiButtonLink.vue +74 -74
- package/src/components/UiCheck.vue +206 -206
- package/src/components/UiCodeInput.vue +47 -36
- package/src/components/UiCopy.vue +88 -88
- package/src/components/UiDropdown.vue +109 -109
- package/src/components/UiDropdownItem.vue +66 -66
- package/src/components/UiIcon.vue +29 -29
- package/src/components/UiIconProvider.vue +511 -32
- package/src/components/UiImg.vue +72 -0
- package/src/components/UiModal.vue +103 -103
- package/src/components/UiSelectX.vue +312 -312
- package/src/components/UiSidebar.vue +118 -118
- package/src/components/UiText.vue +121 -121
- package/src/components/UiTextarea.vue +117 -117
- package/src/entry.js +23 -21
- package/src/scss-kit/colors.scss +2 -3
- package/src/scss-kit/media.scss +3 -3
- package/src/scss-kit/pal_dark.scss +6 -6
- package/src/scss-kit/pal_fu.scss +8 -8
- package/src/scss-kit/pal_light.scss +6 -6
- package/src/scss-kit/typo.scss +39 -39
- package/src/scss-kit/typo_default.scss +4 -2
- package/src/scss-kit/ui.scss +49 -49
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<button
|
|
3
|
-
v-bind="{
|
|
4
|
-
...$attrs,
|
|
5
|
-
type: $attrs.type || 'button',
|
|
6
|
-
class: 'ui-button-link',
|
|
7
|
-
}"
|
|
8
|
-
@mouseup="mUp"
|
|
9
|
-
>
|
|
10
|
-
<slot />
|
|
11
|
-
</button>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
import { defineComponent } from 'vue'
|
|
16
|
-
|
|
17
|
-
export default defineComponent({
|
|
18
|
-
name: 'ui-button-link',
|
|
19
|
-
props: {
|
|
20
|
-
hollow: { type: Boolean, default: false },
|
|
21
|
-
},
|
|
22
|
-
setup (props) {
|
|
23
|
-
const mUp = (e) => e.target.blur()
|
|
24
|
-
return { hollow: props.hollow, mUp }
|
|
25
|
-
},
|
|
26
|
-
})
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<style lang="scss" scoped>
|
|
30
|
-
@import "../../scss";
|
|
31
|
-
|
|
32
|
-
.ui-button-link {
|
|
33
|
-
@include typo(200);
|
|
34
|
-
padding: spacing(0, 0);
|
|
35
|
-
|
|
36
|
-
display: inline-block;
|
|
37
|
-
box-sizing: border-box;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
font-family: var(--typo-font-text);
|
|
40
|
-
border: 0 none;
|
|
41
|
-
transition: all var(--ui-transition);
|
|
42
|
-
background: transparent;
|
|
43
|
-
color: var(--pal-link);
|
|
44
|
-
line-height: 1;
|
|
45
|
-
will-change: box-shadow, transform;
|
|
46
|
-
outline: none;
|
|
47
|
-
user-select: none;
|
|
48
|
-
-webkit-tap-highlight-color: transparent;
|
|
49
|
-
text-decoration: none;
|
|
50
|
-
|
|
51
|
-
& > * {
|
|
52
|
-
pointer-events: none;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&:hover {
|
|
56
|
-
text-decoration: underline;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&:focus {
|
|
60
|
-
color: var(--pal-link-active);
|
|
61
|
-
text-decoration: underline;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&:active {
|
|
65
|
-
color: var(--pal-link-active);
|
|
66
|
-
text-decoration: underline;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&:disabled {
|
|
70
|
-
cursor: not-allowed;
|
|
71
|
-
color: var(--ui-pal-disabled);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
v-bind="{
|
|
4
|
+
...$attrs,
|
|
5
|
+
type: $attrs.type || 'button',
|
|
6
|
+
class: 'ui-button-link',
|
|
7
|
+
}"
|
|
8
|
+
@mouseup="mUp"
|
|
9
|
+
>
|
|
10
|
+
<slot />
|
|
11
|
+
</button>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import { defineComponent } from 'vue'
|
|
16
|
+
|
|
17
|
+
export default defineComponent({
|
|
18
|
+
name: 'ui-button-link',
|
|
19
|
+
props: {
|
|
20
|
+
hollow: { type: Boolean, default: false },
|
|
21
|
+
},
|
|
22
|
+
setup (props) {
|
|
23
|
+
const mUp = (e) => e.target.blur()
|
|
24
|
+
return { hollow: props.hollow, mUp }
|
|
25
|
+
},
|
|
26
|
+
})
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style lang="scss" scoped>
|
|
30
|
+
@import "../../scss";
|
|
31
|
+
|
|
32
|
+
.ui-button-link {
|
|
33
|
+
@include typo(200);
|
|
34
|
+
padding: spacing(0, 0);
|
|
35
|
+
|
|
36
|
+
display: inline-block;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
font-family: var(--typo-font-text);
|
|
40
|
+
border: 0 none;
|
|
41
|
+
transition: all var(--ui-transition);
|
|
42
|
+
background: transparent;
|
|
43
|
+
color: var(--pal-link);
|
|
44
|
+
line-height: 1;
|
|
45
|
+
will-change: box-shadow, transform;
|
|
46
|
+
outline: none;
|
|
47
|
+
user-select: none;
|
|
48
|
+
-webkit-tap-highlight-color: transparent;
|
|
49
|
+
text-decoration: none;
|
|
50
|
+
|
|
51
|
+
& > * {
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
text-decoration: underline;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:focus {
|
|
60
|
+
color: var(--pal-link-active);
|
|
61
|
+
text-decoration: underline;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:active {
|
|
65
|
+
color: var(--pal-link-active);
|
|
66
|
+
text-decoration: underline;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&:disabled {
|
|
70
|
+
cursor: not-allowed;
|
|
71
|
+
color: var(--ui-pal-disabled);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -1,206 +1,206 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<label
|
|
3
|
-
:class="{'_disabled': isDisabled, '_checked': modelValue }"
|
|
4
|
-
class="ui-check"
|
|
5
|
-
v-bind="{ class: $attrs.class, style: $attrs.style }"
|
|
6
|
-
@mouseup="mouseUp"
|
|
7
|
-
>
|
|
8
|
-
<input
|
|
9
|
-
ref="inputRef"
|
|
10
|
-
:checked="modelValue"
|
|
11
|
-
class="ui-check_input"
|
|
12
|
-
v-bind="{...$attrs, disabled: isDisabled, type: 'checkbox', class: undefined, style: undefined}"
|
|
13
|
-
@input="$emit('update:modelValue', $event.target.checked)"
|
|
14
|
-
>
|
|
15
|
-
<span
|
|
16
|
-
:class="{
|
|
17
|
-
'ui-check_switch': switchLike,
|
|
18
|
-
'ui-check_check': !switchLike,
|
|
19
|
-
_loading: isLoading
|
|
20
|
-
}"
|
|
21
|
-
class="ui-check_box"
|
|
22
|
-
>
|
|
23
|
-
<svg v-if="!switchLike" class="ui-check_check-icon" viewBox="0 0 24 24">
|
|
24
|
-
<path d="m7.5 12.5 4 3 5.5-8" stroke="var(--ui-pal, currentColor)" stroke-linecap="round" stroke-width="2" />
|
|
25
|
-
</svg>
|
|
26
|
-
</span>
|
|
27
|
-
<slot />
|
|
28
|
-
</label>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<script>
|
|
32
|
-
import { computed, defineComponent, ref } from 'vue'
|
|
33
|
-
|
|
34
|
-
export default defineComponent({
|
|
35
|
-
name: 'ui-check',
|
|
36
|
-
props: {
|
|
37
|
-
modelValue: { type: Boolean, default: false },
|
|
38
|
-
switchLike: { type: Boolean, default: false },
|
|
39
|
-
thin: { type: Boolean, default: false },
|
|
40
|
-
isLoading: { type: Boolean, default: false },
|
|
41
|
-
disabled: { type: Boolean, default: false },
|
|
42
|
-
},
|
|
43
|
-
emits: [ 'update:modelValue' ],
|
|
44
|
-
setup (props) {
|
|
45
|
-
const inputRef = ref(null)
|
|
46
|
-
const isDisabled = computed(() => props.disabled || props.disabled === '')
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const mouseUp = () => {
|
|
50
|
-
// oof
|
|
51
|
-
setTimeout(() => {
|
|
52
|
-
inputRef.value.blur()
|
|
53
|
-
}, 0)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return { isDisabled, inputRef, mouseUp }
|
|
57
|
-
},
|
|
58
|
-
})
|
|
59
|
-
</script>
|
|
60
|
-
<style lang="scss" scoped>
|
|
61
|
-
@import "../../scss";
|
|
62
|
-
|
|
63
|
-
.ui-check {
|
|
64
|
-
@include typo(200);
|
|
65
|
-
|
|
66
|
-
user-select: none;
|
|
67
|
-
display: flex;
|
|
68
|
-
box-sizing: border-box;
|
|
69
|
-
align-items: center;
|
|
70
|
-
justify-content: var(--ui-check-justify-content, stretch);
|
|
71
|
-
height: var(--ui-lt-h);
|
|
72
|
-
position: relative;
|
|
73
|
-
outline: none;
|
|
74
|
-
color: var(--pal-text-dimm);
|
|
75
|
-
font-family: var(--typo-font-text);
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
line-height: 1;
|
|
78
|
-
|
|
79
|
-
&_input {
|
|
80
|
-
opacity: 0; // weird, but it's working inside the label
|
|
81
|
-
position: absolute;
|
|
82
|
-
left: 0;
|
|
83
|
-
top: 0;
|
|
84
|
-
pointer-events: none;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&_check {
|
|
88
|
-
border-style: var(--ui-lt-border-style);
|
|
89
|
-
border-width: var(--ui-check-border-w);
|
|
90
|
-
border-color: var(--pal-grey700);
|
|
91
|
-
height: var(--ui-check-size);
|
|
92
|
-
width: var(--ui-check-size);
|
|
93
|
-
border-radius: var(--ui-lt-border-radius);
|
|
94
|
-
display: flex;
|
|
95
|
-
justify-content: stretch;
|
|
96
|
-
align-items: stretch;
|
|
97
|
-
margin-right: spacing(200);
|
|
98
|
-
transition: all var(--ui-transition);
|
|
99
|
-
|
|
100
|
-
&-icon {
|
|
101
|
-
transition: all var(--ui-transition);
|
|
102
|
-
transform: scale(0);
|
|
103
|
-
width: 100%;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&._checked &_check {
|
|
108
|
-
border-color: var(--ui-pal);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&._checked &_check-icon {
|
|
112
|
-
transform: scale(1.4);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&_switch {
|
|
116
|
-
width: var(--ui-switch-w);
|
|
117
|
-
border-radius: var(--ui-switch-h);
|
|
118
|
-
background-color: var(--pal-grey700);
|
|
119
|
-
border: var(--ui-lt-border-width) solid var(--pal-grey700);
|
|
120
|
-
margin-right: spacing(200);
|
|
121
|
-
display: flex;
|
|
122
|
-
align-items: center;
|
|
123
|
-
justify-content: flex-start;
|
|
124
|
-
height: var(--ui-switch-h);
|
|
125
|
-
|
|
126
|
-
--switch-left: 0;
|
|
127
|
-
|
|
128
|
-
&:before {
|
|
129
|
-
transform: translateX(var(--switch-left));
|
|
130
|
-
content: "";
|
|
131
|
-
display: block;
|
|
132
|
-
background-color: white;
|
|
133
|
-
border: var(--ui-lt-border-width) solid transparent;
|
|
134
|
-
border-radius: var(--ui-switch-h);
|
|
135
|
-
height: calc(100% - var(--ui-lt-border-width) * 2);
|
|
136
|
-
aspect-ratio: 1;
|
|
137
|
-
transition: all var(--ui-transition);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&._checked &_switch {
|
|
142
|
-
background-color: var(--ui-pal);
|
|
143
|
-
border-color: var(--ui-pal);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&._checked &_switch:before {
|
|
147
|
-
--switch-left: calc(var(--ui-switch-w) - var(--ui-switch-h));
|
|
148
|
-
transform: translateX(var(--switch-left));
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
&._checked {
|
|
152
|
-
color: var(--pal-text);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
&:hover:not(&._disabled) &_box {
|
|
156
|
-
box-shadow: 0 5px 12px -4px rgb(var(--rgb-front), 0.2);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
&:hover {
|
|
160
|
-
color: var(--pal-text);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
&:focus-within &_box {
|
|
164
|
-
box-shadow: 0 0 2px 4px rgba(var(--ui-rgb), 0.3);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
&._disabled {
|
|
168
|
-
color: var(--ui-pal-disabled-border);
|
|
169
|
-
cursor: not-allowed;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
&._disabled &_check {
|
|
173
|
-
border: var(--ui-lt-border-width) var(--ui-lt-disabled-border-style) var(--ui-pal-disabled-border);
|
|
174
|
-
box-shadow: none;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
&._disabled &_switch {
|
|
178
|
-
background-color: rgba(var(--rgb-grey700), 0.25);
|
|
179
|
-
border-color: transparent;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
&._disabled._checked &_switch {
|
|
183
|
-
background-color: rgba(var(--ui-rgb), 0.3);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
._loading {
|
|
188
|
-
animation: pulse 1000ms infinite;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
@keyframes pulse {
|
|
192
|
-
40% {
|
|
193
|
-
transform: scale(1.1);
|
|
194
|
-
box-shadow: 0 0 0 5px rgba(var(--ui-rgb), 0.3);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
80% {
|
|
198
|
-
transform: scale(1);
|
|
199
|
-
box-shadow: 0 0 0 10px rgba(var(--ui-rgb), 0);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
100% {
|
|
203
|
-
box-shadow: 0 0 0 0 rgba(var(--ui-rgb), 0)
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<label
|
|
3
|
+
:class="{'_disabled': isDisabled, '_checked': modelValue }"
|
|
4
|
+
class="ui-check"
|
|
5
|
+
v-bind="{ class: $attrs.class, style: $attrs.style }"
|
|
6
|
+
@mouseup="mouseUp"
|
|
7
|
+
>
|
|
8
|
+
<input
|
|
9
|
+
ref="inputRef"
|
|
10
|
+
:checked="modelValue"
|
|
11
|
+
class="ui-check_input"
|
|
12
|
+
v-bind="{...$attrs, disabled: isDisabled, type: 'checkbox', class: undefined, style: undefined}"
|
|
13
|
+
@input="$emit('update:modelValue', $event.target.checked)"
|
|
14
|
+
>
|
|
15
|
+
<span
|
|
16
|
+
:class="{
|
|
17
|
+
'ui-check_switch': switchLike,
|
|
18
|
+
'ui-check_check': !switchLike,
|
|
19
|
+
_loading: isLoading
|
|
20
|
+
}"
|
|
21
|
+
class="ui-check_box"
|
|
22
|
+
>
|
|
23
|
+
<svg v-if="!switchLike" class="ui-check_check-icon" viewBox="0 0 24 24">
|
|
24
|
+
<path d="m7.5 12.5 4 3 5.5-8" stroke="var(--ui-pal, currentColor)" stroke-linecap="round" stroke-width="2" />
|
|
25
|
+
</svg>
|
|
26
|
+
</span>
|
|
27
|
+
<slot />
|
|
28
|
+
</label>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
import { computed, defineComponent, ref } from 'vue'
|
|
33
|
+
|
|
34
|
+
export default defineComponent({
|
|
35
|
+
name: 'ui-check',
|
|
36
|
+
props: {
|
|
37
|
+
modelValue: { type: Boolean, default: false },
|
|
38
|
+
switchLike: { type: Boolean, default: false },
|
|
39
|
+
thin: { type: Boolean, default: false },
|
|
40
|
+
isLoading: { type: Boolean, default: false },
|
|
41
|
+
disabled: { type: Boolean, default: false },
|
|
42
|
+
},
|
|
43
|
+
emits: [ 'update:modelValue' ],
|
|
44
|
+
setup (props) {
|
|
45
|
+
const inputRef = ref(null)
|
|
46
|
+
const isDisabled = computed(() => props.disabled || props.disabled === '')
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
const mouseUp = () => {
|
|
50
|
+
// oof
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
inputRef.value.blur()
|
|
53
|
+
}, 0)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return { isDisabled, inputRef, mouseUp }
|
|
57
|
+
},
|
|
58
|
+
})
|
|
59
|
+
</script>
|
|
60
|
+
<style lang="scss" scoped>
|
|
61
|
+
@import "../../scss";
|
|
62
|
+
|
|
63
|
+
.ui-check {
|
|
64
|
+
@include typo(200);
|
|
65
|
+
|
|
66
|
+
user-select: none;
|
|
67
|
+
display: flex;
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: var(--ui-check-justify-content, stretch);
|
|
71
|
+
height: var(--ui-lt-h);
|
|
72
|
+
position: relative;
|
|
73
|
+
outline: none;
|
|
74
|
+
color: var(--pal-text-dimm);
|
|
75
|
+
font-family: var(--typo-font-text);
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
line-height: 1;
|
|
78
|
+
|
|
79
|
+
&_input {
|
|
80
|
+
opacity: 0; // weird, but it's working inside the label
|
|
81
|
+
position: absolute;
|
|
82
|
+
left: 0;
|
|
83
|
+
top: 0;
|
|
84
|
+
pointer-events: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&_check {
|
|
88
|
+
border-style: var(--ui-lt-border-style);
|
|
89
|
+
border-width: var(--ui-check-border-w);
|
|
90
|
+
border-color: var(--pal-grey700);
|
|
91
|
+
height: var(--ui-check-size);
|
|
92
|
+
width: var(--ui-check-size);
|
|
93
|
+
border-radius: var(--ui-lt-border-radius);
|
|
94
|
+
display: flex;
|
|
95
|
+
justify-content: stretch;
|
|
96
|
+
align-items: stretch;
|
|
97
|
+
margin-right: spacing(200);
|
|
98
|
+
transition: all var(--ui-transition);
|
|
99
|
+
|
|
100
|
+
&-icon {
|
|
101
|
+
transition: all var(--ui-transition);
|
|
102
|
+
transform: scale(0);
|
|
103
|
+
width: 100%;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&._checked &_check {
|
|
108
|
+
border-color: var(--ui-pal);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&._checked &_check-icon {
|
|
112
|
+
transform: scale(1.4);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&_switch {
|
|
116
|
+
width: var(--ui-switch-w);
|
|
117
|
+
border-radius: var(--ui-switch-h);
|
|
118
|
+
background-color: var(--pal-grey700);
|
|
119
|
+
border: var(--ui-lt-border-width) solid var(--pal-grey700);
|
|
120
|
+
margin-right: spacing(200);
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
justify-content: flex-start;
|
|
124
|
+
height: var(--ui-switch-h);
|
|
125
|
+
|
|
126
|
+
--switch-left: 0;
|
|
127
|
+
|
|
128
|
+
&:before {
|
|
129
|
+
transform: translateX(var(--switch-left));
|
|
130
|
+
content: "";
|
|
131
|
+
display: block;
|
|
132
|
+
background-color: white;
|
|
133
|
+
border: var(--ui-lt-border-width) solid transparent;
|
|
134
|
+
border-radius: var(--ui-switch-h);
|
|
135
|
+
height: calc(100% - var(--ui-lt-border-width) * 2);
|
|
136
|
+
aspect-ratio: 1;
|
|
137
|
+
transition: all var(--ui-transition);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&._checked &_switch {
|
|
142
|
+
background-color: var(--ui-pal);
|
|
143
|
+
border-color: var(--ui-pal);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&._checked &_switch:before {
|
|
147
|
+
--switch-left: calc(var(--ui-switch-w) - var(--ui-switch-h));
|
|
148
|
+
transform: translateX(var(--switch-left));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&._checked {
|
|
152
|
+
color: var(--pal-text);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&:hover:not(&._disabled) &_box {
|
|
156
|
+
box-shadow: 0 5px 12px -4px rgb(var(--rgb-front), 0.2);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:hover {
|
|
160
|
+
color: var(--pal-text);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&:focus-within &_box {
|
|
164
|
+
box-shadow: 0 0 2px 4px rgba(var(--ui-rgb), 0.3);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&._disabled {
|
|
168
|
+
color: var(--ui-pal-disabled-border);
|
|
169
|
+
cursor: not-allowed;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&._disabled &_check {
|
|
173
|
+
border: var(--ui-lt-border-width) var(--ui-lt-disabled-border-style) var(--ui-pal-disabled-border);
|
|
174
|
+
box-shadow: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&._disabled &_switch {
|
|
178
|
+
background-color: rgba(var(--rgb-grey700), 0.25);
|
|
179
|
+
border-color: transparent;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&._disabled._checked &_switch {
|
|
183
|
+
background-color: rgba(var(--ui-rgb), 0.3);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
._loading {
|
|
188
|
+
animation: pulse 1000ms infinite;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@keyframes pulse {
|
|
192
|
+
40% {
|
|
193
|
+
transform: scale(1.1);
|
|
194
|
+
box-shadow: 0 0 0 5px rgba(var(--ui-rgb), 0.3);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
80% {
|
|
198
|
+
transform: scale(1);
|
|
199
|
+
box-shadow: 0 0 0 10px rgba(var(--ui-rgb), 0);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
100% {
|
|
203
|
+
box-shadow: 0 0 0 0 rgba(var(--ui-rgb), 0)
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
</style>
|