@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.
Files changed (78) hide show
  1. package/.nuxt/ui/progress.ts +3 -3
  2. package/README.md +10 -10
  3. package/dist/module.d.mts +6 -6
  4. package/dist/module.json +3 -3
  5. package/dist/module.mjs +3 -3
  6. package/dist/runtime/components/Accordion.d.vue.ts +77 -0
  7. package/dist/runtime/components/Alert.d.vue.ts +81 -0
  8. package/dist/runtime/components/App.d.vue.ts +24 -0
  9. package/dist/runtime/components/Avatar.d.vue.ts +41 -0
  10. package/dist/runtime/components/AvatarGroup.d.vue.ts +31 -0
  11. package/dist/runtime/components/Badge.d.vue.ts +43 -0
  12. package/dist/runtime/components/Breadcrumb.d.vue.ts +66 -0
  13. package/dist/runtime/components/Button.d.vue.ts +44 -0
  14. package/dist/runtime/components/ButtonGroup.d.vue.ts +34 -0
  15. package/dist/runtime/components/Calendar.d.vue.ts +112 -0
  16. package/dist/runtime/components/Card.d.vue.ts +29 -0
  17. package/dist/runtime/components/Carousel.d.vue.ts +127 -0
  18. package/dist/runtime/components/Checkbox.d.vue.ts +73 -0
  19. package/dist/runtime/components/CheckboxGroup.d.vue.ts +84 -0
  20. package/dist/runtime/components/Chip.d.vue.ts +57 -0
  21. package/dist/runtime/components/Collapsible.d.vue.ts +35 -0
  22. package/dist/runtime/components/ColorPicker.d.vue.ts +48 -0
  23. package/dist/runtime/components/CommandPalette.d.vue.ts +192 -0
  24. package/dist/runtime/components/Container.d.vue.ts +18 -0
  25. package/dist/runtime/components/ContextMenu.d.vue.ts +109 -0
  26. package/dist/runtime/components/ContextMenuContent.d.vue.ts +49 -0
  27. package/dist/runtime/components/Drawer.d.vue.ts +83 -0
  28. package/dist/runtime/components/DropdownMenu.d.vue.ts +119 -0
  29. package/dist/runtime/components/DropdownMenuContent.d.vue.ts +55 -0
  30. package/dist/runtime/components/FileUpload.d.vue.ts +166 -0
  31. package/dist/runtime/components/Form.d.vue.ts +71 -0
  32. package/dist/runtime/components/FormField.d.vue.ts +61 -0
  33. package/dist/runtime/components/Icon.d.vue.ts +8 -0
  34. package/dist/runtime/components/Input.d.vue.ts +77 -0
  35. package/dist/runtime/components/InputMenu.d.vue.ts +329 -0
  36. package/dist/runtime/components/InputMenu.vue +1 -1
  37. package/dist/runtime/components/InputMenu.vue.d.ts +2 -8
  38. package/dist/runtime/components/InputNumber.d.vue.ts +186 -0
  39. package/dist/runtime/components/InputTags.d.vue.ts +185 -0
  40. package/dist/runtime/components/InputTags.vue +2 -2
  41. package/dist/runtime/components/Kbd.d.vue.ts +38 -0
  42. package/dist/runtime/components/Link.d.vue.ts +91 -0
  43. package/dist/runtime/components/LinkBase.d.vue.ts +25 -0
  44. package/dist/runtime/components/Modal.d.vue.ts +106 -0
  45. package/dist/runtime/components/NavigationMenu.d.vue.ts +170 -0
  46. package/dist/runtime/components/OverlayProvider.d.vue.ts +2 -0
  47. package/dist/runtime/components/Pagination.d.vue.ts +118 -0
  48. package/dist/runtime/components/PinInput.d.vue.ts +60 -0
  49. package/dist/runtime/components/Popover.d.vue.ts +70 -0
  50. package/dist/runtime/components/Progress.d.vue.ts +66 -0
  51. package/dist/runtime/components/Progress.vue +2 -3
  52. package/dist/runtime/components/RadioGroup.d.vue.ts +94 -0
  53. package/dist/runtime/components/Select.d.vue.ts +253 -0
  54. package/dist/runtime/components/SelectMenu.d.vue.ts +302 -0
  55. package/dist/runtime/components/Separator.d.vue.ts +54 -0
  56. package/dist/runtime/components/Skeleton.d.vue.ts +17 -0
  57. package/dist/runtime/components/Slideover.d.vue.ts +107 -0
  58. package/dist/runtime/components/Slider.d.vue.ts +57 -0
  59. package/dist/runtime/components/Stepper.d.vue.ts +85 -0
  60. package/dist/runtime/components/Switch.d.vue.ts +70 -0
  61. package/dist/runtime/components/Table.d.vue.ts +201 -0
  62. package/dist/runtime/components/Tabs.d.vue.ts +98 -0
  63. package/dist/runtime/components/Tabs.vue +2 -2
  64. package/dist/runtime/components/Textarea.d.vue.ts +79 -0
  65. package/dist/runtime/components/Timeline.d.vue.ts +70 -0
  66. package/dist/runtime/components/Toast.d.vue.ts +164 -0
  67. package/dist/runtime/components/Toaster.d.vue.ts +44 -0
  68. package/dist/runtime/components/Tooltip.d.vue.ts +56 -0
  69. package/dist/runtime/components/Tree.d.vue.ts +114 -0
  70. package/dist/runtime/inertia/components/Link.d.vue.ts +63 -0
  71. package/dist/runtime/inertia/components/LinkBase.d.vue.ts +25 -0
  72. package/dist/runtime/types/tv.d.ts +9 -2
  73. package/dist/runtime/vue/components/Icon.d.vue.ts +5 -0
  74. package/dist/runtime/vue/components/Link.d.vue.ts +93 -0
  75. package/dist/shared/{ui.BTUFJHYJ.mjs → ui.DH9BUZkq.mjs} +12 -8
  76. package/dist/unplugin.mjs +1 -1
  77. package/dist/vite.mjs +1 -1
  78. package/package.json +8 -8
@@ -0,0 +1,192 @@
1
+ import type { ListboxRootProps, ListboxRootEmits } from 'reka-ui';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import type { UseFuseOptions } from '@vueuse/integrations/useFuse';
4
+ import theme from '#build/ui/command-palette';
5
+ import type { UseComponentIconsProps } from '../composables/useComponentIcons';
6
+ import type { AvatarProps, ButtonProps, ChipProps, KbdProps, InputProps, LinkProps } from '../types';
7
+ import type { ComponentConfig } from '../types/utils';
8
+ type CommandPalette = ComponentConfig<typeof theme, AppConfig, 'commandPalette'>;
9
+ export interface CommandPaletteItem extends Omit<LinkProps, 'type' | 'raw' | 'custom'> {
10
+ prefix?: string;
11
+ label?: string;
12
+ suffix?: string;
13
+ /**
14
+ * @IconifyIcon
15
+ */
16
+ icon?: string;
17
+ avatar?: AvatarProps;
18
+ chip?: ChipProps;
19
+ kbds?: KbdProps['value'][] | KbdProps[];
20
+ active?: boolean;
21
+ loading?: boolean;
22
+ disabled?: boolean;
23
+ slot?: string;
24
+ /**
25
+ * The placeholder to display when the item has children.
26
+ */
27
+ placeholder?: string;
28
+ children?: CommandPaletteItem[];
29
+ onSelect?(e?: Event): void;
30
+ class?: any;
31
+ ui?: Pick<CommandPalette['slots'], 'item' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLeadingChipSize' | 'itemLeadingChip' | 'itemLabel' | 'itemLabelPrefix' | 'itemLabelBase' | 'itemLabelSuffix' | 'itemTrailing' | 'itemTrailingKbds' | 'itemTrailingKbdsSize' | 'itemTrailingHighlightedIcon' | 'itemTrailingIcon'>;
32
+ [key: string]: any;
33
+ }
34
+ export interface CommandPaletteGroup<T extends CommandPaletteItem = CommandPaletteItem> {
35
+ id: string;
36
+ label?: string;
37
+ slot?: string;
38
+ items?: T[];
39
+ /**
40
+ * Whether to filter group items with [useFuse](https://vueuse.org/integrations/useFuse).
41
+ * When `true`, items will not be filtered which is useful for custom filtering (useAsyncData, useFetch, etc.).
42
+ * @defaultValue false
43
+ */
44
+ ignoreFilter?: boolean;
45
+ /** Filter group items after the search happened. */
46
+ postFilter?: (searchTerm: string, items: T[]) => T[];
47
+ /**
48
+ * The icon displayed when an item is highlighted.
49
+ * @IconifyIcon
50
+ */
51
+ highlightedIcon?: string;
52
+ }
53
+ export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandPaletteGroup<any>, T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ListboxRootProps, 'multiple' | 'disabled' | 'modelValue' | 'defaultValue' | 'highlightOnHover' | 'selectionBehavior'>, Pick<UseComponentIconsProps, 'loading' | 'loadingIcon'> {
54
+ /**
55
+ * The element or component this component should render as.
56
+ * @defaultValue 'div'
57
+ */
58
+ as?: any;
59
+ /**
60
+ * The icon displayed in the input.
61
+ * @defaultValue appConfig.ui.icons.search
62
+ * @IconifyIcon
63
+ */
64
+ icon?: string;
65
+ /**
66
+ * The icon displayed when an item is selected.
67
+ * @defaultValue appConfig.ui.icons.check
68
+ * @IconifyIcon
69
+ */
70
+ selectedIcon?: string;
71
+ /**
72
+ * The icon displayed when an item has children.
73
+ * @defaultValue appConfig.ui.icons.chevronRight
74
+ * @IconifyIcon
75
+ */
76
+ trailingIcon?: string;
77
+ /**
78
+ * The placeholder text for the input.
79
+ * @defaultValue t('commandPalette.placeholder')
80
+ */
81
+ placeholder?: InputProps['placeholder'];
82
+ /**
83
+ * Automatically focus the input when component is mounted.
84
+ * @defaultValue true
85
+ */
86
+ autofocus?: boolean;
87
+ /**
88
+ * Display a close button in the input (useful when inside a Modal for example).
89
+ * `{ size: 'md', color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
90
+ * @emits 'update:open'
91
+ * @defaultValue false
92
+ */
93
+ close?: boolean | Partial<ButtonProps>;
94
+ /**
95
+ * The icon displayed in the close button.
96
+ * @defaultValue appConfig.ui.icons.close
97
+ * @IconifyIcon
98
+ */
99
+ closeIcon?: string;
100
+ /**
101
+ * Display a button to navigate back in history.
102
+ * `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts-type"}
103
+ * @defaultValue true
104
+ */
105
+ back?: boolean | ButtonProps;
106
+ /**
107
+ * The icon displayed in the back button.
108
+ * @defaultValue appConfig.ui.icons.arrowLeft
109
+ * @IconifyIcon
110
+ */
111
+ backIcon?: string;
112
+ groups?: G[];
113
+ /**
114
+ * Options for [useFuse](https://vueuse.org/integrations/useFuse).
115
+ * @defaultValue {
116
+ fuseOptions: {
117
+ ignoreLocation: true,
118
+ threshold: 0.1,
119
+ keys: ['label', 'suffix']
120
+ },
121
+ resultLimit: 12,
122
+ matchAllWhenSearchEmpty: true
123
+ }
124
+ */
125
+ fuse?: UseFuseOptions<T>;
126
+ /**
127
+ * The key used to get the label from the item.
128
+ * @defaultValue 'label'
129
+ */
130
+ labelKey?: string;
131
+ class?: any;
132
+ ui?: CommandPalette['slots'];
133
+ }
134
+ export type CommandPaletteEmits<T extends CommandPaletteItem = CommandPaletteItem> = ListboxRootEmits<T> & {
135
+ 'update:open': [value: boolean];
136
+ };
137
+ type SlotProps<T> = (props: {
138
+ item: T;
139
+ index: number;
140
+ }) => any;
141
+ export type CommandPaletteSlots<G extends CommandPaletteGroup<T> = CommandPaletteGroup<any>, T extends CommandPaletteItem = CommandPaletteItem> = {
142
+ 'empty'(props: {
143
+ searchTerm?: string;
144
+ }): any;
145
+ 'footer'(props: {
146
+ ui: {
147
+ [K in keyof Required<CommandPalette['slots']>]: (props?: Record<string, any>) => string;
148
+ };
149
+ }): any;
150
+ 'back'(props: {
151
+ ui: {
152
+ [K in keyof Required<CommandPalette['slots']>]: (props?: Record<string, any>) => string;
153
+ };
154
+ }): any;
155
+ 'close'(props: {
156
+ ui: {
157
+ [K in keyof Required<CommandPalette['slots']>]: (props?: Record<string, any>) => string;
158
+ };
159
+ }): any;
160
+ 'item': SlotProps<T>;
161
+ 'item-leading': SlotProps<T>;
162
+ 'item-label': SlotProps<T>;
163
+ 'item-trailing': SlotProps<T>;
164
+ } & Record<string, SlotProps<G>> & Record<string, SlotProps<T>>;
165
+ declare const _default: <G extends CommandPaletteGroup<T>, T extends CommandPaletteItem>(__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<{
166
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
167
+ readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
168
+ readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
169
+ readonly onHighlight?: ((payload: {
170
+ ref: HTMLElement;
171
+ value: T;
172
+ } | undefined) => any) | undefined;
173
+ readonly "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
174
+ readonly onEntryFocus?: ((event: CustomEvent<any>) => any) | undefined;
175
+ readonly onLeave?: ((event: Event) => any) | undefined;
176
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:open" | "onUpdate:modelValue" | "onHighlight" | "onUpdate:searchTerm" | "onEntryFocus" | "onLeave"> & (CommandPaletteProps<G, T> & {
177
+ searchTerm?: string;
178
+ }) & {}> & import("vue").PublicProps;
179
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
180
+ attrs: any;
181
+ slots: CommandPaletteSlots<G, T>;
182
+ emit: (((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: T) => void) & ((evt: "highlight", payload: {
183
+ ref: HTMLElement;
184
+ value: T;
185
+ } | undefined) => void) & ((evt: "entryFocus", event: CustomEvent<any>) => void) & ((evt: "leave", event: Event) => void)) & ((evt: "update:searchTerm", value: string) => void);
186
+ }>) => import("vue").VNode & {
187
+ __ctx?: Awaited<typeof __VLS_setup>;
188
+ };
189
+ export default _default;
190
+ type __VLS_PrettifyLocal<T> = {
191
+ [K in keyof T as K]: T[K];
192
+ } & {};
@@ -0,0 +1,18 @@
1
+ export interface ContainerProps {
2
+ /**
3
+ * The element or component this component should render as.
4
+ * @defaultValue 'div'
5
+ */
6
+ as?: any;
7
+ class?: any;
8
+ }
9
+ export interface ContainerSlots {
10
+ default(props?: {}): any;
11
+ }
12
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ContainerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ContainerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ContainerSlots>;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,109 @@
1
+ import type { ContextMenuRootProps, ContextMenuRootEmits, ContextMenuContentProps, ContextMenuContentEmits } from 'reka-ui';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/ui/context-menu';
4
+ import type { AvatarProps, KbdProps, LinkProps } from '../types';
5
+ import type { ArrayOrNested, DynamicSlots, MergeTypes, NestedItem, EmitsToProps, ComponentConfig } from '../types/utils';
6
+ type ContextMenu = ComponentConfig<typeof theme, AppConfig, 'contextMenu'>;
7
+ export interface ContextMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'custom'> {
8
+ label?: string;
9
+ /**
10
+ * @IconifyIcon
11
+ */
12
+ icon?: string;
13
+ color?: ContextMenu['variants']['color'];
14
+ avatar?: AvatarProps;
15
+ content?: Omit<ContextMenuContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<ContextMenuContentEmits>>;
16
+ kbds?: KbdProps['value'][] | KbdProps[];
17
+ /**
18
+ * The item type.
19
+ * @defaultValue 'link'
20
+ */
21
+ type?: 'label' | 'separator' | 'link' | 'checkbox';
22
+ slot?: string;
23
+ loading?: boolean;
24
+ disabled?: boolean;
25
+ checked?: boolean;
26
+ open?: boolean;
27
+ defaultOpen?: boolean;
28
+ children?: ArrayOrNested<ContextMenuItem>;
29
+ onSelect?(e: Event): void;
30
+ onUpdateChecked?(checked: boolean): void;
31
+ class?: any;
32
+ ui?: Pick<ContextMenu['slots'], 'item' | 'label' | 'separator' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLabel' | 'itemLabelExternalIcon' | 'itemTrailing' | 'itemTrailingIcon' | 'itemTrailingKbds' | 'itemTrailingKbdsSize'>;
33
+ [key: string]: any;
34
+ }
35
+ export interface ContextMenuProps<T extends ArrayOrNested<ContextMenuItem> = ArrayOrNested<ContextMenuItem>> extends Omit<ContextMenuRootProps, 'dir'> {
36
+ /**
37
+ * @defaultValue 'md'
38
+ */
39
+ size?: ContextMenu['variants']['size'];
40
+ items?: T;
41
+ /**
42
+ * The icon displayed when an item is checked.
43
+ * @defaultValue appConfig.ui.icons.check
44
+ * @IconifyIcon
45
+ */
46
+ checkedIcon?: string;
47
+ /**
48
+ * The icon displayed when an item is loading.
49
+ * @defaultValue appConfig.ui.icons.loading
50
+ * @IconifyIcon
51
+ */
52
+ loadingIcon?: string;
53
+ /**
54
+ * The icon displayed when the item is an external link.
55
+ * Set to `false` to hide the external icon.
56
+ * @defaultValue appConfig.ui.icons.external
57
+ * @IconifyIcon
58
+ */
59
+ externalIcon?: boolean | string;
60
+ /** The content of the menu. */
61
+ content?: Omit<ContextMenuContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<ContextMenuContentEmits>>;
62
+ /**
63
+ * Render the menu in a portal.
64
+ * @defaultValue true
65
+ */
66
+ portal?: boolean | string | HTMLElement;
67
+ /**
68
+ * The key used to get the label from the item.
69
+ * @defaultValue 'label'
70
+ */
71
+ labelKey?: keyof NestedItem<T>;
72
+ disabled?: boolean;
73
+ class?: any;
74
+ ui?: ContextMenu['slots'];
75
+ }
76
+ export interface ContextMenuEmits extends ContextMenuRootEmits {
77
+ }
78
+ type SlotProps<T extends ContextMenuItem> = (props: {
79
+ item: T;
80
+ active?: boolean;
81
+ index: number;
82
+ }) => any;
83
+ export type ContextMenuSlots<A extends ArrayOrNested<ContextMenuItem> = ArrayOrNested<ContextMenuItem>, T extends NestedItem<A> = NestedItem<A>> = {
84
+ 'default'(props?: {}): any;
85
+ 'item': SlotProps<T>;
86
+ 'item-leading': SlotProps<T>;
87
+ 'item-label': SlotProps<T>;
88
+ 'item-trailing': SlotProps<T>;
89
+ 'content-top': (props?: {}) => any;
90
+ 'content-bottom': (props?: {}) => any;
91
+ } & DynamicSlots<MergeTypes<T>, 'leading' | 'label' | 'trailing', {
92
+ active?: boolean;
93
+ index: number;
94
+ }>;
95
+ declare const _default: <T extends ArrayOrNested<ContextMenuItem>>(__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<{
96
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
97
+ readonly "onUpdate:open"?: ((payload: boolean) => any) | undefined;
98
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:open"> & ContextMenuProps<T> & {}> & import("vue").PublicProps;
99
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
100
+ attrs: any;
101
+ slots: ContextMenuSlots<T, NestedItem<T>>;
102
+ emit: (evt: "update:open", payload: boolean) => void;
103
+ }>) => import("vue").VNode & {
104
+ __ctx?: Awaited<typeof __VLS_setup>;
105
+ };
106
+ export default _default;
107
+ type __VLS_PrettifyLocal<T> = {
108
+ [K in keyof T as K]: T[K];
109
+ } & {};
@@ -0,0 +1,49 @@
1
+ import { ContextMenu } from 'reka-ui/namespaced';
2
+ import type { ContextMenuContentProps as RekaContextMenuContentProps } from 'reka-ui';
3
+ import type { AppConfig } from '@nuxt/schema';
4
+ import type theme from '#build/ui/context-menu';
5
+ import type { ContextMenuItem, ContextMenuSlots } from '../types';
6
+ import type { ArrayOrNested, NestedItem, ComponentConfig } from '../types/utils';
7
+ type ContextMenu = ComponentConfig<typeof theme, AppConfig, 'contextMenu'>;
8
+ interface ContextMenuContentProps<T extends ArrayOrNested<ContextMenuItem>> extends Omit<RekaContextMenuContentProps, 'as' | 'asChild' | 'forceMount'> {
9
+ items?: T;
10
+ portal?: boolean | string | HTMLElement;
11
+ sub?: boolean;
12
+ labelKey: keyof NestedItem<T>;
13
+ /**
14
+ * @IconifyIcon
15
+ */
16
+ checkedIcon?: string;
17
+ /**
18
+ * @IconifyIcon
19
+ */
20
+ loadingIcon?: string;
21
+ /**
22
+ * @IconifyIcon
23
+ */
24
+ externalIcon?: boolean | string;
25
+ class?: any;
26
+ ui: {
27
+ [K in keyof Required<ContextMenu['slots']>]: (props?: Record<string, any>) => string;
28
+ };
29
+ uiOverride?: ContextMenu['slots'];
30
+ }
31
+ declare const _default: <T extends ArrayOrNested<ContextMenuItem>>(__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<{
32
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
33
+ readonly onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
34
+ readonly onPointerDownOutside?: ((event: import("reka-ui").PointerDownOutsideEvent) => any) | undefined;
35
+ readonly onFocusOutside?: ((event: import("reka-ui").FocusOutsideEvent) => any) | undefined;
36
+ readonly onInteractOutside?: ((event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any) | undefined;
37
+ readonly onCloseAutoFocus?: ((event: Event) => any) | undefined;
38
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onEscapeKeyDown" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "onCloseAutoFocus"> & ContextMenuContentProps<T> & {}> & import("vue").PublicProps;
39
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
40
+ attrs: any;
41
+ slots: ContextMenuSlots<T>;
42
+ emit: ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: import("reka-ui").PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: import("reka-ui").FocusOutsideEvent) => void) & ((evt: "interactOutside", event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => void) & ((evt: "closeAutoFocus", event: Event) => void);
43
+ }>) => import("vue").VNode & {
44
+ __ctx?: Awaited<typeof __VLS_setup>;
45
+ };
46
+ export default _default;
47
+ type __VLS_PrettifyLocal<T> = {
48
+ [K in keyof T as K]: T[K];
49
+ } & {};
@@ -0,0 +1,83 @@
1
+ import type { DrawerRootProps, DrawerRootEmits } from 'vaul-vue';
2
+ import type { DialogContentProps, DialogContentEmits } from 'reka-ui';
3
+ import type { AppConfig } from '@nuxt/schema';
4
+ import theme from '#build/ui/drawer';
5
+ import type { EmitsToProps, ComponentConfig } from '../types/utils';
6
+ type Drawer = ComponentConfig<typeof theme, AppConfig, 'drawer'>;
7
+ export interface DrawerProps extends Pick<DrawerRootProps, 'activeSnapPoint' | 'closeThreshold' | 'shouldScaleBackground' | 'setBackgroundColorOnScale' | 'scrollLockTimeout' | 'fixed' | 'dismissible' | 'modal' | 'open' | 'defaultOpen' | 'nested' | 'direction' | 'noBodyStyles' | 'handleOnly' | 'preventScrollRestoration' | 'snapPoints'> {
8
+ /**
9
+ * The element or component this component should render as.
10
+ * @defaultValue 'div'
11
+ */
12
+ as?: any;
13
+ title?: string;
14
+ description?: string;
15
+ /**
16
+ * Whether to inset the drawer from the edges.
17
+ * @defaultValue false
18
+ */
19
+ inset?: boolean;
20
+ /** The content of the drawer. */
21
+ content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DialogContentEmits>>;
22
+ /**
23
+ * Render an overlay behind the drawer.
24
+ * @defaultValue true
25
+ */
26
+ overlay?: boolean;
27
+ /**
28
+ * Render a handle on the drawer.
29
+ * @defaultValue true
30
+ */
31
+ handle?: boolean;
32
+ /**
33
+ * Render the drawer in a portal.
34
+ * @defaultValue true
35
+ */
36
+ portal?: boolean | string | HTMLElement;
37
+ /**
38
+ * Whether the drawer is nested in another drawer.
39
+ * @defaultValue false
40
+ */
41
+ nested?: boolean;
42
+ class?: any;
43
+ ui?: Drawer['slots'];
44
+ }
45
+ export interface DrawerEmits extends DrawerRootEmits {
46
+ }
47
+ export interface DrawerSlots {
48
+ default(props?: {}): any;
49
+ content(props?: {}): any;
50
+ header(props?: {}): any;
51
+ title(props?: {}): any;
52
+ description(props?: {}): any;
53
+ body(props?: {}): any;
54
+ footer(props?: {}): any;
55
+ }
56
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
57
+ close: () => any;
58
+ drag: (percentageDragged: number) => any;
59
+ "update:open": (open: boolean) => any;
60
+ release: (open: boolean) => any;
61
+ "update:activeSnapPoint": (val: string | number) => any;
62
+ animationEnd: (open: boolean) => any;
63
+ }, string, import("vue").PublicProps, Readonly<DrawerProps> & Readonly<{
64
+ onClose?: (() => any) | undefined;
65
+ onDrag?: ((percentageDragged: number) => any) | undefined;
66
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
67
+ onRelease?: ((open: boolean) => any) | undefined;
68
+ "onUpdate:activeSnapPoint"?: ((val: string | number) => any) | undefined;
69
+ onAnimationEnd?: ((open: boolean) => any) | undefined;
70
+ }>, {
71
+ modal: boolean;
72
+ portal: boolean | string | HTMLElement;
73
+ overlay: boolean;
74
+ direction: import("vaul-vue").DrawerDirection;
75
+ dismissible: boolean;
76
+ handle: boolean;
77
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, DrawerSlots>;
78
+ export default _default;
79
+ type __VLS_WithSlots<T, S> = T & {
80
+ new (): {
81
+ $slots: S;
82
+ };
83
+ };
@@ -0,0 +1,119 @@
1
+ import type { DropdownMenuRootProps, DropdownMenuRootEmits, DropdownMenuContentProps, DropdownMenuContentEmits, DropdownMenuArrowProps } from 'reka-ui';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/ui/dropdown-menu';
4
+ import type { AvatarProps, KbdProps, LinkProps } from '../types';
5
+ import type { ArrayOrNested, DynamicSlots, MergeTypes, NestedItem, EmitsToProps, ComponentConfig } from '../types/utils';
6
+ type DropdownMenu = ComponentConfig<typeof theme, AppConfig, 'dropdownMenu'>;
7
+ export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'custom'> {
8
+ label?: string;
9
+ /**
10
+ * @IconifyIcon
11
+ */
12
+ icon?: string;
13
+ color?: DropdownMenu['variants']['color'];
14
+ avatar?: AvatarProps;
15
+ content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DropdownMenuContentEmits>>;
16
+ kbds?: KbdProps['value'][] | KbdProps[];
17
+ /**
18
+ * The item type.
19
+ * @defaultValue 'link'
20
+ */
21
+ type?: 'label' | 'separator' | 'link' | 'checkbox';
22
+ slot?: string;
23
+ loading?: boolean;
24
+ disabled?: boolean;
25
+ checked?: boolean;
26
+ open?: boolean;
27
+ defaultOpen?: boolean;
28
+ children?: ArrayOrNested<DropdownMenuItem>;
29
+ onSelect?(e: Event): void;
30
+ onUpdateChecked?(checked: boolean): void;
31
+ class?: any;
32
+ ui?: Pick<DropdownMenu['slots'], 'item' | 'label' | 'separator' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLabel' | 'itemLabelExternalIcon' | 'itemTrailing' | 'itemTrailingIcon' | 'itemTrailingKbds' | 'itemTrailingKbdsSize'>;
33
+ [key: string]: any;
34
+ }
35
+ export interface DropdownMenuProps<T extends ArrayOrNested<DropdownMenuItem> = ArrayOrNested<DropdownMenuItem>> extends Omit<DropdownMenuRootProps, 'dir'> {
36
+ /**
37
+ * @defaultValue 'md'
38
+ */
39
+ size?: DropdownMenu['variants']['size'];
40
+ items?: T;
41
+ /**
42
+ * The icon displayed when an item is checked.
43
+ * @defaultValue appConfig.ui.icons.check
44
+ * @IconifyIcon
45
+ */
46
+ checkedIcon?: string;
47
+ /**
48
+ * The icon displayed when an item is loading.
49
+ * @defaultValue appConfig.ui.icons.loading
50
+ * @IconifyIcon
51
+ */
52
+ loadingIcon?: string;
53
+ /**
54
+ * The icon displayed when the item is an external link.
55
+ * Set to `false` to hide the external icon.
56
+ * @defaultValue appConfig.ui.icons.external
57
+ * @IconifyIcon
58
+ */
59
+ externalIcon?: boolean | string;
60
+ /**
61
+ * The content of the menu.
62
+ * @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
63
+ */
64
+ content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DropdownMenuContentEmits>>;
65
+ /**
66
+ * Display an arrow alongside the menu.
67
+ * @defaultValue false
68
+ */
69
+ arrow?: boolean | Omit<DropdownMenuArrowProps, 'as' | 'asChild'>;
70
+ /**
71
+ * Render the menu in a portal.
72
+ * @defaultValue true
73
+ */
74
+ portal?: boolean | string | HTMLElement;
75
+ /**
76
+ * The key used to get the label from the item.
77
+ * @defaultValue 'label'
78
+ */
79
+ labelKey?: keyof NestedItem<T>;
80
+ disabled?: boolean;
81
+ class?: any;
82
+ ui?: DropdownMenu['slots'];
83
+ }
84
+ export interface DropdownMenuEmits extends DropdownMenuRootEmits {
85
+ }
86
+ type SlotProps<T extends DropdownMenuItem> = (props: {
87
+ item: T;
88
+ active?: boolean;
89
+ index: number;
90
+ }) => any;
91
+ export type DropdownMenuSlots<A extends ArrayOrNested<DropdownMenuItem> = ArrayOrNested<DropdownMenuItem>, T extends NestedItem<A> = NestedItem<A>> = {
92
+ 'default'(props: {
93
+ open: boolean;
94
+ }): any;
95
+ 'item': SlotProps<T>;
96
+ 'item-leading': SlotProps<T>;
97
+ 'item-label': SlotProps<T>;
98
+ 'item-trailing': SlotProps<T>;
99
+ 'content-top': (props?: {}) => any;
100
+ 'content-bottom': (props?: {}) => any;
101
+ } & DynamicSlots<MergeTypes<T>, 'leading' | 'label' | 'trailing', {
102
+ active?: boolean;
103
+ index: number;
104
+ }>;
105
+ declare const _default: <T extends ArrayOrNested<DropdownMenuItem>>(__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<{
106
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
107
+ readonly "onUpdate:open"?: ((payload: boolean) => any) | undefined;
108
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:open"> & DropdownMenuProps<T> & {}> & import("vue").PublicProps;
109
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
110
+ attrs: any;
111
+ slots: DropdownMenuSlots<T, NestedItem<T>>;
112
+ emit: (evt: "update:open", payload: boolean) => void;
113
+ }>) => import("vue").VNode & {
114
+ __ctx?: Awaited<typeof __VLS_setup>;
115
+ };
116
+ export default _default;
117
+ type __VLS_PrettifyLocal<T> = {
118
+ [K in keyof T as K]: T[K];
119
+ } & {};
@@ -0,0 +1,55 @@
1
+ import { DropdownMenu } from 'reka-ui/namespaced';
2
+ import type { DropdownMenuContentProps as RekaDropdownMenuContentProps } from 'reka-ui';
3
+ import type { AppConfig } from '@nuxt/schema';
4
+ import type theme from '#build/ui/dropdown-menu';
5
+ import type { DropdownMenuItem, DropdownMenuSlots, DynamicSlots, MergeTypes } from '../types';
6
+ import type { ArrayOrNested, NestedItem, ComponentConfig } from '../types/utils';
7
+ type DropdownMenu = ComponentConfig<typeof theme, AppConfig, 'dropdownMenu'>;
8
+ interface DropdownMenuContentProps<T extends ArrayOrNested<DropdownMenuItem>> extends Omit<RekaDropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> {
9
+ items?: T;
10
+ portal?: boolean | string | HTMLElement;
11
+ sub?: boolean;
12
+ labelKey: keyof NestedItem<T>;
13
+ /**
14
+ * @IconifyIcon
15
+ */
16
+ checkedIcon?: string;
17
+ /**
18
+ * @IconifyIcon
19
+ */
20
+ loadingIcon?: string;
21
+ /**
22
+ * @IconifyIcon
23
+ */
24
+ externalIcon?: boolean | string;
25
+ class?: any;
26
+ ui: {
27
+ [K in keyof Required<DropdownMenu['slots']>]: (props?: Record<string, any>) => string;
28
+ };
29
+ uiOverride?: DropdownMenu['slots'];
30
+ }
31
+ type DropdownMenuContentSlots<A extends ArrayOrNested<DropdownMenuItem> = ArrayOrNested<DropdownMenuItem>, T extends NestedItem<A> = NestedItem<A>> = Pick<DropdownMenuSlots<A>, 'item' | 'item-leading' | 'item-label' | 'item-trailing' | 'content-top' | 'content-bottom'> & {
32
+ default(props?: {}): any;
33
+ } & DynamicSlots<MergeTypes<T>, 'leading' | 'label' | 'trailing', {
34
+ active?: boolean;
35
+ index: number;
36
+ }>;
37
+ declare const _default: <T extends ArrayOrNested<DropdownMenuItem>>(__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<{
38
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
39
+ readonly onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
40
+ readonly onPointerDownOutside?: ((event: import("reka-ui").PointerDownOutsideEvent) => any) | undefined;
41
+ readonly onFocusOutside?: ((event: import("reka-ui").FocusOutsideEvent) => any) | undefined;
42
+ readonly onInteractOutside?: ((event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any) | undefined;
43
+ readonly onCloseAutoFocus?: ((event: Event) => any) | undefined;
44
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onEscapeKeyDown" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "onCloseAutoFocus"> & DropdownMenuContentProps<T> & {}> & import("vue").PublicProps;
45
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
46
+ attrs: any;
47
+ slots: DropdownMenuContentSlots<T, NestedItem<T>>;
48
+ emit: ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: import("reka-ui").PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: import("reka-ui").FocusOutsideEvent) => void) & ((evt: "interactOutside", event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => void) & ((evt: "closeAutoFocus", event: Event) => void);
49
+ }>) => import("vue").VNode & {
50
+ __ctx?: Awaited<typeof __VLS_setup>;
51
+ };
52
+ export default _default;
53
+ type __VLS_PrettifyLocal<T> = {
54
+ [K in keyof T as K]: T[K];
55
+ } & {};