@nuxt/ui 3.0.0-alpha.6 → 3.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +6 -6
- package/dist/module.d.ts +6 -6
- package/dist/module.json +1 -1
- package/dist/module.mjs +391 -257
- package/dist/runtime/components/Accordion.vue +13 -5
- package/dist/runtime/components/Breadcrumb.vue +14 -6
- package/dist/runtime/components/Button.vue +4 -2
- package/dist/runtime/components/Carousel.vue +6 -6
- package/dist/runtime/components/Checkbox.vue +3 -6
- package/dist/runtime/components/CommandPalette.vue +25 -16
- package/dist/runtime/components/ContextMenu.vue +31 -7
- package/dist/runtime/components/ContextMenuContent.vue +36 -8
- package/dist/runtime/components/DropdownMenu.vue +31 -7
- package/dist/runtime/components/DropdownMenuContent.vue +38 -8
- package/dist/runtime/components/Form.vue +3 -1
- package/dist/runtime/components/Input.vue +6 -4
- package/dist/runtime/components/InputMenu.vue +40 -24
- package/dist/runtime/components/LinkBase.vue +4 -2
- package/dist/runtime/components/NavigationMenu.vue +78 -41
- package/dist/runtime/components/RadioGroup.vue +22 -3
- package/dist/runtime/components/Select.vue +22 -10
- package/dist/runtime/components/SelectMenu.vue +43 -31
- package/dist/runtime/components/Table.vue +232 -0
- package/dist/runtime/components/Tabs.vue +15 -7
- package/dist/runtime/components/Toaster.vue +1 -1
- package/dist/runtime/composables/defineShortcuts.js +1 -1
- package/dist/runtime/composables/useComponentIcons.d.ts +3 -0
- package/dist/runtime/composables/useModal.d.ts +1 -1
- package/dist/runtime/composables/useSlideover.d.ts +1 -1
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/keyframes.css +1 -0
- package/dist/runtime/types/form.d.ts +2 -1
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/utils/form.d.ts +3 -0
- package/dist/runtime/utils/form.js +14 -0
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/runtime/utils/index.js +3 -0
- package/package.json +15 -12
- package/dist/runtime/types/component.d.ts +0 -17
- package/dist/runtime/types/component.js +0 -0
package/dist/module.mjs
CHANGED
|
@@ -7,9 +7,9 @@ import { pick } from '../dist/runtime/utils/index.js';
|
|
|
7
7
|
const accordion = {
|
|
8
8
|
slots: {
|
|
9
9
|
root: "w-full",
|
|
10
|
-
item: "border-b border-[--ui-border] last:border-b-0",
|
|
10
|
+
item: "border-b border-[var(--ui-border)] last:border-b-0",
|
|
11
11
|
header: "flex",
|
|
12
|
-
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",
|
|
12
|
+
trigger: "group flex-1 flex items-center gap-1.5 font-medium text-sm py-3.5 focus-visible:outline-[var(--ui-primary)] min-w-0",
|
|
13
13
|
content: "data-[state=open]:animate-[accordion-down_200ms_ease-out] data-[state=closed]:animate-[accordion-up_200ms_ease-out] overflow-hidden focus:outline-none",
|
|
14
14
|
body: "text-sm pb-3.5",
|
|
15
15
|
leadingIcon: "shrink-0 size-5",
|
|
@@ -63,49 +63,49 @@ const alert = (options) => ({
|
|
|
63
63
|
color,
|
|
64
64
|
variant: "solid",
|
|
65
65
|
class: {
|
|
66
|
-
root: `bg-[--ui-${color}] text-[--ui-bg]`
|
|
66
|
+
root: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
|
|
67
67
|
}
|
|
68
68
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
69
69
|
color,
|
|
70
70
|
variant: "outline",
|
|
71
71
|
class: {
|
|
72
|
-
root: `text-[--ui-${color}] ring ring-inset ring-[--ui-${color}]/25`
|
|
72
|
+
root: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
|
|
73
73
|
}
|
|
74
74
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
75
75
|
color,
|
|
76
76
|
variant: "soft",
|
|
77
77
|
class: {
|
|
78
|
-
root: `bg-[--ui-${color}]/10 text-[--ui-${color}]`
|
|
78
|
+
root: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
|
|
79
79
|
}
|
|
80
80
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
81
81
|
color,
|
|
82
82
|
variant: "subtle",
|
|
83
83
|
class: {
|
|
84
|
-
root: `bg-[--ui-${color}]/10 text-[--ui-${color}] ring ring-inset ring-[--ui-${color}]/25`
|
|
84
|
+
root: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
|
|
85
85
|
}
|
|
86
86
|
})), {
|
|
87
87
|
color: "neutral",
|
|
88
88
|
variant: "solid",
|
|
89
89
|
class: {
|
|
90
|
-
root: "text-[--ui-bg] bg-[--ui-bg-inverted]"
|
|
90
|
+
root: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
|
|
91
91
|
}
|
|
92
92
|
}, {
|
|
93
93
|
color: "neutral",
|
|
94
94
|
variant: "outline",
|
|
95
95
|
class: {
|
|
96
|
-
root: "text-[--ui-text-highlighted] bg-[--ui-bg] ring ring-inset ring-[--ui-border]"
|
|
96
|
+
root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border)]"
|
|
97
97
|
}
|
|
98
98
|
}, {
|
|
99
99
|
color: "neutral",
|
|
100
100
|
variant: "soft",
|
|
101
101
|
class: {
|
|
102
|
-
root: "text-[--ui-text-highlighted] bg-[--ui-bg-elevated]/50"
|
|
102
|
+
root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50"
|
|
103
103
|
}
|
|
104
104
|
}, {
|
|
105
105
|
color: "neutral",
|
|
106
106
|
variant: "subtle",
|
|
107
107
|
class: {
|
|
108
|
-
root: "text-[--ui-text-highlighted] bg-[--ui-bg-elevated]/50 ring ring-inset ring-[--ui-border-accented]"
|
|
108
|
+
root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50 ring ring-inset ring-[var(--ui-border-accented)]"
|
|
109
109
|
}
|
|
110
110
|
}],
|
|
111
111
|
defaultVariants: {
|
|
@@ -116,10 +116,10 @@ const alert = (options) => ({
|
|
|
116
116
|
|
|
117
117
|
const avatar = {
|
|
118
118
|
slots: {
|
|
119
|
-
root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-[--ui-bg-elevated]",
|
|
119
|
+
root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-[var(--ui-bg-elevated)]",
|
|
120
120
|
image: "h-full w-full rounded-[inherit] object-cover",
|
|
121
|
-
fallback: "font-medium leading-none text-[--ui-text-muted] truncate",
|
|
122
|
-
icon: "text-[--ui-text-muted] shrink-0"
|
|
121
|
+
fallback: "font-medium leading-none text-[var(--ui-text-muted)] truncate",
|
|
122
|
+
icon: "text-[var(--ui-text-muted)] shrink-0"
|
|
123
123
|
},
|
|
124
124
|
variants: {
|
|
125
125
|
size: {
|
|
@@ -160,18 +160,18 @@ const avatar = {
|
|
|
160
160
|
const avatarGroup = {
|
|
161
161
|
slots: {
|
|
162
162
|
root: "inline-flex flex-row-reverse justify-end",
|
|
163
|
-
base: "relative rounded-full ring-[--ui-bg] first:me-0"
|
|
163
|
+
base: "relative rounded-full ring-[var(--ui-bg)] first:me-0"
|
|
164
164
|
},
|
|
165
165
|
variants: {
|
|
166
166
|
size: {
|
|
167
167
|
"3xs": {
|
|
168
|
-
base: "ring
|
|
168
|
+
base: "ring -me-0.5"
|
|
169
169
|
},
|
|
170
170
|
"2xs": {
|
|
171
|
-
base: "ring
|
|
171
|
+
base: "ring -me-0.5"
|
|
172
172
|
},
|
|
173
173
|
"xs": {
|
|
174
|
-
base: "ring
|
|
174
|
+
base: "ring -me-0.5"
|
|
175
175
|
},
|
|
176
176
|
"sm": {
|
|
177
177
|
base: "ring-2 -me-1.5"
|
|
@@ -183,13 +183,13 @@ const avatarGroup = {
|
|
|
183
183
|
base: "ring-2 -me-1.5"
|
|
184
184
|
},
|
|
185
185
|
"xl": {
|
|
186
|
-
base: "ring-
|
|
186
|
+
base: "ring-3 -me-2"
|
|
187
187
|
},
|
|
188
188
|
"2xl": {
|
|
189
|
-
base: "ring-
|
|
189
|
+
base: "ring-3 -me-2"
|
|
190
190
|
},
|
|
191
191
|
"3xl": {
|
|
192
|
-
base: "ring-
|
|
192
|
+
base: "ring-3 -me-2"
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
},
|
|
@@ -220,35 +220,35 @@ const badge = (options) => ({
|
|
|
220
220
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
221
221
|
color,
|
|
222
222
|
variant: "solid",
|
|
223
|
-
class: `bg-[--ui-${color}] text-[--ui-bg]`
|
|
223
|
+
class: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
|
|
224
224
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
225
225
|
color,
|
|
226
226
|
variant: "outline",
|
|
227
|
-
class: `text-[--ui-${color}] ring ring-inset ring-[--ui-${color}]/50`
|
|
227
|
+
class: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/50`
|
|
228
228
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
229
229
|
color,
|
|
230
230
|
variant: "soft",
|
|
231
|
-
class: `bg-[--ui-${color}]/10 text-[--ui-${color}]`
|
|
231
|
+
class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
|
|
232
232
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
233
233
|
color,
|
|
234
234
|
variant: "subtle",
|
|
235
|
-
class: `bg-[--ui-${color}]/10 text-[--ui-${color}] ring ring-inset ring-[--ui-${color}]/25`
|
|
235
|
+
class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
|
|
236
236
|
})), {
|
|
237
237
|
color: "neutral",
|
|
238
238
|
variant: "solid",
|
|
239
|
-
class: "text-[--ui-bg] bg-[--ui-bg-inverted]"
|
|
239
|
+
class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
|
|
240
240
|
}, {
|
|
241
241
|
color: "neutral",
|
|
242
242
|
variant: "outline",
|
|
243
|
-
class: "ring ring-inset ring-[--ui-border-accented] text-[--ui-text] bg-[--ui-bg]"
|
|
243
|
+
class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg)]"
|
|
244
244
|
}, {
|
|
245
245
|
color: "neutral",
|
|
246
246
|
variant: "soft",
|
|
247
|
-
class: "text-[--ui-text] bg-[--ui-bg-elevated]"
|
|
247
|
+
class: "text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]"
|
|
248
248
|
}, {
|
|
249
249
|
color: "neutral",
|
|
250
250
|
variant: "subtle",
|
|
251
|
-
class: "ring ring-inset ring-[--ui-border-accented] text-[--ui-text] bg-[--ui-bg-elevated]"
|
|
251
|
+
class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]"
|
|
252
252
|
}],
|
|
253
253
|
defaultVariants: {
|
|
254
254
|
color: "primary",
|
|
@@ -262,21 +262,21 @@ const breadcrumb = (options) => ({
|
|
|
262
262
|
root: "relative min-w-0",
|
|
263
263
|
list: "flex items-center gap-1.5",
|
|
264
264
|
item: "flex min-w-0",
|
|
265
|
-
link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-[--ui-primary]",
|
|
265
|
+
link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-[var(--ui-primary)]",
|
|
266
266
|
linkLeadingIcon: "shrink-0 size-5",
|
|
267
267
|
linkLeadingAvatar: "shrink-0",
|
|
268
268
|
linkLeadingAvatarSize: "2xs",
|
|
269
269
|
linkLabel: "truncate",
|
|
270
270
|
separator: "flex",
|
|
271
|
-
separatorIcon: "shrink-0 size-5 text-[--ui-text-muted]"
|
|
271
|
+
separatorIcon: "shrink-0 size-5 text-[var(--ui-text-muted)]"
|
|
272
272
|
},
|
|
273
273
|
variants: {
|
|
274
274
|
active: {
|
|
275
275
|
true: {
|
|
276
|
-
link: "text-[--ui-primary] font-semibold"
|
|
276
|
+
link: "text-[var(--ui-primary)] font-semibold"
|
|
277
277
|
},
|
|
278
278
|
false: {
|
|
279
|
-
link: "text-[--ui-text-muted] font-medium"
|
|
279
|
+
link: "text-[var(--ui-text-muted)] font-medium"
|
|
280
280
|
}
|
|
281
281
|
},
|
|
282
282
|
disabled: {
|
|
@@ -293,7 +293,7 @@ const breadcrumb = (options) => ({
|
|
|
293
293
|
active: false,
|
|
294
294
|
to: true,
|
|
295
295
|
class: {
|
|
296
|
-
link: ["hover:text-[--ui-text]", options.theme.transitions && "transition-colors"]
|
|
296
|
+
link: ["hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
|
|
297
297
|
}
|
|
298
298
|
}]
|
|
299
299
|
});
|
|
@@ -339,6 +339,7 @@ const button = (options) => ({
|
|
|
339
339
|
label: "truncate",
|
|
340
340
|
leadingIcon: "shrink-0",
|
|
341
341
|
leadingAvatar: "shrink-0",
|
|
342
|
+
leadingAvatarSize: "",
|
|
342
343
|
trailingIcon: "shrink-0"
|
|
343
344
|
},
|
|
344
345
|
variants: {
|
|
@@ -359,32 +360,38 @@ const button = (options) => ({
|
|
|
359
360
|
xs: {
|
|
360
361
|
base: "px-2 py-1 text-xs gap-1",
|
|
361
362
|
leadingIcon: "size-4",
|
|
363
|
+
leadingAvatarSize: "3xs",
|
|
362
364
|
trailingIcon: "size-4"
|
|
363
365
|
},
|
|
364
366
|
sm: {
|
|
365
367
|
base: "px-2.5 py-1.5 text-xs gap-1.5",
|
|
366
368
|
leadingIcon: "size-4",
|
|
369
|
+
leadingAvatarSize: "3xs",
|
|
367
370
|
trailingIcon: "size-4"
|
|
368
371
|
},
|
|
369
372
|
md: {
|
|
370
373
|
base: "px-2.5 py-1.5 text-sm gap-1.5",
|
|
371
374
|
leadingIcon: "size-5",
|
|
375
|
+
leadingAvatarSize: "2xs",
|
|
372
376
|
trailingIcon: "size-5"
|
|
373
377
|
},
|
|
374
378
|
lg: {
|
|
375
379
|
base: "px-3 py-2 text-sm gap-2",
|
|
376
380
|
leadingIcon: "size-5",
|
|
381
|
+
leadingAvatarSize: "2xs",
|
|
377
382
|
trailingIcon: "size-5"
|
|
378
383
|
},
|
|
379
384
|
xl: {
|
|
380
385
|
base: "px-3 py-2 text-base gap-2",
|
|
381
386
|
leadingIcon: "size-6",
|
|
387
|
+
leadingAvatarSize: "xs",
|
|
382
388
|
trailingIcon: "size-6"
|
|
383
389
|
}
|
|
384
390
|
},
|
|
385
391
|
block: {
|
|
386
392
|
true: {
|
|
387
393
|
base: "w-full justify-center",
|
|
394
|
+
leadingAvatarSize: "xs",
|
|
388
395
|
trailingIcon: "ms-auto"
|
|
389
396
|
}
|
|
390
397
|
},
|
|
@@ -404,51 +411,51 @@ const button = (options) => ({
|
|
|
404
411
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
405
412
|
color,
|
|
406
413
|
variant: "solid",
|
|
407
|
-
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}]`
|
|
414
|
+
class: `text-[var(--ui-bg)] bg-[var(--ui-${color})] hover:bg-[var(--ui-${color})]/75 disabled:bg-[var(--ui-${color})] aria-disabled:bg-[var(--ui-${color})] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-${color})]`
|
|
408
415
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
409
416
|
color,
|
|
410
417
|
variant: "outline",
|
|
411
|
-
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}]`
|
|
418
|
+
class: `ring ring-inset ring-[var(--ui-${color})]/50 text-[var(--ui-${color})] hover:bg-[var(--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-[var(--ui-${color})]`
|
|
412
419
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
413
420
|
color,
|
|
414
421
|
variant: "soft",
|
|
415
|
-
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`
|
|
422
|
+
class: `text-[var(--ui-${color})] bg-[var(--ui-${color})]/10 hover:bg-[var(--ui-${color})]/15 focus-visible:bg-[var(--ui-${color})]/15 disabled:bg-[var(--ui-${color})]/10 aria-disabled:bg-[var(--ui-${color})]/10`
|
|
416
423
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
417
424
|
color,
|
|
418
425
|
variant: "subtle",
|
|
419
|
-
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}]`
|
|
426
|
+
class: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25 bg-[var(--ui-${color})]/10 hover:bg-[var(--ui-${color})]/15 disabled:bg-[var(--ui-${color})]/10 aria-disabled:bg-[var(--ui-${color})]/10 focus-visible:ring-2 focus-visible:ring-[var(--ui-${color})]`
|
|
420
427
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
421
428
|
color,
|
|
422
429
|
variant: "ghost",
|
|
423
|
-
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`
|
|
430
|
+
class: `text-[var(--ui-${color})] hover:bg-[var(--ui-${color})]/10 focus-visible:bg-[var(--ui-${color})]/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent`
|
|
424
431
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
425
432
|
color,
|
|
426
433
|
variant: "link",
|
|
427
|
-
class: `text-[--ui-${color}] hover:text-[--ui-${color}] disabled:text-[--ui-${color}] aria-disabled:text-[--ui-${color}] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[--ui-${color}]`
|
|
434
|
+
class: `text-[var(--ui-${color})] hover:text-[var(--ui-${color})]/75 disabled:text-[var(--ui-${color})] aria-disabled:text-[var(--ui-${color})] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
|
|
428
435
|
})), {
|
|
429
436
|
color: "neutral",
|
|
430
437
|
variant: "solid",
|
|
431
|
-
class: "text-[--ui-bg] bg-[--ui-bg-inverted] hover:bg-[--ui-bg-inverted]/80 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]"
|
|
438
|
+
class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)] hover:bg-[var(--ui-bg-inverted)]/80 disabled:bg-[var(--ui-bg-inverted)] aria-disabled:bg-[var(--ui-bg-inverted)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-border-inverted)]"
|
|
432
439
|
}, {
|
|
433
440
|
color: "neutral",
|
|
434
441
|
variant: "outline",
|
|
435
|
-
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]"
|
|
442
|
+
class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg)] hover:bg-[var(--ui-bg-elevated)] disabled:bg-[var(--ui-bg)] aria-disabled:bg-[var(--ui-bg)] focus-visible:ring-2 focus-visible:ring-[var(--ui-border-inverted)]"
|
|
436
443
|
}, {
|
|
437
444
|
color: "neutral",
|
|
438
445
|
variant: "soft",
|
|
439
|
-
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]"
|
|
446
|
+
class: "text-[var(--ui-text)] bg-[var(--ui-bg-elevated)] hover:bg-[var(--ui-bg-accented)]/75 focus-visible:bg-[var(--ui-bg-accented)]/75 disabled:bg-[var(--ui-bg-elevated)] aria-disabled:bg-[var(--ui-bg-elevated)]"
|
|
440
447
|
}, {
|
|
441
448
|
color: "neutral",
|
|
442
449
|
variant: "subtle",
|
|
443
|
-
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]"
|
|
450
|
+
class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg-elevated)] hover:bg-[var(--ui-bg-accented)]/75 disabled:bg-[var(--ui-bg-elevated)] aria-disabled:bg-[var(--ui-bg-elevated)] focus-visible:ring-2 focus-visible:ring-[var(--ui-border-inverted)]"
|
|
444
451
|
}, {
|
|
445
452
|
color: "neutral",
|
|
446
453
|
variant: "ghost",
|
|
447
|
-
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"
|
|
454
|
+
class: "text-[var(--ui-text)] hover:bg-[var(--ui-bg-elevated)] focus-visible:bg-[var(--ui-bg-elevated)] hover:disabled:bg-transparent dark:hover:disabled:bg-transparent hover:aria-disabled:bg-transparent dark:hover:aria-disabled:bg-transparent"
|
|
448
455
|
}, {
|
|
449
456
|
color: "neutral",
|
|
450
457
|
variant: "link",
|
|
451
|
-
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]"
|
|
458
|
+
class: "text-[var(--ui-text-muted)] hover:text-[var(--ui-text)] disabled:text-[var(--ui-text-muted)] aria-disabled:text-[var(--ui-text-muted)] focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-[var(--ui-border-inverted)]"
|
|
452
459
|
}, {
|
|
453
460
|
size: "xs",
|
|
454
461
|
square: true,
|
|
@@ -492,7 +499,7 @@ const button = (options) => ({
|
|
|
492
499
|
|
|
493
500
|
const card = {
|
|
494
501
|
slots: {
|
|
495
|
-
root: "bg-[--ui-bg] ring ring-[--ui-border] divide-y divide-[--ui-border] rounded-[calc(var(--ui-radius)*2)] shadow",
|
|
502
|
+
root: "bg-[var(--ui-bg)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] rounded-[calc(var(--ui-radius)*2)] shadow",
|
|
496
503
|
header: "p-4 sm:px-6",
|
|
497
504
|
body: "p-4 sm:p-6",
|
|
498
505
|
footer: "p-4 sm:px-6"
|
|
@@ -510,7 +517,7 @@ const carousel = (options) => ({
|
|
|
510
517
|
prev: "absolute rounded-full",
|
|
511
518
|
next: "absolute rounded-full",
|
|
512
519
|
dots: "absolute inset-x-0 -bottom-7 flex flex-wrap items-center justify-center gap-3",
|
|
513
|
-
dot: ["cursor-pointer size-3 bg-[--ui-border-accented] rounded-full", options.theme.transitions && "transition"]
|
|
520
|
+
dot: ["cursor-pointer size-3 bg-[var(--ui-border-accented)] rounded-full", options.theme.transitions && "transition"]
|
|
514
521
|
},
|
|
515
522
|
variants: {
|
|
516
523
|
orientation: {
|
|
@@ -529,7 +536,7 @@ const carousel = (options) => ({
|
|
|
529
536
|
},
|
|
530
537
|
active: {
|
|
531
538
|
true: {
|
|
532
|
-
dot: "bg-[--ui-border-inverted]"
|
|
539
|
+
dot: "bg-[var(--ui-border-inverted)]"
|
|
533
540
|
}
|
|
534
541
|
}
|
|
535
542
|
},
|
|
@@ -541,17 +548,17 @@ const carousel = (options) => ({
|
|
|
541
548
|
const checkbox = (options) => ({
|
|
542
549
|
slots: {
|
|
543
550
|
root: "relative flex items-start",
|
|
544
|
-
base: "shrink-0 flex items-center justify-center rounded-[--ui-radius] text-[--ui-bg] ring ring-inset ring-[--ui-border-accented] focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
551
|
+
base: "shrink-0 flex items-center justify-center rounded-[var(--ui-radius)] text-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)] focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
545
552
|
container: "flex items-center",
|
|
546
553
|
wrapper: "ms-2",
|
|
547
554
|
icon: "shrink-0 size-full",
|
|
548
|
-
label: "block font-medium text-[--ui-text]",
|
|
549
|
-
description: "text-[--ui-text-muted]"
|
|
555
|
+
label: "block font-medium text-[var(--ui-text)]",
|
|
556
|
+
description: "text-[var(--ui-text-muted)]"
|
|
550
557
|
},
|
|
551
558
|
variants: {
|
|
552
559
|
color: {
|
|
553
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-[--ui-${color}]`])),
|
|
554
|
-
neutral: "focus-visible:outline-[--ui-border-inverted]"
|
|
560
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-[var(--ui-${color})]`])),
|
|
561
|
+
neutral: "focus-visible:outline-[var(--ui-border-inverted)]"
|
|
555
562
|
},
|
|
556
563
|
size: {
|
|
557
564
|
xs: {
|
|
@@ -582,7 +589,7 @@ const checkbox = (options) => ({
|
|
|
582
589
|
},
|
|
583
590
|
required: {
|
|
584
591
|
true: {
|
|
585
|
-
label: "after:content-['*'] after:ms-0.5 after:text-[--ui-error]"
|
|
592
|
+
label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
|
|
586
593
|
}
|
|
587
594
|
},
|
|
588
595
|
disabled: {
|
|
@@ -599,11 +606,11 @@ const checkbox = (options) => ({
|
|
|
599
606
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
600
607
|
color,
|
|
601
608
|
checked: true,
|
|
602
|
-
class: `ring-2 ring-[--ui-${color}] bg-[--ui-${color}]`
|
|
609
|
+
class: `ring-2 ring-[var(--ui-${color})] bg-[var(--ui-${color})]`
|
|
603
610
|
})), {
|
|
604
611
|
color: "neutral",
|
|
605
612
|
checked: true,
|
|
606
|
-
class: "ring-2 ring-[--ui-border-inverted] bg-[--ui-bg-inverted]"
|
|
613
|
+
class: "ring-2 ring-[var(--ui-border-inverted)] bg-[var(--ui-bg-inverted)]"
|
|
607
614
|
}],
|
|
608
615
|
defaultVariants: {
|
|
609
616
|
size: "md",
|
|
@@ -614,12 +621,12 @@ const checkbox = (options) => ({
|
|
|
614
621
|
const chip = (options) => ({
|
|
615
622
|
slots: {
|
|
616
623
|
root: "relative inline-flex items-center justify-center shrink-0",
|
|
617
|
-
base: "rounded-full ring ring-[--ui-bg] flex items-center justify-center text-[--ui-bg] font-medium whitespace-nowrap"
|
|
624
|
+
base: "rounded-full ring ring-[var(--ui-bg)] flex items-center justify-center text-[var(--ui-bg)] font-medium whitespace-nowrap"
|
|
618
625
|
},
|
|
619
626
|
variants: {
|
|
620
627
|
color: {
|
|
621
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-[--ui-${color}]`])),
|
|
622
|
-
neutral: "bg-[--ui-text-muted]"
|
|
628
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-[var(--ui-${color})]`])),
|
|
629
|
+
neutral: "bg-[var(--ui-text-muted)]"
|
|
623
630
|
},
|
|
624
631
|
size: {
|
|
625
632
|
"3xs": "h-[4px] min-w-[4px] text-[4px]",
|
|
@@ -671,36 +678,43 @@ const chip = (options) => ({
|
|
|
671
678
|
|
|
672
679
|
const collapsible = {
|
|
673
680
|
slots: {
|
|
674
|
-
root: "
|
|
681
|
+
root: "",
|
|
675
682
|
content: "data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden"
|
|
676
683
|
}
|
|
677
684
|
};
|
|
678
685
|
|
|
679
686
|
const commandPalette = (options) => ({
|
|
680
687
|
slots: {
|
|
681
|
-
root: "flex flex-col min-h-0 min-w-0 divide-y divide-[--ui-border]",
|
|
688
|
+
root: "flex flex-col min-h-0 min-w-0 divide-y divide-[var(--ui-border)]",
|
|
682
689
|
input: "[&>input]:h-12",
|
|
683
690
|
close: "",
|
|
684
691
|
content: "relative overflow-hidden",
|
|
685
|
-
viewport: "divide-y divide-[--ui-border] scroll-py-1",
|
|
692
|
+
viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
|
|
686
693
|
group: "p-1 isolate",
|
|
687
|
-
empty: "py-6 text-center text-sm",
|
|
688
|
-
label: "px-2 py-1.5 text-xs font-semibold text-[--ui-text-highlighted]",
|
|
689
|
-
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 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"],
|
|
690
|
-
itemLeadingIcon: ["shrink-0 size-5 text-[--ui-text-dimmed] group-data-highlighted:text-[--ui-text]", options.theme.transitions && "transition-colors"],
|
|
694
|
+
empty: "py-6 text-center text-sm text-[var(--ui-text-muted)]",
|
|
695
|
+
label: "px-2 py-1.5 text-xs font-semibold text-[var(--ui-text-highlighted)]",
|
|
696
|
+
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 text-[var(--ui-text)] data-highlighted:text-[var(--ui-text-highlighted)] data-highlighted:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
697
|
+
itemLeadingIcon: ["shrink-0 size-5 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
|
|
691
698
|
itemLeadingAvatar: "shrink-0",
|
|
692
699
|
itemLeadingAvatarSize: "2xs",
|
|
693
700
|
itemLeadingChip: "shrink-0 size-5",
|
|
694
701
|
itemLeadingChipSize: "md",
|
|
695
702
|
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
696
703
|
itemTrailingIcon: "shrink-0 size-5",
|
|
697
|
-
itemTrailingHighlightedIcon: "shrink-0 size-5 text-[--ui-text-dimmed] hidden group-data-highlighted:inline-flex",
|
|
704
|
+
itemTrailingHighlightedIcon: "shrink-0 size-5 text-[var(--ui-text-dimmed)] hidden group-data-highlighted:inline-flex",
|
|
698
705
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0 gap-0.5",
|
|
699
706
|
itemTrailingKbdsSize: "md",
|
|
700
707
|
itemLabel: "truncate space-x-1",
|
|
701
|
-
itemLabelBase: "text-[--ui-text-highlighted] [&>mark]:text-[--ui-bg] [&>mark]:bg-[--ui-primary]",
|
|
702
|
-
itemLabelPrefix: "text-[--ui-text]",
|
|
703
|
-
itemLabelSuffix: "text-[--ui-text-dimmed] [&>mark]:text-[--ui-bg] [&>mark]:bg-[--ui-primary]"
|
|
708
|
+
itemLabelBase: "text-[var(--ui-text-highlighted)] [&>mark]:text-[var(--ui-bg)] [&>mark]:bg-[var(--ui-primary)]",
|
|
709
|
+
itemLabelPrefix: "text-[var(--ui-text)]",
|
|
710
|
+
itemLabelSuffix: "text-[var(--ui-text-dimmed)] [&>mark]:text-[var(--ui-bg)] [&>mark]:bg-[var(--ui-primary)]"
|
|
711
|
+
},
|
|
712
|
+
variants: {
|
|
713
|
+
loading: {
|
|
714
|
+
true: {
|
|
715
|
+
itemLeadingIcon: "animate-spin"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
704
718
|
}
|
|
705
719
|
});
|
|
706
720
|
|
|
@@ -710,10 +724,10 @@ const container = {
|
|
|
710
724
|
|
|
711
725
|
const contextMenu = (options) => ({
|
|
712
726
|
slots: {
|
|
713
|
-
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]",
|
|
727
|
+
content: "min-w-32 bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] divide-y divide-[var(--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]",
|
|
714
728
|
group: "p-1 isolate",
|
|
715
|
-
label: "w-full flex items-center font-semibold text-[--ui-text-highlighted]",
|
|
716
|
-
separator: "-mx-1 my-1 h-px bg-[--ui-border]",
|
|
729
|
+
label: "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
|
|
730
|
+
separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
|
|
717
731
|
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",
|
|
718
732
|
itemLeadingIcon: "shrink-0",
|
|
719
733
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -723,17 +737,22 @@ const contextMenu = (options) => ({
|
|
|
723
737
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
|
|
724
738
|
itemTrailingKbdsSize: "",
|
|
725
739
|
itemLabel: "truncate",
|
|
726
|
-
itemLabelExternalIcon: "size-3 align-top text-[--ui-text-dimmed]"
|
|
740
|
+
itemLabelExternalIcon: "size-3 align-top text-[var(--ui-text-dimmed)]"
|
|
727
741
|
},
|
|
728
742
|
variants: {
|
|
729
743
|
active: {
|
|
730
744
|
true: {
|
|
731
|
-
item: "text-[--ui-text-highlighted] before:bg-[--ui-bg-elevated]",
|
|
732
|
-
itemLeadingIcon: "text-[--ui-text]"
|
|
745
|
+
item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
|
|
746
|
+
itemLeadingIcon: "text-[var(--ui-text)]"
|
|
733
747
|
},
|
|
734
748
|
false: {
|
|
735
|
-
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"],
|
|
736
|
-
itemLeadingIcon: ["text-[--ui-text-dimmed] group-data-highlighted:text-[--ui-text] group-data-[state=open]:text-[--ui-text]", options.theme.transitions && "transition-colors"]
|
|
749
|
+
item: ["text-[var(--ui-text)] data-highlighted:text-[var(--ui-text-highlighted)] data-[state=open]:text-[var(--ui-text-highlighted)] data-highlighted:before:bg-[var(--ui-bg-elevated)]/50 data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
750
|
+
itemLeadingIcon: ["text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
loading: {
|
|
754
|
+
true: {
|
|
755
|
+
itemLeadingIcon: "animate-spin"
|
|
737
756
|
}
|
|
738
757
|
},
|
|
739
758
|
size: {
|
|
@@ -791,13 +810,13 @@ const contextMenu = (options) => ({
|
|
|
791
810
|
|
|
792
811
|
const drawer = {
|
|
793
812
|
slots: {
|
|
794
|
-
overlay: "fixed inset-0
|
|
795
|
-
content: "fixed
|
|
796
|
-
handle: "shrink-0 rounded-full bg-[--ui-bg-accented]",
|
|
813
|
+
overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
|
|
814
|
+
content: "fixed bg-[var(--ui-bg)] ring ring-[var(--ui-border)] flex focus:outline-none",
|
|
815
|
+
handle: "shrink-0 rounded-full bg-[var(--ui-bg-accented)]",
|
|
797
816
|
container: "w-full flex flex-col gap-4 p-4 overflow-y-auto",
|
|
798
817
|
header: "",
|
|
799
|
-
title: "text-[--ui-text-highlighted] font-semibold",
|
|
800
|
-
description: "mt-1 text-[--ui-text-muted] text-sm",
|
|
818
|
+
title: "text-[var(--ui-text-highlighted)] font-semibold",
|
|
819
|
+
description: "mt-1 text-[var(--ui-text-muted)] text-sm",
|
|
801
820
|
body: "flex-1",
|
|
802
821
|
footer: "flex flex-col gap-1.5"
|
|
803
822
|
},
|
|
@@ -838,11 +857,11 @@ const drawer = {
|
|
|
838
857
|
|
|
839
858
|
const dropdownMenu = (options) => ({
|
|
840
859
|
slots: {
|
|
841
|
-
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]",
|
|
842
|
-
arrow: "fill-[--ui-border]",
|
|
860
|
+
content: "min-w-32 bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] divide-y divide-[var(--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]",
|
|
861
|
+
arrow: "fill-[var(--ui-border)]",
|
|
843
862
|
group: "p-1 isolate",
|
|
844
|
-
label: "w-full flex items-center font-semibold text-[--ui-text-highlighted]",
|
|
845
|
-
separator: "-mx-1 my-1 h-px bg-[--ui-border]",
|
|
863
|
+
label: "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
|
|
864
|
+
separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
|
|
846
865
|
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",
|
|
847
866
|
itemLeadingIcon: "shrink-0",
|
|
848
867
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -852,17 +871,22 @@ const dropdownMenu = (options) => ({
|
|
|
852
871
|
itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
|
|
853
872
|
itemTrailingKbdsSize: "",
|
|
854
873
|
itemLabel: "truncate",
|
|
855
|
-
itemLabelExternalIcon: "size-3 align-top text-[--ui-text-dimmed]"
|
|
874
|
+
itemLabelExternalIcon: "size-3 align-top text-[var(--ui-text-dimmed)]"
|
|
856
875
|
},
|
|
857
876
|
variants: {
|
|
858
877
|
active: {
|
|
859
878
|
true: {
|
|
860
|
-
item: "text-[--ui-text-highlighted] before:bg-[--ui-bg-elevated]",
|
|
861
|
-
itemLeadingIcon: "text-[--ui-text]"
|
|
879
|
+
item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
|
|
880
|
+
itemLeadingIcon: "text-[var(--ui-text)]"
|
|
862
881
|
},
|
|
863
882
|
false: {
|
|
864
|
-
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"],
|
|
865
|
-
itemLeadingIcon: ["text-[--ui-text-dimmed] group-data-highlighted:text-[--ui-text] group-data-[state=open]:text-[--ui-text]", options.theme.transitions && "transition-colors"]
|
|
883
|
+
item: ["text-[var(--ui-text)] data-highlighted:text-[var(--ui-text-highlighted)] data-[state=open]:text-[var(--ui-text-highlighted)] data-highlighted:before:bg-[var(--ui-bg-elevated)]/50 data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
884
|
+
itemLeadingIcon: ["text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
loading: {
|
|
888
|
+
true: {
|
|
889
|
+
itemLeadingIcon: "animate-spin"
|
|
866
890
|
}
|
|
867
891
|
},
|
|
868
892
|
size: {
|
|
@@ -927,12 +951,12 @@ const formField = {
|
|
|
927
951
|
root: "",
|
|
928
952
|
wrapper: "",
|
|
929
953
|
labelWrapper: "flex content-center items-center justify-between",
|
|
930
|
-
label: "block font-medium text-[--ui-text]",
|
|
954
|
+
label: "block font-medium text-[var(--ui-text)]",
|
|
931
955
|
container: "mt-1 relative",
|
|
932
|
-
description: "text-[--ui-text-muted]",
|
|
933
|
-
error: "mt-2 text-[--ui-error]",
|
|
934
|
-
hint: "text-[--ui-text-muted]",
|
|
935
|
-
help: "mt-2 text-[--ui-text-muted]"
|
|
956
|
+
description: "text-[var(--ui-text-muted)]",
|
|
957
|
+
error: "mt-2 text-[var(--ui-error)]",
|
|
958
|
+
hint: "text-[var(--ui-text-muted)]",
|
|
959
|
+
help: "mt-2 text-[var(--ui-text-muted)]"
|
|
936
960
|
},
|
|
937
961
|
variants: {
|
|
938
962
|
size: {
|
|
@@ -944,7 +968,7 @@ const formField = {
|
|
|
944
968
|
},
|
|
945
969
|
required: {
|
|
946
970
|
true: {
|
|
947
|
-
label: `after:content-['*'] after:ms-0.5 after:text-[--ui-error]`
|
|
971
|
+
label: `after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]`
|
|
948
972
|
}
|
|
949
973
|
}
|
|
950
974
|
},
|
|
@@ -956,12 +980,13 @@ const formField = {
|
|
|
956
980
|
const input = (options) => ({
|
|
957
981
|
slots: {
|
|
958
982
|
root: "relative inline-flex items-center",
|
|
959
|
-
base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder-[--ui-text-dimmed] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
|
|
983
|
+
base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
|
|
960
984
|
leading: "absolute inset-y-0 start-0 flex items-center",
|
|
961
|
-
leadingIcon: "shrink-0 text-[--ui-text-dimmed]",
|
|
985
|
+
leadingIcon: "shrink-0 text-[var(--ui-text-dimmed)]",
|
|
962
986
|
leadingAvatar: "shrink-0",
|
|
987
|
+
leadingAvatarSize: "",
|
|
963
988
|
trailing: "absolute inset-y-0 end-0 flex items-center",
|
|
964
|
-
trailingIcon: "shrink-0 text-[--ui-text-dimmed]"
|
|
989
|
+
trailingIcon: "shrink-0 text-[var(--ui-text-dimmed)]"
|
|
965
990
|
},
|
|
966
991
|
variants: {
|
|
967
992
|
...buttonGroupVariantWithRoot,
|
|
@@ -971,6 +996,7 @@ const input = (options) => ({
|
|
|
971
996
|
leading: "pl-2",
|
|
972
997
|
trailing: "pr-2",
|
|
973
998
|
leadingIcon: "size-4",
|
|
999
|
+
leadingAvatarSize: "3xs",
|
|
974
1000
|
trailingIcon: "size-4"
|
|
975
1001
|
},
|
|
976
1002
|
sm: {
|
|
@@ -978,6 +1004,7 @@ const input = (options) => ({
|
|
|
978
1004
|
leading: "pl-2.5",
|
|
979
1005
|
trailing: "pr-2.5",
|
|
980
1006
|
leadingIcon: "size-4",
|
|
1007
|
+
leadingAvatarSize: "3xs",
|
|
981
1008
|
trailingIcon: "size-4"
|
|
982
1009
|
},
|
|
983
1010
|
md: {
|
|
@@ -985,6 +1012,7 @@ const input = (options) => ({
|
|
|
985
1012
|
leading: "pl-2.5",
|
|
986
1013
|
trailing: "pr-2.5",
|
|
987
1014
|
leadingIcon: "size-5",
|
|
1015
|
+
leadingAvatarSize: "2xs",
|
|
988
1016
|
trailingIcon: "size-5"
|
|
989
1017
|
},
|
|
990
1018
|
lg: {
|
|
@@ -992,6 +1020,7 @@ const input = (options) => ({
|
|
|
992
1020
|
leading: "pl-3",
|
|
993
1021
|
trailing: "pr-3",
|
|
994
1022
|
leadingIcon: "size-5",
|
|
1023
|
+
leadingAvatarSize: "2xs",
|
|
995
1024
|
trailingIcon: "size-5"
|
|
996
1025
|
},
|
|
997
1026
|
xl: {
|
|
@@ -999,15 +1028,16 @@ const input = (options) => ({
|
|
|
999
1028
|
leading: "pl-3",
|
|
1000
1029
|
trailing: "pr-3",
|
|
1001
1030
|
leadingIcon: "size-6",
|
|
1031
|
+
leadingAvatarSize: "xs",
|
|
1002
1032
|
trailingIcon: "size-6"
|
|
1003
1033
|
}
|
|
1004
1034
|
},
|
|
1005
1035
|
variant: {
|
|
1006
|
-
outline: "text-[--ui-text-highlighted] bg-[--ui-bg] ring ring-inset ring-[--ui-border-accented]",
|
|
1007
|
-
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",
|
|
1008
|
-
subtle: "text-[--ui-text-highlighted] bg-[--ui-bg-elevated] ring ring-inset ring-[--ui-border-accented]",
|
|
1009
|
-
ghost: "text-[--ui-text-highlighted] hover:bg-[--ui-bg-elevated] focus:bg-[--ui-bg-elevated] disabled:bg-transparent dark:disabled:bg-transparent",
|
|
1010
|
-
none: "text-[--ui-text-highlighted]"
|
|
1036
|
+
outline: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)]",
|
|
1037
|
+
soft: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50 hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-[var(--ui-bg-elevated)]/50",
|
|
1038
|
+
subtle: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)] ring ring-inset ring-[var(--ui-border-accented)]",
|
|
1039
|
+
ghost: "text-[var(--ui-text-highlighted)] hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-transparent dark:disabled:bg-transparent",
|
|
1040
|
+
none: "text-[var(--ui-text-highlighted)]"
|
|
1011
1041
|
},
|
|
1012
1042
|
color: {
|
|
1013
1043
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
@@ -1026,25 +1056,25 @@ const input = (options) => ({
|
|
|
1026
1056
|
true: ""
|
|
1027
1057
|
},
|
|
1028
1058
|
type: {
|
|
1029
|
-
file: "file:mr-1.5 file:font-medium file:text-[--ui-text-muted] file:outline-none"
|
|
1059
|
+
file: "file:mr-1.5 file:font-medium file:text-[var(--ui-text-muted)] file:outline-none"
|
|
1030
1060
|
}
|
|
1031
1061
|
},
|
|
1032
1062
|
compoundVariants: [...(options.theme.colors || []).map((color) => ({
|
|
1033
1063
|
color,
|
|
1034
1064
|
variant: ["outline", "subtle"],
|
|
1035
|
-
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[--ui-${color}]`
|
|
1065
|
+
class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
|
|
1036
1066
|
})), ...(options.theme.colors || []).map((color) => ({
|
|
1037
1067
|
color,
|
|
1038
1068
|
highlight: true,
|
|
1039
|
-
class: `ring ring-inset ring-[--ui-${color}]`
|
|
1069
|
+
class: `ring ring-inset ring-[var(--ui-${color})]`
|
|
1040
1070
|
})), {
|
|
1041
1071
|
color: "neutral",
|
|
1042
1072
|
variant: ["outline", "subtle"],
|
|
1043
|
-
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[--ui-border-inverted]"
|
|
1073
|
+
class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
|
|
1044
1074
|
}, {
|
|
1045
1075
|
color: "neutral",
|
|
1046
1076
|
highlight: true,
|
|
1047
|
-
class: "ring ring-inset ring-[--ui-border-inverted]"
|
|
1077
|
+
class: "ring ring-inset ring-[var(--ui-border-inverted)]"
|
|
1048
1078
|
}, {
|
|
1049
1079
|
leading: true,
|
|
1050
1080
|
size: "xs",
|
|
@@ -1111,15 +1141,15 @@ const inputMenu = (options) => {
|
|
|
1111
1141
|
slots: {
|
|
1112
1142
|
base: () => ["rounded-[calc(var(--ui-radius)*1.5)]", options.theme.transitions && "transition-colors"],
|
|
1113
1143
|
trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
|
|
1114
|
-
arrow: "fill-[--ui-border]",
|
|
1115
|
-
content: "max-h-60 w-[--radix-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]",
|
|
1116
|
-
viewport: "divide-y divide-[--ui-border] scroll-py-1",
|
|
1144
|
+
arrow: "fill-[var(--ui-border)]",
|
|
1145
|
+
content: "max-h-60 w-[var(--radix-popper-anchor-width)] bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
1146
|
+
viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
|
|
1117
1147
|
group: "p-1 isolate",
|
|
1118
|
-
empty: "py-2 text-center text-sm text-[--ui-text-muted]",
|
|
1119
|
-
label: "font-semibold text-[--ui-text-highlighted]",
|
|
1120
|
-
separator: "-mx-1 my-1 h-px bg-[--ui-border]",
|
|
1121
|
-
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"],
|
|
1122
|
-
itemLeadingIcon: ["shrink-0 text-[--ui-text-dimmed] group-data-highlighted:text-[--ui-text]", options.theme.transitions && "transition-colors"],
|
|
1148
|
+
empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
|
|
1149
|
+
label: "font-semibold text-[var(--ui-text-highlighted)]",
|
|
1150
|
+
separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
|
|
1151
|
+
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-[var(--ui-text)] data-highlighted:text-[var(--ui-text-highlighted)] data-highlighted:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
1152
|
+
itemLeadingIcon: ["shrink-0 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
|
|
1123
1153
|
itemLeadingAvatar: "shrink-0",
|
|
1124
1154
|
itemLeadingAvatarSize: "",
|
|
1125
1155
|
itemLeadingChip: "shrink-0",
|
|
@@ -1127,20 +1157,21 @@ const inputMenu = (options) => {
|
|
|
1127
1157
|
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
1128
1158
|
itemTrailingIcon: "shrink-0",
|
|
1129
1159
|
itemLabel: "truncate",
|
|
1130
|
-
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",
|
|
1160
|
+
tagsItem: "px-1.5 py-0.5 rounded-[var(--ui-radius)] font-medium inline-flex items-center gap-0.5 ring ring-inset ring-[var(--ui-border-accented)] bg-[var(--ui-bg-elevated)] text-[var(--ui-text)] data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
1131
1161
|
tagsItemText: "truncate",
|
|
1132
|
-
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"],
|
|
1162
|
+
tagsItemDelete: ["inline-flex items-center rounded-[calc(var(--ui-radius)/2)] text-[var(--ui-text-dimmed)] hover:text-[var(--ui-text)] hover:bg-[var(--ui-bg-accented)]/75 disabled:pointer-events-none", options.theme.transitions && "transition-colors"],
|
|
1133
1163
|
tagsItemDeleteIcon: "",
|
|
1134
|
-
tagsInput: "
|
|
1164
|
+
tagsInput: ""
|
|
1135
1165
|
},
|
|
1136
1166
|
variants: {
|
|
1137
1167
|
multiple: {
|
|
1138
1168
|
true: {
|
|
1139
1169
|
root: "flex-wrap",
|
|
1140
|
-
base: ""
|
|
1170
|
+
base: "",
|
|
1171
|
+
tagsInput: "border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1141
1172
|
},
|
|
1142
1173
|
false: {
|
|
1143
|
-
base: "w-full
|
|
1174
|
+
base: "w-full border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1144
1175
|
}
|
|
1145
1176
|
},
|
|
1146
1177
|
size: {
|
|
@@ -1205,23 +1236,23 @@ const inputMenu = (options) => {
|
|
|
1205
1236
|
color,
|
|
1206
1237
|
multiple: true,
|
|
1207
1238
|
variant: ["outline", "subtle"],
|
|
1208
|
-
class: `has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[--${color}]`
|
|
1239
|
+
class: `has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--${color})]`
|
|
1209
1240
|
})), {
|
|
1210
1241
|
color: "neutral",
|
|
1211
1242
|
multiple: true,
|
|
1212
1243
|
variant: ["outline", "subtle"],
|
|
1213
|
-
class: "has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[--ui-border-inverted]"
|
|
1244
|
+
class: "has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--ui-border-inverted)]"
|
|
1214
1245
|
}]
|
|
1215
1246
|
}, input(options));
|
|
1216
1247
|
};
|
|
1217
1248
|
|
|
1218
1249
|
const kbd = {
|
|
1219
|
-
base: "inline-flex items-center justify-center px-1 rounded-[--ui-radius] font-medium font-sans",
|
|
1250
|
+
base: "inline-flex items-center justify-center px-1 rounded-[var(--ui-radius)] font-medium font-sans",
|
|
1220
1251
|
variants: {
|
|
1221
1252
|
variant: {
|
|
1222
|
-
solid: "bg-[--ui-bg-inverted] text-[--ui-bg]",
|
|
1223
|
-
outline: "bg-[--ui-bg] text-[--ui-text-highlighted] ring ring-inset ring-[--ui-border-accented]",
|
|
1224
|
-
subtle: "bg-[--ui-bg-elevated] text-[--ui-text] ring ring-inset ring-[--ui-border-accented]"
|
|
1253
|
+
solid: "bg-[var(--ui-bg-inverted)] text-[var(--ui-bg)]",
|
|
1254
|
+
outline: "bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] ring ring-inset ring-[var(--ui-border-accented)]",
|
|
1255
|
+
subtle: "bg-[var(--ui-bg-elevated)] text-[var(--ui-text)] ring ring-inset ring-[var(--ui-border-accented)]"
|
|
1225
1256
|
},
|
|
1226
1257
|
size: {
|
|
1227
1258
|
sm: "h-4 min-w-[16px] text-[10px]",
|
|
@@ -1236,11 +1267,11 @@ const kbd = {
|
|
|
1236
1267
|
};
|
|
1237
1268
|
|
|
1238
1269
|
const link = (options) => ({
|
|
1239
|
-
base: "focus-visible:outline-[--ui-primary]",
|
|
1270
|
+
base: "focus-visible:outline-[var(--ui-primary)]",
|
|
1240
1271
|
variants: {
|
|
1241
1272
|
active: {
|
|
1242
|
-
true: "text-[--ui-primary]",
|
|
1243
|
-
false: ["text-[--ui-text-muted] hover:text-[--ui-text]", options.theme.transitions && "transition-colors"]
|
|
1273
|
+
true: "text-[var(--ui-primary)]",
|
|
1274
|
+
false: ["text-[var(--ui-text-muted)] hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
|
|
1244
1275
|
},
|
|
1245
1276
|
disabled: {
|
|
1246
1277
|
true: "cursor-not-allowed opacity-75"
|
|
@@ -1250,13 +1281,13 @@ const link = (options) => ({
|
|
|
1250
1281
|
|
|
1251
1282
|
const modal = {
|
|
1252
1283
|
slots: {
|
|
1253
|
-
overlay: "fixed inset-0
|
|
1254
|
-
content: "fixed
|
|
1284
|
+
overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
|
|
1285
|
+
content: "fixed w-full h-dvh bg-[var(--ui-bg)] divide-y divide-[var(--ui-border)] flex flex-col focus:outline-none",
|
|
1255
1286
|
header: "px-4 py-5 sm:px-6",
|
|
1256
1287
|
body: "flex-1 p-4 sm:p-6",
|
|
1257
1288
|
footer: "flex items-center gap-1.5 p-4 sm:px-6",
|
|
1258
|
-
title: "text-[--ui-text-highlighted] font-semibold",
|
|
1259
|
-
description: "mt-1 text-[--ui-text-muted] text-sm",
|
|
1289
|
+
title: "text-[var(--ui-text-highlighted)] font-semibold",
|
|
1290
|
+
description: "mt-1 text-[var(--ui-text-muted)] text-sm",
|
|
1260
1291
|
close: "absolute top-4 right-4"
|
|
1261
1292
|
},
|
|
1262
1293
|
variants: {
|
|
@@ -1271,7 +1302,7 @@ const modal = {
|
|
|
1271
1302
|
content: "inset-0"
|
|
1272
1303
|
},
|
|
1273
1304
|
false: {
|
|
1274
|
-
content: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] sm:max-w-lg sm:h-auto sm:my-8 sm:rounded-[calc(var(--ui-radius)*2)] sm:shadow-lg sm:ring ring-[--ui-border]"
|
|
1305
|
+
content: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] sm:max-w-lg sm:h-auto sm:my-8 sm:rounded-[calc(var(--ui-radius)*2)] sm:shadow-lg sm:ring ring-[var(--ui-border)]"
|
|
1275
1306
|
}
|
|
1276
1307
|
}
|
|
1277
1308
|
}
|
|
@@ -1291,32 +1322,32 @@ const navigationMenu = (options) => ({
|
|
|
1291
1322
|
linkTrailingBadgeSize: "sm",
|
|
1292
1323
|
linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
1293
1324
|
linkLabel: "truncate",
|
|
1294
|
-
linkLabelExternalIcon: "size-3 align-top text-[--ui-text-dimmed]",
|
|
1295
|
-
childList: "
|
|
1325
|
+
linkLabelExternalIcon: "size-3 align-top text-[var(--ui-text-dimmed)]",
|
|
1326
|
+
childList: "",
|
|
1296
1327
|
childItem: "",
|
|
1297
1328
|
childLink: "group size-full px-3 py-2 rounded-[calc(var(--ui-radius)*1.5)] flex items-start gap-2 text-left",
|
|
1298
1329
|
childLinkWrapper: "flex flex-col items-start",
|
|
1299
1330
|
childLinkIcon: "size-5 shrink-0",
|
|
1300
1331
|
childLinkLabel: "font-semibold text-sm relative inline-flex",
|
|
1301
|
-
childLinkLabelExternalIcon: "size-3 align-top text-[--ui-text-dimmed]",
|
|
1302
|
-
childLinkDescription: "text-sm text-[--ui-text-muted]",
|
|
1303
|
-
separator: "px-2 h-px bg-[--ui-border]",
|
|
1332
|
+
childLinkLabelExternalIcon: "size-3 align-top text-[var(--ui-text-dimmed)]",
|
|
1333
|
+
childLinkDescription: "text-sm text-[var(--ui-text-muted)]",
|
|
1334
|
+
separator: "px-2 h-px bg-[var(--ui-border)]",
|
|
1304
1335
|
viewportWrapper: "absolute top-full inset-x-0 flex w-full",
|
|
1305
1336
|
// FIXME: add `sm:w-[var(--radix-navigation-menu-viewport-width)]` / `transition-[width,height]` / `origin-[top_center]` once position is based on trigger
|
|
1306
|
-
viewport: "relative overflow-hidden bg-[--ui-bg] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[--ui-border] h-[--radix-navigation-menu-viewport-height] w-full data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
1337
|
+
viewport: "relative overflow-hidden bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] h-[var(--radix-navigation-menu-viewport-height)] w-full data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
1307
1338
|
content: "absolute top-0 left-0 w-full 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]",
|
|
1308
1339
|
indicator: "data-[state=visible]:animate-[fade-in_100ms_ease-out] data-[state=hidden]:animate-[fade-out_100ms_ease-in] bottom-0 z-[1] flex h-2.5 items-end justify-center overflow-hidden transition-transform duration-200 ease-out",
|
|
1309
|
-
arrow: "relative top-[50%] size-2.5 rotate-45 border border-[--ui-border] bg-[--ui-bg] z-[1] rounded-[calc(var(--ui-radius)/2)]"
|
|
1340
|
+
arrow: "relative top-[50%] size-2.5 rotate-45 border border-[var(--ui-border)] bg-[var(--ui-bg)] z-[1] rounded-[calc(var(--ui-radius)/2)]"
|
|
1310
1341
|
},
|
|
1311
1342
|
variants: {
|
|
1312
1343
|
color: {
|
|
1313
1344
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
1314
|
-
link: `focus-visible:before:ring-[--ui-${color}]`,
|
|
1315
|
-
childLink: `focus-visible:outline-[--ui-${color}]`
|
|
1345
|
+
link: `focus-visible:before:ring-[var(--ui-${color})]`,
|
|
1346
|
+
childLink: `focus-visible:outline-[var(--ui-${color})]`
|
|
1316
1347
|
}])),
|
|
1317
1348
|
neutral: {
|
|
1318
|
-
link: "focus-visible:before:ring-[--ui-border-inverted]",
|
|
1319
|
-
childLink: "focus-visible:outline-[--ui-border-inverted]"
|
|
1349
|
+
link: "focus-visible:before:ring-[var(--ui-border-inverted)]",
|
|
1350
|
+
childLink: "focus-visible:outline-[var(--ui-border-inverted)]"
|
|
1320
1351
|
}
|
|
1321
1352
|
},
|
|
1322
1353
|
highlightColor: {
|
|
@@ -1332,23 +1363,26 @@ const navigationMenu = (options) => ({
|
|
|
1332
1363
|
root: "w-full items-center justify-between",
|
|
1333
1364
|
list: "flex items-center",
|
|
1334
1365
|
item: "py-2",
|
|
1335
|
-
link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0"
|
|
1366
|
+
link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
|
|
1367
|
+
childList: "grid grid-cols-2 gap-2 p-2"
|
|
1336
1368
|
},
|
|
1337
1369
|
vertical: {
|
|
1338
1370
|
root: "flex-col",
|
|
1339
|
-
link: "px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
|
|
1371
|
+
link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0",
|
|
1372
|
+
childList: "ml-5 border-l border-[var(--ui-border)]",
|
|
1373
|
+
childItem: "pl-1.5 -ml-px"
|
|
1340
1374
|
}
|
|
1341
1375
|
},
|
|
1342
1376
|
active: {
|
|
1343
1377
|
true: {
|
|
1344
|
-
childLink: "bg-[--ui-bg-elevated] text-[--ui-text-highlighted]",
|
|
1345
|
-
childLinkIcon: "text-[--ui-text]"
|
|
1378
|
+
childLink: "bg-[var(--ui-bg-elevated)] text-[var(--ui-text-highlighted)]",
|
|
1379
|
+
childLinkIcon: "text-[var(--ui-text)]"
|
|
1346
1380
|
},
|
|
1347
1381
|
false: {
|
|
1348
|
-
link: "text-[--ui-text-muted]",
|
|
1349
|
-
linkLeadingIcon: "text-[--ui-text-dimmed]",
|
|
1350
|
-
childLink: ["hover:bg-[--ui-bg-elevated]/50 text-[--ui-text] hover:text-[--ui-text-highlighted]", options.theme.transitions && "transition-colors"],
|
|
1351
|
-
childLinkIcon: ["text-[--ui-text-dimmed] group-hover:text-[--ui-text]", options.theme.transitions && "transition-colors"]
|
|
1382
|
+
link: "text-[var(--ui-text-muted)]",
|
|
1383
|
+
linkLeadingIcon: "text-[var(--ui-text-dimmed)]",
|
|
1384
|
+
childLink: ["hover:bg-[var(--ui-bg-elevated)]/50 text-[var(--ui-text)] hover:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
|
|
1385
|
+
childLinkIcon: ["text-[var(--ui-text-dimmed)] group-hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
|
|
1352
1386
|
}
|
|
1353
1387
|
},
|
|
1354
1388
|
disabled: {
|
|
@@ -1379,76 +1413,93 @@ const navigationMenu = (options) => ({
|
|
|
1379
1413
|
active: false,
|
|
1380
1414
|
variant: "pill",
|
|
1381
1415
|
class: {
|
|
1382
|
-
link: ["hover:text-[--ui-text-highlighted] hover:before:bg-[--ui-bg-elevated]/50 data-[state=open]:text-[--ui-text-highlighted]
|
|
1383
|
-
linkLeadingIcon: ["group-hover:text-[--ui-text] group-data-[state=open]:text-[--ui-text]", options.theme.transitions && "transition-colors"]
|
|
1416
|
+
link: ["hover:text-[var(--ui-text-highlighted)] hover:before:bg-[var(--ui-bg-elevated)]/50 data-[state=open]:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
1417
|
+
linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
|
|
1418
|
+
}
|
|
1419
|
+
}, {
|
|
1420
|
+
disabled: false,
|
|
1421
|
+
variant: "pill",
|
|
1422
|
+
highlight: true,
|
|
1423
|
+
orientation: "horizontal",
|
|
1424
|
+
class: {
|
|
1425
|
+
link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
|
|
1426
|
+
}
|
|
1427
|
+
}, {
|
|
1428
|
+
disabled: false,
|
|
1429
|
+
variant: "pill",
|
|
1430
|
+
highlight: false,
|
|
1431
|
+
active: false,
|
|
1432
|
+
orientation: "horizontal",
|
|
1433
|
+
class: {
|
|
1434
|
+
link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
|
|
1384
1435
|
}
|
|
1385
1436
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
1386
1437
|
color,
|
|
1387
1438
|
variant: "pill",
|
|
1388
1439
|
active: true,
|
|
1389
1440
|
class: {
|
|
1390
|
-
link: `text-[--ui-${color}]`,
|
|
1391
|
-
linkLeadingIcon: `text-[--ui-${color}]`
|
|
1441
|
+
link: `text-[var(--ui-${color})]`,
|
|
1442
|
+
linkLeadingIcon: `text-[var(--ui-${color})]`
|
|
1392
1443
|
}
|
|
1393
1444
|
})), {
|
|
1394
1445
|
color: "neutral",
|
|
1395
1446
|
variant: "pill",
|
|
1396
1447
|
active: true,
|
|
1397
1448
|
class: {
|
|
1398
|
-
link: "text-[--ui-text-highlighted]",
|
|
1399
|
-
linkLeadingIcon: "text-[--ui-text-highlighted]"
|
|
1449
|
+
link: "text-[var(--ui-text-highlighted)]",
|
|
1450
|
+
linkLeadingIcon: "text-[var(--ui-text-highlighted)]"
|
|
1400
1451
|
}
|
|
1401
1452
|
}, {
|
|
1402
1453
|
variant: "pill",
|
|
1403
1454
|
active: true,
|
|
1404
1455
|
highlight: false,
|
|
1405
1456
|
class: {
|
|
1406
|
-
link: "before:bg-[--ui-bg-elevated]"
|
|
1457
|
+
link: "before:bg-[var(--ui-bg-elevated)]"
|
|
1407
1458
|
}
|
|
1408
1459
|
}, {
|
|
1409
1460
|
variant: "pill",
|
|
1410
1461
|
active: true,
|
|
1411
1462
|
highlight: true,
|
|
1412
1463
|
class: {
|
|
1413
|
-
link: ["hover:before:bg-[--ui-bg-elevated]/50", options.theme.transitions && "before:transition-colors"]
|
|
1464
|
+
link: ["hover:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "before:transition-colors"]
|
|
1414
1465
|
}
|
|
1415
1466
|
}, {
|
|
1416
1467
|
disabled: false,
|
|
1417
1468
|
active: false,
|
|
1418
1469
|
variant: "link",
|
|
1419
1470
|
class: {
|
|
1420
|
-
link: ["hover:text-[--ui-text-highlighted] data-[state=open]:text-[--ui-text-highlighted]", options.theme.transitions && "transition-colors"],
|
|
1421
|
-
linkLeadingIcon: ["group-hover:text-[--ui-text] group-data-[state=open]:text-[--ui-text]", options.theme.transitions && "transition-colors"]
|
|
1471
|
+
link: ["hover:text-[var(--ui-text-highlighted)] data-[state=open]:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
|
|
1472
|
+
linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
|
|
1422
1473
|
}
|
|
1423
1474
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
1424
1475
|
color,
|
|
1425
1476
|
variant: "link",
|
|
1426
1477
|
active: true,
|
|
1427
1478
|
class: {
|
|
1428
|
-
link: `text-[--ui-${color}]`,
|
|
1429
|
-
linkLeadingIcon: `text-[--ui-${color}]`
|
|
1479
|
+
link: `text-[var(--ui-${color})]`,
|
|
1480
|
+
linkLeadingIcon: `text-[var(--ui-${color})]`
|
|
1430
1481
|
}
|
|
1431
1482
|
})), {
|
|
1432
1483
|
color: "neutral",
|
|
1433
1484
|
variant: "link",
|
|
1434
1485
|
active: true,
|
|
1435
1486
|
class: {
|
|
1436
|
-
link: "text-[--ui-text-highlighted]",
|
|
1437
|
-
linkLeadingIcon: "text-[--ui-text-highlighted]"
|
|
1487
|
+
link: "text-[var(--ui-text-highlighted)]",
|
|
1488
|
+
linkLeadingIcon: "text-[var(--ui-text-highlighted)]"
|
|
1438
1489
|
}
|
|
1439
1490
|
}, ...(options.theme.colors || []).map((highlightColor) => ({
|
|
1440
1491
|
highlightColor,
|
|
1441
1492
|
highlight: true,
|
|
1442
1493
|
active: true,
|
|
1443
1494
|
class: {
|
|
1444
|
-
link: `after:bg-[--ui-${highlightColor}]`
|
|
1495
|
+
link: `after:bg-[var(--ui-${highlightColor})]`
|
|
1445
1496
|
}
|
|
1446
1497
|
})), {
|
|
1447
1498
|
highlightColor: "neutral",
|
|
1448
1499
|
highlight: true,
|
|
1449
1500
|
active: true,
|
|
1450
1501
|
class: {
|
|
1451
|
-
link: "after:bg-[--ui-bg-inverted]"
|
|
1502
|
+
link: "after:bg-[var(--ui-bg-inverted)]"
|
|
1452
1503
|
}
|
|
1453
1504
|
}],
|
|
1454
1505
|
defaultVariants: {
|
|
@@ -1469,17 +1520,17 @@ const pagination = {
|
|
|
1469
1520
|
|
|
1470
1521
|
const popover = {
|
|
1471
1522
|
slots: {
|
|
1472
|
-
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",
|
|
1473
|
-
arrow: "fill-[--ui-border]"
|
|
1523
|
+
content: "bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] focus:outline-none",
|
|
1524
|
+
arrow: "fill-[var(--ui-border)]"
|
|
1474
1525
|
}
|
|
1475
1526
|
};
|
|
1476
1527
|
|
|
1477
1528
|
const progress = (options) => ({
|
|
1478
1529
|
slots: {
|
|
1479
1530
|
root: "gap-2",
|
|
1480
|
-
base: "relative overflow-hidden rounded-full bg-[--ui-bg-accented]",
|
|
1531
|
+
base: "relative overflow-hidden rounded-full bg-[var(--ui-bg-accented)]",
|
|
1481
1532
|
indicator: "rounded-full size-full transition-transform duration-200 ease-out",
|
|
1482
|
-
status: "flex justify-end text-[--ui-text-dimmed] transition-[width] duration-200",
|
|
1533
|
+
status: "flex justify-end text-[var(--ui-text-dimmed)] transition-[width] duration-200",
|
|
1483
1534
|
steps: "grid items-end",
|
|
1484
1535
|
step: "truncate text-end row-start-1 col-start-1 transition-opacity"
|
|
1485
1536
|
},
|
|
@@ -1492,12 +1543,12 @@ const progress = (options) => ({
|
|
|
1492
1543
|
},
|
|
1493
1544
|
color: {
|
|
1494
1545
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
1495
|
-
indicator: `bg-[--ui-${color}]`,
|
|
1496
|
-
steps: `text-[--ui-${color}]`
|
|
1546
|
+
indicator: `bg-[var(--ui-${color})]`,
|
|
1547
|
+
steps: `text-[var(--ui-${color})]`
|
|
1497
1548
|
}])),
|
|
1498
1549
|
neutral: {
|
|
1499
|
-
indicator: "bg-[--ui-bg-inverted]",
|
|
1500
|
-
steps: "text-[--ui-bg]"
|
|
1550
|
+
indicator: "bg-[var(--ui-bg-inverted)]",
|
|
1551
|
+
steps: "text-[var(--ui-bg)]"
|
|
1501
1552
|
}
|
|
1502
1553
|
},
|
|
1503
1554
|
size: {
|
|
@@ -1535,7 +1586,7 @@ const progress = (options) => ({
|
|
|
1535
1586
|
step: "opacity-100"
|
|
1536
1587
|
},
|
|
1537
1588
|
first: {
|
|
1538
|
-
step: "opacity-100 text-[--ui-text-muted]"
|
|
1589
|
+
step: "opacity-100 text-[var(--ui-text-muted)]"
|
|
1539
1590
|
},
|
|
1540
1591
|
other: {
|
|
1541
1592
|
step: "opacity-0"
|
|
@@ -1692,24 +1743,24 @@ const radioGroup = (options) => ({
|
|
|
1692
1743
|
slots: {
|
|
1693
1744
|
root: "relative",
|
|
1694
1745
|
fieldset: "flex",
|
|
1695
|
-
legend: "mb-1 block font-medium text-[--ui-text]",
|
|
1746
|
+
legend: "mb-1 block font-medium text-[var(--ui-text)]",
|
|
1696
1747
|
item: "flex items-start",
|
|
1697
|
-
base: "rounded-full ring ring-inset ring-[--ui-border-accented] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-offset-[--ui-bg]",
|
|
1698
|
-
indicator: "flex items-center justify-center size-full rounded-full after:bg-[--ui-bg] after:rounded-full",
|
|
1748
|
+
base: "rounded-full ring ring-inset ring-[var(--ui-border-accented)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-offset-[var(--ui-bg)]",
|
|
1749
|
+
indicator: "flex items-center justify-center size-full rounded-full after:bg-[var(--ui-bg)] after:rounded-full",
|
|
1699
1750
|
container: "flex items-center",
|
|
1700
1751
|
wrapper: "ms-2",
|
|
1701
|
-
label: "block font-medium text-[--ui-text]",
|
|
1702
|
-
description: "text-[--ui-text-muted]"
|
|
1752
|
+
label: "block font-medium text-[var(--ui-text)]",
|
|
1753
|
+
description: "text-[var(--ui-text-muted)]"
|
|
1703
1754
|
},
|
|
1704
1755
|
variants: {
|
|
1705
1756
|
color: {
|
|
1706
1757
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
1707
|
-
base: `focus-visible:outline-[--ui-${color}]`,
|
|
1708
|
-
indicator: `bg-[--ui-${color}]`
|
|
1758
|
+
base: `focus-visible:outline-[var(--ui-${color})]`,
|
|
1759
|
+
indicator: `bg-[var(--ui-${color})]`
|
|
1709
1760
|
}])),
|
|
1710
1761
|
neutral: {
|
|
1711
|
-
base: "focus-visible:outline-[--ui-border-inverted]",
|
|
1712
|
-
indicator: "bg-[--ui-bg-inverted]"
|
|
1762
|
+
base: "focus-visible:outline-[var(--ui-border-inverted)]",
|
|
1763
|
+
indicator: "bg-[var(--ui-bg-inverted)]"
|
|
1713
1764
|
}
|
|
1714
1765
|
},
|
|
1715
1766
|
orientation: {
|
|
@@ -1771,7 +1822,7 @@ const radioGroup = (options) => ({
|
|
|
1771
1822
|
},
|
|
1772
1823
|
required: {
|
|
1773
1824
|
true: {
|
|
1774
|
-
legend: "after:content-['*'] after:ms-0.5 after:text-[--ui-error]"
|
|
1825
|
+
legend: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
|
|
1775
1826
|
}
|
|
1776
1827
|
}
|
|
1777
1828
|
},
|
|
@@ -1786,16 +1837,16 @@ const select = (options) => {
|
|
|
1786
1837
|
slots: {
|
|
1787
1838
|
root: () => void 0,
|
|
1788
1839
|
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"],
|
|
1789
|
-
value: "truncate group-data-placeholder:text-
|
|
1790
|
-
arrow: "fill-[--ui-border]",
|
|
1791
|
-
content: "max-h-60 w-[--radix-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]",
|
|
1792
|
-
viewport: "divide-y divide-[--ui-border] scroll-py-1",
|
|
1840
|
+
value: "truncate group-data-placeholder:text-[var(--ui-text-dimmed)]",
|
|
1841
|
+
arrow: "fill-[var(--ui-border)]",
|
|
1842
|
+
content: "max-h-60 w-[var(--radix-popper-anchor-width)] bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
1843
|
+
viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
|
|
1793
1844
|
group: "p-1 isolate",
|
|
1794
|
-
empty: "py-2 text-center text-sm text-[--ui-text-muted]",
|
|
1795
|
-
label: "font-semibold text-[--ui-text-highlighted]",
|
|
1796
|
-
separator: "-mx-1 my-1 h-px bg-[--ui-border]",
|
|
1797
|
-
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"],
|
|
1798
|
-
itemLeadingIcon: ["shrink-0 text-[--ui-text-dimmed] group-data-highlighted:text-[--ui-text]", options.theme.transitions && "transition-colors"],
|
|
1845
|
+
empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
|
|
1846
|
+
label: "font-semibold text-[var(--ui-text-highlighted)]",
|
|
1847
|
+
separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
|
|
1848
|
+
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-[var(--ui-text)] data-highlighted:text-[var(--ui-text-highlighted)] data-highlighted:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
1849
|
+
itemLeadingIcon: ["shrink-0 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
|
|
1799
1850
|
itemLeadingAvatar: "shrink-0",
|
|
1800
1851
|
itemLeadingAvatarSize: "",
|
|
1801
1852
|
itemLeadingChip: "shrink-0",
|
|
@@ -1861,8 +1912,8 @@ const selectMenu = (options) => {
|
|
|
1861
1912
|
return defu({
|
|
1862
1913
|
slots: {
|
|
1863
1914
|
value: "truncate",
|
|
1864
|
-
placeholder: "truncate text-
|
|
1865
|
-
input: "placeholder-[--ui-text-dimmed] border-0 border-b border-[--ui-border] focus:outline-none"
|
|
1915
|
+
placeholder: "truncate text-[var(--ui-text-dimmed)]",
|
|
1916
|
+
input: "placeholder:text-[var(--ui-text-dimmed)] border-0 border-b border-[var(--ui-border)] focus:outline-none"
|
|
1866
1917
|
},
|
|
1867
1918
|
variants: {
|
|
1868
1919
|
size: {
|
|
@@ -1890,7 +1941,7 @@ const separator = (options) => ({
|
|
|
1890
1941
|
slots: {
|
|
1891
1942
|
root: "flex items-center align-center text-center",
|
|
1892
1943
|
border: "",
|
|
1893
|
-
container: "font-medium text-[--ui-text] flex",
|
|
1944
|
+
container: "font-medium text-[var(--ui-text)] flex",
|
|
1894
1945
|
icon: "shrink-0 size-5",
|
|
1895
1946
|
avatar: "shrink-0",
|
|
1896
1947
|
avatarSize: "2xs",
|
|
@@ -1898,8 +1949,8 @@ const separator = (options) => ({
|
|
|
1898
1949
|
},
|
|
1899
1950
|
variants: {
|
|
1900
1951
|
color: {
|
|
1901
|
-
...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-[--ui-${color}]` }])),
|
|
1902
|
-
neutral: { border: "border-[--ui-border]" }
|
|
1952
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-[var(--ui-${color})]` }])),
|
|
1953
|
+
neutral: { border: "border-[var(--ui-border)]" }
|
|
1903
1954
|
},
|
|
1904
1955
|
orientation: {
|
|
1905
1956
|
horizontal: {
|
|
@@ -1981,30 +2032,30 @@ const separator = (options) => ({
|
|
|
1981
2032
|
});
|
|
1982
2033
|
|
|
1983
2034
|
const skeleton = {
|
|
1984
|
-
base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-[--ui-bg-elevated]"
|
|
2035
|
+
base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-[var(--ui-bg-elevated)]"
|
|
1985
2036
|
};
|
|
1986
2037
|
|
|
1987
2038
|
const slideover = {
|
|
1988
2039
|
slots: {
|
|
1989
|
-
overlay: "fixed inset-0
|
|
1990
|
-
content: "fixed
|
|
2040
|
+
overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
|
|
2041
|
+
content: "fixed bg-[var(--ui-bg)] divide-y divide-[var(--ui-border)] sm:ring ring-[var(--ui-border)] sm:shadow-lg flex flex-col focus:outline-none",
|
|
1991
2042
|
header: "px-4 py-5 sm:px-6",
|
|
1992
2043
|
body: "flex-1 overflow-y-auto p-4 sm:p-6",
|
|
1993
2044
|
footer: "flex items-center gap-1.5 p-4 sm:px-6",
|
|
1994
|
-
title: "text-[--ui-text-highlighted] font-semibold",
|
|
1995
|
-
description: "mt-1 text-[--ui-text-muted] text-sm",
|
|
2045
|
+
title: "text-[var(--ui-text-highlighted)] font-semibold",
|
|
2046
|
+
description: "mt-1 text-[var(--ui-text-muted)] text-sm",
|
|
1996
2047
|
close: "absolute top-4 right-4"
|
|
1997
2048
|
},
|
|
1998
2049
|
variants: {
|
|
1999
2050
|
side: {
|
|
2000
2051
|
top: {
|
|
2001
|
-
content: "inset-x-0 top-0"
|
|
2052
|
+
content: "inset-x-0 top-0 max-h-full"
|
|
2002
2053
|
},
|
|
2003
2054
|
right: {
|
|
2004
2055
|
content: "right-0 inset-y-0 w-full max-w-md"
|
|
2005
2056
|
},
|
|
2006
2057
|
bottom: {
|
|
2007
|
-
content: "inset-x-0 bottom-0"
|
|
2058
|
+
content: "inset-x-0 bottom-0 max-h-full"
|
|
2008
2059
|
},
|
|
2009
2060
|
left: {
|
|
2010
2061
|
content: "left-0 inset-y-0 w-full max-w-md"
|
|
@@ -2046,19 +2097,19 @@ const slideover = {
|
|
|
2046
2097
|
const slider = (options) => ({
|
|
2047
2098
|
slots: {
|
|
2048
2099
|
root: "relative flex items-center select-none touch-none",
|
|
2049
|
-
track: "relative bg-[--ui-bg-accented] overflow-hidden rounded-full grow",
|
|
2100
|
+
track: "relative bg-[var(--ui-bg-accented)] overflow-hidden rounded-full grow",
|
|
2050
2101
|
range: "absolute rounded-full",
|
|
2051
|
-
thumb: "rounded-full bg-[--ui-bg] ring-2 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2"
|
|
2102
|
+
thumb: "rounded-full bg-[var(--ui-bg)] ring-2 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2"
|
|
2052
2103
|
},
|
|
2053
2104
|
variants: {
|
|
2054
2105
|
color: {
|
|
2055
2106
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2056
|
-
range: `bg-[--ui-${color}]`,
|
|
2057
|
-
thumb: `ring-[--ui-${color}] focus-visible:outline-[--ui-${color}]`
|
|
2107
|
+
range: `bg-[var(--ui-${color})]`,
|
|
2108
|
+
thumb: `ring-[var(--ui-${color})] focus-visible:outline-[var(--ui-${color})]`
|
|
2058
2109
|
}])),
|
|
2059
2110
|
neutral: {
|
|
2060
|
-
range: "bg-[--ui-bg-inverted]",
|
|
2061
|
-
thumb: "ring-[--ui-border-inverted] focus-visible:outline-[--ui-border-inverted]/50"
|
|
2111
|
+
range: "bg-[var(--ui-bg-inverted)]",
|
|
2112
|
+
thumb: "ring-[var(--ui-border-inverted)] focus-visible:outline-[var(--ui-border-inverted)]/50"
|
|
2062
2113
|
}
|
|
2063
2114
|
},
|
|
2064
2115
|
size: {
|
|
@@ -2164,23 +2215,23 @@ const slider = (options) => ({
|
|
|
2164
2215
|
const _switch = (options) => ({
|
|
2165
2216
|
slots: {
|
|
2166
2217
|
root: "relative flex items-start",
|
|
2167
|
-
base: ["inline-flex items-center shrink-0 rounded-full border-2 border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-[--ui-bg] data-[state=unchecked]:bg-[--ui-bg-accented]", options.theme.transitions && "transition-colors duration-200"],
|
|
2218
|
+
base: ["inline-flex items-center shrink-0 rounded-full border-2 border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--ui-bg)] data-[state=unchecked]:bg-[var(--ui-bg-accented)]", options.theme.transitions && "transition-colors duration-200"],
|
|
2168
2219
|
container: "flex items-center",
|
|
2169
|
-
thumb: "group pointer-events-none block rounded-full bg-[--ui-bg] shadow-lg ring-0 transition-transform duration-200 data-[state=unchecked]:translate-x-0 flex items-center justify-center",
|
|
2170
|
-
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"],
|
|
2220
|
+
thumb: "group pointer-events-none block rounded-full bg-[var(--ui-bg)] shadow-lg ring-0 transition-transform duration-200 data-[state=unchecked]:translate-x-0 flex items-center justify-center",
|
|
2221
|
+
icon: ["absolute shrink-0 group-data-[state=unchecked]:text-[var(--ui-text-dimmed)] opacity-0 size-10/12", options.theme.transitions && "transition-[color,opacity] duration-200"],
|
|
2171
2222
|
wrapper: "ms-2",
|
|
2172
|
-
label: "block font-medium text-[--ui-text]",
|
|
2173
|
-
description: "text-[--ui-text-muted]"
|
|
2223
|
+
label: "block font-medium text-[var(--ui-text)]",
|
|
2224
|
+
description: "text-[var(--ui-text-muted)]"
|
|
2174
2225
|
},
|
|
2175
2226
|
variants: {
|
|
2176
2227
|
color: {
|
|
2177
2228
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2178
|
-
base: `data-[state=checked]:bg-[--ui-${color}] focus-visible:ring-[--ui-${color}]`,
|
|
2179
|
-
icon: `group-data-[state=checked]:text-[--ui-${color}]`
|
|
2229
|
+
base: `data-[state=checked]:bg-[var(--ui-${color})] focus-visible:ring-[var(--ui-${color})]`,
|
|
2230
|
+
icon: `group-data-[state=checked]:text-[var(--ui-${color})]`
|
|
2180
2231
|
}])),
|
|
2181
2232
|
neutral: {
|
|
2182
|
-
base: "data-[state=checked]:bg-[--ui-bg-inverted] focus-visible:ring-[--ui-border-inverted]",
|
|
2183
|
-
icon: "group-data-[state=checked]:text-[--ui-text-highlighted]"
|
|
2233
|
+
base: "data-[state=checked]:bg-[var(--ui-bg-inverted)] focus-visible:ring-[var(--ui-border-inverted)]",
|
|
2234
|
+
icon: "group-data-[state=checked]:text-[var(--ui-text-highlighted)]"
|
|
2184
2235
|
}
|
|
2185
2236
|
},
|
|
2186
2237
|
size: {
|
|
@@ -2232,7 +2283,7 @@ const _switch = (options) => ({
|
|
|
2232
2283
|
},
|
|
2233
2284
|
required: {
|
|
2234
2285
|
true: {
|
|
2235
|
-
label: "after:content-['*'] after:ms-0.5 after:text-[--ui-error]"
|
|
2286
|
+
label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
|
|
2236
2287
|
}
|
|
2237
2288
|
},
|
|
2238
2289
|
disabled: {
|
|
@@ -2249,12 +2300,94 @@ const _switch = (options) => ({
|
|
|
2249
2300
|
}
|
|
2250
2301
|
});
|
|
2251
2302
|
|
|
2303
|
+
const table = (options) => ({
|
|
2304
|
+
slots: {
|
|
2305
|
+
root: "relative overflow-auto",
|
|
2306
|
+
base: "min-w-full overflow-clip",
|
|
2307
|
+
thead: "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-[var(--ui-border-accented)]",
|
|
2308
|
+
tbody: "divide-y divide-[var(--ui-border)]",
|
|
2309
|
+
tr: "data-[selected=true]:bg-[var(--ui-bg-elevated)]/50",
|
|
2310
|
+
th: "px-4 py-3.5 text-sm text-[var(--ui-text-highlighted)] text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pr-0",
|
|
2311
|
+
td: "p-4 text-sm text-[var(--ui-text-muted)] whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
2312
|
+
empty: "py-6 text-center text-sm text-[var(--ui-text-muted)]"
|
|
2313
|
+
},
|
|
2314
|
+
variants: {
|
|
2315
|
+
pinned: {
|
|
2316
|
+
true: {
|
|
2317
|
+
th: "sticky bg-[var(--ui-bg)]/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
|
|
2318
|
+
td: "sticky bg-[var(--ui-bg)]/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0"
|
|
2319
|
+
}
|
|
2320
|
+
},
|
|
2321
|
+
sticky: {
|
|
2322
|
+
true: {
|
|
2323
|
+
thead: "sticky top-0 inset-x-0 bg-[var(--ui-bg)]/75 z-[1] backdrop-blur"
|
|
2324
|
+
}
|
|
2325
|
+
},
|
|
2326
|
+
loading: {
|
|
2327
|
+
true: {
|
|
2328
|
+
thead: "after:absolute after:bottom-0 after:inset-x-0 after:h-px"
|
|
2329
|
+
}
|
|
2330
|
+
},
|
|
2331
|
+
loadingAnimation: {
|
|
2332
|
+
"carousel": "",
|
|
2333
|
+
"carousel-inverse": "",
|
|
2334
|
+
"swing": "",
|
|
2335
|
+
"elastic": ""
|
|
2336
|
+
},
|
|
2337
|
+
loadingColor: {
|
|
2338
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
2339
|
+
neutral: ""
|
|
2340
|
+
}
|
|
2341
|
+
},
|
|
2342
|
+
compoundVariants: [...(options.theme.colors || []).map((loadingColor) => ({
|
|
2343
|
+
loading: true,
|
|
2344
|
+
loadingColor,
|
|
2345
|
+
class: {
|
|
2346
|
+
thead: `after:bg-[var(--ui-${loadingColor})]`
|
|
2347
|
+
}
|
|
2348
|
+
})), {
|
|
2349
|
+
loading: true,
|
|
2350
|
+
loadingColor: "neutral",
|
|
2351
|
+
class: {
|
|
2352
|
+
thead: "after:bg-[var(--ui-bg-inverted)]"
|
|
2353
|
+
}
|
|
2354
|
+
}, {
|
|
2355
|
+
loading: true,
|
|
2356
|
+
loadingAnimation: "carousel",
|
|
2357
|
+
class: {
|
|
2358
|
+
thead: "after:animate-[carousel_2s_ease-in-out_infinite]"
|
|
2359
|
+
}
|
|
2360
|
+
}, {
|
|
2361
|
+
loading: true,
|
|
2362
|
+
loadingAnimation: "carousel-inverse",
|
|
2363
|
+
class: {
|
|
2364
|
+
thead: "after:animate-[carousel-inverse_2s_ease-in-out_infinite]"
|
|
2365
|
+
}
|
|
2366
|
+
}, {
|
|
2367
|
+
loading: true,
|
|
2368
|
+
loadingAnimation: "swing",
|
|
2369
|
+
class: {
|
|
2370
|
+
thead: "after:animate-[swing_2s_ease-in-out_infinite]"
|
|
2371
|
+
}
|
|
2372
|
+
}, {
|
|
2373
|
+
loading: true,
|
|
2374
|
+
loadingAnimation: "elastic",
|
|
2375
|
+
class: {
|
|
2376
|
+
thead: "after:animate-[elastic_2s_ease-in-out_infinite]"
|
|
2377
|
+
}
|
|
2378
|
+
}],
|
|
2379
|
+
defaultVariants: {
|
|
2380
|
+
loadingColor: "primary",
|
|
2381
|
+
loadingAnimation: "carousel"
|
|
2382
|
+
}
|
|
2383
|
+
});
|
|
2384
|
+
|
|
2252
2385
|
const tabs = (options) => ({
|
|
2253
2386
|
slots: {
|
|
2254
2387
|
root: "flex items-center gap-2",
|
|
2255
2388
|
list: "relative flex p-1 group",
|
|
2256
2389
|
indicator: "absolute transition-[translate,width] duration-200",
|
|
2257
|
-
trigger: ["relative inline-flex items-center shrink-0 data-[state=inactive]:text-[--ui-text-muted] hover:data-[state=inactive]:text-[--ui-text] font-medium rounded-[calc(var(--ui-radius)*1.5)] disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none", options.theme.transitions && "transition-colors"],
|
|
2390
|
+
trigger: ["relative inline-flex items-center shrink-0 data-[state=inactive]:text-[var(--ui-text-muted)] hover:data-[state=inactive]:text-[var(--ui-text)] font-medium rounded-[calc(var(--ui-radius)*1.5)] disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none", options.theme.transitions && "transition-colors"],
|
|
2258
2391
|
content: "focus:outline-none w-full",
|
|
2259
2392
|
leadingIcon: "shrink-0",
|
|
2260
2393
|
leadingAvatar: "shrink-0",
|
|
@@ -2268,12 +2401,12 @@ const tabs = (options) => ({
|
|
|
2268
2401
|
},
|
|
2269
2402
|
variant: {
|
|
2270
2403
|
pill: {
|
|
2271
|
-
list: "bg-[--ui-bg-elevated] rounded-[calc(var(--ui-radius)*2)]",
|
|
2404
|
+
list: "bg-[var(--ui-bg-elevated)] rounded-[calc(var(--ui-radius)*2)]",
|
|
2272
2405
|
trigger: "flex-1",
|
|
2273
2406
|
indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-sm"
|
|
2274
2407
|
},
|
|
2275
2408
|
link: {
|
|
2276
|
-
list: "border-[--ui-border]",
|
|
2409
|
+
list: "border-[var(--ui-border)]",
|
|
2277
2410
|
indicator: "rounded-full"
|
|
2278
2411
|
}
|
|
2279
2412
|
},
|
|
@@ -2281,12 +2414,12 @@ const tabs = (options) => ({
|
|
|
2281
2414
|
horizontal: {
|
|
2282
2415
|
root: "flex-col",
|
|
2283
2416
|
list: "w-full",
|
|
2284
|
-
indicator: "left-0 w-[--radix-tabs-indicator-size] translate-x-[--radix-tabs-indicator-position]",
|
|
2417
|
+
indicator: "left-0 w-[var(--radix-tabs-indicator-size)] translate-x-[var(--radix-tabs-indicator-position)]",
|
|
2285
2418
|
trigger: "justify-center"
|
|
2286
2419
|
},
|
|
2287
2420
|
vertical: {
|
|
2288
2421
|
list: "flex-col",
|
|
2289
|
-
indicator: "top-0 h-[--radix-tabs-indicator-size] translate-y-[--radix-tabs-indicator-position]"
|
|
2422
|
+
indicator: "top-0 h-[var(--radix-tabs-indicator-size)] translate-y-[var(--radix-tabs-indicator-position)]"
|
|
2290
2423
|
}
|
|
2291
2424
|
},
|
|
2292
2425
|
size: {
|
|
@@ -2348,29 +2481,29 @@ const tabs = (options) => ({
|
|
|
2348
2481
|
color,
|
|
2349
2482
|
variant: "pill",
|
|
2350
2483
|
class: {
|
|
2351
|
-
indicator: `bg-[--ui-${color}]`,
|
|
2352
|
-
trigger: `data-[state=active]:text-[--ui-bg] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[--ui-${color}]`
|
|
2484
|
+
indicator: `bg-[var(--ui-${color})]`,
|
|
2485
|
+
trigger: `data-[state=active]:text-[var(--ui-bg)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-${color})]`
|
|
2353
2486
|
}
|
|
2354
2487
|
})), {
|
|
2355
2488
|
color: "neutral",
|
|
2356
2489
|
variant: "pill",
|
|
2357
2490
|
class: {
|
|
2358
|
-
indicator: "bg-[--ui-bg-inverted]",
|
|
2359
|
-
trigger: "data-[state=active]:text-[--ui-bg] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[--ui-border-inverted]"
|
|
2491
|
+
indicator: "bg-[var(--ui-bg-inverted)]",
|
|
2492
|
+
trigger: "data-[state=active]:text-[var(--ui-bg)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-border-inverted)]"
|
|
2360
2493
|
}
|
|
2361
2494
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
2362
2495
|
color,
|
|
2363
2496
|
variant: "link",
|
|
2364
2497
|
class: {
|
|
2365
|
-
indicator: `bg-[--ui-${color}]`,
|
|
2366
|
-
trigger: `data-[state=active]:text-[--ui-${color}] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[--ui-${color}]`
|
|
2498
|
+
indicator: `bg-[var(--ui-${color})]`,
|
|
2499
|
+
trigger: `data-[state=active]:text-[var(--ui-${color})] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
|
|
2367
2500
|
}
|
|
2368
2501
|
})), {
|
|
2369
2502
|
color: "neutral",
|
|
2370
2503
|
variant: "link",
|
|
2371
2504
|
class: {
|
|
2372
|
-
indicator: "bg-[--ui-bg-inverted]",
|
|
2373
|
-
trigger: "data-[state=active]:text-[--ui-text-highlighted] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[--ui-border-inverted]"
|
|
2505
|
+
indicator: "bg-[var(--ui-bg-inverted)]",
|
|
2506
|
+
trigger: "data-[state=active]:text-[var(--ui-text-highlighted)] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
|
|
2374
2507
|
}
|
|
2375
2508
|
}],
|
|
2376
2509
|
defaultVariants: {
|
|
@@ -2386,10 +2519,10 @@ const textarea = (options) => {
|
|
|
2386
2519
|
|
|
2387
2520
|
const toast = (options) => ({
|
|
2388
2521
|
slots: {
|
|
2389
|
-
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",
|
|
2522
|
+
root: "relative group overflow-hidden bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*2)] ring ring-[var(--ui-border)] p-4 flex gap-2.5 focus:outline-none",
|
|
2390
2523
|
wrapper: "w-0 flex-1 flex flex-col gap-1",
|
|
2391
|
-
title: "text-sm font-medium text-[--ui-text-highlighted]",
|
|
2392
|
-
description: "text-sm text-[--ui-text-muted]",
|
|
2524
|
+
title: "text-sm font-medium text-[var(--ui-text-highlighted)]",
|
|
2525
|
+
description: "text-sm text-[var(--ui-text-muted)]",
|
|
2393
2526
|
icon: "shrink-0 size-5",
|
|
2394
2527
|
avatar: "shrink-0",
|
|
2395
2528
|
avatarSize: "2xl",
|
|
@@ -2400,14 +2533,14 @@ const toast = (options) => ({
|
|
|
2400
2533
|
variants: {
|
|
2401
2534
|
color: {
|
|
2402
2535
|
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
2403
|
-
root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[--ui-${color}]`,
|
|
2404
|
-
icon: `text-[--ui-${color}]`,
|
|
2405
|
-
progress: `bg-[--ui-${color}]`
|
|
2536
|
+
root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`,
|
|
2537
|
+
icon: `text-[var(--ui-${color})]`,
|
|
2538
|
+
progress: `bg-[var(--ui-${color})]`
|
|
2406
2539
|
}])),
|
|
2407
2540
|
neutral: {
|
|
2408
|
-
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[--ui-border-inverted]",
|
|
2409
|
-
icon: "text-[--ui-text-highlighted]",
|
|
2410
|
-
progress: "bg-[--ui-bg-inverted]"
|
|
2541
|
+
root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]",
|
|
2542
|
+
icon: "text-[var(--ui-text-highlighted)]",
|
|
2543
|
+
progress: "bg-[var(--ui-bg-inverted)]"
|
|
2411
2544
|
}
|
|
2412
2545
|
},
|
|
2413
2546
|
multiline: {
|
|
@@ -2428,8 +2561,8 @@ const toast = (options) => ({
|
|
|
2428
2561
|
|
|
2429
2562
|
const toaster = {
|
|
2430
2563
|
slots: {
|
|
2431
|
-
viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-[--height] focus:outline-none",
|
|
2432
|
-
base: "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"
|
|
2564
|
+
viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-[var(--height)] focus:outline-none",
|
|
2565
|
+
base: "absolute inset-x-0 z-[var(--index)] transform-[var(--transform)] data-[expanded=false]:data-[front=false]:h-[var(--front-height)] data-[expanded=false]:data-[front=false]:*:invisible data-[state=closed]:animate-[toast-closed_200ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_200ms_ease-in-out] data-[swipe=move]:transition-none transition-[transform,translate,height] duration-200 ease-out"
|
|
2433
2566
|
},
|
|
2434
2567
|
variants: {
|
|
2435
2568
|
position: {
|
|
@@ -2473,10 +2606,10 @@ const toaster = {
|
|
|
2473
2606
|
}
|
|
2474
2607
|
}, {
|
|
2475
2608
|
swipeDirection: ["left", "right"],
|
|
2476
|
-
class: "data-[swipe=move]:translate-x-[--radix-toast-swipe-move-x] data-[swipe=end]:translate-x-[--radix-toast-swipe-end-x] data-[swipe=cancel]:translate-x-0"
|
|
2609
|
+
class: "data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=cancel]:translate-x-0"
|
|
2477
2610
|
}, {
|
|
2478
2611
|
swipeDirection: ["up", "down"],
|
|
2479
|
-
class: "data-[swipe=move]:translate-y-[--radix-toast-swipe-move-y] data-[swipe=end]:translate-y-[--radix-toast-swipe-end-y] data-[swipe=cancel]:translate-y-0"
|
|
2612
|
+
class: "data-[swipe=move]:translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=end]:translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=cancel]:translate-y-0"
|
|
2480
2613
|
}],
|
|
2481
2614
|
defaultVariants: {
|
|
2482
2615
|
position: "bottom-right"
|
|
@@ -2485,8 +2618,8 @@ const toaster = {
|
|
|
2485
2618
|
|
|
2486
2619
|
const tooltip = {
|
|
2487
2620
|
slots: {
|
|
2488
|
-
content: "flex items-center gap-1 bg-[--ui-bg] text-[--ui-text-highlighted] shadow 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]",
|
|
2489
|
-
arrow: "fill-[--ui-border]",
|
|
2621
|
+
content: "flex items-center gap-1 bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] shadow rounded-[var(--ui-radius)] ring ring-[var(--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]",
|
|
2622
|
+
arrow: "fill-[var(--ui-border)]",
|
|
2490
2623
|
text: "truncate",
|
|
2491
2624
|
kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:mr-0.5`,
|
|
2492
2625
|
kbdsSize: "sm"
|
|
@@ -2532,6 +2665,7 @@ const theme = {
|
|
|
2532
2665
|
slideover: slideover,
|
|
2533
2666
|
slider: slider,
|
|
2534
2667
|
switch: _switch,
|
|
2668
|
+
table: table,
|
|
2535
2669
|
tabs: tabs,
|
|
2536
2670
|
textarea: textarea,
|
|
2537
2671
|
toast: toast,
|