@una-ui/nuxt 1.0.0-alpha.1 → 1.0.0-alpha.10

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 (114) hide show
  1. package/dist/module.json +3 -3
  2. package/dist/module.mjs +10 -8
  3. package/dist/runtime/components/alert-dialog/AlertDialog.vue.d.ts +1 -1
  4. package/dist/runtime/components/alert-dialog/AlertDialogAction.vue.d.ts +1 -1
  5. package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue.d.ts +1 -1
  6. package/dist/runtime/components/alert-dialog/AlertDialogContent.vue +0 -1
  7. package/dist/runtime/components/aspect-ratio/AspectRatio.vue.d.ts +1 -1
  8. package/dist/runtime/components/combobox/Combobox.vue +3 -2
  9. package/dist/runtime/components/combobox/Combobox.vue.d.ts +19 -19
  10. package/dist/runtime/components/combobox/ComboboxInput.vue.d.ts +1 -1
  11. package/dist/runtime/components/combobox/ComboboxList.vue +3 -0
  12. package/dist/runtime/components/combobox/ComboboxTrigger.vue.d.ts +1 -1
  13. package/dist/runtime/components/data/table/Table.vue +6 -1
  14. package/dist/runtime/components/data/table/TableEmpty.vue +17 -9
  15. package/dist/runtime/components/data/table/TableEmpty.vue.d.ts +4 -0
  16. package/dist/runtime/components/drawer/Drawer.vue.d.ts +1 -1
  17. package/dist/runtime/components/drawer/DrawerContent.vue +0 -1
  18. package/dist/runtime/components/drawer/DrawerOverlay.vue +1 -0
  19. package/dist/runtime/components/elements/Accordion.vue.d.ts +3 -3
  20. package/dist/runtime/components/elements/Badge.vue.d.ts +1 -5
  21. package/dist/runtime/components/elements/Progress.vue.d.ts +1 -1
  22. package/dist/runtime/components/elements/Toggle.vue.d.ts +1 -1
  23. package/dist/runtime/components/elements/collapsible/Collapsible.vue.d.ts +2 -2
  24. package/dist/runtime/components/elements/collapsible/CollapsibleContent.vue +1 -0
  25. package/dist/runtime/components/elements/dialog/Dialog.vue.d.ts +1 -1
  26. package/dist/runtime/components/elements/dialog/DialogContent.vue +0 -1
  27. package/dist/runtime/components/elements/dialog/DialogDescription.vue +2 -1
  28. package/dist/runtime/components/elements/dialog/DialogScrollContent.vue +0 -1
  29. package/dist/runtime/components/elements/dropdown-menu/DropdownMenu.vue.d.ts +4 -4
  30. package/dist/runtime/components/elements/dropdown-menu/DropdownMenuContent.vue +3 -1
  31. package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubContent.vue +3 -1
  32. package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +1 -1
  33. package/dist/runtime/components/elements/pagination/Pagination.vue.d.ts +2 -5
  34. package/dist/runtime/components/elements/pagination/PaginationListItem.vue.d.ts +1 -1
  35. package/dist/runtime/components/elements/popover/Popover.vue.d.ts +1 -1
  36. package/dist/runtime/components/elements/popover/PopoverContent.vue +3 -0
  37. package/dist/runtime/components/elements/tabs/Tabs.vue.d.ts +1 -1
  38. package/dist/runtime/components/elements/tabs/TabsTrigger.vue.d.ts +1 -1
  39. package/dist/runtime/components/elements/tooltip/TooltipContent.vue +1 -0
  40. package/dist/runtime/components/forms/Input.vue.d.ts +1 -13
  41. package/dist/runtime/components/forms/Switch.vue.d.ts +2 -2
  42. package/dist/runtime/components/forms/radio-group/RadioGroup.vue +1 -2
  43. package/dist/runtime/components/forms/radio-group/RadioGroup.vue.d.ts +5 -5
  44. package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue +1 -1
  45. package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue.d.ts +2 -1
  46. package/dist/runtime/components/forms/select/Select.vue +4 -6
  47. package/dist/runtime/components/forms/select/Select.vue.d.ts +18 -20
  48. package/dist/runtime/components/forms/select/SelectContent.vue +3 -0
  49. package/dist/runtime/components/hover-card/HoverCard.vue.d.ts +1 -1
  50. package/dist/runtime/components/hover-card/HoverCardContent.vue +3 -0
  51. package/dist/runtime/components/misc/ThemeSwitcher.vue +25 -19
  52. package/dist/runtime/components/misc/ThemeSwitcher.vue.d.ts +1 -1
  53. package/dist/runtime/components/navigation/breadcrumb/Breadcrumb.vue.d.ts +6 -16
  54. package/dist/runtime/components/navigation-menu/NavigationMenu.vue.d.ts +11 -11
  55. package/dist/runtime/components/navigation-menu/NavigationMenuIndicator.vue +1 -0
  56. package/dist/runtime/components/navigation-menu/NavigationMenuLink.vue.d.ts +1 -1
  57. package/dist/runtime/components/navigation-menu/NavigationMenuViewport.vue +1 -0
  58. package/dist/runtime/components/number-field/NumberField.vue +1 -0
  59. package/dist/runtime/components/overlays/Toaster.vue.d.ts +1 -1
  60. package/dist/runtime/components/overlays/toast/Toast.vue.d.ts +1 -1
  61. package/dist/runtime/components/overlays/toast/ToastAction.vue.d.ts +1 -1
  62. package/dist/runtime/components/pin-input/PinInput.vue +139 -0
  63. package/dist/runtime/components/pin-input/PinInput.vue.d.ts +33 -0
  64. package/dist/runtime/components/pin-input/PinInputGroup.vue +28 -0
  65. package/dist/runtime/components/pin-input/PinInputGroup.vue.d.ts +13 -0
  66. package/dist/runtime/components/pin-input/PinInputSeparator.vue +30 -0
  67. package/dist/runtime/components/pin-input/PinInputSeparator.vue.d.ts +15 -0
  68. package/dist/runtime/components/pin-input/PinInputSlot.vue +46 -0
  69. package/dist/runtime/components/pin-input/PinInputSlot.vue.d.ts +5 -0
  70. package/dist/runtime/components/resizable/ResizableHandle.vue +1 -0
  71. package/dist/runtime/components/resizable/ResizablePanel.vue.d.ts +1 -7
  72. package/dist/runtime/components/resizable/ResizablePanelGroup.vue.d.ts +1 -3
  73. package/dist/runtime/components/sheet/Sheet.vue.d.ts +1 -1
  74. package/dist/runtime/components/sheet/SheetContent.vue +6 -2
  75. package/dist/runtime/components/sheet/SheetOverlay.vue +6 -1
  76. package/dist/runtime/components/sidebar/SidebarMenu.vue.d.ts +1 -1
  77. package/dist/runtime/components/stepper/Stepper.vue +163 -0
  78. package/dist/runtime/components/stepper/Stepper.vue.d.ts +62 -0
  79. package/dist/runtime/components/stepper/StepperContainer.vue +21 -0
  80. package/dist/runtime/components/stepper/StepperContainer.vue.d.ts +15 -0
  81. package/dist/runtime/components/stepper/StepperDescription.vue +28 -0
  82. package/dist/runtime/components/stepper/StepperDescription.vue.d.ts +13 -0
  83. package/dist/runtime/components/stepper/StepperHeader.vue +21 -0
  84. package/dist/runtime/components/stepper/StepperHeader.vue.d.ts +15 -0
  85. package/dist/runtime/components/stepper/StepperIndicator.vue +34 -0
  86. package/dist/runtime/components/stepper/StepperIndicator.vue.d.ts +15 -0
  87. package/dist/runtime/components/stepper/StepperItem.vue +44 -0
  88. package/dist/runtime/components/stepper/StepperItem.vue.d.ts +15 -0
  89. package/dist/runtime/components/stepper/StepperSeparator.vue +29 -0
  90. package/dist/runtime/components/stepper/StepperSeparator.vue.d.ts +6 -0
  91. package/dist/runtime/components/stepper/StepperTitle.vue +27 -0
  92. package/dist/runtime/components/stepper/StepperTitle.vue.d.ts +13 -0
  93. package/dist/runtime/components/stepper/StepperTrigger.vue +29 -0
  94. package/dist/runtime/components/stepper/StepperTrigger.vue.d.ts +15 -0
  95. package/dist/runtime/components/stepper/StepperWrapper.vue +21 -0
  96. package/dist/runtime/components/stepper/StepperWrapper.vue.d.ts +15 -0
  97. package/dist/runtime/components/toggle-group/ToggleGroup.vue +70 -0
  98. package/dist/runtime/components/toggle-group/ToggleGroup.vue.d.ts +23 -0
  99. package/dist/runtime/components/toggle-group/ToggleGroupItem.vue +75 -0
  100. package/dist/runtime/components/toggle-group/ToggleGroupItem.vue.d.ts +18 -0
  101. package/dist/runtime/composables/useUnaSettings.js +6 -4
  102. package/dist/runtime/types/combobox.d.ts +3 -2
  103. package/dist/runtime/types/index.d.ts +6 -3
  104. package/dist/runtime/types/index.js +3 -0
  105. package/dist/runtime/types/pin-input.d.ts +88 -0
  106. package/dist/runtime/types/pin-input.js +0 -0
  107. package/dist/runtime/types/radio-group.d.ts +5 -3
  108. package/dist/runtime/types/select.d.ts +6 -3
  109. package/dist/runtime/types/stepper.d.ts +129 -0
  110. package/dist/runtime/types/stepper.js +0 -0
  111. package/dist/runtime/types/table.d.ts +16 -3
  112. package/dist/runtime/types/toggle-group.d.ts +39 -0
  113. package/dist/runtime/types/toggle-group.js +0 -0
  114. package/package.json +18 -17
@@ -0,0 +1,139 @@
1
+ <script>
2
+
3
+ </script>
4
+
5
+ <script setup>
6
+ import { reactivePick } from "@vueuse/core";
7
+ import { PinInputRoot, useForwardPropsEmits } from "reka-ui";
8
+ import { computed } from "vue";
9
+ import { cn, randomId } from "../../utils";
10
+ import PinInputGroup from "./PinInputGroup.vue";
11
+ import PinInputSeparator from "./PinInputSeparator.vue";
12
+ import PinInputSlot from "./PinInputSlot.vue";
13
+ const props = defineProps({
14
+ defaultValue: { type: Array, required: false },
15
+ maxLength: { type: Number, required: false },
16
+ separator: { type: [Boolean, String], required: false, default: false },
17
+ groupBy: { type: Number, required: false, default: 0 },
18
+ _pinInputGroup: { type: Object, required: false },
19
+ _pinInputSeparator: { type: Object, required: false },
20
+ _pinInputSlot: { type: Object, required: false },
21
+ una: { type: Object, required: false },
22
+ modelValue: { type: null, required: false },
23
+ placeholder: { type: String, required: false },
24
+ mask: { type: Boolean, required: false },
25
+ otp: { type: Boolean, required: false },
26
+ type: { type: null, required: false, default: "text" },
27
+ dir: { type: String, required: false },
28
+ disabled: { type: Boolean, required: false },
29
+ id: { type: String, required: false },
30
+ asChild: { type: Boolean, required: false },
31
+ as: { type: null, required: false },
32
+ name: { type: String, required: false },
33
+ required: { type: Boolean, required: false },
34
+ pinInput: { type: null, required: false, default: "outline-primary" },
35
+ status: { type: String, required: false },
36
+ class: { type: null, required: false },
37
+ size: { type: null, required: false, default: "md" }
38
+ });
39
+ const emits = defineEmits(["update:modelValue", "complete"]);
40
+ const rootProps = reactivePick(props, [
41
+ "as",
42
+ "asChild",
43
+ "dir",
44
+ "defaultValue",
45
+ "disabled",
46
+ "id",
47
+ "mask",
48
+ "modelValue",
49
+ "name",
50
+ "otp",
51
+ "placeholder",
52
+ "type",
53
+ "required"
54
+ ]);
55
+ const forwarded = useForwardPropsEmits(rootProps, emits);
56
+ const id = computed(() => props.id ?? randomId("pin-input"));
57
+ const separator = computed(() => {
58
+ if (props.separator === true) {
59
+ return "pin-input-separator-icon";
60
+ }
61
+ return props.separator;
62
+ });
63
+ const maxLength = computed(() => {
64
+ if (typeof props.maxLength !== "number") {
65
+ return props.modelValue?.length ?? 0;
66
+ }
67
+ return props.maxLength;
68
+ });
69
+ </script>
70
+
71
+ <template>
72
+ <PinInputRoot
73
+ v-bind="forwarded"
74
+ :id
75
+ data-slot="pin-input"
76
+ :class="cn(
77
+ 'pin-input',
78
+ props.una?.pinInput,
79
+ props.class
80
+ )"
81
+ :size
82
+ >
83
+ <slot>
84
+ <template v-if="groupBy === 0">
85
+ <PinInputGroup
86
+ v-bind="_pinInputGroup"
87
+ :una
88
+ >
89
+ <slot name="group">
90
+ <template v-for="index in maxLength" :key="index">
91
+ <slot name="slot" :index="index - 1">
92
+ <PinInputSlot
93
+ :index="index - 1"
94
+ :una
95
+ :status
96
+ :pin-input
97
+ v-bind="_pinInputSlot"
98
+ />
99
+ </slot>
100
+ </template>
101
+ </slot>
102
+ </PinInputGroup>
103
+ </template>
104
+
105
+ <template v-else>
106
+ <template v-for="(groupIndex) in Math.ceil(maxLength / groupBy)" :key="groupIndex">
107
+ <PinInputGroup
108
+ v-bind="_pinInputGroup"
109
+ :una
110
+ >
111
+ <slot name="group">
112
+ <template v-for="slotInGroup in Math.min(groupBy, maxLength - (groupIndex - 1) * groupBy)" :key="slotInGroup">
113
+ <slot name="slot" :index="(groupIndex - 1) * groupBy + slotInGroup - 1">
114
+ <PinInputSlot
115
+ :index="(groupIndex - 1) * groupBy + slotInGroup - 1"
116
+ :una
117
+ :pin-input
118
+ :status
119
+ v-bind="_pinInputSlot"
120
+ />
121
+ </slot>
122
+ </template>
123
+ </slot>
124
+ </PinInputGroup>
125
+
126
+ <template v-if="separator !== false && (separator || $slots.separator) && groupIndex < Math.ceil(maxLength / groupBy)">
127
+ <PinInputSeparator
128
+ :icon="separator"
129
+ :una
130
+ v-bind="_pinInputSeparator"
131
+ >
132
+ <slot name="separator" />
133
+ </PinInputSeparator>
134
+ </template>
135
+ </template>
136
+ </template>
137
+ </slot>
138
+ </PinInputRoot>
139
+ </template>
@@ -0,0 +1,33 @@
1
+ import type { NPinInputProps, PinInputType } from '../../types/index.js';
2
+ declare const _default: <T extends PinInputType = "text">(__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<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
5
+ readonly onComplete?: ((value: string[]) => any) | undefined;
6
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onComplete"> & NPinInputProps<T> & Partial<{}>> & import("vue").PublicProps;
7
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
8
+ attrs: any;
9
+ slots: {
10
+ default?: (props: {}) => any;
11
+ } & {
12
+ group?: (props: {}) => any;
13
+ } & {
14
+ slot?: (props: {
15
+ index: number;
16
+ }) => any;
17
+ } & {
18
+ group?: (props: {}) => any;
19
+ } & {
20
+ slot?: (props: {
21
+ index: number;
22
+ }) => any;
23
+ } & {
24
+ separator?: (props: {}) => any;
25
+ };
26
+ emit: ((evt: "update:modelValue", value: string[]) => void) & ((evt: "complete", value: string[]) => void);
27
+ }>) => import("vue").VNode & {
28
+ __ctx?: Awaited<typeof __VLS_setup>;
29
+ };
30
+ export default _default;
31
+ type __VLS_PrettifyLocal<T> = {
32
+ [K in keyof T]: T[K];
33
+ } & {};
@@ -0,0 +1,28 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { Primitive, useForwardProps } from "reka-ui";
4
+ import { cn } from "../../utils";
5
+ const props = defineProps({
6
+ una: { type: Object, required: false },
7
+ asChild: { type: Boolean, required: false },
8
+ as: { type: null, required: false },
9
+ class: { type: null, required: false },
10
+ size: { type: null, required: false }
11
+ });
12
+ const delegatedProps = reactiveOmit(props, "class");
13
+ const forwardedProps = useForwardProps(delegatedProps);
14
+ </script>
15
+
16
+ <template>
17
+ <Primitive
18
+ data-slot="pin-input-group"
19
+ v-bind="forwardedProps"
20
+ :class="cn(
21
+ 'pin-input-group',
22
+ props.una?.pinInputGroup,
23
+ props.class
24
+ )"
25
+ >
26
+ <slot />
27
+ </Primitive>
28
+ </template>
@@ -0,0 +1,13 @@
1
+ import type { NPinInputGroupProps } from '../../types/index.js';
2
+ declare var __VLS_6: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_6) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<NPinInputGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NPinInputGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,30 @@
1
+ <script setup>
2
+ import { Primitive, useForwardProps } from "reka-ui";
3
+ import { cn } from "../../utils";
4
+ import Icon from "../elements/Icon.vue";
5
+ const props = defineProps({
6
+ icon: { type: String, required: false, default: "i-lucide-minus" },
7
+ una: { type: Object, required: false },
8
+ asChild: { type: Boolean, required: false },
9
+ as: { type: null, required: false },
10
+ class: { type: null, required: false },
11
+ size: { type: null, required: false }
12
+ });
13
+ const forwardedProps = useForwardProps(props);
14
+ </script>
15
+
16
+ <template>
17
+ <Primitive
18
+ data-slot="pin-input-separator"
19
+ v-bind="forwardedProps"
20
+ :class="cn(
21
+ 'pin-input-separator',
22
+ props.una?.pinInputSeparator,
23
+ props.class
24
+ )"
25
+ >
26
+ <slot>
27
+ <Icon :name="icon" />
28
+ </slot>
29
+ </Primitive>
30
+ </template>
@@ -0,0 +1,15 @@
1
+ import type { NPinInputSeparatorProps } from '../../types/index.js';
2
+ declare var __VLS_6: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_6) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<NPinInputSeparatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NPinInputSeparatorProps> & Readonly<{}>, {
7
+ icon: string;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -0,0 +1,46 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { PinInputInput, useForwardProps } from "reka-ui";
4
+ import { computed } from "vue";
5
+ import { cn } from "../../utils";
6
+ const props = defineProps({
7
+ pinInput: { type: null, required: false, default: "outline-primary" },
8
+ status: { type: String, required: false },
9
+ una: { type: Object, required: false },
10
+ index: { type: Number, required: true },
11
+ disabled: { type: Boolean, required: false },
12
+ asChild: { type: Boolean, required: false },
13
+ as: { type: null, required: false },
14
+ icon: { type: String, required: false },
15
+ class: { type: null, required: false },
16
+ size: { type: null, required: false }
17
+ });
18
+ const delegatedProps = reactiveOmit(props, "class");
19
+ const forwardedProps = useForwardProps(delegatedProps);
20
+ const statusClassVariants = computed(() => {
21
+ const input = {
22
+ info: "input-status-info pin-input-solid-info input-status-ring",
23
+ success: "input-status-success pin-input-solid-success input-status-ring",
24
+ warning: "input-status-warning pin-input-solid-warning input-status-ring",
25
+ error: "input-status-error pin-input-solid-error input-status-ring",
26
+ default: void 0
27
+ };
28
+ return {
29
+ input: input[props.status ?? "default"]
30
+ };
31
+ });
32
+ </script>
33
+
34
+ <template>
35
+ <PinInputInput
36
+ data-slot="pin-input-slot"
37
+ v-bind="forwardedProps"
38
+ :class="cn(
39
+ 'pin-input-slot',
40
+ props.una?.pinInputSlot,
41
+ props.class,
42
+ statusClassVariants.input
43
+ )"
44
+ :pin-input="statusClassVariants.input === void 0 && props.pinInput"
45
+ />
46
+ </template>
@@ -0,0 +1,5 @@
1
+ import type { NPinInputSlotProps } from '../../types/index.js';
2
+ declare const _default: import("vue").DefineComponent<NPinInputSlotProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NPinInputSlotProps> & Readonly<{}>, {
3
+ pinInput: import("vue").HTMLAttributes["class"];
4
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -12,6 +12,7 @@ const props = defineProps({
12
12
  hitAreaMargins: { type: Object, required: false },
13
13
  tabindex: { type: Number, required: false },
14
14
  disabled: { type: Boolean, required: false },
15
+ nonce: { type: String, required: false },
15
16
  asChild: { type: Boolean, required: false },
16
17
  as: { type: null, required: false },
17
18
  class: { type: null, required: false }
@@ -1,11 +1,5 @@
1
1
  import type { NResizablePanelProps } from '../../types/index.js';
2
- declare var __VLS_6: {
3
- isCollapsed: boolean;
4
- isExpanded: boolean;
5
- collapse: () => void;
6
- expand: () => void;
7
- resize: (size: number) => void;
8
- };
2
+ declare var __VLS_6: any;
9
3
  type __VLS_Slots = {} & {
10
4
  default?: (props: typeof __VLS_6) => any;
11
5
  };
@@ -1,7 +1,5 @@
1
1
  import type { NResizablePanelGroupProps } from '../../types/index.js';
2
- declare var __VLS_6: {
3
- layout: number[];
4
- };
2
+ declare var __VLS_6: any;
5
3
  type __VLS_Slots = {} & {
6
4
  default?: (props: typeof __VLS_6) => any;
7
5
  };
@@ -1,6 +1,6 @@
1
1
  import type { NSheetProps } from '../../types/index.js';
2
2
  declare var __VLS_6: {}, __VLS_11: {
3
- open: boolean;
3
+ open: any;
4
4
  }, __VLS_26: {}, __VLS_31: {}, __VLS_36: {}, __VLS_41: {}, __VLS_43: {}, __VLS_45: {}, __VLS_50: {};
5
5
  type __VLS_Slots = {} & {
6
6
  default?: (props: typeof __VLS_6) => any;
@@ -19,7 +19,6 @@ const props = defineProps({
19
19
  _sheetPortal: { type: Object, required: false },
20
20
  una: { type: Object, required: false },
21
21
  forceMount: { type: Boolean, required: false },
22
- trapFocus: { type: Boolean, required: false },
23
22
  disableOutsidePointerEvents: { type: Boolean, required: false },
24
23
  asChild: { type: Boolean, required: false },
25
24
  as: { type: null, required: false }
@@ -55,7 +54,12 @@ const contentEvents = computed(() => {
55
54
  data-slot="sheet-content"
56
55
  v-bind="{ ...forwarded, ...$attrs }"
57
56
  :sheet
58
- :class="cn('sheet-content', props.una?.sheetContent, props.class)"
57
+ :class="cn(
58
+ 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
59
+ 'sheet-content',
60
+ props.una?.sheetContent,
61
+ props.class
62
+ )"
59
63
  v-on="contentEvents"
60
64
  >
61
65
  <slot />
@@ -15,7 +15,12 @@ const delegatedProps = reactiveOmit(props, "class");
15
15
  <template>
16
16
  <DialogOverlay
17
17
  data-slot="sheet-overlay"
18
- :class="cn('dialog-overlay', props.una?.sheetOverlay, props.class)"
18
+ :class="cn(
19
+ 'data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0',
20
+ 'sheet-overlay',
21
+ props.una?.sheetOverlay,
22
+ props.class
23
+ )"
19
24
  v-bind="delegatedProps"
20
25
  >
21
26
  <slot />
@@ -9,7 +9,7 @@ declare const _default: <T extends {
9
9
  default?: (props: {}) => any;
10
10
  } & {
11
11
  item?: (props: {
12
- item: T;
12
+ item: any;
13
13
  }) => any;
14
14
  };
15
15
  emit: {};
@@ -0,0 +1,163 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { StepperRoot, useForwardPropsEmits } from "reka-ui";
4
+ import { computed, useTemplateRef } from "vue";
5
+ import { cn } from "../../utils";
6
+ import Icon from "../elements/Icon.vue";
7
+ import StepperContainer from "./StepperContainer.vue";
8
+ import StepperDescription from "./StepperDescription.vue";
9
+ import StepperHeader from "./StepperHeader.vue";
10
+ import StepperIndicator from "./StepperIndicator.vue";
11
+ import StepperItem from "./StepperItem.vue";
12
+ import StepperSeparator from "./StepperSeparator.vue";
13
+ import StepperTitle from "./StepperTitle.vue";
14
+ import StepperTrigger from "./StepperTrigger.vue";
15
+ import StepperWrapper from "./StepperWrapper.vue";
16
+ const props = defineProps({
17
+ items: { type: Array, required: false },
18
+ stepper: { type: String, required: false, default: "solid-primary" },
19
+ _stepperItem: { type: Object, required: false },
20
+ _stepperTrigger: { type: Object, required: false },
21
+ _stepperSeparator: { type: Object, required: false },
22
+ _stepperTitle: { type: Object, required: false },
23
+ _stepperDescription: { type: Object, required: false },
24
+ _stepperIndicator: { type: Object, required: false },
25
+ _stepperHeader: { type: Object, required: false },
26
+ _stepperWrapper: { type: Object, required: false },
27
+ _stepperContainer: { type: Object, required: false },
28
+ una: { type: Object, required: false },
29
+ defaultValue: { type: Number, required: false },
30
+ orientation: { type: String, required: false, default: "horizontal" },
31
+ dir: { type: String, required: false },
32
+ modelValue: { type: Number, required: false },
33
+ linear: { type: Boolean, required: false },
34
+ asChild: { type: Boolean, required: false },
35
+ as: { type: null, required: false },
36
+ disabled: { type: Boolean, required: false },
37
+ class: { type: null, required: false },
38
+ size: { type: null, required: false }
39
+ });
40
+ const emits = defineEmits(["update:modelValue", "next", "prev"]);
41
+ const modelValue = defineModel({ type: [String, Number] });
42
+ const delegatedProps = reactiveOmit(props, [
43
+ "class",
44
+ "una"
45
+ ]);
46
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
47
+ const stepper = useTemplateRef("stepper");
48
+ const currentStepIndex = computed({
49
+ get() {
50
+ const value = modelValue.value ?? props.defaultValue;
51
+ return (typeof value === "string" ? props.items?.findIndex((item) => item.value === value) : value) ?? 0;
52
+ },
53
+ set(value) {
54
+ modelValue.value = props.items?.[value]?.value ?? value;
55
+ }
56
+ });
57
+ const currentStep = computed(() => props.items?.[currentStepIndex.value]);
58
+ const isEveryItemHasStep = computed(() => props.items?.every((item) => item.step));
59
+ const hasNextStep = computed(() => currentStepIndex.value < props.items.length - 1);
60
+ const hasPrevStep = computed(() => currentStepIndex.value > 0);
61
+ defineExpose({
62
+ goToStep: (step) => {
63
+ currentStepIndex.value = step;
64
+ stepper.value?.goToStep(step);
65
+ },
66
+ nextStep: () => {
67
+ if (!hasNextStep.value)
68
+ return;
69
+ currentStepIndex.value += 1;
70
+ stepper.value?.nextStep();
71
+ emits("next", currentStep.value);
72
+ },
73
+ prevStep: () => {
74
+ if (!hasPrevStep.value)
75
+ return;
76
+ currentStepIndex.value -= 1;
77
+ stepper.value?.prevStep();
78
+ emits("prev", currentStep.value);
79
+ },
80
+ hasNext: () => hasNextStep.value,
81
+ hasPrev: () => hasPrevStep.value
82
+ });
83
+ </script>
84
+
85
+ <template>
86
+ <StepperRoot
87
+ ref="stepper"
88
+ v-slot="slotProps"
89
+ v-bind="forwarded"
90
+ v-model="currentStepIndex"
91
+ :class="cn(
92
+ 'stepper',
93
+ orientation === 'horizontal' && 'stepper-horizontal',
94
+ props.class
95
+ )"
96
+ :una
97
+ >
98
+ <slot v-bind="slotProps">
99
+ <StepperWrapper :una v-bind="props._stepperWrapper" :orientation>
100
+ <slot name="wrapper" :items>
101
+ <StepperItem
102
+ v-for="(item, idx) in items"
103
+ :key="isEveryItemHasStep ? item.step : idx"
104
+ :step="isEveryItemHasStep ? item.step : idx"
105
+ :disabled="item.disabled ?? props.disabled"
106
+ :una
107
+ v-bind="props._stepperItem"
108
+ :orientation
109
+ >
110
+ <slot name="item" :item="item" :step="isEveryItemHasStep ? item.step : idx">
111
+ <StepperContainer :orientation :una v-bind="props._stepperContainer">
112
+ <StepperTrigger v-bind="props._stepperTrigger" :una :stepper="props.stepper" :size="size ?? item.size">
113
+ <slot name="trigger" :item="item">
114
+ <StepperIndicator
115
+ v-slot="{ step }"
116
+ v-bind="props._stepperIndicator"
117
+ :una
118
+ :size="size ?? item.size"
119
+ :stepper="props.stepper"
120
+ >
121
+ <slot name="indicator" :item :step>
122
+ <Icon v-if="item.icon" :name="item.icon" :size="size ?? item.size" />
123
+ <template v-else>
124
+ {{ idx + 1 }}
125
+ </template>
126
+ </slot>
127
+ </StepperIndicator>
128
+ </slot>
129
+ </StepperTrigger>
130
+ <StepperSeparator
131
+ v-if="items && idx < items.length - 1"
132
+ v-bind="props._stepperSeparator"
133
+ :una
134
+ :stepper="props.stepper"
135
+ :orientation
136
+ />
137
+ </StepperContainer>
138
+ <StepperHeader :una v-bind="props._stepperHeader" :orientation>
139
+ <slot name="header" :item="item">
140
+ <StepperTitle v-if="item.title" :una v-bind="props._stepperTitle" :size="size ?? item.size">
141
+ <slot name="title" :item="item">
142
+ {{ item.title }}
143
+ </slot>
144
+ </StepperTitle>
145
+ <StepperDescription v-if="item.description" :una v-bind="props._stepperDescription" :size="size ?? item.size">
146
+ <slot name="description" :item="item">
147
+ {{ item.description }}
148
+ </slot>
149
+ </StepperDescription>
150
+ </slot>
151
+ </StepperHeader>
152
+ </slot>
153
+ </StepperItem>
154
+ </slot>
155
+ </StepperWrapper>
156
+ <slot
157
+ v-if="!!$slots.content || currentStep?.slot"
158
+ :name="currentStep?.slot ?? 'content'"
159
+ :item="currentStep"
160
+ />
161
+ </slot>
162
+ </StepperRoot>
163
+ </template>
@@ -0,0 +1,62 @@
1
+ import type { NStepperItemProps, NStepperProps } from '../../types/index.js';
2
+ declare const _default: <T extends Partial<NStepperItemProps>>(__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<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly "onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
5
+ readonly onNext?: ((payload: T) => any) | undefined;
6
+ readonly onPrev?: ((payload: T) => any) | undefined;
7
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onNext" | "onPrev"> & (NStepperProps<T> & {
8
+ modelValue?: string | number;
9
+ }) & Partial<{}>> & import("vue").PublicProps;
10
+ expose(exposed: import("vue").ShallowUnwrapRef<{
11
+ goToStep: (step: number) => void;
12
+ nextStep: () => void;
13
+ prevStep: () => void;
14
+ hasNext: () => boolean;
15
+ hasPrev: () => boolean;
16
+ }>): void;
17
+ attrs: any;
18
+ slots: {
19
+ [x: string]: ((props: {
20
+ item: any;
21
+ }) => any) | undefined;
22
+ } & {
23
+ default?: (props: any) => any;
24
+ } & {
25
+ wrapper?: (props: {
26
+ items: any;
27
+ }) => any;
28
+ } & {
29
+ item?: (props: {
30
+ item: any;
31
+ step: any;
32
+ }) => any;
33
+ } & {
34
+ trigger?: (props: {
35
+ item: any;
36
+ }) => any;
37
+ } & {
38
+ indicator?: (props: {
39
+ item: any;
40
+ step: any;
41
+ }) => any;
42
+ } & {
43
+ header?: (props: {
44
+ item: any;
45
+ }) => any;
46
+ } & {
47
+ title?: (props: {
48
+ item: any;
49
+ }) => any;
50
+ } & {
51
+ description?: (props: {
52
+ item: any;
53
+ }) => any;
54
+ };
55
+ emit: (((evt: "update:modelValue", payload: number | undefined) => void) & ((evt: "next", payload: T) => void) & ((evt: "prev", payload: T) => void)) & ((evt: "update:modelValue", value: string | number | undefined) => void);
56
+ }>) => import("vue").VNode & {
57
+ __ctx?: Awaited<typeof __VLS_setup>;
58
+ };
59
+ export default _default;
60
+ type __VLS_PrettifyLocal<T> = {
61
+ [K in keyof T]: T[K];
62
+ } & {};
@@ -0,0 +1,21 @@
1
+ <script setup>
2
+ import { cn } from "../../utils";
3
+ const props = defineProps({
4
+ una: { type: Object, required: false },
5
+ class: { type: null, required: false },
6
+ orientation: { type: String, required: false, default: "horizontal" }
7
+ });
8
+ </script>
9
+
10
+ <template>
11
+ <div
12
+ :class="cn(
13
+ 'stepper-container',
14
+ orientation === 'horizontal' && 'stepper-container-horizontal',
15
+ props.class,
16
+ props.una?.stepperContainer
17
+ )"
18
+ >
19
+ <slot />
20
+ </div>
21
+ </template>
@@ -0,0 +1,15 @@
1
+ import type { NStepperContainerProps } from '../../types/index.js';
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<NStepperContainerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NStepperContainerProps> & Readonly<{}>, {
7
+ orientation: "vertical" | "horizontal";
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };