@nuxt/ui 3.3.4 → 3.3.5
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/progress.ts +3 -3
- package/README.md +10 -10
- package/dist/module.d.mts +6 -6
- package/dist/module.json +3 -3
- package/dist/module.mjs +3 -3
- package/dist/runtime/components/Accordion.d.vue.ts +77 -0
- package/dist/runtime/components/Alert.d.vue.ts +81 -0
- package/dist/runtime/components/App.d.vue.ts +24 -0
- package/dist/runtime/components/Avatar.d.vue.ts +41 -0
- package/dist/runtime/components/AvatarGroup.d.vue.ts +31 -0
- package/dist/runtime/components/Badge.d.vue.ts +43 -0
- package/dist/runtime/components/Breadcrumb.d.vue.ts +66 -0
- package/dist/runtime/components/Button.d.vue.ts +44 -0
- package/dist/runtime/components/ButtonGroup.d.vue.ts +34 -0
- package/dist/runtime/components/Calendar.d.vue.ts +112 -0
- package/dist/runtime/components/Card.d.vue.ts +29 -0
- package/dist/runtime/components/Carousel.d.vue.ts +127 -0
- package/dist/runtime/components/Checkbox.d.vue.ts +73 -0
- package/dist/runtime/components/CheckboxGroup.d.vue.ts +84 -0
- package/dist/runtime/components/Chip.d.vue.ts +57 -0
- package/dist/runtime/components/Collapsible.d.vue.ts +35 -0
- package/dist/runtime/components/ColorPicker.d.vue.ts +48 -0
- package/dist/runtime/components/CommandPalette.d.vue.ts +192 -0
- package/dist/runtime/components/Container.d.vue.ts +18 -0
- package/dist/runtime/components/ContextMenu.d.vue.ts +109 -0
- package/dist/runtime/components/ContextMenuContent.d.vue.ts +49 -0
- package/dist/runtime/components/Drawer.d.vue.ts +83 -0
- package/dist/runtime/components/DropdownMenu.d.vue.ts +119 -0
- package/dist/runtime/components/DropdownMenuContent.d.vue.ts +55 -0
- package/dist/runtime/components/FileUpload.d.vue.ts +166 -0
- package/dist/runtime/components/Form.d.vue.ts +71 -0
- package/dist/runtime/components/FormField.d.vue.ts +61 -0
- package/dist/runtime/components/Icon.d.vue.ts +8 -0
- package/dist/runtime/components/Input.d.vue.ts +77 -0
- package/dist/runtime/components/InputMenu.d.vue.ts +329 -0
- package/dist/runtime/components/InputMenu.vue +1 -1
- package/dist/runtime/components/InputMenu.vue.d.ts +2 -8
- package/dist/runtime/components/InputNumber.d.vue.ts +186 -0
- package/dist/runtime/components/InputTags.d.vue.ts +185 -0
- package/dist/runtime/components/InputTags.vue +2 -2
- package/dist/runtime/components/Kbd.d.vue.ts +38 -0
- package/dist/runtime/components/Link.d.vue.ts +91 -0
- package/dist/runtime/components/LinkBase.d.vue.ts +25 -0
- package/dist/runtime/components/Modal.d.vue.ts +106 -0
- package/dist/runtime/components/NavigationMenu.d.vue.ts +170 -0
- package/dist/runtime/components/OverlayProvider.d.vue.ts +2 -0
- package/dist/runtime/components/Pagination.d.vue.ts +118 -0
- package/dist/runtime/components/PinInput.d.vue.ts +60 -0
- package/dist/runtime/components/Popover.d.vue.ts +70 -0
- package/dist/runtime/components/Progress.d.vue.ts +66 -0
- package/dist/runtime/components/Progress.vue +2 -3
- package/dist/runtime/components/RadioGroup.d.vue.ts +94 -0
- package/dist/runtime/components/Select.d.vue.ts +253 -0
- package/dist/runtime/components/SelectMenu.d.vue.ts +302 -0
- package/dist/runtime/components/Separator.d.vue.ts +54 -0
- package/dist/runtime/components/Skeleton.d.vue.ts +17 -0
- package/dist/runtime/components/Slideover.d.vue.ts +107 -0
- package/dist/runtime/components/Slider.d.vue.ts +57 -0
- package/dist/runtime/components/Stepper.d.vue.ts +85 -0
- package/dist/runtime/components/Switch.d.vue.ts +70 -0
- package/dist/runtime/components/Table.d.vue.ts +201 -0
- package/dist/runtime/components/Tabs.d.vue.ts +98 -0
- package/dist/runtime/components/Tabs.vue +2 -2
- package/dist/runtime/components/Textarea.d.vue.ts +79 -0
- package/dist/runtime/components/Timeline.d.vue.ts +70 -0
- package/dist/runtime/components/Toast.d.vue.ts +164 -0
- package/dist/runtime/components/Toaster.d.vue.ts +44 -0
- package/dist/runtime/components/Tooltip.d.vue.ts +56 -0
- package/dist/runtime/components/Tree.d.vue.ts +114 -0
- package/dist/runtime/inertia/components/Link.d.vue.ts +63 -0
- package/dist/runtime/inertia/components/LinkBase.d.vue.ts +25 -0
- package/dist/runtime/types/tv.d.ts +9 -2
- package/dist/runtime/vue/components/Icon.d.vue.ts +5 -0
- package/dist/runtime/vue/components/Link.d.vue.ts +93 -0
- package/dist/shared/{ui.BTUFJHYJ.mjs → ui.DH9BUZkq.mjs} +12 -8
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import type { TagsInputRootProps, TagsInputRootEmits, AcceptableInputValue } from 'reka-ui';
|
|
3
|
+
import theme from '#build/ui/input-tags';
|
|
4
|
+
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
5
|
+
import type { ComponentConfig } from '../types/utils';
|
|
6
|
+
type InputTags = ComponentConfig<typeof theme, AppConfig, 'inputTags'>;
|
|
7
|
+
export type InputTagItem = AcceptableInputValue;
|
|
8
|
+
export interface InputTagsProps<T extends InputTagItem = InputTagItem> extends Pick<TagsInputRootProps<T>, 'modelValue' | 'defaultValue' | 'addOnPaste' | 'addOnTab' | 'addOnBlur' | 'duplicate' | 'disabled' | 'delimiter' | 'max' | 'id' | 'convertValue' | 'displayValue' | 'name' | 'required'>, UseComponentIconsProps {
|
|
9
|
+
/**
|
|
10
|
+
* The element or component this component should render as.
|
|
11
|
+
* @defaultValue 'div'
|
|
12
|
+
*/
|
|
13
|
+
as?: any;
|
|
14
|
+
/** The placeholder text when the input is empty. */
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
/** The maximum number of character allowed. */
|
|
17
|
+
maxLength?: number;
|
|
18
|
+
/**
|
|
19
|
+
* @defaultValue 'primary'
|
|
20
|
+
*/
|
|
21
|
+
color?: InputTags['variants']['color'];
|
|
22
|
+
/**
|
|
23
|
+
* @defaultValue 'outline'
|
|
24
|
+
*/
|
|
25
|
+
variant?: InputTags['variants']['variant'];
|
|
26
|
+
/**
|
|
27
|
+
* @defaultValue 'md'
|
|
28
|
+
*/
|
|
29
|
+
size?: InputTags['variants']['size'];
|
|
30
|
+
autofocus?: boolean;
|
|
31
|
+
autofocusDelay?: number;
|
|
32
|
+
/**
|
|
33
|
+
* The icon displayed to delete a tag.
|
|
34
|
+
* @defaultValue appConfig.ui.icons.close
|
|
35
|
+
* @IconifyIcon
|
|
36
|
+
*/
|
|
37
|
+
deleteIcon?: string;
|
|
38
|
+
/** Highlight the ring color like a focus state. */
|
|
39
|
+
highlight?: boolean;
|
|
40
|
+
class?: any;
|
|
41
|
+
ui?: InputTags['slots'];
|
|
42
|
+
}
|
|
43
|
+
export interface InputTagsEmits<T extends InputTagItem> extends TagsInputRootEmits<T> {
|
|
44
|
+
change: [event: Event];
|
|
45
|
+
blur: [event: FocusEvent];
|
|
46
|
+
focus: [event: FocusEvent];
|
|
47
|
+
}
|
|
48
|
+
type SlotProps<T extends InputTagItem> = (props: {
|
|
49
|
+
item: T;
|
|
50
|
+
index: number;
|
|
51
|
+
}) => any;
|
|
52
|
+
export interface InputTagsSlots<T extends InputTagItem = InputTagItem> {
|
|
53
|
+
'leading'(props?: {}): any;
|
|
54
|
+
'default'(props?: {}): any;
|
|
55
|
+
'trailing'(props?: {}): any;
|
|
56
|
+
'item-text': SlotProps<T>;
|
|
57
|
+
'item-delete': SlotProps<T>;
|
|
58
|
+
}
|
|
59
|
+
declare const _default: <T extends InputTagItem>(__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<{
|
|
60
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
61
|
+
readonly onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
62
|
+
readonly onChange?: ((event: Event) => any) | undefined;
|
|
63
|
+
readonly onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
64
|
+
readonly onInvalid?: ((payload: T) => any) | undefined;
|
|
65
|
+
readonly "onUpdate:modelValue"?: ((payload: T[]) => any) | undefined;
|
|
66
|
+
readonly onAddTag?: ((payload: T) => any) | undefined;
|
|
67
|
+
readonly onRemoveTag?: ((payload: T) => any) | undefined;
|
|
68
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onInvalid" | "onUpdate:modelValue" | "onRemoveTag" | "onAddTag"> & InputTagsProps<T> & {}> & import("vue").PublicProps;
|
|
69
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
70
|
+
inputRef: import("vue").Ref<({
|
|
71
|
+
$: import("vue").ComponentInternalInstance;
|
|
72
|
+
$data: {};
|
|
73
|
+
$props: {
|
|
74
|
+
readonly placeholder?: string | undefined;
|
|
75
|
+
readonly autoFocus?: boolean | undefined;
|
|
76
|
+
readonly maxLength?: number | undefined;
|
|
77
|
+
readonly asChild?: boolean | undefined;
|
|
78
|
+
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
79
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
80
|
+
$attrs: {
|
|
81
|
+
[x: string]: unknown;
|
|
82
|
+
};
|
|
83
|
+
$refs: {
|
|
84
|
+
[x: string]: unknown;
|
|
85
|
+
};
|
|
86
|
+
$slots: Readonly<{
|
|
87
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
90
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
91
|
+
$host: Element | null;
|
|
92
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
93
|
+
$el: any;
|
|
94
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").TagsInputInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
95
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
96
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
97
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
98
|
+
created?: (() => void) | (() => void)[];
|
|
99
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
100
|
+
mounted?: (() => void) | (() => void)[];
|
|
101
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
102
|
+
updated?: (() => void) | (() => void)[];
|
|
103
|
+
activated?: (() => void) | (() => void)[];
|
|
104
|
+
deactivated?: (() => void) | (() => void)[];
|
|
105
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
106
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
107
|
+
destroyed?: (() => void) | (() => void)[];
|
|
108
|
+
unmounted?: (() => void) | (() => void)[];
|
|
109
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
110
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
111
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
112
|
+
};
|
|
113
|
+
$forceUpdate: () => void;
|
|
114
|
+
$nextTick: typeof import("vue").nextTick;
|
|
115
|
+
$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;
|
|
116
|
+
} & Readonly<{
|
|
117
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
118
|
+
}> & Omit<Readonly<import("reka-ui").TagsInputInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
119
|
+
$slots: {
|
|
120
|
+
default?: (props: {}) => any;
|
|
121
|
+
};
|
|
122
|
+
}) | null, ({
|
|
123
|
+
$: import("vue").ComponentInternalInstance;
|
|
124
|
+
$data: {};
|
|
125
|
+
$props: {
|
|
126
|
+
readonly placeholder?: string | undefined;
|
|
127
|
+
readonly autoFocus?: boolean | undefined;
|
|
128
|
+
readonly maxLength?: number | undefined;
|
|
129
|
+
readonly asChild?: boolean | undefined;
|
|
130
|
+
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
131
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
132
|
+
$attrs: {
|
|
133
|
+
[x: string]: unknown;
|
|
134
|
+
};
|
|
135
|
+
$refs: {
|
|
136
|
+
[x: string]: unknown;
|
|
137
|
+
};
|
|
138
|
+
$slots: Readonly<{
|
|
139
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
142
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
143
|
+
$host: Element | null;
|
|
144
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
145
|
+
$el: any;
|
|
146
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").TagsInputInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
147
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
148
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
149
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
150
|
+
created?: (() => void) | (() => void)[];
|
|
151
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
152
|
+
mounted?: (() => void) | (() => void)[];
|
|
153
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
154
|
+
updated?: (() => void) | (() => void)[];
|
|
155
|
+
activated?: (() => void) | (() => void)[];
|
|
156
|
+
deactivated?: (() => void) | (() => void)[];
|
|
157
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
158
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
159
|
+
destroyed?: (() => void) | (() => void)[];
|
|
160
|
+
unmounted?: (() => void) | (() => void)[];
|
|
161
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
162
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
163
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
164
|
+
};
|
|
165
|
+
$forceUpdate: () => void;
|
|
166
|
+
$nextTick: typeof import("vue").nextTick;
|
|
167
|
+
$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;
|
|
168
|
+
} & Readonly<{
|
|
169
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
170
|
+
}> & Omit<Readonly<import("reka-ui").TagsInputInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
171
|
+
$slots: {
|
|
172
|
+
default?: (props: {}) => any;
|
|
173
|
+
};
|
|
174
|
+
}) | null>;
|
|
175
|
+
}>): void;
|
|
176
|
+
attrs: any;
|
|
177
|
+
slots: InputTagsSlots<T>;
|
|
178
|
+
emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "invalid", payload: T) => void) & ((evt: "update:modelValue", payload: T[]) => void) & ((evt: "addTag", payload: T) => void) & ((evt: "removeTag", payload: T) => void);
|
|
179
|
+
}>) => import("vue").VNode & {
|
|
180
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
181
|
+
};
|
|
182
|
+
export default _default;
|
|
183
|
+
type __VLS_PrettifyLocal<T> = {
|
|
184
|
+
[K in keyof T as K]: T[K];
|
|
185
|
+
} & {};
|
|
@@ -112,8 +112,6 @@ defineExpose({
|
|
|
112
112
|
:name="name"
|
|
113
113
|
:disabled="disabled"
|
|
114
114
|
@update:model-value="onUpdate"
|
|
115
|
-
@blur="onBlur"
|
|
116
|
-
@focus="onFocus"
|
|
117
115
|
>
|
|
118
116
|
<TagsInputItem
|
|
119
117
|
v-for="(item, index) in tags"
|
|
@@ -141,6 +139,8 @@ defineExpose({
|
|
|
141
139
|
:placeholder="placeholder"
|
|
142
140
|
:max-length="maxLength"
|
|
143
141
|
:class="ui.input({ class: props.ui?.input })"
|
|
142
|
+
@blur="onBlur"
|
|
143
|
+
@focus="onFocus"
|
|
144
144
|
/>
|
|
145
145
|
|
|
146
146
|
<slot />
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import theme from '#build/ui/kbd';
|
|
3
|
+
import type { KbdKey } from '../composables/useKbd';
|
|
4
|
+
import type { ComponentConfig } from '../types/utils';
|
|
5
|
+
type Kbd = ComponentConfig<typeof theme, AppConfig, 'kbd'>;
|
|
6
|
+
export interface KbdProps {
|
|
7
|
+
/**
|
|
8
|
+
* The element or component this component should render as.
|
|
9
|
+
* @defaultValue 'kbd'
|
|
10
|
+
*/
|
|
11
|
+
as?: any;
|
|
12
|
+
value?: KbdKey | string;
|
|
13
|
+
/**
|
|
14
|
+
* @defaultValue 'neutral'
|
|
15
|
+
*/
|
|
16
|
+
color?: Kbd['variants']['color'];
|
|
17
|
+
/**
|
|
18
|
+
* @defaultValue 'outline'
|
|
19
|
+
*/
|
|
20
|
+
variant?: Kbd['variants']['variant'];
|
|
21
|
+
/**
|
|
22
|
+
* @defaultValue 'md'
|
|
23
|
+
*/
|
|
24
|
+
size?: Kbd['variants']['size'];
|
|
25
|
+
class?: any;
|
|
26
|
+
}
|
|
27
|
+
export interface KbdSlots {
|
|
28
|
+
default(props?: {}): any;
|
|
29
|
+
}
|
|
30
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<KbdProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KbdProps> & Readonly<{}>, {
|
|
31
|
+
as: any;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, KbdSlots>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes } from 'vue';
|
|
2
|
+
import type { RouterLinkProps, RouteLocationRaw } from 'vue-router';
|
|
3
|
+
interface NuxtLinkProps extends Omit<RouterLinkProps, 'to'> {
|
|
4
|
+
/**
|
|
5
|
+
* Route Location the link should navigate to when clicked on.
|
|
6
|
+
*/
|
|
7
|
+
to?: RouteLocationRaw;
|
|
8
|
+
/**
|
|
9
|
+
* An alias for `to`. If used with `to`, `href` will be ignored
|
|
10
|
+
*/
|
|
11
|
+
href?: NuxtLinkProps['to'];
|
|
12
|
+
/**
|
|
13
|
+
* Forces the link to be considered as external (true) or internal (false). This is helpful to handle edge-cases
|
|
14
|
+
*/
|
|
15
|
+
external?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Where to display the linked URL, as the name for a browsing context.
|
|
18
|
+
*/
|
|
19
|
+
target?: '_blank' | '_parent' | '_self' | '_top' | (string & {}) | null;
|
|
20
|
+
/**
|
|
21
|
+
* A rel attribute value to apply on the link. Defaults to "noopener noreferrer" for external links.
|
|
22
|
+
*/
|
|
23
|
+
rel?: 'noopener' | 'noreferrer' | 'nofollow' | 'sponsored' | 'ugc' | (string & {}) | null;
|
|
24
|
+
/**
|
|
25
|
+
* If set to true, no rel attribute will be added to the link
|
|
26
|
+
*/
|
|
27
|
+
noRel?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* A class to apply to links that have been prefetched.
|
|
30
|
+
*/
|
|
31
|
+
prefetchedClass?: string;
|
|
32
|
+
/**
|
|
33
|
+
* When enabled will prefetch middleware, layouts and payloads of links in the viewport.
|
|
34
|
+
*/
|
|
35
|
+
prefetch?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Allows controlling when to prefetch links. By default, prefetch is triggered only on visibility.
|
|
38
|
+
*/
|
|
39
|
+
prefetchOn?: 'visibility' | 'interaction' | Partial<{
|
|
40
|
+
visibility: boolean;
|
|
41
|
+
interaction: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Escape hatch to disable `prefetch` attribute.
|
|
45
|
+
*/
|
|
46
|
+
noPrefetch?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface LinkProps extends NuxtLinkProps {
|
|
49
|
+
/**
|
|
50
|
+
* The element or component this component should render as when not a link.
|
|
51
|
+
* @defaultValue 'button'
|
|
52
|
+
*/
|
|
53
|
+
as?: any;
|
|
54
|
+
/**
|
|
55
|
+
* The type of the button when not a link.
|
|
56
|
+
* @defaultValue 'button'
|
|
57
|
+
*/
|
|
58
|
+
type?: ButtonHTMLAttributes['type'];
|
|
59
|
+
disabled?: boolean;
|
|
60
|
+
/** Force the link to be active independent of the current route. */
|
|
61
|
+
active?: boolean;
|
|
62
|
+
/** Will only be active if the current route is an exact match. */
|
|
63
|
+
exact?: boolean;
|
|
64
|
+
/** Allows controlling how the current route query sets the link as active. */
|
|
65
|
+
exactQuery?: boolean | 'partial';
|
|
66
|
+
/** Will only be active if the current route hash is an exact match. */
|
|
67
|
+
exactHash?: boolean;
|
|
68
|
+
/** The class to apply when the link is inactive. */
|
|
69
|
+
inactiveClass?: string;
|
|
70
|
+
custom?: boolean;
|
|
71
|
+
/** When `true`, only styles from `class`, `activeClass`, and `inactiveClass` will be applied. */
|
|
72
|
+
raw?: boolean;
|
|
73
|
+
class?: any;
|
|
74
|
+
}
|
|
75
|
+
export interface LinkSlots {
|
|
76
|
+
default(props: {
|
|
77
|
+
active: boolean;
|
|
78
|
+
}): any;
|
|
79
|
+
}
|
|
80
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
|
|
81
|
+
type: "reset" | "submit" | "button";
|
|
82
|
+
as: any;
|
|
83
|
+
ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
|
|
84
|
+
active: boolean;
|
|
85
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
|
|
86
|
+
export default _default;
|
|
87
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
88
|
+
new (): {
|
|
89
|
+
$slots: S;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { LinkProps } from '../types';
|
|
2
|
+
export interface LinkBaseProps {
|
|
3
|
+
as?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onClick?: ((e: MouseEvent) => void | Promise<void>) | Array<((e: MouseEvent) => void | Promise<void>)>;
|
|
7
|
+
href?: string;
|
|
8
|
+
navigate?: (e: MouseEvent) => void;
|
|
9
|
+
target?: LinkProps['target'];
|
|
10
|
+
rel?: LinkProps['rel'];
|
|
11
|
+
active?: boolean;
|
|
12
|
+
isExternal?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
|
|
15
|
+
type: string;
|
|
16
|
+
as: string;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
18
|
+
default?: (props: {}) => any;
|
|
19
|
+
}>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { DialogRootProps, DialogRootEmits, DialogContentProps, DialogContentEmits } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/modal';
|
|
4
|
+
import type { ButtonProps } from '../types';
|
|
5
|
+
import type { EmitsToProps, ComponentConfig } from '../types/utils';
|
|
6
|
+
type Modal = ComponentConfig<typeof theme, AppConfig, 'modal'>;
|
|
7
|
+
export interface ModalProps extends DialogRootProps {
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
/** The content of the modal. */
|
|
11
|
+
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DialogContentEmits>>;
|
|
12
|
+
/**
|
|
13
|
+
* Render an overlay behind the modal.
|
|
14
|
+
* @defaultValue true
|
|
15
|
+
*/
|
|
16
|
+
overlay?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Animate the modal when opening or closing.
|
|
19
|
+
* @defaultValue true
|
|
20
|
+
*/
|
|
21
|
+
transition?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* When `true`, the modal will take up the full screen.
|
|
24
|
+
* @defaultValue false
|
|
25
|
+
*/
|
|
26
|
+
fullscreen?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Render the modal in a portal.
|
|
29
|
+
* @defaultValue true
|
|
30
|
+
*/
|
|
31
|
+
portal?: boolean | string | HTMLElement;
|
|
32
|
+
/**
|
|
33
|
+
* Display a close button to dismiss the modal.
|
|
34
|
+
* `{ size: 'md', color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
|
35
|
+
* @defaultValue true
|
|
36
|
+
*/
|
|
37
|
+
close?: boolean | Partial<ButtonProps>;
|
|
38
|
+
/**
|
|
39
|
+
* The icon displayed in the close button.
|
|
40
|
+
* @defaultValue appConfig.ui.icons.close
|
|
41
|
+
* @IconifyIcon
|
|
42
|
+
*/
|
|
43
|
+
closeIcon?: string;
|
|
44
|
+
/**
|
|
45
|
+
* When `false`, the modal will not close when clicking outside or pressing escape.
|
|
46
|
+
* @defaultValue true
|
|
47
|
+
*/
|
|
48
|
+
dismissible?: boolean;
|
|
49
|
+
class?: any;
|
|
50
|
+
ui?: Modal['slots'];
|
|
51
|
+
}
|
|
52
|
+
export interface ModalEmits extends DialogRootEmits {
|
|
53
|
+
'after:leave': [];
|
|
54
|
+
'after:enter': [];
|
|
55
|
+
'close:prevent': [];
|
|
56
|
+
}
|
|
57
|
+
export interface ModalSlots {
|
|
58
|
+
default(props: {
|
|
59
|
+
open: boolean;
|
|
60
|
+
}): any;
|
|
61
|
+
content(props: {
|
|
62
|
+
close: () => void;
|
|
63
|
+
}): any;
|
|
64
|
+
header(props: {
|
|
65
|
+
close: () => void;
|
|
66
|
+
}): any;
|
|
67
|
+
title(props?: {}): any;
|
|
68
|
+
description(props?: {}): any;
|
|
69
|
+
actions(props?: {}): any;
|
|
70
|
+
close(props: {
|
|
71
|
+
close: () => void;
|
|
72
|
+
ui: {
|
|
73
|
+
[K in keyof Required<Modal['slots']>]: (props?: Record<string, any>) => string;
|
|
74
|
+
};
|
|
75
|
+
}): any;
|
|
76
|
+
body(props: {
|
|
77
|
+
close: () => void;
|
|
78
|
+
}): any;
|
|
79
|
+
footer(props: {
|
|
80
|
+
close: () => void;
|
|
81
|
+
}): any;
|
|
82
|
+
}
|
|
83
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
84
|
+
"update:open": (value: boolean) => any;
|
|
85
|
+
"after:leave": () => any;
|
|
86
|
+
"after:enter": () => any;
|
|
87
|
+
"close:prevent": () => any;
|
|
88
|
+
}, string, import("vue").PublicProps, Readonly<ModalProps> & Readonly<{
|
|
89
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
90
|
+
"onAfter:leave"?: (() => any) | undefined;
|
|
91
|
+
"onAfter:enter"?: (() => any) | undefined;
|
|
92
|
+
"onClose:prevent"?: (() => any) | undefined;
|
|
93
|
+
}>, {
|
|
94
|
+
close: boolean | Partial<ButtonProps>;
|
|
95
|
+
modal: boolean;
|
|
96
|
+
transition: boolean;
|
|
97
|
+
portal: boolean | string | HTMLElement;
|
|
98
|
+
overlay: boolean;
|
|
99
|
+
dismissible: boolean;
|
|
100
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ModalSlots>;
|
|
101
|
+
export default _default;
|
|
102
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
103
|
+
new (): {
|
|
104
|
+
$slots: S;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
@@ -0,0 +1,170 @@
|
|
|
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 _default: <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<Pick<Partial<{}> & Omit<{
|
|
158
|
+
readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
159
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NavigationMenuProps<T> & {}> & import("vue").PublicProps;
|
|
160
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): 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
|
+
export default _default;
|
|
168
|
+
type __VLS_PrettifyLocal<T> = {
|
|
169
|
+
[K in keyof T as K]: T[K];
|
|
170
|
+
} & {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|