@nuxt/ui 3.0.0-alpha.11 → 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 +47 -37
- package/.nuxt/ui/avatar-group.ts +1 -1
- package/.nuxt/ui/avatar.ts +4 -4
- package/.nuxt/ui/badge.ts +37 -28
- package/.nuxt/ui/breadcrumb.ts +5 -5
- package/.nuxt/ui/button.ts +42 -43
- 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 +144 -77
- 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 +2 -2
- package/cli/templates.mjs +7 -7
- package/dist/chunks/component-meta.cjs +2590 -2511
- package/dist/chunks/component-meta.mjs +2590 -2511
- 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/{Dtz-o9GB.js → DrNJgD08.js} +1 -1
- package/dist/client/devtools/_nuxt/{DNZFyo26.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/Accordion.vue +2 -2
- package/dist/runtime/components/Alert.vue +15 -12
- package/dist/runtime/components/App.vue +3 -3
- package/dist/runtime/components/Avatar.vue +31 -10
- package/dist/runtime/components/AvatarGroup.vue +2 -2
- package/dist/runtime/components/Badge.vue +7 -3
- package/dist/runtime/components/Breadcrumb.vue +2 -2
- package/dist/runtime/components/Button.vue +2 -2
- package/dist/runtime/components/ButtonGroup.vue +2 -2
- package/dist/runtime/components/Calendar.vue +6 -3
- package/dist/runtime/components/Card.vue +8 -4
- package/dist/runtime/components/Carousel.vue +2 -2
- package/dist/runtime/components/Checkbox.vue +4 -4
- package/dist/runtime/components/Chip.vue +2 -2
- package/dist/runtime/components/Collapsible.vue +2 -2
- package/dist/runtime/components/ColorPicker.vue +46 -15
- package/dist/runtime/components/CommandPalette.vue +48 -41
- package/dist/runtime/components/Container.vue +2 -2
- package/dist/runtime/components/ContextMenu.vue +10 -2
- package/dist/runtime/components/ContextMenuContent.vue +4 -2
- package/dist/runtime/components/Drawer.vue +9 -3
- package/dist/runtime/components/DropdownMenu.vue +10 -2
- package/dist/runtime/components/DropdownMenuContent.vue +4 -2
- package/dist/runtime/components/Form.vue +46 -17
- package/dist/runtime/components/FormField.vue +12 -6
- package/dist/runtime/components/Input.vue +5 -4
- package/dist/runtime/components/InputMenu.vue +6 -5
- package/dist/runtime/components/InputNumber.vue +10 -6
- package/dist/runtime/components/Kbd.vue +2 -2
- package/dist/runtime/components/Link.vue +2 -2
- package/dist/runtime/components/Modal.vue +17 -3
- package/dist/runtime/components/NavigationMenu.vue +110 -67
- package/dist/runtime/components/Pagination.vue +2 -2
- package/dist/runtime/components/PinInput.vue +5 -4
- package/dist/runtime/components/Popover.vue +2 -2
- package/dist/runtime/components/Progress.vue +2 -2
- package/dist/runtime/components/RadioGroup.vue +4 -4
- package/dist/runtime/components/Select.vue +9 -7
- package/dist/runtime/components/SelectMenu.vue +67 -64
- package/dist/runtime/components/Separator.vue +2 -2
- package/dist/runtime/components/Skeleton.vue +2 -2
- package/dist/runtime/components/Slideover.vue +17 -3
- package/dist/runtime/components/Slider.vue +4 -4
- package/dist/runtime/components/Stepper.vue +3 -3
- package/dist/runtime/components/Switch.vue +4 -4
- package/dist/runtime/components/Table.vue +96 -18
- package/dist/runtime/components/Tabs.vue +2 -2
- package/dist/runtime/components/Textarea.vue +7 -5
- package/dist/runtime/components/Toast.vue +28 -16
- package/dist/runtime/components/Toaster.vue +4 -4
- package/dist/runtime/components/Tooltip.vue +2 -2
- package/dist/runtime/composables/useFormField.d.ts +6 -2
- package/dist/runtime/composables/useFormField.js +18 -11
- package/dist/runtime/composables/useToast.d.ts +4 -3
- package/dist/runtime/composables/useToast.js +20 -6
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/locale/az.js +54 -0
- package/dist/runtime/locale/bn.js +54 -0
- package/dist/runtime/locale/es.js +2 -2
- package/dist/runtime/locale/he.d.ts +2 -0
- package/dist/runtime/locale/he.js +53 -0
- package/dist/runtime/locale/hi.d.ts +2 -0
- package/dist/runtime/locale/hi.js +54 -0
- package/dist/runtime/locale/hu.d.ts +2 -0
- package/dist/runtime/locale/hu.js +54 -0
- package/dist/runtime/locale/index.d.ts +8 -2
- package/dist/runtime/locale/index.js +8 -2
- package/dist/runtime/locale/km.d.ts +2 -0
- package/dist/runtime/locale/km.js +54 -0
- package/dist/runtime/locale/nb_no.d.ts +2 -0
- package/dist/runtime/locale/nb_no.js +54 -0
- package/dist/runtime/locale/zh_cn.d.ts +2 -0
- package/dist/runtime/locale/{zh_hans.js → zh_cn.js} +1 -1
- package/dist/runtime/locale/zh_tw.d.ts +2 -0
- package/dist/runtime/locale/{zh_hant.js → zh_tw.js} +1 -1
- package/dist/runtime/plugins/colors.js +8 -5
- package/dist/runtime/types/form.d.ts +21 -12
- 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/utils/form.js +3 -5
- package/dist/runtime/utils/tv.js +2 -2
- package/dist/runtime/vue/components/Link.vue +77 -18
- package/dist/shared/{ui.DCjJwb6l.cjs → ui.C5FzRWM5.cjs} +529 -366
- package/dist/shared/{ui.BKsd22-Q.mjs → ui.DCZM2pl8.mjs} +525 -366
- 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 +67 -41
- package/dist/client/devtools/_nuxt/CQ-XZFu7.js +0 -54
- package/dist/client/devtools/_nuxt/builds/meta/1f5fbd7b-9d97-480e-9ae4-e02b4ff7018b.json +0 -1
- package/dist/client/devtools/_nuxt/entry.qOdop8tq.css +0 -1
- package/dist/client/devtools/_nuxt/error-404.D-rS9BDk.css +0 -1
- package/dist/client/devtools/_nuxt/error-500.CfcCHs91.css +0 -1
- /package/dist/runtime/locale/{zh_hans.d.ts → az.d.ts} +0 -0
- /package/dist/runtime/locale/{zh_hant.d.ts → bn.d.ts} +0 -0
|
@@ -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
|
-
actions: "flex gap-1.5 shrink-0",
|
|
87
|
-
close: "p-0
|
|
91
|
+
actions: "flex flex-wrap gap-1.5 shrink-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-
|
|
169
|
-
image: "h-full w-full rounded-[inherit] object-cover",
|
|
170
|
-
fallback: "font-medium leading-none text-
|
|
171
|
-
icon: "text-
|
|
178
|
+
root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-(--ui-bg-elevated)",
|
|
179
|
+
image: "h-full w-full rounded-[inherit] object-cover data-[error]:hidden",
|
|
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"],
|
|
@@ -474,7 +485,6 @@ const button = (options) => ({
|
|
|
474
485
|
block: {
|
|
475
486
|
true: {
|
|
476
487
|
base: "w-full justify-center",
|
|
477
|
-
leadingAvatarSize: "xs",
|
|
478
488
|
trailingIcon: "ms-auto"
|
|
479
489
|
}
|
|
480
490
|
},
|
|
@@ -494,51 +504,51 @@ const button = (options) => ({
|
|
|
494
504
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
495
505
|
color,
|
|
496
506
|
variant: "solid",
|
|
497
|
-
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})`
|
|
498
508
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
499
509
|
color,
|
|
500
510
|
variant: "outline",
|
|
501
|
-
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})`
|
|
502
512
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
503
513
|
color,
|
|
504
514
|
variant: "soft",
|
|
505
|
-
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`
|
|
506
516
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
507
517
|
color,
|
|
508
518
|
variant: "subtle",
|
|
509
|
-
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})`
|
|
510
520
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
511
521
|
color,
|
|
512
522
|
variant: "ghost",
|
|
513
|
-
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`
|
|
514
524
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
515
525
|
color,
|
|
516
526
|
variant: "link",
|
|
517
|
-
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})`
|
|
518
528
|
})), {
|
|
519
529
|
color: "neutral",
|
|
520
530
|
variant: "solid",
|
|
521
|
-
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)"
|
|
522
532
|
}, {
|
|
523
533
|
color: "neutral",
|
|
524
534
|
variant: "outline",
|
|
525
|
-
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)"
|
|
526
536
|
}, {
|
|
527
537
|
color: "neutral",
|
|
528
538
|
variant: "soft",
|
|
529
|
-
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)"
|
|
530
540
|
}, {
|
|
531
541
|
color: "neutral",
|
|
532
542
|
variant: "subtle",
|
|
533
|
-
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)"
|
|
534
544
|
}, {
|
|
535
545
|
color: "neutral",
|
|
536
546
|
variant: "ghost",
|
|
537
|
-
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"
|
|
538
548
|
}, {
|
|
539
549
|
color: "neutral",
|
|
540
550
|
variant: "link",
|
|
541
|
-
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)"
|
|
542
552
|
}, {
|
|
543
553
|
size: "xs",
|
|
544
554
|
square: true,
|
|
@@ -592,17 +602,17 @@ const calendar = (options) => ({
|
|
|
592
602
|
gridBody: "grid",
|
|
593
603
|
headCell: "rounded-[calc(var(--ui-radius)*1.5)]",
|
|
594
604
|
cell: "relative text-center",
|
|
595
|
-
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"]
|
|
596
606
|
},
|
|
597
607
|
variants: {
|
|
598
608
|
color: {
|
|
599
609
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
600
|
-
headCell: `text-
|
|
601
|
-
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`
|
|
602
612
|
}])),
|
|
603
613
|
neutral: {
|
|
604
|
-
headCell: "text-
|
|
605
|
-
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"
|
|
606
616
|
}
|
|
607
617
|
},
|
|
608
618
|
size: {
|
|
@@ -645,10 +655,29 @@ const calendar = (options) => ({
|
|
|
645
655
|
|
|
646
656
|
const card = {
|
|
647
657
|
slots: {
|
|
648
|
-
root: "
|
|
658
|
+
root: "rounded-[calc(var(--ui-radius)*2)]",
|
|
649
659
|
header: "p-4 sm:px-6",
|
|
650
660
|
body: "p-4 sm:p-6",
|
|
651
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"
|
|
652
681
|
}
|
|
653
682
|
};
|
|
654
683
|
|
|
@@ -663,7 +692,7 @@ const carousel = (options) => ({
|
|
|
663
692
|
prev: "absolute rounded-full",
|
|
664
693
|
next: "absolute rounded-full",
|
|
665
694
|
dots: "absolute inset-x-0 -bottom-7 flex flex-wrap items-center justify-center gap-3",
|
|
666
|
-
dot: ["cursor-pointer size-3 bg-
|
|
695
|
+
dot: ["cursor-pointer size-3 bg-(--ui-border-accented) rounded-full", options.theme.transitions && "transition"]
|
|
667
696
|
},
|
|
668
697
|
variants: {
|
|
669
698
|
orientation: {
|
|
@@ -682,7 +711,7 @@ const carousel = (options) => ({
|
|
|
682
711
|
},
|
|
683
712
|
active: {
|
|
684
713
|
true: {
|
|
685
|
-
dot: "bg-
|
|
714
|
+
dot: "bg-(--ui-border-inverted)"
|
|
686
715
|
}
|
|
687
716
|
}
|
|
688
717
|
}
|
|
@@ -691,17 +720,17 @@ const carousel = (options) => ({
|
|
|
691
720
|
const checkbox = (options) => ({
|
|
692
721
|
slots: {
|
|
693
722
|
root: "relative flex items-start",
|
|
694
|
-
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",
|
|
695
724
|
container: "flex items-center",
|
|
696
725
|
wrapper: "ms-2",
|
|
697
726
|
icon: "shrink-0 size-full",
|
|
698
|
-
label: "block font-medium text-
|
|
699
|
-
description: "text-
|
|
727
|
+
label: "block font-medium text-(--ui-text)",
|
|
728
|
+
description: "text-(--ui-text-muted)"
|
|
700
729
|
},
|
|
701
730
|
variants: {
|
|
702
731
|
color: {
|
|
703
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-
|
|
704
|
-
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)"
|
|
705
734
|
},
|
|
706
735
|
size: {
|
|
707
736
|
xs: {
|
|
@@ -732,7 +761,7 @@ const checkbox = (options) => ({
|
|
|
732
761
|
},
|
|
733
762
|
required: {
|
|
734
763
|
true: {
|
|
735
|
-
label: "after:content-['*'] after:ms-0.5 after:text-
|
|
764
|
+
label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
|
|
736
765
|
}
|
|
737
766
|
},
|
|
738
767
|
disabled: {
|
|
@@ -749,11 +778,11 @@ const checkbox = (options) => ({
|
|
|
749
778
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
750
779
|
color,
|
|
751
780
|
checked: true,
|
|
752
|
-
class: `ring-2 ring-
|
|
781
|
+
class: `ring-2 ring-(--ui-${color}) bg-(--ui-${color})`
|
|
753
782
|
})), {
|
|
754
783
|
color: "neutral",
|
|
755
784
|
checked: true,
|
|
756
|
-
class: "ring-2 ring-
|
|
785
|
+
class: "ring-2 ring-(--ui-border-inverted) bg-(--ui-bg-inverted)"
|
|
757
786
|
}],
|
|
758
787
|
defaultVariants: {
|
|
759
788
|
size: "md",
|
|
@@ -764,12 +793,12 @@ const checkbox = (options) => ({
|
|
|
764
793
|
const chip = (options) => ({
|
|
765
794
|
slots: {
|
|
766
795
|
root: "relative inline-flex items-center justify-center shrink-0",
|
|
767
|
-
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"
|
|
768
797
|
},
|
|
769
798
|
variants: {
|
|
770
799
|
color: {
|
|
771
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-
|
|
772
|
-
neutral: "bg-
|
|
800
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-(--ui-${color})`])),
|
|
801
|
+
neutral: "bg-(--ui-text-muted)"
|
|
773
802
|
},
|
|
774
803
|
size: {
|
|
775
804
|
"3xs": "h-[4px] min-w-[4px] text-[4px]",
|
|
@@ -832,9 +861,9 @@ const colorPicker = {
|
|
|
832
861
|
picker: "flex gap-4",
|
|
833
862
|
selector: "rounded-[calc(var(--ui-radius)*1.5)]",
|
|
834
863
|
selectorBackground: "w-full h-full relative rounded-[calc(var(--ui-radius)*1.2)]",
|
|
835
|
-
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",
|
|
836
865
|
track: "w-[8px] relative rounded-[calc(var(--ui-radius)*1.5)]",
|
|
837
|
-
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"
|
|
838
867
|
},
|
|
839
868
|
variants: {
|
|
840
869
|
size: {
|
|
@@ -868,14 +897,14 @@ const colorPicker = {
|
|
|
868
897
|
|
|
869
898
|
const commandPalette = (options) => ({
|
|
870
899
|
slots: {
|
|
871
|
-
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)",
|
|
872
901
|
input: "[&>input]:h-12",
|
|
873
902
|
close: "",
|
|
874
903
|
content: "relative overflow-hidden flex flex-col",
|
|
875
|
-
viewport: "relative divide-y divide-
|
|
904
|
+
viewport: "relative divide-y divide-(--ui-border) scroll-py-1 overflow-y-auto flex-1 focus:outline-none",
|
|
876
905
|
group: "p-1 isolate",
|
|
877
|
-
empty: "py-6 text-center text-sm text-
|
|
878
|
-
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)",
|
|
879
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",
|
|
880
909
|
itemLeadingIcon: "shrink-0 size-5",
|
|
881
910
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -884,23 +913,23 @@ const commandPalette = (options) => ({
|
|
|
884
913
|
itemLeadingChipSize: "md",
|
|
885
914
|
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
886
915
|
itemTrailingIcon: "shrink-0 size-5",
|
|
887
|
-
itemTrailingHighlightedIcon: "shrink-0 size-5 text-
|
|
916
|
+
itemTrailingHighlightedIcon: "shrink-0 size-5 text-(--ui-text-dimmed) hidden group-data-highlighted:inline-flex",
|
|
888
917
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0 gap-0.5",
|
|
889
918
|
itemTrailingKbdsSize: "md",
|
|
890
919
|
itemLabel: "truncate space-x-1 rtl:space-x-reverse",
|
|
891
|
-
itemLabelBase: "text-
|
|
892
|
-
itemLabelPrefix: "text-
|
|
893
|
-
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)"
|
|
894
923
|
},
|
|
895
924
|
variants: {
|
|
896
925
|
active: {
|
|
897
926
|
true: {
|
|
898
|
-
item: "text-
|
|
899
|
-
itemLeadingIcon: "text-
|
|
927
|
+
item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
|
|
928
|
+
itemLeadingIcon: "text-(--ui-text)"
|
|
900
929
|
},
|
|
901
930
|
false: {
|
|
902
|
-
item: ["text-
|
|
903
|
-
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"]
|
|
904
933
|
}
|
|
905
934
|
},
|
|
906
935
|
loading: {
|
|
@@ -912,15 +941,15 @@ const commandPalette = (options) => ({
|
|
|
912
941
|
});
|
|
913
942
|
|
|
914
943
|
const container = {
|
|
915
|
-
base: "max-w-
|
|
944
|
+
base: "max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"
|
|
916
945
|
};
|
|
917
946
|
|
|
918
947
|
const contextMenu = (options) => ({
|
|
919
948
|
slots: {
|
|
920
|
-
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]",
|
|
921
950
|
group: "p-1 isolate",
|
|
922
|
-
label: "w-full flex items-center font-semibold text-
|
|
923
|
-
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)",
|
|
924
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",
|
|
925
954
|
itemLeadingIcon: "shrink-0",
|
|
926
955
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -930,7 +959,7 @@ const contextMenu = (options) => ({
|
|
|
930
959
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
|
|
931
960
|
itemTrailingKbdsSize: "",
|
|
932
961
|
itemLabel: "truncate",
|
|
933
|
-
itemLabelExternalIcon: "inline-block size-3 align-top text-
|
|
962
|
+
itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
|
|
934
963
|
},
|
|
935
964
|
variants: {
|
|
936
965
|
color: {
|
|
@@ -939,12 +968,12 @@ const contextMenu = (options) => ({
|
|
|
939
968
|
},
|
|
940
969
|
active: {
|
|
941
970
|
true: {
|
|
942
|
-
item: "text-
|
|
943
|
-
itemLeadingIcon: "text-
|
|
971
|
+
item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
|
|
972
|
+
itemLeadingIcon: "text-(--ui-text)"
|
|
944
973
|
},
|
|
945
974
|
false: {
|
|
946
|
-
item: ["text-
|
|
947
|
-
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"]
|
|
948
977
|
}
|
|
949
978
|
},
|
|
950
979
|
loading: {
|
|
@@ -1004,15 +1033,15 @@ const contextMenu = (options) => ({
|
|
|
1004
1033
|
color,
|
|
1005
1034
|
active: false,
|
|
1006
1035
|
class: {
|
|
1007
|
-
item: `text-
|
|
1008
|
-
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})`
|
|
1009
1038
|
}
|
|
1010
1039
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1011
1040
|
color,
|
|
1012
1041
|
active: true,
|
|
1013
1042
|
class: {
|
|
1014
|
-
item: `text-
|
|
1015
|
-
itemLeadingIcon: `text-
|
|
1043
|
+
item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
|
|
1044
|
+
itemLeadingIcon: `text-(--ui-${color})`
|
|
1016
1045
|
}
|
|
1017
1046
|
}))],
|
|
1018
1047
|
defaultVariants: {
|
|
@@ -1022,58 +1051,111 @@ const contextMenu = (options) => ({
|
|
|
1022
1051
|
|
|
1023
1052
|
const drawer = {
|
|
1024
1053
|
slots: {
|
|
1025
|
-
overlay: "fixed inset-0 bg-
|
|
1026
|
-
content: "fixed bg-
|
|
1027
|
-
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)",
|
|
1028
1057
|
container: "w-full flex flex-col gap-4 p-4 overflow-y-auto",
|
|
1029
1058
|
header: "",
|
|
1030
|
-
title: "text-
|
|
1031
|
-
description: "mt-1 text-
|
|
1059
|
+
title: "text-(--ui-text-highlighted) font-semibold",
|
|
1060
|
+
description: "mt-1 text-(--ui-text-muted) text-sm",
|
|
1032
1061
|
body: "flex-1",
|
|
1033
1062
|
footer: "flex flex-col gap-1.5"
|
|
1034
1063
|
},
|
|
1035
1064
|
variants: {
|
|
1036
1065
|
direction: {
|
|
1037
1066
|
top: {
|
|
1038
|
-
content: "
|
|
1067
|
+
content: "mb-24 flex-col-reverse",
|
|
1039
1068
|
handle: "mb-4"
|
|
1040
1069
|
},
|
|
1041
1070
|
right: {
|
|
1042
|
-
content: "
|
|
1071
|
+
content: "flex-row",
|
|
1043
1072
|
handle: "ml-4"
|
|
1044
1073
|
},
|
|
1045
1074
|
bottom: {
|
|
1046
|
-
content: "
|
|
1075
|
+
content: "mt-24 flex-col",
|
|
1047
1076
|
handle: "mt-4"
|
|
1048
1077
|
},
|
|
1049
1078
|
left: {
|
|
1050
|
-
content: "
|
|
1079
|
+
content: "flex-row-reverse",
|
|
1051
1080
|
handle: "mr-4"
|
|
1052
1081
|
}
|
|
1082
|
+
},
|
|
1083
|
+
inset: {
|
|
1084
|
+
true: {
|
|
1085
|
+
content: "rounded-[calc(var(--ui-radius)*2)] after:hidden"
|
|
1086
|
+
}
|
|
1053
1087
|
}
|
|
1054
1088
|
},
|
|
1055
1089
|
compoundVariants: [{
|
|
1056
1090
|
direction: ["top", "bottom"],
|
|
1057
1091
|
class: {
|
|
1058
|
-
content: "
|
|
1092
|
+
content: "h-auto max-h-[96%]",
|
|
1059
1093
|
handle: "w-12 h-1.5 mx-auto"
|
|
1060
1094
|
}
|
|
1061
1095
|
}, {
|
|
1062
1096
|
direction: ["right", "left"],
|
|
1063
1097
|
class: {
|
|
1064
|
-
content: "
|
|
1098
|
+
content: "w-auto max-w-[calc(100%-2rem)]",
|
|
1065
1099
|
handle: "h-12 w-1.5 mt-auto mb-auto"
|
|
1066
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
|
+
}
|
|
1067
1149
|
}]
|
|
1068
1150
|
};
|
|
1069
1151
|
|
|
1070
1152
|
const dropdownMenu = (options) => ({
|
|
1071
1153
|
slots: {
|
|
1072
|
-
content: "min-w-32 bg-
|
|
1073
|
-
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)",
|
|
1074
1156
|
group: "p-1 isolate",
|
|
1075
|
-
label: "w-full flex items-center font-semibold text-
|
|
1076
|
-
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)",
|
|
1077
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",
|
|
1078
1160
|
itemLeadingIcon: "shrink-0",
|
|
1079
1161
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -1083,7 +1165,7 @@ const dropdownMenu = (options) => ({
|
|
|
1083
1165
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
|
|
1084
1166
|
itemTrailingKbdsSize: "",
|
|
1085
1167
|
itemLabel: "truncate",
|
|
1086
|
-
itemLabelExternalIcon: "inline-block size-3 align-top text-
|
|
1168
|
+
itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
|
|
1087
1169
|
},
|
|
1088
1170
|
variants: {
|
|
1089
1171
|
color: {
|
|
@@ -1092,12 +1174,12 @@ const dropdownMenu = (options) => ({
|
|
|
1092
1174
|
},
|
|
1093
1175
|
active: {
|
|
1094
1176
|
true: {
|
|
1095
|
-
item: "text-
|
|
1096
|
-
itemLeadingIcon: "text-
|
|
1177
|
+
item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
|
|
1178
|
+
itemLeadingIcon: "text-(--ui-text)"
|
|
1097
1179
|
},
|
|
1098
1180
|
false: {
|
|
1099
|
-
item: ["text-
|
|
1100
|
-
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"]
|
|
1101
1183
|
}
|
|
1102
1184
|
},
|
|
1103
1185
|
loading: {
|
|
@@ -1157,15 +1239,15 @@ const dropdownMenu = (options) => ({
|
|
|
1157
1239
|
color,
|
|
1158
1240
|
active: false,
|
|
1159
1241
|
class: {
|
|
1160
|
-
item: `text-
|
|
1161
|
-
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})`
|
|
1162
1244
|
}
|
|
1163
1245
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1164
1246
|
color,
|
|
1165
1247
|
active: true,
|
|
1166
1248
|
class: {
|
|
1167
|
-
item: `text-
|
|
1168
|
-
itemLeadingIcon: `text-
|
|
1249
|
+
item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
|
|
1250
|
+
itemLeadingIcon: `text-(--ui-${color})`
|
|
1169
1251
|
}
|
|
1170
1252
|
}))],
|
|
1171
1253
|
defaultVariants: {
|
|
@@ -1182,12 +1264,12 @@ const formField = {
|
|
|
1182
1264
|
root: "",
|
|
1183
1265
|
wrapper: "",
|
|
1184
1266
|
labelWrapper: "flex content-center items-center justify-between",
|
|
1185
|
-
label: "block font-medium text-
|
|
1267
|
+
label: "block font-medium text-(--ui-text)",
|
|
1186
1268
|
container: "mt-1 relative",
|
|
1187
|
-
description: "text-
|
|
1188
|
-
error: "mt-2 text-
|
|
1189
|
-
hint: "text-
|
|
1190
|
-
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)"
|
|
1191
1273
|
},
|
|
1192
1274
|
variants: {
|
|
1193
1275
|
size: {
|
|
@@ -1199,7 +1281,7 @@ const formField = {
|
|
|
1199
1281
|
},
|
|
1200
1282
|
required: {
|
|
1201
1283
|
true: {
|
|
1202
|
-
label: `after:content-['*'] after:ms-0.5 after:text-
|
|
1284
|
+
label: `after:content-['*'] after:ms-0.5 after:text-(--ui-error)`
|
|
1203
1285
|
}
|
|
1204
1286
|
}
|
|
1205
1287
|
},
|
|
@@ -1211,13 +1293,13 @@ const formField = {
|
|
|
1211
1293
|
const input = (options) => ({
|
|
1212
1294
|
slots: {
|
|
1213
1295
|
root: "relative inline-flex items-center",
|
|
1214
|
-
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"],
|
|
1215
1297
|
leading: "absolute inset-y-0 start-0 flex items-center",
|
|
1216
|
-
leadingIcon: "shrink-0 text-
|
|
1298
|
+
leadingIcon: "shrink-0 text-(--ui-text-dimmed)",
|
|
1217
1299
|
leadingAvatar: "shrink-0",
|
|
1218
1300
|
leadingAvatarSize: "",
|
|
1219
1301
|
trailing: "absolute inset-y-0 end-0 flex items-center",
|
|
1220
|
-
trailingIcon: "shrink-0 text-
|
|
1302
|
+
trailingIcon: "shrink-0 text-(--ui-text-dimmed)"
|
|
1221
1303
|
},
|
|
1222
1304
|
variants: {
|
|
1223
1305
|
...buttonGroupVariantWithRoot,
|
|
@@ -1264,11 +1346,11 @@ const input = (options) => ({
|
|
|
1264
1346
|
}
|
|
1265
1347
|
},
|
|
1266
1348
|
variant: {
|
|
1267
|
-
outline: "text-
|
|
1268
|
-
soft: "text-
|
|
1269
|
-
subtle: "text-
|
|
1270
|
-
ghost: "text-
|
|
1271
|
-
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"
|
|
1272
1354
|
},
|
|
1273
1355
|
color: {
|
|
1274
1356
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
@@ -1287,25 +1369,25 @@ const input = (options) => ({
|
|
|
1287
1369
|
true: ""
|
|
1288
1370
|
},
|
|
1289
1371
|
type: {
|
|
1290
|
-
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"
|
|
1291
1373
|
}
|
|
1292
1374
|
},
|
|
1293
1375
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1294
1376
|
color,
|
|
1295
1377
|
variant: ["outline", "subtle"],
|
|
1296
|
-
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})`
|
|
1297
1379
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1298
1380
|
color,
|
|
1299
1381
|
highlight: true,
|
|
1300
|
-
class: `ring ring-inset ring-
|
|
1382
|
+
class: `ring ring-inset ring-(--ui-${color})`
|
|
1301
1383
|
})), {
|
|
1302
1384
|
color: "neutral",
|
|
1303
1385
|
variant: ["outline", "subtle"],
|
|
1304
|
-
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)"
|
|
1305
1387
|
}, {
|
|
1306
1388
|
color: "neutral",
|
|
1307
1389
|
highlight: true,
|
|
1308
|
-
class: "ring ring-inset ring-
|
|
1390
|
+
class: "ring ring-inset ring-(--ui-border-inverted)"
|
|
1309
1391
|
}, {
|
|
1310
1392
|
leading: true,
|
|
1311
1393
|
size: "xs",
|
|
@@ -1372,15 +1454,15 @@ const inputMenu = (options) => {
|
|
|
1372
1454
|
slots: {
|
|
1373
1455
|
base: () => ["rounded-[calc(var(--ui-radius)*1.5)]", options.theme.transitions && "transition-colors"],
|
|
1374
1456
|
trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
|
|
1375
|
-
arrow: "fill-
|
|
1376
|
-
content: "max-h-60 w-
|
|
1377
|
-
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",
|
|
1378
1460
|
group: "p-1 isolate",
|
|
1379
|
-
empty: "py-2 text-center text-sm text-
|
|
1380
|
-
label: "font-semibold text-
|
|
1381
|
-
separator: "-mx-1 my-1 h-px bg-
|
|
1382
|
-
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-
|
|
1383
|
-
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"],
|
|
1384
1466
|
itemLeadingAvatar: "shrink-0",
|
|
1385
1467
|
itemLeadingAvatarSize: "",
|
|
1386
1468
|
itemLeadingChip: "shrink-0",
|
|
@@ -1388,9 +1470,9 @@ const inputMenu = (options) => {
|
|
|
1388
1470
|
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
1389
1471
|
itemTrailingIcon: "shrink-0",
|
|
1390
1472
|
itemLabel: "truncate",
|
|
1391
|
-
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",
|
|
1392
1474
|
tagsItemText: "truncate",
|
|
1393
|
-
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"],
|
|
1394
1476
|
tagsItemDeleteIcon: "",
|
|
1395
1477
|
tagsInput: ""
|
|
1396
1478
|
},
|
|
@@ -1398,10 +1480,10 @@ const inputMenu = (options) => {
|
|
|
1398
1480
|
multiple: {
|
|
1399
1481
|
true: {
|
|
1400
1482
|
root: "flex-wrap",
|
|
1401
|
-
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"
|
|
1402
1484
|
},
|
|
1403
1485
|
false: {
|
|
1404
|
-
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"
|
|
1405
1487
|
}
|
|
1406
1488
|
},
|
|
1407
1489
|
size: {
|
|
@@ -1466,12 +1548,12 @@ const inputMenu = (options) => {
|
|
|
1466
1548
|
color,
|
|
1467
1549
|
multiple: true,
|
|
1468
1550
|
variant: ["outline", "subtle"],
|
|
1469
|
-
class: `has-focus-visible:ring-2 has-focus-visible:ring-
|
|
1551
|
+
class: `has-focus-visible:ring-2 has-focus-visible:ring-(--ui-${color})`
|
|
1470
1552
|
})), {
|
|
1471
1553
|
color: "neutral",
|
|
1472
1554
|
multiple: true,
|
|
1473
1555
|
variant: ["outline", "subtle"],
|
|
1474
|
-
class: "has-focus-visible:ring-2 has-focus-visible:ring-
|
|
1556
|
+
class: "has-focus-visible:ring-2 has-focus-visible:ring-(--ui-border-inverted)"
|
|
1475
1557
|
}]
|
|
1476
1558
|
}, input(options));
|
|
1477
1559
|
};
|
|
@@ -1481,7 +1563,7 @@ const inputNumber = (options) => {
|
|
|
1481
1563
|
return {
|
|
1482
1564
|
slots: {
|
|
1483
1565
|
root: "relative inline-flex items-center",
|
|
1484
|
-
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"],
|
|
1485
1567
|
increment: "absolute flex items-center",
|
|
1486
1568
|
decrement: "absolute flex items-center"
|
|
1487
1569
|
},
|
|
@@ -1524,19 +1606,19 @@ const inputNumber = (options) => {
|
|
|
1524
1606
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1525
1607
|
color,
|
|
1526
1608
|
variant: ["outline", "subtle"],
|
|
1527
|
-
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})`
|
|
1528
1610
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1529
1611
|
color,
|
|
1530
1612
|
highlight: true,
|
|
1531
|
-
class: `ring ring-inset ring-
|
|
1613
|
+
class: `ring ring-inset ring-(--ui-${color})`
|
|
1532
1614
|
})), {
|
|
1533
1615
|
color: "neutral",
|
|
1534
1616
|
variant: ["outline", "subtle"],
|
|
1535
|
-
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)"
|
|
1536
1618
|
}, {
|
|
1537
1619
|
color: "neutral",
|
|
1538
1620
|
highlight: true,
|
|
1539
|
-
class: "ring ring-inset ring-
|
|
1621
|
+
class: "ring ring-inset ring-(--ui-border-inverted)"
|
|
1540
1622
|
}, {
|
|
1541
1623
|
orientation: "horizontal",
|
|
1542
1624
|
size: "xs",
|
|
@@ -1587,12 +1669,12 @@ const inputNumber = (options) => {
|
|
|
1587
1669
|
};
|
|
1588
1670
|
|
|
1589
1671
|
const kbd = {
|
|
1590
|
-
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",
|
|
1591
1673
|
variants: {
|
|
1592
1674
|
variant: {
|
|
1593
|
-
solid: "bg-
|
|
1594
|
-
outline: "bg-
|
|
1595
|
-
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)"
|
|
1596
1678
|
},
|
|
1597
1679
|
size: {
|
|
1598
1680
|
sm: "h-4 min-w-[16px] text-[10px]",
|
|
@@ -1607,11 +1689,11 @@ const kbd = {
|
|
|
1607
1689
|
};
|
|
1608
1690
|
|
|
1609
1691
|
const link = (options) => ({
|
|
1610
|
-
base: "focus-visible:outline-
|
|
1692
|
+
base: "focus-visible:outline-(--ui-primary)",
|
|
1611
1693
|
variants: {
|
|
1612
1694
|
active: {
|
|
1613
|
-
true: "text-
|
|
1614
|
-
false: ["text-
|
|
1695
|
+
true: "text-(--ui-primary)",
|
|
1696
|
+
false: ["text-(--ui-text-muted) hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
|
|
1615
1697
|
},
|
|
1616
1698
|
disabled: {
|
|
1617
1699
|
true: "cursor-not-allowed opacity-75"
|
|
@@ -1621,13 +1703,13 @@ const link = (options) => ({
|
|
|
1621
1703
|
|
|
1622
1704
|
const modal = {
|
|
1623
1705
|
slots: {
|
|
1624
|
-
overlay: "fixed inset-0 bg-
|
|
1625
|
-
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",
|
|
1626
1708
|
header: "px-4 py-5 sm:px-6",
|
|
1627
1709
|
body: "flex-1 overflow-y-auto p-4 sm:p-6",
|
|
1628
1710
|
footer: "flex items-center gap-1.5 p-4 sm:px-6",
|
|
1629
|
-
title: "text-
|
|
1630
|
-
description: "mt-1 text-
|
|
1711
|
+
title: "text-(--ui-text-highlighted) font-semibold",
|
|
1712
|
+
description: "mt-1 text-(--ui-text-muted) text-sm",
|
|
1631
1713
|
close: "absolute top-4 end-4"
|
|
1632
1714
|
},
|
|
1633
1715
|
variants: {
|
|
@@ -1642,7 +1724,7 @@ const modal = {
|
|
|
1642
1724
|
content: "inset-0"
|
|
1643
1725
|
},
|
|
1644
1726
|
false: {
|
|
1645
|
-
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)"
|
|
1646
1728
|
}
|
|
1647
1729
|
}
|
|
1648
1730
|
}
|
|
@@ -1652,6 +1734,7 @@ const navigationMenu = (options) => ({
|
|
|
1652
1734
|
slots: {
|
|
1653
1735
|
root: "relative flex gap-1.5 [&>div]:min-w-0",
|
|
1654
1736
|
list: "isolate min-w-0",
|
|
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-
|
|
1675
|
-
viewportWrapper: "absolute top-full left-0 flex w-full
|
|
1676
|
-
viewport: "relative overflow-hidden bg-
|
|
1677
|
-
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-
|
|
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)",
|
|
1758
|
+
viewportWrapper: "absolute top-full left-0 flex w-full",
|
|
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]",
|
|
1760
|
+
content: "absolute top-0 left-0 w-full",
|
|
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: {
|
|
@@ -1703,25 +1786,34 @@ const navigationMenu = (options) => ({
|
|
|
1703
1786
|
list: "flex items-center",
|
|
1704
1787
|
item: "py-2",
|
|
1705
1788
|
link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
|
|
1706
|
-
childList: "grid
|
|
1789
|
+
childList: "grid p-2"
|
|
1707
1790
|
},
|
|
1708
1791
|
vertical: {
|
|
1709
1792
|
root: "flex-col",
|
|
1710
|
-
link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
|
|
1711
|
-
|
|
1712
|
-
|
|
1793
|
+
link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
|
|
1794
|
+
}
|
|
1795
|
+
},
|
|
1796
|
+
contentOrientation: {
|
|
1797
|
+
horizontal: {
|
|
1798
|
+
viewport: "",
|
|
1799
|
+
viewportWrapper: "justify-center",
|
|
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]"
|
|
1801
|
+
},
|
|
1802
|
+
vertical: {
|
|
1803
|
+
viewport: "sm:w-(--reka-navigation-menu-viewport-width) left-(--reka-navigation-menu-viewport-left)",
|
|
1804
|
+
content: ""
|
|
1713
1805
|
}
|
|
1714
1806
|
},
|
|
1715
1807
|
active: {
|
|
1716
1808
|
true: {
|
|
1717
|
-
childLink: "bg-
|
|
1718
|
-
childLinkIcon: "text-
|
|
1809
|
+
childLink: "bg-(--ui-bg-elevated) text-(--ui-text-highlighted)",
|
|
1810
|
+
childLinkIcon: "text-(--ui-text)"
|
|
1719
1811
|
},
|
|
1720
1812
|
false: {
|
|
1721
|
-
link: "text-
|
|
1722
|
-
linkLeadingIcon: "text-
|
|
1723
|
-
childLink: ["hover:bg-
|
|
1724
|
-
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"]
|
|
1725
1817
|
}
|
|
1726
1818
|
},
|
|
1727
1819
|
disabled: {
|
|
@@ -1734,13 +1826,28 @@ const navigationMenu = (options) => ({
|
|
|
1734
1826
|
},
|
|
1735
1827
|
level: {
|
|
1736
1828
|
true: ""
|
|
1829
|
+
},
|
|
1830
|
+
collapsed: {
|
|
1831
|
+
true: ""
|
|
1737
1832
|
}
|
|
1738
1833
|
},
|
|
1739
1834
|
compoundVariants: [{
|
|
1835
|
+
orientation: "horizontal",
|
|
1836
|
+
contentOrientation: "horizontal",
|
|
1837
|
+
class: {
|
|
1838
|
+
childList: "grid-cols-2 gap-2"
|
|
1839
|
+
}
|
|
1840
|
+
}, {
|
|
1841
|
+
orientation: "horizontal",
|
|
1842
|
+
contentOrientation: "vertical",
|
|
1843
|
+
class: {
|
|
1844
|
+
childList: "gap-1",
|
|
1845
|
+
content: "w-60"
|
|
1846
|
+
}
|
|
1847
|
+
}, {
|
|
1740
1848
|
orientation: "horizontal",
|
|
1741
1849
|
highlight: true,
|
|
1742
1850
|
class: {
|
|
1743
|
-
item: "-mb-px",
|
|
1744
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"]
|
|
1745
1852
|
}
|
|
1746
1853
|
}, {
|
|
@@ -1755,8 +1862,17 @@ const navigationMenu = (options) => ({
|
|
|
1755
1862
|
active: false,
|
|
1756
1863
|
variant: "pill",
|
|
1757
1864
|
class: {
|
|
1758
|
-
link: ["hover:text-
|
|
1759
|
-
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"]
|
|
1867
|
+
}
|
|
1868
|
+
}, {
|
|
1869
|
+
disabled: false,
|
|
1870
|
+
active: false,
|
|
1871
|
+
variant: "pill",
|
|
1872
|
+
orientation: "horizontal",
|
|
1873
|
+
class: {
|
|
1874
|
+
link: "data-[state=open]:text-(--ui-text-highlighted)",
|
|
1875
|
+
linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
|
|
1760
1876
|
}
|
|
1761
1877
|
}, {
|
|
1762
1878
|
disabled: false,
|
|
@@ -1764,7 +1880,7 @@ const navigationMenu = (options) => ({
|
|
|
1764
1880
|
highlight: true,
|
|
1765
1881
|
orientation: "horizontal",
|
|
1766
1882
|
class: {
|
|
1767
|
-
link: "data-[state=open]:before:bg-
|
|
1883
|
+
link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
|
|
1768
1884
|
}
|
|
1769
1885
|
}, {
|
|
1770
1886
|
disabled: false,
|
|
@@ -1773,61 +1889,70 @@ const navigationMenu = (options) => ({
|
|
|
1773
1889
|
active: false,
|
|
1774
1890
|
orientation: "horizontal",
|
|
1775
1891
|
class: {
|
|
1776
|
-
link: "data-[state=open]:before:bg-
|
|
1892
|
+
link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
|
|
1777
1893
|
}
|
|
1778
1894
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
1779
1895
|
color,
|
|
1780
1896
|
variant: "pill",
|
|
1781
1897
|
active: true,
|
|
1782
1898
|
class: {
|
|
1783
|
-
link: `text-
|
|
1784
|
-
linkLeadingIcon: `text-
|
|
1899
|
+
link: `text-(--ui-${color})`,
|
|
1900
|
+
linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
|
|
1785
1901
|
}
|
|
1786
1902
|
})), {
|
|
1787
1903
|
color: "neutral",
|
|
1788
1904
|
variant: "pill",
|
|
1789
1905
|
active: true,
|
|
1790
1906
|
class: {
|
|
1791
|
-
link: "text-
|
|
1792
|
-
linkLeadingIcon: "text-
|
|
1907
|
+
link: "text-(--ui-text-highlighted)",
|
|
1908
|
+
linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
|
|
1793
1909
|
}
|
|
1794
1910
|
}, {
|
|
1795
1911
|
variant: "pill",
|
|
1796
1912
|
active: true,
|
|
1797
1913
|
highlight: false,
|
|
1798
1914
|
class: {
|
|
1799
|
-
link: "before:bg-
|
|
1915
|
+
link: "before:bg-(--ui-bg-elevated)"
|
|
1800
1916
|
}
|
|
1801
1917
|
}, {
|
|
1802
1918
|
variant: "pill",
|
|
1803
1919
|
active: true,
|
|
1804
1920
|
highlight: true,
|
|
1805
1921
|
class: {
|
|
1806
|
-
link: ["hover:before:bg-
|
|
1922
|
+
link: ["hover:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "before:transition-colors"]
|
|
1807
1923
|
}
|
|
1808
1924
|
}, {
|
|
1809
1925
|
disabled: false,
|
|
1810
1926
|
active: false,
|
|
1811
1927
|
variant: "link",
|
|
1812
1928
|
class: {
|
|
1813
|
-
link: ["hover:text-
|
|
1814
|
-
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"]
|
|
1931
|
+
}
|
|
1932
|
+
}, {
|
|
1933
|
+
disabled: false,
|
|
1934
|
+
active: false,
|
|
1935
|
+
variant: "link",
|
|
1936
|
+
orientation: "horizontal",
|
|
1937
|
+
class: {
|
|
1938
|
+
link: "data-[state=open]:text-(--ui-text-highlighted)",
|
|
1939
|
+
linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
|
|
1815
1940
|
}
|
|
1816
1941
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
1817
1942
|
color,
|
|
1818
1943
|
variant: "link",
|
|
1819
1944
|
active: true,
|
|
1820
1945
|
class: {
|
|
1821
|
-
link: `text-
|
|
1822
|
-
linkLeadingIcon: `text-
|
|
1946
|
+
link: `text-(--ui-${color})`,
|
|
1947
|
+
linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
|
|
1823
1948
|
}
|
|
1824
1949
|
})), {
|
|
1825
1950
|
color: "neutral",
|
|
1826
1951
|
variant: "link",
|
|
1827
1952
|
active: true,
|
|
1828
1953
|
class: {
|
|
1829
|
-
link: "text-
|
|
1830
|
-
linkLeadingIcon: "text-
|
|
1954
|
+
link: "text-(--ui-text-highlighted)",
|
|
1955
|
+
linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
|
|
1831
1956
|
}
|
|
1832
1957
|
}, ...(options.theme.colors || []).map((highlightColor) => ({
|
|
1833
1958
|
highlightColor,
|
|
@@ -1835,7 +1960,7 @@ const navigationMenu = (options) => ({
|
|
|
1835
1960
|
level: true,
|
|
1836
1961
|
active: true,
|
|
1837
1962
|
class: {
|
|
1838
|
-
link: `after:bg-
|
|
1963
|
+
link: `after:bg-(--ui-${highlightColor})`
|
|
1839
1964
|
}
|
|
1840
1965
|
})), {
|
|
1841
1966
|
highlightColor: "neutral",
|
|
@@ -1843,7 +1968,20 @@ const navigationMenu = (options) => ({
|
|
|
1843
1968
|
level: true,
|
|
1844
1969
|
active: true,
|
|
1845
1970
|
class: {
|
|
1846
|
-
link: "after:bg-
|
|
1971
|
+
link: "after:bg-(--ui-bg-inverted)"
|
|
1972
|
+
}
|
|
1973
|
+
}, {
|
|
1974
|
+
orientation: "vertical",
|
|
1975
|
+
collapsed: false,
|
|
1976
|
+
class: {
|
|
1977
|
+
childList: "ms-5 border-s border-(--ui-border)",
|
|
1978
|
+
childItem: "ps-1.5 -ms-px"
|
|
1979
|
+
}
|
|
1980
|
+
}, {
|
|
1981
|
+
orientation: "vertical",
|
|
1982
|
+
collapsed: true,
|
|
1983
|
+
class: {
|
|
1984
|
+
link: "px-1.5"
|
|
1847
1985
|
}
|
|
1848
1986
|
}],
|
|
1849
1987
|
defaultVariants: {
|
|
@@ -1865,7 +2003,7 @@ const pagination = {
|
|
|
1865
2003
|
const pinInput = (options) => ({
|
|
1866
2004
|
slots: {
|
|
1867
2005
|
root: "relative inline-flex items-center gap-1.5",
|
|
1868
|
-
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"]
|
|
1869
2007
|
},
|
|
1870
2008
|
variants: {
|
|
1871
2009
|
size: {
|
|
@@ -1886,11 +2024,11 @@ const pinInput = (options) => ({
|
|
|
1886
2024
|
}
|
|
1887
2025
|
},
|
|
1888
2026
|
variant: {
|
|
1889
|
-
outline: "text-
|
|
1890
|
-
soft: "text-
|
|
1891
|
-
subtle: "text-
|
|
1892
|
-
ghost: "text-
|
|
1893
|
-
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"
|
|
1894
2032
|
},
|
|
1895
2033
|
color: {
|
|
1896
2034
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
@@ -1903,19 +2041,19 @@ const pinInput = (options) => ({
|
|
|
1903
2041
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1904
2042
|
color,
|
|
1905
2043
|
variant: ["outline", "subtle"],
|
|
1906
|
-
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})`
|
|
1907
2045
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1908
2046
|
color,
|
|
1909
2047
|
highlight: true,
|
|
1910
|
-
class: `ring ring-inset ring-
|
|
2048
|
+
class: `ring ring-inset ring-(--ui-${color})`
|
|
1911
2049
|
})), {
|
|
1912
2050
|
color: "neutral",
|
|
1913
2051
|
variant: ["outline", "subtle"],
|
|
1914
|
-
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)"
|
|
1915
2053
|
}, {
|
|
1916
2054
|
color: "neutral",
|
|
1917
2055
|
highlight: true,
|
|
1918
|
-
class: "ring ring-inset ring-
|
|
2056
|
+
class: "ring ring-inset ring-(--ui-border-inverted)"
|
|
1919
2057
|
}],
|
|
1920
2058
|
defaultVariants: {
|
|
1921
2059
|
size: "md",
|
|
@@ -1926,17 +2064,17 @@ const pinInput = (options) => ({
|
|
|
1926
2064
|
|
|
1927
2065
|
const popover = {
|
|
1928
2066
|
slots: {
|
|
1929
|
-
content: "bg-
|
|
1930
|
-
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)"
|
|
1931
2069
|
}
|
|
1932
2070
|
};
|
|
1933
2071
|
|
|
1934
2072
|
const progress = (options) => ({
|
|
1935
2073
|
slots: {
|
|
1936
2074
|
root: "gap-2",
|
|
1937
|
-
base: "relative overflow-hidden rounded-full bg-
|
|
2075
|
+
base: "relative overflow-hidden rounded-full bg-(--ui-bg-accented)",
|
|
1938
2076
|
indicator: "rounded-full size-full transition-transform duration-200 ease-out",
|
|
1939
|
-
status: "flex justify-end text-
|
|
2077
|
+
status: "flex justify-end text-(--ui-text-dimmed) transition-[width] duration-200",
|
|
1940
2078
|
steps: "grid items-end",
|
|
1941
2079
|
step: "truncate text-end row-start-1 col-start-1 transition-opacity"
|
|
1942
2080
|
},
|
|
@@ -1949,12 +2087,12 @@ const progress = (options) => ({
|
|
|
1949
2087
|
},
|
|
1950
2088
|
color: {
|
|
1951
2089
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
1952
|
-
indicator: `bg-
|
|
1953
|
-
steps: `text-
|
|
2090
|
+
indicator: `bg-(--ui-${color})`,
|
|
2091
|
+
steps: `text-(--ui-${color})`
|
|
1954
2092
|
}])),
|
|
1955
2093
|
neutral: {
|
|
1956
|
-
indicator: "bg-
|
|
1957
|
-
steps: "text-
|
|
2094
|
+
indicator: "bg-(--ui-bg-inverted)",
|
|
2095
|
+
steps: "text-(--ui-bg)"
|
|
1958
2096
|
}
|
|
1959
2097
|
},
|
|
1960
2098
|
size: {
|
|
@@ -1992,7 +2130,7 @@ const progress = (options) => ({
|
|
|
1992
2130
|
step: "opacity-100"
|
|
1993
2131
|
},
|
|
1994
2132
|
first: {
|
|
1995
|
-
step: "opacity-100 text-
|
|
2133
|
+
step: "opacity-100 text-(--ui-text-muted)"
|
|
1996
2134
|
},
|
|
1997
2135
|
other: {
|
|
1998
2136
|
step: "opacity-0"
|
|
@@ -2149,24 +2287,24 @@ const radioGroup = (options) => ({
|
|
|
2149
2287
|
slots: {
|
|
2150
2288
|
root: "relative",
|
|
2151
2289
|
fieldset: "flex",
|
|
2152
|
-
legend: "mb-1 block font-medium text-
|
|
2290
|
+
legend: "mb-1 block font-medium text-(--ui-text)",
|
|
2153
2291
|
item: "flex items-start",
|
|
2154
|
-
base: "rounded-full ring ring-inset ring-
|
|
2155
|
-
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",
|
|
2156
2294
|
container: "flex items-center",
|
|
2157
2295
|
wrapper: "ms-2",
|
|
2158
|
-
label: "block font-medium text-
|
|
2159
|
-
description: "text-
|
|
2296
|
+
label: "block font-medium text-(--ui-text)",
|
|
2297
|
+
description: "text-(--ui-text-muted)"
|
|
2160
2298
|
},
|
|
2161
2299
|
variants: {
|
|
2162
2300
|
color: {
|
|
2163
2301
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2164
|
-
base: `focus-visible:outline-
|
|
2165
|
-
indicator: `bg-
|
|
2302
|
+
base: `focus-visible:outline-(--ui-${color})`,
|
|
2303
|
+
indicator: `bg-(--ui-${color})`
|
|
2166
2304
|
}])),
|
|
2167
2305
|
neutral: {
|
|
2168
|
-
base: "focus-visible:outline-
|
|
2169
|
-
indicator: "bg-
|
|
2306
|
+
base: "focus-visible:outline-(--ui-border-inverted)",
|
|
2307
|
+
indicator: "bg-(--ui-bg-inverted)"
|
|
2170
2308
|
}
|
|
2171
2309
|
},
|
|
2172
2310
|
orientation: {
|
|
@@ -2228,7 +2366,7 @@ const radioGroup = (options) => ({
|
|
|
2228
2366
|
},
|
|
2229
2367
|
required: {
|
|
2230
2368
|
true: {
|
|
2231
|
-
legend: "after:content-['*'] after:ms-0.5 after:text-
|
|
2369
|
+
legend: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
|
|
2232
2370
|
}
|
|
2233
2371
|
}
|
|
2234
2372
|
},
|
|
@@ -2244,16 +2382,16 @@ const select = (options) => {
|
|
|
2244
2382
|
root: () => undefined,
|
|
2245
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"],
|
|
2246
2384
|
value: "truncate pointer-events-none",
|
|
2247
|
-
placeholder: "truncate text-
|
|
2248
|
-
arrow: "fill-
|
|
2249
|
-
content: "max-h-60 w-
|
|
2250
|
-
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",
|
|
2251
2389
|
group: "p-1 isolate",
|
|
2252
|
-
empty: "py-2 text-center text-sm text-
|
|
2253
|
-
label: "font-semibold text-
|
|
2254
|
-
separator: "-mx-1 my-1 h-px bg-
|
|
2255
|
-
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-
|
|
2256
|
-
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"],
|
|
2257
2395
|
itemLeadingAvatar: "shrink-0",
|
|
2258
2396
|
itemLeadingAvatarSize: "",
|
|
2259
2397
|
itemLeadingChip: "shrink-0",
|
|
@@ -2318,7 +2456,8 @@ const select = (options) => {
|
|
|
2318
2456
|
const selectMenu = (options) => {
|
|
2319
2457
|
return defu.defu({
|
|
2320
2458
|
slots: {
|
|
2321
|
-
input: "border-b border-
|
|
2459
|
+
input: "border-b border-(--ui-border)",
|
|
2460
|
+
focusScope: "flex flex-col min-h-0"
|
|
2322
2461
|
}
|
|
2323
2462
|
}, select(options));
|
|
2324
2463
|
};
|
|
@@ -2327,7 +2466,7 @@ const separator = (options) => ({
|
|
|
2327
2466
|
slots: {
|
|
2328
2467
|
root: "flex items-center align-center text-center",
|
|
2329
2468
|
border: "",
|
|
2330
|
-
container: "font-medium text-
|
|
2469
|
+
container: "font-medium text-(--ui-text) flex",
|
|
2331
2470
|
icon: "shrink-0 size-5",
|
|
2332
2471
|
avatar: "shrink-0",
|
|
2333
2472
|
avatarSize: "2xs",
|
|
@@ -2335,8 +2474,8 @@ const separator = (options) => ({
|
|
|
2335
2474
|
},
|
|
2336
2475
|
variants: {
|
|
2337
2476
|
color: {
|
|
2338
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-
|
|
2339
|
-
neutral: { border: "border-
|
|
2477
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-(--ui-${color})` }])),
|
|
2478
|
+
neutral: { border: "border-(--ui-border)" }
|
|
2340
2479
|
},
|
|
2341
2480
|
orientation: {
|
|
2342
2481
|
horizontal: {
|
|
@@ -2418,18 +2557,18 @@ const separator = (options) => ({
|
|
|
2418
2557
|
});
|
|
2419
2558
|
|
|
2420
2559
|
const skeleton = {
|
|
2421
|
-
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)"
|
|
2422
2561
|
};
|
|
2423
2562
|
|
|
2424
2563
|
const slideover = {
|
|
2425
2564
|
slots: {
|
|
2426
|
-
overlay: "fixed inset-0 bg-
|
|
2427
|
-
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",
|
|
2428
2567
|
header: "px-4 py-5 sm:px-6",
|
|
2429
2568
|
body: "flex-1 overflow-y-auto p-4 sm:p-6",
|
|
2430
2569
|
footer: "flex items-center gap-1.5 p-4 sm:px-6",
|
|
2431
|
-
title: "text-
|
|
2432
|
-
description: "mt-1 text-
|
|
2570
|
+
title: "text-(--ui-text-highlighted) font-semibold",
|
|
2571
|
+
description: "mt-1 text-(--ui-text-muted) text-sm",
|
|
2433
2572
|
close: "absolute top-4 end-4"
|
|
2434
2573
|
},
|
|
2435
2574
|
variants: {
|
|
@@ -2483,19 +2622,19 @@ const slideover = {
|
|
|
2483
2622
|
const slider = (options) => ({
|
|
2484
2623
|
slots: {
|
|
2485
2624
|
root: "relative flex items-center select-none touch-none",
|
|
2486
|
-
track: "relative bg-
|
|
2625
|
+
track: "relative bg-(--ui-bg-accented) overflow-hidden rounded-full grow",
|
|
2487
2626
|
range: "absolute rounded-full",
|
|
2488
|
-
thumb: "rounded-full bg-
|
|
2627
|
+
thumb: "rounded-full bg-(--ui-bg) ring-2 focus-visible:outline-2 focus-visible:outline-offset-2"
|
|
2489
2628
|
},
|
|
2490
2629
|
variants: {
|
|
2491
2630
|
color: {
|
|
2492
2631
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2493
|
-
range: `bg-
|
|
2494
|
-
thumb: `ring-
|
|
2632
|
+
range: `bg-(--ui-${color})`,
|
|
2633
|
+
thumb: `ring-(--ui-${color}) focus-visible:outline-(--ui-${color})/50`
|
|
2495
2634
|
}])),
|
|
2496
2635
|
neutral: {
|
|
2497
|
-
range: "bg-
|
|
2498
|
-
thumb: "ring-
|
|
2636
|
+
range: "bg-(--ui-bg-inverted)",
|
|
2637
|
+
thumb: "ring-(--ui-border-inverted) focus-visible:outline-(--ui-border-inverted)/50"
|
|
2499
2638
|
}
|
|
2500
2639
|
},
|
|
2501
2640
|
size: {
|
|
@@ -2604,13 +2743,13 @@ const stepper = (options) => ({
|
|
|
2604
2743
|
header: "flex",
|
|
2605
2744
|
item: "group text-center relative w-full",
|
|
2606
2745
|
container: "relative",
|
|
2607
|
-
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",
|
|
2608
2747
|
indicator: "flex items-center justify-center size-full",
|
|
2609
2748
|
icon: "shrink-0",
|
|
2610
|
-
separator: "absolute rounded-full group-data-[disabled]:opacity-75 bg-
|
|
2749
|
+
separator: "absolute rounded-full group-data-[disabled]:opacity-75 bg-(--ui-border-accented)",
|
|
2611
2750
|
wrapper: "",
|
|
2612
|
-
title: "font-medium text-
|
|
2613
|
-
description: "text-
|
|
2751
|
+
title: "font-medium text-(--ui-text)",
|
|
2752
|
+
description: "text-(--ui-text-muted) text-wrap",
|
|
2614
2753
|
content: "size-full"
|
|
2615
2754
|
},
|
|
2616
2755
|
variants: {
|
|
@@ -2666,12 +2805,12 @@ const stepper = (options) => ({
|
|
|
2666
2805
|
},
|
|
2667
2806
|
color: {
|
|
2668
2807
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2669
|
-
trigger: `group-data-[state=completed]:bg-
|
|
2670
|
-
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})`
|
|
2671
2810
|
}])),
|
|
2672
2811
|
neutral: {
|
|
2673
|
-
trigger: `group-data-[state=completed]:bg-
|
|
2674
|
-
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)`
|
|
2675
2814
|
}
|
|
2676
2815
|
}
|
|
2677
2816
|
},
|
|
@@ -2725,23 +2864,23 @@ const stepper = (options) => ({
|
|
|
2725
2864
|
const _switch = (options) => ({
|
|
2726
2865
|
slots: {
|
|
2727
2866
|
root: "relative flex items-start",
|
|
2728
|
-
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"],
|
|
2729
2868
|
container: "flex items-center",
|
|
2730
|
-
thumb: "group pointer-events-none rounded-full bg-
|
|
2731
|
-
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"],
|
|
2732
2871
|
wrapper: "ms-2",
|
|
2733
|
-
label: "block font-medium text-
|
|
2734
|
-
description: "text-
|
|
2872
|
+
label: "block font-medium text-(--ui-text)",
|
|
2873
|
+
description: "text-(--ui-text-muted)"
|
|
2735
2874
|
},
|
|
2736
2875
|
variants: {
|
|
2737
2876
|
color: {
|
|
2738
2877
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2739
|
-
base: `data-[state=checked]:bg-
|
|
2740
|
-
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})`
|
|
2741
2880
|
}])),
|
|
2742
2881
|
neutral: {
|
|
2743
|
-
base: "data-[state=checked]:bg-
|
|
2744
|
-
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)"
|
|
2745
2884
|
}
|
|
2746
2885
|
},
|
|
2747
2886
|
size: {
|
|
@@ -2793,7 +2932,7 @@ const _switch = (options) => ({
|
|
|
2793
2932
|
},
|
|
2794
2933
|
required: {
|
|
2795
2934
|
true: {
|
|
2796
|
-
label: "after:content-['*'] after:ms-0.5 after:text-
|
|
2935
|
+
label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
|
|
2797
2936
|
}
|
|
2798
2937
|
},
|
|
2799
2938
|
disabled: {
|
|
@@ -2815,23 +2954,23 @@ const table = (options) => ({
|
|
|
2815
2954
|
root: "relative overflow-auto",
|
|
2816
2955
|
base: "min-w-full overflow-clip",
|
|
2817
2956
|
caption: "sr-only",
|
|
2818
|
-
thead: "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-
|
|
2819
|
-
tbody: "divide-y divide-
|
|
2820
|
-
tr: "data-[selected=true]:bg-
|
|
2821
|
-
th: "px-4 py-3.5 text-sm text-
|
|
2822
|
-
td: "p-4 text-sm text-
|
|
2823
|
-
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)"
|
|
2824
2963
|
},
|
|
2825
2964
|
variants: {
|
|
2826
2965
|
pinned: {
|
|
2827
2966
|
true: {
|
|
2828
|
-
th: "sticky bg-
|
|
2829
|
-
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"
|
|
2830
2969
|
}
|
|
2831
2970
|
},
|
|
2832
2971
|
sticky: {
|
|
2833
2972
|
true: {
|
|
2834
|
-
thead: "sticky top-0 inset-x-0 bg-
|
|
2973
|
+
thead: "sticky top-0 inset-x-0 bg-(--ui-bg)/75 z-[1] backdrop-blur"
|
|
2835
2974
|
}
|
|
2836
2975
|
},
|
|
2837
2976
|
loading: {
|
|
@@ -2854,13 +2993,13 @@ const table = (options) => ({
|
|
|
2854
2993
|
loading: true,
|
|
2855
2994
|
loadingColor,
|
|
2856
2995
|
class: {
|
|
2857
|
-
thead: `after:bg-
|
|
2996
|
+
thead: `after:bg-(--ui-${loadingColor})`
|
|
2858
2997
|
}
|
|
2859
2998
|
})), {
|
|
2860
2999
|
loading: true,
|
|
2861
3000
|
loadingColor: "neutral",
|
|
2862
3001
|
class: {
|
|
2863
|
-
thead: "after:bg-
|
|
3002
|
+
thead: "after:bg-(--ui-bg-inverted)"
|
|
2864
3003
|
}
|
|
2865
3004
|
}, {
|
|
2866
3005
|
loading: true,
|
|
@@ -2898,7 +3037,7 @@ const tabs = (options) => ({
|
|
|
2898
3037
|
root: "flex items-center gap-2",
|
|
2899
3038
|
list: "relative flex p-1 group",
|
|
2900
3039
|
indicator: "absolute transition-[translate,width] duration-200",
|
|
2901
|
-
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"],
|
|
2902
3041
|
content: "focus:outline-none w-full",
|
|
2903
3042
|
leadingIcon: "shrink-0",
|
|
2904
3043
|
leadingAvatar: "shrink-0",
|
|
@@ -2912,12 +3051,12 @@ const tabs = (options) => ({
|
|
|
2912
3051
|
},
|
|
2913
3052
|
variant: {
|
|
2914
3053
|
pill: {
|
|
2915
|
-
list: "bg-
|
|
3054
|
+
list: "bg-(--ui-bg-elevated) rounded-[calc(var(--ui-radius)*2)]",
|
|
2916
3055
|
trigger: "flex-1 w-full",
|
|
2917
3056
|
indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-xs"
|
|
2918
3057
|
},
|
|
2919
3058
|
link: {
|
|
2920
|
-
list: "border-
|
|
3059
|
+
list: "border-(--ui-border)",
|
|
2921
3060
|
indicator: "rounded-full"
|
|
2922
3061
|
}
|
|
2923
3062
|
},
|
|
@@ -2925,12 +3064,12 @@ const tabs = (options) => ({
|
|
|
2925
3064
|
horizontal: {
|
|
2926
3065
|
root: "flex-col",
|
|
2927
3066
|
list: "w-full",
|
|
2928
|
-
indicator: "left-0 w-
|
|
3067
|
+
indicator: "left-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position)",
|
|
2929
3068
|
trigger: "justify-center"
|
|
2930
3069
|
},
|
|
2931
3070
|
vertical: {
|
|
2932
3071
|
list: "flex-col",
|
|
2933
|
-
indicator: "top-0 h-
|
|
3072
|
+
indicator: "top-0 h-(--reka-tabs-indicator-size) translate-y-(--reka-tabs-indicator-position)"
|
|
2934
3073
|
}
|
|
2935
3074
|
},
|
|
2936
3075
|
size: {
|
|
@@ -2992,29 +3131,29 @@ const tabs = (options) => ({
|
|
|
2992
3131
|
color,
|
|
2993
3132
|
variant: "pill",
|
|
2994
3133
|
class: {
|
|
2995
|
-
indicator: `bg-
|
|
2996
|
-
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})`
|
|
2997
3136
|
}
|
|
2998
3137
|
})), {
|
|
2999
3138
|
color: "neutral",
|
|
3000
3139
|
variant: "pill",
|
|
3001
3140
|
class: {
|
|
3002
|
-
indicator: "bg-
|
|
3003
|
-
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)"
|
|
3004
3143
|
}
|
|
3005
3144
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
3006
3145
|
color,
|
|
3007
3146
|
variant: "link",
|
|
3008
3147
|
class: {
|
|
3009
|
-
indicator: `bg-
|
|
3010
|
-
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})`
|
|
3011
3150
|
}
|
|
3012
3151
|
})), {
|
|
3013
3152
|
color: "neutral",
|
|
3014
3153
|
variant: "link",
|
|
3015
3154
|
class: {
|
|
3016
|
-
indicator: "bg-
|
|
3017
|
-
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)"
|
|
3018
3157
|
}
|
|
3019
3158
|
}],
|
|
3020
3159
|
defaultVariants: {
|
|
@@ -3030,38 +3169,43 @@ const textarea = (options) => {
|
|
|
3030
3169
|
|
|
3031
3170
|
const toast = (options) => ({
|
|
3032
3171
|
slots: {
|
|
3033
|
-
root: "relative group overflow-hidden bg-
|
|
3034
|
-
wrapper: "w-0 flex-1 flex flex-col
|
|
3035
|
-
title: "text-sm font-medium text-
|
|
3036
|
-
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)",
|
|
3037
3176
|
icon: "shrink-0 size-5",
|
|
3038
3177
|
avatar: "shrink-0",
|
|
3039
3178
|
avatarSize: "2xl",
|
|
3040
3179
|
actions: "flex gap-1.5 shrink-0",
|
|
3041
3180
|
progress: "absolute inset-x-0 bottom-0 h-1 z-[-1]",
|
|
3042
|
-
close: "p-0
|
|
3181
|
+
close: "p-0"
|
|
3043
3182
|
},
|
|
3044
3183
|
variants: {
|
|
3045
3184
|
color: {
|
|
3046
3185
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
3047
|
-
root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
3048
|
-
icon: `text-
|
|
3049
|
-
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})`
|
|
3050
3189
|
}])),
|
|
3051
3190
|
neutral: {
|
|
3052
|
-
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
3053
|
-
icon: "text-
|
|
3054
|
-
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)"
|
|
3055
3194
|
}
|
|
3056
3195
|
},
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
root: "items-start",
|
|
3060
|
-
actions: "items-start mt-1"
|
|
3061
|
-
},
|
|
3062
|
-
false: {
|
|
3196
|
+
orientation: {
|
|
3197
|
+
horizontal: {
|
|
3063
3198
|
root: "items-center",
|
|
3064
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"
|
|
3065
3209
|
}
|
|
3066
3210
|
}
|
|
3067
3211
|
},
|
|
@@ -3072,8 +3216,8 @@ const toast = (options) => ({
|
|
|
3072
3216
|
|
|
3073
3217
|
const toaster = {
|
|
3074
3218
|
slots: {
|
|
3075
|
-
viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-
|
|
3076
|
-
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"
|
|
3077
3221
|
},
|
|
3078
3222
|
variants: {
|
|
3079
3223
|
position: {
|
|
@@ -3117,10 +3261,10 @@ const toaster = {
|
|
|
3117
3261
|
}
|
|
3118
3262
|
}, {
|
|
3119
3263
|
swipeDirection: ["left", "right"],
|
|
3120
|
-
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"
|
|
3121
3265
|
}, {
|
|
3122
3266
|
swipeDirection: ["up", "down"],
|
|
3123
|
-
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"
|
|
3124
3268
|
}],
|
|
3125
3269
|
defaultVariants: {
|
|
3126
3270
|
position: "bottom-right"
|
|
@@ -3129,8 +3273,8 @@ const toaster = {
|
|
|
3129
3273
|
|
|
3130
3274
|
const tooltip = {
|
|
3131
3275
|
slots: {
|
|
3132
|
-
content: "flex items-center gap-1 bg-
|
|
3133
|
-
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)",
|
|
3134
3278
|
text: "truncate",
|
|
3135
3279
|
kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:me-0.5`,
|
|
3136
3280
|
kbdsSize: "sm"
|
|
@@ -3229,6 +3373,25 @@ function getTemplates(options, uiConfig) {
|
|
|
3229
3373
|
}
|
|
3230
3374
|
});
|
|
3231
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
|
+
});
|
|
3232
3395
|
templates.push({
|
|
3233
3396
|
filename: "ui/index.ts",
|
|
3234
3397
|
write: true,
|
|
@@ -3237,7 +3400,7 @@ function getTemplates(options, uiConfig) {
|
|
|
3237
3400
|
templates.push({
|
|
3238
3401
|
filename: "types/ui.d.ts",
|
|
3239
3402
|
getContents: () => `import * as ui from '#build/ui'
|
|
3240
|
-
import type { DeepPartial } from '
|
|
3403
|
+
import type { DeepPartial } from '@nuxt/ui'
|
|
3241
3404
|
import type { defaultConfig } from 'tailwind-variants'
|
|
3242
3405
|
import colors from 'tailwindcss/colors'
|
|
3243
3406
|
|