@bitrix24/b24ui-nuxt 0.1.1
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/.nuxt/b24ui/advice.ts +52 -0
- package/.nuxt/b24ui/alert.ts +118 -0
- package/.nuxt/b24ui/avatar-group.ts +52 -0
- package/.nuxt/b24ui/avatar.ts +63 -0
- package/.nuxt/b24ui/badge.ts +256 -0
- package/.nuxt/b24ui/button-group.ts +27 -0
- package/.nuxt/b24ui/button.ts +342 -0
- package/.nuxt/b24ui/checkbox.ts +128 -0
- package/.nuxt/b24ui/chip.ts +205 -0
- package/.nuxt/b24ui/container.ts +3 -0
- package/.nuxt/b24ui/content/description-list.ts +62 -0
- package/.nuxt/b24ui/countdown.ts +94 -0
- package/.nuxt/b24ui/form-field.ts +57 -0
- package/.nuxt/b24ui/form.ts +3 -0
- package/.nuxt/b24ui/index.ts +28 -0
- package/.nuxt/b24ui/input.ts +472 -0
- package/.nuxt/b24ui/kbd.ts +31 -0
- package/.nuxt/b24ui/link.ts +20 -0
- package/.nuxt/b24ui/progress.ts +303 -0
- package/.nuxt/b24ui/radio-group.ts +135 -0
- package/.nuxt/b24ui/range.ts +172 -0
- package/.nuxt/b24ui/select.ts +550 -0
- package/.nuxt/b24ui/separator.ts +176 -0
- package/.nuxt/b24ui/skeleton.ts +3 -0
- package/.nuxt/b24ui/switch.ts +134 -0
- package/.nuxt/b24ui/tabs.ts +341 -0
- package/.nuxt/b24ui/textarea.ts +332 -0
- package/.nuxt/b24ui/toast.ts +89 -0
- package/.nuxt/b24ui/toaster.ts +91 -0
- package/.nuxt/b24ui/tooltip.ts +16 -0
- package/LICENSE +21 -0
- package/README.md +101 -0
- package/cli/commands/make/component.mjs +95 -0
- package/cli/commands/make/index.mjs +14 -0
- package/cli/commands/make/locale.mjs +64 -0
- package/cli/index.mjs +15 -0
- package/cli/package.json +13 -0
- package/cli/templates.mjs +240 -0
- package/cli/utils.mjs +31 -0
- package/dist/meta.cjs +23610 -0
- package/dist/meta.d.cts +23608 -0
- package/dist/meta.d.mts +23608 -0
- package/dist/meta.d.ts +23608 -0
- package/dist/meta.mjs +23608 -0
- package/dist/module.cjs +54 -0
- package/dist/module.d.cts +14 -0
- package/dist/module.d.mts +14 -0
- package/dist/module.d.ts +14 -0
- package/dist/module.json +13 -0
- package/dist/module.mjs +51 -0
- package/dist/runtime/components/Advice.vue +115 -0
- package/dist/runtime/components/Alert.vue +136 -0
- package/dist/runtime/components/App.vue +52 -0
- package/dist/runtime/components/Avatar.vue +118 -0
- package/dist/runtime/components/AvatarGroup.vue +99 -0
- package/dist/runtime/components/Badge.vue +114 -0
- package/dist/runtime/components/Button.vue +177 -0
- package/dist/runtime/components/ButtonGroup.vue +58 -0
- package/dist/runtime/components/Checkbox.vue +110 -0
- package/dist/runtime/components/Chip.vue +81 -0
- package/dist/runtime/components/Container.vue +36 -0
- package/dist/runtime/components/Countdown.vue +498 -0
- package/dist/runtime/components/Form.vue +271 -0
- package/dist/runtime/components/FormField.vue +128 -0
- package/dist/runtime/components/Input.vue +224 -0
- package/dist/runtime/components/Kbd.vue +50 -0
- package/dist/runtime/components/Link.vue +219 -0
- package/dist/runtime/components/LinkBase.vue +63 -0
- package/dist/runtime/components/Progress.vue +182 -0
- package/dist/runtime/components/RadioGroup.vue +178 -0
- package/dist/runtime/components/Range.vue +114 -0
- package/dist/runtime/components/Select.vue +328 -0
- package/dist/runtime/components/Separator.vue +82 -0
- package/dist/runtime/components/Skeleton.vue +31 -0
- package/dist/runtime/components/Switch.vue +133 -0
- package/dist/runtime/components/Tabs.vue +127 -0
- package/dist/runtime/components/Textarea.vue +216 -0
- package/dist/runtime/components/Toast.vue +168 -0
- package/dist/runtime/components/Toaster.vue +143 -0
- package/dist/runtime/components/Tooltip.vue +94 -0
- package/dist/runtime/components/content/DescriptionList.vue +220 -0
- package/dist/runtime/composables/defineLocale.d.ts +9 -0
- package/dist/runtime/composables/defineLocale.js +4 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +15 -0
- package/dist/runtime/composables/defineShortcuts.js +135 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +10 -0
- package/dist/runtime/composables/useAvatarGroup.js +10 -0
- package/dist/runtime/composables/useButtonGroup.d.ts +17 -0
- package/dist/runtime/composables/useButtonGroup.js +10 -0
- package/dist/runtime/composables/useComponentIcons.d.ts +20 -0
- package/dist/runtime/composables/useComponentIcons.js +25 -0
- package/dist/runtime/composables/useFormField.d.ts +42 -0
- package/dist/runtime/composables/useFormField.js +65 -0
- package/dist/runtime/composables/useKbd.d.ts +35 -0
- package/dist/runtime/composables/useKbd.js +52 -0
- package/dist/runtime/composables/useLocale.d.ts +4 -0
- package/dist/runtime/composables/useLocale.js +10 -0
- package/dist/runtime/composables/useToast.d.ts +12 -0
- package/dist/runtime/composables/useToast.js +62 -0
- package/dist/runtime/dictionary/icons.d.ts +20 -0
- package/dist/runtime/dictionary/icons.js +35 -0
- package/dist/runtime/index.css +1 -0
- package/dist/runtime/keyframes.css +1 -0
- package/dist/runtime/locale/en.d.ts +2 -0
- package/dist/runtime/locale/en.js +48 -0
- package/dist/runtime/locale/es.d.ts +2 -0
- package/dist/runtime/locale/es.js +48 -0
- package/dist/runtime/locale/index.d.ts +3 -0
- package/dist/runtime/locale/index.js +3 -0
- package/dist/runtime/locale/ru.d.ts +2 -0
- package/dist/runtime/locale/ru.js +48 -0
- package/dist/runtime/plugins/colors.d.ts +2 -0
- package/dist/runtime/plugins/colors.js +40 -0
- package/dist/runtime/types/app.config.d.ts +6 -0
- package/dist/runtime/types/form.d.ts +84 -0
- package/dist/runtime/types/form.js +12 -0
- package/dist/runtime/types/icons.d.ts +3 -0
- package/dist/runtime/types/icons.js +0 -0
- package/dist/runtime/types/index.d.ts +33 -0
- package/dist/runtime/types/index.js +33 -0
- package/dist/runtime/types/locale.d.ts +50 -0
- package/dist/runtime/types/locale.js +0 -0
- package/dist/runtime/types/utils.d.ts +22 -0
- package/dist/runtime/types/utils.js +0 -0
- package/dist/runtime/utils/form.d.ts +17 -0
- package/dist/runtime/utils/form.js +153 -0
- package/dist/runtime/utils/fuse.d.ts +4 -0
- package/dist/runtime/utils/fuse.js +63 -0
- package/dist/runtime/utils/index.d.ts +6 -0
- package/dist/runtime/utils/index.js +63 -0
- package/dist/runtime/utils/link.d.ts +29 -0
- package/dist/runtime/utils/link.js +4 -0
- package/dist/runtime/utils/locale.d.ts +15 -0
- package/dist/runtime/utils/locale.js +25 -0
- package/dist/runtime/utils/tv.d.ts +1 -0
- package/dist/runtime/utils/tv.js +4 -0
- package/dist/runtime/vue/components/Link.vue +203 -0
- package/dist/runtime/vue/plugins/color-mode.d.ts +4 -0
- package/dist/runtime/vue/plugins/color-mode.js +6 -0
- package/dist/runtime/vue/plugins/head.d.ts +4 -0
- package/dist/runtime/vue/plugins/head.js +6 -0
- package/dist/runtime/vue/stubs.d.ts +15 -0
- package/dist/runtime/vue/stubs.js +27 -0
- package/dist/shared/b24ui-nuxt.CNGvMe2S.mjs +4074 -0
- package/dist/shared/b24ui-nuxt.D22QQtm8.cjs +4079 -0
- package/dist/types.d.mts +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/unplugin.cjs +213 -0
- package/dist/unplugin.d.cts +22 -0
- package/dist/unplugin.d.mts +22 -0
- package/dist/unplugin.d.ts +22 -0
- package/dist/unplugin.mjs +202 -0
- package/dist/vite.cjs +21 -0
- package/dist/vite.d.cts +12 -0
- package/dist/vite.d.mts +12 -0
- package/dist/vite.d.ts +12 -0
- package/dist/vite.mjs +19 -0
- package/package.json +166 -0
- package/vue-plugin.d.ts +5 -0
|
@@ -0,0 +1,4074 @@
|
|
|
1
|
+
import 'node:url';
|
|
2
|
+
import { kebabCase } from 'scule';
|
|
3
|
+
import { addTypeTemplate, addTemplate } from '@nuxt/kit';
|
|
4
|
+
import { defuFn } from 'defu';
|
|
5
|
+
|
|
6
|
+
const getDefaultUiConfig = () => ({});
|
|
7
|
+
const defaultOptions = {
|
|
8
|
+
colorMode: true
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const advice = {
|
|
12
|
+
slots: {
|
|
13
|
+
root: "flex items-end",
|
|
14
|
+
descriptionWrapper: [
|
|
15
|
+
"relative"
|
|
16
|
+
],
|
|
17
|
+
descriptionBorder: [
|
|
18
|
+
"fill-blue-500 dark:fill-blue-300"
|
|
19
|
+
],
|
|
20
|
+
descriptionBg: [
|
|
21
|
+
"fill-white dark:fill-base-900"
|
|
22
|
+
],
|
|
23
|
+
descriptionAngle: [
|
|
24
|
+
"absolute",
|
|
25
|
+
"w-[14px] h-[12px]"
|
|
26
|
+
],
|
|
27
|
+
description: [
|
|
28
|
+
"grow",
|
|
29
|
+
"w-11/12 py-3 px-md2 ms-2",
|
|
30
|
+
// -9/12
|
|
31
|
+
"rounded-[23px]",
|
|
32
|
+
"font-b24-secondary text-md leading-md font-normal",
|
|
33
|
+
"border-1",
|
|
34
|
+
"border-blue-500 bg-white text-base-950",
|
|
35
|
+
"dark:border-blue-300 dark:bg-base-900 dark:text-base-200"
|
|
36
|
+
],
|
|
37
|
+
leading: "me-1.5 ms-2",
|
|
38
|
+
leadingIcon: "shrink-0 size-[42px]",
|
|
39
|
+
leadingAvatar: "shrink-0",
|
|
40
|
+
leadingAvatarSize: "lg"
|
|
41
|
+
},
|
|
42
|
+
variants: {
|
|
43
|
+
angle: {
|
|
44
|
+
top: {
|
|
45
|
+
root: "items-start",
|
|
46
|
+
leading: "mt-0.5",
|
|
47
|
+
descriptionAngle: [
|
|
48
|
+
"start-[0.8px] top-[9px]",
|
|
49
|
+
"scale-x-100 -scale-y-100",
|
|
50
|
+
"rtl:-scale-x-100"
|
|
51
|
+
].join(" ")
|
|
52
|
+
},
|
|
53
|
+
bottom: {
|
|
54
|
+
root: "items-end",
|
|
55
|
+
descriptionAngle: [
|
|
56
|
+
"start-[0.8px] bottom-[9px]",
|
|
57
|
+
"rtl:-scale-x-100"
|
|
58
|
+
].join(" ")
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
defaultVariants: {
|
|
63
|
+
angle: "bottom"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const alert = {
|
|
68
|
+
slots: {
|
|
69
|
+
root: "relative overflow-hidden w-full rounded-3xs flex",
|
|
70
|
+
wrapper: "min-w-0 flex-1 flex flex-col gap-1 font-b24-primary font-normal",
|
|
71
|
+
title: "font-bold",
|
|
72
|
+
description: "",
|
|
73
|
+
icon: "shrink-0 size-6",
|
|
74
|
+
avatar: "shrink-0",
|
|
75
|
+
avatarSize: "",
|
|
76
|
+
actions: "flex flex-wrap gap-1.5 shrink-0",
|
|
77
|
+
close: "p-0.5"
|
|
78
|
+
},
|
|
79
|
+
variants: {
|
|
80
|
+
color: {
|
|
81
|
+
default: {
|
|
82
|
+
root: [
|
|
83
|
+
"text-base-950 bg-base-200",
|
|
84
|
+
"dark:text-base-950 dark:bg-base-200"
|
|
85
|
+
],
|
|
86
|
+
close: "text-base-800 dark:text-base-800 hover:text-base-950 dark:hover:text-base-950"
|
|
87
|
+
},
|
|
88
|
+
danger: {
|
|
89
|
+
root: [
|
|
90
|
+
"text-red-700 bg-red-200",
|
|
91
|
+
"dark:text-red-700 dark:bg-red-300"
|
|
92
|
+
],
|
|
93
|
+
close: "text-red-700 dark:text-red-700 hover:text-red-800 dark:hover:text-red-800"
|
|
94
|
+
},
|
|
95
|
+
success: {
|
|
96
|
+
root: [
|
|
97
|
+
"text-green-780 bg-green-200",
|
|
98
|
+
"dark:text-green-780 dark:bg-green-300"
|
|
99
|
+
],
|
|
100
|
+
close: "text-green-780 dark:text-green-780 hover:text-green-800 dark:hover:text-green-800"
|
|
101
|
+
},
|
|
102
|
+
warning: {
|
|
103
|
+
root: [
|
|
104
|
+
"text-orange-700 bg-orange-200",
|
|
105
|
+
"dark:text-orange-750 dark:bg-orange-300"
|
|
106
|
+
],
|
|
107
|
+
close: "text-orange-700 dark:text-orange-750 hover:text-orange-800 dark:hover:text-orange-800"
|
|
108
|
+
},
|
|
109
|
+
primary: {
|
|
110
|
+
root: [
|
|
111
|
+
"text-blue-700 bg-blue-200",
|
|
112
|
+
"dark:text-blue-700 dark:bg-blue-300"
|
|
113
|
+
],
|
|
114
|
+
close: "text-blue-700 dark:text-blue-700 hover:text-blue-800 dark:hover:text-blue-800"
|
|
115
|
+
},
|
|
116
|
+
secondary: {
|
|
117
|
+
root: [
|
|
118
|
+
"text-cyan-700 bg-cyan-150",
|
|
119
|
+
"dark:text-cyan-750 dark:bg-cyan-300"
|
|
120
|
+
],
|
|
121
|
+
close: "text-cyan-700 dark:text-cyan-750 hover:text-cyan-800 dark:hover:text-cyan-800"
|
|
122
|
+
},
|
|
123
|
+
collab: {
|
|
124
|
+
root: [
|
|
125
|
+
"text-collab-700 bg-collab-200",
|
|
126
|
+
"dark:text-collab-700 dark:bg-collab-300"
|
|
127
|
+
],
|
|
128
|
+
close: "text-collab-700 dark:text-collab-700 hover:text-collab-800 dark:hover:text-collab-800"
|
|
129
|
+
},
|
|
130
|
+
ai: {
|
|
131
|
+
root: [
|
|
132
|
+
"text-ai-700 bg-ai-200",
|
|
133
|
+
"dark:text-ai-700 dark:bg-ai-300"
|
|
134
|
+
],
|
|
135
|
+
close: "text-ai-700 dark:text-ai-700 hover:text-ai-800 dark:hover:text-ai-800"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
size: {
|
|
139
|
+
sm: {
|
|
140
|
+
root: "py-xs ps-sm pe-xs gap-2",
|
|
141
|
+
title: "text-sm leading-normal",
|
|
142
|
+
description: "text-sm leading-normal",
|
|
143
|
+
avatarSize: "md"
|
|
144
|
+
},
|
|
145
|
+
md: {
|
|
146
|
+
root: "py-md ps-md pe-xs gap-2.5",
|
|
147
|
+
title: "text-md leading-none",
|
|
148
|
+
description: "text-md leading-[17px]",
|
|
149
|
+
avatarSize: "xl"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
multiline: {
|
|
153
|
+
true: {
|
|
154
|
+
root: "items-start",
|
|
155
|
+
actions: "items-start mt-2"
|
|
156
|
+
},
|
|
157
|
+
false: {
|
|
158
|
+
root: "items-center",
|
|
159
|
+
actions: "items-center"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
compoundVariants: [],
|
|
164
|
+
defaultVariants: {
|
|
165
|
+
color: "default",
|
|
166
|
+
size: "md"
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const avatar = {
|
|
171
|
+
slots: {
|
|
172
|
+
root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-base-100 dark:bg-base-900",
|
|
173
|
+
image: "h-full w-full rounded-[inherit] object-cover data-[error]:hidden",
|
|
174
|
+
fallback: "font-medium text-base-500 dark:text-base-600 truncate",
|
|
175
|
+
icon: "text-base-500 shrink-0 dark:text-base-600"
|
|
176
|
+
},
|
|
177
|
+
variants: {
|
|
178
|
+
size: {
|
|
179
|
+
"3xs": {
|
|
180
|
+
root: "size-xs2 text-4xs font-regular",
|
|
181
|
+
icon: "size-xs2"
|
|
182
|
+
},
|
|
183
|
+
"2xs": {
|
|
184
|
+
root: "size-5 text-4xs font-regular",
|
|
185
|
+
icon: "size-5"
|
|
186
|
+
},
|
|
187
|
+
"xs": {
|
|
188
|
+
root: "size-6 text-3xs font-regular",
|
|
189
|
+
icon: "size-6"
|
|
190
|
+
},
|
|
191
|
+
"sm": {
|
|
192
|
+
root: "size-7 text-xs",
|
|
193
|
+
icon: "size-7"
|
|
194
|
+
},
|
|
195
|
+
"md": {
|
|
196
|
+
root: "size-8 text-sm",
|
|
197
|
+
icon: "size-8"
|
|
198
|
+
},
|
|
199
|
+
"lg": {
|
|
200
|
+
root: "size-[42px] text-2xl",
|
|
201
|
+
icon: "size-[42px]"
|
|
202
|
+
},
|
|
203
|
+
"xl": {
|
|
204
|
+
root: "size-12 text-2xl",
|
|
205
|
+
icon: "size-12"
|
|
206
|
+
},
|
|
207
|
+
"2xl": {
|
|
208
|
+
root: "size-[60px] text-5xl",
|
|
209
|
+
icon: "size-[60px]"
|
|
210
|
+
},
|
|
211
|
+
"3xl": {
|
|
212
|
+
root: "size-[94px] text-[34px]",
|
|
213
|
+
icon: "size-[94px]"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
defaultVariants: {
|
|
218
|
+
size: "md"
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const avatarGroup = {
|
|
223
|
+
slots: {
|
|
224
|
+
root: "inline-flex justify-end",
|
|
225
|
+
base: "relative rounded-full ring-white dark:ring-base-700 last:me-0"
|
|
226
|
+
},
|
|
227
|
+
variants: {
|
|
228
|
+
size: {
|
|
229
|
+
"3xs": {
|
|
230
|
+
base: "ring -me-0.5"
|
|
231
|
+
},
|
|
232
|
+
"2xs": {
|
|
233
|
+
base: "ring -me-0.5"
|
|
234
|
+
},
|
|
235
|
+
"xs": {
|
|
236
|
+
base: "ring -me-0.5"
|
|
237
|
+
},
|
|
238
|
+
"sm": {
|
|
239
|
+
base: "ring -me-1.5"
|
|
240
|
+
},
|
|
241
|
+
"md": {
|
|
242
|
+
base: "ring-2 -me-1.5"
|
|
243
|
+
},
|
|
244
|
+
"lg": {
|
|
245
|
+
base: "ring-2 -me-1.5"
|
|
246
|
+
},
|
|
247
|
+
"xl": {
|
|
248
|
+
base: "ring-3 -me-2"
|
|
249
|
+
},
|
|
250
|
+
"2xl": {
|
|
251
|
+
base: "ring-3 -me-2"
|
|
252
|
+
},
|
|
253
|
+
"3xl": {
|
|
254
|
+
base: "ring-3 -me-2"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
defaultVariants: {
|
|
259
|
+
size: "md"
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
const badge = {
|
|
264
|
+
slots: {
|
|
265
|
+
base: [
|
|
266
|
+
"select-none font-b24-secondary font-normal",
|
|
267
|
+
"inline-flex items-center",
|
|
268
|
+
"transition-all duration-200 ease-linear",
|
|
269
|
+
"px-2 leading-normal rounded-md"
|
|
270
|
+
// 'text-base-800 dark:text-base-250'
|
|
271
|
+
],
|
|
272
|
+
wrapper: "inline-flex items-center",
|
|
273
|
+
label: "max-w-full whitespace-nowrap text-ellipsis",
|
|
274
|
+
// truncate ////
|
|
275
|
+
leadingIcon: "shrink-0",
|
|
276
|
+
leadingAvatar: "shrink-0",
|
|
277
|
+
leadingAvatarSize: "",
|
|
278
|
+
trailingIcon: "shrink-0 cursor-pointer hover:rounded-full hover:bg-current/20 dark:hover:bg-current/35"
|
|
279
|
+
},
|
|
280
|
+
variants: {
|
|
281
|
+
useLink: {
|
|
282
|
+
true: {
|
|
283
|
+
base: "cursor-pointer",
|
|
284
|
+
wrapper: "group",
|
|
285
|
+
label: "group-hover:underline group-hover:decoration-dashed"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
useClose: {
|
|
289
|
+
true: "pe-2xs"
|
|
290
|
+
},
|
|
291
|
+
useFill: {
|
|
292
|
+
true: "",
|
|
293
|
+
false: "bg-transparent"
|
|
294
|
+
},
|
|
295
|
+
leading: {
|
|
296
|
+
true: "ps-2xs"
|
|
297
|
+
},
|
|
298
|
+
color: {
|
|
299
|
+
default: "",
|
|
300
|
+
danger: "",
|
|
301
|
+
success: "",
|
|
302
|
+
warning: "",
|
|
303
|
+
primary: "",
|
|
304
|
+
secondary: "",
|
|
305
|
+
collab: "",
|
|
306
|
+
ai: ""
|
|
307
|
+
},
|
|
308
|
+
depth: {
|
|
309
|
+
light: "font-normal",
|
|
310
|
+
normal: "font-bold",
|
|
311
|
+
dark: "font-bold"
|
|
312
|
+
},
|
|
313
|
+
size: {
|
|
314
|
+
xs: {
|
|
315
|
+
base: "text-5xs gap-0.5",
|
|
316
|
+
wrapper: "h-[14px] gap-0.5",
|
|
317
|
+
label: "underline-offset-1",
|
|
318
|
+
leadingIcon: "size-sm",
|
|
319
|
+
leadingAvatarSize: "3xs",
|
|
320
|
+
trailingIcon: "size-sm "
|
|
321
|
+
},
|
|
322
|
+
sm: {
|
|
323
|
+
base: "text-4xs gap-1",
|
|
324
|
+
wrapper: "h-[16px] gap-1",
|
|
325
|
+
label: "underline-offset-1",
|
|
326
|
+
leadingIcon: "size-sm2",
|
|
327
|
+
leadingAvatarSize: "3xs",
|
|
328
|
+
trailingIcon: "size-sm2"
|
|
329
|
+
},
|
|
330
|
+
md: {
|
|
331
|
+
base: "text-3xs gap-1",
|
|
332
|
+
wrapper: "h-[17px] gap-1",
|
|
333
|
+
label: "underline-offset-1",
|
|
334
|
+
leadingIcon: "size-[15px]",
|
|
335
|
+
leadingAvatarSize: "3xs",
|
|
336
|
+
trailingIcon: "size-[15px]"
|
|
337
|
+
},
|
|
338
|
+
lg: {
|
|
339
|
+
base: "text-xs gap-1 rounded-lg",
|
|
340
|
+
wrapper: "h-[24px] gap-1",
|
|
341
|
+
leadingIcon: "size-[22px]",
|
|
342
|
+
leadingAvatarSize: "2xs",
|
|
343
|
+
trailingIcon: "size-[22px]"
|
|
344
|
+
},
|
|
345
|
+
xl: {
|
|
346
|
+
base: "text-md gap-1 rounded-xl",
|
|
347
|
+
wrapper: "h-[31px] gap-1",
|
|
348
|
+
leadingIcon: "size-[26px]",
|
|
349
|
+
leadingAvatarSize: "xs",
|
|
350
|
+
trailingIcon: "size-[26px]"
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
compoundVariants: [
|
|
355
|
+
// region default ////
|
|
356
|
+
// TAG_LIGHT ////
|
|
357
|
+
{
|
|
358
|
+
color: "default",
|
|
359
|
+
depth: "light",
|
|
360
|
+
class: [
|
|
361
|
+
"ring ring-inset",
|
|
362
|
+
"text-base-900 bg-base-100 ring-base-100",
|
|
363
|
+
"dark:text-base-900 dark:bg-base-150 dark:ring-base-150"
|
|
364
|
+
].join(" ")
|
|
365
|
+
},
|
|
366
|
+
// DEFAULT ////
|
|
367
|
+
{
|
|
368
|
+
color: "default",
|
|
369
|
+
depth: "normal",
|
|
370
|
+
class: [
|
|
371
|
+
"ring ring-inset",
|
|
372
|
+
"text-base-800 bg-base-150 ring-base-150",
|
|
373
|
+
"dark:text-base-950 dark:bg-base-200 dark:ring-base-200"
|
|
374
|
+
].join(" ")
|
|
375
|
+
},
|
|
376
|
+
// LIGHT ////
|
|
377
|
+
// @memo it should be LIGHT but that's equivalent to DEFAULT -> so we make it really dark ////
|
|
378
|
+
{
|
|
379
|
+
color: "default",
|
|
380
|
+
depth: "dark",
|
|
381
|
+
class: [
|
|
382
|
+
"ring ring-inset",
|
|
383
|
+
"text-white bg-base-500 ring-base-500",
|
|
384
|
+
"dark:text-base-50 dark:bg-base-600 dark:ring-base-600"
|
|
385
|
+
].join(" ")
|
|
386
|
+
},
|
|
387
|
+
// endregion ////
|
|
388
|
+
// region danger ////
|
|
389
|
+
// LIGHT_RED ////
|
|
390
|
+
{
|
|
391
|
+
color: "danger",
|
|
392
|
+
depth: "light",
|
|
393
|
+
class: [
|
|
394
|
+
"ring ring-inset",
|
|
395
|
+
"text-red-800 bg-red-500/17 ring-red-500/17",
|
|
396
|
+
"dark:text-red-900 dark:bg-red-300 dark:ring-red-300"
|
|
397
|
+
].join(" ")
|
|
398
|
+
},
|
|
399
|
+
// DANGER ////
|
|
400
|
+
{
|
|
401
|
+
color: "danger",
|
|
402
|
+
depth: "normal",
|
|
403
|
+
class: [
|
|
404
|
+
"ring ring-inset",
|
|
405
|
+
"text-red-800 bg-red-250 ring-red-250",
|
|
406
|
+
"dark:text-red-800 dark:bg-red-350 dark:ring-red-350"
|
|
407
|
+
].join(" ")
|
|
408
|
+
},
|
|
409
|
+
// danger_dark ////
|
|
410
|
+
{
|
|
411
|
+
color: "danger",
|
|
412
|
+
depth: "dark",
|
|
413
|
+
class: [
|
|
414
|
+
"ring ring-inset",
|
|
415
|
+
"text-white bg-red-500 ring-red-500",
|
|
416
|
+
"dark:text-red-250 dark:bg-red-600 dark:ring-red-600"
|
|
417
|
+
].join(" ")
|
|
418
|
+
},
|
|
419
|
+
// endregion ////
|
|
420
|
+
// region success ////
|
|
421
|
+
// LIGHT_GREEN ////
|
|
422
|
+
// @memo it should be LIGHT_GREEN but that's equivalent to SUCCESS -> so we make it really light ////
|
|
423
|
+
{
|
|
424
|
+
color: "success",
|
|
425
|
+
depth: "light",
|
|
426
|
+
class: [
|
|
427
|
+
"ring ring-inset",
|
|
428
|
+
"text-green-800 bg-green-500/17 ring-green-500/17",
|
|
429
|
+
"dark:text-green-900 dark:bg-green-300 dark:ring-green-300"
|
|
430
|
+
].join(" ")
|
|
431
|
+
},
|
|
432
|
+
// SUCCESS ////
|
|
433
|
+
{
|
|
434
|
+
color: "success",
|
|
435
|
+
depth: "normal",
|
|
436
|
+
class: [
|
|
437
|
+
"ring ring-inset",
|
|
438
|
+
"text-green-800 bg-green-300 ring-green-300",
|
|
439
|
+
"dark:text-green-800 dark:bg-green-330 dark:ring-green-330"
|
|
440
|
+
].join(" ")
|
|
441
|
+
},
|
|
442
|
+
// success_dark ////
|
|
443
|
+
{
|
|
444
|
+
color: "success",
|
|
445
|
+
depth: "dark",
|
|
446
|
+
class: [
|
|
447
|
+
"ring ring-inset",
|
|
448
|
+
"text-white bg-green-500 ring-green-500",
|
|
449
|
+
"dark:text-green-250 dark:bg-green-600 dark:ring-green-600"
|
|
450
|
+
].join(" ")
|
|
451
|
+
},
|
|
452
|
+
// endregion ////
|
|
453
|
+
// region warning ////
|
|
454
|
+
// ORANGE ////
|
|
455
|
+
{
|
|
456
|
+
color: "warning",
|
|
457
|
+
depth: "light",
|
|
458
|
+
class: [
|
|
459
|
+
"ring ring-inset",
|
|
460
|
+
"text-orange-800 bg-orange-250 ring-orange-300",
|
|
461
|
+
"dark:text-orange-900 dark:bg-orange-300 dark:ring-orange-300"
|
|
462
|
+
].join(" ")
|
|
463
|
+
},
|
|
464
|
+
// LIGHT_ORANGE ////
|
|
465
|
+
{
|
|
466
|
+
color: "warning",
|
|
467
|
+
depth: "normal",
|
|
468
|
+
class: [
|
|
469
|
+
"ring ring-inset",
|
|
470
|
+
"text-orange-800 bg-orange-300 ring-orange-300",
|
|
471
|
+
"dark:text-orange-800 dark:bg-orange-400 dark:ring-orange-400"
|
|
472
|
+
].join(" ")
|
|
473
|
+
},
|
|
474
|
+
// WARNING ////
|
|
475
|
+
{
|
|
476
|
+
color: "warning",
|
|
477
|
+
depth: "dark",
|
|
478
|
+
class: [
|
|
479
|
+
"ring ring-inset",
|
|
480
|
+
"text-white bg-orange-500 ring-orange-500",
|
|
481
|
+
"dark:text-orange-250 dark:bg-orange-600 dark:ring-orange-600"
|
|
482
|
+
].join(" ")
|
|
483
|
+
},
|
|
484
|
+
// endregion ////
|
|
485
|
+
// region primary ////
|
|
486
|
+
// LIGHT_BLUE ////
|
|
487
|
+
// @memo it should be LIGHT_BLUE but that's equivalent to PRIMARY -> so we make it really light ////
|
|
488
|
+
{
|
|
489
|
+
color: "primary",
|
|
490
|
+
depth: "light",
|
|
491
|
+
class: [
|
|
492
|
+
"ring ring-inset",
|
|
493
|
+
"text-blue-800 bg-blue-500/17 ring-blue-500/17",
|
|
494
|
+
"dark:text-blue-900 dark:bg-blue-300 dark:ring-blue-300"
|
|
495
|
+
].join(" ")
|
|
496
|
+
},
|
|
497
|
+
// PRIMARY ////
|
|
498
|
+
{
|
|
499
|
+
color: "primary",
|
|
500
|
+
depth: "normal",
|
|
501
|
+
class: [
|
|
502
|
+
"ring ring-inset",
|
|
503
|
+
"text-blue-700 bg-blue-250 ring-blue-250",
|
|
504
|
+
"dark:text-blue-700 dark:bg-blue-300 dark:ring-blue-300"
|
|
505
|
+
].join(" ")
|
|
506
|
+
},
|
|
507
|
+
// primary_dark ////
|
|
508
|
+
{
|
|
509
|
+
color: "primary",
|
|
510
|
+
depth: "dark",
|
|
511
|
+
class: [
|
|
512
|
+
"ring ring-inset",
|
|
513
|
+
"text-white bg-blue-500 ring-blue-500",
|
|
514
|
+
"dark:text-blue-250 dark:bg-blue-600 dark:ring-blue-600"
|
|
515
|
+
].join(" ")
|
|
516
|
+
},
|
|
517
|
+
// endregion ////
|
|
518
|
+
// region secondary ////
|
|
519
|
+
// TAG_SECONDARY ////
|
|
520
|
+
{
|
|
521
|
+
color: "secondary",
|
|
522
|
+
depth: "light",
|
|
523
|
+
class: [
|
|
524
|
+
"ring ring-inset",
|
|
525
|
+
"text-base-master bg-blue-320 ring-blue-320",
|
|
526
|
+
"dark:text-base-master dark:bg-blue-400 dark:ring-blue-400"
|
|
527
|
+
].join(" ")
|
|
528
|
+
},
|
|
529
|
+
// SECONDARY ////
|
|
530
|
+
{
|
|
531
|
+
color: "secondary",
|
|
532
|
+
depth: "normal",
|
|
533
|
+
class: [
|
|
534
|
+
"ring ring-inset",
|
|
535
|
+
"text-white bg-cyan-350 ring-cyan-350",
|
|
536
|
+
"dark:text-cyan-100 dark:bg-cyan-400 dark:ring-cyan-400"
|
|
537
|
+
].join(" ")
|
|
538
|
+
},
|
|
539
|
+
// secondary_dark ////
|
|
540
|
+
{
|
|
541
|
+
color: "secondary",
|
|
542
|
+
depth: "dark",
|
|
543
|
+
class: [
|
|
544
|
+
"ring ring-inset",
|
|
545
|
+
"text-white bg-cyan-500 ring-cyan-500",
|
|
546
|
+
"dark:text-cyan-250 dark:bg-cyan-600 dark:ring-cyan-600"
|
|
547
|
+
].join(" ")
|
|
548
|
+
},
|
|
549
|
+
// endregion ////
|
|
550
|
+
// region collab ////
|
|
551
|
+
{
|
|
552
|
+
color: "collab",
|
|
553
|
+
depth: "light",
|
|
554
|
+
class: [
|
|
555
|
+
"ring ring-inset",
|
|
556
|
+
"text-collab-800 bg-collab-500/17 ring-collab-500/17",
|
|
557
|
+
"dark:text-collab-900 dark:bg-collab-300 dark:ring-collab-300"
|
|
558
|
+
].join(" ")
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
color: "collab",
|
|
562
|
+
depth: "normal",
|
|
563
|
+
class: [
|
|
564
|
+
"ring ring-inset",
|
|
565
|
+
"text-collab-800 bg-collab-300 ring-collab-300",
|
|
566
|
+
"dark:text-collab-800 dark:bg-collab-300 dark:ring-collab-300"
|
|
567
|
+
].join(" ")
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
color: "collab",
|
|
571
|
+
depth: "dark",
|
|
572
|
+
class: [
|
|
573
|
+
"ring ring-inset",
|
|
574
|
+
"text-white bg-collab-500 ring-collab-500",
|
|
575
|
+
"dark:text-collab-250 dark:bg-collab-600 dark:ring-collab-600"
|
|
576
|
+
].join(" ")
|
|
577
|
+
},
|
|
578
|
+
// endregion ////
|
|
579
|
+
// region ai ////
|
|
580
|
+
// COPILOT_LIGHT_REVERSE ////
|
|
581
|
+
{
|
|
582
|
+
color: "ai",
|
|
583
|
+
depth: "light",
|
|
584
|
+
class: [
|
|
585
|
+
"ring ring-inset",
|
|
586
|
+
"text-ai-500 bg-white ring-ai-10",
|
|
587
|
+
"dark:text-ai-500 dark:bg-ai-50 dark:ring-ai-50"
|
|
588
|
+
].join(" ")
|
|
589
|
+
},
|
|
590
|
+
// LAVENDER ////
|
|
591
|
+
{
|
|
592
|
+
color: "ai",
|
|
593
|
+
depth: "normal",
|
|
594
|
+
class: [
|
|
595
|
+
"ring ring-inset",
|
|
596
|
+
"text-ai-500 bg-ai-150 ring-ai-150",
|
|
597
|
+
"dark:text-ai-600 dark:bg-ai-200 dark:ring-ai-200"
|
|
598
|
+
].join(" ")
|
|
599
|
+
},
|
|
600
|
+
// COPILOT_LIGHT ////
|
|
601
|
+
{
|
|
602
|
+
color: "ai",
|
|
603
|
+
depth: "dark",
|
|
604
|
+
class: [
|
|
605
|
+
"ring ring-inset",
|
|
606
|
+
"text-white bg-ai-330 ring-ai-330",
|
|
607
|
+
"dark:text-ai-100 dark:bg-ai-400 dark:ring-ai-400"
|
|
608
|
+
].join(" ")
|
|
609
|
+
},
|
|
610
|
+
// endregion ////
|
|
611
|
+
// region useLink & useFill ////
|
|
612
|
+
{
|
|
613
|
+
useLink: true,
|
|
614
|
+
useFill: false,
|
|
615
|
+
class: [
|
|
616
|
+
// 'hover:bg-base-100 dark:hover:bg-base-900'
|
|
617
|
+
].join(" ")
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
useFill: false,
|
|
621
|
+
class: "text-base-800 dark:text-base-250 bg-transparent dark:bg-transparent"
|
|
622
|
+
},
|
|
623
|
+
// endregion ////
|
|
624
|
+
// region useClose ////
|
|
625
|
+
{
|
|
626
|
+
useClose: true,
|
|
627
|
+
class: ""
|
|
628
|
+
}
|
|
629
|
+
// endregion ////
|
|
630
|
+
],
|
|
631
|
+
defaultVariants: {
|
|
632
|
+
color: "default",
|
|
633
|
+
depth: "normal",
|
|
634
|
+
size: "md",
|
|
635
|
+
useFill: false
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
const buttonGroupVariant = {
|
|
640
|
+
buttonGroup: {
|
|
641
|
+
horizontal: [
|
|
642
|
+
"focus-visible:outline-none",
|
|
643
|
+
"ring ring-inset ring-0 focus-visible:ring-2",
|
|
644
|
+
"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
|
|
645
|
+
"not-only:first:border-e-0 not-only:not-first:border-s-0"
|
|
646
|
+
].join(" "),
|
|
647
|
+
vertical: [
|
|
648
|
+
"focus-visible:outline-none",
|
|
649
|
+
"ring ring-inset ring-0 focus-visible:ring-2",
|
|
650
|
+
"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
|
|
651
|
+
].join(" ")
|
|
652
|
+
},
|
|
653
|
+
noSplit: {
|
|
654
|
+
false: [
|
|
655
|
+
"not-only:not-first:after:content-[''] not-only:not-first:after:absolute",
|
|
656
|
+
"not-only:not-first:after:top-[7px] not-only:not-first:after:bottom-[6px] not-only:not-first:after:left-0 not-only:not-first:after:w-px",
|
|
657
|
+
"not-only:not-first:after:bg-current/30"
|
|
658
|
+
].join(" ")
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
const buttonGroupVariantWithRoot = {
|
|
662
|
+
buttonGroup: {
|
|
663
|
+
horizontal: {
|
|
664
|
+
root: "group",
|
|
665
|
+
base: [
|
|
666
|
+
"focus-visible:outline-none",
|
|
667
|
+
"ring ring-inset ring-1 focus-visible:ring-2",
|
|
668
|
+
"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none",
|
|
669
|
+
"group-not-only:group-first:border-e-0 group-not-only:group-not-first:border-s-0"
|
|
670
|
+
].join(" ")
|
|
671
|
+
},
|
|
672
|
+
vertical: {
|
|
673
|
+
root: "group",
|
|
674
|
+
base: [
|
|
675
|
+
"focus-visible:outline-none",
|
|
676
|
+
"ring ring-inset ring-1 focus-visible:ring-2",
|
|
677
|
+
"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"
|
|
678
|
+
].join(" ")
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
noSplit: {
|
|
682
|
+
false: [
|
|
683
|
+
"not-only:not-first:after:content-[''] not-only:not-first:after:absolute",
|
|
684
|
+
"not-only:not-first:after:top-[7px] not-only:not-first:after:bottom-[6px] not-only:not-first:after:left-0 not-only:not-first:after:w-px",
|
|
685
|
+
"not-only:not-first:after:bg-current/30"
|
|
686
|
+
].join(" ")
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
const buttonGroup = {
|
|
690
|
+
base: "relative",
|
|
691
|
+
variants: {
|
|
692
|
+
size: {
|
|
693
|
+
xs: "",
|
|
694
|
+
sm: "",
|
|
695
|
+
md: "",
|
|
696
|
+
lg: ""
|
|
697
|
+
},
|
|
698
|
+
orientation: {
|
|
699
|
+
horizontal: "inline-flex -space-x-px",
|
|
700
|
+
vertical: "flex flex-col -space-y-px"
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
const button = {
|
|
706
|
+
slots: {
|
|
707
|
+
base: [
|
|
708
|
+
"select-none cursor-pointer inline-flex items-center",
|
|
709
|
+
"relative focus:outline-hidden",
|
|
710
|
+
"disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:opacity-50",
|
|
711
|
+
"transition duration-150 ease-linear"
|
|
712
|
+
// transition-colors
|
|
713
|
+
],
|
|
714
|
+
baseLine: [
|
|
715
|
+
"inline-flex items-center"
|
|
716
|
+
],
|
|
717
|
+
label: "truncate",
|
|
718
|
+
leadingIcon: "shrink-0",
|
|
719
|
+
leadingAvatar: "shrink-0",
|
|
720
|
+
leadingAvatarSize: "",
|
|
721
|
+
trailingIcon: "shrink-0"
|
|
722
|
+
},
|
|
723
|
+
variants: {
|
|
724
|
+
...buttonGroupVariant,
|
|
725
|
+
color: {
|
|
726
|
+
// DEFAULT ////
|
|
727
|
+
default: [
|
|
728
|
+
"text-white dark:text-base-100 bg-base-650 border border-base-650",
|
|
729
|
+
"hover:bg-base-850 hover:border-base-850 hover:focus-visible:ring-0",
|
|
730
|
+
"active:bg-slate-850 active:border-slate-850 active:focus-visible:ring-0",
|
|
731
|
+
"disabled:bg-base-650 aria-disabled:bg-base-650 disabled:border-base-650 aria-disabled:border-base-650",
|
|
732
|
+
"focus-visible:outline-base-650",
|
|
733
|
+
"ring-base-850 focus-visible:ring-base-850"
|
|
734
|
+
].join(" "),
|
|
735
|
+
danger: [
|
|
736
|
+
"text-white dark:text-red-100 bg-red-720 border border-red-720",
|
|
737
|
+
"hover:bg-red-790 hover:border-red-790 hover:focus-visible:ring-0",
|
|
738
|
+
"active:bg-red-730 active:border-red-730 active:focus-visible:ring-0",
|
|
739
|
+
"disabled:bg-red-720 aria-disabled:bg-red-720 disabled:border-red-720 aria-disabled:border-red-720",
|
|
740
|
+
"focus-visible:outline-red-720",
|
|
741
|
+
"ring-red-800 focus-visible:ring-red-800"
|
|
742
|
+
].join(" "),
|
|
743
|
+
// SUCCESS ////
|
|
744
|
+
success: [
|
|
745
|
+
"text-base-900 bg-green-450 border border-green-450",
|
|
746
|
+
"hover:bg-green-370 hover:border-green-370 hover:focus-visible:ring-0",
|
|
747
|
+
"active:bg-green-430 active:border-green-430 active:focus-visible:ring-0",
|
|
748
|
+
"disabled:bg-green-450 aria-disabled:bg-green-450 disabled:border-green-450 aria-disabled:border-green-450",
|
|
749
|
+
"focus-visible:outline-green-450",
|
|
750
|
+
"ring-green-500 focus-visible:ring-green-500"
|
|
751
|
+
].join(" "),
|
|
752
|
+
// new WARNING ////
|
|
753
|
+
warning: [
|
|
754
|
+
"text-white dark:text-orange-100 bg-orange-500 border border-orange-500",
|
|
755
|
+
"hover:bg-orange-500/75 hover:border-orange-500/75 hover:focus-visible:ring-0",
|
|
756
|
+
"active:bg-orange-500/85 active:border-orange-500/85 active:focus-visible:ring-0",
|
|
757
|
+
"disabled:bg-orange-500 aria-disabled:bg-orange-500 disabled:border-bg-orange-500 aria-disabled:border-bg-orange-500",
|
|
758
|
+
"focus-visible:outline-orange-500",
|
|
759
|
+
"ring-orange-800 focus-visible:ring-orange-800"
|
|
760
|
+
].join(" "),
|
|
761
|
+
// PRIMARY ////
|
|
762
|
+
primary: [
|
|
763
|
+
"text-white dark:text-blue-100 bg-blue-530 border border-blue-530",
|
|
764
|
+
"hover:bg-blue-450 hover:border-blue-450 hover:focus-visible:ring-0",
|
|
765
|
+
"active:bg-blue-550 active:border-blue-550 active:focus-visible:ring-0",
|
|
766
|
+
"disabled:bg-blue-530 aria-disabled:bg-blue-530 disabled:border-blue-530 aria-disabled:border-blue-530",
|
|
767
|
+
"focus-visible:outline-blue-530",
|
|
768
|
+
"ring-blue-800 focus-visible:ring-blue-800"
|
|
769
|
+
].join(" "),
|
|
770
|
+
// SECONDARY ////
|
|
771
|
+
secondary: [
|
|
772
|
+
"text-base-900 bg-cyan-160 border border-cyan-230",
|
|
773
|
+
"hover:bg-cyan-150 hover:border-cyan-230 hover:focus-visible:ring-0",
|
|
774
|
+
"active:bg-cyan-230 active:border-cyan-230 active:focus-visible:ring-0",
|
|
775
|
+
"disabled:bg-cyan-160 aria-disabled:bg-cyan-160 disabled:border-cyan-230 aria-disabled:border-cyan-230",
|
|
776
|
+
"focus-visible:outline-cyan-160",
|
|
777
|
+
"ring-cyan-500 focus-visible:ring-cyan-500"
|
|
778
|
+
].join(" "),
|
|
779
|
+
// COLLAB ////
|
|
780
|
+
collab: [
|
|
781
|
+
"text-white dark:text-collab-100 bg-collab-600 border border-collab-600",
|
|
782
|
+
"hover:bg-collab-500 hover:border-collab-500 hover:focus-visible:ring-0",
|
|
783
|
+
"active:bg-collab-700 active:border-collab-700 active:focus-visible:ring-0",
|
|
784
|
+
"disabled:bg-collab-600 aria-disabled:bg-collab-600 disabled:border-collab-600 aria-disabled:border-collab-600",
|
|
785
|
+
"focus-visible:outline-collab-600",
|
|
786
|
+
"ring-collab-900 focus-visible:ring-collab-900"
|
|
787
|
+
].join(" "),
|
|
788
|
+
// AI ////
|
|
789
|
+
ai: [
|
|
790
|
+
"text-white dark:text-ai-100 bg-ai-450 border border-ai-450",
|
|
791
|
+
"hover:bg-ai-370 hover:border-ai-370 hover:focus-visible:ring-0",
|
|
792
|
+
"active:bg-ai-550 active:border-ai-550 active:focus-visible:ring-0",
|
|
793
|
+
"disabled:bg-ai-450 aria-disabled:bg-ai-450 disabled:border-ai-450 aria-disabled:border-ai-450",
|
|
794
|
+
"focus-visible:outline-ai-450",
|
|
795
|
+
"ring-ai-900 focus-visible:ring-ai-900"
|
|
796
|
+
].join(" "),
|
|
797
|
+
// LINK ////
|
|
798
|
+
link: [
|
|
799
|
+
"no-underline decoration-solid decoration-auto",
|
|
800
|
+
"text-base-900 decoration-gray-900 bg-transparent border border-transparent dark:text-base-300",
|
|
801
|
+
"hover:text-base-750 dark:hover:text-base-400 hover:focus-visible:ring-0",
|
|
802
|
+
"active:text-base-900 dark:active:text-base-700 active:focus-visible:ring-0",
|
|
803
|
+
"disabled:text-base-900 aria-disabled:text-base-900 dark:disabled:text-base-300 dark:aria-disabled:disabled:text-base-300",
|
|
804
|
+
"focus-visible:outline-base-400",
|
|
805
|
+
"ring-base-850 focus-visible:ring-base-850"
|
|
806
|
+
].join(" ")
|
|
807
|
+
},
|
|
808
|
+
depth: {
|
|
809
|
+
light: "",
|
|
810
|
+
normal: "",
|
|
811
|
+
dark: ""
|
|
812
|
+
},
|
|
813
|
+
size: {
|
|
814
|
+
xs: {
|
|
815
|
+
base: "h-xl2 ps-4 pe-4 text-3xs leading-none",
|
|
816
|
+
// 26px
|
|
817
|
+
baseLine: "gap-1",
|
|
818
|
+
leadingIcon: "size-5",
|
|
819
|
+
leadingAvatarSize: "2xs",
|
|
820
|
+
trailingIcon: "size-md2"
|
|
821
|
+
},
|
|
822
|
+
sm: {
|
|
823
|
+
base: "h-3xl ps-[18px] pe-[18px] text-xs leading-none",
|
|
824
|
+
// 32px
|
|
825
|
+
baseLine: "gap-1.5",
|
|
826
|
+
leadingIcon: "size-6",
|
|
827
|
+
leadingAvatarSize: "xs",
|
|
828
|
+
trailingIcon: "size-lg"
|
|
829
|
+
},
|
|
830
|
+
md: {
|
|
831
|
+
base: "h-5xl ps-5 pe-5 text-xs leading-none",
|
|
832
|
+
// 40px
|
|
833
|
+
baseLine: "gap-1.5",
|
|
834
|
+
leadingIcon: "size-xl2",
|
|
835
|
+
leadingAvatarSize: "sm",
|
|
836
|
+
trailingIcon: "size-lg"
|
|
837
|
+
},
|
|
838
|
+
lg: {
|
|
839
|
+
base: "h-6xl ps-[28px] pe-[28px] text-xs leading-none",
|
|
840
|
+
// ? 48px
|
|
841
|
+
baseLine: "gap-2",
|
|
842
|
+
leadingIcon: "size-xl2",
|
|
843
|
+
leadingAvatarSize: "md",
|
|
844
|
+
trailingIcon: "size-lg"
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
block: {
|
|
848
|
+
true: {
|
|
849
|
+
base: "w-full",
|
|
850
|
+
baseLine: "w-full justify-center",
|
|
851
|
+
trailingIcon: "ms-auto"
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
rounded: {
|
|
855
|
+
true: "rounded-full",
|
|
856
|
+
false: "rounded-2xs"
|
|
857
|
+
},
|
|
858
|
+
leading: {
|
|
859
|
+
true: ""
|
|
860
|
+
},
|
|
861
|
+
useLabel: {
|
|
862
|
+
true: "",
|
|
863
|
+
false: "ps-1.5 pe-1.5 justify-center"
|
|
864
|
+
},
|
|
865
|
+
useDropdown: {
|
|
866
|
+
true: "ps-2 pe-2"
|
|
867
|
+
},
|
|
868
|
+
useWait: {
|
|
869
|
+
true: ""
|
|
870
|
+
},
|
|
871
|
+
useClock: {
|
|
872
|
+
true: ""
|
|
873
|
+
},
|
|
874
|
+
loading: {
|
|
875
|
+
true: ""
|
|
876
|
+
},
|
|
877
|
+
normalCase: {
|
|
878
|
+
true: "font-semibold normal-case",
|
|
879
|
+
false: "font-bold uppercase"
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
compoundVariants: [
|
|
883
|
+
// region default ////
|
|
884
|
+
{
|
|
885
|
+
// BASE_LIGHT ////
|
|
886
|
+
color: "default",
|
|
887
|
+
depth: "light",
|
|
888
|
+
class: [
|
|
889
|
+
"text-base-800 dark:text-base-800 bg-base-200 border border-base-300",
|
|
890
|
+
"hover:bg-base-320 hover:border-base-320 hover:focus-visible:ring-0",
|
|
891
|
+
"active:bg-base-250 active:border-base-250 active:focus-visible:ring-0",
|
|
892
|
+
"disabled:bg-base-200 aria-disabled:bg-base-200 disabled:border-base-300 aria-disabled:border-base-300",
|
|
893
|
+
"focus-visible:outline-base-200"
|
|
894
|
+
].join(" ")
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
// new BASE_DARK ////
|
|
898
|
+
color: "default",
|
|
899
|
+
depth: "dark",
|
|
900
|
+
class: [
|
|
901
|
+
"text-white dark:text-base-100 bg-base-900 border border-base-900",
|
|
902
|
+
"hover:bg-base-900/75 hover:border-base-900/75 hover:focus-visible:ring-0",
|
|
903
|
+
"active:bg-base-900/85 active:border-base-900/85 active:focus-visible:ring-0",
|
|
904
|
+
"disabled:bg-base-900 aria-disabled:bg-base-900 disabled:border-base-900 aria-disabled:border-base-900",
|
|
905
|
+
"focus-visible:outline-base-900",
|
|
906
|
+
"ring-base-700 focus-visible:ring-base-700"
|
|
907
|
+
].join(" ")
|
|
908
|
+
},
|
|
909
|
+
// endregion ////
|
|
910
|
+
// region danger ////
|
|
911
|
+
{
|
|
912
|
+
// DANGER_LIGHT ////
|
|
913
|
+
color: "danger",
|
|
914
|
+
depth: "light",
|
|
915
|
+
class: [
|
|
916
|
+
"text-red-750 dark:text-red-760 bg-red-270 border border-red-270",
|
|
917
|
+
"hover:bg-red-250 hover:border-red-250 dark:hover:bg-red-200 dark:hover:border-red-200 hover:focus-visible:ring-0",
|
|
918
|
+
"active:bg-red-350 active:border-red-350 dark:active:bg-red-350 dark:active:border-red-350 active:focus-visible:ring-0",
|
|
919
|
+
"disabled:bg-red-270 aria-disabled:bg-red-270 disabled:border-red-270 aria-disabled:border-red-270",
|
|
920
|
+
"dark:disabled:bg-red-270 dark:aria-disabled:bg-red-270 dark:disabled:border-red-270 dark:aria-disabled:border-red-270",
|
|
921
|
+
"focus-visible:outline-red-270"
|
|
922
|
+
].join(" ")
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
// DANGER_DARK ////
|
|
926
|
+
color: "danger",
|
|
927
|
+
depth: "dark",
|
|
928
|
+
class: [
|
|
929
|
+
"text-white dark:text-red-100 bg-red-850 border border-red-850",
|
|
930
|
+
"hover:bg-red-760 hover:border-red-760 hover:focus-visible:ring-0",
|
|
931
|
+
"active:bg-red-930 active:border-red-930 active:focus-visible:ring-0",
|
|
932
|
+
"disabled:bg-red-850 aria-disabled:bg-red-850 disabled:border-red-850 aria-disabled:border-red-850",
|
|
933
|
+
"focus-visible:outline-red-850",
|
|
934
|
+
"ring-red-950 focus-visible:ring-red-950"
|
|
935
|
+
].join(" ")
|
|
936
|
+
},
|
|
937
|
+
// endregion ////
|
|
938
|
+
// region success ////
|
|
939
|
+
{
|
|
940
|
+
// SUCCESS_LIGHT ////
|
|
941
|
+
color: "success",
|
|
942
|
+
depth: "light",
|
|
943
|
+
class: [
|
|
944
|
+
"text-green-780 bg-green-280 border border-green-280",
|
|
945
|
+
"hover:bg-green-270 hover:border-green-270 hover:focus-visible:ring-0",
|
|
946
|
+
"dark:hover:bg-green-200 dark:hover:border-green-200",
|
|
947
|
+
"active:bg-green-330 active:border-green-270 active:focus-visible:ring-0",
|
|
948
|
+
"dark:active:bg-green-330 dark:active:border-green-270",
|
|
949
|
+
"disabled:bg-green-280 aria-disabled:bg-green-280 disabled:border-green-280 aria-disabled:border-green-280",
|
|
950
|
+
"dark:disabled:bg-green-280 dark:aria-disabled:bg-green-280 dark:disabled:border-green-280 dark:aria-disabled:border-green-280",
|
|
951
|
+
"focus-visible:outline-green-280"
|
|
952
|
+
].join(" ")
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
// SUCCESS_DARK ////
|
|
956
|
+
color: "success",
|
|
957
|
+
depth: "dark",
|
|
958
|
+
class: [
|
|
959
|
+
"text-white dark:text-green-100 bg-green-730 border border-green-730",
|
|
960
|
+
"hover:bg-green-570 hover:border-green-570 hover:focus-visible:ring-0",
|
|
961
|
+
"active:bg-green-570 active:border-green-570 active:focus-visible:ring-0",
|
|
962
|
+
"disabled:bg-green-730 aria-disabled:bg-green-730 disabled:border-green-730 aria-disabled:border-green-730",
|
|
963
|
+
"focus-visible:outline-green-730",
|
|
964
|
+
"ring-green-900 focus-visible:ring-green-900"
|
|
965
|
+
].join(" ")
|
|
966
|
+
},
|
|
967
|
+
// endregion ////
|
|
968
|
+
// region warning ////
|
|
969
|
+
{
|
|
970
|
+
// WARNING_LIGHT ////
|
|
971
|
+
color: "warning",
|
|
972
|
+
depth: "light",
|
|
973
|
+
class: [
|
|
974
|
+
"text-orange-750 dark:text-orange-750 bg-orange-350/80 border border-orange-350/80 dark:bg-orange-230 dark:border-orange-230",
|
|
975
|
+
"hover:bg-orange-500/65 hover:border-orange-500/65 dark:hover:bg-orange-400 dark:hover:border-orange-400 hover:focus-visible:ring-0",
|
|
976
|
+
"active:bg-orange-550 active:border-orange-550 dark:active:bg-orange-600 dark:active:border-orange-600 active:focus-visible:ring-0",
|
|
977
|
+
"disabled:bg-orange-230 aria-disabled:bg-orange-230 disabled:border-orange-230 aria-disabled:border-orange-230 dark:disabled:bg-orange-230 dark:aria-disabled:bg-orange-230 dark:disabled:border-orange-230 dark:aria-disabled:border-orange-230",
|
|
978
|
+
"focus-visible:outline-orange-230"
|
|
979
|
+
].join(" ")
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
// new WARNING_DARK ////
|
|
983
|
+
color: "warning",
|
|
984
|
+
depth: "dark",
|
|
985
|
+
class: [
|
|
986
|
+
"text-white dark:text-orange-100 bg-orange-700 border border-orange-700",
|
|
987
|
+
"hover:bg-orange-700/75 hover:border-orange-700/75 hover:focus-visible:ring-0",
|
|
988
|
+
"active:bg-orange-700/85 active:border-orange-700/85 active:focus-visible:ring-0",
|
|
989
|
+
"disabled:bg-orange-700 aria-disabled:bg-orange-700 disabled:border-orange-700 aria-disabled:border-orange-700",
|
|
990
|
+
"focus-visible:outline-orange-700"
|
|
991
|
+
].join(" ")
|
|
992
|
+
},
|
|
993
|
+
// endregion ////
|
|
994
|
+
// region primary ////
|
|
995
|
+
{
|
|
996
|
+
// new PRIMARY_LIGHT ////
|
|
997
|
+
color: "primary",
|
|
998
|
+
depth: "light",
|
|
999
|
+
class: [
|
|
1000
|
+
"text-blue-800 dark:text-blue-800 bg-blue-300 border border-blue-400",
|
|
1001
|
+
"hover:bg-blue-300/75 hover:border-blue-300/75 hover:focus-visible:ring-0",
|
|
1002
|
+
"active:bg-blue-300/85 active:border-blue-300/85 active:focus-visible:ring-0",
|
|
1003
|
+
"disabled:bg-blue-300 aria-disabled:bg-blue-300 disabled:border-blue-300 aria-disabled:border-blue-300",
|
|
1004
|
+
"focus-visible:outline-blue-300"
|
|
1005
|
+
].join(" ")
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
// PRIMARY_DARK ////
|
|
1009
|
+
color: "primary",
|
|
1010
|
+
depth: "dark",
|
|
1011
|
+
class: [
|
|
1012
|
+
"text-white dark:text-blue-100 bg-blue-650 border border-blue-650",
|
|
1013
|
+
"hover:bg-blue-630 hover:border-blue-630 hover:focus-visible:ring-0",
|
|
1014
|
+
"active:bg-blue-750 active:border-blue-750 active:focus-visible:ring-0",
|
|
1015
|
+
"disabled:bg-blue-650 aria-disabled:bg-blue-650 disabled:border-blue-650 aria-disabled:border-blue-650",
|
|
1016
|
+
"focus-visible:outline-blue-650"
|
|
1017
|
+
].join(" ")
|
|
1018
|
+
},
|
|
1019
|
+
// endregion ////
|
|
1020
|
+
// region secondary ////
|
|
1021
|
+
{
|
|
1022
|
+
// SECONDARY_LIGHT ////
|
|
1023
|
+
color: "secondary",
|
|
1024
|
+
depth: "light",
|
|
1025
|
+
class: [
|
|
1026
|
+
"text-blue-620 dark:text-blue-850 bg-blue-310 border border-blue-310",
|
|
1027
|
+
"hover:bg-cyan-150 hover:border-cyan-150 hover:focus-visible:ring-0",
|
|
1028
|
+
"active:bg-cyan-230 active:border-cyan-230 active:focus-visible:ring-0",
|
|
1029
|
+
"disabled:bg-blue-310 aria-disabled:bg-blue-310 disabled:border-blue-310 aria-disabled:border-blue-310",
|
|
1030
|
+
"focus-visible:outline-blue-310"
|
|
1031
|
+
].join(" ")
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
// new SECONDARY_DARK ////
|
|
1035
|
+
color: "secondary",
|
|
1036
|
+
depth: "dark",
|
|
1037
|
+
class: [
|
|
1038
|
+
"text-base-900 bg-cyan-350 border-cyan-500",
|
|
1039
|
+
"hover:bg-cyan-350/75 hover:focus-visible:ring-0",
|
|
1040
|
+
"active:bg-cyan-350/85 active:focus-visible:ring-0",
|
|
1041
|
+
"disabled:bg-cyan-350 aria-disabled:bg-cyan-350",
|
|
1042
|
+
"focus-visible:outline-cyan-350",
|
|
1043
|
+
"ring-cyan-900 focus-visible:ring-cyan-900"
|
|
1044
|
+
].join(" ")
|
|
1045
|
+
},
|
|
1046
|
+
// endregion ////
|
|
1047
|
+
// region collab ////
|
|
1048
|
+
{
|
|
1049
|
+
// new collab_LIGHT ////
|
|
1050
|
+
color: "collab",
|
|
1051
|
+
depth: "light",
|
|
1052
|
+
class: [
|
|
1053
|
+
"text-collab-900 dark:text-collab-900 bg-collab-300 border border-collab-400",
|
|
1054
|
+
"hover:bg-collab-300/75 hover:border-collab-300/75 hover:focus-visible:ring-0",
|
|
1055
|
+
"active:bg-collab-300/85 active:border-collab-300/85 active:focus-visible:ring-0",
|
|
1056
|
+
"disabled:bg-collab-300 aria-disabled:bg-collab-300 disabled:border-collab-300 aria-disabled:border-collab-300",
|
|
1057
|
+
"focus-visible:outline-collab-300"
|
|
1058
|
+
].join(" ")
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
// new collab_DARK ////
|
|
1062
|
+
color: "collab",
|
|
1063
|
+
depth: "dark",
|
|
1064
|
+
class: [
|
|
1065
|
+
"text-white dark:text-collab-100 bg-collab-700 border border-collab-700",
|
|
1066
|
+
"hover:bg-collab-700/75 hover:border-collab-700/75 hover:focus-visible:ring-0",
|
|
1067
|
+
"active:bg-collab-700/85 active:border-collab-700/85 active:focus-visible:ring-0",
|
|
1068
|
+
"disabled:bg-collab-700 aria-disabled:bg-collab-700 disabled:border-collab-700 aria-disabled:border-collab-700",
|
|
1069
|
+
"focus-visible:outline-collab-700"
|
|
1070
|
+
].join(" ")
|
|
1071
|
+
},
|
|
1072
|
+
// endregion ////
|
|
1073
|
+
// region ai ////
|
|
1074
|
+
{
|
|
1075
|
+
// new AI_LIGHT ////
|
|
1076
|
+
color: "ai",
|
|
1077
|
+
depth: "light",
|
|
1078
|
+
class: [
|
|
1079
|
+
"text-ai-900 dark:text-ai-900 bg-ai-300 border border-ai-400",
|
|
1080
|
+
"hover:bg-ai-300/75 hover:border-ai-300/75 hover:focus-visible:ring-0",
|
|
1081
|
+
"active:bg-ai-300/85 active:border-ai-300/85 active:focus-visible:ring-0",
|
|
1082
|
+
"disabled:bg-ai-300 aria-disabled:bg-ai-300 disabled:border-ai-300 aria-disabled:border-ai-300",
|
|
1083
|
+
"focus-visible:outline-ai-300"
|
|
1084
|
+
].join(" ")
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
// new AI_DARK ////
|
|
1088
|
+
color: "ai",
|
|
1089
|
+
depth: "dark",
|
|
1090
|
+
class: [
|
|
1091
|
+
"text-white dark:text-ai-100 bg-ai-550 border border-ai-550",
|
|
1092
|
+
"hover:bg-ai-550/75 hover:border-ai-550/75 hover:focus-visible:ring-0",
|
|
1093
|
+
"active:bg-ai-550/85 active:border-ai-550/85 active:focus-visible:ring-0",
|
|
1094
|
+
"disabled:bg-ai-550 aria-disabled:bg-ai-550 disabled:border-ai-550 aria-disabled:border-ai-550",
|
|
1095
|
+
"focus-visible:outline-ai-550",
|
|
1096
|
+
"ring-ai-900 focus-visible:ring-ai-900"
|
|
1097
|
+
].join(" ")
|
|
1098
|
+
},
|
|
1099
|
+
// endregion ////
|
|
1100
|
+
// region link ////
|
|
1101
|
+
{
|
|
1102
|
+
// LIGHT ////
|
|
1103
|
+
color: "link",
|
|
1104
|
+
depth: "light",
|
|
1105
|
+
class: [
|
|
1106
|
+
"text-base-900 dark:text-base-300 bg-transparent border border-transparent",
|
|
1107
|
+
"hover:text-base-master dark:hover:text-base-100 hover:bg-base-30 dark:hover:bg-base-850 hover:focus-visible:ring-0",
|
|
1108
|
+
"active:text-base-ebony active:bg-blue-270 dark:active:text-base-100 dark:active:bg-slate-850 active:focus-visible:ring-0",
|
|
1109
|
+
"disabled:text-base-master disabled:bg-base-30 aria-disabled:bg-base-30 dark:disabled:text-base-100 dark:aria-disabled:text-base-100 dark:disabled:bg-base-850 dark:aria-disabled:bg-base-850",
|
|
1110
|
+
"focus-visible:outline-base-30 dark:focus-visible:outline-base-850"
|
|
1111
|
+
].join(" ")
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
// LIGHT_BORDER ////
|
|
1115
|
+
color: "link",
|
|
1116
|
+
depth: "light",
|
|
1117
|
+
useLabel: true,
|
|
1118
|
+
class: "ps-1.5 pe-1.5"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
// LIGHT_BORDER ////
|
|
1122
|
+
color: "link",
|
|
1123
|
+
depth: "dark",
|
|
1124
|
+
class: [
|
|
1125
|
+
"",
|
|
1126
|
+
"border",
|
|
1127
|
+
"text-base-900 bg-transparent border-base-330 dark:text-base-300 dark:border-base-800",
|
|
1128
|
+
"hover:text-base-900 dark:hover:text-base-900 hover:bg-base-320 hover:border-base-330 hover:focus-visible:ring-0",
|
|
1129
|
+
"active:text-base-900 dark:active:text-base-900 active:bg-base-250 active:border-base-550 active:focus-visible:ring-0",
|
|
1130
|
+
"disabled:bg-transparent disabled:border-base-330 aria-disabled:bg-transparent aria-disabled:border-base-330",
|
|
1131
|
+
"dark:disabled:text-base-900 dark:aria-disabled:text-base-900",
|
|
1132
|
+
"dark:disabled:border-base-900 dark:aria-disabled:border-base-900",
|
|
1133
|
+
"focus-visible:outline-base-330"
|
|
1134
|
+
].join(" ")
|
|
1135
|
+
},
|
|
1136
|
+
// endregion ////
|
|
1137
|
+
// region size && leading ////
|
|
1138
|
+
{
|
|
1139
|
+
size: "xs",
|
|
1140
|
+
leading: true,
|
|
1141
|
+
useLabel: true,
|
|
1142
|
+
useDropdown: false,
|
|
1143
|
+
class: "ps-1.5 pe-4"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
size: "sm",
|
|
1147
|
+
leading: true,
|
|
1148
|
+
useLabel: true,
|
|
1149
|
+
useDropdown: false,
|
|
1150
|
+
class: "ps-2.5 pe-[18px]"
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
size: "md",
|
|
1154
|
+
leading: true,
|
|
1155
|
+
useLabel: true,
|
|
1156
|
+
useDropdown: false,
|
|
1157
|
+
class: "ps-3.5 pe-5"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
size: "lg",
|
|
1161
|
+
leading: true,
|
|
1162
|
+
useLabel: true,
|
|
1163
|
+
useDropdown: false,
|
|
1164
|
+
class: "ps-4 pe-[28px]"
|
|
1165
|
+
},
|
|
1166
|
+
// endregion ////
|
|
1167
|
+
// region size && useDropdown ////
|
|
1168
|
+
{
|
|
1169
|
+
size: "xs",
|
|
1170
|
+
leading: false,
|
|
1171
|
+
useLabel: true,
|
|
1172
|
+
useDropdown: true,
|
|
1173
|
+
class: "ps-4 pe-1.5"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
size: "sm",
|
|
1177
|
+
leading: false,
|
|
1178
|
+
useLabel: true,
|
|
1179
|
+
useDropdown: true,
|
|
1180
|
+
class: "ps-[18px] pe-1.5"
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
size: "md",
|
|
1184
|
+
leading: false,
|
|
1185
|
+
useLabel: true,
|
|
1186
|
+
useDropdown: true,
|
|
1187
|
+
class: "ps-5 pe-2.5"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
size: "lg",
|
|
1191
|
+
leading: false,
|
|
1192
|
+
useLabel: true,
|
|
1193
|
+
useDropdown: true,
|
|
1194
|
+
class: "ps-[28px] pe-3.5"
|
|
1195
|
+
},
|
|
1196
|
+
// endregion ////
|
|
1197
|
+
// region size && leading && useDropdown ////
|
|
1198
|
+
{
|
|
1199
|
+
size: "xs",
|
|
1200
|
+
leading: true,
|
|
1201
|
+
useLabel: true,
|
|
1202
|
+
useDropdown: true,
|
|
1203
|
+
class: "ps-1.5 pe-1.5"
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
size: "sm",
|
|
1207
|
+
leading: true,
|
|
1208
|
+
useLabel: true,
|
|
1209
|
+
useDropdown: true,
|
|
1210
|
+
class: "ps-2.5 pe-1.5"
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
size: "md",
|
|
1214
|
+
leading: true,
|
|
1215
|
+
useLabel: true,
|
|
1216
|
+
useDropdown: true,
|
|
1217
|
+
class: "ps-3.5 pe-2.5"
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
size: "lg",
|
|
1221
|
+
leading: true,
|
|
1222
|
+
useLabel: true,
|
|
1223
|
+
useDropdown: true,
|
|
1224
|
+
class: "ps-4 pe-3.5"
|
|
1225
|
+
},
|
|
1226
|
+
// endregion ////
|
|
1227
|
+
// region noCaps ////
|
|
1228
|
+
{
|
|
1229
|
+
normalCase: true,
|
|
1230
|
+
size: "xs",
|
|
1231
|
+
class: "text-xs"
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
normalCase: true,
|
|
1235
|
+
size: "sm",
|
|
1236
|
+
class: "text-sm"
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
normalCase: true,
|
|
1240
|
+
size: ["md", "lg"],
|
|
1241
|
+
class: "text-md"
|
|
1242
|
+
}
|
|
1243
|
+
// endregion ////
|
|
1244
|
+
],
|
|
1245
|
+
defaultVariants: {
|
|
1246
|
+
size: "md",
|
|
1247
|
+
color: "default",
|
|
1248
|
+
depth: "normal"
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
|
|
1252
|
+
const checkbox = {
|
|
1253
|
+
slots: {
|
|
1254
|
+
root: "relative flex items-start",
|
|
1255
|
+
base: "cursor-pointer shrink-0 flex items-center justify-center rounded-2xs text-white dark:text-base-150 ring ring-inset ring-base-300 dark:ring-base-700 focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
1256
|
+
container: "flex items-center",
|
|
1257
|
+
wrapper: "font-b24-primary ms-2",
|
|
1258
|
+
icon: "shrink-0 size-full",
|
|
1259
|
+
label: "cursor-pointer block font-regular text-base-master dark:text-base-400",
|
|
1260
|
+
description: "text-base-500 dark:text-base-600"
|
|
1261
|
+
},
|
|
1262
|
+
variants: {
|
|
1263
|
+
color: {
|
|
1264
|
+
default: "focus-visible:outline-base-900 dark:focus-visible:outline-base-350",
|
|
1265
|
+
danger: "focus-visible:outline-red-500 dark:focus-visible:outline-red-600",
|
|
1266
|
+
success: "focus-visible:outline-green-500 dark:focus-visible:outline-green-600",
|
|
1267
|
+
warning: "focus-visible:outline-orange-500 dark:focus-visible:outline-orange-600",
|
|
1268
|
+
primary: "focus-visible:outline-blue-500 dark:focus-visible:outline-blue-600",
|
|
1269
|
+
secondary: "focus-visible:outline-cyan-350 dark:focus-visible:outline-cyan-500",
|
|
1270
|
+
collab: "focus-visible:outline-collab-500 dark:focus-visible:outline-collab-600",
|
|
1271
|
+
ai: "focus-visible:outline-ai-500 dark:focus-visible:outline-ai-600"
|
|
1272
|
+
},
|
|
1273
|
+
size: {
|
|
1274
|
+
xs: {
|
|
1275
|
+
base: "size-3",
|
|
1276
|
+
container: "h-4",
|
|
1277
|
+
wrapper: "text-xs",
|
|
1278
|
+
label: "leading-4"
|
|
1279
|
+
},
|
|
1280
|
+
sm: {
|
|
1281
|
+
base: "size-3.5",
|
|
1282
|
+
container: "h-4",
|
|
1283
|
+
wrapper: "text-sm",
|
|
1284
|
+
label: "leading-4"
|
|
1285
|
+
},
|
|
1286
|
+
md: {
|
|
1287
|
+
base: "size-4",
|
|
1288
|
+
container: "h-5",
|
|
1289
|
+
wrapper: "text-md",
|
|
1290
|
+
label: "leading-5"
|
|
1291
|
+
},
|
|
1292
|
+
lg: {
|
|
1293
|
+
base: "size-5",
|
|
1294
|
+
container: "h-5",
|
|
1295
|
+
wrapper: "text-xl",
|
|
1296
|
+
label: "leading-5"
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
required: {
|
|
1300
|
+
true: {
|
|
1301
|
+
label: "after:content-['*'] after:ms-0.5 after:text-red-500 dark:after:text-red-600"
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
disabled: {
|
|
1305
|
+
true: {
|
|
1306
|
+
base: "cursor-not-allowed opacity-75",
|
|
1307
|
+
label: "cursor-not-allowed opacity-75",
|
|
1308
|
+
description: "cursor-not-allowed opacity-75"
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
checked: {
|
|
1312
|
+
true: ""
|
|
1313
|
+
}
|
|
1314
|
+
},
|
|
1315
|
+
compoundVariants: [
|
|
1316
|
+
{
|
|
1317
|
+
color: "default",
|
|
1318
|
+
checked: true,
|
|
1319
|
+
class: "ring-2 ring-base-900 bg-base-900 dark:ring-base-350 dark:bg-base-350 dark:text-base-800"
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
color: "danger",
|
|
1323
|
+
checked: true,
|
|
1324
|
+
class: "ring-2 ring-red-500 bg-red-500 dark:ring-red-600 dark:bg-red-600 dark:text-red-250"
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
color: "success",
|
|
1328
|
+
checked: true,
|
|
1329
|
+
class: "ring-2 ring-green-500 bg-green-500 dark:ring-green-600 dark:bg-green-600 dark:text-green-250"
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
color: "warning",
|
|
1333
|
+
checked: true,
|
|
1334
|
+
class: "ring-2 ring-orange-500 bg-orange-500 dark:ring-orange-600 dark:bg-orange-600 dark:text-orange-250"
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
color: "primary",
|
|
1338
|
+
checked: true,
|
|
1339
|
+
class: "ring-2 ring-blue-500 bg-blue-500 dark:ring-blue-600 dark:bg-blue-600 dark:text-blue-250"
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
color: "secondary",
|
|
1343
|
+
checked: true,
|
|
1344
|
+
class: "ring-2 ring-cyan-350 bg-cyan-350 dark:ring-cyan-500 dark:bg-cyan-500"
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
color: "collab",
|
|
1348
|
+
checked: true,
|
|
1349
|
+
class: "ring-2 ring-collab-500 bg-collab-500 dark:ring-collab-600 dark:bg-collab-600 dark:text-collab-250"
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
color: "ai",
|
|
1353
|
+
checked: true,
|
|
1354
|
+
class: "ring-2 ring-ai-500 bg-ai-500 dark:ring-ai-600 dark:bg-ai-600 dark:text-ai-250"
|
|
1355
|
+
}
|
|
1356
|
+
],
|
|
1357
|
+
defaultVariants: {
|
|
1358
|
+
size: "md",
|
|
1359
|
+
color: "primary"
|
|
1360
|
+
}
|
|
1361
|
+
};
|
|
1362
|
+
|
|
1363
|
+
const chip = {
|
|
1364
|
+
slots: {
|
|
1365
|
+
root: "relative inline-flex items-center justify-center shrink-0",
|
|
1366
|
+
base: "select-none rounded-sm flex items-center justify-center p-1 text-white leading-none font-semibold font-b24-secondary whitespace-nowrap"
|
|
1367
|
+
},
|
|
1368
|
+
variants: {
|
|
1369
|
+
color: {
|
|
1370
|
+
default: "bg-base-500 dark:bg-base-900 dark:text-base-150",
|
|
1371
|
+
danger: "bg-red-500 dark:bg-red-600 dark:text-red-250",
|
|
1372
|
+
success: "bg-green-500 dark:bg-green-600 dark:text-green-250",
|
|
1373
|
+
warning: "bg-orange-500 dark:bg-orange-600 dark:text-orange-250",
|
|
1374
|
+
primary: "bg-blue-500 dark:bg-blue-600 dark:text-blue-250",
|
|
1375
|
+
secondary: "bg-cyan-350 dark:bg-cyan-500",
|
|
1376
|
+
collab: "bg-collab-500 dark:bg-collab-800 dark:text-collab-250",
|
|
1377
|
+
ai: "bg-ai-500 dark:bg-ai-800 dark:text-ai-250",
|
|
1378
|
+
link: "bg-base-900/85 text-white dark:bg-white/85 dark:text-base-900"
|
|
1379
|
+
},
|
|
1380
|
+
size: {
|
|
1381
|
+
"3xs": "h-1 min-w-1 text-[0px] text-transparent p-0",
|
|
1382
|
+
"2xs": "h-1.5 min-w-1.5 text-[0px] text-transparent p-0",
|
|
1383
|
+
"xs": "h-xs2 min-w-xs2 text-[0px] text-transparent p-0",
|
|
1384
|
+
"sm": "h-sm min-w-sm text-4xs font-regular",
|
|
1385
|
+
"md": "h-md min-w-md text-3xs",
|
|
1386
|
+
"lg": "h-lg min-w-lg rounded-md text-xs",
|
|
1387
|
+
"xl": "h-lg min-w-lg rounded-md text-xs",
|
|
1388
|
+
"2xl": "h-lg min-w-lg rounded-md text-xs",
|
|
1389
|
+
"3xl": "h-lg min-w-lg rounded-md text-xs"
|
|
1390
|
+
},
|
|
1391
|
+
position: {
|
|
1392
|
+
"top-right": "top-0 right-0",
|
|
1393
|
+
"bottom-right": "bottom-0 right-0",
|
|
1394
|
+
"top-left": "top-0 left-0",
|
|
1395
|
+
"bottom-left": "bottom-0 left-0"
|
|
1396
|
+
},
|
|
1397
|
+
inset: {
|
|
1398
|
+
false: ""
|
|
1399
|
+
},
|
|
1400
|
+
standalone: {
|
|
1401
|
+
true: "",
|
|
1402
|
+
false: "ring ring-white dark:ring-base-700 absolute"
|
|
1403
|
+
}
|
|
1404
|
+
},
|
|
1405
|
+
compoundVariants: [
|
|
1406
|
+
// not inset ////
|
|
1407
|
+
{
|
|
1408
|
+
position: "top-right",
|
|
1409
|
+
inset: false,
|
|
1410
|
+
standalone: false,
|
|
1411
|
+
class: "-translate-y-1/2 translate-x-1/2 transform"
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
position: "bottom-right",
|
|
1415
|
+
inset: false,
|
|
1416
|
+
standalone: false,
|
|
1417
|
+
class: "translate-y-1/2 translate-x-1/2 transform"
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
position: "top-left",
|
|
1421
|
+
inset: false,
|
|
1422
|
+
standalone: false,
|
|
1423
|
+
class: "-translate-y-1/2 -translate-x-1/2 transform"
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
position: "bottom-left",
|
|
1427
|
+
inset: false,
|
|
1428
|
+
standalone: false,
|
|
1429
|
+
class: "translate-y-1/2 -translate-x-1/2 transform"
|
|
1430
|
+
},
|
|
1431
|
+
// inset ////
|
|
1432
|
+
{
|
|
1433
|
+
position: "top-right",
|
|
1434
|
+
size: ["2xs", "xs", "sm", "md", "lg", "xl", "2xl"],
|
|
1435
|
+
inset: true,
|
|
1436
|
+
standalone: false,
|
|
1437
|
+
class: "-translate-y-1/3 translate-x-1/3 transform"
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
position: "top-right",
|
|
1441
|
+
size: ["2xs", "3xl"],
|
|
1442
|
+
inset: true,
|
|
1443
|
+
standalone: false,
|
|
1444
|
+
class: "translate-y-0 translate-x-0 transform"
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
position: "bottom-right",
|
|
1448
|
+
size: ["2xs", "xs", "sm", "md", "lg", "xl", "2xl"],
|
|
1449
|
+
inset: true,
|
|
1450
|
+
standalone: false,
|
|
1451
|
+
class: "translate-y-1/3 translate-x-1/3 transform"
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
position: "bottom-right",
|
|
1455
|
+
size: ["2xs", "3xl"],
|
|
1456
|
+
inset: true,
|
|
1457
|
+
standalone: false,
|
|
1458
|
+
class: "translate-y-0 translate-x-0 transform"
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
position: "top-left",
|
|
1462
|
+
size: ["2xs", "xs", "sm", "md", "lg", "xl", "2xl"],
|
|
1463
|
+
inset: true,
|
|
1464
|
+
standalone: false,
|
|
1465
|
+
class: "-translate-y-1/3 -translate-x-1/3 transform"
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
position: "top-left",
|
|
1469
|
+
size: ["2xs", "3xl"],
|
|
1470
|
+
inset: true,
|
|
1471
|
+
standalone: false,
|
|
1472
|
+
class: "-translate-y-0 -translate-x-0 transform"
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
position: "bottom-left",
|
|
1476
|
+
size: ["2xs", "xs", "sm", "md", "lg", "xl", "2xl"],
|
|
1477
|
+
inset: true,
|
|
1478
|
+
standalone: false,
|
|
1479
|
+
class: "translate-y-1/3 -translate-x-1/3 transform"
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
position: "bottom-left",
|
|
1483
|
+
size: ["2xs", "3xl"],
|
|
1484
|
+
inset: true,
|
|
1485
|
+
standalone: false,
|
|
1486
|
+
class: "translate-y-0 -translate-x-0 transform"
|
|
1487
|
+
}
|
|
1488
|
+
],
|
|
1489
|
+
defaultVariants: {
|
|
1490
|
+
size: "sm",
|
|
1491
|
+
color: "danger",
|
|
1492
|
+
position: "top-right"
|
|
1493
|
+
}
|
|
1494
|
+
};
|
|
1495
|
+
|
|
1496
|
+
const container = {
|
|
1497
|
+
base: "max-w-[80rem] mx-auto px-4 sm:px-6 lg:px-8"
|
|
1498
|
+
// max-w-7xl w-full
|
|
1499
|
+
};
|
|
1500
|
+
|
|
1501
|
+
const countdown = {
|
|
1502
|
+
slots: {
|
|
1503
|
+
base: [
|
|
1504
|
+
"relative flex flex-row flex-nowrap items-center justify-between",
|
|
1505
|
+
"text-base-500 dark:text-base-600"
|
|
1506
|
+
],
|
|
1507
|
+
label: "",
|
|
1508
|
+
leadingIcon: "shrink-0",
|
|
1509
|
+
leadingAvatar: "shrink-0",
|
|
1510
|
+
leadingAvatarSize: "",
|
|
1511
|
+
circleBase: "-scale-x-100 absolute inset-x-0 inset-y-0",
|
|
1512
|
+
circleGroup: "fill-none stroke-none",
|
|
1513
|
+
circleElement: "stroke-transparent stroke-1",
|
|
1514
|
+
circlePath: [
|
|
1515
|
+
"stroke-[7px] rotate-90 origin-center stroke-current transition-all duration-1000 ease-linear"
|
|
1516
|
+
]
|
|
1517
|
+
},
|
|
1518
|
+
variants: {
|
|
1519
|
+
size: {
|
|
1520
|
+
xs: {
|
|
1521
|
+
base: "gap-0.5 text-5xs leading-none",
|
|
1522
|
+
leadingIcon: "size-sm",
|
|
1523
|
+
leadingAvatarSize: "3xs"
|
|
1524
|
+
},
|
|
1525
|
+
sm: {
|
|
1526
|
+
base: "gap-1 text-4xs leading-none",
|
|
1527
|
+
leadingIcon: "size-sm2",
|
|
1528
|
+
leadingAvatarSize: "3xs"
|
|
1529
|
+
},
|
|
1530
|
+
md: {
|
|
1531
|
+
base: "gap-1 text-md leading-none",
|
|
1532
|
+
leadingIcon: "size-[16px]",
|
|
1533
|
+
leadingAvatarSize: "3xs"
|
|
1534
|
+
},
|
|
1535
|
+
lg: {
|
|
1536
|
+
base: "gap-1 text-lg leading-none",
|
|
1537
|
+
leadingIcon: "size-[22px]",
|
|
1538
|
+
leadingAvatarSize: "2xs"
|
|
1539
|
+
},
|
|
1540
|
+
xl: {
|
|
1541
|
+
base: "gap-1 text-xl leading-none",
|
|
1542
|
+
leadingIcon: "size-[26px]",
|
|
1543
|
+
leadingAvatarSize: "xs"
|
|
1544
|
+
}
|
|
1545
|
+
},
|
|
1546
|
+
leading: {
|
|
1547
|
+
true: ""
|
|
1548
|
+
},
|
|
1549
|
+
useCircle: {
|
|
1550
|
+
true: {
|
|
1551
|
+
base: "justify-center",
|
|
1552
|
+
circleBase: "size-full"
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
},
|
|
1556
|
+
compoundVariants: [
|
|
1557
|
+
{
|
|
1558
|
+
size: "xs",
|
|
1559
|
+
useCircle: true,
|
|
1560
|
+
class: "text-7xs leading-normal p-0.5"
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
size: "sm",
|
|
1564
|
+
useCircle: true,
|
|
1565
|
+
class: "text-6xs leading-normal p-1.5"
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
size: "md",
|
|
1569
|
+
useCircle: true,
|
|
1570
|
+
class: "text-3xs leading-normal p-1.5"
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
size: "lg",
|
|
1574
|
+
useCircle: true,
|
|
1575
|
+
class: "text-xs leading-normal p-1.5 pb-2"
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
size: "xl",
|
|
1579
|
+
useCircle: true,
|
|
1580
|
+
class: "text-sm leading-normal p-2 pb-2.5"
|
|
1581
|
+
}
|
|
1582
|
+
],
|
|
1583
|
+
defaultVariants: {
|
|
1584
|
+
size: "md"
|
|
1585
|
+
}
|
|
1586
|
+
};
|
|
1587
|
+
|
|
1588
|
+
const form = {
|
|
1589
|
+
base: ""
|
|
1590
|
+
};
|
|
1591
|
+
|
|
1592
|
+
const formField = {
|
|
1593
|
+
slots: {
|
|
1594
|
+
root: "font-b24-system font-regular",
|
|
1595
|
+
wrapper: "leading-none",
|
|
1596
|
+
labelWrapper: "flex content-center items-center justify-between",
|
|
1597
|
+
label: "block text-base-900 dark:text-base-400",
|
|
1598
|
+
hint: "text-base-500 dark:text-base-600",
|
|
1599
|
+
container: "relative",
|
|
1600
|
+
description: "mt-0.5 leading-tight text-base-500 dark:text-base-600",
|
|
1601
|
+
error: "mt-1 text-red-500 dark:text-red-600",
|
|
1602
|
+
errorIcon: "size-lg",
|
|
1603
|
+
help: "mt-1.5 leading-tight italic text-base-500 dark:text-base-600"
|
|
1604
|
+
},
|
|
1605
|
+
variants: {
|
|
1606
|
+
useDescription: {
|
|
1607
|
+
true: { wrapper: "mb-1.5" },
|
|
1608
|
+
false: { wrapper: "mb-2.5" }
|
|
1609
|
+
},
|
|
1610
|
+
size: {
|
|
1611
|
+
xs: { root: "text-xs", errorIcon: "size-md" },
|
|
1612
|
+
sm: { root: "text-xs", errorIcon: "size-md" },
|
|
1613
|
+
md: { root: "text-sm", errorIcon: "size-md2" },
|
|
1614
|
+
lg: { root: "text-md" }
|
|
1615
|
+
},
|
|
1616
|
+
required: {
|
|
1617
|
+
true: {
|
|
1618
|
+
label: "after:content-['*'] after:ms-0.5 after:text-red-500 after:dark:text-red-600"
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
compoundVariants: [],
|
|
1623
|
+
defaultVariants: {
|
|
1624
|
+
size: "md"
|
|
1625
|
+
}
|
|
1626
|
+
};
|
|
1627
|
+
|
|
1628
|
+
const input = {
|
|
1629
|
+
slots: {
|
|
1630
|
+
root: "relative inline-flex items-center w-full",
|
|
1631
|
+
base: [
|
|
1632
|
+
"w-full py-0 border-0 focus:outline-none",
|
|
1633
|
+
"disabled:cursor-not-allowed disabled:bg-base-30/37 disabled:resize-none disabled:text-base-500",
|
|
1634
|
+
"dark:disabled:bg-base-900/37 dark:disabled:text-base-800",
|
|
1635
|
+
"appearance-none transition duration-300 ease-linear",
|
|
1636
|
+
// transition-colors
|
|
1637
|
+
"ring ring-inset ring-base-300",
|
|
1638
|
+
"dark:ring-base-800",
|
|
1639
|
+
"text-base-master bg-white placeholder:text-base-400 hover:text-base-900 focus:text-base-900 active:text-base-900",
|
|
1640
|
+
"dark:text-base-150 dark:bg-transparent dark:placeholder:text-base-300 dark:hover:text-base-350 dark:focus:text-base-350 dark:active:text-base-350",
|
|
1641
|
+
"font-b24-primary font-regular text-md leading-none",
|
|
1642
|
+
"align-middle",
|
|
1643
|
+
"text-ellipsis whitespace-nowrap"
|
|
1644
|
+
],
|
|
1645
|
+
leading: "absolute inset-y-0 start-0 flex items-center",
|
|
1646
|
+
leadingIcon: "shrink-0 text-base-400",
|
|
1647
|
+
leadingAvatar: "shrink-0",
|
|
1648
|
+
leadingAvatarSize: "",
|
|
1649
|
+
trailing: "absolute inset-y-0 end-0 flex items-center",
|
|
1650
|
+
trailingIcon: "shrink-0 text-base-400",
|
|
1651
|
+
tag: [
|
|
1652
|
+
"pointer-events-none select-none",
|
|
1653
|
+
"absolute z-10 -top-1.5 right-3 h-sm px-1.5 flex flex-col justify-center items-center",
|
|
1654
|
+
"font-b24-primary font-bold text-6xs leading-none uppercase rounded-full"
|
|
1655
|
+
]
|
|
1656
|
+
},
|
|
1657
|
+
variants: {
|
|
1658
|
+
...buttonGroupVariantWithRoot,
|
|
1659
|
+
size: {
|
|
1660
|
+
xs: {
|
|
1661
|
+
base: "px-3 h-xl2 gap-1",
|
|
1662
|
+
// 26px
|
|
1663
|
+
leading: "px-1",
|
|
1664
|
+
trailing: "px-1",
|
|
1665
|
+
leadingIcon: "size-lg2",
|
|
1666
|
+
leadingAvatarSize: "2xs",
|
|
1667
|
+
trailingIcon: "size-lg2"
|
|
1668
|
+
},
|
|
1669
|
+
sm: {
|
|
1670
|
+
base: "px-3 h-8 gap-1.5",
|
|
1671
|
+
// 32px
|
|
1672
|
+
leading: "px-1.5",
|
|
1673
|
+
trailing: "px-1.5",
|
|
1674
|
+
leadingIcon: "size-lg2",
|
|
1675
|
+
leadingAvatarSize: "xs",
|
|
1676
|
+
trailingIcon: "size-lg2"
|
|
1677
|
+
},
|
|
1678
|
+
md: {
|
|
1679
|
+
base: "px-3 h-10 gap-1.5",
|
|
1680
|
+
// 40px
|
|
1681
|
+
leading: "px-2",
|
|
1682
|
+
trailing: "px-2",
|
|
1683
|
+
leadingIcon: "size-[24px]",
|
|
1684
|
+
leadingAvatarSize: "sm",
|
|
1685
|
+
trailingIcon: "size-[24px]"
|
|
1686
|
+
},
|
|
1687
|
+
lg: {
|
|
1688
|
+
base: "px-3 h-12 gap-2",
|
|
1689
|
+
// 48px
|
|
1690
|
+
leading: "px-2",
|
|
1691
|
+
trailing: "px-2",
|
|
1692
|
+
leadingIcon: "size-[24px]",
|
|
1693
|
+
leadingAvatarSize: "md",
|
|
1694
|
+
trailingIcon: "size-[24px]"
|
|
1695
|
+
}
|
|
1696
|
+
},
|
|
1697
|
+
color: {
|
|
1698
|
+
default: "",
|
|
1699
|
+
danger: "",
|
|
1700
|
+
success: "",
|
|
1701
|
+
warning: "",
|
|
1702
|
+
primary: "",
|
|
1703
|
+
secondary: "",
|
|
1704
|
+
collab: "",
|
|
1705
|
+
ai: ""
|
|
1706
|
+
},
|
|
1707
|
+
tagColor: {
|
|
1708
|
+
default: {
|
|
1709
|
+
tag: "text-white bg-base-900 dark:text-base-150 dark:bg-base-900"
|
|
1710
|
+
},
|
|
1711
|
+
danger: {
|
|
1712
|
+
tag: "text-white bg-red-500 dark:text-red-250 dark:bg-red-600"
|
|
1713
|
+
},
|
|
1714
|
+
success: {
|
|
1715
|
+
tag: "text-white bg-green-500 dark:text-green-250 dark:bg-green-600"
|
|
1716
|
+
},
|
|
1717
|
+
warning: {
|
|
1718
|
+
tag: "text-white bg-orange-500 dark:text-orange-250 dark:bg-orange-600"
|
|
1719
|
+
},
|
|
1720
|
+
primary: {
|
|
1721
|
+
tag: "text-white bg-blue-500 dark:text-blue-250 dark:bg-blue-600"
|
|
1722
|
+
},
|
|
1723
|
+
secondary: {
|
|
1724
|
+
tag: "text-white bg-cyan-350 dark:text-base-150 dark:bg-cyan-500"
|
|
1725
|
+
},
|
|
1726
|
+
collab: {
|
|
1727
|
+
tag: "text-white bg-collab-500 dark:text-collab-200 dark:bg-collab-800"
|
|
1728
|
+
},
|
|
1729
|
+
ai: {
|
|
1730
|
+
tag: "text-white bg-ai-500 dark:text-ai-200 dark:bg-ai-800"
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1733
|
+
rounded: {
|
|
1734
|
+
true: "rounded-3xl",
|
|
1735
|
+
false: "rounded-2xs"
|
|
1736
|
+
},
|
|
1737
|
+
noPadding: {
|
|
1738
|
+
true: {
|
|
1739
|
+
base: "px-0"
|
|
1740
|
+
}
|
|
1741
|
+
},
|
|
1742
|
+
noBorder: {
|
|
1743
|
+
true: "ring-0 focus-visible:ring-0"
|
|
1744
|
+
},
|
|
1745
|
+
underline: {
|
|
1746
|
+
true: "ring-0 focus-visible:ring-0 border-b border-b-base-300 rounded-none"
|
|
1747
|
+
},
|
|
1748
|
+
leading: {
|
|
1749
|
+
true: ""
|
|
1750
|
+
},
|
|
1751
|
+
trailing: {
|
|
1752
|
+
true: ""
|
|
1753
|
+
},
|
|
1754
|
+
loading: {
|
|
1755
|
+
true: ""
|
|
1756
|
+
},
|
|
1757
|
+
highlight: {
|
|
1758
|
+
true: ""
|
|
1759
|
+
},
|
|
1760
|
+
type: {
|
|
1761
|
+
file: "file:me-1.5 file:text-base-500 file:outline-none"
|
|
1762
|
+
}
|
|
1763
|
+
},
|
|
1764
|
+
compoundVariants: [
|
|
1765
|
+
// region ring for focus and highlight ////
|
|
1766
|
+
// region default ////
|
|
1767
|
+
{
|
|
1768
|
+
color: "default",
|
|
1769
|
+
noBorder: false,
|
|
1770
|
+
underline: false,
|
|
1771
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-base-900 dark:focus-visible:ring-base-350"
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
color: "default",
|
|
1775
|
+
highlight: true,
|
|
1776
|
+
noBorder: false,
|
|
1777
|
+
underline: false,
|
|
1778
|
+
class: "ring ring-inset ring-base-900 dark:ring-base-350"
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
color: "default",
|
|
1782
|
+
noBorder: false,
|
|
1783
|
+
underline: true,
|
|
1784
|
+
class: "focus-visible:border-base-900 dark:focus-visible:border-b-base-350"
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
color: "default",
|
|
1788
|
+
highlight: true,
|
|
1789
|
+
noBorder: false,
|
|
1790
|
+
underline: true,
|
|
1791
|
+
class: "border-b-base-900 dark:border-b-base-350"
|
|
1792
|
+
},
|
|
1793
|
+
// endregion ////
|
|
1794
|
+
// region danger ////
|
|
1795
|
+
{
|
|
1796
|
+
color: "danger",
|
|
1797
|
+
noBorder: false,
|
|
1798
|
+
underline: false,
|
|
1799
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-red-500 dark:focus-visible:ring-red-600"
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
color: "danger",
|
|
1803
|
+
highlight: true,
|
|
1804
|
+
noBorder: false,
|
|
1805
|
+
underline: false,
|
|
1806
|
+
class: "ring ring-inset ring-red-500 dark:ring-red-600"
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
color: "danger",
|
|
1810
|
+
noBorder: false,
|
|
1811
|
+
underline: true,
|
|
1812
|
+
class: "focus-visible:border-b-red-500 dark:focus-visible:border-b-red-600"
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
color: "danger",
|
|
1816
|
+
highlight: true,
|
|
1817
|
+
noBorder: false,
|
|
1818
|
+
underline: true,
|
|
1819
|
+
class: "border-b-red-500 dark:border-b-red-600"
|
|
1820
|
+
},
|
|
1821
|
+
// endregion ////
|
|
1822
|
+
// region success ////
|
|
1823
|
+
{
|
|
1824
|
+
color: "success",
|
|
1825
|
+
noBorder: false,
|
|
1826
|
+
underline: false,
|
|
1827
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-green-500 dark:focus-visible:ring-green-600"
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
color: "success",
|
|
1831
|
+
highlight: true,
|
|
1832
|
+
noBorder: false,
|
|
1833
|
+
underline: false,
|
|
1834
|
+
class: "ring ring-inset ring-green-500 dark:ring-green-600"
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
color: "success",
|
|
1838
|
+
noBorder: false,
|
|
1839
|
+
underline: true,
|
|
1840
|
+
class: "focus-visible:border-b-green-500 dark:focus-visible:border-b-green-600"
|
|
1841
|
+
},
|
|
1842
|
+
{
|
|
1843
|
+
color: "success",
|
|
1844
|
+
highlight: true,
|
|
1845
|
+
noBorder: false,
|
|
1846
|
+
underline: true,
|
|
1847
|
+
class: "border-b-green-500 dark:border-b-green-600"
|
|
1848
|
+
},
|
|
1849
|
+
// endregion ////
|
|
1850
|
+
// region warning ////
|
|
1851
|
+
{
|
|
1852
|
+
color: "warning",
|
|
1853
|
+
noBorder: false,
|
|
1854
|
+
underline: false,
|
|
1855
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-orange-500 dark:focus-visible:ring-orange-600"
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
color: "warning",
|
|
1859
|
+
highlight: true,
|
|
1860
|
+
noBorder: false,
|
|
1861
|
+
underline: false,
|
|
1862
|
+
class: "ring ring-inset ring-orange-500 dark:ring-orange-600"
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
color: "warning",
|
|
1866
|
+
noBorder: false,
|
|
1867
|
+
underline: true,
|
|
1868
|
+
class: "focus-visible:border-b-orange-500 dark:focus-visible:border-b-orange-600"
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
color: "warning",
|
|
1872
|
+
highlight: true,
|
|
1873
|
+
noBorder: false,
|
|
1874
|
+
underline: true,
|
|
1875
|
+
class: "border-b-orange-500 dark:border-b-orange-600"
|
|
1876
|
+
},
|
|
1877
|
+
// endregion ////
|
|
1878
|
+
// region primary ////
|
|
1879
|
+
{
|
|
1880
|
+
color: "primary",
|
|
1881
|
+
noBorder: false,
|
|
1882
|
+
underline: false,
|
|
1883
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-blue-500 dark:focus-visible:ring-blue-600"
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
color: "primary",
|
|
1887
|
+
highlight: true,
|
|
1888
|
+
noBorder: false,
|
|
1889
|
+
underline: false,
|
|
1890
|
+
class: "ring ring-inset ring-blue-500 dark:ring-blue-600"
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
color: "primary",
|
|
1894
|
+
noBorder: false,
|
|
1895
|
+
underline: true,
|
|
1896
|
+
class: "focus-visible:border-b-blue-500 dark:focus-visible:border-b-blue-600"
|
|
1897
|
+
},
|
|
1898
|
+
{
|
|
1899
|
+
color: "primary",
|
|
1900
|
+
highlight: true,
|
|
1901
|
+
noBorder: false,
|
|
1902
|
+
underline: true,
|
|
1903
|
+
class: "border-b-blue-500 dark:border-b-blue-600"
|
|
1904
|
+
},
|
|
1905
|
+
// endregion ////
|
|
1906
|
+
// region secondary ////
|
|
1907
|
+
{
|
|
1908
|
+
color: "secondary",
|
|
1909
|
+
noBorder: false,
|
|
1910
|
+
underline: false,
|
|
1911
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-cyan-350 dark:focus-visible:ring-cyan-500"
|
|
1912
|
+
},
|
|
1913
|
+
{
|
|
1914
|
+
color: "secondary",
|
|
1915
|
+
highlight: true,
|
|
1916
|
+
noBorder: false,
|
|
1917
|
+
underline: false,
|
|
1918
|
+
class: "ring ring-inset ring-cyan-350 dark:ring-cyan-500"
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
color: "secondary",
|
|
1922
|
+
noBorder: false,
|
|
1923
|
+
underline: true,
|
|
1924
|
+
class: "focus-visible:border-b-cyan-350 dark:focus-visible:border-b-cyan-500"
|
|
1925
|
+
},
|
|
1926
|
+
{
|
|
1927
|
+
color: "secondary",
|
|
1928
|
+
highlight: true,
|
|
1929
|
+
noBorder: false,
|
|
1930
|
+
underline: true,
|
|
1931
|
+
class: "border-b-cyan-350 dark:border-b-cyan-500"
|
|
1932
|
+
},
|
|
1933
|
+
// endregion ////
|
|
1934
|
+
// region collab ////
|
|
1935
|
+
{
|
|
1936
|
+
color: "collab",
|
|
1937
|
+
noBorder: false,
|
|
1938
|
+
underline: false,
|
|
1939
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-collab-500 dark:focus-visible:ring-collab-600"
|
|
1940
|
+
},
|
|
1941
|
+
{
|
|
1942
|
+
color: "collab",
|
|
1943
|
+
highlight: true,
|
|
1944
|
+
noBorder: false,
|
|
1945
|
+
underline: false,
|
|
1946
|
+
class: "ring ring-inset ring-collab-500 dark:ring-collab-600"
|
|
1947
|
+
},
|
|
1948
|
+
{
|
|
1949
|
+
color: "collab",
|
|
1950
|
+
noBorder: false,
|
|
1951
|
+
underline: true,
|
|
1952
|
+
class: "focus-visible:border-b-collab-500 dark:focus-visible:border-b-collab-600"
|
|
1953
|
+
},
|
|
1954
|
+
{
|
|
1955
|
+
color: "collab",
|
|
1956
|
+
highlight: true,
|
|
1957
|
+
noBorder: false,
|
|
1958
|
+
underline: true,
|
|
1959
|
+
class: "border-b-collab-500 dark:border-b-collab-600"
|
|
1960
|
+
},
|
|
1961
|
+
// endregion ////
|
|
1962
|
+
// region ai ////
|
|
1963
|
+
{
|
|
1964
|
+
color: "ai",
|
|
1965
|
+
noBorder: false,
|
|
1966
|
+
underline: false,
|
|
1967
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ai-500 dark:focus-visible:ring-ai-600"
|
|
1968
|
+
},
|
|
1969
|
+
{
|
|
1970
|
+
color: "ai",
|
|
1971
|
+
highlight: true,
|
|
1972
|
+
noBorder: false,
|
|
1973
|
+
underline: false,
|
|
1974
|
+
class: "ring ring-inset ring-ai-500 dark:ring-ai-600"
|
|
1975
|
+
},
|
|
1976
|
+
{
|
|
1977
|
+
color: "ai",
|
|
1978
|
+
noBorder: false,
|
|
1979
|
+
underline: true,
|
|
1980
|
+
class: "focus-visible:border-b-ai-500 dark:focus-visible:border-b-ai-600"
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
color: "ai",
|
|
1984
|
+
highlight: true,
|
|
1985
|
+
noBorder: false,
|
|
1986
|
+
underline: true,
|
|
1987
|
+
class: "border-b-ai-500 dark:border-b-ai-600"
|
|
1988
|
+
},
|
|
1989
|
+
// endregion ////
|
|
1990
|
+
// endregion ////
|
|
1991
|
+
// region type file ////
|
|
1992
|
+
{
|
|
1993
|
+
type: "file",
|
|
1994
|
+
size: "xs",
|
|
1995
|
+
class: "py-1.5"
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
type: "file",
|
|
1999
|
+
size: "sm",
|
|
2000
|
+
class: "py-2.5"
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
type: "file",
|
|
2004
|
+
size: "md",
|
|
2005
|
+
class: "py-3"
|
|
2006
|
+
},
|
|
2007
|
+
{
|
|
2008
|
+
type: "file",
|
|
2009
|
+
size: "lg",
|
|
2010
|
+
class: "py-4"
|
|
2011
|
+
},
|
|
2012
|
+
// endregion ////
|
|
2013
|
+
// region leading ////
|
|
2014
|
+
{
|
|
2015
|
+
leading: true,
|
|
2016
|
+
size: "xs",
|
|
2017
|
+
class: "ps-7"
|
|
2018
|
+
},
|
|
2019
|
+
{
|
|
2020
|
+
leading: true,
|
|
2021
|
+
size: "sm",
|
|
2022
|
+
class: "ps-8"
|
|
2023
|
+
},
|
|
2024
|
+
{
|
|
2025
|
+
leading: true,
|
|
2026
|
+
size: "md",
|
|
2027
|
+
class: "ps-[39px]"
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
leading: true,
|
|
2031
|
+
size: "lg",
|
|
2032
|
+
class: "ps-[42px]"
|
|
2033
|
+
},
|
|
2034
|
+
// endregion ////
|
|
2035
|
+
// region trailing ////
|
|
2036
|
+
{
|
|
2037
|
+
trailing: true,
|
|
2038
|
+
size: "xs",
|
|
2039
|
+
class: "pe-7"
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
trailing: true,
|
|
2043
|
+
size: "sm",
|
|
2044
|
+
class: "pe-8"
|
|
2045
|
+
},
|
|
2046
|
+
{
|
|
2047
|
+
trailing: true,
|
|
2048
|
+
size: "md",
|
|
2049
|
+
class: "pe-[39px]"
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
trailing: true,
|
|
2053
|
+
size: "lg",
|
|
2054
|
+
class: "pe-[39px]"
|
|
2055
|
+
},
|
|
2056
|
+
// endregion ////
|
|
2057
|
+
// region loading ////
|
|
2058
|
+
{
|
|
2059
|
+
loading: true,
|
|
2060
|
+
leading: true,
|
|
2061
|
+
class: {
|
|
2062
|
+
leadingIcon: "size-[21px]"
|
|
2063
|
+
}
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
loading: true,
|
|
2067
|
+
leading: false,
|
|
2068
|
+
trailing: true,
|
|
2069
|
+
class: {
|
|
2070
|
+
trailingIcon: "size-[21px]"
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
// endregion ////
|
|
2074
|
+
],
|
|
2075
|
+
defaultVariants: {
|
|
2076
|
+
size: "md",
|
|
2077
|
+
color: "primary",
|
|
2078
|
+
tagColor: "primary"
|
|
2079
|
+
}
|
|
2080
|
+
};
|
|
2081
|
+
|
|
2082
|
+
const kbd = {
|
|
2083
|
+
base: "inline-flex items-center justify-center px-1 rounded-2xs font-normal font-b24-system-mono",
|
|
2084
|
+
variants: {
|
|
2085
|
+
depth: {
|
|
2086
|
+
light: [
|
|
2087
|
+
"ring ring-inset",
|
|
2088
|
+
"text-base-900 bg-base-800/5 ring-base-800/20",
|
|
2089
|
+
"dark:text-base-150 dark:bg-base-200/5 dark:ring-base-200/20"
|
|
2090
|
+
].join(" "),
|
|
2091
|
+
normal: [
|
|
2092
|
+
"ring ring-inset",
|
|
2093
|
+
"text-base-800 bg-base-150 ring-base-150",
|
|
2094
|
+
"dark:text-base-950 dark:bg-base-200 dark:ring-base-200"
|
|
2095
|
+
].join(" "),
|
|
2096
|
+
dark: [
|
|
2097
|
+
"ring ring-inset",
|
|
2098
|
+
"text-white bg-base-500 ring-base-500",
|
|
2099
|
+
"dark:text-base-50 dark:bg-base-600 dark:ring-base-600"
|
|
2100
|
+
].join(" ")
|
|
2101
|
+
},
|
|
2102
|
+
size: {
|
|
2103
|
+
sm: "h-[20px] min-w-[20px] text-[10px] leading-none",
|
|
2104
|
+
md: "h-[24px] min-w-[24px] text-[14px] leading-none",
|
|
2105
|
+
lg: "h-[28px] min-w-[28px] text-[18px] leading-none"
|
|
2106
|
+
}
|
|
2107
|
+
},
|
|
2108
|
+
defaultVariants: {
|
|
2109
|
+
depth: "light",
|
|
2110
|
+
size: "md"
|
|
2111
|
+
}
|
|
2112
|
+
};
|
|
2113
|
+
|
|
2114
|
+
const link = (options) => ({
|
|
2115
|
+
base: "cursor-pointer focus-visible:outline-info-text",
|
|
2116
|
+
variants: {
|
|
2117
|
+
active: {
|
|
2118
|
+
true: "text-blue-700 dark:text-blue-300 hover:not-disabled:not-aria-disabled:underline underline-offset-2",
|
|
2119
|
+
false: [
|
|
2120
|
+
"text-base-900 hover:not-disabled:not-aria-disabled:text-blue-700",
|
|
2121
|
+
"dark:text-base-300 dark:hover:not-disabled:not-aria-disabled:text-blue-300",
|
|
2122
|
+
"hover:not-disabled:not-aria-disabled:underline underline-offset-2",
|
|
2123
|
+
"transition-colors"
|
|
2124
|
+
]
|
|
2125
|
+
},
|
|
2126
|
+
disabled: {
|
|
2127
|
+
true: "cursor-not-allowed opacity-75"
|
|
2128
|
+
},
|
|
2129
|
+
isAction: {
|
|
2130
|
+
true: [
|
|
2131
|
+
"text-nowrap",
|
|
2132
|
+
"text-sm h-auto py-0 font-normal rounded-none",
|
|
2133
|
+
"border border-x-0 border-t-0 border-dashed border-b-base-900",
|
|
2134
|
+
"text-base-900 dark:text-base-300 ",
|
|
2135
|
+
"dark:border-b-base-300",
|
|
2136
|
+
"hover:not-disabled:not-aria-disabled:no-underline",
|
|
2137
|
+
"hover:text-blue-700 hover:not-disabled:not-aria-disabled:text-blue-700 hover:border-b-blue-700",
|
|
2138
|
+
"dark:hover:text-blue-300 dark:hover:not-disabled:not-aria-disabled:text-blue-300 dark:hover:border-b-blue-300",
|
|
2139
|
+
"focus-visible:outline-base-700"
|
|
2140
|
+
].join(" ")
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
});
|
|
2144
|
+
|
|
2145
|
+
const progress = {
|
|
2146
|
+
slots: {
|
|
2147
|
+
root: "gap-2",
|
|
2148
|
+
base: "relative overflow-hidden rounded-full bg-base-200 dark:bg-base-800",
|
|
2149
|
+
indicator: "rounded-full size-full transition-transform duration-200 ease-out",
|
|
2150
|
+
status: "flex justify-end text-base-500 dark:text-base-600 transition-[width] duration-200",
|
|
2151
|
+
steps: "grid items-end",
|
|
2152
|
+
step: "truncate text-end row-start-1 col-start-1 transition-opacity"
|
|
2153
|
+
},
|
|
2154
|
+
variants: {
|
|
2155
|
+
animation: {
|
|
2156
|
+
"loading": "",
|
|
2157
|
+
"carousel": "",
|
|
2158
|
+
"carousel-inverse": "",
|
|
2159
|
+
"swing": "",
|
|
2160
|
+
"elastic": ""
|
|
2161
|
+
},
|
|
2162
|
+
color: {
|
|
2163
|
+
default: {
|
|
2164
|
+
indicator: "bg-base-900 dark:bg-base-100",
|
|
2165
|
+
steps: "text-base-500"
|
|
2166
|
+
},
|
|
2167
|
+
danger: {
|
|
2168
|
+
indicator: "bg-red-500 dark:bg-red-600",
|
|
2169
|
+
steps: "text-base-500"
|
|
2170
|
+
},
|
|
2171
|
+
success: {
|
|
2172
|
+
indicator: "bg-green-500 dark:bg-green-600",
|
|
2173
|
+
steps: "text-base-500"
|
|
2174
|
+
},
|
|
2175
|
+
warning: {
|
|
2176
|
+
indicator: "bg-orange-500 dark:bg-orange-600",
|
|
2177
|
+
steps: "text-base-500"
|
|
2178
|
+
},
|
|
2179
|
+
primary: {
|
|
2180
|
+
indicator: "bg-blue-500 dark:bg-blue-600",
|
|
2181
|
+
steps: "text-base-500"
|
|
2182
|
+
},
|
|
2183
|
+
secondary: {
|
|
2184
|
+
indicator: "bg-cyan-350 dark:bg-cyan-500",
|
|
2185
|
+
steps: "text-base-500"
|
|
2186
|
+
},
|
|
2187
|
+
collab: {
|
|
2188
|
+
indicator: "bg-collab-500 dark:bg-collab-600",
|
|
2189
|
+
steps: "text-base-500"
|
|
2190
|
+
},
|
|
2191
|
+
ai: {
|
|
2192
|
+
indicator: "bg-ai-500 dark:bg-ai-900/85",
|
|
2193
|
+
steps: "text-base-500"
|
|
2194
|
+
}
|
|
2195
|
+
},
|
|
2196
|
+
size: {
|
|
2197
|
+
xs: {
|
|
2198
|
+
status: "text-xs",
|
|
2199
|
+
steps: "text-xs"
|
|
2200
|
+
},
|
|
2201
|
+
sm: {
|
|
2202
|
+
status: "text-sm",
|
|
2203
|
+
steps: "text-sm"
|
|
2204
|
+
},
|
|
2205
|
+
md: {
|
|
2206
|
+
status: "text-sm",
|
|
2207
|
+
steps: "text-sm"
|
|
2208
|
+
},
|
|
2209
|
+
lg: {
|
|
2210
|
+
status: "text-sm",
|
|
2211
|
+
steps: "text-sm"
|
|
2212
|
+
}
|
|
2213
|
+
},
|
|
2214
|
+
step: {
|
|
2215
|
+
active: {
|
|
2216
|
+
step: "opacity-100"
|
|
2217
|
+
},
|
|
2218
|
+
first: {
|
|
2219
|
+
step: "opacity-100 text-base-500 dark:text-base-600"
|
|
2220
|
+
},
|
|
2221
|
+
other: {
|
|
2222
|
+
step: "opacity-0"
|
|
2223
|
+
},
|
|
2224
|
+
last: {
|
|
2225
|
+
step: ""
|
|
2226
|
+
}
|
|
2227
|
+
},
|
|
2228
|
+
orientation: {
|
|
2229
|
+
horizontal: {
|
|
2230
|
+
root: "w-full flex flex-col",
|
|
2231
|
+
base: "w-full",
|
|
2232
|
+
status: "flex-row"
|
|
2233
|
+
},
|
|
2234
|
+
vertical: {
|
|
2235
|
+
root: "h-full flex flex-row-reverse",
|
|
2236
|
+
base: "h-full",
|
|
2237
|
+
status: "flex-col min-w-[32px]"
|
|
2238
|
+
}
|
|
2239
|
+
},
|
|
2240
|
+
inverted: {
|
|
2241
|
+
true: {
|
|
2242
|
+
status: "self-end"
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
},
|
|
2246
|
+
compoundVariants: [
|
|
2247
|
+
// region base ////
|
|
2248
|
+
{
|
|
2249
|
+
inverted: true,
|
|
2250
|
+
orientation: "horizontal",
|
|
2251
|
+
class: {
|
|
2252
|
+
step: "text-start",
|
|
2253
|
+
status: "flex-row-reverse"
|
|
2254
|
+
}
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
inverted: true,
|
|
2258
|
+
orientation: "vertical",
|
|
2259
|
+
class: {
|
|
2260
|
+
steps: "items-start",
|
|
2261
|
+
status: "flex-col-reverse"
|
|
2262
|
+
}
|
|
2263
|
+
},
|
|
2264
|
+
// endregion ////
|
|
2265
|
+
// region horizontal ////
|
|
2266
|
+
{
|
|
2267
|
+
orientation: "horizontal",
|
|
2268
|
+
size: "2xs",
|
|
2269
|
+
class: "h-px"
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
orientation: "horizontal",
|
|
2273
|
+
size: "xs",
|
|
2274
|
+
class: "h-0.5"
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
orientation: "horizontal",
|
|
2278
|
+
size: "sm",
|
|
2279
|
+
class: "h-1"
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
orientation: "horizontal",
|
|
2283
|
+
size: "md",
|
|
2284
|
+
class: "h-2"
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
orientation: "horizontal",
|
|
2288
|
+
size: "lg",
|
|
2289
|
+
class: "h-3"
|
|
2290
|
+
},
|
|
2291
|
+
{
|
|
2292
|
+
orientation: "horizontal",
|
|
2293
|
+
size: "xl",
|
|
2294
|
+
class: "h-4"
|
|
2295
|
+
},
|
|
2296
|
+
{
|
|
2297
|
+
orientation: "horizontal",
|
|
2298
|
+
size: "2xl",
|
|
2299
|
+
class: "h-5"
|
|
2300
|
+
},
|
|
2301
|
+
// endregion ////
|
|
2302
|
+
// region vertical ////
|
|
2303
|
+
{
|
|
2304
|
+
orientation: "vertical",
|
|
2305
|
+
size: "2xs",
|
|
2306
|
+
class: "w-px"
|
|
2307
|
+
},
|
|
2308
|
+
{
|
|
2309
|
+
orientation: "vertical",
|
|
2310
|
+
size: "xs",
|
|
2311
|
+
class: "w-0.5"
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
orientation: "vertical",
|
|
2315
|
+
size: "sm",
|
|
2316
|
+
class: "w-1"
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
orientation: "vertical",
|
|
2320
|
+
size: "md",
|
|
2321
|
+
class: "w-2"
|
|
2322
|
+
},
|
|
2323
|
+
{
|
|
2324
|
+
orientation: "vertical",
|
|
2325
|
+
size: "lg",
|
|
2326
|
+
class: "w-3"
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
orientation: "vertical",
|
|
2330
|
+
size: "xl",
|
|
2331
|
+
class: "w-4"
|
|
2332
|
+
},
|
|
2333
|
+
{
|
|
2334
|
+
orientation: "vertical",
|
|
2335
|
+
size: "2xl",
|
|
2336
|
+
class: "w-5"
|
|
2337
|
+
},
|
|
2338
|
+
// endregion ////
|
|
2339
|
+
// region animation ////
|
|
2340
|
+
{
|
|
2341
|
+
orientation: "horizontal",
|
|
2342
|
+
animation: "carousel",
|
|
2343
|
+
class: {
|
|
2344
|
+
indicator: "data-[state=indeterminate]:animate-[carousel_2s_ease-in-out_infinite] data-[state=indeterminate]:rtl:animate-[carousel-rtl_2s_ease-in-out_infinite]"
|
|
2345
|
+
}
|
|
2346
|
+
},
|
|
2347
|
+
{
|
|
2348
|
+
orientation: "vertical",
|
|
2349
|
+
animation: "carousel",
|
|
2350
|
+
class: {
|
|
2351
|
+
indicator: "data-[state=indeterminate]:animate-[carousel-vertical_2s_ease-in-out_infinite]"
|
|
2352
|
+
}
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
orientation: "horizontal",
|
|
2356
|
+
animation: "carousel-inverse",
|
|
2357
|
+
class: {
|
|
2358
|
+
indicator: "data-[state=indeterminate]:animate-[carousel-inverse_2s_ease-in-out_infinite] data-[state=indeterminate]:rtl:animate-[carousel-inverse-rtl_2s_ease-in-out_infinite]"
|
|
2359
|
+
}
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
orientation: "vertical",
|
|
2363
|
+
animation: "carousel-inverse",
|
|
2364
|
+
class: {
|
|
2365
|
+
indicator: "data-[state=indeterminate]:animate-[carousel-inverse-vertical_2s_ease-in-out_infinite]"
|
|
2366
|
+
}
|
|
2367
|
+
},
|
|
2368
|
+
{
|
|
2369
|
+
orientation: "horizontal",
|
|
2370
|
+
animation: "swing",
|
|
2371
|
+
class: {
|
|
2372
|
+
indicator: "data-[state=indeterminate]:animate-[swing_2s_ease-in-out_infinite]"
|
|
2373
|
+
}
|
|
2374
|
+
},
|
|
2375
|
+
{
|
|
2376
|
+
orientation: "vertical",
|
|
2377
|
+
animation: "swing",
|
|
2378
|
+
class: {
|
|
2379
|
+
indicator: "data-[state=indeterminate]:animate-[swing-vertical_2s_ease-in-out_infinite]"
|
|
2380
|
+
}
|
|
2381
|
+
},
|
|
2382
|
+
{
|
|
2383
|
+
orientation: "horizontal",
|
|
2384
|
+
animation: "elastic",
|
|
2385
|
+
class: {
|
|
2386
|
+
indicator: "data-[state=indeterminate]:animate-[elastic_2s_ease-in-out_infinite]"
|
|
2387
|
+
}
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
orientation: "vertical",
|
|
2391
|
+
animation: "elastic",
|
|
2392
|
+
class: {
|
|
2393
|
+
indicator: "data-[state=indeterminate]:animate-[elastic-vertical_2s_ease-in-out_infinite]"
|
|
2394
|
+
}
|
|
2395
|
+
},
|
|
2396
|
+
{
|
|
2397
|
+
orientation: "horizontal",
|
|
2398
|
+
animation: "loading",
|
|
2399
|
+
class: {
|
|
2400
|
+
indicator: "data-[state=indeterminate]:animate-[progressbar-loading_2s_infinite]"
|
|
2401
|
+
}
|
|
2402
|
+
},
|
|
2403
|
+
{
|
|
2404
|
+
orientation: "vertical",
|
|
2405
|
+
animation: "loading",
|
|
2406
|
+
class: {
|
|
2407
|
+
indicator: "data-[state=indeterminate]:animate-[progressbar-loading-vertical_2s_infinite]"
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
// endregion ////
|
|
2411
|
+
],
|
|
2412
|
+
defaultVariants: {
|
|
2413
|
+
animation: "loading",
|
|
2414
|
+
color: "primary",
|
|
2415
|
+
size: "md"
|
|
2416
|
+
}
|
|
2417
|
+
};
|
|
2418
|
+
|
|
2419
|
+
const radioGroup = {
|
|
2420
|
+
slots: {
|
|
2421
|
+
root: "relative",
|
|
2422
|
+
fieldset: "flex",
|
|
2423
|
+
legend: "mb-1.5 block font-medium text-base-master dark:text-base-400",
|
|
2424
|
+
item: "flex items-start",
|
|
2425
|
+
base: "cursor-pointer rounded-full ring ring-inset ring-base-300 dark:ring-base-700 focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
2426
|
+
indicator: " flex items-center justify-center size-full rounded-full after:bg-white dark:after:bg-base-dark after:rounded-full",
|
|
2427
|
+
container: "flex items-center",
|
|
2428
|
+
wrapper: "font-b24-primary font-regular ms-2",
|
|
2429
|
+
label: "cursor-pointer block text-base-master dark:text-base-400",
|
|
2430
|
+
description: "text-base-500 dark:text-base-600"
|
|
2431
|
+
},
|
|
2432
|
+
variants: {
|
|
2433
|
+
color: {
|
|
2434
|
+
default: {
|
|
2435
|
+
base: "focus-visible:outline-base-900 dark:focus-visible:outline-base-900",
|
|
2436
|
+
indicator: "bg-base-900 dark:bg-base-350"
|
|
2437
|
+
},
|
|
2438
|
+
danger: {
|
|
2439
|
+
base: "focus-visible:outline-red-500 dark:focus-visible:outline-red-600",
|
|
2440
|
+
indicator: "bg-red-500 dark:bg-red-600"
|
|
2441
|
+
},
|
|
2442
|
+
success: {
|
|
2443
|
+
base: "focus-visible:outline-green-500 dark:focus-visible:outline-green-600",
|
|
2444
|
+
indicator: "bg-green-500 dark:bg-green-600"
|
|
2445
|
+
},
|
|
2446
|
+
warning: {
|
|
2447
|
+
base: "focus-visible:outline-orange-500 dark:focus-visible:outline-orange-600",
|
|
2448
|
+
indicator: "bg-orange-500 dark:bg-orange-600"
|
|
2449
|
+
},
|
|
2450
|
+
primary: {
|
|
2451
|
+
base: "focus-visible:outline-blue-500 dark:focus-visible:outline-blue-600",
|
|
2452
|
+
indicator: "bg-blue-500 dark:bg-blue-600"
|
|
2453
|
+
},
|
|
2454
|
+
secondary: {
|
|
2455
|
+
base: "focus-visible:outline-cyan-350 dark:focus-visible:outline-cyan-500",
|
|
2456
|
+
indicator: "bg-cyan-350 dark:bg-cyan-500"
|
|
2457
|
+
},
|
|
2458
|
+
collab: {
|
|
2459
|
+
base: "focus-visible:outline-collab-500 dark:focus-visible:outline-collab-600",
|
|
2460
|
+
indicator: "bg-collab-500 dark:bg-collab-600"
|
|
2461
|
+
},
|
|
2462
|
+
ai: {
|
|
2463
|
+
base: "focus-visible:outline-ai-500 dark:focus-visible:outline-ai-600",
|
|
2464
|
+
indicator: "bg-ai-500 dark:bg-ai-600"
|
|
2465
|
+
}
|
|
2466
|
+
},
|
|
2467
|
+
orientation: {
|
|
2468
|
+
horizontal: {
|
|
2469
|
+
fieldset: "flex-row",
|
|
2470
|
+
wrapper: "me-2"
|
|
2471
|
+
},
|
|
2472
|
+
vertical: {
|
|
2473
|
+
fieldset: "flex-col"
|
|
2474
|
+
}
|
|
2475
|
+
},
|
|
2476
|
+
size: {
|
|
2477
|
+
xs: {
|
|
2478
|
+
fieldset: "gap-1",
|
|
2479
|
+
legend: "text-xs",
|
|
2480
|
+
base: "size-3",
|
|
2481
|
+
item: "text-xs",
|
|
2482
|
+
label: "leading-4",
|
|
2483
|
+
container: "h-4",
|
|
2484
|
+
indicator: "after:size-1"
|
|
2485
|
+
},
|
|
2486
|
+
sm: {
|
|
2487
|
+
fieldset: "gap-1.5",
|
|
2488
|
+
legend: "text-xs",
|
|
2489
|
+
base: "size-3.5",
|
|
2490
|
+
item: "text-sm",
|
|
2491
|
+
label: "leading-4",
|
|
2492
|
+
container: "h-4",
|
|
2493
|
+
indicator: "after:size-1"
|
|
2494
|
+
},
|
|
2495
|
+
md: {
|
|
2496
|
+
fieldset: "gap-1",
|
|
2497
|
+
legend: "text-sm",
|
|
2498
|
+
base: "size-4",
|
|
2499
|
+
item: "text-md",
|
|
2500
|
+
label: "leading-5",
|
|
2501
|
+
container: "h-5",
|
|
2502
|
+
indicator: "after:size-1.5"
|
|
2503
|
+
},
|
|
2504
|
+
lg: {
|
|
2505
|
+
fieldset: "gap-1.5",
|
|
2506
|
+
legend: "text-sm",
|
|
2507
|
+
base: "size-5",
|
|
2508
|
+
item: "text-xl",
|
|
2509
|
+
label: "leading-5",
|
|
2510
|
+
container: "h-5",
|
|
2511
|
+
indicator: "after:size-2"
|
|
2512
|
+
}
|
|
2513
|
+
},
|
|
2514
|
+
disabled: {
|
|
2515
|
+
true: {
|
|
2516
|
+
base: "cursor-not-allowed opacity-75",
|
|
2517
|
+
label: "cursor-not-allowed opacity-75"
|
|
2518
|
+
}
|
|
2519
|
+
},
|
|
2520
|
+
required: {
|
|
2521
|
+
true: {
|
|
2522
|
+
label: "after:content-['*'] after:ms-0.5 after:text-red-500 dark:after:text-red-600"
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
},
|
|
2526
|
+
defaultVariants: {
|
|
2527
|
+
size: "md",
|
|
2528
|
+
color: "primary"
|
|
2529
|
+
}
|
|
2530
|
+
};
|
|
2531
|
+
|
|
2532
|
+
const range = {
|
|
2533
|
+
slots: {
|
|
2534
|
+
root: "relative flex items-center select-none touch-none",
|
|
2535
|
+
track: "relative bg-base-200 dark:bg-base-800 overflow-hidden rounded-full grow",
|
|
2536
|
+
range: "absolute rounded-full",
|
|
2537
|
+
thumb: "rounded-full bg-white dark:bg-base-100 ring-2 focus-visible:outline-2 focus-visible:outline-offset-2"
|
|
2538
|
+
},
|
|
2539
|
+
variants: {
|
|
2540
|
+
color: {
|
|
2541
|
+
default: {
|
|
2542
|
+
range: "bg-base-900 dark:bg-base-350",
|
|
2543
|
+
thumb: "ring-base-900 dark:ring-base-400 focus-visible:outline-base-900/50 dark:focus-visible:outline-base-700/50"
|
|
2544
|
+
},
|
|
2545
|
+
danger: {
|
|
2546
|
+
range: "bg-red-500 dark:bg-red-600",
|
|
2547
|
+
thumb: "ring-red-500 dark:ring-red-600 focus-visible:outline-red-500/50 dark:focus-visible:outline-red-600/50"
|
|
2548
|
+
},
|
|
2549
|
+
success: {
|
|
2550
|
+
range: "bg-green-500 dark:bg-green-600",
|
|
2551
|
+
thumb: "ring-green-500 dark:ring-green-600 focus-visible:outline-green-500/50 dark:focus-visible:outline-green-600/50"
|
|
2552
|
+
},
|
|
2553
|
+
warning: {
|
|
2554
|
+
range: "bg-orange-500 dark:bg-orange-600",
|
|
2555
|
+
thumb: "ring-orange-500 dark:ring-orange-600 focus-visible:outline-orange-500/50 dark:focus-visible:outline-orange-600/50"
|
|
2556
|
+
},
|
|
2557
|
+
primary: {
|
|
2558
|
+
range: "bg-blue-500 dark:bg-blue-600",
|
|
2559
|
+
thumb: "ring-blue-500 dark:ring-blue-600 focus-visible:outline-blue-500/50 dark:focus-visible:outline-blue-600/50"
|
|
2560
|
+
},
|
|
2561
|
+
secondary: {
|
|
2562
|
+
range: "bg-cyan-350 dark:bg-cyan-500",
|
|
2563
|
+
thumb: "ring-cyan-350 dark:ring-cyan-500 focus-visible:outline-cyan-350/50 dark:focus-visible:outline-cyan-500/50"
|
|
2564
|
+
},
|
|
2565
|
+
collab: {
|
|
2566
|
+
range: "bg-collab-500 dark:bg-collab-600",
|
|
2567
|
+
thumb: "ring-collab-500 dark:ring-collab-600 focus-visible:outline-collab-500/50 dark:focus-visible:outline-collab-600/50"
|
|
2568
|
+
},
|
|
2569
|
+
ai: {
|
|
2570
|
+
range: "bg-ai-500 dark:bg-ai-600",
|
|
2571
|
+
thumb: "ring-ai-500 dark:ring-ai-600 focus-visible:outline-ai-500/50 dark:focus-visible:outline-ai-600/50"
|
|
2572
|
+
}
|
|
2573
|
+
},
|
|
2574
|
+
size: {
|
|
2575
|
+
xs: {
|
|
2576
|
+
thumb: "size-3"
|
|
2577
|
+
},
|
|
2578
|
+
sm: {
|
|
2579
|
+
thumb: "size-3.5"
|
|
2580
|
+
},
|
|
2581
|
+
md: {
|
|
2582
|
+
thumb: "size-4"
|
|
2583
|
+
},
|
|
2584
|
+
lg: {
|
|
2585
|
+
thumb: "size-5"
|
|
2586
|
+
}
|
|
2587
|
+
},
|
|
2588
|
+
orientation: {
|
|
2589
|
+
horizontal: {
|
|
2590
|
+
root: "w-full",
|
|
2591
|
+
range: "h-full"
|
|
2592
|
+
},
|
|
2593
|
+
vertical: {
|
|
2594
|
+
root: "flex-col h-full",
|
|
2595
|
+
range: "w-full"
|
|
2596
|
+
}
|
|
2597
|
+
},
|
|
2598
|
+
disabled: {
|
|
2599
|
+
true: {
|
|
2600
|
+
root: "opacity-75 cursor-not-allowed"
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
},
|
|
2604
|
+
compoundVariants: [
|
|
2605
|
+
// region horizontal ////
|
|
2606
|
+
{
|
|
2607
|
+
orientation: "horizontal",
|
|
2608
|
+
size: "xs",
|
|
2609
|
+
class: {
|
|
2610
|
+
track: "h-[6px]"
|
|
2611
|
+
}
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
orientation: "horizontal",
|
|
2615
|
+
size: "sm",
|
|
2616
|
+
class: {
|
|
2617
|
+
track: "h-[7px]"
|
|
2618
|
+
}
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
orientation: "horizontal",
|
|
2622
|
+
size: "md",
|
|
2623
|
+
class: {
|
|
2624
|
+
track: "h-[8px]"
|
|
2625
|
+
}
|
|
2626
|
+
},
|
|
2627
|
+
{
|
|
2628
|
+
orientation: "horizontal",
|
|
2629
|
+
size: "lg",
|
|
2630
|
+
class: {
|
|
2631
|
+
track: "h-[9px]"
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
orientation: "horizontal",
|
|
2636
|
+
size: "xl",
|
|
2637
|
+
class: {
|
|
2638
|
+
track: "h-[10px]"
|
|
2639
|
+
}
|
|
2640
|
+
},
|
|
2641
|
+
// endregion ////
|
|
2642
|
+
// region vertical ////
|
|
2643
|
+
{
|
|
2644
|
+
orientation: "vertical",
|
|
2645
|
+
size: "xs",
|
|
2646
|
+
class: {
|
|
2647
|
+
track: "w-[6px]"
|
|
2648
|
+
}
|
|
2649
|
+
},
|
|
2650
|
+
{
|
|
2651
|
+
orientation: "vertical",
|
|
2652
|
+
size: "sm",
|
|
2653
|
+
class: {
|
|
2654
|
+
track: "w-[7px]"
|
|
2655
|
+
}
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
orientation: "vertical",
|
|
2659
|
+
size: "md",
|
|
2660
|
+
class: {
|
|
2661
|
+
track: "w-[8px]"
|
|
2662
|
+
}
|
|
2663
|
+
},
|
|
2664
|
+
{
|
|
2665
|
+
orientation: "vertical",
|
|
2666
|
+
size: "lg",
|
|
2667
|
+
class: {
|
|
2668
|
+
track: "w-[9px]"
|
|
2669
|
+
}
|
|
2670
|
+
},
|
|
2671
|
+
{
|
|
2672
|
+
orientation: "vertical",
|
|
2673
|
+
size: "xl",
|
|
2674
|
+
class: {
|
|
2675
|
+
track: "w-[10px]"
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
// endregion ////
|
|
2679
|
+
],
|
|
2680
|
+
defaultVariants: {
|
|
2681
|
+
size: "md",
|
|
2682
|
+
color: "primary"
|
|
2683
|
+
}
|
|
2684
|
+
};
|
|
2685
|
+
|
|
2686
|
+
const defSize = {
|
|
2687
|
+
label: "h-9 ps-2 pe-3 text-sm gap-2",
|
|
2688
|
+
item: "h-9 ps-3 pe-3 text-sm gap-2",
|
|
2689
|
+
itemLeadingIcon: "size-5",
|
|
2690
|
+
itemLeadingAvatarSize: "2xs",
|
|
2691
|
+
itemLeadingChip: "size-3 not-group-data-reka-collection-item:ps-2.5",
|
|
2692
|
+
itemLeadingChipSize: "sm",
|
|
2693
|
+
itemTrailingIcon: "size-3",
|
|
2694
|
+
scrollUpDownButtonIcon: "size-4",
|
|
2695
|
+
trailingIcon: "size-lg2"
|
|
2696
|
+
};
|
|
2697
|
+
const select = () => {
|
|
2698
|
+
return defuFn(
|
|
2699
|
+
{
|
|
2700
|
+
slots: {
|
|
2701
|
+
root: () => "relative inline-flex items-center min-w-full w-full",
|
|
2702
|
+
base: () => [
|
|
2703
|
+
"relative inline-flex items-center group",
|
|
2704
|
+
"min-w-full w-full py-0 border-0 focus:outline-none",
|
|
2705
|
+
"cursor-pointer disabled:cursor-not-allowed",
|
|
2706
|
+
"disabled:bg-base-30/37 disabled:text-base-500",
|
|
2707
|
+
"dark:disabled:bg-base-900/37 dark:disabled:text-base-800",
|
|
2708
|
+
"appearance-none transition duration-300 ease-linear",
|
|
2709
|
+
// transition-colors
|
|
2710
|
+
"ring ring-inset ring-base-300",
|
|
2711
|
+
"dark:ring-base-800",
|
|
2712
|
+
"text-base-master bg-white hover:text-base-900 focus:text-base-900 active:text-base-900",
|
|
2713
|
+
"dark:text-base-150 dark:bg-transparent dark:hover:text-base-350 dark:focus:text-base-350 dark:active:text-base-350",
|
|
2714
|
+
"font-b24-primary font-regular text-sm",
|
|
2715
|
+
"align-middle",
|
|
2716
|
+
"text-ellipsis whitespace-nowrap"
|
|
2717
|
+
],
|
|
2718
|
+
value: "truncate pointer-events-none",
|
|
2719
|
+
placeholder: "truncate text-base-400 dark:text-base-300",
|
|
2720
|
+
arrow: "fill-base-master/10 dark:fill-base-100/20",
|
|
2721
|
+
content: [
|
|
2722
|
+
"max-h-60 w-[var(--reka-popper-anchor-width)]",
|
|
2723
|
+
"bg-white dark:bg-base-dark",
|
|
2724
|
+
"shadow-md rounded-2xs ring ring-base-300 dark:ring-base-800",
|
|
2725
|
+
"overflow-hidden",
|
|
2726
|
+
"data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
2727
|
+
"pointer-events-auto"
|
|
2728
|
+
],
|
|
2729
|
+
scrollUpDownButton: [
|
|
2730
|
+
"flex items-center justify-center h-[25px] cursor-default backdrop-blur",
|
|
2731
|
+
"text-base-800 bg-white",
|
|
2732
|
+
"dark:text-base-100 dark:bg-base-dark"
|
|
2733
|
+
],
|
|
2734
|
+
scrollUpDownButtonIcon: "",
|
|
2735
|
+
viewport: "divide-y divide-base-master/10 dark:divide-base-100/20 scroll-py-1",
|
|
2736
|
+
group: "p-1 isolate",
|
|
2737
|
+
empty: "py-2 text-center text-sm text-base-500 dark:text-base-600",
|
|
2738
|
+
label: [
|
|
2739
|
+
"flex items-center",
|
|
2740
|
+
"font-semibold text-base-900 dark:text-base-200"
|
|
2741
|
+
],
|
|
2742
|
+
separator: "-mx-1 my-1 h-px bg-base-master/10 dark:bg-base-100/20",
|
|
2743
|
+
item: [
|
|
2744
|
+
"group relative w-full flex items-center select-none outline-none",
|
|
2745
|
+
"before:absolute before:z-[-1] before:inset-px before:rounded-2xs",
|
|
2746
|
+
"cursor-pointer",
|
|
2747
|
+
"data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
2748
|
+
"text-base-master dark:text-base-150 data-highlighted:text-base-900 dark:data-highlighted:text-base-200 data-highlighted:before:bg-base-100/50 dark:data-highlighted:before:bg-base-900",
|
|
2749
|
+
"transition-colors before:transition-colors"
|
|
2750
|
+
],
|
|
2751
|
+
itemLeadingIcon: [
|
|
2752
|
+
"shrink-0 text-base-500 dark:text-base-700 group-data-highlighted:text-base-master dark:group-data-highlighted:text-base-150",
|
|
2753
|
+
"transition-colors"
|
|
2754
|
+
],
|
|
2755
|
+
itemLeadingAvatar: "shrink-0",
|
|
2756
|
+
itemLeadingAvatarSize: "",
|
|
2757
|
+
itemLeadingChip: "shrink-0",
|
|
2758
|
+
itemLeadingChipSize: "",
|
|
2759
|
+
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
2760
|
+
itemTrailingIcon: "shrink-0",
|
|
2761
|
+
itemLabel: "truncate"
|
|
2762
|
+
},
|
|
2763
|
+
variants: {
|
|
2764
|
+
...buttonGroupVariantWithRoot,
|
|
2765
|
+
size: {
|
|
2766
|
+
xs: defSize,
|
|
2767
|
+
sm: defSize,
|
|
2768
|
+
md: defSize,
|
|
2769
|
+
lg: defSize
|
|
2770
|
+
}
|
|
2771
|
+
}
|
|
2772
|
+
},
|
|
2773
|
+
input
|
|
2774
|
+
);
|
|
2775
|
+
};
|
|
2776
|
+
|
|
2777
|
+
const separator = {
|
|
2778
|
+
slots: {
|
|
2779
|
+
root: "flex items-center align-center text-center",
|
|
2780
|
+
border: "",
|
|
2781
|
+
container: "font-b24-primary font-normal text-base-500 flex",
|
|
2782
|
+
icon: "shrink-0 size-7",
|
|
2783
|
+
avatar: "shrink-0",
|
|
2784
|
+
avatarSize: "sm",
|
|
2785
|
+
label: "text-sm"
|
|
2786
|
+
},
|
|
2787
|
+
variants: {
|
|
2788
|
+
color: {
|
|
2789
|
+
default: { border: "border-base-master/10 dark:border-base-100/20" },
|
|
2790
|
+
danger: { border: "border-red-500 dark:border-red-600" },
|
|
2791
|
+
success: { border: "border-green-500 dark:border-green-600" },
|
|
2792
|
+
warning: { border: "border-orange-500 dark:border-orange-600" },
|
|
2793
|
+
primary: { border: "border-blue-500 dark:border-blue-600" },
|
|
2794
|
+
secondary: { border: "border-cyan-350 dark:border-cyan-500" },
|
|
2795
|
+
collab: { border: "border-collab-500 dark:border-collab-600" },
|
|
2796
|
+
ai: { border: "border-ai-500 dark:border-ai-600" }
|
|
2797
|
+
},
|
|
2798
|
+
orientation: {
|
|
2799
|
+
horizontal: {
|
|
2800
|
+
root: "w-full flex-row",
|
|
2801
|
+
border: "w-full",
|
|
2802
|
+
container: "mx-3 whitespace-nowrap"
|
|
2803
|
+
},
|
|
2804
|
+
vertical: {
|
|
2805
|
+
root: "h-full flex-col",
|
|
2806
|
+
border: "h-full",
|
|
2807
|
+
container: "my-2"
|
|
2808
|
+
}
|
|
2809
|
+
},
|
|
2810
|
+
size: {
|
|
2811
|
+
xs: "",
|
|
2812
|
+
sm: "",
|
|
2813
|
+
md: "",
|
|
2814
|
+
lg: "",
|
|
2815
|
+
xl: ""
|
|
2816
|
+
},
|
|
2817
|
+
type: {
|
|
2818
|
+
solid: {
|
|
2819
|
+
border: "border-solid"
|
|
2820
|
+
},
|
|
2821
|
+
dashed: {
|
|
2822
|
+
border: "border-dashed"
|
|
2823
|
+
},
|
|
2824
|
+
dotted: {
|
|
2825
|
+
border: "border-dotted"
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2828
|
+
},
|
|
2829
|
+
compoundVariants: [
|
|
2830
|
+
// region horizontal ////
|
|
2831
|
+
{
|
|
2832
|
+
orientation: "horizontal",
|
|
2833
|
+
size: "xs",
|
|
2834
|
+
class: { border: "border-t" }
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
orientation: "horizontal",
|
|
2838
|
+
size: "sm",
|
|
2839
|
+
class: { border: "border-t-[2px]" }
|
|
2840
|
+
},
|
|
2841
|
+
{
|
|
2842
|
+
orientation: "horizontal",
|
|
2843
|
+
size: "md",
|
|
2844
|
+
class: { border: "border-t-[3px]" }
|
|
2845
|
+
},
|
|
2846
|
+
{
|
|
2847
|
+
orientation: "horizontal",
|
|
2848
|
+
size: "lg",
|
|
2849
|
+
class: { border: "border-t-[4px]" }
|
|
2850
|
+
},
|
|
2851
|
+
{
|
|
2852
|
+
orientation: "horizontal",
|
|
2853
|
+
size: "xl",
|
|
2854
|
+
class: { border: "border-t-[5px]" }
|
|
2855
|
+
},
|
|
2856
|
+
// endregion ////
|
|
2857
|
+
// region vertical ////
|
|
2858
|
+
{
|
|
2859
|
+
orientation: "vertical",
|
|
2860
|
+
size: "xs",
|
|
2861
|
+
class: { border: "border-s" }
|
|
2862
|
+
},
|
|
2863
|
+
{
|
|
2864
|
+
orientation: "vertical",
|
|
2865
|
+
size: "sm",
|
|
2866
|
+
class: { border: "border-s-[2px]" }
|
|
2867
|
+
},
|
|
2868
|
+
{
|
|
2869
|
+
orientation: "vertical",
|
|
2870
|
+
size: "md",
|
|
2871
|
+
class: { border: "border-s-[3px]" }
|
|
2872
|
+
},
|
|
2873
|
+
{
|
|
2874
|
+
orientation: "vertical",
|
|
2875
|
+
size: "lg",
|
|
2876
|
+
class: { border: "border-s-[4px]" }
|
|
2877
|
+
},
|
|
2878
|
+
{
|
|
2879
|
+
orientation: "vertical",
|
|
2880
|
+
size: "xl",
|
|
2881
|
+
class: { border: "border-s-[5px]" }
|
|
2882
|
+
}
|
|
2883
|
+
// endregion ////
|
|
2884
|
+
],
|
|
2885
|
+
defaultVariants: {
|
|
2886
|
+
color: "default",
|
|
2887
|
+
size: "xs",
|
|
2888
|
+
type: "solid"
|
|
2889
|
+
}
|
|
2890
|
+
};
|
|
2891
|
+
|
|
2892
|
+
const skeleton = {
|
|
2893
|
+
base: "animate-pulse rounded-md bg-gray-200 dark:bg-gray-800"
|
|
2894
|
+
};
|
|
2895
|
+
|
|
2896
|
+
const _switch = {
|
|
2897
|
+
slots: {
|
|
2898
|
+
root: "relative flex items-start",
|
|
2899
|
+
base: ["cursor-pointer inline-flex items-center shrink-0 rounded-full border-2 border-transparent focus-visible:outline-2 focus-visible:outline-offset-2 data-[state=unchecked]:bg-base-200 dark:data-[state=unchecked]:bg-base-800", "transition-colors duration-200"],
|
|
2900
|
+
container: "flex items-center",
|
|
2901
|
+
thumb: "group pointer-events-none rounded-full bg-white dark:bg-base-100 shadow-lg ring-0 transition-transform duration-200 data-[state=unchecked]:translate-x-0 data-[state=unchecked]:rtl:-translate-x-0 flex items-center justify-center",
|
|
2902
|
+
icon: ["absolute shrink-0 group-data-[state=unchecked]:text-base-400 dark:group-data-[state=unchecked]:text-base-700 opacity-0 p-0.5 size-10/10", "transition-[color,opacity] duration-200"],
|
|
2903
|
+
wrapper: "font-b24-primary font-regular ms-2",
|
|
2904
|
+
label: "cursor-pointer block text-base-master dark:text-base-400",
|
|
2905
|
+
description: "text-base-500 dark:text-base-600"
|
|
2906
|
+
},
|
|
2907
|
+
variants: {
|
|
2908
|
+
color: {
|
|
2909
|
+
default: {
|
|
2910
|
+
base: "data-[state=checked]:bg-base-900 focus-visible:outline-base-900 dark:data-[state=checked]:bg-base-100 dark:focus-visible:outline-base-100",
|
|
2911
|
+
icon: "group-data-[state=checked]:text-base-900 dark:group-data-[state=checked]:text-base-900",
|
|
2912
|
+
thumb: "dark:data-[state=checked]:bg-base-master"
|
|
2913
|
+
},
|
|
2914
|
+
danger: {
|
|
2915
|
+
base: "data-[state=checked]:bg-red-500 focus-visible:outline-red-500 dark:data-[state=checked]:bg-red-600 dark:focus-visible:outline-red-600",
|
|
2916
|
+
icon: "group-data-[state=checked]:text-red-500 dark:group-data-[state=checked]:text-red-600"
|
|
2917
|
+
},
|
|
2918
|
+
success: {
|
|
2919
|
+
base: "data-[state=checked]:bg-green-500 focus-visible:outline-green-500 dark:data-[state=checked]:bg-green-600 dark:focus-visible:outline-green-600",
|
|
2920
|
+
icon: "group-data-[state=checked]:text-green-500 dark:group-data-[state=checked]:text-green-600"
|
|
2921
|
+
},
|
|
2922
|
+
warning: {
|
|
2923
|
+
base: "data-[state=checked]:bg-orange-500 focus-visible:outline-orange-500 dark:data-[state=checked]:bg-orange-600 dark:focus-visible:outline-orange-600",
|
|
2924
|
+
icon: "group-data-[state=checked]:text-orange-500 dark:group-data-[state=checked]:text-orange-600"
|
|
2925
|
+
},
|
|
2926
|
+
primary: {
|
|
2927
|
+
base: "data-[state=checked]:bg-blue-500 focus-visible:outline-blue-500 dark:data-[state=checked]:bg-blue-600 dark:focus-visible:outline-blue-600",
|
|
2928
|
+
icon: "group-data-[state=checked]:text-blue-500 dark:group-data-[state=checked]:text-blue-600"
|
|
2929
|
+
},
|
|
2930
|
+
secondary: {
|
|
2931
|
+
base: "data-[state=checked]:bg-cyan-350 focus-visible:outline-cyan-350 dark:data-[state=checked]:bg-cyan-500 dark:focus-visible:outline-cyan-500",
|
|
2932
|
+
icon: "group-data-[state=checked]:text-cyan-350 dark:group-data-[state=checked]:text-cyan-500"
|
|
2933
|
+
},
|
|
2934
|
+
collab: {
|
|
2935
|
+
base: "data-[state=checked]:bg-collab-500 focus-visible:outline-collab-500 dark:data-[state=checked]:bg-collab-600 dark:focus-visible:outline-collab-600",
|
|
2936
|
+
icon: "group-data-[state=checked]:text-collab-500 dark:group-data-[state=checked]:text-collab-600"
|
|
2937
|
+
},
|
|
2938
|
+
ai: {
|
|
2939
|
+
base: "data-[state=checked]:bg-ai-500 focus-visible:outline-ai-500 dark:data-[state=checked]:bg-ai-600 dark:focus-visible:outline-ai-600",
|
|
2940
|
+
icon: "group-data-[state=checked]:text-ai-500 dark:group-data-[state=checked]:text-ai-600"
|
|
2941
|
+
}
|
|
2942
|
+
},
|
|
2943
|
+
size: {
|
|
2944
|
+
xs: {
|
|
2945
|
+
base: "w-7",
|
|
2946
|
+
container: "h-4",
|
|
2947
|
+
thumb: "size-3 data-[state=checked]:translate-x-3 data-[state=checked]:rtl:-translate-x-3",
|
|
2948
|
+
wrapper: "text-xs",
|
|
2949
|
+
label: "leading-4"
|
|
2950
|
+
},
|
|
2951
|
+
sm: {
|
|
2952
|
+
base: "w-8",
|
|
2953
|
+
container: "h-4",
|
|
2954
|
+
thumb: "size-3.5 data-[state=checked]:translate-x-3.5 data-[state=checked]:rtl:-translate-x-3.5",
|
|
2955
|
+
wrapper: "text-sm",
|
|
2956
|
+
label: "leading-4"
|
|
2957
|
+
},
|
|
2958
|
+
md: {
|
|
2959
|
+
base: "w-9",
|
|
2960
|
+
container: "h-5",
|
|
2961
|
+
thumb: "size-4 data-[state=checked]:translate-x-4 data-[state=checked]:rtl:-translate-x-4",
|
|
2962
|
+
wrapper: "text-md",
|
|
2963
|
+
label: "leading-5"
|
|
2964
|
+
},
|
|
2965
|
+
lg: {
|
|
2966
|
+
base: "w-10",
|
|
2967
|
+
container: "h-5",
|
|
2968
|
+
thumb: "size-5 data-[state=checked]:translate-x-4 data-[state=checked]:rtl:-translate-x-4",
|
|
2969
|
+
wrapper: "text-xl",
|
|
2970
|
+
label: "leading-5"
|
|
2971
|
+
}
|
|
2972
|
+
},
|
|
2973
|
+
checked: {
|
|
2974
|
+
true: {
|
|
2975
|
+
icon: "group-data-[state=checked]:opacity-100"
|
|
2976
|
+
}
|
|
2977
|
+
},
|
|
2978
|
+
unchecked: {
|
|
2979
|
+
true: {
|
|
2980
|
+
icon: "group-data-[state=unchecked]:opacity-100"
|
|
2981
|
+
}
|
|
2982
|
+
},
|
|
2983
|
+
loading: {
|
|
2984
|
+
true: {
|
|
2985
|
+
icon: "animate-spin"
|
|
2986
|
+
}
|
|
2987
|
+
},
|
|
2988
|
+
required: {
|
|
2989
|
+
true: {
|
|
2990
|
+
label: "after:content-['*'] after:ms-0.5 after:text-red-500 dark:after:text-red-600"
|
|
2991
|
+
}
|
|
2992
|
+
},
|
|
2993
|
+
disabled: {
|
|
2994
|
+
true: {
|
|
2995
|
+
base: "cursor-not-allowed opacity-75",
|
|
2996
|
+
label: "cursor-not-allowed opacity-75",
|
|
2997
|
+
description: "cursor-not-allowed opacity-75"
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
},
|
|
3001
|
+
defaultVariants: {
|
|
3002
|
+
color: "primary",
|
|
3003
|
+
size: "md"
|
|
3004
|
+
}
|
|
3005
|
+
};
|
|
3006
|
+
|
|
3007
|
+
const tabs = {
|
|
3008
|
+
slots: {
|
|
3009
|
+
root: "flex items-center gap-2",
|
|
3010
|
+
list: "relative flex p-1 group",
|
|
3011
|
+
indicator: "absolute transition-[translate,width] duration-200",
|
|
3012
|
+
trigger: [
|
|
3013
|
+
"group relative inline-flex items-center shrink-0 min-w-0",
|
|
3014
|
+
"data-[state=inactive]:text-base-600 dark:data-[state=inactive]:text-base-600",
|
|
3015
|
+
"hover:data-[state=inactive]:not-disabled:text-base-master dark:hover:data-[state=inactive]:not-disabled:text-base-150",
|
|
3016
|
+
"font-medium rounded-xl",
|
|
3017
|
+
"cursor-pointer disabled:cursor-not-allowed disabled:opacity-75 focus:outline-hidden",
|
|
3018
|
+
"transition-colors"
|
|
3019
|
+
],
|
|
3020
|
+
content: "focus:outline-none w-full",
|
|
3021
|
+
leadingIcon: "shrink-0",
|
|
3022
|
+
leadingAvatar: "shrink-0",
|
|
3023
|
+
leadingAvatarSize: "",
|
|
3024
|
+
label: ""
|
|
3025
|
+
},
|
|
3026
|
+
variants: {
|
|
3027
|
+
color: {
|
|
3028
|
+
default: "",
|
|
3029
|
+
danger: "",
|
|
3030
|
+
success: "",
|
|
3031
|
+
warning: "",
|
|
3032
|
+
primary: "",
|
|
3033
|
+
secondary: "",
|
|
3034
|
+
collab: "",
|
|
3035
|
+
ai: ""
|
|
3036
|
+
},
|
|
3037
|
+
variant: {
|
|
3038
|
+
pill: {
|
|
3039
|
+
list: "bg-base-100 dark:bg-transparent rounded-md",
|
|
3040
|
+
trigger: "flex-1 w-full",
|
|
3041
|
+
indicator: "rounded-xl shadow-xs"
|
|
3042
|
+
},
|
|
3043
|
+
link: {
|
|
3044
|
+
list: "border-base-300 dark:border-base-800",
|
|
3045
|
+
indicator: "rounded-full"
|
|
3046
|
+
}
|
|
3047
|
+
},
|
|
3048
|
+
orientation: {
|
|
3049
|
+
horizontal: {
|
|
3050
|
+
root: "flex-col",
|
|
3051
|
+
list: "w-full",
|
|
3052
|
+
indicator: "left-0 w-[var(--reka-tabs-indicator-size)] translate-x-[var(--reka-tabs-indicator-position)]",
|
|
3053
|
+
trigger: "justify-center"
|
|
3054
|
+
},
|
|
3055
|
+
vertical: {
|
|
3056
|
+
list: "flex-col",
|
|
3057
|
+
indicator: "top-0 h-[var(--reka-tabs-indicator-size)] translate-y-[var(--reka-tabs-indicator-position)]"
|
|
3058
|
+
}
|
|
3059
|
+
},
|
|
3060
|
+
size: {
|
|
3061
|
+
xs: {
|
|
3062
|
+
trigger: "px-2 py-1 text-xs gap-1",
|
|
3063
|
+
leadingIcon: "size-4",
|
|
3064
|
+
leadingAvatarSize: "3xs"
|
|
3065
|
+
},
|
|
3066
|
+
sm: {
|
|
3067
|
+
trigger: "px-2.5 py-1.5 text-xs gap-1.5",
|
|
3068
|
+
leadingIcon: "size-4",
|
|
3069
|
+
leadingAvatarSize: "3xs"
|
|
3070
|
+
},
|
|
3071
|
+
md: {
|
|
3072
|
+
trigger: "px-3 py-1.5 text-sm gap-1.5",
|
|
3073
|
+
leadingIcon: "size-5",
|
|
3074
|
+
leadingAvatarSize: "2xs"
|
|
3075
|
+
},
|
|
3076
|
+
lg: {
|
|
3077
|
+
trigger: "px-3 py-2 text-sm gap-2",
|
|
3078
|
+
leadingIcon: "size-5",
|
|
3079
|
+
leadingAvatarSize: "2xs"
|
|
3080
|
+
},
|
|
3081
|
+
xl: {
|
|
3082
|
+
trigger: "px-3 py-2 text-base gap-2",
|
|
3083
|
+
leadingIcon: "size-6",
|
|
3084
|
+
leadingAvatarSize: "xs"
|
|
3085
|
+
}
|
|
3086
|
+
}
|
|
3087
|
+
},
|
|
3088
|
+
compoundVariants: [
|
|
3089
|
+
// region orientation ////
|
|
3090
|
+
// region orientation horizontal.pill ////
|
|
3091
|
+
{
|
|
3092
|
+
orientation: "horizontal",
|
|
3093
|
+
variant: "pill",
|
|
3094
|
+
class: {
|
|
3095
|
+
indicator: "inset-y-1"
|
|
3096
|
+
}
|
|
3097
|
+
},
|
|
3098
|
+
// endregion ////
|
|
3099
|
+
// region orientation horizontal.link ////
|
|
3100
|
+
{
|
|
3101
|
+
orientation: "horizontal",
|
|
3102
|
+
variant: "link",
|
|
3103
|
+
class: {
|
|
3104
|
+
list: "border-b -mb-px",
|
|
3105
|
+
indicator: "-bottom-px h-px"
|
|
3106
|
+
}
|
|
3107
|
+
},
|
|
3108
|
+
// endregion ////
|
|
3109
|
+
// region orientation vertical.pill ////
|
|
3110
|
+
{
|
|
3111
|
+
orientation: "vertical",
|
|
3112
|
+
variant: "pill",
|
|
3113
|
+
class: {
|
|
3114
|
+
indicator: "inset-x-1",
|
|
3115
|
+
list: "items-center"
|
|
3116
|
+
}
|
|
3117
|
+
},
|
|
3118
|
+
// endregion ////
|
|
3119
|
+
// region orientation vertical.link ////
|
|
3120
|
+
{
|
|
3121
|
+
orientation: "vertical",
|
|
3122
|
+
variant: "link",
|
|
3123
|
+
class: {
|
|
3124
|
+
list: "border-s -ms-px",
|
|
3125
|
+
indicator: "-start-px w-px"
|
|
3126
|
+
}
|
|
3127
|
+
},
|
|
3128
|
+
// endregion ////
|
|
3129
|
+
// endregion ////
|
|
3130
|
+
// region color ////
|
|
3131
|
+
// region color.default ////
|
|
3132
|
+
{
|
|
3133
|
+
color: "default",
|
|
3134
|
+
variant: "pill",
|
|
3135
|
+
class: {
|
|
3136
|
+
indicator: "bg-base-900 dark:bg-base-900",
|
|
3137
|
+
trigger: [
|
|
3138
|
+
"data-[state=active]:text-white focus-visible:outline-base-900",
|
|
3139
|
+
"dark:data-[state=active]:text-base-200 dark:focus-visible:outline-base-900",
|
|
3140
|
+
"focus-visible:outline-2 focus-visible:outline-offset-2]"
|
|
3141
|
+
]
|
|
3142
|
+
}
|
|
3143
|
+
},
|
|
3144
|
+
{
|
|
3145
|
+
color: "default",
|
|
3146
|
+
variant: "link",
|
|
3147
|
+
class: {
|
|
3148
|
+
indicator: "bg-base-900 dark:dark:bg-base-350",
|
|
3149
|
+
trigger: [
|
|
3150
|
+
"focus-visible:ring-2 focus-visible:ring-inset",
|
|
3151
|
+
"data-[state=active]:text-base-900 focus-visible:ring-base-900",
|
|
3152
|
+
"dark:data-[state=active]:text-base-350 dark:focus-visible:ring-base-350"
|
|
3153
|
+
]
|
|
3154
|
+
}
|
|
3155
|
+
},
|
|
3156
|
+
// endregion ////
|
|
3157
|
+
// region color.danger ////
|
|
3158
|
+
{
|
|
3159
|
+
color: "danger",
|
|
3160
|
+
variant: "pill",
|
|
3161
|
+
class: {
|
|
3162
|
+
indicator: "bg-red-900 dark:bg-red-900",
|
|
3163
|
+
trigger: [
|
|
3164
|
+
"data-[state=active]:text-white focus-visible:outline-red-900",
|
|
3165
|
+
"dark:data-[state=active]:text-red-200 dark:focus-visible:outline-red-900",
|
|
3166
|
+
"focus-visible:outline-2 focus-visible:outline-offset-2]"
|
|
3167
|
+
]
|
|
3168
|
+
}
|
|
3169
|
+
},
|
|
3170
|
+
{
|
|
3171
|
+
color: "danger",
|
|
3172
|
+
variant: "link",
|
|
3173
|
+
class: {
|
|
3174
|
+
indicator: "bg-red-900 dark:dark:bg-red-300",
|
|
3175
|
+
trigger: [
|
|
3176
|
+
"focus-visible:ring-2 focus-visible:ring-inset",
|
|
3177
|
+
"data-[state=active]:text-red-900 focus-visible:ring-red-900",
|
|
3178
|
+
"dark:data-[state=active]:text-red-300 dark:focus-visible:ring-red-300"
|
|
3179
|
+
]
|
|
3180
|
+
}
|
|
3181
|
+
},
|
|
3182
|
+
// endregion ////
|
|
3183
|
+
// region color.success ////
|
|
3184
|
+
{
|
|
3185
|
+
color: "success",
|
|
3186
|
+
variant: "pill",
|
|
3187
|
+
class: {
|
|
3188
|
+
indicator: "bg-green-900 dark:bg-green-900",
|
|
3189
|
+
trigger: [
|
|
3190
|
+
"data-[state=active]:text-white focus-visible:outline-green-900",
|
|
3191
|
+
"dark:data-[state=active]:text-green-200 dark:focus-visible:outline-green-900",
|
|
3192
|
+
"focus-visible:outline-2 focus-visible:outline-offset-2]"
|
|
3193
|
+
]
|
|
3194
|
+
}
|
|
3195
|
+
},
|
|
3196
|
+
{
|
|
3197
|
+
color: "success",
|
|
3198
|
+
variant: "link",
|
|
3199
|
+
class: {
|
|
3200
|
+
indicator: "bg-green-900 dark:dark:bg-green-300",
|
|
3201
|
+
trigger: [
|
|
3202
|
+
"focus-visible:ring-2 focus-visible:ring-inset",
|
|
3203
|
+
"data-[state=active]:text-green-900 focus-visible:ring-green-900",
|
|
3204
|
+
"dark:data-[state=active]:text-green-300 dark:focus-visible:ring-green-300"
|
|
3205
|
+
]
|
|
3206
|
+
}
|
|
3207
|
+
},
|
|
3208
|
+
// endregion ////
|
|
3209
|
+
// region color.warning ////
|
|
3210
|
+
{
|
|
3211
|
+
color: "warning",
|
|
3212
|
+
variant: "pill",
|
|
3213
|
+
class: {
|
|
3214
|
+
indicator: "bg-orange-900 dark:bg-orange-900",
|
|
3215
|
+
trigger: [
|
|
3216
|
+
"data-[state=active]:text-white focus-visible:outline-orange-900",
|
|
3217
|
+
"dark:data-[state=active]:text-orange-200 dark:focus-visible:outline-orange-900",
|
|
3218
|
+
"focus-visible:outline-2 focus-visible:outline-offset-2]"
|
|
3219
|
+
]
|
|
3220
|
+
}
|
|
3221
|
+
},
|
|
3222
|
+
{
|
|
3223
|
+
color: "warning",
|
|
3224
|
+
variant: "link",
|
|
3225
|
+
class: {
|
|
3226
|
+
indicator: "bg-orange-900 dark:dark:bg-orange-300",
|
|
3227
|
+
trigger: [
|
|
3228
|
+
"focus-visible:ring-2 focus-visible:ring-inset",
|
|
3229
|
+
"data-[state=active]:text-orange-900 focus-visible:ring-orange-900",
|
|
3230
|
+
"dark:data-[state=active]:text-orange-300 dark:focus-visible:ring-orange-300"
|
|
3231
|
+
]
|
|
3232
|
+
}
|
|
3233
|
+
},
|
|
3234
|
+
// endregion ////
|
|
3235
|
+
// region color.primary ////
|
|
3236
|
+
{
|
|
3237
|
+
color: "primary",
|
|
3238
|
+
variant: "pill",
|
|
3239
|
+
class: {
|
|
3240
|
+
indicator: "bg-blue-900 dark:bg-blue-900",
|
|
3241
|
+
trigger: [
|
|
3242
|
+
"data-[state=active]:text-white focus-visible:outline-blue-900",
|
|
3243
|
+
"dark:data-[state=active]:text-blue-200 dark:focus-visible:outline-blue-900",
|
|
3244
|
+
"focus-visible:outline-2 focus-visible:outline-offset-2]"
|
|
3245
|
+
]
|
|
3246
|
+
}
|
|
3247
|
+
},
|
|
3248
|
+
{
|
|
3249
|
+
color: "primary",
|
|
3250
|
+
variant: "link",
|
|
3251
|
+
class: {
|
|
3252
|
+
indicator: "bg-blue-900 dark:dark:bg-blue-300",
|
|
3253
|
+
trigger: [
|
|
3254
|
+
"focus-visible:ring-2 focus-visible:ring-inset",
|
|
3255
|
+
"data-[state=active]:text-blue-900 focus-visible:ring-blue-900",
|
|
3256
|
+
"dark:data-[state=active]:text-blue-300 dark:focus-visible:ring-blue-300"
|
|
3257
|
+
]
|
|
3258
|
+
}
|
|
3259
|
+
},
|
|
3260
|
+
// endregion ////
|
|
3261
|
+
// region color.secondary ////
|
|
3262
|
+
{
|
|
3263
|
+
color: "secondary",
|
|
3264
|
+
variant: "pill",
|
|
3265
|
+
class: {
|
|
3266
|
+
indicator: "bg-cyan-900 dark:bg-cyan-900",
|
|
3267
|
+
trigger: [
|
|
3268
|
+
"data-[state=active]:text-white focus-visible:outline-cyan-900",
|
|
3269
|
+
"dark:data-[state=active]:text-cyan-200 dark:focus-visible:outline-cyan-900",
|
|
3270
|
+
"focus-visible:outline-2 focus-visible:outline-offset-2]"
|
|
3271
|
+
]
|
|
3272
|
+
}
|
|
3273
|
+
},
|
|
3274
|
+
{
|
|
3275
|
+
color: "secondary",
|
|
3276
|
+
variant: "link",
|
|
3277
|
+
class: {
|
|
3278
|
+
indicator: "bg-cyan-900 dark:dark:bg-cyan-300",
|
|
3279
|
+
trigger: [
|
|
3280
|
+
"focus-visible:ring-2 focus-visible:ring-inset",
|
|
3281
|
+
"data-[state=active]:text-cyan-900 focus-visible:ring-cyan-900",
|
|
3282
|
+
"dark:data-[state=active]:text-cyan-300 dark:focus-visible:ring-cyan-300"
|
|
3283
|
+
]
|
|
3284
|
+
}
|
|
3285
|
+
},
|
|
3286
|
+
// endregion ////
|
|
3287
|
+
// region color.collab ////
|
|
3288
|
+
{
|
|
3289
|
+
color: "collab",
|
|
3290
|
+
variant: "pill",
|
|
3291
|
+
class: {
|
|
3292
|
+
indicator: "bg-collab-900 dark:bg-collab-900",
|
|
3293
|
+
trigger: [
|
|
3294
|
+
"data-[state=active]:text-white focus-visible:outline-collab-900",
|
|
3295
|
+
"dark:data-[state=active]:text-collab-200 dark:focus-visible:outline-collab-900",
|
|
3296
|
+
"focus-visible:outline-2 focus-visible:outline-offset-2]"
|
|
3297
|
+
]
|
|
3298
|
+
}
|
|
3299
|
+
},
|
|
3300
|
+
{
|
|
3301
|
+
color: "collab",
|
|
3302
|
+
variant: "link",
|
|
3303
|
+
class: {
|
|
3304
|
+
indicator: "bg-collab-900 dark:dark:bg-collab-300",
|
|
3305
|
+
trigger: [
|
|
3306
|
+
"focus-visible:ring-2 focus-visible:ring-inset",
|
|
3307
|
+
"data-[state=active]:text-collab-900 focus-visible:ring-collab-900",
|
|
3308
|
+
"dark:data-[state=active]:text-collab-300 dark:focus-visible:ring-collab-300"
|
|
3309
|
+
]
|
|
3310
|
+
}
|
|
3311
|
+
},
|
|
3312
|
+
// endregion ////
|
|
3313
|
+
// region color.ai ////
|
|
3314
|
+
{
|
|
3315
|
+
color: "ai",
|
|
3316
|
+
variant: "pill",
|
|
3317
|
+
class: {
|
|
3318
|
+
indicator: "bg-ai-900 dark:bg-ai-900",
|
|
3319
|
+
trigger: [
|
|
3320
|
+
"data-[state=active]:text-white focus-visible:outline-ai-900",
|
|
3321
|
+
"dark:data-[state=active]:text-ai-200 dark:focus-visible:outline-ai-900",
|
|
3322
|
+
"focus-visible:outline-2 focus-visible:outline-offset-2]"
|
|
3323
|
+
]
|
|
3324
|
+
}
|
|
3325
|
+
},
|
|
3326
|
+
{
|
|
3327
|
+
color: "ai",
|
|
3328
|
+
variant: "link",
|
|
3329
|
+
class: {
|
|
3330
|
+
indicator: "bg-ai-900 dark:dark:bg-ai-300",
|
|
3331
|
+
trigger: [
|
|
3332
|
+
"focus-visible:ring-2 focus-visible:ring-inset",
|
|
3333
|
+
"data-[state=active]:text-ai-900 focus-visible:ring-ai-900",
|
|
3334
|
+
"dark:data-[state=active]:text-ai-300 dark:focus-visible:ring-ai-300"
|
|
3335
|
+
]
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
// endregion ////
|
|
3339
|
+
// endregion ////
|
|
3340
|
+
],
|
|
3341
|
+
defaultVariants: {
|
|
3342
|
+
color: "default",
|
|
3343
|
+
variant: "link",
|
|
3344
|
+
size: "md"
|
|
3345
|
+
}
|
|
3346
|
+
};
|
|
3347
|
+
|
|
3348
|
+
const textarea = {
|
|
3349
|
+
slots: {
|
|
3350
|
+
root: "relative inline-flex items-center w-full",
|
|
3351
|
+
base: [
|
|
3352
|
+
"w-full px-3 py-1.5 border-0 focus:outline-none",
|
|
3353
|
+
"disabled:cursor-not-allowed disabled:bg-base-30/37 disabled:resize-none disabled:text-base-500",
|
|
3354
|
+
"dark:disabled:bg-base-900/37 dark:disabled:text-base-800",
|
|
3355
|
+
"appearance-none transition duration-300 ease-linear",
|
|
3356
|
+
// transition-colors
|
|
3357
|
+
"ring ring-inset ring-base-300",
|
|
3358
|
+
"dark:ring-base-800",
|
|
3359
|
+
"text-base-master bg-white placeholder:text-base-400 hover:text-base-900 focus:text-base-900 active:text-base-900",
|
|
3360
|
+
"dark:text-base-150 dark:bg-transparent dark:placeholder:text-base-300 dark:hover:text-base-350 dark:focus:text-base-350 dark:active:text-base-350",
|
|
3361
|
+
"font-b24-primary font-regular text-md leading-normal",
|
|
3362
|
+
"align-middle"
|
|
3363
|
+
],
|
|
3364
|
+
tag: [
|
|
3365
|
+
"pointer-events-none select-none",
|
|
3366
|
+
"absolute z-10 -top-1.5 right-3 h-sm px-1.5 flex flex-col justify-center items-center",
|
|
3367
|
+
"font-b24-primary font-bold text-6xs leading-none uppercase rounded-full"
|
|
3368
|
+
]
|
|
3369
|
+
},
|
|
3370
|
+
variants: {
|
|
3371
|
+
...buttonGroupVariantWithRoot,
|
|
3372
|
+
color: {
|
|
3373
|
+
default: "",
|
|
3374
|
+
danger: "",
|
|
3375
|
+
success: "",
|
|
3376
|
+
warning: "",
|
|
3377
|
+
primary: "",
|
|
3378
|
+
secondary: "",
|
|
3379
|
+
collab: "",
|
|
3380
|
+
ai: ""
|
|
3381
|
+
},
|
|
3382
|
+
tagColor: {
|
|
3383
|
+
default: {
|
|
3384
|
+
tag: "text-white bg-base-900 dark:text-base-150 dark:bg-base-900"
|
|
3385
|
+
},
|
|
3386
|
+
danger: {
|
|
3387
|
+
tag: "text-white bg-red-500 dark:text-red-250 dark:bg-red-600"
|
|
3388
|
+
},
|
|
3389
|
+
success: {
|
|
3390
|
+
tag: "text-white bg-green-500 dark:text-green-250 dark:bg-green-600"
|
|
3391
|
+
},
|
|
3392
|
+
warning: {
|
|
3393
|
+
tag: "text-white bg-orange-500 dark:text-orange-250 dark:bg-orange-600"
|
|
3394
|
+
},
|
|
3395
|
+
primary: {
|
|
3396
|
+
tag: "text-white bg-blue-500 dark:text-blue-250 dark:bg-blue-600"
|
|
3397
|
+
},
|
|
3398
|
+
secondary: {
|
|
3399
|
+
tag: "text-white bg-cyan-350 dark:text-base-150 dark:bg-cyan-500"
|
|
3400
|
+
},
|
|
3401
|
+
collab: {
|
|
3402
|
+
tag: "text-white bg-collab-500 dark:text-collab-200 dark:bg-collab-800"
|
|
3403
|
+
},
|
|
3404
|
+
ai: {
|
|
3405
|
+
tag: "text-white bg-ai-500 dark:text-ai-200 dark:bg-ai-800"
|
|
3406
|
+
}
|
|
3407
|
+
},
|
|
3408
|
+
rounded: {
|
|
3409
|
+
true: "rounded-3xl",
|
|
3410
|
+
false: "rounded-2xs"
|
|
3411
|
+
},
|
|
3412
|
+
noPadding: {
|
|
3413
|
+
true: {
|
|
3414
|
+
base: "px-0"
|
|
3415
|
+
}
|
|
3416
|
+
},
|
|
3417
|
+
noBorder: {
|
|
3418
|
+
true: "ring-0 focus-visible:ring-0"
|
|
3419
|
+
},
|
|
3420
|
+
underline: {
|
|
3421
|
+
true: "ring-0 focus-visible:ring-0 border-b border-b-base-300 rounded-none"
|
|
3422
|
+
},
|
|
3423
|
+
highlight: {
|
|
3424
|
+
true: ""
|
|
3425
|
+
}
|
|
3426
|
+
},
|
|
3427
|
+
compoundVariants: [
|
|
3428
|
+
// region ring for focus and highlight ////
|
|
3429
|
+
// region default ////
|
|
3430
|
+
{
|
|
3431
|
+
color: "default",
|
|
3432
|
+
noBorder: false,
|
|
3433
|
+
underline: false,
|
|
3434
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-base-900 dark:focus-visible:ring-base-350"
|
|
3435
|
+
},
|
|
3436
|
+
{
|
|
3437
|
+
color: "default",
|
|
3438
|
+
highlight: true,
|
|
3439
|
+
noBorder: false,
|
|
3440
|
+
underline: false,
|
|
3441
|
+
class: "ring ring-inset ring-base-900 dark:ring-base-350"
|
|
3442
|
+
},
|
|
3443
|
+
{
|
|
3444
|
+
color: "default",
|
|
3445
|
+
noBorder: false,
|
|
3446
|
+
underline: true,
|
|
3447
|
+
class: "focus-visible:border-base-900 dark:focus-visible:border-b-base-350"
|
|
3448
|
+
},
|
|
3449
|
+
{
|
|
3450
|
+
color: "default",
|
|
3451
|
+
highlight: true,
|
|
3452
|
+
noBorder: false,
|
|
3453
|
+
underline: true,
|
|
3454
|
+
class: "border-b-base-900 dark:border-b-base-350"
|
|
3455
|
+
},
|
|
3456
|
+
// endregion ////
|
|
3457
|
+
// region danger ////
|
|
3458
|
+
{
|
|
3459
|
+
color: "danger",
|
|
3460
|
+
noBorder: false,
|
|
3461
|
+
underline: false,
|
|
3462
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-red-500 dark:focus-visible:ring-red-600"
|
|
3463
|
+
},
|
|
3464
|
+
{
|
|
3465
|
+
color: "danger",
|
|
3466
|
+
highlight: true,
|
|
3467
|
+
noBorder: false,
|
|
3468
|
+
underline: false,
|
|
3469
|
+
class: "ring ring-inset ring-red-500 dark:ring-red-600"
|
|
3470
|
+
},
|
|
3471
|
+
{
|
|
3472
|
+
color: "danger",
|
|
3473
|
+
noBorder: false,
|
|
3474
|
+
underline: true,
|
|
3475
|
+
class: "focus-visible:border-b-red-500 dark:focus-visible:border-b-red-600"
|
|
3476
|
+
},
|
|
3477
|
+
{
|
|
3478
|
+
color: "danger",
|
|
3479
|
+
highlight: true,
|
|
3480
|
+
noBorder: false,
|
|
3481
|
+
underline: true,
|
|
3482
|
+
class: "border-b-red-500 dark:border-b-red-600"
|
|
3483
|
+
},
|
|
3484
|
+
// endregion ////
|
|
3485
|
+
// region success ////
|
|
3486
|
+
{
|
|
3487
|
+
color: "success",
|
|
3488
|
+
noBorder: false,
|
|
3489
|
+
underline: false,
|
|
3490
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-green-500 dark:focus-visible:ring-green-600"
|
|
3491
|
+
},
|
|
3492
|
+
{
|
|
3493
|
+
color: "success",
|
|
3494
|
+
highlight: true,
|
|
3495
|
+
noBorder: false,
|
|
3496
|
+
underline: false,
|
|
3497
|
+
class: "ring ring-inset ring-green-500 dark:ring-green-600"
|
|
3498
|
+
},
|
|
3499
|
+
{
|
|
3500
|
+
color: "success",
|
|
3501
|
+
noBorder: false,
|
|
3502
|
+
underline: true,
|
|
3503
|
+
class: "focus-visible:border-b-green-500 dark:focus-visible:border-b-green-600"
|
|
3504
|
+
},
|
|
3505
|
+
{
|
|
3506
|
+
color: "success",
|
|
3507
|
+
highlight: true,
|
|
3508
|
+
noBorder: false,
|
|
3509
|
+
underline: true,
|
|
3510
|
+
class: "border-b-green-500 dark:border-b-green-600"
|
|
3511
|
+
},
|
|
3512
|
+
// endregion ////
|
|
3513
|
+
// region warning ////
|
|
3514
|
+
{
|
|
3515
|
+
color: "warning",
|
|
3516
|
+
noBorder: false,
|
|
3517
|
+
underline: false,
|
|
3518
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-orange-500 dark:focus-visible:ring-orange-600"
|
|
3519
|
+
},
|
|
3520
|
+
{
|
|
3521
|
+
color: "warning",
|
|
3522
|
+
highlight: true,
|
|
3523
|
+
noBorder: false,
|
|
3524
|
+
underline: false,
|
|
3525
|
+
class: "ring ring-inset ring-orange-500 dark:ring-orange-600"
|
|
3526
|
+
},
|
|
3527
|
+
{
|
|
3528
|
+
color: "warning",
|
|
3529
|
+
noBorder: false,
|
|
3530
|
+
underline: true,
|
|
3531
|
+
class: "focus-visible:border-b-orange-500 dark:focus-visible:border-b-orange-600"
|
|
3532
|
+
},
|
|
3533
|
+
{
|
|
3534
|
+
color: "warning",
|
|
3535
|
+
highlight: true,
|
|
3536
|
+
noBorder: false,
|
|
3537
|
+
underline: true,
|
|
3538
|
+
class: "border-b-orange-500 dark:border-b-orange-600"
|
|
3539
|
+
},
|
|
3540
|
+
// endregion ////
|
|
3541
|
+
// region primary ////
|
|
3542
|
+
{
|
|
3543
|
+
color: "primary",
|
|
3544
|
+
noBorder: false,
|
|
3545
|
+
underline: false,
|
|
3546
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-blue-500 dark:focus-visible:ring-blue-600"
|
|
3547
|
+
},
|
|
3548
|
+
{
|
|
3549
|
+
color: "primary",
|
|
3550
|
+
highlight: true,
|
|
3551
|
+
noBorder: false,
|
|
3552
|
+
underline: false,
|
|
3553
|
+
class: "ring ring-inset ring-blue-500 dark:ring-blue-600"
|
|
3554
|
+
},
|
|
3555
|
+
{
|
|
3556
|
+
color: "primary",
|
|
3557
|
+
noBorder: false,
|
|
3558
|
+
underline: true,
|
|
3559
|
+
class: "focus-visible:border-b-blue-500 dark:focus-visible:border-b-blue-600"
|
|
3560
|
+
},
|
|
3561
|
+
{
|
|
3562
|
+
color: "primary",
|
|
3563
|
+
highlight: true,
|
|
3564
|
+
noBorder: false,
|
|
3565
|
+
underline: true,
|
|
3566
|
+
class: "border-b-blue-500 dark:border-b-blue-600"
|
|
3567
|
+
},
|
|
3568
|
+
// endregion ////
|
|
3569
|
+
// region secondary ////
|
|
3570
|
+
{
|
|
3571
|
+
color: "secondary",
|
|
3572
|
+
noBorder: false,
|
|
3573
|
+
underline: false,
|
|
3574
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-cyan-350 dark:focus-visible:ring-cyan-500"
|
|
3575
|
+
},
|
|
3576
|
+
{
|
|
3577
|
+
color: "secondary",
|
|
3578
|
+
highlight: true,
|
|
3579
|
+
noBorder: false,
|
|
3580
|
+
underline: false,
|
|
3581
|
+
class: "ring ring-inset ring-cyan-350 dark:ring-cyan-500"
|
|
3582
|
+
},
|
|
3583
|
+
{
|
|
3584
|
+
color: "secondary",
|
|
3585
|
+
noBorder: false,
|
|
3586
|
+
underline: true,
|
|
3587
|
+
class: "focus-visible:border-b-cyan-350 dark:focus-visible:border-b-cyan-500"
|
|
3588
|
+
},
|
|
3589
|
+
{
|
|
3590
|
+
color: "secondary",
|
|
3591
|
+
highlight: true,
|
|
3592
|
+
noBorder: false,
|
|
3593
|
+
underline: true,
|
|
3594
|
+
class: "border-b-cyan-350 dark:border-b-cyan-500"
|
|
3595
|
+
},
|
|
3596
|
+
// endregion ////
|
|
3597
|
+
// region collab ////
|
|
3598
|
+
{
|
|
3599
|
+
color: "collab",
|
|
3600
|
+
noBorder: false,
|
|
3601
|
+
underline: false,
|
|
3602
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-collab-500 dark:focus-visible:ring-collab-600"
|
|
3603
|
+
},
|
|
3604
|
+
{
|
|
3605
|
+
color: "collab",
|
|
3606
|
+
highlight: true,
|
|
3607
|
+
noBorder: false,
|
|
3608
|
+
underline: false,
|
|
3609
|
+
class: "ring ring-inset ring-collab-500 dark:ring-collab-600"
|
|
3610
|
+
},
|
|
3611
|
+
{
|
|
3612
|
+
color: "collab",
|
|
3613
|
+
noBorder: false,
|
|
3614
|
+
underline: true,
|
|
3615
|
+
class: "focus-visible:border-b-collab-500 dark:focus-visible:border-b-collab-600"
|
|
3616
|
+
},
|
|
3617
|
+
{
|
|
3618
|
+
color: "collab",
|
|
3619
|
+
highlight: true,
|
|
3620
|
+
noBorder: false,
|
|
3621
|
+
underline: true,
|
|
3622
|
+
class: "border-b-collab-500 dark:border-b-collab-600"
|
|
3623
|
+
},
|
|
3624
|
+
// endregion ////
|
|
3625
|
+
// region ai ////
|
|
3626
|
+
{
|
|
3627
|
+
color: "ai",
|
|
3628
|
+
noBorder: false,
|
|
3629
|
+
underline: false,
|
|
3630
|
+
class: "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ai-500 dark:focus-visible:ring-ai-600"
|
|
3631
|
+
},
|
|
3632
|
+
{
|
|
3633
|
+
color: "ai",
|
|
3634
|
+
highlight: true,
|
|
3635
|
+
noBorder: false,
|
|
3636
|
+
underline: false,
|
|
3637
|
+
class: "ring ring-inset ring-ai-500 dark:ring-ai-600"
|
|
3638
|
+
},
|
|
3639
|
+
{
|
|
3640
|
+
color: "ai",
|
|
3641
|
+
noBorder: false,
|
|
3642
|
+
underline: true,
|
|
3643
|
+
class: "focus-visible:border-b-ai-500 dark:focus-visible:border-b-ai-600"
|
|
3644
|
+
},
|
|
3645
|
+
{
|
|
3646
|
+
color: "ai",
|
|
3647
|
+
highlight: true,
|
|
3648
|
+
noBorder: false,
|
|
3649
|
+
underline: true,
|
|
3650
|
+
class: "border-b-ai-500 dark:border-b-ai-600"
|
|
3651
|
+
}
|
|
3652
|
+
// endregion ////
|
|
3653
|
+
// endregion ////
|
|
3654
|
+
],
|
|
3655
|
+
defaultVariants: {
|
|
3656
|
+
color: "primary",
|
|
3657
|
+
tagColor: "primary"
|
|
3658
|
+
}
|
|
3659
|
+
};
|
|
3660
|
+
|
|
3661
|
+
const toast = {
|
|
3662
|
+
slots: {
|
|
3663
|
+
root: [
|
|
3664
|
+
"relative group overflow-hidden rounded-[26px] py-3.5 ps-6 pe-4 flex gap-2.5 focus:outline-none",
|
|
3665
|
+
"font-b24-primary",
|
|
3666
|
+
"dark:ring-2 dark:ring-base-900",
|
|
3667
|
+
"bg-base-ebony/80 dark:bg-base-dark",
|
|
3668
|
+
"text-sm font-normal",
|
|
3669
|
+
"text-white dark:text-base-150"
|
|
3670
|
+
],
|
|
3671
|
+
wrapper: "w-0 flex-1 flex flex-col gap-1",
|
|
3672
|
+
title: "font-medium",
|
|
3673
|
+
description: "",
|
|
3674
|
+
icon: "shrink-0 size-6",
|
|
3675
|
+
avatar: "shrink-0",
|
|
3676
|
+
avatarSize: "xl",
|
|
3677
|
+
actions: "flex gap-1.5 shrink-0",
|
|
3678
|
+
progress: "absolute inset-x-0 bottom-0 h-1 z-[-1]",
|
|
3679
|
+
close: "p-0.5 text-base-350 dark:text-base-350 hover:text-base-400 dark:hover:text-base-400"
|
|
3680
|
+
},
|
|
3681
|
+
variants: {
|
|
3682
|
+
color: {
|
|
3683
|
+
default: {
|
|
3684
|
+
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-base-400 dark:focus-visible:ring-base-400",
|
|
3685
|
+
icon: "text-white",
|
|
3686
|
+
progress: "bg-base-350 dark:bg-base-350"
|
|
3687
|
+
},
|
|
3688
|
+
danger: {
|
|
3689
|
+
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-red-400 dark:focus-visible:ring-red-400",
|
|
3690
|
+
icon: "text-red-500",
|
|
3691
|
+
progress: "bg-red-500 dark:bg-red-500"
|
|
3692
|
+
},
|
|
3693
|
+
success: {
|
|
3694
|
+
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-green-400 dark:focus-visible:ring-green-400",
|
|
3695
|
+
icon: "text-green-500",
|
|
3696
|
+
progress: "bg-green-500 dark:bg-green-500"
|
|
3697
|
+
},
|
|
3698
|
+
warning: {
|
|
3699
|
+
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-orange-400 dark:focus-visible:ring-orange-400",
|
|
3700
|
+
icon: "text-orange-500",
|
|
3701
|
+
progress: "bg-orange-500 dark:bg-orange-500"
|
|
3702
|
+
},
|
|
3703
|
+
primary: {
|
|
3704
|
+
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 dark:focus-visible:ring-blue-400",
|
|
3705
|
+
icon: "text-blue-500",
|
|
3706
|
+
progress: "bg-blue-500 dark:bg-blue-500"
|
|
3707
|
+
},
|
|
3708
|
+
secondary: {
|
|
3709
|
+
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-cyan-400 dark:focus-visible:ring-cyan-400",
|
|
3710
|
+
icon: "text-cyan-500",
|
|
3711
|
+
progress: "bg-cyan-500 dark:bg-cyan-500"
|
|
3712
|
+
},
|
|
3713
|
+
collab: {
|
|
3714
|
+
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-collab-400 dark:focus-visible:ring-collab-400",
|
|
3715
|
+
icon: "text-collab-500",
|
|
3716
|
+
progress: "bg-collab-500 dark:bg-collab-500"
|
|
3717
|
+
},
|
|
3718
|
+
ai: {
|
|
3719
|
+
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ai-400 dark:focus-visible:ring-ai-400",
|
|
3720
|
+
icon: "text-ai-500",
|
|
3721
|
+
progress: "bg-ai-500 dark:bg-ai-500"
|
|
3722
|
+
}
|
|
3723
|
+
},
|
|
3724
|
+
multiline: {
|
|
3725
|
+
true: {
|
|
3726
|
+
root: "items-start",
|
|
3727
|
+
actions: "items-start mt-1"
|
|
3728
|
+
},
|
|
3729
|
+
false: {
|
|
3730
|
+
root: "items-center",
|
|
3731
|
+
actions: "items-center"
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
},
|
|
3735
|
+
defaultVariants: {
|
|
3736
|
+
color: "default"
|
|
3737
|
+
}
|
|
3738
|
+
};
|
|
3739
|
+
|
|
3740
|
+
const toaster = {
|
|
3741
|
+
slots: {
|
|
3742
|
+
viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-[var(--height)] focus:outline-none",
|
|
3743
|
+
base: "pointer-events-auto absolute inset-x-0 z-[var(--index)] transform-[var(--transform)] data-[expanded=false]:data-[front=false]:h-[var(--front-height)] data-[expanded=false]:data-[front=false]:*:invisible data-[state=closed]:animate-[toast-closed_200ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_200ms_ease-in-out] data-[swipe=move]:transition-none transition-[transform,translate,height] duration-200 ease-out"
|
|
3744
|
+
},
|
|
3745
|
+
variants: {
|
|
3746
|
+
position: {
|
|
3747
|
+
"top-left": {
|
|
3748
|
+
viewport: "left-4"
|
|
3749
|
+
},
|
|
3750
|
+
"top-center": {
|
|
3751
|
+
viewport: "left-1/2 transform -translate-x-1/2"
|
|
3752
|
+
},
|
|
3753
|
+
"top-right": {
|
|
3754
|
+
viewport: "right-4"
|
|
3755
|
+
},
|
|
3756
|
+
"bottom-left": {
|
|
3757
|
+
viewport: "left-4"
|
|
3758
|
+
},
|
|
3759
|
+
"bottom-center": {
|
|
3760
|
+
viewport: "left-1/2 transform -translate-x-1/2"
|
|
3761
|
+
},
|
|
3762
|
+
"bottom-right": {
|
|
3763
|
+
viewport: "right-4"
|
|
3764
|
+
}
|
|
3765
|
+
},
|
|
3766
|
+
swipeDirection: {
|
|
3767
|
+
up: "data-[swipe=end]:animate-[toast-slide-up_200ms_ease-out]",
|
|
3768
|
+
right: "data-[swipe=end]:animate-[toast-slide-right_200ms_ease-out]",
|
|
3769
|
+
down: "data-[swipe=end]:animate-[toast-slide-down_200ms_ease-out]",
|
|
3770
|
+
left: "data-[swipe=end]:animate-[toast-slide-left_200ms_ease-out]"
|
|
3771
|
+
}
|
|
3772
|
+
},
|
|
3773
|
+
compoundVariants: [
|
|
3774
|
+
{
|
|
3775
|
+
position: [
|
|
3776
|
+
"top-left",
|
|
3777
|
+
"top-center",
|
|
3778
|
+
"top-right"
|
|
3779
|
+
],
|
|
3780
|
+
class: {
|
|
3781
|
+
viewport: "top-4",
|
|
3782
|
+
base: "top-0 data-[state=open]:animate-[slide-in-from-top_200ms_ease-in-out]"
|
|
3783
|
+
}
|
|
3784
|
+
},
|
|
3785
|
+
{
|
|
3786
|
+
position: [
|
|
3787
|
+
"bottom-left",
|
|
3788
|
+
"bottom-center",
|
|
3789
|
+
"bottom-right"
|
|
3790
|
+
],
|
|
3791
|
+
class: {
|
|
3792
|
+
viewport: "bottom-4",
|
|
3793
|
+
base: "bottom-0 data-[state=open]:animate-[slide-in-from-bottom_200ms_ease-in-out]"
|
|
3794
|
+
}
|
|
3795
|
+
},
|
|
3796
|
+
{
|
|
3797
|
+
swipeDirection: [
|
|
3798
|
+
"left",
|
|
3799
|
+
"right"
|
|
3800
|
+
],
|
|
3801
|
+
class: "data-[swipe=move]:translate-x-[var(--reka-toast-swipe-move-x)] data-[swipe=end]:translate-x-[var(--reka-toast-swipe-end-x)] data-[swipe=cancel]:translate-x-0"
|
|
3802
|
+
},
|
|
3803
|
+
{
|
|
3804
|
+
swipeDirection: [
|
|
3805
|
+
"up",
|
|
3806
|
+
"down"
|
|
3807
|
+
],
|
|
3808
|
+
class: "data-[swipe=move]:translate-y-[var(--reka-toast-swipe-move-y)] data-[swipe=end]:translate-y-[var(--reka-toast-swipe-end-y)] data-[swipe=cancel]:translate-y-0"
|
|
3809
|
+
}
|
|
3810
|
+
],
|
|
3811
|
+
defaultVariants: {
|
|
3812
|
+
position: "top-right"
|
|
3813
|
+
}
|
|
3814
|
+
};
|
|
3815
|
+
|
|
3816
|
+
const tooltip = {
|
|
3817
|
+
slots: {
|
|
3818
|
+
content: [
|
|
3819
|
+
"flex items-center gap-1 shadow-sm rounded-2xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
3820
|
+
"min-h-6 px-2 py-1 text-xs",
|
|
3821
|
+
"bg-base-dark/85 text-white",
|
|
3822
|
+
"dark:bg-base-dark dark:text-base-150 dark:ring dark:ring-base-100/20",
|
|
3823
|
+
"pointer-events-auto"
|
|
3824
|
+
],
|
|
3825
|
+
arrow: "fill-base-dark dark:fill-base-100/20",
|
|
3826
|
+
text: "text-pretty max-w-[200px]",
|
|
3827
|
+
// truncate
|
|
3828
|
+
kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-[''] before:me-0.5`,
|
|
3829
|
+
kbdsSize: "sm",
|
|
3830
|
+
kbdsDepth: "normal"
|
|
3831
|
+
}
|
|
3832
|
+
};
|
|
3833
|
+
|
|
3834
|
+
const theme = {
|
|
3835
|
+
__proto__: null,
|
|
3836
|
+
advice: advice,
|
|
3837
|
+
alert: alert,
|
|
3838
|
+
avatar: avatar,
|
|
3839
|
+
avatarGroup: avatarGroup,
|
|
3840
|
+
badge: badge,
|
|
3841
|
+
button: button,
|
|
3842
|
+
buttonGroup: buttonGroup,
|
|
3843
|
+
checkbox: checkbox,
|
|
3844
|
+
chip: chip,
|
|
3845
|
+
container: container,
|
|
3846
|
+
countdown: countdown,
|
|
3847
|
+
form: form,
|
|
3848
|
+
formField: formField,
|
|
3849
|
+
input: input,
|
|
3850
|
+
kbd: kbd,
|
|
3851
|
+
link: link,
|
|
3852
|
+
progress: progress,
|
|
3853
|
+
radioGroup: radioGroup,
|
|
3854
|
+
range: range,
|
|
3855
|
+
select: select,
|
|
3856
|
+
separator: separator,
|
|
3857
|
+
skeleton: skeleton,
|
|
3858
|
+
switch: _switch,
|
|
3859
|
+
tabs: tabs,
|
|
3860
|
+
textarea: textarea,
|
|
3861
|
+
toast: toast,
|
|
3862
|
+
toaster: toaster,
|
|
3863
|
+
tooltip: tooltip
|
|
3864
|
+
};
|
|
3865
|
+
|
|
3866
|
+
const themeProse = {
|
|
3867
|
+
__proto__: null
|
|
3868
|
+
};
|
|
3869
|
+
|
|
3870
|
+
const descriptionList = {
|
|
3871
|
+
slots: {
|
|
3872
|
+
root: "w-full shrink-0",
|
|
3873
|
+
// ????
|
|
3874
|
+
legend: "font-semibold text-black dark:text-base-150",
|
|
3875
|
+
text: "text-base-500 dark:text-base-400",
|
|
3876
|
+
container: "grid grid-cols-1 sm:grid-cols-[min(50%,theme(spacing.80))_auto]",
|
|
3877
|
+
labelWrapper: [
|
|
3878
|
+
"col-start-1 border-t border-base-950/5 text-base-500 first:border-none sm:border-t sm:border-base-950/5 dark:border-white/5 dark:text-base-400 sm:dark:border-white/5",
|
|
3879
|
+
"flex flex-nowrap flex-row items-center justify-start gap-1.5"
|
|
3880
|
+
].join(" "),
|
|
3881
|
+
icon: "shrink-0 size-6 text-base-500 dark:text-base-400",
|
|
3882
|
+
avatar: "shrink-0",
|
|
3883
|
+
avatarSize: "",
|
|
3884
|
+
label: "",
|
|
3885
|
+
descriptionWrapper: "text-base-950 sm:border-t sm:border-base-950/5 dark:text-white dark:sm:border-white/5 sm:[&:nth-child(2)]:border-none",
|
|
3886
|
+
description: "text-base-900 dark:text-base-150",
|
|
3887
|
+
actions: "flex flex-wrap gap-1.5 shrink-0",
|
|
3888
|
+
footer: "border-t border-base-950/5 dark:border-white/5"
|
|
3889
|
+
},
|
|
3890
|
+
variants: {
|
|
3891
|
+
size: {
|
|
3892
|
+
sm: {
|
|
3893
|
+
legend: "text-md",
|
|
3894
|
+
text: "mt-1 max-w-2/3 text-sm",
|
|
3895
|
+
container: "mt-2.5 text-md",
|
|
3896
|
+
labelWrapper: "pt-3 sm:py-3",
|
|
3897
|
+
avatarSize: "xs",
|
|
3898
|
+
label: "",
|
|
3899
|
+
descriptionWrapper: "pb-3 pt-1 sm:py-3",
|
|
3900
|
+
description: "",
|
|
3901
|
+
footer: "mt-2 p-2"
|
|
3902
|
+
},
|
|
3903
|
+
md: {
|
|
3904
|
+
legend: "text-xl",
|
|
3905
|
+
text: "mt-2 max-w-2/3 text-lg leading-5",
|
|
3906
|
+
container: "mt-3 text-lg",
|
|
3907
|
+
labelWrapper: "pt-3 sm:py-3",
|
|
3908
|
+
avatarSize: "xs",
|
|
3909
|
+
label: "",
|
|
3910
|
+
descriptionWrapper: "pb-3 pt-1 sm:py-3",
|
|
3911
|
+
description: "",
|
|
3912
|
+
footer: "mt-4 p-4"
|
|
3913
|
+
}
|
|
3914
|
+
},
|
|
3915
|
+
multiline: {
|
|
3916
|
+
true: {
|
|
3917
|
+
descriptionWrapper: "",
|
|
3918
|
+
actions: "items-start mt-2.5"
|
|
3919
|
+
},
|
|
3920
|
+
false: {
|
|
3921
|
+
descriptionWrapper: "w-full flex flex-row items-center justify-between gap-4",
|
|
3922
|
+
actions: "items-center"
|
|
3923
|
+
}
|
|
3924
|
+
}
|
|
3925
|
+
},
|
|
3926
|
+
compoundVariants: [],
|
|
3927
|
+
defaultVariants: {
|
|
3928
|
+
size: "md"
|
|
3929
|
+
}
|
|
3930
|
+
};
|
|
3931
|
+
|
|
3932
|
+
const themeContent = {
|
|
3933
|
+
__proto__: null,
|
|
3934
|
+
descriptionList: descriptionList
|
|
3935
|
+
};
|
|
3936
|
+
|
|
3937
|
+
function replaceBrackets(value) {
|
|
3938
|
+
return value.replace(/\[\[/g, "<").replace(/\]\]/g, ">");
|
|
3939
|
+
}
|
|
3940
|
+
function getTemplates(options) {
|
|
3941
|
+
const templates = [];
|
|
3942
|
+
function generateVariantDeclarations(variants, result) {
|
|
3943
|
+
return variants.map((variant) => {
|
|
3944
|
+
const keys = Object.keys(result.variants[variant]);
|
|
3945
|
+
return `const ${variant} = ${JSON.stringify(keys, null, 2)} as const`;
|
|
3946
|
+
});
|
|
3947
|
+
}
|
|
3948
|
+
for (const component in theme) {
|
|
3949
|
+
templates.push({
|
|
3950
|
+
filename: `b24ui/${kebabCase(component)}.ts`,
|
|
3951
|
+
write: true,
|
|
3952
|
+
getContents: async () => {
|
|
3953
|
+
const template = theme[component];
|
|
3954
|
+
const result = typeof template === "function" ? template(options) : template;
|
|
3955
|
+
const variants = Object.entries(result.variants || {}).filter(([_, values]) => {
|
|
3956
|
+
const keys = Object.keys(values);
|
|
3957
|
+
return keys.some((key) => key !== "true" && key !== "false");
|
|
3958
|
+
}).map(([key]) => key);
|
|
3959
|
+
let json = JSON.stringify(result, null, 2);
|
|
3960
|
+
for (const variant of variants) {
|
|
3961
|
+
json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"), `$1 as typeof ${variant}[number]`);
|
|
3962
|
+
json = json.replace(new RegExp(`("${variant}": \\[\\s*)((?:"[^"]+",?\\s*)+)(\\])`, "g"), (_, before, match, after) => {
|
|
3963
|
+
const replaced = match.replace(/("[^"]+")/g, `$1 as typeof ${variant}[number]`);
|
|
3964
|
+
return `${before}${replaced}${after}`;
|
|
3965
|
+
});
|
|
3966
|
+
}
|
|
3967
|
+
return [
|
|
3968
|
+
...generateVariantDeclarations(variants, result),
|
|
3969
|
+
`export default ${json}`
|
|
3970
|
+
].join("\n\n");
|
|
3971
|
+
}
|
|
3972
|
+
});
|
|
3973
|
+
}
|
|
3974
|
+
for (const component in themeProse) {
|
|
3975
|
+
templates.push({
|
|
3976
|
+
filename: `b24ui/prose/${kebabCase(component)}.ts`,
|
|
3977
|
+
write: true,
|
|
3978
|
+
getContents: async () => {
|
|
3979
|
+
const template = themeProse[component];
|
|
3980
|
+
const result = typeof template === "function" ? template(options) : template;
|
|
3981
|
+
const variants = Object.entries(result.variants || {}).filter(([_, values]) => {
|
|
3982
|
+
const keys = Object.keys(values);
|
|
3983
|
+
return keys.some((key) => key !== "true" && key !== "false");
|
|
3984
|
+
}).map(([key]) => key);
|
|
3985
|
+
let json = JSON.stringify(result, null, 2);
|
|
3986
|
+
for (const variant of variants) {
|
|
3987
|
+
json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"), `$1 as typeof ${variant}[number]`);
|
|
3988
|
+
json = json.replace(new RegExp(`("${variant}": \\[\\s*)((?:"[^"]+",?\\s*)+)(\\])`, "g"), (_, before, match, after) => {
|
|
3989
|
+
const replaced = match.replace(/("[^"]+")/g, `$1 as typeof ${variant}[number]`);
|
|
3990
|
+
return `${before}${replaced}${after}`;
|
|
3991
|
+
});
|
|
3992
|
+
}
|
|
3993
|
+
return [
|
|
3994
|
+
...generateVariantDeclarations(variants, result),
|
|
3995
|
+
`export default ${json}`
|
|
3996
|
+
].join("\n\n");
|
|
3997
|
+
}
|
|
3998
|
+
});
|
|
3999
|
+
}
|
|
4000
|
+
for (const component in themeContent) {
|
|
4001
|
+
templates.push({
|
|
4002
|
+
filename: `b24ui/content/${kebabCase(component)}.ts`,
|
|
4003
|
+
write: true,
|
|
4004
|
+
getContents: async () => {
|
|
4005
|
+
const template = themeContent[component];
|
|
4006
|
+
const result = typeof template === "function" ? template(options) : template;
|
|
4007
|
+
const variants = Object.entries(result.variants || {}).filter(([_, values]) => {
|
|
4008
|
+
const keys = Object.keys(values);
|
|
4009
|
+
return keys.some((key) => key !== "true" && key !== "false");
|
|
4010
|
+
}).map(([key]) => key);
|
|
4011
|
+
let json = JSON.stringify(result, null, 2);
|
|
4012
|
+
for (const variant of variants) {
|
|
4013
|
+
json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"), `$1 as typeof ${variant}[number]`);
|
|
4014
|
+
json = json.replace(new RegExp(`("${variant}": \\[\\s*)((?:"[^"]+",?\\s*)+)(\\])`, "g"), (_, before, match, after) => {
|
|
4015
|
+
const replaced = match.replace(/("[^"]+")/g, `$1 as typeof ${variant}[number]`);
|
|
4016
|
+
return `${before}${replaced}${after}`;
|
|
4017
|
+
});
|
|
4018
|
+
}
|
|
4019
|
+
return [
|
|
4020
|
+
...generateVariantDeclarations(variants, result),
|
|
4021
|
+
`export default ${json}`
|
|
4022
|
+
].join("\n\n");
|
|
4023
|
+
}
|
|
4024
|
+
});
|
|
4025
|
+
}
|
|
4026
|
+
templates.push({
|
|
4027
|
+
filename: "b24ui/index.ts",
|
|
4028
|
+
write: true,
|
|
4029
|
+
getContents: () => Object.keys(theme).map((component) => `export { default as ${component} } from './${kebabCase(component)}'`).join("\n")
|
|
4030
|
+
});
|
|
4031
|
+
templates.push({
|
|
4032
|
+
filename: "types/b24ui.d.ts",
|
|
4033
|
+
getContents: () => replaceBrackets(`import * as b24ui from '#build/b24ui'
|
|
4034
|
+
import type { DeepPartial } from '#b24ui/types/utils'
|
|
4035
|
+
import type { defaultConfig } from 'tailwind-variants'
|
|
4036
|
+
|
|
4037
|
+
type AppConfigUI = {
|
|
4038
|
+
tv?: typeof defaultConfig
|
|
4039
|
+
} & DeepPartial[[typeof b24ui]]
|
|
4040
|
+
|
|
4041
|
+
declare module '@nuxt/schema' {
|
|
4042
|
+
interface AppConfigInput {
|
|
4043
|
+
b24ui?: AppConfigUI
|
|
4044
|
+
}
|
|
4045
|
+
}
|
|
4046
|
+
|
|
4047
|
+
export {}
|
|
4048
|
+
`)
|
|
4049
|
+
});
|
|
4050
|
+
templates.push({
|
|
4051
|
+
filename: "b24ui-image-component.ts",
|
|
4052
|
+
write: true,
|
|
4053
|
+
getContents: ({ app }) => {
|
|
4054
|
+
const image = app?.components?.find((c) => c.pascalName === "NuxtImg" && !c.filePath.includes("nuxt/dist/app"));
|
|
4055
|
+
return image ? `export { default } from "${image.filePath}"` : 'export default "img"';
|
|
4056
|
+
}
|
|
4057
|
+
});
|
|
4058
|
+
return templates;
|
|
4059
|
+
}
|
|
4060
|
+
function addTemplates(options, nuxt, resolve) {
|
|
4061
|
+
const templates = getTemplates(options);
|
|
4062
|
+
for (const template of templates) {
|
|
4063
|
+
if (template.filename.endsWith(".d.ts")) {
|
|
4064
|
+
addTypeTemplate(template);
|
|
4065
|
+
} else {
|
|
4066
|
+
addTemplate(template);
|
|
4067
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
nuxt.hook("prepare:types", ({ references }) => {
|
|
4070
|
+
references.push({ path: resolve("./runtime/types/app.config.d.ts") });
|
|
4071
|
+
});
|
|
4072
|
+
}
|
|
4073
|
+
|
|
4074
|
+
export { getDefaultUiConfig as a, addTemplates as b, defaultOptions as d, getTemplates as g };
|