@nuxt/ui 3.1.0 → 3.1.2

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 (187) hide show
  1. package/.nuxt/ui/accordion.ts +2 -23
  2. package/.nuxt/ui/alert.ts +2 -28
  3. package/.nuxt/ui/avatar-group.ts +2 -23
  4. package/.nuxt/ui/avatar.ts +2 -23
  5. package/.nuxt/ui/badge.ts +32 -30
  6. package/.nuxt/ui/breadcrumb.ts +2 -23
  7. package/.nuxt/ui/button-group.ts +2 -36
  8. package/.nuxt/ui/button.ts +4 -30
  9. package/.nuxt/ui/calendar.ts +4 -25
  10. package/.nuxt/ui/card.ts +2 -23
  11. package/.nuxt/ui/carousel.ts +2 -28
  12. package/.nuxt/ui/checkbox-group.ts +146 -24
  13. package/.nuxt/ui/checkbox.ts +2 -23
  14. package/.nuxt/ui/chip.ts +2 -23
  15. package/.nuxt/ui/collapsible.ts +2 -23
  16. package/.nuxt/ui/color-picker.ts +4 -25
  17. package/.nuxt/ui/command-palette.ts +2 -23
  18. package/.nuxt/ui/container.ts +2 -23
  19. package/.nuxt/ui/context-menu.ts +2 -23
  20. package/.nuxt/ui/drawer.ts +2 -23
  21. package/.nuxt/ui/dropdown-menu.ts +2 -23
  22. package/.nuxt/ui/form-field.ts +2 -23
  23. package/.nuxt/ui/form.ts +2 -23
  24. package/.nuxt/ui/input-menu.ts +4 -34
  25. package/.nuxt/ui/input-number.ts +12 -23
  26. package/.nuxt/ui/input.ts +4 -34
  27. package/.nuxt/ui/kbd.ts +2 -23
  28. package/.nuxt/ui/link.ts +14 -28
  29. package/.nuxt/ui/modal.ts +2 -23
  30. package/.nuxt/ui/navigation-menu.ts +3 -24
  31. package/.nuxt/ui/pagination.ts +2 -23
  32. package/.nuxt/ui/pin-input.ts +2 -23
  33. package/.nuxt/ui/popover.ts +2 -23
  34. package/.nuxt/ui/progress.ts +2 -23
  35. package/.nuxt/ui/radio-group.ts +2 -23
  36. package/.nuxt/ui/select-menu.ts +4 -34
  37. package/.nuxt/ui/select.ts +4 -34
  38. package/.nuxt/ui/separator.ts +2 -23
  39. package/.nuxt/ui/skeleton.ts +2 -23
  40. package/.nuxt/ui/slideover.ts +2 -23
  41. package/.nuxt/ui/slider.ts +2 -23
  42. package/.nuxt/ui/stepper.ts +2 -23
  43. package/.nuxt/ui/switch.ts +2 -23
  44. package/.nuxt/ui/table.ts +2 -23
  45. package/.nuxt/ui/tabs.ts +6 -26
  46. package/.nuxt/ui/textarea.ts +4 -34
  47. package/.nuxt/ui/toast.ts +2 -28
  48. package/.nuxt/ui/toaster.ts +2 -23
  49. package/.nuxt/ui/tooltip.ts +2 -23
  50. package/.nuxt/ui/tree.ts +2 -23
  51. package/.nuxt/ui.css +15 -8
  52. package/README.md +4 -0
  53. package/cli/templates.mjs +2 -2
  54. package/dist/module.json +1 -1
  55. package/dist/module.mjs +15 -5
  56. package/dist/runtime/components/Accordion.vue +9 -9
  57. package/dist/runtime/components/Accordion.vue.d.ts +6 -20
  58. package/dist/runtime/components/Alert.vue +1 -1
  59. package/dist/runtime/components/Alert.vue.d.ts +7 -22
  60. package/dist/runtime/components/App.vue.d.ts +2 -2
  61. package/dist/runtime/components/Avatar.vue +2 -2
  62. package/dist/runtime/components/Avatar.vue.d.ts +4 -25
  63. package/dist/runtime/components/AvatarGroup.vue +1 -1
  64. package/dist/runtime/components/AvatarGroup.vue.d.ts +2 -11
  65. package/dist/runtime/components/Badge.vue +5 -3
  66. package/dist/runtime/components/Badge.vue.d.ts +5 -24
  67. package/dist/runtime/components/Breadcrumb.vue +8 -8
  68. package/dist/runtime/components/Breadcrumb.vue.d.ts +4 -20
  69. package/dist/runtime/components/Button.vue +2 -3
  70. package/dist/runtime/components/Button.vue.d.ts +4 -29
  71. package/dist/runtime/components/ButtonGroup.vue.d.ts +3 -24
  72. package/dist/runtime/components/Calendar.vue +2 -1
  73. package/dist/runtime/components/Calendar.vue.d.ts +6 -2
  74. package/dist/runtime/components/Card.vue +1 -1
  75. package/dist/runtime/components/Card.vue.d.ts +2 -11
  76. package/dist/runtime/components/Carousel.vue +5 -2
  77. package/dist/runtime/components/Carousel.vue.d.ts +10 -3
  78. package/dist/runtime/components/Checkbox.vue +2 -2
  79. package/dist/runtime/components/Checkbox.vue.d.ts +10 -13
  80. package/dist/runtime/components/CheckboxGroup.vue +8 -5
  81. package/dist/runtime/components/CheckboxGroup.vue.d.ts +12 -3
  82. package/dist/runtime/components/Chip.vue +1 -1
  83. package/dist/runtime/components/Chip.vue.d.ts +10 -24
  84. package/dist/runtime/components/Collapsible.vue +1 -1
  85. package/dist/runtime/components/Collapsible.vue.d.ts +7 -22
  86. package/dist/runtime/components/ColorPicker.vue +1 -1
  87. package/dist/runtime/components/ColorPicker.vue.d.ts +9 -24
  88. package/dist/runtime/components/CommandPalette.vue +17 -17
  89. package/dist/runtime/components/CommandPalette.vue.d.ts +17 -27
  90. package/dist/runtime/components/Container.vue.d.ts +2 -11
  91. package/dist/runtime/components/ContextMenu.vue.d.ts +6 -24
  92. package/dist/runtime/components/ContextMenuContent.vue +15 -15
  93. package/dist/runtime/components/ContextMenuContent.vue.d.ts +17 -57
  94. package/dist/runtime/components/Drawer.vue.d.ts +17 -27
  95. package/dist/runtime/components/DropdownMenu.vue.d.ts +6 -28
  96. package/dist/runtime/components/DropdownMenuContent.vue +15 -15
  97. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +19 -6
  98. package/dist/runtime/components/Form.vue.d.ts +5 -2
  99. package/dist/runtime/components/FormField.vue +5 -5
  100. package/dist/runtime/components/FormField.vue.d.ts +2 -11
  101. package/dist/runtime/components/Icon.vue.d.ts +1 -10
  102. package/dist/runtime/components/Input.vue +2 -2
  103. package/dist/runtime/components/Input.vue.d.ts +20 -41
  104. package/dist/runtime/components/InputMenu.vue +17 -17
  105. package/dist/runtime/components/InputMenu.vue.d.ts +227 -5
  106. package/dist/runtime/components/InputNumber.vue +13 -7
  107. package/dist/runtime/components/InputNumber.vue.d.ts +90 -23
  108. package/dist/runtime/components/Kbd.vue.d.ts +3 -24
  109. package/dist/runtime/components/Link.vue +5 -14
  110. package/dist/runtime/components/Link.vue.d.ts +3 -34
  111. package/dist/runtime/components/LinkBase.vue.d.ts +4 -27
  112. package/dist/runtime/components/Modal.vue.d.ts +12 -28
  113. package/dist/runtime/components/NavigationMenu.vue +35 -28
  114. package/dist/runtime/components/NavigationMenu.vue.d.ts +24 -26
  115. package/dist/runtime/components/Pagination.vue +1 -1
  116. package/dist/runtime/components/Pagination.vue.d.ts +9 -33
  117. package/dist/runtime/components/PinInput.vue +1 -1
  118. package/dist/runtime/components/PinInput.vue.d.ts +13 -24
  119. package/dist/runtime/components/Popover.vue.d.ts +9 -26
  120. package/dist/runtime/components/Progress.vue +1 -1
  121. package/dist/runtime/components/Progress.vue.d.ts +10 -41
  122. package/dist/runtime/components/RadioGroup.vue +8 -8
  123. package/dist/runtime/components/RadioGroup.vue.d.ts +8 -3
  124. package/dist/runtime/components/Select.vue +12 -12
  125. package/dist/runtime/components/Select.vue.d.ts +11 -3
  126. package/dist/runtime/components/SelectMenu.vue +13 -13
  127. package/dist/runtime/components/SelectMenu.vue.d.ts +19 -5
  128. package/dist/runtime/components/Separator.vue +1 -1
  129. package/dist/runtime/components/Separator.vue.d.ts +3 -24
  130. package/dist/runtime/components/Skeleton.vue.d.ts +3 -12
  131. package/dist/runtime/components/Slideover.vue.d.ts +12 -29
  132. package/dist/runtime/components/Slider.vue +16 -4
  133. package/dist/runtime/components/Slider.vue.d.ts +23 -36
  134. package/dist/runtime/components/Stepper.vue +10 -10
  135. package/dist/runtime/components/Stepper.vue.d.ts +10 -14
  136. package/dist/runtime/components/Switch.vue +1 -1
  137. package/dist/runtime/components/Switch.vue.d.ts +10 -13
  138. package/dist/runtime/components/Table.vue +2 -2
  139. package/dist/runtime/components/Table.vue.d.ts +17 -17
  140. package/dist/runtime/components/Tabs.vue +6 -6
  141. package/dist/runtime/components/Tabs.vue.d.ts +6 -20
  142. package/dist/runtime/components/Textarea.vue +3 -3
  143. package/dist/runtime/components/Textarea.vue.d.ts +20 -44
  144. package/dist/runtime/components/Toast.vue +3 -2
  145. package/dist/runtime/components/Toast.vue.d.ts +92 -24
  146. package/dist/runtime/components/Toaster.vue +4 -4
  147. package/dist/runtime/components/Toaster.vue.d.ts +9 -28
  148. package/dist/runtime/components/Tooltip.vue.d.ts +7 -22
  149. package/dist/runtime/components/Tree.vue +10 -10
  150. package/dist/runtime/components/Tree.vue.d.ts +7 -22
  151. package/dist/runtime/composables/defineShortcuts.js +6 -0
  152. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  153. package/dist/runtime/composables/useButtonGroup.d.ts +1 -1
  154. package/dist/runtime/composables/useFormField.d.ts +2 -2
  155. package/dist/runtime/composables/useFormField.js +2 -1
  156. package/dist/runtime/composables/useKbd.d.ts +1 -0
  157. package/dist/runtime/composables/useKbd.js +4 -3
  158. package/dist/runtime/composables/useOverlay.d.ts +9 -10
  159. package/dist/runtime/composables/useOverlay.js +11 -6
  160. package/dist/runtime/inertia/components/Link.vue +46 -60
  161. package/dist/runtime/inertia/components/Link.vue.d.ts +4 -33
  162. package/dist/runtime/inertia/components/LinkBase.vue +68 -0
  163. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +25 -0
  164. package/dist/runtime/inertia/stubs.d.ts +1 -1
  165. package/dist/runtime/inertia/stubs.js +1 -1
  166. package/dist/runtime/locale/index.d.ts +1 -0
  167. package/dist/runtime/locale/index.js +1 -0
  168. package/dist/runtime/locale/sl.d.ts +3 -0
  169. package/dist/runtime/locale/sl.js +54 -0
  170. package/dist/runtime/types/tv.d.ts +53 -0
  171. package/dist/runtime/types/tv.js +0 -0
  172. package/dist/runtime/types/utils.d.ts +2 -52
  173. package/dist/runtime/types/utils.js +1 -0
  174. package/dist/runtime/utils/link.d.ts +1 -0
  175. package/dist/runtime/utils/link.js +12 -0
  176. package/dist/runtime/vue/components/Icon.vue.d.ts +1 -10
  177. package/dist/runtime/vue/components/Link.vue +27 -40
  178. package/dist/runtime/vue/components/Link.vue.d.ts +3 -34
  179. package/dist/runtime/vue/composables/useAppConfig.js +3 -1
  180. package/dist/runtime/vue/stubs.d.ts +1 -1
  181. package/dist/runtime/vue/stubs.js +1 -1
  182. package/dist/shared/{ui.D7lOOabO.mjs → ui.BvUP-pSb.mjs} +120 -27
  183. package/dist/unplugin.d.mts +2 -2
  184. package/dist/unplugin.mjs +1 -1
  185. package/dist/vite.d.mts +1 -1
  186. package/dist/vite.mjs +2 -2
  187. package/package.json +28 -27
@@ -5,11 +5,12 @@ import theme from "#build/ui/link";
5
5
  <script setup>
6
6
  import { computed } from "vue";
7
7
  import { defu } from "defu";
8
- import { isEqual, diff } from "ohash/utils";
8
+ import { isEqual } from "ohash/utils";
9
9
  import { useForwardProps } from "reka-ui";
10
10
  import { reactiveOmit } from "@vueuse/core";
11
11
  import { useRoute, useAppConfig } from "#imports";
12
12
  import { tv } from "../utils/tv";
13
+ import { isPartiallyEqual } from "../utils/link";
13
14
  import ULinkBase from "./LinkBase.vue";
14
15
  defineOptions({ inheritAttrs: false });
15
16
  const props = defineProps({
@@ -43,7 +44,7 @@ const props = defineProps({
43
44
  defineSlots();
44
45
  const route = useRoute();
45
46
  const appConfig = useAppConfig();
46
- const nuxtLinkProps = useForwardProps(reactiveOmit(props, "as", "type", "disabled", "active", "exact", "exactQuery", "exactHash", "activeClass", "inactiveClass", "raw", "class"));
47
+ const nuxtLinkProps = useForwardProps(reactiveOmit(props, "as", "type", "disabled", "active", "exact", "exactQuery", "exactHash", "activeClass", "inactiveClass", "to", "href", "raw", "custom", "class"));
47
48
  const ui = computed(() => tv({
48
49
  extend: tv(theme),
49
50
  ...defu({
@@ -55,17 +56,7 @@ const ui = computed(() => tv({
55
56
  }
56
57
  }, appConfig.ui?.link || {})
57
58
  }));
58
- function isPartiallyEqual(item1, item2) {
59
- const diffedKeys = diff(item1, item2).reduce((filtered, q) => {
60
- if (q.type === "added") {
61
- filtered.add(q.key);
62
- }
63
- return filtered;
64
- }, /* @__PURE__ */ new Set());
65
- const item1Filtered = Object.fromEntries(Object.entries(item1).filter(([key]) => !diffedKeys.has(key)));
66
- const item2Filtered = Object.fromEntries(Object.entries(item2).filter(([key]) => !diffedKeys.has(key)));
67
- return isEqual(item1Filtered, item2Filtered);
68
- }
59
+ const to = computed(() => props.to ?? props.href);
69
60
  function isLinkActive({ route: linkRoute, isActive, isExactActive }) {
70
61
  if (props.active !== void 0) {
71
62
  return props.active;
@@ -96,7 +87,7 @@ function resolveLinkClass({ route: route2, isActive, isExactActive }) {
96
87
  </script>
97
88
 
98
89
  <template>
99
- <NuxtLink v-slot="{ href, navigate, route: linkRoute, rel, target, isExternal, isActive, isExactActive }" v-bind="nuxtLinkProps" custom>
90
+ <NuxtLink v-slot="{ href, navigate, route: linkRoute, rel, target, isExternal, isActive, isExactActive }" v-bind="nuxtLinkProps" :to="to" custom>
100
91
  <template v-if="custom">
101
92
  <slot
102
93
  v-bind="{
@@ -77,48 +77,17 @@ export interface LinkSlots {
77
77
  active: boolean;
78
78
  }): any;
79
79
  }
80
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LinkProps>, {
81
- as: string;
82
- type: string;
83
- ariaCurrentValue: string;
84
- active: undefined;
85
- activeClass: string;
86
- inactiveClass: string;
87
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LinkProps>, {
88
- as: string;
89
- type: string;
90
- ariaCurrentValue: string;
91
- active: undefined;
92
- activeClass: string;
93
- inactiveClass: string;
94
- }>>> & Readonly<{}>, {
80
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
95
81
  type: "reset" | "submit" | "button";
96
82
  as: any;
97
83
  activeClass: string;
98
84
  ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
99
85
  active: boolean;
100
86
  inactiveClass: string;
101
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<LinkSlots> & LinkSlots>;
87
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
102
88
  export default _default;
103
- type __VLS_WithDefaults<P, D> = {
104
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
105
- default: D[K];
106
- }> : P[K];
107
- };
108
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
109
- type __VLS_TypePropsToOption<T> = {
110
- [K in keyof T]-?: {} extends Pick<T, K> ? {
111
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
112
- } : {
113
- type: import('vue').PropType<T[K]>;
114
- required: true;
115
- };
116
- };
117
- type __VLS_WithTemplateSlots<T, S> = T & {
89
+ type __VLS_WithSlots<T, S> = T & {
118
90
  new (): {
119
91
  $slots: S;
120
92
  };
121
93
  };
122
- type __VLS_PrettifyLocal<T> = {
123
- [K in keyof T]: T[K];
124
- } & {};
@@ -11,38 +11,15 @@ export interface LinkBaseProps {
11
11
  active?: boolean;
12
12
  isExternal?: boolean;
13
13
  }
14
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LinkBaseProps>, {
15
- as: string;
16
- type: string;
17
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LinkBaseProps>, {
18
- as: string;
19
- type: string;
20
- }>>> & Readonly<{}>, {
14
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
21
15
  type: string;
22
16
  as: string;
23
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
24
- default?(_: {}): any;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
18
+ default?: (props: {}) => any;
25
19
  }>;
26
20
  export default _default;
27
- type __VLS_WithDefaults<P, D> = {
28
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
29
- default: D[K];
30
- }> : P[K];
31
- };
32
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
33
- type __VLS_TypePropsToOption<T> = {
34
- [K in keyof T]-?: {} extends Pick<T, K> ? {
35
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
36
- } : {
37
- type: import('vue').PropType<T[K]>;
38
- required: true;
39
- };
40
- };
41
- type __VLS_WithTemplateSlots<T, S> = T & {
21
+ type __VLS_WithSlots<T, S> = T & {
42
22
  new (): {
43
23
  $slots: S;
44
24
  };
45
25
  };
46
- type __VLS_PrettifyLocal<T> = {
47
- [K in keyof T]: T[K];
48
- } & {};
@@ -69,41 +69,25 @@ export interface ModalSlots {
69
69
  body(props?: {}): any;
70
70
  footer(props?: {}): any;
71
71
  }
72
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ModalProps>, {
73
- close: boolean;
74
- portal: boolean;
75
- overlay: boolean;
76
- transition: boolean;
77
- modal: boolean;
78
- dismissible: boolean;
79
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
72
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
73
+ "update:open": (value: boolean) => any;
74
+ "after:leave": () => any;
75
+ "close:prevent": () => any;
76
+ }, string, import("vue").PublicProps, Readonly<ModalProps> & Readonly<{
77
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
78
+ "onAfter:leave"?: (() => any) | undefined;
79
+ "onClose:prevent"?: (() => any) | undefined;
80
+ }>, {
80
81
  close: boolean | Partial<ButtonProps>;
81
82
  modal: boolean;
82
- transition: boolean;
83
83
  portal: boolean | string | HTMLElement;
84
84
  overlay: boolean;
85
+ transition: boolean;
85
86
  dismissible: boolean;
86
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<ModalSlots> & ModalSlots>;
87
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ModalSlots>;
87
88
  export default _default;
88
- type __VLS_WithDefaults<P, D> = {
89
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
90
- default: D[K];
91
- }> : P[K];
92
- };
93
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
94
- type __VLS_TypePropsToOption<T> = {
95
- [K in keyof T]-?: {} extends Pick<T, K> ? {
96
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
97
- } : {
98
- type: import('vue').PropType<T[K]>;
99
- required: true;
100
- };
101
- };
102
- type __VLS_WithTemplateSlots<T, S> = T & {
89
+ type __VLS_WithSlots<T, S> = T & {
103
90
  new (): {
104
91
  $slots: S;
105
92
  };
106
93
  };
107
- type __VLS_PrettifyLocal<T> = {
108
- [K in keyof T]: T[K];
109
- } & {};
@@ -16,6 +16,7 @@ import UAvatar from "./Avatar.vue";
16
16
  import UIcon from "./Icon.vue";
17
17
  import UBadge from "./Badge.vue";
18
18
  import UCollapsible from "./Collapsible.vue";
19
+ import UTooltip from "./Tooltip.vue";
19
20
  const props = defineProps({
20
21
  as: { type: null, required: false },
21
22
  trailingIcon: { type: String, required: false },
@@ -84,34 +85,34 @@ const lists = computed(
84
85
  <DefineLinkTemplate v-slot="{ item, active, index }">
85
86
  <slot :name="item.slot || 'item'" :item="item" :index="index">
86
87
  <slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="active" :index="index">
87
- <UAvatar v-if="item.avatar" :size="props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: props.ui?.linkLeadingAvatar, active, disabled: !!item.disabled })" />
88
- <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: props.ui?.linkLeadingIcon, active, disabled: !!item.disabled })" />
88
+ <UAvatar v-if="item.avatar" :size="item.ui?.linkLeadingAvatarSize || props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active, disabled: !!item.disabled })" />
89
+ <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active, disabled: !!item.disabled })" />
89
90
  </slot>
90
91
 
91
92
  <span
92
93
  v-if="(!collapsed || orientation !== 'vertical') && (get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label'])"
93
- :class="ui.linkLabel({ class: props.ui?.linkLabel })"
94
+ :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })"
94
95
  >
95
96
  <slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="active" :index="index">
96
97
  {{ get(item, props.labelKey) }}
97
98
  </slot>
98
99
 
99
- <UIcon v-if="item.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.linkLabelExternalIcon({ class: props.ui?.linkLabelExternalIcon, active })" />
100
+ <UIcon v-if="item.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.linkLabelExternalIcon({ class: [props.ui?.linkLabelExternalIcon, item.ui?.linkLabelExternalIcon], active })" />
100
101
  </span>
101
102
 
102
- <span v-if="(!collapsed || orientation !== 'vertical') && (item.badge || orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length || item.trailingIcon || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing'])" :class="ui.linkTrailing({ class: props.ui?.linkTrailing })">
103
+ <span v-if="(!collapsed || orientation !== 'vertical') && (item.badge || orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length || item.trailingIcon || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing'])" :class="ui.linkTrailing({ class: [props.ui?.linkTrailing, item.ui?.linkTrailing] })">
103
104
  <slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="active" :index="index">
104
105
  <UBadge
105
106
  v-if="item.badge"
106
107
  color="neutral"
107
108
  variant="outline"
108
- :size="props.ui?.linkTrailingBadgeSize || ui.linkTrailingBadgeSize()"
109
+ :size="item.ui?.linkTrailingBadgeSize || props.ui?.linkTrailingBadgeSize || ui.linkTrailingBadgeSize()"
109
110
  v-bind="typeof item.badge === 'string' || typeof item.badge === 'number' ? { label: item.badge } : item.badge"
110
- :class="ui.linkTrailingBadge({ class: props.ui?.linkTrailingBadge })"
111
+ :class="ui.linkTrailingBadge({ class: [props.ui?.linkTrailingBadge, item.ui?.linkTrailingBadge] })"
111
112
  />
112
113
 
113
- <UIcon v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length" :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.linkTrailingIcon({ class: props.ui?.linkTrailingIcon, active })" />
114
- <UIcon v-else-if="item.trailingIcon" :name="item.trailingIcon" :class="ui.linkTrailingIcon({ class: props.ui?.linkTrailingIcon, active })" />
114
+ <UIcon v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length && item.collapsible !== false" :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon], active })" />
115
+ <UIcon v-else-if="item.trailingIcon" :name="item.trailingIcon" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon], active })" />
115
116
  </slot>
116
117
  </span>
117
118
  </slot>
@@ -119,17 +120,18 @@ const lists = computed(
119
120
 
120
121
  <DefineItemTemplate v-slot="{ item, index, level = 0 }">
121
122
  <component
122
- :is="orientation === 'vertical' && item.children?.length && !collapsed ? UCollapsible : NavigationMenuItem"
123
+ :is="orientation === 'vertical' && item.children?.length ? UCollapsible : NavigationMenuItem"
123
124
  as="li"
124
- :value="item.value || String(index)"
125
+ :value="item.value || `item-${index}`"
125
126
  :default-open="item.defaultOpen"
126
- :unmount-on-hide="orientation === 'vertical' && item.children?.length && !collapsed ? unmountOnHide : void 0"
127
+ :disabled="orientation === 'vertical' && item.children?.length ? item.collapsible === false : void 0"
128
+ :unmount-on-hide="orientation === 'vertical' && item.children?.length ? unmountOnHide : void 0"
127
129
  :open="item.open"
128
130
  >
129
- <div v-if="orientation === 'vertical' && item.type === 'label'" :class="ui.label({ class: props.ui?.label })">
131
+ <div v-if="orientation === 'vertical' && item.type === 'label'" :class="ui.label({ class: [props.ui?.label, item.ui?.label, item.class] })">
130
132
  <ReuseLinkTemplate :item="item" :index="index" />
131
133
  </div>
132
- <ULink v-else-if="item.type !== 'label'" v-slot="{ active, ...slotProps }" v-bind="orientation === 'vertical' && item.children?.length && !collapsed ? {} : pickLinkProps(item)" custom>
134
+ <ULink v-else-if="item.type !== 'label'" v-slot="{ active, ...slotProps }" v-bind="orientation === 'vertical' && item.children?.length && item.collapsible !== false ? {} : pickLinkProps(item)" custom>
133
135
  <component
134
136
  :is="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) ? NavigationMenuTrigger : NavigationMenuLink"
135
137
  as-child
@@ -137,27 +139,32 @@ const lists = computed(
137
139
  :disabled="item.disabled"
138
140
  @select="item.onSelect"
139
141
  >
140
- <ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: orientation === 'horizontal' || level > 0 })">
142
+ <UTooltip v-if="!!item.tooltip" :content="{ side: 'right' }" v-bind="item.tooltip">
143
+ <ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: orientation === 'horizontal' || level > 0 })">
144
+ <ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
145
+ </ULinkBase>
146
+ </UTooltip>
147
+ <ULinkBase v-else v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: orientation === 'horizontal' || level > 0 })">
141
148
  <ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
142
149
  </ULinkBase>
143
150
  </component>
144
151
 
145
- <NavigationMenuContent v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content'])" v-bind="contentProps" :class="ui.content({ class: props.ui?.content })">
152
+ <NavigationMenuContent v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content'])" v-bind="contentProps" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
146
153
  <slot :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="item" :active="active" :index="index">
147
- <ul :class="ui.childList({ class: props.ui?.childList })">
148
- <li v-for="(childItem, childIndex) in item.children" :key="childIndex" :class="ui.childItem({ class: props.ui?.childItem })">
154
+ <ul :class="ui.childList({ class: [props.ui?.childList, item.ui?.childList] })">
155
+ <li v-for="(childItem, childIndex) in item.children" :key="childIndex" :class="ui.childItem({ class: [props.ui?.childItem, item.ui?.childItem] })">
149
156
  <ULink v-slot="{ active: childActive, ...childSlotProps }" v-bind="pickLinkProps(childItem)" custom>
150
157
  <NavigationMenuLink as-child :active="childActive" @select="childItem.onSelect">
151
- <ULinkBase v-bind="childSlotProps" :class="ui.childLink({ class: [props.ui?.childLink, childItem.class], active: childActive })">
152
- <UIcon v-if="childItem.icon" :name="childItem.icon" :class="ui.childLinkIcon({ class: props.ui?.childLinkIcon, active: childActive })" />
158
+ <ULinkBase v-bind="childSlotProps" :class="ui.childLink({ class: [props.ui?.childLink, item.ui?.childLink, childItem.class], active: childActive })">
159
+ <UIcon v-if="childItem.icon" :name="childItem.icon" :class="ui.childLinkIcon({ class: [props.ui?.childLinkIcon, item.ui?.childLinkIcon], active: childActive })" />
153
160
 
154
- <div :class="ui.childLinkWrapper({ class: props.ui?.childLinkWrapper })">
155
- <p :class="ui.childLinkLabel({ class: props.ui?.childLinkLabel, active: childActive })">
161
+ <div :class="ui.childLinkWrapper({ class: [props.ui?.childLinkWrapper, item.ui?.childLinkWrapper] })">
162
+ <p :class="ui.childLinkLabel({ class: [props.ui?.childLinkLabel, item.ui?.childLinkLabel], active: childActive })">
156
163
  {{ get(childItem, props.labelKey) }}
157
164
 
158
- <UIcon v-if="childItem.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.childLinkLabelExternalIcon({ class: props.ui?.childLinkLabelExternalIcon, active: childActive })" />
165
+ <UIcon v-if="childItem.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.childLinkLabelExternalIcon({ class: [props.ui?.childLinkLabelExternalIcon, item.ui?.childLinkLabelExternalIcon], active: childActive })" />
159
166
  </p>
160
- <p v-if="childItem.description" :class="ui.childLinkDescription({ class: props.ui?.childLinkDescription, active: childActive })">
167
+ <p v-if="childItem.description" :class="ui.childLinkDescription({ class: [props.ui?.childLinkDescription, item.ui?.childLinkDescription], active: childActive })">
161
168
  {{ childItem.description }}
162
169
  </p>
163
170
  </div>
@@ -170,7 +177,7 @@ const lists = computed(
170
177
  </NavigationMenuContent>
171
178
  </ULink>
172
179
 
173
- <template v-if="orientation === 'vertical' && item.children?.length && !collapsed" #content>
180
+ <template v-if="orientation === 'vertical' && item.children?.length" #content>
174
181
  <ul :class="ui.childList({ class: props.ui?.childList })">
175
182
  <ReuseItemTemplate
176
183
  v-for="(childItem, childIndex) in item.children"
@@ -178,19 +185,19 @@ const lists = computed(
178
185
  :item="childItem"
179
186
  :index="childIndex"
180
187
  :level="level + 1"
181
- :class="ui.childItem({ class: props.ui?.childItem })"
188
+ :class="ui.childItem({ class: [props.ui?.childItem, childItem.ui?.childItem] })"
182
189
  />
183
190
  </ul>
184
191
  </template>
185
192
  </component>
186
193
  </DefineItemTemplate>
187
194
 
188
- <NavigationMenuRoot v-bind="rootProps" :data-collapsed="collapsed" :class="ui.root({ class: [props.class, props.ui?.root] })">
195
+ <NavigationMenuRoot v-bind="rootProps" :data-collapsed="collapsed" :class="ui.root({ class: [props.ui?.root, props.class] })">
189
196
  <slot name="list-leading" />
190
197
 
191
198
  <template v-for="(list, listIndex) in lists" :key="`list-${listIndex}`">
192
199
  <NavigationMenuList :class="ui.list({ class: props.ui?.list })">
193
- <ReuseItemTemplate v-for="(item, index) in list" :key="`list-${listIndex}-${index}`" :item="item" :index="index" :class="ui.item({ class: props.ui?.item })" />
200
+ <ReuseItemTemplate v-for="(item, index) in list" :key="`list-${listIndex}-${index}`" :item="item" :index="index" :class="ui.item({ class: [props.ui?.item, item.ui?.item] })" />
194
201
  </NavigationMenuList>
195
202
 
196
203
  <div v-if="orientation === 'vertical' && listIndex < lists.length - 1" :class="ui.separator({ class: props.ui?.separator })" />
@@ -1,10 +1,10 @@
1
1
  import type { NavigationMenuRootProps, NavigationMenuRootEmits, NavigationMenuContentProps, NavigationMenuContentEmits, CollapsibleRootProps } from 'reka-ui';
2
2
  import type { AppConfig } from '@nuxt/schema';
3
3
  import theme from '#build/ui/navigation-menu';
4
- import type { AvatarProps, BadgeProps, LinkProps } from '../types';
4
+ import type { AvatarProps, BadgeProps, LinkProps, TooltipProps } from '../types';
5
5
  import type { ArrayOrNested, DynamicSlots, MergeTypes, NestedItem, EmitsToProps, ComponentConfig } from '../types/utils';
6
6
  type NavigationMenu = ComponentConfig<typeof theme, AppConfig, 'navigationMenu'>;
7
- export interface NavigationMenuChildItem extends Omit<NavigationMenuItem, 'type'> {
7
+ export interface NavigationMenuChildItem extends Omit<NavigationMenuItem, 'type' | 'ui'> {
8
8
  /** Description is only used when `orientation` is `horizontal`. */
9
9
  description?: string;
10
10
  [key: string]: any;
@@ -21,6 +21,12 @@ export interface NavigationMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cu
21
21
  * `{ size: 'sm', color: 'neutral', variant: 'outline' }`{lang="ts-type"}
22
22
  */
23
23
  badge?: string | number | BadgeProps;
24
+ /**
25
+ * Display a tooltip on the item.
26
+ * Only works when `type` is `link`.
27
+ * `{ content: { side: 'right' } }`{lang="ts-type"}
28
+ */
29
+ tooltip?: TooltipProps;
24
30
  /**
25
31
  * @IconifyIcon
26
32
  */
@@ -32,9 +38,21 @@ export interface NavigationMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cu
32
38
  */
33
39
  type?: 'label' | 'link';
34
40
  slot?: string;
41
+ /**
42
+ * The value of the item. Avoid using `index` as the value to prevent conflicts in horizontal orientation with Reka UI.
43
+ * @defaultValue `item-${index}`
44
+ */
35
45
  value?: string;
46
+ /**
47
+ * Make the item collapsible.
48
+ * Only works when `orientation` is `vertical`.
49
+ * @defaultValue true
50
+ */
51
+ collapsible?: boolean;
36
52
  children?: NavigationMenuChildItem[];
37
53
  onSelect?(e: Event): void;
54
+ class?: any;
55
+ ui?: Pick<NavigationMenu['slots'], 'item' | 'linkLeadingAvatarSize' | 'linkLeadingAvatar' | 'linkLeadingIcon' | 'linkLabel' | 'linkLabelExternalIcon' | 'linkTrailing' | 'linkTrailingBadgeSize' | 'linkTrailingBadge' | 'linkTrailingIcon' | 'label' | 'link' | 'content' | 'childList' | 'childItem' | 'childLink' | 'childLinkIcon' | 'childLinkWrapper' | 'childLinkLabel' | 'childLinkLabelExternalIcon' | 'childLinkDescription'>;
38
56
  [key: string]: any;
39
57
  }
40
58
  export interface NavigationMenuProps<T extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>> extends Pick<NavigationMenuRootProps, 'modelValue' | 'defaultValue' | 'delayDuration' | 'disableClickTrigger' | 'disableHoverTrigger' | 'skipDelayDuration' | 'disablePointerLeaveClose' | 'unmountOnHide'> {
@@ -123,32 +141,12 @@ export type NavigationMenuSlots<A extends ArrayOrNested<NavigationMenuItem> = Ar
123
141
  active?: boolean;
124
142
  }>;
125
143
  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<{
126
- props: __VLS_PrettifyLocal<any & NavigationMenuProps<T> & Partial<{}>> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps);
144
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
145
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
146
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NavigationMenuProps<T> & Partial<{}>> & import("vue").PublicProps;
127
147
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
128
148
  attrs: any;
129
- slots: Readonly<{
130
- item: SlotProps<NestedItem<T>>;
131
- 'item-leading': SlotProps<NestedItem<T>>;
132
- 'item-label': SlotProps<NestedItem<T>>;
133
- 'item-trailing': SlotProps<NestedItem<T>>;
134
- 'item-content': SlotProps<NestedItem<T>>;
135
- 'list-leading': (props?: {}) => any;
136
- 'list-trailing': (props?: {}) => any;
137
- } & DynamicSlots<MergeTypes<NestedItem<T>>, "trailing" | "leading" | "content" | "label", {
138
- index: number;
139
- active?: boolean;
140
- }>> & {
141
- item: SlotProps<NestedItem<T>>;
142
- 'item-leading': SlotProps<NestedItem<T>>;
143
- 'item-label': SlotProps<NestedItem<T>>;
144
- 'item-trailing': SlotProps<NestedItem<T>>;
145
- 'item-content': SlotProps<NestedItem<T>>;
146
- 'list-leading': (props?: {}) => any;
147
- 'list-trailing': (props?: {}) => any;
148
- } & DynamicSlots<MergeTypes<NestedItem<T>>, "trailing" | "leading" | "content" | "label", {
149
- index: number;
150
- active?: boolean;
151
- }>;
149
+ slots: NavigationMenuSlots<T, NestedItem<T>>;
152
150
  emit: (evt: "update:modelValue", value: string) => void;
153
151
  }>) => import("vue").VNode & {
154
152
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -47,7 +47,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pagination ||
47
47
  </script>
48
48
 
49
49
  <template>
50
- <PaginationRoot v-slot="{ page, pageCount }" v-bind="rootProps" :class="ui.root({ class: [props.class, props.ui?.root] })">
50
+ <PaginationRoot v-slot="{ page, pageCount }" v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })">
51
51
  <PaginationList v-slot="{ items }" :class="ui.list({ class: props.ui?.list })">
52
52
  <PaginationFirst v-if="showControls || !!slots.first" as-child :class="ui.first({ class: props.ui?.first })">
53
53
  <slot name="first">
@@ -95,49 +95,25 @@ export interface PaginationSlots {
95
95
  index: number;
96
96
  }): any;
97
97
  }
98
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<PaginationProps>, {
99
- size: string;
100
- color: string;
101
- variant: string;
102
- activeColor: string;
103
- activeVariant: string;
104
- showControls: boolean;
105
- showEdges: boolean;
106
- itemsPerPage: number;
107
- siblingCount: number;
108
- total: number;
109
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
110
- size: "md" | "xs" | "sm" | "lg" | "xl";
98
+ declare const _default: __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
+ size: "xs" | "sm" | "md" | "lg" | "xl";
111
104
  color: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
112
- variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
113
105
  activeColor: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
106
+ variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
114
107
  activeVariant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
115
108
  itemsPerPage: number;
116
109
  showEdges: boolean;
117
110
  siblingCount: number;
118
111
  total: number;
119
112
  showControls: boolean;
120
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<PaginationSlots> & PaginationSlots>;
113
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PaginationSlots>;
121
114
  export default _default;
122
- type __VLS_WithDefaults<P, D> = {
123
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
124
- default: D[K];
125
- }> : P[K];
126
- };
127
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
128
- type __VLS_TypePropsToOption<T> = {
129
- [K in keyof T]-?: {} extends Pick<T, K> ? {
130
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
131
- } : {
132
- type: import('vue').PropType<T[K]>;
133
- required: true;
134
- };
135
- };
136
- type __VLS_WithTemplateSlots<T, S> = T & {
115
+ type __VLS_WithSlots<T, S> = T & {
137
116
  new (): {
138
117
  $slots: S;
139
118
  };
140
119
  };
141
- type __VLS_PrettifyLocal<T> = {
142
- [K in keyof T]: T[K];
143
- } & {};
@@ -75,7 +75,7 @@ defineExpose({
75
75
  v-bind="{ ...rootProps, ...ariaAttrs }"
76
76
  :id="id"
77
77
  :name="name"
78
- :class="ui.root({ class: [props.class, props.ui?.root] })"
78
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
79
79
  @update:model-value="emitFormInput()"
80
80
  @complete="onComplete"
81
81
  >
@@ -37,32 +37,21 @@ export type PinInputEmits = PinInputRootEmits & {
37
37
  change: [payload: Event];
38
38
  blur: [payload: Event];
39
39
  };
40
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<PinInputProps>, {
41
- type: string;
42
- length: number;
43
- autofocusDelay: number;
44
- }>>, {
40
+ declare const _default: import("vue").DefineComponent<PinInputProps, {
45
41
  inputsRef: import("vue").Ref<ComponentPublicInstance[], ComponentPublicInstance[]>;
46
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
42
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
+ blur: (payload: Event) => any;
44
+ complete: (value: string[]) => any;
45
+ change: (payload: Event) => any;
46
+ "update:modelValue": (value: string[]) => any;
47
+ }, string, import("vue").PublicProps, Readonly<PinInputProps> & Readonly<{
48
+ onBlur?: ((payload: Event) => any) | undefined;
49
+ onComplete?: ((value: string[]) => any) | undefined;
50
+ onChange?: ((payload: Event) => any) | undefined;
51
+ "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
52
+ }>, {
47
53
  length: number | string;
48
54
  type: "text" | "number";
49
55
  autofocusDelay: number;
50
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
56
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
51
57
  export default _default;
52
- type __VLS_WithDefaults<P, D> = {
53
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
54
- default: D[K];
55
- }> : P[K];
56
- };
57
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
58
- type __VLS_TypePropsToOption<T> = {
59
- [K in keyof T]-?: {} extends Pick<T, K> ? {
60
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
61
- } : {
62
- type: import('vue').PropType<T[K]>;
63
- required: true;
64
- };
65
- };
66
- type __VLS_PrettifyLocal<T> = {
67
- [K in keyof T]: T[K];
68
- } & {};
@@ -42,39 +42,22 @@ export interface PopoverSlots {
42
42
  }): any;
43
43
  content(props?: {}): any;
44
44
  }
45
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<PopoverProps>, {
46
- portal: boolean;
47
- mode: string;
48
- openDelay: number;
49
- closeDelay: number;
50
- dismissible: boolean;
51
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
45
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
46
+ "update:open": (value: boolean) => any;
47
+ "close:prevent": () => any;
48
+ }, string, import("vue").PublicProps, Readonly<PopoverProps> & Readonly<{
49
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
50
+ "onClose:prevent"?: (() => any) | undefined;
51
+ }>, {
52
52
  mode: "click" | "hover";
53
53
  portal: boolean | string | HTMLElement;
54
54
  dismissible: boolean;
55
55
  openDelay: number;
56
56
  closeDelay: number;
57
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<PopoverSlots> & PopoverSlots>;
57
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PopoverSlots>;
58
58
  export default _default;
59
- type __VLS_WithDefaults<P, D> = {
60
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
61
- default: D[K];
62
- }> : P[K];
63
- };
64
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
65
- type __VLS_TypePropsToOption<T> = {
66
- [K in keyof T]-?: {} extends Pick<T, K> ? {
67
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
68
- } : {
69
- type: import('vue').PropType<T[K]>;
70
- required: true;
71
- };
72
- };
73
- type __VLS_WithTemplateSlots<T, S> = T & {
59
+ type __VLS_WithSlots<T, S> = T & {
74
60
  new (): {
75
61
  $slots: S;
76
62
  };
77
63
  };
78
- type __VLS_PrettifyLocal<T> = {
79
- [K in keyof T]: T[K];
80
- } & {};
@@ -109,7 +109,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.progress || {
109
109
  </script>
110
110
 
111
111
  <template>
112
- <Primitive :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })">
112
+ <Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
113
113
  <div v-if="!isIndeterminate && (status || !!slots.status)" :class="ui.status({ class: props.ui?.status })" :style="statusStyle">
114
114
  <slot name="status" :percent="percent">
115
115
  {{ percent }}%