ui-thing 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +3850 -2723
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/add.ts +49 -1
- package/src/comp.ts +182 -55
- package/tests/utils/addPrettierConfig.test.ts +71 -78
package/src/comp.ts
CHANGED
|
@@ -40,6 +40,7 @@ export default [
|
|
|
40
40
|
],
|
|
41
41
|
utils: [],
|
|
42
42
|
composables: [],
|
|
43
|
+
plugins: [],
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
46
|
name: "Alert",
|
|
@@ -69,6 +70,7 @@ export default [
|
|
|
69
70
|
],
|
|
70
71
|
utils: [],
|
|
71
72
|
composables: [],
|
|
73
|
+
plugins: [],
|
|
72
74
|
},
|
|
73
75
|
{
|
|
74
76
|
name: "Alert Dialog",
|
|
@@ -81,7 +83,7 @@ export default [
|
|
|
81
83
|
fileName: "shared.styles.ts",
|
|
82
84
|
dirPath: "utils",
|
|
83
85
|
fileContent:
|
|
84
|
-
'// Add here because button styles are used in several components\
|
|
86
|
+
'// Add here because button styles are used in several components\nexport const buttonStyles = tv({\n base: "inline-flex items-center justify-center gap-2 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",\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 },\n size: {\n default: "h-10 px-4 py-2",\n sm: "h-9 rounded-md px-3",\n lg: "h-11 rounded-md px-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 },\n defaultVariants: {\n variant: "default",\n size: "default",\n },\n});\n',
|
|
85
87
|
},
|
|
86
88
|
],
|
|
87
89
|
files: [
|
|
@@ -89,7 +91,7 @@ export default [
|
|
|
89
91
|
fileName: "AlertDialog/Action.vue",
|
|
90
92
|
dirPath: "components/UI",
|
|
91
93
|
fileContent:
|
|
92
|
-
'<template>\
|
|
94
|
+
'<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, useForwardProps } from "radix-vue";\n import type { AlertDialogActionProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n AlertDialogActionProps & {\n onClick?: () => void;\n text?: string;\n class?: any;\n disabled?: boolean;\n variant?: VariantProps<typeof buttonStyles>["variant"];\n size?: VariantProps<typeof buttonStyles>["size"];\n }\n >(),\n {\n text: "Continue",\n variant: "default",\n }\n );\n\n const forwarded = useForwardProps(useOmit(props, ["text", "class", "variant", "size"]));\n</script>\n',
|
|
93
95
|
},
|
|
94
96
|
{
|
|
95
97
|
fileName: "AlertDialog/AlertDialog.vue",
|
|
@@ -101,7 +103,7 @@ export default [
|
|
|
101
103
|
fileName: "AlertDialog/Cancel.vue",
|
|
102
104
|
dirPath: "components/UI",
|
|
103
105
|
fileContent:
|
|
104
|
-
'<template>\
|
|
106
|
+
'<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, useForwardProps } from "radix-vue";\n import type { AlertDialogCancelProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n AlertDialogCancelProps & {\n onClick?: () => void;\n text?: string;\n class?: any;\n disabled?: boolean;\n variant?: VariantProps<typeof buttonStyles>["variant"];\n size?: VariantProps<typeof buttonStyles>["size"];\n }\n >(),\n {\n text: "Cancel",\n variant: "outline",\n }\n );\n const forwarded = useForwardProps(useOmit(props, ["text", "class", "variant", "size"]));\n</script>\n',
|
|
105
107
|
},
|
|
106
108
|
{
|
|
107
109
|
fileName: "AlertDialog/Content.vue",
|
|
@@ -153,6 +155,7 @@ export default [
|
|
|
153
155
|
},
|
|
154
156
|
],
|
|
155
157
|
composables: [],
|
|
158
|
+
plugins: [],
|
|
156
159
|
},
|
|
157
160
|
{
|
|
158
161
|
name: "Aspect Ratio",
|
|
@@ -165,11 +168,12 @@ export default [
|
|
|
165
168
|
fileName: "AspectRatio.vue",
|
|
166
169
|
dirPath: "components/UI",
|
|
167
170
|
fileContent:
|
|
168
|
-
'<template>\
|
|
171
|
+
'<template>\n <AspectRatio v-bind="forwarded">\n <slot />\n </AspectRatio>\n</template>\n\n<script lang="ts" setup>\n import { AspectRatio, useForwardProps } from "radix-vue";\n import type { AspectRatioProps } from "radix-vue";\n\n const props = defineProps<AspectRatioProps>();\n const forwarded = useForwardProps(props);\n</script>\n',
|
|
169
172
|
},
|
|
170
173
|
],
|
|
171
174
|
utils: [],
|
|
172
175
|
composables: [],
|
|
176
|
+
plugins: [],
|
|
173
177
|
},
|
|
174
178
|
{
|
|
175
179
|
name: "Autocomplete",
|
|
@@ -271,6 +275,7 @@ export default [
|
|
|
271
275
|
],
|
|
272
276
|
utils: [],
|
|
273
277
|
composables: [],
|
|
278
|
+
plugins: [],
|
|
274
279
|
},
|
|
275
280
|
{
|
|
276
281
|
name: "Avatar",
|
|
@@ -283,23 +288,24 @@ export default [
|
|
|
283
288
|
fileName: "Avatar/Avatar.vue",
|
|
284
289
|
dirPath: "components/UI",
|
|
285
290
|
fileContent:
|
|
286
|
-
'<template>\
|
|
291
|
+
'<template>\n <AvatarRoot :as="as" :as-child="asChild" :class="styles({ class: props.class })">\n <slot>\n <slot name="image">\n <UIAvatarImage\n @loading-status-change="emits(\'loadingStatusChange\', $event)"\n v-if="src"\n :src="src"\n :alt="alt"\n :class="imageClass"\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 );\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',
|
|
287
292
|
},
|
|
288
293
|
{
|
|
289
294
|
fileName: "Avatar/Fallback.vue",
|
|
290
295
|
dirPath: "components/UI",
|
|
291
296
|
fileContent:
|
|
292
|
-
'<template>\
|
|
297
|
+
'<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, useForwardProps } from "radix-vue";\n import type { AvatarFallbackProps } from "radix-vue";\n\n const props = defineProps<\n AvatarFallbackProps & {\n fallback?: string;\n class?: any;\n }\n >();\n const forwarded = useForwardProps(useOmit(props, ["fallback", "class"]));\n\n const styles = tv({\n base: "flex h-full w-full items-center justify-center rounded-full bg-muted font-medium",\n });\n</script>\n',
|
|
293
298
|
},
|
|
294
299
|
{
|
|
295
300
|
fileName: "Avatar/Image.vue",
|
|
296
301
|
dirPath: "components/UI",
|
|
297
302
|
fileContent:
|
|
298
|
-
'<template>\
|
|
303
|
+
'<template>\n <AvatarImage v-bind="forwarded" :class="styles({ class: props.class })" :alt="alt" />\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 alt?: string;\n class?: any;\n }\n >();\n const emits = defineEmits<AvatarImageEmits>();\n const forwarded = useForwardPropsEmits(useOmit(props, ["alt", "class"]));\n\n const styles = tv({\n base: "aspect-square h-full w-full object-cover",\n });\n</script>\n',
|
|
299
304
|
},
|
|
300
305
|
],
|
|
301
306
|
utils: [],
|
|
302
307
|
composables: [],
|
|
308
|
+
plugins: [],
|
|
303
309
|
},
|
|
304
310
|
{
|
|
305
311
|
name: "Badge",
|
|
@@ -317,6 +323,7 @@ export default [
|
|
|
317
323
|
],
|
|
318
324
|
utils: [],
|
|
319
325
|
composables: [],
|
|
326
|
+
plugins: [],
|
|
320
327
|
},
|
|
321
328
|
{
|
|
322
329
|
name: "Breadcrumbs",
|
|
@@ -334,6 +341,7 @@ export default [
|
|
|
334
341
|
],
|
|
335
342
|
utils: [],
|
|
336
343
|
composables: [],
|
|
344
|
+
plugins: [],
|
|
337
345
|
},
|
|
338
346
|
{
|
|
339
347
|
name: "Button",
|
|
@@ -346,7 +354,7 @@ export default [
|
|
|
346
354
|
fileName: "shared.styles.ts",
|
|
347
355
|
dirPath: "utils",
|
|
348
356
|
fileContent:
|
|
349
|
-
'// Add here because button styles are used in several components\
|
|
357
|
+
'// Add here because button styles are used in several components\nexport const buttonStyles = tv({\n base: "inline-flex items-center justify-center gap-2 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",\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 },\n size: {\n default: "h-10 px-4 py-2",\n sm: "h-9 rounded-md px-3",\n lg: "h-11 rounded-md px-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 },\n defaultVariants: {\n variant: "default",\n size: "default",\n },\n});\n',
|
|
350
358
|
},
|
|
351
359
|
],
|
|
352
360
|
files: [
|
|
@@ -354,10 +362,11 @@ export default [
|
|
|
354
362
|
fileName: "Button.vue",
|
|
355
363
|
dirPath: "components/UI",
|
|
356
364
|
fileContent:
|
|
357
|
-
'<template>\
|
|
365
|
+
'<template>\n <component\n :is="elementType"\n :class="\n buttonStyles({\n disabled: disabled || loading,\n variant: variant,\n size: size,\n class: props.class,\n })\n "\n :disabled="disabled || loading"\n :to="to"\n :href="href"\n :type="type"\n @click="onClick"\n >\n <slot></slot>\n </component>\n</template>\n\n<script setup lang="ts">\n import type { RouteLocationRaw } from "vue-router";\n\n type ButtonProps = VariantProps<typeof buttonStyles>;\n const props = withDefaults(\n defineProps<{\n type?: "button" | "submit" | "reset";\n disabled?: boolean;\n loading?: boolean;\n onClick?: () => void;\n to?: string | RouteLocationRaw;\n href?: string;\n as?: string;\n class?: any;\n variant?: ButtonProps["variant"];\n size?: ButtonProps["size"];\n }>(),\n {\n type: "button",\n }\n );\n\n const elementType = computed(() => {\n if (props.as) return props.as;\n if (props.href || props.to) return resolveComponent("NuxtLink");\n return "button";\n });\n</script>\n',
|
|
358
366
|
},
|
|
359
367
|
],
|
|
360
368
|
composables: [],
|
|
369
|
+
plugins: [],
|
|
361
370
|
},
|
|
362
371
|
{
|
|
363
372
|
name: "Calendar",
|
|
@@ -371,11 +380,12 @@ export default [
|
|
|
371
380
|
fileName: "Calendar.vue",
|
|
372
381
|
dirPath: "components/UI",
|
|
373
382
|
fileContent:
|
|
374
|
-
'<template>\
|
|
383
|
+
'<template>\n <ClientOnly>\n <VCalendar\n :trimWeeks="props.trimWeeks || true"\n :is-dark="$colorMode.value == \'dark\'"\n v-bind="$attrs"\n >\n <template v-for="(_, slot) in $slots" v-slot:[slot]="scope">\n <slot :name="slot" v-bind="scope"></slot>\n </template>\n </VCalendar>\n </ClientOnly>\n</template>\n\n<script lang="ts" setup>\n import { 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',
|
|
375
384
|
},
|
|
376
385
|
],
|
|
377
386
|
utils: [],
|
|
378
387
|
composables: [],
|
|
388
|
+
plugins: [],
|
|
379
389
|
},
|
|
380
390
|
{
|
|
381
391
|
name: "Card",
|
|
@@ -388,41 +398,42 @@ export default [
|
|
|
388
398
|
fileName: "Card/Card.vue",
|
|
389
399
|
dirPath: "components/UI",
|
|
390
400
|
fileContent:
|
|
391
|
-
'<template>\
|
|
401
|
+
'<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 name="content" v-if="content || $slots.content">\n <UICardContent>\n <div v-html="content"></div>\n </UICardContent>\n </slot>\n <slot name="footer"></slot>\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/dist/Primitive/Primitive";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n title?: string;\n description?: string;\n content?: string;\n class?: any;\n }\n >(),\n {\n as: "div",\n }\n );\n\n const styles = tv({\n base: "rounded-lg border bg-card text-card-foreground shadow-sm",\n });\n</script>\n',
|
|
392
402
|
},
|
|
393
403
|
{
|
|
394
404
|
fileName: "Card/Content.vue",
|
|
395
405
|
dirPath: "components/UI",
|
|
396
406
|
fileContent:
|
|
397
|
-
'<template>\
|
|
407
|
+
'<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/dist/Primitive/Primitive";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n content?: string;\n class?: any;\n }\n >(),\n { as: "div" }\n );\n const styles = tv({\n base: "p-6 pt-0",\n });\n</script>\n',
|
|
398
408
|
},
|
|
399
409
|
{
|
|
400
410
|
fileName: "Card/Description.vue",
|
|
401
411
|
dirPath: "components/UI",
|
|
402
412
|
fileContent:
|
|
403
|
-
'<template>\
|
|
413
|
+
'<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/dist/Primitive/Primitive";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n description?: string;\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',
|
|
404
414
|
},
|
|
405
415
|
{
|
|
406
416
|
fileName: "Card/Footer.vue",
|
|
407
417
|
dirPath: "components/UI",
|
|
408
418
|
fileContent:
|
|
409
|
-
'<template>\
|
|
419
|
+
'<template>\n <Primitive :class="styles({ class: props.class })" :as="as" :as-child="asChild">\n <slot> </slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue/dist/Primitive/Primitive";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n class?: any;\n }\n >(),\n { as: "div" }\n );\n\n const styles = tv({\n base: "flex items-center p-6 pt-0",\n });\n</script>\n',
|
|
410
420
|
},
|
|
411
421
|
{
|
|
412
422
|
fileName: "Card/Header.vue",
|
|
413
423
|
dirPath: "components/UI",
|
|
414
424
|
fileContent:
|
|
415
|
-
'<template>\
|
|
425
|
+
'<template>\n <Primitive :class="styles({ class: props.class })" :as="as" :as-child="asChild">\n <slot></slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue/dist/Primitive/Primitive";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\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",\n });\n</script>\n',
|
|
416
426
|
},
|
|
417
427
|
{
|
|
418
428
|
fileName: "Card/Title.vue",
|
|
419
429
|
dirPath: "components/UI",
|
|
420
430
|
fileContent:
|
|
421
|
-
'<template>\
|
|
431
|
+
'<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/dist/Primitive/Primitive";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n title?: string;\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',
|
|
422
432
|
},
|
|
423
433
|
],
|
|
424
434
|
utils: [],
|
|
425
435
|
composables: [],
|
|
436
|
+
plugins: [],
|
|
426
437
|
},
|
|
427
438
|
{
|
|
428
439
|
name: "Checkbox",
|
|
@@ -435,17 +446,18 @@ export default [
|
|
|
435
446
|
fileName: "Checkbox/Checkbox.vue",
|
|
436
447
|
dirPath: "components/UI",
|
|
437
448
|
fileContent:
|
|
438
|
-
'<template>\
|
|
449
|
+
'<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 :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 class?: any;\n id?: string;\n icon?: string;\n }\n >();\n\n const emit = defineEmits<CheckboxRootEmits>();\n const forwarded = useForwardPropsEmits(props, 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 md:h-4 md:w-4",\n });\n</script>\n',
|
|
439
450
|
},
|
|
440
451
|
{
|
|
441
452
|
fileName: "Checkbox/Indicator.vue",
|
|
442
453
|
dirPath: "components/UI",
|
|
443
454
|
fileContent:
|
|
444
|
-
'<template>\
|
|
455
|
+
'<template>\n <CheckboxIndicator :class="styles({ class: props.class })" v-bind="forwarded">\n <slot>\n <Icon :name="icon" class="h-4 w-4" />\n </slot>\n </CheckboxIndicator>\n</template>\n\n<script lang="ts" setup>\n import { CheckboxIndicator, useForwardProps } from "radix-vue";\n import type { CheckboxIndicatorProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n CheckboxIndicatorProps & {\n class?: any;\n icon?: string;\n }\n >(),\n {\n icon: "lucide:check",\n }\n );\n const forwarded = useForwardProps(useOmit(props, ["icon", "class"]));\n\n const styles = tv({\n base: "flex items-center justify-center text-current",\n });\n</script>\n',
|
|
445
456
|
},
|
|
446
457
|
],
|
|
447
458
|
utils: [],
|
|
448
459
|
composables: [],
|
|
460
|
+
plugins: [],
|
|
449
461
|
},
|
|
450
462
|
{
|
|
451
463
|
name: "Collapsible",
|
|
@@ -476,6 +488,7 @@ export default [
|
|
|
476
488
|
],
|
|
477
489
|
utils: [],
|
|
478
490
|
composables: [],
|
|
491
|
+
plugins: [],
|
|
479
492
|
},
|
|
480
493
|
{
|
|
481
494
|
name: "Command",
|
|
@@ -553,6 +566,7 @@ export default [
|
|
|
553
566
|
],
|
|
554
567
|
utils: [],
|
|
555
568
|
composables: [],
|
|
569
|
+
plugins: [],
|
|
556
570
|
},
|
|
557
571
|
{
|
|
558
572
|
name: "Context Menu",
|
|
@@ -666,6 +680,39 @@ export default [
|
|
|
666
680
|
],
|
|
667
681
|
utils: [],
|
|
668
682
|
composables: [],
|
|
683
|
+
plugins: [],
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
name: "DataTables.net",
|
|
687
|
+
value: "datatable",
|
|
688
|
+
deps: [
|
|
689
|
+
"datatables.net-buttons-dt",
|
|
690
|
+
"datatables.net-responsive-dt",
|
|
691
|
+
"datatables.net-searchbuilder-dt",
|
|
692
|
+
"datatables.net-select-dt",
|
|
693
|
+
"datatables.net-vue3",
|
|
694
|
+
"jszip",
|
|
695
|
+
],
|
|
696
|
+
devDeps: [],
|
|
697
|
+
nuxtModules: [],
|
|
698
|
+
plugins: [
|
|
699
|
+
{
|
|
700
|
+
fileName: "datatables.client.ts",
|
|
701
|
+
dirPath: "plugins",
|
|
702
|
+
fileContent:
|
|
703
|
+
'import DataTablesCore from "datatables.net";\nimport DataTable from "datatables.net-vue3";\nimport JSZip from "jszip";\n\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";\n\n// @ts-ignore\nwindow.JSZip = JSZip;\n\nDataTable.use(DataTablesCore);\n\nexport default defineNuxtPlugin((nuxtApp) => {\n nuxtApp.vueApp.component("DataTable", DataTable);\n});\n',
|
|
704
|
+
},
|
|
705
|
+
],
|
|
706
|
+
files: [
|
|
707
|
+
{
|
|
708
|
+
fileName: "Datatable.client.vue",
|
|
709
|
+
dirPath: "components/UI",
|
|
710
|
+
fileContent:
|
|
711
|
+
"<template>\n <DataTable ref=\"table\" :data=\"data\" :class=\"props.class\" :options=\"options\">\n <slot></slot>\n </DataTable>\n</template>\n\n<script lang=\"ts\" setup generic=\"T\">\n import type DataTableRef from \"datatables.net\";\n import type { Config } from \"datatables.net/types/types\";\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 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 @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 @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 @apply bottom-[43%] h-4 w-4 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 @apply top-[43%] h-4 w-4 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 @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 @apply absolute left-[50%] top-[50%] ml-[-100px] mt-[-26px] w-[200px] p-0.5 text-center;\n }\n div.dataTables_processing > div:last-child {\n @apply relative mx-auto my-4 h-4 w-20;\n }\n div.dataTables_processing > div:last-child > div {\n @apply absolute top-0 h-3.5 w-3.5 rounded-full;\n background: hsl(var(--dt-row-selected));\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n }\n div.dataTables_processing > div:last-child > div:nth-child(1) {\n left: 8px;\n animation: datatables-loader-1 0.6s infinite;\n }\n div.dataTables_processing > div:last-child > div:nth-child(2) {\n left: 8px;\n animation: datatables-loader-2 0.6s infinite;\n }\n div.dataTables_processing > div:last-child > div:nth-child(3) {\n left: 32px;\n animation: datatables-loader-2 0.6s infinite;\n }\n div.dataTables_processing > div:last-child > div:nth-child(4) {\n left: 56px;\n animation: datatables-loader-3 0.6s infinite;\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 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-xs font-normal 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;\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 /* Control feature layout */\n .dataTables_wrapper {\n @apply w-full overflow-x-auto;\n }\n\n /* Export button styles */\n .dataTables_wrapper .dt-buttons {\n @apply inline-flex items-center gap-2;\n button {\n @apply inline-flex h-8 items-center gap-2 rounded-md border bg-background px-2 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 .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-8 w-[70px] cursor-pointer rounded-md border border-border bg-background px-2 py-1 transition focus:border-primary focus:outline-none 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 .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-8 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 sm:text-sm;\n }\n }\n }\n .dataTables_wrapper .dataTables_info {\n @apply flex items-center gap-3 text-sm !text-muted-foreground;\n }\n .dataTables_wrapper .dataTables_paginate {\n .paginate_button {\n @apply ml-1 box-border inline-flex h-8 min-w-[32px] cursor-pointer items-center justify-center rounded bg-transparent px-3 py-2 text-center text-sm;\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 @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 h-4 w-4 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 @apply mr-2 inline-block h-4 w-4 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 h-4 w-4 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 @apply mr-2 inline-block h-4 w-4 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 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 div.dtr-modal {\n position: fixed;\n box-sizing: border-box;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 100;\n padding: 10em 1em;\n }\n div.dtr-modal div.dtr-modal-display {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n width: 50%;\n height: fit-content;\n max-height: 75%;\n overflow: auto;\n margin: auto;\n z-index: 102;\n overflow: auto;\n background-color: #f5f5f7;\n border: 1px solid black;\n border-radius: 0.5em;\n box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);\n }\n div.dtr-modal div.dtr-modal-content {\n position: relative;\n padding: 2.5em;\n }\n div.dtr-modal div.dtr-modal-content h2 {\n margin-top: 0;\n }\n div.dtr-modal div.dtr-modal-close {\n position: absolute;\n top: 6px;\n right: 6px;\n width: 22px;\n height: 22px;\n text-align: center;\n border-radius: 3px;\n cursor: pointer;\n z-index: 12;\n }\n div.dtr-modal div.dtr-modal-background {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 101;\n background: rgba(0, 0, 0, 0.6);\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 cursor-pointer select-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-md border bg-background px-3 py-2 text-xs 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-xs transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background;\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-xs transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background;\n }\n</style>\n",
|
|
712
|
+
},
|
|
713
|
+
],
|
|
714
|
+
utils: [],
|
|
715
|
+
composables: [],
|
|
669
716
|
},
|
|
670
717
|
{
|
|
671
718
|
name: "Datepicker",
|
|
@@ -686,6 +733,7 @@ export default [
|
|
|
686
733
|
],
|
|
687
734
|
utils: [],
|
|
688
735
|
composables: [],
|
|
736
|
+
plugins: [],
|
|
689
737
|
},
|
|
690
738
|
{
|
|
691
739
|
name: "Dialog",
|
|
@@ -757,6 +805,7 @@ export default [
|
|
|
757
805
|
],
|
|
758
806
|
utils: [],
|
|
759
807
|
composables: [],
|
|
808
|
+
plugins: [],
|
|
760
809
|
},
|
|
761
810
|
{
|
|
762
811
|
name: "Dropdown Menu",
|
|
@@ -769,107 +818,108 @@ export default [
|
|
|
769
818
|
fileName: "DropdownMenu/Arrow.vue",
|
|
770
819
|
dirPath: "components/UI",
|
|
771
820
|
fileContent:
|
|
772
|
-
'<template>\
|
|
821
|
+
'<template>\n <DropdownMenuArrow v-bind="forwarded" :class="styles({ class: props.class })" />\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuArrow, useForwardProps } from "radix-vue";\n import type { DropdownMenuArrowProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n DropdownMenuArrowProps & {\n class?: any;\n }\n >(),\n {\n asChild: false,\n width: 10,\n height: 5,\n }\n );\n const forwarded = useForwardProps(useOmit(props, ["class"]));\n\n const styles = tv({\n base: "rotate-45 border bg-muted",\n });\n</script>\n',
|
|
773
822
|
},
|
|
774
823
|
{
|
|
775
824
|
fileName: "DropdownMenu/CheckboxItem.vue",
|
|
776
825
|
dirPath: "components/UI",
|
|
777
826
|
fileContent:
|
|
778
|
-
'<template>\
|
|
827
|
+
'<template>\n <DropdownMenuCheckboxItem v-bind="forwarded" :class="styles({ class: props.class })">\n <span className="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 class?: any;\n shortcut?: string;\n title?: string;\n }\n >();\n const emits = defineEmits<DropdownMenuCheckboxItemEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n\n const styles = tv({\n base: "relative flex cursor-default 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',
|
|
779
828
|
},
|
|
780
829
|
{
|
|
781
830
|
fileName: "DropdownMenu/Content.vue",
|
|
782
831
|
dirPath: "components/UI",
|
|
783
832
|
fileContent:
|
|
784
|
-
'<template>\
|
|
833
|
+
'<template>\n <UIDropdownMenuPortal>\n <DropdownMenuContent\n v-bind="{ ...forwarded, ...$attrs }"\n :class="styles({ class: props.class })"\n >\n <slot></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 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\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\n const forwarded = useForwardPropsEmits(useOmit(props, ["class"]), emits);\n</script>\n',
|
|
785
834
|
},
|
|
786
835
|
{
|
|
787
836
|
fileName: "DropdownMenu/DropdownMenu.vue",
|
|
788
837
|
dirPath: "components/UI",
|
|
789
838
|
fileContent:
|
|
790
|
-
'<template>\
|
|
839
|
+
'<template>\n <DropdownMenuRoot v-bind="forwarded">\n <slot></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',
|
|
791
840
|
},
|
|
792
841
|
{
|
|
793
842
|
fileName: "DropdownMenu/Group.vue",
|
|
794
843
|
dirPath: "components/UI",
|
|
795
844
|
fileContent:
|
|
796
|
-
'<template>\
|
|
845
|
+
'<template>\n <DropdownMenuGroup v-bind="forwarded">\n <slot></slot>\n </DropdownMenuGroup>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuGroup, useForwardProps } from "radix-vue";\n import type { DropdownMenuGroupProps } from "radix-vue";\n\n const props = defineProps<DropdownMenuGroupProps>();\n const forwarded = useForwardProps(props);\n</script>\n',
|
|
797
846
|
},
|
|
798
847
|
{
|
|
799
848
|
fileName: "DropdownMenu/Item.vue",
|
|
800
849
|
dirPath: "components/UI",
|
|
801
850
|
fileContent:
|
|
802
|
-
'<template>\
|
|
851
|
+
'<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 class?: any;\n inset?: boolean;\n shortcut?: string;\n title?: string;\n icon?: string;\n }\n >();\n\n const emits = defineEmits<DropdownMenuItemEmits>();\n const forwarded = useForwardPropsEmits(\n useOmit(props, ["class", "inset", "shortcut", "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',
|
|
803
852
|
},
|
|
804
853
|
{
|
|
805
854
|
fileName: "DropdownMenu/ItemIndicator.vue",
|
|
806
855
|
dirPath: "components/UI",
|
|
807
856
|
fileContent:
|
|
808
|
-
'<template>\
|
|
857
|
+
'<template>\n <DropdownMenuItemIndicator v-bind="forwarded">\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, useForwardProps } from "radix-vue";\n import type { DropdownMenuItemIndicatorProps } from "radix-vue";\n\n const props = defineProps<\n DropdownMenuItemIndicatorProps & {\n icon?: string;\n }\n >();\n const forwarded = useForwardProps(useOmit(props, ["icon"]));\n</script>\n',
|
|
809
858
|
},
|
|
810
859
|
{
|
|
811
860
|
fileName: "DropdownMenu/Label.vue",
|
|
812
861
|
dirPath: "components/UI",
|
|
813
862
|
fileContent:
|
|
814
|
-
'<template>\
|
|
863
|
+
'<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, useForwardProps } 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 = useForwardProps(useOmit(props, ["class", "inset", "label"]));\n\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',
|
|
815
864
|
},
|
|
816
865
|
{
|
|
817
866
|
fileName: "DropdownMenu/Portal.vue",
|
|
818
867
|
dirPath: "components/UI",
|
|
819
868
|
fileContent:
|
|
820
|
-
'<template>\
|
|
869
|
+
'<template>\n <DropdownMenuPortal v-bind="forwarded">\n <slot></slot>\n </DropdownMenuPortal>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuPortal, useForwardProps } from "radix-vue";\n import type { DropdownMenuPortalProps } from "radix-vue";\n\n const props = defineProps<DropdownMenuPortalProps>();\n const forwarded = useForwardProps(props);\n</script>\n',
|
|
821
870
|
},
|
|
822
871
|
{
|
|
823
872
|
fileName: "DropdownMenu/RadioGroup.vue",
|
|
824
873
|
dirPath: "components/UI",
|
|
825
874
|
fileContent:
|
|
826
|
-
'<template>\
|
|
875
|
+
'<template>\n <DropdownMenuRadioGroup v-bind="forwarded">\n <slot></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',
|
|
827
876
|
},
|
|
828
877
|
{
|
|
829
878
|
fileName: "DropdownMenu/RadioItem.vue",
|
|
830
879
|
dirPath: "components/UI",
|
|
831
880
|
fileContent:
|
|
832
|
-
'<template>\
|
|
881
|
+
'<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 class?: any;\n icon?: string;\n title?: string;\n }\n >();\n\n const emits = defineEmits<DropdownMenuRadioItemEmits>();\n const forwarded = useForwardPropsEmits(useOmit(props, ["class", "icon"]), emits);\n\n const styles = tv({\n base: "relative flex cursor-default 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',
|
|
833
882
|
},
|
|
834
883
|
{
|
|
835
884
|
fileName: "DropdownMenu/Separator.vue",
|
|
836
885
|
dirPath: "components/UI",
|
|
837
886
|
fileContent:
|
|
838
|
-
'<template>\
|
|
887
|
+
'<template>\n <DropdownMenuSeparator :class="styles({ class: props.class })" v-bind="forwarded" />\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuSeparator, useForwardProps } from "radix-vue";\n import type { DropdownMenuSeparatorProps } from "radix-vue";\n\n const props = defineProps<\n DropdownMenuSeparatorProps & {\n class?: any;\n }\n >();\n const forwarded = useForwardProps(useOmit(props, ["class"]));\n\n const styles = tv({\n base: "-mx-1 my-1 h-px bg-border",\n });\n</script>\n',
|
|
839
888
|
},
|
|
840
889
|
{
|
|
841
890
|
fileName: "DropdownMenu/Shortcut.vue",
|
|
842
891
|
dirPath: "components/UI",
|
|
843
892
|
fileContent:
|
|
844
|
-
'<template>\
|
|
893
|
+
'<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, useForwardProps } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue/dist/Primitive/Primitive";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n class?: any;\n }\n >(),\n {\n as: "span",\n }\n );\n const forwarded = useForwardProps(useOmit(props, ["class"]));\n\n const styles = tv({\n base: "ml-auto text-xs tracking-widest opacity-60",\n });\n</script>\n',
|
|
845
894
|
},
|
|
846
895
|
{
|
|
847
896
|
fileName: "DropdownMenu/Sub.vue",
|
|
848
897
|
dirPath: "components/UI",
|
|
849
898
|
fileContent:
|
|
850
|
-
'<template>\
|
|
899
|
+
'<template>\n <DropdownMenuSub v-bind="forwarded">\n <slot></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',
|
|
851
900
|
},
|
|
852
901
|
{
|
|
853
902
|
fileName: "DropdownMenu/SubContent.vue",
|
|
854
903
|
dirPath: "components/UI",
|
|
855
904
|
fileContent:
|
|
856
|
-
'<template>\
|
|
905
|
+
'<template>\n <DropdownMenuPortal>\n <DropdownMenuSubContent\n v-bind="{ ...forwarded, ...$attrs }"\n :class="styles({ class: props.class })"\n >\n <slot></slot>\n </DropdownMenuSubContent>\n </DropdownMenuPortal>\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 class?: any;\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(useOmit(props, ["class"]), 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',
|
|
857
906
|
},
|
|
858
907
|
{
|
|
859
908
|
fileName: "DropdownMenu/SubTrigger.vue",
|
|
860
909
|
dirPath: "components/UI",
|
|
861
910
|
fileContent:
|
|
862
|
-
'<template>\
|
|
911
|
+
'<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, useForwardProps } from "radix-vue";\n import type { DropdownMenuSubTriggerProps } from "radix-vue";\n\n const props = defineProps<\n DropdownMenuSubTriggerProps & {\n class?: any;\n inset?: boolean;\n asChild?: boolean;\n icon?: string;\n title?: string;\n trailingIcon?: string;\n }\n >();\n const forwarded = useForwardProps(\n useOmit(props, ["class", "inset", "asChild", "icon", "trailingIcon"])\n );\n\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',
|
|
863
912
|
},
|
|
864
913
|
{
|
|
865
914
|
fileName: "DropdownMenu/Trigger.vue",
|
|
866
915
|
dirPath: "components/UI",
|
|
867
916
|
fileContent:
|
|
868
|
-
'<template>\
|
|
917
|
+
'<template>\n <DropdownMenuTrigger v-bind="forwarded">\n <slot></slot>\n </DropdownMenuTrigger>\n</template>\n\n<script lang="ts" setup>\n import { DropdownMenuTrigger, useForwardProps } from "radix-vue";\n import type { DropdownMenuTriggerProps } from "radix-vue";\n\n const props = defineProps<DropdownMenuTriggerProps>();\n const forwarded = useForwardProps(props);\n</script>\n',
|
|
869
918
|
},
|
|
870
919
|
],
|
|
871
920
|
utils: [],
|
|
872
921
|
composables: [],
|
|
922
|
+
plugins: [],
|
|
873
923
|
},
|
|
874
924
|
{
|
|
875
925
|
name: "Dropfile",
|
|
@@ -887,6 +937,7 @@ export default [
|
|
|
887
937
|
],
|
|
888
938
|
utils: [],
|
|
889
939
|
composables: [],
|
|
940
|
+
plugins: [],
|
|
890
941
|
},
|
|
891
942
|
{
|
|
892
943
|
name: "Form",
|
|
@@ -899,7 +950,7 @@ export default [
|
|
|
899
950
|
fileName: "useFormField.ts",
|
|
900
951
|
dirPath: "composables",
|
|
901
952
|
fileContent:
|
|
902
|
-
'import { FORM_ITEM_INJECTION_KEY } from "@/components/UI/Form/Item.vue";\
|
|
953
|
+
'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',
|
|
903
954
|
},
|
|
904
955
|
],
|
|
905
956
|
files: [
|
|
@@ -907,34 +958,35 @@ export default [
|
|
|
907
958
|
fileName: "Form/Control.vue",
|
|
908
959
|
dirPath: "components/UI",
|
|
909
960
|
fileContent:
|
|
910
|
-
'<template>\
|
|
961
|
+
'<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',
|
|
911
962
|
},
|
|
912
963
|
{
|
|
913
964
|
fileName: "Form/Description.vue",
|
|
914
965
|
dirPath: "components/UI",
|
|
915
966
|
fileContent:
|
|
916
|
-
'<template>\
|
|
967
|
+
'<template>\n <p :id="formDescriptionId" :class="styles({ class: props.class })" v-bind="$attrs">\n <slot>\n <ClientOnly>\n <p v-html="description"></p>\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',
|
|
917
968
|
},
|
|
918
969
|
{
|
|
919
970
|
fileName: "Form/Item.vue",
|
|
920
971
|
dirPath: "components/UI",
|
|
921
972
|
fileContent:
|
|
922
|
-
'<template>\
|
|
973
|
+
'<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 import { useId } from "radix-vue";\n\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',
|
|
923
974
|
},
|
|
924
975
|
{
|
|
925
976
|
fileName: "Form/Label.vue",
|
|
926
977
|
dirPath: "components/UI",
|
|
927
978
|
fileContent:
|
|
928
|
-
'<template>\
|
|
979
|
+
'<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',
|
|
929
980
|
},
|
|
930
981
|
{
|
|
931
982
|
fileName: "Form/Message.vue",
|
|
932
983
|
dirPath: "components/UI",
|
|
933
984
|
fileContent:
|
|
934
|
-
'<template>\
|
|
985
|
+
'<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',
|
|
935
986
|
},
|
|
936
987
|
],
|
|
937
988
|
utils: [],
|
|
989
|
+
plugins: [],
|
|
938
990
|
},
|
|
939
991
|
{
|
|
940
992
|
name: "Hover Card",
|
|
@@ -976,6 +1028,7 @@ export default [
|
|
|
976
1028
|
],
|
|
977
1029
|
utils: [],
|
|
978
1030
|
composables: [],
|
|
1031
|
+
plugins: [],
|
|
979
1032
|
},
|
|
980
1033
|
{
|
|
981
1034
|
name: "Input",
|
|
@@ -988,11 +1041,12 @@ export default [
|
|
|
988
1041
|
fileName: "Input.vue",
|
|
989
1042
|
dirPath: "components/UI",
|
|
990
1043
|
fileContent:
|
|
991
|
-
'<template>\
|
|
1044
|
+
'<template>\n <input :class="styles({ class: props.class })" v-bind="forwarded" v-model="localModel" />\n</template>\n\n<script lang="ts" setup>\n import { useForwardPropsEmits } from "radix-vue";\n\n const props = withDefaults(\n defineProps<{\n class?: any;\n id?: string;\n name?: string;\n placeholder?: string;\n disabled?: boolean;\n required?: boolean;\n type?: string;\n modelValue?: any;\n }>(),\n { type: "text" }\n );\n const emits = defineEmits<{\n "update:modelValue": [value: any];\n }>();\n const forwarded = useForwardPropsEmits(useOmit(props, ["class"]), emits);\n\n const localModel = useVModel(props, "modelValue", emits);\n\n const styles = tv({\n base: "flex 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',
|
|
992
1045
|
},
|
|
993
1046
|
],
|
|
994
1047
|
utils: [],
|
|
995
1048
|
composables: [],
|
|
1049
|
+
plugins: [],
|
|
996
1050
|
},
|
|
997
1051
|
{
|
|
998
1052
|
name: "Keyboard Key",
|
|
@@ -1010,6 +1064,7 @@ export default [
|
|
|
1010
1064
|
],
|
|
1011
1065
|
utils: [],
|
|
1012
1066
|
composables: [],
|
|
1067
|
+
plugins: [],
|
|
1013
1068
|
},
|
|
1014
1069
|
{
|
|
1015
1070
|
name: "Label",
|
|
@@ -1022,11 +1077,54 @@ export default [
|
|
|
1022
1077
|
fileName: "Label.vue",
|
|
1023
1078
|
dirPath: "components/UI",
|
|
1024
1079
|
fileContent:
|
|
1025
|
-
'<template>\
|
|
1080
|
+
'<template>\n <Label :class="styles({ class: props.class })" v-bind="forwarded">\n <slot />\n </Label>\n</template>\n\n<script lang="ts" setup>\n import { Label, useForwardProps } from "radix-vue";\n import type { LabelProps } from "radix-vue";\n\n const props = defineProps<\n LabelProps & {\n class?: any;\n }\n >();\n const forwarded = useForwardProps(useOmit(props, ["class"]));\n\n const styles = tv({\n base: "inline-block text-base font-medium leading-none hover:cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70 sm:text-sm",\n });\n</script>\n',
|
|
1081
|
+
},
|
|
1082
|
+
],
|
|
1083
|
+
utils: [],
|
|
1084
|
+
composables: [],
|
|
1085
|
+
plugins: [],
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
name: "List",
|
|
1089
|
+
value: "list",
|
|
1090
|
+
deps: ["radix-vue", "tailwind-variants"],
|
|
1091
|
+
devDeps: [],
|
|
1092
|
+
nuxtModules: [],
|
|
1093
|
+
files: [
|
|
1094
|
+
{
|
|
1095
|
+
fileName: "List/Content.vue",
|
|
1096
|
+
dirPath: "components/UI",
|
|
1097
|
+
fileContent:
|
|
1098
|
+
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="props">\n <slot></slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue/dist/Primitive/Primitive";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n class?: any;\n }\n >(),\n {\n as: "div",\n }\n );\n\n const styles = tv({\n base: "flex flex-col gap-1 leading-none",\n });\n</script>\n',
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
fileName: "List/Item.vue",
|
|
1102
|
+
dirPath: "components/UI",
|
|
1103
|
+
fileContent:
|
|
1104
|
+
'<template>\n <component\n :is="eltype"\n :href="href"\n :to="to"\n @click="onClick"\n :class="\n styles({\n hover: Boolean(onClick) || Boolean(to) || Boolean(href),\n class: props.class,\n })\n "\n >\n <slot></slot>\n </component>\n</template>\n\n<script lang="ts" setup>\n const props = defineProps<{\n class?: any;\n onClick?: () => void;\n to?: string;\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',
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
fileName: "List/List.vue",
|
|
1108
|
+
dirPath: "components/UI",
|
|
1109
|
+
fileContent:
|
|
1110
|
+
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="props">\n <slot></slot>\n </Primitive>\n</template>\n\n<script lang="ts" setup>\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue/dist/Primitive/Primitive";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n class?: any;\n }\n >(),\n {\n as: "ul",\n }\n );\n\n const styles = tv({\n base: "w-full py-2",\n });\n</script>\n',
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
fileName: "List/Subtitle.vue",
|
|
1114
|
+
dirPath: "components/UI",
|
|
1115
|
+
fileContent:
|
|
1116
|
+
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="props">\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/dist/Primitive/Primitive";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n class?: any;\n subtitle?: string;\n }\n >(),\n {\n as: "p",\n }\n );\n\n const styles = tv({\n base: "text-sm text-muted-foreground",\n });\n</script>\n',
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
fileName: "List/Title.vue",
|
|
1120
|
+
dirPath: "components/UI",
|
|
1121
|
+
fileContent:
|
|
1122
|
+
'<template>\n <Primitive :class="styles({ class: props.class })" v-bind="props">\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/dist/Primitive/Primitive";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n class?: any;\n title?: string;\n }\n >(),\n {\n as: "p",\n }\n );\n\n const styles = tv({\n base: "font-semibold",\n });\n</script>\n',
|
|
1026
1123
|
},
|
|
1027
1124
|
],
|
|
1028
1125
|
utils: [],
|
|
1029
1126
|
composables: [],
|
|
1127
|
+
plugins: [],
|
|
1030
1128
|
},
|
|
1031
1129
|
{
|
|
1032
1130
|
name: "Menubar",
|
|
@@ -1146,6 +1244,7 @@ export default [
|
|
|
1146
1244
|
],
|
|
1147
1245
|
utils: [],
|
|
1148
1246
|
composables: [],
|
|
1247
|
+
plugins: [],
|
|
1149
1248
|
},
|
|
1150
1249
|
{
|
|
1151
1250
|
name: "Native Select",
|
|
@@ -1163,6 +1262,7 @@ export default [
|
|
|
1163
1262
|
],
|
|
1164
1263
|
utils: [],
|
|
1165
1264
|
composables: [],
|
|
1265
|
+
plugins: [],
|
|
1166
1266
|
},
|
|
1167
1267
|
{
|
|
1168
1268
|
name: "Navigation Menu",
|
|
@@ -1228,6 +1328,7 @@ export default [
|
|
|
1228
1328
|
],
|
|
1229
1329
|
utils: [],
|
|
1230
1330
|
composables: [],
|
|
1331
|
+
plugins: [],
|
|
1231
1332
|
},
|
|
1232
1333
|
{
|
|
1233
1334
|
name: "One-Time Password",
|
|
@@ -1245,6 +1346,7 @@ export default [
|
|
|
1245
1346
|
],
|
|
1246
1347
|
utils: [],
|
|
1247
1348
|
composables: [],
|
|
1349
|
+
plugins: [],
|
|
1248
1350
|
},
|
|
1249
1351
|
{
|
|
1250
1352
|
name: "Pagination",
|
|
@@ -1304,6 +1406,7 @@ export default [
|
|
|
1304
1406
|
],
|
|
1305
1407
|
utils: [],
|
|
1306
1408
|
composables: [],
|
|
1409
|
+
plugins: [],
|
|
1307
1410
|
},
|
|
1308
1411
|
{
|
|
1309
1412
|
name: "Popover",
|
|
@@ -1363,6 +1466,7 @@ export default [
|
|
|
1363
1466
|
],
|
|
1364
1467
|
utils: [],
|
|
1365
1468
|
composables: [],
|
|
1469
|
+
plugins: [],
|
|
1366
1470
|
},
|
|
1367
1471
|
{
|
|
1368
1472
|
name: "Progress",
|
|
@@ -1386,6 +1490,7 @@ export default [
|
|
|
1386
1490
|
],
|
|
1387
1491
|
utils: [],
|
|
1388
1492
|
composables: [],
|
|
1493
|
+
plugins: [],
|
|
1389
1494
|
},
|
|
1390
1495
|
{
|
|
1391
1496
|
name: "Radio Group",
|
|
@@ -1415,6 +1520,7 @@ export default [
|
|
|
1415
1520
|
],
|
|
1416
1521
|
utils: [],
|
|
1417
1522
|
composables: [],
|
|
1523
|
+
plugins: [],
|
|
1418
1524
|
},
|
|
1419
1525
|
{
|
|
1420
1526
|
name: "Scroll Area",
|
|
@@ -1456,6 +1562,7 @@ export default [
|
|
|
1456
1562
|
],
|
|
1457
1563
|
utils: [],
|
|
1458
1564
|
composables: [],
|
|
1565
|
+
plugins: [],
|
|
1459
1566
|
},
|
|
1460
1567
|
{
|
|
1461
1568
|
name: "Select",
|
|
@@ -1563,6 +1670,7 @@ export default [
|
|
|
1563
1670
|
],
|
|
1564
1671
|
utils: [],
|
|
1565
1672
|
composables: [],
|
|
1673
|
+
plugins: [],
|
|
1566
1674
|
},
|
|
1567
1675
|
{
|
|
1568
1676
|
name: "Separator",
|
|
@@ -1580,6 +1688,7 @@ export default [
|
|
|
1580
1688
|
],
|
|
1581
1689
|
utils: [],
|
|
1582
1690
|
composables: [],
|
|
1691
|
+
plugins: [],
|
|
1583
1692
|
},
|
|
1584
1693
|
{
|
|
1585
1694
|
name: "Sheet",
|
|
@@ -1657,6 +1766,7 @@ export default [
|
|
|
1657
1766
|
],
|
|
1658
1767
|
utils: [],
|
|
1659
1768
|
composables: [],
|
|
1769
|
+
plugins: [],
|
|
1660
1770
|
},
|
|
1661
1771
|
{
|
|
1662
1772
|
name: "Skeleton",
|
|
@@ -1674,6 +1784,7 @@ export default [
|
|
|
1674
1784
|
],
|
|
1675
1785
|
utils: [],
|
|
1676
1786
|
composables: [],
|
|
1787
|
+
plugins: [],
|
|
1677
1788
|
},
|
|
1678
1789
|
{
|
|
1679
1790
|
name: "Slider",
|
|
@@ -1709,6 +1820,7 @@ export default [
|
|
|
1709
1820
|
],
|
|
1710
1821
|
utils: [],
|
|
1711
1822
|
composables: [],
|
|
1823
|
+
plugins: [],
|
|
1712
1824
|
},
|
|
1713
1825
|
{
|
|
1714
1826
|
name: "Switch",
|
|
@@ -1732,6 +1844,7 @@ export default [
|
|
|
1732
1844
|
],
|
|
1733
1845
|
utils: [],
|
|
1734
1846
|
composables: [],
|
|
1847
|
+
plugins: [],
|
|
1735
1848
|
},
|
|
1736
1849
|
{
|
|
1737
1850
|
name: "Table",
|
|
@@ -1797,6 +1910,7 @@ export default [
|
|
|
1797
1910
|
],
|
|
1798
1911
|
utils: [],
|
|
1799
1912
|
composables: [],
|
|
1913
|
+
plugins: [],
|
|
1800
1914
|
},
|
|
1801
1915
|
{
|
|
1802
1916
|
name: "Tabs",
|
|
@@ -1832,6 +1946,7 @@ export default [
|
|
|
1832
1946
|
],
|
|
1833
1947
|
utils: [],
|
|
1834
1948
|
composables: [],
|
|
1949
|
+
plugins: [],
|
|
1835
1950
|
},
|
|
1836
1951
|
{
|
|
1837
1952
|
name: "Tanstack Table",
|
|
@@ -1850,6 +1965,7 @@ export default [
|
|
|
1850
1965
|
],
|
|
1851
1966
|
utils: [],
|
|
1852
1967
|
composables: [],
|
|
1968
|
+
plugins: [],
|
|
1853
1969
|
},
|
|
1854
1970
|
{
|
|
1855
1971
|
name: "Textarea",
|
|
@@ -1867,6 +1983,7 @@ export default [
|
|
|
1867
1983
|
],
|
|
1868
1984
|
utils: [],
|
|
1869
1985
|
composables: [],
|
|
1986
|
+
plugins: [],
|
|
1870
1987
|
},
|
|
1871
1988
|
{
|
|
1872
1989
|
name: "Toast",
|
|
@@ -1888,37 +2005,37 @@ export default [
|
|
|
1888
2005
|
fileName: "Toast/Action.vue",
|
|
1889
2006
|
dirPath: "components/UI",
|
|
1890
2007
|
fileContent:
|
|
1891
|
-
'<template>\
|
|
2008
|
+
'<template>\n <ToastAction :class="styles({ class: props.class })" v-bind="props">\n <slot></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 class?: any;\n }\n >(),\n {\n altText: "Action button",\n }\n );\n\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',
|
|
1892
2009
|
},
|
|
1893
2010
|
{
|
|
1894
2011
|
fileName: "Toast/Close.vue",
|
|
1895
2012
|
dirPath: "components/UI",
|
|
1896
2013
|
fileContent:
|
|
1897
|
-
'<template>\
|
|
2014
|
+
'<template>\n <ToastClose :class="styles({ class: props.class })" v-bind="props">\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 = withDefaults(\n defineProps<\n ToastCloseProps & {\n class?: any;\n icon?: string;\n }\n >(),\n {}\n );\n\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',
|
|
1898
2015
|
},
|
|
1899
2016
|
{
|
|
1900
2017
|
fileName: "Toast/Description.vue",
|
|
1901
2018
|
dirPath: "components/UI",
|
|
1902
2019
|
fileContent:
|
|
1903
|
-
'<template>\
|
|
2020
|
+
'<template>\n <ToastDescription :class="styles({ class: props.class })" v-bind="props">\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 description?: string;\n class?: any;\n }\n >();\n\n const styles = tv({\n base: "text-sm opacity-90",\n });\n</script>\n',
|
|
1904
2021
|
},
|
|
1905
2022
|
{
|
|
1906
2023
|
fileName: "Toast/Provider.vue",
|
|
1907
2024
|
dirPath: "components/UI",
|
|
1908
2025
|
fileContent:
|
|
1909
|
-
'<template>\
|
|
2026
|
+
'<template>\n <ToastProvider v-bind="props">\n <slot></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',
|
|
1910
2027
|
},
|
|
1911
2028
|
{
|
|
1912
2029
|
fileName: "Toast/Title.vue",
|
|
1913
2030
|
dirPath: "components/UI",
|
|
1914
2031
|
fileContent:
|
|
1915
|
-
'<template>\
|
|
2032
|
+
'<template>\n <ToastTitle :class="styles({ class: props.class })" v-bind="props">\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 title?: string;\n class?: any;\n }\n >();\n\n const styles = tv({\n base: "text-sm font-semibold",\n });\n</script>\n',
|
|
1916
2033
|
},
|
|
1917
2034
|
{
|
|
1918
2035
|
fileName: "Toast/Toast.vue",
|
|
1919
2036
|
dirPath: "components/UI",
|
|
1920
2037
|
fileContent:
|
|
1921
|
-
'<template>\
|
|
2038
|
+
'<template>\n <ToastRoot\n v-bind="forwarded"\n :class="styles({ variant, class: props.class })"\n @update:open="onOpenChange"\n >\n <slot></slot>\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 class?: any;\n variant?: VariantProps<typeof styles>["variant"];\n onOpenChange?: ((value: boolean) => void) | undefined;\n }\n\n const props = withDefaults(defineProps<ToastProps>(), {});\n\n const emits = defineEmits<ToastRootEmits>();\n const forwarded = useForwardPropsEmits(props, emits);\n\n const styles = tv({\n base: "group pointer-events-auto relative flex w-full items-center justify-between gap-4 overflow-hidden rounded-lg 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]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 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',
|
|
1922
2039
|
},
|
|
1923
2040
|
{
|
|
1924
2041
|
fileName: "Toast/Toaster.vue",
|
|
@@ -1930,10 +2047,11 @@ export default [
|
|
|
1930
2047
|
fileName: "Toast/Viewport.vue",
|
|
1931
2048
|
dirPath: "components/UI",
|
|
1932
2049
|
fileContent:
|
|
1933
|
-
'<template>\
|
|
2050
|
+
'<template>\n <ToastViewport :class="styles({ class: props.class })" v-bind="props">\n <slot></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 class?: any;\n }\n >();\n\n const styles = tv({\n base: "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-4 p-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:bottom-0 sm:right-0 sm:top-0 sm:flex-col md:max-w-[420px]",\n });\n</script>\n',
|
|
1934
2051
|
},
|
|
1935
2052
|
],
|
|
1936
2053
|
utils: [],
|
|
2054
|
+
plugins: [],
|
|
1937
2055
|
},
|
|
1938
2056
|
{
|
|
1939
2057
|
name: "Toggle",
|
|
@@ -1951,6 +2069,7 @@ export default [
|
|
|
1951
2069
|
],
|
|
1952
2070
|
utils: [],
|
|
1953
2071
|
composables: [],
|
|
2072
|
+
plugins: [],
|
|
1954
2073
|
},
|
|
1955
2074
|
{
|
|
1956
2075
|
name: "Tooltip",
|
|
@@ -1998,6 +2117,7 @@ export default [
|
|
|
1998
2117
|
],
|
|
1999
2118
|
utils: [],
|
|
2000
2119
|
composables: [],
|
|
2120
|
+
plugins: [],
|
|
2001
2121
|
},
|
|
2002
2122
|
{
|
|
2003
2123
|
name: "VeeCheckbox",
|
|
@@ -2017,6 +2137,7 @@ export default [
|
|
|
2017
2137
|
],
|
|
2018
2138
|
utils: [],
|
|
2019
2139
|
composables: [],
|
|
2140
|
+
plugins: [],
|
|
2020
2141
|
},
|
|
2021
2142
|
{
|
|
2022
2143
|
name: "VeeFileInput",
|
|
@@ -2031,11 +2152,12 @@ export default [
|
|
|
2031
2152
|
fileName: "Vee/FileInput.vue",
|
|
2032
2153
|
dirPath: "components/UI",
|
|
2033
2154
|
fileContent:
|
|
2034
|
-
'<template>\
|
|
2155
|
+
'<template>\n <div class="w-full">\n <UILabel :for="inputId" v-if="label" :class="[errorMessage && \'text-destructive\', \'mb-2\']">{{\n label\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 :name="icon" v-if="icon" class="h-4 w-4 text-muted-foreground/70" />\n </span>\n </slot>\n <UIInput\n type="file"\n @change="\n handleChange($event);\n emits(\'change\', $event.target.files);\n "\n @blur="\n handleBlur($event);\n emits(\'blur\', $event);\n "\n :id="inputId"\n :name="name"\n v-bind="$attrs"\n :multiple="multiple"\n :class="[hasIcon && \'pl-9\']"\n :accept="accept"\n />\n </div>\n <TransitionSlide group tag="div">\n <p key="hint" class="mt-1.5 text-sm text-muted-foreground" v-if="hint && !errorMessage">\n {{ hint }}\n </p>\n\n <p key="errorMessage" class="mt-1.5 text-sm text-destructive" v-if="errorMessage">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n import { useId } from "radix-vue";\n\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 }>();\n\n defineOptions({ inheritAttrs: false });\n\n const emits = defineEmits<{\n change: [files?: FileList | File | File[] | null];\n blur: [event?: FocusEvent];\n }>();\n\n const inputId = useId(props.id);\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',
|
|
2035
2156
|
},
|
|
2036
2157
|
],
|
|
2037
2158
|
utils: [],
|
|
2038
2159
|
composables: [],
|
|
2160
|
+
plugins: [],
|
|
2039
2161
|
},
|
|
2040
2162
|
{
|
|
2041
2163
|
name: "VeeInput",
|
|
@@ -2050,11 +2172,12 @@ export default [
|
|
|
2050
2172
|
fileName: "Vee/Input.vue",
|
|
2051
2173
|
dirPath: "components/UI",
|
|
2052
2174
|
fileContent:
|
|
2053
|
-
'<template>\
|
|
2175
|
+
'<template>\n <div class="w-full">\n <UILabel :for="inputId" v-if="label" :class="[errorMessage && \'text-destructive\', \'mb-2\']">{{\n label\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 :name="icon" v-if="icon" class="h-4 w-4 text-muted-foreground/70" />\n </span>\n </slot>\n <UIInput\n :type="type"\n v-model="value"\n @blur="handleBlur"\n :id="inputId"\n :name="name"\n v-bind="$attrs"\n :class="[hasIcon && \'pl-9\']"\n :placeholder="placeholder"\n />\n </div>\n <TransitionSlide group tag="div">\n <p key="hint" class="mt-1.5 text-sm text-muted-foreground" v-if="hint && !errorMessage">\n {{ hint }}\n </p>\n\n <p key="errorMessage" class="mt-1.5 text-sm text-destructive" v-if="errorMessage">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n import { useId } from "radix-vue";\n\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 placeholder?: string;\n }>();\n\n defineOptions({ inheritAttrs: false });\n\n const inputId = useId(props.id);\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',
|
|
2054
2176
|
},
|
|
2055
2177
|
],
|
|
2056
2178
|
utils: [],
|
|
2057
2179
|
composables: [],
|
|
2180
|
+
plugins: [],
|
|
2058
2181
|
},
|
|
2059
2182
|
{
|
|
2060
2183
|
name: "VeeRadioGroup",
|
|
@@ -2074,6 +2197,7 @@ export default [
|
|
|
2074
2197
|
],
|
|
2075
2198
|
utils: [],
|
|
2076
2199
|
composables: [],
|
|
2200
|
+
plugins: [],
|
|
2077
2201
|
},
|
|
2078
2202
|
{
|
|
2079
2203
|
name: "VeeSelect",
|
|
@@ -2088,11 +2212,12 @@ export default [
|
|
|
2088
2212
|
fileName: "Vee/Select.vue",
|
|
2089
2213
|
dirPath: "components/UI",
|
|
2090
2214
|
fileContent:
|
|
2091
|
-
'<template>\
|
|
2215
|
+
'<template>\n <div class="w-full">\n <UILabel :for="inputId" v-if="label" :class="[errorMessage && \'text-destructive\', \'mb-2\']">{{\n label\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 :name="icon" v-if="icon" class="h-4 w-4 text-muted-foreground" />\n </span>\n </slot>\n <UINativeSelect\n :trailingIcon="trailingIcon"\n v-model="value"\n @blur="handleBlur"\n :id="inputId"\n :name="name"\n v-bind="$attrs"\n :class="[hasIcon && \'pl-9\']"\n >\n <slot></slot>\n </UINativeSelect>\n </div>\n <TransitionSlide group tag="div">\n <p key="hint" class="mt-1.5 text-sm text-muted-foreground" v-if="hint && !errorMessage">\n {{ hint }}\n </p>\n\n <p key="errorMessage" class="mt-1.5 text-sm text-destructive" v-if="errorMessage">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n import { useId } from "radix-vue";\n\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 }>();\n\n defineOptions({ inheritAttrs: false });\n\n const inputId = useId(props.id);\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',
|
|
2092
2216
|
},
|
|
2093
2217
|
],
|
|
2094
2218
|
utils: [],
|
|
2095
2219
|
composables: [],
|
|
2220
|
+
plugins: [],
|
|
2096
2221
|
},
|
|
2097
2222
|
{
|
|
2098
2223
|
name: "Vue Sonner",
|
|
@@ -2106,11 +2231,12 @@ export default [
|
|
|
2106
2231
|
fileName: "VueSonner.client.vue",
|
|
2107
2232
|
dirPath: "components/UI",
|
|
2108
2233
|
fileContent:
|
|
2109
|
-
'<template>\
|
|
2234
|
+
'<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',
|
|
2110
2235
|
},
|
|
2111
2236
|
],
|
|
2112
2237
|
utils: [],
|
|
2113
2238
|
composables: [],
|
|
2239
|
+
plugins: [],
|
|
2114
2240
|
},
|
|
2115
2241
|
{
|
|
2116
2242
|
name: "VeeTextarea",
|
|
@@ -2125,10 +2251,11 @@ export default [
|
|
|
2125
2251
|
fileName: "Vee/Textarea.vue",
|
|
2126
2252
|
dirPath: "components/UI",
|
|
2127
2253
|
fileContent:
|
|
2128
|
-
'<template>\
|
|
2254
|
+
'<template>\n <div class="w-full">\n <UILabel :for="inputId" v-if="label" :class="[errorMessage && \'text-destructive\', \'mb-2\']">{{\n label\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 :name="icon" v-if="icon" class="h-4 w-4 text-muted-foreground/70" />\n </span>\n </slot>\n <UITextarea\n :rows="rows"\n v-model="value"\n @blur="handleBlur"\n :id="inputId"\n :name="name"\n v-bind="$attrs"\n :class="[hasIcon && \'pl-9\']"\n :placeholder="placeholder"\n />\n </div>\n <TransitionSlide group tag="div">\n <p key="hint" class="mt-1.5 text-sm text-muted-foreground" v-if="hint && !errorMessage">\n {{ hint }}\n </p>\n\n <p key="errorMessage" class="mt-1.5 text-sm text-destructive" v-if="errorMessage">\n {{ errorMessage }}\n </p>\n </TransitionSlide>\n </div>\n</template>\n\n<script lang="ts" setup>\n import { useId } from "radix-vue";\n\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 }>();\n\n defineOptions({ inheritAttrs: false });\n\n const inputId = useId(props.id);\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',
|
|
2129
2255
|
},
|
|
2130
2256
|
],
|
|
2131
2257
|
utils: [],
|
|
2132
2258
|
composables: [],
|
|
2259
|
+
plugins: [],
|
|
2133
2260
|
},
|
|
2134
2261
|
];
|