@nuxt/ui 3.0.1 → 3.1.0

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 (228) hide show
  1. package/.nuxt/ui/accordion.ts +25 -4
  2. package/.nuxt/ui/alert.ts +52 -31
  3. package/.nuxt/ui/avatar-group.ts +24 -3
  4. package/.nuxt/ui/avatar.ts +26 -5
  5. package/.nuxt/ui/badge.ts +56 -35
  6. package/.nuxt/ui/breadcrumb.ts +28 -7
  7. package/.nuxt/ui/button-group.ts +23 -2
  8. package/.nuxt/ui/button.ts +66 -45
  9. package/.nuxt/ui/calendar.ts +39 -18
  10. package/.nuxt/ui/card.ts +28 -7
  11. package/.nuxt/ui/carousel.ts +29 -8
  12. package/.nuxt/ui/checkbox-group.ts +82 -0
  13. package/.nuxt/ui/checkbox.ts +163 -29
  14. package/.nuxt/ui/chip.ts +31 -10
  15. package/.nuxt/ui/collapsible.ts +23 -2
  16. package/.nuxt/ui/color-picker.ts +26 -5
  17. package/.nuxt/ui/command-palette.ts +37 -16
  18. package/.nuxt/ui/container.ts +24 -3
  19. package/.nuxt/ui/context-menu.ts +56 -35
  20. package/.nuxt/ui/drawer.ts +33 -12
  21. package/.nuxt/ui/dropdown-menu.ts +57 -36
  22. package/.nuxt/ui/form-field.ts +29 -8
  23. package/.nuxt/ui/form.ts +23 -2
  24. package/.nuxt/ui/index.ts +1 -0
  25. package/.nuxt/ui/input-menu.ts +65 -44
  26. package/.nuxt/ui/input-number.ts +43 -22
  27. package/.nuxt/ui/input.ts +46 -25
  28. package/.nuxt/ui/kbd.ts +27 -6
  29. package/.nuxt/ui/link.ts +26 -5
  30. package/.nuxt/ui/modal.ts +28 -7
  31. package/.nuxt/ui/navigation-menu.ts +103 -84
  32. package/.nuxt/ui/pagination.ts +23 -2
  33. package/.nuxt/ui/pin-input.ts +43 -22
  34. package/.nuxt/ui/popover.ts +25 -4
  35. package/.nuxt/ui/progress.ts +40 -19
  36. package/.nuxt/ui/radio-group.ts +273 -37
  37. package/.nuxt/ui/select-menu.ts +59 -35
  38. package/.nuxt/ui/select.ts +55 -34
  39. package/.nuxt/ui/separator.ts +31 -10
  40. package/.nuxt/ui/skeleton.ts +24 -3
  41. package/.nuxt/ui/slideover.ts +27 -6
  42. package/.nuxt/ui/slider.ts +39 -18
  43. package/.nuxt/ui/stepper.ts +41 -20
  44. package/.nuxt/ui/switch.ts +44 -23
  45. package/.nuxt/ui/table.ts +38 -17
  46. package/.nuxt/ui/tabs.ts +55 -34
  47. package/.nuxt/ui/textarea.ts +63 -37
  48. package/.nuxt/ui/toast.ts +47 -26
  49. package/.nuxt/ui/toaster.ts +23 -2
  50. package/.nuxt/ui/tooltip.ts +25 -4
  51. package/.nuxt/ui/tree.ts +41 -20
  52. package/.nuxt/ui.css +56 -12
  53. package/README.md +11 -0
  54. package/cli/templates.mjs +18 -17
  55. package/dist/module.d.mts +2 -1
  56. package/dist/module.json +5 -5
  57. package/dist/module.mjs +11 -7
  58. package/dist/runtime/components/Accordion.vue +36 -92
  59. package/dist/runtime/components/Accordion.vue.d.ts +91 -0
  60. package/dist/runtime/components/Alert.vue +37 -100
  61. package/dist/runtime/components/Alert.vue.d.ts +96 -0
  62. package/dist/runtime/components/App.vue +28 -34
  63. package/dist/runtime/components/App.vue.d.ts +24 -0
  64. package/dist/runtime/components/Avatar.vue +47 -78
  65. package/dist/runtime/components/Avatar.vue.d.ts +60 -0
  66. package/dist/runtime/components/AvatarGroup.vue +40 -77
  67. package/dist/runtime/components/AvatarGroup.vue.d.ts +40 -0
  68. package/dist/runtime/components/Badge.vue +33 -62
  69. package/dist/runtime/components/Badge.vue.d.ts +62 -0
  70. package/dist/runtime/components/Breadcrumb.vue +36 -88
  71. package/dist/runtime/components/Breadcrumb.vue.d.ts +82 -0
  72. package/dist/runtime/components/Button.vue +96 -105
  73. package/dist/runtime/components/Button.vue.d.ts +73 -0
  74. package/dist/runtime/components/ButtonGroup.vue +20 -46
  75. package/dist/runtime/components/ButtonGroup.vue.d.ts +55 -0
  76. package/dist/runtime/components/Calendar.vue +73 -127
  77. package/dist/runtime/components/Calendar.vue.d.ts +107 -0
  78. package/dist/runtime/components/Card.vue +18 -40
  79. package/dist/runtime/components/Card.vue.d.ts +38 -0
  80. package/dist/runtime/components/Carousel.vue +112 -230
  81. package/dist/runtime/components/Carousel.vue.d.ts +120 -0
  82. package/dist/runtime/components/Checkbox.vue +52 -93
  83. package/dist/runtime/components/Checkbox.vue.d.ts +76 -0
  84. package/dist/runtime/components/CheckboxGroup.vue +121 -0
  85. package/dist/runtime/components/CheckboxGroup.vue.d.ts +75 -0
  86. package/dist/runtime/components/Chip.vue +26 -69
  87. package/dist/runtime/components/Chip.vue.d.ts +71 -0
  88. package/dist/runtime/components/Collapsible.vue +22 -41
  89. package/dist/runtime/components/Collapsible.vue.d.ts +50 -0
  90. package/dist/runtime/components/ColorPicker.vue +111 -197
  91. package/dist/runtime/components/ColorPicker.vue.d.ts +63 -0
  92. package/dist/runtime/components/CommandPalette.vue +94 -234
  93. package/dist/runtime/components/CommandPalette.vue.d.ts +173 -0
  94. package/dist/runtime/components/Container.vue +15 -28
  95. package/dist/runtime/components/Container.vue.d.ts +27 -0
  96. package/dist/runtime/components/ContextMenu.vue +32 -119
  97. package/dist/runtime/components/ContextMenu.vue.d.ts +127 -0
  98. package/dist/runtime/components/ContextMenuContent.vue +71 -72
  99. package/dist/runtime/components/ContextMenuContent.vue.d.ts +105 -0
  100. package/dist/runtime/components/Drawer.vue +49 -87
  101. package/dist/runtime/components/Drawer.vue.d.ts +88 -0
  102. package/dist/runtime/components/DropdownMenu.vue +37 -129
  103. package/dist/runtime/components/DropdownMenu.vue.d.ts +141 -0
  104. package/dist/runtime/components/DropdownMenuContent.vue +76 -79
  105. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +55 -0
  106. package/dist/runtime/components/Form.vue +135 -219
  107. package/dist/runtime/components/Form.vue.d.ts +66 -0
  108. package/dist/runtime/components/FormField.vue +36 -77
  109. package/dist/runtime/components/FormField.vue.d.ts +70 -0
  110. package/dist/runtime/components/Icon.vue +12 -19
  111. package/dist/runtime/components/Icon.vue.d.ts +17 -0
  112. package/dist/runtime/components/Input.vue +82 -140
  113. package/dist/runtime/components/Input.vue.d.ts +91 -0
  114. package/dist/runtime/components/InputMenu.vue +193 -302
  115. package/dist/runtime/components/InputMenu.vue.d.ts +312 -0
  116. package/dist/runtime/components/InputNumber.vue +71 -133
  117. package/dist/runtime/components/InputNumber.vue.d.ts +193 -0
  118. package/dist/runtime/components/Kbd.vue +20 -46
  119. package/dist/runtime/components/Kbd.vue.d.ts +55 -0
  120. package/dist/runtime/components/Link.vue +98 -173
  121. package/dist/runtime/components/Link.vue.d.ts +124 -0
  122. package/dist/runtime/components/LinkBase.vue +33 -41
  123. package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
  124. package/dist/runtime/components/Modal.vue +53 -116
  125. package/dist/runtime/components/Modal.vue.d.ts +109 -0
  126. package/dist/runtime/components/NavigationMenu.vue +78 -186
  127. package/dist/runtime/components/NavigationMenu.vue.d.ts +159 -0
  128. package/dist/runtime/components/OverlayProvider.vue +14 -18
  129. package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
  130. package/dist/runtime/components/Pagination.vue +46 -140
  131. package/dist/runtime/components/Pagination.vue.d.ts +143 -0
  132. package/dist/runtime/components/PinInput.vue +61 -78
  133. package/dist/runtime/components/PinInput.vue.d.ts +68 -0
  134. package/dist/runtime/components/Popover.vue +47 -84
  135. package/dist/runtime/components/Popover.vue.d.ts +80 -0
  136. package/dist/runtime/components/Progress.vue +70 -131
  137. package/dist/runtime/components/Progress.vue.d.ts +97 -0
  138. package/dist/runtime/components/RadioGroup.vue +75 -126
  139. package/dist/runtime/components/RadioGroup.vue.d.ts +88 -0
  140. package/dist/runtime/components/Select.vue +115 -202
  141. package/dist/runtime/components/Select.vue.d.ts +139 -0
  142. package/dist/runtime/components/SelectMenu.vue +167 -281
  143. package/dist/runtime/components/SelectMenu.vue.d.ts +184 -0
  144. package/dist/runtime/components/Separator.vue +29 -71
  145. package/dist/runtime/components/Separator.vue.d.ts +75 -0
  146. package/dist/runtime/components/Skeleton.vue +21 -23
  147. package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
  148. package/dist/runtime/components/Slideover.vue +53 -120
  149. package/dist/runtime/components/Slideover.vue.d.ts +111 -0
  150. package/dist/runtime/components/Slider.vue +46 -84
  151. package/dist/runtime/components/Slider.vue.d.ts +71 -0
  152. package/dist/runtime/components/Stepper.vue +44 -113
  153. package/dist/runtime/components/Stepper.vue.d.ts +89 -0
  154. package/dist/runtime/components/Switch.vue +45 -93
  155. package/dist/runtime/components/Switch.vue.d.ts +73 -0
  156. package/dist/runtime/components/Table.vue +165 -264
  157. package/dist/runtime/components/Table.vue.d.ts +183 -0
  158. package/dist/runtime/components/Tabs.vue +40 -105
  159. package/dist/runtime/components/Tabs.vue.d.ts +104 -0
  160. package/dist/runtime/components/Textarea.vue +113 -158
  161. package/dist/runtime/components/Textarea.vue.d.ts +95 -0
  162. package/dist/runtime/components/Toast.vue +49 -110
  163. package/dist/runtime/components/Toast.vue.d.ts +95 -0
  164. package/dist/runtime/components/Toaster.vue +70 -107
  165. package/dist/runtime/components/Toaster.vue.d.ts +63 -0
  166. package/dist/runtime/components/Tooltip.vue +38 -65
  167. package/dist/runtime/components/Tooltip.vue.d.ts +65 -0
  168. package/dist/runtime/components/Tree.vue +57 -150
  169. package/dist/runtime/components/Tree.vue.d.ts +128 -0
  170. package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
  171. package/dist/runtime/composables/defineShortcuts.js +0 -1
  172. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  173. package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
  174. package/dist/runtime/composables/useFormField.d.ts +2 -2
  175. package/dist/runtime/composables/useFormField.js +1 -1
  176. package/dist/runtime/composables/useOverlay.d.ts +16 -8
  177. package/dist/runtime/composables/useOverlay.js +14 -6
  178. package/dist/runtime/composables/usePortal.d.ts +6 -0
  179. package/dist/runtime/composables/usePortal.js +17 -0
  180. package/dist/runtime/index.css +1 -1
  181. package/dist/runtime/inertia/components/Link.vue +146 -0
  182. package/dist/runtime/inertia/components/Link.vue.d.ts +92 -0
  183. package/dist/runtime/inertia/stubs.d.ts +43 -0
  184. package/dist/runtime/inertia/stubs.js +82 -0
  185. package/dist/runtime/locale/bg.d.ts +3 -0
  186. package/dist/runtime/locale/bg.js +54 -0
  187. package/dist/runtime/locale/hy.d.ts +3 -0
  188. package/dist/runtime/locale/hy.js +54 -0
  189. package/dist/runtime/locale/index.d.ts +6 -1
  190. package/dist/runtime/locale/index.js +6 -1
  191. package/dist/runtime/locale/kk.d.ts +3 -0
  192. package/dist/runtime/locale/kk.js +54 -0
  193. package/dist/runtime/locale/tj.d.ts +3 -0
  194. package/dist/runtime/locale/tj.js +54 -0
  195. package/dist/runtime/locale/ug_cn.d.ts +3 -0
  196. package/dist/runtime/locale/ug_cn.js +55 -0
  197. package/dist/runtime/types/form.d.ts +5 -1
  198. package/dist/runtime/types/index.d.ts +2 -0
  199. package/dist/runtime/types/index.js +2 -0
  200. package/dist/runtime/types/utils.d.ts +70 -10
  201. package/dist/runtime/utils/index.d.ts +1 -0
  202. package/dist/runtime/utils/index.js +3 -0
  203. package/dist/runtime/utils/link.d.ts +4 -27
  204. package/dist/runtime/utils/link.js +32 -1
  205. package/dist/runtime/utils/tv.js +2 -2
  206. package/dist/runtime/vue/components/Icon.vue +7 -8
  207. package/dist/runtime/vue/components/Icon.vue.d.ts +14 -0
  208. package/dist/runtime/vue/components/Link.vue +118 -199
  209. package/dist/runtime/vue/components/Link.vue.d.ts +124 -0
  210. package/dist/runtime/vue/stubs.d.ts +5 -0
  211. package/dist/runtime/vue/stubs.js +11 -2
  212. package/dist/shared/{ui.BCaWD5Ek.mjs → ui.D7lOOabO.mjs} +623 -364
  213. package/dist/types.d.mts +5 -1
  214. package/dist/unplugin.d.mts +6 -1
  215. package/dist/unplugin.mjs +25 -4
  216. package/dist/vite.mjs +1 -1
  217. package/package.json +122 -64
  218. package/dist/module.cjs +0 -62
  219. package/dist/module.d.cts +0 -44
  220. package/dist/module.d.ts +0 -44
  221. package/dist/shared/ui.C6uTSFTI.cjs +0 -3555
  222. package/dist/types.d.ts +0 -1
  223. package/dist/unplugin.cjs +0 -232
  224. package/dist/unplugin.d.cts +0 -61
  225. package/dist/unplugin.d.ts +0 -61
  226. package/dist/vite.cjs +0 -23
  227. package/dist/vite.d.cts +0 -15
  228. package/dist/vite.d.ts +0 -15
@@ -0,0 +1,3 @@
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
3
+ export default _default;
@@ -0,0 +1,55 @@
1
+ import { defineLocale } from "../composables/defineLocale.js";
2
+ export default defineLocale({
3
+ name: "\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5",
4
+ code: "ug-CN",
5
+ dir: "rtl",
6
+ messages: {
7
+ inputMenu: {
8
+ noMatch: "\u0645\u0627\u0633 \u0643\u06D0\u0644\u0649\u062F\u0649\u063A\u0627\u0646 \u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
9
+ noData: "\u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
10
+ create: '"{label}" \u0646\u0649 \u0642\u06C7\u0631\u06C7\u0634'
11
+ },
12
+ calendar: {
13
+ prevYear: "\u0626\u0627\u0644\u062F\u0649\u0646\u0642\u0649 \u064A\u0649\u0644",
14
+ nextYear: "\u0643\u06D0\u0644\u06D5\u0631 \u064A\u0649\u0644",
15
+ prevMonth: "\u0626\u0627\u0644\u062F\u0649\u0646\u0642\u0649 \u0626\u0627\u064A",
16
+ nextMonth: "\u0643\u06D0\u0644\u06D5\u0631 \u0626\u0627\u064A"
17
+ },
18
+ inputNumber: {
19
+ increment: "\u0643\u06C6\u067E\u06D5\u064A\u062A\u0649\u0634",
20
+ decrement: "\u0626\u0627\u0632\u0627\u064A\u062A\u0649\u0634"
21
+ },
22
+ commandPalette: {
23
+ placeholder: "\u0628\u06C7\u064A\u0631\u06C7\u0642 \u0643\u0649\u0631\u06AF\u06C8\u0632\u06C8\u06AD \u064A\u0627\u0643\u0649 \u0626\u0649\u0632\u062F\u06D5\u06AD...",
24
+ noMatch: "\u0645\u0627\u0633 \u0643\u06D0\u0644\u0649\u062F\u0649\u063A\u0627\u0646 \u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
25
+ noData: "\u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
26
+ close: "\u062A\u0627\u0642\u0627\u0634"
27
+ },
28
+ selectMenu: {
29
+ noMatch: "\u0645\u0627\u0633 \u0643\u06D0\u0644\u0649\u062F\u0649\u063A\u0627\u0646 \u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
30
+ noData: "\u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
31
+ create: '"{label}" \u0646\u0649 \u0642\u06C7\u0631\u06C7\u0634',
32
+ search: "\u0626\u0649\u0632\u062F\u06D5\u0634..."
33
+ },
34
+ toast: {
35
+ close: "\u062A\u0627\u0642\u0627\u0634"
36
+ },
37
+ carousel: {
38
+ prev: "\u0626\u0627\u0644\u062F\u0649\u0646\u0642\u0649 \u0628\u06D5\u062A",
39
+ next: "\u0643\u06D0\u064A\u0649\u0646\u0643\u0649 \u0628\u06D5\u062A",
40
+ goto: "{slide}-\u0628\u06D5\u062A\u0643\u06D5 \u0626\u0627\u062A\u0644\u0627\u0634"
41
+ },
42
+ modal: {
43
+ close: "\u062A\u0627\u0642\u0627\u0634"
44
+ },
45
+ slideover: {
46
+ close: "\u062A\u0627\u0642\u0627\u0634"
47
+ },
48
+ alert: {
49
+ close: "\u062A\u0627\u0642\u0627\u0634"
50
+ },
51
+ table: {
52
+ noData: "\u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642"
53
+ }
54
+ }
55
+ });
@@ -18,11 +18,14 @@ export interface Form<T extends object> {
18
18
  submit(): Promise<void>;
19
19
  disabled: ComputedRef<boolean>;
20
20
  dirty: ComputedRef<boolean>;
21
+ loading: Ref<boolean>;
21
22
  dirtyFields: DeepReadonly<Set<keyof T>>;
22
23
  touchedFields: DeepReadonly<Set<keyof T>>;
23
24
  blurredFields: DeepReadonly<Set<keyof T>>;
24
25
  }
25
- export type FormSchema<T extends object> = YupObjectSchema<T> | JoiSchema<T> | SuperstructSchema<any, any> | StandardSchemaV1;
26
+ export type FormSchema<I extends object = object, O extends object = I> = YupObjectSchema<I> | JoiSchema<I> | SuperstructSchema<any, any> | StandardSchemaV1<I, O>;
27
+ export type InferInput<Schema> = Schema extends StandardSchemaV1 ? StandardSchemaV1.InferInput<Schema> : Schema extends YupObjectSchema<infer I> ? I : Schema extends JoiSchema<infer I> ? I : Schema extends SuperstructSchema<infer I, any> ? I : Schema extends StandardSchemaV1 ? StandardSchemaV1.InferInput<Schema> : never;
28
+ export type InferOutput<Schema> = Schema extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<Schema> : Schema extends YupObjectSchema<infer O> ? O : Schema extends JoiSchema<infer O> ? O : Schema extends SuperstructSchema<infer O, any> ? O : never;
26
29
  export type FormInputEvents = 'input' | 'blur' | 'change' | 'focus';
27
30
  export interface FormError<P extends string = string> {
28
31
  name?: P;
@@ -68,6 +71,7 @@ export interface FormFieldInjectedOptions<T> {
68
71
  errorPattern?: RegExp;
69
72
  hint?: string;
70
73
  description?: string;
74
+ help?: string;
71
75
  ariaId: string;
72
76
  }
73
77
  export interface ValidateReturnSchema<T> {
@@ -6,10 +6,12 @@ export * from '../components/AvatarGroup.vue';
6
6
  export * from '../components/Badge.vue';
7
7
  export * from '../components/Breadcrumb.vue';
8
8
  export * from '../components/Button.vue';
9
+ export * from '../components/ButtonGroup.vue';
9
10
  export * from '../components/Calendar.vue';
10
11
  export * from '../components/Card.vue';
11
12
  export * from '../components/Carousel.vue';
12
13
  export * from '../components/Checkbox.vue';
14
+ export * from '../components/CheckboxGroup.vue';
13
15
  export * from '../components/Chip.vue';
14
16
  export * from '../components/Collapsible.vue';
15
17
  export * from '../components/ColorPicker.vue';
@@ -6,10 +6,12 @@ export * from "../components/AvatarGroup.vue";
6
6
  export * from "../components/Badge.vue";
7
7
  export * from "../components/Breadcrumb.vue";
8
8
  export * from "../components/Button.vue";
9
+ export * from "../components/ButtonGroup.vue";
9
10
  export * from "../components/Calendar.vue";
10
11
  export * from "../components/Card.vue";
11
12
  export * from "../components/Carousel.vue";
12
13
  export * from "../components/Checkbox.vue";
14
+ export * from "../components/CheckboxGroup.vue";
13
15
  export * from "../components/Chip.vue";
14
16
  export * from "../components/Collapsible.vue";
15
17
  export * from "../components/ColorPicker.vue";
@@ -1,3 +1,5 @@
1
+ import type { AcceptableValue as _AcceptableValue } from 'reka-ui';
2
+ import type { ClassValue } from 'tailwind-variants';
1
3
  import type { VNode } from 'vue';
2
4
  export interface TightMap<O = any> {
3
5
  [key: string]: TightMap | O;
@@ -7,22 +9,80 @@ export type DeepPartial<T, O = any> = {
7
9
  } & {
8
10
  [key: string]: O | TightMap<O>;
9
11
  };
12
+ export type DynamicSlotsKeys<Name extends string | undefined, Suffix extends string | undefined = undefined> = (Name extends string ? Suffix extends string ? Name | `${Name}-${Suffix}` : Name : never);
10
13
  export type DynamicSlots<T extends {
11
14
  slot?: string;
12
- }, SlotProps, Slot = T['slot']> = Record<string, SlotProps> & (Slot extends string ? Record<Slot, SlotProps> : Record<string, never>);
15
+ }, Suffix extends string | undefined = undefined, ExtraProps extends object = {}> = {
16
+ [K in DynamicSlotsKeys<T['slot'], Suffix>]: (props: {
17
+ item: Extract<T, {
18
+ slot: K extends `${infer Base}-${Suffix}` ? Base : K;
19
+ }>;
20
+ } & ExtraProps) => any;
21
+ };
13
22
  export type GetObjectField<MaybeObject, Key extends string> = MaybeObject extends Record<string, any> ? MaybeObject[Key] : never;
14
- export type PartialString<T> = {
15
- [K in keyof T]?: string;
23
+ export type AcceptableValue = Exclude<_AcceptableValue, Record<string, any>>;
24
+ export type ArrayOrNested<T> = T[] | T[][];
25
+ export type NestedItem<T> = T extends Array<infer I> ? NestedItem<I> : T;
26
+ type AllKeys<T> = T extends any ? keyof T : never;
27
+ type NonCommonKeys<T extends object> = Exclude<AllKeys<T>, keyof T>;
28
+ type PickTypeOf<T, K extends string | number | symbol> = K extends AllKeys<T> ? T extends {
29
+ [k in K]?: any;
30
+ } ? T[K] : undefined : never;
31
+ export type MergeTypes<T extends object> = {
32
+ [k in keyof T]: PickTypeOf<T, k>;
33
+ } & {
34
+ [k in NonCommonKeys<T>]?: PickTypeOf<T, k>;
16
35
  };
17
- export type MaybeArrayOfArray<T> = T[] | T[][];
18
- export type MaybeArrayOfArrayItem<I> = I extends Array<infer T> ? T extends Array<infer U> ? U : T : never;
19
- export type SelectModelValue<T, V, M extends boolean = false, DV = T> = (T extends Record<string, any> ? V extends keyof T ? T[V] : DV : T) extends infer U ? M extends true ? U[] : U : never;
20
- export type SelectItemKey<T> = T extends Record<string, any> ? keyof T : string;
21
- export type SelectModelValueEmits<T, V, M extends boolean = false, DV = T> = {
22
- 'update:modelValue': [payload: SelectModelValue<T, V, M, DV>];
36
+ export type GetItemKeys<I> = keyof Extract<NestedItem<I>, object>;
37
+ export type GetItemValue<I, VK extends GetItemKeys<I> | undefined, T extends NestedItem<I> = NestedItem<I>> = T extends object ? VK extends undefined ? T : VK extends keyof T ? T[VK] : never : T;
38
+ export type GetModelValue<T, VK extends GetItemKeys<T> | undefined, M extends boolean> = M extends true ? GetItemValue<T, VK>[] : GetItemValue<T, VK>;
39
+ export type GetModelValueEmits<T, VK extends GetItemKeys<T> | undefined, M extends boolean> = {
40
+ /** Event handler called when the value changes. */
41
+ 'update:modelValue': [payload: GetModelValue<T, VK, M>];
23
42
  };
24
- export type MaybeMultipleModelValue<T, M extends boolean = false> = (T extends infer U ? M extends true ? U[] : U : never);
25
43
  export type StringOrVNode = string | VNode | (() => VNode);
26
44
  export type EmitsToProps<T> = {
27
45
  [K in keyof T as `on${Capitalize<string & K>}`]: T[K] extends [...args: infer Args] ? (...args: Args) => void : never;
28
46
  };
47
+ /**
48
+ * Utility type to flatten intersection types for better IDE hover information.
49
+ * @template T The type to flatten.
50
+ */
51
+ type Id<T> = {} & {
52
+ [P in keyof T]: T[P];
53
+ };
54
+ type ComponentVariants<T extends {
55
+ variants?: Record<string, Record<string, any>>;
56
+ }> = {
57
+ [K in keyof T['variants']]: keyof T['variants'][K];
58
+ };
59
+ type ComponentSlots<T extends {
60
+ slots?: Record<string, any>;
61
+ }> = Id<{
62
+ [K in keyof T['slots']]?: ClassValue;
63
+ }>;
64
+ type GetComponentAppConfig<A, U extends string, K extends string> = A extends Record<U, Record<K, any>> ? A[U][K] : {};
65
+ type ComponentAppConfig<T, A extends Record<string, any>, K extends string, U extends string = 'ui' | 'uiPro' | 'uiPro.prose'> = A & (U extends 'uiPro.prose' ? {
66
+ uiPro?: {
67
+ prose?: {
68
+ [k in K]?: Partial<T>;
69
+ };
70
+ };
71
+ } : {
72
+ [key in Exclude<U, 'uiPro.prose'>]?: {
73
+ [k in K]?: Partial<T>;
74
+ };
75
+ });
76
+ /**
77
+ * Defines the configuration shape expected for a component.
78
+ * @template T The component's theme imported from `#build/ui/*`.
79
+ * @template A The base AppConfig type from `@nuxt/schema`.
80
+ * @template K The key identifying the component (e.g., 'badge').
81
+ * @template U The top-level key in AppConfig ('ui' or 'uiPro').
82
+ */
83
+ export type ComponentConfig<T extends Record<string, any>, A extends Record<string, any>, K extends string, U extends 'ui' | 'uiPro' | 'uiPro.prose' = 'ui'> = {
84
+ AppConfig: ComponentAppConfig<T, A, K, U>;
85
+ variants: ComponentVariants<T & GetComponentAppConfig<A, U, K>>;
86
+ slots: ComponentSlots<T>;
87
+ };
88
+ export {};
@@ -4,3 +4,4 @@ export declare function get(object: Record<string, any> | undefined, path: (stri
4
4
  export declare function set(object: Record<string, any>, path: (string | number)[] | string, value: any): void;
5
5
  export declare function looseToNumber(val: any): any;
6
6
  export declare function compare<T>(value?: T, currentValue?: T, comparator?: string | ((a: T, b: T) => boolean)): boolean;
7
+ export declare function isArrayOfArray<A>(item: A[] | A[][]): item is A[][];
@@ -61,3 +61,6 @@ export function compare(value, currentValue, comparator) {
61
61
  }
62
62
  return isEqual(value, currentValue);
63
63
  }
64
+ export function isArrayOfArray(item) {
65
+ return Array.isArray(item[0]);
66
+ }
@@ -1,29 +1,6 @@
1
1
  import type { LinkProps } from '../types';
2
2
  export declare function pickLinkProps(link: LinkProps & {
3
- ariaLabel?: string;
4
- title?: string;
5
- }): {
6
- replace: any;
7
- type: any;
8
- title: any;
9
- active: any;
10
- activeClass: any;
11
- ariaCurrentValue: any;
12
- ariaLabel: any;
13
- as: any;
14
- disabled: any;
15
- exact: any;
16
- exactActiveClass: any;
17
- exactHash: any;
18
- exactQuery: any;
19
- external: any;
20
- href: any;
21
- inactiveClass: any;
22
- noPrefetch: any;
23
- noRel: any;
24
- prefetch: any;
25
- prefetchedClass: any;
26
- rel: any;
27
- target: any;
28
- to: any;
29
- };
3
+ [key: string]: any;
4
+ }): import("@vueuse/shared").ReactivePickReturn<LinkProps & {
5
+ [key: string]: any;
6
+ }, string>;
@@ -1,4 +1,35 @@
1
1
  import { reactivePick } from "@vueuse/core";
2
2
  export function pickLinkProps(link) {
3
- return reactivePick(link, "active", "activeClass", "ariaCurrentValue", "ariaLabel", "as", "disabled", "exact", "exactActiveClass", "exactHash", "exactQuery", "external", "href", "inactiveClass", "noPrefetch", "noRel", "prefetch", "prefetchedClass", "rel", "replace", "target", "to", "type", "title");
3
+ const keys = Object.keys(link);
4
+ const ariaKeys = keys.filter((key) => key.startsWith("aria-"));
5
+ const dataKeys = keys.filter((key) => key.startsWith("data-"));
6
+ const propsToInclude = [
7
+ "active",
8
+ "activeClass",
9
+ "ariaCurrentValue",
10
+ "as",
11
+ "disabled",
12
+ "exact",
13
+ "exactActiveClass",
14
+ "exactHash",
15
+ "exactQuery",
16
+ "external",
17
+ "href",
18
+ "download",
19
+ "inactiveClass",
20
+ "noPrefetch",
21
+ "noRel",
22
+ "prefetch",
23
+ "prefetchedClass",
24
+ "rel",
25
+ "replace",
26
+ "target",
27
+ "to",
28
+ "type",
29
+ "title",
30
+ "onClick",
31
+ ...ariaKeys,
32
+ ...dataKeys
33
+ ];
34
+ return reactivePick(link, ...propsToInclude);
4
35
  }
@@ -1,4 +1,4 @@
1
1
  import { createTV } from "tailwind-variants";
2
- import _appConfig from "#build/app.config";
3
- const appConfigTv = _appConfig;
2
+ import appConfig from "#build/app.config";
3
+ const appConfigTv = appConfig;
4
4
  export const tv = /* @__PURE__ */ createTV(appConfigTv.ui?.tv);
@@ -1,13 +1,12 @@
1
- <script lang="ts">
2
- export interface IconProps {
3
- name: string
4
- }
5
- </script>
1
+ <script>
6
2
 
7
- <script setup lang="ts">
8
- import { Icon as IconifyIcon } from '@iconify/vue'
3
+ </script>
9
4
 
10
- defineProps<IconProps>()
5
+ <script setup>
6
+ import { Icon as IconifyIcon } from "@iconify/vue";
7
+ defineProps({
8
+ name: { type: String, required: true }
9
+ });
11
10
  </script>
12
11
 
13
12
  <template>
@@ -0,0 +1,14 @@
1
+ export interface IconProps {
2
+ name: string;
3
+ }
4
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<IconProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
5
+ export default _default;
6
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
7
+ type __VLS_TypePropsToOption<T> = {
8
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
9
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
10
+ } : {
11
+ type: import('vue').PropType<T[K]>;
12
+ required: true;
13
+ };
14
+ };