@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.
Files changed (149) hide show
  1. package/.nuxt/ui/drawer.ts +23 -0
  2. package/.nuxt/ui/progress.ts +3 -3
  3. package/README.md +10 -10
  4. package/dist/module.d.mts +6 -6
  5. package/dist/module.json +2 -2
  6. package/dist/module.mjs +3 -3
  7. package/dist/runtime/components/Accordion.d.vue.ts +78 -0
  8. package/dist/runtime/components/Accordion.vue.d.ts +6 -5
  9. package/dist/runtime/components/Alert.d.vue.ts +82 -0
  10. package/dist/runtime/components/Alert.vue.d.ts +2 -1
  11. package/dist/runtime/components/App.d.vue.ts +25 -0
  12. package/dist/runtime/components/App.vue +1 -1
  13. package/dist/runtime/components/App.vue.d.ts +5 -4
  14. package/dist/runtime/components/Avatar.d.vue.ts +42 -0
  15. package/dist/runtime/components/Avatar.vue.d.ts +2 -1
  16. package/dist/runtime/components/AvatarGroup.d.vue.ts +32 -0
  17. package/dist/runtime/components/AvatarGroup.vue.d.ts +2 -1
  18. package/dist/runtime/components/Badge.d.vue.ts +44 -0
  19. package/dist/runtime/components/Badge.vue.d.ts +2 -1
  20. package/dist/runtime/components/Breadcrumb.d.vue.ts +67 -0
  21. package/dist/runtime/components/Breadcrumb.vue.d.ts +4 -3
  22. package/dist/runtime/components/Button.d.vue.ts +45 -0
  23. package/dist/runtime/components/Button.vue.d.ts +2 -1
  24. package/dist/runtime/components/ButtonGroup.d.vue.ts +35 -0
  25. package/dist/runtime/components/ButtonGroup.vue.d.ts +2 -1
  26. package/dist/runtime/components/Calendar.d.vue.ts +113 -0
  27. package/dist/runtime/components/Calendar.vue.d.ts +9 -8
  28. package/dist/runtime/components/Card.d.vue.ts +30 -0
  29. package/dist/runtime/components/Card.vue.d.ts +2 -1
  30. package/dist/runtime/components/Carousel.d.vue.ts +128 -0
  31. package/dist/runtime/components/Carousel.vue +32 -12
  32. package/dist/runtime/components/Carousel.vue.d.ts +7 -6
  33. package/dist/runtime/components/Checkbox.d.vue.ts +74 -0
  34. package/dist/runtime/components/Checkbox.vue.d.ts +2 -1
  35. package/dist/runtime/components/CheckboxGroup.d.vue.ts +85 -0
  36. package/dist/runtime/components/CheckboxGroup.vue.d.ts +7 -6
  37. package/dist/runtime/components/Chip.d.vue.ts +58 -0
  38. package/dist/runtime/components/Chip.vue.d.ts +2 -1
  39. package/dist/runtime/components/Collapsible.d.vue.ts +36 -0
  40. package/dist/runtime/components/Collapsible.vue.d.ts +2 -1
  41. package/dist/runtime/components/ColorPicker.d.vue.ts +49 -0
  42. package/dist/runtime/components/ColorPicker.vue.d.ts +2 -1
  43. package/dist/runtime/components/CommandPalette.d.vue.ts +193 -0
  44. package/dist/runtime/components/CommandPalette.vue.d.ts +13 -12
  45. package/dist/runtime/components/Container.d.vue.ts +19 -0
  46. package/dist/runtime/components/Container.vue.d.ts +2 -1
  47. package/dist/runtime/components/ContextMenu.d.vue.ts +110 -0
  48. package/dist/runtime/components/ContextMenu.vue.d.ts +6 -5
  49. package/dist/runtime/components/ContextMenuContent.d.vue.ts +50 -0
  50. package/dist/runtime/components/ContextMenuContent.vue.d.ts +10 -9
  51. package/dist/runtime/components/Drawer.d.vue.ts +87 -0
  52. package/dist/runtime/components/Drawer.vue +19 -5
  53. package/dist/runtime/components/Drawer.vue.d.ts +5 -1
  54. package/dist/runtime/components/DropdownMenu.d.vue.ts +120 -0
  55. package/dist/runtime/components/DropdownMenu.vue.d.ts +6 -5
  56. package/dist/runtime/components/DropdownMenuContent.d.vue.ts +56 -0
  57. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +10 -9
  58. package/dist/runtime/components/FileUpload.d.vue.ts +167 -0
  59. package/dist/runtime/components/FileUpload.vue.d.ts +9 -8
  60. package/dist/runtime/components/Form.d.vue.ts +72 -0
  61. package/dist/runtime/components/Form.vue.d.ts +7 -6
  62. package/dist/runtime/components/FormField.d.vue.ts +62 -0
  63. package/dist/runtime/components/FormField.vue.d.ts +2 -1
  64. package/dist/runtime/components/Icon.d.vue.ts +9 -0
  65. package/dist/runtime/components/Icon.vue.d.ts +2 -1
  66. package/dist/runtime/components/Input.d.vue.ts +78 -0
  67. package/dist/runtime/components/Input.vue.d.ts +9 -8
  68. package/dist/runtime/components/InputMenu.d.vue.ts +330 -0
  69. package/dist/runtime/components/InputMenu.vue +1 -1
  70. package/dist/runtime/components/InputMenu.vue.d.ts +19 -24
  71. package/dist/runtime/components/InputNumber.d.vue.ts +187 -0
  72. package/dist/runtime/components/InputNumber.vue.d.ts +2 -1
  73. package/dist/runtime/components/InputTags.d.vue.ts +186 -0
  74. package/dist/runtime/components/InputTags.vue +2 -2
  75. package/dist/runtime/components/InputTags.vue.d.ts +13 -12
  76. package/dist/runtime/components/Kbd.d.vue.ts +39 -0
  77. package/dist/runtime/components/Kbd.vue.d.ts +2 -1
  78. package/dist/runtime/components/Link.d.vue.ts +92 -0
  79. package/dist/runtime/components/Link.vue.d.ts +2 -1
  80. package/dist/runtime/components/LinkBase.d.vue.ts +26 -0
  81. package/dist/runtime/components/LinkBase.vue.d.ts +2 -1
  82. package/dist/runtime/components/Modal.d.vue.ts +107 -0
  83. package/dist/runtime/components/Modal.vue.d.ts +4 -3
  84. package/dist/runtime/components/NavigationMenu.d.vue.ts +171 -0
  85. package/dist/runtime/components/NavigationMenu.vue.d.ts +6 -5
  86. package/dist/runtime/components/OverlayProvider.d.vue.ts +3 -0
  87. package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -1
  88. package/dist/runtime/components/Pagination.d.vue.ts +119 -0
  89. package/dist/runtime/components/Pagination.vue +4 -4
  90. package/dist/runtime/components/Pagination.vue.d.ts +2 -1
  91. package/dist/runtime/components/PinInput.d.vue.ts +61 -0
  92. package/dist/runtime/components/PinInput.vue.d.ts +10 -9
  93. package/dist/runtime/components/Popover.d.vue.ts +71 -0
  94. package/dist/runtime/components/Popover.vue.d.ts +2 -1
  95. package/dist/runtime/components/Progress.d.vue.ts +67 -0
  96. package/dist/runtime/components/Progress.vue +2 -3
  97. package/dist/runtime/components/Progress.vue.d.ts +2 -1
  98. package/dist/runtime/components/RadioGroup.d.vue.ts +95 -0
  99. package/dist/runtime/components/RadioGroup.vue.d.ts +7 -6
  100. package/dist/runtime/components/Select.d.vue.ts +254 -0
  101. package/dist/runtime/components/Select.vue.d.ts +11 -10
  102. package/dist/runtime/components/SelectMenu.d.vue.ts +303 -0
  103. package/dist/runtime/components/SelectMenu.vue.d.ts +16 -15
  104. package/dist/runtime/components/Separator.d.vue.ts +55 -0
  105. package/dist/runtime/components/Separator.vue.d.ts +2 -1
  106. package/dist/runtime/components/Skeleton.d.vue.ts +18 -0
  107. package/dist/runtime/components/Skeleton.vue.d.ts +2 -1
  108. package/dist/runtime/components/Slideover.d.vue.ts +108 -0
  109. package/dist/runtime/components/Slideover.vue.d.ts +4 -3
  110. package/dist/runtime/components/Slider.d.vue.ts +58 -0
  111. package/dist/runtime/components/Slider.vue.d.ts +8 -7
  112. package/dist/runtime/components/Stepper.d.vue.ts +86 -0
  113. package/dist/runtime/components/Stepper.vue.d.ts +10 -9
  114. package/dist/runtime/components/Switch.d.vue.ts +71 -0
  115. package/dist/runtime/components/Switch.vue.d.ts +2 -1
  116. package/dist/runtime/components/Table.d.vue.ts +202 -0
  117. package/dist/runtime/components/Table.vue +19 -1
  118. package/dist/runtime/components/Table.vue.d.ts +20 -19
  119. package/dist/runtime/components/Tabs.d.vue.ts +99 -0
  120. package/dist/runtime/components/Tabs.vue +2 -2
  121. package/dist/runtime/components/Tabs.vue.d.ts +7 -6
  122. package/dist/runtime/components/Textarea.d.vue.ts +80 -0
  123. package/dist/runtime/components/Textarea.vue.d.ts +9 -8
  124. package/dist/runtime/components/Timeline.d.vue.ts +71 -0
  125. package/dist/runtime/components/Timeline.vue.d.ts +7 -6
  126. package/dist/runtime/components/Toast.d.vue.ts +165 -0
  127. package/dist/runtime/components/Toast.vue.d.ts +2 -1
  128. package/dist/runtime/components/Toaster.d.vue.ts +45 -0
  129. package/dist/runtime/components/Toaster.vue.d.ts +2 -1
  130. package/dist/runtime/components/Tooltip.d.vue.ts +57 -0
  131. package/dist/runtime/components/Tooltip.vue.d.ts +2 -1
  132. package/dist/runtime/components/Tree.d.vue.ts +115 -0
  133. package/dist/runtime/components/Tree.vue.d.ts +7 -6
  134. package/dist/runtime/composables/useKbd.js +1 -1
  135. package/dist/runtime/composables/usePortal.d.ts +3 -3
  136. package/dist/runtime/composables/usePortal.js +5 -10
  137. package/dist/runtime/inertia/components/Link.d.vue.ts +64 -0
  138. package/dist/runtime/inertia/components/Link.vue.d.ts +2 -1
  139. package/dist/runtime/inertia/components/LinkBase.d.vue.ts +26 -0
  140. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +2 -1
  141. package/dist/runtime/types/tv.d.ts +9 -2
  142. package/dist/runtime/vue/components/Icon.d.vue.ts +6 -0
  143. package/dist/runtime/vue/components/Icon.vue.d.ts +2 -1
  144. package/dist/runtime/vue/components/Link.d.vue.ts +94 -0
  145. package/dist/runtime/vue/components/Link.vue.d.ts +2 -1
  146. package/dist/shared/{ui.BTUFJHYJ.mjs → ui.DBpKc5X3.mjs} +100 -68
  147. package/dist/unplugin.mjs +1 -1
  148. package/dist/vite.mjs +1 -1
  149. 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 _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;
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 _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
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'" :key="index" as-child :value="item.value" :class="ui.item({ class: props.ui?.item })">
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 :key="item.type" :index="index" as-child :class="ui.ellipsis({ class: props.ui?.ellipsis })">
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 _default: __VLS_WithSlots<import("vue").DefineComponent<PaginationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
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 _default: <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<Pick<Partial<{}> & Omit<{
43
- readonly onBlur?: ((event: Event) => any) | undefined;
44
- readonly onComplete?: ((value: [T] extends ["number"] ? number[] : string[]) => any) | undefined;
45
- readonly onChange?: ((event: Event) => any) | undefined;
46
- readonly "onUpdate:modelValue"?: ((value: [T] extends ["number"] ? number[] : string[]) => any) | undefined;
47
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onChange" | "onUpdate:modelValue" | "onComplete"> & PinInputProps<T> & {}> & import("vue").PublicProps;
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
- }>): void;
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 _default: __VLS_WithSlots<import("vue").DefineComponent<PopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
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
- return {
78
- [props.orientation === "vertical" ? "height" : "width"]: percent.value ? `${percent.value}%` : "fit-content"
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 _default: __VLS_WithSlots<import("vue").DefineComponent<ProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
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 (): {