@byyuurin/ui 0.0.3 → 0.0.5
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/README.md +15 -24
- package/dist/index.d.ts +25 -2
- package/dist/index.mjs +25 -2
- package/dist/nuxt.d.mts +1 -1
- package/dist/nuxt.d.ts +1 -1
- package/dist/nuxt.mjs +14 -10
- package/dist/nuxt.mjs.map +1 -0
- package/dist/runtime/components/Accordion.vue +1 -1
- package/dist/runtime/components/Alert.vue +120 -0
- package/dist/runtime/components/App.vue +5 -1
- package/dist/runtime/components/Badge.vue +71 -0
- package/dist/runtime/components/Button.vue +3 -3
- package/dist/runtime/components/Card.vue +4 -4
- package/dist/runtime/components/Checkbox.vue +3 -6
- package/dist/runtime/components/Chip.vue +59 -0
- package/dist/runtime/components/Drawer.vue +2 -2
- package/dist/runtime/components/Input.vue +7 -2
- package/dist/runtime/components/Link.vue +1 -1
- package/dist/runtime/components/Modal.vue +2 -2
- package/dist/runtime/components/ModalProvider.vue +1 -1
- package/dist/runtime/components/PinInput.vue +86 -0
- package/dist/runtime/components/Popover.vue +1 -1
- package/dist/runtime/components/RadioGroup.vue +2 -8
- package/dist/runtime/components/ScrollArea.vue +72 -0
- package/dist/runtime/components/Select.vue +2 -1
- package/dist/runtime/components/Slider.vue +97 -0
- package/dist/runtime/components/Switch.vue +1 -2
- package/dist/runtime/components/Tabs.vue +6 -6
- package/dist/runtime/components/Textarea.vue +172 -0
- package/dist/runtime/components/Toast.vue +2 -2
- package/dist/runtime/components/Toaster.vue +2 -1
- package/dist/runtime/components/Tooltip.vue +1 -1
- package/dist/runtime/composables/defineInjection.d.ts +11 -0
- package/dist/runtime/composables/defineInjection.mjs +9 -0
- package/dist/runtime/composables/useModal.d.ts +1 -1
- package/dist/runtime/composables/useModal.mjs +3 -2
- package/dist/runtime/composables/useTheme.d.ts +3 -1
- package/dist/runtime/composables/useTheme.mjs +14 -6
- package/dist/runtime/theme/accordion.mjs +24 -21
- package/dist/runtime/theme/alert.d.ts +85 -0
- package/dist/runtime/theme/alert.mjs +47 -0
- package/dist/runtime/theme/app.mjs +1 -0
- package/dist/runtime/theme/badge.d.ts +79 -0
- package/dist/runtime/theme/badge.mjs +89 -0
- package/dist/runtime/theme/button.d.ts +4 -9
- package/dist/runtime/theme/button.mjs +130 -127
- package/dist/runtime/theme/card.d.ts +2 -2
- package/dist/runtime/theme/card.mjs +12 -9
- package/dist/runtime/theme/checkbox.d.ts +0 -12
- package/dist/runtime/theme/checkbox.mjs +45 -47
- package/dist/runtime/theme/chip.d.ts +56 -0
- package/dist/runtime/theme/chip.mjs +63 -0
- package/dist/runtime/theme/drawer.mjs +69 -66
- package/dist/runtime/theme/index.d.ts +7 -0
- package/dist/runtime/theme/index.mjs +7 -0
- package/dist/runtime/theme/input.d.ts +13 -5
- package/dist/runtime/theme/input.mjs +135 -122
- package/dist/runtime/theme/link.d.ts +1 -1
- package/dist/runtime/theme/link.mjs +23 -20
- package/dist/runtime/theme/modal.mjs +51 -48
- package/dist/runtime/theme/pinInput.d.ts +97 -0
- package/dist/runtime/theme/pinInput.mjs +108 -0
- package/dist/runtime/theme/popover.mjs +11 -8
- package/dist/runtime/theme/radioGroup.d.ts +0 -24
- package/dist/runtime/theme/radioGroup.mjs +50 -59
- package/dist/runtime/theme/scrollArea.d.ts +51 -0
- package/dist/runtime/theme/scrollArea.mjs +33 -0
- package/dist/runtime/theme/select.d.ts +5 -2
- package/dist/runtime/theme/select.mjs +156 -143
- package/dist/runtime/theme/slider.d.ts +73 -0
- package/dist/runtime/theme/slider.mjs +49 -0
- package/dist/runtime/theme/switch.d.ts +0 -12
- package/dist/runtime/theme/switch.mjs +66 -69
- package/dist/runtime/theme/tabs.d.ts +44 -13
- package/dist/runtime/theme/tabs.mjs +132 -106
- package/dist/runtime/theme/textarea.d.ts +93 -0
- package/dist/runtime/theme/textarea.mjs +113 -0
- package/dist/runtime/theme/toast.mjs +26 -23
- package/dist/runtime/theme/toaster.d.ts +2 -2
- package/dist/runtime/theme/toaster.mjs +84 -81
- package/dist/runtime/theme/tooltip.mjs +9 -6
- package/dist/runtime/types/components.d.ts +7 -0
- package/dist/runtime/types/index.d.ts +1 -3
- package/dist/runtime/utils/extend-theme.mjs +1 -1
- package/dist/runtime/utils/index.d.ts +0 -11
- package/dist/runtime/utils/index.mjs +0 -11
- package/dist/runtime/utils/link.d.ts +1 -1
- package/dist/shared/ui.CzDyI29e.mjs +8 -0
- package/dist/shared/ui.CzDyI29e.mjs.map +1 -0
- package/dist/unocss-preset.d.mts +15 -7
- package/dist/unocss-preset.d.ts +15 -7
- package/dist/unocss-preset.mjs +97 -384
- package/dist/unocss-preset.mjs.map +1 -0
- package/dist/unplugin.d.mts +25 -0
- package/dist/unplugin.d.ts +25 -0
- package/dist/unplugin.mjs +64 -0
- package/dist/unplugin.mjs.map +1 -0
- package/dist/vite.d.mts +9 -0
- package/dist/vite.d.ts +9 -0
- package/dist/vite.mjs +14 -0
- package/dist/vite.mjs.map +1 -0
- package/package.json +22 -14
- package/dist/index.cjs +0 -38
- package/dist/resolver.d.mts +0 -13
- package/dist/resolver.d.ts +0 -13
- package/dist/resolver.mjs +0 -21
- package/dist/runtime/components/index.cjs +0 -132
- package/dist/runtime/components/index.d.ts +0 -18
- package/dist/runtime/components/index.mjs +0 -18
- package/dist/runtime/composables/index.cjs +0 -33
- package/dist/runtime/composables/index.d.ts +0 -4
- package/dist/runtime/composables/index.mjs +0 -4
- package/dist/runtime/composables/useComponentIcons.cjs +0 -30
- package/dist/runtime/composables/useModal.cjs +0 -55
- package/dist/runtime/composables/useTheme.cjs +0 -30
- package/dist/runtime/composables/useToast.cjs +0 -51
- package/dist/runtime/theme/accordion.cjs +0 -27
- package/dist/runtime/theme/app.cjs +0 -15
- package/dist/runtime/theme/button.cjs +0 -127
- package/dist/runtime/theme/card.cjs +0 -17
- package/dist/runtime/theme/checkbox.cjs +0 -56
- package/dist/runtime/theme/drawer.cjs +0 -73
- package/dist/runtime/theme/index.cjs +0 -125
- package/dist/runtime/theme/input.cjs +0 -115
- package/dist/runtime/theme/link.cjs +0 -23
- package/dist/runtime/theme/modal.cjs +0 -55
- package/dist/runtime/theme/popover.cjs +0 -13
- package/dist/runtime/theme/radioGroup.cjs +0 -73
- package/dist/runtime/theme/select.cjs +0 -128
- package/dist/runtime/theme/switch.cjs +0 -73
- package/dist/runtime/theme/tabs.cjs +0 -105
- package/dist/runtime/theme/toast.cjs +0 -33
- package/dist/runtime/theme/toaster.cjs +0 -72
- package/dist/runtime/theme/tooltip.cjs +0 -14
- package/dist/runtime/types/components.cjs +0 -1
- package/dist/runtime/types/index.cjs +0 -27
- package/dist/runtime/types/utils.cjs +0 -1
- package/dist/runtime/utils/extend-theme.cjs +0 -24
- package/dist/runtime/utils/index.cjs +0 -119
- package/dist/runtime/utils/link.cjs +0 -10
- package/dist/runtime/utils/styler.cjs +0 -18
- package/dist/shared/ui.CPXA9QoM.mjs +0 -23
|
@@ -1,154 +1,167 @@
|
|
|
1
1
|
import { ct } from "@byyuurin/ui-kit";
|
|
2
|
-
export default ct(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
2
|
+
export default ct(
|
|
3
|
+
/* @unocss-include */
|
|
4
|
+
{
|
|
5
|
+
slots: {
|
|
6
|
+
base: [
|
|
7
|
+
"bg-ui-c1 relative group rounded-ui-base inline-flex items-center gap-x-2 focus:outline-none transition-colors",
|
|
8
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
9
|
+
],
|
|
10
|
+
value: "me-auto truncate pointer-events-none",
|
|
11
|
+
placeholder: "me-auto truncate color-ui-cb/50",
|
|
12
|
+
arrow: "fill-ui-c1 stroke-ui-cb/10",
|
|
13
|
+
content: [
|
|
14
|
+
"max-h-60 w-[var(--reka-popper-anchor-width)] bg-ui-c1 shadow-lg rounded-[calc(var(--ui-radius-tabs)*0.66)] ring ring-ui-cb/10 overflow-hidden pointer-events-auto",
|
|
15
|
+
"data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]"
|
|
16
|
+
],
|
|
17
|
+
viewport: "divide-y divide-ui-cb/10 scroll-py-1",
|
|
18
|
+
group: "p-1 isolate",
|
|
19
|
+
empty: "py-2 text-center text-sm color-ui-cb/50",
|
|
20
|
+
label: "font-semibold color-ui-cb cursor-pointer",
|
|
21
|
+
separator: "-mx-1 my-1 h-px bg-ui-cb/10",
|
|
22
|
+
item: [
|
|
23
|
+
"group relative w-full flex gap-2 items-center select-none outline-none color-ui-cb/50 transition-colors cursor-pointer",
|
|
24
|
+
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50",
|
|
25
|
+
"before:content-empty before:absolute before:z-[-1] before:inset-px before:rounded-ui-base before:transition-colors",
|
|
26
|
+
"data-[highlighted]:color-ui-cb data-[highlighted]:before:bg-ui-cb/3",
|
|
27
|
+
"data-[state=checked]:color-ui-base"
|
|
28
|
+
],
|
|
29
|
+
itemPrefixIcon: "shrink-0 color-ui-cb/80 group-data-[highlighted]:color-ui-cb/80 transition-colors",
|
|
30
|
+
itemSuffix: "ms-auto inline-flex gap-1.5 items-center",
|
|
31
|
+
itemSuffixIcon: "shrink-0",
|
|
32
|
+
itemLabel: "truncate",
|
|
33
|
+
prefix: "flex items-center",
|
|
34
|
+
prefixIcon: "shrink-0 size-1.25em",
|
|
35
|
+
suffix: "flex items-center",
|
|
36
|
+
suffixIcon: "shrink-0 size-1.25em"
|
|
37
|
+
},
|
|
38
|
+
variants: {
|
|
39
|
+
variant: {
|
|
40
|
+
"outline": {
|
|
41
|
+
base: [
|
|
42
|
+
"color-ui-cb/80 bg-ui-c1 ring ring-inset ring-ui-cb/50",
|
|
43
|
+
"focus-within:ring-2 focus-within:ring-ui-cb/50",
|
|
44
|
+
"disabled:ring-ui-cb/80 hover:disabled:ring-ui-cb/80"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"soft": {
|
|
48
|
+
base: [
|
|
49
|
+
"color-ui-cb/80 bg-ui-cb/4",
|
|
50
|
+
"hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
|
|
51
|
+
"disabled:color-ui-content/80 disabled:bg-ui-fill/5 hover:disabled:color-ui-content/80 hover:disabled:bg-ui-fill/5"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"soft-outline": {
|
|
55
|
+
base: [
|
|
56
|
+
"color-ui-cb/80 bg-ui-cb/4 ring ring-inset ring-ui-cb/10",
|
|
57
|
+
"hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
|
|
58
|
+
"disabled:color-ui-content/80 disabled:bg-ui-fill/5 hover:disabled:color-ui-content/80 hover:disabled:bg-ui-fill/5"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"ghost": {
|
|
62
|
+
base: [
|
|
63
|
+
"color-ui-cb/80 bg-transparent",
|
|
64
|
+
"hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
|
|
65
|
+
"disabled:color-ui-fill/80 disabled:bg-transparent hover:disabled:color-ui-fill/80 hover:disabled:bg-transparent"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"none": {
|
|
69
|
+
base: "color-ui-cb bg-transparent"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
size: {
|
|
73
|
+
xs: {
|
|
74
|
+
base: "text-xs",
|
|
75
|
+
item: "text-xs"
|
|
76
|
+
},
|
|
77
|
+
sm: {
|
|
78
|
+
base: "text-sm",
|
|
79
|
+
item: "text-sm"
|
|
80
|
+
},
|
|
81
|
+
md: {
|
|
82
|
+
base: "text-base",
|
|
83
|
+
item: "text-base"
|
|
84
|
+
},
|
|
85
|
+
lg: {
|
|
86
|
+
base: "text-lg",
|
|
87
|
+
item: "text-lg"
|
|
88
|
+
},
|
|
89
|
+
xl: {
|
|
90
|
+
base: "text-xl",
|
|
91
|
+
item: "text-xl"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
prefix: {
|
|
95
|
+
true: ""
|
|
44
96
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"color-ui-cb/80 bg-ui-cb/4",
|
|
48
|
-
"hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
|
|
49
|
-
"disabled:color-ui-content/80 disabled:bg-ui-fill/5 hover:disabled:color-ui-content/80 hover:disabled:bg-ui-fill/5"
|
|
50
|
-
]
|
|
97
|
+
suffix: {
|
|
98
|
+
true: ""
|
|
51
99
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"color-ui-cb/80 bg-transparent",
|
|
55
|
-
"hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
|
|
56
|
-
"disabled:color-ui-fill/80 disabled:bg-transparent hover:disabled:color-ui-fill/80 hover:disabled:bg-transparent"
|
|
57
|
-
]
|
|
100
|
+
loading: {
|
|
101
|
+
true: ""
|
|
58
102
|
},
|
|
59
|
-
|
|
60
|
-
|
|
103
|
+
underline: {
|
|
104
|
+
true: ""
|
|
105
|
+
},
|
|
106
|
+
highlight: {
|
|
107
|
+
true: ""
|
|
61
108
|
}
|
|
62
109
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
110
|
+
compoundVariants: [
|
|
111
|
+
{
|
|
112
|
+
variant: ["soft", "ghost", "none"],
|
|
113
|
+
highlight: false,
|
|
114
|
+
underline: true,
|
|
115
|
+
class: {
|
|
116
|
+
base: [
|
|
117
|
+
"relative after:content-empty after:absolute after:inset-x-0 after:bottom-0 after:h-1px after:bg-ui-cb/40",
|
|
118
|
+
"data-[state=open]:after:h-2px data-[state=open]:after:bg-ui-fill/60"
|
|
119
|
+
]
|
|
120
|
+
}
|
|
67
121
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
122
|
+
{
|
|
123
|
+
size: ["xs", "sm", "md"],
|
|
124
|
+
class: {
|
|
125
|
+
base: "p-1.5 px-2.5",
|
|
126
|
+
item: "p-1.5 px-2.5"
|
|
127
|
+
}
|
|
71
128
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
129
|
+
{
|
|
130
|
+
size: ["lg", "xl"],
|
|
131
|
+
class: {
|
|
132
|
+
base: "p-2.5 px-3.5",
|
|
133
|
+
item: "p-2.5 px-3.5"
|
|
134
|
+
}
|
|
75
135
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
136
|
+
{
|
|
137
|
+
variant: ["soft", "soft-outline", "ghost", "none"],
|
|
138
|
+
highlight: true,
|
|
139
|
+
class: {
|
|
140
|
+
base: "ring ring-inset ring-ui-fill/80"
|
|
141
|
+
}
|
|
79
142
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
compoundVariants: [
|
|
102
|
-
{
|
|
103
|
-
variant: ["soft", "ghost", "none"],
|
|
104
|
-
highlight: false,
|
|
105
|
-
underline: true,
|
|
106
|
-
class: {
|
|
107
|
-
base: "relative after:content-empty after:absolute after:inset-x-0 after:bottom-0 after:h-1px after:bg-ui-cb/40"
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
size: ["xs", "sm", "md"],
|
|
112
|
-
class: {
|
|
113
|
-
base: "p-1.5 px-2.5",
|
|
114
|
-
item: "p-1.5 px-2.5"
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
size: ["lg", "xl"],
|
|
119
|
-
class: {
|
|
120
|
-
base: "p-2.5 px-3.5",
|
|
121
|
-
item: "p-2.5 px-3.5"
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
variant: ["soft", "ghost", "none"],
|
|
126
|
-
highlight: true,
|
|
127
|
-
class: {
|
|
128
|
-
base: "ring ring-inset ring-ui-fill/80"
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
variant: ["outline"],
|
|
133
|
-
highlight: true,
|
|
134
|
-
class: {
|
|
135
|
-
base: "ring-2 ring-ui-fill/80 focus-within:ring-ui-fill/80"
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
loading: true,
|
|
140
|
-
prefix: true,
|
|
141
|
-
class: {
|
|
142
|
-
prefixIcon: "animate-spin"
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
loading: true,
|
|
147
|
-
prefix: false,
|
|
148
|
-
suffix: true,
|
|
149
|
-
class: {
|
|
150
|
-
suffixIcon: "animate-spin"
|
|
143
|
+
{
|
|
144
|
+
variant: ["outline"],
|
|
145
|
+
highlight: true,
|
|
146
|
+
class: {
|
|
147
|
+
base: "ring-2 ring-ui-fill/80 focus-within:ring-ui-fill/80"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
loading: true,
|
|
152
|
+
prefix: true,
|
|
153
|
+
class: {
|
|
154
|
+
prefixIcon: "animate-spin"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
loading: true,
|
|
159
|
+
prefix: false,
|
|
160
|
+
suffix: true,
|
|
161
|
+
class: {
|
|
162
|
+
suffixIcon: "animate-spin"
|
|
163
|
+
}
|
|
151
164
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
base: undefined;
|
|
3
|
+
slots: {
|
|
4
|
+
root: string;
|
|
5
|
+
track: string[];
|
|
6
|
+
range: string;
|
|
7
|
+
thumb: string[];
|
|
8
|
+
};
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
xs: {
|
|
12
|
+
root: string;
|
|
13
|
+
};
|
|
14
|
+
sm: {
|
|
15
|
+
root: string;
|
|
16
|
+
};
|
|
17
|
+
md: {
|
|
18
|
+
root: string;
|
|
19
|
+
};
|
|
20
|
+
lg: {
|
|
21
|
+
root: string;
|
|
22
|
+
};
|
|
23
|
+
xl: {
|
|
24
|
+
root: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
orientation: {
|
|
28
|
+
horizontal: {
|
|
29
|
+
root: string;
|
|
30
|
+
range: string;
|
|
31
|
+
};
|
|
32
|
+
vertical: {
|
|
33
|
+
root: string;
|
|
34
|
+
range: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
compoundVariants: import("@byyuurin/ui-kit/index").CVCompoundVariants<{
|
|
39
|
+
size: {
|
|
40
|
+
xs: {
|
|
41
|
+
root: string;
|
|
42
|
+
};
|
|
43
|
+
sm: {
|
|
44
|
+
root: string;
|
|
45
|
+
};
|
|
46
|
+
md: {
|
|
47
|
+
root: string;
|
|
48
|
+
};
|
|
49
|
+
lg: {
|
|
50
|
+
root: string;
|
|
51
|
+
};
|
|
52
|
+
xl: {
|
|
53
|
+
root: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
orientation: {
|
|
57
|
+
horizontal: {
|
|
58
|
+
root: string;
|
|
59
|
+
range: string;
|
|
60
|
+
};
|
|
61
|
+
vertical: {
|
|
62
|
+
root: string;
|
|
63
|
+
range: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
}, {
|
|
67
|
+
root: string;
|
|
68
|
+
track: string[];
|
|
69
|
+
range: string;
|
|
70
|
+
thumb: string[];
|
|
71
|
+
}, undefined>;
|
|
72
|
+
};
|
|
73
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ct } from "@byyuurin/ui-kit";
|
|
2
|
+
export default ct(
|
|
3
|
+
/* @unocss-include */
|
|
4
|
+
{
|
|
5
|
+
slots: {
|
|
6
|
+
root: "relative flex items-center select-none touch-none aria-disabled:opacity-50",
|
|
7
|
+
track: [
|
|
8
|
+
"relative bg-ui-cb/10 overflow-hidden rounded-full flex-grow cursor-pointer",
|
|
9
|
+
"data-[disabled]:cursor-not-allowed",
|
|
10
|
+
"data-[orientation=horizontal]:h-0.6em data-[orientation=vertical]:w-0.6em"
|
|
11
|
+
],
|
|
12
|
+
range: "absolute rounded-full bg-ui-fill",
|
|
13
|
+
thumb: [
|
|
14
|
+
"size-1em rounded-full bg-ui-c1 ring-0.2em cursor-pointer focus-visible:outline-0.2em focus-visible:outline-offset-0.2em",
|
|
15
|
+
"data-[disabled]:cursor-not-allowed",
|
|
16
|
+
"ring-ui-fill outline-none focus-visible:outline-ui-fill/50"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
variants: {
|
|
20
|
+
size: {
|
|
21
|
+
xs: {
|
|
22
|
+
root: "text-xs"
|
|
23
|
+
},
|
|
24
|
+
sm: {
|
|
25
|
+
root: "text-sm"
|
|
26
|
+
},
|
|
27
|
+
md: {
|
|
28
|
+
root: "text-base"
|
|
29
|
+
},
|
|
30
|
+
lg: {
|
|
31
|
+
root: "text-lg"
|
|
32
|
+
},
|
|
33
|
+
xl: {
|
|
34
|
+
root: "text-xl"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
orientation: {
|
|
38
|
+
horizontal: {
|
|
39
|
+
root: "w-full",
|
|
40
|
+
range: "h-full"
|
|
41
|
+
},
|
|
42
|
+
vertical: {
|
|
43
|
+
root: "flex-col h-full",
|
|
44
|
+
range: "w-full"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
);
|
|
@@ -28,12 +28,6 @@ declare const _default: {
|
|
|
28
28
|
root: string;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
round: {
|
|
32
|
-
true: {
|
|
33
|
-
base: string;
|
|
34
|
-
thumb: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
31
|
checked: {
|
|
38
32
|
true: {
|
|
39
33
|
icon: string;
|
|
@@ -82,12 +76,6 @@ declare const _default: {
|
|
|
82
76
|
root: string;
|
|
83
77
|
};
|
|
84
78
|
};
|
|
85
|
-
round: {
|
|
86
|
-
true: {
|
|
87
|
-
base: string;
|
|
88
|
-
thumb: string;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
79
|
checked: {
|
|
92
80
|
true: {
|
|
93
81
|
icon: string;
|
|
@@ -1,78 +1,75 @@
|
|
|
1
1
|
import { ct } from "@byyuurin/ui-kit";
|
|
2
|
-
export default ct(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
export default ct(
|
|
3
|
+
/* @unocss-include */
|
|
4
|
+
{
|
|
5
|
+
slots: {
|
|
6
|
+
root: "relative flex items-start",
|
|
7
|
+
base: [
|
|
8
|
+
"inline-flex items-center shrink-0 rounded-ui-switch border-2 border-transparent transition-colors duration-200",
|
|
9
|
+
"outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ui-cb/80",
|
|
10
|
+
"data-[state=unchecked]:bg-ui-cb/10 data-[state=checked]:bg-ui-fill/80",
|
|
11
|
+
"w-2.7em"
|
|
12
|
+
],
|
|
13
|
+
container: "flex items-center h-1.5em",
|
|
14
|
+
thumb: [
|
|
15
|
+
"group pointer-events-none rounded-ui-switch size-1.25em bg-ui-c1 shadow-lg ring-0 transition-transform duration-200 flex items-center justify-center",
|
|
16
|
+
"data-[state=unchecked]:translate-x-0 data-[state=unchecked]:rtl:translate-x-0 data-[state=checked]:translate-x-1.25em data-[state=checked]:rtl:-translate-x-1.25em"
|
|
17
|
+
],
|
|
18
|
+
icon: [
|
|
19
|
+
"absolute shrink-0 opacity-0 size-10/12 transition-[color,opacity] duration-200",
|
|
20
|
+
"group-data-[state=unchecked]:color-ui-cb/50 group-data-[state=checked]:color-ui-base"
|
|
21
|
+
],
|
|
22
|
+
wrapper: "ms-2",
|
|
23
|
+
label: "flex color-ui-cb/80",
|
|
24
|
+
description: "color-ui-cb/60"
|
|
25
|
+
},
|
|
26
|
+
variants: {
|
|
27
|
+
size: {
|
|
28
|
+
xs: {
|
|
29
|
+
root: "text-xs"
|
|
30
|
+
},
|
|
31
|
+
sm: {
|
|
32
|
+
root: "text-sm"
|
|
33
|
+
},
|
|
34
|
+
md: {
|
|
35
|
+
root: "text-base"
|
|
36
|
+
},
|
|
37
|
+
lg: {
|
|
38
|
+
root: "text-lg"
|
|
39
|
+
},
|
|
40
|
+
xl: {
|
|
41
|
+
root: "text-xl"
|
|
42
|
+
}
|
|
28
43
|
},
|
|
29
|
-
|
|
30
|
-
|
|
44
|
+
checked: {
|
|
45
|
+
true: {
|
|
46
|
+
icon: "group-data-[state=checked]:opacity-100"
|
|
47
|
+
}
|
|
31
48
|
},
|
|
32
|
-
|
|
33
|
-
|
|
49
|
+
unchecked: {
|
|
50
|
+
true: {
|
|
51
|
+
icon: "group-data-[state=unchecked]:opacity-100"
|
|
52
|
+
}
|
|
34
53
|
},
|
|
35
|
-
|
|
36
|
-
|
|
54
|
+
loading: {
|
|
55
|
+
true: {
|
|
56
|
+
root: "opacity-50 after:content-empty after:absolute after:inset-0 after:cursor-not-allowed",
|
|
57
|
+
icon: "animate-spin"
|
|
58
|
+
}
|
|
37
59
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
round: {
|
|
43
|
-
true: {
|
|
44
|
-
base: "rounded-full",
|
|
45
|
-
thumb: "rounded-full"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
checked: {
|
|
49
|
-
true: {
|
|
50
|
-
icon: "group-data-[state=checked]:opacity-100"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
unchecked: {
|
|
54
|
-
true: {
|
|
55
|
-
icon: "group-data-[state=unchecked]:opacity-100"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
loading: {
|
|
59
|
-
true: {
|
|
60
|
-
root: "opacity-50 after:content-empty after:absolute after:inset-0 after:cursor-not-allowed",
|
|
61
|
-
icon: "animate-spin"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
required: {
|
|
65
|
-
true: {
|
|
66
|
-
label: `after:content-['*'] after:ms-0.5`
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
disabled: {
|
|
70
|
-
true: {
|
|
71
|
-
root: "opacity-50 after:content-empty after:absolute after:inset-0 after:cursor-not-allowed"
|
|
60
|
+
required: {
|
|
61
|
+
true: {
|
|
62
|
+
label: `after:content-['*'] after:ms-0.5`
|
|
63
|
+
}
|
|
72
64
|
},
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
disabled: {
|
|
66
|
+
true: {
|
|
67
|
+
root: "opacity-50 after:content-empty after:absolute after:inset-0 after:cursor-not-allowed"
|
|
68
|
+
},
|
|
69
|
+
false: {
|
|
70
|
+
label: "cursor-pointer"
|
|
71
|
+
}
|
|
75
72
|
}
|
|
76
73
|
}
|
|
77
74
|
}
|
|
78
|
-
|
|
75
|
+
);
|