@nuxt/ui 3.0.0-alpha.12 → 3.0.0-alpha.13
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/ui/accordion.ts +2 -2
- package/.nuxt/ui/alert.ts +46 -36
- package/.nuxt/ui/avatar-group.ts +1 -1
- package/.nuxt/ui/avatar.ts +3 -3
- package/.nuxt/ui/badge.ts +37 -28
- package/.nuxt/ui/breadcrumb.ts +5 -5
- package/.nuxt/ui/button.ts +42 -42
- package/.nuxt/ui/calendar.ts +15 -15
- package/.nuxt/ui/card.ts +27 -1
- package/.nuxt/ui/carousel.ts +2 -2
- package/.nuxt/ui/checkbox.ts +18 -18
- package/.nuxt/ui/chip.ts +8 -8
- package/.nuxt/ui/color-picker.ts +2 -2
- package/.nuxt/ui/command-palette.ts +12 -12
- package/.nuxt/ui/container.ts +1 -1
- package/.nuxt/ui/context-menu.ts +32 -32
- package/.nuxt/ui/drawer.ts +72 -11
- package/.nuxt/ui/dropdown-menu.ts +33 -33
- package/.nuxt/ui/form-field.ts +6 -6
- package/.nuxt/ui/input-menu.ts +41 -41
- package/.nuxt/ui/input-number.ts +20 -20
- package/.nuxt/ui/input.ts +23 -23
- package/.nuxt/ui/kbd.ts +4 -4
- package/.nuxt/ui/link.ts +3 -3
- package/.nuxt/ui/modal.ts +5 -5
- package/.nuxt/ui/navigation-menu.ts +77 -78
- package/.nuxt/ui/pin-input.ts +20 -20
- package/.nuxt/ui/popover.ts +2 -2
- package/.nuxt/ui/progress.ts +17 -17
- package/.nuxt/ui/radio-group.ts +20 -20
- package/.nuxt/ui/select-menu.ts +33 -32
- package/.nuxt/ui/select.ts +31 -31
- package/.nuxt/ui/separator.ts +8 -8
- package/.nuxt/ui/skeleton.ts +1 -1
- package/.nuxt/ui/slideover.ts +4 -4
- package/.nuxt/ui/slider.ts +16 -16
- package/.nuxt/ui/stepper.ts +18 -18
- package/.nuxt/ui/switch.ts +20 -20
- package/.nuxt/ui/table.ts +16 -16
- package/.nuxt/ui/tabs.ts +33 -33
- package/.nuxt/ui/textarea.ts +23 -23
- package/.nuxt/ui/toast.ts +42 -32
- package/.nuxt/ui/toaster.ts +4 -4
- package/.nuxt/ui/tooltip.ts +2 -2
- package/.nuxt/ui.css +90 -0
- package/README.md +2 -2
- package/cli/package.json +1 -1
- package/cli/templates.mjs +1 -1
- package/dist/client/devtools/200.html +1 -1
- package/dist/client/devtools/404.html +1 -1
- package/dist/client/devtools/_nuxt/CG6Dc4jp.js +1 -0
- package/dist/client/devtools/_nuxt/{DYuJNiSW.js → DrNJgD08.js} +1 -1
- package/dist/client/devtools/_nuxt/{DLmPhbaq.js → ElqrUh1r.js} +1 -1
- package/dist/client/devtools/_nuxt/builds/latest.json +1 -1
- package/dist/client/devtools/_nuxt/builds/meta/255c8d0b-7281-4d74-b4b6-ec96e6721aa0.json +1 -0
- package/dist/client/devtools/_nuxt/entry.Hn8drx4g.css +1 -0
- package/dist/client/devtools/_nuxt/error-404.Dew7w9Ee.css +1 -0
- package/dist/client/devtools/_nuxt/error-500.Dep59i31.css +1 -0
- package/dist/client/devtools/_nuxt/mC2e7kOs.js +57 -0
- package/dist/client/devtools/index.html +1 -1
- package/dist/devtools/runtime/examples/CardExample.vue +3 -3
- package/dist/devtools/runtime/examples/CollapsibleExample.vue +1 -1
- package/dist/devtools/runtime/examples/ContainerExample.vue +1 -1
- package/dist/devtools/runtime/examples/ContextMenuExample.vue +1 -1
- package/dist/devtools/runtime/examples/PopoverExample.vue +1 -1
- package/dist/devtools/runtime/examples/TooltipExample.vue +1 -1
- package/dist/module.cjs +2 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -1
- package/dist/runtime/components/Alert.vue +13 -10
- package/dist/runtime/components/App.vue +3 -3
- package/dist/runtime/components/Avatar.vue +1 -1
- package/dist/runtime/components/Badge.vue +5 -1
- package/dist/runtime/components/Calendar.vue +2 -1
- package/dist/runtime/components/Card.vue +6 -2
- package/dist/runtime/components/CommandPalette.vue +46 -39
- package/dist/runtime/components/ContextMenu.vue +8 -0
- package/dist/runtime/components/ContextMenuContent.vue +4 -2
- package/dist/runtime/components/Drawer.vue +7 -1
- package/dist/runtime/components/DropdownMenu.vue +8 -0
- package/dist/runtime/components/DropdownMenuContent.vue +4 -2
- package/dist/runtime/components/InputNumber.vue +3 -2
- package/dist/runtime/components/Modal.vue +15 -1
- package/dist/runtime/components/NavigationMenu.vue +31 -11
- package/dist/runtime/components/SelectMenu.vue +62 -60
- package/dist/runtime/components/Slideover.vue +15 -1
- package/dist/runtime/components/Stepper.vue +1 -1
- package/dist/runtime/components/Table.vue +94 -16
- package/dist/runtime/components/Textarea.vue +2 -1
- package/dist/runtime/components/Toast.vue +26 -14
- package/dist/runtime/components/Toaster.vue +2 -2
- package/dist/runtime/composables/useToast.d.ts +5 -4
- package/dist/runtime/composables/useToast.js +2 -2
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/locale/az.d.ts +2 -0
- package/dist/runtime/locale/az.js +54 -0
- package/dist/runtime/locale/bn.d.ts +2 -0
- package/dist/runtime/locale/bn.js +54 -0
- package/dist/runtime/locale/index.d.ts +3 -0
- package/dist/runtime/locale/index.js +3 -0
- package/dist/runtime/plugins/colors.js +1 -1
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/utils.d.ts +5 -0
- package/dist/runtime/vue/components/Link.vue +75 -16
- package/dist/shared/{ui.ClMXjgLK.cjs → ui.C5FzRWM5.cjs} +471 -364
- package/dist/shared/{ui.CENZ17mM.mjs → ui.DCZM2pl8.mjs} +467 -364
- package/dist/unplugin.cjs +44 -20
- package/dist/unplugin.d.cts +10 -0
- package/dist/unplugin.d.mts +10 -0
- package/dist/unplugin.d.ts +10 -0
- package/dist/unplugin.mjs +43 -19
- package/dist/vite.cjs +3 -2
- package/dist/vite.d.cts +2 -0
- package/dist/vite.d.mts +2 -0
- package/dist/vite.d.ts +2 -0
- package/dist/vite.mjs +3 -2
- package/package.json +60 -33
- package/dist/client/devtools/_nuxt/CgoQwOTV.js +0 -57
- package/dist/client/devtools/_nuxt/builds/meta/3184ffe2-7577-4441-af98-fe6e81c30e3a.json +0 -1
- package/dist/client/devtools/_nuxt/entry.ChJczkiN.css +0 -1
- package/dist/client/devtools/_nuxt/error-404.DyY3rYaL.css +0 -1
- package/dist/client/devtools/_nuxt/error-500.D_1PCaJh.css +0 -1
|
@@ -3,6 +3,7 @@ import 'node:url';
|
|
|
3
3
|
import { kebabCase } from 'scule';
|
|
4
4
|
import { addTypeTemplate, addTemplate } from '@nuxt/kit';
|
|
5
5
|
import { defuFn, defu } from 'defu';
|
|
6
|
+
import colors from 'tailwindcss/colors';
|
|
6
7
|
|
|
7
8
|
const icons = {
|
|
8
9
|
arrowLeft: "i-lucide-arrow-left",
|
|
@@ -54,9 +55,9 @@ const resolveColors = (colors) => {
|
|
|
54
55
|
const accordion = {
|
|
55
56
|
slots: {
|
|
56
57
|
root: "w-full",
|
|
57
|
-
item: "border-b border-
|
|
58
|
+
item: "border-b border-(--ui-border) last:border-b-0",
|
|
58
59
|
header: "flex",
|
|
59
|
-
trigger: "group flex-1 flex items-center gap-1.5 font-medium text-sm py-3.5 focus-visible:outline-
|
|
60
|
+
trigger: "group flex-1 flex items-center gap-1.5 font-medium text-sm py-3.5 focus-visible:outline-(--ui-primary) min-w-0",
|
|
60
61
|
content: "data-[state=open]:animate-[accordion-down_200ms_ease-out] data-[state=closed]:animate-[accordion-up_200ms_ease-out] overflow-hidden focus:outline-none",
|
|
61
62
|
body: "text-sm pb-3.5",
|
|
62
63
|
leadingIcon: "shrink-0 size-5",
|
|
@@ -75,14 +76,14 @@ const accordion = {
|
|
|
75
76
|
const alert = (options) => ({
|
|
76
77
|
slots: {
|
|
77
78
|
root: "relative overflow-hidden w-full rounded-[calc(var(--ui-radius)*2)] p-4 flex gap-2.5",
|
|
78
|
-
wrapper: "min-w-0 flex-1 flex flex-col
|
|
79
|
+
wrapper: "min-w-0 flex-1 flex flex-col",
|
|
79
80
|
title: "text-sm font-medium",
|
|
80
81
|
description: "text-sm opacity-90",
|
|
81
82
|
icon: "shrink-0 size-5",
|
|
82
83
|
avatar: "shrink-0",
|
|
83
84
|
avatarSize: "2xl",
|
|
84
85
|
actions: "flex flex-wrap gap-1.5 shrink-0",
|
|
85
|
-
close: "p-0
|
|
86
|
+
close: "p-0"
|
|
86
87
|
},
|
|
87
88
|
variants: {
|
|
88
89
|
color: {
|
|
@@ -95,14 +96,19 @@ const alert = (options) => ({
|
|
|
95
96
|
soft: "",
|
|
96
97
|
subtle: ""
|
|
97
98
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
root: "items-start",
|
|
101
|
-
actions: "items-start mt-1"
|
|
102
|
-
},
|
|
103
|
-
false: {
|
|
99
|
+
orientation: {
|
|
100
|
+
horizontal: {
|
|
104
101
|
root: "items-center",
|
|
105
102
|
actions: "items-center"
|
|
103
|
+
},
|
|
104
|
+
vertical: {
|
|
105
|
+
root: "items-start",
|
|
106
|
+
actions: "items-start mt-2.5"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
title: {
|
|
110
|
+
true: {
|
|
111
|
+
description: "mt-1"
|
|
106
112
|
}
|
|
107
113
|
}
|
|
108
114
|
},
|
|
@@ -110,49 +116,49 @@ const alert = (options) => ({
|
|
|
110
116
|
color,
|
|
111
117
|
variant: "solid",
|
|
112
118
|
class: {
|
|
113
|
-
root: `bg-
|
|
119
|
+
root: `bg-(--ui-${color}) text-(--ui-bg)`
|
|
114
120
|
}
|
|
115
121
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
116
122
|
color,
|
|
117
123
|
variant: "outline",
|
|
118
124
|
class: {
|
|
119
|
-
root: `text-
|
|
125
|
+
root: `text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
|
|
120
126
|
}
|
|
121
127
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
122
128
|
color,
|
|
123
129
|
variant: "soft",
|
|
124
130
|
class: {
|
|
125
|
-
root: `bg-
|
|
131
|
+
root: `bg-(--ui-${color})/10 text-(--ui-${color})`
|
|
126
132
|
}
|
|
127
133
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
128
134
|
color,
|
|
129
135
|
variant: "subtle",
|
|
130
136
|
class: {
|
|
131
|
-
root: `bg-
|
|
137
|
+
root: `bg-(--ui-${color})/10 text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
|
|
132
138
|
}
|
|
133
139
|
})), {
|
|
134
140
|
color: "neutral",
|
|
135
141
|
variant: "solid",
|
|
136
142
|
class: {
|
|
137
|
-
root: "text-
|
|
143
|
+
root: "text-(--ui-bg) bg-(--ui-bg-inverted)"
|
|
138
144
|
}
|
|
139
145
|
}, {
|
|
140
146
|
color: "neutral",
|
|
141
147
|
variant: "outline",
|
|
142
148
|
class: {
|
|
143
|
-
root: "text-
|
|
149
|
+
root: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border)"
|
|
144
150
|
}
|
|
145
151
|
}, {
|
|
146
152
|
color: "neutral",
|
|
147
153
|
variant: "soft",
|
|
148
154
|
class: {
|
|
149
|
-
root: "text-
|
|
155
|
+
root: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50"
|
|
150
156
|
}
|
|
151
157
|
}, {
|
|
152
158
|
color: "neutral",
|
|
153
159
|
variant: "subtle",
|
|
154
160
|
class: {
|
|
155
|
-
root: "text-
|
|
161
|
+
root: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50 ring ring-inset ring-(--ui-border-accented)"
|
|
156
162
|
}
|
|
157
163
|
}],
|
|
158
164
|
defaultVariants: {
|
|
@@ -163,10 +169,10 @@ const alert = (options) => ({
|
|
|
163
169
|
|
|
164
170
|
const avatar = {
|
|
165
171
|
slots: {
|
|
166
|
-
root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-
|
|
172
|
+
root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-(--ui-bg-elevated)",
|
|
167
173
|
image: "h-full w-full rounded-[inherit] object-cover data-[error]:hidden",
|
|
168
|
-
fallback: "font-medium leading-none text-
|
|
169
|
-
icon: "text-
|
|
174
|
+
fallback: "font-medium leading-none text-(--ui-text-muted) truncate",
|
|
175
|
+
icon: "text-(--ui-text-muted) shrink-0"
|
|
170
176
|
},
|
|
171
177
|
variants: {
|
|
172
178
|
size: {
|
|
@@ -207,7 +213,7 @@ const avatar = {
|
|
|
207
213
|
const avatarGroup = {
|
|
208
214
|
slots: {
|
|
209
215
|
root: "inline-flex flex-row-reverse justify-end",
|
|
210
|
-
base: "relative rounded-full ring-
|
|
216
|
+
base: "relative rounded-full ring-(--ui-bg) first:me-0"
|
|
211
217
|
},
|
|
212
218
|
variants: {
|
|
213
219
|
size: {
|
|
@@ -245,6 +251,41 @@ const avatarGroup = {
|
|
|
245
251
|
}
|
|
246
252
|
};
|
|
247
253
|
|
|
254
|
+
const buttonGroupVariant = {
|
|
255
|
+
buttonGroup: {
|
|
256
|
+
horizontal: "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
|
|
257
|
+
vertical: "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
const buttonGroupVariantWithRoot = {
|
|
261
|
+
buttonGroup: {
|
|
262
|
+
horizontal: {
|
|
263
|
+
root: "group",
|
|
264
|
+
base: "group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"
|
|
265
|
+
},
|
|
266
|
+
vertical: {
|
|
267
|
+
root: "group",
|
|
268
|
+
base: "group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
const buttonGroup = {
|
|
273
|
+
base: "relative",
|
|
274
|
+
variants: {
|
|
275
|
+
size: {
|
|
276
|
+
xs: "",
|
|
277
|
+
sm: "",
|
|
278
|
+
md: "",
|
|
279
|
+
lg: "",
|
|
280
|
+
xl: ""
|
|
281
|
+
},
|
|
282
|
+
orientation: {
|
|
283
|
+
horizontal: "inline-flex -space-x-px",
|
|
284
|
+
vertical: "flex flex-col -space-y-px"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
248
289
|
const badge = (options) => ({
|
|
249
290
|
slots: {
|
|
250
291
|
base: "font-medium inline-flex items-center",
|
|
@@ -255,6 +296,7 @@ const badge = (options) => ({
|
|
|
255
296
|
trailingIcon: "shrink-0"
|
|
256
297
|
},
|
|
257
298
|
variants: {
|
|
299
|
+
...buttonGroupVariant,
|
|
258
300
|
color: {
|
|
259
301
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
260
302
|
neutral: ""
|
|
@@ -301,35 +343,35 @@ const badge = (options) => ({
|
|
|
301
343
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
302
344
|
color,
|
|
303
345
|
variant: "solid",
|
|
304
|
-
class: `bg-
|
|
346
|
+
class: `bg-(--ui-${color}) text-(--ui-bg)`
|
|
305
347
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
306
348
|
color,
|
|
307
349
|
variant: "outline",
|
|
308
|
-
class: `text-
|
|
350
|
+
class: `text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/50`
|
|
309
351
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
310
352
|
color,
|
|
311
353
|
variant: "soft",
|
|
312
|
-
class: `bg-
|
|
354
|
+
class: `bg-(--ui-${color})/10 text-(--ui-${color})`
|
|
313
355
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
314
356
|
color,
|
|
315
357
|
variant: "subtle",
|
|
316
|
-
class: `bg-
|
|
358
|
+
class: `bg-(--ui-${color})/10 text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
|
|
317
359
|
})), {
|
|
318
360
|
color: "neutral",
|
|
319
361
|
variant: "solid",
|
|
320
|
-
class: "text-
|
|
362
|
+
class: "text-(--ui-bg) bg-(--ui-bg-inverted)"
|
|
321
363
|
}, {
|
|
322
364
|
color: "neutral",
|
|
323
365
|
variant: "outline",
|
|
324
|
-
class: "ring ring-inset ring-
|
|
366
|
+
class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg)"
|
|
325
367
|
}, {
|
|
326
368
|
color: "neutral",
|
|
327
369
|
variant: "soft",
|
|
328
|
-
class: "text-
|
|
370
|
+
class: "text-(--ui-text) bg-(--ui-bg-elevated)"
|
|
329
371
|
}, {
|
|
330
372
|
color: "neutral",
|
|
331
373
|
variant: "subtle",
|
|
332
|
-
class: "ring ring-inset ring-
|
|
374
|
+
class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg-elevated)"
|
|
333
375
|
}],
|
|
334
376
|
defaultVariants: {
|
|
335
377
|
color: "primary",
|
|
@@ -343,21 +385,21 @@ const breadcrumb = (options) => ({
|
|
|
343
385
|
root: "relative min-w-0",
|
|
344
386
|
list: "flex items-center gap-1.5",
|
|
345
387
|
item: "flex min-w-0",
|
|
346
|
-
link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-
|
|
388
|
+
link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-(--ui-primary)",
|
|
347
389
|
linkLeadingIcon: "shrink-0 size-5",
|
|
348
390
|
linkLeadingAvatar: "shrink-0",
|
|
349
391
|
linkLeadingAvatarSize: "2xs",
|
|
350
392
|
linkLabel: "truncate",
|
|
351
393
|
separator: "flex",
|
|
352
|
-
separatorIcon: "shrink-0 size-5 text-
|
|
394
|
+
separatorIcon: "shrink-0 size-5 text-(--ui-text-muted)"
|
|
353
395
|
},
|
|
354
396
|
variants: {
|
|
355
397
|
active: {
|
|
356
398
|
true: {
|
|
357
|
-
link: "text-
|
|
399
|
+
link: "text-(--ui-primary) font-semibold"
|
|
358
400
|
},
|
|
359
401
|
false: {
|
|
360
|
-
link: "text-
|
|
402
|
+
link: "text-(--ui-text-muted) font-medium"
|
|
361
403
|
}
|
|
362
404
|
},
|
|
363
405
|
disabled: {
|
|
@@ -374,46 +416,11 @@ const breadcrumb = (options) => ({
|
|
|
374
416
|
active: false,
|
|
375
417
|
to: true,
|
|
376
418
|
class: {
|
|
377
|
-
link: ["hover:text-
|
|
419
|
+
link: ["hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
378
420
|
}
|
|
379
421
|
}]
|
|
380
422
|
});
|
|
381
423
|
|
|
382
|
-
const buttonGroupVariant = {
|
|
383
|
-
buttonGroup: {
|
|
384
|
-
horizontal: "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
|
|
385
|
-
vertical: "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
const buttonGroupVariantWithRoot = {
|
|
389
|
-
buttonGroup: {
|
|
390
|
-
horizontal: {
|
|
391
|
-
root: "group",
|
|
392
|
-
base: "group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"
|
|
393
|
-
},
|
|
394
|
-
vertical: {
|
|
395
|
-
root: "group",
|
|
396
|
-
base: "group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
};
|
|
400
|
-
const buttonGroup = {
|
|
401
|
-
base: "relative",
|
|
402
|
-
variants: {
|
|
403
|
-
size: {
|
|
404
|
-
xs: "",
|
|
405
|
-
sm: "",
|
|
406
|
-
md: "",
|
|
407
|
-
lg: "",
|
|
408
|
-
xl: ""
|
|
409
|
-
},
|
|
410
|
-
orientation: {
|
|
411
|
-
horizontal: "inline-flex -space-x-px",
|
|
412
|
-
vertical: "flex flex-col -space-y-px"
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
};
|
|
416
|
-
|
|
417
424
|
const button = (options) => ({
|
|
418
425
|
slots: {
|
|
419
426
|
base: ["rounded-[calc(var(--ui-radius)*1.5)] font-medium inline-flex items-center focus:outline-hidden disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75", options.theme.transitions && "transition-colors"],
|
|
@@ -491,51 +498,51 @@ const button = (options) => ({
|
|
|
491
498
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
492
499
|
color,
|
|
493
500
|
variant: "solid",
|
|
494
|
-
class: `text-
|
|
501
|
+
class: `text-(--ui-bg) bg-(--ui-${color}) hover:bg-(--ui-${color})/75 disabled:bg-(--ui-${color}) aria-disabled:bg-(--ui-${color}) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-${color})`
|
|
495
502
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
496
503
|
color,
|
|
497
504
|
variant: "outline",
|
|
498
|
-
class: `ring ring-inset ring-
|
|
505
|
+
class: `ring ring-inset ring-(--ui-${color})/50 text-(--ui-${color}) hover:bg-(--ui-${color})/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-(--ui-${color})`
|
|
499
506
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
500
507
|
color,
|
|
501
508
|
variant: "soft",
|
|
502
|
-
class: `text-
|
|
509
|
+
class: `text-(--ui-${color}) bg-(--ui-${color})/10 hover:bg-(--ui-${color})/15 focus-visible:bg-(--ui-${color})/15 disabled:bg-(--ui-${color})/10 aria-disabled:bg-(--ui-${color})/10`
|
|
503
510
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
504
511
|
color,
|
|
505
512
|
variant: "subtle",
|
|
506
|
-
class: `text-
|
|
513
|
+
class: `text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25 bg-(--ui-${color})/10 hover:bg-(--ui-${color})/15 disabled:bg-(--ui-${color})/10 aria-disabled:bg-(--ui-${color})/10 focus-visible:ring-2 focus-visible:ring-(--ui-${color})`
|
|
507
514
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
508
515
|
color,
|
|
509
516
|
variant: "ghost",
|
|
510
|
-
class: `text-
|
|
517
|
+
class: `text-(--ui-${color}) hover:bg-(--ui-${color})/10 focus-visible:bg-(--ui-${color})/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent`
|
|
511
518
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
512
519
|
color,
|
|
513
520
|
variant: "link",
|
|
514
|
-
class: `text-
|
|
521
|
+
class: `text-(--ui-${color}) hover:text-(--ui-${color})/75 disabled:text-(--ui-${color}) aria-disabled:text-(--ui-${color}) focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
|
|
515
522
|
})), {
|
|
516
523
|
color: "neutral",
|
|
517
524
|
variant: "solid",
|
|
518
|
-
class: "text-
|
|
525
|
+
class: "text-(--ui-bg) bg-(--ui-bg-inverted) hover:bg-(--ui-bg-inverted)/90 disabled:bg-(--ui-bg-inverted) aria-disabled:bg-(--ui-bg-inverted) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-border-inverted)"
|
|
519
526
|
}, {
|
|
520
527
|
color: "neutral",
|
|
521
528
|
variant: "outline",
|
|
522
|
-
class: "ring ring-inset ring-
|
|
529
|
+
class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg) hover:bg-(--ui-bg-elevated) disabled:bg-(--ui-bg) aria-disabled:bg-(--ui-bg) focus-visible:ring-2 focus-visible:ring-(--ui-border-inverted)"
|
|
523
530
|
}, {
|
|
524
531
|
color: "neutral",
|
|
525
532
|
variant: "soft",
|
|
526
|
-
class: "text-
|
|
533
|
+
class: "text-(--ui-text) bg-(--ui-bg-elevated) hover:bg-(--ui-bg-accented)/75 focus-visible:bg-(--ui-bg-accented)/75 disabled:bg-(--ui-bg-elevated) aria-disabled:bg-(--ui-bg-elevated)"
|
|
527
534
|
}, {
|
|
528
535
|
color: "neutral",
|
|
529
536
|
variant: "subtle",
|
|
530
|
-
class: "ring ring-inset ring-
|
|
537
|
+
class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg-elevated) hover:bg-(--ui-bg-accented)/75 disabled:bg-(--ui-bg-elevated) aria-disabled:bg-(--ui-bg-elevated) focus-visible:ring-2 focus-visible:ring-(--ui-border-inverted)"
|
|
531
538
|
}, {
|
|
532
539
|
color: "neutral",
|
|
533
540
|
variant: "ghost",
|
|
534
|
-
class: "text-
|
|
541
|
+
class: "text-(--ui-text) hover:bg-(--ui-bg-elevated) focus-visible:bg-(--ui-bg-elevated) hover:disabled:bg-transparent dark:hover:disabled:bg-transparent hover:aria-disabled:bg-transparent dark:hover:aria-disabled:bg-transparent"
|
|
535
542
|
}, {
|
|
536
543
|
color: "neutral",
|
|
537
544
|
variant: "link",
|
|
538
|
-
class: "text-
|
|
545
|
+
class: "text-(--ui-text-muted) hover:text-(--ui-text) disabled:text-(--ui-text-muted) aria-disabled:text-(--ui-text-muted) focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-(--ui-border-inverted)"
|
|
539
546
|
}, {
|
|
540
547
|
size: "xs",
|
|
541
548
|
square: true,
|
|
@@ -589,17 +596,17 @@ const calendar = (options) => ({
|
|
|
589
596
|
gridBody: "grid",
|
|
590
597
|
headCell: "rounded-[calc(var(--ui-radius)*1.5)]",
|
|
591
598
|
cell: "relative text-center",
|
|
592
|
-
cellTrigger: ["m-0.5 relative flex items-center justify-center rounded-full whitespace-nowrap focus-visible:ring-2 focus:outline-none data-disabled:text-
|
|
599
|
+
cellTrigger: ["m-0.5 relative flex items-center justify-center rounded-full whitespace-nowrap focus-visible:ring-2 focus:outline-none data-disabled:text-(--ui-text-muted) data-unavailable:line-through data-unavailable:text-(--ui-text-muted) data-unavailable:pointer-events-none data-[selected]:text-(--ui-bg) data-today:font-semibold", options.theme.transitions && "transition"]
|
|
593
600
|
},
|
|
594
601
|
variants: {
|
|
595
602
|
color: {
|
|
596
603
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
597
|
-
headCell: `text-
|
|
598
|
-
cellTrigger: `focus-visible:ring-
|
|
604
|
+
headCell: `text-(--ui-${color})`,
|
|
605
|
+
cellTrigger: `focus-visible:ring-(--ui-${color}) data-[selected]:bg-(--ui-${color}) data-today:not-data-[selected]:text-(--ui-${color}) data-[highlighted]:bg-(--ui-${color})/20 hover:not-data-[selected]:bg-(--ui-${color})/20`
|
|
599
606
|
}])),
|
|
600
607
|
neutral: {
|
|
601
|
-
headCell: "text-
|
|
602
|
-
cellTrigger: "focus-visible:ring-
|
|
608
|
+
headCell: "text-(--ui-bg-inverted)",
|
|
609
|
+
cellTrigger: "focus-visible:ring-(--ui-border-inverted) data-[selected]:bg-(--ui-bg-inverted) data-today:not-data-[selected]:text-(--ui-bg-inverted) data-[highlighted]:bg-(--ui-bg-inverted)/20 hover:not-data-[selected]:bg-(--ui-bg-inverted)/10"
|
|
603
610
|
}
|
|
604
611
|
},
|
|
605
612
|
size: {
|
|
@@ -642,10 +649,29 @@ const calendar = (options) => ({
|
|
|
642
649
|
|
|
643
650
|
const card = {
|
|
644
651
|
slots: {
|
|
645
|
-
root: "
|
|
652
|
+
root: "rounded-[calc(var(--ui-radius)*2)]",
|
|
646
653
|
header: "p-4 sm:px-6",
|
|
647
654
|
body: "p-4 sm:p-6",
|
|
648
655
|
footer: "p-4 sm:px-6"
|
|
656
|
+
},
|
|
657
|
+
variants: {
|
|
658
|
+
variant: {
|
|
659
|
+
solid: {
|
|
660
|
+
root: "bg-(--ui-bg-inverted) text-(--ui-bg)"
|
|
661
|
+
},
|
|
662
|
+
outline: {
|
|
663
|
+
root: "bg-(--ui-bg) ring ring-(--ui-border) divide-y divide-(--ui-border)"
|
|
664
|
+
},
|
|
665
|
+
soft: {
|
|
666
|
+
root: "bg-(--ui-bg-elevated)/50 divide-y divide-(--ui-border)"
|
|
667
|
+
},
|
|
668
|
+
subtle: {
|
|
669
|
+
root: "bg-(--ui-bg-elevated)/50 ring ring-(--ui-border) divide-y divide-(--ui-border)"
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
defaultVariants: {
|
|
674
|
+
variant: "outline"
|
|
649
675
|
}
|
|
650
676
|
};
|
|
651
677
|
|
|
@@ -660,7 +686,7 @@ const carousel = (options) => ({
|
|
|
660
686
|
prev: "absolute rounded-full",
|
|
661
687
|
next: "absolute rounded-full",
|
|
662
688
|
dots: "absolute inset-x-0 -bottom-7 flex flex-wrap items-center justify-center gap-3",
|
|
663
|
-
dot: ["cursor-pointer size-3 bg-
|
|
689
|
+
dot: ["cursor-pointer size-3 bg-(--ui-border-accented) rounded-full", options.theme.transitions && "transition"]
|
|
664
690
|
},
|
|
665
691
|
variants: {
|
|
666
692
|
orientation: {
|
|
@@ -679,7 +705,7 @@ const carousel = (options) => ({
|
|
|
679
705
|
},
|
|
680
706
|
active: {
|
|
681
707
|
true: {
|
|
682
|
-
dot: "bg-
|
|
708
|
+
dot: "bg-(--ui-border-inverted)"
|
|
683
709
|
}
|
|
684
710
|
}
|
|
685
711
|
}
|
|
@@ -688,17 +714,17 @@ const carousel = (options) => ({
|
|
|
688
714
|
const checkbox = (options) => ({
|
|
689
715
|
slots: {
|
|
690
716
|
root: "relative flex items-start",
|
|
691
|
-
base: "shrink-0 flex items-center justify-center rounded-
|
|
717
|
+
base: "shrink-0 flex items-center justify-center rounded-(--ui-radius) text-(--ui-bg) ring ring-inset ring-(--ui-border-accented) focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
692
718
|
container: "flex items-center",
|
|
693
719
|
wrapper: "ms-2",
|
|
694
720
|
icon: "shrink-0 size-full",
|
|
695
|
-
label: "block font-medium text-
|
|
696
|
-
description: "text-
|
|
721
|
+
label: "block font-medium text-(--ui-text)",
|
|
722
|
+
description: "text-(--ui-text-muted)"
|
|
697
723
|
},
|
|
698
724
|
variants: {
|
|
699
725
|
color: {
|
|
700
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-
|
|
701
|
-
neutral: "focus-visible:outline-
|
|
726
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-(--ui-${color})`])),
|
|
727
|
+
neutral: "focus-visible:outline-(--ui-border-inverted)"
|
|
702
728
|
},
|
|
703
729
|
size: {
|
|
704
730
|
xs: {
|
|
@@ -729,7 +755,7 @@ const checkbox = (options) => ({
|
|
|
729
755
|
},
|
|
730
756
|
required: {
|
|
731
757
|
true: {
|
|
732
|
-
label: "after:content-['*'] after:ms-0.5 after:text-
|
|
758
|
+
label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
|
|
733
759
|
}
|
|
734
760
|
},
|
|
735
761
|
disabled: {
|
|
@@ -746,11 +772,11 @@ const checkbox = (options) => ({
|
|
|
746
772
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
747
773
|
color,
|
|
748
774
|
checked: true,
|
|
749
|
-
class: `ring-2 ring-
|
|
775
|
+
class: `ring-2 ring-(--ui-${color}) bg-(--ui-${color})`
|
|
750
776
|
})), {
|
|
751
777
|
color: "neutral",
|
|
752
778
|
checked: true,
|
|
753
|
-
class: "ring-2 ring-
|
|
779
|
+
class: "ring-2 ring-(--ui-border-inverted) bg-(--ui-bg-inverted)"
|
|
754
780
|
}],
|
|
755
781
|
defaultVariants: {
|
|
756
782
|
size: "md",
|
|
@@ -761,12 +787,12 @@ const checkbox = (options) => ({
|
|
|
761
787
|
const chip = (options) => ({
|
|
762
788
|
slots: {
|
|
763
789
|
root: "relative inline-flex items-center justify-center shrink-0",
|
|
764
|
-
base: "rounded-full ring ring-
|
|
790
|
+
base: "rounded-full ring ring-(--ui-bg) flex items-center justify-center text-(--ui-bg) font-medium whitespace-nowrap"
|
|
765
791
|
},
|
|
766
792
|
variants: {
|
|
767
793
|
color: {
|
|
768
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-
|
|
769
|
-
neutral: "bg-
|
|
794
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-(--ui-${color})`])),
|
|
795
|
+
neutral: "bg-(--ui-text-muted)"
|
|
770
796
|
},
|
|
771
797
|
size: {
|
|
772
798
|
"3xs": "h-[4px] min-w-[4px] text-[4px]",
|
|
@@ -829,9 +855,9 @@ const colorPicker = {
|
|
|
829
855
|
picker: "flex gap-4",
|
|
830
856
|
selector: "rounded-[calc(var(--ui-radius)*1.5)]",
|
|
831
857
|
selectorBackground: "w-full h-full relative rounded-[calc(var(--ui-radius)*1.2)]",
|
|
832
|
-
selectorThumb: "-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-
|
|
858
|
+
selectorThumb: "-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-(--color-white) rounded-full cursor-pointer data-[disabled]:cursor-not-allowed",
|
|
833
859
|
track: "w-[8px] relative rounded-[calc(var(--ui-radius)*1.5)]",
|
|
834
|
-
trackThumb: "absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-
|
|
860
|
+
trackThumb: "absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-(--color-white) cursor-pointer data-[disabled]:cursor-not-allowed"
|
|
835
861
|
},
|
|
836
862
|
variants: {
|
|
837
863
|
size: {
|
|
@@ -865,14 +891,14 @@ const colorPicker = {
|
|
|
865
891
|
|
|
866
892
|
const commandPalette = (options) => ({
|
|
867
893
|
slots: {
|
|
868
|
-
root: "flex flex-col min-h-0 min-w-0 divide-y divide-
|
|
894
|
+
root: "flex flex-col min-h-0 min-w-0 divide-y divide-(--ui-border)",
|
|
869
895
|
input: "[&>input]:h-12",
|
|
870
896
|
close: "",
|
|
871
897
|
content: "relative overflow-hidden flex flex-col",
|
|
872
|
-
viewport: "relative divide-y divide-
|
|
898
|
+
viewport: "relative divide-y divide-(--ui-border) scroll-py-1 overflow-y-auto flex-1 focus:outline-none",
|
|
873
899
|
group: "p-1 isolate",
|
|
874
|
-
empty: "py-6 text-center text-sm text-
|
|
875
|
-
label: "px-2 py-1.5 text-xs font-semibold text-
|
|
900
|
+
empty: "py-6 text-center text-sm text-(--ui-text-muted)",
|
|
901
|
+
label: "px-2 py-1.5 text-xs font-semibold text-(--ui-text-highlighted)",
|
|
876
902
|
item: "group relative w-full flex items-center gap-2 px-2 py-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
877
903
|
itemLeadingIcon: "shrink-0 size-5",
|
|
878
904
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -881,23 +907,23 @@ const commandPalette = (options) => ({
|
|
|
881
907
|
itemLeadingChipSize: "md",
|
|
882
908
|
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
883
909
|
itemTrailingIcon: "shrink-0 size-5",
|
|
884
|
-
itemTrailingHighlightedIcon: "shrink-0 size-5 text-
|
|
910
|
+
itemTrailingHighlightedIcon: "shrink-0 size-5 text-(--ui-text-dimmed) hidden group-data-highlighted:inline-flex",
|
|
885
911
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0 gap-0.5",
|
|
886
912
|
itemTrailingKbdsSize: "md",
|
|
887
913
|
itemLabel: "truncate space-x-1 rtl:space-x-reverse",
|
|
888
|
-
itemLabelBase: "text-
|
|
889
|
-
itemLabelPrefix: "text-
|
|
890
|
-
itemLabelSuffix: "text-
|
|
914
|
+
itemLabelBase: "text-(--ui-text-highlighted) [&>mark]:text-(--ui-bg) [&>mark]:bg-(--ui-primary)",
|
|
915
|
+
itemLabelPrefix: "text-(--ui-text)",
|
|
916
|
+
itemLabelSuffix: "text-(--ui-text-dimmed) [&>mark]:text-(--ui-bg) [&>mark]:bg-(--ui-primary)"
|
|
891
917
|
},
|
|
892
918
|
variants: {
|
|
893
919
|
active: {
|
|
894
920
|
true: {
|
|
895
|
-
item: "text-
|
|
896
|
-
itemLeadingIcon: "text-
|
|
921
|
+
item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
|
|
922
|
+
itemLeadingIcon: "text-(--ui-text)"
|
|
897
923
|
},
|
|
898
924
|
false: {
|
|
899
|
-
item: ["text-
|
|
900
|
-
itemLeadingIcon: ["text-
|
|
925
|
+
item: ["text-(--ui-text) data-highlighted:text-(--ui-text-highlighted) data-highlighted:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
926
|
+
itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
901
927
|
}
|
|
902
928
|
},
|
|
903
929
|
loading: {
|
|
@@ -909,15 +935,15 @@ const commandPalette = (options) => ({
|
|
|
909
935
|
});
|
|
910
936
|
|
|
911
937
|
const container = {
|
|
912
|
-
base: "max-w-
|
|
938
|
+
base: "max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"
|
|
913
939
|
};
|
|
914
940
|
|
|
915
941
|
const contextMenu = (options) => ({
|
|
916
942
|
slots: {
|
|
917
|
-
content: "min-w-32 bg-
|
|
943
|
+
content: "min-w-32 bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) divide-y divide-(--ui-border) overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
918
944
|
group: "p-1 isolate",
|
|
919
|
-
label: "w-full flex items-center font-semibold text-
|
|
920
|
-
separator: "-mx-1 my-1 h-px bg-
|
|
945
|
+
label: "w-full flex items-center font-semibold text-(--ui-text-highlighted)",
|
|
946
|
+
separator: "-mx-1 my-1 h-px bg-(--ui-border)",
|
|
921
947
|
item: "group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
922
948
|
itemLeadingIcon: "shrink-0",
|
|
923
949
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -927,7 +953,7 @@ const contextMenu = (options) => ({
|
|
|
927
953
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
|
|
928
954
|
itemTrailingKbdsSize: "",
|
|
929
955
|
itemLabel: "truncate",
|
|
930
|
-
itemLabelExternalIcon: "inline-block size-3 align-top text-
|
|
956
|
+
itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
|
|
931
957
|
},
|
|
932
958
|
variants: {
|
|
933
959
|
color: {
|
|
@@ -936,12 +962,12 @@ const contextMenu = (options) => ({
|
|
|
936
962
|
},
|
|
937
963
|
active: {
|
|
938
964
|
true: {
|
|
939
|
-
item: "text-
|
|
940
|
-
itemLeadingIcon: "text-
|
|
965
|
+
item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
|
|
966
|
+
itemLeadingIcon: "text-(--ui-text)"
|
|
941
967
|
},
|
|
942
968
|
false: {
|
|
943
|
-
item: ["text-
|
|
944
|
-
itemLeadingIcon: ["text-
|
|
969
|
+
item: ["text-(--ui-text) data-highlighted:text-(--ui-text-highlighted) data-[state=open]:text-(--ui-text-highlighted) data-highlighted:before:bg-(--ui-bg-elevated)/50 data-[state=open]:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
970
|
+
itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text) group-data-[state=open]:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
945
971
|
}
|
|
946
972
|
},
|
|
947
973
|
loading: {
|
|
@@ -1001,15 +1027,15 @@ const contextMenu = (options) => ({
|
|
|
1001
1027
|
color,
|
|
1002
1028
|
active: false,
|
|
1003
1029
|
class: {
|
|
1004
|
-
item: `text-
|
|
1005
|
-
itemLeadingIcon: `text-
|
|
1030
|
+
item: `text-(--ui-${color}) data-highlighted:text-(--ui-${color}) data-highlighted:before:bg-(--ui-${color})/10 data-[state=open]:before:bg-(--ui-${color})/10`,
|
|
1031
|
+
itemLeadingIcon: `text-(--ui-${color})/75 group-data-highlighted:text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
|
|
1006
1032
|
}
|
|
1007
1033
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1008
1034
|
color,
|
|
1009
1035
|
active: true,
|
|
1010
1036
|
class: {
|
|
1011
|
-
item: `text-
|
|
1012
|
-
itemLeadingIcon: `text-
|
|
1037
|
+
item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
|
|
1038
|
+
itemLeadingIcon: `text-(--ui-${color})`
|
|
1013
1039
|
}
|
|
1014
1040
|
}))],
|
|
1015
1041
|
defaultVariants: {
|
|
@@ -1019,58 +1045,111 @@ const contextMenu = (options) => ({
|
|
|
1019
1045
|
|
|
1020
1046
|
const drawer = {
|
|
1021
1047
|
slots: {
|
|
1022
|
-
overlay: "fixed inset-0 bg-
|
|
1023
|
-
content: "fixed bg-
|
|
1024
|
-
handle: "shrink-0 rounded-full bg-
|
|
1048
|
+
overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
|
|
1049
|
+
content: "fixed bg-(--ui-bg) ring ring-(--ui-border) flex focus:outline-none",
|
|
1050
|
+
handle: "shrink-0 rounded-full bg-(--ui-bg-accented)",
|
|
1025
1051
|
container: "w-full flex flex-col gap-4 p-4 overflow-y-auto",
|
|
1026
1052
|
header: "",
|
|
1027
|
-
title: "text-
|
|
1028
|
-
description: "mt-1 text-
|
|
1053
|
+
title: "text-(--ui-text-highlighted) font-semibold",
|
|
1054
|
+
description: "mt-1 text-(--ui-text-muted) text-sm",
|
|
1029
1055
|
body: "flex-1",
|
|
1030
1056
|
footer: "flex flex-col gap-1.5"
|
|
1031
1057
|
},
|
|
1032
1058
|
variants: {
|
|
1033
1059
|
direction: {
|
|
1034
1060
|
top: {
|
|
1035
|
-
content: "
|
|
1061
|
+
content: "mb-24 flex-col-reverse",
|
|
1036
1062
|
handle: "mb-4"
|
|
1037
1063
|
},
|
|
1038
1064
|
right: {
|
|
1039
|
-
content: "
|
|
1065
|
+
content: "flex-row",
|
|
1040
1066
|
handle: "ml-4"
|
|
1041
1067
|
},
|
|
1042
1068
|
bottom: {
|
|
1043
|
-
content: "
|
|
1069
|
+
content: "mt-24 flex-col",
|
|
1044
1070
|
handle: "mt-4"
|
|
1045
1071
|
},
|
|
1046
1072
|
left: {
|
|
1047
|
-
content: "
|
|
1073
|
+
content: "flex-row-reverse",
|
|
1048
1074
|
handle: "mr-4"
|
|
1049
1075
|
}
|
|
1076
|
+
},
|
|
1077
|
+
inset: {
|
|
1078
|
+
true: {
|
|
1079
|
+
content: "rounded-[calc(var(--ui-radius)*2)] after:hidden"
|
|
1080
|
+
}
|
|
1050
1081
|
}
|
|
1051
1082
|
},
|
|
1052
1083
|
compoundVariants: [{
|
|
1053
1084
|
direction: ["top", "bottom"],
|
|
1054
1085
|
class: {
|
|
1055
|
-
content: "
|
|
1086
|
+
content: "h-auto max-h-[96%]",
|
|
1056
1087
|
handle: "w-12 h-1.5 mx-auto"
|
|
1057
1088
|
}
|
|
1058
1089
|
}, {
|
|
1059
1090
|
direction: ["right", "left"],
|
|
1060
1091
|
class: {
|
|
1061
|
-
content: "
|
|
1092
|
+
content: "w-auto max-w-[calc(100%-2rem)]",
|
|
1062
1093
|
handle: "h-12 w-1.5 mt-auto mb-auto"
|
|
1063
1094
|
}
|
|
1095
|
+
}, {
|
|
1096
|
+
direction: "top",
|
|
1097
|
+
inset: true,
|
|
1098
|
+
class: {
|
|
1099
|
+
content: "inset-x-4 top-4"
|
|
1100
|
+
}
|
|
1101
|
+
}, {
|
|
1102
|
+
direction: "top",
|
|
1103
|
+
inset: false,
|
|
1104
|
+
class: {
|
|
1105
|
+
content: "inset-x-0 top-0 rounded-b-[calc(var(--ui-radius)*2)]"
|
|
1106
|
+
}
|
|
1107
|
+
}, {
|
|
1108
|
+
direction: "bottom",
|
|
1109
|
+
inset: true,
|
|
1110
|
+
class: {
|
|
1111
|
+
content: "inset-x-4 bottom-4"
|
|
1112
|
+
}
|
|
1113
|
+
}, {
|
|
1114
|
+
direction: "bottom",
|
|
1115
|
+
inset: false,
|
|
1116
|
+
class: {
|
|
1117
|
+
content: "inset-x-0 bottom-0 rounded-t-[calc(var(--ui-radius)*2)]"
|
|
1118
|
+
}
|
|
1119
|
+
}, {
|
|
1120
|
+
direction: "left",
|
|
1121
|
+
inset: true,
|
|
1122
|
+
class: {
|
|
1123
|
+
content: "inset-y-4 left-4"
|
|
1124
|
+
}
|
|
1125
|
+
}, {
|
|
1126
|
+
direction: "left",
|
|
1127
|
+
inset: false,
|
|
1128
|
+
class: {
|
|
1129
|
+
content: "inset-y-0 left-0 rounded-r-[calc(var(--ui-radius)*2)]"
|
|
1130
|
+
}
|
|
1131
|
+
}, {
|
|
1132
|
+
direction: "right",
|
|
1133
|
+
inset: true,
|
|
1134
|
+
class: {
|
|
1135
|
+
content: "inset-y-4 right-4"
|
|
1136
|
+
}
|
|
1137
|
+
}, {
|
|
1138
|
+
direction: "right",
|
|
1139
|
+
inset: false,
|
|
1140
|
+
class: {
|
|
1141
|
+
content: "inset-y-0 right-0 rounded-l-[calc(var(--ui-radius)*2)]"
|
|
1142
|
+
}
|
|
1064
1143
|
}]
|
|
1065
1144
|
};
|
|
1066
1145
|
|
|
1067
1146
|
const dropdownMenu = (options) => ({
|
|
1068
1147
|
slots: {
|
|
1069
|
-
content: "min-w-32 bg-
|
|
1070
|
-
arrow: "fill-
|
|
1148
|
+
content: "min-w-32 bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) divide-y divide-(--ui-border) overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
1149
|
+
arrow: "fill-(--ui-border)",
|
|
1071
1150
|
group: "p-1 isolate",
|
|
1072
|
-
label: "w-full flex items-center font-semibold text-
|
|
1073
|
-
separator: "-mx-1 my-1 h-px bg-
|
|
1151
|
+
label: "w-full flex items-center font-semibold text-(--ui-text-highlighted)",
|
|
1152
|
+
separator: "-mx-1 my-1 h-px bg-(--ui-border)",
|
|
1074
1153
|
item: "group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
1075
1154
|
itemLeadingIcon: "shrink-0",
|
|
1076
1155
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -1080,7 +1159,7 @@ const dropdownMenu = (options) => ({
|
|
|
1080
1159
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
|
|
1081
1160
|
itemTrailingKbdsSize: "",
|
|
1082
1161
|
itemLabel: "truncate",
|
|
1083
|
-
itemLabelExternalIcon: "inline-block size-3 align-top text-
|
|
1162
|
+
itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
|
|
1084
1163
|
},
|
|
1085
1164
|
variants: {
|
|
1086
1165
|
color: {
|
|
@@ -1089,12 +1168,12 @@ const dropdownMenu = (options) => ({
|
|
|
1089
1168
|
},
|
|
1090
1169
|
active: {
|
|
1091
1170
|
true: {
|
|
1092
|
-
item: "text-
|
|
1093
|
-
itemLeadingIcon: "text-
|
|
1171
|
+
item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
|
|
1172
|
+
itemLeadingIcon: "text-(--ui-text)"
|
|
1094
1173
|
},
|
|
1095
1174
|
false: {
|
|
1096
|
-
item: ["text-
|
|
1097
|
-
itemLeadingIcon: ["text-
|
|
1175
|
+
item: ["text-(--ui-text) data-highlighted:text-(--ui-text-highlighted) data-[state=open]:text-(--ui-text-highlighted) data-highlighted:before:bg-(--ui-bg-elevated)/50 data-[state=open]:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
1176
|
+
itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text) group-data-[state=open]:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
1098
1177
|
}
|
|
1099
1178
|
},
|
|
1100
1179
|
loading: {
|
|
@@ -1154,15 +1233,15 @@ const dropdownMenu = (options) => ({
|
|
|
1154
1233
|
color,
|
|
1155
1234
|
active: false,
|
|
1156
1235
|
class: {
|
|
1157
|
-
item: `text-
|
|
1158
|
-
itemLeadingIcon: `text-
|
|
1236
|
+
item: `text-(--ui-${color}) data-highlighted:text-(--ui-${color}) data-highlighted:before:bg-(--ui-${color})/10 data-[state=open]:before:bg-(--ui-${color})/10`,
|
|
1237
|
+
itemLeadingIcon: `text-(--ui-${color})/75 group-data-highlighted:text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
|
|
1159
1238
|
}
|
|
1160
1239
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1161
1240
|
color,
|
|
1162
1241
|
active: true,
|
|
1163
1242
|
class: {
|
|
1164
|
-
item: `text-
|
|
1165
|
-
itemLeadingIcon: `text-
|
|
1243
|
+
item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
|
|
1244
|
+
itemLeadingIcon: `text-(--ui-${color})`
|
|
1166
1245
|
}
|
|
1167
1246
|
}))],
|
|
1168
1247
|
defaultVariants: {
|
|
@@ -1179,12 +1258,12 @@ const formField = {
|
|
|
1179
1258
|
root: "",
|
|
1180
1259
|
wrapper: "",
|
|
1181
1260
|
labelWrapper: "flex content-center items-center justify-between",
|
|
1182
|
-
label: "block font-medium text-
|
|
1261
|
+
label: "block font-medium text-(--ui-text)",
|
|
1183
1262
|
container: "mt-1 relative",
|
|
1184
|
-
description: "text-
|
|
1185
|
-
error: "mt-2 text-
|
|
1186
|
-
hint: "text-
|
|
1187
|
-
help: "mt-2 text-
|
|
1263
|
+
description: "text-(--ui-text-muted)",
|
|
1264
|
+
error: "mt-2 text-(--ui-error)",
|
|
1265
|
+
hint: "text-(--ui-text-muted)",
|
|
1266
|
+
help: "mt-2 text-(--ui-text-muted)"
|
|
1188
1267
|
},
|
|
1189
1268
|
variants: {
|
|
1190
1269
|
size: {
|
|
@@ -1196,7 +1275,7 @@ const formField = {
|
|
|
1196
1275
|
},
|
|
1197
1276
|
required: {
|
|
1198
1277
|
true: {
|
|
1199
|
-
label: `after:content-['*'] after:ms-0.5 after:text-
|
|
1278
|
+
label: `after:content-['*'] after:ms-0.5 after:text-(--ui-error)`
|
|
1200
1279
|
}
|
|
1201
1280
|
}
|
|
1202
1281
|
},
|
|
@@ -1208,13 +1287,13 @@ const formField = {
|
|
|
1208
1287
|
const input = (options) => ({
|
|
1209
1288
|
slots: {
|
|
1210
1289
|
root: "relative inline-flex items-center",
|
|
1211
|
-
base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-
|
|
1290
|
+
base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
|
|
1212
1291
|
leading: "absolute inset-y-0 start-0 flex items-center",
|
|
1213
|
-
leadingIcon: "shrink-0 text-
|
|
1292
|
+
leadingIcon: "shrink-0 text-(--ui-text-dimmed)",
|
|
1214
1293
|
leadingAvatar: "shrink-0",
|
|
1215
1294
|
leadingAvatarSize: "",
|
|
1216
1295
|
trailing: "absolute inset-y-0 end-0 flex items-center",
|
|
1217
|
-
trailingIcon: "shrink-0 text-
|
|
1296
|
+
trailingIcon: "shrink-0 text-(--ui-text-dimmed)"
|
|
1218
1297
|
},
|
|
1219
1298
|
variants: {
|
|
1220
1299
|
...buttonGroupVariantWithRoot,
|
|
@@ -1261,11 +1340,11 @@ const input = (options) => ({
|
|
|
1261
1340
|
}
|
|
1262
1341
|
},
|
|
1263
1342
|
variant: {
|
|
1264
|
-
outline: "text-
|
|
1265
|
-
soft: "text-
|
|
1266
|
-
subtle: "text-
|
|
1267
|
-
ghost: "text-
|
|
1268
|
-
none: "text-
|
|
1343
|
+
outline: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented)",
|
|
1344
|
+
soft: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50 hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-(--ui-bg-elevated)/50",
|
|
1345
|
+
subtle: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated) ring ring-inset ring-(--ui-border-accented)",
|
|
1346
|
+
ghost: "text-(--ui-text-highlighted) bg-transparent hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-transparent dark:disabled:bg-transparent",
|
|
1347
|
+
none: "text-(--ui-text-highlighted) bg-transparent"
|
|
1269
1348
|
},
|
|
1270
1349
|
color: {
|
|
1271
1350
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
@@ -1284,25 +1363,25 @@ const input = (options) => ({
|
|
|
1284
1363
|
true: ""
|
|
1285
1364
|
},
|
|
1286
1365
|
type: {
|
|
1287
|
-
file: "file:me-1.5 file:font-medium file:text-
|
|
1366
|
+
file: "file:me-1.5 file:font-medium file:text-(--ui-text-muted) file:outline-none"
|
|
1288
1367
|
}
|
|
1289
1368
|
},
|
|
1290
1369
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1291
1370
|
color,
|
|
1292
1371
|
variant: ["outline", "subtle"],
|
|
1293
|
-
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
1372
|
+
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
|
|
1294
1373
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1295
1374
|
color,
|
|
1296
1375
|
highlight: true,
|
|
1297
|
-
class: `ring ring-inset ring-
|
|
1376
|
+
class: `ring ring-inset ring-(--ui-${color})`
|
|
1298
1377
|
})), {
|
|
1299
1378
|
color: "neutral",
|
|
1300
1379
|
variant: ["outline", "subtle"],
|
|
1301
|
-
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
1380
|
+
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
|
|
1302
1381
|
}, {
|
|
1303
1382
|
color: "neutral",
|
|
1304
1383
|
highlight: true,
|
|
1305
|
-
class: "ring ring-inset ring-
|
|
1384
|
+
class: "ring ring-inset ring-(--ui-border-inverted)"
|
|
1306
1385
|
}, {
|
|
1307
1386
|
leading: true,
|
|
1308
1387
|
size: "xs",
|
|
@@ -1369,15 +1448,15 @@ const inputMenu = (options) => {
|
|
|
1369
1448
|
slots: {
|
|
1370
1449
|
base: () => ["rounded-[calc(var(--ui-radius)*1.5)]", options.theme.transitions && "transition-colors"],
|
|
1371
1450
|
trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
|
|
1372
|
-
arrow: "fill-
|
|
1373
|
-
content: "max-h-60 w-
|
|
1374
|
-
viewport: "divide-y divide-
|
|
1451
|
+
arrow: "fill-(--ui-border)",
|
|
1452
|
+
content: "max-h-60 w-(--reka-popper-anchor-width) bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] pointer-events-auto",
|
|
1453
|
+
viewport: "divide-y divide-(--ui-border) scroll-py-1",
|
|
1375
1454
|
group: "p-1 isolate",
|
|
1376
|
-
empty: "py-2 text-center text-sm text-
|
|
1377
|
-
label: "font-semibold text-
|
|
1378
|
-
separator: "-mx-1 my-1 h-px bg-
|
|
1379
|
-
item: ["group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75 text-
|
|
1380
|
-
itemLeadingIcon: ["shrink-0 text-
|
|
1455
|
+
empty: "py-2 text-center text-sm text-(--ui-text-muted)",
|
|
1456
|
+
label: "font-semibold text-(--ui-text-highlighted)",
|
|
1457
|
+
separator: "-mx-1 my-1 h-px bg-(--ui-border)",
|
|
1458
|
+
item: ["group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75 text-(--ui-text) data-highlighted:text-(--ui-text-highlighted) data-highlighted:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
1459
|
+
itemLeadingIcon: ["shrink-0 text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"],
|
|
1381
1460
|
itemLeadingAvatar: "shrink-0",
|
|
1382
1461
|
itemLeadingAvatarSize: "",
|
|
1383
1462
|
itemLeadingChip: "shrink-0",
|
|
@@ -1385,9 +1464,9 @@ const inputMenu = (options) => {
|
|
|
1385
1464
|
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
1386
1465
|
itemTrailingIcon: "shrink-0",
|
|
1387
1466
|
itemLabel: "truncate",
|
|
1388
|
-
tagsItem: "px-1.5 py-0.5 rounded-
|
|
1467
|
+
tagsItem: "px-1.5 py-0.5 rounded-(--ui-radius) font-medium inline-flex items-center gap-0.5 ring ring-inset ring-(--ui-border-accented) bg-(--ui-bg-elevated) text-(--ui-text) data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
1389
1468
|
tagsItemText: "truncate",
|
|
1390
|
-
tagsItemDelete: ["inline-flex items-center rounded-[calc(var(--ui-radius)/2)] text-
|
|
1469
|
+
tagsItemDelete: ["inline-flex items-center rounded-[calc(var(--ui-radius)/2)] text-(--ui-text-dimmed) hover:text-(--ui-text) hover:bg-(--ui-bg-accented)/75 disabled:pointer-events-none", options.theme.transitions && "transition-colors"],
|
|
1391
1470
|
tagsItemDeleteIcon: "",
|
|
1392
1471
|
tagsInput: ""
|
|
1393
1472
|
},
|
|
@@ -1395,10 +1474,10 @@ const inputMenu = (options) => {
|
|
|
1395
1474
|
multiple: {
|
|
1396
1475
|
true: {
|
|
1397
1476
|
root: "flex-wrap",
|
|
1398
|
-
tagsInput: "border-0 bg-transparent placeholder:text-
|
|
1477
|
+
tagsInput: "border-0 bg-transparent placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1399
1478
|
},
|
|
1400
1479
|
false: {
|
|
1401
|
-
base: "w-full border-0 placeholder:text-
|
|
1480
|
+
base: "w-full border-0 placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1402
1481
|
}
|
|
1403
1482
|
},
|
|
1404
1483
|
size: {
|
|
@@ -1463,12 +1542,12 @@ const inputMenu = (options) => {
|
|
|
1463
1542
|
color,
|
|
1464
1543
|
multiple: true,
|
|
1465
1544
|
variant: ["outline", "subtle"],
|
|
1466
|
-
class: `has-focus-visible:ring-2 has-focus-visible:ring-
|
|
1545
|
+
class: `has-focus-visible:ring-2 has-focus-visible:ring-(--ui-${color})`
|
|
1467
1546
|
})), {
|
|
1468
1547
|
color: "neutral",
|
|
1469
1548
|
multiple: true,
|
|
1470
1549
|
variant: ["outline", "subtle"],
|
|
1471
|
-
class: "has-focus-visible:ring-2 has-focus-visible:ring-
|
|
1550
|
+
class: "has-focus-visible:ring-2 has-focus-visible:ring-(--ui-border-inverted)"
|
|
1472
1551
|
}]
|
|
1473
1552
|
}, input(options));
|
|
1474
1553
|
};
|
|
@@ -1478,7 +1557,7 @@ const inputNumber = (options) => {
|
|
|
1478
1557
|
return {
|
|
1479
1558
|
slots: {
|
|
1480
1559
|
root: "relative inline-flex items-center",
|
|
1481
|
-
base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-
|
|
1560
|
+
base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
|
|
1482
1561
|
increment: "absolute flex items-center",
|
|
1483
1562
|
decrement: "absolute flex items-center"
|
|
1484
1563
|
},
|
|
@@ -1521,19 +1600,19 @@ const inputNumber = (options) => {
|
|
|
1521
1600
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1522
1601
|
color,
|
|
1523
1602
|
variant: ["outline", "subtle"],
|
|
1524
|
-
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
1603
|
+
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
|
|
1525
1604
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1526
1605
|
color,
|
|
1527
1606
|
highlight: true,
|
|
1528
|
-
class: `ring ring-inset ring-
|
|
1607
|
+
class: `ring ring-inset ring-(--ui-${color})`
|
|
1529
1608
|
})), {
|
|
1530
1609
|
color: "neutral",
|
|
1531
1610
|
variant: ["outline", "subtle"],
|
|
1532
|
-
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
1611
|
+
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
|
|
1533
1612
|
}, {
|
|
1534
1613
|
color: "neutral",
|
|
1535
1614
|
highlight: true,
|
|
1536
|
-
class: "ring ring-inset ring-
|
|
1615
|
+
class: "ring ring-inset ring-(--ui-border-inverted)"
|
|
1537
1616
|
}, {
|
|
1538
1617
|
orientation: "horizontal",
|
|
1539
1618
|
size: "xs",
|
|
@@ -1584,12 +1663,12 @@ const inputNumber = (options) => {
|
|
|
1584
1663
|
};
|
|
1585
1664
|
|
|
1586
1665
|
const kbd = {
|
|
1587
|
-
base: "inline-flex items-center justify-center px-1 rounded-
|
|
1666
|
+
base: "inline-flex items-center justify-center px-1 rounded-(--ui-radius) font-medium font-sans",
|
|
1588
1667
|
variants: {
|
|
1589
1668
|
variant: {
|
|
1590
|
-
solid: "bg-
|
|
1591
|
-
outline: "bg-
|
|
1592
|
-
subtle: "bg-
|
|
1669
|
+
solid: "bg-(--ui-bg-inverted) text-(--ui-bg)",
|
|
1670
|
+
outline: "bg-(--ui-bg) text-(--ui-text-highlighted) ring ring-inset ring-(--ui-border-accented)",
|
|
1671
|
+
subtle: "bg-(--ui-bg-elevated) text-(--ui-text) ring ring-inset ring-(--ui-border-accented)"
|
|
1593
1672
|
},
|
|
1594
1673
|
size: {
|
|
1595
1674
|
sm: "h-4 min-w-[16px] text-[10px]",
|
|
@@ -1604,11 +1683,11 @@ const kbd = {
|
|
|
1604
1683
|
};
|
|
1605
1684
|
|
|
1606
1685
|
const link = (options) => ({
|
|
1607
|
-
base: "focus-visible:outline-
|
|
1686
|
+
base: "focus-visible:outline-(--ui-primary)",
|
|
1608
1687
|
variants: {
|
|
1609
1688
|
active: {
|
|
1610
|
-
true: "text-
|
|
1611
|
-
false: ["text-
|
|
1689
|
+
true: "text-(--ui-primary)",
|
|
1690
|
+
false: ["text-(--ui-text-muted) hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
1612
1691
|
},
|
|
1613
1692
|
disabled: {
|
|
1614
1693
|
true: "cursor-not-allowed opacity-75"
|
|
@@ -1618,13 +1697,13 @@ const link = (options) => ({
|
|
|
1618
1697
|
|
|
1619
1698
|
const modal = {
|
|
1620
1699
|
slots: {
|
|
1621
|
-
overlay: "fixed inset-0 bg-
|
|
1622
|
-
content: "fixed
|
|
1700
|
+
overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
|
|
1701
|
+
content: "fixed bg-(--ui-bg) divide-y divide-(--ui-border) flex flex-col focus:outline-none",
|
|
1623
1702
|
header: "px-4 py-5 sm:px-6",
|
|
1624
1703
|
body: "flex-1 overflow-y-auto p-4 sm:p-6",
|
|
1625
1704
|
footer: "flex items-center gap-1.5 p-4 sm:px-6",
|
|
1626
|
-
title: "text-
|
|
1627
|
-
description: "mt-1 text-
|
|
1705
|
+
title: "text-(--ui-text-highlighted) font-semibold",
|
|
1706
|
+
description: "mt-1 text-(--ui-text-muted) text-sm",
|
|
1628
1707
|
close: "absolute top-4 end-4"
|
|
1629
1708
|
},
|
|
1630
1709
|
variants: {
|
|
@@ -1639,7 +1718,7 @@ const modal = {
|
|
|
1639
1718
|
content: "inset-0"
|
|
1640
1719
|
},
|
|
1641
1720
|
false: {
|
|
1642
|
-
content: "top-
|
|
1721
|
+
content: "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[calc(100vw-2rem)] max-w-lg max-h-[calc(100vh-2rem)] sm:max-h-[calc(100vh-4rem)] rounded-[calc(var(--ui-radius)*2)] shadow-lg ring ring-(--ui-border)"
|
|
1643
1722
|
}
|
|
1644
1723
|
}
|
|
1645
1724
|
}
|
|
@@ -1649,7 +1728,7 @@ const navigationMenu = (options) => ({
|
|
|
1649
1728
|
slots: {
|
|
1650
1729
|
root: "relative flex gap-1.5 [&>div]:min-w-0",
|
|
1651
1730
|
list: "isolate min-w-0",
|
|
1652
|
-
label: "w-full flex items-center gap-1.5 font-semibold text-xs/5 text-
|
|
1731
|
+
label: "w-full flex items-center gap-1.5 font-semibold text-xs/5 text-(--ui-text-highlighted) px-2.5 py-1.5",
|
|
1653
1732
|
item: "min-w-0",
|
|
1654
1733
|
link: "group relative w-full flex items-center gap-1.5 font-medium text-sm before:absolute before:z-[-1] before:rounded-[calc(var(--ui-radius)*1.5)] focus:outline-none focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
|
|
1655
1734
|
linkLeadingIcon: "shrink-0 size-5",
|
|
@@ -1660,31 +1739,31 @@ const navigationMenu = (options) => ({
|
|
|
1660
1739
|
linkTrailingBadgeSize: "sm",
|
|
1661
1740
|
linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
1662
1741
|
linkLabel: "truncate",
|
|
1663
|
-
linkLabelExternalIcon: "inline-block size-3 align-top text-
|
|
1742
|
+
linkLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)",
|
|
1664
1743
|
childList: "",
|
|
1665
1744
|
childItem: "",
|
|
1666
1745
|
childLink: "group size-full px-3 py-2 rounded-[calc(var(--ui-radius)*1.5)] flex items-start gap-2 text-start",
|
|
1667
1746
|
childLinkWrapper: "flex flex-col items-start",
|
|
1668
1747
|
childLinkIcon: "size-5 shrink-0",
|
|
1669
1748
|
childLinkLabel: "font-semibold text-sm relative inline-flex",
|
|
1670
|
-
childLinkLabelExternalIcon: "inline-block size-3 align-top text-
|
|
1671
|
-
childLinkDescription: "text-sm text-
|
|
1672
|
-
separator: "px-2 h-px bg-
|
|
1749
|
+
childLinkLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)",
|
|
1750
|
+
childLinkDescription: "text-sm text-(--ui-text-muted)",
|
|
1751
|
+
separator: "px-2 h-px bg-(--ui-border)",
|
|
1673
1752
|
viewportWrapper: "absolute top-full left-0 flex w-full",
|
|
1674
|
-
viewport: "relative overflow-hidden bg-
|
|
1753
|
+
viewport: "relative overflow-hidden bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) h-(--reka-navigation-menu-viewport-height) w-full transition-[width,height,left] duration-200 origin-[top_center] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
1675
1754
|
content: "absolute top-0 left-0 w-full",
|
|
1676
|
-
indicator: "absolute data-[state=visible]:animate-[fade-in_100ms_ease-out] data-[state=hidden]:animate-[fade-out_100ms_ease-in] data-[state=hidden]:opacity-0 bottom-0 z-[1] w-
|
|
1677
|
-
arrow: "relative top-[50%] size-2.5 rotate-45 border border-
|
|
1755
|
+
indicator: "absolute data-[state=visible]:animate-[fade-in_100ms_ease-out] data-[state=hidden]:animate-[fade-out_100ms_ease-in] data-[state=hidden]:opacity-0 bottom-0 z-[1] w-(--reka-navigation-menu-indicator-size) translate-x-(--reka-navigation-menu-indicator-position) flex h-2.5 items-end justify-center overflow-hidden transition-[translate,width] duration-200",
|
|
1756
|
+
arrow: "relative top-[50%] size-2.5 rotate-45 border border-(--ui-border) bg-(--ui-bg) z-[1] rounded-[calc(var(--ui-radius)/2)]"
|
|
1678
1757
|
},
|
|
1679
1758
|
variants: {
|
|
1680
1759
|
color: {
|
|
1681
1760
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
1682
|
-
link: `focus-visible:before:ring-
|
|
1683
|
-
childLink: `focus-visible:outline-
|
|
1761
|
+
link: `focus-visible:before:ring-(--ui-${color})`,
|
|
1762
|
+
childLink: `focus-visible:outline-(--ui-${color})`
|
|
1684
1763
|
}])),
|
|
1685
1764
|
neutral: {
|
|
1686
|
-
link: "focus-visible:before:ring-
|
|
1687
|
-
childLink: "focus-visible:outline-
|
|
1765
|
+
link: "focus-visible:before:ring-(--ui-border-inverted)",
|
|
1766
|
+
childLink: "focus-visible:outline-(--ui-border-inverted)"
|
|
1688
1767
|
}
|
|
1689
1768
|
},
|
|
1690
1769
|
highlightColor: {
|
|
@@ -1715,20 +1794,20 @@ const navigationMenu = (options) => ({
|
|
|
1715
1794
|
content: "data-[motion=from-start]:animate-[enter-from-left_200ms_ease] data-[motion=from-end]:animate-[enter-from-right_200ms_ease] data-[motion=to-start]:animate-[exit-to-left_200ms_ease] data-[motion=to-end]:animate-[exit-to-right_200ms_ease]"
|
|
1716
1795
|
},
|
|
1717
1796
|
vertical: {
|
|
1718
|
-
viewport: "sm:w-
|
|
1797
|
+
viewport: "sm:w-(--reka-navigation-menu-viewport-width) left-(--reka-navigation-menu-viewport-left)",
|
|
1719
1798
|
content: ""
|
|
1720
1799
|
}
|
|
1721
1800
|
},
|
|
1722
1801
|
active: {
|
|
1723
1802
|
true: {
|
|
1724
|
-
childLink: "bg-
|
|
1725
|
-
childLinkIcon: "text-
|
|
1803
|
+
childLink: "bg-(--ui-bg-elevated) text-(--ui-text-highlighted)",
|
|
1804
|
+
childLinkIcon: "text-(--ui-text)"
|
|
1726
1805
|
},
|
|
1727
1806
|
false: {
|
|
1728
|
-
link: "text-
|
|
1729
|
-
linkLeadingIcon: "text-
|
|
1730
|
-
childLink: ["hover:bg-
|
|
1731
|
-
childLinkIcon: ["text-
|
|
1807
|
+
link: "text-(--ui-text-muted)",
|
|
1808
|
+
linkLeadingIcon: "text-(--ui-text-dimmed)",
|
|
1809
|
+
childLink: ["hover:bg-(--ui-bg-elevated)/50 text-(--ui-text) hover:text-(--ui-text-highlighted)", options.theme.transitions && "transition-colors"],
|
|
1810
|
+
childLinkIcon: ["text-(--ui-text-dimmed) group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
1732
1811
|
}
|
|
1733
1812
|
},
|
|
1734
1813
|
disabled: {
|
|
@@ -1763,7 +1842,6 @@ const navigationMenu = (options) => ({
|
|
|
1763
1842
|
orientation: "horizontal",
|
|
1764
1843
|
highlight: true,
|
|
1765
1844
|
class: {
|
|
1766
|
-
item: "-mb-px",
|
|
1767
1845
|
link: ["after:absolute after:-bottom-2 after:inset-x-2.5 after:block after:h-px after:rounded-full", options.theme.transitions && "after:transition-colors"]
|
|
1768
1846
|
}
|
|
1769
1847
|
}, {
|
|
@@ -1778,8 +1856,8 @@ const navigationMenu = (options) => ({
|
|
|
1778
1856
|
active: false,
|
|
1779
1857
|
variant: "pill",
|
|
1780
1858
|
class: {
|
|
1781
|
-
link: ["hover:text-
|
|
1782
|
-
linkLeadingIcon: ["group-hover:text-
|
|
1859
|
+
link: ["hover:text-(--ui-text-highlighted) hover:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
1860
|
+
linkLeadingIcon: ["group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
1783
1861
|
}
|
|
1784
1862
|
}, {
|
|
1785
1863
|
disabled: false,
|
|
@@ -1787,8 +1865,8 @@ const navigationMenu = (options) => ({
|
|
|
1787
1865
|
variant: "pill",
|
|
1788
1866
|
orientation: "horizontal",
|
|
1789
1867
|
class: {
|
|
1790
|
-
link: "data-[state=open]:text-
|
|
1791
|
-
linkLeadingIcon: "group-data-[state=open]:text-
|
|
1868
|
+
link: "data-[state=open]:text-(--ui-text-highlighted)",
|
|
1869
|
+
linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
|
|
1792
1870
|
}
|
|
1793
1871
|
}, {
|
|
1794
1872
|
disabled: false,
|
|
@@ -1796,7 +1874,7 @@ const navigationMenu = (options) => ({
|
|
|
1796
1874
|
highlight: true,
|
|
1797
1875
|
orientation: "horizontal",
|
|
1798
1876
|
class: {
|
|
1799
|
-
link: "data-[state=open]:before:bg-
|
|
1877
|
+
link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
|
|
1800
1878
|
}
|
|
1801
1879
|
}, {
|
|
1802
1880
|
disabled: false,
|
|
@@ -1805,45 +1883,45 @@ const navigationMenu = (options) => ({
|
|
|
1805
1883
|
active: false,
|
|
1806
1884
|
orientation: "horizontal",
|
|
1807
1885
|
class: {
|
|
1808
|
-
link: "data-[state=open]:before:bg-
|
|
1886
|
+
link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
|
|
1809
1887
|
}
|
|
1810
1888
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
1811
1889
|
color,
|
|
1812
1890
|
variant: "pill",
|
|
1813
1891
|
active: true,
|
|
1814
1892
|
class: {
|
|
1815
|
-
link: `text-
|
|
1816
|
-
linkLeadingIcon: `text-
|
|
1893
|
+
link: `text-(--ui-${color})`,
|
|
1894
|
+
linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
|
|
1817
1895
|
}
|
|
1818
1896
|
})), {
|
|
1819
1897
|
color: "neutral",
|
|
1820
1898
|
variant: "pill",
|
|
1821
1899
|
active: true,
|
|
1822
1900
|
class: {
|
|
1823
|
-
link: "text-
|
|
1824
|
-
linkLeadingIcon: "text-
|
|
1901
|
+
link: "text-(--ui-text-highlighted)",
|
|
1902
|
+
linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
|
|
1825
1903
|
}
|
|
1826
1904
|
}, {
|
|
1827
1905
|
variant: "pill",
|
|
1828
1906
|
active: true,
|
|
1829
1907
|
highlight: false,
|
|
1830
1908
|
class: {
|
|
1831
|
-
link: "before:bg-
|
|
1909
|
+
link: "before:bg-(--ui-bg-elevated)"
|
|
1832
1910
|
}
|
|
1833
1911
|
}, {
|
|
1834
1912
|
variant: "pill",
|
|
1835
1913
|
active: true,
|
|
1836
1914
|
highlight: true,
|
|
1837
1915
|
class: {
|
|
1838
|
-
link: ["hover:before:bg-
|
|
1916
|
+
link: ["hover:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "before:transition-colors"]
|
|
1839
1917
|
}
|
|
1840
1918
|
}, {
|
|
1841
1919
|
disabled: false,
|
|
1842
1920
|
active: false,
|
|
1843
1921
|
variant: "link",
|
|
1844
1922
|
class: {
|
|
1845
|
-
link: ["hover:text-
|
|
1846
|
-
linkLeadingIcon: ["group-hover:text-
|
|
1923
|
+
link: ["hover:text-(--ui-text-highlighted)", options.theme.transitions && "transition-colors"],
|
|
1924
|
+
linkLeadingIcon: ["group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
1847
1925
|
}
|
|
1848
1926
|
}, {
|
|
1849
1927
|
disabled: false,
|
|
@@ -1851,24 +1929,24 @@ const navigationMenu = (options) => ({
|
|
|
1851
1929
|
variant: "link",
|
|
1852
1930
|
orientation: "horizontal",
|
|
1853
1931
|
class: {
|
|
1854
|
-
link: "data-[state=open]:text-
|
|
1855
|
-
linkLeadingIcon: "group-data-[state=open]:text-
|
|
1932
|
+
link: "data-[state=open]:text-(--ui-text-highlighted)",
|
|
1933
|
+
linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
|
|
1856
1934
|
}
|
|
1857
1935
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
1858
1936
|
color,
|
|
1859
1937
|
variant: "link",
|
|
1860
1938
|
active: true,
|
|
1861
1939
|
class: {
|
|
1862
|
-
link: `text-
|
|
1863
|
-
linkLeadingIcon: `text-
|
|
1940
|
+
link: `text-(--ui-${color})`,
|
|
1941
|
+
linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
|
|
1864
1942
|
}
|
|
1865
1943
|
})), {
|
|
1866
1944
|
color: "neutral",
|
|
1867
1945
|
variant: "link",
|
|
1868
1946
|
active: true,
|
|
1869
1947
|
class: {
|
|
1870
|
-
link: "text-
|
|
1871
|
-
linkLeadingIcon: "text-
|
|
1948
|
+
link: "text-(--ui-text-highlighted)",
|
|
1949
|
+
linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
|
|
1872
1950
|
}
|
|
1873
1951
|
}, ...(options.theme.colors || []).map((highlightColor) => ({
|
|
1874
1952
|
highlightColor,
|
|
@@ -1876,7 +1954,7 @@ const navigationMenu = (options) => ({
|
|
|
1876
1954
|
level: true,
|
|
1877
1955
|
active: true,
|
|
1878
1956
|
class: {
|
|
1879
|
-
link: `after:bg-
|
|
1957
|
+
link: `after:bg-(--ui-${highlightColor})`
|
|
1880
1958
|
}
|
|
1881
1959
|
})), {
|
|
1882
1960
|
highlightColor: "neutral",
|
|
@@ -1884,13 +1962,13 @@ const navigationMenu = (options) => ({
|
|
|
1884
1962
|
level: true,
|
|
1885
1963
|
active: true,
|
|
1886
1964
|
class: {
|
|
1887
|
-
link: "after:bg-
|
|
1965
|
+
link: "after:bg-(--ui-bg-inverted)"
|
|
1888
1966
|
}
|
|
1889
1967
|
}, {
|
|
1890
1968
|
orientation: "vertical",
|
|
1891
1969
|
collapsed: false,
|
|
1892
1970
|
class: {
|
|
1893
|
-
childList: "ms-5 border-s border-
|
|
1971
|
+
childList: "ms-5 border-s border-(--ui-border)",
|
|
1894
1972
|
childItem: "ps-1.5 -ms-px"
|
|
1895
1973
|
}
|
|
1896
1974
|
}, {
|
|
@@ -1919,7 +1997,7 @@ const pagination = {
|
|
|
1919
1997
|
const pinInput = (options) => ({
|
|
1920
1998
|
slots: {
|
|
1921
1999
|
root: "relative inline-flex items-center gap-1.5",
|
|
1922
|
-
base: ["rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-
|
|
2000
|
+
base: ["rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-(--ui-text-dimmed) text-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"]
|
|
1923
2001
|
},
|
|
1924
2002
|
variants: {
|
|
1925
2003
|
size: {
|
|
@@ -1940,11 +2018,11 @@ const pinInput = (options) => ({
|
|
|
1940
2018
|
}
|
|
1941
2019
|
},
|
|
1942
2020
|
variant: {
|
|
1943
|
-
outline: "text-
|
|
1944
|
-
soft: "text-
|
|
1945
|
-
subtle: "text-
|
|
1946
|
-
ghost: "text-
|
|
1947
|
-
none: "text-
|
|
2021
|
+
outline: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented)",
|
|
2022
|
+
soft: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50 hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-(--ui-bg-elevated)/50",
|
|
2023
|
+
subtle: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated) ring ring-inset ring-(--ui-border-accented)",
|
|
2024
|
+
ghost: "text-(--ui-text-highlighted) bg-transparent hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-transparent dark:disabled:bg-transparent",
|
|
2025
|
+
none: "text-(--ui-text-highlighted) bg-transparent"
|
|
1948
2026
|
},
|
|
1949
2027
|
color: {
|
|
1950
2028
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
@@ -1957,19 +2035,19 @@ const pinInput = (options) => ({
|
|
|
1957
2035
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1958
2036
|
color,
|
|
1959
2037
|
variant: ["outline", "subtle"],
|
|
1960
|
-
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
2038
|
+
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
|
|
1961
2039
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1962
2040
|
color,
|
|
1963
2041
|
highlight: true,
|
|
1964
|
-
class: `ring ring-inset ring-
|
|
2042
|
+
class: `ring ring-inset ring-(--ui-${color})`
|
|
1965
2043
|
})), {
|
|
1966
2044
|
color: "neutral",
|
|
1967
2045
|
variant: ["outline", "subtle"],
|
|
1968
|
-
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
2046
|
+
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
|
|
1969
2047
|
}, {
|
|
1970
2048
|
color: "neutral",
|
|
1971
2049
|
highlight: true,
|
|
1972
|
-
class: "ring ring-inset ring-
|
|
2050
|
+
class: "ring ring-inset ring-(--ui-border-inverted)"
|
|
1973
2051
|
}],
|
|
1974
2052
|
defaultVariants: {
|
|
1975
2053
|
size: "md",
|
|
@@ -1980,17 +2058,17 @@ const pinInput = (options) => ({
|
|
|
1980
2058
|
|
|
1981
2059
|
const popover = {
|
|
1982
2060
|
slots: {
|
|
1983
|
-
content: "bg-
|
|
1984
|
-
arrow: "fill-
|
|
2061
|
+
content: "bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] focus:outline-none pointer-events-auto",
|
|
2062
|
+
arrow: "fill-(--ui-border)"
|
|
1985
2063
|
}
|
|
1986
2064
|
};
|
|
1987
2065
|
|
|
1988
2066
|
const progress = (options) => ({
|
|
1989
2067
|
slots: {
|
|
1990
2068
|
root: "gap-2",
|
|
1991
|
-
base: "relative overflow-hidden rounded-full bg-
|
|
2069
|
+
base: "relative overflow-hidden rounded-full bg-(--ui-bg-accented)",
|
|
1992
2070
|
indicator: "rounded-full size-full transition-transform duration-200 ease-out",
|
|
1993
|
-
status: "flex justify-end text-
|
|
2071
|
+
status: "flex justify-end text-(--ui-text-dimmed) transition-[width] duration-200",
|
|
1994
2072
|
steps: "grid items-end",
|
|
1995
2073
|
step: "truncate text-end row-start-1 col-start-1 transition-opacity"
|
|
1996
2074
|
},
|
|
@@ -2003,12 +2081,12 @@ const progress = (options) => ({
|
|
|
2003
2081
|
},
|
|
2004
2082
|
color: {
|
|
2005
2083
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2006
|
-
indicator: `bg-
|
|
2007
|
-
steps: `text-
|
|
2084
|
+
indicator: `bg-(--ui-${color})`,
|
|
2085
|
+
steps: `text-(--ui-${color})`
|
|
2008
2086
|
}])),
|
|
2009
2087
|
neutral: {
|
|
2010
|
-
indicator: "bg-
|
|
2011
|
-
steps: "text-
|
|
2088
|
+
indicator: "bg-(--ui-bg-inverted)",
|
|
2089
|
+
steps: "text-(--ui-bg)"
|
|
2012
2090
|
}
|
|
2013
2091
|
},
|
|
2014
2092
|
size: {
|
|
@@ -2046,7 +2124,7 @@ const progress = (options) => ({
|
|
|
2046
2124
|
step: "opacity-100"
|
|
2047
2125
|
},
|
|
2048
2126
|
first: {
|
|
2049
|
-
step: "opacity-100 text-
|
|
2127
|
+
step: "opacity-100 text-(--ui-text-muted)"
|
|
2050
2128
|
},
|
|
2051
2129
|
other: {
|
|
2052
2130
|
step: "opacity-0"
|
|
@@ -2203,24 +2281,24 @@ const radioGroup = (options) => ({
|
|
|
2203
2281
|
slots: {
|
|
2204
2282
|
root: "relative",
|
|
2205
2283
|
fieldset: "flex",
|
|
2206
|
-
legend: "mb-1 block font-medium text-
|
|
2284
|
+
legend: "mb-1 block font-medium text-(--ui-text)",
|
|
2207
2285
|
item: "flex items-start",
|
|
2208
|
-
base: "rounded-full ring ring-inset ring-
|
|
2209
|
-
indicator: "flex items-center justify-center size-full rounded-full after:bg-
|
|
2286
|
+
base: "rounded-full ring ring-inset ring-(--ui-border-accented) focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
2287
|
+
indicator: "flex items-center justify-center size-full rounded-full after:bg-(--ui-bg) after:rounded-full",
|
|
2210
2288
|
container: "flex items-center",
|
|
2211
2289
|
wrapper: "ms-2",
|
|
2212
|
-
label: "block font-medium text-
|
|
2213
|
-
description: "text-
|
|
2290
|
+
label: "block font-medium text-(--ui-text)",
|
|
2291
|
+
description: "text-(--ui-text-muted)"
|
|
2214
2292
|
},
|
|
2215
2293
|
variants: {
|
|
2216
2294
|
color: {
|
|
2217
2295
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2218
|
-
base: `focus-visible:outline-
|
|
2219
|
-
indicator: `bg-
|
|
2296
|
+
base: `focus-visible:outline-(--ui-${color})`,
|
|
2297
|
+
indicator: `bg-(--ui-${color})`
|
|
2220
2298
|
}])),
|
|
2221
2299
|
neutral: {
|
|
2222
|
-
base: "focus-visible:outline-
|
|
2223
|
-
indicator: "bg-
|
|
2300
|
+
base: "focus-visible:outline-(--ui-border-inverted)",
|
|
2301
|
+
indicator: "bg-(--ui-bg-inverted)"
|
|
2224
2302
|
}
|
|
2225
2303
|
},
|
|
2226
2304
|
orientation: {
|
|
@@ -2282,7 +2360,7 @@ const radioGroup = (options) => ({
|
|
|
2282
2360
|
},
|
|
2283
2361
|
required: {
|
|
2284
2362
|
true: {
|
|
2285
|
-
legend: "after:content-['*'] after:ms-0.5 after:text-
|
|
2363
|
+
legend: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
|
|
2286
2364
|
}
|
|
2287
2365
|
}
|
|
2288
2366
|
},
|
|
@@ -2298,16 +2376,16 @@ const select = (options) => {
|
|
|
2298
2376
|
root: () => undefined,
|
|
2299
2377
|
base: () => ["relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
|
|
2300
2378
|
value: "truncate pointer-events-none",
|
|
2301
|
-
placeholder: "truncate text-
|
|
2302
|
-
arrow: "fill-
|
|
2303
|
-
content: "max-h-60 w-
|
|
2304
|
-
viewport: "divide-y divide-
|
|
2379
|
+
placeholder: "truncate text-(--ui-text-dimmed)",
|
|
2380
|
+
arrow: "fill-(--ui-border)",
|
|
2381
|
+
content: "max-h-60 w-(--reka-popper-anchor-width) bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] pointer-events-auto",
|
|
2382
|
+
viewport: "divide-y divide-(--ui-border) scroll-py-1",
|
|
2305
2383
|
group: "p-1 isolate",
|
|
2306
|
-
empty: "py-2 text-center text-sm text-
|
|
2307
|
-
label: "font-semibold text-
|
|
2308
|
-
separator: "-mx-1 my-1 h-px bg-
|
|
2309
|
-
item: ["group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75 text-
|
|
2310
|
-
itemLeadingIcon: ["shrink-0 text-
|
|
2384
|
+
empty: "py-2 text-center text-sm text-(--ui-text-muted)",
|
|
2385
|
+
label: "font-semibold text-(--ui-text-highlighted)",
|
|
2386
|
+
separator: "-mx-1 my-1 h-px bg-(--ui-border)",
|
|
2387
|
+
item: ["group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75 text-(--ui-text) data-highlighted:text-(--ui-text-highlighted) data-highlighted:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
2388
|
+
itemLeadingIcon: ["shrink-0 text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"],
|
|
2311
2389
|
itemLeadingAvatar: "shrink-0",
|
|
2312
2390
|
itemLeadingAvatarSize: "",
|
|
2313
2391
|
itemLeadingChip: "shrink-0",
|
|
@@ -2372,7 +2450,8 @@ const select = (options) => {
|
|
|
2372
2450
|
const selectMenu = (options) => {
|
|
2373
2451
|
return defu({
|
|
2374
2452
|
slots: {
|
|
2375
|
-
input: "border-b border-
|
|
2453
|
+
input: "border-b border-(--ui-border)",
|
|
2454
|
+
focusScope: "flex flex-col min-h-0"
|
|
2376
2455
|
}
|
|
2377
2456
|
}, select(options));
|
|
2378
2457
|
};
|
|
@@ -2381,7 +2460,7 @@ const separator = (options) => ({
|
|
|
2381
2460
|
slots: {
|
|
2382
2461
|
root: "flex items-center align-center text-center",
|
|
2383
2462
|
border: "",
|
|
2384
|
-
container: "font-medium text-
|
|
2463
|
+
container: "font-medium text-(--ui-text) flex",
|
|
2385
2464
|
icon: "shrink-0 size-5",
|
|
2386
2465
|
avatar: "shrink-0",
|
|
2387
2466
|
avatarSize: "2xs",
|
|
@@ -2389,8 +2468,8 @@ const separator = (options) => ({
|
|
|
2389
2468
|
},
|
|
2390
2469
|
variants: {
|
|
2391
2470
|
color: {
|
|
2392
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-
|
|
2393
|
-
neutral: { border: "border-
|
|
2471
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-(--ui-${color})` }])),
|
|
2472
|
+
neutral: { border: "border-(--ui-border)" }
|
|
2394
2473
|
},
|
|
2395
2474
|
orientation: {
|
|
2396
2475
|
horizontal: {
|
|
@@ -2472,18 +2551,18 @@ const separator = (options) => ({
|
|
|
2472
2551
|
});
|
|
2473
2552
|
|
|
2474
2553
|
const skeleton = {
|
|
2475
|
-
base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-
|
|
2554
|
+
base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-(--ui-bg-elevated)"
|
|
2476
2555
|
};
|
|
2477
2556
|
|
|
2478
2557
|
const slideover = {
|
|
2479
2558
|
slots: {
|
|
2480
|
-
overlay: "fixed inset-0 bg-
|
|
2481
|
-
content: "fixed bg-
|
|
2559
|
+
overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
|
|
2560
|
+
content: "fixed bg-(--ui-bg) divide-y divide-(--ui-border) sm:ring ring-(--ui-border) sm:shadow-lg flex flex-col focus:outline-none",
|
|
2482
2561
|
header: "px-4 py-5 sm:px-6",
|
|
2483
2562
|
body: "flex-1 overflow-y-auto p-4 sm:p-6",
|
|
2484
2563
|
footer: "flex items-center gap-1.5 p-4 sm:px-6",
|
|
2485
|
-
title: "text-
|
|
2486
|
-
description: "mt-1 text-
|
|
2564
|
+
title: "text-(--ui-text-highlighted) font-semibold",
|
|
2565
|
+
description: "mt-1 text-(--ui-text-muted) text-sm",
|
|
2487
2566
|
close: "absolute top-4 end-4"
|
|
2488
2567
|
},
|
|
2489
2568
|
variants: {
|
|
@@ -2537,19 +2616,19 @@ const slideover = {
|
|
|
2537
2616
|
const slider = (options) => ({
|
|
2538
2617
|
slots: {
|
|
2539
2618
|
root: "relative flex items-center select-none touch-none",
|
|
2540
|
-
track: "relative bg-
|
|
2619
|
+
track: "relative bg-(--ui-bg-accented) overflow-hidden rounded-full grow",
|
|
2541
2620
|
range: "absolute rounded-full",
|
|
2542
|
-
thumb: "rounded-full bg-
|
|
2621
|
+
thumb: "rounded-full bg-(--ui-bg) ring-2 focus-visible:outline-2 focus-visible:outline-offset-2"
|
|
2543
2622
|
},
|
|
2544
2623
|
variants: {
|
|
2545
2624
|
color: {
|
|
2546
2625
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2547
|
-
range: `bg-
|
|
2548
|
-
thumb: `ring-
|
|
2626
|
+
range: `bg-(--ui-${color})`,
|
|
2627
|
+
thumb: `ring-(--ui-${color}) focus-visible:outline-(--ui-${color})/50`
|
|
2549
2628
|
}])),
|
|
2550
2629
|
neutral: {
|
|
2551
|
-
range: "bg-
|
|
2552
|
-
thumb: "ring-
|
|
2630
|
+
range: "bg-(--ui-bg-inverted)",
|
|
2631
|
+
thumb: "ring-(--ui-border-inverted) focus-visible:outline-(--ui-border-inverted)/50"
|
|
2553
2632
|
}
|
|
2554
2633
|
},
|
|
2555
2634
|
size: {
|
|
@@ -2658,13 +2737,13 @@ const stepper = (options) => ({
|
|
|
2658
2737
|
header: "flex",
|
|
2659
2738
|
item: "group text-center relative w-full",
|
|
2660
2739
|
container: "relative",
|
|
2661
|
-
trigger: "rounded-full font-medium text-center align-middle flex items-center justify-center font-semibold group-data-[state=completed]:text-
|
|
2740
|
+
trigger: "rounded-full font-medium text-center align-middle flex items-center justify-center font-semibold group-data-[state=completed]:text-(--ui-bg) group-data-[state=active]:text-(--ui-bg) text-(--ui-text-muted) bg-(--ui-bg-elevated) focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
2662
2741
|
indicator: "flex items-center justify-center size-full",
|
|
2663
2742
|
icon: "shrink-0",
|
|
2664
|
-
separator: "absolute rounded-full group-data-[disabled]:opacity-75 bg-
|
|
2743
|
+
separator: "absolute rounded-full group-data-[disabled]:opacity-75 bg-(--ui-border-accented)",
|
|
2665
2744
|
wrapper: "",
|
|
2666
|
-
title: "font-medium text-
|
|
2667
|
-
description: "text-
|
|
2745
|
+
title: "font-medium text-(--ui-text)",
|
|
2746
|
+
description: "text-(--ui-text-muted) text-wrap",
|
|
2668
2747
|
content: "size-full"
|
|
2669
2748
|
},
|
|
2670
2749
|
variants: {
|
|
@@ -2720,12 +2799,12 @@ const stepper = (options) => ({
|
|
|
2720
2799
|
},
|
|
2721
2800
|
color: {
|
|
2722
2801
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2723
|
-
trigger: `group-data-[state=completed]:bg-
|
|
2724
|
-
separator: `group-data-[state=completed]:bg-
|
|
2802
|
+
trigger: `group-data-[state=completed]:bg-(--ui-${color}) group-data-[state=active]:bg-(--ui-${color}) focus-visible:outline-(--ui-${color})`,
|
|
2803
|
+
separator: `group-data-[state=completed]:bg-(--ui-${color})`
|
|
2725
2804
|
}])),
|
|
2726
2805
|
neutral: {
|
|
2727
|
-
trigger: `group-data-[state=completed]:bg-
|
|
2728
|
-
separator: `group-data-[state=completed]:bg-
|
|
2806
|
+
trigger: `group-data-[state=completed]:bg-(--ui-bg-inverted) group-data-[state=active]:bg-(--ui-bg-inverted) focus-visible:outline-(--ui-border-inverted)`,
|
|
2807
|
+
separator: `group-data-[state=completed]:bg-(--ui-bg-inverted)`
|
|
2729
2808
|
}
|
|
2730
2809
|
}
|
|
2731
2810
|
},
|
|
@@ -2779,23 +2858,23 @@ const stepper = (options) => ({
|
|
|
2779
2858
|
const _switch = (options) => ({
|
|
2780
2859
|
slots: {
|
|
2781
2860
|
root: "relative flex items-start",
|
|
2782
|
-
base: ["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-
|
|
2861
|
+
base: ["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-(--ui-bg-accented)", options.theme.transitions && "transition-colors duration-200"],
|
|
2783
2862
|
container: "flex items-center",
|
|
2784
|
-
thumb: "group pointer-events-none rounded-full bg-
|
|
2785
|
-
icon: ["absolute shrink-0 group-data-[state=unchecked]:text-
|
|
2863
|
+
thumb: "group pointer-events-none rounded-full bg-(--ui-bg) 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",
|
|
2864
|
+
icon: ["absolute shrink-0 group-data-[state=unchecked]:text-(--ui-text-dimmed) opacity-0 size-10/12", options.theme.transitions && "transition-[color,opacity] duration-200"],
|
|
2786
2865
|
wrapper: "ms-2",
|
|
2787
|
-
label: "block font-medium text-
|
|
2788
|
-
description: "text-
|
|
2866
|
+
label: "block font-medium text-(--ui-text)",
|
|
2867
|
+
description: "text-(--ui-text-muted)"
|
|
2789
2868
|
},
|
|
2790
2869
|
variants: {
|
|
2791
2870
|
color: {
|
|
2792
2871
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2793
|
-
base: `data-[state=checked]:bg-
|
|
2794
|
-
icon: `group-data-[state=checked]:text-
|
|
2872
|
+
base: `data-[state=checked]:bg-(--ui-${color}) focus-visible:outline-(--ui-${color})`,
|
|
2873
|
+
icon: `group-data-[state=checked]:text-(--ui-${color})`
|
|
2795
2874
|
}])),
|
|
2796
2875
|
neutral: {
|
|
2797
|
-
base: "data-[state=checked]:bg-
|
|
2798
|
-
icon: "group-data-[state=checked]:text-
|
|
2876
|
+
base: "data-[state=checked]:bg-(--ui-bg-inverted) focus-visible:outline-(--ui-border-inverted)",
|
|
2877
|
+
icon: "group-data-[state=checked]:text-(--ui-text-highlighted)"
|
|
2799
2878
|
}
|
|
2800
2879
|
},
|
|
2801
2880
|
size: {
|
|
@@ -2847,7 +2926,7 @@ const _switch = (options) => ({
|
|
|
2847
2926
|
},
|
|
2848
2927
|
required: {
|
|
2849
2928
|
true: {
|
|
2850
|
-
label: "after:content-['*'] after:ms-0.5 after:text-
|
|
2929
|
+
label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
|
|
2851
2930
|
}
|
|
2852
2931
|
},
|
|
2853
2932
|
disabled: {
|
|
@@ -2869,23 +2948,23 @@ const table = (options) => ({
|
|
|
2869
2948
|
root: "relative overflow-auto",
|
|
2870
2949
|
base: "min-w-full overflow-clip",
|
|
2871
2950
|
caption: "sr-only",
|
|
2872
|
-
thead: "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-
|
|
2873
|
-
tbody: "divide-y divide-
|
|
2874
|
-
tr: "data-[selected=true]:bg-
|
|
2875
|
-
th: "px-4 py-3.5 text-sm text-
|
|
2876
|
-
td: "p-4 text-sm text-
|
|
2877
|
-
empty: "py-6 text-center text-sm text-
|
|
2951
|
+
thead: "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-(--ui-border-accented)",
|
|
2952
|
+
tbody: "divide-y divide-(--ui-border)",
|
|
2953
|
+
tr: "data-[selected=true]:bg-(--ui-bg-elevated)/50",
|
|
2954
|
+
th: "px-4 py-3.5 text-sm text-(--ui-text-highlighted) text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",
|
|
2955
|
+
td: "p-4 text-sm text-(--ui-text-muted) whitespace-nowrap [&:has([role=checkbox])]:pe-0",
|
|
2956
|
+
empty: "py-6 text-center text-sm text-(--ui-text-muted)"
|
|
2878
2957
|
},
|
|
2879
2958
|
variants: {
|
|
2880
2959
|
pinned: {
|
|
2881
2960
|
true: {
|
|
2882
|
-
th: "sticky bg-
|
|
2883
|
-
td: "sticky bg-
|
|
2961
|
+
th: "sticky bg-(--ui-bg)/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
|
|
2962
|
+
td: "sticky bg-(--ui-bg)/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0"
|
|
2884
2963
|
}
|
|
2885
2964
|
},
|
|
2886
2965
|
sticky: {
|
|
2887
2966
|
true: {
|
|
2888
|
-
thead: "sticky top-0 inset-x-0 bg-
|
|
2967
|
+
thead: "sticky top-0 inset-x-0 bg-(--ui-bg)/75 z-[1] backdrop-blur"
|
|
2889
2968
|
}
|
|
2890
2969
|
},
|
|
2891
2970
|
loading: {
|
|
@@ -2908,13 +2987,13 @@ const table = (options) => ({
|
|
|
2908
2987
|
loading: true,
|
|
2909
2988
|
loadingColor,
|
|
2910
2989
|
class: {
|
|
2911
|
-
thead: `after:bg-
|
|
2990
|
+
thead: `after:bg-(--ui-${loadingColor})`
|
|
2912
2991
|
}
|
|
2913
2992
|
})), {
|
|
2914
2993
|
loading: true,
|
|
2915
2994
|
loadingColor: "neutral",
|
|
2916
2995
|
class: {
|
|
2917
|
-
thead: "after:bg-
|
|
2996
|
+
thead: "after:bg-(--ui-bg-inverted)"
|
|
2918
2997
|
}
|
|
2919
2998
|
}, {
|
|
2920
2999
|
loading: true,
|
|
@@ -2952,7 +3031,7 @@ const tabs = (options) => ({
|
|
|
2952
3031
|
root: "flex items-center gap-2",
|
|
2953
3032
|
list: "relative flex p-1 group",
|
|
2954
3033
|
indicator: "absolute transition-[translate,width] duration-200",
|
|
2955
|
-
trigger: ["group relative inline-flex items-center shrink-0 min-w-0 data-[state=inactive]:text-
|
|
3034
|
+
trigger: ["group relative inline-flex items-center shrink-0 min-w-0 data-[state=inactive]:text-(--ui-text-muted) hover:data-[state=inactive]:not-disabled:text-(--ui-text) font-medium rounded-[calc(var(--ui-radius)*1.5)] disabled:cursor-not-allowed disabled:opacity-75 focus:outline-hidden", options.theme.transitions && "transition-colors"],
|
|
2956
3035
|
content: "focus:outline-none w-full",
|
|
2957
3036
|
leadingIcon: "shrink-0",
|
|
2958
3037
|
leadingAvatar: "shrink-0",
|
|
@@ -2966,12 +3045,12 @@ const tabs = (options) => ({
|
|
|
2966
3045
|
},
|
|
2967
3046
|
variant: {
|
|
2968
3047
|
pill: {
|
|
2969
|
-
list: "bg-
|
|
3048
|
+
list: "bg-(--ui-bg-elevated) rounded-[calc(var(--ui-radius)*2)]",
|
|
2970
3049
|
trigger: "flex-1 w-full",
|
|
2971
3050
|
indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-xs"
|
|
2972
3051
|
},
|
|
2973
3052
|
link: {
|
|
2974
|
-
list: "border-
|
|
3053
|
+
list: "border-(--ui-border)",
|
|
2975
3054
|
indicator: "rounded-full"
|
|
2976
3055
|
}
|
|
2977
3056
|
},
|
|
@@ -2979,12 +3058,12 @@ const tabs = (options) => ({
|
|
|
2979
3058
|
horizontal: {
|
|
2980
3059
|
root: "flex-col",
|
|
2981
3060
|
list: "w-full",
|
|
2982
|
-
indicator: "left-0 w-
|
|
3061
|
+
indicator: "left-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position)",
|
|
2983
3062
|
trigger: "justify-center"
|
|
2984
3063
|
},
|
|
2985
3064
|
vertical: {
|
|
2986
3065
|
list: "flex-col",
|
|
2987
|
-
indicator: "top-0 h-
|
|
3066
|
+
indicator: "top-0 h-(--reka-tabs-indicator-size) translate-y-(--reka-tabs-indicator-position)"
|
|
2988
3067
|
}
|
|
2989
3068
|
},
|
|
2990
3069
|
size: {
|
|
@@ -3046,29 +3125,29 @@ const tabs = (options) => ({
|
|
|
3046
3125
|
color,
|
|
3047
3126
|
variant: "pill",
|
|
3048
3127
|
class: {
|
|
3049
|
-
indicator: `bg-
|
|
3050
|
-
trigger: `data-[state=active]:text-
|
|
3128
|
+
indicator: `bg-(--ui-${color})`,
|
|
3129
|
+
trigger: `data-[state=active]:text-(--ui-bg) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-${color})`
|
|
3051
3130
|
}
|
|
3052
3131
|
})), {
|
|
3053
3132
|
color: "neutral",
|
|
3054
3133
|
variant: "pill",
|
|
3055
3134
|
class: {
|
|
3056
|
-
indicator: "bg-
|
|
3057
|
-
trigger: "data-[state=active]:text-
|
|
3135
|
+
indicator: "bg-(--ui-bg-inverted)",
|
|
3136
|
+
trigger: "data-[state=active]:text-(--ui-bg) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-border-inverted)"
|
|
3058
3137
|
}
|
|
3059
3138
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
3060
3139
|
color,
|
|
3061
3140
|
variant: "link",
|
|
3062
3141
|
class: {
|
|
3063
|
-
indicator: `bg-
|
|
3064
|
-
trigger: `data-[state=active]:text-
|
|
3142
|
+
indicator: `bg-(--ui-${color})`,
|
|
3143
|
+
trigger: `data-[state=active]:text-(--ui-${color}) focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
|
|
3065
3144
|
}
|
|
3066
3145
|
})), {
|
|
3067
3146
|
color: "neutral",
|
|
3068
3147
|
variant: "link",
|
|
3069
3148
|
class: {
|
|
3070
|
-
indicator: "bg-
|
|
3071
|
-
trigger: "data-[state=active]:text-
|
|
3149
|
+
indicator: "bg-(--ui-bg-inverted)",
|
|
3150
|
+
trigger: "data-[state=active]:text-(--ui-text-highlighted) focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
|
|
3072
3151
|
}
|
|
3073
3152
|
}],
|
|
3074
3153
|
defaultVariants: {
|
|
@@ -3084,38 +3163,43 @@ const textarea = (options) => {
|
|
|
3084
3163
|
|
|
3085
3164
|
const toast = (options) => ({
|
|
3086
3165
|
slots: {
|
|
3087
|
-
root: "relative group overflow-hidden bg-
|
|
3088
|
-
wrapper: "w-0 flex-1 flex flex-col
|
|
3089
|
-
title: "text-sm font-medium text-
|
|
3090
|
-
description: "text-sm text-
|
|
3166
|
+
root: "relative group overflow-hidden bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*2)] ring ring-(--ui-border) p-4 flex gap-2.5 focus:outline-none",
|
|
3167
|
+
wrapper: "w-0 flex-1 flex flex-col",
|
|
3168
|
+
title: "text-sm font-medium text-(--ui-text-highlighted)",
|
|
3169
|
+
description: "text-sm text-(--ui-text-muted)",
|
|
3091
3170
|
icon: "shrink-0 size-5",
|
|
3092
3171
|
avatar: "shrink-0",
|
|
3093
3172
|
avatarSize: "2xl",
|
|
3094
3173
|
actions: "flex gap-1.5 shrink-0",
|
|
3095
3174
|
progress: "absolute inset-x-0 bottom-0 h-1 z-[-1]",
|
|
3096
|
-
close: "p-0
|
|
3175
|
+
close: "p-0"
|
|
3097
3176
|
},
|
|
3098
3177
|
variants: {
|
|
3099
3178
|
color: {
|
|
3100
3179
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
3101
|
-
root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
3102
|
-
icon: `text-
|
|
3103
|
-
progress: `bg-
|
|
3180
|
+
root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`,
|
|
3181
|
+
icon: `text-(--ui-${color})`,
|
|
3182
|
+
progress: `bg-(--ui-${color})`
|
|
3104
3183
|
}])),
|
|
3105
3184
|
neutral: {
|
|
3106
|
-
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
3107
|
-
icon: "text-
|
|
3108
|
-
progress: "bg-
|
|
3185
|
+
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)",
|
|
3186
|
+
icon: "text-(--ui-text-highlighted)",
|
|
3187
|
+
progress: "bg-(--ui-bg-inverted)"
|
|
3109
3188
|
}
|
|
3110
3189
|
},
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
root: "items-start",
|
|
3114
|
-
actions: "items-start mt-1"
|
|
3115
|
-
},
|
|
3116
|
-
false: {
|
|
3190
|
+
orientation: {
|
|
3191
|
+
horizontal: {
|
|
3117
3192
|
root: "items-center",
|
|
3118
3193
|
actions: "items-center"
|
|
3194
|
+
},
|
|
3195
|
+
vertical: {
|
|
3196
|
+
root: "items-start",
|
|
3197
|
+
actions: "items-start mt-2.5"
|
|
3198
|
+
}
|
|
3199
|
+
},
|
|
3200
|
+
title: {
|
|
3201
|
+
true: {
|
|
3202
|
+
description: "mt-1"
|
|
3119
3203
|
}
|
|
3120
3204
|
}
|
|
3121
3205
|
},
|
|
@@ -3126,8 +3210,8 @@ const toast = (options) => ({
|
|
|
3126
3210
|
|
|
3127
3211
|
const toaster = {
|
|
3128
3212
|
slots: {
|
|
3129
|
-
viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-
|
|
3130
|
-
base: "pointer-events-auto absolute inset-x-0 z-
|
|
3213
|
+
viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-(--height) focus:outline-none",
|
|
3214
|
+
base: "pointer-events-auto absolute inset-x-0 z-(--index) transform-(--transform) data-[expanded=false]:data-[front=false]:h-(--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"
|
|
3131
3215
|
},
|
|
3132
3216
|
variants: {
|
|
3133
3217
|
position: {
|
|
@@ -3171,10 +3255,10 @@ const toaster = {
|
|
|
3171
3255
|
}
|
|
3172
3256
|
}, {
|
|
3173
3257
|
swipeDirection: ["left", "right"],
|
|
3174
|
-
class: "data-[swipe=move]:translate-x-
|
|
3258
|
+
class: "data-[swipe=move]:translate-x-(--reka-toast-swipe-move-x) data-[swipe=end]:translate-x-(--reka-toast-swipe-end-x) data-[swipe=cancel]:translate-x-0"
|
|
3175
3259
|
}, {
|
|
3176
3260
|
swipeDirection: ["up", "down"],
|
|
3177
|
-
class: "data-[swipe=move]:translate-y-
|
|
3261
|
+
class: "data-[swipe=move]:translate-y-(--reka-toast-swipe-move-y) data-[swipe=end]:translate-y-(--reka-toast-swipe-end-y) data-[swipe=cancel]:translate-y-0"
|
|
3178
3262
|
}],
|
|
3179
3263
|
defaultVariants: {
|
|
3180
3264
|
position: "bottom-right"
|
|
@@ -3183,8 +3267,8 @@ const toaster = {
|
|
|
3183
3267
|
|
|
3184
3268
|
const tooltip = {
|
|
3185
3269
|
slots: {
|
|
3186
|
-
content: "flex items-center gap-1 bg-
|
|
3187
|
-
arrow: "fill-
|
|
3270
|
+
content: "flex items-center gap-1 bg-(--ui-bg) text-(--ui-text-highlighted) shadow-sm rounded-(--ui-radius) ring ring-(--ui-border) h-6 px-2 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] pointer-events-auto",
|
|
3271
|
+
arrow: "fill-(--ui-border)",
|
|
3188
3272
|
text: "truncate",
|
|
3189
3273
|
kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:me-0.5`,
|
|
3190
3274
|
kbdsSize: "sm"
|
|
@@ -3283,6 +3367,25 @@ function getTemplates(options, uiConfig) {
|
|
|
3283
3367
|
}
|
|
3284
3368
|
});
|
|
3285
3369
|
}
|
|
3370
|
+
templates.push({
|
|
3371
|
+
filename: "ui.css",
|
|
3372
|
+
write: true,
|
|
3373
|
+
getContents: () => `@theme default {
|
|
3374
|
+
--color-old-neutral-50: ${colors.neutral[50]};
|
|
3375
|
+
--color-old-neutral-100: ${colors.neutral[100]};
|
|
3376
|
+
--color-old-neutral-200: ${colors.neutral[200]};
|
|
3377
|
+
--color-old-neutral-300: ${colors.neutral[300]};
|
|
3378
|
+
--color-old-neutral-400: ${colors.neutral[400]};
|
|
3379
|
+
--color-old-neutral-500: ${colors.neutral[500]};
|
|
3380
|
+
--color-old-neutral-600: ${colors.neutral[600]};
|
|
3381
|
+
--color-old-neutral-700: ${colors.neutral[700]};
|
|
3382
|
+
--color-old-neutral-800: ${colors.neutral[800]};
|
|
3383
|
+
--color-old-neutral-900: ${colors.neutral[900]};
|
|
3384
|
+
--color-old-neutral-950: ${colors.neutral[950]};
|
|
3385
|
+
${[...options.theme?.colors || [], "neutral"].map((color) => [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950].map((shade) => `--color-${color}-${shade}: var(--ui-color-${color}-${shade});`).join("\n ")).join("\n ")}
|
|
3386
|
+
}
|
|
3387
|
+
`
|
|
3388
|
+
});
|
|
3286
3389
|
templates.push({
|
|
3287
3390
|
filename: "ui/index.ts",
|
|
3288
3391
|
write: true,
|
|
@@ -3291,7 +3394,7 @@ function getTemplates(options, uiConfig) {
|
|
|
3291
3394
|
templates.push({
|
|
3292
3395
|
filename: "types/ui.d.ts",
|
|
3293
3396
|
getContents: () => `import * as ui from '#build/ui'
|
|
3294
|
-
import type { DeepPartial } from '
|
|
3397
|
+
import type { DeepPartial } from '@nuxt/ui'
|
|
3295
3398
|
import type { defaultConfig } from 'tailwind-variants'
|
|
3296
3399
|
import colors from 'tailwindcss/colors'
|
|
3297
3400
|
|