@byyuurin/ui 0.0.4 → 0.0.6
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 +23 -29
- package/dist/index.d.ts +28 -2
- package/dist/index.mjs +28 -2
- package/dist/nuxt.d.mts +1 -1
- package/dist/nuxt.d.ts +1 -1
- package/dist/nuxt.mjs +15 -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 +1 -1
- package/dist/runtime/components/Badge.vue +70 -0
- package/dist/runtime/components/Button.vue +7 -3
- package/dist/runtime/components/ButtonGroup.vue +47 -0
- package/dist/runtime/components/Card.vue +4 -4
- package/dist/runtime/components/Carousel.vue +310 -0
- package/dist/runtime/components/Checkbox.vue +1 -2
- package/dist/runtime/components/Chip.vue +64 -0
- package/dist/runtime/components/Drawer.vue +2 -2
- package/dist/runtime/components/Input.vue +10 -5
- package/dist/runtime/components/Link.vue +1 -1
- package/dist/runtime/components/Modal.vue +4 -5
- package/dist/runtime/components/Pagination.vue +167 -0
- package/dist/runtime/components/PinInput.vue +85 -0
- package/dist/runtime/components/Popover.vue +1 -1
- package/dist/runtime/components/RadioGroup.vue +1 -2
- package/dist/runtime/components/ScrollArea.vue +2 -2
- package/dist/runtime/components/Select.vue +7 -2
- package/dist/runtime/components/Slider.vue +96 -0
- package/dist/runtime/components/Switch.vue +2 -4
- package/dist/runtime/components/Tabs.vue +1 -2
- package/dist/runtime/components/Textarea.vue +2 -4
- package/dist/runtime/components/Toast.vue +21 -10
- package/dist/runtime/components/Toaster.vue +5 -5
- package/dist/runtime/components/Tooltip.vue +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +13 -0
- package/dist/runtime/composables/useButtonGroup.mjs +14 -0
- package/dist/runtime/composables/useTheme.d.ts +2 -2
- package/dist/runtime/composables/useTheme.mjs +1 -1
- package/dist/runtime/composables/useToast.d.ts +4 -4
- package/dist/runtime/composables/useToast.mjs +19 -6
- package/dist/runtime/theme/accordion.d.ts +17 -0
- package/dist/runtime/theme/accordion.mjs +24 -21
- package/dist/runtime/theme/alert.d.ts +125 -0
- package/dist/runtime/theme/alert.mjs +47 -0
- package/dist/runtime/theme/app.d.ts +5 -0
- package/dist/runtime/theme/app.mjs +7 -1
- package/dist/runtime/theme/badge.d.ts +82 -0
- package/dist/runtime/theme/badge.mjs +92 -0
- package/dist/runtime/theme/button-group.d.ts +66 -0
- package/dist/runtime/theme/button-group.mjs +42 -0
- package/dist/runtime/theme/button.d.ts +15 -1
- package/dist/runtime/theme/button.mjs +135 -119
- package/dist/runtime/theme/card.d.ts +21 -2
- package/dist/runtime/theme/card.mjs +12 -9
- package/dist/runtime/theme/carousel.d.ts +113 -0
- package/dist/runtime/theme/carousel.mjs +43 -0
- package/dist/runtime/theme/checkbox.d.ts +3 -0
- package/dist/runtime/theme/checkbox.mjs +47 -41
- package/dist/runtime/theme/chip.d.ts +67 -0
- package/dist/runtime/theme/chip.mjs +68 -0
- package/dist/runtime/theme/drawer.d.ts +38 -0
- package/dist/runtime/theme/drawer.mjs +69 -66
- package/dist/runtime/theme/index.d.ts +10 -2
- package/dist/runtime/theme/index.mjs +10 -2
- package/dist/runtime/theme/input.d.ts +41 -22
- package/dist/runtime/theme/input.mjs +139 -121
- package/dist/runtime/theme/link.d.ts +14 -1
- package/dist/runtime/theme/link.mjs +23 -20
- package/dist/runtime/theme/modal.d.ts +3 -0
- package/dist/runtime/theme/modal.mjs +53 -47
- package/dist/runtime/theme/pagination.d.ts +56 -0
- package/dist/runtime/theme/pagination.mjs +13 -0
- package/dist/runtime/theme/pinInput.d.ts +100 -0
- package/dist/runtime/theme/pinInput.mjs +111 -0
- package/dist/runtime/theme/popover.d.ts +11 -0
- package/dist/runtime/theme/popover.mjs +11 -8
- package/dist/runtime/theme/{radioGroup.d.ts → radio-group.d.ts} +3 -0
- package/dist/runtime/theme/radio-group.mjs +61 -0
- package/dist/runtime/theme/{scrollArea.d.ts → scroll-area.d.ts} +22 -0
- package/dist/runtime/theme/scroll-area.mjs +33 -0
- package/dist/runtime/theme/select.d.ts +16 -2
- package/dist/runtime/theme/select.mjs +160 -142
- package/dist/runtime/theme/slider.d.ts +76 -0
- package/dist/runtime/theme/slider.mjs +52 -0
- package/dist/runtime/theme/switch.d.ts +3 -0
- package/dist/runtime/theme/switch.mjs +69 -63
- package/dist/runtime/theme/tabs.d.ts +15 -2
- package/dist/runtime/theme/tabs.mjs +134 -112
- package/dist/runtime/theme/textarea.d.ts +8 -2
- package/dist/runtime/theme/textarea.mjs +105 -89
- package/dist/runtime/theme/toast.d.ts +44 -6
- package/dist/runtime/theme/toast.mjs +30 -22
- package/dist/runtime/theme/toaster.d.ts +51 -2
- package/dist/runtime/theme/toaster.mjs +88 -80
- package/dist/runtime/theme/tooltip.d.ts +13 -0
- package/dist/runtime/theme/tooltip.mjs +9 -6
- package/dist/runtime/types/components.d.ts +27 -20
- package/dist/runtime/types/components.mjs +27 -0
- package/dist/runtime/types/index.d.ts +1 -3
- package/dist/runtime/types/utils.d.ts +1 -1
- package/dist/runtime/utils/extend-theme.mjs +1 -1
- package/dist/runtime/utils/link.d.ts +1 -1
- package/dist/runtime/utils/styler.d.ts +2 -2
- package/dist/shared/ui.D4zm1r0C.mjs +4 -0
- package/dist/shared/ui.D4zm1r0C.mjs.map +1 -0
- package/dist/{unocss-preset.d.mts → unocss.d.mts} +4 -4
- package/dist/{unocss-preset.d.ts → unocss.d.ts} +4 -4
- package/dist/{unocss-preset.mjs → unocss.mjs} +58 -36
- package/dist/unocss.mjs.map +1 -0
- package/dist/unplugin.d.mts +26 -0
- package/dist/unplugin.d.ts +26 -0
- package/dist/unplugin.mjs +72 -0
- package/dist/unplugin.mjs.map +1 -0
- package/dist/vite.d.mts +10 -0
- package/dist/vite.d.ts +10 -0
- package/dist/vite.mjs +14 -0
- package/dist/vite.mjs.map +1 -0
- package/package.json +46 -26
- 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.d.ts +0 -20
- package/dist/runtime/components/index.mjs +0 -20
- package/dist/runtime/composables/index.d.ts +0 -5
- package/dist/runtime/composables/index.mjs +0 -5
- package/dist/runtime/theme/radioGroup.mjs +0 -55
- package/dist/runtime/theme/scrollArea.mjs +0 -30
- package/dist/shared/ui.Cmq14xN9.mjs +0 -25
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ct } from "@byyuurin/ui-kit";
|
|
2
|
+
export default ct(
|
|
3
|
+
/* @unocss-include */
|
|
4
|
+
{
|
|
5
|
+
slots: {
|
|
6
|
+
root: "inline-flex items-center gap-x-2",
|
|
7
|
+
container: "rounded-ui-base border-0 transition-colors aria-disabled:opacity-50",
|
|
8
|
+
base: "w-full color-inherit bg-transparent text-center placeholder:color-ui-cb/50 focus:outline-none disabled:cursor-not-allowed"
|
|
9
|
+
},
|
|
10
|
+
variants: {
|
|
11
|
+
size: {
|
|
12
|
+
xs: {
|
|
13
|
+
container: "text-xs size-7"
|
|
14
|
+
},
|
|
15
|
+
sm: {
|
|
16
|
+
container: "text-sm size-8"
|
|
17
|
+
},
|
|
18
|
+
md: {
|
|
19
|
+
container: "text-base size-9"
|
|
20
|
+
},
|
|
21
|
+
lg: {
|
|
22
|
+
container: "text-lg size-12.5"
|
|
23
|
+
},
|
|
24
|
+
xl: {
|
|
25
|
+
container: "text-xl size-12.5"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
variant: {
|
|
29
|
+
"outline": {
|
|
30
|
+
container: [
|
|
31
|
+
"color-ui-cb/80 bg-solid-ui-c1 ring ring-inset ring-ui-cb/50",
|
|
32
|
+
"focus-within:ring-2 focus-within:ring-ui-cb/50",
|
|
33
|
+
"aria-disabled:ring-ui-cb/80 hover:aria-disabled:ring-ui-cb/80"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"soft": {
|
|
37
|
+
container: [
|
|
38
|
+
"color-ui-cb/80 bg-solid-ui-cb/4",
|
|
39
|
+
"hover:bg-solid-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-solid-ui-cb/8 focus-within:color-ui-cb/85",
|
|
40
|
+
"aria-disabled:color-ui-content/80 aria-disabled:bg-solid-ui-fill/5 hover:aria-disabled:color-ui-content/80 hover:aria-disabled:bg-solid-ui-fill/5"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"soft-outline": {
|
|
44
|
+
container: [
|
|
45
|
+
"color-ui-cb/80 bg-solid-ui-cb/4 ring ring-inset ring-ui-cb/10",
|
|
46
|
+
"hover:bg-solid-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-solid-ui-cb/8 focus-within:color-ui-cb/85",
|
|
47
|
+
"aria-disabled:color-ui-content/80 aria-disabled:bg-solid-ui-fill/5 hover:aria-disabled:color-ui-content/80 hover:aria-disabled:bg-solid-ui-fill/5"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"ghost": {
|
|
51
|
+
container: [
|
|
52
|
+
"color-ui-cb/80 bg-transparent",
|
|
53
|
+
"hover:bg-solid-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-solid-ui-cb/8 focus-within:color-ui-cb/85",
|
|
54
|
+
"aria-disabled:color-ui-fill/80 aria-disabled:bg-transparent hover:aria-disabled:color-ui-fill/80 hover:aria-disabled:bg-transparent"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"none": {
|
|
58
|
+
container: "color-ui-cb bg-transparent"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
underline: {
|
|
62
|
+
true: ""
|
|
63
|
+
},
|
|
64
|
+
highlight: {
|
|
65
|
+
true: ""
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
compoundVariants: [
|
|
69
|
+
{
|
|
70
|
+
variant: ["soft", "ghost", "none"],
|
|
71
|
+
highlight: false,
|
|
72
|
+
underline: true,
|
|
73
|
+
class: {
|
|
74
|
+
container: [
|
|
75
|
+
"relative after:content-empty after:absolute after:inset-x-0 after:bottom-0 after:h-1px after:bg-solid-ui-cb/40",
|
|
76
|
+
"focus-within:after:h-2px focus-within:after:bg-solid-ui-fill/60"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
size: ["xs", "sm", "md"],
|
|
82
|
+
class: {
|
|
83
|
+
base: "p-1.5"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
size: ["lg", "xl"],
|
|
88
|
+
class: {
|
|
89
|
+
base: "p-2.5"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
variant: ["soft", "soft-outline", "ghost", "none"],
|
|
94
|
+
highlight: true,
|
|
95
|
+
class: {
|
|
96
|
+
container: "ring ring-inset ring-ui-fill/80"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
variant: ["outline"],
|
|
101
|
+
highlight: true,
|
|
102
|
+
class: {
|
|
103
|
+
container: "ring-2 ring-ui-fill/80 focus-within:ring-ui-fill/80"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
defaultVariants: {
|
|
108
|
+
size: "md"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
);
|
|
@@ -23,5 +23,16 @@ declare const _default: {
|
|
|
23
23
|
content: string[];
|
|
24
24
|
arrow: string;
|
|
25
25
|
}, undefined>;
|
|
26
|
+
defaultVariants: import("@byyuurin/ui-kit/index").CVDefaultVariants<{
|
|
27
|
+
[key: string]: {
|
|
28
|
+
[key: string]: "" | {
|
|
29
|
+
content?: import("@byyuurin/ui-kit/index").ClassValue;
|
|
30
|
+
arrow?: import("@byyuurin/ui-kit/index").ClassValue;
|
|
31
|
+
} | null;
|
|
32
|
+
};
|
|
33
|
+
}, {
|
|
34
|
+
content: string[];
|
|
35
|
+
arrow: string;
|
|
36
|
+
}>;
|
|
26
37
|
};
|
|
27
38
|
export default _default;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ct } from "@byyuurin/ui-kit";
|
|
2
|
-
export default ct(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
export default ct(
|
|
3
|
+
/* @unocss-include */
|
|
4
|
+
{
|
|
5
|
+
slots: {
|
|
6
|
+
content: [
|
|
7
|
+
"color-ui-base bg-solid-ui-base shadow-lg rounded-ui-box ring ring-ui-base/10",
|
|
8
|
+
"data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] focus:outline-none pointer-events-auto"
|
|
9
|
+
],
|
|
10
|
+
arrow: "fill-ui-base stroke-ui-cb/10"
|
|
11
|
+
}
|
|
9
12
|
}
|
|
10
|
-
|
|
13
|
+
);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ct } from "@byyuurin/ui-kit";
|
|
2
|
+
export default ct(
|
|
3
|
+
/* @unocss-include */
|
|
4
|
+
{
|
|
5
|
+
slots: {
|
|
6
|
+
root: "relative",
|
|
7
|
+
fieldset: "flex flex-wrap gap-2 gap-x-4",
|
|
8
|
+
legend: "mb-2 color-ui-cb",
|
|
9
|
+
item: "flex items-start",
|
|
10
|
+
base: "relative size-1.25em rounded-ui-radio ring ring-inset ring-ui-cb outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ui-cb/80 transition data-[state=checked]:ring-ui-base",
|
|
11
|
+
indicator: "absolute inset-0 scale-0 rounded-ui-radio bg-solid-ui-fill transition data-[state=checked]:scale-66",
|
|
12
|
+
container: "h-1.5em flex items-center",
|
|
13
|
+
wrapper: "",
|
|
14
|
+
label: "block ps-2 color-ui-cb",
|
|
15
|
+
description: "ps-2 color-ui-cb/60"
|
|
16
|
+
},
|
|
17
|
+
variants: {
|
|
18
|
+
orientation: {
|
|
19
|
+
horizontal: {
|
|
20
|
+
fieldset: "flex-row"
|
|
21
|
+
},
|
|
22
|
+
vertical: {
|
|
23
|
+
fieldset: "flex-col"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
xs: {
|
|
28
|
+
root: "text-xs"
|
|
29
|
+
},
|
|
30
|
+
sm: {
|
|
31
|
+
root: "text-sm"
|
|
32
|
+
},
|
|
33
|
+
md: {
|
|
34
|
+
root: "text-base"
|
|
35
|
+
},
|
|
36
|
+
lg: {
|
|
37
|
+
root: "text-lg"
|
|
38
|
+
},
|
|
39
|
+
xl: {
|
|
40
|
+
root: "text-xl"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
disabled: {
|
|
44
|
+
true: {
|
|
45
|
+
root: "opacity-50 after:content-empty after:absolute after:inset-0 after:cursor-not-allowed"
|
|
46
|
+
},
|
|
47
|
+
false: {
|
|
48
|
+
label: "cursor-pointer"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
required: {
|
|
52
|
+
true: {
|
|
53
|
+
legend: "after:content-['*'] after:ms-0.5"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
defaultVariants: {
|
|
58
|
+
size: "md"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
);
|
|
@@ -47,5 +47,27 @@ declare const _default: {
|
|
|
47
47
|
/** The corner where both vertical and horizontal scrollbars meet. */
|
|
48
48
|
corner: string;
|
|
49
49
|
}, undefined>;
|
|
50
|
+
defaultVariants: import("@byyuurin/ui-kit/index").CVDefaultVariants<{
|
|
51
|
+
[key: string]: {
|
|
52
|
+
[key: string]: "" | {
|
|
53
|
+
root?: import("@byyuurin/ui-kit/index").ClassValue;
|
|
54
|
+
viewport?: import("@byyuurin/ui-kit/index").ClassValue;
|
|
55
|
+
corner?: import("@byyuurin/ui-kit/index").ClassValue;
|
|
56
|
+
scrollbar?: import("@byyuurin/ui-kit/index").ClassValue;
|
|
57
|
+
thumb?: import("@byyuurin/ui-kit/index").ClassValue;
|
|
58
|
+
} | null;
|
|
59
|
+
};
|
|
60
|
+
}, {
|
|
61
|
+
/** Contains all the parts of a scroll area. */
|
|
62
|
+
root: string;
|
|
63
|
+
/** The viewport area of the scroll area. */
|
|
64
|
+
viewport: string;
|
|
65
|
+
/** The vertical and horizontal scrollbar. */
|
|
66
|
+
scrollbar: string[];
|
|
67
|
+
/** The thumb to be used in `ScrollAreaScrollbar`. */
|
|
68
|
+
thumb: string[];
|
|
69
|
+
/** The corner where both vertical and horizontal scrollbars meet. */
|
|
70
|
+
corner: string;
|
|
71
|
+
}>;
|
|
50
72
|
};
|
|
51
73
|
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ct } from "@byyuurin/ui-kit";
|
|
2
|
+
export const transitionProps = {
|
|
3
|
+
enterFromClass: "opacity-0",
|
|
4
|
+
enterActiveClass: "transition",
|
|
5
|
+
leaveToClass: "opacity-0",
|
|
6
|
+
leaveActiveClass: "transition",
|
|
7
|
+
moveClass: "transition"
|
|
8
|
+
};
|
|
9
|
+
export default ct(
|
|
10
|
+
/* @unocss-include */
|
|
11
|
+
{
|
|
12
|
+
slots: {
|
|
13
|
+
/** Contains all the parts of a scroll area. */
|
|
14
|
+
root: "relative overflow-hidden",
|
|
15
|
+
/** The viewport area of the scroll area. */
|
|
16
|
+
viewport: "size-full rounded-ui-base outline-none",
|
|
17
|
+
/** The vertical and horizontal scrollbar. */
|
|
18
|
+
scrollbar: [
|
|
19
|
+
"flex select-none touch-none p-0.5 duration-160 ease-out",
|
|
20
|
+
"data-[orientation=vertical]:w-2.5 data-[orientation=vertical]:my-[calc(var(--ui-radius-box)+0.25rem)]",
|
|
21
|
+
"data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:mx-[calc(var(--ui-radius-box)+0.25rem)]"
|
|
22
|
+
],
|
|
23
|
+
/** The thumb to be used in `ScrollAreaScrollbar`. */
|
|
24
|
+
thumb: [
|
|
25
|
+
"relative flex-1 bg-solid-ui-cb/20 rounded-ui-base cursor-pointer transition-colors",
|
|
26
|
+
"hover:bg-solid-ui-cb/30 active:bg-solid-ui-cb/40",
|
|
27
|
+
"before:content-empty before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:w-full before:h-full before:min-w-10 before:min-h-10 "
|
|
28
|
+
],
|
|
29
|
+
/** The corner where both vertical and horizontal scrollbars meet. */
|
|
30
|
+
corner: ""
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
);
|
|
@@ -29,6 +29,9 @@ declare const _default: {
|
|
|
29
29
|
soft: {
|
|
30
30
|
base: string[];
|
|
31
31
|
};
|
|
32
|
+
'soft-outline': {
|
|
33
|
+
base: string[];
|
|
34
|
+
};
|
|
32
35
|
ghost: {
|
|
33
36
|
base: string[];
|
|
34
37
|
};
|
|
@@ -73,13 +76,21 @@ declare const _default: {
|
|
|
73
76
|
highlight: {
|
|
74
77
|
true: "";
|
|
75
78
|
};
|
|
79
|
+
groupOrientation: {
|
|
80
|
+
horizontal: {
|
|
81
|
+
base: string;
|
|
82
|
+
};
|
|
83
|
+
vertical: {
|
|
84
|
+
base: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
76
87
|
};
|
|
77
88
|
compoundVariants: ({
|
|
78
89
|
variant: ("soft" | "ghost" | "none")[];
|
|
79
90
|
highlight: false;
|
|
80
91
|
underline: true;
|
|
81
92
|
class: {
|
|
82
|
-
base: string;
|
|
93
|
+
base: string[];
|
|
83
94
|
item?: undefined;
|
|
84
95
|
prefixIcon?: undefined;
|
|
85
96
|
suffixIcon?: undefined;
|
|
@@ -117,7 +128,7 @@ declare const _default: {
|
|
|
117
128
|
prefix?: undefined;
|
|
118
129
|
suffix?: undefined;
|
|
119
130
|
} | {
|
|
120
|
-
variant: ("soft" | "ghost" | "none")[];
|
|
131
|
+
variant: ("soft" | "soft-outline" | "ghost" | "none")[];
|
|
121
132
|
highlight: true;
|
|
122
133
|
class: {
|
|
123
134
|
base: string;
|
|
@@ -173,5 +184,8 @@ declare const _default: {
|
|
|
173
184
|
underline?: undefined;
|
|
174
185
|
size?: undefined;
|
|
175
186
|
})[];
|
|
187
|
+
defaultVariants: {
|
|
188
|
+
size: "md";
|
|
189
|
+
};
|
|
176
190
|
};
|
|
177
191
|
export default _default;
|
|
@@ -1,154 +1,172 @@
|
|
|
1
1
|
import { ct } from "@byyuurin/ui-kit";
|
|
2
|
-
|
|
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
|
+
import { buttonGroupVariant } from "./button-group.mjs";
|
|
3
|
+
export default ct(
|
|
4
|
+
/* @unocss-include */
|
|
5
|
+
{
|
|
6
|
+
slots: {
|
|
7
|
+
base: [
|
|
8
|
+
"bg-solid-ui-c1 relative group rounded-ui-base inline-flex items-center gap-x-2 focus:outline-none transition-colors",
|
|
9
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
10
|
+
],
|
|
11
|
+
value: "me-auto truncate pointer-events-none",
|
|
12
|
+
placeholder: "me-auto truncate color-ui-cb/50",
|
|
13
|
+
arrow: "fill-ui-c1 stroke-ui-cb/10",
|
|
14
|
+
content: [
|
|
15
|
+
"max-h-60 w-[var(--reka-popper-anchor-width)] bg-solid-ui-c1 shadow-lg rounded-[calc(var(--ui-radius-tabs)*0.66)] ring ring-ui-cb/10 overflow-hidden pointer-events-auto",
|
|
16
|
+
"data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]"
|
|
17
|
+
],
|
|
18
|
+
viewport: "divide-y divide-ui-cb/10 scroll-py-1",
|
|
19
|
+
group: "p-1 isolate",
|
|
20
|
+
empty: "py-2 text-center text-sm color-ui-cb/50",
|
|
21
|
+
label: "font-semibold color-ui-cb cursor-pointer",
|
|
22
|
+
separator: "-mx-1 my-1 h-px bg-solid-ui-cb/10",
|
|
23
|
+
item: [
|
|
24
|
+
"group relative w-full flex gap-2 items-center select-none outline-none color-ui-cb/50 transition-colors cursor-pointer",
|
|
25
|
+
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50",
|
|
26
|
+
"before:content-empty before:absolute before:z-[-1] before:inset-px before:rounded-ui-base before:transition-colors",
|
|
27
|
+
"data-[highlighted]:color-ui-cb data-[highlighted]:before:bg-solid-ui-cb/3",
|
|
28
|
+
"data-[state=checked]:color-ui-base"
|
|
29
|
+
],
|
|
30
|
+
itemPrefixIcon: "shrink-0 color-ui-cb/80 group-data-[highlighted]:color-ui-cb/80 transition-colors",
|
|
31
|
+
itemSuffix: "ms-auto inline-flex gap-1.5 items-center",
|
|
32
|
+
itemSuffixIcon: "shrink-0",
|
|
33
|
+
itemLabel: "truncate",
|
|
34
|
+
prefix: "flex items-center",
|
|
35
|
+
prefixIcon: "shrink-0 size-1.25em",
|
|
36
|
+
suffix: "flex items-center",
|
|
37
|
+
suffixIcon: "shrink-0 size-1.25em"
|
|
38
|
+
},
|
|
39
|
+
variants: {
|
|
40
|
+
...buttonGroupVariant,
|
|
41
|
+
variant: {
|
|
42
|
+
"outline": {
|
|
43
|
+
base: [
|
|
44
|
+
"color-ui-cb/80 bg-solid-ui-c1 ring ring-inset ring-ui-cb/50",
|
|
45
|
+
"focus-within:ring-2 focus-within:ring-ui-cb/50",
|
|
46
|
+
"disabled:ring-ui-cb/80 hover:disabled:ring-ui-cb/80"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"soft": {
|
|
50
|
+
base: [
|
|
51
|
+
"color-ui-cb/80 bg-solid-ui-cb/4",
|
|
52
|
+
"hover:bg-solid-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-solid-ui-cb/8 focus-within:color-ui-cb/85",
|
|
53
|
+
"disabled:color-ui-content/80 disabled:bg-solid-ui-fill/5 hover:disabled:color-ui-content/80 hover:disabled:bg-solid-ui-fill/5"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"soft-outline": {
|
|
57
|
+
base: [
|
|
58
|
+
"color-ui-cb/80 bg-solid-ui-cb/4 ring ring-inset ring-ui-cb/10",
|
|
59
|
+
"hover:bg-solid-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-solid-ui-cb/8 focus-within:color-ui-cb/85",
|
|
60
|
+
"disabled:color-ui-content/80 disabled:bg-solid-ui-fill/5 hover:disabled:color-ui-content/80 hover:disabled:bg-solid-ui-fill/5"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"ghost": {
|
|
64
|
+
base: [
|
|
65
|
+
"color-ui-cb/80 bg-transparent",
|
|
66
|
+
"hover:bg-solid-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-solid-ui-cb/8 focus-within:color-ui-cb/85",
|
|
67
|
+
"disabled:color-ui-fill/80 disabled:bg-transparent hover:disabled:color-ui-fill/80 hover:disabled:bg-transparent"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"none": {
|
|
71
|
+
base: "color-ui-cb bg-transparent"
|
|
72
|
+
}
|
|
44
73
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
74
|
+
size: {
|
|
75
|
+
xs: {
|
|
76
|
+
base: "text-xs",
|
|
77
|
+
item: "text-xs"
|
|
78
|
+
},
|
|
79
|
+
sm: {
|
|
80
|
+
base: "text-sm",
|
|
81
|
+
item: "text-sm"
|
|
82
|
+
},
|
|
83
|
+
md: {
|
|
84
|
+
base: "text-base",
|
|
85
|
+
item: "text-base"
|
|
86
|
+
},
|
|
87
|
+
lg: {
|
|
88
|
+
base: "text-lg",
|
|
89
|
+
item: "text-lg"
|
|
90
|
+
},
|
|
91
|
+
xl: {
|
|
92
|
+
base: "text-xl",
|
|
93
|
+
item: "text-xl"
|
|
94
|
+
}
|
|
51
95
|
},
|
|
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
|
-
]
|
|
96
|
+
prefix: {
|
|
97
|
+
true: ""
|
|
58
98
|
},
|
|
59
|
-
|
|
60
|
-
|
|
99
|
+
suffix: {
|
|
100
|
+
true: ""
|
|
101
|
+
},
|
|
102
|
+
loading: {
|
|
103
|
+
true: ""
|
|
104
|
+
},
|
|
105
|
+
underline: {
|
|
106
|
+
true: ""
|
|
107
|
+
},
|
|
108
|
+
highlight: {
|
|
109
|
+
true: ""
|
|
61
110
|
}
|
|
62
111
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
112
|
+
compoundVariants: [
|
|
113
|
+
{
|
|
114
|
+
variant: ["soft", "ghost", "none"],
|
|
115
|
+
highlight: false,
|
|
116
|
+
underline: true,
|
|
117
|
+
class: {
|
|
118
|
+
base: [
|
|
119
|
+
"relative after:content-empty after:absolute after:inset-x-0 after:bottom-0 after:h-1px after:bg-solid-ui-cb/40",
|
|
120
|
+
"data-[state=open]:after:h-2px data-[state=open]:after:bg-solid-ui-fill/60"
|
|
121
|
+
]
|
|
122
|
+
}
|
|
67
123
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
124
|
+
{
|
|
125
|
+
size: ["xs", "sm", "md"],
|
|
126
|
+
class: {
|
|
127
|
+
base: "p-1.5 px-2.5",
|
|
128
|
+
item: "p-1.5 px-2.5"
|
|
129
|
+
}
|
|
71
130
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
131
|
+
{
|
|
132
|
+
size: ["lg", "xl"],
|
|
133
|
+
class: {
|
|
134
|
+
base: "p-2.5 px-3.5",
|
|
135
|
+
item: "p-2.5 px-3.5"
|
|
136
|
+
}
|
|
75
137
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
138
|
+
{
|
|
139
|
+
variant: ["soft", "soft-outline", "ghost", "none"],
|
|
140
|
+
highlight: true,
|
|
141
|
+
class: {
|
|
142
|
+
base: "ring ring-inset ring-ui-fill/80"
|
|
143
|
+
}
|
|
79
144
|
},
|
|
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"
|
|
145
|
+
{
|
|
146
|
+
variant: ["outline"],
|
|
147
|
+
highlight: true,
|
|
148
|
+
class: {
|
|
149
|
+
base: "ring-2 ring-ui-fill/80 focus-within:ring-ui-fill/80"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
loading: true,
|
|
154
|
+
prefix: true,
|
|
155
|
+
class: {
|
|
156
|
+
prefixIcon: "animate-spin"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
loading: true,
|
|
161
|
+
prefix: false,
|
|
162
|
+
suffix: true,
|
|
163
|
+
class: {
|
|
164
|
+
suffixIcon: "animate-spin"
|
|
165
|
+
}
|
|
151
166
|
}
|
|
167
|
+
],
|
|
168
|
+
defaultVariants: {
|
|
169
|
+
size: "md"
|
|
152
170
|
}
|
|
153
|
-
|
|
154
|
-
|
|
171
|
+
}
|
|
172
|
+
);
|