@nuxt/ui 3.0.0-alpha.0 → 3.0.0-alpha.2
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/README.md +1 -1
- package/cli/node_modules/.ignored/citty/LICENSE +36 -0
- package/cli/node_modules/.ignored/citty/README.md +134 -0
- package/cli/node_modules/.ignored/citty/dist/index.cjs +475 -0
- package/cli/node_modules/.ignored/citty/dist/index.d.cts +80 -0
- package/cli/node_modules/.ignored/citty/dist/index.d.mts +80 -0
- package/cli/node_modules/.ignored/citty/dist/index.d.ts +80 -0
- package/cli/node_modules/.ignored/citty/dist/index.mjs +463 -0
- package/cli/node_modules/.ignored/citty/package.json +49 -0
- package/cli/node_modules/.ignored/consola/LICENSE +47 -0
- package/cli/node_modules/.ignored/consola/README.md +318 -0
- package/cli/node_modules/.ignored/consola/core.d.ts +1 -0
- package/cli/node_modules/.ignored/consola/dist/basic.cjs +32 -0
- package/cli/node_modules/.ignored/consola/dist/basic.d.ts +9 -0
- package/cli/node_modules/.ignored/consola/dist/basic.mjs +24 -0
- package/cli/node_modules/.ignored/consola/dist/browser.cjs +80 -0
- package/cli/node_modules/.ignored/consola/dist/browser.d.ts +7 -0
- package/cli/node_modules/.ignored/consola/dist/browser.mjs +72 -0
- package/cli/node_modules/.ignored/consola/dist/chunks/prompt.cjs +436 -0
- package/cli/node_modules/.ignored/consola/dist/chunks/prompt.mjs +429 -0
- package/cli/node_modules/.ignored/consola/dist/core.cjs +415 -0
- package/cli/node_modules/.ignored/consola/dist/core.d.ts +124 -0
- package/cli/node_modules/.ignored/consola/dist/core.mjs +410 -0
- package/cli/node_modules/.ignored/consola/dist/index.cjs +21 -0
- package/cli/node_modules/.ignored/consola/dist/index.d.ts +9 -0
- package/cli/node_modules/.ignored/consola/dist/index.mjs +8 -0
- package/cli/node_modules/.ignored/consola/dist/shared/consola.06ad8a64.mjs +62 -0
- package/cli/node_modules/.ignored/consola/dist/shared/consola.36c0034f.mjs +636 -0
- package/cli/node_modules/.ignored/consola/dist/shared/consola.4bbae468.cjs +645 -0
- package/cli/node_modules/.ignored/consola/dist/shared/consola.deac7d5a.cjs +65 -0
- package/cli/node_modules/.ignored/consola/dist/utils.cjs +308 -0
- package/cli/node_modules/.ignored/consola/dist/utils.d.ts +169 -0
- package/cli/node_modules/.ignored/consola/dist/utils.mjs +284 -0
- package/cli/node_modules/.ignored/consola/lib/index.cjs +9 -0
- package/cli/node_modules/.ignored/consola/package.json +101 -0
- package/cli/node_modules/.ignored/consola/utils.d.ts +1 -0
- package/cli/node_modules/.ignored/pathe/LICENSE +44 -0
- package/cli/node_modules/.ignored/pathe/README.md +69 -0
- package/cli/node_modules/.ignored/pathe/dist/index.cjs +23 -0
- package/cli/node_modules/.ignored/pathe/dist/index.d.cts +36 -0
- package/cli/node_modules/.ignored/pathe/dist/index.d.mts +36 -0
- package/cli/node_modules/.ignored/pathe/dist/index.d.ts +36 -0
- package/cli/node_modules/.ignored/pathe/dist/index.mjs +1 -0
- package/cli/node_modules/.ignored/pathe/dist/shared/pathe.1f0a373c.cjs +238 -0
- package/cli/node_modules/.ignored/pathe/dist/shared/pathe.ff20891b.mjs +221 -0
- package/cli/node_modules/.ignored/pathe/dist/utils.cjs +58 -0
- package/cli/node_modules/.ignored/pathe/dist/utils.d.cts +5 -0
- package/cli/node_modules/.ignored/pathe/dist/utils.d.mts +5 -0
- package/cli/node_modules/.ignored/pathe/dist/utils.d.ts +5 -0
- package/cli/node_modules/.ignored/pathe/dist/utils.mjs +54 -0
- package/cli/node_modules/.ignored/pathe/package.json +48 -0
- package/cli/node_modules/.ignored/pathe/utils.d.ts +1 -0
- package/cli/node_modules/.ignored/scule/LICENSE +21 -0
- package/cli/node_modules/.ignored/scule/README.md +149 -0
- package/cli/node_modules/.ignored/scule/dist/index.cjs +92 -0
- package/cli/node_modules/.ignored/scule/dist/index.d.cts +57 -0
- package/cli/node_modules/.ignored/scule/dist/index.d.mts +57 -0
- package/cli/node_modules/.ignored/scule/dist/index.d.ts +57 -0
- package/cli/node_modules/.ignored/scule/dist/index.mjs +80 -0
- package/cli/node_modules/.ignored/scule/package.json +43 -0
- package/cli/node_modules/.package-lock.json +33 -0
- package/dist/module.d.mts +9 -2
- package/dist/module.d.ts +9 -2
- package/dist/module.json +3 -3
- package/dist/module.mjs +62 -103
- package/dist/runtime/components/Accordion.vue +49 -6
- package/dist/runtime/components/Alert.vue +58 -6
- package/dist/runtime/components/App.vue +12 -2
- package/dist/runtime/components/Avatar.vue +27 -6
- package/dist/runtime/components/AvatarGroup.vue +30 -6
- package/dist/runtime/components/Badge.vue +28 -6
- package/dist/runtime/components/Breadcrumb.vue +44 -6
- package/dist/runtime/components/Button.vue +68 -10
- package/dist/runtime/components/ButtonGroup.vue +30 -6
- package/dist/runtime/components/Card.vue +25 -6
- package/dist/runtime/components/Checkbox.vue +45 -6
- package/dist/runtime/components/Chip.vue +39 -6
- package/dist/runtime/components/Collapsible.vue +27 -6
- package/dist/runtime/components/CommandPalette.vue +100 -7
- package/dist/runtime/components/Container.vue +22 -6
- package/dist/runtime/components/ContextMenu.vue +58 -6
- package/dist/runtime/components/ContextMenuContent.vue +18 -4
- package/dist/runtime/components/Drawer.vue +48 -6
- package/dist/runtime/components/DropdownMenu.vue +66 -6
- package/dist/runtime/components/DropdownMenuContent.vue +22 -4
- package/dist/runtime/components/Form.vue +58 -26
- package/dist/runtime/components/FormField.vue +41 -16
- package/dist/runtime/components/Icon.vue +12 -2
- package/dist/runtime/components/Input.vue +46 -6
- package/dist/runtime/components/InputMenu.vue +113 -6
- package/dist/runtime/components/Kbd.vue +28 -6
- package/dist/runtime/components/Link.vue +81 -17
- package/dist/runtime/components/LinkBase.vue +18 -7
- package/dist/runtime/components/Modal.vue +69 -6
- package/dist/runtime/components/NavigationMenu.vue +76 -6
- package/dist/runtime/components/Pagination.vue +99 -6
- package/dist/runtime/components/Popover.vue +42 -6
- package/dist/runtime/components/Progress.vue +44 -6
- package/dist/runtime/components/RadioGroup.vue +55 -7
- package/dist/runtime/components/Select.vue +89 -7
- package/dist/runtime/components/SelectMenu.vue +105 -7
- package/dist/runtime/components/Separator.vue +41 -6
- package/dist/runtime/components/Skeleton.vue +18 -6
- package/dist/runtime/components/Slideover.vue +67 -6
- package/dist/runtime/components/Slider.vue +36 -6
- package/dist/runtime/components/Switch.vue +50 -6
- package/dist/runtime/components/Tabs.vue +59 -6
- package/dist/runtime/components/Textarea.vue +46 -6
- package/dist/runtime/components/Toast.vue +55 -6
- package/dist/runtime/components/Toaster.vue +28 -7
- package/dist/runtime/components/Tooltip.vue +42 -6
- package/dist/runtime/composables/useAvatarGroup.d.ts +2 -2
- package/dist/runtime/composables/useButtonGroup.d.ts +3 -3
- package/dist/runtime/composables/useFormField.d.ts +7 -3
- package/dist/runtime/composables/useFormField.js +12 -7
- package/dist/runtime/composables/useModal.d.ts +1 -1
- package/dist/runtime/composables/useSlideover.d.ts +1 -1
- package/dist/runtime/composables/useToast.d.ts +2 -2
- package/dist/runtime/index.css +1 -0
- package/dist/runtime/plugins/colors.d.ts +2 -0
- package/dist/runtime/plugins/modal.d.ts +2 -0
- package/dist/runtime/plugins/slideover.d.ts +2 -0
- package/dist/runtime/types/form.d.ts +1 -2
- package/dist/runtime/utils/index.d.ts +1 -1
- package/dist/runtime/utils/link.d.ts +23 -55
- package/package.json +26 -25
- package/dist/runtime/assets/css/animations.css +0 -1
- package/dist/runtime/components/Accordion.vue.d.ts +0 -492
- package/dist/runtime/components/Alert.vue.d.ts +0 -548
- package/dist/runtime/components/App.vue.d.ts +0 -25
- package/dist/runtime/components/Avatar.vue.d.ts +0 -384
- package/dist/runtime/components/AvatarGroup.vue.d.ts +0 -381
- package/dist/runtime/components/Badge.vue.d.ts +0 -422
- package/dist/runtime/components/Breadcrumb.vue.d.ts +0 -307
- package/dist/runtime/components/Button.vue.d.ts +0 -949
- package/dist/runtime/components/ButtonGroup.vue.d.ts +0 -182
- package/dist/runtime/components/Card.vue.d.ts +0 -191
- package/dist/runtime/components/Checkbox.vue.d.ts +0 -819
- package/dist/runtime/components/Chip.vue.d.ts +0 -590
- package/dist/runtime/components/Collapsible.vue.d.ts +0 -159
- package/dist/runtime/components/CommandPalette.vue.d.ts +0 -684
- package/dist/runtime/components/Container.vue.d.ts +0 -27
- package/dist/runtime/components/ContextMenu.vue.d.ts +0 -796
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +0 -0
- package/dist/runtime/components/Drawer.vue.d.ts +0 -343
- package/dist/runtime/components/DropdownMenu.vue.d.ts +0 -815
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +0 -0
- package/dist/runtime/components/Form.vue.d.ts +0 -39
- package/dist/runtime/components/FormField.vue.d.ts +0 -356
- package/dist/runtime/components/Icon.vue.d.ts +0 -17
- package/dist/runtime/components/Input.vue.d.ts +0 -1137
- package/dist/runtime/components/InputMenu.vue.d.ts +0 -2121
- package/dist/runtime/components/Kbd.vue.d.ts +0 -169
- package/dist/runtime/components/Link.vue.d.ts +0 -76
- package/dist/runtime/components/LinkBase.vue.d.ts +0 -49
- package/dist/runtime/components/Modal.vue.d.ts +0 -319
- package/dist/runtime/components/NavigationMenu.vue.d.ts +0 -1789
- package/dist/runtime/components/Pagination.vue.d.ts +0 -295
- package/dist/runtime/components/Popover.vue.d.ts +0 -197
- package/dist/runtime/components/Progress.vue.d.ts +0 -1781
- package/dist/runtime/components/RadioGroup.vue.d.ts +0 -1715
- package/dist/runtime/components/Select.vue.d.ts +0 -1569
- package/dist/runtime/components/SelectMenu.vue.d.ts +0 -1661
- package/dist/runtime/components/Separator.vue.d.ts +0 -0
- package/dist/runtime/components/Skeleton.vue.d.ts +0 -26
- package/dist/runtime/components/Slideover.vue.d.ts +0 -375
- package/dist/runtime/components/Slider.vue.d.ts +0 -0
- package/dist/runtime/components/Switch.vue.d.ts +0 -1676
- package/dist/runtime/components/Tabs.vue.d.ts +0 -934
- package/dist/runtime/components/Textarea.vue.d.ts +0 -1133
- package/dist/runtime/components/Toast.vue.d.ts +0 -0
- package/dist/runtime/components/Toaster.vue.d.ts +0 -362
- package/dist/runtime/components/Tooltip.vue.d.ts +0 -248
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defuFn, defu } from 'defu';
|
|
2
|
-
import { addTemplate,
|
|
2
|
+
import { addTemplate, addTypeTemplate, defineNuxtModule, createResolver, addVitePlugin, hasNuxtModule, installModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { kebabCase } from 'scule';
|
|
5
5
|
|
|
@@ -292,7 +292,7 @@ const breadcrumb = (options) => ({
|
|
|
292
292
|
active: false,
|
|
293
293
|
to: true,
|
|
294
294
|
class: {
|
|
295
|
-
link: ["hover:text-gray-700 dark:hover:text-gray-200", options.transitions && "transition-colors"]
|
|
295
|
+
link: ["hover:text-gray-700 dark:hover:text-gray-200", options.theme?.transitions && "transition-colors"]
|
|
296
296
|
}
|
|
297
297
|
}]
|
|
298
298
|
});
|
|
@@ -334,7 +334,7 @@ const buttonGroup = {
|
|
|
334
334
|
|
|
335
335
|
const button = (options) => ({
|
|
336
336
|
slots: {
|
|
337
|
-
base: ["rounded-md font-medium inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.transitions && "transition-colors"],
|
|
337
|
+
base: ["rounded-md font-medium inline-flex items-center focus:outline-none disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75", options.theme?.transitions && "transition-colors"],
|
|
338
338
|
label: "truncate",
|
|
339
339
|
leadingIcon: "shrink-0",
|
|
340
340
|
leadingAvatar: "shrink-0",
|
|
@@ -403,51 +403,51 @@ const button = (options) => ({
|
|
|
403
403
|
compoundVariants: [...options.colors.map((color) => ({
|
|
404
404
|
color,
|
|
405
405
|
variant: "solid",
|
|
406
|
-
class: `text-white dark:text-gray-900 bg-${color}-500 hover:bg-${color}-600 disabled:bg-${color}-500 dark:bg-${color}-400 dark:hover:bg-${color}-500 dark:disabled:bg-${color}-400 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-${color}-500 dark:focus-visible:outline-${color}-400`
|
|
406
|
+
class: `text-white dark:text-gray-900 bg-${color}-500 hover:bg-${color}-600 disabled:bg-${color}-500 aria-disabled:bg-${color}-500 dark:bg-${color}-400 dark:hover:bg-${color}-500 dark:disabled:bg-${color}-400 dark:aria-disabled:bg-${color}-400 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-${color}-500 dark:focus-visible:outline-${color}-400`
|
|
407
407
|
})), ...options.colors.map((color) => ({
|
|
408
408
|
color,
|
|
409
409
|
variant: "outline",
|
|
410
|
-
class: `ring ring-inset ring-${color}-500/50 dark:ring-${color}-400/50 text-${color}-500 dark:text-${color}-400 hover:bg-${color}-500/10 disabled:bg-transparent dark:hover:bg-${color}-400/10 dark:disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`
|
|
410
|
+
class: `ring ring-inset ring-${color}-500/50 dark:ring-${color}-400/50 text-${color}-500 dark:text-${color}-400 hover:bg-${color}-500/10 disabled:bg-transparent aria-disabled:bg-transparent dark:hover:bg-${color}-400/10 dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`
|
|
411
411
|
})), ...options.colors.map((color) => ({
|
|
412
412
|
color,
|
|
413
413
|
variant: "soft",
|
|
414
|
-
class: `text-${color}-500 dark:text-${color}-400 bg-${color}-500/10 hover:bg-${color}-500/15 focus-visible:bg-${color}-500/15 disabled:bg-${color}-500/10 dark:bg-${color}-400/10 dark:hover:bg-${color}-400/15 dark:focus-visible:bg-${color}-400/15 dark:disabled:bg-${color}-400/10`
|
|
414
|
+
class: `text-${color}-500 dark:text-${color}-400 bg-${color}-500/10 hover:bg-${color}-500/15 focus-visible:bg-${color}-500/15 disabled:bg-${color}-500/10 aria-disabled:bg-${color}-500/10 dark:bg-${color}-400/10 dark:hover:bg-${color}-400/15 dark:focus-visible:bg-${color}-400/15 dark:disabled:bg-${color}-400/10 dark:aria-disabled:bg-${color}-400/10`
|
|
415
415
|
})), ...options.colors.map((color) => ({
|
|
416
416
|
color,
|
|
417
417
|
variant: "subtle",
|
|
418
|
-
class: `text-${color}-500 dark:text-${color}-400 ring ring-inset ring-${color}-500/25 dark:ring-${color}-400/25 bg-${color}-500/10 hover:bg-${color}-500/15 disabled:bg-${color}-500/10 dark:bg-${color}-400/10 dark:hover:bg-${color}-400/15 dark:disabled:bg-${color}-400/10 focus-visible:ring-2 focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`
|
|
418
|
+
class: `text-${color}-500 dark:text-${color}-400 ring ring-inset ring-${color}-500/25 dark:ring-${color}-400/25 bg-${color}-500/10 hover:bg-${color}-500/15 disabled:bg-${color}-500/10 aria-disabled:bg-${color}-500/10 dark:bg-${color}-400/10 dark:hover:bg-${color}-400/15 dark:disabled:bg-${color}-400/10 dark:aria-disabled:bg-${color}-400/10 focus-visible:ring-2 focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`
|
|
419
419
|
})), ...options.colors.map((color) => ({
|
|
420
420
|
color,
|
|
421
421
|
variant: "ghost",
|
|
422
|
-
class: `text-${color}-500 dark:text-${color}-400 hover:bg-${color}-500/10 focus-visible:bg-${color}-500/10 disabled:bg-transparent dark:hover:bg-${color}-400/10 dark:focus-visible:bg-${color}-400/10 dark:disabled:bg-transparent`
|
|
422
|
+
class: `text-${color}-500 dark:text-${color}-400 hover:bg-${color}-500/10 focus-visible:bg-${color}-500/10 disabled:bg-transparent aria-disabled:bg-transparent dark:hover:bg-${color}-400/10 dark:focus-visible:bg-${color}-400/10 dark:disabled:bg-transparent dark:aria-disabled:bg-transparent`
|
|
423
423
|
})), ...options.colors.map((color) => ({
|
|
424
424
|
color,
|
|
425
425
|
variant: "link",
|
|
426
|
-
class: `text-${color}-500 hover:text-${color}-600 disabled:text-${color}-500 dark:text-${color}-400 dark:hover:text-${color}-500 dark:disabled:text-${color}-400 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`
|
|
426
|
+
class: `text-${color}-500 hover:text-${color}-600 disabled:text-${color}-500 aria-disabled:text-${color}-500 dark:text-${color}-400 dark:hover:text-${color}-500 dark:disabled:text-${color}-400 dark:aria-disabled:text-${color}-400 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`
|
|
427
427
|
})), {
|
|
428
428
|
color: "gray",
|
|
429
429
|
variant: "solid",
|
|
430
|
-
class: "text-white dark:text-gray-900 bg-gray-900 hover:bg-gray-700 disabled:bg-gray-900 dark:bg-white dark:hover:bg-gray-200 dark:disabled:bg-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900 dark:focus-visible:outline-white"
|
|
430
|
+
class: "text-white dark:text-gray-900 bg-gray-900 hover:bg-gray-700 disabled:bg-gray-900 aria-disabled:bg-gray-900 dark:bg-white dark:hover:bg-gray-200 dark:disabled:bg-white dark:aria-disabled:bg-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900 dark:focus-visible:outline-white"
|
|
431
431
|
}, {
|
|
432
432
|
color: "gray",
|
|
433
433
|
variant: "outline",
|
|
434
|
-
class: "ring ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-white hover:bg-gray-100 disabled:bg-white dark:bg-gray-900 dark:hover:bg-gray-800 dark:disabled:bg-gray-900 focus-visible:ring-2 focus-visible:ring-gray-900 dark:focus-visible:ring-white"
|
|
434
|
+
class: "ring ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-white hover:bg-gray-100 disabled:bg-white aria-disabled:bg-white dark:bg-gray-900 dark:hover:bg-gray-800 dark:disabled:bg-gray-900 dark:aria-disabled:bg-gray-900 focus-visible:ring-2 focus-visible:ring-gray-900 dark:focus-visible:ring-white"
|
|
435
435
|
}, {
|
|
436
436
|
color: "gray",
|
|
437
437
|
variant: "soft",
|
|
438
|
-
class: "text-gray-700 dark:text-gray-200 bg-gray-100 hover:bg-gray-200 focus-visible:bg-gray-200 disabled:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:focus-visible:bg-gray-700/50 dark:disabled:bg-gray-800"
|
|
438
|
+
class: "text-gray-700 dark:text-gray-200 bg-gray-100 hover:bg-gray-200 focus-visible:bg-gray-200 disabled:bg-gray-100 aria-disabled:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:focus-visible:bg-gray-700/50 dark:disabled:bg-gray-800 dark:aria-disabled:bg-gray-800"
|
|
439
439
|
}, {
|
|
440
440
|
color: "gray",
|
|
441
441
|
variant: "subtle",
|
|
442
|
-
class: "ring ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-100 hover:bg-gray-200 disabled:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:disabled:bg-gray-800 focus-visible:ring-2 focus-visible:ring-gray-900 dark:focus-visible:ring-white"
|
|
442
|
+
class: "ring ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-100 hover:bg-gray-200 disabled:bg-gray-100 aria-disabled:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:disabled:bg-gray-800 dark:aria-disabled:bg-gray-800 focus-visible:ring-2 focus-visible:ring-gray-900 dark:focus-visible:ring-white"
|
|
443
443
|
}, {
|
|
444
444
|
color: "gray",
|
|
445
445
|
variant: "ghost",
|
|
446
|
-
class: "text-gray-700 dark:text-gray-200 hover:bg-gray-100 focus-visible:bg-gray-100 disabled:bg-transparent dark:hover:bg-gray-800 dark:focus-visible:bg-gray-800 dark:hover:disabled:bg-transparent"
|
|
446
|
+
class: "text-gray-700 dark:text-gray-200 hover:bg-gray-100 focus-visible:bg-gray-100 disabled:bg-transparent aria-disabled:bg-transparent dark:hover:bg-gray-800 dark:focus-visible:bg-gray-800 dark:hover:disabled:bg-transparent dark:hover:aria-disabled:bg-transparent"
|
|
447
447
|
}, {
|
|
448
448
|
color: "gray",
|
|
449
449
|
variant: "link",
|
|
450
|
-
class: "text-gray-500 hover:text-gray-700 disabled:text-gray-500 dark:text-gray-400 dark:hover:text-gray-200 dark:disabled:text-gray-400 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-gray-900 dark:focus-visible:ring-white"
|
|
450
|
+
class: "text-gray-500 hover:text-gray-700 disabled:text-gray-500 aria-disabled:text-gray-500 dark:text-gray-400 dark:hover:text-gray-200 dark:disabled:text-gray-400 dark:aria-disabled:text-gray-400 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-gray-900 dark:focus-visible:ring-white"
|
|
451
451
|
}, {
|
|
452
452
|
size: "xs",
|
|
453
453
|
square: true,
|
|
@@ -646,8 +646,8 @@ const commandPalette = (options) => ({
|
|
|
646
646
|
group: "p-1 isolate",
|
|
647
647
|
empty: "py-6 text-center text-sm",
|
|
648
648
|
label: "px-2 py-1.5 text-xs font-semibold text-gray-900 dark:text-white",
|
|
649
|
-
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-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50", options.transitions && "transition-colors before:transition-colors"],
|
|
650
|
-
itemLeadingIcon: ["shrink-0 size-5 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200", options.transitions && "transition-colors"],
|
|
649
|
+
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-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50", options.theme?.transitions && "transition-colors before:transition-colors"],
|
|
650
|
+
itemLeadingIcon: ["shrink-0 size-5 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200", options.theme?.transitions && "transition-colors"],
|
|
651
651
|
itemLeadingAvatar: "shrink-0",
|
|
652
652
|
itemLeadingAvatarSize: "2xs",
|
|
653
653
|
itemLeadingChip: "shrink-0 size-5",
|
|
@@ -692,8 +692,8 @@ const contextMenu = (options) => ({
|
|
|
692
692
|
itemLeadingIcon: "text-gray-700 dark:text-gray-200"
|
|
693
693
|
},
|
|
694
694
|
false: {
|
|
695
|
-
item: ["text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50", options.transitions && "transition-colors before:transition-colors"],
|
|
696
|
-
itemLeadingIcon: ["text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200", options.transitions && "transition-colors"]
|
|
695
|
+
item: ["text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50", options.theme?.transitions && "transition-colors before:transition-colors"],
|
|
696
|
+
itemLeadingIcon: ["text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200", options.theme?.transitions && "transition-colors"]
|
|
697
697
|
}
|
|
698
698
|
},
|
|
699
699
|
size: {
|
|
@@ -788,8 +788,8 @@ const dropdownMenu = (options) => ({
|
|
|
788
788
|
itemLeadingIcon: "text-gray-700 dark:text-gray-200"
|
|
789
789
|
},
|
|
790
790
|
false: {
|
|
791
|
-
item: ["text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50", options.transitions && "transition-colors before:transition-colors"],
|
|
792
|
-
itemLeadingIcon: ["text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200", options.transitions && "transition-colors"]
|
|
791
|
+
item: ["text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50", options.theme?.transitions && "transition-colors before:transition-colors"],
|
|
792
|
+
itemLeadingIcon: ["text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200", options.theme?.transitions && "transition-colors"]
|
|
793
793
|
}
|
|
794
794
|
},
|
|
795
795
|
size: {
|
|
@@ -883,7 +883,7 @@ const formField = {
|
|
|
883
883
|
const input = (options) => ({
|
|
884
884
|
slots: {
|
|
885
885
|
root: "relative inline-flex items-center",
|
|
886
|
-
base: ["w-full rounded-md border-0 focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.transitions && "transition-colors"],
|
|
886
|
+
base: ["w-full rounded-md border-0 focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme?.transitions && "transition-colors"],
|
|
887
887
|
leading: "absolute inset-y-0 start-0 flex items-center",
|
|
888
888
|
leadingIcon: "shrink-0 text-gray-400 dark:text-gray-500",
|
|
889
889
|
leadingAvatar: "shrink-0",
|
|
@@ -1036,6 +1036,8 @@ const input = (options) => ({
|
|
|
1036
1036
|
const inputMenu = (options) => {
|
|
1037
1037
|
return defuFn({
|
|
1038
1038
|
slots: {
|
|
1039
|
+
base: () => ["rounded-md", options.theme?.transitions && "transition-colors"],
|
|
1040
|
+
trailing: "absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
|
|
1039
1041
|
arrow: "fill-gray-200 dark:fill-gray-800",
|
|
1040
1042
|
content: "max-h-60 w-[--radix-popper-anchor-width] bg-white dark:bg-gray-900 shadow-lg rounded-md ring ring-gray-200 dark:ring-gray-800 overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
1041
1043
|
viewport: "divide-y divide-gray-200 dark:divide-gray-800 scroll-py-1",
|
|
@@ -1043,8 +1045,8 @@ const inputMenu = (options) => {
|
|
|
1043
1045
|
empty: "py-2 text-center text-sm text-gray-500 dark:text-gray-400",
|
|
1044
1046
|
label: "font-semibold text-gray-900 dark:text-white",
|
|
1045
1047
|
separator: "-mx-1 my-1 h-px bg-gray-200 dark:bg-gray-800",
|
|
1046
|
-
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-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50", options.transitions && "transition-colors before:transition-colors"],
|
|
1047
|
-
itemLeadingIcon: ["shrink-0 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200", options.transitions && "transition-colors"],
|
|
1048
|
+
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-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50", options.theme?.transitions && "transition-colors before:transition-colors"],
|
|
1049
|
+
itemLeadingIcon: ["shrink-0 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200", options.theme?.transitions && "transition-colors"],
|
|
1048
1050
|
itemLeadingAvatar: "shrink-0",
|
|
1049
1051
|
itemLeadingAvatarSize: "",
|
|
1050
1052
|
itemLeadingChip: "shrink-0",
|
|
@@ -1054,14 +1056,9 @@ const inputMenu = (options) => {
|
|
|
1054
1056
|
itemLabel: "truncate",
|
|
1055
1057
|
tagsItem: "px-1.5 py-0.5 rounded font-medium inline-flex items-center gap-0.5 ring ring-inset ring-gray-300 dark:ring-gray-700 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
1056
1058
|
tagsItemText: "truncate",
|
|
1057
|
-
tagsItemDelete: ["inline-flex items-center rounded-sm text-gray-400 dark:text-gray-500 hover:text-gray-700 hover:bg-gray-200 dark:hover:text-gray-200 dark:hover:bg-gray-700/50 disabled:pointer-events-none", options.transitions && "transition-colors"],
|
|
1059
|
+
tagsItemDelete: ["inline-flex items-center rounded-sm text-gray-400 dark:text-gray-500 hover:text-gray-700 hover:bg-gray-200 dark:hover:text-gray-200 dark:hover:bg-gray-700/50 disabled:pointer-events-none", options.theme?.transitions && "transition-colors"],
|
|
1058
1060
|
tagsItemDeleteIcon: "",
|
|
1059
1061
|
tagsInput: "border-0 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
1060
|
-
}
|
|
1061
|
-
}, {
|
|
1062
|
-
slots: {
|
|
1063
|
-
base: () => ["rounded-md", options.transitions && "transition-colors"],
|
|
1064
|
-
trailing: "absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75"
|
|
1065
1062
|
},
|
|
1066
1063
|
variants: {
|
|
1067
1064
|
multiple: {
|
|
@@ -1170,7 +1167,7 @@ const link = (options) => ({
|
|
|
1170
1167
|
variants: {
|
|
1171
1168
|
active: {
|
|
1172
1169
|
true: "text-primary-500 dark:text-primary-400",
|
|
1173
|
-
false: ["text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200", options.transitions && "transition-colors"]
|
|
1170
|
+
false: ["text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200", options.theme?.transitions && "transition-colors"]
|
|
1174
1171
|
},
|
|
1175
1172
|
disabled: {
|
|
1176
1173
|
true: "cursor-not-allowed opacity-75"
|
|
@@ -1277,8 +1274,8 @@ const navigationMenu = (options) => ({
|
|
|
1277
1274
|
false: {
|
|
1278
1275
|
link: "text-gray-500 dark:text-gray-400",
|
|
1279
1276
|
linkLeadingIcon: "text-gray-400 dark:text-gray-500",
|
|
1280
|
-
childLink: ["hover:bg-gray-50 dark:hover:bg-gray-800/50 text-gray-700 dark:text-gray-200 hover:text-gray-900 dark:hover:text-white", options.transitions && "transition-colors"],
|
|
1281
|
-
childLinkIcon: ["text-gray-400 dark:text-gray-500 group-hover:text-gray-700 dark:group-hover:text-gray-200", options.transitions && "transition-colors"]
|
|
1277
|
+
childLink: ["hover:bg-gray-50 dark:hover:bg-gray-800/50 text-gray-700 dark:text-gray-200 hover:text-gray-900 dark:hover:text-white", options.theme?.transitions && "transition-colors"],
|
|
1278
|
+
childLinkIcon: ["text-gray-400 dark:text-gray-500 group-hover:text-gray-700 dark:group-hover:text-gray-200", options.theme?.transitions && "transition-colors"]
|
|
1282
1279
|
}
|
|
1283
1280
|
},
|
|
1284
1281
|
disabled: {
|
|
@@ -1309,8 +1306,8 @@ const navigationMenu = (options) => ({
|
|
|
1309
1306
|
active: false,
|
|
1310
1307
|
variant: "pill",
|
|
1311
1308
|
class: {
|
|
1312
|
-
link: ["hover:text-gray-900 dark:hover:text-white hover:before:bg-gray-50 dark:hover:before:bg-gray-800/50", options.transitions && "transition-colors before:transition-colors"],
|
|
1313
|
-
linkLeadingIcon: ["group-hover:text-gray-700 dark:group-hover:text-gray-200", options.transitions && "transition-colors"]
|
|
1309
|
+
link: ["hover:text-gray-900 dark:hover:text-white hover:before:bg-gray-50 dark:hover:before:bg-gray-800/50 data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50", options.theme?.transitions && "transition-colors before:transition-colors"],
|
|
1310
|
+
linkLeadingIcon: ["group-hover:text-gray-700 dark:group-hover:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200", options.theme?.transitions && "transition-colors"]
|
|
1314
1311
|
}
|
|
1315
1312
|
}, ...options.colors.map((color) => ({
|
|
1316
1313
|
color,
|
|
@@ -1340,15 +1337,15 @@ const navigationMenu = (options) => ({
|
|
|
1340
1337
|
active: true,
|
|
1341
1338
|
highlight: true,
|
|
1342
1339
|
class: {
|
|
1343
|
-
link: ["hover:before:bg-gray-50 dark:hover:before:bg-gray-800/50", options.transitions && "before:transition-colors"]
|
|
1340
|
+
link: ["hover:before:bg-gray-50 dark:hover:before:bg-gray-800/50", options.theme?.transitions && "before:transition-colors"]
|
|
1344
1341
|
}
|
|
1345
1342
|
}, {
|
|
1346
1343
|
disabled: false,
|
|
1347
1344
|
active: false,
|
|
1348
1345
|
variant: "link",
|
|
1349
1346
|
class: {
|
|
1350
|
-
link: ["hover:text-gray-900 dark:hover:text-white", options.transitions && "transition-colors"],
|
|
1351
|
-
linkLeadingIcon: ["group-hover:text-gray-700 dark:group-hover:text-gray-200", options.transitions && "transition-colors"]
|
|
1347
|
+
link: ["hover:text-gray-900 dark:hover:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white", options.theme?.transitions && "transition-colors"],
|
|
1348
|
+
linkLeadingIcon: ["group-hover:text-gray-700 dark:group-hover:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200", options.theme?.transitions && "transition-colors"]
|
|
1352
1349
|
}
|
|
1353
1350
|
}, ...options.colors.map((color) => ({
|
|
1354
1351
|
color,
|
|
@@ -1714,6 +1711,9 @@ const radioGroup = (options) => ({
|
|
|
1714
1711
|
const select = (options) => {
|
|
1715
1712
|
return defuFn({
|
|
1716
1713
|
slots: {
|
|
1714
|
+
root: () => void 0,
|
|
1715
|
+
base: () => ["relative group rounded-md inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme?.transitions && "transition-colors"],
|
|
1716
|
+
value: "truncate group-data-placeholder:text-current/50",
|
|
1717
1717
|
arrow: "fill-gray-200 dark:fill-gray-800",
|
|
1718
1718
|
content: "max-h-60 w-[--radix-popper-anchor-width] bg-white dark:bg-gray-900 shadow-lg rounded-md ring ring-gray-200 dark:ring-gray-800 overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
1719
1719
|
viewport: "divide-y divide-gray-200 dark:divide-gray-800 scroll-py-1",
|
|
@@ -1721,8 +1721,8 @@ const select = (options) => {
|
|
|
1721
1721
|
empty: "py-2 text-center text-sm text-gray-500 dark:text-gray-400",
|
|
1722
1722
|
label: "font-semibold text-gray-900 dark:text-white",
|
|
1723
1723
|
separator: "-mx-1 my-1 h-px bg-gray-200 dark:bg-gray-800",
|
|
1724
|
-
item: ["group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50", options.transitions && "transition-colors before:transition-colors"],
|
|
1725
|
-
itemLeadingIcon: ["shrink-0 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200", options.transitions && "transition-colors"],
|
|
1724
|
+
item: ["group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50", options.theme?.transitions && "transition-colors before:transition-colors"],
|
|
1725
|
+
itemLeadingIcon: ["shrink-0 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200", options.theme?.transitions && "transition-colors"],
|
|
1726
1726
|
itemLeadingAvatar: "shrink-0",
|
|
1727
1727
|
itemLeadingAvatarSize: "",
|
|
1728
1728
|
itemLeadingChip: "shrink-0",
|
|
@@ -1732,6 +1732,7 @@ const select = (options) => {
|
|
|
1732
1732
|
itemLabel: "truncate"
|
|
1733
1733
|
},
|
|
1734
1734
|
variants: {
|
|
1735
|
+
...buttonGroupVariant,
|
|
1735
1736
|
size: {
|
|
1736
1737
|
xs: {
|
|
1737
1738
|
label: "p-1 text-[10px]/3 gap-1",
|
|
@@ -1780,14 +1781,6 @@ const select = (options) => {
|
|
|
1780
1781
|
}
|
|
1781
1782
|
}
|
|
1782
1783
|
}
|
|
1783
|
-
}, {
|
|
1784
|
-
slots: {
|
|
1785
|
-
base: () => ["relative group rounded-md inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.transitions && "transition-colors"],
|
|
1786
|
-
value: "truncate group-data-placeholder:text-current/50"
|
|
1787
|
-
},
|
|
1788
|
-
variants: {
|
|
1789
|
-
...buttonGroupVariant
|
|
1790
|
-
}
|
|
1791
1784
|
}, input(options));
|
|
1792
1785
|
};
|
|
1793
1786
|
|
|
@@ -2098,10 +2091,10 @@ const slider = (options) => ({
|
|
|
2098
2091
|
const _switch = (options) => ({
|
|
2099
2092
|
slots: {
|
|
2100
2093
|
root: "relative flex items-start",
|
|
2101
|
-
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-white dark:focus-visible:ring-offset-gray-900 data-[state=unchecked]:bg-gray-200 dark:data-[state=unchecked]:bg-gray-700", options.transitions && "transition-colors duration-200"],
|
|
2094
|
+
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-white dark:focus-visible:ring-offset-gray-900 data-[state=unchecked]:bg-gray-200 dark:data-[state=unchecked]:bg-gray-700", options.theme?.transitions && "transition-colors duration-200"],
|
|
2102
2095
|
container: "flex items-center",
|
|
2103
2096
|
thumb: "group pointer-events-none block rounded-full bg-white dark:bg-gray-900 shadow-lg ring-0 transition-transform duration-200 data-[state=unchecked]:translate-x-0 flex items-center justify-center",
|
|
2104
|
-
icon: ["absolute shrink-0 group-data-[state=unchecked]:text-gray-400 dark:group-data-[state=unchecked]:text-gray-500 opacity-0 size-10/12", options.transitions && "transition-[color,opacity] duration-200"],
|
|
2097
|
+
icon: ["absolute shrink-0 group-data-[state=unchecked]:text-gray-400 dark:group-data-[state=unchecked]:text-gray-500 opacity-0 size-10/12", options.theme?.transitions && "transition-[color,opacity] duration-200"],
|
|
2105
2098
|
wrapper: "ms-2",
|
|
2106
2099
|
label: "block font-medium text-gray-700 dark:text-gray-200",
|
|
2107
2100
|
description: "text-gray-500 dark:text-gray-400"
|
|
@@ -2188,7 +2181,7 @@ const tabs = (options) => ({
|
|
|
2188
2181
|
root: "flex items-center gap-2",
|
|
2189
2182
|
list: "relative flex p-1 group",
|
|
2190
2183
|
indicator: "absolute transition-[translate,width] duration-200",
|
|
2191
|
-
trigger: ["relative inline-flex items-center shrink-0 data-[state=inactive]:text-gray-500 dark:data-[state=inactive]:text-gray-400 hover:data-[state=inactive]:text-gray-700 dark:hover:data-[state=inactive]:text-gray-200 font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none", options.transitions && "transition-colors"],
|
|
2184
|
+
trigger: ["relative inline-flex items-center shrink-0 data-[state=inactive]:text-gray-500 dark:data-[state=inactive]:text-gray-400 hover:data-[state=inactive]:text-gray-700 dark:hover:data-[state=inactive]:text-gray-200 font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none", options.theme?.transitions && "transition-colors"],
|
|
2192
2185
|
content: "focus:outline-none w-full",
|
|
2193
2186
|
leadingIcon: "shrink-0",
|
|
2194
2187
|
leadingAvatar: "shrink-0",
|
|
@@ -2471,49 +2464,6 @@ const theme = {
|
|
|
2471
2464
|
};
|
|
2472
2465
|
|
|
2473
2466
|
function addTemplates(options, nuxt) {
|
|
2474
|
-
const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
2475
|
-
if (!nuxt.options.css.find((path) => path.endsWith("tailwind.css"))) {
|
|
2476
|
-
const template = addTemplate({
|
|
2477
|
-
filename: "tailwind.css",
|
|
2478
|
-
write: true,
|
|
2479
|
-
getContents: () => `@import "tailwindcss";
|
|
2480
|
-
@import "./ui.css";
|
|
2481
|
-
${hasNuxtModule("@nuxt/content") ? '@source "../content/**/*.md";' : ""}
|
|
2482
|
-
`
|
|
2483
|
-
});
|
|
2484
|
-
nuxt.options.css.unshift(template.dst);
|
|
2485
|
-
}
|
|
2486
|
-
addTemplate({
|
|
2487
|
-
filename: "ui.css",
|
|
2488
|
-
write: true,
|
|
2489
|
-
getContents: () => `@layer base {
|
|
2490
|
-
:root {
|
|
2491
|
-
color-scheme: light dark;
|
|
2492
|
-
}
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
|
-
@theme {
|
|
2496
|
-
--color-gray-*: initial;
|
|
2497
|
-
--color-cool-50: #f9fafb;
|
|
2498
|
-
--color-cool-100: #f3f4f6;
|
|
2499
|
-
--color-cool-200: #e5e7eb;
|
|
2500
|
-
--color-cool-300: #d1d5db;
|
|
2501
|
-
--color-cool-400: #9ca3af;
|
|
2502
|
-
--color-cool-500: #6b7280;
|
|
2503
|
-
--color-cool-600: #4b5563;
|
|
2504
|
-
--color-cool-700: #374151;
|
|
2505
|
-
--color-cool-800: #1f2937;
|
|
2506
|
-
--color-cool-900: #111827;
|
|
2507
|
-
--color-cool-950: #030712;
|
|
2508
|
-
|
|
2509
|
-
--spacing-4_5: 1.125rem;
|
|
2510
|
-
|
|
2511
|
-
${shades.map((shade) => `--color-primary-${shade}: var(--color-primary-${shade});`).join("\n ")}
|
|
2512
|
-
${shades.map((shade) => `--color-error-${shade}: var(--color-error-${shade});`).join("\n ")}
|
|
2513
|
-
${shades.map((shade) => `--color-gray-${shade}: var(--color-gray-${shade});`).join("\n ")}
|
|
2514
|
-
}
|
|
2515
|
-
`
|
|
2516
|
-
});
|
|
2517
2467
|
for (const component in theme) {
|
|
2518
2468
|
addTemplate({
|
|
2519
2469
|
filename: `ui/${kebabCase(component)}.ts`,
|
|
@@ -2564,16 +2514,12 @@ type AppConfigUI = {
|
|
|
2564
2514
|
icons?: Partial<typeof icons>
|
|
2565
2515
|
} & DeepPartial<typeof ui, string>
|
|
2566
2516
|
|
|
2567
|
-
declare module 'nuxt/schema' {
|
|
2568
|
-
interface AppConfigInput {
|
|
2569
|
-
ui?: AppConfigUI
|
|
2570
|
-
}
|
|
2571
|
-
}
|
|
2572
2517
|
declare module '@nuxt/schema' {
|
|
2573
2518
|
interface AppConfigInput {
|
|
2574
2519
|
ui?: AppConfigUI
|
|
2575
2520
|
}
|
|
2576
2521
|
}
|
|
2522
|
+
|
|
2577
2523
|
export {}
|
|
2578
2524
|
`
|
|
2579
2525
|
});
|
|
@@ -2599,13 +2545,16 @@ const module = defineNuxtModule({
|
|
|
2599
2545
|
name: "ui",
|
|
2600
2546
|
configKey: "ui",
|
|
2601
2547
|
compatibility: {
|
|
2602
|
-
nuxt: ">=3.
|
|
2548
|
+
nuxt: ">=3.13.1"
|
|
2603
2549
|
}
|
|
2604
2550
|
},
|
|
2605
2551
|
defaults: {
|
|
2606
2552
|
prefix: "U",
|
|
2607
2553
|
colors: void 0,
|
|
2608
|
-
|
|
2554
|
+
fonts: true,
|
|
2555
|
+
theme: {
|
|
2556
|
+
transitions: true
|
|
2557
|
+
}
|
|
2609
2558
|
},
|
|
2610
2559
|
async setup(options, nuxt) {
|
|
2611
2560
|
const { resolve } = createResolver(import.meta.url);
|
|
@@ -2622,14 +2571,24 @@ const module = defineNuxtModule({
|
|
|
2622
2571
|
});
|
|
2623
2572
|
nuxt.options.app.rootAttrs = nuxt.options.app.rootAttrs || {};
|
|
2624
2573
|
nuxt.options.app.rootAttrs.class = [nuxt.options.app.rootAttrs.class, "isolate"].filter(Boolean).join(" ");
|
|
2625
|
-
nuxt.options.css.push(resolve("./runtime/assets/css/animations.css"));
|
|
2626
2574
|
if (nuxt.options.builder === "@nuxt/vite-builder") {
|
|
2627
2575
|
const plugin = await import('@tailwindcss/vite').then((r) => r.default);
|
|
2628
2576
|
addVitePlugin(plugin());
|
|
2629
2577
|
} else {
|
|
2630
2578
|
nuxt.options.postcss.plugins["@tailwindcss/postcss"] = {};
|
|
2631
2579
|
}
|
|
2632
|
-
|
|
2580
|
+
if (options.fonts) {
|
|
2581
|
+
if (!hasNuxtModule("@nuxt/fonts")) {
|
|
2582
|
+
await installModule("@nuxt/fonts", { experimental: { processCSSVariables: true } });
|
|
2583
|
+
} else {
|
|
2584
|
+
nuxt.options.fonts = defu(nuxt.options.fonts, { experimental: { processCSSVariables: true } });
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
if (!hasNuxtModule("@nuxt/icon")) {
|
|
2588
|
+
await installModule("@nuxt/icon", { cssLayer: "components" });
|
|
2589
|
+
} else {
|
|
2590
|
+
nuxt.options.icon = defu(nuxt.options.icon, { cssLayer: "components" });
|
|
2591
|
+
}
|
|
2633
2592
|
addPlugin({
|
|
2634
2593
|
src: resolve("./runtime/plugins/colors")
|
|
2635
2594
|
});
|
|
@@ -1,9 +1,52 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { tv } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { tv } from 'tailwind-variants'
|
|
3
|
+
import type { AccordionRootProps, AccordionRootEmits, AccordionItemProps } from 'radix-vue'
|
|
4
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
5
|
+
import _appConfig from '#build/app.config'
|
|
6
|
+
import theme from '#build/ui/accordion'
|
|
7
|
+
import type { DynamicSlots } from '../types/utils'
|
|
8
|
+
|
|
9
|
+
const appConfig = _appConfig as AppConfig & { ui: { accordion: Partial<typeof theme> } }
|
|
10
|
+
|
|
11
|
+
const accordion = tv({ extend: tv(theme), ...(appConfig.ui?.accordion || {}) })
|
|
12
|
+
|
|
13
|
+
export interface AccordionItem extends Pick<AccordionItemProps, 'disabled'> {
|
|
14
|
+
label?: string
|
|
15
|
+
icon?: string
|
|
16
|
+
trailingIcon?: string
|
|
17
|
+
slot?: string
|
|
18
|
+
content?: string
|
|
19
|
+
/** A unique value for the accordion item. Defaults to the index. */
|
|
20
|
+
value?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface AccordionProps<T> extends Pick<AccordionRootProps, 'collapsible' | 'defaultValue' | 'modelValue' | 'type' | 'disabled'> {
|
|
24
|
+
/**
|
|
25
|
+
* The element or component this component should render as.
|
|
26
|
+
* @defaultValue 'div'
|
|
27
|
+
*/
|
|
28
|
+
as?: any
|
|
29
|
+
items?: T[]
|
|
30
|
+
/**
|
|
31
|
+
* The icon displayed on the right side of the trigger.
|
|
32
|
+
* @defaultValue appConfig.ui.icons.chevronDown
|
|
33
|
+
*/
|
|
34
|
+
trailingIcon?: string
|
|
35
|
+
class?: any
|
|
36
|
+
ui?: Partial<typeof accordion.slots>
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface AccordionEmits extends AccordionRootEmits {}
|
|
40
|
+
|
|
41
|
+
type SlotProps<T> = (props: { item: T, index: number, open: boolean }) => any
|
|
42
|
+
|
|
43
|
+
export type AccordionSlots<T extends { slot?: string }> = {
|
|
44
|
+
leading: SlotProps<T>
|
|
45
|
+
default: SlotProps<T>
|
|
46
|
+
trailing: SlotProps<T>
|
|
47
|
+
content: SlotProps<T>
|
|
48
|
+
body: SlotProps<T>
|
|
49
|
+
} & DynamicSlots<T, SlotProps<T>>
|
|
7
50
|
</script>
|
|
8
51
|
|
|
9
52
|
<script setup lang="ts" generic="T extends AccordionItem">
|
|
@@ -1,9 +1,61 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { tv } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { tv, type VariantProps } from 'tailwind-variants'
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
4
|
+
import _appConfig from '#build/app.config'
|
|
5
|
+
import theme from '#build/ui/alert'
|
|
6
|
+
import type { AvatarProps, ButtonProps } from '../types'
|
|
7
|
+
|
|
8
|
+
const appConfig = _appConfig as AppConfig & { ui: { alert: Partial<typeof theme> } }
|
|
9
|
+
|
|
10
|
+
const alert = tv({ extend: tv(theme), ...(appConfig.ui?.alert || {}) })
|
|
11
|
+
|
|
12
|
+
type AlertVariants = VariantProps<typeof alert>
|
|
13
|
+
|
|
14
|
+
export interface AlertProps {
|
|
15
|
+
/**
|
|
16
|
+
* The element or component this component should render as.
|
|
17
|
+
* @defaultValue 'div'
|
|
18
|
+
*/
|
|
19
|
+
as?: any
|
|
20
|
+
title?: string
|
|
21
|
+
description?: string
|
|
22
|
+
icon?: string
|
|
23
|
+
avatar?: AvatarProps
|
|
24
|
+
color?: AlertVariants['color']
|
|
25
|
+
variant?: AlertVariants['variant']
|
|
26
|
+
/**
|
|
27
|
+
* Display a list of actions:
|
|
28
|
+
* - under the title and description if multiline
|
|
29
|
+
* - next to the close button if not multiline
|
|
30
|
+
*/
|
|
31
|
+
actions?: ButtonProps[]
|
|
32
|
+
/**
|
|
33
|
+
* Display a close button to dismiss the alert.
|
|
34
|
+
* `{ size: 'md', color: 'gray', variant: 'link' }`{lang="ts-type"}
|
|
35
|
+
* @emits `close`
|
|
36
|
+
* @defaultValue false
|
|
37
|
+
*/
|
|
38
|
+
close?: ButtonProps | boolean
|
|
39
|
+
/**
|
|
40
|
+
* The icon displayed in the close button.
|
|
41
|
+
* @defaultValue appConfig.ui.icons.close
|
|
42
|
+
*/
|
|
43
|
+
closeIcon?: string
|
|
44
|
+
class?: any
|
|
45
|
+
ui?: Partial<typeof alert.slots>
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface AlertEmits {
|
|
49
|
+
(e: 'close'): void
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface AlertSlots {
|
|
53
|
+
leading(props?: {}): any
|
|
54
|
+
title(props?: {}): any
|
|
55
|
+
description(props?: {}): any
|
|
56
|
+
actions(props?: {}): any
|
|
57
|
+
close(props: { ui: any }): any
|
|
58
|
+
}
|
|
7
59
|
</script>
|
|
8
60
|
|
|
9
61
|
<script setup lang="ts">
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { ConfigProviderProps, TooltipProviderProps } from 'radix-vue'
|
|
3
|
+
import type { ToasterProps } from '../types'
|
|
2
4
|
|
|
5
|
+
export interface AppProps extends Omit<ConfigProviderProps, 'useId'> {
|
|
6
|
+
tooltip?: TooltipProviderProps
|
|
7
|
+
toaster?: ToasterProps | null
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface AppSlots {
|
|
11
|
+
default(props?: {}): any
|
|
12
|
+
}
|
|
3
13
|
</script>
|
|
4
14
|
|
|
5
15
|
<script setup lang="ts">
|
|
@@ -19,7 +29,7 @@ const toasterProps = toRef(() => props.toaster)
|
|
|
19
29
|
</script>
|
|
20
30
|
|
|
21
31
|
<template>
|
|
22
|
-
<ConfigProvider :use-id="() => useId() as string" v-bind="configProviderProps">
|
|
32
|
+
<ConfigProvider :use-id="() => (useId() as string)" v-bind="configProviderProps">
|
|
23
33
|
<TooltipProvider v-bind="tooltipProps">
|
|
24
34
|
<UToaster v-if="toaster !== null" v-bind="toasterProps">
|
|
25
35
|
<slot />
|
|
@@ -1,9 +1,30 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { tv } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { tv, type VariantProps } from 'tailwind-variants'
|
|
3
|
+
import type { AvatarFallbackProps } from 'radix-vue'
|
|
4
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
5
|
+
import _appConfig from '#build/app.config'
|
|
6
|
+
import theme from '#build/ui/avatar'
|
|
7
|
+
|
|
8
|
+
const appConfig = _appConfig as AppConfig & { ui: { avatar: Partial<typeof theme> } }
|
|
9
|
+
|
|
10
|
+
const avatar = tv({ extend: tv(theme), ...(appConfig.ui?.avatar || {}) })
|
|
11
|
+
|
|
12
|
+
type AvatarVariants = VariantProps<typeof avatar>
|
|
13
|
+
|
|
14
|
+
export interface AvatarProps extends Pick<AvatarFallbackProps, 'delayMs'> {
|
|
15
|
+
/**
|
|
16
|
+
* The element or component this component should render as.
|
|
17
|
+
* @defaultValue 'img'
|
|
18
|
+
*/
|
|
19
|
+
as?: string | object
|
|
20
|
+
src?: string
|
|
21
|
+
alt?: string
|
|
22
|
+
icon?: string
|
|
23
|
+
text?: string
|
|
24
|
+
size?: AvatarVariants['size']
|
|
25
|
+
class?: any
|
|
26
|
+
ui?: Partial<typeof avatar.slots>
|
|
27
|
+
}
|
|
7
28
|
</script>
|
|
8
29
|
|
|
9
30
|
<script setup lang="ts">
|
|
@@ -1,9 +1,33 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { tv } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { tv, type VariantProps } from 'tailwind-variants'
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
4
|
+
import _appConfig from '#build/app.config'
|
|
5
|
+
import theme from '#build/ui/avatar-group'
|
|
6
|
+
|
|
7
|
+
const appConfig = _appConfig as AppConfig & { ui: { avatarGroup: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const avatarGroup = tv({ extend: tv(theme), ...(appConfig.ui?.avatarGroup || {}) })
|
|
10
|
+
|
|
11
|
+
type AvatarGroupVariants = VariantProps<typeof avatarGroup>
|
|
12
|
+
|
|
13
|
+
export interface AvatarGroupProps {
|
|
14
|
+
/**
|
|
15
|
+
* The element or component this component should render as.
|
|
16
|
+
* @defaultValue 'div'
|
|
17
|
+
*/
|
|
18
|
+
as?: any
|
|
19
|
+
size?: AvatarGroupVariants['size']
|
|
20
|
+
/**
|
|
21
|
+
* The maximum number of avatars to display.
|
|
22
|
+
*/
|
|
23
|
+
max?: number | string
|
|
24
|
+
class?: any
|
|
25
|
+
ui?: Partial<typeof avatarGroup.slots>
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface AvatarGroupSlots {
|
|
29
|
+
default(props?: {}): any
|
|
30
|
+
}
|
|
7
31
|
</script>
|
|
8
32
|
|
|
9
33
|
<script setup lang="ts">
|