ui-thing 0.1.56 → 0.2.0
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/.husky/pre-commit +1 -0
- package/CHANGELOG.md +64 -0
- package/README.md +4 -3
- package/dist/index.js +1273 -15771
- package/dist/index.js.map +1 -1
- package/package.json +33 -21
- package/src/commands/add.ts +218 -274
- package/src/commands/init.ts +107 -58
- package/src/commands/prettier.ts +6 -8
- package/src/commands/shortcuts.ts +13 -13
- package/src/commands/theme.ts +9 -6
- package/src/index.ts +2 -2
- package/src/templates/css.ts +958 -773
- package/src/templates/prettier.ts +14 -16
- package/src/templates/shortcuts.ts +225 -126
- package/src/templates/tw-helper.ts +8 -0
- package/src/templates/vs-code.ts +24 -0
- package/src/types.ts +74 -3
- package/src/utils/addPrettierConfig.ts +49 -6
- package/src/utils/addShortcutFiles.ts +5 -4
- package/src/utils/addTailwindVitePlugin.ts +35 -0
- package/src/utils/addVSCodeFiles.ts +13 -0
- package/src/utils/compareUIConfig.ts +1 -2
- package/src/utils/config.ts +59 -86
- package/src/utils/constants.ts +67 -13
- package/src/utils/detectNuxtVersion.ts +20 -0
- package/src/utils/fetchComponents.ts +14 -1
- package/src/utils/installPackages.ts +3 -27
- package/src/utils/mergeJsonFile.ts +28 -0
- package/src/utils/printFancyBoxMessage.ts +62 -16
- package/src/utils/promptForComponents.ts +8 -6
- package/src/utils/uiConfigPrompt.ts +12 -37
- package/tsconfig.json +2 -1
- package/dist/chunk-FW4363Y4.js +0 -2
- package/dist/chunk-FW4363Y4.js.map +0 -1
- package/dist/prompt-4NXDAQWE.js +0 -46
- package/dist/prompt-4NXDAQWE.js.map +0 -1
- package/src/comps.ts +0 -3237
- package/src/templates/tailwind.ts +0 -142
package/src/comps.ts
DELETED
|
@@ -1,3237 +0,0 @@
|
|
|
1
|
-
export default [
|
|
2
|
-
{
|
|
3
|
-
name: "Accordion",
|
|
4
|
-
value: "accordion",
|
|
5
|
-
instructions: ["Remember to add the accordion animations to your tailwind.config.js"],
|
|
6
|
-
files: [
|
|
7
|
-
{
|
|
8
|
-
fileName: "Accordion/Accordion.vue",
|
|
9
|
-
dirPath: "app/components/Ui",
|
|
10
|
-
fileContent:
|
|
11
|
-
'<template>\n <AccordionRoot v-slot="rootSlotProps" v-bind="forwarded">\n <slot v-bind="rootSlotProps" :items="items">\n <template v-for="(item, i) in items" :key="i">\n <UiAccordionItem v-slot="itemSlotProps" :disabled="item.disabled" :value="item.value">\n <slot v-bind="{ ...itemSlotProps, ...rootSlotProps, items, item }" name="header">\n <UiAccordionHeader>\n <slot v-bind="{ ...itemSlotProps, ...rootSlotProps, items, item }" name="trigger">\n <UiAccordionTrigger :title="item.title" :icon="item.icon" />\n </slot>\n </UiAccordionHeader>\n </slot>\n <slot name="content" v-bind="{ ...itemSlotProps, ...rootSlotProps, items, item }">\n <UiAccordionContent :content="item.content" />\n </slot>\n </UiAccordionItem>\n </template>\n </slot>\n </AccordionRoot>\n</template>\n\n<script setup lang="ts">\n import { AccordionRoot, useForwardPropsEmits } from "radix-vue";\n import type { AccordionRootEmits, AccordionRootProps } from "radix-vue";\n\n export interface AccordionItem {\n title?: string;\n content?: string;\n value: string;\n disabled?: boolean;\n icon?: string;\n [key: string]: any;\n }\n\n const props = withDefaults(\n defineProps<\n AccordionRootProps & {\n items?: AccordionItem[];\n }\n >(),\n { type: "single", collapsible: true, items: () => [] }\n );\n\n const emits = defineEmits<AccordionRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "items"), emits);\n</script>\n',
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
fileName: "Accordion/Content.vue",
|
|
15
|
-
dirPath: "app/components/Ui",
|
|
16
|
-
fileContent:
|
|
17
|
-
'<template>\n <AccordionContent v-bind="forwarded" :class="styles({ class: props.class })">\n <div class="pb-4 pt-0">\n <slot>{{ content }}</slot>\n </div>\n </AccordionContent>\n</template>\n\n<script lang="ts" setup>\n import { AccordionContent } from "radix-vue";\n import type { AccordionContentProps } from "radix-vue";\n\n const props = defineProps<\n AccordionContentProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The content of the accordion */\n content?: any;\n }\n >();\n\n const forwarded = reactiveOmit(props, "class", "content");\n\n const styles = tv({\n base: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",\n });\n</script>\n',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
fileName: "Accordion/Header.vue",
|
|
21
|
-
dirPath: "app/components/Ui",
|
|
22
|
-
fileContent:
|
|
23
|
-
'<template>\n <AccordionHeader v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </AccordionHeader>\n</template>\n\n<script lang="ts" setup>\n import { AccordionHeader } from "radix-vue";\n import type { AccordionHeaderProps } from "radix-vue";\n\n const props = defineProps<\n AccordionHeaderProps & {\n class?: any;\n }\n >();\n\n const forwarded = reactiveOmit(props, "class");\n\n const styles = tv({\n base: "flex",\n });\n</script>\n',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
fileName: "Accordion/Item.vue",
|
|
27
|
-
dirPath: "app/components/Ui",
|
|
28
|
-
fileContent:
|
|
29
|
-
'<template>\n <AccordionItem v-slot="slotProps" v-bind="forwarded" :class="styles({ class: props.class })">\n <slot v-bind="slotProps" />\n </AccordionItem>\n</template>\n\n<script setup lang="ts">\n import { AccordionItem } from "radix-vue";\n import type { AccordionItemProps } from "radix-vue";\n\n const props = defineProps<\n AccordionItemProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n\n const forwarded = reactiveOmit(props, "class");\n\n const styles = tv({\n base: "border-b",\n });\n</script>\n',
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
fileName: "Accordion/Trigger.vue",
|
|
33
|
-
dirPath: "app/components/Ui",
|
|
34
|
-
fileContent:
|
|
35
|
-
'<template>\n <AccordionTrigger v-bind="forwarded" :class="styles({ class: props.class })">\n <slot :props="props">\n {{ title }}\n </slot>\n <slot name="icon" :props="props">\n <Icon\n v-if="icon"\n mode="svg"\n :name="icon"\n class="h-4 w-4 shrink-0 transition-transform duration-200"\n />\n </slot>\n </AccordionTrigger>\n</template>\n\n<script lang="ts" setup>\n import { AccordionTrigger } from "radix-vue";\n import type { AccordionTriggerProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n AccordionTriggerProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The title of the accordion trigger */\n title?: string;\n /** The icon to show next to the title */\n icon?: string;\n }\n >(),\n {\n class: undefined,\n title: "",\n icon: "lucide:chevron-down",\n }\n );\n\n const forwarded = reactiveOmit(props, "class", "icon", "title");\n\n const styles = tv({\n base: "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background [&[data-state=open]>svg]:rotate-180",\n });\n</script>\n',
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
utils: [],
|
|
39
|
-
composables: [],
|
|
40
|
-
plugins: [],
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: "Alert",
|
|
44
|
-
value: "alert",
|
|
45
|
-
devDeps: ["@vueuse/core"],
|
|
46
|
-
files: [
|
|
47
|
-
{
|
|
48
|
-
fileName: "Alert/Alert.vue",
|
|
49
|
-
dirPath: "app/components/Ui",
|
|
50
|
-
fileContent:
|
|
51
|
-
'<template>\n <div v-if="shown" :class="styles().base({ variant, filled, class: props.class })">\n <slot :props="props" name="icon">\n <Icon\n v-if="icon"\n :name="icon"\n :class="styles().icon({ variant, filled, class: props.iconClass })"\n />\n </slot>\n <div :class="styles().content({ variant, filled })">\n <slot :props="props">\n <slot name="title">\n <UiAlertTitle v-if="title" :title="title" />\n </slot>\n <slot name="description">\n <UiAlertDescription v-if="description" :description="description" />\n </slot>\n </slot>\n </div>\n </div>\n</template>\n\n<script lang="ts" setup>\n const props = withDefaults(\n defineProps<{\n /** Custom class to add to the `Alert` parent */\n class?: any;\n /** Classes to add to the icon */\n iconClass?: any;\n /** Whether the alert should have a filled/colored background */\n filled?: boolean;\n /**\n * Whether or not the `Alert` is shown.\n * @default true\n */\n modelValue?: boolean;\n /** The variant of the `Alert` */\n variant?: VariantProps<typeof styles>["variant"];\n /** The title that is passed to the `AlertTitle` component */\n title?: string;\n /** The description that is passed to the `AlertDescription` component */\n description?: string;\n /** The icon that should be displayed*/\n icon?: string;\n }>(),\n {\n modelValue: true,\n variant: "default",\n }\n );\n\n const shown = defineModel<boolean>({ default: true });\n\n const styles = tv({\n slots: {\n base: "relative flex w-full gap-3 rounded-lg border p-4",\n icon: "size-4 shrink-0",\n content: "grow",\n },\n variants: {\n variant: {\n default: {\n base: "bg-background text-foreground",\n icon: "text-foreground",\n },\n destructive: {\n base: "border-destructive/50 text-destructive dark:border-destructive",\n icon: "text-destructive",\n },\n info: {\n base: "border-blue-500/50 text-blue-600",\n icon: "text-blue-600",\n },\n success: {\n base: "border-emerald-500/50 text-emerald-600",\n icon: "text-emerald-500",\n },\n warning: {\n base: "border-amber-500/50 text-amber-600",\n icon: "text-amber-600",\n },\n },\n filled: {\n true: {},\n },\n },\n defaultVariants: {\n variant: "default",\n filled: false,\n },\n compoundVariants: [\n {\n filled: true,\n variant: "default",\n class: { base: "bg-muted/50 text-foreground", icon: "text-foreground" },\n },\n {\n filled: true,\n variant: "destructive",\n class: {\n base: "bg-destructive text-destructive-foreground",\n icon: "text-destructive-foreground",\n },\n },\n {\n filled: true,\n variant: "info",\n class: { base: "bg-blue-500 text-blue-50", icon: "text-blue-50" },\n },\n {\n filled: true,\n variant: "success",\n class: { base: "bg-emerald-500 text-emerald-50", icon: "text-emerald-50" },\n },\n {\n filled: true,\n variant: "warning",\n class: { base: "bg-amber-500 text-amber-50", icon: "text-amber-50" },\n },\n ],\n });\n</script>\n',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
fileName: "Alert/Description.vue",
|
|
55
|
-
dirPath: "app/components/Ui",
|
|
56
|
-
fileContent:
|
|
57
|
-
'<template>\n <Primitive v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>{{ description }}</slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class to add to the parent */\n class?: any;\n /** The description text that should be displayed */\n description?: string;\n }\n >(),\n { as: "div", class: undefined, description: undefined }\n );\n\n const forwarded = reactiveOmit(props, "class", "description");\n\n const styles = tv({\n base: "text-sm [&_p]:leading-relaxed",\n });\n</script>\n',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
fileName: "Alert/Title.vue",
|
|
61
|
-
dirPath: "app/components/Ui",
|
|
62
|
-
fileContent:
|
|
63
|
-
'<template>\n <Primitive v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>{{ title }}</slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class to add to the parent */\n class?: any;\n /** The title text that should be displayed */\n title?: string;\n }\n >(),\n { as: "h5", class: undefined, title: undefined }\n );\n\n const forwarded = reactiveOmit(props, "class", "title");\n\n const styles = tv({\n base: "mb-1 font-medium leading-none tracking-tight",\n });\n</script>\n',
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
utils: [],
|
|
67
|
-
composables: [],
|
|
68
|
-
plugins: [],
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: "Alert Dialog",
|
|
72
|
-
value: "alert-dialog",
|
|
73
|
-
devDeps: ["@vueuse/core"],
|
|
74
|
-
utils: [
|
|
75
|
-
{
|
|
76
|
-
fileName: "shared.styles.ts",
|
|
77
|
-
dirPath: "utils",
|
|
78
|
-
fileContent:
|
|
79
|
-
'// Add here because button styles are used in several components\nexport const buttonStyles = tv({\n base: "group inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",\n variants: {\n variant: {\n default: "bg-primary text-primary-foreground hover:bg-primary/90",\n destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",\n outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",\n secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",\n ghost: "hover:bg-accent hover:text-accent-foreground",\n link: "text-primary underline-offset-4 hover:underline",\n expandIcon: "group relative bg-primary text-primary-foreground hover:bg-primary/90",\n ringHover:\n "bg-primary text-primary-foreground transition-all duration-300 hover:bg-primary/90 hover:ring-2 hover:ring-primary/90 hover:ring-offset-2",\n shine:\n "animate-shine bg-gradient-to-r from-primary via-primary/75 to-primary bg-[length:400%_100%] text-primary-foreground",\n gooeyRight:\n "relative z-0 overflow-hidden bg-primary from-primary-foreground/40 text-primary-foreground transition-all duration-500 before:absolute before:inset-0 before:-z-10 before:translate-x-[150%] before:translate-y-[150%] before:scale-[2.5] before:rounded-[100%] before:bg-gradient-to-r before:transition-transform before:duration-1000 hover:before:translate-x-[0%] hover:before:translate-y-[0%]",\n gooeyLeft:\n "relative z-0 overflow-hidden bg-primary from-primary-foreground/40 text-primary-foreground transition-all duration-500 after:absolute after:inset-0 after:-z-10 after:translate-x-[-150%] after:translate-y-[150%] after:scale-[2.5] after:rounded-[100%] after:bg-gradient-to-l after:transition-transform after:duration-1000 hover:after:translate-x-[0%] hover:after:translate-y-[0%]",\n linkHover1:\n "relative after:absolute after:bottom-2 after:h-[1px] after:w-2/3 after:origin-bottom-left after:scale-x-100 after:bg-primary after:transition-transform after:duration-300 after:ease-in-out hover:after:origin-bottom-right hover:after:scale-x-0",\n linkHover2:\n "relative after:absolute after:bottom-2 after:h-[1px] after:w-2/3 after:origin-bottom-right after:scale-x-0 after:bg-primary after:transition-transform after:duration-300 after:ease-in-out hover:after:origin-bottom-left hover:after:scale-x-100",\n },\n size: {\n xs: "h-8 px-2",\n sm: "h-9 px-3",\n default: "h-10 px-4 py-2",\n lg: "h-11 px-8",\n "icon-xs": "h-8 w-8",\n "icon-sm": "h-9 w-9",\n icon: "h-10 w-10",\n },\n disabled: {\n true: "pointer-events-none opacity-50",\n },\n hasIcon: {\n false: "gap-2",\n },\n },\n defaultVariants: {\n variant: "default",\n size: "default",\n },\n});\n',
|
|
80
|
-
},
|
|
81
|
-
],
|
|
82
|
-
files: [
|
|
83
|
-
{
|
|
84
|
-
fileName: "AlertDialog/Action.vue",
|
|
85
|
-
dirPath: "app/components/Ui",
|
|
86
|
-
fileContent:
|
|
87
|
-
'<template>\n <AlertDialogAction\n v-bind="forwarded"\n :class="buttonStyles({ variant, size, disabled, class: props.class })"\n >\n <slot>{{ text }} </slot>\n </AlertDialogAction>\n</template>\n\n<script lang="ts" setup>\n import { AlertDialogAction } from "radix-vue";\n import type { AlertDialogActionProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n AlertDialogActionProps & {\n /** Action to perform when the button is clicked */\n onClick?: () => void;\n /** Text to display in the button */\n text?: string;\n /** Custom class(es) to add to the button */\n class?: any;\n /** Whether the button is disabled */\n disabled?: boolean;\n /** The button\'s visual variant */\n variant?: VariantProps<typeof buttonStyles>["variant"];\n /** The button\'s visual size */\n size?: VariantProps<typeof buttonStyles>["size"];\n }\n >(),\n {\n text: "Continue",\n variant: "default",\n size: "default",\n class: undefined,\n onClick: undefined,\n }\n );\n\n const forwarded = reactiveOmit(props, "class", "text", "variant", "size");\n</script>\n',
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
fileName: "AlertDialog/AlertDialog.vue",
|
|
91
|
-
dirPath: "app/components/Ui",
|
|
92
|
-
fileContent:
|
|
93
|
-
'<template>\n <AlertDialogRoot v-bind="forwarded">\n <slot>\n <slot name="trigger">\n <UiAlertDialogTrigger v-if="triggerText" as-child>\n <UiButton variant="outline">{{ triggerText }}</UiButton>\n </UiAlertDialogTrigger>\n </slot>\n <slot name="content">\n <UiAlertDialogContent>\n <slot name="header">\n <UiAlertDialogHeader>\n <slot name="title">\n <UiAlertDialogTitle v-if="title" :title="title" />\n </slot>\n <slot name="description">\n <UiAlertDialogDescription v-if="description" :description="description" />\n </slot>\n </UiAlertDialogHeader>\n </slot>\n <slot name="footer">\n <UiAlertDialogFooter>\n <slot name="cancel">\n <UiAlertDialogCancel />\n </slot>\n <slot name="action">\n <UiAlertDialogAction />\n </slot>\n </UiAlertDialogFooter>\n </slot>\n </UiAlertDialogContent>\n </slot>\n </slot>\n </AlertDialogRoot>\n</template>\n\n<script lang="ts" setup>\n import { AlertDialogRoot, useForwardPropsEmits } from "radix-vue";\n import type { AlertDialogEmits, AlertDialogProps } from "radix-vue";\n\n const props = defineProps<\n AlertDialogProps & {\n /** Text to display in the trigger button */\n triggerText?: string;\n /** Text to be passed to the `AlertDialogTitle` */\n title?: string;\n /** Text to be passed to the `AlertDialogDescription` */\n description?: string;\n }\n >();\n\n const emits = defineEmits<AlertDialogEmits>();\n\n const forwarded = useForwardPropsEmits(\n reactiveOmit(props, "description", "title", "triggerText"),\n emits\n );\n</script>\n',
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
fileName: "AlertDialog/Cancel.vue",
|
|
97
|
-
dirPath: "app/components/Ui",
|
|
98
|
-
fileContent:
|
|
99
|
-
'<template>\n <AlertDialogCancel\n v-bind="forwarded"\n :class="buttonStyles({ variant, size, disabled, class: props.class })"\n >\n <slot>{{ text }}</slot>\n </AlertDialogCancel>\n</template>\n\n<script lang="ts" setup>\n import { AlertDialogCancel } from "radix-vue";\n import type { AlertDialogCancelProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n AlertDialogCancelProps & {\n /** Action to perform when the button is clicked */\n onClick?: () => void;\n /** Text to display in the button */\n text?: string;\n /** Custom class(es) to add to the button */\n class?: any;\n /** Whether the button is disabled */\n disabled?: boolean;\n /** The button\'s visual variant */\n variant?: VariantProps<typeof buttonStyles>["variant"];\n /** The button\'s visual size */\n size?: VariantProps<typeof buttonStyles>["size"];\n }\n >(),\n {\n text: "Cancel",\n variant: "outline",\n size: "default",\n class: undefined,\n onClick: undefined,\n }\n );\n\n const forwarded = reactiveOmit(props, "class", "text", "variant", "size");\n</script>\n',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
fileName: "AlertDialog/Content.vue",
|
|
103
|
-
dirPath: "app/components/Ui",
|
|
104
|
-
fileContent:
|
|
105
|
-
'<template>\n <UiAlertDialogPortal :to="to">\n <slot name="overlay">\n <UiAlertDialogOverlay />\n </slot>\n <AlertDialogContent\n :class="styles({ class: props.class })"\n v-bind="{ ...forwarded, ...$attrs }"\n >\n <slot />\n </AlertDialogContent>\n </UiAlertDialogPortal>\n</template>\n\n<script lang="ts" setup>\n import { AlertDialogContent, useForwardPropsEmits } from "radix-vue";\n import type { AlertDialogContentEmits, AlertDialogContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = defineProps<\n AlertDialogContentProps & {\n /** Custom class(es) to add to the `AlertDialogContent` */\n class?: any;\n /** The element to render the portal into */\n to?: string | HTMLElement;\n }\n >();\n const emit = defineEmits<AlertDialogContentEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "to"), emit);\n\n const styles = tv({\n base: "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",\n });\n</script>\n',
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
fileName: "AlertDialog/Description.vue",
|
|
109
|
-
dirPath: "app/components/Ui",
|
|
110
|
-
fileContent:
|
|
111
|
-
'<template>\n <AlertDialogDescription v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>{{ description }}</slot>\n </AlertDialogDescription>\n</template>\n\n<script lang="ts" setup>\n import { AlertDialogDescription } from "radix-vue";\n import type { AlertDialogDescriptionProps } from "radix-vue";\n\n const props = defineProps<\n AlertDialogDescriptionProps & {\n /** Text to display in the description */\n description?: string;\n /** Custom class(es) to add to the description */\n class?: any;\n }\n >();\n\n const forwarded = reactiveOmit(props, "class", "description");\n\n const styles = tv({\n base: "text-sm text-muted-foreground",\n });\n</script>\n',
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
fileName: "AlertDialog/Footer.vue",
|
|
115
|
-
dirPath: "app/components/Ui",
|
|
116
|
-
fileContent:
|
|
117
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the element */\n class?: any;\n }\n >(),\n {\n as: "div",\n class: undefined,\n }\n );\n\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",\n });\n</script>\n',
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
fileName: "AlertDialog/Header.vue",
|
|
121
|
-
dirPath: "app/components/Ui",
|
|
122
|
-
fileContent:
|
|
123
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the element */\n class?: any;\n }\n >(),\n {\n as: "div",\n class: undefined,\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex flex-col gap-2 text-center sm:text-left",\n });\n</script>\n',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
fileName: "AlertDialog/Overlay.vue",
|
|
127
|
-
dirPath: "app/components/Ui",
|
|
128
|
-
fileContent:
|
|
129
|
-
'<template>\n <AlertDialogOverlay v-bind="forwarded" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { AlertDialogOverlay } from "radix-vue";\n import type { AlertDialogOverlayProps } from "radix-vue";\n\n const props = defineProps<\n AlertDialogOverlayProps & {\n /** Custom class(es) to add to the overlay */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=closed]:animate-fadeOut data-[state=open]:animate-fadeIn",\n });\n</script>\n',
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
fileName: "AlertDialog/Portal.vue",
|
|
133
|
-
dirPath: "app/components/Ui",
|
|
134
|
-
fileContent:
|
|
135
|
-
'<template>\n <AlertDialogPortal v-bind="props">\n <slot />\n </AlertDialogPortal>\n</template>\n\n<script lang="ts" setup>\n import { AlertDialogPortal } from "radix-vue";\n import type { AlertDialogPortalProps } from "radix-vue";\n\n const props = defineProps<AlertDialogPortalProps>();\n</script>\n',
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
fileName: "AlertDialog/Title.vue",
|
|
139
|
-
dirPath: "app/components/Ui",
|
|
140
|
-
fileContent:
|
|
141
|
-
'<template>\n <AlertDialogTitle v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>{{ title }}</slot>\n </AlertDialogTitle>\n</template>\n\n<script lang="ts" setup>\n import { AlertDialogTitle } from "radix-vue";\n import type { AlertDialogTitleProps } from "radix-vue";\n\n const props = defineProps<\n AlertDialogTitleProps & {\n /** Text to display in the title */\n title?: string;\n /** Custom class(es) to add to the title */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "title");\n const styles = tv({\n base: "text-lg font-semibold",\n });\n</script>\n',
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
fileName: "AlertDialog/Trigger.vue",
|
|
145
|
-
dirPath: "app/components/Ui",
|
|
146
|
-
fileContent:
|
|
147
|
-
'<template>\n <AlertDialogTrigger v-bind="props">\n <slot />\n </AlertDialogTrigger>\n</template>\n\n<script lang="ts" setup>\n import { AlertDialogTrigger } from "radix-vue";\n import type { AlertDialogTriggerProps } from "radix-vue";\n\n const props = defineProps<AlertDialogTriggerProps>();\n</script>\n',
|
|
148
|
-
},
|
|
149
|
-
],
|
|
150
|
-
composables: [],
|
|
151
|
-
plugins: [],
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
name: "Aspect Ratio",
|
|
155
|
-
value: "aspect-ratio",
|
|
156
|
-
files: [
|
|
157
|
-
{
|
|
158
|
-
fileName: "AspectRatio.vue",
|
|
159
|
-
dirPath: "app/components/Ui",
|
|
160
|
-
fileContent:
|
|
161
|
-
'<template>\n <AspectRatio v-bind="props">\n <slot />\n </AspectRatio>\n</template>\n\n<script lang="ts" setup>\n import { AspectRatio } from "radix-vue";\n import type { AspectRatioProps } from "radix-vue";\n\n const props = defineProps<AspectRatioProps>();\n</script>\n',
|
|
162
|
-
},
|
|
163
|
-
],
|
|
164
|
-
utils: [],
|
|
165
|
-
composables: [],
|
|
166
|
-
plugins: [],
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
name: "Autocomplete",
|
|
170
|
-
value: "autocomplete",
|
|
171
|
-
devDeps: ["@vueuse/core"],
|
|
172
|
-
files: [
|
|
173
|
-
{
|
|
174
|
-
fileName: "Autocomplete/Anchor.vue",
|
|
175
|
-
dirPath: "app/components/Ui",
|
|
176
|
-
fileContent:
|
|
177
|
-
'<template>\n <ComboboxAnchor v-bind="props" :class="styles({ class: props.class })">\n <slot />\n </ComboboxAnchor>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxAnchor } from "radix-vue";\n import type { ComboboxAnchorProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxAnchorProps & {\n class?: any;\n }\n >();\n\n const styles = tv({\n base: "flex h-10 w-full items-center rounded-md border border-input bg-background px-3 py-2 ring-offset-background focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",\n });\n</script>\n',
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
fileName: "Autocomplete/Arrow.vue",
|
|
181
|
-
dirPath: "app/components/Ui",
|
|
182
|
-
fileContent:
|
|
183
|
-
'<template>\n <ComboboxArrow v-bind="props" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { ComboboxArrow } from "radix-vue";\n import type { ComboboxArrowProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxArrowProps & {\n class?: any;\n }\n >();\n\n const styles = tv({\n base: "rotate-45 border bg-muted",\n });\n</script>\n',
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
fileName: "Autocomplete/Autocomplete.vue",
|
|
187
|
-
dirPath: "app/components/Ui",
|
|
188
|
-
fileContent:
|
|
189
|
-
'<template>\n <ComboboxRoot v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </ComboboxRoot>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxRoot, useForwardPropsEmits } from "radix-vue";\n import type { ComboboxRootEmits, ComboboxRootProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxRootProps & {\n class?: any;\n }\n >();\n\n const emits = defineEmits<ComboboxRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n const styles = tv({\n base: "relative",\n });\n</script>\n',
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
fileName: "Autocomplete/Cancel.vue",
|
|
193
|
-
dirPath: "app/components/Ui",
|
|
194
|
-
fileContent:
|
|
195
|
-
'<template>\n <ComboboxCancel v-bind="props">\n <slot />\n </ComboboxCancel>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxCancel } from "radix-vue";\n import type { ComboboxCancelProps } from "radix-vue";\n\n const props = defineProps<ComboboxCancelProps>();\n</script>\n',
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
fileName: "Autocomplete/Content.vue",
|
|
199
|
-
dirPath: "app/components/Ui",
|
|
200
|
-
fileContent:
|
|
201
|
-
'<template>\n <!-- <UiAutocompletePortal> -->\n <ComboboxContent v-bind="forwarded" :class="styles({ class: props.class })">\n <UiAutocompleteViewport>\n <slot />\n </UiAutocompleteViewport>\n </ComboboxContent>\n <!-- </UiAutocompletePortal> -->\n</template>\n\n<script lang="ts" setup>\n import { ComboboxContent, useForwardPropsEmits } from "radix-vue";\n import type { ComboboxContentEmits, ComboboxContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n const props = withDefaults(\n defineProps<\n ComboboxContentProps & {\n class?: any;\n }\n >(),\n {\n position: "popper",\n bodyLock: true,\n side: "bottom",\n sideOffset: 8,\n class: undefined,\n }\n );\n\n const emits = defineEmits<ComboboxContentEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n\n const styles = tv({\n base: "z-50 max-h-[300px] w-[var(--radix-popper-anchor-width)] min-w-[8rem] overflow-hidden overflow-y-auto rounded-md border bg-popover p-1 text-accent-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",\n });\n</script>\n',
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
fileName: "Autocomplete/Empty.vue",
|
|
205
|
-
dirPath: "app/components/Ui",
|
|
206
|
-
fileContent:
|
|
207
|
-
'<template>\n <ComboboxEmpty v-bind="props">\n <slot />\n </ComboboxEmpty>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxEmpty } from "radix-vue";\n import type { ComboboxEmptyProps } from "radix-vue";\n\n const props = defineProps<ComboboxEmptyProps>();\n</script>\n',
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
fileName: "Autocomplete/Group.vue",
|
|
211
|
-
dirPath: "app/components/Ui",
|
|
212
|
-
fileContent:
|
|
213
|
-
'<template>\n <ComboboxGroup v-bind="props">\n <slot />\n </ComboboxGroup>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxGroup } from "radix-vue";\n import type { ComboboxGroupProps } from "radix-vue";\n\n const props = defineProps<ComboboxGroupProps>();\n</script>\n',
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
fileName: "Autocomplete/Input.vue",
|
|
217
|
-
dirPath: "app/components/Ui",
|
|
218
|
-
fileContent:
|
|
219
|
-
'<template>\n <ComboboxInput v-bind="props" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { ComboboxInput } from "radix-vue";\n import type { ComboboxInputProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxInputProps & {\n placeholder?: string;\n class?: any;\n }\n >();\n\n const styles = tv({\n base: "size-full grow rounded-md bg-background placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",\n });\n</script>\n',
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
fileName: "Autocomplete/Item.vue",
|
|
223
|
-
dirPath: "app/components/Ui",
|
|
224
|
-
fileContent:
|
|
225
|
-
'<template>\n <ComboboxItem v-bind="forwarded" :class="styles({ class: props.class })">\n <slot name="icon">\n <span class="absolute inset-y-0 left-2 flex items-center justify-center">\n <UiAutocompleteItemIndicator class="animate-in fade-in-0 zoom-in-0" :icon="icon" />\n </span>\n </slot>\n <slot />\n </ComboboxItem>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxItem, useForwardPropsEmits } from "radix-vue";\n import type { ComboboxItemEmits, ComboboxItemProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxItemProps & {\n class?: any;\n icon?: string;\n }\n >();\n\n const emits = defineEmits<{\n select: ComboboxItemEmits["select"];\n }>();\n const forwarded = useForwardPropsEmits(props, emits);\n\n const styles = tv({\n base: "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 pl-9 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",\n });\n</script>\n',
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
fileName: "Autocomplete/ItemIndicator.vue",
|
|
229
|
-
dirPath: "app/components/Ui",
|
|
230
|
-
fileContent:
|
|
231
|
-
'<template>\n <ComboboxItemIndicator v-bind="props">\n <slot><Icon :name="icon || \'ph:check\'" class="h-4 w-4" /></slot>\n </ComboboxItemIndicator>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxItemIndicator } from "radix-vue";\n import type { ComboboxItemIndicatorProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxItemIndicatorProps & {\n icon?: string;\n }\n >();\n</script>\n',
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
fileName: "Autocomplete/Label.vue",
|
|
235
|
-
dirPath: "app/components/Ui",
|
|
236
|
-
fileContent:
|
|
237
|
-
'<template>\n <ComboboxLabel :class="styles({ class: props.class })" v-bind="props">\n <slot />\n </ComboboxLabel>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxLabel } from "radix-vue";\n import type { ComboboxLabelProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxLabelProps & {\n class?: any;\n }\n >();\n\n const styles = tv({\n base: "px-2 py-1.5 pl-9 text-sm font-medium text-muted-foreground",\n });\n</script>\n',
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
fileName: "Autocomplete/Portal.vue",
|
|
241
|
-
dirPath: "app/components/Ui",
|
|
242
|
-
fileContent:
|
|
243
|
-
'<template>\n <ComboboxPortal position="popper" v-bind="props">\n <slot />\n </ComboboxPortal>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxPortal } from "radix-vue";\n import type { ComboboxPortalProps } from "radix-vue";\n\n const props = defineProps<ComboboxPortalProps>();\n</script>\n',
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
fileName: "Autocomplete/Separator.vue",
|
|
247
|
-
dirPath: "app/components/Ui",
|
|
248
|
-
fileContent:
|
|
249
|
-
'<template>\n <ComboboxSeparator v-bind="props">\n <slot />\n </ComboboxSeparator>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxSeparator } from "radix-vue";\n import type { ComboboxSeparatorProps } from "radix-vue";\n\n const props = defineProps<ComboboxSeparatorProps>();\n</script>\n',
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
fileName: "Autocomplete/Trigger.vue",
|
|
253
|
-
dirPath: "app/components/Ui",
|
|
254
|
-
fileContent:
|
|
255
|
-
'<template>\n <ComboboxTrigger v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </ComboboxTrigger>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxTrigger } from "radix-vue";\n import type { ComboboxTriggerProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxTriggerProps & {\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "inline-flex shrink-0 cursor-pointer items-center justify-center",\n });\n</script>\n',
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
fileName: "Autocomplete/Viewport.vue",
|
|
259
|
-
dirPath: "app/components/Ui",
|
|
260
|
-
fileContent:
|
|
261
|
-
'<template>\n <ComboboxViewport v-bind="props">\n <slot />\n </ComboboxViewport>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxViewport } from "radix-vue";\n import type { ComboboxViewportProps } from "radix-vue";\n\n const props = defineProps<ComboboxViewportProps>();\n</script>\n',
|
|
262
|
-
},
|
|
263
|
-
],
|
|
264
|
-
utils: [],
|
|
265
|
-
composables: [],
|
|
266
|
-
plugins: [],
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
name: "Avatar",
|
|
270
|
-
value: "avatar",
|
|
271
|
-
files: [
|
|
272
|
-
{
|
|
273
|
-
fileName: "Avatar/Avatar.vue",
|
|
274
|
-
dirPath: "app/components/Ui",
|
|
275
|
-
fileContent:
|
|
276
|
-
'<template>\n <AvatarRoot :as="as" :as-child="asChild" :class="styles({ class: props.class })">\n <slot>\n <slot name="image">\n <UiAvatarImage\n v-if="src"\n :src="src"\n :alt="alt"\n :class="imageClass"\n @loading-status-change="emits(\'loadingStatusChange\', $event)"\n />\n </slot>\n <slot name="fallback">\n <UiAvatarFallback :delay-ms="delayMs" :class="fallbackClass" :fallback="fallback" />\n </slot>\n </slot>\n </AvatarRoot>\n</template>\n\n<script lang="ts" setup>\n import { AvatarRoot } from "radix-vue";\n import type { AvatarImageEmits, AvatarImageProps, AvatarRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n AvatarRootProps &\n Partial<AvatarImageProps> & {\n class?: any;\n imageClass?: any;\n fallbackClass?: any;\n alt?: string;\n fallback?: string;\n delayMs?: number;\n }\n >(),\n {\n class: undefined,\n imageClass: undefined,\n fallbackClass: undefined,\n alt: undefined,\n fallback: undefined,\n delayMs: undefined,\n }\n );\n\n const emits = defineEmits<AvatarImageEmits>();\n const styles = tv({\n base: "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",\n });\n</script>\n',
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
fileName: "Avatar/Fallback.vue",
|
|
280
|
-
dirPath: "app/components/Ui",
|
|
281
|
-
fileContent:
|
|
282
|
-
'<template>\n <AvatarFallback :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>\n {{ fallback }}\n </slot>\n </AvatarFallback>\n</template>\n\n<script lang="ts" setup>\n import { AvatarFallback } from "radix-vue";\n import type { AvatarFallbackProps } from "radix-vue";\n\n const props = defineProps<\n AvatarFallbackProps & {\n /** The text to display inside th eavatar */\n fallback?: string;\n /** Custom class(es) to add to the element */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "fallback");\n const styles = tv({\n base: "flex h-full w-full items-center justify-center rounded-[inherit] bg-muted font-medium",\n });\n</script>\n',
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
fileName: "Avatar/Image.vue",
|
|
286
|
-
dirPath: "app/components/Ui",
|
|
287
|
-
fileContent:
|
|
288
|
-
'<template>\n <AvatarImage v-bind="forwarded" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { AvatarImage, useForwardPropsEmits } from "radix-vue";\n import type { AvatarImageEmits, AvatarImageProps } from "radix-vue";\n\n const props = defineProps<\n AvatarImageProps & {\n /** The alt text for the image */\n alt?: string;\n /** Custom class(es) to add to the element */\n class?: any;\n }\n >();\n const emits = defineEmits<AvatarImageEmits>();\n\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "aspect-square h-full w-full object-cover",\n });\n</script>\n',
|
|
289
|
-
},
|
|
290
|
-
],
|
|
291
|
-
utils: [],
|
|
292
|
-
composables: [],
|
|
293
|
-
plugins: [],
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
name: "Badge",
|
|
297
|
-
value: "badge",
|
|
298
|
-
files: [
|
|
299
|
-
{
|
|
300
|
-
fileName: "Badge.vue",
|
|
301
|
-
dirPath: "app/components/Ui",
|
|
302
|
-
fileContent:
|
|
303
|
-
'<template>\n <component\n :is="elementType"\n :class="badgeVariants({ disabled, size, variant, class: props.class })"\n v-bind="forwarded"\n @click="onClick"\n >\n <slot />\n </component>\n</template>\n\n<script lang="ts">\n import { reactiveOmit } from "@vueuse/core";\n import { useForwardProps } from "radix-vue";\n import type { NuxtLinkProps } from "#app/components";\n</script>\n<script lang="ts" setup>\n const badgeVariants = tv({\n base: "inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",\n variants: {\n variant: {\n default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",\n secondary:\n "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",\n destructive:\n "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",\n outline: "text-foreground",\n },\n disabled: {\n true: "cursor-not-allowed opacity-50",\n },\n size: {\n sm: "px-2.5 py-0.5 text-xs font-medium",\n md: "px-2.5 py-1 text-sm font-semibold",\n lg: "px-3 py-1.5 text-sm font-semibold",\n },\n },\n defaultVariants: {\n variant: "default",\n disabled: false,\n size: "sm",\n },\n });\n\n type BadgeProps = VariantProps<typeof badgeVariants>;\n\n const props = defineProps<\n NuxtLinkProps & {\n /** Any additional class that should be added to the badge */\n class?: any;\n /** The variant of the badge */\n variant?: BadgeProps["variant"];\n /** The size of the badge */\n size?: BadgeProps["size"];\n /** The action to perform when the badge is clicked */\n onClick?: () => void;\n /** Should the badge be disabled or not */\n disabled?: boolean;\n /** The element to render the badge as */\n tag?: string;\n }\n >();\n\n const forwarded = useForwardProps(reactiveOmit(props, "class", "variant", "onClick", "disabled"));\n\n const elementType = computed(() => {\n if (props.tag) return props.tag;\n if (props.href || props.to) return resolveComponent("NuxtLink");\n if (props.onClick) return "button";\n return props.tag || "div";\n });\n</script>\n',
|
|
304
|
-
},
|
|
305
|
-
],
|
|
306
|
-
utils: [],
|
|
307
|
-
composables: [],
|
|
308
|
-
plugins: [],
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
name: "Breadcrumbs",
|
|
312
|
-
value: "breadcrumbs",
|
|
313
|
-
files: [
|
|
314
|
-
{
|
|
315
|
-
fileName: "Breadcrumbs.vue",
|
|
316
|
-
dirPath: "app/components/Ui",
|
|
317
|
-
fileContent:
|
|
318
|
-
'<template>\n <div :class="styles({ class: props.class })">\n <template v-for="(item, i) in items" :key="i">\n <slot :name="item.slot || \'default\'">\n <div class="flex items-center gap-3">\n <div class="group flex items-center gap-2">\n <slot name="crumbIcon" :item="item" :index="i">\n <Icon\n v-if="item.icon"\n :name="item.icon"\n :class="[\n isNotLastItem(i)\n ? \'text-muted-foreground group-hover:text-foreground\'\n : \'text-primary\',\n ]"\n />\n </slot>\n <slot :item="item" :is-not-last-item="isNotLastItem" :index="i" name="link">\n <NuxtLink\n v-if="item.label"\n :to="!item?.disabled ? item.link : \'\'"\n :class="[\n item.link && !item.disabled && \'underline-offset-2 group-hover:underline\',\n isNotLastItem(i)\n ? \'text-muted-foreground group-hover:text-foreground\'\n : \'font-semibold text-primary\',\n ]"\n class="text-sm text-foreground transition-colors"\n @click="item?.click?.()"\n >{{ item.label }}</NuxtLink\n >\n </slot>\n </div>\n </div>\n </slot>\n <slot name="separator" :item="item" :index="i">\n <Icon v-if="isNotLastItem(i)" :name="separator" class="h-3 w-3 text-muted-foreground" />\n </slot>\n </template>\n </div>\n</template>\n\n<script setup lang="ts">\n export interface Crumbs {\n label?: string;\n icon?: string;\n link?: string;\n disabled?: boolean;\n slot?: string;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n click?: Function;\n }\n const props = withDefaults(\n defineProps<{\n /**\n * The items to display in the breadcrumbs.\n */\n items?: Crumbs[];\n /**\n * The separator to use between each breadcrumb.\n */\n separator?: string;\n class?: any;\n }>(),\n {\n separator: "heroicons:chevron-right",\n items: () => [],\n class: undefined,\n }\n );\n\n const isNotLastItem = (index: number) => {\n return index !== props?.items?.length - 1;\n };\n\n const styles = tv({\n base: "flex w-full items-center gap-4",\n });\n</script>\n',
|
|
319
|
-
},
|
|
320
|
-
],
|
|
321
|
-
utils: [],
|
|
322
|
-
composables: [],
|
|
323
|
-
plugins: [],
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
name: "Button",
|
|
327
|
-
value: "button",
|
|
328
|
-
utils: [
|
|
329
|
-
{
|
|
330
|
-
fileName: "shared.styles.ts",
|
|
331
|
-
dirPath: "utils",
|
|
332
|
-
fileContent:
|
|
333
|
-
'// Add here because button styles are used in several components\nexport const buttonStyles = tv({\n base: "group inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",\n variants: {\n variant: {\n default: "bg-primary text-primary-foreground hover:bg-primary/90",\n destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",\n outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",\n secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",\n ghost: "hover:bg-accent hover:text-accent-foreground",\n link: "text-primary underline-offset-4 hover:underline",\n expandIcon: "group relative bg-primary text-primary-foreground hover:bg-primary/90",\n ringHover:\n "bg-primary text-primary-foreground transition-all duration-300 hover:bg-primary/90 hover:ring-2 hover:ring-primary/90 hover:ring-offset-2",\n shine:\n "animate-shine bg-gradient-to-r from-primary via-primary/75 to-primary bg-[length:400%_100%] text-primary-foreground",\n gooeyRight:\n "relative z-0 overflow-hidden bg-primary from-primary-foreground/40 text-primary-foreground transition-all duration-500 before:absolute before:inset-0 before:-z-10 before:translate-x-[150%] before:translate-y-[150%] before:scale-[2.5] before:rounded-[100%] before:bg-gradient-to-r before:transition-transform before:duration-1000 hover:before:translate-x-[0%] hover:before:translate-y-[0%]",\n gooeyLeft:\n "relative z-0 overflow-hidden bg-primary from-primary-foreground/40 text-primary-foreground transition-all duration-500 after:absolute after:inset-0 after:-z-10 after:translate-x-[-150%] after:translate-y-[150%] after:scale-[2.5] after:rounded-[100%] after:bg-gradient-to-l after:transition-transform after:duration-1000 hover:after:translate-x-[0%] hover:after:translate-y-[0%]",\n linkHover1:\n "relative after:absolute after:bottom-2 after:h-[1px] after:w-2/3 after:origin-bottom-left after:scale-x-100 after:bg-primary after:transition-transform after:duration-300 after:ease-in-out hover:after:origin-bottom-right hover:after:scale-x-0",\n linkHover2:\n "relative after:absolute after:bottom-2 after:h-[1px] after:w-2/3 after:origin-bottom-right after:scale-x-0 after:bg-primary after:transition-transform after:duration-300 after:ease-in-out hover:after:origin-bottom-left hover:after:scale-x-100",\n },\n size: {\n xs: "h-8 px-2",\n sm: "h-9 px-3",\n default: "h-10 px-4 py-2",\n lg: "h-11 px-8",\n "icon-xs": "h-8 w-8",\n "icon-sm": "h-9 w-9",\n icon: "h-10 w-10",\n },\n disabled: {\n true: "pointer-events-none opacity-50",\n },\n hasIcon: {\n false: "gap-2",\n },\n },\n defaultVariants: {\n variant: "default",\n size: "default",\n },\n});\n',
|
|
334
|
-
},
|
|
335
|
-
],
|
|
336
|
-
files: [
|
|
337
|
-
{
|
|
338
|
-
fileName: "Button.vue",
|
|
339
|
-
dirPath: "app/components/Ui",
|
|
340
|
-
fileContent:
|
|
341
|
-
'<template>\n <component\n :is="elementType"\n :class="\n buttonStyles({\n hasIcon: !!icon,\n disabled: disabled || loading,\n variant: variant,\n size: size,\n class: props.class,\n })\n "\n :disabled="disabled || loading"\n v-bind="forwarded"\n >\n <slot name="iconLeft">\n <div\n v-if="icon && iconPlacement == \'left\'"\n class="group-hover:translate-x-100 flex w-0 shrink-0 translate-x-[0%] items-center justify-center pr-0 opacity-0 transition-all duration-200 group-hover:w-6 group-hover:pr-2 group-hover:opacity-100"\n >\n <Icon :name="icon" class="size-5" />\n </div>\n </slot>\n <slot name="loading">\n <Icon v-if="loading" class="size-4 shrink-0" :name="loadingIcon" />\n </slot>\n <slot>\n <span v-if="text">{{ text }}</span>\n </slot>\n <slot name="iconRight">\n <div\n v-if="icon && iconPlacement == \'right\'"\n class="flex w-0 shrink-0 translate-x-[100%] items-center justify-center pl-0 opacity-0 transition-all duration-200 group-hover:w-6 group-hover:translate-x-0 group-hover:pl-2 group-hover:opacity-100"\n >\n <Icon :name="icon" class="size-5" />\n </div>\n </slot>\n </component>\n</template>\n\n<script setup lang="ts">\n import { reactiveOmit } from "@vueuse/core";\n import { useForwardProps } from "radix-vue";\n import type { NuxtLinkProps } from "#app/components";\n\n type ButtonProps = VariantProps<typeof buttonStyles>;\n const props = withDefaults(\n defineProps<\n NuxtLinkProps & {\n /** The type for the button */\n type?: "button" | "submit" | "reset";\n /** Whether the button is disabled */\n disabled?: boolean;\n /** Whether the button is loading */\n loading?: boolean;\n /** The action to perform when the button is clicked */\n onClick?: any;\n /** The element to render the button as */\n as?: string;\n /** Custom class(es) to add to parent element */\n class?: any;\n /** The variant of the button */\n variant?: ButtonProps["variant"];\n /** The size of the button */\n size?: ButtonProps["size"];\n /** The text to display in the button */\n text?: string;\n /** Should the icon be displayed on the `left` or the `right`? */\n iconPlacement?: "left" | "right";\n /** The icon to display in the button */\n icon?: string;\n /** The icon to display when the button is loading */\n loadingIcon?: string;\n }\n >(),\n {\n type: "button",\n loadingIcon: "line-md:loading-loop",\n iconPlacement: "left",\n loading: false,\n }\n );\n\n const elementType = computed(() => {\n if (props.as) return props.as;\n if (props.href || props.to || props.target) return resolveComponent("NuxtLink");\n return "button";\n });\n\n const forwarded = useForwardProps(\n reactiveOmit(\n props,\n "class",\n "text",\n "icon",\n "iconPlacement",\n "size",\n "variant",\n "as",\n "loading",\n "disabled",\n "loadingIcon"\n )\n );\n</script>\n',
|
|
342
|
-
},
|
|
343
|
-
],
|
|
344
|
-
composables: [],
|
|
345
|
-
plugins: [],
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
name: "Calendar",
|
|
349
|
-
value: "calendar",
|
|
350
|
-
devDeps: ["@samk-dev/nuxt-vcalendar"],
|
|
351
|
-
nuxtModules: ["@samk-dev/nuxt-vcalendar"],
|
|
352
|
-
instructions: ["You can customize the calendar by adding options to your nuxt.config.js file"],
|
|
353
|
-
files: [
|
|
354
|
-
{
|
|
355
|
-
fileName: "Calendar.vue",
|
|
356
|
-
dirPath: "app/components/Ui",
|
|
357
|
-
fileContent:
|
|
358
|
-
'<template>\n <ClientOnly>\n <VCalendar\n :trim-weeks="props.trimWeeks || true"\n :is-dark="$colorMode.value == \'dark\'"\n v-bind="$attrs"\n >\n <template v-for="(_, slot) in $slots" #[slot]="scope">\n <slot :name="slot" v-bind="scope" />\n </template>\n </VCalendar>\n </ClientOnly>\n</template>\n\n<script lang="ts" setup>\n import type { Calendar } from "v-calendar";\n\n defineOptions({ inheritAttrs: false });\n\n interface Props extends /* @vue-ignore */ Partial<InstanceType<typeof Calendar>["$props"]> {}\n\n const props = defineProps<Props & { trimWeeks?: boolean }>();\n</script>\n\n<style>\n :root {\n --vc-font-family: var(--font-sans);\n --vc-rounded-full: var(--radius);\n --vc-font-bold: 500;\n --vc-font-semibold: 600;\n --vc-text-lg: 16px;\n }\n\n .vc-light,\n .vc-dark {\n --vc-bg: theme("colors.background");\n --vc-border: theme("colors.border");\n --vc-focus-ring: 0 0 0 3px hsl(var(--primary) / 30%);\n --vc-weekday-color: theme("colors.muted.foreground");\n --vc-popover-content-color: theme("colors.popover.foreground");\n --vc-hover-bg: theme("colors.accent.DEFAULT");\n --vc-popover-content-bg: theme("colors.popover.DEFAULT");\n --vc-popover-content-border: theme("colors.border");\n --vc-header-arrow-hover-bg: theme("colors.accent.DEFAULT");\n --vc-weeknumber-color: theme("colors.muted.foreground");\n --vc-nav-hover-bg: theme("colors.accent.DEFAULT");\n\n --vc-nav-item-active-color: theme("colors.primary.foreground");\n --vc-nav-item-active-bg: theme("colors.primary.DEFAULT");\n\n &.vc-attr,\n & .vc-attr {\n --vc-content-color: theme("colors.primary.DEFAULT");\n --vc-highlight-outline-bg: theme("colors.primary.DEFAULT");\n --vc-highlight-outline-border: theme("colors.primary.DEFAULT");\n --vc-highlight-outline-content-color: theme("colors.primary.foreground");\n --vc-highlight-light-bg: var(--vc-accent-200); /* Highlighted color between two dates */\n --vc-highlight-light-content-color: theme("colors.secondary.foreground");\n --vc-highlight-solid-bg: theme("colors.primary.DEFAULT");\n --vc-highlight-solid-content-color: theme("colors.primary.foreground");\n }\n }\n\n .vc-blue {\n --vc-accent-200: theme("colors.primary.DEFAULT / 20%");\n --vc-accent-400: theme("colors.primary.DEFAULT");\n --vc-accent-500: theme("colors.primary.DEFAULT");\n --vc-accent-600: theme("colors.primary.DEFAULT / 70%");\n }\n\n .dark {\n .vc-blue {\n --vc-accent-200: theme("colors.primary.DEFAULT / 20%");\n --vc-accent-400: theme("colors.primary.DEFAULT");\n --vc-accent-500: theme("colors.primary.DEFAULT / 70%");\n }\n }\n .vc-header .vc-title {\n @apply font-medium;\n }\n .vc-weekdays {\n @apply my-2 font-normal;\n }\n .vc-day-content,\n .vc-day,\n .vc-highlight {\n @apply h-9 w-9 rounded-md;\n }\n .vc-focus {\n @apply focus-within:shadow-none;\n }\n .vc-day {\n @apply mb-1.5;\n }\n\n .vc-base-icon {\n @apply h-4 w-4 stroke-1;\n }\n .vc-header .vc-arrow,\n .vc-nav-arrow {\n @apply h-7 w-7 rounded-md;\n border: 1px solid hsl(var(--border));\n }\n .vc-header .vc-prev,\n .vc-header .vc-next {\n @apply border;\n }\n .weekday-position-1 .vc-highlights {\n @apply rounded-l-md;\n }\n .weekday-position-7 .vc-highlights {\n @apply rounded-r-md;\n }\n .vc-highlight-bg-light {\n @apply bg-accent;\n }\n .vc-nav-item {\n @apply font-medium;\n }\n .vc-header .vc-title-wrapper {\n @apply decoration-accent-foreground/60 underline-offset-2 hover:underline;\n }\n .vc-highlights + .vc-day-content {\n @apply hover:bg-accent/5;\n }\n</style>\n',
|
|
359
|
-
},
|
|
360
|
-
],
|
|
361
|
-
utils: [],
|
|
362
|
-
composables: [],
|
|
363
|
-
plugins: [],
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
name: "Card",
|
|
367
|
-
value: "card",
|
|
368
|
-
files: [
|
|
369
|
-
{
|
|
370
|
-
fileName: "Card/Card.vue",
|
|
371
|
-
dirPath: "app/components/Ui",
|
|
372
|
-
fileContent:
|
|
373
|
-
'<template>\n <Primitive :as="as" :as-child="asChild" :class="styles({ class: props.class })">\n <slot>\n <slot name="header">\n <UiCardHeader>\n <slot name="title">\n <UiCardTitle v-if="title || $slots.title" :title="title" />\n </slot>\n <slot name="description">\n <UiCardDescription\n v-if="description || $slots.description"\n :description="description"\n />\n </slot>\n </UiCardHeader>\n </slot>\n <slot v-if="content || $slots.content" name="content">\n <UiCardContent>\n <div v-html="content" />\n </UiCardContent>\n </slot>\n <slot name="footer" />\n </slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Title that should be displayed. Passed to the `CardTitle` component */\n title?: string;\n /** Description that should be displayed. Passed to the `CardDescription` component */\n description?: string;\n /** Content that should be displayed. Passed to the `CardContent` component */\n content?: string;\n /** Custom class(es) to add to the element */\n class?: any;\n }\n >(),\n {\n as: "div",\n title: undefined,\n description: undefined,\n content: undefined,\n class: undefined,\n }\n );\n\n const styles = tv({\n base: "rounded-lg border bg-card text-card-foreground shadow-sm",\n });\n</script>\n',
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
fileName: "Card/Content.vue",
|
|
377
|
-
dirPath: "app/components/Ui",
|
|
378
|
-
fileContent:
|
|
379
|
-
'<template>\n <Primitive :as="as" :as-child="asChild" :class="styles({ class: props.class })">\n <slot>\n {{ content }}\n </slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Content to display in the card */\n content?: string;\n /** Custom class(es) to add to the element */\n class?: any;\n }\n >(),\n { as: "div" }\n );\n const styles = tv({\n base: "p-6 [&+*]:pt-0",\n });\n</script>\n',
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
fileName: "Card/Description.vue",
|
|
383
|
-
dirPath: "app/components/Ui",
|
|
384
|
-
fileContent:
|
|
385
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" :as="as" :as-child="asChild">\n <slot>\n {{ description }}\n </slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Description to display in the card */\n description?: string;\n /** Custom class(es) to add to the element */\n class?: any;\n }\n >(),\n {\n as: "div",\n }\n );\n const styles = tv({\n base: "text-sm text-muted-foreground",\n });\n</script>\n',
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
fileName: "Card/Footer.vue",
|
|
389
|
-
dirPath: "app/components/Ui",
|
|
390
|
-
fileContent:
|
|
391
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" :as="as" :as-child="asChild">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the element */\n class?: any;\n }\n >(),\n { as: "div" }\n );\n\n const styles = tv({\n base: "flex items-center p-6",\n });\n</script>\n',
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
fileName: "Card/Header.vue",
|
|
395
|
-
dirPath: "app/components/Ui",
|
|
396
|
-
fileContent:
|
|
397
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" :as="as" :as-child="asChild">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the element */\n class?: any;\n }\n >(),\n { as: "div" }\n );\n\n const styles = tv({\n base: "flex flex-col space-y-1.5 p-6 [&+*]:pt-0",\n });\n</script>\n',
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
fileName: "Card/Title.vue",
|
|
401
|
-
dirPath: "app/components/Ui",
|
|
402
|
-
fileContent:
|
|
403
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" :as="as" :as-child="asChild">\n <slot>\n {{ title }}\n </slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Title to display in the card */\n title?: string;\n /** Custom class(es) to add to the element */\n class?: any;\n }\n >(),\n {\n as: "h3",\n }\n );\n\n const styles = tv({\n base: "text-xl font-semibold leading-none tracking-tight",\n });\n</script>\n',
|
|
404
|
-
},
|
|
405
|
-
],
|
|
406
|
-
utils: [],
|
|
407
|
-
composables: [],
|
|
408
|
-
plugins: [],
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
name: "Carousel",
|
|
412
|
-
value: "carousel",
|
|
413
|
-
files: [
|
|
414
|
-
{
|
|
415
|
-
fileName: "Carousel/Carousel.vue",
|
|
416
|
-
dirPath: "app/components/Ui",
|
|
417
|
-
fileContent:
|
|
418
|
-
'<template>\n <div\n :class="styles({ class: props.class })"\n role="region"\n aria-roledescription="carousel"\n tabindex="0"\n @keydown="onKeyDown"\n >\n <slot\n :can-scroll-next\n :can-scroll-prev\n :carousel-api\n :carousel-ref\n :orientation\n :scroll-next\n :scroll-prev\n />\n </div>\n</template>\n\n<script setup lang="ts">\n import type { CarouselEmits, CarouselProps, WithClassAsProps } from "~/composables/useCarousel";\n\n const styles = tv({\n base: "relative focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border",\n });\n const props = withDefaults(defineProps<CarouselProps & WithClassAsProps>(), {\n orientation: "horizontal",\n });\n const emits = defineEmits<CarouselEmits>();\n\n const {\n canScrollNext,\n canScrollPrev,\n carouselApi,\n carouselRef,\n orientation,\n scrollNext,\n scrollPrev,\n } = useProvideCarousel(props, emits);\n\n defineExpose({\n canScrollNext,\n canScrollPrev,\n carouselApi,\n carouselRef,\n orientation: props.orientation,\n scrollNext,\n scrollPrev,\n });\n\n function onKeyDown(event: KeyboardEvent) {\n const prevKey = props.orientation === "vertical" ? "ArrowUp" : "ArrowLeft";\n const nextKey = props.orientation === "vertical" ? "ArrowDown" : "ArrowRight";\n\n if (event.key === prevKey) {\n event.preventDefault();\n scrollPrev();\n return;\n }\n\n if (event.key === nextKey) {\n event.preventDefault();\n scrollNext();\n }\n }\n</script>\n',
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
fileName: "Carousel/Content.vue",
|
|
422
|
-
dirPath: "app/components/Ui",
|
|
423
|
-
fileContent:
|
|
424
|
-
'<template>\n <div ref="carouselRef" :class="styles().base({ orientation })">\n <div :class="styles().content({ orientation, class: props.class })" v-bind="$attrs">\n <slot />\n </div>\n </div>\n</template>\n\n<script setup lang="ts">\n import type { WithClassAsProps } from "~/composables/useCarousel";\n\n defineOptions({ inheritAttrs: false });\n const props = defineProps<WithClassAsProps>();\n const { carouselRef, orientation } = useCarousel();\n\n const styles = tv({\n slots: {\n base: "overflow-hidden",\n content: "flex",\n },\n variants: {\n orientation: {\n horizontal: { content: "-ml-4" },\n vertical: { content: "-mt-4 flex-col" },\n },\n },\n });\n</script>\n',
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
fileName: "Carousel/Item.vue",
|
|
428
|
-
dirPath: "app/components/Ui",
|
|
429
|
-
fileContent:
|
|
430
|
-
'<template>\n <div\n role="group"\n aria-roledescription="slide"\n :class="styles({ orientation, class: `${props.class} ${grabbingClass}` })"\n @mousedown="isGrabbing = true"\n @mouseup="isGrabbing = false"\n @mouseleave="isGrabbing = false"\n >\n <slot />\n </div>\n</template>\n\n<script setup lang="ts">\n import type { WithClassAsProps } from "~/composables/useCarousel";\n\n const props = defineProps<\n WithClassAsProps & {\n /**\n * Whether to show the grab cursor when hovering over the item.\n * @default false\n */\n grabCursor?: boolean;\n }\n >();\n\n const { orientation } = useCarousel();\n\n const styles = tv({\n base: "min-w-0 shrink-0 grow-0 basis-full",\n variants: {\n orientation: {\n horizontal: "pl-4",\n vertical: "pt-4",\n },\n },\n });\n\n const isGrabbing = ref(false);\n\n const grabbingClass = computed(() => {\n if (!props.grabCursor) return "";\n return isGrabbing.value ? "cursor-grabbing" : "cursor-grab";\n });\n</script>\n',
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
fileName: "Carousel/Next.vue",
|
|
434
|
-
dirPath: "app/components/Ui",
|
|
435
|
-
fileContent:
|
|
436
|
-
'<template>\n <UiButton\n :disabled="!canScrollNext"\n :class="styles().base({ orientation, class: props.class })"\n :variant\n @click="scrollNext"\n >\n <slot>\n <Icon :name="props.icon" :class="styles().icon({ orientation, class: props.iconClass })" />\n <span class="sr-only">{{ props.srText }}</span>\n </slot>\n </UiButton>\n</template>\n\n<script setup lang="ts">\n import type { WithClassAsProps } from "~/composables/useCarousel";\n\n const props = withDefaults(\n defineProps<\n WithClassAsProps & {\n icon?: string;\n srText?: string;\n iconClass?: any;\n variant?: VariantProps<typeof buttonStyles>["variant"];\n }\n >(),\n {\n icon: "lucide:arrow-right",\n srText: "Next Slide",\n variant: "outline",\n }\n );\n\n const { orientation, canScrollNext, scrollNext } = useCarousel();\n\n const styles = tv({\n slots: {\n base: "absolute h-8 w-8 touch-manipulation rounded-full p-0",\n icon: "size-4 text-current",\n },\n variants: {\n orientation: {\n horizontal: { base: "-right-12 top-1/2 -translate-y-1/2" },\n vertical: { base: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90" },\n },\n },\n });\n</script>\n',
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
fileName: "Carousel/Previous.vue",
|
|
440
|
-
dirPath: "app/components/Ui",
|
|
441
|
-
fileContent:
|
|
442
|
-
'<template>\n <UiButton\n :disabled="!canScrollPrev"\n :class="styles().base({ orientation, class: props.class })"\n :variant\n @click="scrollPrev"\n >\n <slot>\n <Icon :name="props.icon" :class="styles().icon({ orientation, class: props.iconClass })" />\n <span class="sr-only">{{ props.srText }}</span>\n </slot>\n </UiButton>\n</template>\n\n<script setup lang="ts">\n import type { WithClassAsProps } from "~/composables/useCarousel";\n\n const props = withDefaults(\n defineProps<\n WithClassAsProps & {\n icon?: string;\n srText?: string;\n iconClass?: any;\n variant?: VariantProps<typeof buttonStyles>["variant"];\n }\n >(),\n {\n icon: "lucide:arrow-left",\n srText: "Previous Slide",\n variant: "outline",\n }\n );\n\n const { orientation, canScrollPrev, scrollPrev } = useCarousel();\n\n const styles = tv({\n slots: {\n base: "absolute h-8 w-8 touch-manipulation rounded-full p-0",\n icon: "size-4 text-current",\n },\n variants: {\n orientation: {\n horizontal: { base: "-left-12 top-1/2 -translate-y-1/2" },\n vertical: { base: "-top-12 left-1/2 -translate-x-1/2 rotate-90" },\n },\n },\n });\n</script>\n',
|
|
443
|
-
},
|
|
444
|
-
],
|
|
445
|
-
deps: ["embla-carousel-vue", "embla-carousel"],
|
|
446
|
-
composables: [
|
|
447
|
-
{
|
|
448
|
-
fileName: "useCarousel.ts",
|
|
449
|
-
dirPath: "composables",
|
|
450
|
-
fileContent:
|
|
451
|
-
'import { createInjectionState } from "@vueuse/core";\nimport emblaCarouselVue from "embla-carousel-vue";\nimport type useEmblaCarousel from "embla-carousel-vue";\nimport type { EmblaCarouselVueType } from "embla-carousel-vue";\nimport type { HTMLAttributes, UnwrapRef } from "vue";\n\ntype CApi = EmblaCarouselVueType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\nexport type CarouselApi = UnwrapRef<CApi>;\n\nexport interface CarouselProps {\n /**\n * The options to be passed to the EmblaCarousel instance\n */\n opts?: CarouselOptions;\n /**\n * The plugins to be passed to the EmblaCarousel instance\n */\n plugins?: CarouselPlugin;\n /**\n * The orientation of the carousel\n * @default "horizontal"\n */\n orientation?: "horizontal" | "vertical";\n}\n\nexport interface CarouselEmits {\n (e: "init-api", payload: CarouselApi): void;\n}\n\nexport interface WithClassAsProps {\n /**\n * The class name to be applied to the root element of the component\n * @default undefined\n */\n class?: HTMLAttributes["class"];\n}\n\nconst [useProvideCarousel, useInjectCarousel] = createInjectionState(\n ({ opts, orientation, plugins }: CarouselProps, emits: CarouselEmits) => {\n const [emblaNode, emblaApi] = emblaCarouselVue(\n {\n ...opts,\n axis: orientation === "horizontal" ? "x" : "y",\n },\n plugins\n );\n\n /**\n * Scroll to the previous slide\n */\n function scrollPrev() {\n emblaApi.value?.scrollPrev();\n }\n /**\n * Scroll to the next slide\n */\n function scrollNext() {\n emblaApi.value?.scrollNext();\n }\n /**\n * Whether the carousel can scroll to the next slide\n */\n const canScrollNext = ref(false);\n /**\n * Whether the carousel can scroll to the previous slide\n */\n const canScrollPrev = ref(false);\n /**\n * Method used to update the canScrollNext and canScrollPrev values\n */\n function onSelect(api: CarouselApi) {\n canScrollNext.value = api?.canScrollNext() || false;\n canScrollPrev.value = api?.canScrollPrev() || false;\n }\n\n onMounted(() => {\n if (!emblaApi.value) return;\n emblaApi.value?.on("init", onSelect);\n emblaApi.value?.on("reInit", onSelect);\n emblaApi.value?.on("select", onSelect);\n\n emits("init-api", emblaApi.value);\n });\n\n return {\n carouselRef: emblaNode,\n carouselApi: emblaApi,\n canScrollPrev,\n canScrollNext,\n scrollPrev,\n scrollNext,\n orientation,\n };\n }\n);\n\n/**\n * A composable function to be used within a <UiCarousel /> component\n */\nfunction useCarousel() {\n const carouselState = useInjectCarousel();\n if (!carouselState) throw new Error("useCarousel must be used within a <UiCarousel />");\n return carouselState;\n}\n\nexport { useCarousel, useProvideCarousel };\n',
|
|
452
|
-
},
|
|
453
|
-
],
|
|
454
|
-
utils: [],
|
|
455
|
-
plugins: [],
|
|
456
|
-
},
|
|
457
|
-
{
|
|
458
|
-
name: "Chart",
|
|
459
|
-
value: "chart",
|
|
460
|
-
deps: ["@unovis/ts", "@unovis/vue"],
|
|
461
|
-
components: ["card"],
|
|
462
|
-
utils: [
|
|
463
|
-
{
|
|
464
|
-
fileName: "chart.ts",
|
|
465
|
-
dirPath: "utils",
|
|
466
|
-
fileContent:
|
|
467
|
-
"export function defaultColors(count: number = 3) {\n const quotient = Math.floor(count / 2);\n const remainder = count % 2;\n\n const primaryCount = quotient + remainder;\n const secondaryCount = quotient;\n return [\n ...Array.from(Array(primaryCount).keys()).map(\n (i) => `hsl(var(--vis-primary-color) / ${1 - (1 / primaryCount) * i})`\n ),\n ...Array.from(Array(secondaryCount).keys()).map(\n (i) => `hsl(var(--vis-secondary-color) / ${1 - (1 / secondaryCount) * i})`\n ),\n ];\n}\n",
|
|
468
|
-
},
|
|
469
|
-
],
|
|
470
|
-
files: [
|
|
471
|
-
{
|
|
472
|
-
fileName: "Chart/Area.vue",
|
|
473
|
-
dirPath: "app/components/Ui",
|
|
474
|
-
fileContent:
|
|
475
|
-
'<template>\n <div :class="styles({ class: props.class })">\n <UiChartLegend\n v-if="showLegend"\n v-model:items="legendItems"\n @legend-item-click="handleLegendItemClick"\n />\n\n <VisXYContainer\n :style="{ height: isMounted ? \'100%\' : \'auto\' }"\n :margin="{ left: 20, right: 20 }"\n :data="data"\n >\n <svg width="0" height="0">\n <defs>\n <linearGradient\n v-for="(color, i) in colors"\n :id="`${chartRef}-color-${i}`"\n :key="i"\n x1="0"\n y1="0"\n x2="0"\n y2="1"\n >\n <template v-if="showGradiant">\n <stop offset="5%" :stop-color="color" stop-opacity="0.4" />\n <stop offset="95%" :stop-color="color" stop-opacity="0" />\n </template>\n <template v-else>\n <stop offset="0%" :stop-color="color" />\n </template>\n </linearGradient>\n </defs>\n </svg>\n\n <UiChartCrosshair\n v-if="showTooltip"\n :colors="colors"\n :items="legendItems"\n :index="index"\n :custom-tooltip="customTooltip"\n />\n\n <template v-for="(category, i) in categories" :key="category">\n <VisArea\n :x="(d: Data, i: number) => i"\n :y="(d: Data) => d[category]"\n color="auto"\n :curve-type="curveType"\n :attributes="{\n [Area.selectors.area]: {\n fill: `url(#${chartRef}-color-${i})`,\n },\n }"\n :opacity="\n legendItems.find((item) => item.name === category)?.inactive ? filterOpacity : 1\n "\n />\n </template>\n\n <template v-for="(category, i) in categories" :key="category">\n <VisLine\n :x="(d: Data, i: number) => i"\n :y="(d: Data) => d[category]"\n :color="colors[i]"\n :curve-type="curveType"\n :attributes="{\n [Line.selectors.line]: {\n opacity: legendItems.find((item) => item.name === category)?.inactive\n ? filterOpacity\n : 1,\n },\n }"\n />\n </template>\n\n <VisAxis\n v-if="showXAxis"\n type="x"\n :tick-format="xFormatter ?? ((v: number) => data[v]?.[index])"\n :grid-line="false"\n :tick-line="false"\n tick-text-color="hsl(var(--vis-text-color))"\n />\n <VisAxis\n v-if="showYAxis"\n type="y"\n :tick-line="false"\n :tick-format="yFormatter"\n :domain-line="false"\n :grid-line="showGridLine"\n :attributes="{\n [Axis.selectors.grid]: {\n class: \'text-muted\',\n },\n }"\n tick-text-color="hsl(var(--vis-text-color))"\n />\n\n <slot />\n </VisXYContainer>\n </div>\n</template>\n\n<script lang="ts">\n import { Area, Axis, CurveType, Line } from "@unovis/ts";\n import { VisArea, VisAxis, VisLine, VisXYContainer } from "@unovis/vue";\n import type { BulletLegendItemInterface, Spacing } from "@unovis/ts";\n\n type KeyOf<T extends Record<string, any>> = Extract<keyof T, string>;\n\n export interface AreaChartProps<T extends Record<string, any>> {\n /**\n * The source data, in which each entry is a dictionary.\n */\n data: T[];\n /**\n * Select the categories from your data. Used to populate the legend and toolip.\n */\n categories: KeyOf<T>[];\n /**\n * Sets the key to map the data to the axis.\n */\n index: KeyOf<T>;\n /**\n * Change the default colors.\n */\n colors?: string[];\n /**\n * Margin of each the container\n */\n margin?: Spacing;\n /**\n * Change the opacity of the non-selected field\n * @default 0.2\n */\n filterOpacity?: number;\n /**\n * Function to format X label\n */\n xFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string;\n /**\n * Function to format Y label\n */\n yFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string;\n /**\n * Controls the visibility of the X axis.\n * @default true\n */\n showXAxis?: boolean;\n /**\n * Controls the visibility of the Y axis.\n * @default true\n */\n showYAxis?: boolean;\n /**\n * Controls the visibility of tooltip.\n * @default true\n */\n showTooltip?: boolean;\n /**\n * Controls the visibility of legend.\n * @default true\n */\n showLegend?: boolean;\n /**\n * Controls the visibility of gridline.\n * @default true\n */\n showGridLine?: boolean;\n }\n</script>\n\n<script setup lang="ts" generic="T extends Record<string, any>">\n const styles = tv({\n base: "flex h-[400px] w-full flex-col items-end",\n });\n\n const props = withDefaults(\n defineProps<\n AreaChartProps<T> & {\n /**\n * Render custom tooltip component.\n */\n customTooltip?: Component;\n /**\n * Type of curve\n */\n curveType?: CurveType;\n /**\n * Controls the visibility of gradient.\n * @default true\n */\n showGradiant?: boolean;\n /**\n * Additional class to be added to the container.\n */\n class?: any;\n }\n >(),\n {\n curveType: CurveType.MonotoneX,\n filterOpacity: 0.2,\n margin: () => ({ top: 0, bottom: 0, left: 0, right: 0 }),\n showXAxis: true,\n showYAxis: true,\n showTooltip: true,\n showLegend: true,\n showGridLine: true,\n showGradiant: true,\n }\n );\n\n const emits = defineEmits<{\n legendItemClick: [d: BulletLegendItemInterface, i: number];\n }>();\n\n type KeyOfT = Extract<keyof T, string>;\n type Data = (typeof props.data)[number];\n\n const chartRef = useId();\n\n const index = computed(() => props.index as KeyOfT);\n const colors = computed(() =>\n props.colors?.length ? props.colors : defaultColors(props.categories.length)\n );\n\n const legendItems = ref<BulletLegendItemInterface[]>(\n props.categories.map((category, i) => ({\n name: category,\n color: colors.value[i],\n inactive: false,\n }))\n );\n\n const isMounted = useMounted();\n\n function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {\n emits("legendItemClick", d, i);\n }\n</script>\n',
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
fileName: "Chart/Bar.vue",
|
|
479
|
-
dirPath: "app/components/Ui",
|
|
480
|
-
fileContent:
|
|
481
|
-
'<template>\n <div :class="styles({ class: props.class })">\n <UiChartLegend\n v-if="showLegend"\n v-model:items="legendItems"\n @legend-item-click="handleLegendItemClick"\n />\n\n <VisXYContainer :data="data" :style="{ height: isMounted ? \'100%\' : \'auto\' }" :margin="margin">\n <UiChartCrosshair\n v-if="showTooltip"\n :colors="colors"\n :items="legendItems"\n :custom-tooltip="customTooltip"\n :index="index"\n />\n\n <VisBarComponent\n :x="(d: Data, i: number) => i"\n :y="categories.map((category) => (d: Data) => d[category])"\n :color="colors"\n :rounded-corners="roundedCorners"\n :bar-padding="0.05"\n :attributes="{\n [selectorsBar]: {\n opacity: (d: Data, i: number) => {\n const pos = i % categories.length;\n return legendItems[pos]?.inactive ? filterOpacity : 1;\n },\n },\n }"\n />\n\n <VisAxis\n v-if="showXAxis"\n type="x"\n :tick-format="xFormatter ?? ((v: number) => data[v]?.[index])"\n :grid-line="false"\n :tick-line="false"\n tick-text-color="hsl(var(--vis-text-color))"\n />\n <VisAxis\n v-if="showYAxis"\n type="y"\n :tick-line="false"\n :tick-format="yFormatter"\n :domain-line="false"\n :grid-line="showGridLine"\n :attributes="{\n [Axis.selectors.grid]: {\n class: \'text-muted\',\n },\n }"\n tick-text-color="hsl(var(--vis-text-color))"\n />\n\n <slot />\n </VisXYContainer>\n </div>\n</template>\n\n<script lang="ts">\n import { Axis, GroupedBar, StackedBar } from "@unovis/ts";\n import { VisAxis, VisGroupedBar, VisStackedBar, VisXYContainer } from "@unovis/vue";\n import type { BulletLegendItemInterface, Spacing } from "@unovis/ts";\n\n type KeyOf<T extends Record<string, any>> = Extract<keyof T, string>;\n\n export interface BarChartProps<T extends Record<string, any>> {\n /**\n * The source data, in which each entry is a dictionary.\n */\n data: T[];\n /**\n * Select the categories from your data. Used to populate the legend and toolip.\n */\n categories: KeyOf<T>[];\n /**\n * Sets the key to map the data to the axis.\n */\n index: KeyOf<T>;\n /**\n * Change the default colors.\n */\n colors?: string[];\n /**\n * Margin of each the container\n */\n margin?: Spacing;\n /**\n * Change the opacity of the non-selected field\n * @default 0.2\n */\n filterOpacity?: number;\n /**\n * Function to format X label\n */\n xFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string;\n /**\n * Function to format Y label\n */\n yFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string;\n /**\n * Controls the visibility of the X axis.\n * @default true\n */\n showXAxis?: boolean;\n /**\n * Controls the visibility of the Y axis.\n * @default true\n */\n showYAxis?: boolean;\n /**\n * Controls the visibility of tooltip.\n * @default true\n */\n showTooltip?: boolean;\n /**\n * Controls the visibility of legend.\n * @default true\n */\n showLegend?: boolean;\n /**\n * Controls the visibility of gridline.\n * @default true\n */\n showGridLine?: boolean;\n }\n</script>\n\n<script setup lang="ts" generic="T extends Record<string, any>">\n const styles = tv({\n base: "flex h-[400px] w-full flex-col items-end",\n });\n const props = withDefaults(\n defineProps<\n BarChartProps<T> & {\n /**\n * Render custom tooltip component.\n */\n customTooltip?: Component;\n /**\n * Change the type of the chart\n * @default "grouped"\n */\n type?: "stacked" | "grouped";\n /**\n * Rounded bar corners\n * @default 0\n */\n roundedCorners?: number;\n /**\n * Additional class to be added to the container\n */\n class?: any;\n }\n >(),\n {\n type: "grouped",\n margin: () => ({ top: 0, bottom: 0, left: 0, right: 0 }),\n filterOpacity: 0.2,\n roundedCorners: 0,\n showXAxis: true,\n showYAxis: true,\n showTooltip: true,\n showLegend: true,\n showGridLine: true,\n }\n );\n const emits = defineEmits<{\n legendItemClick: [d: BulletLegendItemInterface, i: number];\n }>();\n\n type KeyOfT = Extract<keyof T, string>;\n type Data = (typeof props.data)[number];\n\n const index = computed(() => props.index as KeyOfT);\n const colors = computed(() =>\n props.colors?.length ? props.colors : defaultColors(props.categories.length)\n );\n const legendItems = ref<BulletLegendItemInterface[]>(\n props.categories.map((category, i) => ({\n name: category,\n color: colors.value[i],\n inactive: false,\n }))\n );\n\n const isMounted = useMounted();\n\n function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {\n emits("legendItemClick", d, i);\n }\n\n const VisBarComponent = computed(() =>\n props.type === "grouped" ? VisGroupedBar : VisStackedBar\n );\n const selectorsBar = computed(() =>\n props.type === "grouped" ? GroupedBar.selectors.bar : StackedBar.selectors.bar\n );\n</script>\n',
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
fileName: "Chart/Crosshair.vue",
|
|
485
|
-
dirPath: "app/components/Ui",
|
|
486
|
-
fileContent:
|
|
487
|
-
'<template>\n <VisTooltip :horizontal-shift="20" :vertical-shift="20" />\n <VisCrosshair :template="template" :color="color" />\n</template>\n\n<script setup lang="ts">\n import { omit } from "@unovis/ts";\n import { VisCrosshair, VisTooltip } from "@unovis/vue";\n import { UiChartTooltip } from "#components";\n import { createApp } from "vue";\n import type { BulletLegendItemInterface } from "@unovis/ts";\n\n const props = withDefaults(\n defineProps<{\n colors: string[];\n index: string;\n items: BulletLegendItemInterface[];\n customTooltip?: Component;\n }>(),\n {\n colors: () => [],\n }\n );\n\n // Use weakmap to store reference to each datapoint for Tooltip\n const wm = new WeakMap();\n function template(d: any) {\n if (wm.has(d)) {\n return wm.get(d);\n } else {\n const componentDiv = document.createElement("div");\n const omittedData = Object.entries(omit(d, [props.index])).map(([key, value]) => {\n const legendReference = props.items.find((i) => i.name === key);\n return { ...legendReference, value };\n });\n const TooltipComponent = props.customTooltip ?? UiChartTooltip;\n createApp(TooltipComponent, { title: d[props.index].toString(), data: omittedData }).mount(\n componentDiv\n );\n wm.set(d, componentDiv.innerHTML);\n return componentDiv.innerHTML;\n }\n }\n\n function color(d: unknown, i: number) {\n return props.colors[i] ?? "transparent";\n }\n</script>\n',
|
|
488
|
-
},
|
|
489
|
-
{
|
|
490
|
-
fileName: "Chart/Donut.vue",
|
|
491
|
-
dirPath: "app/components/Ui",
|
|
492
|
-
fileContent:
|
|
493
|
-
'<template>\n <div :class="styles({ class: props.class })">\n <VisSingleContainer\n :style="{ height: isMounted ? \'100%\' : \'auto\' }"\n :margin="{ left: 20, right: 20 }"\n :data="data"\n >\n <UiChartSingleTooltip\n :selector="Donut.selectors.segment"\n :index="category"\n :items="legendItems"\n :value-formatter="valueFormatter"\n :custom-tooltip="customTooltip"\n />\n\n <VisDonut\n :value="(d: Data) => d[category]"\n :sort-function="sortFunction"\n :color="colors"\n :arc-width="type === \'donut\' ? 20 : 0"\n :show-background="false"\n :central-label="type === \'donut\' ? valueFormatter(totalValue) : \'\'"\n :events="{\n [Donut.selectors.segment]: {\n click: (d: Data, ev: PointerEvent, i: number, elements: HTMLElement[]) => {\n if (d?.data?.[index] === activeSegmentKey) {\n activeSegmentKey = undefined;\n elements.forEach((el) => (el.style.opacity = \'1\'));\n } else {\n activeSegmentKey = d?.data?.[index];\n elements.forEach((el) => (el.style.opacity = `${filterOpacity}`));\n elements[i].style.opacity = \'1\';\n }\n },\n },\n }"\n />\n\n <slot />\n </VisSingleContainer>\n </div>\n</template>\n\n<script lang="ts">\n import { Donut } from "@unovis/ts";\n import { VisDonut, VisSingleContainer } from "@unovis/vue";\n import type { Spacing } from "@unovis/ts";\n\n type KeyOf<T extends Record<string, any>> = Extract<keyof T, string>;\n\n export interface DonutChartProps<T extends Record<string, any>> {\n /**\n * The source data, in which each entry is a dictionary.\n */\n data: T[];\n /**\n * Sets the key to map the data to the axis.\n */\n index: KeyOf<T>;\n /**\n * Change the default colors.\n */\n colors?: string[];\n /**\n * Margin of each the container\n */\n margin?: Spacing;\n /**\n * Change the opacity of the non-selected field\n * @default 0.2\n */\n filterOpacity?: number;\n /**\n * Controls the visibility of tooltip.\n * @default true\n */\n showTooltip?: boolean;\n /**\n * Controls the visibility of legend.\n * @default true\n */\n showLegend?: boolean;\n }\n</script>\n<script setup lang="ts" generic="T extends Record<string, any>">\n const styles = tv({\n base: "flex h-48 w-full flex-col items-end",\n });\n const props = withDefaults(\n defineProps<\n Pick<\n DonutChartProps<T>,\n "data" | "colors" | "index" | "margin" | "showLegend" | "showTooltip" | "filterOpacity"\n > & {\n /**\n * Sets the name of the key containing the quantitative chart values.\n */\n category: KeyOfT;\n /**\n * Change the type of the chart\n * @default "donut"\n */\n type?: "donut" | "pie";\n /**\n * Function to sort the segment\n */\n sortFunction?: (a: any, b: any) => number | undefined;\n /**\n * Controls the formatting for the label.\n */\n valueFormatter?: (tick: number, i?: number, ticks?: number[]) => string;\n /**\n * Render custom tooltip component.\n */\n customTooltip?: Component;\n /**\n * Custom class\n */\n class?: any;\n }\n >(),\n {\n margin: () => ({ top: 0, bottom: 0, left: 0, right: 0 }),\n sortFunction: () => undefined,\n valueFormatter: (tick: number) => `${tick}`,\n type: "donut",\n filterOpacity: 0.2,\n showTooltip: true,\n showLegend: true,\n }\n );\n\n type KeyOfT = Extract<keyof T, string>;\n type Data = (typeof props.data)[number];\n\n const category = computed(() => props.category as KeyOfT);\n const index = computed(() => props.index as KeyOfT);\n\n const isMounted = useMounted();\n const activeSegmentKey = ref<string>();\n const colors = computed(() =>\n props.colors?.length\n ? props.colors\n : defaultColors(props.data.filter((d) => d[props.category]).filter(Boolean).length)\n );\n const legendItems = computed(() =>\n props.data.map((item, i) => ({\n name: item[props.index],\n color: colors.value[i],\n inactive: false,\n }))\n );\n\n const totalValue = computed(() =>\n props.data.reduce((prev, curr) => {\n return prev + curr[props.category];\n }, 0)\n );\n</script>\n',
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
fileName: "Chart/Legend.vue",
|
|
497
|
-
dirPath: "app/components/Ui",
|
|
498
|
-
fileContent:
|
|
499
|
-
'<template>\n <div ref="elRef" class="w-max">\n <VisBulletLegend :items="items" :on-legend-item-click="onLegendItemClick" />\n </div>\n</template>\n\n<script setup lang="ts">\n import { BulletLegend } from "@unovis/ts";\n import { VisBulletLegend } from "@unovis/vue";\n import type { BulletLegendItemInterface } from "@unovis/ts";\n\n const props = withDefaults(defineProps<{ items: BulletLegendItemInterface[] }>(), {\n items: () => [],\n });\n\n const emits = defineEmits<{\n legendItemClick: [d: BulletLegendItemInterface, i: number];\n "update:items": [payload: BulletLegendItemInterface[]];\n }>();\n\n const elRef = ref<HTMLElement>();\n\n onMounted(() => {\n const selector = `.${BulletLegend.selectors.item}`;\n nextTick(() => {\n const elements = elRef.value?.querySelectorAll(selector);\n const classes = buttonStyles({ variant: "ghost", size: "xs" }).split(" ");\n elements?.forEach((el) => el.classList.add(...classes, "!inline-flex", "!mr-2"));\n });\n });\n\n function onLegendItemClick(d: BulletLegendItemInterface, i: number) {\n emits("legendItemClick", d, i);\n const isBulletActive = !props.items[i].inactive;\n const isFilterApplied = props.items.some((i) => i.inactive);\n if (isFilterApplied && isBulletActive) {\n // reset filter\n emits(\n "update:items",\n props.items.map((item) => ({ ...item, inactive: false }))\n );\n } else {\n // apply selection, set other item as inactive\n emits(\n "update:items",\n props.items.map((item) =>\n item.name === d.name ? { ...d, inactive: false } : { ...item, inactive: true }\n )\n );\n }\n }\n</script>\n',
|
|
500
|
-
},
|
|
501
|
-
{
|
|
502
|
-
fileName: "Chart/Line.vue",
|
|
503
|
-
dirPath: "app/components/Ui",
|
|
504
|
-
fileContent:
|
|
505
|
-
'<template>\n <div :class="styles({ class: props.class })">\n <UiChartLegend\n v-if="showLegend"\n v-model:items="legendItems"\n @legend-item-click="handleLegendItemClick"\n />\n\n <VisXYContainer\n :margin="{ left: 20, right: 20 }"\n :data="data"\n :style="{ height: isMounted ? \'100%\' : \'auto\' }"\n >\n <UiChartCrosshair\n v-if="showTooltip"\n :colors="colors"\n :items="legendItems"\n :index="index"\n :custom-tooltip="customTooltip"\n />\n\n <template v-for="(category, i) in categories" :key="category">\n <VisLine\n :x="(d: Data, i: number) => i"\n :y="(d: Data) => d[category]"\n :curve-type="curveType"\n :color="colors[i]"\n :attributes="{\n [Line.selectors.line]: {\n opacity: legendItems.find((item) => item.name === category)?.inactive\n ? filterOpacity\n : 1,\n },\n }"\n />\n </template>\n\n <VisAxis\n v-if="showXAxis"\n type="x"\n :tick-format="xFormatter ?? ((v: number) => data[v]?.[index])"\n :grid-line="false"\n :tick-line="false"\n tick-text-color="hsl(var(--vis-text-color))"\n />\n <VisAxis\n v-if="showYAxis"\n type="y"\n :tick-line="false"\n :tick-format="yFormatter"\n :domain-line="false"\n :grid-line="showGridLine"\n :attributes="{\n [Axis.selectors.grid]: {\n class: \'text-muted\',\n },\n }"\n tick-text-color="hsl(var(--vis-text-color))"\n />\n\n <slot />\n </VisXYContainer>\n </div>\n</template>\n\n<script lang="ts">\n import { Axis, CurveType, Line } from "@unovis/ts";\n import { VisAxis, VisLine, VisXYContainer } from "@unovis/vue";\n import type { BulletLegendItemInterface, Spacing } from "@unovis/ts";\n\n type KeyOf<T extends Record<string, any>> = Extract<keyof T, string>;\n\n export interface LineChartProps<T extends Record<string, any>> {\n /**\n * The source data, in which each entry is a dictionary.\n */\n data: T[];\n /**\n * Select the categories from your data. Used to populate the legend and toolip.\n */\n categories: KeyOf<T>[];\n /**\n * Sets the key to map the data to the axis.\n */\n index: KeyOf<T>;\n /**\n * Change the default colors.\n */\n colors?: string[];\n /**\n * Margin of each the container\n */\n margin?: Spacing;\n /**\n * Change the opacity of the non-selected field\n * @default 0.2\n */\n filterOpacity?: number;\n /**\n * Function to format X label\n */\n xFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string;\n /**\n * Function to format Y label\n */\n yFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string;\n /**\n * Controls the visibility of the X axis.\n * @default true\n */\n showXAxis?: boolean;\n /**\n * Controls the visibility of the Y axis.\n * @default true\n */\n showYAxis?: boolean;\n /**\n * Controls the visibility of tooltip.\n * @default true\n */\n showTooltip?: boolean;\n /**\n * Controls the visibility of legend.\n * @default true\n */\n showLegend?: boolean;\n /**\n * Controls the visibility of gridline.\n * @default true\n */\n showGridLine?: boolean;\n }\n</script>\n\n<script setup lang="ts" generic="T extends Record<string, any>">\n const styles = tv({\n base: "flex h-[400px] w-full flex-col items-end",\n });\n const props = withDefaults(\n defineProps<\n LineChartProps<T> & {\n /**\n * Render custom tooltip component.\n */\n customTooltip?: Component;\n /**\n * Type of curve\n */\n curveType?: CurveType;\n /**\n * Additional class to be added to the container.\n */\n class?: any;\n }\n >(),\n {\n curveType: CurveType.MonotoneX,\n filterOpacity: 0.2,\n margin: () => ({ top: 0, bottom: 0, left: 0, right: 0 }),\n showXAxis: true,\n showYAxis: true,\n showTooltip: true,\n showLegend: true,\n showGridLine: true,\n }\n );\n\n const emits = defineEmits<{\n legendItemClick: [d: BulletLegendItemInterface, i: number];\n }>();\n\n type KeyOfT = Extract<keyof T, string>;\n type Data = (typeof props.data)[number];\n\n const index = computed(() => props.index as KeyOfT);\n const colors = computed(() =>\n props.colors?.length ? props.colors : defaultColors(props.categories.length)\n );\n\n const legendItems = ref<BulletLegendItemInterface[]>(\n props.categories.map((category, i) => ({\n name: category,\n color: colors.value[i],\n inactive: false,\n }))\n );\n\n const isMounted = useMounted();\n\n function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {\n emits("legendItemClick", d, i);\n }\n</script>\n',
|
|
506
|
-
},
|
|
507
|
-
{
|
|
508
|
-
fileName: "Chart/SingleTooltip.vue",
|
|
509
|
-
dirPath: "app/components/Ui",
|
|
510
|
-
fileContent:
|
|
511
|
-
'<template>\n <VisTooltip\n :horizontal-shift="20"\n :vertical-shift="20"\n :triggers="{\n [selector]: template,\n }"\n />\n</template>\n<script setup lang="ts">\n import { omit } from "@unovis/ts";\n import { VisTooltip } from "@unovis/vue";\n import { UiChartTooltip } from "#components";\n import { createApp } from "vue";\n import type { BulletLegendItemInterface } from "@unovis/ts";\n\n const props = withDefaults(\n defineProps<{\n selector: string;\n index: string;\n items?: BulletLegendItemInterface[];\n valueFormatter?: (tick: number, i?: number, ticks?: number[]) => string;\n customTooltip?: Component;\n }>(),\n {\n valueFormatter: (tick: number) => `${tick}`,\n }\n );\n\n // Use weakmap to store reference to each datapoint for Tooltip\n const wm = new WeakMap();\n function template(d: any, i: number, elements: (HTMLElement | SVGElement)[]) {\n if (props.index in d) {\n if (wm.has(d)) {\n return wm.get(d);\n } else {\n const componentDiv = document.createElement("div");\n const omittedData = Object.entries(omit(d, [props.index])).map(([key, value]) => {\n const legendReference = props.items?.find((i) => i.name === key);\n return { ...legendReference, value: props.valueFormatter(value) };\n });\n const TooltipComponent = props.customTooltip ?? UiChartTooltip;\n createApp(TooltipComponent, { title: d[props.index], data: omittedData }).mount(\n componentDiv\n );\n wm.set(d, componentDiv.innerHTML);\n return componentDiv.innerHTML;\n }\n } else {\n const data = d.data;\n\n if (wm.has(data)) {\n return wm.get(data);\n } else {\n const style = getComputedStyle(elements[i]);\n const omittedData = [\n { name: data.name, value: props.valueFormatter(data[props.index]), color: style.fill },\n ];\n const componentDiv = document.createElement("div");\n const TooltipComponent = props.customTooltip ?? UiChartTooltip;\n createApp(TooltipComponent, { title: d[props.index], data: omittedData }).mount(\n componentDiv\n );\n wm.set(d, componentDiv.innerHTML);\n return componentDiv.innerHTML;\n }\n }\n }\n</script>\n',
|
|
512
|
-
},
|
|
513
|
-
{
|
|
514
|
-
fileName: "Chart/Tooltip.vue",
|
|
515
|
-
dirPath: "app/components/Ui",
|
|
516
|
-
fileContent:
|
|
517
|
-
'<template>\n <UiCard class="text-sm">\n <UiCardHeader v-if="title" class="border-b p-3">\n <UiCardTitle>\n {{ title }}\n </UiCardTitle>\n </UiCardHeader>\n <UiCardContent class="flex min-w-[180px] flex-col gap-1 !p-3">\n <div v-for="(item, key) in data" :key="key" class="flex justify-between">\n <div class="flex items-center">\n <span class="mr-2 h-2.5 w-2.5">\n <svg width="100%" height="100%" viewBox="0 0 30 30">\n <path\n d=" M 15 15 m -14, 0 a 14,14 0 1,1 28,0 a 14,14 0 1,1 -28,0"\n :stroke="item.color"\n :fill="item.color"\n stroke-width="1"\n />\n </svg>\n </span>\n <span>{{ item.name }}</span>\n </div>\n <span class="ml-4 font-semibold">{{ item.value }}</span>\n </div>\n </UiCardContent>\n </UiCard>\n</template>\n\n<script setup lang="ts">\n defineProps<{\n title?: string;\n data: {\n name: string;\n color: string;\n value: any;\n }[];\n }>();\n</script>\n',
|
|
518
|
-
},
|
|
519
|
-
],
|
|
520
|
-
composables: [],
|
|
521
|
-
plugins: [],
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
name: "Checkbox",
|
|
525
|
-
value: "checkbox",
|
|
526
|
-
files: [
|
|
527
|
-
{
|
|
528
|
-
fileName: "Checkbox/Checkbox.vue",
|
|
529
|
-
dirPath: "app/components/Ui",
|
|
530
|
-
fileContent:
|
|
531
|
-
'<template>\n <CheckboxRoot v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Transition enter-active-class="transition" enter-from-class="opacity-0 scale-0">\n <UiCheckboxIndicator :checked="checked" :icon="icon" />\n </Transition>\n </slot>\n </CheckboxRoot>\n</template>\n\n<script lang="ts" setup>\n import { CheckboxRoot, useForwardPropsEmits } from "radix-vue";\n import type { CheckboxRootEmits, CheckboxRootProps } from "radix-vue";\n\n const props = defineProps<\n CheckboxRootProps & {\n /** Custom class(es) to add to the element */\n class?: any;\n /**\n * ID of the checkbox\n */\n id?: string;\n /**\n * Icon to display when the checkbox is checked\n * @default lucide:check\n */\n icon?: string;\n }\n >();\n\n const emit = defineEmits<CheckboxRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "icon"), emit);\n\n const styles = tv({\n base: "peer h-[18px] w-[18px] shrink-0 rounded-sm border border-primary ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",\n });\n</script>\n',
|
|
532
|
-
},
|
|
533
|
-
{
|
|
534
|
-
fileName: "Checkbox/Indicator.vue",
|
|
535
|
-
dirPath: "app/components/Ui",
|
|
536
|
-
fileContent:
|
|
537
|
-
'<template>\n <CheckboxIndicator :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>\n <Icon :name="checked == \'indeterminate\' ? \'lucide:minus\' : icon" class="h-4 w-4" />\n </slot>\n </CheckboxIndicator>\n</template>\n\n<script lang="ts" setup>\n import { CheckboxIndicator } from "radix-vue";\n import type { CheckboxIndicatorProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n CheckboxIndicatorProps & {\n /** The state of the checkbox */\n checked?: boolean | "indeterminate";\n /** Custom class(es) to add to the element */\n class?: any;\n /**\n * Icon to display when the checkbox is checked\n * @default lucide:check\n */\n icon?: string;\n }\n >(),\n {\n icon: "lucide:check",\n }\n );\n const forwarded = reactiveOmit(props, "class", "icon");\n const styles = tv({\n base: "flex items-center justify-center text-current",\n });\n</script>\n',
|
|
538
|
-
},
|
|
539
|
-
],
|
|
540
|
-
utils: [],
|
|
541
|
-
composables: [],
|
|
542
|
-
plugins: [],
|
|
543
|
-
},
|
|
544
|
-
{
|
|
545
|
-
name: "Chip",
|
|
546
|
-
value: "chip",
|
|
547
|
-
files: [
|
|
548
|
-
{
|
|
549
|
-
fileName: "Chip.vue",
|
|
550
|
-
dirPath: "app/components/Ui",
|
|
551
|
-
fileContent:
|
|
552
|
-
'<template>\n <div class="relative inline-flex flex-shrink-0 items-center justify-center">\n <slot />\n <TransitionScale>\n <span\n v-if="localModel"\n :class="[styles({ position, size, inset, class: [props.color, props.class] })]"\n >\n <slot name="content">\n {{ text }}\n </slot>\n </span>\n </TransitionScale>\n </div>\n</template>\n\n<script lang="ts" setup>\n defineOptions({ inheritAttrs: false });\n const props = withDefaults(\n defineProps<{\n /**\n * The text to display in the chip.\n *\n * Can be overridden by the `content` slot.\n */\n text?: string;\n /**\n * The color of the chip.\n *\n * @default `bg-primary`\n */\n color?: string;\n /**\n * The size of the chip.\n *\n * @default `sm`\n */\n size?: VariantProps<typeof styles>["size"];\n /**\n * The position of the chip.\n *\n * @default `top-right`\n */\n position?: VariantProps<typeof styles>["position"];\n /**\n * Whether the chip should be inset.\n *\n * @default `false`\n */\n inset?: boolean;\n /**\n * Whether the chip should be visible.\n *\n * Can be used with `v-model` to control visibility.\n *\n * @default `true`\n */\n show?: boolean;\n /**\n * Additional classes to apply to the chip.\n */\n class?: any;\n }>(),\n { show: true, color: "bg-primary", inset: false }\n );\n\n const localModel = defineModel<boolean>("show", { default: true });\n\n const styles = tv({\n base: "absolute flex items-center justify-center whitespace-nowrap rounded-full font-medium text-foreground ring-[2px] ring-background",\n variants: {\n position: {\n "top-right": "right-0 top-0",\n "bottom-right": "bottom-0 right-0",\n "top-left": "left-0 top-0",\n "bottom-left": "bottom-0 left-0",\n },\n inset: {\n true: "",\n false: "",\n },\n size: {\n "3xs": "h-[4px] min-w-[4px] p-px text-[4px]",\n "2xs": "h-[5px] min-w-[5px] p-px text-[5px]",\n xs: "h-1.5 min-w-[0.375rem] p-px text-[6px]",\n sm: "h-2 min-w-[0.5rem] p-0.5 text-[7px]",\n md: "h-2.5 min-w-2.5 p-0.5 text-[8px]",\n lg: "h-3 min-w-[0.75rem] p-0.5 text-[10px]",\n xl: "h-3.5 min-w-[0.875rem] p-1 text-[11px]",\n "2xl": "h-4 min-w-[1rem] p-1 text-[12px]",\n "3xl": "h-5 min-w-[1.25rem] p-1 text-[14px]",\n },\n },\n defaultVariants: {\n size: "sm",\n position: "top-right",\n inset: false,\n },\n compoundVariants: [\n {\n inset: false,\n position: "top-right",\n class: "-translate-y-1/2 translate-x-1/2 transform",\n },\n {\n inset: false,\n position: "bottom-right",\n class: "-translate-x-1/2 translate-y-1/2 transform",\n },\n {\n inset: false,\n position: "top-left",\n class: "-translate-x-1/2 -translate-y-1/2 transform",\n },\n {\n inset: false,\n position: "bottom-left",\n class: "-translate-x-1/2 translate-y-1/2 transform",\n },\n ],\n });\n</script>\n',
|
|
553
|
-
},
|
|
554
|
-
],
|
|
555
|
-
utils: [],
|
|
556
|
-
composables: [],
|
|
557
|
-
plugins: [],
|
|
558
|
-
},
|
|
559
|
-
{
|
|
560
|
-
name: "Collapsible",
|
|
561
|
-
value: "collapsible",
|
|
562
|
-
files: [
|
|
563
|
-
{
|
|
564
|
-
fileName: "Collapsible/Collapsible.vue",
|
|
565
|
-
dirPath: "app/components/Ui",
|
|
566
|
-
fileContent:
|
|
567
|
-
'<template>\n <CollapsibleRoot v-slot="slotProps" v-bind="forwarded">\n <slot v-bind="slotProps" />\n </CollapsibleRoot>\n</template>\n\n<script lang="ts" setup>\n import { CollapsibleRoot, useForwardPropsEmits } from "radix-vue";\n import type { CollapsibleRootEmits, CollapsibleRootProps } from "radix-vue";\n\n const props = defineProps<CollapsibleRootProps>();\n\n const emit = defineEmits<CollapsibleRootEmits>();\n\n const forwarded = useForwardPropsEmits(props, emit);\n</script>\n',
|
|
568
|
-
},
|
|
569
|
-
{
|
|
570
|
-
fileName: "Collapsible/Content.vue",
|
|
571
|
-
dirPath: "app/components/Ui",
|
|
572
|
-
fileContent:
|
|
573
|
-
'<template>\n <CollapsibleContent :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </CollapsibleContent>\n</template>\n\n<script lang="ts" setup>\n import { CollapsibleContent } from "radix-vue";\n import type { CollapsibleContentProps } from "radix-vue";\n\n const props = defineProps<\n CollapsibleContentProps & {\n /** Customer class(es) to add to the element */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "overflow-hidden transition will-change-auto data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",\n });\n</script>\n',
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
fileName: "Collapsible/Trigger.vue",
|
|
577
|
-
dirPath: "app/components/Ui",
|
|
578
|
-
fileContent:
|
|
579
|
-
'<template>\n <CollapsibleTrigger v-bind="forwarded">\n <slot />\n </CollapsibleTrigger>\n</template>\n\n<script lang="ts" setup>\n import { CollapsibleTrigger, useForwardProps } from "radix-vue";\n import type { CollapsibleTriggerProps } from "radix-vue";\n\n const props = defineProps<CollapsibleTriggerProps>();\n const forwarded = useForwardProps(props);\n</script>\n',
|
|
580
|
-
},
|
|
581
|
-
],
|
|
582
|
-
utils: [],
|
|
583
|
-
composables: [],
|
|
584
|
-
plugins: [],
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
name: "Command",
|
|
588
|
-
value: "command",
|
|
589
|
-
files: [
|
|
590
|
-
{
|
|
591
|
-
fileName: "Command/Cancel.vue",
|
|
592
|
-
dirPath: "app/components/Ui",
|
|
593
|
-
fileContent:
|
|
594
|
-
'<template>\n <ComboboxCancel v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Icon name="lucide:x" class="h-4 w-4 text-muted-foreground/70" />\n </slot>\n </ComboboxCancel>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxCancel } from "radix-vue";\n import type { ComboboxCancelProps } from "radix-vue";\n\n const props = defineProps<ComboboxCancelProps & { class?: any }>();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex items-center justify-center",\n });\n</script>\n',
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
fileName: "Command/Command.vue",
|
|
598
|
-
dirPath: "app/components/Ui",
|
|
599
|
-
fileContent:
|
|
600
|
-
'<template>\n <ComboboxRoot v-bind="forwarded" :open="true" :class="styles({ class: props.class })">\n <slot />\n </ComboboxRoot>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxRoot, useForwardPropsEmits } from "radix-vue";\n import type { ComboboxRootEmits, ComboboxRootProps } from "radix-vue";\n\n const props = defineProps<ComboboxRootProps & { class?: any }>();\n const emits = defineEmits<ComboboxRootEmits>();\n\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",\n });\n</script>\n',
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
fileName: "Command/Dialog.vue",
|
|
604
|
-
dirPath: "app/components/Ui",
|
|
605
|
-
fileContent:
|
|
606
|
-
'<template>\n <UiDialog v-bind="forwarded">\n <UiDialogContent class="overflow-hidden p-0 shadow-lg">\n <UiCommand>\n <slot />\n </UiCommand>\n </UiDialogContent>\n </UiDialog>\n</template>\n\n<script lang="ts" setup>\n import { useForwardPropsEmits } from "radix-vue";\n import type { DialogRootEmits, DialogRootProps } from "radix-vue";\n\n const props = defineProps<DialogRootProps>();\n const emits = defineEmits<DialogRootEmits>();\n\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
fileName: "Command/Empty.vue",
|
|
610
|
-
dirPath: "app/components/Ui",
|
|
611
|
-
fileContent:
|
|
612
|
-
'<template>\n <ComboboxEmpty :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </ComboboxEmpty>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxEmpty } from "radix-vue";\n import type { ComboboxEmptyProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxEmptyProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "py-6 text-center text-sm",\n });\n</script>\n',
|
|
613
|
-
},
|
|
614
|
-
{
|
|
615
|
-
fileName: "Command/Group.vue",
|
|
616
|
-
dirPath: "app/components/Ui",
|
|
617
|
-
fileContent:
|
|
618
|
-
'<template>\n <ComboboxGroup :class="styles({ class: props.class })" v-bind="forwarded">\n <slot name="heading">\n <UiCommandLabel v-if="heading" :label="heading" />\n </slot>\n <slot />\n </ComboboxGroup>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxGroup } from "radix-vue";\n import type { ComboboxGroupProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxGroupProps & {\n /**The heading for the group */\n heading?: any;\n /**Custom class(es) to add to the element */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "heading");\n const styles = tv({\n base: "overflow-hidden p-1 text-foreground",\n });\n</script>\n',
|
|
619
|
-
},
|
|
620
|
-
{
|
|
621
|
-
fileName: "Command/Input.vue",
|
|
622
|
-
dirPath: "app/components/Ui",
|
|
623
|
-
fileContent:
|
|
624
|
-
'<template>\n <div class="flex items-center border-b px-3">\n <Icon :name="icon || \'lucide:search\'" class="mr-2 h-4 w-4 shrink-0 opacity-50" />\n <ComboboxInput\n v-bind="$attrs"\n :type="type ?? \'text\'"\n :disabled="disabled"\n auto-focus\n :class="styles({ class: props.class })"\n />\n <UiCommandCancel v-if="showCancel" />\n </div>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxInput } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = defineProps<{\n /**Custom class(es) to add to the input element*/\n class?: any;\n /**The icon to render*/\n icon?: string;\n /**The input type*/\n type?: string;\n /**Whether the input is disabled*/\n disabled?: boolean;\n /**Whether to show the cancel button*/\n showCancel?: boolean;\n }>();\n\n const styles = tv({\n base: "flex h-11 w-full rounded-md bg-transparent py-3 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",\n });\n</script>\n',
|
|
625
|
-
},
|
|
626
|
-
{
|
|
627
|
-
fileName: "Command/Item.vue",
|
|
628
|
-
dirPath: "app/components/Ui",
|
|
629
|
-
fileContent:
|
|
630
|
-
'<template>\n <ComboboxItem v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <slot name="icon">\n <Icon v-if="icon" :name="icon" class="h-4 w-4" />\n </slot>\n {{ text }}\n <slot name="shortcut">\n <UiCommandShortcut v-if="shortcut" :shortcut="shortcut" />\n </slot>\n </slot>\n </ComboboxItem>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxItem, useForwardPropsEmits } from "radix-vue";\n import type { ComboboxItemEmits, ComboboxItemProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxItemProps & {\n /** Class(es) to add to the parent */\n class?: any;\n /** Icon to render */\n icon?: string;\n /** Text to render */\n text?: string;\n /** Shortcut to render */\n shortcut?: string;\n }\n >();\n const emit = defineEmits<ComboboxItemEmits>();\n const forwarded = useForwardPropsEmits(\n reactiveOmit(props, "class", "icon", "text", "shortcut"),\n emit\n );\n\n const styles = tv({\n base: "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",\n });\n</script>\n',
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
fileName: "Command/Label.vue",
|
|
634
|
-
dirPath: "app/components/Ui",
|
|
635
|
-
fileContent:
|
|
636
|
-
'<template>\n <ComboboxLabel :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>{{ label }}</slot>\n </ComboboxLabel>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxLabel } from "radix-vue";\n import type { ComboboxLabelProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxLabelProps & {\n /**\n * Class(es) to pass to the ComboboxLabel component.\n */\n class?: any;\n /**\n * The label to display.\n */\n label?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "label");\n const styles = tv({\n base: "px-2 py-1.5 text-xs font-medium text-muted-foreground",\n });\n</script>\n',
|
|
637
|
-
},
|
|
638
|
-
{
|
|
639
|
-
fileName: "Command/List.vue",
|
|
640
|
-
dirPath: "app/components/Ui",
|
|
641
|
-
fileContent:
|
|
642
|
-
'<template>\n <ComboboxContent v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </ComboboxContent>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxContent, useForwardPropsEmits } from "radix-vue";\n import type { ComboboxContentEmits, ComboboxContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = defineProps<\n ComboboxContentProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n }\n >();\n\n const emits = defineEmits<ComboboxContentEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "max-h-[300px] overflow-y-auto overflow-x-hidden",\n });\n</script>\n',
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
fileName: "Command/Separator.vue",
|
|
646
|
-
dirPath: "app/components/Ui",
|
|
647
|
-
fileContent:
|
|
648
|
-
'<template>\n <ComboboxSeparator :as-child="asChild" :class="styles({ class: props.class })">\n <slot />\n </ComboboxSeparator>\n</template>\n\n<script lang="ts" setup>\n import { ComboboxSeparator } from "radix-vue";\n import type { ComboboxSeparatorProps } from "radix-vue";\n\n const props = defineProps<\n ComboboxSeparatorProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n }\n >();\n const styles = tv({\n base: "-mx-1 h-px bg-border",\n });\n</script>\n',
|
|
649
|
-
},
|
|
650
|
-
{
|
|
651
|
-
fileName: "Command/Shortcut.vue",
|
|
652
|
-
dirPath: "app/components/Ui",
|
|
653
|
-
fileContent:
|
|
654
|
-
'<template>\n <Primitive :as="as || \'span\'" :as-child="asChild" :class="styles({ class: props.class })">\n <slot>{{ shortcut }}</slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = defineProps<\n PrimitiveProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n /** The shortcut text to render */\n shortcut?: any;\n }\n >();\n const styles = tv({\n base: "ml-auto text-xs tracking-widest text-muted-foreground",\n });\n</script>\n',
|
|
655
|
-
},
|
|
656
|
-
],
|
|
657
|
-
utils: [],
|
|
658
|
-
composables: [],
|
|
659
|
-
plugins: [],
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
name: "Container",
|
|
663
|
-
value: "container",
|
|
664
|
-
files: [
|
|
665
|
-
{
|
|
666
|
-
fileName: "Container.vue",
|
|
667
|
-
dirPath: "app/components/Ui",
|
|
668
|
-
fileContent:
|
|
669
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n class?: any;\n }\n >(),\n {\n as: "div",\n }\n );\n\n const forwarded = reactiveOmit(props, "class");\n\n const styles = tv({\n base: "container mx-auto",\n });\n</script>\n',
|
|
670
|
-
},
|
|
671
|
-
],
|
|
672
|
-
utils: [],
|
|
673
|
-
composables: [],
|
|
674
|
-
plugins: [],
|
|
675
|
-
},
|
|
676
|
-
{
|
|
677
|
-
name: "Context Menu",
|
|
678
|
-
value: "context-menu",
|
|
679
|
-
files: [
|
|
680
|
-
{
|
|
681
|
-
fileName: "ContextMenu/Arrow.vue",
|
|
682
|
-
dirPath: "app/components/Ui",
|
|
683
|
-
fileContent:
|
|
684
|
-
'<template>\n <ContextMenuArrow v-bind="forwarded" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuArrow } from "radix-vue";\n import type { ContextMenuArrowProps } from "radix-vue";\n\n const props = defineProps<\n ContextMenuArrowProps & {\n /** Custom class(es) to add to teh arrow */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "border bg-muted",\n });\n</script>\n',
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
fileName: "ContextMenu/CheckboxItem.vue",
|
|
688
|
-
dirPath: "app/components/Ui",
|
|
689
|
-
fileContent:
|
|
690
|
-
'<template>\n <ContextMenuCheckboxItem v-bind="forwarded" :class="styles({ class: props.class })">\n <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center text-primary">\n <UiContextMenuItemIndicator icon="lucide:check" />\n </span>\n <slot>\n <span v-if="title">{{ title }}</span>\n </slot>\n <slot name="shortcut">\n <UiContextMenuShortcut v-if="shortcut">{{ shortcut }}</UiContextMenuShortcut>\n </slot>\n </ContextMenuCheckboxItem>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuCheckboxItem, useForwardPropsEmits } from "radix-vue";\n import type { ContextMenuCheckboxItemEmits, ContextMenuCheckboxItemProps } from "radix-vue";\n\n const props = defineProps<\n ContextMenuCheckboxItemProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n /**The shortcut for the item */\n shortcut?: string;\n /**The title for the item */\n title?: string;\n }\n >();\n\n const emits = defineEmits<ContextMenuCheckboxItemEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "shortcut", "title"), emits);\n const styles = tv({\n base: "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",\n });\n</script>\n',
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
fileName: "ContextMenu/Content.vue",
|
|
694
|
-
dirPath: "app/components/Ui",
|
|
695
|
-
fileContent:
|
|
696
|
-
'<template>\n <UiContextMenuPortal>\n <ContextMenuContent\n v-bind="{ ...forwarded, ...$attrs }"\n :class="styles({ class: props.class })"\n >\n <slot />\n </ContextMenuContent>\n </UiContextMenuPortal>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuContent, useForwardPropsEmits } from "radix-vue";\n import type { ContextMenuContentEmits, ContextMenuContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n const props = withDefaults(\n defineProps<\n ContextMenuContentProps & {\n /** Custom class(es) to add to the element */\n class?: any;\n }\n >(),\n {\n loop: true,\n avoidCollisions: true,\n collisionPadding: 5,\n sticky: "partial",\n }\n );\n\n const emits = defineEmits<ContextMenuContentEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",\n });\n</script>\n',
|
|
697
|
-
},
|
|
698
|
-
{
|
|
699
|
-
fileName: "ContextMenu/ContextMenu.vue",
|
|
700
|
-
dirPath: "app/components/Ui",
|
|
701
|
-
fileContent:
|
|
702
|
-
'<template>\n <ContextMenuRoot v-bind="forwarded">\n <slot />\n </ContextMenuRoot>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuRoot, useForwardPropsEmits } from "radix-vue";\n import type { ContextMenuRootEmits, ContextMenuRootProps } from "radix-vue";\n\n const props = defineProps<ContextMenuRootProps>();\n const emit = defineEmits<ContextMenuRootEmits>();\n const forwarded = useForwardPropsEmits(props, emit);\n</script>\n',
|
|
703
|
-
},
|
|
704
|
-
{
|
|
705
|
-
fileName: "ContextMenu/Group.vue",
|
|
706
|
-
dirPath: "app/components/Ui",
|
|
707
|
-
fileContent:
|
|
708
|
-
'<template>\n <ContextMenuGroup v-bind="props">\n <slot />\n </ContextMenuGroup>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuGroup } from "radix-vue";\n import type { ContextMenuGroupProps } from "radix-vue";\n\n const props = defineProps<ContextMenuGroupProps>();\n</script>\n',
|
|
709
|
-
},
|
|
710
|
-
{
|
|
711
|
-
fileName: "ContextMenu/Item.vue",
|
|
712
|
-
dirPath: "app/components/Ui",
|
|
713
|
-
fileContent:
|
|
714
|
-
'<template>\n <ContextMenuItem v-bind="forwarded" :class="styles({ inset, class: props.class })">\n <slot>\n <span v-if="title">{{ title }}</span>\n </slot>\n <slot name="shortcut">\n <UiContextMenuShortcut v-if="shortcut">{{ shortcut }}</UiContextMenuShortcut>\n </slot>\n </ContextMenuItem>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuItem, useForwardPropsEmits } from "radix-vue";\n import type { ContextMenuItemEmits, ContextMenuItemProps } from "radix-vue";\n\n const props = defineProps<\n ContextMenuItemProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n /** Wether an indentation should be added to the item or not */\n inset?: boolean;\n /** The shortcut for the item */\n shortcut?: string;\n /** The title for the item */\n title?: string;\n }\n >();\n\n const emits = defineEmits<ContextMenuItemEmits>();\n const forwarded = useForwardPropsEmits(\n reactiveOmit(props, "class", "inset", "shortcut", "title"),\n emits\n );\n\n const styles = tv({\n base: "relative flex cursor-pointer select-none items-center gap-2.5 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",\n variants: {\n inset: {\n true: "pl-8",\n },\n },\n });\n</script>\n',
|
|
715
|
-
},
|
|
716
|
-
{
|
|
717
|
-
fileName: "ContextMenu/ItemIndicator.vue",
|
|
718
|
-
dirPath: "app/components/Ui",
|
|
719
|
-
fileContent:
|
|
720
|
-
'<template>\n <ContextMenuItemIndicator v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Icon v-if="icon" :name="icon" class="h-4 w-4" />\n </slot>\n </ContextMenuItemIndicator>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuItemIndicator } from "radix-vue";\n import type { ContextMenuItemIndicatorProps } from "radix-vue";\n\n const props = defineProps<\n ContextMenuItemIndicatorProps & {\n /** The icon to display */\n icon?: string;\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "icon");\n\n const styles = tv({\n base: "flex items-center justify-center",\n });\n</script>\n',
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
fileName: "ContextMenu/Label.vue",
|
|
724
|
-
dirPath: "app/components/Ui",
|
|
725
|
-
fileContent:
|
|
726
|
-
'<template>\n <ContextMenuLabel :class="styles({ inset, class: props.class })" v-bind="forwarded">\n <slot>{{ label }}</slot>\n </ContextMenuLabel>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuLabel } from "radix-vue";\n import type { ContextMenuLabelProps } from "radix-vue";\n\n const props = defineProps<\n ContextMenuLabelProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n /** Wether an indentation should be added to the item or not */\n inset?: boolean;\n /** The label for the item */\n label?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "inset", "label");\n const styles = tv({\n base: "inline-block w-full px-2 py-1.5 text-sm font-semibold text-foreground",\n variants: {\n inset: { true: "pl-8" },\n },\n });\n</script>\n',
|
|
727
|
-
},
|
|
728
|
-
{
|
|
729
|
-
fileName: "ContextMenu/Portal.vue",
|
|
730
|
-
dirPath: "app/components/Ui",
|
|
731
|
-
fileContent:
|
|
732
|
-
'<template>\n <ContextMenuPortal v-bind="props">\n <slot />\n </ContextMenuPortal>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuPortal } from "radix-vue";\n import type { ContextMenuPortalProps } from "radix-vue";\n\n const props = defineProps<ContextMenuPortalProps>();\n</script>\n',
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
fileName: "ContextMenu/RadioGroup.vue",
|
|
736
|
-
dirPath: "app/components/Ui",
|
|
737
|
-
fileContent:
|
|
738
|
-
'<template>\n <ContextMenuRadioGroup v-bind="forwarded">\n <slot />\n </ContextMenuRadioGroup>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuRadioGroup, useForwardPropsEmits } from "radix-vue";\n import type { ContextMenuRadioGroupEmits, ContextMenuRadioGroupProps } from "radix-vue";\n\n const props = defineProps<ContextMenuRadioGroupProps>();\n\n const emits = defineEmits<ContextMenuRadioGroupEmits>();\n\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
739
|
-
},
|
|
740
|
-
{
|
|
741
|
-
fileName: "ContextMenu/RadioItem.vue",
|
|
742
|
-
dirPath: "app/components/Ui",
|
|
743
|
-
fileContent:
|
|
744
|
-
'<template>\n <ContextMenuRadioItem v-bind="forwarded" :class="styles({ class: props.class })">\n <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center text-primary">\n <UiContextMenuItemIndicator>\n <Icon v-if="icon" :name="icon" class="h-4 w-4" />\n <Icon v-else name="ph:circle-fill" class="h-2 w-2" />\n </UiContextMenuItemIndicator>\n </span>\n <slot>{{ title }}</slot>\n </ContextMenuRadioItem>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuRadioItem, useForwardPropsEmits } from "radix-vue";\n import type { ContextMenuRadioItemEmits, ContextMenuRadioItemProps } from "radix-vue";\n\n const props = defineProps<\n ContextMenuRadioItemProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n /**The icon to display */\n icon?: string;\n /**The title for the item */\n title?: string;\n }\n >();\n\n const emits = defineEmits<ContextMenuRadioItemEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "icon", "title"), emits);\n\n const styles = tv({\n base: "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",\n });\n</script>\n',
|
|
745
|
-
},
|
|
746
|
-
{
|
|
747
|
-
fileName: "ContextMenu/Separator.vue",
|
|
748
|
-
dirPath: "app/components/Ui",
|
|
749
|
-
fileContent:
|
|
750
|
-
'<template>\n <ContextMenuSeparator :class="styles({ class: props.class })" v-bind="props" />\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuSeparator } from "radix-vue";\n import type { ContextMenuSeparatorProps } from "radix-vue";\n\n const props = defineProps<\n ContextMenuSeparatorProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n }\n >();\n\n const styles = tv({\n base: "-mx-1 my-1 h-px bg-border",\n });\n</script>\n',
|
|
751
|
-
},
|
|
752
|
-
{
|
|
753
|
-
fileName: "ContextMenu/Shortcut.vue",
|
|
754
|
-
dirPath: "app/components/Ui",
|
|
755
|
-
fileContent:
|
|
756
|
-
'<template>\n <Primitive :as="as || \'span\'" :as-child="asChild" :class="styles({ class: props.class })">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = defineProps<\n PrimitiveProps & {\n class?: any;\n }\n >();\n\n const styles = tv({\n base: "ml-auto text-xs tracking-widest text-muted-foreground",\n });\n</script>\n',
|
|
757
|
-
},
|
|
758
|
-
{
|
|
759
|
-
fileName: "ContextMenu/Sub.vue",
|
|
760
|
-
dirPath: "app/components/Ui",
|
|
761
|
-
fileContent:
|
|
762
|
-
'<template>\n <ContextMenuSub v-bind="forwarded">\n <slot />\n </ContextMenuSub>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuSub, useForwardPropsEmits } from "radix-vue";\n import type { ContextMenuSubEmits, ContextMenuSubProps } from "radix-vue";\n\n const props = defineProps<ContextMenuSubProps>();\n const emits = defineEmits<ContextMenuSubEmits>();\n\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
fileName: "ContextMenu/SubContent.vue",
|
|
766
|
-
dirPath: "app/components/Ui",
|
|
767
|
-
fileContent:
|
|
768
|
-
'<template>\n <UiContextMenuPortal>\n <ContextMenuSubContent\n v-bind="{ ...forwarded, ...$attrs }"\n :class="styles({ class: props.class })"\n >\n <slot />\n </ContextMenuSubContent>\n </UiContextMenuPortal>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuSubContent, useForwardPropsEmits } from "radix-vue";\n import type { ContextMenuSubContentEmits, ContextMenuSubContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = withDefaults(\n defineProps<\n ContextMenuSubContentProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n }\n >(),\n {\n loop: true,\n avoidCollisions: true,\n collisionPadding: 8,\n sticky: "partial",\n }\n );\n\n const emits = defineEmits<ContextMenuSubContentEmits>();\n\n const styles = tv({\n base: "z-50 min-w-[100px] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",\n });\n\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
769
|
-
},
|
|
770
|
-
{
|
|
771
|
-
fileName: "ContextMenu/SubTrigger.vue",
|
|
772
|
-
dirPath: "app/components/Ui",
|
|
773
|
-
fileContent:
|
|
774
|
-
'<template>\n <ContextMenuSubTrigger v-bind="forwarded" :class="styles({ inset, class: props.class })">\n <slot>\n <span v-if="title">{{ title }}</span>\n </slot>\n <Icon class="ml-auto h-4 w-4" :name="icon || \'lucide:chevron-right\'" />\n </ContextMenuSubTrigger>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuSubTrigger } from "radix-vue";\n import type { ContextMenuSubTriggerProps } from "radix-vue";\n\n const props = defineProps<\n ContextMenuSubTriggerProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n /** Wether an indentation should be added to the item or not */\n inset?: boolean;\n /** The icon to display */\n icon?: string;\n /** The title for the item */\n title?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "inset", "icon", "title");\n const styles = tv({\n base: "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground",\n variants: {\n inset: {\n true: "pl-8",\n },\n },\n });\n</script>\n',
|
|
775
|
-
},
|
|
776
|
-
{
|
|
777
|
-
fileName: "ContextMenu/Trigger.vue",
|
|
778
|
-
dirPath: "app/components/Ui",
|
|
779
|
-
fileContent:
|
|
780
|
-
'<template>\n <ContextMenuTrigger v-bind="props">\n <slot />\n </ContextMenuTrigger>\n</template>\n\n<script lang="ts" setup>\n import { ContextMenuTrigger } from "radix-vue";\n import type { ContextMenuTriggerProps } from "radix-vue";\n\n const props = defineProps<ContextMenuTriggerProps>();\n</script>\n',
|
|
781
|
-
},
|
|
782
|
-
],
|
|
783
|
-
utils: [],
|
|
784
|
-
composables: [],
|
|
785
|
-
plugins: [],
|
|
786
|
-
},
|
|
787
|
-
{
|
|
788
|
-
name: "Currency Input",
|
|
789
|
-
value: "currency-input",
|
|
790
|
-
deps: ["vue-currency-input"],
|
|
791
|
-
files: [
|
|
792
|
-
{
|
|
793
|
-
fileName: "CurrencyInput.vue",
|
|
794
|
-
dirPath: "app/components/Ui",
|
|
795
|
-
fileContent:
|
|
796
|
-
'<template>\n <!-- eslint-disable-next-line vue/html-self-closing -->\n <input ref="inputRef" type="text" :class="styles({ class: props.class })" v-bind="props" />\n</template>\n\n<script lang="ts" setup>\n import { defu } from "defu";\n import { useCurrencyInput } from "vue-currency-input";\n import type { CurrencyInputOptions } from "vue-currency-input";\n\n const props = defineProps<{\n class?: any;\n id?: string;\n name?: string;\n placeholder?: string;\n disabled?: boolean;\n required?: boolean;\n modelValue?: any;\n options?: CurrencyInputOptions;\n }>();\n\n const { inputRef } = useCurrencyInput(\n defu({}, props.options, {\n currency: "USD",\n locale: "en-US",\n hideCurrencySymbolOnFocus: false,\n hideGroupingSeparatorOnFocus: false,\n })\n );\n\n const styles = tv({\n base: "h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-[16px] ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground file:hover:cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",\n });\n</script>\n',
|
|
797
|
-
},
|
|
798
|
-
],
|
|
799
|
-
utils: [],
|
|
800
|
-
composables: [],
|
|
801
|
-
plugins: [],
|
|
802
|
-
},
|
|
803
|
-
{
|
|
804
|
-
name: "DataTables.net",
|
|
805
|
-
value: "datatable",
|
|
806
|
-
deps: [
|
|
807
|
-
"datatables.net-buttons-dt",
|
|
808
|
-
"datatables.net-responsive-dt",
|
|
809
|
-
"datatables.net-searchbuilder-dt",
|
|
810
|
-
"datatables.net-fixedcolumns-dt",
|
|
811
|
-
"datatables.net-fixedheader-dt",
|
|
812
|
-
"datatables.net-select-dt",
|
|
813
|
-
"datatables.net-vue3",
|
|
814
|
-
"jszip",
|
|
815
|
-
],
|
|
816
|
-
plugins: [
|
|
817
|
-
{
|
|
818
|
-
fileName: "datatables.client.ts",
|
|
819
|
-
dirPath: "plugins",
|
|
820
|
-
fileContent:
|
|
821
|
-
'import DataTablesCore from "datatables.net";\nimport DataTable from "datatables.net-vue3";\nimport JSZip from "jszip";\n\nimport "datatables.net-buttons";\nimport "datatables.net-buttons-dt";\nimport "datatables.net-buttons/js/buttons.colVis.mjs";\nimport "datatables.net-buttons/js/buttons.html5.mjs";\nimport "datatables.net-buttons/js/buttons.print.mjs";\nimport "datatables.net-responsive-dt";\nimport "datatables.net-searchbuilder-dt";\nimport "datatables.net-select-dt";\nimport "datatables.net-fixedcolumns-dt";\nimport "datatables.net-fixedcolumns-dt/css/fixedColumns.dataTables.css";\nimport "datatables.net-fixedheader-dt";\nimport "datatables.net-fixedheader-dt/css/fixedHeader.dataTables.css";\nimport "datatables.net-colreorder-dt";\nimport "datatables.net-colreorder-dt/css/colReorder.dataTables.css";\n\n// @ts-expect-error - We are not creating a declaration file for this library\nwindow.JSZip = JSZip;\n\nDataTable.use(DataTablesCore);\n\nexport default defineNuxtPlugin((nuxtApp) => {\n nuxtApp.vueApp.component("DataTable", DataTable);\n});\n',
|
|
822
|
-
},
|
|
823
|
-
],
|
|
824
|
-
files: [
|
|
825
|
-
{
|
|
826
|
-
fileName: "Datatable.client.vue",
|
|
827
|
-
dirPath: "app/components/Ui",
|
|
828
|
-
fileContent:
|
|
829
|
-
'<template>\n <DataTable\n ref="table"\n :columns="columns"\n :ajax="ajax"\n :data="data"\n :class="props.class"\n :options="options"\n >\n <template v-for="(_, name) in $slots" #[name]="scope">\n <slot :name="name" v-bind="scope" />\n </template>\n </DataTable>\n</template>\n\n<script lang="ts" setup generic="T extends Record<string, any>">\n import type DataTableRef from "datatables.net";\n import type { Config } from "datatables.net";\n\n export type DataTablesNamedSlotProps<T> = {\n /** The data to show in the cell (from the `columns.data` configuration) */\n cellData: keyof T | null;\n /** The column index for the cell (0-based index) */\n colIndex: number;\n /** The data object for the whole row */\n rowData: T | Record<string, any>;\n /** Row index for the cell (data index, not the display index) */\n rowIndex: number;\n /** Orthogonal data type */\n type: string;\n };\n\n const table = shallowRef<{ dt: InstanceType<typeof DataTableRef<T[]>> } | null>(null);\n\n const props = withDefaults(\n defineProps<{\n data?: Config["data"];\n class?: any;\n columns?: Config["columns"];\n ajax?: Config["ajax"];\n options?: Config;\n }>(),\n {\n data: () => [],\n class: "nowrap hover order-column row-border stripe display",\n options: () => ({}),\n }\n );\n\n const emits = defineEmits<{\n ready: [any];\n }>();\n\n onMounted(() => {\n nextTick(() => {\n emits("ready", table.value?.dt);\n });\n });\n</script>\n\n<style>\n :root {\n --dt-row-selected: 262.1, 83.3%, 57.8%;\n --dt-row-selected-text: 210, 20%, 98%;\n --dt-row-selected-link: 262.1, 83.3%, 57.8%;\n --dt-row-stripe: 0, 0%, 100%;\n --dt-row-hover: 0, 0%, 100%;\n --dt-column-ordering: 0, 0%, 100%;\n --dt-border: 220, 13%, 91%;\n --dt-foreground: 224, 71.4%, 4.1%;\n }\n\n .dark {\n --dt-row-selected: 263.4, 70%, 50.4%;\n --dt-row-selected-text: 210, 20%, 98%;\n --dt-row-selected-link: 263.4, 70%, 50.4%;\n --dt-row-stripe: 224, 71.4%, 4.1%;\n --dt-row-hover: 224, 71.4%, 4.1%;\n --dt-column-ordering: 224, 71.4%, 4.1%;\n --dt-border: 215, 27.9%, 16.9%;\n --dt-foreground: 224, 71.4%, 4.1%;\n }\n\n table.dataTable td.dt-control {\n text-align: center;\n cursor: pointer;\n }\n table.dataTable td.dt-control:before {\n display: inline-block;\n color: hsla(var(--dt-foreground), 0.5);\n content: "►";\n }\n table.dataTable tr.dt-hasChild td.dt-control:before {\n content: "▼";\n }\n\n table.dataTable thead > tr > th.sorting,\n table.dataTable thead > tr > th.sorting_asc,\n table.dataTable thead > tr > th.sorting_desc,\n table.dataTable thead > tr > th.sorting_asc_disabled,\n table.dataTable thead > tr > th.sorting_desc_disabled,\n table.dataTable thead > tr > td.sorting,\n table.dataTable thead > tr > td.sorting_asc,\n table.dataTable thead > tr > td.sorting_desc,\n table.dataTable thead > tr > td.sorting_asc_disabled,\n table.dataTable thead > tr > td.sorting_desc_disabled,\n /* V2 */\n table.dataTable thead > tr > th.dt-orderable-asc,\n table.dataTable thead > tr > th.dt-orderable-desc,\n table.dataTable thead > tr > td.dt-orderable-asc,\n table.dataTable thead > tr > td.dt-orderable-desc {\n @apply relative cursor-pointer pr-7;\n }\n table.dataTable thead > tr > th.sorting:before,\n table.dataTable thead > tr > th.sorting:after,\n table.dataTable thead > tr > th.sorting_asc:before,\n table.dataTable thead > tr > th.sorting_asc:after,\n table.dataTable thead > tr > th.sorting_desc:before,\n table.dataTable thead > tr > th.sorting_desc:after,\n table.dataTable thead > tr > th.sorting_asc_disabled:before,\n table.dataTable thead > tr > th.sorting_asc_disabled:after,\n table.dataTable thead > tr > th.sorting_desc_disabled:before,\n table.dataTable thead > tr > th.sorting_desc_disabled:after,\n table.dataTable thead > tr > td.sorting:before,\n table.dataTable thead > tr > td.sorting:after,\n table.dataTable thead > tr > td.sorting_asc:before,\n table.dataTable thead > tr > td.sorting_asc:after,\n table.dataTable thead > tr > td.sorting_desc:before,\n table.dataTable thead > tr > td.sorting_desc:after,\n table.dataTable thead > tr > td.sorting_asc_disabled:before,\n table.dataTable thead > tr > td.sorting_asc_disabled:after,\n table.dataTable thead > tr > td.sorting_desc_disabled:before,\n table.dataTable thead > tr > td.sorting_desc_disabled:after,\n /* V2 */\n table.dataTable thead > tr > th.dt-orderable-asc:before,\n table.dataTable thead > tr > th.dt-orderable-asc:after,\n table.dataTable thead > tr > th.dt-orderable-desc:before,\n table.dataTable thead > tr > th.dt-orderable-desc:after,\n table.dataTable thead > tr > td.dt-orderable-asc:before,\n table.dataTable thead > tr > td.dt-orderable-asc:after,\n table.dataTable thead > tr > td.dt-orderable-desc:before,\n table.dataTable thead > tr > td.dt-orderable-desc:after {\n @apply absolute right-2.5 block text-xs leading-3 opacity-25;\n }\n table.dataTable thead > tr > th.sorting:before,\n table.dataTable thead > tr > th.sorting_asc:before,\n table.dataTable thead > tr > th.sorting_desc:before,\n table.dataTable thead > tr > th.sorting_asc_disabled:before,\n table.dataTable thead > tr > th.sorting_desc_disabled:before,\n table.dataTable thead > tr > td.sorting:before,\n table.dataTable thead > tr > td.sorting_asc:before,\n table.dataTable thead > tr > td.sorting_desc:before,\n table.dataTable thead > tr > td.sorting_asc_disabled:before,\n table.dataTable thead > tr > td.sorting_desc_disabled:before,\n /* V2 */\n table.dataTable thead > tr > th.dt-orderable-asc:before,\n table.dataTable thead > tr > th.dt-orderable-desc:before,\n table.dataTable thead > tr > td.dt-orderable-asc:before,\n table.dataTable thead > tr > td.dt-orderable-desc:before {\n @apply bottom-[43%] size-[14px] shrink-0 bg-[url(\'https://api.iconify.design/lucide:chevron-up.svg\')] bg-contain bg-center bg-no-repeat content-[\'\'] dark:bg-[url(\'https://api.iconify.design/lucide:chevron-up.svg?color=white\')];\n }\n table.dataTable thead > tr > th.sorting:after,\n table.dataTable thead > tr > th.sorting_asc:after,\n table.dataTable thead > tr > th.sorting_desc:after,\n table.dataTable thead > tr > th.sorting_asc_disabled:after,\n table.dataTable thead > tr > th.sorting_desc_disabled:after,\n table.dataTable thead > tr > td.sorting:after,\n table.dataTable thead > tr > td.sorting_asc:after,\n table.dataTable thead > tr > td.sorting_desc:after,\n table.dataTable thead > tr > td.sorting_asc_disabled:after,\n table.dataTable thead > tr > td.sorting_desc_disabled:after,\n /* V2 */\n table.dataTable thead > tr > th.dt-orderable-asc:after,\n table.dataTable thead > tr > th.dt-orderable-desc:after,\n table.dataTable thead > tr > td.dt-orderable-asc:after,\n table.dataTable thead > tr > td.dt-orderable-desc:after {\n @apply top-[43%] size-[14px] shrink-0 bg-[url(\'https://api.iconify.design/lucide:chevron-down.svg\')] bg-contain bg-center bg-no-repeat content-[\'\'] dark:bg-[url(\'https://api.iconify.design/lucide:chevron-down.svg?color=white\')];\n }\n table.dataTable thead > tr > th.sorting_asc:before,\n table.dataTable thead > tr > th.sorting_desc:after,\n table.dataTable thead > tr > td.sorting_asc:before,\n table.dataTable thead > tr > td.sorting_desc:after,\n /* V2 */\n table.dataTable thead > tr > th.dt-ordering-asc:before,\n table.dataTable thead > tr > th.dt-ordering-desc:after {\n @apply opacity-80;\n }\n table.dataTable thead > tr > th.sorting_desc_disabled:after,\n table.dataTable thead > tr > th.sorting_asc_disabled:before,\n table.dataTable thead > tr > td.sorting_desc_disabled:after,\n table.dataTable thead > tr > td.sorting_asc_disabled:before {\n @apply hidden;\n }\n table.dataTable thead > tr > th:active,\n table.dataTable thead > tr > td:active {\n @apply outline-none;\n }\n\n div.dataTables_scrollBody > table.dataTable > thead > tr > th:before,\n div.dataTables_scrollBody > table.dataTable > thead > tr > th:after,\n div.dataTables_scrollBody > table.dataTable > thead > tr > td:before,\n div.dataTables_scrollBody > table.dataTable > thead > tr > td:after {\n @apply hidden;\n }\n\n div.dataTables_processing,\n div.dt-processing {\n @apply absolute inset-0 z-[999] flex size-full items-center justify-center bg-background/50 backdrop-blur-sm transition;\n\n > div:last-child {\n @apply relative mx-auto my-4 h-4 w-20;\n\n > div {\n @apply absolute top-0 h-3.5 w-3.5 rounded-full bg-primary;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n }\n\n > div:nth-child(1) {\n left: 8px;\n animation: datatables-loader-1 0.6s infinite;\n }\n\n > div:nth-child(2) {\n left: 8px;\n animation: datatables-loader-2 0.6s infinite;\n }\n\n > div:nth-child(3) {\n left: 32px;\n animation: datatables-loader-2 0.6s infinite;\n }\n\n > div:nth-child(4) {\n left: 56px;\n animation: datatables-loader-3 0.6s infinite;\n }\n }\n }\n @keyframes datatables-loader-1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes datatables-loader-3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n @keyframes datatables-loader-2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n }\n .dtfh-floatingparent.dtfh-floatingparent-head {\n @apply z-10 bg-background/90 backdrop-blur;\n }\n table.dataTable.nowrap th,\n table.dataTable.nowrap td {\n white-space: nowrap;\n }\n table.dataTable th.dt-left,\n table.dataTable td.dt-left {\n text-align: left;\n }\n table.dataTable th.dt-center,\n table.dataTable td.dt-center,\n table.dataTable td.dataTables_empty {\n text-align: center;\n }\n table.dataTable th.dt-right,\n table.dataTable td.dt-right {\n text-align: right;\n }\n table.dataTable th.dt-justify,\n table.dataTable td.dt-justify {\n text-align: justify;\n }\n table.dataTable th.dt-nowrap,\n table.dataTable td.dt-nowrap {\n white-space: nowrap;\n }\n table.dataTable thead th,\n table.dataTable thead td,\n table.dataTable tfoot th,\n table.dataTable tfoot td {\n text-align: left;\n }\n table.dataTable thead th.dt-head-left,\n table.dataTable thead td.dt-head-left,\n table.dataTable tfoot th.dt-head-left,\n table.dataTable tfoot td.dt-head-left {\n text-align: left;\n }\n table.dataTable thead th.dt-head-center,\n table.dataTable thead td.dt-head-center,\n table.dataTable tfoot th.dt-head-center,\n table.dataTable tfoot td.dt-head-center {\n text-align: center;\n }\n table.dataTable thead th.dt-head-right,\n table.dataTable thead td.dt-head-right,\n table.dataTable tfoot th.dt-head-right,\n table.dataTable tfoot td.dt-head-right {\n text-align: right;\n }\n table.dataTable thead th.dt-head-justify,\n table.dataTable thead td.dt-head-justify,\n table.dataTable tfoot th.dt-head-justify,\n table.dataTable tfoot td.dt-head-justify {\n text-align: justify;\n }\n table.dataTable thead th.dt-head-nowrap,\n table.dataTable thead td.dt-head-nowrap,\n table.dataTable tfoot th.dt-head-nowrap,\n table.dataTable tfoot td.dt-head-nowrap {\n white-space: nowrap;\n }\n table.dataTable tbody th.dt-body-left,\n table.dataTable tbody td.dt-body-left {\n text-align: left;\n }\n table.dataTable tbody th.dt-body-center,\n table.dataTable tbody td.dt-body-center {\n text-align: center;\n }\n table.dataTable tbody th.dt-body-right,\n table.dataTable tbody td.dt-body-right {\n text-align: right;\n }\n table.dataTable tbody th.dt-body-justify,\n table.dataTable tbody td.dt-body-justify {\n text-align: justify;\n }\n table.dataTable tbody th.dt-body-nowrap,\n table.dataTable tbody td.dt-body-nowrap {\n white-space: nowrap;\n }\n\n /* Table Styles */\n\n table.dataTable {\n @apply w-full table-auto border-collapse;\n }\n\n /* Table header styles */\n table.dataTable thead th,\n table.dataTable tfoot th {\n @apply text-left text-sm font-medium text-muted-foreground;\n }\n\n table.dataTable > thead > tr > th {\n @apply border-b border-t-0 px-6 py-3;\n }\n table.dataTable > thead > tr > td {\n @apply border-b px-6 py-3 text-sm;\n }\n table.dataTable > thead > tr > th:active,\n table.dataTable > thead > tr > td:active {\n @apply outline-none;\n }\n table.dataTable > tfoot > tr > th,\n table.dataTable > tfoot > tr > td {\n @apply border-t px-6 py-3;\n }\n table.dataTable tbody tr {\n @apply bg-transparent;\n }\n table.dataTable tbody tr.selected > * {\n @apply bg-primary/10;\n }\n table.dataTable tbody tr.selected a {\n @apply text-primary;\n }\n table.dataTable tbody th,\n table.dataTable tbody td {\n @apply px-6 py-3 text-sm;\n }\n table.dataTable.row-border > tbody > tr > th,\n table.dataTable.row-border > tbody > tr > td,\n table.dataTable.display > tbody > tr > th,\n table.dataTable.display > tbody > tr > td {\n @apply border-t;\n }\n table.dataTable.row-border > tbody > tr:first-child > th,\n table.dataTable.row-border > tbody > tr:first-child > td,\n table.dataTable.display > tbody > tr:first-child > th,\n table.dataTable.display > tbody > tr:first-child > td {\n @apply border-t-0;\n }\n table.dataTable.row-border > tbody > tr.selected + tr.selected > td,\n table.dataTable.display > tbody > tr.selected + tr.selected > td {\n @apply border-t-primary/30;\n }\n table.dataTable.cell-border > tbody > tr > th,\n table.dataTable.cell-border > tbody > tr > td {\n @apply border-r border-t;\n }\n table.dataTable.cell-border > tbody > tr > th:first-child,\n table.dataTable.cell-border > tbody > tr > td:first-child {\n @apply border-l;\n }\n table.dataTable.cell-border > tbody > tr:first-child > th,\n table.dataTable.cell-border > tbody > tr:first-child > td {\n @apply border-t-0;\n }\n table.dataTable.stripe > tbody > tr.odd > *,\n table.dataTable.display > tbody > tr.odd > * {\n @apply bg-muted/50;\n }\n table.dataTable.stripe > tbody > tr.odd.selected > *,\n table.dataTable.display > tbody > tr.odd.selected > * {\n @apply bg-primary/10;\n }\n table.dataTable.hover > tbody > tr:hover > *,\n table.dataTable.display > tbody > tr:hover > * {\n @apply bg-muted;\n }\n table.dataTable.hover > tbody > tr.selected:hover > *,\n table.dataTable.display > tbody > tr.selected:hover > * {\n @apply !bg-primary/10;\n }\n table.dataTable.order-column > tbody tr > .sorting_1,\n table.dataTable.order-column > tbody tr > .sorting_2,\n table.dataTable.order-column > tbody tr > .sorting_3,\n table.dataTable.display > tbody tr > .sorting_1,\n table.dataTable.display > tbody tr > .sorting_2,\n table.dataTable.display > tbody tr > .sorting_3 {\n @apply bg-muted;\n }\n table.dataTable.order-column > tbody tr.selected > .sorting_1,\n table.dataTable.order-column > tbody tr.selected > .sorting_2,\n table.dataTable.order-column > tbody tr.selected > .sorting_3,\n table.dataTable.display > tbody tr.selected > .sorting_1,\n table.dataTable.display > tbody tr.selected > .sorting_2,\n table.dataTable.display > tbody tr.selected > .sorting_3 {\n @apply !bg-primary/10;\n }\n table.dataTable.display > tbody > tr.odd > .sorting_1,\n table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_1 {\n @apply bg-muted/50;\n }\n table.dataTable.display > tbody > tr.odd > .sorting_2,\n table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_2 {\n @apply bg-muted/30;\n }\n table.dataTable.display > tbody > tr.odd > .sorting_3,\n table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_3 {\n @apply bg-muted/10;\n }\n table.dataTable.display > tbody > tr.odd.selected > .sorting_1,\n table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_1 {\n @apply bg-muted/50;\n }\n table.dataTable.display > tbody > tr.odd.selected > .sorting_2,\n table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_2 {\n @apply bg-muted/30;\n }\n table.dataTable.display > tbody > tr.odd.selected > .sorting_3,\n table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_3 {\n @apply bg-muted/10;\n }\n table.dataTable.display > tbody > tr.even > .sorting_1,\n table.dataTable.order-column.stripe > tbody > tr.even > .sorting_1 {\n @apply bg-muted/50;\n }\n table.dataTable.display > tbody > tr.even > .sorting_2,\n table.dataTable.order-column.stripe > tbody > tr.even > .sorting_2 {\n @apply bg-muted/30;\n }\n table.dataTable.display > tbody > tr.even > .sorting_3,\n table.dataTable.order-column.stripe > tbody > tr.even > .sorting_3 {\n @apply bg-muted/10;\n }\n table.dataTable.display > tbody > tr.even.selected > .sorting_1,\n table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_1 {\n @apply bg-primary/10;\n }\n table.dataTable.display > tbody > tr.even.selected > .sorting_2,\n table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_2 {\n @apply bg-primary/10;\n }\n table.dataTable.display > tbody > tr.even.selected > .sorting_3,\n table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_3 {\n @apply bg-primary/10;\n }\n table.dataTable.display tbody tr:hover > .sorting_1,\n table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {\n @apply bg-muted;\n }\n table.dataTable.display tbody tr:hover > .sorting_2,\n table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {\n @apply bg-muted;\n }\n table.dataTable.display tbody tr:hover > .sorting_3,\n table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {\n @apply bg-muted;\n }\n table.dataTable.display tbody tr:hover.selected > .sorting_1,\n table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {\n @apply bg-primary/10;\n }\n table.dataTable.display tbody tr:hover.selected > .sorting_2,\n table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {\n @apply bg-primary/10;\n }\n table.dataTable.display tbody tr:hover.selected > .sorting_3,\n table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {\n @apply bg-primary/10;\n }\n table.dataTable.no-footer {\n @apply border-b-0;\n }\n table.dataTable.compact thead th,\n table.dataTable.compact thead td,\n table.dataTable.compact tfoot th,\n table.dataTable.compact tfoot td,\n table.dataTable.compact tbody th,\n table.dataTable.compact tbody td {\n @apply px-4 py-2;\n }\n\n table.dataTable th,\n table.dataTable td {\n @apply box-content border-y;\n }\n\n table.dataTable tr:last-child td {\n @apply !border-b-0;\n }\n\n /* Control feature layout */\n .dataTables_wrapper {\n @apply w-full overflow-x-auto;\n }\n\n /* Export button styles - v1 of datatables */\n .dataTables_wrapper .dt-buttons {\n @apply inline-flex flex-wrap items-center gap-2;\n button {\n @apply inline-flex h-9 items-center gap-2 whitespace-nowrap rounded-md border bg-background px-3 text-sm text-muted-foreground hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;\n }\n }\n /* V2 of datatables button styles. \n */\n .dt-buttons {\n @apply inline-flex flex-wrap items-center gap-2;\n button {\n @apply inline-flex h-9 items-center gap-2 whitespace-nowrap rounded-md border bg-background px-3 text-sm text-muted-foreground hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;\n }\n }\n\n /* Copy modal */\n .dt-button-info {\n @apply fixed inset-0 z-50 flex flex-col items-center justify-center bg-background/50 backdrop-blur;\n }\n\n /* Select box at bottom showing number of records being displayed - v1 of datatables */\n .dataTables_wrapper .dataTables_length {\n label {\n @apply inline-flex items-center gap-2 text-sm font-normal text-muted-foreground;\n select {\n @apply h-9 w-[70px] cursor-pointer rounded-md border border-border bg-background px-2 py-1 transition focus:border-primary focus:outline-none focus-visible:border-input focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background sm:text-sm;\n }\n }\n }\n /* Select box at the bottom showing how many items are being display - v2 */\n .dt-length {\n @apply inline-flex items-center gap-2;\n label {\n @apply text-sm font-normal text-muted-foreground;\n }\n select {\n @apply h-9 w-[70px] cursor-pointer rounded-md border border-border bg-background px-2 py-1 transition focus:border-primary focus:outline-none focus-visible:border-input focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background sm:text-sm;\n }\n }\n\n /* Search box at the top styles - v1 of datatables */\n .dataTables_wrapper .dataTables_filter {\n label {\n @apply inline-flex w-full cursor-pointer items-center gap-2 text-sm font-normal text-muted-foreground;\n input {\n @apply h-9 w-full rounded-md border border-border bg-background px-2 py-1 transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background focus-visible:border-input sm:text-sm;\n }\n }\n }\n\n /* Search box at the top styles -v2 */\n .dt-search {\n @apply flex items-center gap-3;\n label {\n @apply inline-flex cursor-pointer items-center gap-2 text-sm font-normal text-muted-foreground;\n }\n input {\n @apply h-9 w-full rounded-md border border-border bg-background px-2 py-1 transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background focus-visible:border-input sm:text-sm md:w-[50%] lg:w-[250px];\n }\n }\n\n /* Info text that shows `Showing X to XX of XXXX entries - v1 */\n .dataTables_wrapper .dataTables_info,\n .dt-info {\n @apply flex items-center gap-3 text-sm !text-muted-foreground;\n }\n\n /* Pagination button styles - v1 datatables */\n .dataTables_wrapper .dataTables_paginate {\n .paginate_button {\n @apply ml-1 box-border inline-flex h-9 min-w-[36px] cursor-pointer items-center justify-center rounded bg-transparent px-3 py-2 text-center text-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;\n }\n }\n /* Pagination button - v2 */\n .dt-paging-button {\n @apply ml-1 box-border inline-flex h-9 min-w-[36px] cursor-pointer items-center justify-center rounded bg-transparent px-3 py-2 text-center text-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;\n &.current,\n &:hover {\n @apply bg-muted;\n }\n &.disabled,\n &.disabled:hover,\n &.disabled:active {\n @apply pointer-events-none opacity-50;\n }\n }\n .dataTables_wrapper .dataTables_paginate .paginate_button.current,\n .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {\n @apply bg-muted;\n }\n .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,\n .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,\n .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {\n @apply pointer-events-none opacity-50;\n }\n .dataTables_wrapper .dataTables_paginate .paginate_button:hover {\n @apply bg-muted;\n }\n .dataTables_wrapper .dataTables_paginate .paginate_button:active {\n @apply bg-muted;\n }\n .dataTables_wrapper .dataTables_paginate .ellipsis,\n .dt-paging .ellipsis {\n @apply inline-flex h-8 min-w-[32px] items-start justify-center text-sm;\n }\n .dataTables_wrapper .dataTables_scroll {\n clear: both;\n }\n .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {\n -webkit-overflow-scrolling: touch;\n }\n .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th,\n .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td,\n .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th,\n .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {\n vertical-align: middle;\n }\n .dataTables_wrapper\n .dataTables_scroll\n div.dataTables_scrollBody\n > table\n > thead\n > tr\n > th\n > div.dataTables_sizing,\n .dataTables_wrapper\n .dataTables_scroll\n div.dataTables_scrollBody\n > table\n > thead\n > tr\n > td\n > div.dataTables_sizing,\n .dataTables_wrapper\n .dataTables_scroll\n div.dataTables_scrollBody\n > table\n > tbody\n > tr\n > th\n > div.dataTables_sizing,\n .dataTables_wrapper\n .dataTables_scroll\n div.dataTables_scrollBody\n > table\n > tbody\n > tr\n > td\n > div.dataTables_sizing {\n height: 0;\n overflow: hidden;\n margin: 0 !important;\n padding: 0 !important;\n }\n .dataTables_wrapper.no-footer .dataTables_scrollBody {\n @apply border-b;\n }\n .dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,\n .dataTables_wrapper.no-footer div.dataTables_scrollBody > table {\n border-bottom: none;\n }\n .dataTables_wrapper:after {\n visibility: hidden;\n display: block;\n content: "";\n clear: both;\n height: 0;\n }\n\n /* \n responsive styles\n */\n table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,\n table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,\n table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {\n cursor: default !important;\n }\n table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,\n table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,\n table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {\n display: none !important;\n }\n table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,\n table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {\n cursor: pointer;\n }\n\n table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,\n table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {\n @apply mr-2 inline-flex size-[14px] shrink-0 bg-[url(\'https://api.iconify.design/lucide:chevron-right.svg\')] bg-contain bg-center bg-no-repeat pb-[3px] content-[\'\'] dark:bg-[url(\'https://api.iconify.design/lucide:chevron-right.svg?color=white\')];\n }\n table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control.arrow-right::before,\n table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control.arrow-right::before {\n content: "◄";\n }\n table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,\n table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before,\n table.dataTable.dtr-inline.collapsed > tbody > tr.dtr-expanded > td.dtr-control:before,\n table.dataTable.dtr-inline.collapsed > tbody > tr.dtr-expanded > th.dtr-control:before {\n @apply mr-2 inline-block size-[14px] shrink-0 bg-[url(\'https://api.iconify.design/lucide:chevron-down.svg\')] bg-contain bg-center bg-no-repeat content-[\'\'] dark:bg-[url(\'https://api.iconify.design/lucide:chevron-down.svg?color=white\')];\n }\n table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control,\n table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control {\n padding-left: 0.333em;\n }\n table.dataTable.dtr-column > tbody > tr > td.dtr-control,\n table.dataTable.dtr-column > tbody > tr > th.dtr-control,\n table.dataTable.dtr-column > tbody > tr > td.control,\n table.dataTable.dtr-column > tbody > tr > th.control {\n cursor: pointer;\n }\n table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,\n table.dataTable.dtr-column > tbody > tr > th.dtr-control:before,\n table.dataTable.dtr-column > tbody > tr > td.control:before,\n table.dataTable.dtr-column > tbody > tr > th.control:before {\n @apply mr-2 inline-flex size-[14px] shrink-0 bg-[url(\'https://api.iconify.design/lucide:chevron-right.svg\')] bg-contain bg-center bg-no-repeat pb-[3px] content-[\'\'] dark:bg-[url(\'https://api.iconify.design/lucide:chevron-right.svg?color=white\')];\n }\n table.dataTable.dtr-column > tbody > tr > td.dtr-control.arrow-right::before,\n table.dataTable.dtr-column > tbody > tr > th.dtr-control.arrow-right::before,\n table.dataTable.dtr-column > tbody > tr > td.control.arrow-right::before,\n table.dataTable.dtr-column > tbody > tr > th.control.arrow-right::before {\n content: "◄";\n }\n table.dataTable.dtr-column > tbody > tr.parent td.dtr-control:before,\n table.dataTable.dtr-column > tbody > tr.parent th.dtr-control:before,\n table.dataTable.dtr-column > tbody > tr.parent td.control:before,\n table.dataTable.dtr-column > tbody > tr.parent th.control:before,\n table.dataTable.dtr-column > tbody > tr.dtr-expanded td.dtr-control:before,\n table.dataTable.dtr-column > tbody > tr.dtr-expanded th.dtr-control:before,\n table.dataTable.dtr-column > tbody > tr.dtr-expanded td.control:before,\n table.dataTable.dtr-column > tbody > tr.dtr-expanded th.control:before {\n @apply mr-2 inline-block size-[14px] shrink-0 bg-[url(\'https://api.iconify.design/lucide:chevron-down.svg\')] bg-contain bg-center bg-no-repeat content-[\'\'] dark:bg-[url(\'https://api.iconify.design/lucide:chevron-down.svg?color=white\')];\n }\n\n table.dataTable > tbody td.child {\n @apply p-0;\n }\n table.dataTable > tbody > tr.child:hover,\n table.dataTable > tbody > tr.child:hover > td.child {\n background: transparent !important;\n }\n table.dataTable > tbody > tr.child ul.dtr-details {\n @apply m-0 block w-full list-none p-0;\n }\n table.dataTable > tbody > tr.child ul.dtr-details > li {\n @apply flex items-center gap-6 border-b p-3 px-7 hover:bg-muted;\n }\n\n table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {\n @apply border-b-0;\n }\n table.dataTable > tbody > tr.child span.dtr-title {\n @apply inline-block min-w-[80px] font-bold;\n }\n /* Responsive modal */\n div.dtr-modal {\n @apply fixed left-0 top-0 z-[1000] box-border size-full;\n }\n div.dtr-modal div.dtr-modal-display {\n @apply absolute left-1/2 top-1/2 z-[102] max-h-[80%] w-full max-w-screen-sm -translate-x-1/2 -translate-y-1/2 overflow-y-auto rounded-md border bg-background p-4 md:px-7 md:py-4 lg:max-h-[90%];\n }\n div.dtr-modal div.dtr-modal-content {\n @apply relative flex flex-col p-0 text-[15px];\n h2 {\n @apply text-lg font-semibold text-foreground;\n }\n table tr td {\n @apply space-x-10 pb-2 first:font-semibold [&:nth-child(2)]:pl-2;\n }\n }\n div.dtr-modal div.dtr-modal-close {\n @apply absolute right-2 top-2 z-[10] inline-flex size-6 cursor-pointer items-center justify-center rounded-md bg-muted/10 hover:bg-muted;\n }\n div.dtr-modal div.dtr-modal-background {\n @apply fixed inset-0 z-[101] bg-background/20 backdrop-blur;\n }\n\n /* Search Builder Styles */\n div.dt-button-collection {\n overflow: visible !important;\n z-index: 2002 !important;\n }\n div.dt-button-collection div.dtsb-searchBuilder {\n padding-left: 1em !important;\n padding-right: 1em !important;\n }\n div.dt-button-collection.dtb-collection-closeable div.dtsb-titleRow {\n padding-right: 40px;\n }\n .dtsb-greyscale {\n @apply !border;\n }\n div.dtsb-logicContainer .dtsb-greyscale {\n border: none !important;\n }\n div.dtsb-searchBuilder {\n @apply mb-4 cursor-default justify-evenly text-left;\n }\n div.dtsb-searchBuilder button.dtsb-button,\n div.dtsb-searchBuilder select {\n @apply text-sm;\n }\n div.dtsb-searchBuilder div.dtsb-titleRow {\n @apply mb-3 flex items-center justify-between;\n }\n div.dtsb-searchBuilder div.dtsb-titleRow div.dtsb-title {\n @apply inline-block text-sm font-normal;\n }\n div.dtsb-searchBuilder div.dtsb-titleRow div.dtsb-title:empty {\n display: inline;\n }\n div.dtsb-searchBuilder div.dtsb-vertical .dtsb-value,\n div.dtsb-searchBuilder div.dtsb-vertical .dtsb-data,\n div.dtsb-searchBuilder div.dtsb-vertical .dtsb-condition {\n display: block;\n }\n div.dtsb-searchBuilder div.dtsb-group {\n @apply relative clear-both mb-4;\n }\n div.dtsb-searchBuilder div.dtsb-group button.dtsb-search {\n float: right;\n }\n div.dtsb-searchBuilder div.dtsb-group button.dtsb-clearGroup {\n margin: 2px;\n text-align: center;\n padding: 0;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer {\n -webkit-transform: rotate(90deg);\n -moz-transform: rotate(90deg);\n -o-transform: rotate(90deg);\n -ms-transform: rotate(90deg);\n transform: rotate(90deg);\n position: absolute;\n margin-top: 0.8em;\n margin-right: 0.8em;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria {\n margin-bottom: 0.8em;\n display: flex;\n justify-content: flex-start;\n flex-flow: row wrap;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input {\n padding: 0.4em;\n margin-right: 0.8em;\n min-width: 5em;\n max-width: 20em;\n color: inherit;\n }\n div.dtsb-searchBuilder\n div.dtsb-group\n div.dtsb-criteria\n select.dtsb-dropDown\n option.dtsb-notItalic,\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input option.dtsb-notItalic {\n font-style: normal;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-italic {\n font-style: italic;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont {\n flex: 1;\n white-space: nowrap;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont span.dtsp-joiner {\n margin-right: 0.8em;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont input.dtsb-value {\n width: 33%;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont select,\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont input {\n height: 100%;\n box-sizing: border-box;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer {\n margin-left: auto;\n display: inline-block;\n }\n div.dtsb-searchBuilder\n div.dtsb-group\n div.dtsb-criteria\n div.dtsb-buttonContainer\n button.dtsb-delete,\n div.dtsb-searchBuilder\n div.dtsb-group\n div.dtsb-criteria\n div.dtsb-buttonContainer\n button.dtsb-right,\n div.dtsb-searchBuilder\n div.dtsb-group\n div.dtsb-criteria\n div.dtsb-buttonContainer\n button.dtsb-left {\n margin-right: 0.8em;\n }\n div.dtsb-searchBuilder\n div.dtsb-group\n div.dtsb-criteria\n div.dtsb-buttonContainer\n button.dtsb-delete:last-child,\n div.dtsb-searchBuilder\n div.dtsb-group\n div.dtsb-criteria\n div.dtsb-buttonContainer\n button.dtsb-right:last-child,\n div.dtsb-searchBuilder\n div.dtsb-group\n div.dtsb-criteria\n div.dtsb-buttonContainer\n button.dtsb-left:last-child {\n margin-right: 0;\n }\n @media screen and (max-width: 550px) {\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria {\n display: flex;\n flex-flow: none;\n flex-direction: column;\n justify-content: flex-start;\n padding-right: calc(35px + 0.8em);\n margin-bottom: 0px;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:first-child),\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:nth-child(2)),\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:last-child) {\n padding-top: 0.8em;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:first-child,\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:nth-child(2),\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:last-child {\n padding-top: 0em;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input {\n max-width: none;\n width: 100%;\n margin-bottom: 0.8em;\n margin-right: 0.8em;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont {\n margin-right: 0.8em;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer {\n position: absolute;\n width: 35px;\n display: flex;\n flex-wrap: wrap-reverse;\n right: 0;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button {\n margin-right: 0px !important;\n }\n }\n div.dtsb-searchBuilder button,\n div.dtsb-searchBuilder select.dtsb-dropDown,\n div.dtsb-searchBuilder input {\n @apply bg-background;\n }\n div.dtsb-searchBuilder button.dtsb-button {\n @apply relative box-border inline-flex h-9 cursor-pointer select-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-md border bg-background px-3 py-2 text-sm font-normal text-muted-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;\n }\n div.dtsb-searchBuilder button.dtsb-button:hover {\n @apply cursor-pointer bg-muted;\n }\n div.dtsb-searchBuilder div.dtsb-logicContainer {\n @apply overflow-hidden rounded-none border;\n }\n div.dtsb-searchBuilder div.dtsb-logicContainer button {\n @apply rounded-md border-transparent bg-transparent;\n }\n div.dtsb-searchBuilder button.dtsb-clearGroup {\n min-width: 2em;\n padding: 0;\n }\n div.dtsb-searchBuilder button.dtsb-iptbtn {\n min-width: 100px;\n text-align: left;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer {\n @apply flex flex-row content-start items-start justify-start rounded-md;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-logic {\n @apply m-0 shrink-0 grow rounded-none border-0;\n flex-basis: 3em;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-clearGroup {\n border: none;\n border-radius: 0px;\n width: 2em;\n margin: 0px;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input {\n @apply rounded-md border;\n }\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-condition,\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-data,\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-value {\n @apply rounded-md border border-input bg-background text-sm transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background focus-visible:border-input;\n }\n\n div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-value {\n @apply rounded-md border border-input bg-background text-sm transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background focus-visible:border-input;\n }\n\n /* Col vis styles */\n .dt-button-background {\n @apply fixed inset-0 z-50 flex flex-col items-center justify-center bg-background/50 backdrop-blur-sm;\n }\n .dt-button-down-arrow {\n @apply text-[10px];\n }\n .dt-button-collection {\n @apply relative;\n [role="menu"] {\n @apply absolute -left-20 top-7 flex min-w-[200px] flex-col rounded-md border bg-background py-2 shadow before:mx-2 before:mb-2 before:text-xs before:text-muted-foreground/70 before:content-[\'Select_columns\'];\n button {\n @apply h-8 rounded-none border-none px-4 text-xs;\n }\n .dt-button.buttons-columnVisibility.dt-button-active {\n @apply text-foreground after:ml-auto after:content-[\'✓\'];\n }\n }\n }\n</style>\n',
|
|
830
|
-
},
|
|
831
|
-
],
|
|
832
|
-
utils: [],
|
|
833
|
-
composables: [],
|
|
834
|
-
},
|
|
835
|
-
{
|
|
836
|
-
name: "Date Field",
|
|
837
|
-
value: "date-field",
|
|
838
|
-
deps: ["@internationalized/date"],
|
|
839
|
-
files: [
|
|
840
|
-
{
|
|
841
|
-
fileName: "DateField.vue",
|
|
842
|
-
dirPath: "app/components/Ui",
|
|
843
|
-
fileContent:
|
|
844
|
-
'<template>\n <DateFieldRoot\n v-slot="{ segments }"\n v-bind="props"\n v-model="localModel"\n :class="styles({ class: props.class })"\n >\n <template v-for="item in segments" :key="item.part">\n <DateFieldInput\n v-if="item.part === \'literal\'"\n :part="item.part"\n class="inline-flex items-center justify-center text-muted-foreground"\n >\n <Icon v-if="separatorIcon" :name="separatorIcon" class="text-muted-foreground" />\n <span v-else-if="separator" class="mx-1 text-muted-foreground">{{ separator }}</span>\n </DateFieldInput>\n <DateFieldInput\n v-else\n :part="item.part"\n class="inline-flex cursor-text items-center rounded px-1 transition focus:outline-none focus:ring-1 focus:ring-ring aria-[valuetext=Empty]:text-muted-foreground"\n >\n {{ item.value }}\n </DateFieldInput>\n </template>\n </DateFieldRoot>\n</template>\n\n<script lang="ts" setup>\n import { DateFieldInput, DateFieldRoot } from "radix-vue";\n import type { DateValue } from "@internationalized/date";\n import type { DateFieldRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n DateFieldRootProps & {\n class?: any;\n separator?: string;\n separatorIcon?: string;\n }\n >(),\n {\n separator: "/",\n }\n );\n const localModel = defineModel<DateValue>();\n\n const styles = tv({\n base: "h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-[16px] ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground file:hover:cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[disabled]:cursor-not-allowed data-[invalid]:border-destructive data-[disabled]:opacity-50 sm:text-sm",\n });\n</script>\n',
|
|
845
|
-
},
|
|
846
|
-
],
|
|
847
|
-
utils: [],
|
|
848
|
-
composables: [],
|
|
849
|
-
plugins: [],
|
|
850
|
-
},
|
|
851
|
-
{
|
|
852
|
-
name: "Datepicker",
|
|
853
|
-
value: "datepicker",
|
|
854
|
-
devDeps: ["@samk-dev/nuxt-vcalendar"],
|
|
855
|
-
nuxtModules: ["@samk-dev/nuxt-vcalendar"],
|
|
856
|
-
instructions: [
|
|
857
|
-
"You can customize the datepicker by adding options to your nuxt.config.js file",
|
|
858
|
-
],
|
|
859
|
-
files: [
|
|
860
|
-
{
|
|
861
|
-
fileName: "Datepicker.vue",
|
|
862
|
-
dirPath: "app/components/Ui",
|
|
863
|
-
fileContent:
|
|
864
|
-
'<template>\n <ClientOnly>\n <VDatePicker\n :trim-weeks="props.trimWeeks || true"\n :is-dark="$colorMode.value == \'dark\'"\n v-bind="$attrs"\n >\n <template v-for="(_, slot) in $slots" #[slot]="scope">\n <slot :name="slot" v-bind="scope" />\n </template>\n </VDatePicker>\n </ClientOnly>\n</template>\n\n<script lang="ts" setup>\n import type { Calendar, DatePicker } from "v-calendar";\n\n defineOptions({ inheritAttrs: false });\n\n // @ts-expect-error - This is a hacky way to get the props from the Calendar and DatePicker components\n interface Props\n extends /* @vue-ignore */ Partial<InstanceType<typeof Calendar>["$props"]>,\n /* @vue-ignore */ Omit<Partial<InstanceType<typeof DatePicker>["$props"]>, "attributes"> {}\n\n const props = defineProps<Props & { trimWeeks?: boolean }>();\n</script>\n\n<style>\n :root {\n --vc-font-family: var(--font-sans);\n --vc-rounded-full: var(--radius);\n --vc-font-bold: 500;\n --vc-font-semibold: 600;\n --vc-text-lg: 16px;\n }\n\n .vc-light,\n .vc-dark {\n --vc-bg: theme("colors.background");\n --vc-border: theme("colors.border");\n --vc-focus-ring: 0 0 0 3px hsl(var(--primary) / 30%);\n --vc-weekday-color: theme("colors.muted.foreground");\n --vc-popover-content-color: theme("colors.popover.foreground");\n --vc-hover-bg: theme("colors.accent.DEFAULT");\n --vc-popover-content-bg: theme("colors.popover.DEFAULT");\n --vc-popover-content-border: theme("colors.border");\n --vc-header-arrow-hover-bg: theme("colors.accent.DEFAULT");\n --vc-weeknumber-color: theme("colors.muted.foreground");\n --vc-nav-hover-bg: theme("colors.accent.DEFAULT");\n --vc-time-year-color: theme("colors.foreground");\n --vc-time-weekday-color: theme("colors.foreground");\n --vc-time-month-color: theme("colors.foreground");\n --vc-time-day-color: theme("colors.foreground");\n\n --vc-nav-item-active-color: theme("colors.primary.foreground");\n --vc-nav-item-active-bg: theme("colors.primary.DEFAULT");\n\n --vc-time-select-group-bg: theme("colors.background");\n --vc-time-select-group-border: theme("colors.border");\n --vc-time-picker-border: theme("colors.border");\n\n &.vc-attr,\n & .vc-attr {\n --vc-content-color: theme("colors.primary.DEFAULT");\n --vc-highlight-outline-bg: theme("colors.primary.DEFAULT");\n --vc-highlight-outline-border: theme("colors.primary.DEFAULT");\n --vc-highlight-outline-content-color: theme("colors.primary.foreground");\n --vc-highlight-light-bg: var(--vc-accent-200); /* Highlighted color between two dates */\n --vc-highlight-light-content-color: theme("colors.secondary.foreground");\n --vc-highlight-solid-bg: theme("colors.primary.DEFAULT");\n --vc-highlight-solid-content-color: theme("colors.primary.foreground");\n }\n }\n\n .vc-blue {\n --vc-accent-200: theme("colors.primary.DEFAULT / 20%");\n --vc-accent-400: theme("colors.primary.DEFAULT");\n --vc-accent-500: theme("colors.primary.DEFAULT");\n --vc-accent-600: theme("colors.primary.DEFAULT / 70%");\n }\n\n .dark {\n .vc-blue {\n --vc-accent-200: theme("colors.primary.DEFAULT / 20%");\n --vc-accent-400: theme("colors.primary.DEFAULT");\n --vc-accent-500: theme("colors.primary.DEFAULT / 70%");\n }\n }\n .vc-header .vc-title {\n @apply font-medium;\n }\n .vc-weekdays {\n @apply my-2 font-normal;\n }\n .vc-day-content,\n .vc-day,\n .vc-highlight {\n @apply h-9 w-9 rounded-md;\n }\n .vc-focus {\n @apply focus-within:shadow-none;\n }\n .vc-day {\n @apply mb-1.5;\n }\n\n .vc-base-icon {\n @apply h-4 w-4 stroke-1;\n }\n .vc-header .vc-arrow,\n .vc-nav-arrow {\n @apply h-7 w-7 rounded-md;\n border: 1px solid hsl(var(--border));\n }\n .vc-header .vc-prev,\n .vc-header .vc-next {\n @apply border;\n }\n .weekday-position-1 .vc-highlights {\n @apply rounded-l-md;\n }\n .weekday-position-7 .vc-highlights {\n @apply rounded-r-md;\n }\n .vc-highlight-bg-light {\n @apply bg-accent;\n }\n .vc-nav-item {\n @apply font-medium;\n }\n .vc-header .vc-title-wrapper {\n @apply decoration-accent-foreground/60 underline-offset-2 hover:underline;\n }\n .vc-highlights + .vc-day-content {\n @apply hover:bg-accent/5;\n }\n</style>\n',
|
|
865
|
-
},
|
|
866
|
-
],
|
|
867
|
-
utils: [],
|
|
868
|
-
composables: [],
|
|
869
|
-
plugins: [],
|
|
870
|
-
},
|
|
871
|
-
{
|
|
872
|
-
name: "Description List",
|
|
873
|
-
value: "description-list",
|
|
874
|
-
files: [
|
|
875
|
-
{
|
|
876
|
-
fileName: "DescriptionList/DescriptionList.vue",
|
|
877
|
-
dirPath: "app/components/Ui",
|
|
878
|
-
fileContent:
|
|
879
|
-
'<template>\n <Primitive\n v-bind="reactiveOmit(props, \'class\')"\n :class="descriptionListDetailsStyles({ class: props.class })"\n >\n <slot />\n </Primitive>\n</template>\n<script lang="ts">\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n export type DescriptionDetailsProps = PrimitiveProps & {\n class?: any;\n };\n\n export const descriptionListDetailsStyles = tv({\n base: "grid grid-cols-1 text-base/6 sm:grid-cols-2 sm:text-sm/6",\n });\n</script>\n\n<script lang="ts" setup>\n const props = withDefaults(defineProps<DescriptionDetailsProps>(), {\n as: "dl",\n });\n</script>\n',
|
|
880
|
-
},
|
|
881
|
-
{
|
|
882
|
-
fileName: "DescriptionList/Details.vue",
|
|
883
|
-
dirPath: "app/components/Ui",
|
|
884
|
-
fileContent:
|
|
885
|
-
'<template>\n <Primitive\n v-bind="reactiveOmit(props, \'class\', \'text\')"\n :class="descriptionListDetailsStyles({ class: props.class })"\n >\n <slot>{{ text }}</slot>\n </Primitive>\n</template>\n<script lang="ts">\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n export type DescriptionDetailsProps = PrimitiveProps & {\n text?: string;\n class?: any;\n };\n\n export const descriptionListDetailsStyles = tv({\n base: "pb-3 pt-1 text-foreground sm:border-t sm:py-3 sm:[&:nth-child(2)]:border-none",\n });\n</script>\n\n<script lang="ts" setup>\n const props = withDefaults(defineProps<DescriptionDetailsProps>(), {\n as: "dd",\n });\n</script>\n',
|
|
886
|
-
},
|
|
887
|
-
{
|
|
888
|
-
fileName: "DescriptionList/Term.vue",
|
|
889
|
-
dirPath: "app/components/Ui",
|
|
890
|
-
fileContent:
|
|
891
|
-
'<template>\n <Primitive\n v-bind="reactiveOmit(props, \'class\', \'text\')"\n :class="descriptionListDetailsStyles({ class: props.class })"\n >\n <slot>{{ text }}</slot>\n </Primitive>\n</template>\n<script lang="ts">\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n export type DescriptionDetailsProps = PrimitiveProps & {\n text?: string;\n class?: any;\n };\n\n export const descriptionListDetailsStyles = tv({\n base: "border-t pt-3 text-muted-foreground first:border-none sm:py-3",\n });\n</script>\n\n<script lang="ts" setup>\n const props = withDefaults(defineProps<DescriptionDetailsProps>(), {\n as: "dt",\n });\n</script>\n',
|
|
892
|
-
},
|
|
893
|
-
],
|
|
894
|
-
utils: [],
|
|
895
|
-
composables: [],
|
|
896
|
-
plugins: [],
|
|
897
|
-
},
|
|
898
|
-
{
|
|
899
|
-
name: "Dialog",
|
|
900
|
-
value: "dialog",
|
|
901
|
-
files: [
|
|
902
|
-
{
|
|
903
|
-
fileName: "Dialog/Close.vue",
|
|
904
|
-
dirPath: "app/components/Ui",
|
|
905
|
-
fileContent:
|
|
906
|
-
'<template>\n <DialogClose v-bind="props">\n <slot />\n </DialogClose>\n</template>\n\n<script lang="ts" setup>\n import { DialogClose } from "radix-vue";\n import type { DialogCloseProps } from "radix-vue";\n\n const props = defineProps<DialogCloseProps>();\n</script>\n',
|
|
907
|
-
},
|
|
908
|
-
{
|
|
909
|
-
fileName: "Dialog/Content.vue",
|
|
910
|
-
dirPath: "app/components/Ui",
|
|
911
|
-
fileContent:
|
|
912
|
-
'<template>\n <UiDialogPortal :to="to">\n <UiDialogOverlay />\n <DialogContent :class="styles({ class: props.class })" v-bind="{ ...forwarded, ...$attrs }">\n <slot>\n <slot name="header">\n <UiDialogHeader>\n <slot name="title">\n <UiDialogTitle v-if="title" :title="title" />\n </slot>\n <slot name="description">\n <UiDialogDescription v-if="description" :description="description" />\n </slot>\n </UiDialogHeader>\n </slot>\n <slot name="content" />\n <slot name="footer" />\n </slot>\n <slot name="close" />\n <UiDialogClose\n v-if="!hideClose"\n class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"\n >\n <Icon name="lucide:x" class="h-4 w-4" mode="svg" />\n <span class="sr-only">Close</span>\n </UiDialogClose>\n </DialogContent>\n </UiDialogPortal>\n</template>\n\n<script lang="ts" setup>\n import { DialogContent, useForwardPropsEmits } from "radix-vue";\n import type { DialogContentEmits, DialogContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n const props = defineProps<\n DialogContentProps & {\n /** Icon to display in the close button */\n icon?: string;\n /** Title text */\n title?: string;\n /** Description text */\n description?: string;\n /** Custom class(es) to add to the parent */\n class?: any;\n /** Whether to hide the close button */\n hideClose?: boolean;\n /** Where to render the dialog */\n to?: string | HTMLElement;\n }\n >();\n const emits = defineEmits<DialogContentEmits>();\n const forwarded = useForwardPropsEmits(\n reactiveOmit(props, "icon", "title", "description", "class", "hideClose", "to"),\n emits\n );\n\n const styles = tv({\n base: "fixed left-[50%] top-[50%] z-50 grid max-h-[calc(100%-4rem)] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",\n });\n</script>\n',
|
|
913
|
-
},
|
|
914
|
-
{
|
|
915
|
-
fileName: "Dialog/Description.vue",
|
|
916
|
-
dirPath: "app/components/Ui",
|
|
917
|
-
fileContent:
|
|
918
|
-
'<template>\n <DialogDescription :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>{{ description }}</slot>\n </DialogDescription>\n</template>\n\n<script lang="ts" setup>\n import { DialogDescription } from "radix-vue";\n import type { DialogDescriptionProps } from "radix-vue";\n\n const props = defineProps<\n DialogDescriptionProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The description text */\n description?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "description");\n const styles = tv({\n base: "text-base text-muted-foreground md:text-sm",\n });\n</script>\n',
|
|
919
|
-
},
|
|
920
|
-
{
|
|
921
|
-
fileName: "Dialog/Dialog.vue",
|
|
922
|
-
dirPath: "app/components/Ui",
|
|
923
|
-
fileContent:
|
|
924
|
-
'<template>\n <DialogRoot v-bind="forwarded">\n <slot />\n </DialogRoot>\n</template>\n\n<script lang="ts" setup>\n import { DialogRoot, useForwardPropsEmits } from "radix-vue";\n import type { DialogRootEmits, DialogRootProps } from "radix-vue";\n\n const props = defineProps<DialogRootProps>();\n const emit = defineEmits<DialogRootEmits>();\n const forwarded = useForwardPropsEmits(props, emit);\n</script>\n',
|
|
925
|
-
},
|
|
926
|
-
{
|
|
927
|
-
fileName: "Dialog/Footer.vue",
|
|
928
|
-
dirPath: "app/components/Ui",
|
|
929
|
-
fileContent:
|
|
930
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n as: "div",\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2",\n });\n</script>\n',
|
|
931
|
-
},
|
|
932
|
-
{
|
|
933
|
-
fileName: "Dialog/Header.vue",
|
|
934
|
-
dirPath: "app/components/Ui",
|
|
935
|
-
fileContent:
|
|
936
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n as: "div",\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex flex-col space-y-1.5 text-center sm:text-left",\n });\n</script>\n',
|
|
937
|
-
},
|
|
938
|
-
{
|
|
939
|
-
fileName: "Dialog/Overlay.vue",
|
|
940
|
-
dirPath: "app/components/Ui",
|
|
941
|
-
fileContent:
|
|
942
|
-
'<template>\n <DialogOverlay :class="styles({ class: props.class })" v-bind="forwarded" />\n</template>\n\n<script lang="ts" setup>\n import { DialogOverlay } from "radix-vue";\n import type { DialogOverlayProps } from "radix-vue";\n\n const props = defineProps<\n DialogOverlayProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=closed]:animate-fadeOut data-[state=open]:animate-fadeIn",\n });\n</script>\n',
|
|
943
|
-
},
|
|
944
|
-
{
|
|
945
|
-
fileName: "Dialog/Portal.vue",
|
|
946
|
-
dirPath: "app/components/Ui",
|
|
947
|
-
fileContent:
|
|
948
|
-
'<template>\n <DialogPortal v-bind="props">\n <slot />\n </DialogPortal>\n</template>\n\n<script lang="ts" setup>\n import { DialogPortal } from "radix-vue";\n import type { DialogPortalProps } from "radix-vue";\n\n const props = defineProps<DialogPortalProps>();\n</script>\n',
|
|
949
|
-
},
|
|
950
|
-
{
|
|
951
|
-
fileName: "Dialog/Title.vue",
|
|
952
|
-
dirPath: "app/components/Ui",
|
|
953
|
-
fileContent:
|
|
954
|
-
'<template>\n <DialogTitle :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>{{ title }}</slot>\n </DialogTitle>\n</template>\n\n<script lang="ts" setup>\n import { DialogTitle } from "radix-vue";\n import type { DialogTitleProps } from "radix-vue";\n\n const props = defineProps<\n DialogTitleProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The title text */\n title?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "title");\n const styles = tv({\n base: "text-xl font-semibold leading-none tracking-tight md:text-lg",\n });\n</script>\n',
|
|
955
|
-
},
|
|
956
|
-
{
|
|
957
|
-
fileName: "Dialog/Trigger.vue",
|
|
958
|
-
dirPath: "app/components/Ui",
|
|
959
|
-
fileContent:
|
|
960
|
-
'<template>\n <DialogTrigger v-bind="props">\n <slot />\n </DialogTrigger>\n</template>\n\n<script lang="ts" setup>\n import { DialogTrigger } from "radix-vue";\n import type { DialogTriggerProps } from "radix-vue";\n\n const props = defineProps<DialogTriggerProps>();\n</script>\n',
|
|
961
|
-
},
|
|
962
|
-
],
|
|
963
|
-
utils: [],
|
|
964
|
-
composables: [],
|
|
965
|
-
plugins: [],
|
|
966
|
-
},
|
|
967
|
-
{
|
|
968
|
-
name: "Divider",
|
|
969
|
-
value: "divider",
|
|
970
|
-
components: ["avatar"],
|
|
971
|
-
files: [
|
|
972
|
-
{
|
|
973
|
-
fileName: "Divider.vue",
|
|
974
|
-
dirPath: "app/components/Ui",
|
|
975
|
-
fileContent:
|
|
976
|
-
'<template>\n <Primitive as="div" :class="base({ orientation, type, class: props.class })">\n <Separator :orientation="orientation" :class="border({ orientation, type })" />\n <template v-if="label || icon || avatar || $slots.default">\n <div :class="container({ orientation, type })">\n <slot>\n <slot name="label">\n <span v-if="label" :class="labelClass({ orientation, type })">\n {{ label }}\n </span>\n </slot>\n <slot name="icon">\n <Icon v-if="icon" :name="icon" :class="iconClass({ orientation, type })" />\n </slot>\n <slot name="avatar">\n <UiAvatar v-if="avatar" :src="avatar" />\n </slot>\n </slot>\n </div>\n </template>\n <Separator :orientation="orientation" :class="border({ orientation, type })" />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive, Separator } from "radix-vue";\n\n const props = defineProps<{\n class?: any;\n type?: VariantProps<typeof style>["type"];\n orientation?: VariantProps<typeof style>["orientation"];\n icon?: string;\n label?: string;\n avatar?: string;\n }>();\n\n const style = tv({\n slots: {\n base: "flex w-full items-center text-center align-middle",\n container: "flex font-medium",\n border: "flex border-border",\n icon: "h-5 w-5 shrink-0",\n label: "text-sm",\n },\n variants: {\n orientation: {\n horizontal: {\n base: "flex-row",\n container: "mx-3 whitespace-nowrap",\n border: "w-full border-t",\n },\n vertical: {\n base: "h-full flex-col",\n container: "my-3",\n border: "h-full border-s",\n },\n },\n type: {\n solid: {\n border: "border-solid",\n },\n dashed: {\n border: "border-dashed",\n },\n dotted: {\n border: "border-dotted",\n },\n },\n },\n defaultVariants: {\n orientation: "horizontal",\n type: "solid",\n },\n });\n\n const { base, border, container, icon: iconClass, label: labelClass } = style();\n</script>\n',
|
|
977
|
-
},
|
|
978
|
-
],
|
|
979
|
-
utils: [],
|
|
980
|
-
composables: [],
|
|
981
|
-
plugins: [],
|
|
982
|
-
},
|
|
983
|
-
{
|
|
984
|
-
name: "Drawer",
|
|
985
|
-
value: "drawer",
|
|
986
|
-
deps: ["vaul-vue"],
|
|
987
|
-
files: [
|
|
988
|
-
{
|
|
989
|
-
fileName: "Drawer/Close.vue",
|
|
990
|
-
dirPath: "app/components/Ui",
|
|
991
|
-
fileContent:
|
|
992
|
-
'<template>\n <DrawerClose v-bind="props">\n <slot />\n </DrawerClose>\n</template>\n\n<script lang="ts" setup>\n import { DrawerClose } from "vaul-vue";\n\n interface Props\n extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerClose>, "$props">> {}\n const props = defineProps<Props>();\n</script>\n',
|
|
993
|
-
},
|
|
994
|
-
{
|
|
995
|
-
fileName: "Drawer/Content.vue",
|
|
996
|
-
dirPath: "app/components/Ui",
|
|
997
|
-
fileContent:
|
|
998
|
-
'<template>\n <UiDrawerPortal>\n <slot name="overlay">\n <UiDrawerOverlay />\n </slot>\n <slot name="content">\n <DrawerContent v-bind="{ ...props, ...$attrs }" :class="styles({ class: props.class })">\n <slot name="knob">\n <div\n class="mx-auto my-5 h-2 w-[60px] shrink-0 cursor-grab rounded-full bg-muted active:cursor-grabbing"\n />\n </slot>\n <slot />\n </DrawerContent>\n </slot>\n </UiDrawerPortal>\n</template>\n\n<script lang="ts" setup>\n import { DrawerContent } from "vaul-vue";\n\n defineOptions({ inheritAttrs: false });\n\n interface Props\n extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerContent>, "$props">> {}\n\n const props = defineProps<Props & { class?: any }>();\n const styles = tv({\n base: "fixed bottom-0 left-0 right-0 z-50 mt-24 flex h-auto max-h-[95%] flex-col rounded-t-[10px] border bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary/40",\n });\n</script>\n',
|
|
999
|
-
},
|
|
1000
|
-
{
|
|
1001
|
-
fileName: "Drawer/Description.vue",
|
|
1002
|
-
dirPath: "app/components/Ui",
|
|
1003
|
-
fileContent:
|
|
1004
|
-
'<template>\n <DrawerDescription v-bind="props" :class="styles({ class: props.class })">\n <slot>\n {{ props.text }}\n </slot>\n </DrawerDescription>\n</template>\n\n<script lang="ts" setup>\n import { DrawerDescription } from "vaul-vue";\n\n interface Props\n extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerDescription>, "$props">> {\n class?: any;\n text?: string;\n }\n\n const props = defineProps<Props>();\n\n const styles = tv({\n base: "text-sm text-muted-foreground",\n });\n</script>\n',
|
|
1005
|
-
},
|
|
1006
|
-
{
|
|
1007
|
-
fileName: "Drawer/Drawer.vue",
|
|
1008
|
-
dirPath: "app/components/Ui",
|
|
1009
|
-
fileContent:
|
|
1010
|
-
'<template>\n <DrawerRoot v-bind="forwarded">\n <slot />\n </DrawerRoot>\n</template>\n\n<script lang="ts" setup>\n import { useForwardPropsEmits } from "radix-vue";\n import { DrawerRoot } from "vaul-vue";\n import type { DrawerRootEmits, DrawerRootProps } from "vaul-vue";\n\n const props = defineProps<DrawerRootProps>();\n const emits = defineEmits<DrawerRootEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
1011
|
-
},
|
|
1012
|
-
{
|
|
1013
|
-
fileName: "Drawer/Footer.vue",
|
|
1014
|
-
dirPath: "app/components/Ui",
|
|
1015
|
-
fileContent:
|
|
1016
|
-
'<template>\n <Primitive v-bind="forwarded" :class="drawerFooterStyles({ class: props.class })">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts">\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive, useForwardProps } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n export const drawerFooterStyles = tv({\n base: "mt-auto flex flex-col gap-2 p-4",\n });\n\n export type DrawerHeaderProps = PrimitiveProps & {\n /**\n * Classes to add to the parent.\n */\n class?: any;\n };\n</script>\n\n<script lang="ts" setup>\n const props = withDefaults(defineProps<DrawerHeaderProps>(), {\n as: "div",\n });\n const forwarded = useForwardProps(reactiveOmit(props, ["class"]));\n</script>\n',
|
|
1017
|
-
},
|
|
1018
|
-
{
|
|
1019
|
-
fileName: "Drawer/Header.vue",
|
|
1020
|
-
dirPath: "app/components/Ui",
|
|
1021
|
-
fileContent:
|
|
1022
|
-
'<template>\n <Primitive v-bind="forwarded" :class="drawerHeaderStyles({ class: props.class })">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts">\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive, useForwardProps } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n export const drawerHeaderStyles = tv({\n base: "grid gap-1.5 p-4 text-center sm:text-left",\n });\n\n export type DrawerHeaderProps = PrimitiveProps & {\n /**\n * Classes to add to the header.\n */\n class?: any;\n };\n</script>\n<script lang="ts" setup>\n const props = withDefaults(defineProps<DrawerHeaderProps>(), {\n as: "div",\n });\n const forwarded = useForwardProps(reactiveOmit(props, ["class"]));\n</script>\n',
|
|
1023
|
-
},
|
|
1024
|
-
{
|
|
1025
|
-
fileName: "Drawer/Overlay.vue",
|
|
1026
|
-
dirPath: "app/components/Ui",
|
|
1027
|
-
fileContent:
|
|
1028
|
-
'<template>\n <DrawerOverlay v-bind="props" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { DrawerOverlay } from "vaul-vue";\n\n interface Props\n extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerOverlay>, "$props">> {}\n\n const props = defineProps<Props & { class?: any }>();\n\n const styles = tv({\n base: "fixed inset-0 z-50 bg-black/40 backdrop-blur",\n });\n</script>\n',
|
|
1029
|
-
},
|
|
1030
|
-
{
|
|
1031
|
-
fileName: "Drawer/Portal.vue",
|
|
1032
|
-
dirPath: "app/components/Ui",
|
|
1033
|
-
fileContent:
|
|
1034
|
-
'<template>\n <DrawerPortal v-bind="props">\n <slot />\n </DrawerPortal>\n</template>\n\n<script lang="ts" setup>\n import { DrawerPortal } from "vaul-vue";\n\n interface Props\n extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerPortal>, "$props">> {}\n\n const props = defineProps<Props>();\n</script>\n',
|
|
1035
|
-
},
|
|
1036
|
-
{
|
|
1037
|
-
fileName: "Drawer/Title.vue",
|
|
1038
|
-
dirPath: "app/components/Ui",
|
|
1039
|
-
fileContent:
|
|
1040
|
-
'<template>\n <DrawerTitle v-bind="props" :class="styles({ class: props.class })">\n <slot>\n {{ props.text }}\n </slot>\n </DrawerTitle>\n</template>\n\n<script lang="ts" setup>\n import { DrawerTitle } from "vaul-vue";\n\n interface Props\n extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerTitle>, "$props">> {\n class?: any;\n text?: string;\n }\n\n const props = defineProps<Props>();\n\n const styles = tv({\n base: "text-lg font-semibold leading-none tracking-tight",\n });\n</script>\n',
|
|
1041
|
-
},
|
|
1042
|
-
{
|
|
1043
|
-
fileName: "Drawer/Trigger.vue",
|
|
1044
|
-
dirPath: "app/components/Ui",
|
|
1045
|
-
fileContent:
|
|
1046
|
-
'<template>\n <DrawerTrigger v-bind="props">\n <slot />\n </DrawerTrigger>\n</template>\n\n<script lang="ts" setup>\n import { DrawerTrigger } from "vaul-vue";\n\n interface Props\n extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerTrigger>, "$props">> {}\n\n const props = defineProps<Props>();\n</script>\n',
|
|
1047
|
-
},
|
|
1048
|
-
],
|
|
1049
|
-
utils: [],
|
|
1050
|
-
composables: [],
|
|
1051
|
-
plugins: [],
|
|
1052
|
-
},
|
|
1053
|
-
{
|
|
1054
|
-
name: "Dropdown Menu",
|
|
1055
|
-
value: "dropdown-menu",
|
|
1056
|
-
files: [
|
|
1057
|
-
{
|
|
1058
|
-
fileName: "DropdownMenu/Arrow.vue",
|
|
1059
|
-
dirPath: "app/components/Ui",
|
|
1060
|
-
fileContent:
|
|
1061
|
-
'<template>\n <DropdownMenuArrow v-bind="forwarded" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuArrow } from "radix-vue";\n import type { DropdownMenuArrowProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n DropdownMenuArrowProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n asChild: false,\n width: 10,\n height: 5,\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "rotate-45 border bg-muted",\n });\n</script>\n',
|
|
1062
|
-
},
|
|
1063
|
-
{
|
|
1064
|
-
fileName: "DropdownMenu/CheckboxItem.vue",
|
|
1065
|
-
dirPath: "app/components/Ui",
|
|
1066
|
-
fileContent:
|
|
1067
|
-
'<template>\n <DropdownMenuCheckboxItem v-bind="forwarded" :class="styles({ class: props.class })">\n <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center text-primary">\n <UiDropdownMenuItemIndicator icon="lucide:check" />\n </span>\n <slot>\n <span v-if="title">{{ title }}</span>\n </slot>\n <slot name="shortcut">\n <UiDropdownMenuShortcut v-if="shortcut">{{ shortcut }}</UiDropdownMenuShortcut>\n </slot>\n </DropdownMenuCheckboxItem>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuCheckboxItem, useForwardPropsEmits } from "radix-vue";\n import type { DropdownMenuCheckboxItemEmits, DropdownMenuCheckboxItemProps } from "radix-vue";\n\n const props = defineProps<\n DropdownMenuCheckboxItemProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The shorttcut text to display */\n shortcut?: string;\n /** The title text to display */\n title?: string;\n }\n >();\n const emits = defineEmits<DropdownMenuCheckboxItemEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "title", "shortcut", "class"), emits);\n\n const styles = tv({\n base: "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",\n });\n</script>\n',
|
|
1068
|
-
},
|
|
1069
|
-
{
|
|
1070
|
-
fileName: "DropdownMenu/Content.vue",
|
|
1071
|
-
dirPath: "app/components/Ui",
|
|
1072
|
-
fileContent:
|
|
1073
|
-
'<template>\n <UiDropdownMenuPortal>\n <DropdownMenuContent\n v-bind="{ ...forwarded, ...$attrs }"\n :class="styles({ class: props.class })"\n >\n <slot />\n </DropdownMenuContent>\n </UiDropdownMenuPortal>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuContent, useForwardPropsEmits } from "radix-vue";\n import type { DropdownMenuContentEmits, DropdownMenuContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = withDefaults(\n defineProps<\n DropdownMenuContentProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n loop: true,\n align: "center",\n sideOffset: 5,\n side: "bottom",\n avoidCollisions: true,\n sticky: "partial",\n }\n );\n\n const emits = defineEmits<DropdownMenuContentEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-accent-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",\n });\n</script>\n',
|
|
1074
|
-
},
|
|
1075
|
-
{
|
|
1076
|
-
fileName: "DropdownMenu/DropdownMenu.vue",
|
|
1077
|
-
dirPath: "app/components/Ui",
|
|
1078
|
-
fileContent:
|
|
1079
|
-
'<template>\n <DropdownMenuRoot v-bind="forwarded">\n <slot />\n </DropdownMenuRoot>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuRoot, useForwardPropsEmits } from "radix-vue";\n import type { DropdownMenuRootEmits, DropdownMenuRootProps } from "radix-vue";\n\n const props = defineProps<DropdownMenuRootProps>();\n\n const emit = defineEmits<DropdownMenuRootEmits>();\n const forwarded = useForwardPropsEmits(props, emit);\n</script>\n',
|
|
1080
|
-
},
|
|
1081
|
-
{
|
|
1082
|
-
fileName: "DropdownMenu/Group.vue",
|
|
1083
|
-
dirPath: "app/components/Ui",
|
|
1084
|
-
fileContent:
|
|
1085
|
-
'<template>\n <DropdownMenuGroup v-bind="props">\n <slot />\n </DropdownMenuGroup>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuGroup } from "radix-vue";\n import type { DropdownMenuGroupProps } from "radix-vue";\n\n const props = defineProps<DropdownMenuGroupProps>();\n</script>\n',
|
|
1086
|
-
},
|
|
1087
|
-
{
|
|
1088
|
-
fileName: "DropdownMenu/Item.vue",
|
|
1089
|
-
dirPath: "app/components/Ui",
|
|
1090
|
-
fileContent:
|
|
1091
|
-
'<template>\n <DropdownMenuItem v-bind="forwarded" :class="styles({ inset, class: props.class })">\n <slot>\n <slot name="icon">\n <Icon v-if="icon" :name="icon" class="h-4 w-4" />\n </slot>\n <slot name="title">\n <span v-if="title">{{ title }}</span>\n </slot>\n </slot>\n <slot name="shortcut">\n <UiDropdownMenuShortcut v-if="shortcut">{{ shortcut }}</UiDropdownMenuShortcut>\n </slot>\n </DropdownMenuItem>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuItem, useForwardPropsEmits } from "radix-vue";\n import type { DropdownMenuItemEmits, DropdownMenuItemProps } from "radix-vue";\n\n const props = defineProps<\n DropdownMenuItemProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** Whether to inset the content */\n inset?: boolean;\n /** The shorttcut text to display */\n shortcut?: string;\n /** The title text to display */\n title?: string;\n /** The icon to display */\n icon?: string;\n }\n >();\n\n const emits = defineEmits<DropdownMenuItemEmits>();\n const forwarded = useForwardPropsEmits(\n reactiveOmit(props, "class", "inset", "shortcut", "title", "icon"),\n emits\n );\n\n const styles = tv({\n base: "relative flex cursor-default select-none items-center gap-3 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",\n variants: {\n inset: {\n true: "pl-8",\n },\n },\n });\n</script>\n',
|
|
1092
|
-
},
|
|
1093
|
-
{
|
|
1094
|
-
fileName: "DropdownMenu/ItemIndicator.vue",
|
|
1095
|
-
dirPath: "app/components/Ui",
|
|
1096
|
-
fileContent:
|
|
1097
|
-
'<template>\n <DropdownMenuItemIndicator v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Icon v-if="icon" :name="icon" class="h-4 w-4" />\n </slot>\n </DropdownMenuItemIndicator>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuItemIndicator } from "radix-vue";\n import type { DropdownMenuItemIndicatorProps } from "radix-vue";\n\n const props = defineProps<\n DropdownMenuItemIndicatorProps & {\n /** The icon to display */\n icon?: string;\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "icon");\n\n const styles = tv({\n base: "flex items-center justify-center",\n });\n</script>\n',
|
|
1098
|
-
},
|
|
1099
|
-
{
|
|
1100
|
-
fileName: "DropdownMenu/Label.vue",
|
|
1101
|
-
dirPath: "app/components/Ui",
|
|
1102
|
-
fileContent:
|
|
1103
|
-
'<template>\n <DropdownMenuLabel :class="styles({ inset, class: props.class })" v-bind="forwarded">\n <slot>{{ label }}</slot>\n </DropdownMenuLabel>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuLabel } from "radix-vue";\n import type { DropdownMenuLabelProps } from "radix-vue";\n\n const props = defineProps<\n DropdownMenuLabelProps & {\n class?: any;\n inset?: boolean;\n label?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "inset", "label");\n const styles = tv({\n base: "inline-block w-full px-2 py-1.5 text-sm font-semibold text-foreground",\n variants: {\n inset: { true: "pl-8" },\n },\n });\n</script>\n',
|
|
1104
|
-
},
|
|
1105
|
-
{
|
|
1106
|
-
fileName: "DropdownMenu/Portal.vue",
|
|
1107
|
-
dirPath: "app/components/Ui",
|
|
1108
|
-
fileContent:
|
|
1109
|
-
'<template>\n <DropdownMenuPortal v-bind="props">\n <slot />\n </DropdownMenuPortal>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuPortal } from "radix-vue";\n import type { DropdownMenuPortalProps } from "radix-vue";\n\n const props = defineProps<DropdownMenuPortalProps>();\n</script>\n',
|
|
1110
|
-
},
|
|
1111
|
-
{
|
|
1112
|
-
fileName: "DropdownMenu/RadioGroup.vue",
|
|
1113
|
-
dirPath: "app/components/Ui",
|
|
1114
|
-
fileContent:
|
|
1115
|
-
'<template>\n <DropdownMenuRadioGroup v-bind="forwarded">\n <slot />\n </DropdownMenuRadioGroup>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuRadioGroup, useForwardPropsEmits } from "radix-vue";\n import type { DropdownMenuRadioGroupEmits, DropdownMenuRadioGroupProps } from "radix-vue";\n\n const props = defineProps<DropdownMenuRadioGroupProps>();\n\n const emits = defineEmits<DropdownMenuRadioGroupEmits>();\n\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
1116
|
-
},
|
|
1117
|
-
{
|
|
1118
|
-
fileName: "DropdownMenu/RadioItem.vue",
|
|
1119
|
-
dirPath: "app/components/Ui",
|
|
1120
|
-
fileContent:
|
|
1121
|
-
'<template>\n <DropdownMenuRadioItem v-bind="forwarded" :class="styles({ class: props.class })">\n <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center text-primary">\n <UiDropdownMenuItemIndicator>\n <Icon v-if="icon" :name="icon" class="h-4 w-4" />\n <Icon v-else name="ph:circle-fill" class="h-2 w-2" />\n </UiDropdownMenuItemIndicator>\n </span>\n <slot>{{ title }}</slot>\n </DropdownMenuRadioItem>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuRadioItem, useForwardPropsEmits } from "radix-vue";\n import type { DropdownMenuRadioItemEmits, DropdownMenuRadioItemProps } from "radix-vue";\n\n const props = defineProps<\n DropdownMenuRadioItemProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The icon to display */\n icon?: string;\n /** The title text to display */\n title?: string;\n }\n >();\n\n const emits = defineEmits<DropdownMenuRadioItemEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "icon", "title"), emits);\n\n const styles = tv({\n base: "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",\n });\n</script>\n',
|
|
1122
|
-
},
|
|
1123
|
-
{
|
|
1124
|
-
fileName: "DropdownMenu/Separator.vue",
|
|
1125
|
-
dirPath: "app/components/Ui",
|
|
1126
|
-
fileContent:
|
|
1127
|
-
'<template>\n <DropdownMenuSeparator :class="styles({ class: props.class })" v-bind="forwarded" />\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuSeparator } from "radix-vue";\n import type { DropdownMenuSeparatorProps } from "radix-vue";\n\n const props = defineProps<\n DropdownMenuSeparatorProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "-mx-1 my-1 h-px bg-border",\n });\n</script>\n',
|
|
1128
|
-
},
|
|
1129
|
-
{
|
|
1130
|
-
fileName: "DropdownMenu/Shortcut.vue",
|
|
1131
|
-
dirPath: "app/components/Ui",
|
|
1132
|
-
fileContent:
|
|
1133
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n as: "span",\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "ml-auto text-xs tracking-widest opacity-60",\n });\n</script>\n',
|
|
1134
|
-
},
|
|
1135
|
-
{
|
|
1136
|
-
fileName: "DropdownMenu/Sub.vue",
|
|
1137
|
-
dirPath: "app/components/Ui",
|
|
1138
|
-
fileContent:
|
|
1139
|
-
'<template>\n <DropdownMenuSub v-bind="forwarded">\n <slot />\n </DropdownMenuSub>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuSub, useForwardPropsEmits } from "radix-vue";\n import type { DropdownMenuSubEmits, DropdownMenuSubProps } from "radix-vue";\n\n const props = defineProps<DropdownMenuSubProps>();\n const emits = defineEmits<DropdownMenuSubEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
1140
|
-
},
|
|
1141
|
-
{
|
|
1142
|
-
fileName: "DropdownMenu/SubContent.vue",
|
|
1143
|
-
dirPath: "app/components/Ui",
|
|
1144
|
-
fileContent:
|
|
1145
|
-
'<template>\n <UiDropdownMenuPortal :to="to">\n <DropdownMenuSubContent\n v-bind="{ ...forwarded, ...$attrs }"\n :class="styles({ class: props.class })"\n >\n <slot />\n </DropdownMenuSubContent>\n </UiDropdownMenuPortal>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuSubContent, useForwardPropsEmits } from "radix-vue";\n import type { DropdownMenuSubContentEmits, DropdownMenuSubContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n const props = withDefaults(\n defineProps<\n DropdownMenuSubContentProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The element to render the portal into */\n to?: string | HTMLElement;\n }\n >(),\n {\n loop: true,\n sideOffset: 8,\n avoidCollisions: true,\n collisionPadding: 5,\n sticky: "partial",\n }\n );\n\n const emits = defineEmits<DropdownMenuSubContentEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "to"), emits);\n\n const styles = tv({\n base: "z-50 min-w-[180px] overflow-hidden rounded-md border bg-popover p-1 text-accent-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",\n });\n</script>\n',
|
|
1146
|
-
},
|
|
1147
|
-
{
|
|
1148
|
-
fileName: "DropdownMenu/SubTrigger.vue",
|
|
1149
|
-
dirPath: "app/components/Ui",
|
|
1150
|
-
fileContent:
|
|
1151
|
-
'<template>\n <DropdownMenuSubTrigger v-bind="forwarded" :class="styles({ inset, class: props.class })">\n <slot>\n <Icon v-if="icon" :name="icon" class="h-4 w-4" />\n <span v-if="title">{{ title }}</span>\n </slot>\n <Icon\n class="ml-auto h-4 w-4 text-muted-foreground"\n :name="trailingIcon || \'lucide:chevron-right\'"\n />\n </DropdownMenuSubTrigger>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuSubTrigger } from "radix-vue";\n import type { DropdownMenuSubTriggerProps } from "radix-vue";\n\n const props = defineProps<\n DropdownMenuSubTriggerProps & {\n /**Custom class(es) to add to the element */\n class?: any;\n /** Wether an indentation should be added to the item or not */\n inset?: boolean;\n /** The icon to display */\n icon?: string;\n /** The title for the item */\n title?: string;\n /** The trailing icon to display */\n trailingIcon?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "inset", "icon", "title", "trailingIcon");\n const styles = tv({\n base: "flex cursor-default select-none items-center gap-3 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",\n variants: {\n inset: {\n true: "pl-8",\n },\n },\n });\n</script>\n',
|
|
1152
|
-
},
|
|
1153
|
-
{
|
|
1154
|
-
fileName: "DropdownMenu/Trigger.vue",
|
|
1155
|
-
dirPath: "app/components/Ui",
|
|
1156
|
-
fileContent:
|
|
1157
|
-
'<template>\n <DropdownMenuTrigger v-bind="props">\n <slot />\n </DropdownMenuTrigger>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuTrigger } from "radix-vue";\n import type { DropdownMenuTriggerProps } from "radix-vue";\n\n const props = defineProps<DropdownMenuTriggerProps>();\n</script>\n',
|
|
1158
|
-
},
|
|
1159
|
-
],
|
|
1160
|
-
utils: [],
|
|
1161
|
-
composables: [],
|
|
1162
|
-
plugins: [],
|
|
1163
|
-
},
|
|
1164
|
-
{
|
|
1165
|
-
name: "Dropfile",
|
|
1166
|
-
value: "dropfile",
|
|
1167
|
-
files: [
|
|
1168
|
-
{
|
|
1169
|
-
fileName: "Dropfile.vue",
|
|
1170
|
-
dirPath: "app/components/Ui",
|
|
1171
|
-
fileContent:
|
|
1172
|
-
'<template>\n <div ref="dropZoneRef" :class="styles({ isOverDropZone, class: props.class })" @click="open()">\n <slot name="message">\n <div class="py-10 text-center">\n <slot name="icon">\n <div\n v-if="icon"\n class="inline-flex items-center justify-center rounded-md border p-2 transition"\n :class="[isOverDropZone && \'animate-bounce border-primary\']"\n >\n <Icon\n :name="icon"\n class="h-7 w-7 opacity-70"\n :class="[isOverDropZone && \'text-primary\']"\n />\n </div>\n </slot>\n <slot name="title">\n <p class="mt-5 text-sm font-medium" v-html="title" />\n </slot>\n <slot name="subtext">\n <p class="mt-1 text-sm text-muted-foreground/60" v-html="subtext" />\n </slot>\n </div>\n </slot>\n </div>\n</template>\n\n<script setup lang="ts">\n const props = withDefaults(\n defineProps<{\n /**\n * The text to display as the title of the dropzone.\n */\n title?: string;\n /**\n * The text to display as the subtext of the dropzone.\n */\n subtext?: string;\n /**\n * The icon to display in the dropzone.\n */\n icon?: string;\n /**\n * The function to call when files are dropped.\n */\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n onDrop?: Function;\n /**\n * Whether or not to allow multiple files to be picked. Does not affect drag and drop.\n */\n multiple?: boolean;\n /**\n * The file types to accept. Does not affect drag and drop.\n */\n accept?: string;\n class?: any;\n }>(),\n {\n title: "Click to upload or drag & drop files.",\n subtext: "All file types accepted",\n icon: "heroicons:cloud-arrow-up",\n multiple: true,\n accept: "*",\n }\n );\n\n const { open, reset, onChange } = useFileDialog({\n multiple: props.multiple,\n accept: props.accept,\n });\n\n onChange((files: FileList | null) => {\n if (files?.length) {\n handleDrop(Array.from(files || []));\n reset();\n }\n });\n\n const dropZoneRef = ref<HTMLDivElement>();\n const emits = defineEmits<{\n dropped: [any];\n }>();\n\n const handleDrop = (files: File[] | null) => {\n if (!files) return;\n if (props.onDrop) props.onDrop(files);\n emits("dropped", files);\n };\n\n const { isOverDropZone } = useDropZone(dropZoneRef, handleDrop);\n\n const styles = tv({\n base: "flex w-full cursor-pointer items-center justify-center rounded-md border border-dashed transition hover:border-primary",\n variants: {\n isOverDropZone: { true: "border-primary bg-primary/10" },\n },\n });\n</script>\n',
|
|
1173
|
-
},
|
|
1174
|
-
],
|
|
1175
|
-
utils: [],
|
|
1176
|
-
composables: [],
|
|
1177
|
-
plugins: [],
|
|
1178
|
-
},
|
|
1179
|
-
{
|
|
1180
|
-
name: "Editable",
|
|
1181
|
-
value: "editable",
|
|
1182
|
-
files: [
|
|
1183
|
-
{
|
|
1184
|
-
fileName: "Editable/Area.vue",
|
|
1185
|
-
dirPath: "app/components/Ui",
|
|
1186
|
-
fileContent:
|
|
1187
|
-
'<template>\n <EditableArea v-bind="props">\n <slot />\n </EditableArea>\n</template>\n\n<script lang="ts" setup>\n import { EditableArea } from "radix-vue";\n import type { EditableAreaProps } from "radix-vue";\n\n const props = defineProps<EditableAreaProps>();\n</script>\n',
|
|
1188
|
-
},
|
|
1189
|
-
{
|
|
1190
|
-
fileName: "Editable/Cancel.vue",
|
|
1191
|
-
dirPath: "app/components/Ui",
|
|
1192
|
-
fileContent:
|
|
1193
|
-
'<template>\n <EditableCancelTrigger v-bind="props">\n <slot />\n </EditableCancelTrigger>\n</template>\n\n<script lang="ts" setup>\n import { EditableCancelTrigger } from "radix-vue";\n import type { EditableCancelTriggerProps } from "radix-vue";\n\n const props = defineProps<EditableCancelTriggerProps>();\n</script>\n',
|
|
1194
|
-
},
|
|
1195
|
-
{
|
|
1196
|
-
fileName: "Editable/Edit.vue",
|
|
1197
|
-
dirPath: "app/components/Ui",
|
|
1198
|
-
fileContent:
|
|
1199
|
-
'<template>\n <EditableEditTrigger v-bind="props">\n <slot />\n </EditableEditTrigger>\n</template>\n\n<script lang="ts" setup>\n import { EditableEditTrigger } from "radix-vue";\n import type { EditableEditTriggerProps } from "radix-vue";\n\n const props = defineProps<EditableEditTriggerProps>();\n</script>\n',
|
|
1200
|
-
},
|
|
1201
|
-
{
|
|
1202
|
-
fileName: "Editable/Editable.vue",
|
|
1203
|
-
dirPath: "app/components/Ui",
|
|
1204
|
-
fileContent:
|
|
1205
|
-
'<template>\n <EditableRoot :ref="forwardRef" v-slot="slotProps" v-bind="forwarded">\n <slot v-bind="slotProps" />\n </EditableRoot>\n</template>\n\n<script lang="ts" setup>\n import { EditableRoot, useForwardExpose, useForwardPropsEmits } from "radix-vue";\n import type { EditableRootEmits, EditableRootProps } from "radix-vue";\n\n const { currentRef, forwardRef } = useForwardExpose();\n const props = defineProps<EditableRootProps>();\n const emit = defineEmits<EditableRootEmits & { ready: [v?: any] }>();\n const forwarded = useForwardPropsEmits(props, emit);\n\n onMounted(() => {\n // Emit the ready event with the current ref value\n emit("ready", currentRef);\n });\n</script>\n',
|
|
1206
|
-
},
|
|
1207
|
-
{
|
|
1208
|
-
fileName: "Editable/Input.vue",
|
|
1209
|
-
dirPath: "app/components/Ui",
|
|
1210
|
-
fileContent:
|
|
1211
|
-
'<template>\n <EditableInput v-bind="props">\n <slot />\n </EditableInput>\n</template>\n\n<script lang="ts" setup>\n import { EditableInput } from "radix-vue";\n import type { EditableInputProps } from "radix-vue";\n\n const props = defineProps<EditableInputProps>();\n</script>\n',
|
|
1212
|
-
},
|
|
1213
|
-
{
|
|
1214
|
-
fileName: "Editable/Preview.vue",
|
|
1215
|
-
dirPath: "app/components/Ui",
|
|
1216
|
-
fileContent:
|
|
1217
|
-
'<template>\n <EditablePreview v-bind="props">\n <slot />\n </EditablePreview>\n</template>\n\n<script lang="ts" setup>\n import { EditablePreview } from "radix-vue";\n import type { EditablePreviewProps } from "radix-vue";\n\n const props = defineProps<EditablePreviewProps>();\n</script>\n',
|
|
1218
|
-
},
|
|
1219
|
-
{
|
|
1220
|
-
fileName: "Editable/Submit.vue",
|
|
1221
|
-
dirPath: "app/components/Ui",
|
|
1222
|
-
fileContent:
|
|
1223
|
-
'<template>\n <EditableSubmitTrigger v-bind="props">\n <slot />\n </EditableSubmitTrigger>\n</template>\n\n<script lang="ts" setup>\n import { EditableSubmitTrigger } from "radix-vue";\n import type { EditableSubmitTriggerProps } from "radix-vue";\n\n const props = defineProps<EditableSubmitTriggerProps>();\n</script>\n',
|
|
1224
|
-
},
|
|
1225
|
-
],
|
|
1226
|
-
utils: [],
|
|
1227
|
-
composables: [],
|
|
1228
|
-
plugins: [],
|
|
1229
|
-
},
|
|
1230
|
-
{
|
|
1231
|
-
name: "Fancy Icon",
|
|
1232
|
-
value: "fancy-icon",
|
|
1233
|
-
files: [
|
|
1234
|
-
{
|
|
1235
|
-
fileName: "FancyIcon.vue",
|
|
1236
|
-
dirPath: "app/components/Ui",
|
|
1237
|
-
fileContent:
|
|
1238
|
-
'<template>\n <div :class="styles().base({ class: props.class, color, type, size, circle })">\n <slot :styles="styles().icon({ color, type, size, circle })">\n <Icon v-if="icon" :name="icon" :class="styles().icon({ color, type, size, circle })" />\n </slot>\n </div>\n</template>\n\n<script lang="ts" setup>\n const props = withDefaults(\n defineProps<{\n class?: any;\n icon?: string;\n color?: VariantProps<typeof styles>["color"];\n type?: VariantProps<typeof styles>["type"];\n size?: VariantProps<typeof styles>["size"];\n circle?: boolean;\n }>(),\n {\n color: "primary",\n type: "modern",\n size: "lg",\n circle: false,\n }\n );\n\n const styles = tv({\n slots: {\n base: "flex shrink-0 items-center justify-center",\n icon: "",\n },\n\n variants: {\n color: {\n primary: {\n base: "",\n icon: "",\n },\n success: {\n base: "",\n icon: "",\n },\n warning: {\n base: "",\n icon: "",\n },\n error: {\n base: "",\n icon: "",\n },\n info: {\n base: "",\n icon: "",\n },\n },\n type: {\n light: {\n base: "",\n icon: "",\n },\n dark: {\n base: "",\n icon: "",\n },\n modern: {\n base: "",\n icon: "",\n },\n },\n size: {\n sm: {\n base: "size-8",\n icon: "size-4",\n },\n md: {\n base: "size-10",\n icon: "size-5",\n },\n lg: {\n base: "size-12",\n icon: "size-6",\n },\n xl: {\n base: "size-14",\n icon: "size-7",\n },\n },\n circle: {\n true: {\n base: "rounded-full",\n },\n false: {\n base: "rounded-lg",\n },\n },\n },\n compoundVariants: [\n {\n color: "primary",\n type: "light",\n class: { base: "bg-primary/5", icon: "text-primary" },\n },\n {\n color: "success",\n type: "light",\n class: {\n base: "bg-green-500/10",\n icon: "text-green-600",\n },\n },\n {\n color: "warning",\n type: "light",\n class: { base: "bg-amber-500/10", icon: "text-amber-600" },\n },\n {\n color: "error",\n type: "light",\n class: { base: "bg-destructive/10", icon: "text-destructive" },\n },\n {\n color: "info",\n type: "light",\n class: { base: "bg-blue-500/10", icon: "text-blue-600" },\n },\n // Dark\n {\n color: "primary",\n type: "dark",\n class: { base: "bg-primary", icon: "text-primary-foreground" },\n },\n {\n color: "success",\n type: "dark",\n class: { base: "bg-green-600", icon: "text-green-50" },\n },\n {\n color: "warning",\n type: "dark",\n class: { base: "bg-amber-600", icon: "text-amber-50" },\n },\n {\n color: "error",\n type: "dark",\n class: { base: "bg-destructive", icon: "text-destructive-foreground" },\n },\n {\n color: "info",\n type: "dark",\n class: { base: "bg-blue-500", icon: "text-blue-50" },\n },\n // Modern\n {\n type: "modern",\n class: { base: "border bg-background", icon: "text-muted-foreground" },\n },\n ],\n defaultVariants: {\n color: "primary",\n type: "modern",\n size: "lg",\n circle: false,\n },\n });\n</script>\n',
|
|
1239
|
-
},
|
|
1240
|
-
],
|
|
1241
|
-
utils: [],
|
|
1242
|
-
composables: [],
|
|
1243
|
-
plugins: [],
|
|
1244
|
-
},
|
|
1245
|
-
{
|
|
1246
|
-
name: "Form",
|
|
1247
|
-
value: "form",
|
|
1248
|
-
deps: ["@vee-validate/nuxt"],
|
|
1249
|
-
nuxtModules: ["@vee-validate/nuxt"],
|
|
1250
|
-
composables: [
|
|
1251
|
-
{
|
|
1252
|
-
fileName: "useFormField.ts",
|
|
1253
|
-
dirPath: "composables",
|
|
1254
|
-
fileContent:
|
|
1255
|
-
'import { FORM_ITEM_INJECTION_KEY } from "@/components/Ui/Form/Item.vue";\nimport {\n FieldContextKey,\n useFieldError,\n useIsFieldDirty,\n useIsFieldTouched,\n useIsFieldValid,\n} from "vee-validate";\nimport { inject } from "vue";\n\nexport function useFormField() {\n const fieldContext = inject(FieldContextKey);\n const fieldItemContext = inject(FORM_ITEM_INJECTION_KEY);\n\n const fieldState = {\n valid: useIsFieldValid(),\n isDirty: useIsFieldDirty(),\n isTouched: useIsFieldTouched(),\n error: useFieldError(),\n };\n\n if (!fieldContext) throw new Error("useFormField should be used within <FormField>");\n\n const { name } = fieldContext;\n const id = fieldItemContext;\n\n return {\n id,\n name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n}\n',
|
|
1256
|
-
},
|
|
1257
|
-
],
|
|
1258
|
-
files: [
|
|
1259
|
-
{
|
|
1260
|
-
fileName: "Form/Control.vue",
|
|
1261
|
-
dirPath: "app/components/Ui",
|
|
1262
|
-
fileContent:
|
|
1263
|
-
'<template>\n <Slot\n :id="formItemId"\n :aria-describedby="!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`"\n :aria-invalid="!!error"\n >\n <slot />\n </Slot>\n</template>\n\n<script lang="ts" setup>\n import { Slot } from "radix-vue";\n\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n</script>\n',
|
|
1264
|
-
},
|
|
1265
|
-
{
|
|
1266
|
-
fileName: "Form/Description.vue",
|
|
1267
|
-
dirPath: "app/components/Ui",
|
|
1268
|
-
fileContent:
|
|
1269
|
-
'<template>\n <p :id="formDescriptionId" :class="styles({ class: props.class })" v-bind="$attrs">\n <slot>\n <ClientOnly>\n <p v-html="description" />\n </ClientOnly>\n </slot>\n </p>\n</template>\n<script lang="ts" setup>\n defineOptions({ inheritAttrs: false });\n\n const { formDescriptionId } = useFormField();\n const props = defineProps<{ class?: any; description?: string }>();\n const styles = tv({ base: "text-sm text-muted-foreground" });\n</script>\n',
|
|
1270
|
-
},
|
|
1271
|
-
{
|
|
1272
|
-
fileName: "Form/Item.vue",
|
|
1273
|
-
dirPath: "app/components/Ui",
|
|
1274
|
-
fileContent:
|
|
1275
|
-
'<template>\n <div :class="styles({ class: props.class })" v-bind="$attrs">\n <slot name="label">\n <UiFormLabel v-if="label || hint" :label="label" :hint="hint" />\n </slot>\n <UiFormControl>\n <slot />\n </UiFormControl>\n <slot name="description">\n <UiFormDescription v-if="description" :description="description" />\n </slot>\n <slot name="errorMessage">\n <TransitionSlide tag="p">\n <UiFormMessage v-if="!hideMessage" />\n </TransitionSlide>\n </slot>\n </div>\n</template>\n\n<script lang="ts">\n import type { InjectionKey } from "vue";\n\n export const FORM_ITEM_INJECTION_KEY = Symbol() as InjectionKey<string>;\n</script>\n\n<script lang="ts" setup>\n defineOptions({ inheritAttrs: false });\n\n const id = useId();\n provide(FORM_ITEM_INJECTION_KEY, id);\n\n const props = defineProps<{\n class?: any;\n label?: string;\n description?: string;\n hint?: string;\n hideMessage?: boolean;\n }>();\n\n const styles = tv({ base: "space-y-1.5" });\n</script>\n',
|
|
1276
|
-
},
|
|
1277
|
-
{
|
|
1278
|
-
fileName: "Form/Label.vue",
|
|
1279
|
-
dirPath: "app/components/Ui",
|
|
1280
|
-
fileContent:
|
|
1281
|
-
'<template>\n <Label\n :class="styles({ error: Boolean(error), class: props.class })"\n :for="formItemId"\n v-bind="$attrs"\n >\n <slot\n >{{ label }}\n <span class="ml-auto font-normal text-muted-foreground/80">{{ hint }}</span></slot\n >\n </Label>\n</template>\n\n<script lang="ts" setup>\n import { Label } from "radix-vue";\n import type { LabelProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n const props = defineProps<LabelProps & { class?: any; label?: string; hint?: string }>();\n\n const { error, formItemId } = useFormField();\n\n const styles = tv({\n base: "flex w-full items-center justify-between text-left text-sm font-medium tracking-tight text-foreground hover:cursor-pointer",\n variants: {\n error: {\n true: "text-destructive",\n },\n },\n });\n</script>\n',
|
|
1282
|
-
},
|
|
1283
|
-
{
|
|
1284
|
-
fileName: "Form/Message.vue",
|
|
1285
|
-
dirPath: "app/components/Ui",
|
|
1286
|
-
fileContent:
|
|
1287
|
-
'<template>\n <ErrorMessage\n :id="formMessageId"\n as="p"\n :name="toValue(name)"\n class="text-sm font-medium text-destructive"\n />\n</template>\n\n<script lang="ts" setup>\n const { name, formMessageId } = useFormField();\n</script>\n',
|
|
1288
|
-
},
|
|
1289
|
-
],
|
|
1290
|
-
utils: [],
|
|
1291
|
-
plugins: [],
|
|
1292
|
-
},
|
|
1293
|
-
{
|
|
1294
|
-
name: "Gradient Divider",
|
|
1295
|
-
value: "gradient-divider",
|
|
1296
|
-
files: [
|
|
1297
|
-
{
|
|
1298
|
-
fileName: "GradientDivider.vue",
|
|
1299
|
-
dirPath: "app/components/Ui",
|
|
1300
|
-
fileContent:
|
|
1301
|
-
'<template>\n <Separator v-bind="forwarded" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { Separator } from "radix-vue";\n import type { SeparatorProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n SeparatorProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >(),\n {\n as: "hr",\n }\n );\n\n const forwarded = reactiveOmit(props, "class");\n\n const styles = tv({\n base: \'h-px w-full border-t-0 bg-[linear-gradient(90deg,theme("colors.input/10%"),_theme("colors.input"),_theme("colors.input/10%"))]\',\n });\n</script>\n',
|
|
1302
|
-
},
|
|
1303
|
-
],
|
|
1304
|
-
utils: [],
|
|
1305
|
-
composables: [],
|
|
1306
|
-
plugins: [],
|
|
1307
|
-
},
|
|
1308
|
-
{
|
|
1309
|
-
name: "Hover Card",
|
|
1310
|
-
value: "hover-card",
|
|
1311
|
-
files: [
|
|
1312
|
-
{
|
|
1313
|
-
fileName: "HoverCard/Arrow.vue",
|
|
1314
|
-
dirPath: "app/components/Ui",
|
|
1315
|
-
fileContent:
|
|
1316
|
-
'<template>\n <HoverCardArrow :class="styles({ class: props.class })" v-bind="forwarded" />\n</template>\n\n<script lang="ts" setup>\n import { HoverCardArrow } from "radix-vue";\n import type { HoverCardArrowProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n HoverCardArrowProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n height: 5,\n width: 10,\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "fill-popover",\n });\n</script>\n',
|
|
1317
|
-
},
|
|
1318
|
-
{
|
|
1319
|
-
fileName: "HoverCard/Content.vue",
|
|
1320
|
-
dirPath: "app/components/Ui",
|
|
1321
|
-
fileContent:
|
|
1322
|
-
'<template>\n <UiHoverCardPortal :to="to">\n <HoverCardContent v-bind="{ ...forwarded, ...$attrs }" :class="styles({ class: props.class })">\n <slot />\n </HoverCardContent>\n </UiHoverCardPortal>\n</template>\n\n<script lang="ts" setup>\n import { HoverCardContent } from "radix-vue";\n import type { HoverCardContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = withDefaults(\n defineProps<\n HoverCardContentProps & {\n /** Custom class(es) to add to the content */\n class?: any;\n /** The element or selector the content should be positioned relative to */\n to?: string | HTMLElement;\n }\n >(),\n {\n side: "bottom",\n sideOffset: 5,\n align: "center",\n avoidCollisions: true,\n sticky: "partial",\n }\n );\n const forwarded = reactiveOmit(props, "class", "to");\n const styles = tv({\n base: "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",\n });\n</script>\n',
|
|
1323
|
-
},
|
|
1324
|
-
{
|
|
1325
|
-
fileName: "HoverCard/HoverCard.vue",
|
|
1326
|
-
dirPath: "app/components/Ui",
|
|
1327
|
-
fileContent:
|
|
1328
|
-
'<template>\n <HoverCardRoot v-bind="forwarded">\n <slot />\n </HoverCardRoot>\n</template>\n\n<script lang="ts" setup>\n import { HoverCardRoot, useForwardPropsEmits } from "radix-vue";\n import type { HoverCardRootEmits, HoverCardRootProps } from "radix-vue";\n\n const props = withDefaults(defineProps<HoverCardRootProps>(), {\n openDelay: 200,\n closeDelay: 200,\n });\n\n const emits = defineEmits<HoverCardRootEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
1329
|
-
},
|
|
1330
|
-
{
|
|
1331
|
-
fileName: "HoverCard/Portal.vue",
|
|
1332
|
-
dirPath: "app/components/Ui",
|
|
1333
|
-
fileContent:
|
|
1334
|
-
'<template>\n <HoverCardPortal v-bind="props">\n <slot />\n </HoverCardPortal>\n</template>\n\n<script lang="ts" setup>\n import { HoverCardPortal } from "radix-vue";\n import type { HoverCardPortalProps } from "radix-vue";\n\n const props = defineProps<HoverCardPortalProps>();\n</script>\n',
|
|
1335
|
-
},
|
|
1336
|
-
{
|
|
1337
|
-
fileName: "HoverCard/Trigger.vue",
|
|
1338
|
-
dirPath: "app/components/Ui",
|
|
1339
|
-
fileContent:
|
|
1340
|
-
'<template>\n <HoverCardTrigger v-bind="props">\n <slot />\n </HoverCardTrigger>\n</template>\n\n<script lang="ts" setup>\n import { HoverCardTrigger } from "radix-vue";\n import type { HoverCardTriggerProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n const props = defineProps<HoverCardTriggerProps>();\n</script>\n',
|
|
1341
|
-
},
|
|
1342
|
-
],
|
|
1343
|
-
utils: [],
|
|
1344
|
-
composables: [],
|
|
1345
|
-
plugins: [],
|
|
1346
|
-
},
|
|
1347
|
-
{
|
|
1348
|
-
name: "Input",
|
|
1349
|
-
value: "input",
|
|
1350
|
-
devDeps: ["@vueuse/core"],
|
|
1351
|
-
files: [
|
|
1352
|
-
{
|
|
1353
|
-
fileName: "Input.vue",
|
|
1354
|
-
dirPath: "app/components/Ui",
|
|
1355
|
-
fileContent:
|
|
1356
|
-
'<template>\n <!-- eslint-disable-next-line vue/html-self-closing -->\n <input\n v-bind="props"\n :class="styles({ class: props.class })"\n :value="modelValue"\n @input="handleInput"\n />\n</template>\n\n<script lang="ts" setup>\n const props = withDefaults(\n defineProps<{\n /** Additional classes to add to the input */\n class?: any;\n /** The id of the input */\n id?: string;\n /** The name of the input */\n name?: string;\n /** The placeholder of the input */\n placeholder?: string;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Whether the input is required */\n required?: boolean;\n /** The type of the input */\n type?: string;\n /** The value of the input */\n modelValue?: any;\n /** The maximum length of the input */\n maxlength?: number;\n /** The `RegExp` pattern of the input */\n pattern?: string;\n }>(),\n {\n type: "text",\n modelValue: "",\n }\n );\n\n const emit = defineEmits<{\n "update:modelValue": [value: string];\n }>();\n\n const handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n let value = target.value;\n\n /* val input with pattern */\n if (props.pattern) {\n const regex = new RegExp(props.pattern);\n value = Array.from(value)\n .filter((char) => regex.test(char))\n .join("");\n }\n\n /* Handle maxlength */\n if (props.maxlength) {\n value = value.slice(0, props.maxlength);\n }\n\n target.value = value;\n emit("update:modelValue", value);\n };\n\n const styles = tv({\n base: "form-input h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:px-1 file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground file:hover:cursor-pointer focus:border-input focus:ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:[color-scheme:dark] sm:text-sm",\n });\n</script>\n',
|
|
1357
|
-
},
|
|
1358
|
-
],
|
|
1359
|
-
utils: [],
|
|
1360
|
-
composables: [],
|
|
1361
|
-
plugins: [],
|
|
1362
|
-
},
|
|
1363
|
-
{
|
|
1364
|
-
name: "Keyboard Key",
|
|
1365
|
-
value: "kbd",
|
|
1366
|
-
files: [
|
|
1367
|
-
{
|
|
1368
|
-
fileName: "Kbd.vue",
|
|
1369
|
-
dirPath: "app/components/Ui",
|
|
1370
|
-
fileContent:
|
|
1371
|
-
'<template>\n <Primitive :class="styles({ size, variant, class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n<script setup lang="ts">\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** The size of the component */\n size?: VariantProps<typeof styles>["size"];\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The variant of the component */\n variant?: VariantProps<typeof styles>["variant"];\n }\n >(),\n {\n as: "kbd",\n size: "sm",\n }\n );\n\n const forwarded = reactiveOmit(props, "class", "size");\n\n const styles = tv({\n base: "pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded-md border border-border bg-muted font-sans font-medium",\n variants: {\n size: {\n xs: "h-5 min-h-[16px] px-1 text-[10px]",\n sm: "h-6 min-h-[20px] px-1.5 text-[11px]",\n md: "h-7 min-h-[24px] px-2 text-[12px]",\n },\n variant: {\n solid: "bg-muted",\n outline: "bg-transparent",\n },\n },\n defaultVariants: {\n size: "sm",\n variant: "solid",\n },\n });\n</script>\n',
|
|
1372
|
-
},
|
|
1373
|
-
],
|
|
1374
|
-
utils: [],
|
|
1375
|
-
composables: [],
|
|
1376
|
-
plugins: [],
|
|
1377
|
-
},
|
|
1378
|
-
{
|
|
1379
|
-
name: "Label",
|
|
1380
|
-
value: "label",
|
|
1381
|
-
files: [
|
|
1382
|
-
{
|
|
1383
|
-
fileName: "Label.vue",
|
|
1384
|
-
dirPath: "app/components/Ui",
|
|
1385
|
-
fileContent:
|
|
1386
|
-
'<template>\n <Label :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n <slot name="hint">\n <span v-if="hint" class="text-muted-foreground">\n {{ hint }}\n </span>\n </slot>\n </Label>\n</template>\n\n<script lang="ts" setup>\n import { Label } from "radix-vue";\n import type { LabelProps } from "radix-vue";\n\n const props = defineProps<\n LabelProps & {\n /** Custom class(es) to add to the label */\n class?: any;\n hint?: string;\n }\n >();\n\n const forwarded = reactiveOmit(props, "class", "hint");\n\n const styles = tv({\n base: "flex items-center justify-between text-[15px] font-medium leading-none hover:cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70 sm:text-sm",\n });\n</script>\n',
|
|
1387
|
-
},
|
|
1388
|
-
],
|
|
1389
|
-
utils: [],
|
|
1390
|
-
composables: [],
|
|
1391
|
-
plugins: [],
|
|
1392
|
-
},
|
|
1393
|
-
{
|
|
1394
|
-
name: "List",
|
|
1395
|
-
value: "list",
|
|
1396
|
-
files: [
|
|
1397
|
-
{
|
|
1398
|
-
fileName: "List/Content.vue",
|
|
1399
|
-
dirPath: "app/components/Ui",
|
|
1400
|
-
fileContent:
|
|
1401
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n as: "div",\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex flex-col gap-1 leading-none",\n });\n</script>\n',
|
|
1402
|
-
},
|
|
1403
|
-
{
|
|
1404
|
-
fileName: "List/Item.vue",
|
|
1405
|
-
dirPath: "app/components/Ui",
|
|
1406
|
-
fileContent:
|
|
1407
|
-
'<template>\n <component\n :is="eltype"\n :href="href"\n :to="to"\n :class="\n styles({\n hover: Boolean(onClick) || Boolean(to) || Boolean(href),\n class: props.class,\n })\n "\n @click="onClick"\n >\n <slot />\n </component>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n /**Custom class(es) to add to the element */\n class?: any;\n /** Function called when the item is clicked */\n onClick?: () => void;\n /** The location that the item should navigate to when clicked */\n to?: string;\n /** The href for the `a` tag */\n href?: string;\n }>();\n\n const styles = tv({\n base: "flex w-full items-center gap-5 px-4 py-2",\n variants: {\n hover: {\n true: "cursor-pointer outline-none hover:bg-muted focus-visible:ring-4 focus-visible:ring-primary/10",\n },\n },\n });\n\n const eltype = computed(() => {\n if (props.to || props.href) return resolveComponent("NuxtLink");\n if (props.onClick) return "button";\n return "li";\n });\n</script>\n',
|
|
1408
|
-
},
|
|
1409
|
-
{
|
|
1410
|
-
fileName: "List/List.vue",
|
|
1411
|
-
dirPath: "app/components/Ui",
|
|
1412
|
-
fileContent:
|
|
1413
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n as: "ul",\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "w-full py-2",\n });\n</script>\n',
|
|
1414
|
-
},
|
|
1415
|
-
{
|
|
1416
|
-
fileName: "List/Subtitle.vue",
|
|
1417
|
-
dirPath: "app/components/Ui",
|
|
1418
|
-
fileContent:
|
|
1419
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>{{ subtitle }}</slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The subtitle of the component */\n subtitle?: string;\n }\n >(),\n {\n as: "p",\n }\n );\n const forwarded = reactiveOmit(props, "class", "subtitle");\n const styles = tv({\n base: "text-sm text-muted-foreground",\n });\n</script>\n',
|
|
1420
|
-
},
|
|
1421
|
-
{
|
|
1422
|
-
fileName: "List/Title.vue",
|
|
1423
|
-
dirPath: "app/components/Ui",
|
|
1424
|
-
fileContent:
|
|
1425
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>{{ title }}</slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The title of the component */\n title?: string;\n }\n >(),\n {\n as: "p",\n }\n );\n const forwarded = reactiveOmit(props, "class", "title");\n const styles = tv({\n base: "font-semibold",\n });\n</script>\n',
|
|
1426
|
-
},
|
|
1427
|
-
],
|
|
1428
|
-
utils: [],
|
|
1429
|
-
composables: [],
|
|
1430
|
-
plugins: [],
|
|
1431
|
-
},
|
|
1432
|
-
{
|
|
1433
|
-
name: "Listbox",
|
|
1434
|
-
value: "listbox",
|
|
1435
|
-
files: [
|
|
1436
|
-
{
|
|
1437
|
-
fileName: "Listbox/Content.vue",
|
|
1438
|
-
dirPath: "app/components/Ui",
|
|
1439
|
-
fileContent:
|
|
1440
|
-
'<template>\n <ListboxContent v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </ListboxContent>\n</template>\n\n<script lang="ts" setup>\n import { ListboxContent, useForwardProps } from "radix-vue";\n import type { ListboxContentProps } from "radix-vue";\n\n const props = defineProps<ListboxContentProps & { class?: any }>();\n const forwarded = useForwardProps(reactiveOmit(props));\n\n const styles = tv({\n base: "max-h-[300px] w-full overflow-y-auto rounded-md border bg-popover px-4 py-2",\n });\n</script>\n',
|
|
1441
|
-
},
|
|
1442
|
-
{
|
|
1443
|
-
fileName: "Listbox/Filter.vue",
|
|
1444
|
-
dirPath: "app/components/Ui",
|
|
1445
|
-
fileContent:
|
|
1446
|
-
'<template>\n <ListboxFilter v-bind="forwarded" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { ListboxFilter, useForwardPropsEmits } from "radix-vue";\n import type { ListboxFilterEmits, ListboxFilterProps } from "radix-vue";\n\n const props = defineProps<ListboxFilterProps & { class?: any; placeholder?: string }>();\n const emits = defineEmits<ListboxFilterEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-[16px] ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground file:hover:cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",\n });\n</script>\n',
|
|
1447
|
-
},
|
|
1448
|
-
{
|
|
1449
|
-
fileName: "Listbox/Group.vue",
|
|
1450
|
-
dirPath: "app/components/Ui",
|
|
1451
|
-
fileContent:
|
|
1452
|
-
'<template>\n <ListboxGroup v-bind="forwarded">\n <slot />\n </ListboxGroup>\n</template>\n\n<script lang="ts" setup>\n import { ListboxGroup, useForwardPropsEmits } from "radix-vue";\n import type { ListboxGroupProps } from "radix-vue";\n\n const props = defineProps<ListboxGroupProps>();\n const forwarded = useForwardPropsEmits(props);\n</script>\n',
|
|
1453
|
-
},
|
|
1454
|
-
{
|
|
1455
|
-
fileName: "Listbox/GroupLabel.vue",
|
|
1456
|
-
dirPath: "app/components/Ui",
|
|
1457
|
-
fileContent:
|
|
1458
|
-
'<template>\n <ListboxGroupLabel v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </ListboxGroupLabel>\n</template>\n\n<script lang="ts" setup>\n import { ListboxGroupLabel, useForwardProps } from "radix-vue";\n import type { ListboxGroupLabelProps } from "radix-vue";\n\n const props = defineProps<ListboxGroupLabelProps & { class?: any }>();\n const forwarded = useForwardProps(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "py-1.5 pl-1 pr-8 text-sm font-semibold",\n });\n</script>\n',
|
|
1459
|
-
},
|
|
1460
|
-
{
|
|
1461
|
-
fileName: "Listbox/Item.vue",
|
|
1462
|
-
dirPath: "app/components/Ui",
|
|
1463
|
-
fileContent:
|
|
1464
|
-
'<template>\n <ListboxItem v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n <span class="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">\n <UiListboxItemIndicator :icon="icon" />\n </span>\n </ListboxItem>\n</template>\n\n<script lang="ts" setup>\n import { ListboxItem, useForwardPropsEmits } from "radix-vue";\n import type { ListboxItemEmits, ListboxItemProps } from "radix-vue";\n\n const props = defineProps<\n ListboxItemProps & {\n class?: any;\n icon?: string;\n }\n >();\n const emits = defineEmits<ListboxItemEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "icon"), emits);\n\n const styles = tv({\n base: "relative flex w-full cursor-pointer select-none items-center rounded-sm py-2 pl-3 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:ring-1 data-[highlighted]:ring-border",\n });\n</script>\n',
|
|
1465
|
-
},
|
|
1466
|
-
{
|
|
1467
|
-
fileName: "Listbox/ItemIndicator.vue",
|
|
1468
|
-
dirPath: "app/components/Ui",
|
|
1469
|
-
fileContent:
|
|
1470
|
-
'<template>\n <ListboxItemIndicator v-bind="forwarded">\n <slot>\n <Icon :class="styles({ class: props.class })" :name="icon || \'lucide:circle-check\'" />\n </slot>\n </ListboxItemIndicator>\n</template>\n\n<script lang="ts" setup>\n import { ListboxItemIndicator, useForwardPropsEmits } from "radix-vue";\n import type { ListboxItemIndicatorProps } from "radix-vue";\n\n const props = defineProps<ListboxItemIndicatorProps & { class?: any; icon?: string }>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "size-5 shrink-0",\n });\n</script>\n',
|
|
1471
|
-
},
|
|
1472
|
-
{
|
|
1473
|
-
fileName: "Listbox/Listbox.vue",
|
|
1474
|
-
dirPath: "app/components/Ui",
|
|
1475
|
-
fileContent:
|
|
1476
|
-
'<template>\n <ListboxRoot v-slot="{ modelValue }" v-bind="forwarded" :class="styles({ class: props.class })">\n <slot :model-value="modelValue" />\n </ListboxRoot>\n</template>\n\n<script lang="ts" setup>\n import { ListboxRoot, useForwardPropsEmits } from "radix-vue";\n import type { ListboxRootEmits, ListboxRootProps } from "radix-vue";\n\n const props = defineProps<ListboxRootProps & { class?: any }>();\n const emits = defineEmits<ListboxRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "relative flex flex-col gap-4",\n });\n</script>\n',
|
|
1477
|
-
},
|
|
1478
|
-
{
|
|
1479
|
-
fileName: "Listbox/Virtualizer.vue",
|
|
1480
|
-
dirPath: "app/components/Ui",
|
|
1481
|
-
fileContent:
|
|
1482
|
-
'<template>\n <ListboxVirtualizer\n v-slot="{ option }"\n v-bind="forwarded"\n :class="styles({ class: props.class })"\n >\n <slot :option="option" />\n </ListboxVirtualizer>\n</template>\n\n<script lang="ts" setup>\n import { ListboxVirtualizer, useForwardProps } from "radix-vue";\n import type { ListboxVirtualizerProps } from "radix-vue";\n\n const props = defineProps<ListboxVirtualizerProps & { class?: any }>();\n const forwarded = useForwardProps(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "",\n });\n</script>\n',
|
|
1483
|
-
},
|
|
1484
|
-
],
|
|
1485
|
-
utils: [],
|
|
1486
|
-
composables: [],
|
|
1487
|
-
plugins: [],
|
|
1488
|
-
},
|
|
1489
|
-
{
|
|
1490
|
-
name: "Loader",
|
|
1491
|
-
value: "loader",
|
|
1492
|
-
files: [
|
|
1493
|
-
{
|
|
1494
|
-
fileName: "Loader.vue",
|
|
1495
|
-
dirPath: "app/components/Ui",
|
|
1496
|
-
fileContent:
|
|
1497
|
-
'<template>\n <TransitionFade :duration="500" appear tag="template">\n <Teleport v-if="fullPage && open" to="#teleports">\n <div :class="loaderStyles().backdrop({ class: backdropClass, fullPage })">\n <Icon :class="loaderStyles().icon({ class: props.class })" :name="props.icon" />\n <slot :open>{{ text }}</slot>\n </div>\n </Teleport>\n <div\n v-if="!fullPage && open"\n :class="loaderStyles().backdrop({ class: props.backdropClass, fullPage })"\n >\n <Icon :class="loaderStyles().icon({ class: props.class })" :name="props.icon" />\n <slot :open>{{ text }}</slot>\n </div>\n </TransitionFade>\n</template>\n\n<script lang="ts">\n import { useMagicKeys } from "@vueuse/core";\n import { useBodyScrollLock } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n export type LoaderProps = PrimitiveProps & {\n /**\n * The icon to display in the loader.\n *\n * @default "svg-spinners:bars-rotate-fade"\n */\n icon?: string;\n /**\n * The class to apply to the loader Icon\n */\n class?: any;\n /**\n * The class to apply to the backdrop\n */\n backdropClass?: any;\n /**\n * Whether the loader should take up the full page.\n *\n * When this is `true`, the loader will be displayed in a fixed position that covers the entire page. You can press the `esc` key to close the loader.\n */\n fullPage?: boolean;\n /**\n * Whether to lock the scroll when the loader is open.\n *\n * @default true\n */\n lockScroll?: boolean;\n /**\n * The role of the component.\n *\n * @default "progressbar"\n */\n role?: string;\n /**\n * The text to display in the loader.\n *\n * This is displayed below the loader icon.\n */\n text?: string;\n /**\n * Whether to close the loader when the `esc` key is pressed.\n *\n * @default true\n */\n closeOnEscape?: boolean;\n };\n\n export const loaderStyles = tv({\n slots: {\n icon: "size-5",\n backdrop: "flex flex-col items-center justify-center gap-3",\n },\n variants: {\n fullPage: {\n true: {\n backdrop:\n "pointer-events-auto fixed inset-0 z-[999] size-full bg-background/80 backdrop-blur-md",\n },\n false: {\n backdrop: "relative",\n },\n },\n },\n });\n</script>\n\n<script lang="ts" setup>\n defineOptions({ inheritAttrs: false });\n const props = withDefaults(defineProps<LoaderProps>(), {\n icon: "svg-spinners:bars-rotate-fade",\n role: "progressbar",\n closeOnEscape: true,\n });\n\n const open = defineModel<boolean>({ default: true });\n const isLocked = useBodyScrollLock();\n\n const { escape } = useMagicKeys();\n\n watchEffect(() => {\n if (props.fullPage && open.value && escape?.value && props.closeOnEscape) {\n open.value = false;\n }\n if (props.lockScroll && !open.value) {\n isLocked.value = false;\n }\n if (props.lockScroll && open.value) {\n isLocked.value = true;\n }\n });\n</script>\n',
|
|
1498
|
-
},
|
|
1499
|
-
],
|
|
1500
|
-
deps: ["@morev/vue-transitions"],
|
|
1501
|
-
nuxtModules: ["@morev/vue-transitions/nuxt"],
|
|
1502
|
-
devDeps: ["@iconify-json/svg-spinners"],
|
|
1503
|
-
utils: [],
|
|
1504
|
-
composables: [],
|
|
1505
|
-
plugins: [],
|
|
1506
|
-
},
|
|
1507
|
-
{
|
|
1508
|
-
name: "Menubar",
|
|
1509
|
-
value: "menubar",
|
|
1510
|
-
files: [
|
|
1511
|
-
{
|
|
1512
|
-
fileName: "Menubar/Arrow.vue",
|
|
1513
|
-
dirPath: "app/components/Ui",
|
|
1514
|
-
fileContent:
|
|
1515
|
-
'<template>\n <MenubarArrow v-bind="props" />\n</template>\n\n<script lang="ts" setup>\n import { MenubarArrow } from "radix-vue";\n import type { MenubarArrowProps } from "radix-vue";\n\n const props = withDefaults(defineProps<MenubarArrowProps>(), {\n width: 10,\n height: 5,\n });\n</script>\n',
|
|
1516
|
-
},
|
|
1517
|
-
{
|
|
1518
|
-
fileName: "Menubar/CheckboxItem.vue",
|
|
1519
|
-
dirPath: "app/components/Ui",
|
|
1520
|
-
fileContent:
|
|
1521
|
-
'<template>\n <MenubarCheckboxItem v-bind="forwarded" :class="styles({ class: props.class })">\n <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center text-primary">\n <UiMenubarItemIndicator>\n <Icon :name="icon || \'lucide:check\'" class="h-4 w-4" />\n </UiMenubarItemIndicator>\n </span>\n <slot>{{ title }}</slot>\n <slot name="shortcut">\n <UiMenubarShortcut v-if="shortcut">{{ shortcut }}</UiMenubarShortcut>\n </slot>\n </MenubarCheckboxItem>\n</template>\n\n<script lang="ts" setup>\n import { MenubarCheckboxItem, useForwardPropsEmits } from "radix-vue";\n import type { MenubarCheckboxItemEmits, MenubarCheckboxItemProps } from "radix-vue";\n\n const props = defineProps<\n MenubarCheckboxItemProps & {\n icon?: string;\n class?: any;\n title?: string;\n shortcut?: string;\n }\n >();\n const emits = defineEmits<MenubarCheckboxItemEmits>();\n\n const forwarded = useForwardPropsEmits(\n reactiveOmit(props, "icon", "class", "title", "shortcut"),\n emits\n );\n\n const styles = tv({\n base: "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",\n });\n</script>\n',
|
|
1522
|
-
},
|
|
1523
|
-
{
|
|
1524
|
-
fileName: "Menubar/Content.vue",
|
|
1525
|
-
dirPath: "app/components/Ui",
|
|
1526
|
-
fileContent:
|
|
1527
|
-
'<template>\n <UiMenubarPortal :to="to">\n <MenubarContent v-bind="{ ...forwarded, ...$attrs }" :class="styles({ class: props.class })">\n <slot />\n </MenubarContent>\n </UiMenubarPortal>\n</template>\n\n<script lang="ts" setup>\n import { MenubarContent, useForwardPropsEmits } from "radix-vue";\n import type { MenubarContentProps, MenubarSubContentEmits } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = withDefaults(\n defineProps<\n MenubarContentProps & {\n to?: string | HTMLElement;\n class?: any;\n }\n >(),\n {\n loop: true,\n side: "bottom",\n sideOffset: 8,\n align: "start",\n alignOffset: -4,\n avoidCollisions: true,\n sticky: "partial",\n }\n );\n\n const emits = defineEmits<MenubarSubContentEmits>();\n\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "to"), emits);\n\n const styles = tv({\n base: "z-50 min-w-[220px] overflow-hidden rounded-md border bg-popover p-1 text-accent-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",\n });\n</script>\n',
|
|
1528
|
-
},
|
|
1529
|
-
{
|
|
1530
|
-
fileName: "Menubar/Group.vue",
|
|
1531
|
-
dirPath: "app/components/Ui",
|
|
1532
|
-
fileContent:
|
|
1533
|
-
'<template>\n <MenubarGroup v-bind="props">\n <slot />\n </MenubarGroup>\n</template>\n\n<script lang="ts" setup>\n import { MenubarGroup } from "radix-vue";\n import type { MenubarGroupProps } from "radix-vue";\n\n const props = defineProps<MenubarGroupProps>();\n</script>\n',
|
|
1534
|
-
},
|
|
1535
|
-
{
|
|
1536
|
-
fileName: "Menubar/Item.vue",
|
|
1537
|
-
dirPath: "app/components/Ui",
|
|
1538
|
-
fileContent:
|
|
1539
|
-
'<template>\n <MenubarItem v-bind="forwarded" :class="styles({ inset, class: props.class })">\n <slot>\n <slot name="icon">\n <Icon v-if="icon" :name="icon" class="h-4 w-4" />\n </slot>\n <slot name="title">\n <span v-if="title">{{ title }}</span>\n </slot>\n </slot>\n <slot name="shortcut">\n <UiMenubarShortcut v-if="shortcut">{{ shortcut }}</UiMenubarShortcut>\n </slot>\n </MenubarItem>\n</template>\n\n<script lang="ts" setup>\n import { MenubarItem, useForwardPropsEmits } from "radix-vue";\n import type { MenubarItemEmits, MenubarItemProps } from "radix-vue";\n\n const props = defineProps<\n MenubarItemProps & {\n inset?: boolean;\n class?: any;\n shortcut?: string;\n title?: string;\n icon?: string;\n }\n >();\n\n const emits = defineEmits<MenubarItemEmits>();\n const forwarded = useForwardPropsEmits(\n reactiveOmit(props, "class", "inset", "shortcut", "title", "icon"),\n emits\n );\n\n const styles = tv({\n base: "relative flex cursor-pointer select-none items-center gap-3 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",\n variants: {\n inset: {\n true: "pl-8",\n },\n },\n });\n</script>\n',
|
|
1540
|
-
},
|
|
1541
|
-
{
|
|
1542
|
-
fileName: "Menubar/ItemIndicator.vue",
|
|
1543
|
-
dirPath: "app/components/Ui",
|
|
1544
|
-
fileContent:
|
|
1545
|
-
'<template>\n <MenubarItemIndicator v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Icon v-if="icon" :name="icon" class="h-4 w-4" />\n </slot>\n </MenubarItemIndicator>\n</template>\n\n<script lang="ts" setup>\n import { MenubarItemIndicator } from "radix-vue";\n import type { MenubarItemIndicatorProps } from "radix-vue";\n\n const props = defineProps<\n MenubarItemIndicatorProps & {\n /** The icon to display */\n icon?: string;\n /** The class(es) to apply to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "icon");\n const styles = tv({\n base: "flex shrink-0 items-center justify-center",\n });\n</script>\n',
|
|
1546
|
-
},
|
|
1547
|
-
{
|
|
1548
|
-
fileName: "Menubar/Label.vue",
|
|
1549
|
-
dirPath: "app/components/Ui",
|
|
1550
|
-
fileContent:
|
|
1551
|
-
'<template>\n <MenubarLabel :class="styles({ inset, class: props.class })" v-bind="forwarded">\n <slot />\n </MenubarLabel>\n</template>\n\n<script lang="ts" setup>\n import { MenubarLabel } from "radix-vue";\n import type { MenubarLabelProps } from "radix-vue";\n\n const props = defineProps<\n MenubarLabelProps & {\n class?: any;\n inset?: boolean;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "inset");\n const styles = tv({\n base: "px-2 py-1.5 text-sm font-semibold",\n variants: {\n inset: {\n true: "pl-8",\n },\n },\n });\n</script>\n',
|
|
1552
|
-
},
|
|
1553
|
-
{
|
|
1554
|
-
fileName: "Menubar/Menu.vue",
|
|
1555
|
-
dirPath: "app/components/Ui",
|
|
1556
|
-
fileContent:
|
|
1557
|
-
'<template>\n <MenubarMenu v-bind="props">\n <slot />\n </MenubarMenu>\n</template>\n\n<script lang="ts" setup>\n import { MenubarMenu } from "radix-vue";\n import type { MenubarMenuProps } from "radix-vue";\n\n const props = defineProps<MenubarMenuProps>();\n</script>\n',
|
|
1558
|
-
},
|
|
1559
|
-
{
|
|
1560
|
-
fileName: "Menubar/Menubar.vue",
|
|
1561
|
-
dirPath: "app/components/Ui",
|
|
1562
|
-
fileContent:
|
|
1563
|
-
'<template>\n <MenubarRoot v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </MenubarRoot>\n</template>\n\n<script lang="ts" setup>\n import { MenubarRoot, useForwardPropsEmits } from "radix-vue";\n import type { MenubarRootEmits, MenubarRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n MenubarRootProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n loop: true,\n }\n );\n\n const emits = defineEmits<MenubarRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "inline-flex h-10 items-center space-x-1 rounded-md border bg-background p-1",\n });\n</script>\n',
|
|
1564
|
-
},
|
|
1565
|
-
{
|
|
1566
|
-
fileName: "Menubar/Portal.vue",
|
|
1567
|
-
dirPath: "app/components/Ui",
|
|
1568
|
-
fileContent:
|
|
1569
|
-
'<template>\n <MenubarPortal v-bind="props">\n <slot />\n </MenubarPortal>\n</template>\n\n<script lang="ts" setup>\n import type { MenubarPortalProps } from "radix-vue";\n\n const props = defineProps<MenubarPortalProps>();\n</script>\n',
|
|
1570
|
-
},
|
|
1571
|
-
{
|
|
1572
|
-
fileName: "Menubar/RadioGroup.vue",
|
|
1573
|
-
dirPath: "app/components/Ui",
|
|
1574
|
-
fileContent:
|
|
1575
|
-
'<template>\n <MenubarRadioGroup v-bind="forwarded">\n <slot />\n </MenubarRadioGroup>\n</template>\n\n<script lang="ts" setup>\n import { MenubarRadioGroup, useForwardPropsEmits } from "radix-vue";\n import type { MenubarRadioGroupEmits, MenubarRadioGroupProps } from "radix-vue";\n\n const props = defineProps<MenubarRadioGroupProps>();\n const emits = defineEmits<MenubarRadioGroupEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
1576
|
-
},
|
|
1577
|
-
{
|
|
1578
|
-
fileName: "Menubar/RadioItem.vue",
|
|
1579
|
-
dirPath: "app/components/Ui",
|
|
1580
|
-
fileContent:
|
|
1581
|
-
'<template>\n <MenubarRadioItem v-bind="forwarded" :class="styles({ class: props.class })">\n <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center text-primary">\n <UiMenubarItemIndicator>\n <Icon v-if="icon" :name="icon" class="h-4 w-4" />\n <Icon v-else name="ph:circle-fill" class="h-2 w-2" />\n </UiMenubarItemIndicator>\n </span>\n <slot>{{ title }}</slot>\n </MenubarRadioItem>\n</template>\n\n<script lang="ts" setup>\n import { MenubarRadioItem, useForwardPropsEmits } from "radix-vue";\n import type { MenubarRadioItemEmits, MenubarRadioItemProps } from "radix-vue";\n\n const props = defineProps<\n MenubarRadioItemProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The icon to display */\n icon?: string;\n /** The title of the component */\n title?: string;\n }\n >();\n\n const emits = defineEmits<MenubarRadioItemEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "icon", "title"), emits);\n\n const styles = tv({\n base: "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",\n });\n</script>\n',
|
|
1582
|
-
},
|
|
1583
|
-
{
|
|
1584
|
-
fileName: "Menubar/Separator.vue",
|
|
1585
|
-
dirPath: "app/components/Ui",
|
|
1586
|
-
fileContent:
|
|
1587
|
-
'<template>\n <MenubarSeparator :class="styles({ class: props.class })" v-bind="forwarded" />\n</template>\n\n<script lang="ts" setup>\n import { MenubarSeparator } from "radix-vue";\n import type { MenubarSeparatorProps } from "radix-vue";\n\n const props = defineProps<\n MenubarSeparatorProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "-mx-1 my-1 h-px bg-border",\n });\n</script>\n',
|
|
1588
|
-
},
|
|
1589
|
-
{
|
|
1590
|
-
fileName: "Menubar/Shortcut.vue",
|
|
1591
|
-
dirPath: "app/components/Ui",
|
|
1592
|
-
fileContent:
|
|
1593
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n { as: "span" }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "ml-auto text-xs tracking-widest opacity-60",\n });\n</script>\n',
|
|
1594
|
-
},
|
|
1595
|
-
{
|
|
1596
|
-
fileName: "Menubar/Sub.vue",
|
|
1597
|
-
dirPath: "app/components/Ui",
|
|
1598
|
-
fileContent:
|
|
1599
|
-
'<template>\n <MenubarSub v-bind="forwarded">\n <slot />\n </MenubarSub>\n</template>\n\n<script lang="ts" setup>\n import { MenubarSub, useForwardPropsEmits } from "radix-vue";\n import type { MenubarSubEmits, MenubarSubProps } from "radix-vue";\n\n const props = defineProps<MenubarSubProps>();\n const emits = defineEmits<MenubarSubEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
1600
|
-
},
|
|
1601
|
-
{
|
|
1602
|
-
fileName: "Menubar/SubContent.vue",
|
|
1603
|
-
dirPath: "app/components/Ui",
|
|
1604
|
-
fileContent:
|
|
1605
|
-
'<template>\n <UiMenubarPortal :to="to">\n <MenubarSubContent v-bind="{ ...forwarded, ...$attrs }" :class="styles({ class: props.class })">\n <slot />\n </MenubarSubContent>\n </UiMenubarPortal>\n</template>\n\n<script lang="ts" setup>\n import { MenubarSubContent, useForwardPropsEmits } from "radix-vue";\n import type { MenubarSubContentEmits, MenubarSubContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n const props = withDefaults(\n defineProps<\n MenubarSubContentProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The target element to portal the component to */\n to?: string | HTMLElement;\n }\n >(),\n {\n loop: true,\n sideOffset: 5,\n avoidCollisions: true,\n collisionPadding: 8,\n sticky: "partial",\n }\n );\n\n const emits = defineEmits<MenubarSubContentEmits>();\n\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "to"), emits);\n\n const styles = tv({\n base: "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-accent-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",\n });\n</script>\n',
|
|
1606
|
-
},
|
|
1607
|
-
{
|
|
1608
|
-
fileName: "Menubar/SubTrigger.vue",
|
|
1609
|
-
dirPath: "app/components/Ui",
|
|
1610
|
-
fileContent:
|
|
1611
|
-
'<template>\n <MenubarSubTrigger v-bind="forwarded" :class="styles({ inset, class: props.class })">\n <slot>\n <Icon v-if="icon" :name="icon" class="h-4 w-4" />\n <span v-if="title">{{ title }}</span>\n </slot>\n <Icon\n class="ml-auto h-4 w-4 text-muted-foreground"\n :name="trailingIcon || \'lucide:chevron-right\'"\n />\n </MenubarSubTrigger>\n</template>\n\n<script lang="ts" setup>\n import { MenubarSubTrigger } from "radix-vue";\n import type { MenubarSubTriggerProps } from "radix-vue";\n\n const props = defineProps<\n MenubarSubTriggerProps & {\n class?: any;\n inset?: boolean;\n icon?: string;\n title?: string;\n trailingIcon?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "inset", "icon", "title", "trailingIcon");\n const styles = tv({\n base: "flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",\n variants: {\n inset: {\n true: "pl-8",\n },\n },\n });\n</script>\n',
|
|
1612
|
-
},
|
|
1613
|
-
{
|
|
1614
|
-
fileName: "Menubar/Trigger.vue",
|
|
1615
|
-
dirPath: "app/components/Ui",
|
|
1616
|
-
fileContent:
|
|
1617
|
-
'<template>\n <MenubarTrigger :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </MenubarTrigger>\n</template>\n\n<script lang="ts" setup>\n import { MenubarTrigger } from "radix-vue";\n import type { MenubarTriggerProps } from "radix-vue";\n\n const props = defineProps<\n MenubarTriggerProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex cursor-pointer select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground",\n });\n</script>\n',
|
|
1618
|
-
},
|
|
1619
|
-
],
|
|
1620
|
-
utils: [],
|
|
1621
|
-
composables: [],
|
|
1622
|
-
plugins: [],
|
|
1623
|
-
},
|
|
1624
|
-
{
|
|
1625
|
-
name: "Native Select",
|
|
1626
|
-
value: "native-select",
|
|
1627
|
-
devDeps: ["@vueuse/core"],
|
|
1628
|
-
files: [
|
|
1629
|
-
{
|
|
1630
|
-
fileName: "NativeSelect.vue",
|
|
1631
|
-
dirPath: "app/components/Ui",
|
|
1632
|
-
fileContent:
|
|
1633
|
-
'<template>\n <div class="relative">\n <select\n :id="id"\n ref="select"\n v-model="localModel"\n :multiple="multiple"\n :name="name"\n :size="size"\n :placeholder="placeholder"\n :disabled="disabled"\n :required="required"\n :class="styles({ class: props.class })"\n >\n <slot />\n </select>\n <span class="pointer-events-none absolute inset-y-0 right-3 flex items-center justify-center">\n <slot name="trailingIcon">\n <Icon\n :name="trailingIcon || \'lucide:chevrons-up-down\'"\n class="h-4 w-4 text-muted-foreground"\n />\n </slot>\n </span>\n </div>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n class?: any;\n id?: string;\n name?: string;\n placeholder?: string;\n disabled?: boolean;\n required?: boolean;\n modelValue?: any;\n multiple?: boolean;\n size?: number;\n autofocus?: boolean;\n trailingIcon?: string;\n }>();\n const styles = tv({\n base: "h-10 w-full appearance-none rounded-md border border-input bg-background px-3 py-2 pr-10 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",\n });\n\n const select = ref<HTMLSelectElement | null>(null);\n const emits = defineEmits<{\n "update:modelValue": [value: any];\n }>();\n\n const localModel = useVModel(props, "modelValue", emits);\n\n onMounted(() => {\n if (props.autofocus) {\n select.value?.focus();\n }\n });\n</script>\n',
|
|
1634
|
-
},
|
|
1635
|
-
],
|
|
1636
|
-
utils: [],
|
|
1637
|
-
composables: [],
|
|
1638
|
-
plugins: [],
|
|
1639
|
-
},
|
|
1640
|
-
{
|
|
1641
|
-
name: "Navbar",
|
|
1642
|
-
value: "navbar",
|
|
1643
|
-
files: [
|
|
1644
|
-
{
|
|
1645
|
-
fileName: "Navbar.vue",
|
|
1646
|
-
dirPath: "app/components/Ui",
|
|
1647
|
-
fileContent:
|
|
1648
|
-
'<template>\n <Primitive :class="styles({ sticky, class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive, useForwardProps } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** Whether the navbar should be sticky */\n sticky?: boolean;\n }\n >(),\n {\n as: "header",\n }\n );\n\n const forwarded = useForwardProps(reactiveOmit(props, "class", "sticky"));\n\n const styles = tv({\n base: "z-20 border-b bg-background/90 backdrop-blur",\n variants: {\n sticky: {\n true: "sticky top-0",\n },\n },\n });\n</script>\n',
|
|
1649
|
-
},
|
|
1650
|
-
],
|
|
1651
|
-
utils: [],
|
|
1652
|
-
composables: [],
|
|
1653
|
-
plugins: [],
|
|
1654
|
-
},
|
|
1655
|
-
{
|
|
1656
|
-
name: "Navigation Menu",
|
|
1657
|
-
value: "navigation-menu",
|
|
1658
|
-
files: [
|
|
1659
|
-
{
|
|
1660
|
-
fileName: "NavigationMenu/Content.vue",
|
|
1661
|
-
dirPath: "app/components/Ui",
|
|
1662
|
-
fileContent:
|
|
1663
|
-
'<template>\n <NavigationMenuContent v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </NavigationMenuContent>\n</template>\n\n<script lang="ts" setup>\n import { NavigationMenuContent, useForwardPropsEmits } from "radix-vue";\n import type { NavigationMenuContentEmits, NavigationMenuContentProps } from "radix-vue";\n\n const props = defineProps<\n NavigationMenuContentProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n\n const emits = defineEmits<NavigationMenuContentEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",\n });\n</script>\n',
|
|
1664
|
-
},
|
|
1665
|
-
{
|
|
1666
|
-
fileName: "NavigationMenu/Indicator.vue",
|
|
1667
|
-
dirPath: "app/components/Ui",
|
|
1668
|
-
fileContent:
|
|
1669
|
-
'<template>\n <NavigationMenuIndicator v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n <div class="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />\n </NavigationMenuIndicator>\n</template>\n\n<script lang="ts" setup>\n import { NavigationMenuIndicator } from "radix-vue";\n import type { NavigationMenuIndicatorProps } from "radix-vue";\n\n const props = defineProps<\n NavigationMenuIndicatorProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",\n });\n</script>\n',
|
|
1670
|
-
},
|
|
1671
|
-
{
|
|
1672
|
-
fileName: "NavigationMenu/Item.vue",
|
|
1673
|
-
dirPath: "app/components/Ui",
|
|
1674
|
-
fileContent:
|
|
1675
|
-
'<template>\n <NavigationMenuItem v-bind="props">\n <slot />\n </NavigationMenuItem>\n</template>\n\n<script lang="ts" setup>\n import { NavigationMenuItem } from "radix-vue";\n import type { NavigationMenuItemProps } from "radix-vue";\n\n const props = defineProps<NavigationMenuItemProps>();\n</script>\n',
|
|
1676
|
-
},
|
|
1677
|
-
{
|
|
1678
|
-
fileName: "NavigationMenu/Link.vue",
|
|
1679
|
-
dirPath: "app/components/Ui",
|
|
1680
|
-
fileContent:
|
|
1681
|
-
'<template>\n <NavigationMenuLink v-bind="forwarded">\n <slot />\n </NavigationMenuLink>\n</template>\n\n<script lang="ts" setup>\n import { NavigationMenuLink, useForwardPropsEmits } from "radix-vue";\n import type { NavigationMenuLinkEmits, NavigationMenuLinkProps } from "radix-vue";\n\n const props = defineProps<NavigationMenuLinkProps>();\n const emits = defineEmits<NavigationMenuLinkEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
1682
|
-
},
|
|
1683
|
-
{
|
|
1684
|
-
fileName: "NavigationMenu/List.vue",
|
|
1685
|
-
dirPath: "app/components/Ui",
|
|
1686
|
-
fileContent:
|
|
1687
|
-
'<template>\n <NavigationMenuList v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </NavigationMenuList>\n</template>\n\n<script lang="ts" setup>\n import { NavigationMenuList } from "radix-vue";\n import type { NavigationMenuListProps } from "radix-vue";\n\n const props = defineProps<\n NavigationMenuListProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "group flex flex-1 list-none items-center justify-center space-x-1",\n });\n</script>\n',
|
|
1688
|
-
},
|
|
1689
|
-
{
|
|
1690
|
-
fileName: "NavigationMenu/NavigationMenu.vue",
|
|
1691
|
-
dirPath: "app/components/Ui",
|
|
1692
|
-
fileContent:
|
|
1693
|
-
'<template>\n <NavigationMenuRoot :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n <slot name="viewport">\n <UiNavigationMenuViewport />\n </slot>\n </NavigationMenuRoot>\n</template>\n\n<script lang="ts" setup>\n import { NavigationMenuRoot, useForwardPropsEmits } from "radix-vue";\n import type { NavigationMenuRootEmits, NavigationMenuRootProps } from "radix-vue";\n\n const props = defineProps<\n NavigationMenuRootProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const emits = defineEmits<NavigationMenuRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "relative flex max-w-max flex-1 items-center justify-center",\n });\n</script>\n',
|
|
1694
|
-
},
|
|
1695
|
-
{
|
|
1696
|
-
fileName: "NavigationMenu/Sub.vue",
|
|
1697
|
-
dirPath: "app/components/Ui",
|
|
1698
|
-
fileContent:
|
|
1699
|
-
'<template>\n <NavigationMenuSub v-bind="forwarded">\n <slot />\n </NavigationMenuSub>\n</template>\n\n<script lang="ts" setup>\n import { NavigationMenuSub, useForwardPropsEmits } from "radix-vue";\n import type { NavigationMenuSubEmits, NavigationMenuSubProps } from "radix-vue";\n\n const props = defineProps<NavigationMenuSubProps>();\n const emits = defineEmits<NavigationMenuSubEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
1700
|
-
},
|
|
1701
|
-
{
|
|
1702
|
-
fileName: "NavigationMenu/Trigger.vue",
|
|
1703
|
-
dirPath: "app/components/Ui",
|
|
1704
|
-
fileContent:
|
|
1705
|
-
'<template>\n <NavigationMenuTrigger v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>{{ title }}</slot>\n <slot name="icon">\n <Icon\n :name="icon || \'lucide:chevron-down\'"\n class="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"\n aria-hidden="true"\n />\n </slot>\n </NavigationMenuTrigger>\n</template>\n\n<script lang="ts" setup>\n import { NavigationMenuTrigger } from "radix-vue";\n import type { NavigationMenuTriggerProps } from "radix-vue";\n\n const props = defineProps<\n NavigationMenuTriggerProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** Icon to show */\n icon?: string;\n /** Title to show */\n title?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "icon", "title");\n const styles = tv({\n base: "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50",\n });\n</script>\n',
|
|
1706
|
-
},
|
|
1707
|
-
{
|
|
1708
|
-
fileName: "NavigationMenu/Viewport.vue",
|
|
1709
|
-
dirPath: "app/components/Ui",
|
|
1710
|
-
fileContent:
|
|
1711
|
-
'<template>\n <div class="absolute left-0 top-full flex justify-center">\n <NavigationMenuViewport\n v-bind="{ ...forwarded, ...$attrs }"\n :class="styles({ class: props.class })"\n />\n </div>\n</template>\n\n<script lang="ts" setup>\n import { NavigationMenuViewport } from "radix-vue";\n import type { NavigationMenuViewportProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n const props = defineProps<\n NavigationMenuViewportProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",\n });\n</script>\n',
|
|
1712
|
-
},
|
|
1713
|
-
],
|
|
1714
|
-
utils: [],
|
|
1715
|
-
composables: [],
|
|
1716
|
-
plugins: [],
|
|
1717
|
-
},
|
|
1718
|
-
{
|
|
1719
|
-
name: "Number Field",
|
|
1720
|
-
value: "number-field",
|
|
1721
|
-
deps: ["@internationalized/number"],
|
|
1722
|
-
files: [
|
|
1723
|
-
{
|
|
1724
|
-
fileName: "NumberField/Decrement.vue",
|
|
1725
|
-
dirPath: "app/components/Ui",
|
|
1726
|
-
fileContent:
|
|
1727
|
-
'<template>\n <NumberFieldDecrement v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Icon :name="props.icon" />\n </slot>\n </NumberFieldDecrement>\n</template>\n\n<script lang="ts" setup>\n import { NumberFieldDecrement, useForwardProps } from "radix-vue";\n import type { NumberFieldDecrementProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n NumberFieldDecrementProps & {\n class?: any;\n icon?: string;\n }\n >(),\n { icon: "lucide:minus" }\n );\n\n const forwarded = useForwardProps(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "flex h-full shrink-0 items-center justify-center bg-transparent p-3 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",\n });\n</script>\n',
|
|
1728
|
-
},
|
|
1729
|
-
{
|
|
1730
|
-
fileName: "NumberField/Increment.vue",
|
|
1731
|
-
dirPath: "app/components/Ui",
|
|
1732
|
-
fileContent:
|
|
1733
|
-
'<template>\n <NumberFieldIncrement v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Icon :name="props.icon" />\n </slot>\n </NumberFieldIncrement>\n</template>\n\n<script lang="ts" setup>\n import { NumberFieldIncrement, useForwardProps } from "radix-vue";\n import type { NumberFieldIncrementProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n NumberFieldIncrementProps & {\n class?: any;\n icon?: string;\n }\n >(),\n { icon: "lucide:plus" }\n );\n\n const forwarded = useForwardProps(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "flex h-full shrink-0 items-center justify-center bg-transparent p-3 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",\n });\n</script>\n',
|
|
1734
|
-
},
|
|
1735
|
-
{
|
|
1736
|
-
fileName: "NumberField/Input.vue",
|
|
1737
|
-
dirPath: "app/components/Ui",
|
|
1738
|
-
fileContent:
|
|
1739
|
-
'<template>\n <NumberFieldInput v-bind="forwarded" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { NumberFieldInput, useForwardProps } from "radix-vue";\n import type { NumberFieldInputProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n NumberFieldInputProps & {\n class?: any;\n }\n >(),\n {}\n );\n\n const forwarded = useForwardProps(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "h-full w-full grow bg-transparent text-center text-base placeholder:text-muted-foreground/80 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",\n });\n</script>\n',
|
|
1740
|
-
},
|
|
1741
|
-
{
|
|
1742
|
-
fileName: "NumberField/NumberField.vue",
|
|
1743
|
-
dirPath: "app/components/Ui",
|
|
1744
|
-
fileContent:
|
|
1745
|
-
'<template>\n <NumberFieldRoot\n v-slot="rootSlotProps"\n v-bind="forwarded"\n :class="styles({ class: props.class })"\n >\n <slot v-bind="rootSlotProps">\n <slot name="decrement">\n <UiNumberFieldDecrement />\n </slot>\n <slot name="input">\n <UiNumberFieldInput />\n </slot>\n <slot name="increment">\n <UiNumberFieldIncrement />\n </slot>\n </slot>\n </NumberFieldRoot>\n</template>\n\n<script lang="ts" setup>\n import { NumberFieldRoot, useForwardPropsEmits } from "radix-vue";\n import type { NumberFieldRootEmits, NumberFieldRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n NumberFieldRootProps & {\n class?: any;\n }\n >(),\n {}\n );\n\n const emit = defineEmits<NumberFieldRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emit);\n\n const styles = tv({\n base: "flex h-10 w-full items-center gap-1 rounded-md border border-input bg-background text-base focus-within:border-input focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",\n });\n</script>\n',
|
|
1746
|
-
},
|
|
1747
|
-
],
|
|
1748
|
-
utils: [],
|
|
1749
|
-
composables: [],
|
|
1750
|
-
plugins: [],
|
|
1751
|
-
},
|
|
1752
|
-
{
|
|
1753
|
-
name: "Pagination",
|
|
1754
|
-
value: "pagination",
|
|
1755
|
-
files: [
|
|
1756
|
-
{
|
|
1757
|
-
fileName: "Pagination/Ellipsis.vue",
|
|
1758
|
-
dirPath: "app/components/Ui",
|
|
1759
|
-
fileContent:
|
|
1760
|
-
'<template>\n <PaginationEllipsis v-bind="forwarded">\n <slot>\n <div v-if="icon" class="inline-flex h-9 w-9 items-center justify-center hover:bg-transparent">\n <Icon :name="icon" />\n </div>\n </slot>\n </PaginationEllipsis>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { PaginationEllipsis } from "radix-vue";\n import type { PaginationEllipsisProps } from "radix-vue";\n\n const props = defineProps<\n PaginationEllipsisProps & {\n /** Icon to show */\n icon?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "icon");\n</script>\n',
|
|
1761
|
-
},
|
|
1762
|
-
{
|
|
1763
|
-
fileName: "Pagination/First.vue",
|
|
1764
|
-
dirPath: "app/components/Ui",
|
|
1765
|
-
fileContent:
|
|
1766
|
-
'<template>\n <PaginationFirst v-bind="forwarded">\n <slot>\n <UiButton v-if="icon" variant="ghost" size="icon-sm">\n <Icon :name="icon" />\n </UiButton>\n </slot>\n </PaginationFirst>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { PaginationFirst } from "radix-vue";\n import type { PaginationFirstProps } from "radix-vue";\n\n const props = defineProps<\n PaginationFirstProps & {\n /** Icon to show */\n icon?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "icon");\n</script>\n',
|
|
1767
|
-
},
|
|
1768
|
-
{
|
|
1769
|
-
fileName: "Pagination/Item.vue",
|
|
1770
|
-
dirPath: "app/components/Ui",
|
|
1771
|
-
fileContent:
|
|
1772
|
-
'<template>\n <PaginationListItem v-bind="props">\n <slot>\n <UiButton\n variant="outline"\n size="icon-sm"\n class="data-[selected=true]:border-transparent data-[selected=true]:bg-primary data-[selected=true]:text-primary-foreground"\n >\n {{ value }}\n </UiButton>\n </slot>\n </PaginationListItem>\n</template>\n\n<script lang="ts" setup>\n import { PaginationListItem } from "radix-vue";\n import type { PaginationListItemProps } from "radix-vue";\n\n const props = defineProps<PaginationListItemProps>();\n</script>\n',
|
|
1773
|
-
},
|
|
1774
|
-
{
|
|
1775
|
-
fileName: "Pagination/Last.vue",
|
|
1776
|
-
dirPath: "app/components/Ui",
|
|
1777
|
-
fileContent:
|
|
1778
|
-
'<template>\n <PaginationLast v-bind="forwarded">\n <slot>\n <UiButton v-if="icon" variant="ghost" size="icon-sm">\n <Icon :name="icon" />\n </UiButton>\n </slot>\n </PaginationLast>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { PaginationLast } from "radix-vue";\n import type { PaginationLastProps } from "radix-vue";\n\n const props = defineProps<\n PaginationLastProps & {\n /** Icon to show */\n icon?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "icon");\n</script>\n',
|
|
1779
|
-
},
|
|
1780
|
-
{
|
|
1781
|
-
fileName: "Pagination/List.vue",
|
|
1782
|
-
dirPath: "app/components/Ui",
|
|
1783
|
-
fileContent:
|
|
1784
|
-
'<template>\n <PaginationList v-slot="{ items }" :class="styles({ class: props.class })" v-bind="forwarded">\n <slot :items="items" />\n </PaginationList>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { PaginationList } from "radix-vue";\n import type { PaginationListProps } from "radix-vue";\n\n const props = defineProps<\n PaginationListProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex items-center gap-1",\n });\n</script>\n',
|
|
1785
|
-
},
|
|
1786
|
-
{
|
|
1787
|
-
fileName: "Pagination/Next.vue",
|
|
1788
|
-
dirPath: "app/components/Ui",
|
|
1789
|
-
fileContent:
|
|
1790
|
-
'<template>\n <PaginationNext v-bind="forwarded">\n <slot>\n <UiButton v-if="icon" variant="ghost" size="icon-sm">\n <Icon :name="icon" />\n </UiButton>\n </slot>\n </PaginationNext>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { PaginationNext } from "radix-vue";\n import type { PaginationNextProps } from "radix-vue";\n\n const props = defineProps<\n PaginationNextProps & {\n /** Icon to show */\n icon?: string;\n }\n >();\n\n const forwarded = reactiveOmit(props, "icon");\n</script>\n',
|
|
1791
|
-
},
|
|
1792
|
-
{
|
|
1793
|
-
fileName: "Pagination/Pagination.vue",
|
|
1794
|
-
dirPath: "app/components/Ui",
|
|
1795
|
-
fileContent:
|
|
1796
|
-
'<template>\n <PaginationRoot v-bind="forwarded">\n <slot>\n <UiPaginationList v-slot="{ items }">\n <slot name="first"><UiPaginationFirst as-child :icon="firstIcon" /> </slot>\n <slot name="prev"><UiPaginationPrev as-child :icon="prevIcon" /> </slot>\n\n <template v-for="(page, index) in items" :key="index">\n <UiPaginationItem v-if="page.type === \'page\'" as-child v-bind="page" />\n <UiPaginationEllipsis\n v-else-if="page.type === \'ellipsis\'"\n as-child\n v-bind="page"\n :icon="ellipsisIcon"\n />\n </template>\n <slot name="next"><UiPaginationNext as-child :icon="nextIcon" /> </slot>\n <slot name="last"><UiPaginationLast as-child :icon="lastIcon" /></slot>\n </UiPaginationList>\n </slot>\n </PaginationRoot>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { PaginationRoot, useForwardPropsEmits } from "radix-vue";\n import type { PaginationRootEmits, PaginationRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PaginationRootProps & {\n ellipsisIcon?: string;\n firstIcon?: string;\n lastIcon?: string;\n nextIcon?: string;\n prevIcon?: string;\n }\n >(),\n {\n defaultPage: 1,\n total: 10,\n itemsPerPage: 10,\n siblingCount: 3,\n showEdges: true,\n ellipsisIcon: "lucide:more-horizontal",\n firstIcon: "lucide:chevrons-left",\n lastIcon: "lucide:chevrons-right",\n nextIcon: "lucide:chevron-right",\n prevIcon: "lucide:chevron-left",\n }\n );\n\n const emits = defineEmits<PaginationRootEmits>();\n const forwarded = useForwardPropsEmits(\n reactiveOmit(props, "ellipsisIcon", "firstIcon", "lastIcon", "nextIcon", "prevIcon"),\n emits\n );\n</script>\n',
|
|
1797
|
-
},
|
|
1798
|
-
{
|
|
1799
|
-
fileName: "Pagination/Prev.vue",
|
|
1800
|
-
dirPath: "app/components/Ui",
|
|
1801
|
-
fileContent:
|
|
1802
|
-
'<template>\n <PaginationPrev v-bind="forwarded">\n <slot>\n <UiButton v-if="icon" variant="ghost" size="icon-sm">\n <Icon :name="icon" />\n </UiButton>\n </slot>\n </PaginationPrev>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { PaginationPrev } from "radix-vue";\n import type { PaginationPrevProps } from "radix-vue";\n\n const props = defineProps<\n PaginationPrevProps & {\n /** Icon to show */\n icon?: string;\n }\n >();\n\n const forwarded = reactiveOmit(props, "icon");\n</script>\n',
|
|
1803
|
-
},
|
|
1804
|
-
],
|
|
1805
|
-
utils: [],
|
|
1806
|
-
composables: [],
|
|
1807
|
-
plugins: [],
|
|
1808
|
-
},
|
|
1809
|
-
{
|
|
1810
|
-
name: "Pin Input (OTP)",
|
|
1811
|
-
value: "pin-input",
|
|
1812
|
-
files: [
|
|
1813
|
-
{
|
|
1814
|
-
fileName: "PinInput/PinInput.vue",
|
|
1815
|
-
dirPath: "app/components/Ui",
|
|
1816
|
-
fileContent:
|
|
1817
|
-
'<template>\n <PinInputRoot v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <template v-for="(input, k) in inputCount" :key="k">\n <UiPinInputInput :index="k" />\n <template v-if="k < inputCount - 1">\n <span v-if="separator" class="text-muted-foreground">{{ separator }}</span>\n </template>\n </template>\n </slot>\n </PinInputRoot>\n</template>\n\n<script lang="ts" setup>\n import { PinInputRoot, useForwardPropsEmits } from "radix-vue";\n import type { PinInputRootEmits, PinInputRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PinInputRootProps & {\n /** Custom class(es) to apply to the parent element. */\n class?: any;\n /** The number of inputs to render. @default 4 */\n inputCount?: number;\n /** The separator to render between inputs. @default undefined */\n separator?: string;\n }\n >(),\n {\n inputCount: 4,\n }\n );\n\n const emits = defineEmits<PinInputRootEmits>();\n\n const forwarded = useForwardPropsEmits(\n reactiveOmit(props, "class", "inputCount", "separator"),\n emits\n );\n const styles = tv({\n base: "flex items-center gap-2",\n });\n</script>\n',
|
|
1818
|
-
},
|
|
1819
|
-
{
|
|
1820
|
-
fileName: "PinInput/PinInputInput.vue",
|
|
1821
|
-
dirPath: "app/components/Ui",
|
|
1822
|
-
fileContent:
|
|
1823
|
-
'<template>\n <PinInputInput v-bind="forwarded" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { PinInputInput } from "radix-vue";\n import type { PinInputInputProps } from "radix-vue";\n\n const props = defineProps<\n PinInputInputProps & {\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "h-10 w-10 rounded-md border border-input bg-background p-1 text-center text-base font-medium placeholder:text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",\n });\n</script>\n',
|
|
1824
|
-
},
|
|
1825
|
-
],
|
|
1826
|
-
utils: [],
|
|
1827
|
-
composables: [],
|
|
1828
|
-
plugins: [],
|
|
1829
|
-
},
|
|
1830
|
-
{
|
|
1831
|
-
name: "Placeholder",
|
|
1832
|
-
value: "placeholder",
|
|
1833
|
-
files: [
|
|
1834
|
-
{
|
|
1835
|
-
fileName: "Placeholder.vue",
|
|
1836
|
-
dirPath: "app/components/Ui",
|
|
1837
|
-
fileContent:
|
|
1838
|
-
'<template>\n <Primitive :as :as-child :class="placeHolderStyles().wrapper({ class: props.class })">\n <svg :class="placeHolderStyles().svg()" fill="none">\n <defs>\n <pattern\n id="pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e"\n x="0"\n y="0"\n width="10"\n height="10"\n patternUnits="userSpaceOnUse"\n >\n <path d="M-3 13 15-5M-5 5l18-18M-1 21 17 3" />\n </pattern>\n </defs>\n <rect\n stroke="none"\n fill="url(#pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e)"\n width="100%"\n height="100%"\n />\n </svg>\n\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts">\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n import type { HTMLAttributes } from "vue";\n\n export const placeHolderStyles = tv({\n slots: {\n wrapper:\n "relative flex items-center justify-center overflow-hidden rounded-md border border-dashed px-4 opacity-75",\n svg: "absolute inset-0 size-full stroke-foreground/10",\n },\n });\n</script>\n\n<script lang="ts" setup>\n const props = defineProps<\n PrimitiveProps & {\n /**\n * Additional classes to add to the parent element.\n */\n class?: HTMLAttributes["class"];\n }\n >();\n</script>\n',
|
|
1839
|
-
},
|
|
1840
|
-
],
|
|
1841
|
-
utils: [],
|
|
1842
|
-
composables: [],
|
|
1843
|
-
plugins: [],
|
|
1844
|
-
},
|
|
1845
|
-
{
|
|
1846
|
-
name: "Popover",
|
|
1847
|
-
value: "popover",
|
|
1848
|
-
files: [
|
|
1849
|
-
{
|
|
1850
|
-
fileName: "Popover/Anchor.vue",
|
|
1851
|
-
dirPath: "app/components/Ui",
|
|
1852
|
-
fileContent:
|
|
1853
|
-
'<template>\n <PopoverAnchor v-bind="forwarded">\n <slot />\n </PopoverAnchor>\n</template>\n\n<script lang="ts" setup>\n import { PopoverAnchor, useForwardProps } from "radix-vue";\n import type { PopoverAnchorProps } from "radix-vue";\n\n const props = defineProps<PopoverAnchorProps>();\n const forwarded = useForwardProps(props);\n</script>\n',
|
|
1854
|
-
},
|
|
1855
|
-
{
|
|
1856
|
-
fileName: "Popover/Arrow.vue",
|
|
1857
|
-
dirPath: "app/components/Ui",
|
|
1858
|
-
fileContent:
|
|
1859
|
-
'<template>\n <PopoverArrow v-bind="forwarded" />\n</template>\n\n<script lang="ts" setup>\n import { PopoverArrow, useForwardProps } from "radix-vue";\n import type { PopoverArrowProps } from "radix-vue";\n\n const props = withDefaults(defineProps<PopoverArrowProps>(), {\n width: 10,\n height: 5,\n });\n\n const forwarded = useForwardProps(props);\n</script>\n',
|
|
1860
|
-
},
|
|
1861
|
-
{
|
|
1862
|
-
fileName: "Popover/Close.vue",
|
|
1863
|
-
dirPath: "app/components/Ui",
|
|
1864
|
-
fileContent:
|
|
1865
|
-
'<template>\n <PopoverClose v-bind="forwarded">\n <slot />\n </PopoverClose>\n</template>\n\n<script lang="ts" setup>\n import { PopoverClose, useForwardProps } from "radix-vue";\n import type { PopoverCloseProps } from "radix-vue";\n\n const props = defineProps<PopoverCloseProps>();\n const forwarded = useForwardProps(props);\n</script>\n',
|
|
1866
|
-
},
|
|
1867
|
-
{
|
|
1868
|
-
fileName: "Popover/Content.vue",
|
|
1869
|
-
dirPath: "app/components/Ui",
|
|
1870
|
-
fileContent:
|
|
1871
|
-
'<template>\n <UiPopoverPortal :to="to">\n <PopoverContent v-bind="{ ...forwarded, ...$attrs }" :class="styles({ class: props.class })">\n <slot />\n </PopoverContent>\n </UiPopoverPortal>\n</template>\n\n<script lang="ts" setup>\n import { PopoverContent, useForwardPropsEmits } from "radix-vue";\n import type { PopoverContentEmits, PopoverContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = withDefaults(\n defineProps<\n PopoverContentProps & {\n to?: string | HTMLElement;\n class?: any;\n }\n >(),\n {\n side: "bottom",\n sideOffset: 8,\n align: "start",\n avoidCollisions: true,\n collisionPadding: 0,\n sticky: "partial",\n }\n );\n\n const emits = defineEmits<PopoverContentEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "to", "class"), emits);\n\n const styles = tv({\n base: "z-50 w-72 rounded-md border bg-popover p-4 text-accent-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",\n });\n</script>\n',
|
|
1872
|
-
},
|
|
1873
|
-
{
|
|
1874
|
-
fileName: "Popover/Popover.vue",
|
|
1875
|
-
dirPath: "app/components/Ui",
|
|
1876
|
-
fileContent:
|
|
1877
|
-
'<template>\n <PopoverRoot v-bind="forwarded">\n <slot />\n </PopoverRoot>\n</template>\n\n<script lang="ts" setup>\n import { PopoverRoot, useForwardPropsEmits } from "radix-vue";\n import type { PopoverRootEmits, PopoverRootProps } from "radix-vue";\n\n const props = defineProps<PopoverRootProps>();\n const emits = defineEmits<PopoverRootEmits>();\n\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
1878
|
-
},
|
|
1879
|
-
{
|
|
1880
|
-
fileName: "Popover/Portal.vue",
|
|
1881
|
-
dirPath: "app/components/Ui",
|
|
1882
|
-
fileContent:
|
|
1883
|
-
'<template>\n <PopoverPortal v-bind="forwarded">\n <slot />\n </PopoverPortal>\n</template>\n\n<script lang="ts" setup>\n import { PopoverPortal, useForwardProps } from "radix-vue";\n import type { PopoverPortalProps } from "radix-vue";\n\n const props = defineProps<PopoverPortalProps>();\n const forwarded = useForwardProps(props);\n</script>\n',
|
|
1884
|
-
},
|
|
1885
|
-
{
|
|
1886
|
-
fileName: "Popover/Trigger.vue",
|
|
1887
|
-
dirPath: "app/components/Ui",
|
|
1888
|
-
fileContent:
|
|
1889
|
-
'<template>\n <PopoverTrigger v-bind="props">\n <slot />\n </PopoverTrigger>\n</template>\n\n<script lang="ts" setup>\n import { PopoverTrigger } from "radix-vue";\n import type { PopoverTriggerProps } from "radix-vue";\n\n const props = defineProps<PopoverTriggerProps>();\n</script>\n',
|
|
1890
|
-
},
|
|
1891
|
-
{
|
|
1892
|
-
fileName: "Popover/X.vue",
|
|
1893
|
-
dirPath: "app/components/Ui",
|
|
1894
|
-
fileContent:
|
|
1895
|
-
'<template>\n <PopoverClose v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Icon :name="icon" class="h-4 w-4" />\n <span class="sr-only">{{ srText }}</span>\n </slot>\n </PopoverClose>\n</template>\n\n<script lang="ts" setup>\n import { PopoverClose, useForwardProps } from "radix-vue";\n import type { PopoverCloseProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PopoverCloseProps & {\n class?: any;\n icon?: string;\n srText?: string;\n }\n >(),\n {\n icon: "heroicons:x-mark",\n srText: "Close",\n }\n );\n const forwarded = useForwardProps(reactiveOmit(props, "icon", "srText", "class"));\n\n const styles = tv({\n base: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",\n });\n</script>\n',
|
|
1896
|
-
},
|
|
1897
|
-
],
|
|
1898
|
-
utils: [],
|
|
1899
|
-
composables: [],
|
|
1900
|
-
plugins: [],
|
|
1901
|
-
},
|
|
1902
|
-
{
|
|
1903
|
-
name: "Progress",
|
|
1904
|
-
value: "progress",
|
|
1905
|
-
files: [
|
|
1906
|
-
{
|
|
1907
|
-
fileName: "Progress/Indicator.vue",
|
|
1908
|
-
dirPath: "app/components/Ui",
|
|
1909
|
-
fileContent:
|
|
1910
|
-
'<template>\n <ProgressIndicator v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </ProgressIndicator>\n</template>\n\n<script lang="ts" setup>\n import { ProgressIndicator } from "radix-vue";\n import type { ProgressIndicatorProps } from "radix-vue";\n\n const props = defineProps<\n ProgressIndicatorProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "h-full w-full flex-1 rounded-full bg-primary transition-all",\n });\n</script>\n',
|
|
1911
|
-
},
|
|
1912
|
-
{
|
|
1913
|
-
fileName: "Progress/Progress.vue",
|
|
1914
|
-
dirPath: "app/components/Ui",
|
|
1915
|
-
fileContent:
|
|
1916
|
-
'<template>\n <ProgressRoot v-bind="{ ...forwarded, ...$attrs }" :class="styles({ class: props.class })">\n <slot>\n <UiProgressIndicator\n :style="{ transform: `translateX(-${100 - ((modelValue || 0) / max) * 100}%)` }"\n />\n </slot>\n </ProgressRoot>\n</template>\n\n<script lang="ts" setup>\n import { ProgressRoot, useForwardPropsEmits } from "radix-vue";\n import type { ProgressRootEmits, ProgressRootProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n const props = withDefaults(\n defineProps<\n ProgressRootProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n max: 100,\n modelValue: 0,\n }\n );\n\n const emits = defineEmits<ProgressRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "relative h-3 w-full overflow-hidden rounded-full bg-secondary",\n });\n</script>\n',
|
|
1917
|
-
},
|
|
1918
|
-
],
|
|
1919
|
-
utils: [],
|
|
1920
|
-
composables: [],
|
|
1921
|
-
plugins: [],
|
|
1922
|
-
},
|
|
1923
|
-
{
|
|
1924
|
-
name: "Radio Group",
|
|
1925
|
-
value: "radio-group",
|
|
1926
|
-
files: [
|
|
1927
|
-
{
|
|
1928
|
-
fileName: "RadioGroup/Indicator.vue",
|
|
1929
|
-
dirPath: "app/components/Ui",
|
|
1930
|
-
fileContent:
|
|
1931
|
-
'<template>\n <RadioGroupIndicator v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Icon :name="icon || \'ph:circle-fill\'" class="h-2.5 w-2.5 fill-current text-current" />\n </slot>\n </RadioGroupIndicator>\n</template>\n\n<script lang="ts" setup>\n import { RadioGroupIndicator } from "radix-vue";\n import type { RadioGroupIndicatorProps } from "radix-vue";\n\n const props = defineProps<\n RadioGroupIndicatorProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** Icon to show */\n icon?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "icon");\n const styles = tv({\n base: "flex items-center justify-center",\n });\n</script>\n',
|
|
1932
|
-
},
|
|
1933
|
-
{
|
|
1934
|
-
fileName: "RadioGroup/Item.vue",
|
|
1935
|
-
dirPath: "app/components/Ui",
|
|
1936
|
-
fileContent:
|
|
1937
|
-
'<template>\n <RadioGroupItem v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <UiRadioGroupIndicator :icon="props.icon" />\n </slot>\n </RadioGroupItem>\n</template>\n\n<script lang="ts" setup>\n import { RadioGroupItem } from "radix-vue";\n import type { RadioGroupItemProps } from "radix-vue";\n\n const props = defineProps<\n RadioGroupItemProps & {\n /** Class to apply to the item */\n class?: any;\n /** Icon to show */\n icon?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "icon");\n const styles = tv({\n base: "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",\n });\n</script>\n',
|
|
1938
|
-
},
|
|
1939
|
-
{
|
|
1940
|
-
fileName: "RadioGroup/RadioGroup.vue",
|
|
1941
|
-
dirPath: "app/components/Ui",
|
|
1942
|
-
fileContent:
|
|
1943
|
-
'<template>\n <RadioGroupRoot v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </RadioGroupRoot>\n</template>\n\n<script lang="ts" setup>\n import { RadioGroupRoot, useForwardPropsEmits } from "radix-vue";\n import type { RadioGroupRootEmits, RadioGroupRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n RadioGroupRootProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n orientation: "vertical",\n loop: true,\n }\n );\n\n const emits = defineEmits<RadioGroupRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({ base: "grid gap-3" });\n</script>\n',
|
|
1944
|
-
},
|
|
1945
|
-
],
|
|
1946
|
-
utils: [],
|
|
1947
|
-
composables: [],
|
|
1948
|
-
plugins: [],
|
|
1949
|
-
},
|
|
1950
|
-
{
|
|
1951
|
-
name: "Scroll Area",
|
|
1952
|
-
value: "scroll-area",
|
|
1953
|
-
files: [
|
|
1954
|
-
{
|
|
1955
|
-
fileName: "ScrollArea/Corner.vue",
|
|
1956
|
-
dirPath: "app/components/Ui",
|
|
1957
|
-
fileContent:
|
|
1958
|
-
'<template>\n <ScrollAreaCorner v-bind="props">\n <slot />\n </ScrollAreaCorner>\n</template>\n\n<script lang="ts" setup>\n import { ScrollAreaCorner } from "radix-vue";\n import type { ScrollAreaCornerProps } from "radix-vue";\n\n const props = defineProps<ScrollAreaCornerProps>();\n</script>\n',
|
|
1959
|
-
},
|
|
1960
|
-
{
|
|
1961
|
-
fileName: "ScrollArea/ScrollArea.vue",
|
|
1962
|
-
dirPath: "app/components/Ui",
|
|
1963
|
-
fileContent:
|
|
1964
|
-
'<template>\n <ScrollAreaRoot v-bind="forwarded" :class="styles({ class: props.class })">\n <UiScrollAreaViewport>\n <slot />\n </UiScrollAreaViewport>\n <UiScrollAreaScrollbar :orientation="orientation" />\n <UiScrollAreaCorner />\n </ScrollAreaRoot>\n</template>\n\n<script lang="ts" setup>\n import { ScrollAreaRoot } from "radix-vue";\n import type { ScrollAreaRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n ScrollAreaRootProps & {\n /** Orientation for scrolling */\n orientation?: "vertical" | "horizontal";\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n orientation: "vertical",\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "relative overflow-hidden",\n });\n</script>\n',
|
|
1965
|
-
},
|
|
1966
|
-
{
|
|
1967
|
-
fileName: "ScrollArea/Scrollbar.vue",
|
|
1968
|
-
dirPath: "app/components/Ui",
|
|
1969
|
-
fileContent:
|
|
1970
|
-
'<template>\n <ScrollAreaScrollbar v-bind="forwarded" :class="styles({ orientation, class: props.class })">\n <slot />\n <UiScrollAreaThumb />\n </ScrollAreaScrollbar>\n</template>\n\n<script lang="ts" setup>\n import { ScrollAreaScrollbar } from "radix-vue";\n import type { ScrollAreaScrollbarProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n ScrollAreaScrollbarProps & {\n /** Class to apply to the scrollbar */\n class?: any;\n }\n >(),\n {\n orientation: "vertical",\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex touch-none select-none transition-colors",\n variants: {\n orientation: {\n vertical: "h-full w-2.5 border-l border-l-transparent p-[1px]",\n horizontal: "h-2.5 border-t border-t-transparent p-[1px]",\n },\n },\n });\n</script>\n',
|
|
1971
|
-
},
|
|
1972
|
-
{
|
|
1973
|
-
fileName: "ScrollArea/Thumb.vue",
|
|
1974
|
-
dirPath: "app/components/Ui",
|
|
1975
|
-
fileContent:
|
|
1976
|
-
'<template>\n <ScrollAreaThumb v-bind="forwarded" :class="styles({ orientation, class: props.class })">\n <slot />\n </ScrollAreaThumb>\n</template>\n\n<script lang="ts" setup>\n import { ScrollAreaThumb } from "radix-vue";\n import type { ScrollAreaThumbProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n ScrollAreaThumbProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n orientation?: "vertical" | "horizontal";\n }\n >(),\n {\n orientation: "vertical",\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "relative flex-1 rounded-full bg-border",\n variants: {\n orientation: {\n vertical: "flex-1",\n horizontal: "",\n },\n },\n });\n</script>\n',
|
|
1977
|
-
},
|
|
1978
|
-
{
|
|
1979
|
-
fileName: "ScrollArea/Viewport.vue",
|
|
1980
|
-
dirPath: "app/components/Ui",
|
|
1981
|
-
fileContent:
|
|
1982
|
-
'<template>\n <ScrollAreaViewport v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </ScrollAreaViewport>\n</template>\n\n<script lang="ts" setup>\n import { ScrollAreaViewport } from "radix-vue";\n import type { ScrollAreaViewportProps } from "radix-vue";\n\n const props = defineProps<\n ScrollAreaViewportProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "h-full w-full rounded-[inherit]",\n });\n</script>\n',
|
|
1983
|
-
},
|
|
1984
|
-
],
|
|
1985
|
-
utils: [],
|
|
1986
|
-
composables: [],
|
|
1987
|
-
plugins: [],
|
|
1988
|
-
},
|
|
1989
|
-
{
|
|
1990
|
-
name: "Select",
|
|
1991
|
-
value: "select",
|
|
1992
|
-
files: [
|
|
1993
|
-
{
|
|
1994
|
-
fileName: "Select/Arrow.vue",
|
|
1995
|
-
dirPath: "app/components/Ui",
|
|
1996
|
-
fileContent:
|
|
1997
|
-
'<template>\n <SelectArrow v-bind="useForwardProps(props)" />\n</template>\n\n<script lang="ts" setup>\n import { SelectArrow, useForwardProps } from "radix-vue";\n import type { SelectArrowProps } from "radix-vue";\n\n const props = withDefaults(defineProps<SelectArrowProps>(), {\n width: 10,\n height: 5,\n });\n</script>\n',
|
|
1998
|
-
},
|
|
1999
|
-
{
|
|
2000
|
-
fileName: "Select/Content.vue",
|
|
2001
|
-
dirPath: "app/components/Ui",
|
|
2002
|
-
fileContent:
|
|
2003
|
-
'<template>\n <UiSelectPortal :to="to">\n <SelectContent\n v-bind="{ ...forwarded, ...$attrs }"\n :class="styles({ position, class: props.class })"\n >\n <UiSelectScrollUpButton />\n <UiSelectViewport :position="position">\n <slot />\n </UiSelectViewport>\n <UiSelectScrollDownButton />\n </SelectContent>\n </UiSelectPortal>\n</template>\n\n<script lang="ts" setup>\n import { SelectContent, useForwardPropsEmits } from "radix-vue";\n import type { SelectContentEmits, SelectContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = withDefaults(\n defineProps<\n SelectContentProps & {\n /** Where to render the portal */\n to?: string | HTMLElement;\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n position: "popper",\n side: "bottom",\n align: "start",\n avoidCollisions: true,\n sticky: "partial",\n }\n );\n\n const emits = defineEmits<SelectContentEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "to"), emits);\n\n const styles = tv({\n base: "relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-accent-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",\n variants: {\n position: {\n popper:\n "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",\n "item-aligned": "",\n },\n },\n });\n</script>\n',
|
|
2004
|
-
},
|
|
2005
|
-
{
|
|
2006
|
-
fileName: "Select/Group.vue",
|
|
2007
|
-
dirPath: "app/components/Ui",
|
|
2008
|
-
fileContent:
|
|
2009
|
-
'<template>\n <SelectGroup v-bind="forwarded">\n <slot />\n </SelectGroup>\n</template>\n\n<script lang="ts" setup>\n import { SelectGroup, useForwardProps } from "radix-vue";\n import type { SelectGroupProps } from "radix-vue";\n\n const props = defineProps<SelectGroupProps>();\n const forwarded = useForwardProps(props);\n</script>\n',
|
|
2010
|
-
},
|
|
2011
|
-
{
|
|
2012
|
-
fileName: "Select/Icon.vue",
|
|
2013
|
-
dirPath: "app/components/Ui",
|
|
2014
|
-
fileContent:
|
|
2015
|
-
'<template>\n <SelectIcon v-bind="forwarded" class="flex items-center justify-center">\n <slot>\n <Icon :class="styles({ class: props.class })" :name="icon || \'lucide:chevrons-up-down\'" />\n </slot>\n </SelectIcon>\n</template>\n\n<script lang="ts" setup>\n import { SelectIcon, useForwardProps } from "radix-vue";\n import type { SelectIconProps } from "radix-vue";\n\n const props = defineProps<\n SelectIconProps & {\n /** Icon to render */\n icon?: string;\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = useForwardProps(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "h-4 w-4 shrink-0 text-muted-foreground opacity-70",\n });\n</script>\n',
|
|
2016
|
-
},
|
|
2017
|
-
{
|
|
2018
|
-
fileName: "Select/Item.vue",
|
|
2019
|
-
dirPath: "app/components/Ui",
|
|
2020
|
-
fileContent:
|
|
2021
|
-
'<template>\n <SelectItem v-bind="forwarded" :class="styles({ class: props.class })">\n <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">\n <UiSelectItemIndicator :icon="icon" />\n </span>\n <UiSelectItemText>\n <slot>{{ text }}</slot>\n </UiSelectItemText>\n </SelectItem>\n</template>\n\n<script lang="ts" setup>\n import { SelectItem } from "radix-vue";\n import type { SelectItemProps } from "radix-vue";\n\n const props = defineProps<\n SelectItemProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** Icon to show */\n icon?: string;\n /** Text to show */\n text?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "icon", "text");\n const styles = tv({\n base: "relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",\n });\n</script>\n',
|
|
2022
|
-
},
|
|
2023
|
-
{
|
|
2024
|
-
fileName: "Select/ItemIndicator.vue",
|
|
2025
|
-
dirPath: "app/components/Ui",
|
|
2026
|
-
fileContent:
|
|
2027
|
-
'<template>\n <SelectItemIndicator v-bind="forwarded" class="flex items-center justify-center">\n <slot>\n <Icon :class="styles({ class: props.class })" :name="icon || \'lucide:check\'" />\n </slot>\n </SelectItemIndicator>\n</template>\n\n<script lang="ts" setup>\n import { SelectItemIndicator } from "radix-vue";\n import type { SelectItemIndicatorProps } from "radix-vue";\n\n const props = defineProps<\n SelectItemIndicatorProps & {\n /** Icon to render */\n icon?: string;\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "icon");\n const styles = tv({\n base: "h-4 w-4",\n });\n</script>\n',
|
|
2028
|
-
},
|
|
2029
|
-
{
|
|
2030
|
-
fileName: "Select/ItemText.vue",
|
|
2031
|
-
dirPath: "app/components/Ui",
|
|
2032
|
-
fileContent:
|
|
2033
|
-
'<template>\n <SelectItemText v-bind="props">\n <slot />\n </SelectItemText>\n</template>\n\n<script lang="ts" setup>\n import { SelectItemText } from "radix-vue";\n import type { SelectItemTextProps } from "radix-vue";\n\n const props = defineProps<SelectItemTextProps>();\n</script>\n',
|
|
2034
|
-
},
|
|
2035
|
-
{
|
|
2036
|
-
fileName: "Select/Label.vue",
|
|
2037
|
-
dirPath: "app/components/Ui",
|
|
2038
|
-
fileContent:
|
|
2039
|
-
'<template>\n <SelectLabel :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </SelectLabel>\n</template>\n\n<script lang="ts" setup>\n import { SelectLabel } from "radix-vue";\n import type { SelectLabelProps } from "radix-vue";\n\n const props = defineProps<\n SelectLabelProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "py-1.5 pl-8 pr-2 text-sm font-semibold",\n });\n</script>\n',
|
|
2040
|
-
},
|
|
2041
|
-
{
|
|
2042
|
-
fileName: "Select/Portal.vue",
|
|
2043
|
-
dirPath: "app/components/Ui",
|
|
2044
|
-
fileContent:
|
|
2045
|
-
'<template>\n <SelectPortal v-bind="props">\n <slot />\n </SelectPortal>\n</template>\n\n<script lang="ts" setup>\n import { SelectPortal } from "radix-vue";\n import type { SelectPortalProps } from "radix-vue";\n\n const props = defineProps<SelectPortalProps>();\n</script>\n',
|
|
2046
|
-
},
|
|
2047
|
-
{
|
|
2048
|
-
fileName: "Select/ScrollDownButton.vue",
|
|
2049
|
-
dirPath: "app/components/Ui",
|
|
2050
|
-
fileContent:
|
|
2051
|
-
'<template>\n <SelectScrollDownButton v-bind="forwarded">\n <slot> <Icon :name="icon || \'lucide:chevron-down\'" class="h-5 w-5" /></slot>\n </SelectScrollDownButton>\n</template>\n\n<script lang="ts" setup>\n import { SelectScrollDownButton } from "radix-vue";\n import type { SelectScrollDownButtonProps } from "radix-vue";\n\n const props = defineProps<\n SelectScrollDownButtonProps & {\n /** Icon to render */\n icon?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "icon");\n</script>\n',
|
|
2052
|
-
},
|
|
2053
|
-
{
|
|
2054
|
-
fileName: "Select/ScrollUpButton.vue",
|
|
2055
|
-
dirPath: "app/components/Ui",
|
|
2056
|
-
fileContent:
|
|
2057
|
-
'<template>\n <SelectScrollUpButton v-bind="forwarded">\n <slot>\n <Icon :name="icon || \'lucide:chevron-up\'" class="h-5 w-5" />\n </slot>\n </SelectScrollUpButton>\n</template>\n\n<script lang="ts" setup>\n import { SelectScrollUpButton } from "radix-vue";\n import type { SelectScrollUpButtonProps } from "radix-vue";\n\n const props = defineProps<\n SelectScrollUpButtonProps & {\n /** Icon to render */\n icon?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "icon");\n</script>\n',
|
|
2058
|
-
},
|
|
2059
|
-
{
|
|
2060
|
-
fileName: "Select/Select.vue",
|
|
2061
|
-
dirPath: "app/components/Ui",
|
|
2062
|
-
fileContent:
|
|
2063
|
-
'<template>\n <SelectRoot v-bind="forwarded">\n <slot />\n </SelectRoot>\n</template>\n\n<script lang="ts" setup>\n import { SelectRoot, useForwardPropsEmits } from "radix-vue";\n import type { SelectRootEmits, SelectRootProps } from "radix-vue";\n\n const props = defineProps<SelectRootProps>();\n\n const emits = defineEmits<SelectRootEmits>();\n\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
2064
|
-
},
|
|
2065
|
-
{
|
|
2066
|
-
fileName: "Select/Separator.vue",
|
|
2067
|
-
dirPath: "app/components/Ui",
|
|
2068
|
-
fileContent:
|
|
2069
|
-
'<template>\n <SelectSeparator :class="styles({ class: props.class })" v-bind="forwarded" />\n</template>\n\n<script lang="ts" setup>\n import { SelectSeparator } from "radix-vue";\n import type { SelectSeparatorProps } from "radix-vue";\n\n const props = defineProps<\n SelectSeparatorProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "-mx-1 my-1 h-px bg-muted",\n });\n</script>\n',
|
|
2070
|
-
},
|
|
2071
|
-
{
|
|
2072
|
-
fileName: "Select/Trigger.vue",
|
|
2073
|
-
dirPath: "app/components/Ui",
|
|
2074
|
-
fileContent:
|
|
2075
|
-
'<template>\n <SelectTrigger :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>\n <UiSelectValue :placeholder="placeholder" />\n </slot>\n <UiSelectIcon :icon="icon" />\n </SelectTrigger>\n</template>\n\n<script lang="ts" setup>\n import { SelectTrigger } from "radix-vue";\n import type { SelectTriggerProps } from "radix-vue";\n\n const props = defineProps<\n SelectTriggerProps & {\n /** Custom class(es) to add to the parent */\n class?: any;\n /** Icon to render */\n icon?: string;\n /** Placeholder text */\n placeholder?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "icon", "placeholder");\n const styles = tv({\n base: "line-clamp-1 flex h-10 w-full items-center justify-between truncate rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground",\n });\n</script>\n',
|
|
2076
|
-
},
|
|
2077
|
-
{
|
|
2078
|
-
fileName: "Select/Value.vue",
|
|
2079
|
-
dirPath: "app/components/Ui",
|
|
2080
|
-
fileContent:
|
|
2081
|
-
'<template>\n <SelectValue v-bind="props">\n <slot />\n </SelectValue>\n</template>\n\n<script lang="ts" setup>\n import { SelectValue } from "radix-vue";\n import type { SelectValueProps } from "radix-vue";\n\n const props = defineProps<SelectValueProps>();\n</script>\n',
|
|
2082
|
-
},
|
|
2083
|
-
{
|
|
2084
|
-
fileName: "Select/Viewport.vue",
|
|
2085
|
-
dirPath: "app/components/Ui",
|
|
2086
|
-
fileContent:
|
|
2087
|
-
'<template>\n <SelectViewport :class="styles({ position, class: props.class })" v-bind="forwarded">\n <slot />\n </SelectViewport>\n</template>\n\n<script lang="ts" setup>\n import { SelectViewport } from "radix-vue";\n import type { SelectViewportProps } from "radix-vue";\n\n const props = defineProps<\n SelectViewportProps & {\n position?: "item-aligned" | "popper";\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "p-1",\n variants: {\n position: {\n popper:\n "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",\n "item-aligned": "",\n },\n },\n });\n</script>\n',
|
|
2088
|
-
},
|
|
2089
|
-
],
|
|
2090
|
-
utils: [],
|
|
2091
|
-
composables: [],
|
|
2092
|
-
plugins: [],
|
|
2093
|
-
},
|
|
2094
|
-
{
|
|
2095
|
-
name: "Separator",
|
|
2096
|
-
value: "separator",
|
|
2097
|
-
files: [
|
|
2098
|
-
{
|
|
2099
|
-
fileName: "Separator.vue",
|
|
2100
|
-
dirPath: "app/components/Ui",
|
|
2101
|
-
fileContent:
|
|
2102
|
-
'<template>\n <Separator v-bind="forwarded" :class="styles({ orientation, class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { Separator, useForwardProps } from "radix-vue";\n import type { SeparatorProps } from "radix-vue";\n\n const props = withDefaults(defineProps<SeparatorProps & { class?: any }>(), {\n orientation: "horizontal",\n });\n\n const forwarded = useForwardProps(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "shrink-0 bg-border",\n variants: {\n orientation: {\n horizontal: "h-[1px] w-full",\n vertical: "h-full w-[1px]",\n },\n },\n });\n</script>\n',
|
|
2103
|
-
},
|
|
2104
|
-
],
|
|
2105
|
-
utils: [],
|
|
2106
|
-
composables: [],
|
|
2107
|
-
plugins: [],
|
|
2108
|
-
},
|
|
2109
|
-
{
|
|
2110
|
-
name: "Sheet",
|
|
2111
|
-
value: "sheet",
|
|
2112
|
-
files: [
|
|
2113
|
-
{
|
|
2114
|
-
fileName: "Sheet/Close.vue",
|
|
2115
|
-
dirPath: "app/components/Ui",
|
|
2116
|
-
fileContent:
|
|
2117
|
-
'<template>\n <DialogClose v-bind="props">\n <slot />\n </DialogClose>\n</template>\n\n<script lang="ts" setup>\n import { DialogClose } from "radix-vue";\n import type { DialogCloseProps } from "radix-vue";\n\n const props = defineProps<DialogCloseProps>();\n</script>\n',
|
|
2118
|
-
},
|
|
2119
|
-
{
|
|
2120
|
-
fileName: "Sheet/Content.vue",
|
|
2121
|
-
dirPath: "app/components/Ui",
|
|
2122
|
-
fileContent:
|
|
2123
|
-
'<template>\n <UiSheetPortal :to="to">\n <slot name="overlay">\n <UiSheetOverlay />\n </slot>\n <DialogContent\n :class="styles({ side, class: props.class })"\n v-bind="{ ...forwarded, ...$attrs }"\n >\n <slot>\n <slot name="header">\n <UiSheetHeader>\n <slot name="title">\n <UiSheetTitle v-if="title" :title="title" />\n </slot>\n <slot name="description">\n <UiSheetDescription v-if="description" :description="description" />\n </slot>\n </UiSheetHeader>\n </slot>\n <slot name="content" />\n <slot name="footer" />\n </slot>\n <slot name="close">\n <UiSheetClose :icon="icon" />\n </slot>\n </DialogContent>\n </UiSheetPortal>\n</template>\n\n<script lang="ts" setup>\n import { DialogContent, useForwardPropsEmits } from "radix-vue";\n import type { DialogContentEmits, DialogContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = defineProps<\n DialogContentProps & {\n icon?: string;\n title?: string;\n description?: string;\n class?: any;\n side?: VariantProps<typeof styles>["side"];\n to?: string | HTMLElement;\n }\n >();\n const emits = defineEmits<DialogContentEmits>();\n const forwarded = useForwardPropsEmits(\n reactiveOmit(props, "icon", "title", "description", "class", "to", "side"),\n emits\n );\n\n const styles = tv({\n base: "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",\n variants: {\n side: {\n top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",\n bottom:\n "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",\n left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",\n right:\n "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",\n },\n },\n defaultVariants: {\n side: "left",\n },\n });\n</script>\n',
|
|
2124
|
-
},
|
|
2125
|
-
{
|
|
2126
|
-
fileName: "Sheet/Description.vue",
|
|
2127
|
-
dirPath: "app/components/Ui",
|
|
2128
|
-
fileContent:
|
|
2129
|
-
'<template>\n <DialogDescription :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>{{ description }}</slot>\n </DialogDescription>\n</template>\n\n<script lang="ts" setup>\n import { DialogDescription } from "radix-vue";\n import type { DialogDescriptionProps } from "radix-vue";\n\n const props = defineProps<\n DialogDescriptionProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n /** Description text */\n description?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "description");\n const styles = tv({\n base: "text-sm text-muted-foreground",\n });\n</script>\n',
|
|
2130
|
-
},
|
|
2131
|
-
{
|
|
2132
|
-
fileName: "Sheet/Footer.vue",
|
|
2133
|
-
dirPath: "app/components/Ui",
|
|
2134
|
-
fileContent:
|
|
2135
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >(),\n {\n as: "div",\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",\n });\n</script>\n',
|
|
2136
|
-
},
|
|
2137
|
-
{
|
|
2138
|
-
fileName: "Sheet/Header.vue",
|
|
2139
|
-
dirPath: "app/components/Ui",
|
|
2140
|
-
fileContent:
|
|
2141
|
-
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >(),\n {\n as: "div",\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex flex-col space-y-2 text-center sm:text-left",\n });\n</script>\n',
|
|
2142
|
-
},
|
|
2143
|
-
{
|
|
2144
|
-
fileName: "Sheet/Overlay.vue",
|
|
2145
|
-
dirPath: "app/components/Ui",
|
|
2146
|
-
fileContent:
|
|
2147
|
-
'<template>\n <DialogOverlay :class="styles({ class: props.class })" v-bind="forwarded" />\n</template>\n\n<script lang="ts" setup>\n import { DialogOverlay } from "radix-vue";\n import type { DialogOverlayProps } from "radix-vue";\n\n const props = defineProps<\n DialogOverlayProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=closed]:animate-fadeOut data-[state=open]:animate-fadeIn",\n });\n</script>\n',
|
|
2148
|
-
},
|
|
2149
|
-
{
|
|
2150
|
-
fileName: "Sheet/Portal.vue",
|
|
2151
|
-
dirPath: "app/components/Ui",
|
|
2152
|
-
fileContent:
|
|
2153
|
-
'<template>\n <DialogPortal v-bind="props">\n <slot />\n </DialogPortal>\n</template>\n\n<script lang="ts" setup>\n import { DialogPortal } from "radix-vue";\n import type { DialogPortalProps } from "radix-vue";\n\n const props = defineProps<DialogPortalProps>();\n</script>\n',
|
|
2154
|
-
},
|
|
2155
|
-
{
|
|
2156
|
-
fileName: "Sheet/Sheet.vue",
|
|
2157
|
-
dirPath: "app/components/Ui",
|
|
2158
|
-
fileContent:
|
|
2159
|
-
'<template>\n <DialogRoot v-bind="forwarded">\n <slot />\n </DialogRoot>\n</template>\n\n<script lang="ts" setup>\n import { DialogRoot, useForwardPropsEmits } from "radix-vue";\n import type { DialogRootEmits, DialogRootProps } from "radix-vue";\n\n const props = defineProps<DialogRootProps>();\n const emit = defineEmits<DialogRootEmits>();\n\n const forwarded = useForwardPropsEmits(props, emit);\n</script>\n',
|
|
2160
|
-
},
|
|
2161
|
-
{
|
|
2162
|
-
fileName: "Sheet/Title.vue",
|
|
2163
|
-
dirPath: "app/components/Ui",
|
|
2164
|
-
fileContent:
|
|
2165
|
-
'<template>\n <DialogTitle :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>{{ title }}</slot>\n </DialogTitle>\n</template>\n\n<script lang="ts" setup>\n import { DialogTitle } from "radix-vue";\n import type { DialogTitleProps } from "radix-vue";\n\n const props = defineProps<\n DialogTitleProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n /** Title text */\n title?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "title");\n const styles = tv({\n base: "text-lg font-semibold text-foreground",\n });\n</script>\n',
|
|
2166
|
-
},
|
|
2167
|
-
{
|
|
2168
|
-
fileName: "Sheet/Trigger.vue",
|
|
2169
|
-
dirPath: "app/components/Ui",
|
|
2170
|
-
fileContent:
|
|
2171
|
-
'<template>\n <DialogTrigger v-bind="props">\n <slot />\n </DialogTrigger>\n</template>\n\n<script lang="ts" setup>\n import { DialogTrigger } from "radix-vue";\n import type { DialogTriggerProps } from "radix-vue";\n\n const props = defineProps<DialogTriggerProps>();\n</script>\n',
|
|
2172
|
-
},
|
|
2173
|
-
{
|
|
2174
|
-
fileName: "Sheet/X.vue",
|
|
2175
|
-
dirPath: "app/components/Ui",
|
|
2176
|
-
fileContent:
|
|
2177
|
-
'<template>\n <DialogClose :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>\n <Icon :name="icon" class="h-4 w-4" />\n <span class="sr-only">{{ srText }}</span>\n </slot>\n </DialogClose>\n</template>\n\n<script lang="ts" setup>\n import { DialogClose } from "radix-vue";\n import type { DialogCloseProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n DialogCloseProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n /** Icon to display */\n icon?: string;\n /** Screen reader text */\n srText?: string;\n }\n >(),\n {\n icon: "heroicons:x-mark",\n srText: "Close",\n }\n );\n const forwarded = reactiveOmit(props, "class", "icon", "srText");\n const styles = tv({\n base: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",\n });\n</script>\n',
|
|
2178
|
-
},
|
|
2179
|
-
],
|
|
2180
|
-
utils: [],
|
|
2181
|
-
composables: [],
|
|
2182
|
-
plugins: [],
|
|
2183
|
-
},
|
|
2184
|
-
{
|
|
2185
|
-
name: "Sidebar",
|
|
2186
|
-
value: "sidebar",
|
|
2187
|
-
files: [
|
|
2188
|
-
{
|
|
2189
|
-
fileName: "Sidebar/Content.vue",
|
|
2190
|
-
dirPath: "app/components/Ui",
|
|
2191
|
-
fileContent:
|
|
2192
|
-
'<template>\n <div data-sidebar="content" :class="sideBarContentStyles({ class: props.class })">\n <slot />\n </div>\n</template>\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarContentStyles = tv({\n base: "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the sidebar content.\n */\n class?: HTMLAttributes["class"];\n }>();\n</script>\n',
|
|
2193
|
-
},
|
|
2194
|
-
{
|
|
2195
|
-
fileName: "Sidebar/Footer.vue",
|
|
2196
|
-
dirPath: "app/components/Ui",
|
|
2197
|
-
fileContent:
|
|
2198
|
-
'<template>\n <div data-sidebar="footer" :class="sideBarFooterStyles({ class: props.class })">\n <slot />\n </div>\n</template>\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarFooterStyles = tv({\n base: "flex flex-col gap-2 p-2",\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n</script>\n',
|
|
2199
|
-
},
|
|
2200
|
-
{
|
|
2201
|
-
fileName: "Sidebar/Group.vue",
|
|
2202
|
-
dirPath: "app/components/Ui",
|
|
2203
|
-
fileContent:
|
|
2204
|
-
'<template>\n <div data-sidebar="group" :class="sideBarGroupStyles({ class: props.class })">\n <slot />\n </div>\n</template>\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarGroupStyles = tv({\n base: "relative flex w-full min-w-0 flex-col p-2",\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n</script>\n',
|
|
2205
|
-
},
|
|
2206
|
-
{
|
|
2207
|
-
fileName: "Sidebar/GroupAction.vue",
|
|
2208
|
-
dirPath: "app/components/Ui",
|
|
2209
|
-
fileContent:
|
|
2210
|
-
'<template>\n <Primitive\n data-sidebar="group-action"\n :as="as"\n :as-child="asChild"\n :class="sideBarGroupActionStyles({ class: props.class })"\n >\n <slot />\n </Primitive>\n</template>\n<script lang="ts">\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n import type { HTMLAttributes } from "vue";\n\n export const sideBarGroupActionStyles = tv({\n base: "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 group-data-[collapsible=icon]:hidden after:md:hidden [&>svg]:size-4 [&>svg]:shrink-0",\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<\n PrimitiveProps & {\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }\n >();\n</script>\n',
|
|
2211
|
-
},
|
|
2212
|
-
{
|
|
2213
|
-
fileName: "Sidebar/GroupContent.vue",
|
|
2214
|
-
dirPath: "app/components/Ui",
|
|
2215
|
-
fileContent:
|
|
2216
|
-
'<template>\n <div data-sidebar="group-content" :class="sideBarGroupContentStyles({ class: props.class })">\n <slot />\n </div>\n</template>\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarGroupContentStyles = tv({\n base: "w-full text-sm",\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n</script>\n',
|
|
2217
|
-
},
|
|
2218
|
-
{
|
|
2219
|
-
fileName: "Sidebar/GroupLabel.vue",
|
|
2220
|
-
dirPath: "app/components/Ui",
|
|
2221
|
-
fileContent:
|
|
2222
|
-
'<template>\n <Primitive\n data-sidebar="group-label"\n :as="as"\n :as-child="asChild"\n :class="sideBarGroupLabelStyles({ class: props.class })"\n >\n <slot>{{ props.label }}</slot>\n </Primitive>\n</template>\n<script lang="ts">\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n import type { HTMLAttributes } from "vue";\n\n export const sideBarGroupLabelStyles = tv({\n base: "flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/50 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0",\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<\n PrimitiveProps & {\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n /**\n * The label for the group.\n */\n label?: string;\n }\n >();\n</script>\n',
|
|
2223
|
-
},
|
|
2224
|
-
{
|
|
2225
|
-
fileName: "Sidebar/Header.vue",
|
|
2226
|
-
dirPath: "app/components/Ui",
|
|
2227
|
-
fileContent:
|
|
2228
|
-
'<template>\n <div data-sidebar="header" :class="sideBarHeaderStyles({ class: props.class })">\n <slot />\n </div>\n</template>\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarHeaderStyles = tv({\n base: "flex flex-col gap-2 p-2",\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n</script>\n',
|
|
2229
|
-
},
|
|
2230
|
-
{
|
|
2231
|
-
fileName: "Sidebar/Input.vue",
|
|
2232
|
-
dirPath: "app/components/Ui",
|
|
2233
|
-
fileContent:
|
|
2234
|
-
'<template>\n <UiInput v-model="model" data-sidebar="input" :class="sideBarInputStyles({ class: props.class })">\n <slot />\n </UiInput>\n</template>\n\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarInputStyles = tv({\n base: "h-8 w-full border-sidebar-input bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n\n const model = defineModel<any>();\n</script>\n',
|
|
2235
|
-
},
|
|
2236
|
-
{
|
|
2237
|
-
fileName: "Sidebar/Inset.vue",
|
|
2238
|
-
dirPath: "app/components/Ui",
|
|
2239
|
-
fileContent:
|
|
2240
|
-
'<template>\n <main :class="sideBarInsetStyles({ class: props.class })">\n <slot />\n </main>\n</template>\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarInsetStyles = tv({\n base: "relative flex min-h-svh flex-1 flex-col bg-background peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n</script>\n',
|
|
2241
|
-
},
|
|
2242
|
-
{
|
|
2243
|
-
fileName: "Sidebar/Menu.vue",
|
|
2244
|
-
dirPath: "app/components/Ui",
|
|
2245
|
-
fileContent:
|
|
2246
|
-
'<template>\n <ul data-sidebar="menu" :class="sideBarMenuStyles({ class: props.class })">\n <slot />\n </ul>\n</template>\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarMenuStyles = tv({\n base: "flex w-full min-w-0 flex-col gap-1",\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n</script>\n',
|
|
2247
|
-
},
|
|
2248
|
-
{
|
|
2249
|
-
fileName: "Sidebar/MenuAction.vue",
|
|
2250
|
-
dirPath: "app/components/Ui",
|
|
2251
|
-
fileContent:
|
|
2252
|
-
'<template>\n <Primitive\n data-sidebar="menu-action"\n :class="sideBarMenuAction({ showOnHover, class: props.class })"\n :as="as"\n :as-child="asChild"\n >\n <slot />\n </Primitive>\n</template>\n<script lang="ts">\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n import type { VariantProps } from "tailwind-variants";\n import type { HTMLAttributes } from "vue";\n\n export const sideBarMenuAction = tv({\n base: [\n "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",\n // Increases the hit area of the button on mobile.\n "after:absolute after:-inset-2 after:md:hidden",\n "peer-data-[size=sm]/menu-button:top-1",\n "peer-data-[size=default]/menu-button:top-1.5",\n "peer-data-[size=lg]/menu-button:top-2.5",\n "group-data-[collapsible=icon]:hidden",\n ],\n variants: {\n showOnHover: {\n true: "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",\n },\n },\n });\n\n export type SidebarMenuActionProps = PrimitiveProps & {\n /**\n * Whether the menu should be shown on hover.\n */\n showOnHover?: VariantProps<typeof sideBarMenuAction>["showOnHover"];\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n };\n</script>\n<script setup lang="ts">\n const props = withDefaults(defineProps<SidebarMenuActionProps>(), {\n as: "button",\n });\n</script>\n',
|
|
2253
|
-
},
|
|
2254
|
-
{
|
|
2255
|
-
fileName: "Sidebar/MenuBadge.vue",
|
|
2256
|
-
dirPath: "app/components/Ui",
|
|
2257
|
-
fileContent:
|
|
2258
|
-
'<template>\n <div data-sidebar="menu-badge" :class="sideBarMenuBadgeStyles({ class: props.class })">\n <slot />\n </div>\n</template>\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarMenuBadgeStyles = tv({\n base: [\n "pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground",\n "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",\n "peer-data-[size=sm]/menu-button:top-1",\n "peer-data-[size=default]/menu-button:top-1.5",\n "peer-data-[size=lg]/menu-button:top-2.5",\n "group-data-[collapsible=icon]:hidden",\n ],\n });\n</script>\n\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n</script>\n',
|
|
2259
|
-
},
|
|
2260
|
-
{
|
|
2261
|
-
fileName: "Sidebar/MenuButton.vue",
|
|
2262
|
-
dirPath: "app/components/Ui",
|
|
2263
|
-
fileContent:
|
|
2264
|
-
'<template>\n <UiSidebarMenuButtonChild v-if="!tooltip" v-bind="{ ...delegatedProps, ...$attrs }">\n <slot />\n </UiSidebarMenuButtonChild>\n\n <UiTooltip v-else>\n <UiTooltipTrigger as-child>\n <UiSidebarMenuButtonChild v-bind="{ ...delegatedProps, ...$attrs }">\n <slot />\n </UiSidebarMenuButtonChild>\n </UiTooltipTrigger>\n <UiTooltipContent side="right" align="center" :hidden="state !== \'collapsed\' || isMobile">\n <template v-if="typeof tooltip === \'string\'">\n {{ tooltip }}\n </template>\n <component :is="tooltip" v-else />\n </UiTooltipContent>\n </UiTooltip>\n</template>\n\n<script lang="ts">\n import type { SidebarMenuButtonProps } from "./MenuButtonChild.vue";\n import type { Component } from "vue";\n</script>\n<script setup lang="ts">\n defineOptions({ inheritAttrs: false });\n\n const props = withDefaults(\n defineProps<\n SidebarMenuButtonProps & {\n tooltip?: string | Component;\n }\n >(),\n {\n as: "button",\n variant: "default",\n size: "default",\n }\n );\n\n const { isMobile, state } = useSidebar();\n\n const delegatedProps = computed(() => {\n const { tooltip, ...delegated } = props;\n return delegated;\n });\n</script>\n',
|
|
2265
|
-
},
|
|
2266
|
-
{
|
|
2267
|
-
fileName: "Sidebar/MenuButtonChild.vue",
|
|
2268
|
-
dirPath: "app/components/Ui",
|
|
2269
|
-
fileContent:
|
|
2270
|
-
'<template>\n <Primitive\n data-sidebar="menu-button"\n :data-size="size"\n :data-active="isActive"\n :class="sidebarMenuButtonVariants({ variant, size, class: props.class })"\n :as="as"\n :as-child="asChild"\n v-bind="$attrs"\n >\n <slot />\n </Primitive>\n</template>\n<script lang="ts">\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n import type { HTMLAttributes } from "vue";\n\n export interface SidebarMenuButtonProps extends PrimitiveProps {\n /**\n * The variant of the button.\n * @default "default"\n */\n variant?: SidebarMenuButtonVariants["variant"];\n /**\n * The size of the button.\n * @default "default"\n */\n size?: SidebarMenuButtonVariants["size"];\n /**\n * Whether the button is active.\n */\n isActive?: boolean;\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }\n</script>\n\n<script setup lang="ts">\n const props = withDefaults(defineProps<SidebarMenuButtonProps>(), {\n as: "button",\n variant: "default",\n size: "default",\n });\n</script>\n',
|
|
2271
|
-
},
|
|
2272
|
-
{
|
|
2273
|
-
fileName: "Sidebar/MenuItem.vue",
|
|
2274
|
-
dirPath: "app/components/Ui",
|
|
2275
|
-
fileContent:
|
|
2276
|
-
'<template>\n <li data-sidebar="menu-item" :class="sideBarMenuItemStyles({ class: props.class })">\n <slot />\n </li>\n</template>\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarMenuItemStyles = tv({\n base: "group/menu-item relative",\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n</script>\n',
|
|
2277
|
-
},
|
|
2278
|
-
{
|
|
2279
|
-
fileName: "Sidebar/MenuSkeleton.vue",
|
|
2280
|
-
dirPath: "app/components/Ui",
|
|
2281
|
-
fileContent:
|
|
2282
|
-
'<template>\n <div\n data-sidebar="menu-skeleton"\n :class="sideBarMenuSkeletonStyles().wrapper({ class: props.class })"\n >\n <UiSkeleton\n v-if="showIcon"\n :class="sideBarMenuSkeletonStyles().skeleton1()"\n data-sidebar="menu-skeleton-icon"\n />\n\n <UiSkeleton\n :class="sideBarMenuSkeletonStyles().skeleton2()"\n data-sidebar="menu-skeleton-text"\n :style="{ \'--skeleton-width\': width }"\n />\n </div>\n</template>\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarMenuSkeletonStyles = tv({\n slots: {\n wrapper: "flex h-8 items-center gap-2 rounded-md px-2",\n skeleton1: "size-4 rounded-md",\n skeleton2: "h-4 max-w-[--skeleton-width] flex-1",\n },\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Whether to show the icon skeleton.\n */\n showIcon?: boolean;\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n\n const width = computed(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`;\n });\n</script>\n',
|
|
2283
|
-
},
|
|
2284
|
-
{
|
|
2285
|
-
fileName: "Sidebar/MenuSub.vue",
|
|
2286
|
-
dirPath: "app/components/Ui",
|
|
2287
|
-
fileContent:
|
|
2288
|
-
'<template>\n <ul data-sidebar="menu-badge" :class="sideBarMenuSubStyles({ class: props.class })">\n <slot />\n </ul>\n</template>\n\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarMenuSubStyles = tv({\n base: [\n "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",\n "group-data-[collapsible=icon]:hidden",\n ],\n });\n</script>\n\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n</script>\n',
|
|
2289
|
-
},
|
|
2290
|
-
{
|
|
2291
|
-
fileName: "Sidebar/MenuSubButton.vue",
|
|
2292
|
-
dirPath: "app/components/Ui",
|
|
2293
|
-
fileContent:
|
|
2294
|
-
'<template>\n <Primitive\n data-sidebar="menu-sub-button"\n :as="as"\n :as-child="asChild"\n :data-size="size"\n :data-active="isActive"\n :class="sideBarMenuSubButtonStyles({ size, class: props.class })"\n >\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts">\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n import type { VariantProps } from "tailwind-variants";\n import type { HTMLAttributes } from "vue";\n\n export const sideBarMenuSubButtonStyles = tv({\n base: [\n "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",\n "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",\n "group-data-[collapsible=icon]:hidden",\n ],\n variants: {\n size: {\n sm: "text-xs",\n md: "text-sm",\n },\n },\n });\n\n export type SideBarMenuSubButtonProps = PrimitiveProps & {\n /**\n * The size of the button.\n * @default "md"\n */\n size?: VariantProps<typeof sideBarMenuSubButtonStyles>["size"];\n /**\n * Whether the button is active.\n */\n isActive?: boolean;\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n };\n</script>\n\n<script setup lang="ts">\n const props = withDefaults(defineProps<SideBarMenuSubButtonProps>(), {\n as: "a",\n size: "md",\n });\n</script>\n',
|
|
2295
|
-
},
|
|
2296
|
-
{
|
|
2297
|
-
fileName: "Sidebar/MenuSubItem.vue",
|
|
2298
|
-
dirPath: "app/components/Ui",
|
|
2299
|
-
fileContent: "<template>\n <li>\n <slot />\n </li>\n</template>\n",
|
|
2300
|
-
},
|
|
2301
|
-
{
|
|
2302
|
-
fileName: "Sidebar/Provider.vue",
|
|
2303
|
-
dirPath: "app/components/Ui",
|
|
2304
|
-
fileContent:
|
|
2305
|
-
'<template>\n <UiTooltipProvider :delay-duration="0">\n <div\n :style="{\n \'--sidebar-width\': SIDEBAR_WIDTH,\n \'--sidebar-width-icon\': SIDEBAR_WIDTH_ICON,\n }"\n :class="sideBarProviderStyles({ class: props.class })"\n >\n <slot v-bind="{ state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar }" />\n </div>\n </UiTooltipProvider>\n</template>\n\n<script lang="ts">\n import type { HTMLAttributes, Ref } from "vue";\n\n export const sideBarProviderStyles = tv({\n base: "group/sidebar-wrapper flex min-h-svh w-full text-sidebar-foreground has-[[data-variant=inset]]:bg-sidebar",\n });\n</script>\n\n<script setup lang="ts">\n const props = withDefaults(\n defineProps<{\n /**\n * Default open state of the sidebar.\n * @default true\n */\n defaultOpen?: boolean;\n /**\n * Open state of the sidebar (controlled).\n * @default undefined\n */\n open?: boolean;\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>(),\n {\n defaultOpen: true,\n open: undefined,\n }\n );\n\n // This sets the cookie to keep the sidebar state.\n const SIDEBAR_COOKIE = useCookie<boolean>(SIDEBAR_COOKIE_NAME, {\n path: "/",\n maxAge: SIDEBAR_COOKIE_MAX_AGE,\n default: () => false,\n });\n\n const emits = defineEmits<{\n "update:open": [open: boolean];\n }>();\n\n const isMobile = useMediaQuery("(max-width: 768px)");\n const openMobile = ref(false);\n\n const open = useVModel(props, "open", emits, {\n defaultValue: props.defaultOpen ? props.defaultOpen : SIDEBAR_COOKIE.value,\n passive: (props.open === undefined) as false,\n }) as Ref<boolean>;\n\n function setOpen(value: boolean) {\n open.value = value; // emits(\'update:open\', value)\n SIDEBAR_COOKIE.value = value;\n }\n\n function setOpenMobile(value: boolean) {\n openMobile.value = value;\n }\n\n // Helper to toggle the sidebar.\n function toggleSidebar() {\n return isMobile.value ? setOpenMobile(!openMobile.value) : setOpen(!open.value);\n }\n\n useEventListener("keydown", (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n toggleSidebar();\n }\n });\n\n // We add a state so that we can do data-state="expanded" or "collapsed".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = computed(() => (open.value ? "expanded" : "collapsed"));\n\n provideSidebarContext({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n });\n</script>\n',
|
|
2306
|
-
},
|
|
2307
|
-
{
|
|
2308
|
-
fileName: "Sidebar/Rail.vue",
|
|
2309
|
-
dirPath: "app/components/Ui",
|
|
2310
|
-
fileContent:
|
|
2311
|
-
'<template>\n <button\n data-sidebar="rail"\n aria-label="Toggle Sidebar"\n :tabindex="-1"\n title="Toggle Sidebar"\n :class="sideBarRailStyles({ class: props.class })"\n @click="toggleSidebar"\n >\n <slot />\n </button>\n</template>\n\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarRailStyles = tv({\n base: [\n "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",\n "[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",\n "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",\n "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",\n "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",\n "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",\n ],\n });\n</script>\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n\n const { toggleSidebar } = useSidebar();\n</script>\n',
|
|
2312
|
-
},
|
|
2313
|
-
{
|
|
2314
|
-
fileName: "Sidebar/Separator.vue",
|
|
2315
|
-
dirPath: "app/components/Ui",
|
|
2316
|
-
fileContent:
|
|
2317
|
-
'<template>\n <UiSeparator data-sidebar="separator" :class="sideBarSeparatorStyles({ class: props.class })">\n <slot />\n </UiSeparator>\n</template>\n\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarSeparatorStyles = tv({\n base: "mx-2 w-auto bg-sidebar-border",\n });\n</script>\n\n<script setup lang="ts">\n const props = defineProps<{\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n }>();\n</script>\n',
|
|
2318
|
-
},
|
|
2319
|
-
{
|
|
2320
|
-
fileName: "Sidebar/Sidebar.vue",
|
|
2321
|
-
dirPath: "app/components/Ui",
|
|
2322
|
-
fileContent:
|
|
2323
|
-
'<template>\n <div\n v-if="collapsible === \'none\'"\n :class="sideBarStyles().collapsible({ class: props.class })"\n v-bind="$attrs"\n >\n <slot />\n </div>\n\n <UiSheet v-else-if="isMobile" :open="openMobile" v-bind="$attrs" @update:open="setOpenMobile">\n <UiSheetContent\n data-sidebar="sidebar"\n data-mobile="true"\n :side="side"\n :class="sideBarStyles().mobileSheet()"\n :style="{\n \'--sidebar-width\': SIDEBAR_WIDTH_MOBILE,\n }"\n >\n <VisuallyHidden>\n <UiSheetTitle>Mobile Sidebar</UiSheetTitle>\n <UiSheetDescription>\n This is the mobile sidebar. You can use this to navigate the site.\n </UiSheetDescription>\n </VisuallyHidden>\n <div :class="sideBarStyles().mobileInner()">\n <slot />\n </div>\n </UiSheetContent>\n </UiSheet>\n\n <div\n v-else\n class="group peer hidden md:block"\n :data-state="state"\n :data-collapsible="state === \'collapsed\' ? collapsible : \'\'"\n :data-variant="variant"\n :data-side="side"\n >\n <!-- This is what handles the sidebar gap on desktop -->\n <div :class="sideBarStyles().sideBarWrapper({ variant })" />\n <div\n :class="sideBarStyles().sideBarWrapper2({ collapsible, side, variant, class: props.class })"\n v-bind="$attrs"\n >\n <div data-sidebar="sidebar" :class="sideBarStyles().sideBarInner()">\n <slot />\n </div>\n </div>\n </div>\n</template>\n\n<script lang="ts">\n import { VisuallyHidden } from "radix-vue";\n import type { VariantProps } from "tailwind-variants";\n import type { HTMLAttributes } from "vue";\n\n export const sideBarStyles = tv({\n slots: {\n collapsible: "flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",\n mobileSheet: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",\n mobileInner: "flex h-full w-full flex-col",\n sideBarWrapper:\n "relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear group-data-[collapsible=offcanvas]:w-0 group-data-[side=right]:rotate-180",\n sideBarWrapper2:\n "fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",\n sideBarInner:\n "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",\n },\n variants: {\n side: {\n left: {\n sideBarWrapper2:\n "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]",\n },\n right: {\n sideBarWrapper2:\n "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",\n },\n },\n variant: {\n sidebar: {\n sideBarWrapper: "group-data-[collapsible=icon]:w-[--sidebar-width-icon]",\n sideBarWrapper2:\n "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",\n },\n floating: {\n sideBarWrapper:\n "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]",\n sideBarWrapper2:\n "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]",\n },\n inset: {\n sideBarWrapper:\n "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]",\n sideBarWrapper2:\n "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]",\n },\n },\n collapsible: {\n offcanvas: {},\n icon: {},\n none: {},\n },\n },\n defaultVariants: {\n side: "left",\n variant: "sidebar",\n collapsible: "offcanvas",\n },\n });\n\n export type SideBarProps = {\n /**\n * The side that the sidebar is on\n * @default "left"\n */\n side?: VariantProps<typeof sideBarStyles>["side"];\n /**\n * The variant of the sidebar\n * @default "sidebar"\n */\n variant?: VariantProps<typeof sideBarStyles>["variant"];\n /**\n * The collapsible state of the sidebar\n * @default "offcanvas"\n */\n collapsible?: VariantProps<typeof sideBarStyles>["collapsible"];\n /**\n * Additional classes to add to the sidebar\n */\n class?: HTMLAttributes["class"];\n };\n</script>\n<script setup lang="ts">\n defineOptions({ inheritAttrs: false });\n\n const props = withDefaults(defineProps<SideBarProps>(), {\n side: "left",\n variant: "sidebar",\n collapsible: "offcanvas",\n });\n\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n</script>\n',
|
|
2324
|
-
},
|
|
2325
|
-
{
|
|
2326
|
-
fileName: "Sidebar/Trigger.vue",
|
|
2327
|
-
dirPath: "app/components/Ui",
|
|
2328
|
-
fileContent:
|
|
2329
|
-
'<template>\n <UiButton\n :title="label"\n data-sidebar="trigger"\n variant="ghost"\n size="icon"\n :class="sideBarTriggerStyles({ class: props.class })"\n @click="toggleSidebar"\n >\n <slot v-bind="{ state }">\n <Icon v-if="icon" :name="icon" />\n <span class="sr-only">{{ label }}</span>\n </slot>\n </UiButton>\n</template>\n\n<script lang="ts">\n import type { HTMLAttributes } from "vue";\n\n export const sideBarTriggerStyles = tv({\n base: "size-7",\n });\n</script>\n\n<script setup lang="ts">\n const props = withDefaults(\n defineProps<{\n /**\n * The icon to display in the trigger.\n * @default "lucide:panel-left"\n */\n icon?: string;\n /**\n * Additional classes to apply to the parent element.\n */\n class?: HTMLAttributes["class"];\n /**\n * The label for the trigger.\n * @default "Toggle Sidebar"\n */\n label?: string;\n }>(),\n {\n icon: "lucide:panel-left",\n label: "Toggle Sidebar",\n }\n );\n\n const { toggleSidebar, state } = useSidebar();\n</script>\n',
|
|
2330
|
-
},
|
|
2331
|
-
],
|
|
2332
|
-
components: ["input", "tooltip", "skeleton", "separator", "sheet", "button"],
|
|
2333
|
-
utils: [
|
|
2334
|
-
{
|
|
2335
|
-
fileName: "sidebar.ts",
|
|
2336
|
-
dirPath: "utils",
|
|
2337
|
-
fileContent:
|
|
2338
|
-
'import { createContext } from "radix-vue";\nimport type { ComputedRef, Ref } from "vue";\n\nexport const SIDEBAR_COOKIE_NAME = "sidebar:state";\nexport const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nexport const SIDEBAR_WIDTH = "16rem";\nexport const SIDEBAR_WIDTH_MOBILE = "18rem";\nexport const SIDEBAR_WIDTH_ICON = "3rem";\nexport const SIDEBAR_KEYBOARD_SHORTCUT = "b";\n\nexport const sidebarMenuButtonVariants = tv({\n base: "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",\n\n variants: {\n variant: {\n default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",\n outline:\n "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",\n },\n size: {\n default: "h-8 text-sm",\n sm: "h-7 text-xs",\n lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0",\n },\n },\n defaultVariants: {\n variant: "default",\n size: "default",\n },\n});\n\nexport type SidebarMenuButtonVariants = VariantProps<typeof sidebarMenuButtonVariants>;\n\nexport const [useSidebar, provideSidebarContext] = createContext<{\n state: ComputedRef<"expanded" | "collapsed">;\n open: Ref<boolean>;\n setOpen: (value: boolean) => void;\n isMobile: Ref<boolean>;\n openMobile: Ref<boolean>;\n setOpenMobile: (value: boolean) => void;\n toggleSidebar: () => void;\n}>("Sidebar");\n',
|
|
2339
|
-
},
|
|
2340
|
-
],
|
|
2341
|
-
composables: [],
|
|
2342
|
-
plugins: [],
|
|
2343
|
-
},
|
|
2344
|
-
{
|
|
2345
|
-
name: "Skeleton",
|
|
2346
|
-
value: "skeleton",
|
|
2347
|
-
files: [
|
|
2348
|
-
{
|
|
2349
|
-
fileName: "Skeleton.vue",
|
|
2350
|
-
dirPath: "app/components/Ui",
|
|
2351
|
-
fileContent:
|
|
2352
|
-
'<template>\n <Primitive :class="styles({ loading, class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const styles = tv({\n base: "animate-pulse rounded-md bg-muted",\n variants: {\n loading: { true: "cursor-wait", false: "cursor-default" },\n },\n });\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n /** Whether the skeleton is loading */\n loading?: boolean;\n }\n >(),\n {\n as: "div",\n }\n );\n\n const forwarded = reactiveOmit(props, "class", "loading");\n</script>\n',
|
|
2353
|
-
},
|
|
2354
|
-
],
|
|
2355
|
-
utils: [],
|
|
2356
|
-
composables: [],
|
|
2357
|
-
plugins: [],
|
|
2358
|
-
},
|
|
2359
|
-
{
|
|
2360
|
-
name: "Slider",
|
|
2361
|
-
value: "slider",
|
|
2362
|
-
files: [
|
|
2363
|
-
{
|
|
2364
|
-
fileName: "Slider/Range.vue",
|
|
2365
|
-
dirPath: "app/components/Ui",
|
|
2366
|
-
fileContent:
|
|
2367
|
-
'<template>\n <SliderRange :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </SliderRange>\n</template>\n\n<script lang="ts" setup>\n import { SliderRange } from "radix-vue";\n import type { SliderRangeProps } from "radix-vue";\n\n const props = defineProps<\n SliderRangeProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full",\n });\n</script>\n',
|
|
2368
|
-
},
|
|
2369
|
-
{
|
|
2370
|
-
fileName: "Slider/Slider.vue",
|
|
2371
|
-
dirPath: "app/components/Ui",
|
|
2372
|
-
fileContent:
|
|
2373
|
-
'<template>\n <SliderRoot v-bind="forwarded" :class="styles({ class: props.class })">\n <slot :props="props">\n <slot name="track" :props="props">\n <UiSliderTrack>\n <slot name="range" :props="props">\n <UiSliderRange />\n </slot>\n </UiSliderTrack>\n </slot>\n <slot name="thumb" :props="props">\n <UiSliderThumb v-for="(t, i) in modelValue.length" :key="i" />\n </slot>\n </slot>\n </SliderRoot>\n</template>\n\n<script lang="ts" setup>\n import { SliderRoot, useForwardPropsEmits } from "radix-vue";\n import type { SliderRootEmits, SliderRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n SliderRootProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >(),\n {\n orientation: "horizontal",\n min: 0,\n step: 1,\n max: 100,\n modelValue: () => [0],\n }\n );\n\n const emits = defineEmits<SliderRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50",\n });\n</script>\n',
|
|
2374
|
-
},
|
|
2375
|
-
{
|
|
2376
|
-
fileName: "Slider/Thumb.vue",
|
|
2377
|
-
dirPath: "app/components/Ui",
|
|
2378
|
-
fileContent:
|
|
2379
|
-
'<template>\n <SliderThumb :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </SliderThumb>\n</template>\n\n<script lang="ts" setup>\n import { SliderThumb } from "radix-vue";\n import type { SliderThumbProps } from "radix-vue";\n\n const props = defineProps<\n SliderThumbProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",\n });\n</script>\n',
|
|
2380
|
-
},
|
|
2381
|
-
{
|
|
2382
|
-
fileName: "Slider/Track.vue",
|
|
2383
|
-
dirPath: "app/components/Ui",
|
|
2384
|
-
fileContent:
|
|
2385
|
-
'<template>\n <SliderTrack :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </SliderTrack>\n</template>\n\n<script lang="ts" setup>\n import { SliderTrack } from "radix-vue";\n import type { SliderTrackProps } from "radix-vue";\n\n const props = defineProps<\n SliderTrackProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "relative grow overflow-hidden rounded-full bg-secondary data-[orientation=horizontal]:h-2 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-2",\n });\n</script>\n',
|
|
2386
|
-
},
|
|
2387
|
-
],
|
|
2388
|
-
utils: [],
|
|
2389
|
-
composables: [],
|
|
2390
|
-
plugins: [],
|
|
2391
|
-
},
|
|
2392
|
-
{
|
|
2393
|
-
name: "Splitter",
|
|
2394
|
-
value: "splitter",
|
|
2395
|
-
files: [
|
|
2396
|
-
{
|
|
2397
|
-
fileName: "Splitter/Splitter.vue",
|
|
2398
|
-
dirPath: "app/components/Ui",
|
|
2399
|
-
fileContent:
|
|
2400
|
-
'<template>\n <SplitterGroup\n v-slot="{ layout }: { layout: number[] }"\n v-bind="forwarded"\n :class="styles({ class: props.class })"\n >\n <slot :layout="layout" />\n </SplitterGroup>\n</template>\n\n<script lang="ts" setup>\n import { SplitterGroup, useForwardPropsEmits } from "radix-vue";\n import type { SplitterGroupEmits, SplitterGroupProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n SplitterGroupProps & {\n direction?: "horizontal" | "vertical";\n class?: any;\n }\n >(),\n {\n direction: "horizontal",\n as: "div",\n keyboardResizeBy: 10,\n }\n );\n\n const emit = defineEmits<SplitterGroupEmits>();\n\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emit);\n\n const styles = tv({\n base: "flex h-full w-full data-[orientation=vertical]:flex-col",\n });\n</script>\n',
|
|
2401
|
-
},
|
|
2402
|
-
{
|
|
2403
|
-
fileName: "Splitter/Panel.vue",
|
|
2404
|
-
dirPath: "app/components/Ui",
|
|
2405
|
-
fileContent:
|
|
2406
|
-
'<template>\n <SplitterPanel\n v-bind="forwarded"\n ref="forwardRef"\n v-slot="{ isCollapsed, isExpanded }: { isCollapsed: boolean; isExpanded: boolean }"\n >\n <slot :is-collapsed="isCollapsed" :is-expanded="isExpanded" />\n </SplitterPanel>\n</template>\n\n<script lang="ts" setup>\n import { SplitterPanel, useForwardPropsEmits } from "radix-vue";\n import type { SplitterPanelEmits, SplitterPanelProps } from "radix-vue";\n\n const props = withDefaults(defineProps<SplitterPanelProps>(), {});\n\n const forwardRef = ref<InstanceType<typeof SplitterPanel>>();\n const emit = defineEmits<\n SplitterPanelEmits & {\n ready: [value: InstanceType<typeof SplitterPanel>];\n }\n >();\n\n const forwarded = useForwardPropsEmits(props, emit);\n\n onMounted(async () => {\n await nextTick();\n emit("ready", forwardRef.value!);\n });\n</script>\n',
|
|
2407
|
-
},
|
|
2408
|
-
{
|
|
2409
|
-
fileName: "Splitter/Handle.vue",
|
|
2410
|
-
dirPath: "app/components/Ui",
|
|
2411
|
-
fileContent:
|
|
2412
|
-
'<template>\n <SplitterResizeHandle v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <div\n v-if="withHandle"\n class="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"\n >\n <Icon :name="icon" class="h-2.5 w-2.5" />\n </div>\n </slot>\n </SplitterResizeHandle>\n</template>\n\n<script lang="ts" setup>\n import { SplitterResizeHandle, useForwardPropsEmits } from "radix-vue";\n import type { SplitterResizeHandleEmits, SplitterResizeHandleProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n SplitterResizeHandleProps & {\n direction?: "horizontal" | "vertical";\n class?: any;\n withHandle?: boolean;\n icon?: string;\n }\n >(),\n {\n direction: "horizontal",\n icon: "lucide:grip-vertical",\n }\n );\n\n const emit = defineEmits<SplitterResizeHandleEmits>();\n\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "withHandle", "icon"), emit);\n\n const styles = tv({\n base: "relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",\n });\n</script>\n',
|
|
2413
|
-
},
|
|
2414
|
-
],
|
|
2415
|
-
utils: [],
|
|
2416
|
-
composables: [],
|
|
2417
|
-
plugins: [],
|
|
2418
|
-
},
|
|
2419
|
-
{
|
|
2420
|
-
name: "Stepper",
|
|
2421
|
-
value: "stepper",
|
|
2422
|
-
files: [
|
|
2423
|
-
{
|
|
2424
|
-
fileName: "Stepper/Description.vue",
|
|
2425
|
-
dirPath: "app/components/Ui",
|
|
2426
|
-
fileContent:
|
|
2427
|
-
'<template>\n <StepperDescription v-slot="slotProps" v-bind="props">\n <slot v-bind="slotProps" />\n </StepperDescription>\n</template>\n\n<script lang="ts" setup>\n import { StepperDescription } from "radix-vue";\n import type { StepperDescriptionProps } from "radix-vue";\n\n const props = defineProps<StepperDescriptionProps>();\n</script>\n',
|
|
2428
|
-
},
|
|
2429
|
-
{
|
|
2430
|
-
fileName: "Stepper/Indicator.vue",
|
|
2431
|
-
dirPath: "app/components/Ui",
|
|
2432
|
-
fileContent:
|
|
2433
|
-
'<template>\n <StepperIndicator v-bind="props">\n <slot />\n </StepperIndicator>\n</template>\n\n<script lang="ts" setup>\n import { StepperIndicator } from "radix-vue";\n import type { StepperIndicatorProps } from "radix-vue";\n\n const props = defineProps<StepperIndicatorProps>();\n</script>\n',
|
|
2434
|
-
},
|
|
2435
|
-
{
|
|
2436
|
-
fileName: "Stepper/Item.vue",
|
|
2437
|
-
dirPath: "app/components/Ui",
|
|
2438
|
-
fileContent:
|
|
2439
|
-
'<template>\n <StepperItem v-slot="slotProps" v-bind="props">\n <slot v-bind="slotProps" />\n </StepperItem>\n</template>\n\n<script lang="ts" setup>\n import { StepperItem } from "radix-vue";\n import type { StepperItemProps } from "radix-vue";\n\n const props = defineProps<StepperItemProps>();\n</script>\n',
|
|
2440
|
-
},
|
|
2441
|
-
{
|
|
2442
|
-
fileName: "Stepper/Separator.vue",
|
|
2443
|
-
dirPath: "app/components/Ui",
|
|
2444
|
-
fileContent:
|
|
2445
|
-
'<template>\n <StepperSeparator v-bind="props">\n <slot />\n </StepperSeparator>\n</template>\n\n<script lang="ts" setup>\n import { StepperSeparator } from "radix-vue";\n import type { StepperSeparatorProps } from "radix-vue";\n\n const props = defineProps<StepperSeparatorProps>();\n</script>\n',
|
|
2446
|
-
},
|
|
2447
|
-
{
|
|
2448
|
-
fileName: "Stepper/Stepper.vue",
|
|
2449
|
-
dirPath: "app/components/Ui",
|
|
2450
|
-
fileContent:
|
|
2451
|
-
'<template>\n <StepperRoot v-slot="slotProps" v-bind="forwarded">\n <slot v-bind="slotProps" />\n </StepperRoot>\n</template>\n\n<script lang="ts" setup>\n import { StepperRoot, useForwardPropsEmits } from "radix-vue";\n import type { StepperRootEmits, StepperRootProps } from "radix-vue";\n\n const props = defineProps<StepperRootProps>();\n const emit = defineEmits<StepperRootEmits>();\n const forwarded = useForwardPropsEmits(props, emit);\n</script>\n',
|
|
2452
|
-
},
|
|
2453
|
-
{
|
|
2454
|
-
fileName: "Stepper/Title.vue",
|
|
2455
|
-
dirPath: "app/components/Ui",
|
|
2456
|
-
fileContent:
|
|
2457
|
-
'<template>\n <StepperTitle v-bind="props">\n <slot />\n </StepperTitle>\n</template>\n\n<script lang="ts" setup>\n import { StepperTitle } from "radix-vue";\n import type { StepperTitleProps } from "radix-vue";\n\n const props = defineProps<StepperTitleProps>();\n</script>\n',
|
|
2458
|
-
},
|
|
2459
|
-
{
|
|
2460
|
-
fileName: "Stepper/Trigger.vue",
|
|
2461
|
-
dirPath: "app/components/Ui",
|
|
2462
|
-
fileContent:
|
|
2463
|
-
'<template>\n <StepperTrigger v-bind="props">\n <slot />\n </StepperTrigger>\n</template>\n\n<script lang="ts" setup>\n import { StepperTrigger } from "radix-vue";\n import type { StepperTriggerProps } from "radix-vue";\n\n const props = defineProps<StepperTriggerProps>();\n</script>\n',
|
|
2464
|
-
},
|
|
2465
|
-
],
|
|
2466
|
-
utils: [],
|
|
2467
|
-
composables: [],
|
|
2468
|
-
plugins: [],
|
|
2469
|
-
},
|
|
2470
|
-
{
|
|
2471
|
-
name: "Switch",
|
|
2472
|
-
value: "switch",
|
|
2473
|
-
files: [
|
|
2474
|
-
{
|
|
2475
|
-
fileName: "Switch/Switch.vue",
|
|
2476
|
-
dirPath: "app/components/Ui",
|
|
2477
|
-
fileContent:
|
|
2478
|
-
'<template>\n <SwitchRoot v-bind="forwarded" :class="styles({ class: props.class })">\n <UiSwitchThumb>\n <slot />\n </UiSwitchThumb>\n </SwitchRoot>\n</template>\n\n<script lang="ts" setup>\n import { SwitchRoot, useForwardPropsEmits } from "radix-vue";\n import type { SwitchRootEmits, SwitchRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n SwitchRootProps & {\n class?: any;\n id?: any;\n }\n >(),\n {\n as: "button",\n }\n );\n const emits = defineEmits<SwitchRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",\n });\n</script>\n',
|
|
2479
|
-
},
|
|
2480
|
-
{
|
|
2481
|
-
fileName: "Switch/Thumb.vue",
|
|
2482
|
-
dirPath: "app/components/Ui",
|
|
2483
|
-
fileContent:
|
|
2484
|
-
'<template>\n <SwitchThumb :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </SwitchThumb>\n</template>\n\n<script lang="ts" setup>\n import { SwitchThumb } from "radix-vue";\n import type { SwitchThumbProps } from "radix-vue";\n\n const props = defineProps<\n SwitchThumbProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",\n });\n</script>\n',
|
|
2485
|
-
},
|
|
2486
|
-
],
|
|
2487
|
-
utils: [],
|
|
2488
|
-
composables: [],
|
|
2489
|
-
plugins: [],
|
|
2490
|
-
},
|
|
2491
|
-
{
|
|
2492
|
-
name: "Table",
|
|
2493
|
-
value: "table",
|
|
2494
|
-
files: [
|
|
2495
|
-
{
|
|
2496
|
-
fileName: "Table/Body.vue",
|
|
2497
|
-
dirPath: "app/components/Ui",
|
|
2498
|
-
fileContent:
|
|
2499
|
-
'<template>\n <tbody :class="styles({ class: props.class })">\n <slot />\n </tbody>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n class?: any;\n }>();\n\n const styles = tv({\n base: "[&_tr:last-child]:border-0",\n });\n</script>\n',
|
|
2500
|
-
},
|
|
2501
|
-
{
|
|
2502
|
-
fileName: "Table/Caption.vue",
|
|
2503
|
-
dirPath: "app/components/Ui",
|
|
2504
|
-
fileContent:
|
|
2505
|
-
'<template>\n <caption :class="styles({ class: props.class })">\n <slot />\n </caption>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n class?: any;\n }>();\n\n const styles = tv({\n base: "mt-4 text-sm text-muted-foreground",\n });\n</script>\n',
|
|
2506
|
-
},
|
|
2507
|
-
{
|
|
2508
|
-
fileName: "Table/Cell.vue",
|
|
2509
|
-
dirPath: "app/components/Ui",
|
|
2510
|
-
fileContent:
|
|
2511
|
-
'<template>\n <td :class="styles({ class: props.class })">\n <slot />\n </td>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n class?: any;\n }>();\n\n const styles = tv({\n base: "whitespace-nowrap p-4 align-middle [&:has([role=checkbox])]:pr-0",\n });\n</script>\n',
|
|
2512
|
-
},
|
|
2513
|
-
{
|
|
2514
|
-
fileName: "Table/Empty.vue",
|
|
2515
|
-
dirPath: "app/components/Ui",
|
|
2516
|
-
fileContent:
|
|
2517
|
-
'<template>\n <UiTableRow>\n <UiTableCell :colspan="colspan" :class="styles({ class: props.class })">\n <slot />\n </UiTableCell>\n </UiTableRow>\n</template>\n\n<script lang="ts" setup>\n const props = withDefaults(\n defineProps<{\n colspan?: number;\n class?: any;\n }>(),\n {\n colspan: 1,\n }\n );\n\n const styles = tv({\n base: "whitespace-nowrap p-4 align-middle text-sm text-foreground",\n });\n</script>\n',
|
|
2518
|
-
},
|
|
2519
|
-
{
|
|
2520
|
-
fileName: "Table/Footer.vue",
|
|
2521
|
-
dirPath: "app/components/Ui",
|
|
2522
|
-
fileContent:
|
|
2523
|
-
'<template>\n <tfoot :class="styles({ class: props.class })">\n <slot />\n </tfoot>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n class?: any;\n }>();\n\n const styles = tv({\n base: "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",\n });\n</script>\n',
|
|
2524
|
-
},
|
|
2525
|
-
{
|
|
2526
|
-
fileName: "Table/Head.vue",
|
|
2527
|
-
dirPath: "app/components/Ui",
|
|
2528
|
-
fileContent:
|
|
2529
|
-
'<template>\n <th :class="styles({ class: props.class })">\n <slot />\n </th>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n class?: any;\n }>();\n\n const styles = tv({\n base: "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",\n });\n</script>\n',
|
|
2530
|
-
},
|
|
2531
|
-
{
|
|
2532
|
-
fileName: "Table/Header.vue",
|
|
2533
|
-
dirPath: "app/components/Ui",
|
|
2534
|
-
fileContent:
|
|
2535
|
-
'<template>\n <thead :class="styles({ class: props.class })">\n <slot />\n </thead>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n class?: any;\n }>();\n\n const styles = tv({\n base: "[&_tr]:border-b",\n });\n</script>\n',
|
|
2536
|
-
},
|
|
2537
|
-
{
|
|
2538
|
-
fileName: "Table/Row.vue",
|
|
2539
|
-
dirPath: "app/components/Ui",
|
|
2540
|
-
fileContent:
|
|
2541
|
-
'<template>\n <tr :class="styles({ class: props.class })">\n <slot />\n </tr>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n class?: any;\n }>();\n\n const styles = tv({\n base: "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",\n });\n</script>\n',
|
|
2542
|
-
},
|
|
2543
|
-
{
|
|
2544
|
-
fileName: "Table/Table.vue",
|
|
2545
|
-
dirPath: "app/components/Ui",
|
|
2546
|
-
fileContent:
|
|
2547
|
-
'<template>\n <div class="relative w-full overflow-auto">\n <table :class="styles({ class: props.class })" v-bind="$attrs">\n <slot />\n </table>\n </div>\n</template>\n\n<script lang="ts" setup>\n defineOptions({ inheritAttrs: false });\n const props = defineProps<{\n class?: any;\n }>();\n\n const styles = tv({\n base: "w-full caption-bottom border-collapse text-sm",\n });\n</script>\n',
|
|
2548
|
-
},
|
|
2549
|
-
],
|
|
2550
|
-
utils: [],
|
|
2551
|
-
composables: [],
|
|
2552
|
-
plugins: [],
|
|
2553
|
-
},
|
|
2554
|
-
{
|
|
2555
|
-
name: "Tabs",
|
|
2556
|
-
value: "tabs",
|
|
2557
|
-
files: [
|
|
2558
|
-
{
|
|
2559
|
-
fileName: "Tabs/Content.vue",
|
|
2560
|
-
dirPath: "app/components/Ui",
|
|
2561
|
-
fileContent:
|
|
2562
|
-
'<template>\n <TabsContent v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </TabsContent>\n</template>\n\n<script lang="ts" setup>\n import { TabsContent } from "radix-vue";\n import type { TabsContentProps } from "radix-vue";\n\n const props = defineProps<\n TabsContentProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",\n });\n</script>\n',
|
|
2563
|
-
},
|
|
2564
|
-
{
|
|
2565
|
-
fileName: "Tabs/Indicator.vue",
|
|
2566
|
-
dirPath: "app/components/Ui",
|
|
2567
|
-
fileContent:
|
|
2568
|
-
'<template>\n <ClientOnly>\n <TabsIndicator v-bind="{ ...forwarded, ...$attrs }" :class="styles({ class: props.class })">\n <slot>\n <div class="h-full w-full rounded-md bg-primary" />\n </slot>\n </TabsIndicator>\n </ClientOnly>\n</template>\n\n<script lang="ts" setup>\n import { TabsIndicator } from "radix-vue";\n import type { TabsIndicatorProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = defineProps<\n TabsIndicatorProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "absolute bottom-0 left-0 h-[3px] w-[--radix-tabs-indicator-size] translate-x-[--radix-tabs-indicator-position] rounded-full px-1 transition-[width,transform] duration-300",\n });\n</script>\n',
|
|
2569
|
-
},
|
|
2570
|
-
{
|
|
2571
|
-
fileName: "Tabs/List.vue",
|
|
2572
|
-
dirPath: "app/components/Ui",
|
|
2573
|
-
fileContent:
|
|
2574
|
-
'<template>\n <TabsList :class="styles({ pill, class: props.class })" v-bind="forwarded">\n <slot />\n </TabsList>\n</template>\n\n<script lang="ts" setup>\n import { TabsList } from "radix-vue";\n import type { TabsListProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n TabsListProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n pill?: boolean;\n }\n >(),\n { pill: true }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground",\n variants: {\n pill: {\n true: "bg-muted",\n false: "",\n },\n },\n });\n</script>\n',
|
|
2575
|
-
},
|
|
2576
|
-
{
|
|
2577
|
-
fileName: "Tabs/Tabs.vue",
|
|
2578
|
-
dirPath: "app/components/Ui",
|
|
2579
|
-
fileContent:
|
|
2580
|
-
'<template>\n <TabsRoot v-bind="forwarded">\n <slot />\n </TabsRoot>\n</template>\n\n<script lang="ts" setup>\n import { TabsRoot, useForwardPropsEmits } from "radix-vue";\n import type { TabsRootEmits, TabsRootProps } from "radix-vue";\n\n const props = withDefaults(defineProps<TabsRootProps>(), {\n orientation: "horizontal",\n activationMode: "automatic",\n });\n const emits = defineEmits<TabsRootEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
2581
|
-
},
|
|
2582
|
-
{
|
|
2583
|
-
fileName: "Tabs/Trigger.vue",
|
|
2584
|
-
dirPath: "app/components/Ui",
|
|
2585
|
-
fileContent:
|
|
2586
|
-
'<template>\n <TabsTrigger v-bind="forwarded" :class="styles({ pill, class: props.class })">\n <slot />\n </TabsTrigger>\n</template>\n\n<script lang="ts" setup>\n import { TabsTrigger } from "radix-vue";\n import type { TabsTriggerProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n TabsTriggerProps & {\n /** Custom class(es) to add to parent element */\n class?: any;\n /** Whether the trigger should be pill-shaped */\n pill?: boolean;\n }\n >(),\n {\n pill: true,\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",\n variants: {\n pill: {\n true: "data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",\n false:\n "data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",\n },\n },\n });\n</script>\n',
|
|
2587
|
-
},
|
|
2588
|
-
],
|
|
2589
|
-
utils: [],
|
|
2590
|
-
composables: [],
|
|
2591
|
-
plugins: [],
|
|
2592
|
-
},
|
|
2593
|
-
{
|
|
2594
|
-
name: "Tags Input",
|
|
2595
|
-
value: "tags-input",
|
|
2596
|
-
files: [
|
|
2597
|
-
{
|
|
2598
|
-
fileName: "TagsInput/Clear.vue",
|
|
2599
|
-
dirPath: "app/components/Ui",
|
|
2600
|
-
fileContent:
|
|
2601
|
-
'<template>\n <TagsInputClear v-bind="props" :class="styles({ class: props.class })">\n <slot>\n <Icon v-if="icon" :name="icon" class="h-3.5 w-3.5" />\n </slot>\n </TagsInputClear>\n</template>\n\n<script lang="ts" setup>\n import { TagsInputClear } from "radix-vue";\n import type { TagsInputClearProps } from "radix-vue";\n\n const props = withDefaults(defineProps<TagsInputClearProps & { icon?: string; class?: any }>(), {\n icon: "lucide:x",\n });\n const styles = tv({\n base: "flex items-center justify-center rounded bg-transparent p-1 opacity-40 transition hover:bg-muted-foreground hover:opacity-100 focus:opacity-100 focus-visible:outline-none",\n });\n</script>\n',
|
|
2602
|
-
},
|
|
2603
|
-
{
|
|
2604
|
-
fileName: "TagsInput/Field.vue",
|
|
2605
|
-
dirPath: "app/components/Ui",
|
|
2606
|
-
fileContent:
|
|
2607
|
-
'<template>\n <TagsInputInput v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </TagsInputInput>\n</template>\n\n<script lang="ts" setup>\n import { TagsInputInput } from "radix-vue";\n import type { TagsInputInputProps } from "radix-vue";\n\n const props = defineProps<TagsInputInputProps & { class?: any }>();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "flex-1 bg-transparent focus:outline-none sm:text-sm",\n });\n</script>\n',
|
|
2608
|
-
},
|
|
2609
|
-
{
|
|
2610
|
-
fileName: "TagsInput/Item.vue",
|
|
2611
|
-
dirPath: "app/components/Ui",
|
|
2612
|
-
fileContent:
|
|
2613
|
-
'<template>\n <TagsInputItem v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <slot name="text">\n <UiTagsInputItemText />\n </slot>\n <slot name="delete">\n <UiTagsInputItemDelete :icon="icon" />\n </slot>\n </slot>\n </TagsInputItem>\n</template>\n\n<script lang="ts" setup>\n import { TagsInputItem } from "radix-vue";\n import type { TagsInputItemProps } from "radix-vue";\n\n const props = defineProps<TagsInputItemProps & { class?: any; icon?: string }>();\n const forwarded = reactiveOmit(props, "class", "icon");\n const styles = tv({\n base: "inline-flex h-6 shrink-0 items-center gap-1.5 rounded bg-primary pl-2 pr-1 leading-none text-primary-foreground sm:text-sm",\n });\n</script>\n',
|
|
2614
|
-
},
|
|
2615
|
-
{
|
|
2616
|
-
fileName: "TagsInput/ItemDelete.vue",
|
|
2617
|
-
dirPath: "app/components/Ui",
|
|
2618
|
-
fileContent:
|
|
2619
|
-
'<template>\n <TagsInputItemDelete v-bind="forwarded" :class="styles({ class: props.class })">\n <slot>\n <Icon v-if="icon" :name="icon" class="h-3.5 w-3.5" />\n </slot>\n </TagsInputItemDelete>\n</template>\n\n<script lang="ts" setup>\n import { TagsInputItemDelete } from "radix-vue";\n import type { TagsInputItemDeleteProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<TagsInputItemDeleteProps & { icon?: string; class?: any }>(),\n {\n icon: "lucide:x",\n }\n );\n const forwarded = reactiveOmit(props, "class", "icon");\n const styles = tv({\n base: "flex items-center justify-center rounded bg-transparent opacity-40 transition hover:bg-muted-foreground hover:opacity-100 focus:opacity-100 focus-visible:outline-none",\n });\n</script>\n',
|
|
2620
|
-
},
|
|
2621
|
-
{
|
|
2622
|
-
fileName: "TagsInput/ItemText.vue",
|
|
2623
|
-
dirPath: "app/components/Ui",
|
|
2624
|
-
fileContent:
|
|
2625
|
-
'<template>\n <TagsInputItemText v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </TagsInputItemText>\n</template>\n\n<script lang="ts" setup>\n import { TagsInputItemText } from "radix-vue";\n import type { TagsInputItemTextProps } from "radix-vue";\n\n const props = defineProps<TagsInputItemTextProps & { class?: any }>();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "leading-none sm:text-sm",\n });\n</script>\n',
|
|
2626
|
-
},
|
|
2627
|
-
{
|
|
2628
|
-
fileName: "TagsInput/TagsInput.vue",
|
|
2629
|
-
dirPath: "app/components/Ui",
|
|
2630
|
-
fileContent:
|
|
2631
|
-
'<template>\n <TagsInputRoot v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </TagsInputRoot>\n</template>\n\n<script lang="ts" setup>\n import { TagsInputRoot, useForwardPropsEmits } from "radix-vue";\n import type { TagsInputRootEmits, TagsInputRootProps } from "radix-vue";\n\n const props = defineProps<TagsInputRootProps & { class?: any }>();\n const emits = defineEmits<TagsInputRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n\n const styles = tv({\n base: "flex min-h-[40px] w-full flex-wrap items-center gap-2 rounded-md border border-input bg-background px-3 py-2 leading-none transition focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",\n });\n</script>\n',
|
|
2632
|
-
},
|
|
2633
|
-
],
|
|
2634
|
-
utils: [],
|
|
2635
|
-
composables: [],
|
|
2636
|
-
plugins: [],
|
|
2637
|
-
},
|
|
2638
|
-
{
|
|
2639
|
-
name: "Tanstack Table",
|
|
2640
|
-
value: "tanstacktable",
|
|
2641
|
-
deps: ["@tanstack/vue-table"],
|
|
2642
|
-
components: ["checkbox"],
|
|
2643
|
-
files: [
|
|
2644
|
-
{
|
|
2645
|
-
fileName: "TanStackTable.vue",
|
|
2646
|
-
dirPath: "app/components/Ui",
|
|
2647
|
-
fileContent:
|
|
2648
|
-
'<template>\n <div>\n <div :class="styles({ class: props.class })">\n <UiTable :class="tableClass">\n <UiTableHeader>\n <UiTableRow v-for="headerGroup in table.getHeaderGroups()" :key="headerGroup.id">\n <UiTableHead\n v-for="header in headerGroup.headers"\n :key="header.id"\n :colspan="header.colSpan"\n :class="[header.column.getCanSort() && \'cursor-pointer select-none\']"\n @click="header.column.getToggleSortingHandler()?.($event)"\n >\n <template v-if="!header.isPlaceholder">\n <div class="flex items-center gap-3">\n <FlexRender\n :render="header.column.columnDef.header"\n :props="header.getContext()"\n />\n <Icon\n v-if="header.column.getCanSort() && header.column.getIsSorted() === \'asc\'"\n :name="ascIcon"\n class="h-4 w-4"\n />\n <Icon\n v-else-if="header.column.getCanSort() && header.column.getIsSorted() === \'desc\'"\n :name="descIcon"\n class="h-4 w-4"\n />\n <Icon\n v-else-if="header.column.getCanSort() && !header.column.getIsSorted()"\n :name="unsortedIcon"\n class="h-5 w-5"\n />\n </div>\n </template>\n </UiTableHead>\n </UiTableRow>\n </UiTableHeader>\n\n <UiTableBody>\n <UiTableRow\n v-for="row in table.getRowModel().rows"\n :key="row.id"\n :data-state="row.getIsSelected() ? \'selected\' : \'\'"\n >\n <UiTableCell v-for="cell in row.getVisibleCells()" :key="cell.id">\n <FlexRender :render="cell.column.columnDef.cell" :props="cell.getContext()" />\n </UiTableCell>\n </UiTableRow>\n\n <UiTableEmpty\n v-if="table.getRowModel().rows.length === 0"\n :colspan="table.getAllLeafColumns().length"\n >\n <slot :table="table" name="empty"> No data available. </slot>\n </UiTableEmpty>\n </UiTableBody>\n </UiTable>\n </div>\n\n <div\n v-if="showPagination"\n class="my-6 flex flex-col justify-between gap-4 px-2 md:flex-row md:items-center"\n >\n <div class="flex items-center justify-between gap-3">\n <slot name="rowsSelected" :table="table">\n <div v-if="showSelect" class="whitespace-nowrap text-sm text-muted-foreground">\n <span>\n {{ table.getFilteredSelectedRowModel().rows.length }} of {{ " " }}\n {{ table.getFilteredRowModel().rows.length }} row(s) selected\n </span>\n </div>\n </slot>\n <slot name="rowsPerPage" :table="table">\n <div class="flex items-center space-x-2 whitespace-nowrap">\n <p class="hidden text-sm font-medium text-foreground md:inline-block">\n {{ rowsPerPageText }}\n </p>\n <UiSelect v-model="pageSize">\n <UiSelectTrigger class="h-9 w-[70px]">\n {{ table.getState().pagination.pageSize }}\n </UiSelectTrigger>\n <UiSelectContent side="top" align="start">\n <UiSelectGroup>\n <!-- eslint-disable vue/no-template-shadow -->\n <UiSelectItem\n v-for="pageSize in pageSizes"\n :key="pageSize"\n :value="`${pageSize}`"\n >\n {{ pageSize }}\n </UiSelectItem>\n </UiSelectGroup>\n </UiSelectContent>\n </UiSelect>\n </div>\n </slot>\n </div>\n\n <div class="flex items-center justify-between gap-3">\n <slot :table="table" name="page">\n <div\n class="flex items-center justify-center whitespace-nowrap text-sm font-medium text-foreground"\n >\n Page {{ table.getState().pagination.pageIndex + 1 }} of\n {{ table.getPageCount() }}\n </div>\n </slot>\n\n <slot :table="table" name="pageButtons">\n <div class="flex items-center space-x-2">\n <UiButton\n variant="outline"\n title="First page"\n class="h-9 w-9 p-0"\n :disabled="!table.getCanPreviousPage()"\n @click="table.setPageIndex(0)"\n >\n <Icon name="lucide:chevrons-left" class="h-4 w-4" />\n </UiButton>\n <UiButton\n variant="outline"\n title="Previous page"\n class="h-9 w-9 p-0"\n :disabled="!table.getCanPreviousPage()"\n @click="table.previousPage()"\n >\n <Icon name="lucide:chevron-left" class="h-4 w-4" />\n </UiButton>\n <UiButton\n variant="outline"\n title="Next page"\n class="h-9 w-9 p-0"\n :disabled="!table.getCanNextPage()"\n @click="table.nextPage()"\n >\n <Icon name="lucide:chevron-right" class="h-4 w-4" />\n </UiButton>\n <UiButton\n variant="outline"\n title="Last page"\n class="h-9 w-9 p-0"\n :disabled="!table.getCanNextPage()"\n @click="table.setPageIndex(table.getPageCount() - 1)"\n >\n <Icon name="lucide:chevrons-right" class="h-4 w-4" />\n </UiButton>\n </div>\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang="ts" setup generic="T">\n import CheckBox from "@/components/Ui/Checkbox/Checkbox.vue";\n import {\n FlexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useVueTable,\n } from "@tanstack/vue-table";\n import type { ColumnDef, SortingState, Table } from "@tanstack/vue-table";\n\n const props = withDefaults(\n defineProps<{\n data?: T[];\n columns?: ColumnDef<T>[];\n search?: string;\n showSelect?: boolean;\n pageSizes?: number[];\n pageSize?: number;\n sorting?: SortingState;\n tableClass?: any;\n ascIcon?: string;\n descIcon?: string;\n unsortedIcon?: string;\n class?: any;\n showPagination?: boolean;\n rowsPerPageText?: string;\n }>(),\n {\n pageSizes: () => [10, 20, 30, 40, 50, 100],\n pageSize: () => 10,\n columns: () => [],\n data: () => [],\n sorting: () => [],\n ascIcon: "heroicons:chevron-up",\n descIcon: "heroicons:chevron-down",\n unsortedIcon: "heroicons:chevron-up-down",\n showPagination: true,\n rowsPerPageText: "Rows per page:",\n }\n );\n\n defineOptions({ inheritAttrs: false });\n\n const styles = tv({\n base: "w-full overflow-x-auto",\n });\n\n const checkBoxHeader: ColumnDef<any> = {\n id: "checkbox",\n header: ({ table }) => {\n return h(\n "div",\n { class: "flex items-center justify-center" },\n h(CheckBox, {\n checked: table.getIsAllRowsSelected()\n ? true\n : table.getIsSomeRowsSelected()\n ? "indeterminate"\n : false,\n "onUpdate:checked": (value: boolean) => table.toggleAllPageRowsSelected(!!value),\n ariaLabel: "Select all",\n })\n );\n },\n cell: ({ row }) => {\n return h(\n "div",\n { class: "flex items-center justify-center " },\n h(CheckBox, {\n checked: row.getIsSelected(),\n "onUpdate:checked": (value) => row.toggleSelected(!!value),\n ariaLabel: "Select row",\n })\n );\n },\n enableSorting: false,\n enableHiding: false,\n };\n\n const localColumns: ColumnDef<T>[] = [...props.columns];\n\n if (props.showSelect) {\n localColumns.unshift(checkBoxHeader);\n }\n\n const emit = defineEmits<{\n ready: [table: Table<T>];\n }>();\n\n const localSorting = ref(props.sorting);\n const globalFilter = ref(props.search);\n const columnVisibility = ref({});\n const rowSelection = ref({});\n\n const table = useVueTable({\n get data() {\n return props.data;\n },\n get columns() {\n return localColumns;\n },\n initialState: {\n pagination: {\n pageSize: props.pageSize,\n },\n rowSelection: rowSelection.value,\n globalFilter: props.search,\n },\n state: {\n get sorting() {\n return localSorting.value;\n },\n get globalFilter() {\n return props.search;\n },\n get columnVisibility() {\n return columnVisibility.value;\n },\n get rowSelection() {\n return rowSelection.value;\n },\n },\n onSortingChange: (updaterOrValue) => {\n localSorting.value =\n typeof updaterOrValue === "function" ? updaterOrValue(localSorting.value) : updaterOrValue;\n },\n onGlobalFilterChange: (updaterOrValue) => {\n globalFilter.value =\n typeof updaterOrValue === "function" ? updaterOrValue(globalFilter.value) : updaterOrValue;\n },\n onRowSelectionChange: (updaterOrValue) => {\n rowSelection.value =\n typeof updaterOrValue === "function" ? updaterOrValue(rowSelection.value) : updaterOrValue;\n },\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n enableRowSelection: () => !!props.showSelect,\n });\n\n function toggleColumnVisibility(column: any) {\n columnVisibility.value = {\n ...columnVisibility.value,\n [column.id]: !column.getIsVisible(),\n };\n }\n\n // eslint-disable-next-line vue/no-dupe-keys\n const pageSize = computed({\n get() {\n return table.getState().pagination.pageSize.toString();\n },\n set(value) {\n table.setPageSize(Number(value));\n },\n });\n\n onMounted(() => {\n emit("ready", table);\n });\n\n defineExpose({ toggleColumnVisibility });\n</script>\n',
|
|
2649
|
-
},
|
|
2650
|
-
],
|
|
2651
|
-
utils: [],
|
|
2652
|
-
composables: [],
|
|
2653
|
-
plugins: [],
|
|
2654
|
-
},
|
|
2655
|
-
{
|
|
2656
|
-
name: "Textarea",
|
|
2657
|
-
value: "textarea",
|
|
2658
|
-
files: [
|
|
2659
|
-
{
|
|
2660
|
-
fileName: "Textarea.vue",
|
|
2661
|
-
dirPath: "app/components/Ui",
|
|
2662
|
-
fileContent:
|
|
2663
|
-
'<template>\n <textarea\n v-bind="props"\n :value="modelValue"\n :class="styles({ class: props.class })"\n @input="handleInput"\n />\n</template>\n\n<script lang="ts" setup>\n const props = withDefaults(\n defineProps<{\n /** Additional classes to add to the textarea */\n class?: any;\n /** The name of the textarea */\n name?: string;\n /** The id of the textarea */\n id?: string;\n /** The placeholder of the textarea */\n placeholder?: string;\n /** Whether the textarea is required */\n required?: boolean;\n /** Whether the textarea is disabled */\n disabled?: boolean;\n /** The number of rows to display */\n rows?: number;\n /** The value of the textarea */\n modelValue?: string;\n /** The maximum number of characters allowed */\n maxlength?: number;\n /** The `RegExp` pattern of the textarea */\n pattern?: string;\n }>(),\n {\n modelValue: "",\n }\n );\n\n const emit = defineEmits<{\n "update:modelValue": [value: string];\n }>();\n\n const handleInput = (event: Event) => {\n const target = event.target as HTMLTextAreaElement;\n let value = target.value;\n\n /* Validate input with pattern */\n if (props.pattern) {\n const regex = new RegExp(props.pattern);\n value = Array.from(value)\n .filter((char) => regex.test(char))\n .join("");\n }\n\n /* Handle maxlength */\n if (props.maxlength) {\n value = value.slice(0, props.maxlength);\n }\n\n target.value = value;\n emit("update:modelValue", value);\n };\n\n const styles = tv({\n base: "form-textarea flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 ring-offset-background placeholder:text-muted-foreground focus:border-input focus:ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:[color-scheme:dark] sm:text-sm",\n });\n</script>\n',
|
|
2664
|
-
},
|
|
2665
|
-
],
|
|
2666
|
-
utils: [],
|
|
2667
|
-
composables: [],
|
|
2668
|
-
plugins: [],
|
|
2669
|
-
},
|
|
2670
|
-
{
|
|
2671
|
-
name: "Timeline",
|
|
2672
|
-
value: "timeline",
|
|
2673
|
-
files: [
|
|
2674
|
-
{
|
|
2675
|
-
fileName: "Timeline/Content.vue",
|
|
2676
|
-
dirPath: "app/components/Ui",
|
|
2677
|
-
fileContent:
|
|
2678
|
-
'<template>\n <Primitive\n data-slot="timeline-content"\n v-bind="forwarded"\n :class="styles({ class: props.class })"\n >\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive, useForwardProps } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const styles = tv({\n base: "text-sm text-muted-foreground",\n });\n const props = defineProps<\n PrimitiveProps & {\n class?: any;\n }\n >();\n\n const forwarded = useForwardProps(reactiveOmit(props, ["class"]));\n</script>\n',
|
|
2679
|
-
},
|
|
2680
|
-
{
|
|
2681
|
-
fileName: "Timeline/Date.vue",
|
|
2682
|
-
dirPath: "app/components/Ui",
|
|
2683
|
-
fileContent:
|
|
2684
|
-
'<template>\n <Primitive data-slot="timeline-date" v-bind="forwarded" :class="styles({ class: props.class })">\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive, useForwardProps } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const styles = tv({\n base: "mb-1 block text-xs font-medium text-muted-foreground sm:max-sm:group-data-[orientation=vertical]/timeline:h-4",\n });\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n class?: any;\n }\n >(),\n {\n as: "time",\n }\n );\n\n const forwarded = useForwardProps(reactiveOmit(props, ["class"]));\n</script>\n',
|
|
2685
|
-
},
|
|
2686
|
-
{
|
|
2687
|
-
fileName: "Timeline/Header.vue",
|
|
2688
|
-
dirPath: "app/components/Ui",
|
|
2689
|
-
fileContent:
|
|
2690
|
-
'<template>\n <Primitive data-slot="timeline-header" :as :as-child>\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n defineProps<PrimitiveProps>();\n</script>\n',
|
|
2691
|
-
},
|
|
2692
|
-
{
|
|
2693
|
-
fileName: "Timeline/Indicator.vue",
|
|
2694
|
-
dirPath: "app/components/Ui",
|
|
2695
|
-
fileContent:
|
|
2696
|
-
'<template>\n <Primitive\n data-slot="timeline-indicator"\n aria-hidden="true"\n v-bind="forwarded"\n :class="styles({ class: props.class })"\n >\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive, useForwardProps } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const styles = tv({\n base: "absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=horizontal]/timeline:left-0 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[completed=true]/timeline-item:border-primary",\n });\n const props = defineProps<\n PrimitiveProps & {\n class?: any;\n }\n >();\n\n const forwarded = useForwardProps(reactiveOmit(props, ["class"]));\n</script>\n',
|
|
2697
|
-
},
|
|
2698
|
-
{
|
|
2699
|
-
fileName: "Timeline/Item.vue",
|
|
2700
|
-
dirPath: "app/components/Ui",
|
|
2701
|
-
fileContent:
|
|
2702
|
-
'<template>\n <Primitive\n :data-completed="timelineData?.model?.value && step <= timelineData?.model?.value"\n :data-step="step"\n data-slot="timeline-item"\n aria-hidden="true"\n v-bind="forwarded"\n :class="styles({ class: props.class })"\n >\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive, useForwardProps } from "radix-vue";\n import type { TimelineData } from "./Timeline.vue";\n import type { PrimitiveProps } from "radix-vue";\n\n import { timelineDataSymbol } from "./Timeline.vue";\n\n const timelineData = inject<TimelineData>(timelineDataSymbol);\n\n const styles = tv({\n base: "group/timeline-item relative flex flex-1 flex-col gap-0.5 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=vertical]/timeline:ml-8 group-data-[orientation=horizontal]/timeline:[&:not(:last-child)]:pe-8 group-data-[orientation=vertical]/timeline:[&:not(:last-child)]:pb-12 [&_[data-slot=timeline-separator]]:has-[+[data-completed=true]]:bg-primary",\n });\n const props = defineProps<\n PrimitiveProps & {\n class?: any;\n step: number;\n }\n >();\n\n const forwarded = useForwardProps(reactiveOmit(props, ["class", "step"]));\n</script>\n',
|
|
2703
|
-
},
|
|
2704
|
-
{
|
|
2705
|
-
fileName: "Timeline/Separator.vue",
|
|
2706
|
-
dirPath: "app/components/Ui",
|
|
2707
|
-
fileContent:
|
|
2708
|
-
'<template>\n <Primitive\n data-slot="timeline-separator"\n aria-hidden="true"\n v-bind="forwarded"\n :class="styles({ class: props.class })"\n >\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive, useForwardProps } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const styles = tv({\n base: "absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=horizontal]/timeline:translate-x-[1.125rem] group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=vertical]/timeline:translate-y-[1.125rem]",\n });\n const props = defineProps<\n PrimitiveProps & {\n class?: any;\n }\n >();\n\n const forwarded = useForwardProps(reactiveOmit(props, ["class"]));\n</script>\n',
|
|
2709
|
-
},
|
|
2710
|
-
{
|
|
2711
|
-
fileName: "Timeline/Timeline.vue",
|
|
2712
|
-
dirPath: "app/components/Ui",
|
|
2713
|
-
fileContent:
|
|
2714
|
-
'<template>\n <Primitive\n :data-orientation="orientation"\n data-slot="timeline"\n v-bind="forwarded"\n :class="styles({ class: props.class })"\n >\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts">\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive, useForwardProps } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n import type { ModelRef } from "vue";\n\n export type TimelineData = {\n model: ModelRef<number | undefined, string, number | undefined, number | undefined>;\n orientation: "horizontal" | "vertical";\n };\n export type TimelineProps = PrimitiveProps & {\n class?: any;\n orientation?: "horizontal" | "vertical";\n modelValue?: number | undefined;\n };\n export const timelineDataSymbol = Symbol("timeline-data");\n</script>\n\n<script lang="ts" setup>\n const styles = tv({\n base: "group/timeline flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col",\n });\n const model = defineModel<number | undefined>({ default: 1 });\n const props = withDefaults(defineProps<TimelineProps>(), {\n orientation: "vertical",\n });\n const forwarded = useForwardProps(reactiveOmit(props, ["modelValue", "class", "orientation"]));\n provide<TimelineData>(timelineDataSymbol, {\n model,\n orientation: props.orientation,\n });\n</script>\n',
|
|
2715
|
-
},
|
|
2716
|
-
{
|
|
2717
|
-
fileName: "Timeline/Title.vue",
|
|
2718
|
-
dirPath: "app/components/Ui",
|
|
2719
|
-
fileContent:
|
|
2720
|
-
'<template>\n <Primitive\n data-slot="timeline-title"\n aria-hidden="true"\n v-bind="forwarded"\n :class="styles({ class: props.class })"\n >\n <slot />\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { reactiveOmit } from "@vueuse/core";\n import { Primitive, useForwardProps } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const styles = tv({\n base: "text-sm font-medium",\n });\n const props = defineProps<\n PrimitiveProps & {\n class?: any;\n }\n >();\n\n const forwarded = useForwardProps(reactiveOmit(props, ["class"]));\n</script>\n',
|
|
2721
|
-
},
|
|
2722
|
-
],
|
|
2723
|
-
utils: [],
|
|
2724
|
-
composables: [],
|
|
2725
|
-
plugins: [],
|
|
2726
|
-
},
|
|
2727
|
-
{
|
|
2728
|
-
name: "Toast",
|
|
2729
|
-
value: "toast",
|
|
2730
|
-
composables: [
|
|
2731
|
-
{
|
|
2732
|
-
fileName: "useToast.ts",
|
|
2733
|
-
dirPath: "composables",
|
|
2734
|
-
fileContent:
|
|
2735
|
-
'import type { ToastProps } from "@/components/Ui/Toast/Toast.vue";\n\nconst TOAST_LIMIT = 3;\nconst TOAST_REMOVE_DELAY = 7000;\n\nexport type StringOrVNode = string | VNode | (() => VNode);\n\ntype ToasterToast = ToastProps & {\n id: string;\n title?: string;\n description?: StringOrVNode;\n action?: Component;\n icon?: string;\n};\n\nconst actionTypes = {\n ADD_TOAST: "ADD_TOAST",\n UPDATE_TOAST: "UPDATE_TOAST",\n DISMISS_TOAST: "DISMISS_TOAST",\n REMOVE_TOAST: "REMOVE_TOAST",\n} as const;\n\nlet count = 0;\n\nfunction genId() {\n count = (count + 1) % Number.MAX_VALUE;\n return count.toString();\n}\n\ntype ActionType = typeof actionTypes;\n\ntype Action =\n | {\n type: ActionType["ADD_TOAST"];\n toast: ToasterToast;\n }\n | {\n type: ActionType["UPDATE_TOAST"];\n toast: Partial<ToasterToast>;\n }\n | {\n type: ActionType["DISMISS_TOAST"];\n toastId?: ToasterToast["id"];\n }\n | {\n type: ActionType["REMOVE_TOAST"];\n toastId?: ToasterToast["id"];\n };\n\ninterface State {\n toasts: ToasterToast[];\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();\n\nfunction addToRemoveQueue(toastId: string) {\n if (toastTimeouts.has(toastId)) return;\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId);\n dispatch({\n type: actionTypes.REMOVE_TOAST,\n toastId,\n });\n }, TOAST_REMOVE_DELAY);\n\n toastTimeouts.set(toastId, timeout);\n}\n\nconst state = ref<State>({\n toasts: [],\n});\n\nfunction dispatch(action: Action) {\n switch (action.type) {\n case actionTypes.ADD_TOAST:\n state.value.toasts = [action.toast, ...state.value.toasts].slice(0, TOAST_LIMIT);\n break;\n\n case actionTypes.UPDATE_TOAST:\n state.value.toasts = state.value.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n );\n break;\n\n case actionTypes.DISMISS_TOAST: {\n const { toastId } = action;\n\n if (toastId) {\n addToRemoveQueue(toastId);\n } else {\n state.value.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id);\n });\n }\n\n state.value.toasts = state.value.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t\n );\n break;\n }\n\n case actionTypes.REMOVE_TOAST:\n if (action.toastId === undefined) state.value.toasts = [];\n else state.value.toasts = state.value.toasts.filter((t) => t.id !== action.toastId);\n\n break;\n }\n}\n\nfunction useToast() {\n return {\n toasts: computed(() => state.value.toasts),\n toast,\n dismiss: (toastId?: string) => dispatch({ type: actionTypes.DISMISS_TOAST, toastId }),\n };\n}\n\ntype Toast = Omit<ToasterToast, "id">;\n\nfunction toast(props: Toast) {\n const id = genId();\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: actionTypes.UPDATE_TOAST,\n toast: { ...props, id },\n });\n\n const dismiss = () => dispatch({ type: actionTypes.DISMISS_TOAST, toastId: id });\n\n dispatch({\n type: actionTypes.ADD_TOAST,\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open: boolean) => {\n if (!open) dismiss();\n },\n },\n });\n\n return {\n id,\n dismiss,\n update,\n };\n}\n\nexport { toast, useToast };\n',
|
|
2736
|
-
},
|
|
2737
|
-
],
|
|
2738
|
-
instructions: ["Remember to add <UiToastToaster /> to your app.vue/layout file."],
|
|
2739
|
-
files: [
|
|
2740
|
-
{
|
|
2741
|
-
fileName: "Toast/Action.vue",
|
|
2742
|
-
dirPath: "app/components/Ui",
|
|
2743
|
-
fileContent:
|
|
2744
|
-
'<template>\n <ToastAction :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </ToastAction>\n</template>\n\n<script lang="ts" setup>\n import { ToastAction } from "radix-vue";\n import type { ToastActionProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n ToastActionProps & {\n /**\n * Custom class names to add to the button.\n */\n class?: any;\n }\n >(),\n {\n altText: "Action button",\n }\n );\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-xs font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",\n });\n</script>\n',
|
|
2745
|
-
},
|
|
2746
|
-
{
|
|
2747
|
-
fileName: "Toast/Close.vue",
|
|
2748
|
-
dirPath: "app/components/Ui",
|
|
2749
|
-
fileContent:
|
|
2750
|
-
'<template>\n <ToastClose :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>\n <Icon :name="icon || \'lucide:x\'" class="h-4 w-4" />\n </slot>\n </ToastClose>\n</template>\n\n<script lang="ts" setup>\n import { ToastClose } from "radix-vue";\n import type { ToastCloseProps } from "radix-vue";\n\n const props = defineProps<\n ToastCloseProps & {\n /**\n * Custom class names to add to the button.\n */\n class?: any;\n /**\n * The icon to render.\n */\n icon?: string;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "icon");\n const styles = tv({\n base: "absolute right-2 top-2 inline-flex items-center justify-center rounded-md p-1 text-foreground/50 opacity-50 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 focus-visible:ring-ring group-hover:opacity-100",\n });\n</script>\n',
|
|
2751
|
-
},
|
|
2752
|
-
{
|
|
2753
|
-
fileName: "Toast/Description.vue",
|
|
2754
|
-
dirPath: "app/components/Ui",
|
|
2755
|
-
fileContent:
|
|
2756
|
-
'<template>\n <ToastDescription :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>{{ description }}</slot>\n </ToastDescription>\n</template>\n\n<script lang="ts" setup>\n import { ToastDescription } from "radix-vue";\n import type { ToastDescriptionProps } from "radix-vue";\n\n const props = defineProps<\n ToastDescriptionProps & {\n /** The description text to render */\n description?: string;\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "description");\n const styles = tv({\n base: "text-sm opacity-90",\n });\n</script>\n',
|
|
2757
|
-
},
|
|
2758
|
-
{
|
|
2759
|
-
fileName: "Toast/Provider.vue",
|
|
2760
|
-
dirPath: "app/components/Ui",
|
|
2761
|
-
fileContent:
|
|
2762
|
-
'<template>\n <ToastProvider v-bind="props">\n <slot />\n </ToastProvider>\n</template>\n\n<script lang="ts" setup>\n import { ToastProvider } from "radix-vue";\n import type { ToastProviderProps } from "radix-vue";\n\n const props = withDefaults(defineProps<ToastProviderProps>(), {\n label: "Notification",\n swipeDirection: "right",\n });\n</script>\n',
|
|
2763
|
-
},
|
|
2764
|
-
{
|
|
2765
|
-
fileName: "Toast/Title.vue",
|
|
2766
|
-
dirPath: "app/components/Ui",
|
|
2767
|
-
fileContent:
|
|
2768
|
-
'<template>\n <ToastTitle :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>{{ title }}</slot>\n </ToastTitle>\n</template>\n\n<script lang="ts" setup>\n import { ToastTitle } from "radix-vue";\n import type { ToastTitleProps } from "radix-vue";\n\n const props = defineProps<\n ToastTitleProps & {\n /** The title text to render */\n title?: string;\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class", "title");\n const styles = tv({\n base: "text-sm font-semibold",\n });\n</script>\n',
|
|
2769
|
-
},
|
|
2770
|
-
{
|
|
2771
|
-
fileName: "Toast/Toast.vue",
|
|
2772
|
-
dirPath: "app/components/Ui",
|
|
2773
|
-
fileContent:
|
|
2774
|
-
'<template>\n <ToastRoot\n v-slot="slotProps"\n v-bind="forwarded"\n :class="styles({ variant, class: props.class })"\n @update:open="onOpenChange"\n >\n <slot v-bind="slotProps" />\n </ToastRoot>\n</template>\n\n<script lang="ts" setup>\n import { ToastRoot, useForwardPropsEmits } from "radix-vue";\n import type { ToastRootEmits, ToastRootProps } from "radix-vue";\n\n export interface ToastProps extends ToastRootProps {\n /**\n * Custom class names to add to the toast.\n */\n class?: any;\n /**\n * The variant of the toast.\n */\n variant?: VariantProps<typeof styles>["variant"];\n /**\n * Callback that fires when the toast is closed.\n */\n onOpenChange?: ((value: boolean) => void) | undefined;\n }\n\n const props = withDefaults(defineProps<ToastProps>(), {});\n\n const emits = defineEmits<ToastRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);\n provide("ToastRootProps", readonly(toRef(() => props)));\n\n const styles = tv({\n base: "group pointer-events-auto relative flex w-full items-center justify-between gap-4 overflow-hidden rounded-md border p-4 pr-9 shadow-sm transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",\n variants: {\n variant: {\n default: "border bg-background text-foreground",\n success:\n "success group border-[var(--success-border)] bg-[--success-bg] text-[--success-text]",\n info: "info group border-[var(--info-border)] bg-[--info-bg] text-[--info-text]",\n warning:\n "warning group border-[var(--warning-border)] bg-[--warning-bg] text-[--warning-text]",\n destructive:\n "destructive group border-[var(--error-border)] bg-[--error-bg] text-[--error-text]",\n },\n },\n defaultVariants: {\n variant: "default",\n },\n });\n</script>\n',
|
|
2775
|
-
},
|
|
2776
|
-
{
|
|
2777
|
-
fileName: "Toast/Toaster.vue",
|
|
2778
|
-
dirPath: "app/components/Ui",
|
|
2779
|
-
fileContent:
|
|
2780
|
-
'<template>\n <UiToastProvider>\n <template v-for="toast in toasts" :key="toast.id">\n <UiToast v-bind="toast">\n <div class="flex gap-3">\n <Icon\n v-if="toast.icon"\n :name="toast.icon"\n class="h-5 w-5 shrink-0"\n :class="[!!toast.title && !!toast.description && \'mt-0.5\']"\n />\n <div class="flex flex-col gap-1">\n <UiToastTitle v-if="toast.title" :title="toast.title" />\n <template v-if="toast.description">\n <UiToastDescription v-if="isVNode(toast.description)">\n <component :is="toast.description" />\n </UiToastDescription>\n <UiToastDescription v-else>\n {{ toast.description }}\n </UiToastDescription>\n </template>\n <UiToastClose />\n </div>\n </div>\n <component :is="toast.action" />\n </UiToast>\n </template>\n <UiToastViewport />\n </UiToastProvider>\n</template>\n\n<script lang="ts" setup>\n import { isVNode } from "vue";\n\n const { toasts } = useToast();\n</script>\n\n<style>\n :root {\n --success-bg: hsl(143, 85%, 96%);\n --success-border: hsl(145, 92%, 91%);\n --success-text: hsl(140, 100%, 27%);\n\n --info-bg: hsl(208, 100%, 97%);\n --info-border: hsl(221, 91%, 91%);\n --info-text: hsl(210, 92%, 45%);\n\n --warning-bg: hsl(49, 100%, 97%);\n --warning-border: hsl(49, 91%, 91%);\n --warning-text: hsl(31, 92%, 45%);\n\n --error-bg: hsl(359, 100%, 97%);\n --error-border: hsl(359, 100%, 94%);\n --error-text: hsl(360, 100%, 45%);\n }\n .dark {\n --success-bg: hsl(150, 100%, 6%);\n --success-border: hsl(147, 100%, 12%);\n --success-text: hsl(150, 86%, 65%);\n\n --info-bg: hsl(215, 100%, 6%);\n --info-border: hsl(223, 100%, 12%);\n --info-text: hsl(216, 87%, 65%);\n\n --warning-bg: hsl(64, 100%, 6%);\n --warning-border: hsl(60, 100%, 12%);\n --warning-text: hsl(46, 87%, 65%);\n\n --error-bg: hsl(358, 76%, 10%);\n --error-border: hsl(357, 89%, 16%);\n --error-text: hsl(358, 100%, 81%);\n }\n</style>\n',
|
|
2781
|
-
},
|
|
2782
|
-
{
|
|
2783
|
-
fileName: "Toast/Viewport.vue",
|
|
2784
|
-
dirPath: "app/components/Ui",
|
|
2785
|
-
fileContent:
|
|
2786
|
-
'<template>\n <ToastViewport :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </ToastViewport>\n</template>\n\n<script lang="ts" setup>\n import { ToastViewport } from "radix-vue";\n import type { ToastViewportProps } from "radix-vue";\n\n const props = defineProps<\n ToastViewportProps & {\n /**\n * Custom class names to add to the button.\n */\n class?: any;\n }\n >();\n const forwarded = reactiveOmit(props, "class");\n const styles = tv({\n base: "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-2 p-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:bottom-auto sm:right-0 sm:flex-col md:max-w-[420px]",\n });\n</script>\n\n<style>\n [aria-label~="Notifications"] {\n display: grid;\n }\n</style>\n',
|
|
2787
|
-
},
|
|
2788
|
-
],
|
|
2789
|
-
utils: [],
|
|
2790
|
-
plugins: [],
|
|
2791
|
-
},
|
|
2792
|
-
{
|
|
2793
|
-
name: "Toggle",
|
|
2794
|
-
value: "toggle",
|
|
2795
|
-
files: [
|
|
2796
|
-
{
|
|
2797
|
-
fileName: "Toggle.vue",
|
|
2798
|
-
dirPath: "app/components/Ui",
|
|
2799
|
-
fileContent:
|
|
2800
|
-
'<template>\n <ToggleRoot\n v-slot="slotProps"\n v-bind="forwarded"\n :class="styles({ variant, size, class: props.class })"\n >\n <slot v-bind="slotProps" />\n </ToggleRoot>\n</template>\n\n<script lang="ts" setup>\n import { Toggle as ToggleRoot, useForwardPropsEmits } from "radix-vue";\n import type { ToggleEmits, ToggleProps } from "radix-vue";\n\n const props = defineProps<\n ToggleProps & {\n class?: any;\n variant?: Props["variant"];\n size?: Props["size"];\n }\n >();\n\n const emits = defineEmits<ToggleEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "variant", "size"), emits);\n\n type Props = VariantProps<typeof styles>;\n\n const styles = tv({\n base: "inline-flex items-center justify-center rounded-md font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground sm:text-sm",\n variants: {\n variant: {\n default: "bg-transparent",\n outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",\n },\n size: {\n default: "h-10 px-3",\n sm: "h-9 px-2.5",\n lg: "h-11 px-5",\n },\n },\n defaultVariants: {\n variant: "default",\n size: "default",\n },\n });\n</script>\n',
|
|
2801
|
-
},
|
|
2802
|
-
],
|
|
2803
|
-
utils: [],
|
|
2804
|
-
composables: [],
|
|
2805
|
-
plugins: [],
|
|
2806
|
-
},
|
|
2807
|
-
{
|
|
2808
|
-
name: "Toggle Group",
|
|
2809
|
-
value: "toggle-group",
|
|
2810
|
-
files: [
|
|
2811
|
-
{
|
|
2812
|
-
fileName: "ToggleGroup/ToggleGroup.vue",
|
|
2813
|
-
dirPath: "app/components/Ui",
|
|
2814
|
-
fileContent:
|
|
2815
|
-
'<template>\n <ToggleGroupRoot\n v-slot="{ modelValue }"\n v-bind="forwarded"\n :class="styles({ class: props.class })"\n >\n <slot :model-value="modelValue" />\n </ToggleGroupRoot>\n</template>\n\n<script lang="ts" setup>\n import { ToggleGroupRoot, useForwardPropsEmits } from "radix-vue";\n import type { ToggleGroupRootEmits, ToggleGroupRootProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n ToggleGroupRootProps & {\n /** custom class to add to the parent */\n class?: any;\n }\n >(),\n {\n type: "single",\n }\n );\n\n const emit = defineEmits<ToggleGroupRootEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emit);\n\n const styles = tv({\n base: "flex items-center justify-center gap-1",\n });\n</script>\n',
|
|
2816
|
-
},
|
|
2817
|
-
{
|
|
2818
|
-
fileName: "ToggleGroup/ToggleGroupItem.vue",
|
|
2819
|
-
dirPath: "app/components/Ui",
|
|
2820
|
-
fileContent:
|
|
2821
|
-
'<template>\n <ToggleGroupItem v-bind="forwarded" :class="styles({ class: props.class, size, variant })">\n <slot>\n <Icon v-if="icon" class="size-4" :name="icon" />\n </slot>\n </ToggleGroupItem>\n</template>\n\n<script lang="ts" setup>\n import { ToggleGroupItem, useForwardProps } from "radix-vue";\n import type { ToggleGroupItemProps } from "radix-vue";\n\n const props = defineProps<\n ToggleGroupItemProps & {\n /** custom class to add to the toggle */\n class?: any;\n /** icon to display */\n icon?: string;\n /** variant of the toggle */\n variant?: VariantProps<typeof styles>["variant"];\n /** size of the toggle */\n size?: VariantProps<typeof styles>["size"];\n }\n >();\n\n const forwarded = useForwardProps(reactiveOmit(props, "class"));\n\n const styles = tv({\n base: "inline-flex items-center justify-center rounded-md font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground sm:text-sm",\n variants: {\n variant: {\n default: "bg-transparent",\n outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",\n },\n size: {\n default: "h-10 px-3",\n sm: "h-9 px-2.5",\n lg: "h-11 px-5",\n },\n },\n defaultVariants: {\n variant: "default",\n size: "default",\n },\n });\n</script>\n',
|
|
2822
|
-
},
|
|
2823
|
-
],
|
|
2824
|
-
utils: [],
|
|
2825
|
-
composables: [],
|
|
2826
|
-
plugins: [],
|
|
2827
|
-
},
|
|
2828
|
-
{
|
|
2829
|
-
name: "Tooltip",
|
|
2830
|
-
value: "tooltip",
|
|
2831
|
-
files: [
|
|
2832
|
-
{
|
|
2833
|
-
fileName: "Tooltip/Arrow.vue",
|
|
2834
|
-
dirPath: "app/components/Ui",
|
|
2835
|
-
fileContent:
|
|
2836
|
-
'<template>\n <TooltipArrow v-bind="props" />\n</template>\n\n<script lang="ts" setup>\n import { TooltipArrow } from "radix-vue";\n import type { TooltipArrowProps } from "radix-vue";\n\n const props = withDefaults(defineProps<TooltipArrowProps>(), {\n width: 10,\n height: 5,\n });\n</script>\n',
|
|
2837
|
-
},
|
|
2838
|
-
{
|
|
2839
|
-
fileName: "Tooltip/Content.vue",
|
|
2840
|
-
dirPath: "app/components/Ui",
|
|
2841
|
-
fileContent:
|
|
2842
|
-
'<template>\n <UiTooltipPortal :to="to">\n <TooltipContent v-bind="{ ...forwarded, ...$attrs }" :class="styles({ class: props.class })">\n <slot />\n </TooltipContent>\n </UiTooltipPortal>\n</template>\n\n<script lang="ts" setup>\n import { TooltipContent, useForwardPropsEmits } from "radix-vue";\n import type { TooltipContentEmits, TooltipContentProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n\n const props = withDefaults(\n defineProps<\n TooltipContentProps & {\n to?: string | HTMLElement;\n class?: any;\n }\n >(),\n {\n side: "top",\n sideOffset: 8,\n align: "start",\n alignOffset: -4,\n avoidCollisions: true,\n collisionBoundary: () => [],\n collisionPadding: 0,\n sticky: "partial",\n }\n );\n\n const emits = defineEmits<TooltipContentEmits>();\n const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "to"), emits);\n\n const styles = tv({\n base: "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",\n });\n</script>\n',
|
|
2843
|
-
},
|
|
2844
|
-
{
|
|
2845
|
-
fileName: "Tooltip/Portal.vue",
|
|
2846
|
-
dirPath: "app/components/Ui",
|
|
2847
|
-
fileContent:
|
|
2848
|
-
'<template>\n <TooltipPortal v-bind="props">\n <slot />\n </TooltipPortal>\n</template>\n\n<script lang="ts" setup>\n import { TooltipPortal } from "radix-vue";\n import type { TooltipPortalProps } from "radix-vue";\n\n const props = defineProps<TooltipPortalProps>();\n</script>\n',
|
|
2849
|
-
},
|
|
2850
|
-
{
|
|
2851
|
-
fileName: "Tooltip/Provider.vue",
|
|
2852
|
-
dirPath: "app/components/Ui",
|
|
2853
|
-
fileContent:
|
|
2854
|
-
'<template>\n <TooltipProvider v-bind="props">\n <slot />\n </TooltipProvider>\n</template>\n\n<script lang="ts" setup>\n import { TooltipProvider } from "radix-vue";\n import type { TooltipProviderProps } from "radix-vue";\n\n const props = defineProps<TooltipProviderProps>();\n</script>\n',
|
|
2855
|
-
},
|
|
2856
|
-
{
|
|
2857
|
-
fileName: "Tooltip/Tooltip.vue",
|
|
2858
|
-
dirPath: "app/components/Ui",
|
|
2859
|
-
fileContent:
|
|
2860
|
-
'<template>\n <UiTooltipProvider v-bind="props">\n <TooltipRoot v-slot="slotProps" v-bind="{ ...forwarded, ...$attrs }">\n <slot v-bind="slotProps">\n <slot v-bind="slotProps" name="trigger" />\n <slot v-bind="slotProps" name="content" />\n </slot>\n </TooltipRoot>\n </UiTooltipProvider>\n</template>\n\n<script lang="ts" setup>\n import { TooltipRoot, useForwardPropsEmits } from "radix-vue";\n import type { TooltipProviderProps, TooltipRootEmits, TooltipRootProps } from "radix-vue";\n\n defineOptions({ inheritAttrs: false });\n const props = withDefaults(defineProps<TooltipRootProps & TooltipProviderProps>(), {\n delayDuration: 200,\n });\n\n const emits = defineEmits<TooltipRootEmits>();\n\n const forwarded = useForwardPropsEmits(props, emits);\n</script>\n',
|
|
2861
|
-
},
|
|
2862
|
-
{
|
|
2863
|
-
fileName: "Tooltip/Trigger.vue",
|
|
2864
|
-
dirPath: "app/components/Ui",
|
|
2865
|
-
fileContent:
|
|
2866
|
-
'<template>\n <TooltipTrigger v-bind="props">\n <slot />\n </TooltipTrigger>\n</template>\n\n<script lang="ts" setup>\n import { TooltipTrigger } from "radix-vue";\n import type { TooltipTriggerProps } from "radix-vue";\n\n const props = defineProps<TooltipTriggerProps>();\n</script>\n',
|
|
2867
|
-
},
|
|
2868
|
-
],
|
|
2869
|
-
utils: [],
|
|
2870
|
-
composables: [],
|
|
2871
|
-
plugins: [],
|
|
2872
|
-
},
|
|
2873
|
-
{
|
|
2874
|
-
name: "Tree",
|
|
2875
|
-
value: "tree",
|
|
2876
|
-
files: [
|
|
2877
|
-
{
|
|
2878
|
-
fileName: "Tree/Item.vue",
|
|
2879
|
-
dirPath: "app/components/Ui",
|
|
2880
|
-
fileContent:
|
|
2881
|
-
'<template>\n <TreeItem v-slot="slotProps" v-bind="forwarded">\n <slot v-bind="slotProps" />\n </TreeItem>\n</template>\n\n<script lang="ts" setup generic="T extends Record<string, any>">\n import { TreeItem, useForwardPropsEmits } from "radix-vue";\n import type { TreeItemEmits, TreeItemProps } from "radix-vue";\n\n const props = defineProps<TreeItemProps<T>>();\n const emit = defineEmits<TreeItemEmits<T>>();\n\n const forwarded = useForwardPropsEmits(props, emit);\n</script>\n',
|
|
2882
|
-
},
|
|
2883
|
-
{
|
|
2884
|
-
fileName: "Tree/Tree.vue",
|
|
2885
|
-
dirPath: "app/components/Ui",
|
|
2886
|
-
fileContent:
|
|
2887
|
-
'<template>\n <TreeRoot v-slot="slotProps" v-bind="forwarded">\n <slot v-bind="slotProps" />\n </TreeRoot>\n</template>\n\n<script lang="ts" setup>\n import { TreeRoot, useForwardPropsEmits } from "radix-vue";\n import type { TreeRootEmits, TreeRootProps } from "radix-vue";\n\n const props = defineProps<TreeRootProps>();\n const emit = defineEmits<TreeRootEmits>();\n\n const forwarded = useForwardPropsEmits(props, emit);\n</script>\n',
|
|
2888
|
-
},
|
|
2889
|
-
{
|
|
2890
|
-
fileName: "Tree/Virtualizer.vue",
|
|
2891
|
-
dirPath: "app/components/Ui",
|
|
2892
|
-
fileContent:
|
|
2893
|
-
'<template>\n <TreeVirtualizer v-slot="slotProps" v-bind="forwarded">\n <slot v-bind="slotProps" />\n </TreeVirtualizer>\n</template>\n\n<script lang="ts" setup>\n import { TreeVirtualizer, useForwardPropsEmits } from "radix-vue";\n import type { TreeVirtualizerProps } from "radix-vue";\n\n const props = defineProps<TreeVirtualizerProps>();\n const forwarded = useForwardPropsEmits(props);\n</script>\n',
|
|
2894
|
-
},
|
|
2895
|
-
],
|
|
2896
|
-
utils: [],
|
|
2897
|
-
composables: [],
|
|
2898
|
-
plugins: [],
|
|
2899
|
-
},
|
|
2900
|
-
{
|
|
2901
|
-
name: "Vee Checkbox",
|
|
2902
|
-
value: "vee-checkbox",
|
|
2903
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
2904
|
-
askValidator: true,
|
|
2905
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
2906
|
-
components: ["checkbox", "label"],
|
|
2907
|
-
files: [
|
|
2908
|
-
{
|
|
2909
|
-
fileName: "Vee/Checkbox.vue",
|
|
2910
|
-
dirPath: "app/components/Ui",
|
|
2911
|
-
fileContent:
|
|
2912
|
-
'<template>\n <div :class="styles({ class: props.class })">\n <UiCheckbox\n :id="inputId"\n v-bind="$attrs"\n :icon="icon"\n :value="value"\n :name="name"\n :required="required"\n :disabled="disabled"\n :checked="checked"\n @update:checked="handleChange"\n />\n <div class="flex flex-col gap-1.5">\n <slot name="label" :error-message="errorMessage" :checked="checked">\n <UiLabel\n v-if="label"\n :for="inputId"\n class="leading-none"\n :class="[errorMessage && \'text-destructive\']"\n >{{ label }}</UiLabel\n >\n </slot>\n <TransitionSlide tag="div" group>\n <slot name="hint" :error-message="errorMessage" :checked="checked">\n <p\n v-if="hint && !errorMessage"\n key="hint"\n class="text-sm leading-none text-muted-foreground"\n >\n {{ hint }}\n </p>\n </slot>\n <slot name="errorMessage" :error-message="errorMessage" :checked="checked">\n <p v-if="errorMessage" key="errorMessage" class="text-sm leading-none text-destructive">\n {{ errorMessage }}\n </p>\n </slot>\n </TransitionSlide>\n </div>\n </div>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n label?: string;\n icon?: string;\n hint?: string;\n modelValue?: any;\n name?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n type?: string;\n placeholder?: string;\n value?: any;\n required?: boolean;\n disabled?: boolean;\n class?: any;\n }>();\n const styles = tv({\n base: "flex gap-3",\n });\n\n const inputId = props.id || useId();\n\n const { errorMessage, checked, handleChange } = useField(\n () => props.name || inputId,\n props.rules,\n {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n type: "checkbox",\n checkedValue: props.value || true,\n syncVModel: true,\n }\n );\n</script>\n',
|
|
2913
|
-
},
|
|
2914
|
-
],
|
|
2915
|
-
utils: [],
|
|
2916
|
-
composables: [],
|
|
2917
|
-
plugins: [],
|
|
2918
|
-
},
|
|
2919
|
-
{
|
|
2920
|
-
name: "Vee CurrencyInput",
|
|
2921
|
-
value: "vee-currency-input",
|
|
2922
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
2923
|
-
askValidator: true,
|
|
2924
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
2925
|
-
components: ["currency-input", "label"],
|
|
2926
|
-
files: [
|
|
2927
|
-
{
|
|
2928
|
-
fileName: "Vee/CurrencyInput.vue",
|
|
2929
|
-
dirPath: "app/components/Ui",
|
|
2930
|
-
fileContent:
|
|
2931
|
-
'<template>\n <div class="w-full">\n <UiLabel\n v-if="label"\n :for="inputId"\n :hint="labelHint"\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\n ><span>{{ label }} <span v-if="required" class="text-destructive">*</span></span></UiLabel\n >\n <div class="relative">\n <slot name="icon">\n <span v-if="hasIcon" class="absolute inset-y-0 left-3 flex items-center justify-center">\n <Icon v-if="icon" :name="icon" class="h-4 w-4 text-muted-foreground/70" />\n </span>\n </slot>\n <UiCurrencyInput\n :id="inputId"\n v-model="value"\n type="text"\n :required="required"\n :name="name"\n :disabled="disabled"\n v-bind="$attrs"\n :class="[hasIcon && \'pl-9\']"\n :placeholder="placeholder"\n :options="options"\n />\n </div>\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n import type { CurrencyInputOptions } from "vue-currency-input";\n\n const props = defineProps<{\n label?: string;\n labelHint?: string;\n icon?: string;\n hint?: string;\n disabled?: boolean;\n modelValue?: string;\n name?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n type?: string;\n placeholder?: string;\n options?: CurrencyInputOptions;\n required?: boolean;\n }>();\n\n const inputId = useId();\n\n const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));\n\n const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n</script>\n',
|
|
2932
|
-
},
|
|
2933
|
-
],
|
|
2934
|
-
utils: [],
|
|
2935
|
-
composables: [],
|
|
2936
|
-
plugins: [],
|
|
2937
|
-
},
|
|
2938
|
-
{
|
|
2939
|
-
name: "Vee DateField",
|
|
2940
|
-
value: "vee-date-field",
|
|
2941
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions", "@internationalized/date"],
|
|
2942
|
-
askValidator: true,
|
|
2943
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
2944
|
-
components: ["date-field", "label"],
|
|
2945
|
-
files: [
|
|
2946
|
-
{
|
|
2947
|
-
fileName: "Vee/DateField.vue",
|
|
2948
|
-
dirPath: "app/components/Ui",
|
|
2949
|
-
fileContent:
|
|
2950
|
-
'<template>\n <div class="w-full">\n <UiLabel\n v-if="label"\n :for="inputId"\n :hint="labelHint"\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\n ><span>{{ label }} <span v-if="required" class="text-destructive">*</span></span></UiLabel\n >\n <UiDateField v-bind="{ ...$attrs, ...props }" v-model="value" />\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n import type { DateFieldRootProps } from "radix-vue";\n\n const props = defineProps<\n DateFieldRootProps & {\n label?: string;\n labelHint?: string;\n hint?: string;\n modelValue?: string;\n name?: string;\n\n rules?: any;\n validateOnMount?: boolean;\n separator?: string;\n separatorIcon?: string;\n }\n >();\n\n const inputId = props.id || useId();\n\n const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n</script>\n',
|
|
2951
|
-
},
|
|
2952
|
-
],
|
|
2953
|
-
utils: [],
|
|
2954
|
-
composables: [],
|
|
2955
|
-
plugins: [],
|
|
2956
|
-
},
|
|
2957
|
-
{
|
|
2958
|
-
name: "Vee Datepicker",
|
|
2959
|
-
value: "vee-datepicker",
|
|
2960
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
2961
|
-
askValidator: true,
|
|
2962
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
2963
|
-
components: ["datepicker", "label", "input"],
|
|
2964
|
-
files: [
|
|
2965
|
-
{
|
|
2966
|
-
fileName: "Vee/Datepicker.vue",
|
|
2967
|
-
dirPath: "app/components/Ui",
|
|
2968
|
-
fileContent:
|
|
2969
|
-
'<template>\n <div class="w-full">\n <UiLabel\n v-if="label"\n :for="inputId"\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\n ><span>{{ label }} <span v-if="required" class="text-destructive">*</span></span></UiLabel\n >\n <div class="relative">\n <slot name="icon">\n <span v-if="hasIcon" class="absolute inset-y-0 left-3 flex items-center justify-center">\n <Icon v-if="icon" :name="icon" class="h-4 w-4 text-muted-foreground/70" />\n </span>\n </slot>\n <UiDatepicker v-bind="datePickerProps" v-model="value">\n <template #header-title="{ title }">\n <div class="inline-flex items-center gap-1">\n {{ title }} <Icon name="lucide:chevron-down" class="h-4 w-4" />\n </div>\n </template>\n <template #default="{ inputValue, inputEvents }">\n <UiInput\n :id="inputId"\n :readonly="readonly"\n :required="required"\n :model-value="inputValue"\n :name="name"\n :disabled="disabled"\n v-bind="$attrs"\n :class="[hasIcon && \'pl-9\']"\n :placeholder="placeholder"\n v-on="inputEvents"\n />\n </template>\n </UiDatepicker>\n </div>\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n const props = withDefaults(\n defineProps<{\n label?: string;\n icon?: string;\n hint?: string;\n disabled?: boolean;\n modelValue?: any;\n name?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n placeholder?: string;\n readonly?: boolean;\n datePickerProps?: any;\n required?: boolean;\n }>(),\n {\n icon: "lucide:calendar-days",\n }\n );\n\n const inputId = props.id || useId();\n\n const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));\n\n const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n</script>\n',
|
|
2970
|
-
},
|
|
2971
|
-
],
|
|
2972
|
-
utils: [],
|
|
2973
|
-
composables: [],
|
|
2974
|
-
plugins: [],
|
|
2975
|
-
},
|
|
2976
|
-
{
|
|
2977
|
-
name: "Vee FileInput",
|
|
2978
|
-
value: "vee-file-input",
|
|
2979
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
2980
|
-
askValidator: true,
|
|
2981
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
2982
|
-
components: ["input", "label"],
|
|
2983
|
-
files: [
|
|
2984
|
-
{
|
|
2985
|
-
fileName: "Vee/FileInput.vue",
|
|
2986
|
-
dirPath: "app/components/Ui",
|
|
2987
|
-
fileContent:
|
|
2988
|
-
'<template>\n <div class="w-full">\n <UiLabel v-if="label" :for="inputId" :class="[errorMessage && \'text-destructive\', \'mb-2\']">\n <span>{{ label }} <span v-if="required" class="text-destructive">*</span></span>\n </UiLabel>\n <div class="relative">\n <slot name="icon">\n <span v-if="hasIcon" class="absolute inset-y-0 left-3 flex items-center justify-center">\n <Icon v-if="icon" :name="icon" class="h-4 w-4 text-muted-foreground/70" />\n </span>\n </slot>\n <UiInput\n :id="inputId"\n type="file"\n :required="required"\n :name="name"\n v-bind="$attrs"\n :multiple="multiple"\n :class="[hasIcon && \'pl-9\']"\n :accept="accept"\n @change="\n handleChange($event);\n emits(\'change\', $event.target.files);\n "\n @blur="\n handleBlur($event);\n emits(\'blur\', $event);\n "\n />\n </div>\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n label?: string;\n icon?: string;\n hint?: string;\n name: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n multiple?: boolean;\n accept?: string;\n required?: boolean;\n }>();\n\n const emits = defineEmits<{\n change: [files?: FileList | File | File[] | null];\n blur: [event?: FocusEvent];\n }>();\n\n const inputId = props.id || useId();\n\n const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));\n\n const { errorMessage, handleChange, handleBlur } = useField(() => props.name, props.rules, {\n label: props.label,\n validateOnMount: props.validateOnMount,\n });\n</script>\n',
|
|
2989
|
-
},
|
|
2990
|
-
],
|
|
2991
|
-
utils: [],
|
|
2992
|
-
composables: [],
|
|
2993
|
-
plugins: [],
|
|
2994
|
-
},
|
|
2995
|
-
{
|
|
2996
|
-
name: "Vee Form Builder",
|
|
2997
|
-
value: "vee-form-builder",
|
|
2998
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
2999
|
-
askValidator: true,
|
|
3000
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
3001
|
-
components: [
|
|
3002
|
-
"label",
|
|
3003
|
-
"vee-checkbox",
|
|
3004
|
-
"Vee-input",
|
|
3005
|
-
"divider",
|
|
3006
|
-
"vee-currency-input",
|
|
3007
|
-
"vee-date-field",
|
|
3008
|
-
"vee-textarea",
|
|
3009
|
-
"vee-file-input",
|
|
3010
|
-
"vee-multi-select",
|
|
3011
|
-
"vee-select",
|
|
3012
|
-
"vee-pin-input",
|
|
3013
|
-
"vee-tags-input",
|
|
3014
|
-
"vee-radio-group",
|
|
3015
|
-
"vee-vue-form-slider",
|
|
3016
|
-
"vee-native-checkbox",
|
|
3017
|
-
],
|
|
3018
|
-
files: [
|
|
3019
|
-
{
|
|
3020
|
-
fileName: "FormBuilder/FormBuilder.vue",
|
|
3021
|
-
dirPath: "app/components/Ui",
|
|
3022
|
-
fileContent:
|
|
3023
|
-
'<template>\n <div>\n <template v-for="(field, index) in fields" :key="index">\n <template v-if="field.variant === \'Checkbox\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeCheckbox v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'Input\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeInput v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'Divider\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiDivider v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'CurrencyInput\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeCurrencyInput v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'DateField\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeDateField v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'Textarea\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeTextarea v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'FileInput\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeFileInput :name="field.name" v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'MultiSelect\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeMultiSelect v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'Select\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeSelect v-bind="removeFields(field)">\n <template v-for="(option, optIndex) in field.options" :key="optIndex">\n <option v-bind="option">{{ option.label }}</option>\n </template>\n </UiVeeSelect>\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'RadioGroup\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeRadioGroup :name="field.name" v-bind="removeFields(field)">\n <template v-for="(option, optIndex) in field.options" :key="optIndex">\n <div class="mb-2 flex items-center gap-3">\n <UiRadioGroupItem :id="option.value" :value="option.value" />\n <UiLabel :for="option.value">{{ option.label }}</UiLabel>\n </div>\n </template>\n </UiVeeRadioGroup>\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'PinInput\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeePinInput v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'TagsInput\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeTagsInput v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'VueformSlider\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeVueFormSlider v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n <template v-if="field.variant === \'NativeCheckbox\'">\n <slot\n v-if="field.renderIf ? field.renderIf() : true"\n :name="field.slot ? field.slot : field.name"\n v-bind="field"\n >\n <div :class="field.wrapperClass">\n <UiVeeNativeCheckbox v-bind="removeFields(field)" />\n </div>\n </slot>\n </template>\n </template>\n </div>\n</template>\n\n<script lang="ts">\n export type FormBuilder = {\n description?: string;\n hint?: string;\n disabled?: boolean;\n label?: string;\n name: string;\n placeholder?: string;\n required?: boolean;\n type?: string;\n value?: any;\n rules?: any;\n class?: any;\n slot?: string;\n wrapperClass?: any;\n renderIf?: () => boolean;\n options?: any[];\n variant:\n | "Checkbox"\n | "NativeCheckbox"\n | "Input"\n | "Divider"\n | "CurrencyInput"\n | "DateField"\n | "FileInput"\n | "Select"\n | "Textarea"\n | "MultiSelect"\n | "PinInput"\n | "TagsInput"\n | "RadioGroup"\n | "VueformSlider";\n [key: string]: any;\n };\n export type FormBuilderProps = {\n fields: FormBuilder[];\n };\n</script>\n<script lang="ts" setup>\n defineProps<FormBuilderProps>();\n\n const omit = (obj: FormBuilder, keys: Array<keyof FormBuilder>) =>\n Object.fromEntries(\n Object.entries(obj).filter(([key]) => !keys.includes(key as keyof FormBuilder))\n );\n\n const removeFields = (field: FormBuilder) => {\n return omit(field, ["wrapperClass", "renderIf", "variant", "slot"]);\n };\n</script>\n',
|
|
3024
|
-
},
|
|
3025
|
-
],
|
|
3026
|
-
utils: [],
|
|
3027
|
-
composables: [],
|
|
3028
|
-
plugins: [],
|
|
3029
|
-
},
|
|
3030
|
-
{
|
|
3031
|
-
name: "Vee Input",
|
|
3032
|
-
value: "vee-input",
|
|
3033
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
3034
|
-
askValidator: true,
|
|
3035
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
3036
|
-
components: ["input", "label"],
|
|
3037
|
-
files: [
|
|
3038
|
-
{
|
|
3039
|
-
fileName: "Vee/Input.vue",
|
|
3040
|
-
dirPath: "app/components/Ui",
|
|
3041
|
-
fileContent:
|
|
3042
|
-
'<template>\n <div class="w-full">\n <UiLabel\n v-if="label"\n :for="inputId"\n :hint="labelHint"\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\n ><span>{{ label }} <span v-if="required" class="text-destructive">*</span></span></UiLabel\n >\n <div class="relative">\n <slot name="icon">\n <span v-if="hasIcon" class="absolute inset-y-0 left-3 flex items-center justify-center">\n <Icon v-if="icon" :name="icon" class="h-4 w-4 text-muted-foreground/70" />\n </span>\n </slot>\n <slot name="trailingIcon">\n <span\n v-if="hasTrailingIcon"\n class="absolute inset-y-0 right-3 flex items-center justify-center"\n >\n <Icon v-if="trailingIcon" :name="trailingIcon" class="h-4 w-4 text-muted-foreground/70" />\n </span>\n </slot>\n <UiInput\n :id="inputId"\n v-model="value"\n :type="type"\n :required="required"\n :name="name"\n :disabled="disabled"\n v-bind="$attrs"\n :class="[hasIcon && \'pl-9\', hasTrailingIcon && \'pr-9\']"\n :placeholder="placeholder"\n @blur="handleBlur"\n />\n </div>\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n label?: string;\n labelHint?: string;\n icon?: string;\n trailingIcon?: string;\n hint?: string;\n disabled?: boolean;\n modelValue?: string;\n name?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n type?: string;\n placeholder?: string;\n required?: boolean;\n }>();\n\n defineOptions({ inheritAttrs: false });\n\n const inputId = props.id || useId();\n\n const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));\n const hasTrailingIcon = computed(\n () => Boolean(props.trailingIcon) || Boolean(useSlots().trailingIcon)\n );\n\n const { errorMessage, value, handleBlur } = useField(() => props.name || inputId, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n</script>\n',
|
|
3043
|
-
},
|
|
3044
|
-
],
|
|
3045
|
-
utils: [],
|
|
3046
|
-
composables: [],
|
|
3047
|
-
plugins: [],
|
|
3048
|
-
},
|
|
3049
|
-
{
|
|
3050
|
-
name: "Vee MultiSelect",
|
|
3051
|
-
value: "vee-multi-select",
|
|
3052
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions", "@vueform/multiselect"],
|
|
3053
|
-
askValidator: true,
|
|
3054
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
3055
|
-
components: ["label"],
|
|
3056
|
-
files: [
|
|
3057
|
-
{
|
|
3058
|
-
fileName: "Vee/MultiSelect.vue",
|
|
3059
|
-
dirPath: "app/components/Ui",
|
|
3060
|
-
fileContent:
|
|
3061
|
-
'<template>\n <div class="w-full">\n <UiLabel\n v-if="formLabel"\n :for="inputId"\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\n ><span>{{ formLabel }} <span v-if="required" class="text-destructive">*</span></span></UiLabel\n >\n <Multiselect\n v-bind="$attrs"\n :id="inputId"\n ref="multiselect"\n v-model="value"\n :attrs="{\n id: inputId,\n }"\n :disabled="disabled"\n :name="name"\n :required="required"\n :classes="{\n containerActive: \'ring-2 ring-ring ring-offset-2 ring-offset-background transition\',\n }"\n >\n <template v-for="(_, slotName) in $slots" #[slotName]="scope">\n <slot :name="slotName" v-bind="scope" />\n </template>\n <template #clear="{ clear }">\n <button class="mr-2 flex items-center justify-center" @click="clear">\n <Icon name="heroicons:x-mark" size="16" class="text-muted-foreground" />\n </button>\n </template>\n </Multiselect>\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script setup lang="ts">\n import Multiselect from "@vueform/multiselect";\n\n import "@vueform/multiselect/themes/default.css";\n\n const multiselect = shallowRef<InstanceType<typeof Multiselect> | null>(null);\n\n interface Props\n extends /* @vue-ignore */ Partial<Omit<InstanceType<typeof Multiselect>, "$emit">> {}\n\n const props = defineProps<\n {\n modelValue?: any;\n formLabel?: string;\n required?: boolean;\n id?: string;\n hint?: string;\n disabled?: boolean;\n rules?: any;\n validateOnMount?: boolean;\n name?: string;\n } & Props\n >();\n\n const emit = defineEmits([\n "paste",\n "open",\n "close",\n "select",\n "deselect",\n "input",\n "search-change",\n "tag",\n "option",\n "update:modelValue",\n "change",\n "clear",\n "keydown",\n "keyup",\n "max",\n "create",\n "ready",\n ]);\n\n const inputId = props.id || useId();\n\n const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n\n onMounted(() => {\n nextTick(() => {\n emit("ready", multiselect.value);\n });\n });\n</script>\n\n<style>\n :root {\n --ms-font-size: theme("fontSize.sm");\n --ms-line-height: 1.5;\n --ms-bg: theme("colors.background");\n --ms-bg-disabled: transparent;\n --ms-border-color: theme("colors.input");\n --ms-border-width: 1px;\n --ms-border-color-active: theme("colors.input");\n --ms-border-width-active: 1px;\n --ms-radius: theme("borderRadius.md");\n --ms-py: theme("padding.2");\n --ms-px: theme("padding.3");\n --ms-ring-width: 0px;\n --ms-ring-color: theme("colors.ring");\n --ms-placeholder-color: theme("colors.muted.foreground");\n --ms-max-height: theme("height.52");\n\n --ms-spinner-color: theme("colors.muted.foreground");\n --ms-caret-color: theme("colors.muted.foreground");\n --ms-clear-color: theme("colors.muted.foreground");\n --ms-clear-color-hover: theme("colors.primary.DEFAULT");\n\n --ms-tag-font-size: theme("fontSize.sm");\n --ms-tag-line-height: 1.25rem;\n --ms-tag-font-weight: 500;\n --ms-tag-bg: theme("colors.primary.DEFAULT");\n --ms-tag-bg-disabled: transparent;\n --ms-tag-color: theme("colors.primary.foreground");\n --ms-tag-color-disabled: theme("colors.muted.foreground");\n --ms-tag-radius: theme("borderRadius.DEFAULT");\n --ms-tag-py: theme("padding[0.5]");\n\n --ms-dropdown-bg: theme("colors.background");\n --ms-dropdown-border-color: theme("colors.border");\n --ms-dropdown-border-width: 1px;\n --ms-dropdown-radius: theme("borderRadius.md");\n\n --ms-group-label-bg: theme("colors.muted.DEFAULT");\n --ms-group-label-color: theme("colors.muted.foreground");\n --ms-group-label-bg-pointed: theme("colors.primary.DEFAULT");\n --ms-group-label-color-pointed: theme("colors.primary.foreground");\n --ms-group-label-bg-disabled: theme("colors.muted.DEFAULT / 50%");\n --ms-group-label-color-disabled: theme("colors.muted.foreground / 50%");\n --ms-group-label-bg-selected: theme("colors.primary.DEFAULT");\n --ms-group-label-color-selected: theme("colors.primary.foreground");\n --ms-group-label-bg-selected-pointed: theme("colors.primary.DEFAULT");\n --ms-group-label-color-selected-pointed: theme("colors.primary.foreground");\n --ms-group-label-bg-selected-disabled: theme("colors.muted.DEFAULT / 50%");\n --ms-group-label-color-selected-disabled: theme("colors.muted.foreground / 50%");\n\n --ms-option-font-size: theme("fontSize.sm");\n --ms-option-bg-pointed: theme("colors.primary.DEFAULT");\n --ms-option-color-pointed: theme("colors.primary.foreground");\n --ms-option-bg-selected: theme("colors.primary.DEFAULT");\n --ms-option-color-selected: theme("colors.primary.foreground");\n --ms-option-bg-disabled: transparent;\n --ms-option-color-disabled: theme("colors.muted.foreground / 50%");\n --ms-option-bg-selected-pointed: theme("colors.primary.DEFAULT");\n --ms-option-color-selected-pointed: theme("colors.primary.foreground");\n --ms-option-bg-selected-disabled: theme("colors.muted.DEFAULT");\n --ms-option-color-selected-disabled: theme("colors.muted.foreground");\n\n --ms-empty-color: theme("colors.muted.foreground");\n }\n</style>\n',
|
|
3062
|
-
},
|
|
3063
|
-
],
|
|
3064
|
-
utils: [],
|
|
3065
|
-
composables: [],
|
|
3066
|
-
plugins: [],
|
|
3067
|
-
},
|
|
3068
|
-
{
|
|
3069
|
-
name: "Vee Checkbox - Native",
|
|
3070
|
-
value: "vee-native-checkbox",
|
|
3071
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
3072
|
-
askValidator: true,
|
|
3073
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
3074
|
-
components: ["label"],
|
|
3075
|
-
files: [
|
|
3076
|
-
{
|
|
3077
|
-
fileName: "Vee/NativeCheckbox.vue",
|
|
3078
|
-
dirPath: "app/components/Ui",
|
|
3079
|
-
fileContent:
|
|
3080
|
-
'<template>\n <div>\n <div :class="nativeCheckboxStyles().wrapper({ class: props.wrapperClass })">\n <!-- eslint-disable-next-line vue/html-self-closing -->\n <input\n :id="inputId"\n :checked="checked"\n type="checkbox"\n :data-indeterminate="indeterminate"\n :data-checked="checked"\n :data-disabled="disabled"\n :data-required="required"\n :class="\n nativeCheckboxStyles().checkbox({\n error: !!errorMessage,\n disabled,\n size,\n color,\n class: props.class,\n })\n "\n v-bind="{ ...forwarded, ...$attrs }"\n @change="handleChange"\n @input="handleChange"\n />\n <label\n v-if="hasLabel || hasDescription || errorMessage"\n :for="inputId"\n class="flex flex-col gap-1 text-sm leading-none"\n >\n <slot name="label">\n <span\n v-if="label"\n :class="nativeCheckboxStyles().label({ disabled, class: props.labelClass })"\n >{{ label }}</span\n >\n </slot>\n <slot name="description">\n <span\n v-if="description"\n :class="nativeCheckboxStyles().description({ disabled, class: props.descriptionClass })"\n >{{ description }}</span\n >\n </slot>\n <TransitionSlide tag="template">\n <p v-if="errorMessage" :class="nativeCheckboxStyles().error({ disabled })">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </label>\n </div>\n </div>\n</template>\n\n<script lang="ts">\n import { reactiveOmit } from "@vueuse/core";\n import type { VariantProps } from "tailwind-variants";\n\n export const nativeCheckboxStyles = tv({\n slots: {\n checkbox:\n "peer form-checkbox shrink-0 cursor-pointer rounded-sm border border-primary bg-background outline-none ring-offset-background transition duration-200 focus:ring-offset-background",\n label: "cursor-pointer font-medium",\n description: "text-pretty text-muted-foreground",\n wrapper: "flex items-start gap-3",\n error: "text-destructive",\n },\n variants: {\n size: { sm: { checkbox: "size-4" }, md: { checkbox: "size-[18px]" } },\n color: {\n red: { checkbox: "border-red-500 text-red-500 focus:ring-red-500" },\n orange: { checkbox: "border-orange-500 text-orange-500 focus:ring-orange-500" },\n amber: { checkbox: "border-amber-500 text-amber-500 focus:ring-amber-500" },\n yellow: { checkbox: "border-yellow-500 text-yellow-500 focus:ring-yellow-500" },\n lime: { checkbox: "border-lime-500 text-lime-500 focus:ring-lime-500" },\n green: { checkbox: "border-green-500 text-green-500 focus:ring-green-500" },\n emerald: { checkbox: "border-emerald-500 text-emerald-500 focus:ring-emerald-500" },\n teal: { checkbox: "border-teal-500 text-teal-500 focus:ring-teal-500" },\n cyan: { checkbox: "border-cyan-500 text-cyan-500 focus:ring-cyan-500" },\n sky: { checkbox: "border-sky-500 text-sky-500 focus:ring-sky-500" },\n blue: { checkbox: "border-blue-500 text-blue-500 focus:ring-blue-500" },\n indigo: { checkbox: "border-indigo-500 text-indigo-500 focus:ring-indigo-500" },\n violet: { checkbox: "border-violet-500 text-violet-500 focus:ring-violet-500" },\n purple: { checkbox: "border-purple-500 text-purple-500 focus:ring-purple-500" },\n fuchsia: { checkbox: "border-fuchsia-500 text-fuchsia-500 focus:ring-fuchsia-500" },\n pink: { checkbox: "border-pink-500 text-pink-500 focus:ring-pink-500" },\n rose: { checkbox: "border-rose-500 text-rose-500 focus:ring-rose-500" },\n slate: { checkbox: "border-slate-600 text-slate-600 focus:ring-slate-600" },\n gray: { checkbox: "border-gray-600 text-gray-600 focus:ring-gray-600" },\n zinc: { checkbox: "border-zinc-600 text-zinc-600 focus:ring-zinc-600" },\n neutral: { checkbox: "border-neutral-600 text-neutral-600 focus:ring-neutral-600" },\n stone: { checkbox: "border-stone-600 text-stone-600 focus:ring-stone-600" },\n },\n error: {\n true: { checkbox: "border-destructive text-destructive focus:ring-destructive" },\n },\n disabled: {\n true: {\n checkbox: "pointer-events-none opacity-50",\n label: "cursor-not-allowed opacity-50",\n description: "cursor-not-allowed opacity-50",\n error: "cursor-not-allowed opacity-70",\n },\n },\n },\n defaultVariants: {\n color: "blue",\n size: "md",\n },\n });\n\n export type NativeCheckboxProps = {\n /** Custom class(es) to add to the element */\n class?: any;\n /** Custom class(es) to add to the label element */\n labelClass?: any;\n /** Custom class(es) to add to the description element */\n descriptionClass?: any;\n /** Custom class(es) to add to the wrapper element */\n wrapperClass?: any;\n /** The id of the checkbox input element */\n id?: string;\n /** The v-model binding for the checkbox */\n modelValue?: any;\n /** The name of the checkbox input element */\n name?: string;\n /** The value of the checkbox input element */\n value?: any;\n /** Whether the checkbox is disabled */\n disabled?: boolean;\n /** Whether the checkbox is required */\n required?: boolean;\n /** Whether the checkbox is indeterminate */\n indeterminate?: boolean;\n /**\n * The color variant of the checkbox\n *\n * @default blue\n */\n color?: VariantProps<typeof nativeCheckboxStyles>["color"];\n /**\n * The size variant of the checkbox\n *\n * @default md\n */\n size?: VariantProps<typeof nativeCheckboxStyles>["size"];\n /** The label for the checkbox */\n label?: string;\n /** The description for the checkbox */\n description?: string;\n /** The validation rules for the checkbox */\n rules?: any;\n /** Whether to validate the checkbox on mount */\n validateOnMount?: boolean;\n /** The value to use when the checkbox is unchecked */\n unCheckedValue?: any;\n };\n</script>\n\n<script lang="ts" setup>\n defineOptions({ inheritAttrs: false });\n const props = withDefaults(defineProps<NativeCheckboxProps>(), {});\n const inputId = props.id || `checkbox-${useId()}`;\n\n const forwarded = reactiveOmit(\n props,\n "class",\n "id",\n "modelValue",\n "label",\n "description",\n "color",\n "size",\n "labelClass",\n "descriptionClass",\n "wrapperClass",\n "rules",\n "validateOnMount",\n "unCheckedValue"\n );\n const slots = useSlots();\n const hasLabel = computed(() => !!slots.label || !!props.label);\n const hasDescription = computed(() => !!slots.description || !!props.description);\n\n const { errorMessage, checked, handleChange } = useField(\n () => props.name || inputId,\n props.rules,\n {\n initialValue: props.modelValue,\n syncVModel: true,\n label: props.label,\n validateOnMount: props.validateOnMount,\n type: "checkbox",\n checkedValue: props.value || true,\n uncheckedValue: props.unCheckedValue || false,\n }\n );\n</script>\n',
|
|
3081
|
-
},
|
|
3082
|
-
],
|
|
3083
|
-
utils: [],
|
|
3084
|
-
composables: [],
|
|
3085
|
-
plugins: [],
|
|
3086
|
-
},
|
|
3087
|
-
{
|
|
3088
|
-
name: "Vee NumberField",
|
|
3089
|
-
value: "vee-number-field",
|
|
3090
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions", "@internationalized/number"],
|
|
3091
|
-
askValidator: true,
|
|
3092
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
3093
|
-
components: ["label", "number-field"],
|
|
3094
|
-
files: [
|
|
3095
|
-
{
|
|
3096
|
-
fileName: "Vee/NumberField.vue",
|
|
3097
|
-
dirPath: "app/components/Ui",
|
|
3098
|
-
fileContent:
|
|
3099
|
-
'<template>\n <div class="w-full">\n <UiLabel\n v-if="label"\n :for="inputId"\n :hint="labelHint"\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\n ><span>{{ label }} <span v-if="required" class="text-destructive">*</span></span></UiLabel\n >\n <div class="relative">\n <UiNumberField\n v-bind="($attrs, props)"\n :id="inputId"\n v-model="value"\n :disabled="disabled"\n :required="required"\n :name="name"\n >\n <template v-for="(_, slotName) in $slots" #[slotName]="scope">\n <slot :name="slotName" v-bind="scope" />\n </template>\n </UiNumberField>\n </div>\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n import type { NumberFieldRootProps } from "radix-vue";\n\n interface Props extends NumberFieldRootProps {\n label?: string;\n labelHint?: string;\n hint?: string;\n disabled?: boolean;\n name?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n required?: boolean;\n }\n const props = defineProps<Props>();\n\n const inputId = computed(() => props.id || useId());\n\n const { errorMessage, value } = useField(() => props.name || inputId.value, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n</script>\n',
|
|
3100
|
-
},
|
|
3101
|
-
],
|
|
3102
|
-
utils: [],
|
|
3103
|
-
composables: [],
|
|
3104
|
-
plugins: [],
|
|
3105
|
-
},
|
|
3106
|
-
{
|
|
3107
|
-
name: "Vee Pin-Input",
|
|
3108
|
-
value: "vee-pin-input",
|
|
3109
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
3110
|
-
askValidator: true,
|
|
3111
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
3112
|
-
components: ["label", "pin-input"],
|
|
3113
|
-
files: [
|
|
3114
|
-
{
|
|
3115
|
-
fileName: "Vee/PinInput.vue",
|
|
3116
|
-
dirPath: "app/components/Ui",
|
|
3117
|
-
fileContent:
|
|
3118
|
-
'<template>\n <div class="w-full">\n <UiLabel\n v-if="label"\n :for="inputId"\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\n ><span>{{ label }} <span v-if="required" class="text-destructive">*</span></span></UiLabel\n >\n <div class="relative">\n <UiPinInput\n :id="inputId"\n v-bind="{ ...$attrs, ...forwarded }"\n v-model="value"\n @complete="emits(\'complete\', $event)"\n />\n </div>\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n import type { PinInputRootProps } from "radix-vue";\n\n const props = defineProps<\n Omit<PinInputRootProps, "as" | "asChild"> & {\n label?: string;\n hint?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n separator?: string;\n inputCount?: number;\n }\n >();\n\n const emits = defineEmits<{\n complete: [value: string[]];\n "update:modelValue": [value: string[]];\n }>();\n\n const forwarded = reactiveOmit(\n props,\n "label",\n "hint",\n "id",\n "rules",\n "validateOnMount",\n "modelValue"\n );\n const inputId = props.id || useId();\n\n const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {\n initialValue: props.modelValue || [],\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n</script>\n',
|
|
3119
|
-
},
|
|
3120
|
-
],
|
|
3121
|
-
utils: [],
|
|
3122
|
-
composables: [],
|
|
3123
|
-
plugins: [],
|
|
3124
|
-
},
|
|
3125
|
-
{
|
|
3126
|
-
name: "Vee RadioGroup",
|
|
3127
|
-
value: "vee-radio-group",
|
|
3128
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
3129
|
-
askValidator: true,
|
|
3130
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
3131
|
-
components: ["radio-group", "label"],
|
|
3132
|
-
files: [
|
|
3133
|
-
{
|
|
3134
|
-
fileName: "Vee/RadioGroup.vue",
|
|
3135
|
-
dirPath: "app/components/Ui",
|
|
3136
|
-
fileContent:
|
|
3137
|
-
'<template>\n <div :class="styles({ class: props.class })">\n <slot name="label" :error-message="errorMessage" :value="value">\n <UiLabel v-if="label" class="mb-5 leading-none" :class="[errorMessage && \'text-destructive\']"\n ><span>{{ label }} <span v-if="required" class="text-destructive">*</span></span></UiLabel\n >\n </slot>\n <UiRadioGroup v-bind="{ ...forwarded, ...$attrs }" v-model="value">\n <slot />\n </UiRadioGroup>\n <div class="flex flex-col gap-1.5">\n <TransitionSlide tag="div" group>\n <slot name="hint" :error-message="errorMessage" :value="value">\n <p\n v-if="hint && !errorMessage"\n key="hint"\n class="mt-1.5 text-sm leading-none text-muted-foreground"\n >\n {{ hint }}\n </p>\n </slot>\n <slot name="errorMessage" :error-message="errorMessage" :value="value">\n <p\n v-if="errorMessage"\n key="errorMessage"\n class="mt-1.5 text-sm leading-none text-destructive"\n >\n {{ errorMessage }}\n </p>\n </slot>\n </TransitionSlide>\n </div>\n </div>\n</template>\n\n<script lang="ts" setup>\n import { useForwardProps } from "radix-vue";\n import type { RadioGroupRootProps } from "radix-vue";\n\n const props = defineProps<\n RadioGroupRootProps & {\n label?: string;\n hint?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n class?: any;\n name: string;\n }\n >();\n\n const forwarded = useForwardProps(props);\n const styles = tv({\n base: "flex flex-col",\n });\n\n defineOptions({ inheritAttrs: false });\n\n const { errorMessage, value } = useField(() => props.name, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n type: "radio",\n syncVModel: true,\n });\n</script>\n',
|
|
3138
|
-
},
|
|
3139
|
-
],
|
|
3140
|
-
utils: [],
|
|
3141
|
-
composables: [],
|
|
3142
|
-
plugins: [],
|
|
3143
|
-
},
|
|
3144
|
-
{
|
|
3145
|
-
name: "Vee Select",
|
|
3146
|
-
value: "vee-select",
|
|
3147
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
3148
|
-
askValidator: true,
|
|
3149
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
3150
|
-
components: ["native-select", "label"],
|
|
3151
|
-
files: [
|
|
3152
|
-
{
|
|
3153
|
-
fileName: "Vee/Select.vue",
|
|
3154
|
-
dirPath: "app/components/Ui",
|
|
3155
|
-
fileContent:
|
|
3156
|
-
'<template>\n <div class="w-full">\n <UiLabel v-if="label" :for="inputId" :class="[errorMessage && \'text-destructive\', \'mb-2\']">\n <span>{{ label }} <span v-if="required" class="text-destructive">*</span></span>\n </UiLabel>\n <div class="relative">\n <slot name="icon">\n <span v-if="hasIcon" lass="absolute inset-y-0 left-3 flex items-center justify-center">\n <Icon v-if="icon" :name="icon" class="h-4 w-4 text-muted-foreground" />\n </span>\n </slot>\n <UiNativeSelect\n :id="inputId"\n v-model="value"\n :required="required"\n :trailing-icon="trailingIcon"\n :name="name"\n v-bind="$attrs"\n :class="[hasIcon && \'pl-9\']"\n @blur="handleBlur"\n >\n <slot />\n </UiNativeSelect>\n </div>\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n label?: string;\n icon?: string;\n hint?: string;\n modelValue?: string;\n name?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n type?: string;\n trailingIcon?: string;\n required?: boolean;\n }>();\n\n const inputId = props.id || useId();\n\n const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));\n\n const { errorMessage, value, handleBlur } = useField(() => props.name || inputId, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n</script>\n',
|
|
3157
|
-
},
|
|
3158
|
-
],
|
|
3159
|
-
utils: [],
|
|
3160
|
-
composables: [],
|
|
3161
|
-
plugins: [],
|
|
3162
|
-
},
|
|
3163
|
-
{
|
|
3164
|
-
name: "Vee Tags-Input",
|
|
3165
|
-
value: "vee-tags-input",
|
|
3166
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
3167
|
-
askValidator: true,
|
|
3168
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
3169
|
-
components: ["tags-input", "label"],
|
|
3170
|
-
files: [
|
|
3171
|
-
{
|
|
3172
|
-
fileName: "Vee/TagsInput.vue",
|
|
3173
|
-
dirPath: "app/components/Ui",
|
|
3174
|
-
fileContent:
|
|
3175
|
-
'<template>\n <div class="w-full">\n <UiLabel\n v-if="label"\n :for="inputId"\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\n ><span>{{ label }} <span v-if="required" class="text-destructive">*</span></span></UiLabel\n >\n <div class="relative">\n <slot name="icon">\n <span v-if="hasIcon" class="absolute inset-y-0 left-3 flex items-center justify-center">\n <Icon v-if="icon" :name="icon" class="h-4 w-4 text-muted-foreground/70" />\n </span>\n </slot>\n <UiTagsInput\n v-model="value"\n :required="required"\n :name="name"\n :disabled="disabled"\n v-bind="$attrs"\n :class="[hasIcon && \'pl-9\']"\n >\n <UiTagsInputItem v-for="tag in value" :key="tag" :value="tag" />\n <UiTagsInputField :id="inputId" :placeholder="placeholder" />\n </UiTagsInput>\n </div>\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n label?: string;\n icon?: string;\n hint?: string;\n disabled?: boolean;\n modelValue?: string[];\n name?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n type?: string;\n placeholder?: string;\n required?: boolean;\n }>();\n\n const inputId = props.id || useId();\n\n const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));\n\n const { errorMessage, value } = useField(() => props.name || inputId, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n</script>\n',
|
|
3176
|
-
},
|
|
3177
|
-
],
|
|
3178
|
-
utils: [],
|
|
3179
|
-
composables: [],
|
|
3180
|
-
plugins: [],
|
|
3181
|
-
},
|
|
3182
|
-
{
|
|
3183
|
-
name: "Vee Textarea",
|
|
3184
|
-
value: "vee-textarea",
|
|
3185
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions"],
|
|
3186
|
-
askValidator: true,
|
|
3187
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
3188
|
-
components: ["textarea", "label"],
|
|
3189
|
-
files: [
|
|
3190
|
-
{
|
|
3191
|
-
fileName: "Vee/Textarea.vue",
|
|
3192
|
-
dirPath: "app/components/Ui",
|
|
3193
|
-
fileContent:
|
|
3194
|
-
'<template>\n <div class="w-full">\n <UiLabel v-if="label" :for="inputId" :class="[errorMessage && \'text-destructive\', \'mb-2\']">\n <span>{{ label }} <span v-if="required" class="text-destructive">*</span></span>\n </UiLabel>\n <div class="relative">\n <slot name="icon">\n <span v-if="hasIcon" class="absolute left-3 top-3 flex items-center justify-center">\n <Icon v-if="icon" :name="icon" class="h-4 w-4 text-muted-foreground/70" />\n </span>\n </slot>\n <UiTextarea\n :id="inputId"\n v-model="value"\n :required="required"\n :rows="rows"\n :name="name"\n v-bind="$attrs"\n :class="[hasIcon && \'pl-9\']"\n :placeholder="placeholder"\n @blur="handleBlur"\n />\n </div>\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n label?: string;\n icon?: string;\n hint?: string;\n modelValue?: string;\n name?: string;\n id?: string;\n rules?: any;\n validateOnMount?: boolean;\n placeholder?: string;\n rows?: number;\n required?: boolean;\n }>();\n\n const inputId = props.id || useId();\n\n const hasIcon = computed(() => Boolean(props.icon) || Boolean(useSlots().icon));\n\n const { errorMessage, value, handleBlur } = useField(() => props.name || inputId, props.rules, {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n });\n</script>\n',
|
|
3195
|
-
},
|
|
3196
|
-
],
|
|
3197
|
-
utils: [],
|
|
3198
|
-
composables: [],
|
|
3199
|
-
plugins: [],
|
|
3200
|
-
},
|
|
3201
|
-
{
|
|
3202
|
-
name: "Vee VueFormSlider",
|
|
3203
|
-
value: "vee-vue-form-slider",
|
|
3204
|
-
deps: ["@vee-validate/nuxt", "@morev/vue-transitions", "@vueform/slider"],
|
|
3205
|
-
askValidator: true,
|
|
3206
|
-
nuxtModules: ["@vee-validate/nuxt", "@morev/vue-transitions/nuxt"],
|
|
3207
|
-
components: [],
|
|
3208
|
-
files: [
|
|
3209
|
-
{
|
|
3210
|
-
fileName: "Vee/VueFormSlider.vue",
|
|
3211
|
-
dirPath: "app/components/Ui",
|
|
3212
|
-
fileContent:
|
|
3213
|
-
'<template>\n <div class="w-full">\n <UiLabel\n v-if="label"\n :for="inputId"\n :class="[disabled && \'text-muted-foreground\', errorMessage && \'text-destructive\', \'mb-2\']"\n ><span>{{ label }} <span v-if="required" class="text-destructive">*</span></span></UiLabel\n >\n <Slider v-bind="{ ...forwarded, ...$attrs }" v-model="model" />\n <TransitionSlide group tag="div">\n <p v-if="hint && !errorMessage" key="hint" class="mt-1.5 text-sm text-muted-foreground">\n {{ hint }}\n </p>\n\n <p v-if="errorMessage" key="errorMessage" class="mt-1.5 text-sm text-destructive">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts">\n import Slider from "@vueform/slider";\n import { useForwardPropsEmits } from "radix-vue";\n\n export type SliderFormatObject = {\n /**\n * Prefix to prepend to the value.\n * @example "$"\n */\n prefix?: string;\n /**\n * Suffix to append to the value.\n * @example "USD"\n */\n suffix?: string;\n /**\n * Number of decimals to show.\n * @example 2\n */\n decimals?: number;\n /**\n * Character to use as thousand separator.\n * @example ","\n */\n thousand?: string;\n };\n\n export interface SliderProps {\n /**\n * The hint to display below the slider.\n */\n hint?: string;\n /**\n * The rules for the slider. Used with vee-validate for validation.\n */\n rules?: any;\n /**\n * Whether the slider should be validated on mount.\n */\n validateOnMount?: boolean;\n /**\n * The label of the slider. Used with vee-validate for error messages\n */\n label?: string;\n /**\n * The name we want to give this slider in the form.\n */\n name?: string;\n /**\n * The id attribute of slider container DOM.\n * @default "slider"\n */\n id?: string;\n /**\n * Whether to update v-model only when the slider value is set and not while dragging.\n *\n * If disabled you must not use inline objects as props (eg. format, options, classes) but outsource them to a data property.\n *\n * @default true\n */\n lazy?: boolean;\n /**\n * Whether the slider should be disabled.\n * @default false\n */\n disabled?: boolean;\n /**\n * Minimum value of the slider.\n * @default 0\n */\n min?: number;\n /**\n * Maximum value of the slider.\n * @default 100\n */\n max?: number;\n /**\n * The jump between intervals. If `-1` it enables fractions (eg. `1.23`).\n * @default 1\n */\n step?: number;\n /**\n * Whether tooltips should show above handlers.\n * @default true\n */\n tooltips?: boolean;\n /**\n * When tooltips should be shown.\n * @default "always"\n */\n showTooltip?: "always" | "focus" | "drag";\n /**\n * The step distance between two handles when their tooltips should be merged (when step is `-1` then `1` is assumed).\n *\n * @example\n *\n * ```js\n * { merge: 5, step: 10 }\n * // values: 0, <=50 will merge\n * // values: 0, 60 will not merge\n *\n * { merge: 5, step: -1 }\n *\n * // values: 0, <=5 will merge\n * // values: 0, 5.01 will not merge\n *\n * ```\n * @default -1\n */\n merge?: number;\n /**\n * Formats the tooltip.\n *\n * It can be either a function that receives a `value` param and expects a string or number as return or an object with the following properties:\n *\n *\n * prefix - eg $ -> $100\n *\n * suffix - eg USD -> 100USD\n *\n * decimals - eg 2 -> 100.00\n *\n * thousand - eg , - 1,000\n */\n format?: SliderFormatObject | ((value: number) => string | number);\n /**\n * The orientation of the slider.\n * @default "horizontal"\n */\n orientation?: "horizontal" | "vertical";\n /**\n * The direction of the slider.\n *\n * By default value increases left-to-right and top-to-bottom, which is reversed when using `rtl`.\n *\n * @default "ltr"\n */\n direction?: "ltr" | "rtl";\n /**\n * The position of the slider tooltips.\n *\n * Possible values: `null` | `top` | `bottom` | `left` | `right` depending on orientation prop.\n *\n * When null it equals to orientation default (`top` for `horizontal` and `left` for `vertical`).\n * @default null\n */\n tooltipPosition?: null | "top" | "bottom" | "left" | "right";\n /**\n * An object containing aria attributes to be added for each handle.\n */\n aria?: Record<string, any>;\n /**\n * Sets the aria-labelledby attribute of handles.\n */\n ariaLabelledby?: string;\n /**\n * Additional options for noUiSlider.\n * @see https://refreshless.com/nouislider/slider-options/\n */\n options?: Record<string, any>;\n /**\n * Initial value of the slider.\n */\n modelValue?: any;\n value?: any;\n /**\n * An object of class names that gets merged with the default values\n */\n classes?: Record<string, any>;\n /**\n * Whether the slider is required.\n *\n * @default false\n */\n required?: boolean;\n }\n\n export type SliderEmits = {\n /**\n * Emitted when dragging the slider is finished or it\'s value changed by clicking, keyboard or programmatically set.\n */\n change: [v: any];\n /**\n * Emitted in the same scenarios as in `@change`, but also when the slider is being dragged if `lazy` option is disabled.\n */\n update: [v: any];\n /**\n * Emitted in the same scenarios as in `@change`, but also when the slider\'s `.set()` method is called.\n */\n set: [v: any];\n /**\n * Emitted while the slider moves.\n */\n slide: [v: any];\n /**\n * Emitted the slider connect moves while dragging.\n */\n drag: [v: any];\n /**\n * Emitted when the handle is activated and dragging started.\n */\n start: [v: any];\n /**\n * Emitted when the dragging ended.\n */\n end: [v: any];\n /**\n * Emitted when the slider\'s value is updated.\n */\n "update:modelValue": [v: any];\n };\n</script>\n<script lang="ts" setup>\n defineOptions({ inheritAttrs: false });\n const props = withDefaults(defineProps<SliderProps>(), {\n showTooltip: "drag",\n });\n\n const emits = defineEmits<SliderEmits>();\n\n const inputId = props.id || useId();\n\n const forwarded = useForwardPropsEmits(props, emits);\n\n const { errorMessage, value: model } = useField(\n () => props.name || props.id || useId(),\n props.rules,\n {\n initialValue: props.modelValue,\n label: props.label,\n validateOnMount: props.validateOnMount,\n syncVModel: true,\n }\n );\n</script>\n\n<style src="@vueform/slider/themes/default.css"></style>\n\n<style>\n :root {\n --slider-bg: theme(colors.muted.DEFAULT);\n --slider-connect-bg: theme(colors.primary.DEFAULT);\n --slider-connect-bg-disabled: theme(colors.primary.DEFAULT/45%);\n --slider-height: 8px;\n --slider-vertical-height: 300px;\n --slider-radius: 999999px;\n\n --slider-handle-bg: #ffffff;\n --slider-handle-border: 0;\n --slider-handle-width: 20px;\n --slider-handle-height: 20px;\n --slider-handle-radius: 99999px;\n --slider-handle-shadow: 0.5px 0.5px 2px 1px rgba(0, 0, 0, 0.32);\n --slider-handle-shadow-active: 0.5px 0.5px 2px 1px rgba(0, 0, 0, 0.42);\n --slider-handle-ring-width: 3px;\n --slider-handle-ring-color: theme(colors.primary.DEFAULT/20%);\n\n --slider-tooltip-font-size: 0.875rem;\n --slider-tooltip-line-height: 1.25rem;\n --slider-tooltip-font-weight: 600;\n --slider-tooltip-min-width: 24px;\n --slider-tooltip-bg: theme(colors.primary.DEFAULT);\n --slider-tooltip-bg-disabled: theme(colors.primary.DEFAULT/90%);\n --slider-tooltip-color: theme(colors.primary.foreground);\n --slider-tooltip-radius: theme(borderRadius.sm);\n --slider-tooltip-py: 2px;\n --slider-tooltip-px: 6px;\n --slider-tooltip-arrow-size: 5px;\n --slider-tooltip-distance: 4px;\n }\n</style>\n',
|
|
3214
|
-
},
|
|
3215
|
-
],
|
|
3216
|
-
utils: [],
|
|
3217
|
-
composables: [],
|
|
3218
|
-
plugins: [],
|
|
3219
|
-
},
|
|
3220
|
-
{
|
|
3221
|
-
name: "Vue Sonner",
|
|
3222
|
-
value: "vue-sonner",
|
|
3223
|
-
deps: ["vue-sonner"],
|
|
3224
|
-
instructions: ["Remember to add the <UiVueSonner /> tag to your app.vue/layout file."],
|
|
3225
|
-
files: [
|
|
3226
|
-
{
|
|
3227
|
-
fileName: "VueSonner.client.vue",
|
|
3228
|
-
dirPath: "app/components/Ui",
|
|
3229
|
-
fileContent:
|
|
3230
|
-
'<template>\n <Toaster\n position="top-right"\n :visible-toasts="5"\n rich-colors\n :duration="7000"\n close-button\n :theme="$colorMode.value == \'dark\' ? \'dark\' : \'light\'"\n />\n</template>\n\n<script lang="ts" setup>\n import { Toaster } from "vue-sonner";\n</script>\n<style scoped>\n :deep([data-sonner-toaster][data-theme="dark"]),\n :deep([data-sonner-toaster][data-theme="light"]) {\n --normal-bg: theme("colors.popover.DEFAULT");\n --normal-border: theme("colors.border");\n --normal-text: theme("colors.popover.foreground");\n --border-radius: theme("borderRadius.md");\n }\n :deep([data-sonner-toaster]) {\n @apply font-sans;\n }\n :deep([data-sonner-toast][data-styled="true"]) {\n @apply items-start;\n }\n :deep([data-sonner-toast] [data-icon]) {\n @apply mt-0.5;\n }\n :deep([data-sonner-toast] [data-title]) {\n @apply text-sm font-semibold;\n }\n :deep([data-sonner-toast] [data-description]) {\n @apply text-sm;\n }\n :deep([data-sonner-toast] [data-close-button]) {\n @apply border border-border bg-background text-foreground hover:!border-inherit hover:!bg-inherit hover:!text-accent-foreground;\n }\n :deep([data-sonner-toast] [data-button]) {\n @apply bg-primary text-primary-foreground transition hover:opacity-90 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;\n }\n :deep(.sonner-loading-bar) {\n @apply bg-muted-foreground;\n }\n</style>\n',
|
|
3231
|
-
},
|
|
3232
|
-
],
|
|
3233
|
-
utils: [],
|
|
3234
|
-
composables: [],
|
|
3235
|
-
plugins: [],
|
|
3236
|
-
},
|
|
3237
|
-
];
|