@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
|
@@ -5,6 +5,11 @@ require('node:url');
|
|
|
5
5
|
const scule = require('scule');
|
|
6
6
|
const kit = require('@nuxt/kit');
|
|
7
7
|
const defu = require('defu');
|
|
8
|
+
const colors = require('tailwindcss/colors');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
11
|
+
|
|
12
|
+
const colors__default = /*#__PURE__*/_interopDefaultCompat(colors);
|
|
8
13
|
|
|
9
14
|
const icons = {
|
|
10
15
|
arrowLeft: "i-lucide-arrow-left",
|
|
@@ -56,9 +61,9 @@ const resolveColors = (colors) => {
|
|
|
56
61
|
const accordion = {
|
|
57
62
|
slots: {
|
|
58
63
|
root: "w-full",
|
|
59
|
-
item: "border-b border-
|
|
64
|
+
item: "border-b border-(--ui-border) last:border-b-0",
|
|
60
65
|
header: "flex",
|
|
61
|
-
trigger: "group flex-1 flex items-center gap-1.5 font-medium text-sm py-3.5 focus-visible:outline-
|
|
66
|
+
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",
|
|
62
67
|
content: "data-[state=open]:animate-[accordion-down_200ms_ease-out] data-[state=closed]:animate-[accordion-up_200ms_ease-out] overflow-hidden focus:outline-none",
|
|
63
68
|
body: "text-sm pb-3.5",
|
|
64
69
|
leadingIcon: "shrink-0 size-5",
|
|
@@ -77,14 +82,14 @@ const accordion = {
|
|
|
77
82
|
const alert = (options) => ({
|
|
78
83
|
slots: {
|
|
79
84
|
root: "relative overflow-hidden w-full rounded-[calc(var(--ui-radius)*2)] p-4 flex gap-2.5",
|
|
80
|
-
wrapper: "min-w-0 flex-1 flex flex-col
|
|
85
|
+
wrapper: "min-w-0 flex-1 flex flex-col",
|
|
81
86
|
title: "text-sm font-medium",
|
|
82
87
|
description: "text-sm opacity-90",
|
|
83
88
|
icon: "shrink-0 size-5",
|
|
84
89
|
avatar: "shrink-0",
|
|
85
90
|
avatarSize: "2xl",
|
|
86
91
|
actions: "flex flex-wrap gap-1.5 shrink-0",
|
|
87
|
-
close: "p-0
|
|
92
|
+
close: "p-0"
|
|
88
93
|
},
|
|
89
94
|
variants: {
|
|
90
95
|
color: {
|
|
@@ -97,14 +102,19 @@ const alert = (options) => ({
|
|
|
97
102
|
soft: "",
|
|
98
103
|
subtle: ""
|
|
99
104
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
root: "items-start",
|
|
103
|
-
actions: "items-start mt-1"
|
|
104
|
-
},
|
|
105
|
-
false: {
|
|
105
|
+
orientation: {
|
|
106
|
+
horizontal: {
|
|
106
107
|
root: "items-center",
|
|
107
108
|
actions: "items-center"
|
|
109
|
+
},
|
|
110
|
+
vertical: {
|
|
111
|
+
root: "items-start",
|
|
112
|
+
actions: "items-start mt-2.5"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
title: {
|
|
116
|
+
true: {
|
|
117
|
+
description: "mt-1"
|
|
108
118
|
}
|
|
109
119
|
}
|
|
110
120
|
},
|
|
@@ -112,49 +122,49 @@ const alert = (options) => ({
|
|
|
112
122
|
color,
|
|
113
123
|
variant: "solid",
|
|
114
124
|
class: {
|
|
115
|
-
root: `bg-
|
|
125
|
+
root: `bg-(--ui-${color}) text-(--ui-bg)`
|
|
116
126
|
}
|
|
117
127
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
118
128
|
color,
|
|
119
129
|
variant: "outline",
|
|
120
130
|
class: {
|
|
121
|
-
root: `text-
|
|
131
|
+
root: `text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
|
|
122
132
|
}
|
|
123
133
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
124
134
|
color,
|
|
125
135
|
variant: "soft",
|
|
126
136
|
class: {
|
|
127
|
-
root: `bg-
|
|
137
|
+
root: `bg-(--ui-${color})/10 text-(--ui-${color})`
|
|
128
138
|
}
|
|
129
139
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
130
140
|
color,
|
|
131
141
|
variant: "subtle",
|
|
132
142
|
class: {
|
|
133
|
-
root: `bg-
|
|
143
|
+
root: `bg-(--ui-${color})/10 text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
|
|
134
144
|
}
|
|
135
145
|
})), {
|
|
136
146
|
color: "neutral",
|
|
137
147
|
variant: "solid",
|
|
138
148
|
class: {
|
|
139
|
-
root: "text-
|
|
149
|
+
root: "text-(--ui-bg) bg-(--ui-bg-inverted)"
|
|
140
150
|
}
|
|
141
151
|
}, {
|
|
142
152
|
color: "neutral",
|
|
143
153
|
variant: "outline",
|
|
144
154
|
class: {
|
|
145
|
-
root: "text-
|
|
155
|
+
root: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border)"
|
|
146
156
|
}
|
|
147
157
|
}, {
|
|
148
158
|
color: "neutral",
|
|
149
159
|
variant: "soft",
|
|
150
160
|
class: {
|
|
151
|
-
root: "text-
|
|
161
|
+
root: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50"
|
|
152
162
|
}
|
|
153
163
|
}, {
|
|
154
164
|
color: "neutral",
|
|
155
165
|
variant: "subtle",
|
|
156
166
|
class: {
|
|
157
|
-
root: "text-
|
|
167
|
+
root: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50 ring ring-inset ring-(--ui-border-accented)"
|
|
158
168
|
}
|
|
159
169
|
}],
|
|
160
170
|
defaultVariants: {
|
|
@@ -165,10 +175,10 @@ const alert = (options) => ({
|
|
|
165
175
|
|
|
166
176
|
const avatar = {
|
|
167
177
|
slots: {
|
|
168
|
-
root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-
|
|
178
|
+
root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-(--ui-bg-elevated)",
|
|
169
179
|
image: "h-full w-full rounded-[inherit] object-cover data-[error]:hidden",
|
|
170
|
-
fallback: "font-medium leading-none text-
|
|
171
|
-
icon: "text-
|
|
180
|
+
fallback: "font-medium leading-none text-(--ui-text-muted) truncate",
|
|
181
|
+
icon: "text-(--ui-text-muted) shrink-0"
|
|
172
182
|
},
|
|
173
183
|
variants: {
|
|
174
184
|
size: {
|
|
@@ -209,7 +219,7 @@ const avatar = {
|
|
|
209
219
|
const avatarGroup = {
|
|
210
220
|
slots: {
|
|
211
221
|
root: "inline-flex flex-row-reverse justify-end",
|
|
212
|
-
base: "relative rounded-full ring-
|
|
222
|
+
base: "relative rounded-full ring-(--ui-bg) first:me-0"
|
|
213
223
|
},
|
|
214
224
|
variants: {
|
|
215
225
|
size: {
|
|
@@ -247,6 +257,41 @@ const avatarGroup = {
|
|
|
247
257
|
}
|
|
248
258
|
};
|
|
249
259
|
|
|
260
|
+
const buttonGroupVariant = {
|
|
261
|
+
buttonGroup: {
|
|
262
|
+
horizontal: "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
|
|
263
|
+
vertical: "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
const buttonGroupVariantWithRoot = {
|
|
267
|
+
buttonGroup: {
|
|
268
|
+
horizontal: {
|
|
269
|
+
root: "group",
|
|
270
|
+
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"
|
|
271
|
+
},
|
|
272
|
+
vertical: {
|
|
273
|
+
root: "group",
|
|
274
|
+
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"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
const buttonGroup = {
|
|
279
|
+
base: "relative",
|
|
280
|
+
variants: {
|
|
281
|
+
size: {
|
|
282
|
+
xs: "",
|
|
283
|
+
sm: "",
|
|
284
|
+
md: "",
|
|
285
|
+
lg: "",
|
|
286
|
+
xl: ""
|
|
287
|
+
},
|
|
288
|
+
orientation: {
|
|
289
|
+
horizontal: "inline-flex -space-x-px",
|
|
290
|
+
vertical: "flex flex-col -space-y-px"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
|
|
250
295
|
const badge = (options) => ({
|
|
251
296
|
slots: {
|
|
252
297
|
base: "font-medium inline-flex items-center",
|
|
@@ -257,6 +302,7 @@ const badge = (options) => ({
|
|
|
257
302
|
trailingIcon: "shrink-0"
|
|
258
303
|
},
|
|
259
304
|
variants: {
|
|
305
|
+
...buttonGroupVariant,
|
|
260
306
|
color: {
|
|
261
307
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
262
308
|
neutral: ""
|
|
@@ -303,35 +349,35 @@ const badge = (options) => ({
|
|
|
303
349
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
304
350
|
color,
|
|
305
351
|
variant: "solid",
|
|
306
|
-
class: `bg-
|
|
352
|
+
class: `bg-(--ui-${color}) text-(--ui-bg)`
|
|
307
353
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
308
354
|
color,
|
|
309
355
|
variant: "outline",
|
|
310
|
-
class: `text-
|
|
356
|
+
class: `text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/50`
|
|
311
357
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
312
358
|
color,
|
|
313
359
|
variant: "soft",
|
|
314
|
-
class: `bg-
|
|
360
|
+
class: `bg-(--ui-${color})/10 text-(--ui-${color})`
|
|
315
361
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
316
362
|
color,
|
|
317
363
|
variant: "subtle",
|
|
318
|
-
class: `bg-
|
|
364
|
+
class: `bg-(--ui-${color})/10 text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
|
|
319
365
|
})), {
|
|
320
366
|
color: "neutral",
|
|
321
367
|
variant: "solid",
|
|
322
|
-
class: "text-
|
|
368
|
+
class: "text-(--ui-bg) bg-(--ui-bg-inverted)"
|
|
323
369
|
}, {
|
|
324
370
|
color: "neutral",
|
|
325
371
|
variant: "outline",
|
|
326
|
-
class: "ring ring-inset ring-
|
|
372
|
+
class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg)"
|
|
327
373
|
}, {
|
|
328
374
|
color: "neutral",
|
|
329
375
|
variant: "soft",
|
|
330
|
-
class: "text-
|
|
376
|
+
class: "text-(--ui-text) bg-(--ui-bg-elevated)"
|
|
331
377
|
}, {
|
|
332
378
|
color: "neutral",
|
|
333
379
|
variant: "subtle",
|
|
334
|
-
class: "ring ring-inset ring-
|
|
380
|
+
class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg-elevated)"
|
|
335
381
|
}],
|
|
336
382
|
defaultVariants: {
|
|
337
383
|
color: "primary",
|
|
@@ -345,21 +391,21 @@ const breadcrumb = (options) => ({
|
|
|
345
391
|
root: "relative min-w-0",
|
|
346
392
|
list: "flex items-center gap-1.5",
|
|
347
393
|
item: "flex min-w-0",
|
|
348
|
-
link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-
|
|
394
|
+
link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-(--ui-primary)",
|
|
349
395
|
linkLeadingIcon: "shrink-0 size-5",
|
|
350
396
|
linkLeadingAvatar: "shrink-0",
|
|
351
397
|
linkLeadingAvatarSize: "2xs",
|
|
352
398
|
linkLabel: "truncate",
|
|
353
399
|
separator: "flex",
|
|
354
|
-
separatorIcon: "shrink-0 size-5 text-
|
|
400
|
+
separatorIcon: "shrink-0 size-5 text-(--ui-text-muted)"
|
|
355
401
|
},
|
|
356
402
|
variants: {
|
|
357
403
|
active: {
|
|
358
404
|
true: {
|
|
359
|
-
link: "text-
|
|
405
|
+
link: "text-(--ui-primary) font-semibold"
|
|
360
406
|
},
|
|
361
407
|
false: {
|
|
362
|
-
link: "text-
|
|
408
|
+
link: "text-(--ui-text-muted) font-medium"
|
|
363
409
|
}
|
|
364
410
|
},
|
|
365
411
|
disabled: {
|
|
@@ -376,46 +422,11 @@ const breadcrumb = (options) => ({
|
|
|
376
422
|
active: false,
|
|
377
423
|
to: true,
|
|
378
424
|
class: {
|
|
379
|
-
link: ["hover:text-
|
|
425
|
+
link: ["hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
380
426
|
}
|
|
381
427
|
}]
|
|
382
428
|
});
|
|
383
429
|
|
|
384
|
-
const buttonGroupVariant = {
|
|
385
|
-
buttonGroup: {
|
|
386
|
-
horizontal: "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
|
|
387
|
-
vertical: "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
|
|
388
|
-
}
|
|
389
|
-
};
|
|
390
|
-
const buttonGroupVariantWithRoot = {
|
|
391
|
-
buttonGroup: {
|
|
392
|
-
horizontal: {
|
|
393
|
-
root: "group",
|
|
394
|
-
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"
|
|
395
|
-
},
|
|
396
|
-
vertical: {
|
|
397
|
-
root: "group",
|
|
398
|
-
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"
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
};
|
|
402
|
-
const buttonGroup = {
|
|
403
|
-
base: "relative",
|
|
404
|
-
variants: {
|
|
405
|
-
size: {
|
|
406
|
-
xs: "",
|
|
407
|
-
sm: "",
|
|
408
|
-
md: "",
|
|
409
|
-
lg: "",
|
|
410
|
-
xl: ""
|
|
411
|
-
},
|
|
412
|
-
orientation: {
|
|
413
|
-
horizontal: "inline-flex -space-x-px",
|
|
414
|
-
vertical: "flex flex-col -space-y-px"
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
};
|
|
418
|
-
|
|
419
430
|
const button = (options) => ({
|
|
420
431
|
slots: {
|
|
421
432
|
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"],
|
|
@@ -493,51 +504,51 @@ const button = (options) => ({
|
|
|
493
504
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
494
505
|
color,
|
|
495
506
|
variant: "solid",
|
|
496
|
-
class: `text-
|
|
507
|
+
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})`
|
|
497
508
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
498
509
|
color,
|
|
499
510
|
variant: "outline",
|
|
500
|
-
class: `ring ring-inset ring-
|
|
511
|
+
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})`
|
|
501
512
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
502
513
|
color,
|
|
503
514
|
variant: "soft",
|
|
504
|
-
class: `text-
|
|
515
|
+
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`
|
|
505
516
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
506
517
|
color,
|
|
507
518
|
variant: "subtle",
|
|
508
|
-
class: `text-
|
|
519
|
+
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})`
|
|
509
520
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
510
521
|
color,
|
|
511
522
|
variant: "ghost",
|
|
512
|
-
class: `text-
|
|
523
|
+
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`
|
|
513
524
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
514
525
|
color,
|
|
515
526
|
variant: "link",
|
|
516
|
-
class: `text-
|
|
527
|
+
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})`
|
|
517
528
|
})), {
|
|
518
529
|
color: "neutral",
|
|
519
530
|
variant: "solid",
|
|
520
|
-
class: "text-
|
|
531
|
+
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)"
|
|
521
532
|
}, {
|
|
522
533
|
color: "neutral",
|
|
523
534
|
variant: "outline",
|
|
524
|
-
class: "ring ring-inset ring-
|
|
535
|
+
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)"
|
|
525
536
|
}, {
|
|
526
537
|
color: "neutral",
|
|
527
538
|
variant: "soft",
|
|
528
|
-
class: "text-
|
|
539
|
+
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)"
|
|
529
540
|
}, {
|
|
530
541
|
color: "neutral",
|
|
531
542
|
variant: "subtle",
|
|
532
|
-
class: "ring ring-inset ring-
|
|
543
|
+
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)"
|
|
533
544
|
}, {
|
|
534
545
|
color: "neutral",
|
|
535
546
|
variant: "ghost",
|
|
536
|
-
class: "text-
|
|
547
|
+
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"
|
|
537
548
|
}, {
|
|
538
549
|
color: "neutral",
|
|
539
550
|
variant: "link",
|
|
540
|
-
class: "text-
|
|
551
|
+
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)"
|
|
541
552
|
}, {
|
|
542
553
|
size: "xs",
|
|
543
554
|
square: true,
|
|
@@ -591,17 +602,17 @@ const calendar = (options) => ({
|
|
|
591
602
|
gridBody: "grid",
|
|
592
603
|
headCell: "rounded-[calc(var(--ui-radius)*1.5)]",
|
|
593
604
|
cell: "relative text-center",
|
|
594
|
-
cellTrigger: ["m-0.5 relative flex items-center justify-center rounded-full whitespace-nowrap focus-visible:ring-2 focus:outline-none data-disabled:text-
|
|
605
|
+
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"]
|
|
595
606
|
},
|
|
596
607
|
variants: {
|
|
597
608
|
color: {
|
|
598
609
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
599
|
-
headCell: `text-
|
|
600
|
-
cellTrigger: `focus-visible:ring-
|
|
610
|
+
headCell: `text-(--ui-${color})`,
|
|
611
|
+
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`
|
|
601
612
|
}])),
|
|
602
613
|
neutral: {
|
|
603
|
-
headCell: "text-
|
|
604
|
-
cellTrigger: "focus-visible:ring-
|
|
614
|
+
headCell: "text-(--ui-bg-inverted)",
|
|
615
|
+
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"
|
|
605
616
|
}
|
|
606
617
|
},
|
|
607
618
|
size: {
|
|
@@ -644,10 +655,29 @@ const calendar = (options) => ({
|
|
|
644
655
|
|
|
645
656
|
const card = {
|
|
646
657
|
slots: {
|
|
647
|
-
root: "
|
|
658
|
+
root: "rounded-[calc(var(--ui-radius)*2)]",
|
|
648
659
|
header: "p-4 sm:px-6",
|
|
649
660
|
body: "p-4 sm:p-6",
|
|
650
661
|
footer: "p-4 sm:px-6"
|
|
662
|
+
},
|
|
663
|
+
variants: {
|
|
664
|
+
variant: {
|
|
665
|
+
solid: {
|
|
666
|
+
root: "bg-(--ui-bg-inverted) text-(--ui-bg)"
|
|
667
|
+
},
|
|
668
|
+
outline: {
|
|
669
|
+
root: "bg-(--ui-bg) ring ring-(--ui-border) divide-y divide-(--ui-border)"
|
|
670
|
+
},
|
|
671
|
+
soft: {
|
|
672
|
+
root: "bg-(--ui-bg-elevated)/50 divide-y divide-(--ui-border)"
|
|
673
|
+
},
|
|
674
|
+
subtle: {
|
|
675
|
+
root: "bg-(--ui-bg-elevated)/50 ring ring-(--ui-border) divide-y divide-(--ui-border)"
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
defaultVariants: {
|
|
680
|
+
variant: "outline"
|
|
651
681
|
}
|
|
652
682
|
};
|
|
653
683
|
|
|
@@ -662,7 +692,7 @@ const carousel = (options) => ({
|
|
|
662
692
|
prev: "absolute rounded-full",
|
|
663
693
|
next: "absolute rounded-full",
|
|
664
694
|
dots: "absolute inset-x-0 -bottom-7 flex flex-wrap items-center justify-center gap-3",
|
|
665
|
-
dot: ["cursor-pointer size-3 bg-
|
|
695
|
+
dot: ["cursor-pointer size-3 bg-(--ui-border-accented) rounded-full", options.theme.transitions && "transition"]
|
|
666
696
|
},
|
|
667
697
|
variants: {
|
|
668
698
|
orientation: {
|
|
@@ -681,7 +711,7 @@ const carousel = (options) => ({
|
|
|
681
711
|
},
|
|
682
712
|
active: {
|
|
683
713
|
true: {
|
|
684
|
-
dot: "bg-
|
|
714
|
+
dot: "bg-(--ui-border-inverted)"
|
|
685
715
|
}
|
|
686
716
|
}
|
|
687
717
|
}
|
|
@@ -690,17 +720,17 @@ const carousel = (options) => ({
|
|
|
690
720
|
const checkbox = (options) => ({
|
|
691
721
|
slots: {
|
|
692
722
|
root: "relative flex items-start",
|
|
693
|
-
base: "shrink-0 flex items-center justify-center rounded-
|
|
723
|
+
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",
|
|
694
724
|
container: "flex items-center",
|
|
695
725
|
wrapper: "ms-2",
|
|
696
726
|
icon: "shrink-0 size-full",
|
|
697
|
-
label: "block font-medium text-
|
|
698
|
-
description: "text-
|
|
727
|
+
label: "block font-medium text-(--ui-text)",
|
|
728
|
+
description: "text-(--ui-text-muted)"
|
|
699
729
|
},
|
|
700
730
|
variants: {
|
|
701
731
|
color: {
|
|
702
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-
|
|
703
|
-
neutral: "focus-visible:outline-
|
|
732
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-(--ui-${color})`])),
|
|
733
|
+
neutral: "focus-visible:outline-(--ui-border-inverted)"
|
|
704
734
|
},
|
|
705
735
|
size: {
|
|
706
736
|
xs: {
|
|
@@ -731,7 +761,7 @@ const checkbox = (options) => ({
|
|
|
731
761
|
},
|
|
732
762
|
required: {
|
|
733
763
|
true: {
|
|
734
|
-
label: "after:content-['*'] after:ms-0.5 after:text-
|
|
764
|
+
label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
|
|
735
765
|
}
|
|
736
766
|
},
|
|
737
767
|
disabled: {
|
|
@@ -748,11 +778,11 @@ const checkbox = (options) => ({
|
|
|
748
778
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
749
779
|
color,
|
|
750
780
|
checked: true,
|
|
751
|
-
class: `ring-2 ring-
|
|
781
|
+
class: `ring-2 ring-(--ui-${color}) bg-(--ui-${color})`
|
|
752
782
|
})), {
|
|
753
783
|
color: "neutral",
|
|
754
784
|
checked: true,
|
|
755
|
-
class: "ring-2 ring-
|
|
785
|
+
class: "ring-2 ring-(--ui-border-inverted) bg-(--ui-bg-inverted)"
|
|
756
786
|
}],
|
|
757
787
|
defaultVariants: {
|
|
758
788
|
size: "md",
|
|
@@ -763,12 +793,12 @@ const checkbox = (options) => ({
|
|
|
763
793
|
const chip = (options) => ({
|
|
764
794
|
slots: {
|
|
765
795
|
root: "relative inline-flex items-center justify-center shrink-0",
|
|
766
|
-
base: "rounded-full ring ring-
|
|
796
|
+
base: "rounded-full ring ring-(--ui-bg) flex items-center justify-center text-(--ui-bg) font-medium whitespace-nowrap"
|
|
767
797
|
},
|
|
768
798
|
variants: {
|
|
769
799
|
color: {
|
|
770
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-
|
|
771
|
-
neutral: "bg-
|
|
800
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-(--ui-${color})`])),
|
|
801
|
+
neutral: "bg-(--ui-text-muted)"
|
|
772
802
|
},
|
|
773
803
|
size: {
|
|
774
804
|
"3xs": "h-[4px] min-w-[4px] text-[4px]",
|
|
@@ -831,9 +861,9 @@ const colorPicker = {
|
|
|
831
861
|
picker: "flex gap-4",
|
|
832
862
|
selector: "rounded-[calc(var(--ui-radius)*1.5)]",
|
|
833
863
|
selectorBackground: "w-full h-full relative rounded-[calc(var(--ui-radius)*1.2)]",
|
|
834
|
-
selectorThumb: "-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-
|
|
864
|
+
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",
|
|
835
865
|
track: "w-[8px] relative rounded-[calc(var(--ui-radius)*1.5)]",
|
|
836
|
-
trackThumb: "absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-
|
|
866
|
+
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"
|
|
837
867
|
},
|
|
838
868
|
variants: {
|
|
839
869
|
size: {
|
|
@@ -867,14 +897,14 @@ const colorPicker = {
|
|
|
867
897
|
|
|
868
898
|
const commandPalette = (options) => ({
|
|
869
899
|
slots: {
|
|
870
|
-
root: "flex flex-col min-h-0 min-w-0 divide-y divide-
|
|
900
|
+
root: "flex flex-col min-h-0 min-w-0 divide-y divide-(--ui-border)",
|
|
871
901
|
input: "[&>input]:h-12",
|
|
872
902
|
close: "",
|
|
873
903
|
content: "relative overflow-hidden flex flex-col",
|
|
874
|
-
viewport: "relative divide-y divide-
|
|
904
|
+
viewport: "relative divide-y divide-(--ui-border) scroll-py-1 overflow-y-auto flex-1 focus:outline-none",
|
|
875
905
|
group: "p-1 isolate",
|
|
876
|
-
empty: "py-6 text-center text-sm text-
|
|
877
|
-
label: "px-2 py-1.5 text-xs font-semibold text-
|
|
906
|
+
empty: "py-6 text-center text-sm text-(--ui-text-muted)",
|
|
907
|
+
label: "px-2 py-1.5 text-xs font-semibold text-(--ui-text-highlighted)",
|
|
878
908
|
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",
|
|
879
909
|
itemLeadingIcon: "shrink-0 size-5",
|
|
880
910
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -883,23 +913,23 @@ const commandPalette = (options) => ({
|
|
|
883
913
|
itemLeadingChipSize: "md",
|
|
884
914
|
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
885
915
|
itemTrailingIcon: "shrink-0 size-5",
|
|
886
|
-
itemTrailingHighlightedIcon: "shrink-0 size-5 text-
|
|
916
|
+
itemTrailingHighlightedIcon: "shrink-0 size-5 text-(--ui-text-dimmed) hidden group-data-highlighted:inline-flex",
|
|
887
917
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0 gap-0.5",
|
|
888
918
|
itemTrailingKbdsSize: "md",
|
|
889
919
|
itemLabel: "truncate space-x-1 rtl:space-x-reverse",
|
|
890
|
-
itemLabelBase: "text-
|
|
891
|
-
itemLabelPrefix: "text-
|
|
892
|
-
itemLabelSuffix: "text-
|
|
920
|
+
itemLabelBase: "text-(--ui-text-highlighted) [&>mark]:text-(--ui-bg) [&>mark]:bg-(--ui-primary)",
|
|
921
|
+
itemLabelPrefix: "text-(--ui-text)",
|
|
922
|
+
itemLabelSuffix: "text-(--ui-text-dimmed) [&>mark]:text-(--ui-bg) [&>mark]:bg-(--ui-primary)"
|
|
893
923
|
},
|
|
894
924
|
variants: {
|
|
895
925
|
active: {
|
|
896
926
|
true: {
|
|
897
|
-
item: "text-
|
|
898
|
-
itemLeadingIcon: "text-
|
|
927
|
+
item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
|
|
928
|
+
itemLeadingIcon: "text-(--ui-text)"
|
|
899
929
|
},
|
|
900
930
|
false: {
|
|
901
|
-
item: ["text-
|
|
902
|
-
itemLeadingIcon: ["text-
|
|
931
|
+
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"],
|
|
932
|
+
itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
903
933
|
}
|
|
904
934
|
},
|
|
905
935
|
loading: {
|
|
@@ -911,15 +941,15 @@ const commandPalette = (options) => ({
|
|
|
911
941
|
});
|
|
912
942
|
|
|
913
943
|
const container = {
|
|
914
|
-
base: "max-w-
|
|
944
|
+
base: "max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"
|
|
915
945
|
};
|
|
916
946
|
|
|
917
947
|
const contextMenu = (options) => ({
|
|
918
948
|
slots: {
|
|
919
|
-
content: "min-w-32 bg-
|
|
949
|
+
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]",
|
|
920
950
|
group: "p-1 isolate",
|
|
921
|
-
label: "w-full flex items-center font-semibold text-
|
|
922
|
-
separator: "-mx-1 my-1 h-px bg-
|
|
951
|
+
label: "w-full flex items-center font-semibold text-(--ui-text-highlighted)",
|
|
952
|
+
separator: "-mx-1 my-1 h-px bg-(--ui-border)",
|
|
923
953
|
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",
|
|
924
954
|
itemLeadingIcon: "shrink-0",
|
|
925
955
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -929,7 +959,7 @@ const contextMenu = (options) => ({
|
|
|
929
959
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
|
|
930
960
|
itemTrailingKbdsSize: "",
|
|
931
961
|
itemLabel: "truncate",
|
|
932
|
-
itemLabelExternalIcon: "inline-block size-3 align-top text-
|
|
962
|
+
itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
|
|
933
963
|
},
|
|
934
964
|
variants: {
|
|
935
965
|
color: {
|
|
@@ -938,12 +968,12 @@ const contextMenu = (options) => ({
|
|
|
938
968
|
},
|
|
939
969
|
active: {
|
|
940
970
|
true: {
|
|
941
|
-
item: "text-
|
|
942
|
-
itemLeadingIcon: "text-
|
|
971
|
+
item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
|
|
972
|
+
itemLeadingIcon: "text-(--ui-text)"
|
|
943
973
|
},
|
|
944
974
|
false: {
|
|
945
|
-
item: ["text-
|
|
946
|
-
itemLeadingIcon: ["text-
|
|
975
|
+
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"],
|
|
976
|
+
itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text) group-data-[state=open]:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
947
977
|
}
|
|
948
978
|
},
|
|
949
979
|
loading: {
|
|
@@ -1003,15 +1033,15 @@ const contextMenu = (options) => ({
|
|
|
1003
1033
|
color,
|
|
1004
1034
|
active: false,
|
|
1005
1035
|
class: {
|
|
1006
|
-
item: `text-
|
|
1007
|
-
itemLeadingIcon: `text-
|
|
1036
|
+
item: `text-(--ui-${color}) data-highlighted:text-(--ui-${color}) data-highlighted:before:bg-(--ui-${color})/10 data-[state=open]:before:bg-(--ui-${color})/10`,
|
|
1037
|
+
itemLeadingIcon: `text-(--ui-${color})/75 group-data-highlighted:text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
|
|
1008
1038
|
}
|
|
1009
1039
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1010
1040
|
color,
|
|
1011
1041
|
active: true,
|
|
1012
1042
|
class: {
|
|
1013
|
-
item: `text-
|
|
1014
|
-
itemLeadingIcon: `text-
|
|
1043
|
+
item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
|
|
1044
|
+
itemLeadingIcon: `text-(--ui-${color})`
|
|
1015
1045
|
}
|
|
1016
1046
|
}))],
|
|
1017
1047
|
defaultVariants: {
|
|
@@ -1021,58 +1051,111 @@ const contextMenu = (options) => ({
|
|
|
1021
1051
|
|
|
1022
1052
|
const drawer = {
|
|
1023
1053
|
slots: {
|
|
1024
|
-
overlay: "fixed inset-0 bg-
|
|
1025
|
-
content: "fixed bg-
|
|
1026
|
-
handle: "shrink-0 rounded-full bg-
|
|
1054
|
+
overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
|
|
1055
|
+
content: "fixed bg-(--ui-bg) ring ring-(--ui-border) flex focus:outline-none",
|
|
1056
|
+
handle: "shrink-0 rounded-full bg-(--ui-bg-accented)",
|
|
1027
1057
|
container: "w-full flex flex-col gap-4 p-4 overflow-y-auto",
|
|
1028
1058
|
header: "",
|
|
1029
|
-
title: "text-
|
|
1030
|
-
description: "mt-1 text-
|
|
1059
|
+
title: "text-(--ui-text-highlighted) font-semibold",
|
|
1060
|
+
description: "mt-1 text-(--ui-text-muted) text-sm",
|
|
1031
1061
|
body: "flex-1",
|
|
1032
1062
|
footer: "flex flex-col gap-1.5"
|
|
1033
1063
|
},
|
|
1034
1064
|
variants: {
|
|
1035
1065
|
direction: {
|
|
1036
1066
|
top: {
|
|
1037
|
-
content: "
|
|
1067
|
+
content: "mb-24 flex-col-reverse",
|
|
1038
1068
|
handle: "mb-4"
|
|
1039
1069
|
},
|
|
1040
1070
|
right: {
|
|
1041
|
-
content: "
|
|
1071
|
+
content: "flex-row",
|
|
1042
1072
|
handle: "ml-4"
|
|
1043
1073
|
},
|
|
1044
1074
|
bottom: {
|
|
1045
|
-
content: "
|
|
1075
|
+
content: "mt-24 flex-col",
|
|
1046
1076
|
handle: "mt-4"
|
|
1047
1077
|
},
|
|
1048
1078
|
left: {
|
|
1049
|
-
content: "
|
|
1079
|
+
content: "flex-row-reverse",
|
|
1050
1080
|
handle: "mr-4"
|
|
1051
1081
|
}
|
|
1082
|
+
},
|
|
1083
|
+
inset: {
|
|
1084
|
+
true: {
|
|
1085
|
+
content: "rounded-[calc(var(--ui-radius)*2)] after:hidden"
|
|
1086
|
+
}
|
|
1052
1087
|
}
|
|
1053
1088
|
},
|
|
1054
1089
|
compoundVariants: [{
|
|
1055
1090
|
direction: ["top", "bottom"],
|
|
1056
1091
|
class: {
|
|
1057
|
-
content: "
|
|
1092
|
+
content: "h-auto max-h-[96%]",
|
|
1058
1093
|
handle: "w-12 h-1.5 mx-auto"
|
|
1059
1094
|
}
|
|
1060
1095
|
}, {
|
|
1061
1096
|
direction: ["right", "left"],
|
|
1062
1097
|
class: {
|
|
1063
|
-
content: "
|
|
1098
|
+
content: "w-auto max-w-[calc(100%-2rem)]",
|
|
1064
1099
|
handle: "h-12 w-1.5 mt-auto mb-auto"
|
|
1065
1100
|
}
|
|
1101
|
+
}, {
|
|
1102
|
+
direction: "top",
|
|
1103
|
+
inset: true,
|
|
1104
|
+
class: {
|
|
1105
|
+
content: "inset-x-4 top-4"
|
|
1106
|
+
}
|
|
1107
|
+
}, {
|
|
1108
|
+
direction: "top",
|
|
1109
|
+
inset: false,
|
|
1110
|
+
class: {
|
|
1111
|
+
content: "inset-x-0 top-0 rounded-b-[calc(var(--ui-radius)*2)]"
|
|
1112
|
+
}
|
|
1113
|
+
}, {
|
|
1114
|
+
direction: "bottom",
|
|
1115
|
+
inset: true,
|
|
1116
|
+
class: {
|
|
1117
|
+
content: "inset-x-4 bottom-4"
|
|
1118
|
+
}
|
|
1119
|
+
}, {
|
|
1120
|
+
direction: "bottom",
|
|
1121
|
+
inset: false,
|
|
1122
|
+
class: {
|
|
1123
|
+
content: "inset-x-0 bottom-0 rounded-t-[calc(var(--ui-radius)*2)]"
|
|
1124
|
+
}
|
|
1125
|
+
}, {
|
|
1126
|
+
direction: "left",
|
|
1127
|
+
inset: true,
|
|
1128
|
+
class: {
|
|
1129
|
+
content: "inset-y-4 left-4"
|
|
1130
|
+
}
|
|
1131
|
+
}, {
|
|
1132
|
+
direction: "left",
|
|
1133
|
+
inset: false,
|
|
1134
|
+
class: {
|
|
1135
|
+
content: "inset-y-0 left-0 rounded-r-[calc(var(--ui-radius)*2)]"
|
|
1136
|
+
}
|
|
1137
|
+
}, {
|
|
1138
|
+
direction: "right",
|
|
1139
|
+
inset: true,
|
|
1140
|
+
class: {
|
|
1141
|
+
content: "inset-y-4 right-4"
|
|
1142
|
+
}
|
|
1143
|
+
}, {
|
|
1144
|
+
direction: "right",
|
|
1145
|
+
inset: false,
|
|
1146
|
+
class: {
|
|
1147
|
+
content: "inset-y-0 right-0 rounded-l-[calc(var(--ui-radius)*2)]"
|
|
1148
|
+
}
|
|
1066
1149
|
}]
|
|
1067
1150
|
};
|
|
1068
1151
|
|
|
1069
1152
|
const dropdownMenu = (options) => ({
|
|
1070
1153
|
slots: {
|
|
1071
|
-
content: "min-w-32 bg-
|
|
1072
|
-
arrow: "fill-
|
|
1154
|
+
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]",
|
|
1155
|
+
arrow: "fill-(--ui-border)",
|
|
1073
1156
|
group: "p-1 isolate",
|
|
1074
|
-
label: "w-full flex items-center font-semibold text-
|
|
1075
|
-
separator: "-mx-1 my-1 h-px bg-
|
|
1157
|
+
label: "w-full flex items-center font-semibold text-(--ui-text-highlighted)",
|
|
1158
|
+
separator: "-mx-1 my-1 h-px bg-(--ui-border)",
|
|
1076
1159
|
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",
|
|
1077
1160
|
itemLeadingIcon: "shrink-0",
|
|
1078
1161
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -1082,7 +1165,7 @@ const dropdownMenu = (options) => ({
|
|
|
1082
1165
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
|
|
1083
1166
|
itemTrailingKbdsSize: "",
|
|
1084
1167
|
itemLabel: "truncate",
|
|
1085
|
-
itemLabelExternalIcon: "inline-block size-3 align-top text-
|
|
1168
|
+
itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
|
|
1086
1169
|
},
|
|
1087
1170
|
variants: {
|
|
1088
1171
|
color: {
|
|
@@ -1091,12 +1174,12 @@ const dropdownMenu = (options) => ({
|
|
|
1091
1174
|
},
|
|
1092
1175
|
active: {
|
|
1093
1176
|
true: {
|
|
1094
|
-
item: "text-
|
|
1095
|
-
itemLeadingIcon: "text-
|
|
1177
|
+
item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
|
|
1178
|
+
itemLeadingIcon: "text-(--ui-text)"
|
|
1096
1179
|
},
|
|
1097
1180
|
false: {
|
|
1098
|
-
item: ["text-
|
|
1099
|
-
itemLeadingIcon: ["text-
|
|
1181
|
+
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"],
|
|
1182
|
+
itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text) group-data-[state=open]:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
1100
1183
|
}
|
|
1101
1184
|
},
|
|
1102
1185
|
loading: {
|
|
@@ -1156,15 +1239,15 @@ const dropdownMenu = (options) => ({
|
|
|
1156
1239
|
color,
|
|
1157
1240
|
active: false,
|
|
1158
1241
|
class: {
|
|
1159
|
-
item: `text-
|
|
1160
|
-
itemLeadingIcon: `text-
|
|
1242
|
+
item: `text-(--ui-${color}) data-highlighted:text-(--ui-${color}) data-highlighted:before:bg-(--ui-${color})/10 data-[state=open]:before:bg-(--ui-${color})/10`,
|
|
1243
|
+
itemLeadingIcon: `text-(--ui-${color})/75 group-data-highlighted:text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
|
|
1161
1244
|
}
|
|
1162
1245
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1163
1246
|
color,
|
|
1164
1247
|
active: true,
|
|
1165
1248
|
class: {
|
|
1166
|
-
item: `text-
|
|
1167
|
-
itemLeadingIcon: `text-
|
|
1249
|
+
item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
|
|
1250
|
+
itemLeadingIcon: `text-(--ui-${color})`
|
|
1168
1251
|
}
|
|
1169
1252
|
}))],
|
|
1170
1253
|
defaultVariants: {
|
|
@@ -1181,12 +1264,12 @@ const formField = {
|
|
|
1181
1264
|
root: "",
|
|
1182
1265
|
wrapper: "",
|
|
1183
1266
|
labelWrapper: "flex content-center items-center justify-between",
|
|
1184
|
-
label: "block font-medium text-
|
|
1267
|
+
label: "block font-medium text-(--ui-text)",
|
|
1185
1268
|
container: "mt-1 relative",
|
|
1186
|
-
description: "text-
|
|
1187
|
-
error: "mt-2 text-
|
|
1188
|
-
hint: "text-
|
|
1189
|
-
help: "mt-2 text-
|
|
1269
|
+
description: "text-(--ui-text-muted)",
|
|
1270
|
+
error: "mt-2 text-(--ui-error)",
|
|
1271
|
+
hint: "text-(--ui-text-muted)",
|
|
1272
|
+
help: "mt-2 text-(--ui-text-muted)"
|
|
1190
1273
|
},
|
|
1191
1274
|
variants: {
|
|
1192
1275
|
size: {
|
|
@@ -1198,7 +1281,7 @@ const formField = {
|
|
|
1198
1281
|
},
|
|
1199
1282
|
required: {
|
|
1200
1283
|
true: {
|
|
1201
|
-
label: `after:content-['*'] after:ms-0.5 after:text-
|
|
1284
|
+
label: `after:content-['*'] after:ms-0.5 after:text-(--ui-error)`
|
|
1202
1285
|
}
|
|
1203
1286
|
}
|
|
1204
1287
|
},
|
|
@@ -1210,13 +1293,13 @@ const formField = {
|
|
|
1210
1293
|
const input = (options) => ({
|
|
1211
1294
|
slots: {
|
|
1212
1295
|
root: "relative inline-flex items-center",
|
|
1213
|
-
base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-
|
|
1296
|
+
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"],
|
|
1214
1297
|
leading: "absolute inset-y-0 start-0 flex items-center",
|
|
1215
|
-
leadingIcon: "shrink-0 text-
|
|
1298
|
+
leadingIcon: "shrink-0 text-(--ui-text-dimmed)",
|
|
1216
1299
|
leadingAvatar: "shrink-0",
|
|
1217
1300
|
leadingAvatarSize: "",
|
|
1218
1301
|
trailing: "absolute inset-y-0 end-0 flex items-center",
|
|
1219
|
-
trailingIcon: "shrink-0 text-
|
|
1302
|
+
trailingIcon: "shrink-0 text-(--ui-text-dimmed)"
|
|
1220
1303
|
},
|
|
1221
1304
|
variants: {
|
|
1222
1305
|
...buttonGroupVariantWithRoot,
|
|
@@ -1263,11 +1346,11 @@ const input = (options) => ({
|
|
|
1263
1346
|
}
|
|
1264
1347
|
},
|
|
1265
1348
|
variant: {
|
|
1266
|
-
outline: "text-
|
|
1267
|
-
soft: "text-
|
|
1268
|
-
subtle: "text-
|
|
1269
|
-
ghost: "text-
|
|
1270
|
-
none: "text-
|
|
1349
|
+
outline: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented)",
|
|
1350
|
+
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",
|
|
1351
|
+
subtle: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated) ring ring-inset ring-(--ui-border-accented)",
|
|
1352
|
+
ghost: "text-(--ui-text-highlighted) bg-transparent hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-transparent dark:disabled:bg-transparent",
|
|
1353
|
+
none: "text-(--ui-text-highlighted) bg-transparent"
|
|
1271
1354
|
},
|
|
1272
1355
|
color: {
|
|
1273
1356
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
@@ -1286,25 +1369,25 @@ const input = (options) => ({
|
|
|
1286
1369
|
true: ""
|
|
1287
1370
|
},
|
|
1288
1371
|
type: {
|
|
1289
|
-
file: "file:me-1.5 file:font-medium file:text-
|
|
1372
|
+
file: "file:me-1.5 file:font-medium file:text-(--ui-text-muted) file:outline-none"
|
|
1290
1373
|
}
|
|
1291
1374
|
},
|
|
1292
1375
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1293
1376
|
color,
|
|
1294
1377
|
variant: ["outline", "subtle"],
|
|
1295
|
-
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
1378
|
+
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
|
|
1296
1379
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1297
1380
|
color,
|
|
1298
1381
|
highlight: true,
|
|
1299
|
-
class: `ring ring-inset ring-
|
|
1382
|
+
class: `ring ring-inset ring-(--ui-${color})`
|
|
1300
1383
|
})), {
|
|
1301
1384
|
color: "neutral",
|
|
1302
1385
|
variant: ["outline", "subtle"],
|
|
1303
|
-
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
1386
|
+
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
|
|
1304
1387
|
}, {
|
|
1305
1388
|
color: "neutral",
|
|
1306
1389
|
highlight: true,
|
|
1307
|
-
class: "ring ring-inset ring-
|
|
1390
|
+
class: "ring ring-inset ring-(--ui-border-inverted)"
|
|
1308
1391
|
}, {
|
|
1309
1392
|
leading: true,
|
|
1310
1393
|
size: "xs",
|
|
@@ -1371,15 +1454,15 @@ const inputMenu = (options) => {
|
|
|
1371
1454
|
slots: {
|
|
1372
1455
|
base: () => ["rounded-[calc(var(--ui-radius)*1.5)]", options.theme.transitions && "transition-colors"],
|
|
1373
1456
|
trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
|
|
1374
|
-
arrow: "fill-
|
|
1375
|
-
content: "max-h-60 w-
|
|
1376
|
-
viewport: "divide-y divide-
|
|
1457
|
+
arrow: "fill-(--ui-border)",
|
|
1458
|
+
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",
|
|
1459
|
+
viewport: "divide-y divide-(--ui-border) scroll-py-1",
|
|
1377
1460
|
group: "p-1 isolate",
|
|
1378
|
-
empty: "py-2 text-center text-sm text-
|
|
1379
|
-
label: "font-semibold text-
|
|
1380
|
-
separator: "-mx-1 my-1 h-px bg-
|
|
1381
|
-
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-
|
|
1382
|
-
itemLeadingIcon: ["shrink-0 text-
|
|
1461
|
+
empty: "py-2 text-center text-sm text-(--ui-text-muted)",
|
|
1462
|
+
label: "font-semibold text-(--ui-text-highlighted)",
|
|
1463
|
+
separator: "-mx-1 my-1 h-px bg-(--ui-border)",
|
|
1464
|
+
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"],
|
|
1465
|
+
itemLeadingIcon: ["shrink-0 text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"],
|
|
1383
1466
|
itemLeadingAvatar: "shrink-0",
|
|
1384
1467
|
itemLeadingAvatarSize: "",
|
|
1385
1468
|
itemLeadingChip: "shrink-0",
|
|
@@ -1387,9 +1470,9 @@ const inputMenu = (options) => {
|
|
|
1387
1470
|
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
1388
1471
|
itemTrailingIcon: "shrink-0",
|
|
1389
1472
|
itemLabel: "truncate",
|
|
1390
|
-
tagsItem: "px-1.5 py-0.5 rounded-
|
|
1473
|
+
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",
|
|
1391
1474
|
tagsItemText: "truncate",
|
|
1392
|
-
tagsItemDelete: ["inline-flex items-center rounded-[calc(var(--ui-radius)/2)] text-
|
|
1475
|
+
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"],
|
|
1393
1476
|
tagsItemDeleteIcon: "",
|
|
1394
1477
|
tagsInput: ""
|
|
1395
1478
|
},
|
|
@@ -1397,10 +1480,10 @@ const inputMenu = (options) => {
|
|
|
1397
1480
|
multiple: {
|
|
1398
1481
|
true: {
|
|
1399
1482
|
root: "flex-wrap",
|
|
1400
|
-
tagsInput: "border-0 bg-transparent placeholder:text-
|
|
1483
|
+
tagsInput: "border-0 bg-transparent placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1401
1484
|
},
|
|
1402
1485
|
false: {
|
|
1403
|
-
base: "w-full border-0 placeholder:text-
|
|
1486
|
+
base: "w-full border-0 placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1404
1487
|
}
|
|
1405
1488
|
},
|
|
1406
1489
|
size: {
|
|
@@ -1465,12 +1548,12 @@ const inputMenu = (options) => {
|
|
|
1465
1548
|
color,
|
|
1466
1549
|
multiple: true,
|
|
1467
1550
|
variant: ["outline", "subtle"],
|
|
1468
|
-
class: `has-focus-visible:ring-2 has-focus-visible:ring-
|
|
1551
|
+
class: `has-focus-visible:ring-2 has-focus-visible:ring-(--ui-${color})`
|
|
1469
1552
|
})), {
|
|
1470
1553
|
color: "neutral",
|
|
1471
1554
|
multiple: true,
|
|
1472
1555
|
variant: ["outline", "subtle"],
|
|
1473
|
-
class: "has-focus-visible:ring-2 has-focus-visible:ring-
|
|
1556
|
+
class: "has-focus-visible:ring-2 has-focus-visible:ring-(--ui-border-inverted)"
|
|
1474
1557
|
}]
|
|
1475
1558
|
}, input(options));
|
|
1476
1559
|
};
|
|
@@ -1480,7 +1563,7 @@ const inputNumber = (options) => {
|
|
|
1480
1563
|
return {
|
|
1481
1564
|
slots: {
|
|
1482
1565
|
root: "relative inline-flex items-center",
|
|
1483
|
-
base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-
|
|
1566
|
+
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"],
|
|
1484
1567
|
increment: "absolute flex items-center",
|
|
1485
1568
|
decrement: "absolute flex items-center"
|
|
1486
1569
|
},
|
|
@@ -1523,19 +1606,19 @@ const inputNumber = (options) => {
|
|
|
1523
1606
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1524
1607
|
color,
|
|
1525
1608
|
variant: ["outline", "subtle"],
|
|
1526
|
-
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
1609
|
+
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
|
|
1527
1610
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1528
1611
|
color,
|
|
1529
1612
|
highlight: true,
|
|
1530
|
-
class: `ring ring-inset ring-
|
|
1613
|
+
class: `ring ring-inset ring-(--ui-${color})`
|
|
1531
1614
|
})), {
|
|
1532
1615
|
color: "neutral",
|
|
1533
1616
|
variant: ["outline", "subtle"],
|
|
1534
|
-
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
1617
|
+
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
|
|
1535
1618
|
}, {
|
|
1536
1619
|
color: "neutral",
|
|
1537
1620
|
highlight: true,
|
|
1538
|
-
class: "ring ring-inset ring-
|
|
1621
|
+
class: "ring ring-inset ring-(--ui-border-inverted)"
|
|
1539
1622
|
}, {
|
|
1540
1623
|
orientation: "horizontal",
|
|
1541
1624
|
size: "xs",
|
|
@@ -1586,12 +1669,12 @@ const inputNumber = (options) => {
|
|
|
1586
1669
|
};
|
|
1587
1670
|
|
|
1588
1671
|
const kbd = {
|
|
1589
|
-
base: "inline-flex items-center justify-center px-1 rounded-
|
|
1672
|
+
base: "inline-flex items-center justify-center px-1 rounded-(--ui-radius) font-medium font-sans",
|
|
1590
1673
|
variants: {
|
|
1591
1674
|
variant: {
|
|
1592
|
-
solid: "bg-
|
|
1593
|
-
outline: "bg-
|
|
1594
|
-
subtle: "bg-
|
|
1675
|
+
solid: "bg-(--ui-bg-inverted) text-(--ui-bg)",
|
|
1676
|
+
outline: "bg-(--ui-bg) text-(--ui-text-highlighted) ring ring-inset ring-(--ui-border-accented)",
|
|
1677
|
+
subtle: "bg-(--ui-bg-elevated) text-(--ui-text) ring ring-inset ring-(--ui-border-accented)"
|
|
1595
1678
|
},
|
|
1596
1679
|
size: {
|
|
1597
1680
|
sm: "h-4 min-w-[16px] text-[10px]",
|
|
@@ -1606,11 +1689,11 @@ const kbd = {
|
|
|
1606
1689
|
};
|
|
1607
1690
|
|
|
1608
1691
|
const link = (options) => ({
|
|
1609
|
-
base: "focus-visible:outline-
|
|
1692
|
+
base: "focus-visible:outline-(--ui-primary)",
|
|
1610
1693
|
variants: {
|
|
1611
1694
|
active: {
|
|
1612
|
-
true: "text-
|
|
1613
|
-
false: ["text-
|
|
1695
|
+
true: "text-(--ui-primary)",
|
|
1696
|
+
false: ["text-(--ui-text-muted) hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
1614
1697
|
},
|
|
1615
1698
|
disabled: {
|
|
1616
1699
|
true: "cursor-not-allowed opacity-75"
|
|
@@ -1620,13 +1703,13 @@ const link = (options) => ({
|
|
|
1620
1703
|
|
|
1621
1704
|
const modal = {
|
|
1622
1705
|
slots: {
|
|
1623
|
-
overlay: "fixed inset-0 bg-
|
|
1624
|
-
content: "fixed
|
|
1706
|
+
overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
|
|
1707
|
+
content: "fixed bg-(--ui-bg) divide-y divide-(--ui-border) flex flex-col focus:outline-none",
|
|
1625
1708
|
header: "px-4 py-5 sm:px-6",
|
|
1626
1709
|
body: "flex-1 overflow-y-auto p-4 sm:p-6",
|
|
1627
1710
|
footer: "flex items-center gap-1.5 p-4 sm:px-6",
|
|
1628
|
-
title: "text-
|
|
1629
|
-
description: "mt-1 text-
|
|
1711
|
+
title: "text-(--ui-text-highlighted) font-semibold",
|
|
1712
|
+
description: "mt-1 text-(--ui-text-muted) text-sm",
|
|
1630
1713
|
close: "absolute top-4 end-4"
|
|
1631
1714
|
},
|
|
1632
1715
|
variants: {
|
|
@@ -1641,7 +1724,7 @@ const modal = {
|
|
|
1641
1724
|
content: "inset-0"
|
|
1642
1725
|
},
|
|
1643
1726
|
false: {
|
|
1644
|
-
content: "top-
|
|
1727
|
+
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)"
|
|
1645
1728
|
}
|
|
1646
1729
|
}
|
|
1647
1730
|
}
|
|
@@ -1651,7 +1734,7 @@ const navigationMenu = (options) => ({
|
|
|
1651
1734
|
slots: {
|
|
1652
1735
|
root: "relative flex gap-1.5 [&>div]:min-w-0",
|
|
1653
1736
|
list: "isolate min-w-0",
|
|
1654
|
-
label: "w-full flex items-center gap-1.5 font-semibold text-xs/5 text-
|
|
1737
|
+
label: "w-full flex items-center gap-1.5 font-semibold text-xs/5 text-(--ui-text-highlighted) px-2.5 py-1.5",
|
|
1655
1738
|
item: "min-w-0",
|
|
1656
1739
|
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",
|
|
1657
1740
|
linkLeadingIcon: "shrink-0 size-5",
|
|
@@ -1662,31 +1745,31 @@ const navigationMenu = (options) => ({
|
|
|
1662
1745
|
linkTrailingBadgeSize: "sm",
|
|
1663
1746
|
linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
1664
1747
|
linkLabel: "truncate",
|
|
1665
|
-
linkLabelExternalIcon: "inline-block size-3 align-top text-
|
|
1748
|
+
linkLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)",
|
|
1666
1749
|
childList: "",
|
|
1667
1750
|
childItem: "",
|
|
1668
1751
|
childLink: "group size-full px-3 py-2 rounded-[calc(var(--ui-radius)*1.5)] flex items-start gap-2 text-start",
|
|
1669
1752
|
childLinkWrapper: "flex flex-col items-start",
|
|
1670
1753
|
childLinkIcon: "size-5 shrink-0",
|
|
1671
1754
|
childLinkLabel: "font-semibold text-sm relative inline-flex",
|
|
1672
|
-
childLinkLabelExternalIcon: "inline-block size-3 align-top text-
|
|
1673
|
-
childLinkDescription: "text-sm text-
|
|
1674
|
-
separator: "px-2 h-px bg-
|
|
1755
|
+
childLinkLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)",
|
|
1756
|
+
childLinkDescription: "text-sm text-(--ui-text-muted)",
|
|
1757
|
+
separator: "px-2 h-px bg-(--ui-border)",
|
|
1675
1758
|
viewportWrapper: "absolute top-full left-0 flex w-full",
|
|
1676
|
-
viewport: "relative overflow-hidden bg-
|
|
1759
|
+
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]",
|
|
1677
1760
|
content: "absolute top-0 left-0 w-full",
|
|
1678
|
-
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-
|
|
1679
|
-
arrow: "relative top-[50%] size-2.5 rotate-45 border border-
|
|
1761
|
+
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",
|
|
1762
|
+
arrow: "relative top-[50%] size-2.5 rotate-45 border border-(--ui-border) bg-(--ui-bg) z-[1] rounded-[calc(var(--ui-radius)/2)]"
|
|
1680
1763
|
},
|
|
1681
1764
|
variants: {
|
|
1682
1765
|
color: {
|
|
1683
1766
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
1684
|
-
link: `focus-visible:before:ring-
|
|
1685
|
-
childLink: `focus-visible:outline-
|
|
1767
|
+
link: `focus-visible:before:ring-(--ui-${color})`,
|
|
1768
|
+
childLink: `focus-visible:outline-(--ui-${color})`
|
|
1686
1769
|
}])),
|
|
1687
1770
|
neutral: {
|
|
1688
|
-
link: "focus-visible:before:ring-
|
|
1689
|
-
childLink: "focus-visible:outline-
|
|
1771
|
+
link: "focus-visible:before:ring-(--ui-border-inverted)",
|
|
1772
|
+
childLink: "focus-visible:outline-(--ui-border-inverted)"
|
|
1690
1773
|
}
|
|
1691
1774
|
},
|
|
1692
1775
|
highlightColor: {
|
|
@@ -1717,20 +1800,20 @@ const navigationMenu = (options) => ({
|
|
|
1717
1800
|
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]"
|
|
1718
1801
|
},
|
|
1719
1802
|
vertical: {
|
|
1720
|
-
viewport: "sm:w-
|
|
1803
|
+
viewport: "sm:w-(--reka-navigation-menu-viewport-width) left-(--reka-navigation-menu-viewport-left)",
|
|
1721
1804
|
content: ""
|
|
1722
1805
|
}
|
|
1723
1806
|
},
|
|
1724
1807
|
active: {
|
|
1725
1808
|
true: {
|
|
1726
|
-
childLink: "bg-
|
|
1727
|
-
childLinkIcon: "text-
|
|
1809
|
+
childLink: "bg-(--ui-bg-elevated) text-(--ui-text-highlighted)",
|
|
1810
|
+
childLinkIcon: "text-(--ui-text)"
|
|
1728
1811
|
},
|
|
1729
1812
|
false: {
|
|
1730
|
-
link: "text-
|
|
1731
|
-
linkLeadingIcon: "text-
|
|
1732
|
-
childLink: ["hover:bg-
|
|
1733
|
-
childLinkIcon: ["text-
|
|
1813
|
+
link: "text-(--ui-text-muted)",
|
|
1814
|
+
linkLeadingIcon: "text-(--ui-text-dimmed)",
|
|
1815
|
+
childLink: ["hover:bg-(--ui-bg-elevated)/50 text-(--ui-text) hover:text-(--ui-text-highlighted)", options.theme.transitions && "transition-colors"],
|
|
1816
|
+
childLinkIcon: ["text-(--ui-text-dimmed) group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
1734
1817
|
}
|
|
1735
1818
|
},
|
|
1736
1819
|
disabled: {
|
|
@@ -1765,7 +1848,6 @@ const navigationMenu = (options) => ({
|
|
|
1765
1848
|
orientation: "horizontal",
|
|
1766
1849
|
highlight: true,
|
|
1767
1850
|
class: {
|
|
1768
|
-
item: "-mb-px",
|
|
1769
1851
|
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"]
|
|
1770
1852
|
}
|
|
1771
1853
|
}, {
|
|
@@ -1780,8 +1862,8 @@ const navigationMenu = (options) => ({
|
|
|
1780
1862
|
active: false,
|
|
1781
1863
|
variant: "pill",
|
|
1782
1864
|
class: {
|
|
1783
|
-
link: ["hover:text-
|
|
1784
|
-
linkLeadingIcon: ["group-hover:text-
|
|
1865
|
+
link: ["hover:text-(--ui-text-highlighted) hover:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
1866
|
+
linkLeadingIcon: ["group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
1785
1867
|
}
|
|
1786
1868
|
}, {
|
|
1787
1869
|
disabled: false,
|
|
@@ -1789,8 +1871,8 @@ const navigationMenu = (options) => ({
|
|
|
1789
1871
|
variant: "pill",
|
|
1790
1872
|
orientation: "horizontal",
|
|
1791
1873
|
class: {
|
|
1792
|
-
link: "data-[state=open]:text-
|
|
1793
|
-
linkLeadingIcon: "group-data-[state=open]:text-
|
|
1874
|
+
link: "data-[state=open]:text-(--ui-text-highlighted)",
|
|
1875
|
+
linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
|
|
1794
1876
|
}
|
|
1795
1877
|
}, {
|
|
1796
1878
|
disabled: false,
|
|
@@ -1798,7 +1880,7 @@ const navigationMenu = (options) => ({
|
|
|
1798
1880
|
highlight: true,
|
|
1799
1881
|
orientation: "horizontal",
|
|
1800
1882
|
class: {
|
|
1801
|
-
link: "data-[state=open]:before:bg-
|
|
1883
|
+
link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
|
|
1802
1884
|
}
|
|
1803
1885
|
}, {
|
|
1804
1886
|
disabled: false,
|
|
@@ -1807,45 +1889,45 @@ const navigationMenu = (options) => ({
|
|
|
1807
1889
|
active: false,
|
|
1808
1890
|
orientation: "horizontal",
|
|
1809
1891
|
class: {
|
|
1810
|
-
link: "data-[state=open]:before:bg-
|
|
1892
|
+
link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
|
|
1811
1893
|
}
|
|
1812
1894
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
1813
1895
|
color,
|
|
1814
1896
|
variant: "pill",
|
|
1815
1897
|
active: true,
|
|
1816
1898
|
class: {
|
|
1817
|
-
link: `text-
|
|
1818
|
-
linkLeadingIcon: `text-
|
|
1899
|
+
link: `text-(--ui-${color})`,
|
|
1900
|
+
linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
|
|
1819
1901
|
}
|
|
1820
1902
|
})), {
|
|
1821
1903
|
color: "neutral",
|
|
1822
1904
|
variant: "pill",
|
|
1823
1905
|
active: true,
|
|
1824
1906
|
class: {
|
|
1825
|
-
link: "text-
|
|
1826
|
-
linkLeadingIcon: "text-
|
|
1907
|
+
link: "text-(--ui-text-highlighted)",
|
|
1908
|
+
linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
|
|
1827
1909
|
}
|
|
1828
1910
|
}, {
|
|
1829
1911
|
variant: "pill",
|
|
1830
1912
|
active: true,
|
|
1831
1913
|
highlight: false,
|
|
1832
1914
|
class: {
|
|
1833
|
-
link: "before:bg-
|
|
1915
|
+
link: "before:bg-(--ui-bg-elevated)"
|
|
1834
1916
|
}
|
|
1835
1917
|
}, {
|
|
1836
1918
|
variant: "pill",
|
|
1837
1919
|
active: true,
|
|
1838
1920
|
highlight: true,
|
|
1839
1921
|
class: {
|
|
1840
|
-
link: ["hover:before:bg-
|
|
1922
|
+
link: ["hover:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "before:transition-colors"]
|
|
1841
1923
|
}
|
|
1842
1924
|
}, {
|
|
1843
1925
|
disabled: false,
|
|
1844
1926
|
active: false,
|
|
1845
1927
|
variant: "link",
|
|
1846
1928
|
class: {
|
|
1847
|
-
link: ["hover:text-
|
|
1848
|
-
linkLeadingIcon: ["group-hover:text-
|
|
1929
|
+
link: ["hover:text-(--ui-text-highlighted)", options.theme.transitions && "transition-colors"],
|
|
1930
|
+
linkLeadingIcon: ["group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
1849
1931
|
}
|
|
1850
1932
|
}, {
|
|
1851
1933
|
disabled: false,
|
|
@@ -1853,24 +1935,24 @@ const navigationMenu = (options) => ({
|
|
|
1853
1935
|
variant: "link",
|
|
1854
1936
|
orientation: "horizontal",
|
|
1855
1937
|
class: {
|
|
1856
|
-
link: "data-[state=open]:text-
|
|
1857
|
-
linkLeadingIcon: "group-data-[state=open]:text-
|
|
1938
|
+
link: "data-[state=open]:text-(--ui-text-highlighted)",
|
|
1939
|
+
linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
|
|
1858
1940
|
}
|
|
1859
1941
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
1860
1942
|
color,
|
|
1861
1943
|
variant: "link",
|
|
1862
1944
|
active: true,
|
|
1863
1945
|
class: {
|
|
1864
|
-
link: `text-
|
|
1865
|
-
linkLeadingIcon: `text-
|
|
1946
|
+
link: `text-(--ui-${color})`,
|
|
1947
|
+
linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
|
|
1866
1948
|
}
|
|
1867
1949
|
})), {
|
|
1868
1950
|
color: "neutral",
|
|
1869
1951
|
variant: "link",
|
|
1870
1952
|
active: true,
|
|
1871
1953
|
class: {
|
|
1872
|
-
link: "text-
|
|
1873
|
-
linkLeadingIcon: "text-
|
|
1954
|
+
link: "text-(--ui-text-highlighted)",
|
|
1955
|
+
linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
|
|
1874
1956
|
}
|
|
1875
1957
|
}, ...(options.theme.colors || []).map((highlightColor) => ({
|
|
1876
1958
|
highlightColor,
|
|
@@ -1878,7 +1960,7 @@ const navigationMenu = (options) => ({
|
|
|
1878
1960
|
level: true,
|
|
1879
1961
|
active: true,
|
|
1880
1962
|
class: {
|
|
1881
|
-
link: `after:bg-
|
|
1963
|
+
link: `after:bg-(--ui-${highlightColor})`
|
|
1882
1964
|
}
|
|
1883
1965
|
})), {
|
|
1884
1966
|
highlightColor: "neutral",
|
|
@@ -1886,13 +1968,13 @@ const navigationMenu = (options) => ({
|
|
|
1886
1968
|
level: true,
|
|
1887
1969
|
active: true,
|
|
1888
1970
|
class: {
|
|
1889
|
-
link: "after:bg-
|
|
1971
|
+
link: "after:bg-(--ui-bg-inverted)"
|
|
1890
1972
|
}
|
|
1891
1973
|
}, {
|
|
1892
1974
|
orientation: "vertical",
|
|
1893
1975
|
collapsed: false,
|
|
1894
1976
|
class: {
|
|
1895
|
-
childList: "ms-5 border-s border-
|
|
1977
|
+
childList: "ms-5 border-s border-(--ui-border)",
|
|
1896
1978
|
childItem: "ps-1.5 -ms-px"
|
|
1897
1979
|
}
|
|
1898
1980
|
}, {
|
|
@@ -1921,7 +2003,7 @@ const pagination = {
|
|
|
1921
2003
|
const pinInput = (options) => ({
|
|
1922
2004
|
slots: {
|
|
1923
2005
|
root: "relative inline-flex items-center gap-1.5",
|
|
1924
|
-
base: ["rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-
|
|
2006
|
+
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"]
|
|
1925
2007
|
},
|
|
1926
2008
|
variants: {
|
|
1927
2009
|
size: {
|
|
@@ -1942,11 +2024,11 @@ const pinInput = (options) => ({
|
|
|
1942
2024
|
}
|
|
1943
2025
|
},
|
|
1944
2026
|
variant: {
|
|
1945
|
-
outline: "text-
|
|
1946
|
-
soft: "text-
|
|
1947
|
-
subtle: "text-
|
|
1948
|
-
ghost: "text-
|
|
1949
|
-
none: "text-
|
|
2027
|
+
outline: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented)",
|
|
2028
|
+
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",
|
|
2029
|
+
subtle: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated) ring ring-inset ring-(--ui-border-accented)",
|
|
2030
|
+
ghost: "text-(--ui-text-highlighted) bg-transparent hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-transparent dark:disabled:bg-transparent",
|
|
2031
|
+
none: "text-(--ui-text-highlighted) bg-transparent"
|
|
1950
2032
|
},
|
|
1951
2033
|
color: {
|
|
1952
2034
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
@@ -1959,19 +2041,19 @@ const pinInput = (options) => ({
|
|
|
1959
2041
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1960
2042
|
color,
|
|
1961
2043
|
variant: ["outline", "subtle"],
|
|
1962
|
-
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
2044
|
+
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
|
|
1963
2045
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1964
2046
|
color,
|
|
1965
2047
|
highlight: true,
|
|
1966
|
-
class: `ring ring-inset ring-
|
|
2048
|
+
class: `ring ring-inset ring-(--ui-${color})`
|
|
1967
2049
|
})), {
|
|
1968
2050
|
color: "neutral",
|
|
1969
2051
|
variant: ["outline", "subtle"],
|
|
1970
|
-
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
2052
|
+
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
|
|
1971
2053
|
}, {
|
|
1972
2054
|
color: "neutral",
|
|
1973
2055
|
highlight: true,
|
|
1974
|
-
class: "ring ring-inset ring-
|
|
2056
|
+
class: "ring ring-inset ring-(--ui-border-inverted)"
|
|
1975
2057
|
}],
|
|
1976
2058
|
defaultVariants: {
|
|
1977
2059
|
size: "md",
|
|
@@ -1982,17 +2064,17 @@ const pinInput = (options) => ({
|
|
|
1982
2064
|
|
|
1983
2065
|
const popover = {
|
|
1984
2066
|
slots: {
|
|
1985
|
-
content: "bg-
|
|
1986
|
-
arrow: "fill-
|
|
2067
|
+
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",
|
|
2068
|
+
arrow: "fill-(--ui-border)"
|
|
1987
2069
|
}
|
|
1988
2070
|
};
|
|
1989
2071
|
|
|
1990
2072
|
const progress = (options) => ({
|
|
1991
2073
|
slots: {
|
|
1992
2074
|
root: "gap-2",
|
|
1993
|
-
base: "relative overflow-hidden rounded-full bg-
|
|
2075
|
+
base: "relative overflow-hidden rounded-full bg-(--ui-bg-accented)",
|
|
1994
2076
|
indicator: "rounded-full size-full transition-transform duration-200 ease-out",
|
|
1995
|
-
status: "flex justify-end text-
|
|
2077
|
+
status: "flex justify-end text-(--ui-text-dimmed) transition-[width] duration-200",
|
|
1996
2078
|
steps: "grid items-end",
|
|
1997
2079
|
step: "truncate text-end row-start-1 col-start-1 transition-opacity"
|
|
1998
2080
|
},
|
|
@@ -2005,12 +2087,12 @@ const progress = (options) => ({
|
|
|
2005
2087
|
},
|
|
2006
2088
|
color: {
|
|
2007
2089
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2008
|
-
indicator: `bg-
|
|
2009
|
-
steps: `text-
|
|
2090
|
+
indicator: `bg-(--ui-${color})`,
|
|
2091
|
+
steps: `text-(--ui-${color})`
|
|
2010
2092
|
}])),
|
|
2011
2093
|
neutral: {
|
|
2012
|
-
indicator: "bg-
|
|
2013
|
-
steps: "text-
|
|
2094
|
+
indicator: "bg-(--ui-bg-inverted)",
|
|
2095
|
+
steps: "text-(--ui-bg)"
|
|
2014
2096
|
}
|
|
2015
2097
|
},
|
|
2016
2098
|
size: {
|
|
@@ -2048,7 +2130,7 @@ const progress = (options) => ({
|
|
|
2048
2130
|
step: "opacity-100"
|
|
2049
2131
|
},
|
|
2050
2132
|
first: {
|
|
2051
|
-
step: "opacity-100 text-
|
|
2133
|
+
step: "opacity-100 text-(--ui-text-muted)"
|
|
2052
2134
|
},
|
|
2053
2135
|
other: {
|
|
2054
2136
|
step: "opacity-0"
|
|
@@ -2205,24 +2287,24 @@ const radioGroup = (options) => ({
|
|
|
2205
2287
|
slots: {
|
|
2206
2288
|
root: "relative",
|
|
2207
2289
|
fieldset: "flex",
|
|
2208
|
-
legend: "mb-1 block font-medium text-
|
|
2290
|
+
legend: "mb-1 block font-medium text-(--ui-text)",
|
|
2209
2291
|
item: "flex items-start",
|
|
2210
|
-
base: "rounded-full ring ring-inset ring-
|
|
2211
|
-
indicator: "flex items-center justify-center size-full rounded-full after:bg-
|
|
2292
|
+
base: "rounded-full ring ring-inset ring-(--ui-border-accented) focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
2293
|
+
indicator: "flex items-center justify-center size-full rounded-full after:bg-(--ui-bg) after:rounded-full",
|
|
2212
2294
|
container: "flex items-center",
|
|
2213
2295
|
wrapper: "ms-2",
|
|
2214
|
-
label: "block font-medium text-
|
|
2215
|
-
description: "text-
|
|
2296
|
+
label: "block font-medium text-(--ui-text)",
|
|
2297
|
+
description: "text-(--ui-text-muted)"
|
|
2216
2298
|
},
|
|
2217
2299
|
variants: {
|
|
2218
2300
|
color: {
|
|
2219
2301
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2220
|
-
base: `focus-visible:outline-
|
|
2221
|
-
indicator: `bg-
|
|
2302
|
+
base: `focus-visible:outline-(--ui-${color})`,
|
|
2303
|
+
indicator: `bg-(--ui-${color})`
|
|
2222
2304
|
}])),
|
|
2223
2305
|
neutral: {
|
|
2224
|
-
base: "focus-visible:outline-
|
|
2225
|
-
indicator: "bg-
|
|
2306
|
+
base: "focus-visible:outline-(--ui-border-inverted)",
|
|
2307
|
+
indicator: "bg-(--ui-bg-inverted)"
|
|
2226
2308
|
}
|
|
2227
2309
|
},
|
|
2228
2310
|
orientation: {
|
|
@@ -2284,7 +2366,7 @@ const radioGroup = (options) => ({
|
|
|
2284
2366
|
},
|
|
2285
2367
|
required: {
|
|
2286
2368
|
true: {
|
|
2287
|
-
legend: "after:content-['*'] after:ms-0.5 after:text-
|
|
2369
|
+
legend: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
|
|
2288
2370
|
}
|
|
2289
2371
|
}
|
|
2290
2372
|
},
|
|
@@ -2300,16 +2382,16 @@ const select = (options) => {
|
|
|
2300
2382
|
root: () => undefined,
|
|
2301
2383
|
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"],
|
|
2302
2384
|
value: "truncate pointer-events-none",
|
|
2303
|
-
placeholder: "truncate text-
|
|
2304
|
-
arrow: "fill-
|
|
2305
|
-
content: "max-h-60 w-
|
|
2306
|
-
viewport: "divide-y divide-
|
|
2385
|
+
placeholder: "truncate text-(--ui-text-dimmed)",
|
|
2386
|
+
arrow: "fill-(--ui-border)",
|
|
2387
|
+
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",
|
|
2388
|
+
viewport: "divide-y divide-(--ui-border) scroll-py-1",
|
|
2307
2389
|
group: "p-1 isolate",
|
|
2308
|
-
empty: "py-2 text-center text-sm text-
|
|
2309
|
-
label: "font-semibold text-
|
|
2310
|
-
separator: "-mx-1 my-1 h-px bg-
|
|
2311
|
-
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-
|
|
2312
|
-
itemLeadingIcon: ["shrink-0 text-
|
|
2390
|
+
empty: "py-2 text-center text-sm text-(--ui-text-muted)",
|
|
2391
|
+
label: "font-semibold text-(--ui-text-highlighted)",
|
|
2392
|
+
separator: "-mx-1 my-1 h-px bg-(--ui-border)",
|
|
2393
|
+
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"],
|
|
2394
|
+
itemLeadingIcon: ["shrink-0 text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"],
|
|
2313
2395
|
itemLeadingAvatar: "shrink-0",
|
|
2314
2396
|
itemLeadingAvatarSize: "",
|
|
2315
2397
|
itemLeadingChip: "shrink-0",
|
|
@@ -2374,7 +2456,8 @@ const select = (options) => {
|
|
|
2374
2456
|
const selectMenu = (options) => {
|
|
2375
2457
|
return defu.defu({
|
|
2376
2458
|
slots: {
|
|
2377
|
-
input: "border-b border-
|
|
2459
|
+
input: "border-b border-(--ui-border)",
|
|
2460
|
+
focusScope: "flex flex-col min-h-0"
|
|
2378
2461
|
}
|
|
2379
2462
|
}, select(options));
|
|
2380
2463
|
};
|
|
@@ -2383,7 +2466,7 @@ const separator = (options) => ({
|
|
|
2383
2466
|
slots: {
|
|
2384
2467
|
root: "flex items-center align-center text-center",
|
|
2385
2468
|
border: "",
|
|
2386
|
-
container: "font-medium text-
|
|
2469
|
+
container: "font-medium text-(--ui-text) flex",
|
|
2387
2470
|
icon: "shrink-0 size-5",
|
|
2388
2471
|
avatar: "shrink-0",
|
|
2389
2472
|
avatarSize: "2xs",
|
|
@@ -2391,8 +2474,8 @@ const separator = (options) => ({
|
|
|
2391
2474
|
},
|
|
2392
2475
|
variants: {
|
|
2393
2476
|
color: {
|
|
2394
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-
|
|
2395
|
-
neutral: { border: "border-
|
|
2477
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-(--ui-${color})` }])),
|
|
2478
|
+
neutral: { border: "border-(--ui-border)" }
|
|
2396
2479
|
},
|
|
2397
2480
|
orientation: {
|
|
2398
2481
|
horizontal: {
|
|
@@ -2474,18 +2557,18 @@ const separator = (options) => ({
|
|
|
2474
2557
|
});
|
|
2475
2558
|
|
|
2476
2559
|
const skeleton = {
|
|
2477
|
-
base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-
|
|
2560
|
+
base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-(--ui-bg-elevated)"
|
|
2478
2561
|
};
|
|
2479
2562
|
|
|
2480
2563
|
const slideover = {
|
|
2481
2564
|
slots: {
|
|
2482
|
-
overlay: "fixed inset-0 bg-
|
|
2483
|
-
content: "fixed bg-
|
|
2565
|
+
overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
|
|
2566
|
+
content: "fixed bg-(--ui-bg) divide-y divide-(--ui-border) sm:ring ring-(--ui-border) sm:shadow-lg flex flex-col focus:outline-none",
|
|
2484
2567
|
header: "px-4 py-5 sm:px-6",
|
|
2485
2568
|
body: "flex-1 overflow-y-auto p-4 sm:p-6",
|
|
2486
2569
|
footer: "flex items-center gap-1.5 p-4 sm:px-6",
|
|
2487
|
-
title: "text-
|
|
2488
|
-
description: "mt-1 text-
|
|
2570
|
+
title: "text-(--ui-text-highlighted) font-semibold",
|
|
2571
|
+
description: "mt-1 text-(--ui-text-muted) text-sm",
|
|
2489
2572
|
close: "absolute top-4 end-4"
|
|
2490
2573
|
},
|
|
2491
2574
|
variants: {
|
|
@@ -2539,19 +2622,19 @@ const slideover = {
|
|
|
2539
2622
|
const slider = (options) => ({
|
|
2540
2623
|
slots: {
|
|
2541
2624
|
root: "relative flex items-center select-none touch-none",
|
|
2542
|
-
track: "relative bg-
|
|
2625
|
+
track: "relative bg-(--ui-bg-accented) overflow-hidden rounded-full grow",
|
|
2543
2626
|
range: "absolute rounded-full",
|
|
2544
|
-
thumb: "rounded-full bg-
|
|
2627
|
+
thumb: "rounded-full bg-(--ui-bg) ring-2 focus-visible:outline-2 focus-visible:outline-offset-2"
|
|
2545
2628
|
},
|
|
2546
2629
|
variants: {
|
|
2547
2630
|
color: {
|
|
2548
2631
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2549
|
-
range: `bg-
|
|
2550
|
-
thumb: `ring-
|
|
2632
|
+
range: `bg-(--ui-${color})`,
|
|
2633
|
+
thumb: `ring-(--ui-${color}) focus-visible:outline-(--ui-${color})/50`
|
|
2551
2634
|
}])),
|
|
2552
2635
|
neutral: {
|
|
2553
|
-
range: "bg-
|
|
2554
|
-
thumb: "ring-
|
|
2636
|
+
range: "bg-(--ui-bg-inverted)",
|
|
2637
|
+
thumb: "ring-(--ui-border-inverted) focus-visible:outline-(--ui-border-inverted)/50"
|
|
2555
2638
|
}
|
|
2556
2639
|
},
|
|
2557
2640
|
size: {
|
|
@@ -2660,13 +2743,13 @@ const stepper = (options) => ({
|
|
|
2660
2743
|
header: "flex",
|
|
2661
2744
|
item: "group text-center relative w-full",
|
|
2662
2745
|
container: "relative",
|
|
2663
|
-
trigger: "rounded-full font-medium text-center align-middle flex items-center justify-center font-semibold group-data-[state=completed]:text-
|
|
2746
|
+
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",
|
|
2664
2747
|
indicator: "flex items-center justify-center size-full",
|
|
2665
2748
|
icon: "shrink-0",
|
|
2666
|
-
separator: "absolute rounded-full group-data-[disabled]:opacity-75 bg-
|
|
2749
|
+
separator: "absolute rounded-full group-data-[disabled]:opacity-75 bg-(--ui-border-accented)",
|
|
2667
2750
|
wrapper: "",
|
|
2668
|
-
title: "font-medium text-
|
|
2669
|
-
description: "text-
|
|
2751
|
+
title: "font-medium text-(--ui-text)",
|
|
2752
|
+
description: "text-(--ui-text-muted) text-wrap",
|
|
2670
2753
|
content: "size-full"
|
|
2671
2754
|
},
|
|
2672
2755
|
variants: {
|
|
@@ -2722,12 +2805,12 @@ const stepper = (options) => ({
|
|
|
2722
2805
|
},
|
|
2723
2806
|
color: {
|
|
2724
2807
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2725
|
-
trigger: `group-data-[state=completed]:bg-
|
|
2726
|
-
separator: `group-data-[state=completed]:bg-
|
|
2808
|
+
trigger: `group-data-[state=completed]:bg-(--ui-${color}) group-data-[state=active]:bg-(--ui-${color}) focus-visible:outline-(--ui-${color})`,
|
|
2809
|
+
separator: `group-data-[state=completed]:bg-(--ui-${color})`
|
|
2727
2810
|
}])),
|
|
2728
2811
|
neutral: {
|
|
2729
|
-
trigger: `group-data-[state=completed]:bg-
|
|
2730
|
-
separator: `group-data-[state=completed]:bg-
|
|
2812
|
+
trigger: `group-data-[state=completed]:bg-(--ui-bg-inverted) group-data-[state=active]:bg-(--ui-bg-inverted) focus-visible:outline-(--ui-border-inverted)`,
|
|
2813
|
+
separator: `group-data-[state=completed]:bg-(--ui-bg-inverted)`
|
|
2731
2814
|
}
|
|
2732
2815
|
}
|
|
2733
2816
|
},
|
|
@@ -2781,23 +2864,23 @@ const stepper = (options) => ({
|
|
|
2781
2864
|
const _switch = (options) => ({
|
|
2782
2865
|
slots: {
|
|
2783
2866
|
root: "relative flex items-start",
|
|
2784
|
-
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-
|
|
2867
|
+
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"],
|
|
2785
2868
|
container: "flex items-center",
|
|
2786
|
-
thumb: "group pointer-events-none rounded-full bg-
|
|
2787
|
-
icon: ["absolute shrink-0 group-data-[state=unchecked]:text-
|
|
2869
|
+
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",
|
|
2870
|
+
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"],
|
|
2788
2871
|
wrapper: "ms-2",
|
|
2789
|
-
label: "block font-medium text-
|
|
2790
|
-
description: "text-
|
|
2872
|
+
label: "block font-medium text-(--ui-text)",
|
|
2873
|
+
description: "text-(--ui-text-muted)"
|
|
2791
2874
|
},
|
|
2792
2875
|
variants: {
|
|
2793
2876
|
color: {
|
|
2794
2877
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2795
|
-
base: `data-[state=checked]:bg-
|
|
2796
|
-
icon: `group-data-[state=checked]:text-
|
|
2878
|
+
base: `data-[state=checked]:bg-(--ui-${color}) focus-visible:outline-(--ui-${color})`,
|
|
2879
|
+
icon: `group-data-[state=checked]:text-(--ui-${color})`
|
|
2797
2880
|
}])),
|
|
2798
2881
|
neutral: {
|
|
2799
|
-
base: "data-[state=checked]:bg-
|
|
2800
|
-
icon: "group-data-[state=checked]:text-
|
|
2882
|
+
base: "data-[state=checked]:bg-(--ui-bg-inverted) focus-visible:outline-(--ui-border-inverted)",
|
|
2883
|
+
icon: "group-data-[state=checked]:text-(--ui-text-highlighted)"
|
|
2801
2884
|
}
|
|
2802
2885
|
},
|
|
2803
2886
|
size: {
|
|
@@ -2849,7 +2932,7 @@ const _switch = (options) => ({
|
|
|
2849
2932
|
},
|
|
2850
2933
|
required: {
|
|
2851
2934
|
true: {
|
|
2852
|
-
label: "after:content-['*'] after:ms-0.5 after:text-
|
|
2935
|
+
label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
|
|
2853
2936
|
}
|
|
2854
2937
|
},
|
|
2855
2938
|
disabled: {
|
|
@@ -2871,23 +2954,23 @@ const table = (options) => ({
|
|
|
2871
2954
|
root: "relative overflow-auto",
|
|
2872
2955
|
base: "min-w-full overflow-clip",
|
|
2873
2956
|
caption: "sr-only",
|
|
2874
|
-
thead: "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-
|
|
2875
|
-
tbody: "divide-y divide-
|
|
2876
|
-
tr: "data-[selected=true]:bg-
|
|
2877
|
-
th: "px-4 py-3.5 text-sm text-
|
|
2878
|
-
td: "p-4 text-sm text-
|
|
2879
|
-
empty: "py-6 text-center text-sm text-
|
|
2957
|
+
thead: "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-(--ui-border-accented)",
|
|
2958
|
+
tbody: "divide-y divide-(--ui-border)",
|
|
2959
|
+
tr: "data-[selected=true]:bg-(--ui-bg-elevated)/50",
|
|
2960
|
+
th: "px-4 py-3.5 text-sm text-(--ui-text-highlighted) text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",
|
|
2961
|
+
td: "p-4 text-sm text-(--ui-text-muted) whitespace-nowrap [&:has([role=checkbox])]:pe-0",
|
|
2962
|
+
empty: "py-6 text-center text-sm text-(--ui-text-muted)"
|
|
2880
2963
|
},
|
|
2881
2964
|
variants: {
|
|
2882
2965
|
pinned: {
|
|
2883
2966
|
true: {
|
|
2884
|
-
th: "sticky bg-
|
|
2885
|
-
td: "sticky bg-
|
|
2967
|
+
th: "sticky bg-(--ui-bg)/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
|
|
2968
|
+
td: "sticky bg-(--ui-bg)/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0"
|
|
2886
2969
|
}
|
|
2887
2970
|
},
|
|
2888
2971
|
sticky: {
|
|
2889
2972
|
true: {
|
|
2890
|
-
thead: "sticky top-0 inset-x-0 bg-
|
|
2973
|
+
thead: "sticky top-0 inset-x-0 bg-(--ui-bg)/75 z-[1] backdrop-blur"
|
|
2891
2974
|
}
|
|
2892
2975
|
},
|
|
2893
2976
|
loading: {
|
|
@@ -2910,13 +2993,13 @@ const table = (options) => ({
|
|
|
2910
2993
|
loading: true,
|
|
2911
2994
|
loadingColor,
|
|
2912
2995
|
class: {
|
|
2913
|
-
thead: `after:bg-
|
|
2996
|
+
thead: `after:bg-(--ui-${loadingColor})`
|
|
2914
2997
|
}
|
|
2915
2998
|
})), {
|
|
2916
2999
|
loading: true,
|
|
2917
3000
|
loadingColor: "neutral",
|
|
2918
3001
|
class: {
|
|
2919
|
-
thead: "after:bg-
|
|
3002
|
+
thead: "after:bg-(--ui-bg-inverted)"
|
|
2920
3003
|
}
|
|
2921
3004
|
}, {
|
|
2922
3005
|
loading: true,
|
|
@@ -2954,7 +3037,7 @@ const tabs = (options) => ({
|
|
|
2954
3037
|
root: "flex items-center gap-2",
|
|
2955
3038
|
list: "relative flex p-1 group",
|
|
2956
3039
|
indicator: "absolute transition-[translate,width] duration-200",
|
|
2957
|
-
trigger: ["group relative inline-flex items-center shrink-0 min-w-0 data-[state=inactive]:text-
|
|
3040
|
+
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"],
|
|
2958
3041
|
content: "focus:outline-none w-full",
|
|
2959
3042
|
leadingIcon: "shrink-0",
|
|
2960
3043
|
leadingAvatar: "shrink-0",
|
|
@@ -2968,12 +3051,12 @@ const tabs = (options) => ({
|
|
|
2968
3051
|
},
|
|
2969
3052
|
variant: {
|
|
2970
3053
|
pill: {
|
|
2971
|
-
list: "bg-
|
|
3054
|
+
list: "bg-(--ui-bg-elevated) rounded-[calc(var(--ui-radius)*2)]",
|
|
2972
3055
|
trigger: "flex-1 w-full",
|
|
2973
3056
|
indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-xs"
|
|
2974
3057
|
},
|
|
2975
3058
|
link: {
|
|
2976
|
-
list: "border-
|
|
3059
|
+
list: "border-(--ui-border)",
|
|
2977
3060
|
indicator: "rounded-full"
|
|
2978
3061
|
}
|
|
2979
3062
|
},
|
|
@@ -2981,12 +3064,12 @@ const tabs = (options) => ({
|
|
|
2981
3064
|
horizontal: {
|
|
2982
3065
|
root: "flex-col",
|
|
2983
3066
|
list: "w-full",
|
|
2984
|
-
indicator: "left-0 w-
|
|
3067
|
+
indicator: "left-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position)",
|
|
2985
3068
|
trigger: "justify-center"
|
|
2986
3069
|
},
|
|
2987
3070
|
vertical: {
|
|
2988
3071
|
list: "flex-col",
|
|
2989
|
-
indicator: "top-0 h-
|
|
3072
|
+
indicator: "top-0 h-(--reka-tabs-indicator-size) translate-y-(--reka-tabs-indicator-position)"
|
|
2990
3073
|
}
|
|
2991
3074
|
},
|
|
2992
3075
|
size: {
|
|
@@ -3048,29 +3131,29 @@ const tabs = (options) => ({
|
|
|
3048
3131
|
color,
|
|
3049
3132
|
variant: "pill",
|
|
3050
3133
|
class: {
|
|
3051
|
-
indicator: `bg-
|
|
3052
|
-
trigger: `data-[state=active]:text-
|
|
3134
|
+
indicator: `bg-(--ui-${color})`,
|
|
3135
|
+
trigger: `data-[state=active]:text-(--ui-bg) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-${color})`
|
|
3053
3136
|
}
|
|
3054
3137
|
})), {
|
|
3055
3138
|
color: "neutral",
|
|
3056
3139
|
variant: "pill",
|
|
3057
3140
|
class: {
|
|
3058
|
-
indicator: "bg-
|
|
3059
|
-
trigger: "data-[state=active]:text-
|
|
3141
|
+
indicator: "bg-(--ui-bg-inverted)",
|
|
3142
|
+
trigger: "data-[state=active]:text-(--ui-bg) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-border-inverted)"
|
|
3060
3143
|
}
|
|
3061
3144
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
3062
3145
|
color,
|
|
3063
3146
|
variant: "link",
|
|
3064
3147
|
class: {
|
|
3065
|
-
indicator: `bg-
|
|
3066
|
-
trigger: `data-[state=active]:text-
|
|
3148
|
+
indicator: `bg-(--ui-${color})`,
|
|
3149
|
+
trigger: `data-[state=active]:text-(--ui-${color}) focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
|
|
3067
3150
|
}
|
|
3068
3151
|
})), {
|
|
3069
3152
|
color: "neutral",
|
|
3070
3153
|
variant: "link",
|
|
3071
3154
|
class: {
|
|
3072
|
-
indicator: "bg-
|
|
3073
|
-
trigger: "data-[state=active]:text-
|
|
3155
|
+
indicator: "bg-(--ui-bg-inverted)",
|
|
3156
|
+
trigger: "data-[state=active]:text-(--ui-text-highlighted) focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
|
|
3074
3157
|
}
|
|
3075
3158
|
}],
|
|
3076
3159
|
defaultVariants: {
|
|
@@ -3086,38 +3169,43 @@ const textarea = (options) => {
|
|
|
3086
3169
|
|
|
3087
3170
|
const toast = (options) => ({
|
|
3088
3171
|
slots: {
|
|
3089
|
-
root: "relative group overflow-hidden bg-
|
|
3090
|
-
wrapper: "w-0 flex-1 flex flex-col
|
|
3091
|
-
title: "text-sm font-medium text-
|
|
3092
|
-
description: "text-sm text-
|
|
3172
|
+
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",
|
|
3173
|
+
wrapper: "w-0 flex-1 flex flex-col",
|
|
3174
|
+
title: "text-sm font-medium text-(--ui-text-highlighted)",
|
|
3175
|
+
description: "text-sm text-(--ui-text-muted)",
|
|
3093
3176
|
icon: "shrink-0 size-5",
|
|
3094
3177
|
avatar: "shrink-0",
|
|
3095
3178
|
avatarSize: "2xl",
|
|
3096
3179
|
actions: "flex gap-1.5 shrink-0",
|
|
3097
3180
|
progress: "absolute inset-x-0 bottom-0 h-1 z-[-1]",
|
|
3098
|
-
close: "p-0
|
|
3181
|
+
close: "p-0"
|
|
3099
3182
|
},
|
|
3100
3183
|
variants: {
|
|
3101
3184
|
color: {
|
|
3102
3185
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
3103
|
-
root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
3104
|
-
icon: `text-
|
|
3105
|
-
progress: `bg-
|
|
3186
|
+
root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`,
|
|
3187
|
+
icon: `text-(--ui-${color})`,
|
|
3188
|
+
progress: `bg-(--ui-${color})`
|
|
3106
3189
|
}])),
|
|
3107
3190
|
neutral: {
|
|
3108
|
-
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
3109
|
-
icon: "text-
|
|
3110
|
-
progress: "bg-
|
|
3191
|
+
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)",
|
|
3192
|
+
icon: "text-(--ui-text-highlighted)",
|
|
3193
|
+
progress: "bg-(--ui-bg-inverted)"
|
|
3111
3194
|
}
|
|
3112
3195
|
},
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
root: "items-start",
|
|
3116
|
-
actions: "items-start mt-1"
|
|
3117
|
-
},
|
|
3118
|
-
false: {
|
|
3196
|
+
orientation: {
|
|
3197
|
+
horizontal: {
|
|
3119
3198
|
root: "items-center",
|
|
3120
3199
|
actions: "items-center"
|
|
3200
|
+
},
|
|
3201
|
+
vertical: {
|
|
3202
|
+
root: "items-start",
|
|
3203
|
+
actions: "items-start mt-2.5"
|
|
3204
|
+
}
|
|
3205
|
+
},
|
|
3206
|
+
title: {
|
|
3207
|
+
true: {
|
|
3208
|
+
description: "mt-1"
|
|
3121
3209
|
}
|
|
3122
3210
|
}
|
|
3123
3211
|
},
|
|
@@ -3128,8 +3216,8 @@ const toast = (options) => ({
|
|
|
3128
3216
|
|
|
3129
3217
|
const toaster = {
|
|
3130
3218
|
slots: {
|
|
3131
|
-
viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-
|
|
3132
|
-
base: "pointer-events-auto absolute inset-x-0 z-
|
|
3219
|
+
viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-(--height) focus:outline-none",
|
|
3220
|
+
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"
|
|
3133
3221
|
},
|
|
3134
3222
|
variants: {
|
|
3135
3223
|
position: {
|
|
@@ -3173,10 +3261,10 @@ const toaster = {
|
|
|
3173
3261
|
}
|
|
3174
3262
|
}, {
|
|
3175
3263
|
swipeDirection: ["left", "right"],
|
|
3176
|
-
class: "data-[swipe=move]:translate-x-
|
|
3264
|
+
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"
|
|
3177
3265
|
}, {
|
|
3178
3266
|
swipeDirection: ["up", "down"],
|
|
3179
|
-
class: "data-[swipe=move]:translate-y-
|
|
3267
|
+
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"
|
|
3180
3268
|
}],
|
|
3181
3269
|
defaultVariants: {
|
|
3182
3270
|
position: "bottom-right"
|
|
@@ -3185,8 +3273,8 @@ const toaster = {
|
|
|
3185
3273
|
|
|
3186
3274
|
const tooltip = {
|
|
3187
3275
|
slots: {
|
|
3188
|
-
content: "flex items-center gap-1 bg-
|
|
3189
|
-
arrow: "fill-
|
|
3276
|
+
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",
|
|
3277
|
+
arrow: "fill-(--ui-border)",
|
|
3190
3278
|
text: "truncate",
|
|
3191
3279
|
kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:me-0.5`,
|
|
3192
3280
|
kbdsSize: "sm"
|
|
@@ -3285,6 +3373,25 @@ function getTemplates(options, uiConfig) {
|
|
|
3285
3373
|
}
|
|
3286
3374
|
});
|
|
3287
3375
|
}
|
|
3376
|
+
templates.push({
|
|
3377
|
+
filename: "ui.css",
|
|
3378
|
+
write: true,
|
|
3379
|
+
getContents: () => `@theme default {
|
|
3380
|
+
--color-old-neutral-50: ${colors__default.neutral[50]};
|
|
3381
|
+
--color-old-neutral-100: ${colors__default.neutral[100]};
|
|
3382
|
+
--color-old-neutral-200: ${colors__default.neutral[200]};
|
|
3383
|
+
--color-old-neutral-300: ${colors__default.neutral[300]};
|
|
3384
|
+
--color-old-neutral-400: ${colors__default.neutral[400]};
|
|
3385
|
+
--color-old-neutral-500: ${colors__default.neutral[500]};
|
|
3386
|
+
--color-old-neutral-600: ${colors__default.neutral[600]};
|
|
3387
|
+
--color-old-neutral-700: ${colors__default.neutral[700]};
|
|
3388
|
+
--color-old-neutral-800: ${colors__default.neutral[800]};
|
|
3389
|
+
--color-old-neutral-900: ${colors__default.neutral[900]};
|
|
3390
|
+
--color-old-neutral-950: ${colors__default.neutral[950]};
|
|
3391
|
+
${[...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 ")}
|
|
3392
|
+
}
|
|
3393
|
+
`
|
|
3394
|
+
});
|
|
3288
3395
|
templates.push({
|
|
3289
3396
|
filename: "ui/index.ts",
|
|
3290
3397
|
write: true,
|
|
@@ -3293,7 +3400,7 @@ function getTemplates(options, uiConfig) {
|
|
|
3293
3400
|
templates.push({
|
|
3294
3401
|
filename: "types/ui.d.ts",
|
|
3295
3402
|
getContents: () => `import * as ui from '#build/ui'
|
|
3296
|
-
import type { DeepPartial } from '
|
|
3403
|
+
import type { DeepPartial } from '@nuxt/ui'
|
|
3297
3404
|
import type { defaultConfig } from 'tailwind-variants'
|
|
3298
3405
|
import colors from 'tailwindcss/colors'
|
|
3299
3406
|
|