@nuxt/ui 3.3.4 → 3.3.6
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/.nuxt/ui/drawer.ts +23 -0
- package/.nuxt/ui/progress.ts +3 -3
- package/README.md +10 -10
- package/dist/module.d.mts +6 -6
- package/dist/module.json +2 -2
- package/dist/module.mjs +3 -3
- package/dist/runtime/components/Accordion.d.vue.ts +78 -0
- package/dist/runtime/components/Accordion.vue.d.ts +6 -5
- package/dist/runtime/components/Alert.d.vue.ts +82 -0
- package/dist/runtime/components/Alert.vue.d.ts +2 -1
- package/dist/runtime/components/App.d.vue.ts +25 -0
- package/dist/runtime/components/App.vue +1 -1
- package/dist/runtime/components/App.vue.d.ts +5 -4
- package/dist/runtime/components/Avatar.d.vue.ts +42 -0
- package/dist/runtime/components/Avatar.vue.d.ts +2 -1
- package/dist/runtime/components/AvatarGroup.d.vue.ts +32 -0
- package/dist/runtime/components/AvatarGroup.vue.d.ts +2 -1
- package/dist/runtime/components/Badge.d.vue.ts +44 -0
- package/dist/runtime/components/Badge.vue.d.ts +2 -1
- package/dist/runtime/components/Breadcrumb.d.vue.ts +67 -0
- package/dist/runtime/components/Breadcrumb.vue.d.ts +4 -3
- package/dist/runtime/components/Button.d.vue.ts +45 -0
- package/dist/runtime/components/Button.vue.d.ts +2 -1
- package/dist/runtime/components/ButtonGroup.d.vue.ts +35 -0
- package/dist/runtime/components/ButtonGroup.vue.d.ts +2 -1
- package/dist/runtime/components/Calendar.d.vue.ts +113 -0
- package/dist/runtime/components/Calendar.vue.d.ts +9 -8
- package/dist/runtime/components/Card.d.vue.ts +30 -0
- package/dist/runtime/components/Card.vue.d.ts +2 -1
- package/dist/runtime/components/Carousel.d.vue.ts +128 -0
- package/dist/runtime/components/Carousel.vue +32 -12
- package/dist/runtime/components/Carousel.vue.d.ts +7 -6
- package/dist/runtime/components/Checkbox.d.vue.ts +74 -0
- package/dist/runtime/components/Checkbox.vue.d.ts +2 -1
- package/dist/runtime/components/CheckboxGroup.d.vue.ts +85 -0
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +7 -6
- package/dist/runtime/components/Chip.d.vue.ts +58 -0
- package/dist/runtime/components/Chip.vue.d.ts +2 -1
- package/dist/runtime/components/Collapsible.d.vue.ts +36 -0
- package/dist/runtime/components/Collapsible.vue.d.ts +2 -1
- package/dist/runtime/components/ColorPicker.d.vue.ts +49 -0
- package/dist/runtime/components/ColorPicker.vue.d.ts +2 -1
- package/dist/runtime/components/CommandPalette.d.vue.ts +193 -0
- package/dist/runtime/components/CommandPalette.vue.d.ts +13 -12
- package/dist/runtime/components/Container.d.vue.ts +19 -0
- package/dist/runtime/components/Container.vue.d.ts +2 -1
- package/dist/runtime/components/ContextMenu.d.vue.ts +110 -0
- package/dist/runtime/components/ContextMenu.vue.d.ts +6 -5
- package/dist/runtime/components/ContextMenuContent.d.vue.ts +50 -0
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +10 -9
- package/dist/runtime/components/Drawer.d.vue.ts +87 -0
- package/dist/runtime/components/Drawer.vue +19 -5
- package/dist/runtime/components/Drawer.vue.d.ts +5 -1
- package/dist/runtime/components/DropdownMenu.d.vue.ts +120 -0
- package/dist/runtime/components/DropdownMenu.vue.d.ts +6 -5
- package/dist/runtime/components/DropdownMenuContent.d.vue.ts +56 -0
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +10 -9
- package/dist/runtime/components/FileUpload.d.vue.ts +167 -0
- package/dist/runtime/components/FileUpload.vue.d.ts +9 -8
- package/dist/runtime/components/Form.d.vue.ts +72 -0
- package/dist/runtime/components/Form.vue.d.ts +7 -6
- package/dist/runtime/components/FormField.d.vue.ts +62 -0
- package/dist/runtime/components/FormField.vue.d.ts +2 -1
- package/dist/runtime/components/Icon.d.vue.ts +9 -0
- package/dist/runtime/components/Icon.vue.d.ts +2 -1
- package/dist/runtime/components/Input.d.vue.ts +78 -0
- package/dist/runtime/components/Input.vue.d.ts +9 -8
- package/dist/runtime/components/InputMenu.d.vue.ts +330 -0
- package/dist/runtime/components/InputMenu.vue +1 -1
- package/dist/runtime/components/InputMenu.vue.d.ts +19 -24
- package/dist/runtime/components/InputNumber.d.vue.ts +187 -0
- package/dist/runtime/components/InputNumber.vue.d.ts +2 -1
- package/dist/runtime/components/InputTags.d.vue.ts +186 -0
- package/dist/runtime/components/InputTags.vue +2 -2
- package/dist/runtime/components/InputTags.vue.d.ts +13 -12
- package/dist/runtime/components/Kbd.d.vue.ts +39 -0
- package/dist/runtime/components/Kbd.vue.d.ts +2 -1
- package/dist/runtime/components/Link.d.vue.ts +92 -0
- package/dist/runtime/components/Link.vue.d.ts +2 -1
- package/dist/runtime/components/LinkBase.d.vue.ts +26 -0
- package/dist/runtime/components/LinkBase.vue.d.ts +2 -1
- package/dist/runtime/components/Modal.d.vue.ts +107 -0
- package/dist/runtime/components/Modal.vue.d.ts +4 -3
- package/dist/runtime/components/NavigationMenu.d.vue.ts +171 -0
- package/dist/runtime/components/NavigationMenu.vue.d.ts +6 -5
- package/dist/runtime/components/OverlayProvider.d.vue.ts +3 -0
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -1
- package/dist/runtime/components/Pagination.d.vue.ts +119 -0
- package/dist/runtime/components/Pagination.vue +4 -4
- package/dist/runtime/components/Pagination.vue.d.ts +2 -1
- package/dist/runtime/components/PinInput.d.vue.ts +61 -0
- package/dist/runtime/components/PinInput.vue.d.ts +10 -9
- package/dist/runtime/components/Popover.d.vue.ts +71 -0
- package/dist/runtime/components/Popover.vue.d.ts +2 -1
- package/dist/runtime/components/Progress.d.vue.ts +67 -0
- package/dist/runtime/components/Progress.vue +2 -3
- package/dist/runtime/components/Progress.vue.d.ts +2 -1
- package/dist/runtime/components/RadioGroup.d.vue.ts +95 -0
- package/dist/runtime/components/RadioGroup.vue.d.ts +7 -6
- package/dist/runtime/components/Select.d.vue.ts +254 -0
- package/dist/runtime/components/Select.vue.d.ts +11 -10
- package/dist/runtime/components/SelectMenu.d.vue.ts +303 -0
- package/dist/runtime/components/SelectMenu.vue.d.ts +16 -15
- package/dist/runtime/components/Separator.d.vue.ts +55 -0
- package/dist/runtime/components/Separator.vue.d.ts +2 -1
- package/dist/runtime/components/Skeleton.d.vue.ts +18 -0
- package/dist/runtime/components/Skeleton.vue.d.ts +2 -1
- package/dist/runtime/components/Slideover.d.vue.ts +108 -0
- package/dist/runtime/components/Slideover.vue.d.ts +4 -3
- package/dist/runtime/components/Slider.d.vue.ts +58 -0
- package/dist/runtime/components/Slider.vue.d.ts +8 -7
- package/dist/runtime/components/Stepper.d.vue.ts +86 -0
- package/dist/runtime/components/Stepper.vue.d.ts +10 -9
- package/dist/runtime/components/Switch.d.vue.ts +71 -0
- package/dist/runtime/components/Switch.vue.d.ts +2 -1
- package/dist/runtime/components/Table.d.vue.ts +202 -0
- package/dist/runtime/components/Table.vue +19 -1
- package/dist/runtime/components/Table.vue.d.ts +20 -19
- package/dist/runtime/components/Tabs.d.vue.ts +99 -0
- package/dist/runtime/components/Tabs.vue +2 -2
- package/dist/runtime/components/Tabs.vue.d.ts +7 -6
- package/dist/runtime/components/Textarea.d.vue.ts +80 -0
- package/dist/runtime/components/Textarea.vue.d.ts +9 -8
- package/dist/runtime/components/Timeline.d.vue.ts +71 -0
- package/dist/runtime/components/Timeline.vue.d.ts +7 -6
- package/dist/runtime/components/Toast.d.vue.ts +165 -0
- package/dist/runtime/components/Toast.vue.d.ts +2 -1
- package/dist/runtime/components/Toaster.d.vue.ts +45 -0
- package/dist/runtime/components/Toaster.vue.d.ts +2 -1
- package/dist/runtime/components/Tooltip.d.vue.ts +57 -0
- package/dist/runtime/components/Tooltip.vue.d.ts +2 -1
- package/dist/runtime/components/Tree.d.vue.ts +115 -0
- package/dist/runtime/components/Tree.vue.d.ts +7 -6
- package/dist/runtime/composables/useKbd.js +1 -1
- package/dist/runtime/composables/usePortal.d.ts +3 -3
- package/dist/runtime/composables/usePortal.js +5 -10
- package/dist/runtime/inertia/components/Link.d.vue.ts +64 -0
- package/dist/runtime/inertia/components/Link.vue.d.ts +2 -1
- package/dist/runtime/inertia/components/LinkBase.d.vue.ts +26 -0
- package/dist/runtime/inertia/components/LinkBase.vue.d.ts +2 -1
- package/dist/runtime/types/tv.d.ts +9 -2
- package/dist/runtime/vue/components/Icon.d.vue.ts +6 -0
- package/dist/runtime/vue/components/Icon.vue.d.ts +2 -1
- package/dist/runtime/vue/components/Link.d.vue.ts +94 -0
- package/dist/runtime/vue/components/Link.vue.d.ts +2 -1
- package/dist/shared/{ui.BTUFJHYJ.mjs → ui.DBpKc5X3.mjs} +100 -68
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +18 -18
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { NavigationMenuRootProps, NavigationMenuRootEmits, NavigationMenuContentProps, NavigationMenuContentEmits, AccordionRootProps } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/navigation-menu';
|
|
4
|
+
import type { AvatarProps, BadgeProps, LinkProps, PopoverProps, TooltipProps } from '../types';
|
|
5
|
+
import type { ArrayOrNested, DynamicSlots, MergeTypes, NestedItem, EmitsToProps, ComponentConfig } from '../types/utils';
|
|
6
|
+
type NavigationMenu = ComponentConfig<typeof theme, AppConfig, 'navigationMenu'>;
|
|
7
|
+
export interface NavigationMenuChildItem extends Omit<NavigationMenuItem, 'type' | 'ui'> {
|
|
8
|
+
/** Description is only used when `orientation` is `horizontal`. */
|
|
9
|
+
description?: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export interface NavigationMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'custom'> {
|
|
13
|
+
label?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @IconifyIcon
|
|
16
|
+
*/
|
|
17
|
+
icon?: string;
|
|
18
|
+
avatar?: AvatarProps;
|
|
19
|
+
/**
|
|
20
|
+
* Display a badge on the item.
|
|
21
|
+
* `{ size: 'sm', color: 'neutral', variant: 'outline' }`{lang="ts-type"}
|
|
22
|
+
*/
|
|
23
|
+
badge?: string | number | BadgeProps;
|
|
24
|
+
/**
|
|
25
|
+
* Display a tooltip on the item when the menu is collapsed with the label of the item.
|
|
26
|
+
* This has priority over the global `tooltip` prop.
|
|
27
|
+
*/
|
|
28
|
+
tooltip?: boolean | TooltipProps;
|
|
29
|
+
/**
|
|
30
|
+
* Display a popover on the item when the menu is collapsed with the children list.
|
|
31
|
+
* This has priority over the global `popover` prop.
|
|
32
|
+
*/
|
|
33
|
+
popover?: boolean | PopoverProps;
|
|
34
|
+
/**
|
|
35
|
+
* @IconifyIcon
|
|
36
|
+
*/
|
|
37
|
+
trailingIcon?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The type of the item.
|
|
40
|
+
* The `label` type is only displayed in `vertical` orientation.
|
|
41
|
+
* The `trigger` type is used to force the item to be collapsible when its a link in `vertical` orientation.
|
|
42
|
+
* @defaultValue 'link'
|
|
43
|
+
*/
|
|
44
|
+
type?: 'label' | 'trigger' | 'link';
|
|
45
|
+
slot?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The value of the item. Avoid using `index` as the value to prevent conflicts in horizontal orientation with Reka UI.
|
|
48
|
+
* @defaultValue `item-${index}`
|
|
49
|
+
*/
|
|
50
|
+
value?: string;
|
|
51
|
+
children?: NavigationMenuChildItem[];
|
|
52
|
+
defaultOpen?: boolean;
|
|
53
|
+
open?: boolean;
|
|
54
|
+
onSelect?(e: Event): void;
|
|
55
|
+
class?: any;
|
|
56
|
+
ui?: Pick<NavigationMenu['slots'], 'item' | 'linkLeadingAvatarSize' | 'linkLeadingAvatar' | 'linkLeadingIcon' | 'linkLabel' | 'linkLabelExternalIcon' | 'linkTrailing' | 'linkTrailingBadgeSize' | 'linkTrailingBadge' | 'linkTrailingIcon' | 'label' | 'link' | 'content' | 'childList' | 'childLabel' | 'childItem' | 'childLink' | 'childLinkIcon' | 'childLinkWrapper' | 'childLinkLabel' | 'childLinkLabelExternalIcon' | 'childLinkDescription'>;
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
}
|
|
59
|
+
export interface NavigationMenuProps<T extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>> extends Pick<NavigationMenuRootProps, 'modelValue' | 'defaultValue' | 'delayDuration' | 'disableClickTrigger' | 'disableHoverTrigger' | 'skipDelayDuration' | 'disablePointerLeaveClose' | 'unmountOnHide'>, Pick<AccordionRootProps, 'disabled' | 'type' | 'collapsible'> {
|
|
60
|
+
/**
|
|
61
|
+
* The element or component this component should render as.
|
|
62
|
+
* @defaultValue 'div'
|
|
63
|
+
*/
|
|
64
|
+
as?: any;
|
|
65
|
+
/**
|
|
66
|
+
* The icon displayed to open the menu.
|
|
67
|
+
* @defaultValue appConfig.ui.icons.chevronDown
|
|
68
|
+
* @IconifyIcon
|
|
69
|
+
*/
|
|
70
|
+
trailingIcon?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The icon displayed when the item is an external link.
|
|
73
|
+
* Set to `false` to hide the external icon.
|
|
74
|
+
* @defaultValue appConfig.ui.icons.external
|
|
75
|
+
* @IconifyIcon
|
|
76
|
+
*/
|
|
77
|
+
externalIcon?: boolean | string;
|
|
78
|
+
items?: T;
|
|
79
|
+
/**
|
|
80
|
+
* @defaultValue 'primary'
|
|
81
|
+
*/
|
|
82
|
+
color?: NavigationMenu['variants']['color'];
|
|
83
|
+
/**
|
|
84
|
+
* @defaultValue 'pill'
|
|
85
|
+
*/
|
|
86
|
+
variant?: NavigationMenu['variants']['variant'];
|
|
87
|
+
/**
|
|
88
|
+
* The orientation of the menu.
|
|
89
|
+
* @defaultValue 'horizontal'
|
|
90
|
+
*/
|
|
91
|
+
orientation?: NavigationMenuRootProps['orientation'];
|
|
92
|
+
/**
|
|
93
|
+
* Collapse the navigation menu to only show icons.
|
|
94
|
+
* Only works when `orientation` is `vertical`.
|
|
95
|
+
* @defaultValue false
|
|
96
|
+
*/
|
|
97
|
+
collapsed?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Display a tooltip on the items when the menu is collapsed with the label of the item.
|
|
100
|
+
* `{ delayDuration: 0, content: { side: 'right' } }`{lang="ts-type"}
|
|
101
|
+
* @defaultValue false
|
|
102
|
+
*/
|
|
103
|
+
tooltip?: boolean | TooltipProps;
|
|
104
|
+
/**
|
|
105
|
+
* Display a popover on the items when the menu is collapsed with the children list.
|
|
106
|
+
* `{ mode: 'hover', content: { side: 'right', align: 'start', alignOffset: 2 } }`{lang="ts-type"}
|
|
107
|
+
* @defaultValue false
|
|
108
|
+
*/
|
|
109
|
+
popover?: boolean | PopoverProps;
|
|
110
|
+
/** Display a line next to the active item. */
|
|
111
|
+
highlight?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* @defaultValue 'primary'
|
|
114
|
+
*/
|
|
115
|
+
highlightColor?: NavigationMenu['variants']['highlightColor'];
|
|
116
|
+
/** The content of the menu. */
|
|
117
|
+
content?: Omit<NavigationMenuContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<NavigationMenuContentEmits>>;
|
|
118
|
+
/**
|
|
119
|
+
* The orientation of the content.
|
|
120
|
+
* Only works when `orientation` is `horizontal`.
|
|
121
|
+
* @defaultValue 'horizontal'
|
|
122
|
+
*/
|
|
123
|
+
contentOrientation?: NavigationMenu['variants']['contentOrientation'];
|
|
124
|
+
/**
|
|
125
|
+
* Display an arrow alongside the menu.
|
|
126
|
+
* @defaultValue false
|
|
127
|
+
*/
|
|
128
|
+
arrow?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* The key used to get the label from the item.
|
|
131
|
+
* @defaultValue 'label'
|
|
132
|
+
*/
|
|
133
|
+
labelKey?: keyof NestedItem<T>;
|
|
134
|
+
class?: any;
|
|
135
|
+
ui?: NavigationMenu['slots'];
|
|
136
|
+
}
|
|
137
|
+
export interface NavigationMenuEmits extends NavigationMenuRootEmits {
|
|
138
|
+
}
|
|
139
|
+
type SlotProps<T extends NavigationMenuItem> = (props: {
|
|
140
|
+
item: T;
|
|
141
|
+
index: number;
|
|
142
|
+
active?: boolean;
|
|
143
|
+
}) => any;
|
|
144
|
+
export type NavigationMenuSlots<A extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>, T extends NestedItem<A> = NestedItem<A>> = {
|
|
145
|
+
'item': SlotProps<T>;
|
|
146
|
+
'item-leading': SlotProps<T>;
|
|
147
|
+
'item-label': SlotProps<T>;
|
|
148
|
+
'item-trailing': SlotProps<T>;
|
|
149
|
+
'item-content': SlotProps<T>;
|
|
150
|
+
'list-leading': (props?: {}) => any;
|
|
151
|
+
'list-trailing': (props?: {}) => any;
|
|
152
|
+
} & DynamicSlots<MergeTypes<T>, 'leading' | 'label' | 'trailing' | 'content', {
|
|
153
|
+
index: number;
|
|
154
|
+
active?: boolean;
|
|
155
|
+
}>;
|
|
156
|
+
declare const __VLS_export: <T extends ArrayOrNested<NavigationMenuItem>>(__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<{
|
|
157
|
+
props: __VLS_PrettifyLocal<NavigationMenuProps<T> & {
|
|
158
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
159
|
+
}> & import("vue").PublicProps;
|
|
160
|
+
expose: (exposed: {}) => void;
|
|
161
|
+
attrs: any;
|
|
162
|
+
slots: NavigationMenuSlots<T, NestedItem<T>>;
|
|
163
|
+
emit: (evt: "update:modelValue", value: string) => void;
|
|
164
|
+
}>) => import("vue").VNode & {
|
|
165
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
166
|
+
};
|
|
167
|
+
declare const _default: typeof __VLS_export;
|
|
168
|
+
export default _default;
|
|
169
|
+
type __VLS_PrettifyLocal<T> = {
|
|
170
|
+
[K in keyof T as K]: T[K];
|
|
171
|
+
} & {};
|
|
@@ -153,17 +153,18 @@ export type NavigationMenuSlots<A extends ArrayOrNested<NavigationMenuItem> = Ar
|
|
|
153
153
|
index: number;
|
|
154
154
|
active?: boolean;
|
|
155
155
|
}>;
|
|
156
|
-
declare const
|
|
157
|
-
props: __VLS_PrettifyLocal<
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
expose(exposed:
|
|
156
|
+
declare const __VLS_export: <T extends ArrayOrNested<NavigationMenuItem>>(__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<{
|
|
157
|
+
props: __VLS_PrettifyLocal<NavigationMenuProps<T> & {
|
|
158
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
159
|
+
}> & import("vue").PublicProps;
|
|
160
|
+
expose: (exposed: {}) => void;
|
|
161
161
|
attrs: any;
|
|
162
162
|
slots: NavigationMenuSlots<T, NestedItem<T>>;
|
|
163
163
|
emit: (evt: "update:modelValue", value: string) => void;
|
|
164
164
|
}>) => import("vue").VNode & {
|
|
165
165
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
166
166
|
};
|
|
167
|
+
declare const _default: typeof __VLS_export;
|
|
167
168
|
export default _default;
|
|
168
169
|
type __VLS_PrettifyLocal<T> = {
|
|
169
170
|
[K in keyof T as K]: T[K];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { PaginationRootProps, PaginationRootEmits } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/pagination';
|
|
4
|
+
import type { ButtonProps } from '../types';
|
|
5
|
+
import type { ComponentConfig } from '../types/utils';
|
|
6
|
+
type Pagination = ComponentConfig<typeof theme, AppConfig, 'pagination'>;
|
|
7
|
+
export interface PaginationProps extends Partial<Pick<PaginationRootProps, 'defaultPage' | 'disabled' | 'itemsPerPage' | 'page' | 'showEdges' | 'siblingCount' | 'total'>> {
|
|
8
|
+
/**
|
|
9
|
+
* The element or component this component should render as.
|
|
10
|
+
* @defaultValue 'div'
|
|
11
|
+
*/
|
|
12
|
+
as?: any;
|
|
13
|
+
/**
|
|
14
|
+
* The icon to use for the first page control.
|
|
15
|
+
* @defaultValue appConfig.ui.icons.chevronDoubleLeft
|
|
16
|
+
* @IconifyIcon
|
|
17
|
+
*/
|
|
18
|
+
firstIcon?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The icon to use for the previous page control.
|
|
21
|
+
* @defaultValue appConfig.ui.icons.chevronLeft
|
|
22
|
+
* @IconifyIcon
|
|
23
|
+
*/
|
|
24
|
+
prevIcon?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The icon to use for the next page control.
|
|
27
|
+
* @defaultValue appConfig.ui.icons.chevronRight
|
|
28
|
+
* @IconifyIcon
|
|
29
|
+
*/
|
|
30
|
+
nextIcon?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The icon to use for the last page control.
|
|
33
|
+
* @defaultValue appConfig.ui.icons.chevronDoubleRight
|
|
34
|
+
* @IconifyIcon
|
|
35
|
+
*/
|
|
36
|
+
lastIcon?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The icon to use for the ellipsis control.
|
|
39
|
+
* @defaultValue appConfig.ui.icons.ellipsis
|
|
40
|
+
* @IconifyIcon
|
|
41
|
+
*/
|
|
42
|
+
ellipsisIcon?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The color of the pagination controls.
|
|
45
|
+
* @defaultValue 'neutral'
|
|
46
|
+
* @IconifyIcon
|
|
47
|
+
*/
|
|
48
|
+
color?: ButtonProps['color'];
|
|
49
|
+
/**
|
|
50
|
+
* The variant of the pagination controls.
|
|
51
|
+
* @defaultValue 'outline'
|
|
52
|
+
*/
|
|
53
|
+
variant?: ButtonProps['variant'];
|
|
54
|
+
/**
|
|
55
|
+
* The color of the active pagination control.
|
|
56
|
+
* @defaultValue 'primary'
|
|
57
|
+
*/
|
|
58
|
+
activeColor?: ButtonProps['color'];
|
|
59
|
+
/**
|
|
60
|
+
* The variant of the active pagination control.
|
|
61
|
+
* @defaultValue 'solid'
|
|
62
|
+
*/
|
|
63
|
+
activeVariant?: ButtonProps['variant'];
|
|
64
|
+
/**
|
|
65
|
+
* Whether to show the first, previous, next, and last controls.
|
|
66
|
+
* @defaultValue true
|
|
67
|
+
*/
|
|
68
|
+
showControls?: boolean;
|
|
69
|
+
size?: ButtonProps['size'];
|
|
70
|
+
/**
|
|
71
|
+
* A function to render page controls as links.
|
|
72
|
+
* @param page The page number to navigate to.
|
|
73
|
+
*/
|
|
74
|
+
to?: (page: number) => ButtonProps['to'];
|
|
75
|
+
class?: any;
|
|
76
|
+
ui?: Pagination['slots'];
|
|
77
|
+
}
|
|
78
|
+
export interface PaginationEmits extends PaginationRootEmits {
|
|
79
|
+
}
|
|
80
|
+
export interface PaginationSlots {
|
|
81
|
+
first(props?: {}): any;
|
|
82
|
+
prev(props?: {}): any;
|
|
83
|
+
next(props?: {}): any;
|
|
84
|
+
last(props?: {}): any;
|
|
85
|
+
ellipsis(props?: {}): any;
|
|
86
|
+
item(props: {
|
|
87
|
+
page: number;
|
|
88
|
+
pageCount: number;
|
|
89
|
+
item: {
|
|
90
|
+
type: 'ellipsis';
|
|
91
|
+
} | {
|
|
92
|
+
type: 'page';
|
|
93
|
+
value: number;
|
|
94
|
+
};
|
|
95
|
+
index: number;
|
|
96
|
+
}): any;
|
|
97
|
+
}
|
|
98
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<PaginationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
99
|
+
"update:page": (value: number) => any;
|
|
100
|
+
}, string, import("vue").PublicProps, Readonly<PaginationProps> & Readonly<{
|
|
101
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
102
|
+
}>, {
|
|
103
|
+
color: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
|
|
104
|
+
activeColor: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
|
|
105
|
+
variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
|
|
106
|
+
activeVariant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
|
|
107
|
+
itemsPerPage: number;
|
|
108
|
+
showEdges: boolean;
|
|
109
|
+
siblingCount: number;
|
|
110
|
+
total: number;
|
|
111
|
+
showControls: boolean;
|
|
112
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PaginationSlots>;
|
|
113
|
+
declare const _default: typeof __VLS_export;
|
|
114
|
+
export default _default;
|
|
115
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
116
|
+
new (): {
|
|
117
|
+
$slots: S;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
@@ -60,8 +60,8 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pagination ||
|
|
|
60
60
|
</slot>
|
|
61
61
|
</PaginationPrev>
|
|
62
62
|
|
|
63
|
-
<template v-for="(item, index) in items">
|
|
64
|
-
<PaginationListItem v-if="item.type === 'page'"
|
|
63
|
+
<template v-for="(item, index) in items" :key="index">
|
|
64
|
+
<PaginationListItem v-if="item.type === 'page'" as-child :value="item.value" :class="ui.item({ class: props.ui?.item })">
|
|
65
65
|
<slot name="item" v-bind="{ item, index, page, pageCount }">
|
|
66
66
|
<UButton
|
|
67
67
|
:color="page === item.value ? activeColor : color"
|
|
@@ -75,9 +75,9 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pagination ||
|
|
|
75
75
|
</slot>
|
|
76
76
|
</PaginationListItem>
|
|
77
77
|
|
|
78
|
-
<PaginationEllipsis v-else
|
|
78
|
+
<PaginationEllipsis v-else as-child :class="ui.ellipsis({ class: props.ui?.ellipsis })">
|
|
79
79
|
<slot name="ellipsis">
|
|
80
|
-
<UButton :color="color" :variant="variant" :size="size" :icon="ellipsisIcon || appConfig.ui.icons.ellipsis" />
|
|
80
|
+
<UButton as="div" :color="color" :variant="variant" :size="size" :icon="ellipsisIcon || appConfig.ui.icons.ellipsis" />
|
|
81
81
|
</slot>
|
|
82
82
|
</PaginationEllipsis>
|
|
83
83
|
</template>
|
|
@@ -95,7 +95,7 @@ export interface PaginationSlots {
|
|
|
95
95
|
index: number;
|
|
96
96
|
}): any;
|
|
97
97
|
}
|
|
98
|
-
declare const
|
|
98
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<PaginationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
99
99
|
"update:page": (value: number) => any;
|
|
100
100
|
}, string, import("vue").PublicProps, Readonly<PaginationProps> & Readonly<{
|
|
101
101
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
@@ -110,6 +110,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Pagination
|
|
|
110
110
|
total: number;
|
|
111
111
|
showControls: boolean;
|
|
112
112
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PaginationSlots>;
|
|
113
|
+
declare const _default: typeof __VLS_export;
|
|
113
114
|
export default _default;
|
|
114
115
|
type __VLS_WithSlots<T, S> = T & {
|
|
115
116
|
new (): {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
2
|
+
import type { PinInputRootEmits, PinInputRootProps } from 'reka-ui';
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
4
|
+
import theme from '#build/ui/pin-input';
|
|
5
|
+
import type { ComponentConfig } from '../types/utils';
|
|
6
|
+
type PinInput = ComponentConfig<typeof theme, AppConfig, 'pinInput'>;
|
|
7
|
+
type PinInputType = 'text' | 'number';
|
|
8
|
+
export interface PinInputProps<T extends PinInputType = 'text'> extends Pick<PinInputRootProps<T>, 'defaultValue' | 'disabled' | 'id' | 'mask' | 'modelValue' | 'name' | 'otp' | 'placeholder' | 'required' | 'type'> {
|
|
9
|
+
/**
|
|
10
|
+
* The element or component this component should render as.
|
|
11
|
+
* @defaultValue 'div'
|
|
12
|
+
*/
|
|
13
|
+
as?: any;
|
|
14
|
+
/**
|
|
15
|
+
* @defaultValue 'primary'
|
|
16
|
+
*/
|
|
17
|
+
color?: PinInput['variants']['color'];
|
|
18
|
+
/**
|
|
19
|
+
* @defaultValue 'outline'
|
|
20
|
+
*/
|
|
21
|
+
variant?: PinInput['variants']['variant'];
|
|
22
|
+
/**
|
|
23
|
+
* @defaultValue 'md'
|
|
24
|
+
*/
|
|
25
|
+
size?: PinInput['variants']['size'];
|
|
26
|
+
/**
|
|
27
|
+
* The number of input fields.
|
|
28
|
+
* @defaultValue 5
|
|
29
|
+
*/
|
|
30
|
+
length?: number | string;
|
|
31
|
+
autofocus?: boolean;
|
|
32
|
+
autofocusDelay?: number;
|
|
33
|
+
highlight?: boolean;
|
|
34
|
+
class?: any;
|
|
35
|
+
ui?: PinInput['slots'];
|
|
36
|
+
}
|
|
37
|
+
export type PinInputEmits<T extends PinInputType = 'text'> = PinInputRootEmits<T> & {
|
|
38
|
+
change: [event: Event];
|
|
39
|
+
blur: [event: Event];
|
|
40
|
+
};
|
|
41
|
+
declare const __VLS_export: <T extends PinInputType>(__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<{
|
|
42
|
+
props: __VLS_PrettifyLocal<PinInputProps<T> & {
|
|
43
|
+
onBlur?: ((event: Event) => any) | undefined;
|
|
44
|
+
onComplete?: ((value: [T] extends ["number"] ? number[] : string[]) => any) | undefined;
|
|
45
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
46
|
+
"onUpdate:modelValue"?: ((value: [T] extends ["number"] ? number[] : string[]) => any) | undefined;
|
|
47
|
+
}> & import("vue").PublicProps;
|
|
48
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
49
|
+
inputsRef: import("vue").Ref<ComponentPublicInstance[], ComponentPublicInstance[]>;
|
|
50
|
+
}>) => void;
|
|
51
|
+
attrs: any;
|
|
52
|
+
slots: {};
|
|
53
|
+
emit: ((evt: "blur", event: Event) => void) & ((evt: "complete", value: [T] extends ["number"] ? number[] : string[]) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: [T] extends ["number"] ? number[] : string[]) => void);
|
|
54
|
+
}>) => import("vue").VNode & {
|
|
55
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
56
|
+
};
|
|
57
|
+
declare const _default: typeof __VLS_export;
|
|
58
|
+
export default _default;
|
|
59
|
+
type __VLS_PrettifyLocal<T> = {
|
|
60
|
+
[K in keyof T as K]: T[K];
|
|
61
|
+
} & {};
|
|
@@ -38,22 +38,23 @@ export type PinInputEmits<T extends PinInputType = 'text'> = PinInputRootEmits<T
|
|
|
38
38
|
change: [event: Event];
|
|
39
39
|
blur: [event: Event];
|
|
40
40
|
};
|
|
41
|
-
declare const
|
|
42
|
-
props: __VLS_PrettifyLocal<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
41
|
+
declare const __VLS_export: <T extends PinInputType>(__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<{
|
|
42
|
+
props: __VLS_PrettifyLocal<PinInputProps<T> & {
|
|
43
|
+
onBlur?: ((event: Event) => any) | undefined;
|
|
44
|
+
onComplete?: ((value: [T] extends ["number"] ? number[] : string[]) => any) | undefined;
|
|
45
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
46
|
+
"onUpdate:modelValue"?: ((value: [T] extends ["number"] ? number[] : string[]) => any) | undefined;
|
|
47
|
+
}> & import("vue").PublicProps;
|
|
48
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
49
49
|
inputsRef: import("vue").Ref<ComponentPublicInstance[], ComponentPublicInstance[]>;
|
|
50
|
-
}>)
|
|
50
|
+
}>) => void;
|
|
51
51
|
attrs: any;
|
|
52
52
|
slots: {};
|
|
53
53
|
emit: ((evt: "blur", event: Event) => void) & ((evt: "complete", value: [T] extends ["number"] ? number[] : string[]) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: [T] extends ["number"] ? number[] : string[]) => void);
|
|
54
54
|
}>) => import("vue").VNode & {
|
|
55
55
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
56
56
|
};
|
|
57
|
+
declare const _default: typeof __VLS_export;
|
|
57
58
|
export default _default;
|
|
58
59
|
type __VLS_PrettifyLocal<T> = {
|
|
59
60
|
[K in keyof T as K]: T[K];
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Popover } from 'reka-ui/namespaced';
|
|
2
|
+
import type { PopoverRootProps, HoverCardRootProps, PopoverRootEmits, PopoverContentProps, PopoverContentEmits, PopoverArrowProps, HoverCardTriggerProps } from 'reka-ui';
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
4
|
+
import theme from '#build/ui/popover';
|
|
5
|
+
import type { EmitsToProps, ComponentConfig } from '../types/utils';
|
|
6
|
+
type Popover = ComponentConfig<typeof theme, AppConfig, 'popover'>;
|
|
7
|
+
export interface PopoverProps extends PopoverRootProps, Pick<HoverCardRootProps, 'openDelay' | 'closeDelay'> {
|
|
8
|
+
/**
|
|
9
|
+
* The display mode of the popover.
|
|
10
|
+
* @defaultValue 'click'
|
|
11
|
+
*/
|
|
12
|
+
mode?: 'click' | 'hover';
|
|
13
|
+
/**
|
|
14
|
+
* The content of the popover.
|
|
15
|
+
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
|
|
16
|
+
*/
|
|
17
|
+
content?: Omit<PopoverContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<PopoverContentEmits>>;
|
|
18
|
+
/**
|
|
19
|
+
* Display an arrow alongside the popover.
|
|
20
|
+
* @defaultValue false
|
|
21
|
+
*/
|
|
22
|
+
arrow?: boolean | Omit<PopoverArrowProps, 'as' | 'asChild'>;
|
|
23
|
+
/**
|
|
24
|
+
* Render the popover in a portal.
|
|
25
|
+
* @defaultValue true
|
|
26
|
+
*/
|
|
27
|
+
portal?: boolean | string | HTMLElement;
|
|
28
|
+
/**
|
|
29
|
+
* The reference (or anchor) element that is being referred to for positioning.
|
|
30
|
+
*
|
|
31
|
+
* If not provided will use the current component as anchor.
|
|
32
|
+
*/
|
|
33
|
+
reference?: HoverCardTriggerProps['reference'];
|
|
34
|
+
/**
|
|
35
|
+
* When `false`, the popover will not close when clicking outside or pressing escape.
|
|
36
|
+
* @defaultValue true
|
|
37
|
+
*/
|
|
38
|
+
dismissible?: boolean;
|
|
39
|
+
class?: any;
|
|
40
|
+
ui?: Popover['slots'];
|
|
41
|
+
}
|
|
42
|
+
export interface PopoverEmits extends PopoverRootEmits {
|
|
43
|
+
'close:prevent': [];
|
|
44
|
+
}
|
|
45
|
+
export interface PopoverSlots {
|
|
46
|
+
default(props: {
|
|
47
|
+
open: boolean;
|
|
48
|
+
}): any;
|
|
49
|
+
content(props?: {}): any;
|
|
50
|
+
anchor(props?: {}): any;
|
|
51
|
+
}
|
|
52
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<PopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
53
|
+
"update:open": (value: boolean) => any;
|
|
54
|
+
"close:prevent": () => any;
|
|
55
|
+
}, string, import("vue").PublicProps, Readonly<PopoverProps> & Readonly<{
|
|
56
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
57
|
+
"onClose:prevent"?: (() => any) | undefined;
|
|
58
|
+
}>, {
|
|
59
|
+
mode: "click" | "hover";
|
|
60
|
+
portal: boolean | string | HTMLElement;
|
|
61
|
+
dismissible: boolean;
|
|
62
|
+
openDelay: number;
|
|
63
|
+
closeDelay: number;
|
|
64
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PopoverSlots>;
|
|
65
|
+
declare const _default: typeof __VLS_export;
|
|
66
|
+
export default _default;
|
|
67
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
68
|
+
new (): {
|
|
69
|
+
$slots: S;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
@@ -49,7 +49,7 @@ export interface PopoverSlots {
|
|
|
49
49
|
content(props?: {}): any;
|
|
50
50
|
anchor(props?: {}): any;
|
|
51
51
|
}
|
|
52
|
-
declare const
|
|
52
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<PopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
53
53
|
"update:open": (value: boolean) => any;
|
|
54
54
|
"close:prevent": () => any;
|
|
55
55
|
}, string, import("vue").PublicProps, Readonly<PopoverProps> & Readonly<{
|
|
@@ -62,6 +62,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PopoverPro
|
|
|
62
62
|
openDelay: number;
|
|
63
63
|
closeDelay: number;
|
|
64
64
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PopoverSlots>;
|
|
65
|
+
declare const _default: typeof __VLS_export;
|
|
65
66
|
export default _default;
|
|
66
67
|
type __VLS_WithSlots<T, S> = T & {
|
|
67
68
|
new (): {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { ProgressRootProps, ProgressRootEmits } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/progress';
|
|
4
|
+
import type { ComponentConfig } from '../types/utils';
|
|
5
|
+
type Progress = ComponentConfig<typeof theme, AppConfig, 'progress'>;
|
|
6
|
+
export interface ProgressProps extends Pick<ProgressRootProps, 'getValueLabel' | 'getValueText' | 'modelValue'> {
|
|
7
|
+
/**
|
|
8
|
+
* The element or component this component should render as.
|
|
9
|
+
* @defaultValue 'div'
|
|
10
|
+
*/
|
|
11
|
+
as?: any;
|
|
12
|
+
/** The maximum progress value. */
|
|
13
|
+
max?: number | Array<any>;
|
|
14
|
+
/** Display the current progress value. */
|
|
15
|
+
status?: boolean;
|
|
16
|
+
/** Whether the progress is visually inverted. */
|
|
17
|
+
inverted?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @defaultValue 'md'
|
|
20
|
+
*/
|
|
21
|
+
size?: Progress['variants']['size'];
|
|
22
|
+
/**
|
|
23
|
+
* @defaultValue 'primary'
|
|
24
|
+
*/
|
|
25
|
+
color?: Progress['variants']['color'];
|
|
26
|
+
/**
|
|
27
|
+
* The orientation of the progress bar.
|
|
28
|
+
* @defaultValue 'horizontal'
|
|
29
|
+
*/
|
|
30
|
+
orientation?: Progress['variants']['orientation'];
|
|
31
|
+
/**
|
|
32
|
+
* The animation of the progress bar.
|
|
33
|
+
* @defaultValue 'carousel'
|
|
34
|
+
*/
|
|
35
|
+
animation?: Progress['variants']['animation'];
|
|
36
|
+
class?: any;
|
|
37
|
+
ui?: Progress['slots'];
|
|
38
|
+
}
|
|
39
|
+
export interface ProgressEmits extends ProgressRootEmits {
|
|
40
|
+
}
|
|
41
|
+
export type ProgressSlots = {
|
|
42
|
+
status(props: {
|
|
43
|
+
percent?: number;
|
|
44
|
+
}): any;
|
|
45
|
+
} & {
|
|
46
|
+
[key: string]: (props: {
|
|
47
|
+
step: number;
|
|
48
|
+
}) => any;
|
|
49
|
+
};
|
|
50
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
+
"update:modelValue": (value: string[] | undefined) => any;
|
|
52
|
+
"update:max": (value: number) => any;
|
|
53
|
+
}, string, import("vue").PublicProps, Readonly<ProgressProps> & Readonly<{
|
|
54
|
+
"onUpdate:modelValue"?: ((value: string[] | undefined) => any) | undefined;
|
|
55
|
+
"onUpdate:max"?: ((value: number) => any) | undefined;
|
|
56
|
+
}>, {
|
|
57
|
+
orientation: Progress["variants"]["orientation"];
|
|
58
|
+
modelValue: number | null;
|
|
59
|
+
inverted: boolean;
|
|
60
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProgressSlots>;
|
|
61
|
+
declare const _default: typeof __VLS_export;
|
|
62
|
+
export default _default;
|
|
63
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
64
|
+
new (): {
|
|
65
|
+
$slots: S;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -74,9 +74,8 @@ const indicatorStyle = computed(() => {
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
const statusStyle = computed(() => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
};
|
|
77
|
+
const value = `${Math.max(percent.value ?? 0, 0)}%`;
|
|
78
|
+
return props.orientation === "vertical" ? { height: value } : { width: value };
|
|
80
79
|
});
|
|
81
80
|
function isActive(index) {
|
|
82
81
|
return index === Number(props.modelValue);
|
|
@@ -47,7 +47,7 @@ export type ProgressSlots = {
|
|
|
47
47
|
step: number;
|
|
48
48
|
}) => any;
|
|
49
49
|
};
|
|
50
|
-
declare const
|
|
50
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
51
|
"update:modelValue": (value: string[] | undefined) => any;
|
|
52
52
|
"update:max": (value: number) => any;
|
|
53
53
|
}, string, import("vue").PublicProps, Readonly<ProgressProps> & Readonly<{
|
|
@@ -58,6 +58,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ProgressPr
|
|
|
58
58
|
modelValue: number | null;
|
|
59
59
|
inverted: boolean;
|
|
60
60
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProgressSlots>;
|
|
61
|
+
declare const _default: typeof __VLS_export;
|
|
61
62
|
export default _default;
|
|
62
63
|
type __VLS_WithSlots<T, S> = T & {
|
|
63
64
|
new (): {
|