@una-ui/preset-edge 0.54.0-29109520.c7c0073 → 0.54.0-29109618.0a5d5ec
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/prefixes.d.ts +1 -1
- package/package.json +4 -8
- package/dist/index.cjs +0 -156
- package/dist/index.d.cts +0 -9
- package/dist/prefixes.cjs +0 -208
- package/dist/prefixes.d.cts +0 -3
- package/dist/shared/preset-edge.B7x2Iz0t.cjs +0 -1235
- package/dist/shortcuts.cjs +0 -9
- package/dist/shortcuts.d.cts +0 -5
|
@@ -1,1235 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const utils = require('@unocss/preset-mini/utils');
|
|
4
|
-
const presetMini = require('@unocss/preset-mini');
|
|
5
|
-
|
|
6
|
-
const staticAccordion = {
|
|
7
|
-
// config
|
|
8
|
-
"accordion-trailing-icon": "i-lucide-chevron-up",
|
|
9
|
-
"accordion-button-padding": "p-(x-3 y-4)",
|
|
10
|
-
"accordion-button-default-variant": "btn-text",
|
|
11
|
-
"accordion-divider": "divide-(y base)",
|
|
12
|
-
"accordion-border": "border-(~ base) rounded-md",
|
|
13
|
-
// base
|
|
14
|
-
"accordion": "flex-(~ col) relative w-full",
|
|
15
|
-
"accordion-item": "w-full",
|
|
16
|
-
"accordion-button": "justify-start",
|
|
17
|
-
"accordion-panel": "text-(muted 0.875em) border-(t $c-divider) accordion-button-padding",
|
|
18
|
-
"accordion-leading": "text-1.2em",
|
|
19
|
-
"accordion-trailing": "flex transition items-center text-1em duration-300",
|
|
20
|
-
"accordion-label": "flex w-full text-1em",
|
|
21
|
-
// trailing transition
|
|
22
|
-
"accordion-trailing-open": "-rotate-180",
|
|
23
|
-
"accordion-trailing-close": "rotate-0",
|
|
24
|
-
// panel transition
|
|
25
|
-
"accordion-enter-active": "overflow-hidden transition-height duration-300",
|
|
26
|
-
"accordion-leave-active": "overflow-hidden transition-height duration-300"
|
|
27
|
-
};
|
|
28
|
-
const dynamicAccordion = [];
|
|
29
|
-
const accordion = [
|
|
30
|
-
...dynamicAccordion,
|
|
31
|
-
staticAccordion
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
const staticAlert = {
|
|
35
|
-
// config
|
|
36
|
-
"alert-default-variant": "alert-outline",
|
|
37
|
-
"alert-info-icon": "i-info",
|
|
38
|
-
"alert-error-icon": "i-error",
|
|
39
|
-
"alert-success-icon": "i-success",
|
|
40
|
-
"alert-warning-icon": "i-warning",
|
|
41
|
-
"alert-close-icon": "i-close",
|
|
42
|
-
// base
|
|
43
|
-
"alert": "p-1em",
|
|
44
|
-
"alert-title": "text-0.875em font-medium text-brand",
|
|
45
|
-
"alert-description": "text-0.875em leading-1.4285714285714286em text-brand/90",
|
|
46
|
-
"alert-icon-base": "h-1.25em w-1.25em",
|
|
47
|
-
"alert-close": "p-0.5em rounded-md hover:bg-brand/10 active:bg-brand/20 transition-colors duration-200",
|
|
48
|
-
"alert-close-icon-base": "h-1.2em w-1.2em",
|
|
49
|
-
// wrappers
|
|
50
|
-
"alert-inner-wrapper": "gap-0.75em flex",
|
|
51
|
-
"alert-content-wrapper": "flex flex-col w-full space-y-0.5em",
|
|
52
|
-
"alert-icon-wrapper": "-mt-0.2em",
|
|
53
|
-
"alert-close-wrapper": "ml-auto pl-0.2em",
|
|
54
|
-
"alert-close-inner-wrapper": "-mx-1.1 -my-1.1",
|
|
55
|
-
// static variants
|
|
56
|
-
"alert-solid-white": "rounded-md text-brand bg-base n-gray-950 dark:n-white border",
|
|
57
|
-
"alert-solid-black": "rounded-md text-brand bg-inverted n-white dark:n-gray-950 border border-foreground"
|
|
58
|
-
};
|
|
59
|
-
const dynamicAlert = [
|
|
60
|
-
// variants
|
|
61
|
-
[/^alert-solid(-(\S+))?$/, ([, , c = "primary"]) => `rounded-md text-white bg-${c}-500 dark:bg-${c}-800 n-white dark:n-${c}-400`],
|
|
62
|
-
[/^alert-soft(-(\S+))?$/, ([, , c = "primary"]) => `rounded-md bg-${c}-50 text-${c}-400 dark:text-${c}-300 dark:bg-${c}-950 n-${c}-800 dark:n-${c}-100`],
|
|
63
|
-
[/^alert-outline(-(\S+))?$/, ([, , c = "primary"]) => `rounded-md border border-${c}-600 dark:border-${c}-500 text-brand n-${c}-600 dark:n-${c}-500`],
|
|
64
|
-
[/^alert-border(-(\S+))?$/, ([, , c = "primary"]) => `border-l-4 border-${c}-400 dark:border-${c}-500 bg-${c}-50 dark:bg-${c}-950 text-${c}-400 dark:text-${c}-300 n-${c}-800 dark:n-${c}-100`]
|
|
65
|
-
];
|
|
66
|
-
const alert = [
|
|
67
|
-
...dynamicAlert,
|
|
68
|
-
staticAlert
|
|
69
|
-
];
|
|
70
|
-
|
|
71
|
-
const staticAlertDialog = {
|
|
72
|
-
// base
|
|
73
|
-
"alert-dialog": "",
|
|
74
|
-
// sub-components
|
|
75
|
-
"alert-dialog-cancel": "mt-2 sm:mt-0",
|
|
76
|
-
"alert-dialog-overlay": "fixed inset-0 z-50 bg-black/80",
|
|
77
|
-
"alert-dialog-content": "bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
78
|
-
"alert-dialog-title": "text-lg font-semibold",
|
|
79
|
-
"alert-dialog-description": "text-muted text-sm",
|
|
80
|
-
"alert-dialog-header": "flex flex-col gap-2 text-center sm:text-left",
|
|
81
|
-
"alert-dialog-footer": "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end"
|
|
82
|
-
};
|
|
83
|
-
const dynamicAlertDialog = [
|
|
84
|
-
// dynamic preset
|
|
85
|
-
];
|
|
86
|
-
const alertDialog = [
|
|
87
|
-
...dynamicAlertDialog,
|
|
88
|
-
staticAlertDialog
|
|
89
|
-
];
|
|
90
|
-
|
|
91
|
-
const staticAspectRatio = {
|
|
92
|
-
// base
|
|
93
|
-
"aspect-ratio": "overflow-hidden",
|
|
94
|
-
// static variants
|
|
95
|
-
"aspect-ratio-soft-gray": "bg-muted border border-base",
|
|
96
|
-
"aspect-ratio-outline-gray": "bg-base border border-base"
|
|
97
|
-
};
|
|
98
|
-
const dynamicAspectRatio = [
|
|
99
|
-
[/^aspect-ratio-soft(-(\S+))?$/, ([, , c = "gray"]) => `bg-${c}-50 dark:bg-${c}-900 border-${c}-200 dark:border-${c}-700/58`],
|
|
100
|
-
[/^aspect-ratio-outline(-(\S+))?$/, ([, , c = "gray"]) => `border border-${c}-200 dark:border-${c}-700/58`]
|
|
101
|
-
];
|
|
102
|
-
const aspectRatio = [
|
|
103
|
-
...dynamicAspectRatio,
|
|
104
|
-
staticAspectRatio
|
|
105
|
-
];
|
|
106
|
-
|
|
107
|
-
const staticAvatar = {
|
|
108
|
-
// base
|
|
109
|
-
"avatar": "relative inline-flex items-center font-normal select-none shrink-0 overflow-hidden",
|
|
110
|
-
"avatar-image": "h-full w-full object-cover",
|
|
111
|
-
"avatar-fallback": "flex h-full w-full items-center justify-center",
|
|
112
|
-
"avatar-label": "uppercase",
|
|
113
|
-
"avatar-icon": "text-1em",
|
|
114
|
-
// variants
|
|
115
|
-
"avatar-solid-white": "bg-base text-base border border-base",
|
|
116
|
-
"avatar-solid-black": "bg-inverted text-inverted"
|
|
117
|
-
};
|
|
118
|
-
const dynamicAvatar = [
|
|
119
|
-
// variants
|
|
120
|
-
[/^avatar-solid(-(\S+))?$/, ([, , c = "gray"]) => `bg-${c}-600 dark:bg-${c}-500 text-inverted`],
|
|
121
|
-
[/^avatar-soft(-(\S+))?$/, ([, , c = "gray"]) => `bg-${c}-50 text-${c}-700 dark:text-${c}-400 dark:bg-${c}-900`],
|
|
122
|
-
[/^avatar-outline(-(\S+))?$/, ([, , c = "gray"]) => `bg-transparent text-${c}-500 dark:text-${c}-400 border border-${c}-500 dark:border-${c}-400`]
|
|
123
|
-
];
|
|
124
|
-
const avatar = [
|
|
125
|
-
...dynamicAvatar,
|
|
126
|
-
staticAvatar
|
|
127
|
-
];
|
|
128
|
-
|
|
129
|
-
const staticAvatarGroup = {
|
|
130
|
-
"avatar-group": "flex flex-row-reverse justify-end",
|
|
131
|
-
"avatar-group-item": "ring-0.125em ring-background -me-0.375em first:me-0",
|
|
132
|
-
"avatar-group-count": "text-0.875em"
|
|
133
|
-
};
|
|
134
|
-
const dynamicAvatarGroup = [];
|
|
135
|
-
const avatarGroup = [
|
|
136
|
-
...dynamicAvatarGroup,
|
|
137
|
-
staticAvatarGroup
|
|
138
|
-
];
|
|
139
|
-
|
|
140
|
-
const staticBadge = {
|
|
141
|
-
// config
|
|
142
|
-
"badge-default-variant": "badge-soft",
|
|
143
|
-
"badge-close-icon": "i-close",
|
|
144
|
-
// base
|
|
145
|
-
"badge": "text-xs leading-tight py-0.3333333333333333em px-0.6666666666666666em gap-x-0.25em inline-flex items-center rounded-md font-medium text-brand",
|
|
146
|
-
"badge-icon-base": "text-1em",
|
|
147
|
-
"badge-close": "relative rounded-sm h-1.16em w-1.16em grid place-items-center -mr-0.375em hover:bg-brand/20 bg-transparent",
|
|
148
|
-
"badge-close-icon-base": "text-brand/75 group-hover:text-brand/90",
|
|
149
|
-
// variants
|
|
150
|
-
"badge-soft-gray": "bg-muted text-muted n-gray-900 dark:n-gray-50 ring-1 ring-gray-700/10 dark:ring-gray-400/30",
|
|
151
|
-
"badge-solid-black": "bg-inverted text-inverted n-gray-300 dark:n-gray-600",
|
|
152
|
-
"badge-outline-white": "bg-base text-base ring-1 ring-base n-gray-600 dark:n-gray-300"
|
|
153
|
-
};
|
|
154
|
-
const dynamicBadge = [
|
|
155
|
-
// variants
|
|
156
|
-
[/^badge-solid(-(\S+))?$/, ([, , c = "primary"]) => `bg-${c}-100 dark:bg-${c}-800 n-${c}-700 dark:n-${c}-200`],
|
|
157
|
-
[/^badge-soft(-(\S+))?$/, ([, , c = "primary"]) => `bg-${c}-50 n-${c}-700 dark:n-${c}-400 ring-1 ring-${c}-700/10 dark:bg-${c}-400/10 dark:ring-${c}-400/30`],
|
|
158
|
-
[/^badge-outline(-(\S+))?$/, ([, , c = "primary"]) => `bg-transparent n-${c}-700 dark:n-${c}-400 ring-1 ring-${c}-700/10 dark:ring-${c}-400/30`]
|
|
159
|
-
];
|
|
160
|
-
const badge = [
|
|
161
|
-
...dynamicBadge,
|
|
162
|
-
staticBadge
|
|
163
|
-
];
|
|
164
|
-
|
|
165
|
-
const staticBreadcrumb = {
|
|
166
|
-
// config
|
|
167
|
-
"breadcrumb": "",
|
|
168
|
-
"breadcrumb-active": "breadcrumb-active-text-primary",
|
|
169
|
-
"breadcrumb-inactive": "breadcrumb-inactive-text-muted",
|
|
170
|
-
"breadcrumb-separator-icon": "i-radix-icons-chevron-right",
|
|
171
|
-
"breadcrumb-ellipsis-icon": "i-radix-icons-dots-horizontal",
|
|
172
|
-
// components
|
|
173
|
-
"breadcrumb-root": "",
|
|
174
|
-
"breadcrumb-list": "flex flex-wrap items-center break-words text-muted",
|
|
175
|
-
"breadcrumb-link": "transition-colors font-normal px-1.5 sm:px-2.5",
|
|
176
|
-
"breadcrumb-item": "inline-flex items-center gap-1.5",
|
|
177
|
-
"breadcrumb-separator": "flex",
|
|
178
|
-
// TODO
|
|
179
|
-
"breadcrumb-ellipsis": "flex items-center justify-center px-1.5 sm:px-2.5 cursor-pointer"
|
|
180
|
-
};
|
|
181
|
-
const dynamicBreadcrumb = [
|
|
182
|
-
// states
|
|
183
|
-
[
|
|
184
|
-
/^breadcrumb-active-([^-]+)-([^-]+)$/,
|
|
185
|
-
([, variant = "text", color = "primary"]) => `data-[state=active]:btn-${variant}-${color}`
|
|
186
|
-
],
|
|
187
|
-
[
|
|
188
|
-
/^breadcrumb-inactive-([^-]+)-([^-]+)$/,
|
|
189
|
-
([, variant = "text", color = "muted"]) => `data-[state=inactive]:btn-${variant}-${color}`
|
|
190
|
-
]
|
|
191
|
-
];
|
|
192
|
-
const breadcrumb = [
|
|
193
|
-
...dynamicBreadcrumb,
|
|
194
|
-
staticBreadcrumb
|
|
195
|
-
];
|
|
196
|
-
|
|
197
|
-
const staticBtn = {
|
|
198
|
-
// config
|
|
199
|
-
"btn-default-variant": "btn-solid",
|
|
200
|
-
"btn-loading-icon": "i-loading",
|
|
201
|
-
// base
|
|
202
|
-
"btn": "btn-rectangle bg-transparent transition-colors leading-1.4285714285714286em gap-x-0.5714285714285714em rounded-md whitespace-nowrap inline-flex justify-center items-center btn-disabled font-medium",
|
|
203
|
-
"btn-disabled": "disabled:n-disabled",
|
|
204
|
-
"btn-label": "",
|
|
205
|
-
"btn-icon-label": "size-1.1428571428571428em",
|
|
206
|
-
"btn-leading": "size-1.1428571428571428em",
|
|
207
|
-
"btn-trailing": "size-1.1428571428571428em",
|
|
208
|
-
"btn-loading": "animate-spin size-1.1428571428571428em",
|
|
209
|
-
"btn-rectangle": "h-2.5714285714285716em px-1.1428571428571428em py-0.5714285714285714em",
|
|
210
|
-
"btn-square": "square-2.5714285714285716em p-0",
|
|
211
|
-
// options
|
|
212
|
-
"btn-block": "w-full",
|
|
213
|
-
"btn-reverse": "flex-row-reverse",
|
|
214
|
-
// variants
|
|
215
|
-
"btn-solid-white": "bg-base text-base ring-1 ring-base ring-inset shadow-sm btn-focus hover:bg-muted",
|
|
216
|
-
"btn-ghost-white": "text-base btn-focus hover:bg-$c-gray-50",
|
|
217
|
-
"btn-outline-white": "text-base ring-1 ring-base ring-inset btn-focus hover:bg-$c-gray-50",
|
|
218
|
-
"btn-solid-gray": "bg-$c-gray-50 text-$c-gray-800 ring-1 ring-base ring-inset shadow-sm btn-focus hover:bg-$c-gray-100",
|
|
219
|
-
"btn-ghost-gray": "text-$c-gray-600 btn-focus hover:bg-$c-gray-100",
|
|
220
|
-
"btn-soft-gray": "text-$c-gray-600 bg-$c-gray-50 btn-focus hover:bg-$c-gray-100",
|
|
221
|
-
"btn-outline-gray": "text-muted hover:text-$c-gray-600 ring-1 ring-base ring-inset btn-focus hover:bg-$c-gray-50",
|
|
222
|
-
"btn-link-gray": "text-muted btn-focus hover:text-base hover:underline underline-offset-4",
|
|
223
|
-
"btn-text-gray": "text-$c-gray-600 btn-focus hover:text-$c-gray-900",
|
|
224
|
-
"btn-solid-black": "bg-inverted text-inverted shadow-sm btn-focus",
|
|
225
|
-
"btn-link-black": "text-base btn-focus hover:underline underline-offset-4",
|
|
226
|
-
"btn-text-black": "text-base btn-focus",
|
|
227
|
-
"btn-soft-black": "text-base bg-base btn-focus shadow-sm",
|
|
228
|
-
"btn-text-muted": "text-muted btn-focus hover:text-accent",
|
|
229
|
-
"btn-link-muted": "text-muted btn-focus hover:underline underline-offset-4",
|
|
230
|
-
"btn-ghost-muted": "text-accent hover:text-muted btn-focus hover:bg-muted",
|
|
231
|
-
"btn-soft-accent": "text-accent bg-accent btn-focus",
|
|
232
|
-
"btn-text-accent": "text-accent btn-focus",
|
|
233
|
-
"btn-link-accent": "text-accent btn-focus hover:underline underline-offset-4"
|
|
234
|
-
};
|
|
235
|
-
const dynamicBtn = [
|
|
236
|
-
// base
|
|
237
|
-
[/^btn-focus(-(\S+))?$/, ([, , c = "primary"]) => `focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-${c}-600 dark:focus-visible:ring-${c}-500`],
|
|
238
|
-
// variants
|
|
239
|
-
[/^btn-solid(-(\S+))?$/, ([, , c = "primary"]) => `btn-focus-${c} text-inverted shadow-sm bg-${c}-600 hover:bg-${c}-500 dark:bg-${c}-500 dark:hover:bg-${c}-400`],
|
|
240
|
-
[/^btn-text(-(\S+))?$/, ([, , c = "primary"]) => `btn-focus-${c} text-${c}-600 dark:text-${c}-500 hover:text-${c}-500 dark:hover:text-${c}-400`],
|
|
241
|
-
[/^btn-outline(-(\S+))?$/, ([, , c = "primary"]) => `btn-focus-${c} text-${c}-500 dark:text-${c}-400 ring-1 ring-inset ring-${c}-500 dark:ring-${c}-400 hover:bg-${c}-50 dark:hover:bg-${c}-950`],
|
|
242
|
-
[/^btn-soft(-(\S+))?$/, ([, , c = "primary"]) => `btn-focus-${c} text-${c}-600 dark:text-${c}-400 bg-${c}-50 dark:bg-${c}-950 hover:bg-${c}-100 dark:hover:bg-${c}-900`],
|
|
243
|
-
[/^btn-ghost(-(\S+))?$/, ([, , c = "primary"]) => `btn-focus-${c} text-${c}-600 dark:text-${c}-400 hover:bg-${c}-100 dark:hover:bg-${c}-900`],
|
|
244
|
-
[/^btn-link(-(\S+))?$/, ([, , c = "primary"]) => `btn-focus-${c} text-${c}-600 dark:text-${c}-500 hover:underline underline-offset-4`]
|
|
245
|
-
];
|
|
246
|
-
const btn = [
|
|
247
|
-
...dynamicBtn,
|
|
248
|
-
staticBtn
|
|
249
|
-
];
|
|
250
|
-
|
|
251
|
-
const staticCard = {
|
|
252
|
-
// base
|
|
253
|
-
"card": "rounded-xl shadow text-base",
|
|
254
|
-
// components
|
|
255
|
-
"card-header": "flex flex-col gap-y-1.5 p-6",
|
|
256
|
-
"card-title": "font-semibold leading-none tracking-tight",
|
|
257
|
-
"card-description": "text-sm text-muted",
|
|
258
|
-
"card-content": "p-6 pt-0",
|
|
259
|
-
"card-footer": "flex items-center p-6 pt-0",
|
|
260
|
-
// static variants
|
|
261
|
-
"card-soft-gray": "bg-muted border border-base",
|
|
262
|
-
"card-outline-gray": "bg-base border border-base"
|
|
263
|
-
};
|
|
264
|
-
const dynamicCard = [
|
|
265
|
-
[/^card-soft(-(\S+))?$/, ([, , c = "gray"]) => `bg-${c}-50 dark:bg-${c}-900 border-${c}-200 dark:border-${c}-700/58`],
|
|
266
|
-
[/^card-outline(-(\S+))?$/, ([, , c = "gray"]) => `border border-${c}-200 dark:border-${c}-700/58`]
|
|
267
|
-
];
|
|
268
|
-
const card = [
|
|
269
|
-
...dynamicCard,
|
|
270
|
-
staticCard
|
|
271
|
-
];
|
|
272
|
-
|
|
273
|
-
const staticCheckbox = {
|
|
274
|
-
// base
|
|
275
|
-
"checkbox": "checkbox-primary text-md w-1em h-1em shrink-0 rounded-sm ring-offset-base focus-visible:outline-none disabled:n-disabled border border-brand bg-brand text-inverted focus-visible:(ring-2 ring-brand ring-offset-2) data-[state=unchecked]:(bg-base text-base)",
|
|
276
|
-
"checkbox-label": "block",
|
|
277
|
-
"checkbox-reverse": "flex-row-reverse",
|
|
278
|
-
// wrappers
|
|
279
|
-
"checkbox-wrapper": "gap-x-3 relative inline-flex items-center hover:cursor-pointer",
|
|
280
|
-
// icon
|
|
281
|
-
"checkbox-indicator": "flex items-center justify-center h-full w-full data-[state=unchecked]:opacity-0 transition-base opacity-100 text-inverted",
|
|
282
|
-
"checkbox-icon-base": "w-1em h-1em",
|
|
283
|
-
"checkbox-checked-icon": "i-check",
|
|
284
|
-
"checkbox-unchecked-icon": "",
|
|
285
|
-
"checkbox-indeterminate-icon": "i-lucide-minus"
|
|
286
|
-
};
|
|
287
|
-
const dynamicCheckbox = [
|
|
288
|
-
[/^checkbox-(.*)$/, ([, body], { theme }) => {
|
|
289
|
-
const color = utils.parseColor(body, theme);
|
|
290
|
-
if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
|
|
291
|
-
return `n-${body}-600 dark:n-${body}-500`;
|
|
292
|
-
}]
|
|
293
|
-
];
|
|
294
|
-
const checkbox = [
|
|
295
|
-
...dynamicCheckbox,
|
|
296
|
-
staticCheckbox
|
|
297
|
-
];
|
|
298
|
-
|
|
299
|
-
const staticCollapsible = {
|
|
300
|
-
"collapsible-content": "overflow-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down"
|
|
301
|
-
};
|
|
302
|
-
const dynamicCollapsible = [
|
|
303
|
-
// dynamic preset
|
|
304
|
-
];
|
|
305
|
-
const collapsible = [
|
|
306
|
-
...dynamicCollapsible,
|
|
307
|
-
staticCollapsible
|
|
308
|
-
];
|
|
309
|
-
|
|
310
|
-
const staticCombobox = {
|
|
311
|
-
// base
|
|
312
|
-
"combobox": "flex",
|
|
313
|
-
"combobox-trigger-info-icon": "i-info",
|
|
314
|
-
"combobox-trigger-error-icon": "i-error",
|
|
315
|
-
"combobox-trigger-success-icon": "i-success",
|
|
316
|
-
"combobox-trigger-warning-icon": "i-warning",
|
|
317
|
-
"combobox-trigger-trailing-icon": "i-lucide-chevrons-up-down",
|
|
318
|
-
"combobox-input-leading-icon": "i-lucide-search",
|
|
319
|
-
"combobox-trigger": "px-0.8571428571428571em min-w-200px w-full justify-between font-normal [&>span]:truncate",
|
|
320
|
-
"combobox-trigger-trailing": "size-1.1428571428571428em data-[status=error]:text-error data-[status=success]:text-success data-[status=warning]:text-warning data-[status=info]:text-info data-[status=default]:(n-disabled) rtl:mr-auto ltr:ml-auto",
|
|
321
|
-
"combobox-trigger-leading": "size-1.1428571428571428em",
|
|
322
|
-
"combobox-item": "data-[highlighted]:bg-accent data-[highlighted]:text-accent relative flex cursor-default items-center gap-2 rounded-sm px-0.5em py-0.375em text-1em outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
|
|
323
|
-
"combobox-item-indicator": "ml-auto",
|
|
324
|
-
"combobox-item-indicator-icon": "",
|
|
325
|
-
"combobox-item-indicator-icon-name": "i-check",
|
|
326
|
-
"combobox-anchor": "w-full",
|
|
327
|
-
"combobox-empty": "py-1.7142857142857142em text-center text-1em leading-1.4285714285714286em",
|
|
328
|
-
"combobox-group": "overflow-hidden p-0.2857142857142857em text-foreground",
|
|
329
|
-
"combobox-label": "px-0.6666666666666666em py-0.5em text-0.8571428571428571em leading-1.1428571428571428em text-muted font-medium px-2",
|
|
330
|
-
"combobox-list": "z-50 w-[--reka-popper-anchor-width] rounded-md border bg-popover text-popover overflow-hidden shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
331
|
-
"combobox-separator": "bg-border -mx-1 h-px",
|
|
332
|
-
"combobox-viewport": "max-h-300px scroll-py-1 overflow-x-hidden overflow-y-auto"
|
|
333
|
-
};
|
|
334
|
-
const dynamicCombobox = [
|
|
335
|
-
// dynamic preset
|
|
336
|
-
];
|
|
337
|
-
const combobox = [
|
|
338
|
-
...dynamicCombobox,
|
|
339
|
-
staticCombobox
|
|
340
|
-
];
|
|
341
|
-
|
|
342
|
-
const staticDialog = {
|
|
343
|
-
// base
|
|
344
|
-
"dialog": "",
|
|
345
|
-
// sub-components
|
|
346
|
-
"dialog-overlay": "fixed inset-0 z-50 bg-black/80",
|
|
347
|
-
"dialog-content": "bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
348
|
-
"dialog-scroll-overlay": "fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/80",
|
|
349
|
-
"dialog-scroll-content": "relative z-50 grid w-full max-w-lg my-8 gap-4 border border-base bg-base p-6 shadow-lg duration-200 sm:rounded-lg md:w-full",
|
|
350
|
-
"dialog-header": "flex flex-col gap-y-1.5 text-center sm:text-left",
|
|
351
|
-
"dialog-title": "text-lg font-semibold leading-none tracking-tight",
|
|
352
|
-
"dialog-description": "text-sm text-muted",
|
|
353
|
-
"dialog-close": "absolute right-4 top-4",
|
|
354
|
-
"dialog-footer": "flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2"
|
|
355
|
-
};
|
|
356
|
-
const dynamicDialog = [
|
|
357
|
-
// dynamic preset
|
|
358
|
-
];
|
|
359
|
-
const dialog = [
|
|
360
|
-
...dynamicDialog,
|
|
361
|
-
staticDialog
|
|
362
|
-
];
|
|
363
|
-
|
|
364
|
-
const staticDropdownMenu = {
|
|
365
|
-
// configurations
|
|
366
|
-
"dropdown-menu": "",
|
|
367
|
-
"dropdown-menu-default-variant": "btn-solid-white",
|
|
368
|
-
// dropdown-menu-trigger
|
|
369
|
-
"dropdown-menu-trigger": "",
|
|
370
|
-
"dropdown-menu-trigger-leading": "",
|
|
371
|
-
"dropdown-menu-trigger-trailing": "ml-auto",
|
|
372
|
-
// dropdown-menu-content
|
|
373
|
-
"dropdown-menu-content": "z-50 min-w-32 overflow-hidden rounded-md border border-base bg-popover p-1 text-popover shadow-md",
|
|
374
|
-
// dropdown-menu-item
|
|
375
|
-
"dropdown-menu-item-base": "text-left transition-color focus-visible:outline-0 select-none",
|
|
376
|
-
"dropdown-menu-item-leading": "",
|
|
377
|
-
"dropdown-menu-item-trailing": "ml-auto opacity-75",
|
|
378
|
-
// dropdown-menu-label
|
|
379
|
-
"dropdown-menu-label": "px-2 py-1.5 text-0.875em font-semibold",
|
|
380
|
-
// dropdown-menu-separator
|
|
381
|
-
"dropdown-menu-separator-root": "relative -mx-1",
|
|
382
|
-
"dropdown-menu-separator": "",
|
|
383
|
-
// dropdown-menu-shortcut
|
|
384
|
-
"dropdown-menu-shortcut": "pl-10 ml-auto text-0.875em tracking-widest n-disabled space-x-0.5",
|
|
385
|
-
// dropdown-menu-group
|
|
386
|
-
"dropdown-menu-group": "",
|
|
387
|
-
// dropdown-menu-sub
|
|
388
|
-
"dropdown-menu-sub-trigger": "transition-color focus-visible:outline-0 select-none",
|
|
389
|
-
"dropdown-menu-sub-trigger-leading": "",
|
|
390
|
-
"dropdown-menu-sub-trigger-trailing": "ml-auto opacity-75",
|
|
391
|
-
"dropdown-menu-sub-trigger-trailing-icon": "i-lucide-chevron-right",
|
|
392
|
-
"dropdown-menu-sub-content": "z-50 min-w-32 overflow-hidden rounded-md border border-base bg-popover p-1 text-popover shadow-lg"
|
|
393
|
-
};
|
|
394
|
-
const dynamicDropdownMenu = [
|
|
395
|
-
[/^dropdown-menu-([^-]+)-([^-]+)$/, ([, v = "solid", c = "white"]) => `btn-${v}-${c}`],
|
|
396
|
-
[/^dropdown-menu-item(?:-(\S+))?$/, ([, c = "gray"]) => `focus:bg-${c}-100 focus:text-${c}-800 dark:focus:bg-${c}-800 dark:focus:text-${c}-100 data-[state=open]:bg-${c}-100 dark:data-[state=open]:bg-${c}-800`]
|
|
397
|
-
];
|
|
398
|
-
const dropdowMenu = [
|
|
399
|
-
...dynamicDropdownMenu,
|
|
400
|
-
staticDropdownMenu
|
|
401
|
-
];
|
|
402
|
-
|
|
403
|
-
const staticForm = {
|
|
404
|
-
// base
|
|
405
|
-
"form": "",
|
|
406
|
-
"form-field": "",
|
|
407
|
-
"form-field-description": "text-muted",
|
|
408
|
-
"form-field-hint": "text-sm leading-none text-muted",
|
|
409
|
-
"form-field-message": "",
|
|
410
|
-
// wrappers
|
|
411
|
-
"form-field-top-wrapper": "flex flex-col space-y-1.5 pb-0.5",
|
|
412
|
-
"form-field-top-wrapper-inner": "flex justify-between items-end space-x-1.5",
|
|
413
|
-
"form-field-bottom-wrapper": "flex space-x-1.5 justify-between items-start",
|
|
414
|
-
"form-field-message-wrapper": "",
|
|
415
|
-
// label
|
|
416
|
-
"form-field-label-wrapper": "flex",
|
|
417
|
-
"form-field-label": "block",
|
|
418
|
-
"form-field-label-required": "after:content-['*'] after:ms-0.5 after:text-error",
|
|
419
|
-
"form-message": "text-0.8rem font-medium transition-all duration-1000 ease-in-out text-error",
|
|
420
|
-
"form-label": "",
|
|
421
|
-
"form-description": "text-sm text-muted",
|
|
422
|
-
"form-item": "space-y-2"
|
|
423
|
-
};
|
|
424
|
-
const form = [
|
|
425
|
-
staticForm
|
|
426
|
-
];
|
|
427
|
-
|
|
428
|
-
const staticFormGroup = {
|
|
429
|
-
// base
|
|
430
|
-
"form-group": "space-y-2",
|
|
431
|
-
"form-group-description": "text-0.8rem text-muted",
|
|
432
|
-
"form-group-hint": "text-sm leading-none text-muted",
|
|
433
|
-
"form-group-message": "text-0.8em transition-all duration-1000 ease-in-out",
|
|
434
|
-
// wrappers
|
|
435
|
-
"form-group-top-wrapper": "flex flex-col space-y-1.5",
|
|
436
|
-
"form-group-top-wrapper-inner": "flex justify-between items-end space-x-1.5",
|
|
437
|
-
"form-group-bottom-wrapper": "flex space-x-1.5 justify-between items-start",
|
|
438
|
-
"form-group-message-wrapper": "",
|
|
439
|
-
// label
|
|
440
|
-
"form-group-label-wrapper": "flex",
|
|
441
|
-
"form-group-label": "block label-base",
|
|
442
|
-
"form-group-label-required": "after:content-['*'] after:ms-0.5 after:text-error",
|
|
443
|
-
// counter
|
|
444
|
-
"form-group-counter-wrapper": "text-0.8em",
|
|
445
|
-
"form-group-counter-error": "text-error",
|
|
446
|
-
"form-group-counter-current": "text-accent",
|
|
447
|
-
"form-group-counter-separator": "text-muted",
|
|
448
|
-
"form-group-counter-max": "text-muted"
|
|
449
|
-
};
|
|
450
|
-
const formGroup = [
|
|
451
|
-
staticFormGroup
|
|
452
|
-
];
|
|
453
|
-
|
|
454
|
-
const staticIcons = {
|
|
455
|
-
"i-loading": "i-tabler-loader-2",
|
|
456
|
-
"i-warning": "i-tabler-alert-triangle-filled",
|
|
457
|
-
"i-error": "i-tabler-exclamation-circle-filled",
|
|
458
|
-
"i-success": "i-tabler-circle-check-filled",
|
|
459
|
-
"i-info": "i-tabler-info-circle-filled",
|
|
460
|
-
"i-close": "i-tabler-x",
|
|
461
|
-
"i-check": "i-tabler-check",
|
|
462
|
-
"i-dot": "i-tabler-circle-filled"
|
|
463
|
-
};
|
|
464
|
-
|
|
465
|
-
const staticGeneral = {
|
|
466
|
-
// text-size
|
|
467
|
-
"text-md": "text-1rem leading-1.5rem",
|
|
468
|
-
"size-md": "text-md",
|
|
469
|
-
// text color
|
|
470
|
-
"text-base": "text-$c-foreground",
|
|
471
|
-
"text-inverted": "text-$c-background",
|
|
472
|
-
"text-muted": "text-$c-muted-foreground",
|
|
473
|
-
"text-accent": "text-$c-accent-foreground",
|
|
474
|
-
"text-accent-foreground": "text-$c-accent",
|
|
475
|
-
"text-popover": "text-$c-popover-foreground",
|
|
476
|
-
"text-popover-foreground": "text-$c-popover",
|
|
477
|
-
"text-info": "text-info-600 dark:text-info-500",
|
|
478
|
-
"text-info-active": "text-info-500 dark:text-info-400",
|
|
479
|
-
"text-error": "text-error-600 dark:text-error-500",
|
|
480
|
-
"text-error-active": "text-error-500 dark:text-error-400",
|
|
481
|
-
"text-success": "text-success-600 dark:text-success-500",
|
|
482
|
-
"text-success-active": "text-success-500 dark:text-success-400",
|
|
483
|
-
"text-warning": "text-warning-600 dark:text-warning-500",
|
|
484
|
-
"text-warning-active": "text-warning-500 dark:text-warning-400",
|
|
485
|
-
// ring
|
|
486
|
-
"ring-base": "ring-$c-ring",
|
|
487
|
-
"ring-offset-base": "ring-offset-$c-background",
|
|
488
|
-
// border
|
|
489
|
-
"border-base": "border-$c-border",
|
|
490
|
-
"border-foreground": "border-$c-border-foreground",
|
|
491
|
-
// divide
|
|
492
|
-
"divide-base": "divide-$c-divider",
|
|
493
|
-
// bg
|
|
494
|
-
"bg-base": "bg-$c-background",
|
|
495
|
-
"bg-inverted": "bg-$c-foreground",
|
|
496
|
-
"bg-muted": "bg-$c-muted",
|
|
497
|
-
"bg-border": "bg-$c-border",
|
|
498
|
-
"bg-accent": "bg-$c-accent",
|
|
499
|
-
"bg-accent-foreground": "bg-$c-accent-foreground",
|
|
500
|
-
"bg-popover": "bg-$c-popover",
|
|
501
|
-
"bg-popover-foreground": "bg-$c-popover-foreground",
|
|
502
|
-
// transition
|
|
503
|
-
"transition-base": "transition-all duration-100 ease-out",
|
|
504
|
-
// overrides
|
|
505
|
-
"square-false": ""
|
|
506
|
-
};
|
|
507
|
-
const dynamicGeneral = [
|
|
508
|
-
// TODO: una-text-<color><-number><-number>
|
|
509
|
-
// [/^una-text(-(\S+))?$/, ([, , c = 'primary']) => `text-${c}-700 dark:text-${c}-400`],
|
|
510
|
-
];
|
|
511
|
-
const general = [
|
|
512
|
-
...dynamicGeneral,
|
|
513
|
-
staticGeneral,
|
|
514
|
-
staticIcons
|
|
515
|
-
];
|
|
516
|
-
|
|
517
|
-
const staticIcon = {
|
|
518
|
-
// base
|
|
519
|
-
"icon-base": "flex-none"
|
|
520
|
-
};
|
|
521
|
-
const dynamicIcon = [];
|
|
522
|
-
const icon = [
|
|
523
|
-
...dynamicIcon,
|
|
524
|
-
staticIcon
|
|
525
|
-
];
|
|
526
|
-
|
|
527
|
-
const staticIndicator = {
|
|
528
|
-
// config
|
|
529
|
-
"indicator-default-variant": "indicator-solid",
|
|
530
|
-
"indicator-default-placement": "indicator-top-right",
|
|
531
|
-
// base
|
|
532
|
-
"indicator": "absolute min-h-1.5em min-w-1.5em flex items-center justify-center rounded-full font-medium py-none px-0.3em ring-2 ring-$c-background",
|
|
533
|
-
// indicator type sizes
|
|
534
|
-
"indicator-dot": "size-0.45em",
|
|
535
|
-
"indicator-label": "size-0.75em",
|
|
536
|
-
// wrapper
|
|
537
|
-
"indicator-wrapper": "relative inline-flex",
|
|
538
|
-
// placements
|
|
539
|
-
"indicator-top-right": "top-0 -ml-1.3em -mt-0.1em",
|
|
540
|
-
"indicator-bottom-right": "bottom-0 -ml-1.3em -mb-0.1em",
|
|
541
|
-
"indicator-top-left": "top-0 left-0 -mr-1.3em -mt-0.1em",
|
|
542
|
-
"indicator-bottom-left": "bottom-0 left-0 -mr-1.3em -mb-0.1em"
|
|
543
|
-
};
|
|
544
|
-
const dynamicIndicator = [
|
|
545
|
-
[/^indicator-solid(-(\S+))?$/, ([, , c = "primary"]) => `bg-${c}-600 dark:bg-${c}-500 text-inverted`]
|
|
546
|
-
];
|
|
547
|
-
const indicator = [
|
|
548
|
-
...dynamicIndicator,
|
|
549
|
-
staticIndicator
|
|
550
|
-
];
|
|
551
|
-
|
|
552
|
-
const staticInput = {
|
|
553
|
-
// config
|
|
554
|
-
"input-default-variant": "input-outline-primary",
|
|
555
|
-
"input-loading-icon": "i-loading",
|
|
556
|
-
"input-info-icon": "i-info",
|
|
557
|
-
"input-error-icon": "i-error",
|
|
558
|
-
"input-success-icon": "i-success",
|
|
559
|
-
"input-warning-icon": "i-warning",
|
|
560
|
-
"input-leading-padding": "pl-2.5714285714285716em",
|
|
561
|
-
"input-trailing-padding": "pr-2.5714285714285716em",
|
|
562
|
-
// base
|
|
563
|
-
"input": "text-base text-0.875em leading-1.4285714285714286em px-0.8571428571428571em w-full focus-visible:outline-none input-disabled placeholder:text-muted block rounded-md shadow-sm bg-transparent transition-colors file:border-0 file:bg-transparent file:text-0.875em file:font-medium",
|
|
564
|
-
"input-input": "h-2.5714285714285716em py-0.2857142857142857em",
|
|
565
|
-
// role='input'
|
|
566
|
-
"input-textarea": "min-h-4.285714285714286em py-0.5714285714em",
|
|
567
|
-
// role='textarea'
|
|
568
|
-
"input-disabled": "disabled:(n-disabled)",
|
|
569
|
-
"input-status-ring": "ring-opacity-50 dark:ring-opacity-40",
|
|
570
|
-
"input-status-icon-base": "square-1em",
|
|
571
|
-
"input-leading": "square-1em",
|
|
572
|
-
"input-trailing": "square-1em",
|
|
573
|
-
"input-loading": "animate-spin square-1em",
|
|
574
|
-
// wrappers
|
|
575
|
-
"input-wrapper": "relative flex items-center",
|
|
576
|
-
"input-leading-wrapper": "pointer-events-none absolute inset-y-0 start-0 flex items-center px-0.8571428571428571em text-muted",
|
|
577
|
-
"input-trailing-wrapper": "pointer-events-none absolute inset-y-0 end-0 flex items-center px-0.8571428571428571em text-muted",
|
|
578
|
-
// variants
|
|
579
|
-
"input-outline-gray": "border border-input focus-visible:ring-input focus-visible:ring-1",
|
|
580
|
-
"input-outline-black": "border border-input focus:ring-$c-foreground focus-visible:ring-1"
|
|
581
|
-
};
|
|
582
|
-
const dynamicInput = [
|
|
583
|
-
// config
|
|
584
|
-
[/^input-focus(-(\S+))?$/, ([, , c = "primary"]) => `focus-visible:ring-${c}-500 dark:focus-visible:ring-${c}-400 focus-visible:ring-1`],
|
|
585
|
-
[/^input-status(-(\S+))?$/, ([, , c = "info"]) => `text-${c}-700 dark:text-${c}-200 placeholder-${c}-500 dark:placeholder-${c}-400`],
|
|
586
|
-
// variants
|
|
587
|
-
[/^input-outline(-(\S+))?$/, ([, , c = "primary"]) => `border border-input input-focus-${c}`],
|
|
588
|
-
[/^input-solid(-(\S+))?$/, ([, , c = "primary"]) => `input-focus-${c} border border-${c}-500 dark:border-${c}-400`]
|
|
589
|
-
];
|
|
590
|
-
const input = [
|
|
591
|
-
...dynamicInput,
|
|
592
|
-
staticInput
|
|
593
|
-
];
|
|
594
|
-
|
|
595
|
-
const staticKbd = {
|
|
596
|
-
// config
|
|
597
|
-
"kbd-default-variant": "kbd-solid-gray",
|
|
598
|
-
// base
|
|
599
|
-
"kbd": "inline-flex text-nowrap items-center h-1.8181818181818181em min-w-1.8181818181818181em font-sans justify-center rounded px-0.5454545454545454em py-0.18181818181818182em text-0.6875em font-normal"
|
|
600
|
-
};
|
|
601
|
-
const dynamicKbd = [
|
|
602
|
-
// modifiers
|
|
603
|
-
[/^kbd-ring(-(\S+))?$/, ([, , c = "gray"]) => `ring-1 ring-inset ring-${c}-200 dark:ring-${c}-700/58`],
|
|
604
|
-
// variants
|
|
605
|
-
[/^kbd-solid(-(\S+))?$/, ([, , c = "gray"]) => `kbd-ring-${c} bg-${c}-50 text-${c}-500 dark:bg-${c}-900 dark:text-${c}-400`],
|
|
606
|
-
[/^kbd-outline(-(\S+))?$/, ([, , c = "gray"]) => `kbd-ring-${c} bg-transparent text-${c}-500 dark:text-${c}-400`]
|
|
607
|
-
];
|
|
608
|
-
const kbd = [
|
|
609
|
-
...dynamicKbd,
|
|
610
|
-
staticKbd
|
|
611
|
-
];
|
|
612
|
-
|
|
613
|
-
const staticLabel = {
|
|
614
|
-
// base
|
|
615
|
-
"label-base": "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50"
|
|
616
|
-
};
|
|
617
|
-
const dynamicLabel = [
|
|
618
|
-
// dynamic preset
|
|
619
|
-
];
|
|
620
|
-
const label = [
|
|
621
|
-
...dynamicLabel,
|
|
622
|
-
staticLabel
|
|
623
|
-
];
|
|
624
|
-
|
|
625
|
-
const staticLink = {
|
|
626
|
-
// base
|
|
627
|
-
link: ""
|
|
628
|
-
};
|
|
629
|
-
const dynamicLink = [
|
|
630
|
-
// dynamic preset
|
|
631
|
-
];
|
|
632
|
-
const link = [
|
|
633
|
-
...dynamicLink,
|
|
634
|
-
staticLink
|
|
635
|
-
];
|
|
636
|
-
|
|
637
|
-
const staticNavigationMenu = {
|
|
638
|
-
// configurations
|
|
639
|
-
"navigation-menu": "relative z-10 flex max-w-max flex-1 items-center justify-center",
|
|
640
|
-
"navigation-menu-disabled": "n-disabled",
|
|
641
|
-
// components
|
|
642
|
-
"navigation-menu-indicator": "absolute data-[state=hidden]:opacity-0 duration-200 top-full data-[state=visible]:animate-fadeIn data-[state=hidden]:animate-fadeOut w-[--reka-navigation-menu-indicator-size] translate-x-[--reka-navigation-menu-indicator-position] mt--3px z-100 flex h-10px items-end justify-center overflow-hidden transition-all",
|
|
643
|
-
"navigation-menu-indicator-arrow": "relative top-70% h-12px w-12px rotate-45deg border bg-base",
|
|
644
|
-
"navigation-menu-content": "left-0 top-0 w-full md:absolute md:w-auto",
|
|
645
|
-
"navigation-menu-viewport": "origin-top-center relative mt-1.5 h-[--reka-navigation-menu-viewport-height] w-full overflow-hidden rounded-md border bg-popover text-popover shadow md:w-[--reka-navigation-menu-viewport-width]",
|
|
646
|
-
"navigation-menu-link": "",
|
|
647
|
-
"navigation-menu-trigger": "",
|
|
648
|
-
"navigation-menu-trigger-trailing": "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
649
|
-
"navigation-menu-trigger-trailing-icon": "i-lucide-chevron-down",
|
|
650
|
-
"navigation-menu-content-item": "flex items-start select-none rounded-md p-3 h-unset leading-none no-underline outline-none transition-colors whitespace-normal justify-start",
|
|
651
|
-
"navigation-menu-content-list": "grid w-400px gap-3 p-4 md:grid-cols-2 lg:w-600px md:w-500px",
|
|
652
|
-
"navigation-menu-content-item-wrapper": "flex flex-col items-start gap-1",
|
|
653
|
-
"navigation-menu-content-item-label": "font-semibold leading-none",
|
|
654
|
-
"navigation-menu-content-item-description": "line-clamp-2 text-left text-muted leading-5",
|
|
655
|
-
"navigation-menu-list-horizontal": "flex flex-1 list-none items-center justify-center gap-x-1",
|
|
656
|
-
"navigation-menu-list-vertical": "max-w-none list-none flex-col items-start gap-1 space-x-0",
|
|
657
|
-
"navigation-menu-viewport-wrapper": "",
|
|
658
|
-
"navigation-menu-viewport-wrapper-horizontal": "absolute left-0 top-full flex justify-center",
|
|
659
|
-
"navigation-menu-viewport-wrapper-vertical": "absolute top-0 left-full ml-1.5"
|
|
660
|
-
};
|
|
661
|
-
const dynamicNavigationMenu = [
|
|
662
|
-
[/^navigation-menu-([^-]+)-([^-]+)$/, ([, v = "ghost", c = "white"]) => `btn-${v}-${c}`],
|
|
663
|
-
[/^navigation-menu-link-([^-]+)-([^-]+)$/, ([, v = "ghost", c = "white"]) => `btn-${v}-${c}`]
|
|
664
|
-
];
|
|
665
|
-
const navigationMenu = [
|
|
666
|
-
...dynamicNavigationMenu,
|
|
667
|
-
staticNavigationMenu
|
|
668
|
-
];
|
|
669
|
-
|
|
670
|
-
const staticPagination = {
|
|
671
|
-
// configurations
|
|
672
|
-
"pagination": "overflow-hidden",
|
|
673
|
-
"pagination-list": "flex items-center gap-1 overflow-hidden",
|
|
674
|
-
// components
|
|
675
|
-
"pagination-root": "",
|
|
676
|
-
"pagination-list-item": "pagination",
|
|
677
|
-
"pagination-ellipsis-base": "btn-(~ square) flex items-center justify-center",
|
|
678
|
-
"pagination-ellipsis-icon-base": "square-1.25em",
|
|
679
|
-
"pagination-ellipsis-icon": "i-lucide-ellipsis",
|
|
680
|
-
"pagination-first": "pagination",
|
|
681
|
-
"pagination-first-icon": "i-lucide-chevrons-left",
|
|
682
|
-
"pagination-prev": "pagination",
|
|
683
|
-
"pagination-prev-icon": "i-lucide-chevron-left",
|
|
684
|
-
"pagination-next": "pagination",
|
|
685
|
-
"pagination-next-icon": "i-lucide-chevron-right",
|
|
686
|
-
"pagination-last": "pagination",
|
|
687
|
-
"pagination-last-icon": "i-lucide-chevrons-right"
|
|
688
|
-
};
|
|
689
|
-
const dynamicPagination = [
|
|
690
|
-
[
|
|
691
|
-
/^pagination-ellipsis(?:-([^-]+))?(?:-([^-]+))?$/,
|
|
692
|
-
([, variant = "text", color = "black"]) => `btn-${variant}-${color}`
|
|
693
|
-
],
|
|
694
|
-
[
|
|
695
|
-
/^pagination-selected(?:-([^-]+))?(?:-([^-]+))?$/,
|
|
696
|
-
([, variant = "solid", color = "primary"]) => `data-[selected=true]:btn-${variant}-${color}`
|
|
697
|
-
],
|
|
698
|
-
[
|
|
699
|
-
/^pagination-unselected(?:-([^-]+))?(?:-([^-]+))?$/,
|
|
700
|
-
([, variant = "solid", color = "white"]) => `data-[selected=false]:btn-${variant}-${color}`
|
|
701
|
-
]
|
|
702
|
-
];
|
|
703
|
-
const pagination = [
|
|
704
|
-
...dynamicPagination,
|
|
705
|
-
staticPagination
|
|
706
|
-
];
|
|
707
|
-
|
|
708
|
-
const staticPopover = {
|
|
709
|
-
"popover-content": "z-50 w-72 rounded-md border border-base bg-popover p-4 text-popover shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
|
|
710
|
-
};
|
|
711
|
-
const dynamicPopover = [
|
|
712
|
-
// dynamic preset
|
|
713
|
-
];
|
|
714
|
-
const popover = [
|
|
715
|
-
...dynamicPopover,
|
|
716
|
-
staticPopover
|
|
717
|
-
];
|
|
718
|
-
|
|
719
|
-
const staticProgress = {
|
|
720
|
-
// base
|
|
721
|
-
"progress-indeterminate": "absolute bg-brand h-full",
|
|
722
|
-
// components
|
|
723
|
-
"progress-root": "relative h-0.5em w-full overflow-hidden bg-brand/20",
|
|
724
|
-
"progress-indicator": "h-full w-full flex-1 bg-brand transition-all",
|
|
725
|
-
// static
|
|
726
|
-
"progress-white": "bg-inverted",
|
|
727
|
-
"progress-black": "bg-base"
|
|
728
|
-
};
|
|
729
|
-
const dynamicProgress = [
|
|
730
|
-
[/^progress-(.*)$/, ([, body], { theme }) => {
|
|
731
|
-
const color = utils.parseColor(body, theme);
|
|
732
|
-
if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
|
|
733
|
-
return `n-${body}-600 dark:n-${body}-500`;
|
|
734
|
-
}]
|
|
735
|
-
];
|
|
736
|
-
const progress = [
|
|
737
|
-
...dynamicProgress,
|
|
738
|
-
staticProgress
|
|
739
|
-
];
|
|
740
|
-
|
|
741
|
-
const staticRadioGroup = {
|
|
742
|
-
// configurations
|
|
743
|
-
"radio-group": "gap-2 flex flex-wrap",
|
|
744
|
-
"radio-group-orientation-vertical": "flex-col",
|
|
745
|
-
"radio-group-orientation-horizontal": "flex-row",
|
|
746
|
-
// components
|
|
747
|
-
"radio-group-item-root": "flex flex-col",
|
|
748
|
-
"radio-group-item-wrapper": "flex items-center gap-2",
|
|
749
|
-
"radio-group-item": "aspect-square rounded-full border border-brand text-brand shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-base disabled:n-disabled",
|
|
750
|
-
"radio-group-item-label": "text-0.875em font-medium",
|
|
751
|
-
"radio-group-item-description": "text-0.875em text-muted ml-[calc(1.1em+0.5rem)]",
|
|
752
|
-
"radio-group-indicator": "flex items-center justify-center",
|
|
753
|
-
"radio-group-indicator-icon-base": "h-0.875em w-0.875em fill-brand",
|
|
754
|
-
"radio-group-indicator-icon": "i-dot"
|
|
755
|
-
};
|
|
756
|
-
const dynamicRadioGroup = [
|
|
757
|
-
[/^radio-group-(.*)$/, ([, body], { theme }) => {
|
|
758
|
-
const color = utils.parseColor(body, theme);
|
|
759
|
-
if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
|
|
760
|
-
return `n-${body}-600 dark:n-${body}-500`;
|
|
761
|
-
}]
|
|
762
|
-
];
|
|
763
|
-
const radioGroup = [
|
|
764
|
-
...dynamicRadioGroup,
|
|
765
|
-
staticRadioGroup
|
|
766
|
-
];
|
|
767
|
-
|
|
768
|
-
const staticResizable = {
|
|
769
|
-
// config
|
|
770
|
-
"resizable-handle-icon-name": "i-lucide-grip-vertical",
|
|
771
|
-
// base
|
|
772
|
-
"resizable-panel-group": "flex h-full w-full data-[orientation=vertical]:flex-col",
|
|
773
|
-
"resizable-panel": "",
|
|
774
|
-
"resizable-handle": "relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:ring-offset-base focus-visible:outline-none data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",
|
|
775
|
-
"resizable-handle-icon-wrapper": "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",
|
|
776
|
-
"resizable-handle-icon": "square-2.5",
|
|
777
|
-
// static variants
|
|
778
|
-
"resizable-handle-solid-gray": "bg-border focus-visible:ring-foreground/58",
|
|
779
|
-
"resizable-handle-solid-black": "bg-inverted focus-visible:ring-foreground/58",
|
|
780
|
-
"resizable-handle-outline-gray": "ring-1 ring-base focus-visible:ring-foreground/58"
|
|
781
|
-
};
|
|
782
|
-
const dynamicResizable = [
|
|
783
|
-
[/^resizable-handle-solid(-(\S+))?$/, ([, , c = "gray"]) => `bg-${c}-200 dark:bg-${c}-700/58 focus-visible:ring-${c}-200 dark:focus-visible:ring-${c}-700/58`],
|
|
784
|
-
[/^resizable-handle-outline(-(\S+))?$/, ([, , c = "gray"]) => `ring-1 ring-${c}-200 dark:ring-${c}-700/58 focus-visible:ring-${c}-200 dark:focus-visible:ring-${c}-700/58`]
|
|
785
|
-
];
|
|
786
|
-
const resizable = [
|
|
787
|
-
...dynamicResizable,
|
|
788
|
-
staticResizable
|
|
789
|
-
];
|
|
790
|
-
|
|
791
|
-
const staticScrollArea = {
|
|
792
|
-
// configurations
|
|
793
|
-
"scroll-area": "",
|
|
794
|
-
"scroll-area-scrollbar-vertical": "h-full w-0.625em border-l border-l-transparent p-0.0625em",
|
|
795
|
-
"scroll-area-scrollbar-horizontal": "h-0.625em flex-col border-t border-t-transparent p-0.0625em",
|
|
796
|
-
// components
|
|
797
|
-
"scroll-area-root": "relative overflow-hidden",
|
|
798
|
-
"scroll-area-scrollbar": "flex touch-none select-none transition-colors",
|
|
799
|
-
"scroll-area-viewport": "h-full w-full rounded-inherit",
|
|
800
|
-
"scroll-area-scrollbar-thumb": "relative flex-1",
|
|
801
|
-
"scroll-area-gray": "bg-border"
|
|
802
|
-
};
|
|
803
|
-
const dynamicScrollArea = [
|
|
804
|
-
// dynamic preset
|
|
805
|
-
[/^scroll-area(-(\S+))?$/, ([, , c], { theme }) => {
|
|
806
|
-
const parsedColor = presetMini.parseColor(c, theme);
|
|
807
|
-
if ((parsedColor?.cssColor?.type === "rgb" || parsedColor?.cssColor?.type === "rgba") && parsedColor.cssColor.components)
|
|
808
|
-
return `bg-${c}-200 dark:bg-${c}-700/58`;
|
|
809
|
-
return void 0;
|
|
810
|
-
}]
|
|
811
|
-
];
|
|
812
|
-
const scrollArea = [
|
|
813
|
-
...dynamicScrollArea,
|
|
814
|
-
staticScrollArea
|
|
815
|
-
];
|
|
816
|
-
|
|
817
|
-
const staticSelect = {
|
|
818
|
-
// configurations
|
|
819
|
-
"select": "",
|
|
820
|
-
"select-default-variant": "btn-solid-white",
|
|
821
|
-
"select-disabled": "n-disabled",
|
|
822
|
-
"select-scroll": "flex cursor-default items-center justify-center py-1",
|
|
823
|
-
"select-trigger-info-icon": "i-info",
|
|
824
|
-
"select-trigger-error-icon": "i-error",
|
|
825
|
-
"select-trigger-success-icon": "i-success",
|
|
826
|
-
"select-trigger-warning-icon": "i-warning",
|
|
827
|
-
// components
|
|
828
|
-
"select-trigger": "px-0.8571428571428571em w-full [&>span]:truncate",
|
|
829
|
-
"select-trigger-trailing-icon": "i-lucide-chevron-down",
|
|
830
|
-
"select-trigger-trailing": "size-1.1428571428571428em data-[status=error]:text-error data-[status=success]:text-success data-[status=warning]:text-warning data-[status=info]:text-info data-[status=default]:(n-disabled) rtl:mr-auto ltr:ml-auto",
|
|
831
|
-
"select-trigger-leading": "size-1.1428571428571428em",
|
|
832
|
-
"select-value": "text-1em data-[status=error]:text-error-active data-[status=success]:text-success-active data-[status=warning]:text-warning-active data-[status=info]:text-info-active data-[placeholder]:n-disabled",
|
|
833
|
-
"select-content": "relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border border-base bg-popover text-popover shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
834
|
-
"select-content-popper": "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
835
|
-
"select-group": "w-full",
|
|
836
|
-
"select-separator": "-mx-1 my-1 h-px bg-muted",
|
|
837
|
-
"select-item": "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-1em outline-none focus:bg-accent focus:text-accent data-[disabled]:pointer-events-none data-[disabled]:n-disabled",
|
|
838
|
-
"select-item-indicator": "absolute right-2 size-1.1428571428571428em flex items-center justify-center",
|
|
839
|
-
"select-item-indicator-icon": "i-check",
|
|
840
|
-
"select-viewport": "p-1",
|
|
841
|
-
"select-viewport-popper": "h-[--reka-select-trigger-height] w-full min-w-[--reka-select-trigger-width]",
|
|
842
|
-
"select-scroll-up-button": "select-scroll",
|
|
843
|
-
"select-scroll-down-button": "select-scroll",
|
|
844
|
-
"select-scroll-up-button-icon": "i-lucide-chevron-up",
|
|
845
|
-
"select-scroll-down-button-icon": "i-lucide-chevron-down",
|
|
846
|
-
"select-label": "py-1.5 pl-2 text-1em font-semibold",
|
|
847
|
-
// ⚠️ for overriding purposes only
|
|
848
|
-
"select-item-selectItem": ""
|
|
849
|
-
};
|
|
850
|
-
const dynamicSelect = [
|
|
851
|
-
[/^select-([^-]+)-([^-]+)$/, ([, v = "solid", c = "gray"], { theme }) => {
|
|
852
|
-
const parsedColor = presetMini.parseColor(c, theme);
|
|
853
|
-
if ((parsedColor?.cssColor?.type === "rgb" || parsedColor?.cssColor?.type === "rgba") && parsedColor.cssColor.components)
|
|
854
|
-
return `btn-${v}-${c}`;
|
|
855
|
-
return void 0;
|
|
856
|
-
}],
|
|
857
|
-
[/^select-item(-(\S+))?$/, ([, , c = "gray"], { theme }) => {
|
|
858
|
-
const parsedColor = presetMini.parseColor(c || "gray", theme);
|
|
859
|
-
if ((parsedColor?.cssColor?.type === "rgb" || parsedColor?.cssColor?.type === "rgba") && parsedColor.cssColor.components)
|
|
860
|
-
return `focus:bg-${c || "gray"}-100 focus:text-${c || "gray"}-800 dark:focus:bg-${c || "gray"}-800 dark:focus:text-${c || "gray"}-100`;
|
|
861
|
-
return void 0;
|
|
862
|
-
}]
|
|
863
|
-
];
|
|
864
|
-
const select = [
|
|
865
|
-
...dynamicSelect,
|
|
866
|
-
staticSelect
|
|
867
|
-
];
|
|
868
|
-
|
|
869
|
-
const staticSeparator = {
|
|
870
|
-
// base
|
|
871
|
-
"separator": "text-md shrink-0 relative",
|
|
872
|
-
"separator-default-variant": "separator-solid-gray",
|
|
873
|
-
"separator-content": "text-0.75em text-muted bg-base absolute flex justify-center items-center",
|
|
874
|
-
// orientation states
|
|
875
|
-
"separator-horizontal": "h-px my-4 w-full border-t-0.0625em",
|
|
876
|
-
"separator-vertical": "w-px mx-4 h-full border-l-0.0625em",
|
|
877
|
-
"separator-content-horizontal": "h-1px py-1 px-2",
|
|
878
|
-
"separator-content-vertical": "w-1px px-1 py-2",
|
|
879
|
-
// horizontal positions
|
|
880
|
-
"separator-position-left": "left-6 top-1/2 -translate-y-1/2",
|
|
881
|
-
"separator-position-right": "right-6 top-1/2 -translate-y-1/2",
|
|
882
|
-
"separator-position-center": "left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2",
|
|
883
|
-
// vertical positions
|
|
884
|
-
"separator-position-bottom": "bottom-4 left-1/2 -translate-x-1/2",
|
|
885
|
-
"separator-position-top": "top-4 left-1/2 -translate-x-1/2",
|
|
886
|
-
// static variants
|
|
887
|
-
"separator-solid-gray": "border-base"
|
|
888
|
-
};
|
|
889
|
-
const dynamicSeparator = [
|
|
890
|
-
// dynamic variants
|
|
891
|
-
[/^separator-solid(-(\S+))?$/, ([, , c = "gray"]) => `border-solid border-${c}-200 dark:border-${c}-700/58`],
|
|
892
|
-
[/^separator-dashed(-(\S+))?$/, ([, , c = "gray"]) => `border-dashed border-${c}-200 dark:border-${c}-700/58`],
|
|
893
|
-
[/^separator-dotted(-(\S+))?$/, ([, , c = "gray"]) => `border-dotted border-${c}-200 dark:border-${c}-700/58`]
|
|
894
|
-
];
|
|
895
|
-
const separator = [
|
|
896
|
-
...dynamicSeparator,
|
|
897
|
-
staticSeparator
|
|
898
|
-
];
|
|
899
|
-
|
|
900
|
-
const staticSheet = {
|
|
901
|
-
// base
|
|
902
|
-
"sheet": "",
|
|
903
|
-
// sub components
|
|
904
|
-
"sheet-content": "fixed z-50 gap-4 bg-base p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
905
|
-
"sheet-portal": "",
|
|
906
|
-
"sheet-overlay": "fixed inset-0 z-50 data-[state=closed]:animate-out data-[state=open]:animate-in bg-black/80 data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
907
|
-
"sheet-close": "absolute right-4 top-4",
|
|
908
|
-
"sheet-description": "text-sm text-muted",
|
|
909
|
-
"sheet-footer": "flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",
|
|
910
|
-
"sheet-header": "flex flex-col gap-y-2 text-center sm:text-left",
|
|
911
|
-
"sheet-title": "text-lg font-semibold text-base",
|
|
912
|
-
// static variants
|
|
913
|
-
"sheet-top": "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
914
|
-
"sheet-right": "inset-y-0 right-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
|
|
915
|
-
"sheet-bottom": "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
916
|
-
"sheet-left": "inset-y-0 left-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm"
|
|
917
|
-
};
|
|
918
|
-
const dynamicSheet = [
|
|
919
|
-
// dynamic preset
|
|
920
|
-
];
|
|
921
|
-
const sheet = [
|
|
922
|
-
...dynamicSheet,
|
|
923
|
-
staticSheet
|
|
924
|
-
];
|
|
925
|
-
|
|
926
|
-
const staticSidebar = {
|
|
927
|
-
// base
|
|
928
|
-
"sidebar": "",
|
|
929
|
-
// mobile (sheet)
|
|
930
|
-
"sidebar-mobile": "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
931
|
-
"sidebar-mobile-inner": "h-full w-full flex flex-col",
|
|
932
|
-
// collapsible variants
|
|
933
|
-
"sidebar-collapsible-none": "flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
|
|
934
|
-
// desktop container
|
|
935
|
-
"sidebar-desktop": "hidden md:block",
|
|
936
|
-
"sidebar-desktop-inner": "h-full w-full flex flex-col bg-sidebar text-sidebar-foreground group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow",
|
|
937
|
-
// gap handling
|
|
938
|
-
"sidebar-desktop-gap": "duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear group-data-[collapsible=offcanvas]:w-0 group-data-[side=right]:rotate-180",
|
|
939
|
-
"sidebar-desktop-gap-floating": "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_1rem)]",
|
|
940
|
-
"sidebar-desktop-gap-default": "group-data-[collapsible=icon]:w-[--sidebar-width-icon]",
|
|
941
|
-
// positioning
|
|
942
|
-
"sidebar-desktop-position": "duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",
|
|
943
|
-
"sidebar-desktop-position-left": "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]",
|
|
944
|
-
"sidebar-desktop-position-right": "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
945
|
-
// padding variations
|
|
946
|
-
"sidebar-desktop-padding-floating": "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_1rem_+_2px)]",
|
|
947
|
-
"sidebar-desktop-padding-default": "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
948
|
-
// subcomponents
|
|
949
|
-
"sidebar-provider": "flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
950
|
-
"sidebar-content": "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
951
|
-
"sidebar-header": "flex flex-col gap-2 p-2",
|
|
952
|
-
"sidebar-group": "relative flex w-full min-w-0 flex-col p-2",
|
|
953
|
-
"sidebar-group-action": "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0 after:absolute after:-inset-2 after:md:hidden group-data-[collapsible=icon]:hidden",
|
|
954
|
-
"sidebar-group-content": "w-full text-sm",
|
|
955
|
-
"sidebar-group-label": "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] ease-linear focus-visible:ring-2 [&>span[icon-base]]:square-4 [&>svg]:shrink-0",
|
|
956
|
-
"sidebar-input": "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
957
|
-
"sidebar-inset": "relative flex min-h-svh flex-1 flex-col bg-background data-[variant=inset]:min-h-[calc(100svh-1rem)] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
958
|
-
"sidebar-menu": "flex w-full min-w-0 flex-col gap-1",
|
|
959
|
-
"sidebar-menu-action": "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu_button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0 after:absolute after:-inset-2 after:md:hidden peer-data-[size=sm]/menu_button:top-1 peer-data-[size=default]/menu_button:top-1.5 peer-data-[size=lg]/menu_button:top-2.5 group-data-[collapsible=icon]:hidden",
|
|
960
|
-
"sidebar-menu-action-show-on-hover": "group-focus-within/menu_item:opacity-100 group-hover/menu_item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu_button:text-sidebar-accent-foreground md:opacity-0",
|
|
961
|
-
"sidebar-menu-skeleton": "rounded-md h-8 flex gap-2 px-2 items-center",
|
|
962
|
-
"sidebar-separator": "mx-2 w-auto bg-sidebar-border",
|
|
963
|
-
"sidebar-menu-item": "relative",
|
|
964
|
-
"sidebar-menu-sub": "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",
|
|
965
|
-
"sidebar-menu-sub-item": "",
|
|
966
|
-
"sidebar-rail": "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex [[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize [[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar [[data-side=left][data-collapsible=offcanvas]_&]:-right-2 [[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
967
|
-
"sidebar-menu-badge": "absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none peer-hover/menu_button:text-sidebar-accent-foreground peer-data-[active=true]/menu_button:text-sidebar-accent-foreground peer-data-[size=sm]/menu_button:top-1 peer-data-[size=default]/menu_button:top-1.5 peer-data-[size=lg]/menu_button:top-2.5 group-data-[collapsible=icon]:hidden",
|
|
968
|
-
"sidebar-footer": "flex flex-col gap-2 p-2",
|
|
969
|
-
// TODO: Add these to the preset
|
|
970
|
-
"sidebar-menu-button": "",
|
|
971
|
-
"sidebar-menu-button-child": "",
|
|
972
|
-
"sidebar-menu-sub-button": ""
|
|
973
|
-
};
|
|
974
|
-
const dynamicSidebar = [
|
|
975
|
-
// dynamic preset
|
|
976
|
-
];
|
|
977
|
-
const sidebar = [
|
|
978
|
-
...dynamicSidebar,
|
|
979
|
-
staticSidebar
|
|
980
|
-
];
|
|
981
|
-
|
|
982
|
-
const staticSkeleton = {
|
|
983
|
-
// base
|
|
984
|
-
skeleton: "skeleton-gray text-md animate-pulse rounded-md w-full h-0.5em bg-brand"
|
|
985
|
-
};
|
|
986
|
-
const dynamicSkeleton = [
|
|
987
|
-
[/^skeleton-(.*)$/, ([, body], { theme }) => {
|
|
988
|
-
const color = utils.parseColor(body, theme);
|
|
989
|
-
if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
|
|
990
|
-
return `n-${body}-100 dark:n-${body}-800`;
|
|
991
|
-
}]
|
|
992
|
-
];
|
|
993
|
-
const skeleton = [
|
|
994
|
-
...dynamicSkeleton,
|
|
995
|
-
staticSkeleton
|
|
996
|
-
];
|
|
997
|
-
|
|
998
|
-
const staticSlider = {
|
|
999
|
-
// configurations
|
|
1000
|
-
"slider-disabled": "n-disabled",
|
|
1001
|
-
"slider-root-vertical": "flex-col w-1em h-full",
|
|
1002
|
-
"slider-track-vertical": "w-0.5em h-full",
|
|
1003
|
-
"slider-range-vertical": "w-full",
|
|
1004
|
-
"slider-thumb-vertical": "w-1.25em h-1.25em",
|
|
1005
|
-
// components
|
|
1006
|
-
"slider-root": "relative flex w-full touch-none select-none items-center",
|
|
1007
|
-
"slider-track": "h-0.5em relative w-full grow overflow-hidden rounded-full bg-muted",
|
|
1008
|
-
"slider-range": "absolute h-full bg-brand",
|
|
1009
|
-
"slider-thumb": "w-1.25em h-1.25em block border-2 border-brand rounded-full bg-base focus-visible:ring-base ring-offset-base transition-colors disabled:slider-disabled focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
1010
|
-
"slider-accent": "n-gray-300 dark:n-gray-800"
|
|
1011
|
-
};
|
|
1012
|
-
const dynamicSlider = [
|
|
1013
|
-
[/^slider-(.*)$/, ([, body], { theme }) => {
|
|
1014
|
-
const color = utils.parseColor(body, theme);
|
|
1015
|
-
if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
|
|
1016
|
-
return `n-${body}-600 dark:n-${body}-500`;
|
|
1017
|
-
}]
|
|
1018
|
-
];
|
|
1019
|
-
const slider = [
|
|
1020
|
-
...dynamicSlider,
|
|
1021
|
-
staticSlider
|
|
1022
|
-
];
|
|
1023
|
-
|
|
1024
|
-
const staticSwitch = {
|
|
1025
|
-
// base
|
|
1026
|
-
"switch": "bg-brand switch-focus h-1.25em w-2.25em switch-disabled inline-flex shrink-0 cursor-pointer items-center border-2 border-transparent rounded-full shadow-sm",
|
|
1027
|
-
"switch-disabled": "data-[disabled]:n-disabled",
|
|
1028
|
-
"switch-focus": "focus-visible:ring-brand focus-visible:ring-offset-base transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
1029
|
-
// thumb
|
|
1030
|
-
"switch-thumb": "square-1em flex items-center justify-center absolute pointer-events-none block border border-base rounded-full bg-base shadow-lg ring-0 transition-transform",
|
|
1031
|
-
"switch-thumb-checked": "translate-x-1.01em",
|
|
1032
|
-
"switch-thumb-unchecked": "translate-x-0.03em",
|
|
1033
|
-
// icon
|
|
1034
|
-
"switch-icon": "text-0.7em",
|
|
1035
|
-
"switch-icon-unchecked": "text-muted",
|
|
1036
|
-
"switch-icon-checked": "text-muted",
|
|
1037
|
-
// loading
|
|
1038
|
-
"switch-loading-icon": "text-gray animate-spin text-0.8em",
|
|
1039
|
-
"switch-loading-icon-name": "i-loading"
|
|
1040
|
-
};
|
|
1041
|
-
const dynamicSwitch = [
|
|
1042
|
-
[
|
|
1043
|
-
/^switch-checked(?:-([^-]+))?(?:-([^-]+))?$/,
|
|
1044
|
-
([, color = "primary"], { theme }) => {
|
|
1045
|
-
const parsedColor = presetMini.parseColor(color, theme);
|
|
1046
|
-
if ((parsedColor?.cssColor?.type === "rgb" || parsedColor?.cssColor?.type === "rgba") && parsedColor.cssColor.components)
|
|
1047
|
-
return `data-[state=checked]:n-${color}-600 dark:data-[state=checked]:n-${color}-500`;
|
|
1048
|
-
}
|
|
1049
|
-
],
|
|
1050
|
-
[
|
|
1051
|
-
/^switch-unchecked(?:-([^-]+))?(?:-([^-]+))?$/,
|
|
1052
|
-
([, color = "gray"], { theme }) => {
|
|
1053
|
-
const parsedColor = presetMini.parseColor(color, theme);
|
|
1054
|
-
if ((parsedColor?.cssColor?.type === "rgb" || parsedColor?.cssColor?.type === "rgba") && parsedColor.cssColor.components)
|
|
1055
|
-
return `data-[state=unchecked]:n-${color}-200 dark:data-[state=unchecked]:n-${color}-700/58`;
|
|
1056
|
-
}
|
|
1057
|
-
]
|
|
1058
|
-
];
|
|
1059
|
-
const _switch = [
|
|
1060
|
-
...dynamicSwitch,
|
|
1061
|
-
staticSwitch
|
|
1062
|
-
];
|
|
1063
|
-
|
|
1064
|
-
const staticTable = {
|
|
1065
|
-
// config
|
|
1066
|
-
"table-default-variant": "table-solid-gray",
|
|
1067
|
-
// table-root
|
|
1068
|
-
"table-root": "relative w-full overflow-x-auto overflow-y-hidden border border-base rounded-md",
|
|
1069
|
-
"table": "w-full caption-bottom text-sm",
|
|
1070
|
-
"table-body": "[&_tr:last-child]:border-0",
|
|
1071
|
-
"table-caption": "mt-4 text-sm text-muted",
|
|
1072
|
-
// table-head
|
|
1073
|
-
"table-head": "h-12 px-4 text-left align-middle font-medium text-muted [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-0.5",
|
|
1074
|
-
"table-head-pinned": "sticky bg-base",
|
|
1075
|
-
"table-head-pinned-left": "left-0",
|
|
1076
|
-
"table-head-pinned-right": "right-0",
|
|
1077
|
-
// table-header
|
|
1078
|
-
"table-header": "[&_tr]:border-b [&_tr]:border-base",
|
|
1079
|
-
// table-row
|
|
1080
|
-
"table-row": "border-b border-base transition-colors hover:bg-muted data-[filter=true]:hover:bg-base data-[state=selected]:bg-muted",
|
|
1081
|
-
// table-cell
|
|
1082
|
-
"table-cell": "p-4 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-0.5",
|
|
1083
|
-
"table-cell-pinned": "sticky bg-base",
|
|
1084
|
-
"table-cell-pinned-left": "left-0",
|
|
1085
|
-
"table-cell-pinned-right": "right-0",
|
|
1086
|
-
// table-empty
|
|
1087
|
-
"table-empty-row": "",
|
|
1088
|
-
"table-empty-cell": "p-4 whitespace-nowrap align-middle text-sm text-muted bg-base",
|
|
1089
|
-
"table-empty": "flex items-center justify-center py-10",
|
|
1090
|
-
// table-loading
|
|
1091
|
-
"table-loading-icon": "animate-spin text-lg",
|
|
1092
|
-
// TODO: to add
|
|
1093
|
-
"table-loading-icon-name": "i-lucide-refresh-ccw",
|
|
1094
|
-
// TODO: to add
|
|
1095
|
-
"table-loading-row": "data-[loading=true]:border-0 absolute inset-x-0 -mt-1.5px",
|
|
1096
|
-
"table-loading-cell": "",
|
|
1097
|
-
"table-loading": "absolute inset-x-0 overflow-hidden p-0",
|
|
1098
|
-
// table-footer
|
|
1099
|
-
"table-footer": "border-t border-base bg-muted font-medium [&>tr]:last:border-b-0"
|
|
1100
|
-
};
|
|
1101
|
-
const dynamicTable = [];
|
|
1102
|
-
const table = [
|
|
1103
|
-
...dynamicTable,
|
|
1104
|
-
staticTable
|
|
1105
|
-
];
|
|
1106
|
-
|
|
1107
|
-
const staticTabs = {
|
|
1108
|
-
// configurations
|
|
1109
|
-
"tabs": "transition-colors duration-200 ease-out",
|
|
1110
|
-
"tabs-default-variant": "tabs-soft-black",
|
|
1111
|
-
"tabs-disabled": "n-disabled",
|
|
1112
|
-
// components
|
|
1113
|
-
"tabs-root": "flex flex-col w-full",
|
|
1114
|
-
"tabs-trigger": "w-full focus-visible:z-10",
|
|
1115
|
-
"tabs-list": "flex bg-muted items-center justify-center rounded-md p-1 w-full",
|
|
1116
|
-
"tabs-content": "mt-4 text-base"
|
|
1117
|
-
};
|
|
1118
|
-
const dynamicTabs = [
|
|
1119
|
-
[/^tabs-([^-]+)-([^-]+)$/, ([, v = "solid", c = "primary"]) => `data-[state=active]:btn-${v}-${c}`]
|
|
1120
|
-
];
|
|
1121
|
-
const tabs = [
|
|
1122
|
-
...dynamicTabs,
|
|
1123
|
-
staticTabs
|
|
1124
|
-
];
|
|
1125
|
-
|
|
1126
|
-
const staticToast = {
|
|
1127
|
-
// config
|
|
1128
|
-
"toast": "pointer-events-auto relative flex w-full space-x-2 justify-end overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all ",
|
|
1129
|
-
"toast-viewport": "fixed top-0 z-100 flex max-h-screen gap-y-4 w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-420px",
|
|
1130
|
-
"toast-wrapper": "w-0 flex flex-1 flex-col gap-2",
|
|
1131
|
-
"toast-title": "text-sm font-semibold [&+div]:text-xs",
|
|
1132
|
-
"toast-description": "text-sm opacity-90",
|
|
1133
|
-
"toast-leading": "square-5",
|
|
1134
|
-
"toast-close": "bg-transparent flex items-center justify-center absolute right-1 top-1 rounded-md p-1 text-brand/80 opacity-0 transition-opacity hover:text-brand focus:opacity-100 focus:ring-1 focus:ring-brand/80 focus:outline-none group-hover:opacity-100",
|
|
1135
|
-
"toast-close-icon": "i-close",
|
|
1136
|
-
"toast-close-icon-base": "h-1em w-1em",
|
|
1137
|
-
"toast-info": "grid gap-1",
|
|
1138
|
-
"toast-actions": "flex shrink-0 gap-1.5",
|
|
1139
|
-
"toast-progress": "h-1 rounded-none"
|
|
1140
|
-
};
|
|
1141
|
-
const dynamicToast = [
|
|
1142
|
-
// dynamic variants
|
|
1143
|
-
[/^toast-solid(-(\S+))?$/, ([, , c = "primary"]) => `alert-solid-${c}`],
|
|
1144
|
-
[/^toast-soft(-(\S+))?$/, ([, , c = "primary"]) => `alert-soft-${c}`],
|
|
1145
|
-
[/^toast-outline(-(\S+))?$/, ([, , c = "primary"]) => `alert-outline-${c} bg-base`],
|
|
1146
|
-
[/^toast-border(-(\S+))?$/, ([, , c = "primary"]) => `alert-border-${c}`]
|
|
1147
|
-
];
|
|
1148
|
-
const toast = [
|
|
1149
|
-
...dynamicToast,
|
|
1150
|
-
staticToast
|
|
1151
|
-
];
|
|
1152
|
-
|
|
1153
|
-
const staticToggle = {
|
|
1154
|
-
// configurations
|
|
1155
|
-
toggle: ""
|
|
1156
|
-
};
|
|
1157
|
-
const dynamicToggle = [
|
|
1158
|
-
[
|
|
1159
|
-
/^toggle-on(?:-([^-]+))?(?:-([^-]+))?$/,
|
|
1160
|
-
([, variant = "soft", color = "accent"]) => `data-[state=on]:btn-${variant}-${color}`
|
|
1161
|
-
],
|
|
1162
|
-
[
|
|
1163
|
-
/^toggle-off(?:-([^-]+))?(?:-([^-]+))?$/,
|
|
1164
|
-
([, variant = "ghost", color = "muted"]) => `data-[state=off]:btn-${variant}-${color}`
|
|
1165
|
-
]
|
|
1166
|
-
];
|
|
1167
|
-
const toggle = [
|
|
1168
|
-
...dynamicToggle,
|
|
1169
|
-
staticToggle
|
|
1170
|
-
];
|
|
1171
|
-
|
|
1172
|
-
const staticTooltip = {
|
|
1173
|
-
"tooltip-content": "z-50 overflow-hidden rounded-md px-0.75em py-0.375em text-xs shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1174
|
-
"tooltip-white": "border border-base bg-popover text-popover",
|
|
1175
|
-
"tooltip-black": "border border-foreground bg-popover-foreground text-popover-foreground"
|
|
1176
|
-
};
|
|
1177
|
-
const dynamicTooltip = [
|
|
1178
|
-
[/^tooltip-(.*)$/, ([, c], { theme }) => {
|
|
1179
|
-
const color = utils.parseColor(c, theme);
|
|
1180
|
-
if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
|
|
1181
|
-
return `bg-${c}-100 border-${c}-50 text-${c}-800 dark:bg-${c}-800 dark:border-${c}-800 dark:text-${c}-100`;
|
|
1182
|
-
}]
|
|
1183
|
-
];
|
|
1184
|
-
const tooltip = [
|
|
1185
|
-
...dynamicTooltip,
|
|
1186
|
-
staticTooltip
|
|
1187
|
-
];
|
|
1188
|
-
|
|
1189
|
-
const shortcuts = [
|
|
1190
|
-
...general,
|
|
1191
|
-
...breadcrumb,
|
|
1192
|
-
...accordion,
|
|
1193
|
-
...btn,
|
|
1194
|
-
...dialog,
|
|
1195
|
-
...formGroup,
|
|
1196
|
-
...input,
|
|
1197
|
-
...icon,
|
|
1198
|
-
..._switch,
|
|
1199
|
-
...alert,
|
|
1200
|
-
...badge,
|
|
1201
|
-
...avatarGroup,
|
|
1202
|
-
...avatar,
|
|
1203
|
-
...indicator,
|
|
1204
|
-
...kbd,
|
|
1205
|
-
...link,
|
|
1206
|
-
...checkbox,
|
|
1207
|
-
...slider,
|
|
1208
|
-
...progress,
|
|
1209
|
-
...skeleton,
|
|
1210
|
-
...tabs,
|
|
1211
|
-
...select,
|
|
1212
|
-
...separator,
|
|
1213
|
-
...card,
|
|
1214
|
-
...table,
|
|
1215
|
-
...dropdowMenu,
|
|
1216
|
-
...label,
|
|
1217
|
-
...popover,
|
|
1218
|
-
...tooltip,
|
|
1219
|
-
...pagination,
|
|
1220
|
-
...toast,
|
|
1221
|
-
...toggle,
|
|
1222
|
-
...collapsible,
|
|
1223
|
-
...radioGroup,
|
|
1224
|
-
...form,
|
|
1225
|
-
...sheet,
|
|
1226
|
-
...scrollArea,
|
|
1227
|
-
...navigationMenu,
|
|
1228
|
-
...sidebar,
|
|
1229
|
-
...aspectRatio,
|
|
1230
|
-
...resizable,
|
|
1231
|
-
...alertDialog,
|
|
1232
|
-
...combobox
|
|
1233
|
-
];
|
|
1234
|
-
|
|
1235
|
-
exports.shortcuts = shortcuts;
|