una-nuxt-module 2.1.28 → 2.1.30

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.
Files changed (82) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/components/ui/alert-dialog/AlertDialogAction.vue +1 -1
  4. package/dist/runtime/components/ui/alert-dialog/AlertDialogCancel.vue +1 -1
  5. package/dist/runtime/components/ui/auto-form/AutoForm.d.vue.ts +4 -4
  6. package/dist/runtime/components/ui/auto-form/AutoForm.vue +8 -6
  7. package/dist/runtime/components/ui/auto-form/AutoForm.vue.d.ts +4 -4
  8. package/dist/runtime/components/ui/auto-form/AutoFormFieldArray.vue +21 -8
  9. package/dist/runtime/components/ui/auto-form/AutoFormFieldBoolean.d.vue.ts +1 -1
  10. package/dist/runtime/components/ui/auto-form/AutoFormFieldBoolean.vue +18 -6
  11. package/dist/runtime/components/ui/auto-form/AutoFormFieldBoolean.vue.d.ts +1 -1
  12. package/dist/runtime/components/ui/auto-form/AutoFormFieldDate.vue +4 -8
  13. package/dist/runtime/components/ui/auto-form/AutoFormFieldEnum.d.vue.ts +1 -1
  14. package/dist/runtime/components/ui/auto-form/AutoFormFieldEnum.vue +44 -9
  15. package/dist/runtime/components/ui/auto-form/AutoFormFieldEnum.vue.d.ts +1 -1
  16. package/dist/runtime/components/ui/auto-form/AutoFormFieldFile.d.vue.ts +1 -1
  17. package/dist/runtime/components/ui/auto-form/AutoFormFieldFile.vue +27 -14
  18. package/dist/runtime/components/ui/auto-form/AutoFormFieldFile.vue.d.ts +1 -1
  19. package/dist/runtime/components/ui/auto-form/AutoFormFieldInput.d.vue.ts +1 -1
  20. package/dist/runtime/components/ui/auto-form/AutoFormFieldInput.vue +12 -4
  21. package/dist/runtime/components/ui/auto-form/AutoFormFieldInput.vue.d.ts +1 -1
  22. package/dist/runtime/components/ui/auto-form/AutoFormFieldNumber.d.vue.ts +1 -1
  23. package/dist/runtime/components/ui/auto-form/AutoFormFieldNumber.vue +13 -3
  24. package/dist/runtime/components/ui/auto-form/AutoFormFieldNumber.vue.d.ts +1 -1
  25. package/dist/runtime/components/ui/auto-form/AutoFormFieldObject.vue +22 -8
  26. package/dist/runtime/components/ui/auto-form/AutoFormLabel.vue +1 -1
  27. package/dist/runtime/components/ui/button-group/ButtonGroupSeparator.vue +1 -1
  28. package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue +1 -1
  29. package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +1 -1
  30. package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +1 -1
  31. package/dist/runtime/components/ui/carousel/CarouselNext.d.vue.ts +1 -1
  32. package/dist/runtime/components/ui/carousel/CarouselNext.vue +1 -1
  33. package/dist/runtime/components/ui/carousel/CarouselNext.vue.d.ts +1 -1
  34. package/dist/runtime/components/ui/carousel/CarouselPrevious.d.vue.ts +1 -1
  35. package/dist/runtime/components/ui/carousel/CarouselPrevious.vue +1 -1
  36. package/dist/runtime/components/ui/carousel/CarouselPrevious.vue.d.ts +1 -1
  37. package/dist/runtime/components/ui/chart/ChartLegend.vue +18 -9
  38. package/dist/runtime/components/ui/chart/ChartTooltip.vue +1 -1
  39. package/dist/runtime/components/ui/chart-area/AreaChart.vue +1 -5
  40. package/dist/runtime/components/ui/chart-bar/BarChart.vue +1 -5
  41. package/dist/runtime/components/ui/chart-donut/DonutChart.vue +1 -4
  42. package/dist/runtime/components/ui/chart-line/LineChart.vue +1 -5
  43. package/dist/runtime/components/ui/command/CommandDialog.vue +8 -2
  44. package/dist/runtime/components/ui/field/FieldLabel.vue +1 -1
  45. package/dist/runtime/components/ui/field/FieldSeparator.vue +1 -1
  46. package/dist/runtime/components/ui/form/FormLabel.vue +1 -1
  47. package/dist/runtime/components/ui/input-group/InputGroupButton.vue +1 -1
  48. package/dist/runtime/components/ui/input-group/InputGroupInput.vue +1 -1
  49. package/dist/runtime/components/ui/input-group/InputGroupTextarea.vue +1 -1
  50. package/dist/runtime/components/ui/input-group/index.d.ts +1 -1
  51. package/dist/runtime/components/ui/input-group/index.js +2 -2
  52. package/dist/runtime/components/ui/item/ItemSeparator.vue +1 -1
  53. package/dist/runtime/components/ui/pagination/PaginationFirst.d.vue.ts +1 -1
  54. package/dist/runtime/components/ui/pagination/PaginationFirst.vue +1 -1
  55. package/dist/runtime/components/ui/pagination/PaginationFirst.vue.d.ts +1 -1
  56. package/dist/runtime/components/ui/pagination/PaginationItem.d.vue.ts +1 -1
  57. package/dist/runtime/components/ui/pagination/PaginationItem.vue +1 -1
  58. package/dist/runtime/components/ui/pagination/PaginationItem.vue.d.ts +1 -1
  59. package/dist/runtime/components/ui/pagination/PaginationLast.d.vue.ts +1 -1
  60. package/dist/runtime/components/ui/pagination/PaginationLast.vue +1 -1
  61. package/dist/runtime/components/ui/pagination/PaginationLast.vue.d.ts +1 -1
  62. package/dist/runtime/components/ui/pagination/PaginationNext.d.vue.ts +1 -1
  63. package/dist/runtime/components/ui/pagination/PaginationNext.vue +1 -1
  64. package/dist/runtime/components/ui/pagination/PaginationNext.vue.d.ts +1 -1
  65. package/dist/runtime/components/ui/pagination/PaginationPrevious.d.vue.ts +1 -1
  66. package/dist/runtime/components/ui/pagination/PaginationPrevious.vue +1 -1
  67. package/dist/runtime/components/ui/pagination/PaginationPrevious.vue.d.ts +1 -1
  68. package/dist/runtime/components/ui/range-calendar/RangeCalendarCellTrigger.vue +1 -1
  69. package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue +1 -1
  70. package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue +1 -1
  71. package/dist/runtime/components/ui/sidebar/Sidebar.vue +4 -4
  72. package/dist/runtime/components/ui/sidebar/SidebarInput.vue +1 -1
  73. package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue +5 -2
  74. package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue +1 -1
  75. package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue +1 -1
  76. package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +1 -1
  77. package/dist/runtime/components/ui/toggle-group/ToggleGroup.d.vue.ts +1 -1
  78. package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue.d.ts +1 -1
  79. package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.d.vue.ts +1 -1
  80. package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.vue +1 -1
  81. package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.vue.d.ts +1 -1
  82. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "2.1.28",
3
+ "version": "2.1.30",
4
4
  "configKey": "unaxt",
5
5
  "compatibility": {
6
6
  "nuxt": ">=4.0.0"
package/dist/module.mjs CHANGED
@@ -198,7 +198,7 @@ function addTemplates() {
198
198
  }
199
199
 
200
200
  const name = "una-nuxt-module";
201
- const version = "2.1.28";
201
+ const version = "2.1.30";
202
202
 
203
203
  const module = defineNuxtModule({
204
204
  meta: {
@@ -2,7 +2,7 @@
2
2
  import { reactiveOmit } from "@vueuse/core";
3
3
  import { AlertDialogAction } from "reka-ui";
4
4
  import cn from "../../../utils/cn";
5
- import { buttonVariants } from "~/src/runtime/components/ui/button";
5
+ import { buttonVariants } from "../button";
6
6
  const props = defineProps({
7
7
  asChild: { type: Boolean, required: false },
8
8
  as: { type: null, required: false },
@@ -2,7 +2,7 @@
2
2
  import { reactiveOmit } from "@vueuse/core";
3
3
  import { AlertDialogCancel } from "reka-ui";
4
4
  import cn from "../../../utils/cn";
5
- import { buttonVariants } from "~/src/runtime/components/ui/button";
5
+ import { buttonVariants } from "../button";
6
6
  const props = defineProps({
7
7
  asChild: { type: Boolean, required: false },
8
8
  as: { type: null, required: false },
@@ -1,7 +1,7 @@
1
- import type { FormContext, GenericObject } from 'vee-validate';
2
- import type { z } from 'zod';
3
- import type { Config, ConfigItem, Dependency, Shape } from './interface.js';
4
- import { type ZodObjectOrWrapped } from './utils.js';
1
+ import type { FormContext, GenericObject } from "vee-validate";
2
+ import type { z } from "zod";
3
+ import type { Config, ConfigItem, Dependency, Shape } from "./interface.js";
4
+ import { type ZodObjectOrWrapped } from "./utils.js";
5
5
  declare const _default: <T extends ZodObjectOrWrapped>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6
6
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
7
7
  readonly onSubmit?: ((event: z.TypeOf<T>) => any) | undefined;
@@ -1,10 +1,15 @@
1
1
  <script setup>
2
- import { Form } from "~/src/runtime/components/ui/form";
2
+ import { Form } from "../form";
3
3
  import { toTypedSchema } from "@vee-validate/zod";
4
4
  import { computed, toRefs } from "vue";
5
5
  import AutoFormField from "./AutoFormField.vue";
6
6
  import { provideDependencies } from "./dependencies";
7
- import { getBaseSchema, getBaseType, getDefaultValueInZodStack, getObjectFormSchema } from "./utils";
7
+ import {
8
+ getBaseSchema,
9
+ getBaseType,
10
+ getDefaultValueInZodStack,
11
+ getObjectFormSchema
12
+ } from "./utils";
8
13
  const props = defineProps({
9
14
  schema: { type: null, required: true },
10
15
  form: { type: Object, required: false },
@@ -64,10 +69,7 @@ const formComponentProps = computed(() => {
64
69
  </script>
65
70
 
66
71
  <template>
67
- <component
68
- :is="formComponent"
69
- v-bind="formComponentProps"
70
- >
72
+ <component :is="formComponent" v-bind="formComponentProps">
71
73
  <slot name="customAutoForm" :fields="fields">
72
74
  <template v-for="(shape, key) of shapes" :key="key">
73
75
  <slot
@@ -1,7 +1,7 @@
1
- import type { FormContext, GenericObject } from 'vee-validate';
2
- import type { z } from 'zod';
3
- import type { Config, ConfigItem, Dependency, Shape } from './interface.js';
4
- import { type ZodObjectOrWrapped } from './utils.js';
1
+ import type { FormContext, GenericObject } from "vee-validate";
2
+ import type { z } from "zod";
3
+ import type { Config, ConfigItem, Dependency, Shape } from "./interface.js";
4
+ import { type ZodObjectOrWrapped } from "./utils.js";
5
5
  declare const _default: <T extends ZodObjectOrWrapped>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6
6
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
7
7
  readonly onSubmit?: ((event: z.TypeOf<T>) => any) | undefined;
@@ -1,8 +1,13 @@
1
1
  <script setup>
2
- import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "~/src/runtime/components/ui/accordion";
3
- import { Button } from "~/src/runtime/components/ui/button";
4
- import { FormItem, FormMessage } from "~/src/runtime/components/ui/form";
5
- import { Separator } from "~/src/runtime/components/ui/separator";
2
+ import {
3
+ Accordion,
4
+ AccordionContent,
5
+ AccordionItem,
6
+ AccordionTrigger
7
+ } from "../accordion";
8
+ import { Button } from "../button";
9
+ import { FormItem, FormMessage } from "../form";
10
+ import { Separator } from "../separator";
6
11
  import { PlusIcon, TrashIcon } from "lucide-vue-next";
7
12
  import { FieldArray, FieldContextKey, useField } from "vee-validate";
8
13
  import { computed, provide } from "vue";
@@ -24,9 +29,11 @@ function isZodDefault(item) {
24
29
  return item instanceof z.ZodDefault;
25
30
  }
26
31
  const itemShape = computed(() => {
27
- if (!props.schema)
28
- return;
29
- const schema = isZodArray(props.schema) ? props.schema._def.type : isZodDefault(props.schema) ? props.schema._def.innerType._def.type : null;
32
+ if (!props.schema) return;
33
+ const schema = isZodArray(props.schema) ? props.schema._def.type : isZodDefault(props.schema) ? (
34
+ // @ts-expect-error missing schema
35
+ props.schema._def.innerType._def.type
36
+ ) : null;
30
37
  return {
31
38
  type: getBaseType(schema),
32
39
  schema
@@ -39,7 +46,13 @@ provide(FieldContextKey, fieldContext);
39
46
  <template>
40
47
  <FieldArray v-slot="{ fields, remove, push }" as="section" :name="fieldName">
41
48
  <slot v-bind="props">
42
- <Accordion type="multiple" class="w-full" collapsible :disabled="disabled" as-child>
49
+ <Accordion
50
+ type="multiple"
51
+ class="w-full"
52
+ collapsible
53
+ :disabled="disabled"
54
+ as-child
55
+ >
43
56
  <FormItem>
44
57
  <AccordionItem :value="fieldName" class="border-none">
45
58
  <AccordionTrigger>
@@ -1,4 +1,4 @@
1
- import type { FieldProps } from './interface.js';
1
+ import type { FieldProps } from "./interface.js";
2
2
  declare var __VLS_17: {
3
3
  field: import("vee-validate").FieldBindingObject<any>;
4
4
  componentField: import("vee-validate").ComponentFieldBindingObject<any>;
@@ -1,7 +1,13 @@
1
1
  <script setup>
2
- import { Checkbox } from "~/src/runtime/components/ui/checkbox";
3
- import { FormControl, FormDescription, FormField, FormItem, FormMessage } from "~/src/runtime/components/ui/form";
4
- import { Switch } from "~/src/runtime/components/ui/switch";
2
+ import { Checkbox } from "../checkbox";
3
+ import {
4
+ FormControl,
5
+ FormDescription,
6
+ FormField,
7
+ FormItem,
8
+ FormMessage
9
+ } from "../form";
10
+ import { Switch } from "../switch";
5
11
  import { computed } from "vue";
6
12
  import AutoFormLabel from "./AutoFormLabel.vue";
7
13
  import { beautifyObjectName, maybeBooleanishToBoolean } from "./utils";
@@ -12,7 +18,9 @@ const props = defineProps({
12
18
  config: { type: Object, required: false },
13
19
  disabled: { type: Boolean, required: false }
14
20
  });
15
- const booleanComponent = computed(() => props.config?.component === "switch" ? Switch : Checkbox);
21
+ const booleanComponent = computed(
22
+ () => props.config?.component === "switch" ? Switch : Checkbox
23
+ );
16
24
  </script>
17
25
 
18
26
  <template>
@@ -23,10 +31,14 @@ const booleanComponent = computed(() => props.config?.component === "switch" ? S
23
31
  <slot v-bind="slotProps">
24
32
  <component
25
33
  :is="booleanComponent"
26
- :disabled="maybeBooleanishToBoolean(config?.inputProps?.disabled) ?? disabled"
34
+ :disabled="
35
+ maybeBooleanishToBoolean(config?.inputProps?.disabled) ?? disabled
36
+ "
27
37
  :name="slotProps.componentField.name"
28
38
  :model-value="slotProps.componentField.modelValue"
29
- @update:model-value="slotProps.componentField['onUpdate:modelValue']"
39
+ @update:model-value="
40
+ slotProps.componentField['onUpdate:modelValue']
41
+ "
30
42
  />
31
43
  </slot>
32
44
  </FormControl>
@@ -1,4 +1,4 @@
1
- import type { FieldProps } from './interface.js';
1
+ import type { FieldProps } from "./interface.js";
2
2
  declare var __VLS_17: {
3
3
  field: import("vee-validate").FieldBindingObject<any>;
4
4
  componentField: import("vee-validate").ComponentFieldBindingObject<any>;
@@ -1,19 +1,15 @@
1
1
  <script setup>
2
2
  import cn from "../../../utils/cn";
3
- import { Button } from "~/src/runtime/components/ui/button";
4
- import { Calendar } from "~/src/runtime/components/ui/calendar";
3
+ import { Button } from "../button";
4
+ import { Calendar } from "../calendar";
5
5
  import {
6
6
  FormControl,
7
7
  FormDescription,
8
8
  FormField,
9
9
  FormItem,
10
10
  FormMessage
11
- } from "~/src/runtime/components/ui/form";
12
- import {
13
- Popover,
14
- PopoverContent,
15
- PopoverTrigger
16
- } from "~/src/runtime/components/ui/popover";
11
+ } from "../form";
12
+ import { Popover, PopoverContent, PopoverTrigger } from "../popover";
17
13
  import { DateFormatter, getLocalTimeZone } from "@internationalized/date";
18
14
  import { CalendarIcon } from "lucide-vue-next";
19
15
  import AutoFormLabel from "./AutoFormLabel.vue";
@@ -1,4 +1,4 @@
1
- import type { FieldProps } from './interface.js';
1
+ import type { FieldProps } from "./interface.js";
2
2
  type __VLS_Props = FieldProps & {
3
3
  options?: string[];
4
4
  };
@@ -1,8 +1,20 @@
1
1
  <script setup>
2
- import { FormControl, FormDescription, FormField, FormItem, FormMessage } from "~/src/runtime/components/ui/form";
3
- import { Label } from "~/src/runtime/components/ui/label";
4
- import { RadioGroup, RadioGroupItem } from "~/src/runtime/components/ui/radio-group";
5
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "~/src/runtime/components/ui/select";
2
+ import {
3
+ FormControl,
4
+ FormDescription,
5
+ FormField,
6
+ FormItem,
7
+ FormMessage
8
+ } from "../form";
9
+ import { Label } from "../label";
10
+ import { RadioGroup, RadioGroupItem } from "../radio-group";
11
+ import {
12
+ Select,
13
+ SelectContent,
14
+ SelectItem,
15
+ SelectTrigger,
16
+ SelectValue
17
+ } from "../select";
6
18
  import AutoFormLabel from "./AutoFormLabel.vue";
7
19
  import { beautifyObjectName, maybeBooleanishToBoolean } from "./utils";
8
20
  defineProps({
@@ -23,19 +35,42 @@ defineProps({
23
35
  </AutoFormLabel>
24
36
  <FormControl>
25
37
  <slot v-bind="slotProps">
26
- <RadioGroup v-if="config?.component === 'radio'" :disabled="maybeBooleanishToBoolean(config?.inputProps?.disabled) ?? disabled" :orientation="'vertical'" v-bind="{ ...slotProps.componentField }">
27
- <div v-for="(option, index) in options" :key="option" class="mb-2 flex items-center gap-3 space-y-0">
38
+ <RadioGroup
39
+ v-if="config?.component === 'radio'"
40
+ :disabled="
41
+ maybeBooleanishToBoolean(config?.inputProps?.disabled) ?? disabled
42
+ "
43
+ :orientation="'vertical'"
44
+ v-bind="{ ...slotProps.componentField }"
45
+ >
46
+ <div
47
+ v-for="(option, index) in options"
48
+ :key="option"
49
+ class="mb-2 flex items-center gap-3 space-y-0"
50
+ >
28
51
  <RadioGroupItem :id="`${option}-${index}`" :value="option" />
29
- <Label :for="`${option}-${index}`">{{ beautifyObjectName(option) }}</Label>
52
+ <Label :for="`${option}-${index}`">{{
53
+ beautifyObjectName(option)
54
+ }}</Label>
30
55
  </div>
31
56
  </RadioGroup>
32
57
 
33
- <Select v-else :disabled="maybeBooleanishToBoolean(config?.inputProps?.disabled) ?? disabled" v-bind="{ ...slotProps.componentField }">
58
+ <Select
59
+ v-else
60
+ :disabled="
61
+ maybeBooleanishToBoolean(config?.inputProps?.disabled) ?? disabled
62
+ "
63
+ v-bind="{ ...slotProps.componentField }"
64
+ >
34
65
  <SelectTrigger class="w-full">
35
66
  <SelectValue :placeholder="config?.inputProps?.placeholder" />
36
67
  </SelectTrigger>
37
68
  <SelectContent>
38
- <SelectItem v-for="option in options" :key="option" :value="option">
69
+ <SelectItem
70
+ v-for="option in options"
71
+ :key="option"
72
+ :value="option"
73
+ >
39
74
  {{ beautifyObjectName(option) }}
40
75
  </SelectItem>
41
76
  </SelectContent>
@@ -1,4 +1,4 @@
1
- import type { FieldProps } from './interface.js';
1
+ import type { FieldProps } from "./interface.js";
2
2
  type __VLS_Props = FieldProps & {
3
3
  options?: string[];
4
4
  };
@@ -1,4 +1,4 @@
1
- import type { FieldProps } from './interface.js';
1
+ import type { FieldProps } from "./interface.js";
2
2
  declare var __VLS_21: {
3
3
  field: import("vee-validate").FieldBindingObject<any>;
4
4
  componentField: import("vee-validate").ComponentFieldBindingObject<any>;
@@ -1,7 +1,13 @@
1
1
  <script setup>
2
- import { Button } from "~/src/runtime/components/ui/button";
3
- import { FormControl, FormDescription, FormField, FormItem, FormMessage } from "~/src/runtime/components/ui/form";
4
- import { Input } from "~/src/runtime/components/ui/input";
2
+ import { Button } from "../button";
3
+ import {
4
+ FormControl,
5
+ FormDescription,
6
+ FormField,
7
+ FormItem,
8
+ FormMessage
9
+ } from "../form";
10
+ import { Input } from "../input";
5
11
  import { Trash } from "lucide-vue-next";
6
12
  import { ref } from "vue";
7
13
  import AutoFormLabel from "./AutoFormLabel.vue";
@@ -43,14 +49,19 @@ async function parseFileAsString(file) {
43
49
  type="file"
44
50
  v-bind="{ ...config?.inputProps }"
45
51
  :disabled="config?.inputProps?.disabled ?? disabled"
46
- @change="async (ev) => {
47
- const file = ev.target.files?.[0];
48
- inputFile = file;
49
- const parsed = await parseFileAsString(file);
50
- slotProps.componentField.onInput(parsed);
51
- }"
52
+ @change="
53
+ async (ev) => {
54
+ const file = ev.target.files?.[0];
55
+ inputFile = file;
56
+ const parsed = await parseFileAsString(file);
57
+ slotProps.componentField.onInput(parsed);
58
+ }
59
+ "
52
60
  />
53
- <div v-else class="flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent pl-3 pr-1 py-1 text-sm shadow-sm transition-colors">
61
+ <div
62
+ v-else
63
+ class="flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent pl-3 pr-1 py-1 text-sm shadow-sm transition-colors"
64
+ >
54
65
  <p>{{ inputFile?.name }}</p>
55
66
  <Button
56
67
  :size="'icon'"
@@ -58,10 +69,12 @@ async function parseFileAsString(file) {
58
69
  class="h-[26px] w-[26px]"
59
70
  aria-label="Remove file"
60
71
  type="button"
61
- @click="() => {
62
- inputFile = void 0;
63
- slotProps.componentField.onInput(void 0);
64
- }"
72
+ @click="
73
+ () => {
74
+ inputFile = void 0;
75
+ slotProps.componentField.onInput(void 0);
76
+ }
77
+ "
65
78
  >
66
79
  <Trash />
67
80
  </Button>
@@ -1,4 +1,4 @@
1
- import type { FieldProps } from './interface.js';
1
+ import type { FieldProps } from "./interface.js";
2
2
  declare var __VLS_21: {
3
3
  field: import("vee-validate").FieldBindingObject<any>;
4
4
  componentField: import("vee-validate").ComponentFieldBindingObject<any>;
@@ -1,4 +1,4 @@
1
- import type { FieldProps } from './interface.js';
1
+ import type { FieldProps } from "./interface.js";
2
2
  declare var __VLS_21: {
3
3
  field: import("vee-validate").FieldBindingObject<any>;
4
4
  componentField: import("vee-validate").ComponentFieldBindingObject<any>;
@@ -1,7 +1,13 @@
1
1
  <script setup>
2
- import { FormControl, FormDescription, FormField, FormItem, FormMessage } from "~/src/runtime/components/ui/form";
3
- import { Input } from "~/src/runtime/components/ui/input";
4
- import { Textarea } from "~/src/runtime/components/ui/textarea";
2
+ import {
3
+ FormControl,
4
+ FormDescription,
5
+ FormField,
6
+ FormItem,
7
+ FormMessage
8
+ } from "../form";
9
+ import { Input } from "../input";
10
+ import { Textarea } from "../textarea";
5
11
  import { computed } from "vue";
6
12
  import AutoFormLabel from "./AutoFormLabel.vue";
7
13
  import { beautifyObjectName } from "./utils";
@@ -12,7 +18,9 @@ const props = defineProps({
12
18
  config: { type: Object, required: false },
13
19
  disabled: { type: Boolean, required: false }
14
20
  });
15
- const inputComponent = computed(() => props.config?.component === "textarea" ? Textarea : Input);
21
+ const inputComponent = computed(
22
+ () => props.config?.component === "textarea" ? Textarea : Input
23
+ );
16
24
  </script>
17
25
 
18
26
  <template>
@@ -1,4 +1,4 @@
1
- import type { FieldProps } from './interface.js';
1
+ import type { FieldProps } from "./interface.js";
2
2
  declare var __VLS_21: {
3
3
  field: import("vee-validate").FieldBindingObject<any>;
4
4
  componentField: import("vee-validate").ComponentFieldBindingObject<any>;
@@ -1,4 +1,4 @@
1
- import type { FieldProps } from './interface.js';
1
+ import type { FieldProps } from "./interface.js";
2
2
  declare var __VLS_21: {
3
3
  field: import("vee-validate").FieldBindingObject<any>;
4
4
  componentField: import("vee-validate").ComponentFieldBindingObject<any>;
@@ -1,6 +1,12 @@
1
1
  <script setup>
2
- import { FormControl, FormDescription, FormField, FormItem, FormMessage } from "~/src/runtime/components/ui/form";
3
- import { Input } from "~/src/runtime/components/ui/input";
2
+ import {
3
+ FormControl,
4
+ FormDescription,
5
+ FormField,
6
+ FormItem,
7
+ FormMessage
8
+ } from "../form";
9
+ import { Input } from "../input";
4
10
  import AutoFormLabel from "./AutoFormLabel.vue";
5
11
  import { beautifyObjectName } from "./utils";
6
12
  defineOptions({
@@ -23,7 +29,11 @@ defineProps({
23
29
  </AutoFormLabel>
24
30
  <FormControl>
25
31
  <slot v-bind="slotProps">
26
- <Input type="number" v-bind="{ ...slotProps.componentField, ...config?.inputProps }" :disabled="config?.inputProps?.disabled ?? disabled" />
32
+ <Input
33
+ type="number"
34
+ v-bind="{ ...slotProps.componentField, ...config?.inputProps }"
35
+ :disabled="config?.inputProps?.disabled ?? disabled"
36
+ />
27
37
  </slot>
28
38
  </FormControl>
29
39
  <FormDescription v-if="config?.description">
@@ -1,4 +1,4 @@
1
- import type { FieldProps } from './interface.js';
1
+ import type { FieldProps } from "./interface.js";
2
2
  declare var __VLS_21: {
3
3
  field: import("vee-validate").FieldBindingObject<any>;
4
4
  componentField: import("vee-validate").ComponentFieldBindingObject<any>;
@@ -1,11 +1,21 @@
1
1
  <script setup>
2
- import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "~/src/runtime/components/ui/accordion";
3
- import { FormItem } from "~/src/runtime/components/ui/form";
2
+ import {
3
+ Accordion,
4
+ AccordionContent,
5
+ AccordionItem,
6
+ AccordionTrigger
7
+ } from "../accordion";
8
+ import { FormItem } from "../form";
4
9
  import { FieldContextKey, useField } from "vee-validate";
5
10
  import { computed, provide } from "vue";
6
11
  import AutoFormField from "./AutoFormField.vue";
7
12
  import AutoFormLabel from "./AutoFormLabel.vue";
8
- import { beautifyObjectName, getBaseSchema, getBaseType, getDefaultValueInZodStack } from "./utils";
13
+ import {
14
+ beautifyObjectName,
15
+ getBaseSchema,
16
+ getBaseType,
17
+ getDefaultValueInZodStack
18
+ } from "./utils";
9
19
  const props = defineProps({
10
20
  fieldName: { type: String, required: true },
11
21
  required: { type: Boolean, required: false },
@@ -15,11 +25,9 @@ const props = defineProps({
15
25
  });
16
26
  const shapes = computed(() => {
17
27
  const val = {};
18
- if (!props.schema)
19
- return;
28
+ if (!props.schema) return;
20
29
  const shape = getBaseSchema(props.schema)?.shape;
21
- if (!shape)
22
- return;
30
+ if (!shape) return;
23
31
  Object.keys(shape).forEach((name) => {
24
32
  const item = shape[name];
25
33
  const baseItem = getBaseSchema(item);
@@ -43,7 +51,13 @@ provide(FieldContextKey, fieldContext);
43
51
  <template>
44
52
  <section>
45
53
  <slot v-bind="props">
46
- <Accordion type="single" as-child class="w-full" collapsible :disabled="disabled">
54
+ <Accordion
55
+ type="single"
56
+ as-child
57
+ class="w-full"
58
+ collapsible
59
+ :disabled="disabled"
60
+ >
47
61
  <FormItem>
48
62
  <AccordionItem :value="fieldName" class="border-none">
49
63
  <AccordionTrigger>
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { FormLabel } from "~/src/runtime/components/ui/form";
2
+ import { FormLabel } from "../form";
3
3
  defineProps({
4
4
  required: { type: Boolean, required: false }
5
5
  });
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { reactiveOmit } from "@vueuse/core";
3
3
  import cn from "../../../utils/cn";
4
- import { Separator } from "~/src/runtime/components/ui/separator";
4
+ import { Separator } from "../separator";
5
5
  const props = defineProps({
6
6
  orientation: { type: String, required: false, default: "vertical" },
7
7
  decorative: { type: Boolean, required: false },
@@ -2,7 +2,7 @@
2
2
  import { reactiveOmit } from "@vueuse/core";
3
3
  import { CalendarCellTrigger, useForwardProps } from "reka-ui";
4
4
  import cn from "../../../utils/cn";
5
- import { buttonVariants } from "~/src/runtime/components/ui/button";
5
+ import { buttonVariants } from "../button";
6
6
  const props = defineProps({
7
7
  day: { type: null, required: true },
8
8
  month: { type: null, required: true },
@@ -3,7 +3,7 @@ import { reactiveOmit } from "@vueuse/core";
3
3
  import { ChevronRight } from "lucide-vue-next";
4
4
  import { CalendarNext, useForwardProps } from "reka-ui";
5
5
  import cn from "../../../utils/cn";
6
- import { buttonVariants } from "~/src/runtime/components/ui/button";
6
+ import { buttonVariants } from "../button";
7
7
  const props = defineProps({
8
8
  nextPage: { type: Function, required: false },
9
9
  asChild: { type: Boolean, required: false },
@@ -3,7 +3,7 @@ import { reactiveOmit } from "@vueuse/core";
3
3
  import { ChevronLeft } from "lucide-vue-next";
4
4
  import { CalendarPrev, useForwardProps } from "reka-ui";
5
5
  import cn from "../../../utils/cn";
6
- import { buttonVariants } from "~/src/runtime/components/ui/button";
6
+ import { buttonVariants } from "../button";
7
7
  const props = defineProps({
8
8
  prevPage: { type: Function, required: false },
9
9
  asChild: { type: Boolean, required: false },
@@ -1,5 +1,5 @@
1
1
  import type { WithClassAsProps } from "./interface.js";
2
- import type { ButtonVariants } from "~/src/runtime/components/ui/button";
2
+ import type { ButtonVariants } from "../button/index.js";
3
3
  type __VLS_Props = {
4
4
  variant?: ButtonVariants["variant"];
5
5
  size?: ButtonVariants["size"];
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { ArrowRight } from "lucide-vue-next";
3
3
  import cn from "../../../utils/cn";
4
- import { Button } from "~/src/runtime/components/ui/button";
4
+ import { Button } from "../button";
5
5
  import { useCarousel } from "./useCarousel";
6
6
  const props = defineProps({
7
7
  variant: { type: null, required: false, default: "outline" },
@@ -1,5 +1,5 @@
1
1
  import type { WithClassAsProps } from "./interface.js";
2
- import type { ButtonVariants } from "~/src/runtime/components/ui/button";
2
+ import type { ButtonVariants } from "../button/index.js";
3
3
  type __VLS_Props = {
4
4
  variant?: ButtonVariants["variant"];
5
5
  size?: ButtonVariants["size"];
@@ -1,5 +1,5 @@
1
1
  import type { WithClassAsProps } from "./interface.js";
2
- import type { ButtonVariants } from "~/src/runtime/components/ui/button";
2
+ import type { ButtonVariants } from "../button/index.js";
3
3
  type __VLS_Props = {
4
4
  variant?: ButtonVariants["variant"];
5
5
  size?: ButtonVariants["size"];
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { ArrowLeft } from "lucide-vue-next";
3
3
  import cn from "../../../utils/cn";
4
- import { Button } from "~/src/runtime/components/ui/button";
4
+ import { Button } from "../button";
5
5
  import { useCarousel } from "./useCarousel";
6
6
  const props = defineProps({
7
7
  variant: { type: null, required: false, default: "outline" },
@@ -1,5 +1,5 @@
1
1
  import type { WithClassAsProps } from "./interface.js";
2
- import type { ButtonVariants } from "~/src/runtime/components/ui/button";
2
+ import type { ButtonVariants } from "../button/index.js";
3
3
  type __VLS_Props = {
4
4
  variant?: ButtonVariants["variant"];
5
5
  size?: ButtonVariants["size"];