@byyuurin/ui 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +5 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Accordion.vue +41 -41
- package/dist/runtime/components/Accordion.vue.d.ts +11 -7
- package/dist/runtime/components/Alert.vue +63 -63
- package/dist/runtime/components/Alert.vue.d.ts +4 -4
- package/dist/runtime/components/App.vue +11 -10
- package/dist/runtime/components/App.vue.d.ts +11 -7
- package/dist/runtime/components/Avatar.vue +29 -29
- package/dist/runtime/components/Avatar.vue.d.ts +4 -3
- package/dist/runtime/components/AvatarGroup.vue +4 -4
- package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Badge.vue +32 -32
- package/dist/runtime/components/Badge.vue.d.ts +2 -2
- package/dist/runtime/components/Breadcrumb.vue +49 -49
- package/dist/runtime/components/Breadcrumb.vue.d.ts +10 -6
- package/dist/runtime/components/Button.vue +52 -51
- package/dist/runtime/components/Button.vue.d.ts +1 -1
- package/dist/runtime/components/Calendar.vue +75 -77
- package/dist/runtime/components/Calendar.vue.d.ts +16 -12
- package/dist/runtime/components/Card.vue +41 -41
- package/dist/runtime/components/Card.vue.d.ts +1 -1
- package/dist/runtime/components/Carousel.vue +85 -66
- package/dist/runtime/components/Carousel.vue.d.ts +14 -10
- package/dist/runtime/components/Checkbox.vue +46 -46
- package/dist/runtime/components/Checkbox.vue.d.ts +4 -3
- package/dist/runtime/components/CheckboxGroup.vue +131 -0
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +93 -0
- package/dist/runtime/components/Chip.vue +15 -15
- package/dist/runtime/components/Chip.vue.d.ts +2 -2
- package/dist/runtime/components/Collapsible.vue +14 -14
- package/dist/runtime/components/Collapsible.vue.d.ts +2 -2
- package/dist/runtime/components/Drawer.vue +76 -76
- package/dist/runtime/components/Drawer.vue.d.ts +6 -6
- package/dist/runtime/components/DropdownMenu.vue +28 -28
- package/dist/runtime/components/DropdownMenu.vue.d.ts +17 -9
- package/dist/runtime/components/DropdownMenuContent.vue +152 -153
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +11 -7
- package/dist/runtime/components/FieldGroup.vue +3 -3
- package/dist/runtime/components/FieldGroup.vue.d.ts +2 -2
- package/dist/runtime/components/Form.vue +9 -9
- package/dist/runtime/components/Form.vue.d.ts +13 -8
- package/dist/runtime/components/FormField.vue +39 -38
- package/dist/runtime/components/FormField.vue.d.ts +7 -2
- package/dist/runtime/components/Icon.vue +2 -2
- package/dist/runtime/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/components/Input.vue +48 -48
- package/dist/runtime/components/Input.vue.d.ts +16 -12
- package/dist/runtime/components/InputNumber.vue +48 -50
- package/dist/runtime/components/InputNumber.vue.d.ts +128 -129
- package/dist/runtime/components/InputTags.vue +156 -0
- package/dist/runtime/components/InputTags.vue.d.ts +90 -0
- package/dist/runtime/components/Kbd.vue +3 -3
- package/dist/runtime/components/Kbd.vue.d.ts +2 -2
- package/dist/runtime/components/Link.vue +26 -25
- package/dist/runtime/components/Link.vue.d.ts +16 -6
- package/dist/runtime/components/LinkBase.vue +3 -3
- package/dist/runtime/components/LinkBase.vue.d.ts +2 -2
- package/dist/runtime/components/Marquee.vue +38 -0
- package/dist/runtime/components/Marquee.vue.d.ts +54 -0
- package/dist/runtime/components/Modal.vue +74 -74
- package/dist/runtime/components/Modal.vue.d.ts +6 -6
- package/dist/runtime/components/NavigationMenu.vue +243 -234
- package/dist/runtime/components/NavigationMenu.vue.d.ts +53 -14
- package/dist/runtime/components/OverlayProvider.vue +9 -9
- package/dist/runtime/components/Pagination.vue +47 -47
- package/dist/runtime/components/Pagination.vue.d.ts +4 -4
- package/dist/runtime/components/PinInput.vue +23 -23
- package/dist/runtime/components/PinInput.vue.d.ts +14 -10
- package/dist/runtime/components/Popover.vue +22 -22
- package/dist/runtime/components/Popover.vue.d.ts +11 -7
- package/dist/runtime/components/Progress.vue +25 -25
- package/dist/runtime/components/Progress.vue.d.ts +2 -2
- package/dist/runtime/components/RadioGroup.vue +50 -50
- package/dist/runtime/components/RadioGroup.vue.d.ts +13 -9
- package/dist/runtime/components/ScrollArea.vue +32 -32
- package/dist/runtime/components/ScrollArea.vue.d.ts +2 -2
- package/dist/runtime/components/Select.vue +299 -148
- package/dist/runtime/components/Select.vue.d.ts +103 -123
- package/dist/runtime/components/Separator.vue +30 -30
- package/dist/runtime/components/Separator.vue.d.ts +2 -2
- package/dist/runtime/components/Skeleton.vue +11 -11
- package/dist/runtime/components/Skeleton.vue.d.ts +2 -2
- package/dist/runtime/components/Slider.vue +25 -25
- package/dist/runtime/components/Slider.vue.d.ts +11 -7
- package/dist/runtime/components/Stepper.vue +116 -0
- package/dist/runtime/components/Stepper.vue.d.ts +83 -0
- package/dist/runtime/components/Switch.vue +30 -30
- package/dist/runtime/components/Switch.vue.d.ts +4 -3
- package/dist/runtime/components/Table.vue +188 -166
- package/dist/runtime/components/Table.vue.d.ts +27 -22
- package/dist/runtime/components/Tabs.vue +74 -74
- package/dist/runtime/components/Tabs.vue.d.ts +12 -8
- package/dist/runtime/components/Textarea.vue +47 -47
- package/dist/runtime/components/Textarea.vue.d.ts +16 -11
- package/dist/runtime/components/Timeline.vue +102 -0
- package/dist/runtime/components/Timeline.vue.d.ts +78 -0
- package/dist/runtime/components/Toast.vue +93 -93
- package/dist/runtime/components/Toast.vue.d.ts +5 -5
- package/dist/runtime/components/ToastProvider.vue +29 -29
- package/dist/runtime/components/ToastProvider.vue.d.ts +3 -3
- package/dist/runtime/components/Tooltip.vue +24 -25
- package/dist/runtime/components/Tooltip.vue.d.ts +2 -2
- package/dist/runtime/components/Tree.vue +241 -0
- package/dist/runtime/components/Tree.vue.d.ts +121 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +1 -0
- package/dist/runtime/composables/defineShortcuts.js +44 -8
- package/dist/runtime/composables/useLocale.d.ts +12 -0
- package/dist/runtime/locale/en.d.ts +6 -0
- package/dist/runtime/locale/en.js +6 -0
- package/dist/runtime/locale/zh_tw.d.ts +6 -0
- package/dist/runtime/locale/zh_tw.js +6 -0
- package/dist/runtime/types/html.d.ts +8 -0
- package/dist/runtime/types/html.js +0 -0
- package/dist/runtime/types/index.d.ts +7 -0
- package/dist/runtime/types/index.js +7 -0
- package/dist/runtime/types/input.d.ts +5 -5
- package/dist/runtime/types/locale.d.ts +6 -0
- package/dist/runtime/types/unocss.d.ts +4 -4
- package/dist/runtime/types/utils.d.ts +9 -6
- package/dist/runtime/utils/index.d.ts +3 -3
- package/dist/runtime/utils/link.d.ts +2 -1
- package/dist/runtime/utils/link.js +40 -29
- package/dist/runtime/vue/components/Icon.vue +2 -2
- package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/vue/components/Link.vue +7 -12
- package/dist/runtime/vue/components/Link.vue.d.ts +11 -40
- package/dist/setup.d.mts +1 -1
- package/dist/shared/{ui.CzIlLITK.mjs → ui.9kQouwss.mjs} +5 -3
- package/dist/shared/{ui.DpbffTXs.d.mts → ui.D8Bg1HWt.d.mts} +2 -0
- package/dist/shared/{ui.DSyJHSTk.mjs → ui.DpkP12cX.mjs} +784 -84
- package/dist/unocss.mjs +1 -1
- package/dist/unplugin.d.mts +1 -1
- package/dist/unplugin.mjs +2 -2
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +2 -2
- package/package.json +29 -29
- package/vue-plugin.d.ts +5 -5
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { VariantProps } from '@byyuurin/ui-kit';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ComboboxArrowProps, ComboboxContentEmits, ComboboxContentProps, ComboboxRootEmits, ComboboxRootProps } from 'reka-ui';
|
|
3
3
|
import theme from '#build/ui/select';
|
|
4
4
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
5
|
-
import type { AvatarProps, ChipProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps } from '../types';
|
|
6
|
-
import type {
|
|
5
|
+
import type { AvatarProps, ButtonProps, ChipProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps, InputProps, LinkPropsKeys } from '../types';
|
|
6
|
+
import type { ButtonHTMLAttributes } from '../types/html';
|
|
7
|
+
import type { ModelModifiers } from '../types/input';
|
|
8
|
+
import type { AcceptableValue, ArrayOrNested, EmitsToProps, GetItemKeys, GetModelValue, GetModelValueEmits, MaybeNull, NestedItem, Nullable, StaticSlot } from '../types/utils';
|
|
7
9
|
export type SelectValue = Exclude<AcceptableValue, boolean>;
|
|
8
10
|
export type SelectItem = SelectValue | {
|
|
9
11
|
label?: string;
|
|
@@ -24,10 +26,22 @@ export type SelectItem = SelectValue | {
|
|
|
24
26
|
[key: string]: any;
|
|
25
27
|
};
|
|
26
28
|
type ThemeVariants = VariantProps<typeof theme>;
|
|
27
|
-
export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<T
|
|
29
|
+
export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends Nullable<GetItemKeys<T>> = 'value', M extends boolean = false> extends ComponentBaseProps, UseComponentIconsProps, Pick<ComboboxRootProps, 'open' | 'defaultOpen' | 'disabled' | 'name' | 'resetSearchTermOnBlur' | 'resetSearchTermOnSelect' | 'resetModelValueOnClear' | 'highlightOnHover'>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled' | 'value' | 'name'> {
|
|
28
30
|
id?: string;
|
|
29
31
|
/** The placeholder text when the select is empty. */
|
|
30
32
|
placeholder?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to display the search input or not.
|
|
35
|
+
*
|
|
36
|
+
* Can be an object to pass additional props to the input.
|
|
37
|
+
*
|
|
38
|
+
* `{ placeholder: "Search...", variant: "none" }`
|
|
39
|
+
*
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
searchInput?: boolean | InputProps;
|
|
43
|
+
searchTerm?: string;
|
|
44
|
+
required?: boolean;
|
|
31
45
|
/** @default "outline" */
|
|
32
46
|
variant?: ThemeVariants['variant'];
|
|
33
47
|
/** @default "md" */
|
|
@@ -44,16 +58,27 @@ export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested
|
|
|
44
58
|
* @default app.icons.check
|
|
45
59
|
*/
|
|
46
60
|
selectedIcon?: IconProps['name'];
|
|
61
|
+
/**
|
|
62
|
+
* Display a clear button to reset the model value.
|
|
63
|
+
* Can be an object to pass additional props to the Button.
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
clear?: boolean | Partial<Omit<ButtonProps, LinkPropsKeys>>;
|
|
67
|
+
/**
|
|
68
|
+
* The icon displayed in the clear button.
|
|
69
|
+
* @default app.icons.close
|
|
70
|
+
*/
|
|
71
|
+
clearIcon?: IconProps['name'];
|
|
47
72
|
/**
|
|
48
73
|
* The content of the menu.
|
|
49
74
|
* @default { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }
|
|
50
75
|
*/
|
|
51
|
-
content?: Omit<
|
|
76
|
+
content?: Omit<ComboboxContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<ComboboxContentEmits>>;
|
|
52
77
|
/**
|
|
53
78
|
* Display an arrow alongside the menu.
|
|
54
79
|
* @default false
|
|
55
80
|
*/
|
|
56
|
-
arrow?: boolean | Omit<
|
|
81
|
+
arrow?: boolean | Omit<ComboboxArrowProps, 'as' | 'asChild'>;
|
|
57
82
|
/**
|
|
58
83
|
* Render the menu in a portal.
|
|
59
84
|
* @default true
|
|
@@ -79,20 +104,49 @@ export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested
|
|
|
79
104
|
defaultValue?: MaybeNull<GetModelValue<T, VK, M>>;
|
|
80
105
|
/** The controlled value of the Select. Can be bind as `v-model`. */
|
|
81
106
|
modelValue?: MaybeNull<GetModelValue<T, VK, M>>;
|
|
107
|
+
modelModifiers?: Omit<ModelModifiers<GetModelValue<T, VK, M>>, 'lazy'>;
|
|
82
108
|
/** Whether multiple options can be selected or not. */
|
|
83
109
|
multiple?: M & boolean;
|
|
84
110
|
/** Highlight the ring color like a focus state. */
|
|
85
111
|
highlight?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Determines if custom user input that does not exist in options can be added.
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
116
|
+
createItem?: boolean | 'always' | {
|
|
117
|
+
position?: 'top' | 'bottom';
|
|
118
|
+
when?: 'empty' | 'always';
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Fields to filter items by.
|
|
122
|
+
* @default [labelKey]
|
|
123
|
+
*/
|
|
124
|
+
filterFields?: string[];
|
|
125
|
+
/**
|
|
126
|
+
* When `true`, disable the default filters, useful for custom filtering (useAsyncData, useFetch, etc.).
|
|
127
|
+
* @default false
|
|
128
|
+
*/
|
|
129
|
+
ignoreFilter?: boolean;
|
|
86
130
|
autofocus?: boolean;
|
|
87
131
|
autofocusDelay?: number;
|
|
88
132
|
ui?: ComponentUIProps<typeof theme>;
|
|
89
133
|
}
|
|
90
|
-
export type SelectEmits<A extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<A
|
|
91
|
-
change: [event: Event];
|
|
92
|
-
blur: [event: FocusEvent];
|
|
93
|
-
focus: [event: FocusEvent];
|
|
134
|
+
export type SelectEmits<A extends ArrayOrNested<SelectItem>, VK extends Nullable<GetItemKeys<A>>, M extends boolean> = Omit<ComboboxRootEmits, 'update:modelValue'> & {
|
|
135
|
+
'change': [event: Event];
|
|
136
|
+
'blur': [event: FocusEvent];
|
|
137
|
+
'focus': [event: FocusEvent];
|
|
138
|
+
'create': [item: string];
|
|
139
|
+
'clear': [];
|
|
140
|
+
/** Event handler when highlighted element changes. */
|
|
141
|
+
'highlight': [
|
|
142
|
+
payload: {
|
|
143
|
+
ref: HTMLElement;
|
|
144
|
+
value: GetModelValue<A, VK, M>;
|
|
145
|
+
} | undefined
|
|
146
|
+
];
|
|
147
|
+
'update:searchTerm': [value: string];
|
|
94
148
|
} & GetModelValueEmits<A, VK, M>;
|
|
95
|
-
export interface SelectSlots<A extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<A
|
|
149
|
+
export interface SelectSlots<A extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends Nullable<GetItemKeys<A>> = undefined, M extends boolean = false, T extends NestedItem<A> = NestedItem<A>> {
|
|
96
150
|
'leading': StaticSlot<{
|
|
97
151
|
modelValue?: MaybeNull<GetModelValue<A, VK, M>>;
|
|
98
152
|
open: boolean;
|
|
@@ -108,6 +162,9 @@ export interface SelectSlots<A extends ArrayOrNested<SelectItem> = ArrayOrNested
|
|
|
108
162
|
open: boolean;
|
|
109
163
|
ui: ComponentStyler<typeof theme>;
|
|
110
164
|
}>;
|
|
165
|
+
'empty': StaticSlot<{
|
|
166
|
+
searchTerm?: string;
|
|
167
|
+
}>;
|
|
111
168
|
'item': StaticSlot<{
|
|
112
169
|
item: T;
|
|
113
170
|
index: number;
|
|
@@ -133,128 +190,51 @@ export interface SelectSlots<A extends ArrayOrNested<SelectItem> = ArrayOrNested
|
|
|
133
190
|
}>;
|
|
134
191
|
'content-top': StaticSlot;
|
|
135
192
|
'content-bottom': StaticSlot;
|
|
193
|
+
'create-item-label': StaticSlot<{
|
|
194
|
+
item: string;
|
|
195
|
+
}>;
|
|
136
196
|
}
|
|
137
|
-
declare const
|
|
138
|
-
|
|
139
|
-
|
|
197
|
+
declare const _default: typeof __VLS_export;
|
|
198
|
+
export default _default;
|
|
199
|
+
declare const __VLS_export: <T extends ArrayOrNested<SelectItem>, VK extends Nullable<GetItemKeys<T>> = "value", M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
200
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(SelectProps<T, VK, M> & {
|
|
201
|
+
searchTerm?: string;
|
|
202
|
+
}) & {
|
|
140
203
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
204
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
141
205
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
206
|
+
onHighlight?: ((...args: (({
|
|
207
|
+
ref: HTMLElement;
|
|
208
|
+
value: import("reka-ui").AcceptableValue;
|
|
209
|
+
} & {
|
|
210
|
+
ref: HTMLElement;
|
|
211
|
+
value: GetModelValue<T, VK, M>;
|
|
212
|
+
}) | undefined)[]) => any) | undefined;
|
|
213
|
+
onCreate?: ((item: string) => any) | undefined;
|
|
214
|
+
onClear?: (() => any) | undefined;
|
|
142
215
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
143
216
|
"onUpdate:modelValue"?: ((value: GetModelValue<T, VK, M>) => any) | undefined;
|
|
144
|
-
|
|
217
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
218
|
+
}> & (typeof globalThis extends {
|
|
219
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
220
|
+
} ? P : {});
|
|
145
221
|
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
146
|
-
triggerRef: import("vue").
|
|
147
|
-
$: import("vue").ComponentInternalInstance;
|
|
148
|
-
$data: {};
|
|
149
|
-
$props: {
|
|
150
|
-
readonly disabled?: boolean | undefined;
|
|
151
|
-
readonly reference?: import("reka-ui").ReferenceElement | undefined;
|
|
152
|
-
readonly asChild?: boolean | undefined;
|
|
153
|
-
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
154
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
155
|
-
$attrs: {
|
|
156
|
-
[x: string]: unknown;
|
|
157
|
-
};
|
|
158
|
-
$refs: {
|
|
159
|
-
[x: string]: unknown;
|
|
160
|
-
};
|
|
161
|
-
$slots: Readonly<{
|
|
162
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
163
|
-
}>;
|
|
164
|
-
$root: import("vue").ComponentPublicInstance | null;
|
|
165
|
-
$parent: import("vue").ComponentPublicInstance | null;
|
|
166
|
-
$host: Element | null;
|
|
167
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
168
|
-
$el: any;
|
|
169
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").SelectTriggerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
170
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
171
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
172
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
173
|
-
created?: (() => void) | (() => void)[];
|
|
174
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
175
|
-
mounted?: (() => void) | (() => void)[];
|
|
176
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
177
|
-
updated?: (() => void) | (() => void)[];
|
|
178
|
-
activated?: (() => void) | (() => void)[];
|
|
179
|
-
deactivated?: (() => void) | (() => void)[];
|
|
180
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
181
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
182
|
-
destroyed?: (() => void) | (() => void)[];
|
|
183
|
-
unmounted?: (() => void) | (() => void)[];
|
|
184
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
185
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
186
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
187
|
-
};
|
|
188
|
-
$forceUpdate: () => void;
|
|
189
|
-
$nextTick: typeof import("vue").nextTick;
|
|
190
|
-
$watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
191
|
-
} & Readonly<{
|
|
192
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
193
|
-
}> & Omit<Readonly<import("reka-ui").SelectTriggerProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
194
|
-
$slots: {
|
|
195
|
-
default?: (props: {}) => any;
|
|
196
|
-
};
|
|
197
|
-
}>, MaybeNull<{
|
|
198
|
-
$: import("vue").ComponentInternalInstance;
|
|
199
|
-
$data: {};
|
|
200
|
-
$props: {
|
|
201
|
-
readonly disabled?: boolean | undefined;
|
|
202
|
-
readonly reference?: import("reka-ui").ReferenceElement | undefined;
|
|
203
|
-
readonly asChild?: boolean | undefined;
|
|
204
|
-
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
205
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
206
|
-
$attrs: {
|
|
207
|
-
[x: string]: unknown;
|
|
208
|
-
};
|
|
209
|
-
$refs: {
|
|
210
|
-
[x: string]: unknown;
|
|
211
|
-
};
|
|
212
|
-
$slots: Readonly<{
|
|
213
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
214
|
-
}>;
|
|
215
|
-
$root: import("vue").ComponentPublicInstance | null;
|
|
216
|
-
$parent: import("vue").ComponentPublicInstance | null;
|
|
217
|
-
$host: Element | null;
|
|
218
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
219
|
-
$el: any;
|
|
220
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").SelectTriggerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
221
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
222
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
223
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
224
|
-
created?: (() => void) | (() => void)[];
|
|
225
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
226
|
-
mounted?: (() => void) | (() => void)[];
|
|
227
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
228
|
-
updated?: (() => void) | (() => void)[];
|
|
229
|
-
activated?: (() => void) | (() => void)[];
|
|
230
|
-
deactivated?: (() => void) | (() => void)[];
|
|
231
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
232
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
233
|
-
destroyed?: (() => void) | (() => void)[];
|
|
234
|
-
unmounted?: (() => void) | (() => void)[];
|
|
235
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
236
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
237
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
238
|
-
};
|
|
239
|
-
$forceUpdate: () => void;
|
|
240
|
-
$nextTick: typeof import("vue").nextTick;
|
|
241
|
-
$watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
242
|
-
} & Readonly<{
|
|
243
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
244
|
-
}> & Omit<Readonly<import("reka-ui").SelectTriggerProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
245
|
-
$slots: {
|
|
246
|
-
default?: (props: {}) => any;
|
|
247
|
-
};
|
|
248
|
-
}>>;
|
|
222
|
+
triggerRef: Readonly<import("vue").Ref<HTMLButtonElement, HTMLButtonElement>>;
|
|
249
223
|
}>) => void;
|
|
250
224
|
attrs: any;
|
|
251
225
|
slots: SelectSlots<T, VK, M, NestedItem<T>>;
|
|
252
|
-
emit: ((evt: "
|
|
226
|
+
emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "highlight", ...args: [payload: {
|
|
227
|
+
ref: HTMLElement;
|
|
228
|
+
value: import("reka-ui").AcceptableValue;
|
|
229
|
+
} | undefined] & [payload: {
|
|
230
|
+
ref: HTMLElement;
|
|
231
|
+
value: GetModelValue<T, VK, M>;
|
|
232
|
+
} | undefined]) => void) & ((evt: "create", item: string) => void) & ((evt: "clear") => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: GetModelValue<T, VK, M>) => void) & ((evt: "update:searchTerm", value: string) => void)) & ((evt: "update:searchTerm", value: string) => void);
|
|
253
233
|
}>) => import("vue").VNode & {
|
|
254
234
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
255
235
|
};
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
236
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
237
|
+
[K in keyof T]: T[K];
|
|
238
|
+
} : {
|
|
259
239
|
[K in keyof T as K]: T[K];
|
|
260
|
-
} & {};
|
|
240
|
+
}) & {};
|
|
@@ -34,34 +34,34 @@ const ui = computed(() => {
|
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
36
|
<template>
|
|
37
|
-
<Separator v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })" data-part="root">
|
|
38
|
-
<div :class="ui.border({ class: props.ui?.border, start: props.align === 'start' })" data-part="border"></div>
|
|
39
|
-
|
|
40
|
-
<template v-if="props.label || props.icon || props.avatar || !!slots.default">
|
|
41
|
-
<div :class="ui.container({ class: props.ui?.container })" data-part="container">
|
|
42
|
-
<slot :ui="ui">
|
|
43
|
-
<span
|
|
44
|
-
v-if="props.label"
|
|
45
|
-
:class="ui.label({ class: props.ui?.label })"
|
|
46
|
-
data-part="label"
|
|
47
|
-
>{{ props.label }}</span>
|
|
48
|
-
<Icon
|
|
49
|
-
v-else-if="props.icon"
|
|
50
|
-
:name="props.icon"
|
|
51
|
-
:class="ui.icon({ class: props.ui?.icon })"
|
|
52
|
-
data-part="icon"
|
|
53
|
-
/>
|
|
54
|
-
<Avatar
|
|
55
|
-
v-else-if="props.avatar"
|
|
56
|
-
:size="props.ui?.avatarSize || ui.avatarSize()"
|
|
57
|
-
v-bind="props.avatar"
|
|
58
|
-
:class="ui.avatar({ class: props.ui?.avatar })"
|
|
59
|
-
data-part="avatar"
|
|
60
|
-
/>
|
|
61
|
-
</slot>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<div :class="ui.border({ class: props.ui?.border, end: props.align === 'end' })" data-part="border"></div>
|
|
65
|
-
</template>
|
|
66
|
-
</Separator>
|
|
37
|
+
<Separator v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })" data-part="root">
|
|
38
|
+
<div :class="ui.border({ class: props.ui?.border, start: props.align === 'start' })" data-part="border"></div>
|
|
39
|
+
|
|
40
|
+
<template v-if="props.label || props.icon || props.avatar || !!slots.default">
|
|
41
|
+
<div :class="ui.container({ class: props.ui?.container })" data-part="container">
|
|
42
|
+
<slot :ui="ui">
|
|
43
|
+
<span
|
|
44
|
+
v-if="props.label"
|
|
45
|
+
:class="ui.label({ class: props.ui?.label })"
|
|
46
|
+
data-part="label"
|
|
47
|
+
>{{ props.label }}</span>
|
|
48
|
+
<Icon
|
|
49
|
+
v-else-if="props.icon"
|
|
50
|
+
:name="props.icon"
|
|
51
|
+
:class="ui.icon({ class: props.ui?.icon })"
|
|
52
|
+
data-part="icon"
|
|
53
|
+
/>
|
|
54
|
+
<Avatar
|
|
55
|
+
v-else-if="props.avatar"
|
|
56
|
+
:size="props.ui?.avatarSize || ui.avatarSize()"
|
|
57
|
+
v-bind="props.avatar"
|
|
58
|
+
:class="ui.avatar({ class: props.ui?.avatar })"
|
|
59
|
+
data-part="avatar"
|
|
60
|
+
/>
|
|
61
|
+
</slot>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div :class="ui.border({ class: props.ui?.border, end: props.align === 'end' })" data-part="border"></div>
|
|
65
|
+
</template>
|
|
66
|
+
</Separator>
|
|
67
67
|
</template>
|
|
@@ -35,12 +35,12 @@ export interface SeparatorSlots {
|
|
|
35
35
|
ui: ComponentStyler<typeof theme>;
|
|
36
36
|
}>;
|
|
37
37
|
}
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
38
40
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<SeparatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SeparatorProps> & Readonly<{}>, {
|
|
39
41
|
orientation: "horizontal" | "vertical";
|
|
40
42
|
align: "start" | "end" | "center";
|
|
41
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SeparatorSlots>;
|
|
42
|
-
declare const _default: typeof __VLS_export;
|
|
43
|
-
export default _default;
|
|
44
44
|
type __VLS_WithSlots<T, S> = T & {
|
|
45
45
|
new (): {
|
|
46
46
|
$slots: S;
|
|
@@ -19,15 +19,15 @@ const ui = computed(() => {
|
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<template>
|
|
22
|
-
<Primitive
|
|
23
|
-
:as="props.as"
|
|
24
|
-
aria-busy="true"
|
|
25
|
-
aria-label="loading"
|
|
26
|
-
aria-live="polite"
|
|
27
|
-
role="alert"
|
|
28
|
-
:class="ui.base({ class: props.class })"
|
|
29
|
-
data-part="base"
|
|
30
|
-
>
|
|
31
|
-
<slot></slot>
|
|
32
|
-
</Primitive>
|
|
22
|
+
<Primitive
|
|
23
|
+
:as="props.as"
|
|
24
|
+
aria-busy="true"
|
|
25
|
+
aria-label="loading"
|
|
26
|
+
aria-live="polite"
|
|
27
|
+
role="alert"
|
|
28
|
+
:class="ui.base({ class: props.class })"
|
|
29
|
+
data-part="base"
|
|
30
|
+
>
|
|
31
|
+
<slot></slot>
|
|
32
|
+
</Primitive>
|
|
33
33
|
</template>
|
|
@@ -7,11 +7,11 @@ export interface SkeletonProps extends ComponentBaseProps {
|
|
|
7
7
|
*/
|
|
8
8
|
as?: PrimitiveProps['as'];
|
|
9
9
|
}
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
10
12
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<SkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SkeletonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
11
13
|
default?: (props: {}) => any;
|
|
12
14
|
}>;
|
|
13
|
-
declare const _default: typeof __VLS_export;
|
|
14
|
-
export default _default;
|
|
15
15
|
type __VLS_WithSlots<T, S> = T & {
|
|
16
16
|
new (): {
|
|
17
17
|
$slots: S;
|
|
@@ -66,29 +66,29 @@ function onChange(value) {
|
|
|
66
66
|
</script>
|
|
67
67
|
|
|
68
68
|
<template>
|
|
69
|
-
<SliderRoot
|
|
70
|
-
v-bind="{ ...rootProps, ...ariaAttrs, id, name, disabled }"
|
|
71
|
-
v-model="sliderValue"
|
|
72
|
-
:default-value="defaultSliderValue"
|
|
73
|
-
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
74
|
-
:data-steps="thumbs"
|
|
75
|
-
data-part="root"
|
|
76
|
-
@update:model-value="emitFormInput()"
|
|
77
|
-
@value-commit="onChange"
|
|
78
|
-
>
|
|
79
|
-
<SliderTrack :class="ui.track({ class: props.ui?.track })" data-part="track">
|
|
80
|
-
<SliderRange :class="ui.range({ class: props.ui?.range })" data-part="range" />
|
|
81
|
-
</SliderTrack>
|
|
82
|
-
|
|
83
|
-
<Tooltip
|
|
84
|
-
v-for="thumb in thumbs"
|
|
85
|
-
:key="thumb"
|
|
86
|
-
v-bind="typeof props.tooltip === 'object' ? props.tooltip : {}"
|
|
87
|
-
:text="String(thumbs > 1 ? sliderValue?.[thumb - 1] : sliderValue)"
|
|
88
|
-
:disabled="!props.tooltip"
|
|
89
|
-
disable-closing-trigger
|
|
90
|
-
>
|
|
91
|
-
<SliderThumb :class="ui.thumb({ class: props.ui?.thumb })" data-part="thumb" />
|
|
92
|
-
</Tooltip>
|
|
93
|
-
</SliderRoot>
|
|
69
|
+
<SliderRoot
|
|
70
|
+
v-bind="{ ...rootProps, ...ariaAttrs, id, name, disabled }"
|
|
71
|
+
v-model="sliderValue"
|
|
72
|
+
:default-value="defaultSliderValue"
|
|
73
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
74
|
+
:data-steps="thumbs"
|
|
75
|
+
data-part="root"
|
|
76
|
+
@update:model-value="emitFormInput()"
|
|
77
|
+
@value-commit="onChange"
|
|
78
|
+
>
|
|
79
|
+
<SliderTrack :class="ui.track({ class: props.ui?.track })" data-part="track">
|
|
80
|
+
<SliderRange :class="ui.range({ class: props.ui?.range })" data-part="range" />
|
|
81
|
+
</SliderTrack>
|
|
82
|
+
|
|
83
|
+
<Tooltip
|
|
84
|
+
v-for="thumb in thumbs"
|
|
85
|
+
:key="thumb"
|
|
86
|
+
v-bind="typeof props.tooltip === 'object' ? props.tooltip : {}"
|
|
87
|
+
:text="String(thumbs > 1 ? sliderValue?.[thumb - 1] : sliderValue)"
|
|
88
|
+
:disabled="!props.tooltip"
|
|
89
|
+
disable-closing-trigger
|
|
90
|
+
>
|
|
91
|
+
<SliderThumb :class="ui.thumb({ class: props.ui?.thumb })" data-part="thumb" :aria-label="thumbs === 1 ? 'Thumb' : `Thumb ${thumb} of ${thumbs}`" />
|
|
92
|
+
</Tooltip>
|
|
93
|
+
</SliderRoot>
|
|
94
94
|
</template>
|
|
@@ -33,11 +33,15 @@ export interface SliderEmits<T extends MaybeArray<number>> {
|
|
|
33
33
|
'update:modelValue': [value: T];
|
|
34
34
|
'change': [event: Event];
|
|
35
35
|
}
|
|
36
|
-
declare const
|
|
37
|
-
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
declare const __VLS_export: <T extends MaybeArray<number>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
39
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<SliderProps<T> & {
|
|
38
40
|
onChange?: ((event: Event) => any) | undefined;
|
|
39
41
|
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
40
|
-
}> &
|
|
42
|
+
}> & (typeof globalThis extends {
|
|
43
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
44
|
+
} ? P : {});
|
|
41
45
|
expose: (exposed: {}) => void;
|
|
42
46
|
attrs: any;
|
|
43
47
|
slots: {};
|
|
@@ -45,8 +49,8 @@ declare const __VLS_export: <T extends MaybeArray<number>>(__VLS_props: NonNulla
|
|
|
45
49
|
}>) => import("vue").VNode & {
|
|
46
50
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
47
51
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
53
|
+
[K in keyof T]: T[K];
|
|
54
|
+
} : {
|
|
51
55
|
[K in keyof T as K]: T[K];
|
|
52
|
-
} & {};
|
|
56
|
+
}) & {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/stepper";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { reactivePick } from "@vueuse/core";
|
|
7
|
+
import { StepperDescription, StepperIndicator, StepperItem, StepperRoot, StepperSeparator, StepperTitle, StepperTrigger, useForwardProps } from "reka-ui";
|
|
8
|
+
import { computed } from "vue";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { cv, merge } from "../utils/style";
|
|
11
|
+
import Icon from "./Icon.vue";
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
as: { type: null, required: false },
|
|
14
|
+
items: { type: Array, required: false },
|
|
15
|
+
size: { type: null, required: false },
|
|
16
|
+
color: { type: null, required: false },
|
|
17
|
+
orientation: { type: null, required: false, default: "horizontal" },
|
|
18
|
+
defaultValue: { type: [String, Number], required: false },
|
|
19
|
+
modelValue: { type: [String, Number], required: false },
|
|
20
|
+
disabled: { type: Boolean, required: false },
|
|
21
|
+
ui: { type: null, required: false },
|
|
22
|
+
class: { type: [Object, String, Number, Boolean, null, Array], required: false, skipCheck: true },
|
|
23
|
+
linear: { type: Boolean, required: false, default: true }
|
|
24
|
+
});
|
|
25
|
+
const emit = defineEmits(["next", "prev"]);
|
|
26
|
+
const slots = defineSlots();
|
|
27
|
+
const modelValue = defineModel({ type: [String, Number] });
|
|
28
|
+
const appConfig = useAppConfig();
|
|
29
|
+
const ui = computed(() => {
|
|
30
|
+
const styler = cv(merge(theme, appConfig.ui.stepper));
|
|
31
|
+
return styler(props);
|
|
32
|
+
});
|
|
33
|
+
const rootProps = useForwardProps(reactivePick(props, "as", "orientation", "linear"));
|
|
34
|
+
const currentStepIndex = computed({
|
|
35
|
+
get() {
|
|
36
|
+
const value = modelValue.value ?? props.defaultValue;
|
|
37
|
+
return (typeof value === "string" ? props.items?.findIndex((item) => item.value === value) : value) ?? 0;
|
|
38
|
+
},
|
|
39
|
+
set(value) {
|
|
40
|
+
modelValue.value = props.items?.[value]?.value ?? value;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const currentStep = computed(() => props.items?.[currentStepIndex.value]);
|
|
44
|
+
const hasNext = computed(() => currentStepIndex.value < (props.items?.length ?? 0) - 1);
|
|
45
|
+
const hasPrev = computed(() => currentStepIndex.value > 0);
|
|
46
|
+
defineExpose({
|
|
47
|
+
next() {
|
|
48
|
+
if (!props.disabled && hasNext.value) {
|
|
49
|
+
currentStepIndex.value += 1;
|
|
50
|
+
emit("next", currentStep.value);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
prev() {
|
|
54
|
+
if (!props.disabled && hasPrev.value) {
|
|
55
|
+
currentStepIndex.value -= 1;
|
|
56
|
+
emit("prev", currentStep.value);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
hasNext,
|
|
60
|
+
hasPrev
|
|
61
|
+
});
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<StepperRoot v-bind="rootProps" v-model="currentStepIndex" :class="ui.root({ class: [props.ui?.root, props.class] })" data-part="root">
|
|
66
|
+
<div :class="ui.header({ class: props.ui?.header })" data-part="header">
|
|
67
|
+
<StepperItem
|
|
68
|
+
v-for="(item, count) in props.items"
|
|
69
|
+
:key="item.value ?? count"
|
|
70
|
+
:step="count"
|
|
71
|
+
:disabled="item.disabled || props.disabled"
|
|
72
|
+
:class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class] })"
|
|
73
|
+
data-part="item"
|
|
74
|
+
>
|
|
75
|
+
<div :class="ui.container({ class: [props.ui?.container, item.ui?.container] })" data-part="container">
|
|
76
|
+
<StepperTrigger :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger] })" data-part="trigger">
|
|
77
|
+
<StepperIndicator :class="ui.indicator({ class: [props.ui?.indicator, item.ui?.indicator] })" data-part="indicator">
|
|
78
|
+
<slot name="indicator" :item="item" :ui="ui">
|
|
79
|
+
<Icon v-if="item.icon" :name="item.icon" :class="ui.icon({ class: [props.ui?.icon, item.ui?.icon] })" data-part="icon" />
|
|
80
|
+
<template v-else>
|
|
81
|
+
{{ count + 1 }}
|
|
82
|
+
</template>
|
|
83
|
+
</slot>
|
|
84
|
+
</StepperIndicator>
|
|
85
|
+
</StepperTrigger>
|
|
86
|
+
|
|
87
|
+
<StepperSeparator
|
|
88
|
+
v-if="count < props.items.length - 1"
|
|
89
|
+
:class="ui.separator({ class: [props.ui?.separator, item.ui?.separator] })"
|
|
90
|
+
data-part="separator"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<div :class="ui.wrapper({ class: [props.ui?.wrapper, item.ui?.wrapper] })" data-part="wrapper">
|
|
95
|
+
<StepperTitle as="div" :class="ui.title({ class: [props.ui?.title, item.ui?.title] })" data-part="title">
|
|
96
|
+
<slot name="title" :item="item">
|
|
97
|
+
{{ item.title }}
|
|
98
|
+
</slot>
|
|
99
|
+
</StepperTitle>
|
|
100
|
+
|
|
101
|
+
<StepperDescription as="div" :class="ui.description({ class: [props.ui?.description, item.ui?.description] })" data-part="description">
|
|
102
|
+
<slot name="description" :item="item">
|
|
103
|
+
{{ item.description }}
|
|
104
|
+
</slot>
|
|
105
|
+
</StepperDescription>
|
|
106
|
+
</div>
|
|
107
|
+
</StepperItem>
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<div v-if="currentStep?.content || !!slots.content || currentStep?.slot" :class="ui.content({ class: props.ui?.content })" data-part="content">
|
|
111
|
+
<slot :name="currentStep?.slot || 'content'" :item="currentStep">
|
|
112
|
+
{{ currentStep?.content }}
|
|
113
|
+
</slot>
|
|
114
|
+
</div>
|
|
115
|
+
</StepperRoot>
|
|
116
|
+
</template>
|