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