@celar-ui/svelte 1.8.2 → 2.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/dist/buttons/BaseButton.svelte +0 -2
- package/dist/buttons/BaseButton.svelte.d.ts +0 -1
- package/dist/buttons/ElevatedButton.svelte +1 -3
- package/dist/buttons/ElevatedButton.svelte.d.ts +1 -1
- package/dist/buttons/ExpandedTextButton.svelte +2 -2
- package/dist/buttons/ExpandedTextButton.svelte.d.ts +1 -1
- package/dist/buttons/FilledButton.svelte +1 -2
- package/dist/buttons/FilledButton.svelte.d.ts +1 -1
- package/dist/buttons/IconButton.svelte +1 -1
- package/dist/buttons/IconButton.svelte.d.ts +1 -1
- package/dist/buttons/OutlinedButton.svelte +1 -3
- package/dist/buttons/OutlinedButton.svelte.d.ts +1 -1
- package/dist/buttons/TextBaseButton.svelte +15 -46
- package/dist/buttons/TextButton.svelte +1 -3
- package/dist/buttons/TextButton.svelte.d.ts +1 -1
- package/dist/buttons/styles/button_utils.css +37 -0
- package/dist/buttons/styles/elevated_button.css +19 -0
- package/dist/buttons/styles/expanded_text_button.css +23 -0
- package/dist/buttons/styles/filled_button.css +21 -0
- package/dist/buttons/styles/icon_button.css +42 -0
- package/dist/buttons/styles/outlined_button.css +21 -0
- package/dist/buttons/styles/text_button.css +22 -0
- package/dist/containment/Avatar.svelte +1 -1
- package/dist/containment/Avatar.svelte.d.ts +1 -1
- package/dist/containment/Breadcrumb.svelte +1 -23
- package/dist/containment/Breadcrumb.svelte.d.ts +1 -0
- package/dist/containment/Card.svelte +1 -1
- package/dist/containment/Card.svelte.d.ts +1 -1
- package/dist/containment/Container.svelte +1 -1
- package/dist/containment/Container.svelte.d.ts +1 -1
- package/dist/containment/Spacer.svelte +17 -11
- package/dist/containment/SurfaceContainer.svelte +1 -1
- package/dist/containment/SurfaceContainer.svelte.d.ts +1 -1
- package/dist/containment/styles/avatar.css +20 -0
- package/dist/containment/styles/breadcrumb.css +27 -0
- package/dist/containment/styles/card.css +7 -0
- package/dist/containment/styles/container.css +26 -0
- package/dist/containment/styles/surface-container.css +29 -0
- package/dist/inputs/Checkbox.svelte +43 -45
- package/dist/inputs/ColorInput.svelte +63 -51
- package/dist/inputs/FileInput.svelte +39 -30
- package/dist/inputs/RadioGroup.svelte +1 -2
- package/dist/inputs/RadioGroup.svelte.d.ts +1 -1
- package/dist/inputs/RadioItem.svelte +38 -36
- package/dist/inputs/Slider.svelte +78 -86
- package/dist/inputs/Switch.svelte +49 -54
- package/dist/inputs/TagInput.svelte +77 -67
- package/dist/inputs/TextInput.svelte +83 -76
- package/dist/inputs/styles/radio_group.css +6 -0
- package/dist/misc/Badge.svelte +48 -40
- package/dist/misc/DotSpinner.svelte +8 -4
- package/dist/misc/DuckSpinner.svelte +92 -70
- package/dist/misc/Gap.svelte +12 -6
- package/dist/misc/LinearProgressIndicator.svelte +38 -29
- package/dist/navigation/AdaptiveSidebar.svelte +64 -70
- package/dist/navigation/AdaptiveSidebar.svelte.d.ts +1 -1
- package/dist/navigation/AppBar.svelte +39 -31
- package/dist/navigation/NavigationBar.svelte +27 -35
- package/dist/navigation/NavigationBarButton.svelte +42 -33
- package/dist/navigation/NavigationDrawer.svelte +1 -81
- package/dist/navigation/NavigationDrawer.svelte.d.ts +1 -0
- package/dist/navigation/styles/navigation_drawer.css +93 -0
- package/dist/overlay/CommandDialog.svelte +1 -1
- package/dist/overlay/CommandDialog.svelte.d.ts +1 -1
- package/dist/overlay/Dialog.svelte +1 -1
- package/dist/overlay/Dialog.svelte.d.ts +1 -1
- package/dist/overlay/MinimalDialog.svelte +1 -1
- package/dist/overlay/MinimalDialog.svelte.d.ts +1 -1
- package/dist/overlay/MinimalSurfaceDialog.svelte +3 -3
- package/dist/overlay/MinimalSurfaceDialog.svelte.d.ts +3 -3
- package/dist/overlay/Popover.svelte +1 -1
- package/dist/overlay/Popover.svelte.d.ts +1 -1
- package/dist/overlay/styles/command.css +125 -0
- package/dist/overlay/styles/dialog.css +64 -0
- package/dist/overlay/styles/popover.css +9 -0
- package/dist/overlay/styles/surface-dialog.css +21 -0
- package/package.json +15 -13
- package/src/styles/index.css +6 -0
- package/src/styles/theme.css +94 -0
- package/dist/buttons/styles/base_button.scss +0 -30
- package/dist/buttons/styles/elevated_button.scss +0 -20
- package/dist/buttons/styles/expanded_text_button.scss +0 -20
- package/dist/buttons/styles/filled_button.scss +0 -17
- package/dist/buttons/styles/icon_button.scss +0 -38
- package/dist/buttons/styles/outlined_button.scss +0 -18
- package/dist/buttons/styles/text_button.scss +0 -17
- package/dist/containment/styles/avatar.scss +0 -16
- package/dist/containment/styles/card.scss +0 -3
- package/dist/containment/styles/container.scss +0 -22
- package/dist/containment/styles/surface-container.scss +0 -27
- package/dist/inputs/styles/radio_group.scss +0 -3
- package/dist/overlay/styles/command.scss +0 -121
- package/dist/overlay/styles/dialog.scss +0 -69
- package/dist/overlay/styles/popover.scss +0 -5
- package/dist/overlay/styles/surface-dialog.scss +0 -17
- package/src/styles/colors.scss +0 -43
- package/src/styles/config.scss +0 -1
- package/src/styles/misc.scss +0 -15
- package/src/styles/scheme.scss +0 -80
- package/src/styles/spacing.scss +0 -23
- package/src/styles/utils.scss +0 -27
|
@@ -54,50 +54,48 @@
|
|
|
54
54
|
{@render children?.()}
|
|
55
55
|
</label>
|
|
56
56
|
|
|
57
|
-
<style>
|
|
58
|
-
|
|
59
|
-
box-sizing: border-box;
|
|
60
|
-
display: flex;
|
|
61
|
-
justify-content: flex-start;
|
|
62
|
-
align-items: center;
|
|
63
|
-
transition-duration: var(--transition-dur);
|
|
64
|
-
transition-property: background-color;
|
|
65
|
-
transition-timing-function: ease-in;
|
|
66
|
-
border-radius: var(--radius--half);
|
|
67
|
-
padding: var(--gap--sm) 0;
|
|
68
|
-
padding-right: var(--gap);
|
|
69
|
-
width: 100%;
|
|
70
|
-
-webkit-user-select: none;
|
|
71
|
-
-moz-user-select: none;
|
|
72
|
-
user-select: none;
|
|
73
|
-
}
|
|
74
|
-
[data-checkbox]:hover {
|
|
75
|
-
background-color: var(--color-primaryContainer);
|
|
76
|
-
}
|
|
77
|
-
[data-checkbox] [data-checkbox-icon] {
|
|
78
|
-
display: flex;
|
|
79
|
-
flex-shrink: 0;
|
|
80
|
-
justify-content: center;
|
|
81
|
-
align-items: center;
|
|
82
|
-
width: 56px;
|
|
83
|
-
}
|
|
57
|
+
<style>
|
|
58
|
+
@reference '$style/index.css';
|
|
84
59
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
transition-timing-function: ease-in;
|
|
99
|
-
}
|
|
60
|
+
@layer components {
|
|
61
|
+
[data-checkbox] {
|
|
62
|
+
position: relative;
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
display: flex;
|
|
65
|
+
justify-content: flex-start;
|
|
66
|
+
align-items: center;
|
|
67
|
+
padding: --spacing(1) 0;
|
|
68
|
+
padding-right: --spacing(4);
|
|
69
|
+
width: 100%;
|
|
70
|
+
-webkit-user-select: none;
|
|
71
|
+
-moz-user-select: none;
|
|
72
|
+
user-select: none;
|
|
100
73
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
74
|
+
[data-checkbox-icon] {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-shrink: 0;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
width: --spacing(14);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:global([data-checkbox-root]) {
|
|
84
|
+
@apply rounded-xl transition-all;
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
align-items: center;
|
|
88
|
+
height: --spacing(6);
|
|
89
|
+
width: --spacing(8);
|
|
90
|
+
background-color: transparent;
|
|
91
|
+
color: var(--color-onPrimary);
|
|
92
|
+
outline: none;
|
|
93
|
+
border: 1px solid var(--color-primary);
|
|
94
|
+
border-radius: --spacing(2);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:global([data-checkbox-root]:not([data-state='unchecked'])) {
|
|
98
|
+
background-color: var(--color-primary);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
@@ -18,54 +18,66 @@
|
|
|
18
18
|
<div data-color-input-placeholder>{placeholder}</div>
|
|
19
19
|
</label>
|
|
20
20
|
|
|
21
|
-
<style>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
21
|
+
<style>
|
|
22
|
+
@reference '$style/index.css';
|
|
23
|
+
|
|
24
|
+
@layer components {
|
|
25
|
+
[data-color-input] {
|
|
26
|
+
@apply border-onBackground/20 border border-solid;
|
|
27
|
+
display: flex;
|
|
28
|
+
position: relative;
|
|
29
|
+
justify-content: flex-start;
|
|
30
|
+
align-items: center;
|
|
31
|
+
border-radius: var(--radius-2xl);
|
|
32
|
+
padding: --spacing(1.5) 0;
|
|
33
|
+
width: 100%;
|
|
34
|
+
|
|
35
|
+
> input {
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 0;
|
|
38
|
+
right: 0;
|
|
39
|
+
-webkit-appearance: none;
|
|
40
|
+
-moz-appearance: none;
|
|
41
|
+
appearance: none;
|
|
42
|
+
outline: none;
|
|
43
|
+
border: none;
|
|
44
|
+
border-radius: var(--radius-2xl);
|
|
45
|
+
width: 64px;
|
|
46
|
+
height: 100%;
|
|
47
|
+
|
|
48
|
+
&::-moz-color-swatch {
|
|
49
|
+
border: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&::-webkit-color-swatch-wrapper {
|
|
53
|
+
padding: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&::-webkit-color-swatch {
|
|
57
|
+
border: none;
|
|
58
|
+
border-radius: var(--radius-2xl);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[data-color-input-icon] {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-shrink: 0;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
align-items: center;
|
|
67
|
+
width: --spacing(14);
|
|
68
|
+
height: 100%;
|
|
69
|
+
line-height: 1rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[data-color-input-placeholder] {
|
|
73
|
+
@apply text-onBackground/70;
|
|
74
|
+
margin-right: 4rem;
|
|
75
|
+
padding-right: --spacing(2);
|
|
76
|
+
max-width: 100%;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
text-overflow: ellipsis;
|
|
79
|
+
white-space: nowrap;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -23,33 +23,42 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</label>
|
|
25
25
|
|
|
26
|
-
<style>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
26
|
+
<style>
|
|
27
|
+
@reference '$style/index.css';
|
|
28
|
+
|
|
29
|
+
@layer components {
|
|
30
|
+
[data-file-input] {
|
|
31
|
+
@apply border-onBackground/20 border border-solid;
|
|
32
|
+
display: flex;
|
|
33
|
+
position: relative;
|
|
34
|
+
justify-content: flex-start;
|
|
35
|
+
align-items: center;
|
|
36
|
+
border-radius: var(--radius-2xl);
|
|
37
|
+
padding: --spacing(1.5) 0;
|
|
38
|
+
width: 100%;
|
|
39
|
+
|
|
40
|
+
input {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[data-file-input-icon] {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-shrink: 0;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
align-items: center;
|
|
49
|
+
width: --spacing(14);
|
|
50
|
+
height: 100%;
|
|
51
|
+
line-height: 1rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-file-input-placeholder] {
|
|
55
|
+
@apply text-onBackground/70;
|
|
56
|
+
padding-right: --spacing(4);
|
|
57
|
+
max-width: 100%;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import './styles/radio_group.
|
|
2
|
+
import './styles/radio_group.css';
|
|
3
3
|
import {
|
|
4
4
|
RadioGroup as BitRadioGroup,
|
|
5
5
|
type RadioGroupRootProps as BitRadioGroupRootProps,
|
|
@@ -16,4 +16,3 @@
|
|
|
16
16
|
<BitRadioGroup.Root {...rest} bind:value>
|
|
17
17
|
{@render children?.()}
|
|
18
18
|
</BitRadioGroup.Root>
|
|
19
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './styles/radio_group.
|
|
1
|
+
import './styles/radio_group.css';
|
|
2
2
|
import { type RadioGroupRootProps as BitRadioGroupRootProps, type WithoutChildrenOrChild } from 'bits-ui';
|
|
3
3
|
import type { Snippet } from 'svelte';
|
|
4
4
|
export type RadioGroupProps = WithoutChildrenOrChild<BitRadioGroupRootProps> & {
|
|
@@ -15,41 +15,43 @@
|
|
|
15
15
|
{@render children?.()}
|
|
16
16
|
</label>
|
|
17
17
|
|
|
18
|
-
<style>
|
|
19
|
-
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: flex-start;
|
|
22
|
-
align-items: center;
|
|
23
|
-
transition-property: background-color;
|
|
24
|
-
transition-duration: var(--transition-dur);
|
|
25
|
-
transition-timing-function: ease-in;
|
|
26
|
-
border-radius: var(--radius--half);
|
|
27
|
-
padding: var(--gap--sm) 0;
|
|
28
|
-
padding-right: var(--gap);
|
|
29
|
-
width: 100%;
|
|
30
|
-
-webkit-user-select: none;
|
|
31
|
-
-moz-user-select: none;
|
|
32
|
-
user-select: none;
|
|
33
|
-
}
|
|
34
|
-
[data-radio-item] [data-radio-item-icon] {
|
|
35
|
-
width: 56px;
|
|
36
|
-
display: flex;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
align-items: center;
|
|
39
|
-
}
|
|
40
|
-
[data-radio-item]:hover {
|
|
41
|
-
background-color: var(--color-primaryContainer);
|
|
42
|
-
}
|
|
18
|
+
<style>
|
|
19
|
+
@reference '$style/index.css';
|
|
43
20
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
21
|
+
@layer components {
|
|
22
|
+
[data-radio-item] {
|
|
23
|
+
@apply transition-all;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: flex-start;
|
|
27
|
+
align-items: center;
|
|
28
|
+
padding: --spacing(1) 0;
|
|
29
|
+
padding-right: --spacing(4);
|
|
30
|
+
width: 100%;
|
|
31
|
+
-webkit-user-select: none;
|
|
32
|
+
-moz-user-select: none;
|
|
33
|
+
user-select: none;
|
|
52
34
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
35
|
+
[data-radio-item-icon] {
|
|
36
|
+
width: --spacing(14);
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
align-items: center;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:global([data-radio-group-item]) {
|
|
44
|
+
@apply transition-all;
|
|
45
|
+
background-color: transparent;
|
|
46
|
+
outline: 1px solid var(--color-primary);
|
|
47
|
+
border: 4px solid var(--color-surface);
|
|
48
|
+
width: 24px;
|
|
49
|
+
height: 24px;
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:global([data-radio-group-item][data-state='checked']) {
|
|
54
|
+
background-color: var(--color-primary);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
@@ -18,89 +18,81 @@
|
|
|
18
18
|
/>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
|
-
<style>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
[data-slider]
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
border-radius: 50%;
|
|
100
|
-
background: var(--color-primary);
|
|
101
|
-
width: 24px;
|
|
102
|
-
height: 24px;
|
|
103
|
-
}
|
|
104
|
-
[data-slider] > input::-ms-tooltip {
|
|
105
|
-
display: none;
|
|
106
|
-
}</style>
|
|
21
|
+
<style>
|
|
22
|
+
@reference '$style/index.css';
|
|
23
|
+
|
|
24
|
+
@utility track {
|
|
25
|
+
@apply box-border h-2 w-full rounded-2xl border-none;
|
|
26
|
+
background: var(--color-surfaceDim);
|
|
27
|
+
}
|
|
28
|
+
@utility track-fill {
|
|
29
|
+
@apply track;
|
|
30
|
+
background: linear-gradient(var(--color-primary), var(--color-primary)) 0 / var(--sx) 100%
|
|
31
|
+
no-repeat var(--color-surfaceDim);
|
|
32
|
+
}
|
|
33
|
+
@utility fill {
|
|
34
|
+
@apply bg-primary h-2 rounded-2xl;
|
|
35
|
+
}
|
|
36
|
+
@utility thumb {
|
|
37
|
+
@apply bg-primary box-border h-8 w-8 rounded-[50%] border-none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@layer components {
|
|
41
|
+
[data-slider] {
|
|
42
|
+
position: relative;
|
|
43
|
+
padding: 0 --spacing(4);
|
|
44
|
+
width: 100%;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
|
|
47
|
+
& > input {
|
|
48
|
+
--range: calc(var(--max) - var(--min));
|
|
49
|
+
--ratio: calc((var(--val) - var(--min)) / var(--range));
|
|
50
|
+
--sx: calc(0.5 * --spacing(4) + var(--ratio) * (100% - --spacing(4)));
|
|
51
|
+
margin: 0;
|
|
52
|
+
background: transparent;
|
|
53
|
+
padding: 0;
|
|
54
|
+
width: 100%;
|
|
55
|
+
height: --spacing(4);
|
|
56
|
+
|
|
57
|
+
&,
|
|
58
|
+
&::-webkit-slider-thumb {
|
|
59
|
+
-webkit-appearance: none;
|
|
60
|
+
appearance: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&::-webkit-slider-runnable-track {
|
|
64
|
+
@apply track-fill;
|
|
65
|
+
}
|
|
66
|
+
&::-moz-range-track {
|
|
67
|
+
@apply track;
|
|
68
|
+
}
|
|
69
|
+
&::-ms-track {
|
|
70
|
+
@apply track;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&::-moz-range-progress {
|
|
74
|
+
@apply fill;
|
|
75
|
+
}
|
|
76
|
+
&::-ms-fill-lower {
|
|
77
|
+
@apply fill;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&::-webkit-slider-thumb {
|
|
81
|
+
margin-top: calc(0.5 * (--spacing(2) - --spacing(8)));
|
|
82
|
+
@apply thumb;
|
|
83
|
+
}
|
|
84
|
+
&::-moz-range-thumb {
|
|
85
|
+
@apply thumb;
|
|
86
|
+
}
|
|
87
|
+
&::-ms-thumb {
|
|
88
|
+
margin-top: 0;
|
|
89
|
+
@apply thumb;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&::-ms-tooltip {
|
|
93
|
+
display: none;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
@@ -17,61 +17,56 @@
|
|
|
17
17
|
{@render children?.()}
|
|
18
18
|
</label>
|
|
19
19
|
|
|
20
|
-
<style>
|
|
21
|
-
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
display: flex;
|
|
24
|
-
justify-content: flex-start;
|
|
25
|
-
align-items: center;
|
|
26
|
-
transition-property: background-color;
|
|
27
|
-
transition-duration: var(--transition-dur);
|
|
28
|
-
transition-timing-function: ease-in;
|
|
29
|
-
border-radius: var(--radius--half);
|
|
30
|
-
padding: var(--gap--sm) 0;
|
|
31
|
-
padding-right: var(--gap);
|
|
32
|
-
width: 100%;
|
|
33
|
-
-webkit-user-select: none;
|
|
34
|
-
-moz-user-select: none;
|
|
35
|
-
user-select: none;
|
|
36
|
-
}
|
|
37
|
-
[data-switch]:hover {
|
|
38
|
-
background-color: var(--color-primaryContainer);
|
|
39
|
-
}
|
|
20
|
+
<style>
|
|
21
|
+
@reference '$style/index.css';
|
|
40
22
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
23
|
+
@layer components {
|
|
24
|
+
[data-switch] {
|
|
25
|
+
@apply rounded-lg py-1.5 pr-4 transition-all;
|
|
26
|
+
position: relative;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: flex-start;
|
|
30
|
+
align-items: center;
|
|
31
|
+
width: 100%;
|
|
32
|
+
-webkit-user-select: none;
|
|
33
|
+
-moz-user-select: none;
|
|
34
|
+
user-select: none;
|
|
35
|
+
}
|
|
55
36
|
|
|
56
|
-
:global([data-switch-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
37
|
+
:global([data-switch-root]) {
|
|
38
|
+
@apply transition-all;
|
|
39
|
+
position: relative;
|
|
40
|
+
display: block;
|
|
41
|
+
width: --spacing(9.5);
|
|
42
|
+
height: --spacing(6);
|
|
43
|
+
border-radius: --spacing(8);
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
outline: 1px solid var(--color-primary);
|
|
46
|
+
border: none;
|
|
47
|
+
margin: 0 --spacing(2.25);
|
|
48
|
+
}
|
|
69
49
|
|
|
70
|
-
:global([data-switch-
|
|
71
|
-
|
|
72
|
-
|
|
50
|
+
:global([data-switch-thumb]) {
|
|
51
|
+
@apply transition-all;
|
|
52
|
+
position: absolute;
|
|
53
|
+
top: --spacing(0.2);
|
|
54
|
+
left: --spacing(0.2);
|
|
55
|
+
display: block;
|
|
56
|
+
width: --spacing(5.6);
|
|
57
|
+
height: --spacing(5.6);
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
background-color: var(--color-primary);
|
|
61
|
+
}
|
|
73
62
|
|
|
74
|
-
:global([data-switch-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
63
|
+
:global([data-switch-root][data-state='checked']) {
|
|
64
|
+
background-color: var(--color-primary);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:global([data-switch-thumb][data-state='checked']) {
|
|
68
|
+
background-color: var(--color-primaryContainer);
|
|
69
|
+
transform: translateX(--spacing(3.5));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
</style>
|