@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
@@ -7,10 +7,11 @@ import { computed } from "vue";
7
7
  import { defu } from "defu";
8
8
  import { useForwardProps } from "reka-ui";
9
9
  import { reactiveOmit } from "@vueuse/core";
10
- import { usePage, Link as InertiaLink } from "@inertiajs/vue3";
10
+ import { usePage } from "@inertiajs/vue3";
11
11
  import { hasProtocol } from "ufo";
12
12
  import { useAppConfig } from "#imports";
13
13
  import { tv } from "../../utils/tv";
14
+ import ULinkBase from "../../components/LinkBase.vue";
14
15
  defineOptions({ inheritAttrs: false });
15
16
  const props = defineProps({
16
17
  as: { type: null, required: false, default: "button" },
@@ -31,7 +32,6 @@ const props = defineProps({
31
32
  data: { type: Object, required: false },
32
33
  method: { type: String, required: false },
33
34
  headers: { type: Object, required: false },
34
- onClick: { type: Function, required: false },
35
35
  preserveScroll: { type: [Boolean, String, Function], required: false },
36
36
  preserveState: { type: [Boolean, String, Function], required: false },
37
37
  replace: { type: Boolean, required: false },
@@ -51,8 +51,9 @@ const props = defineProps({
51
51
  cacheFor: { type: [Number, String, Array], required: false }
52
52
  });
53
53
  defineSlots();
54
+ const page = usePage();
54
55
  const appConfig = useAppConfig();
55
- const routerLinkProps = useForwardProps(reactiveOmit(props, "as", "type", "disabled", "active", "exact", "activeClass", "inactiveClass", "to", "raw", "class"));
56
+ const routerLinkProps = useForwardProps(reactiveOmit(props, "as", "type", "disabled", "active", "exact", "activeClass", "inactiveClass", "to", "href", "raw", "custom", "class"));
56
57
  const ui = computed(() => tv({
57
58
  extend: tv(theme),
58
59
  ...defu({
@@ -64,83 +65,68 @@ const ui = computed(() => tv({
64
65
  }
65
66
  }, appConfig.ui?.link || {})
66
67
  }));
68
+ const href = computed(() => props.to ?? props.href);
67
69
  const isExternal = computed(() => {
68
- if (!props.to) return false;
69
- return typeof props.to === "string" && hasProtocol(props.to, { acceptRelative: true });
70
+ if (props.external) {
71
+ return true;
72
+ }
73
+ if (!href.value) {
74
+ return false;
75
+ }
76
+ return typeof href.value === "string" && hasProtocol(href.value, { acceptRelative: true });
77
+ });
78
+ const isLinkActive = computed(() => {
79
+ if (props.active !== void 0) {
80
+ return props.active;
81
+ }
82
+ if (!href.value) {
83
+ return false;
84
+ }
85
+ if (props.exact && page.url === href.value) {
86
+ return true;
87
+ }
88
+ if (!props.exact && page.url.startsWith(href.value)) {
89
+ return true;
90
+ }
91
+ return false;
70
92
  });
71
93
  const linkClass = computed(() => {
72
- const active = isActive.value;
94
+ const active = isLinkActive.value;
73
95
  if (props.raw) {
74
96
  return [props.class, active ? props.activeClass : props.inactiveClass];
75
97
  }
76
98
  return ui.value({ class: props.class, active, disabled: props.disabled });
77
99
  });
78
- const page = usePage();
79
- const url = computed(() => props.to ?? props.href ?? "#");
80
- const isActive = computed(() => props.active || (props.exact ? url.value === props.href : page?.url.startsWith(url.value)));
81
100
  </script>
82
101
 
83
102
  <template>
84
- <template v-if="!isExternal">
85
- <InertiaLink v-bind="routerLinkProps" :href="url" custom>
86
- <template v-if="custom">
87
- <slot
88
- v-bind="{
89
- ...$attrs,
90
- as,
91
- type,
92
- disabled,
93
- href: url,
94
- active: isActive
95
- }"
96
- />
97
- </template>
98
- <ULinkBase
99
- v-else
100
- v-bind="{
103
+ <template v-if="custom">
104
+ <slot
105
+ v-bind="{
101
106
  ...$attrs,
107
+ ...routerLinkProps,
102
108
  as,
103
109
  type,
104
110
  disabled,
105
- href: url,
106
- active: isActive
111
+ href,
112
+ active: isLinkActive,
113
+ isExternal
107
114
  }"
108
- :class="linkClass"
109
- >
110
- <slot :active="isActive" />
111
- </ULinkBase>
112
- </InertiaLink>
115
+ />
113
116
  </template>
114
-
115
- <template v-else>
116
- <template v-if="custom">
117
- <slot
118
- v-bind="{
117
+ <ULinkBase
118
+ v-else
119
+ v-bind="{
119
120
  ...$attrs,
121
+ ...routerLinkProps,
120
122
  as,
121
123
  type,
122
124
  disabled,
123
- href: to,
124
- target: isExternal ? '_blank' : void 0,
125
- active: isActive
125
+ href,
126
+ isExternal
126
127
  }"
127
- />
128
- </template>
129
- <ULinkBase
130
- v-else
131
- v-bind="{
132
- ...$attrs,
133
- as,
134
- type,
135
- disabled,
136
- href: url,
137
- target: isExternal ? '_blank' : void 0,
138
- active: isActive
139
- }"
140
- :is-external="isExternal"
141
- :class="linkClass"
142
- >
143
- <slot :active="isActive" />
144
- </ULinkBase>
145
- </template>
128
+ :class="linkClass"
129
+ >
130
+ <slot :active="isLinkActive" />
131
+ </ULinkBase>
146
132
  </template>
@@ -1,6 +1,6 @@
1
1
  import type { ButtonHTMLAttributes } from 'vue';
2
2
  import type { InertiaLinkProps } from '@inertiajs/vue3';
3
- interface NuxtLinkProps extends Omit<InertiaLinkProps, 'href'> {
3
+ interface NuxtLinkProps extends Omit<InertiaLinkProps, 'href' | 'onClick'> {
4
4
  activeClass?: string;
5
5
  /**
6
6
  * Route Location the link should navigate to when clicked on.
@@ -48,45 +48,16 @@ export interface LinkSlots {
48
48
  active: boolean;
49
49
  }): any;
50
50
  }
51
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LinkProps>, {
52
- as: string;
53
- type: string;
54
- active: undefined;
55
- activeClass: string;
56
- inactiveClass: string;
57
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LinkProps>, {
58
- as: string;
59
- type: string;
60
- active: undefined;
61
- activeClass: string;
62
- inactiveClass: string;
63
- }>>> & Readonly<{}>, {
51
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
64
52
  type: "reset" | "submit" | "button";
65
53
  as: any;
66
54
  activeClass: string;
67
55
  active: boolean;
68
56
  inactiveClass: string;
69
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<LinkSlots> & LinkSlots>;
57
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
70
58
  export default _default;
71
- type __VLS_WithDefaults<P, D> = {
72
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
73
- default: D[K];
74
- }> : P[K];
75
- };
76
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
77
- type __VLS_TypePropsToOption<T> = {
78
- [K in keyof T]-?: {} extends Pick<T, K> ? {
79
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
80
- } : {
81
- type: import('vue').PropType<T[K]>;
82
- required: true;
83
- };
84
- };
85
- type __VLS_WithTemplateSlots<T, S> = T & {
59
+ type __VLS_WithSlots<T, S> = T & {
86
60
  new (): {
87
61
  $slots: S;
88
62
  };
89
63
  };
90
- type __VLS_PrettifyLocal<T> = {
91
- [K in keyof T]: T[K];
92
- } & {};
@@ -0,0 +1,68 @@
1
+ <script>
2
+
3
+ </script>
4
+
5
+ <script setup>
6
+ import { Primitive } from "reka-ui";
7
+ import { Link as InertiaLink } from "@inertiajs/vue3";
8
+ defineOptions({ inheritAttrs: false });
9
+ const props = defineProps({
10
+ as: { type: String, required: false, default: "button" },
11
+ type: { type: String, required: false, default: "button" },
12
+ disabled: { type: Boolean, required: false },
13
+ onClick: { type: [Function, Array], required: false },
14
+ href: { type: String, required: false },
15
+ target: { type: [String, Object, null], required: false },
16
+ active: { type: Boolean, required: false },
17
+ isExternal: { type: Boolean, required: false }
18
+ });
19
+ function onClickWrapper(e) {
20
+ if (props.disabled) {
21
+ e.stopPropagation();
22
+ e.preventDefault();
23
+ return;
24
+ }
25
+ if (props.onClick) {
26
+ for (const onClick of Array.isArray(props.onClick) ? props.onClick : [props.onClick]) {
27
+ onClick(e);
28
+ }
29
+ }
30
+ }
31
+ </script>
32
+
33
+ <template>
34
+ <InertiaLink
35
+ v-if="!!href && !isExternal && !disabled"
36
+ :href="href"
37
+ v-bind="{
38
+ target: target || (isExternal ? '_blank' : void 0),
39
+ ...$attrs
40
+ }"
41
+ @click="onClickWrapper"
42
+ >
43
+ <slot />
44
+ </InertiaLink>
45
+ <Primitive
46
+ v-else
47
+ v-bind="href ? {
48
+ 'as': 'a',
49
+ 'href': disabled ? void 0 : href,
50
+ 'aria-disabled': disabled ? 'true' : void 0,
51
+ 'role': disabled ? 'link' : void 0,
52
+ 'tabindex': disabled ? -1 : void 0,
53
+ 'target': target || (isExternal ? '_blank' : void 0),
54
+ ...$attrs
55
+ } : as === 'button' ? {
56
+ as,
57
+ type,
58
+ disabled,
59
+ ...$attrs
60
+ } : {
61
+ as,
62
+ ...$attrs
63
+ }"
64
+ @click="onClickWrapper"
65
+ >
66
+ <slot />
67
+ </Primitive>
68
+ </template>
@@ -0,0 +1,25 @@
1
+ import type { LinkProps } from '../../types';
2
+ export interface LinkBaseProps {
3
+ as?: string;
4
+ type?: string;
5
+ disabled?: boolean;
6
+ onClick?: ((e: MouseEvent) => void | Promise<void>) | Array<((e: MouseEvent) => void | Promise<void>)>;
7
+ href?: string;
8
+ target?: LinkProps['target'];
9
+ active?: boolean;
10
+ isExternal?: boolean;
11
+ }
12
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
13
+ type: string;
14
+ as: string;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
16
+ default?: (props: {}) => any;
17
+ } & {
18
+ default?: (props: {}) => any;
19
+ }>;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -1,6 +1,7 @@
1
1
  import type { Ref } from 'vue';
2
2
  import type { NuxtApp } from '#app';
3
3
  export { useHead } from '@unhead/vue';
4
+ export { useAppConfig } from '../vue/composables/useAppConfig';
4
5
  export { defineShortcuts } from '../composables/defineShortcuts';
5
6
  export { defineLocale } from '../composables/defineLocale';
6
7
  export { useLocale } from '../composables/useLocale';
@@ -17,7 +18,6 @@ export declare const useColorMode: () => {
17
18
  readonly value: import("@vueuse/core").BasicColorMode;
18
19
  forced: boolean;
19
20
  };
20
- export declare const useAppConfig: () => any;
21
21
  export declare const useCookie: <T = string>(_name: string, _options?: Record<string, any>) => {
22
22
  value: Ref<T, T>;
23
23
  get: () => T;
@@ -4,6 +4,7 @@ import appConfig from "#build/app.config";
4
4
  import { useColorMode as useColorModeVueUse } from "@vueuse/core";
5
5
  import { usePage } from "@inertiajs/vue3";
6
6
  export { useHead } from "@unhead/vue";
7
+ export { useAppConfig } from "../vue/composables/useAppConfig.js";
7
8
  export { defineShortcuts } from "../composables/defineShortcuts.js";
8
9
  export { defineLocale } from "../composables/defineLocale.js";
9
10
  export { useLocale } from "../composables/useLocale.js";
@@ -35,7 +36,6 @@ export const useColorMode = () => {
35
36
  forced: false
36
37
  };
37
38
  };
38
- export const useAppConfig = () => appConfig;
39
39
  export const useCookie = (_name, _options = {}) => {
40
40
  const value = ref(null);
41
41
  return {
@@ -32,6 +32,7 @@ export { default as pt_br } from './pt_br';
32
32
  export { default as ro } from './ro';
33
33
  export { default as ru } from './ru';
34
34
  export { default as sk } from './sk';
35
+ export { default as sl } from './sl';
35
36
  export { default as sv } from './sv';
36
37
  export { default as th } from './th';
37
38
  export { default as tj } from './tj';
@@ -32,6 +32,7 @@ export { default as pt_br } from "./pt_br.js";
32
32
  export { default as ro } from "./ro.js";
33
33
  export { default as ru } from "./ru.js";
34
34
  export { default as sk } from "./sk.js";
35
+ export { default as sl } from "./sl.js";
35
36
  export { default as sv } from "./sv.js";
36
37
  export { default as th } from "./th.js";
37
38
  export { default as tj } from "./tj.js";
@@ -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,54 @@
1
+ import { defineLocale } from "../composables/defineLocale.js";
2
+ export default defineLocale({
3
+ name: "Sloven\u0161\u010Dina",
4
+ code: "sl",
5
+ messages: {
6
+ inputMenu: {
7
+ noMatch: "Ni ujemanj",
8
+ noData: "Ni podatkov",
9
+ create: 'Ustvari "{label}"'
10
+ },
11
+ calendar: {
12
+ prevYear: "Prej\u0161nje leto",
13
+ nextYear: "Naslednje leto",
14
+ prevMonth: "Prej\u0161nji mesec",
15
+ nextMonth: "Naslednji mesec"
16
+ },
17
+ inputNumber: {
18
+ increment: "Povi\u0161aj",
19
+ decrement: "Zmanj\u0161aj"
20
+ },
21
+ commandPalette: {
22
+ placeholder: "Vpi\u0161i ukaz ali i\u0161\u010Di...",
23
+ noMatch: "Ni ujemanj",
24
+ noData: "Ni podatkov",
25
+ close: "Zapri"
26
+ },
27
+ selectMenu: {
28
+ noMatch: "Ni ujemanj",
29
+ noData: "Ni podatkov",
30
+ create: 'Ustvari "{label}"',
31
+ search: "I\u0161\u010Di..."
32
+ },
33
+ toast: {
34
+ close: "Zapri"
35
+ },
36
+ carousel: {
37
+ prev: "Nazaj",
38
+ next: "Naprej",
39
+ goto: "Pojdi na {slide}"
40
+ },
41
+ modal: {
42
+ close: "Zapri"
43
+ },
44
+ slideover: {
45
+ close: "Zapri"
46
+ },
47
+ alert: {
48
+ close: "Zapri"
49
+ },
50
+ table: {
51
+ noData: "Ni podatkov"
52
+ }
53
+ }
54
+ });
@@ -0,0 +1,53 @@
1
+ import type { ClassValue, TVVariants, TVCompoundVariants, TVDefaultVariants } from 'tailwind-variants';
2
+ /**
3
+ * Defines the AppConfig object based on the tailwind-variants configuration.
4
+ */
5
+ export type TVConfig<T extends Record<string, any>> = {
6
+ [P in keyof T]?: {
7
+ [K in keyof T[P] as K extends 'base' | 'slots' | 'variants' | 'compoundVariants' | 'defaultVariants' ? K : never]?: K extends 'base' ? ClassValue : K extends 'slots' ? {
8
+ [S in keyof T[P]['slots']]?: ClassValue;
9
+ } : K extends 'variants' ? TVVariants<T[P]['slots'], ClassValue, T[P]['variants']> : K extends 'compoundVariants' ? TVCompoundVariants<T[P]['variants'], T[P]['slots'], ClassValue, object, undefined> : K extends 'defaultVariants' ? TVDefaultVariants<T[P]['variants'], T[P]['slots'], object, undefined> : never;
10
+ };
11
+ };
12
+ /**
13
+ * Utility type to flatten intersection types for better IDE hover information.
14
+ * @template T The type to flatten.
15
+ */
16
+ type Id<T> = {} & {
17
+ [P in keyof T]: T[P];
18
+ };
19
+ type ComponentVariants<T extends {
20
+ variants?: Record<string, Record<string, any>>;
21
+ }> = {
22
+ [K in keyof T['variants']]: keyof T['variants'][K];
23
+ };
24
+ type ComponentSlots<T extends {
25
+ slots?: Record<string, any>;
26
+ }> = Id<{
27
+ [K in keyof T['slots']]?: ClassValue;
28
+ }>;
29
+ type GetComponentAppConfig<A, U extends string, K extends string> = A extends Record<U, Record<K, any>> ? A[U][K] : {};
30
+ type ComponentAppConfig<T, A extends Record<string, any>, K extends string, U extends string = 'ui' | 'uiPro' | 'uiPro.prose'> = A & (U extends 'uiPro.prose' ? {
31
+ uiPro?: {
32
+ prose?: {
33
+ [k in K]?: Partial<T>;
34
+ };
35
+ };
36
+ } : {
37
+ [key in Exclude<U, 'uiPro.prose'>]?: {
38
+ [k in K]?: Partial<T>;
39
+ };
40
+ });
41
+ /**
42
+ * Defines the configuration shape expected for a component.
43
+ * @template T The component's theme imported from `#build/ui/*`.
44
+ * @template A The base AppConfig type from `@nuxt/schema`.
45
+ * @template K The key identifying the component (e.g., 'badge').
46
+ * @template U The top-level key in AppConfig ('ui' or 'uiPro').
47
+ */
48
+ export type ComponentConfig<T extends Record<string, any>, A extends Record<string, any>, K extends string, U extends 'ui' | 'uiPro' | 'uiPro.prose' = 'ui'> = {
49
+ AppConfig: ComponentAppConfig<T, A, K, U>;
50
+ variants: ComponentVariants<T & GetComponentAppConfig<A, U, K>>;
51
+ slots: ComponentSlots<T>;
52
+ };
53
+ export {};
File without changes
@@ -1,14 +1,5 @@
1
- import type { AcceptableValue as _AcceptableValue } from 'reka-ui';
2
- import type { ClassValue } from 'tailwind-variants';
3
1
  import type { VNode } from 'vue';
4
- export interface TightMap<O = any> {
5
- [key: string]: TightMap | O;
6
- }
7
- export type DeepPartial<T, O = any> = {
8
- [P in keyof T]?: T[P] extends Array<string> ? string : T[P] extends object ? DeepPartial<T[P], O> : T[P];
9
- } & {
10
- [key: string]: O | TightMap<O>;
11
- };
2
+ import type { AcceptableValue as _AcceptableValue } from 'reka-ui';
12
3
  export type DynamicSlotsKeys<Name extends string | undefined, Suffix extends string | undefined = undefined> = (Name extends string ? Suffix extends string ? Name | `${Name}-${Suffix}` : Name : never);
13
4
  export type DynamicSlots<T extends {
14
5
  slot?: string;
@@ -44,45 +35,4 @@ export type StringOrVNode = string | VNode | (() => VNode);
44
35
  export type EmitsToProps<T> = {
45
36
  [K in keyof T as `on${Capitalize<string & K>}`]: T[K] extends [...args: infer Args] ? (...args: Args) => void : never;
46
37
  };
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 {};
38
+ export * from './tv';
@@ -0,0 +1 @@
1
+ export * from "./tv.js";
@@ -4,3 +4,4 @@ export declare function pickLinkProps(link: LinkProps & {
4
4
  }): import("@vueuse/shared").ReactivePickReturn<LinkProps & {
5
5
  [key: string]: any;
6
6
  }, string>;
7
+ export declare function isPartiallyEqual(item1: any, item2: any): boolean;
@@ -1,4 +1,5 @@
1
1
  import { reactivePick } from "@vueuse/core";
2
+ import { isEqual, diff } from "ohash/utils";
2
3
  export function pickLinkProps(link) {
3
4
  const keys = Object.keys(link);
4
5
  const ariaKeys = keys.filter((key) => key.startsWith("aria-"));
@@ -33,3 +34,14 @@ export function pickLinkProps(link) {
33
34
  ];
34
35
  return reactivePick(link, ...propsToInclude);
35
36
  }
37
+ export function isPartiallyEqual(item1, item2) {
38
+ const diffedKeys = diff(item1, item2).reduce((filtered, q) => {
39
+ if (q.type === "added") {
40
+ filtered.add(q.key);
41
+ }
42
+ return filtered;
43
+ }, /* @__PURE__ */ new Set());
44
+ const item1Filtered = Object.fromEntries(Object.entries(item1).filter(([key]) => !diffedKeys.has(key)));
45
+ const item2Filtered = Object.fromEntries(Object.entries(item2).filter(([key]) => !diffedKeys.has(key)));
46
+ return isEqual(item1Filtered, item2Filtered);
47
+ }
@@ -1,14 +1,5 @@
1
1
  export interface IconProps {
2
2
  name: string;
3
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>;
4
+ declare const _default: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
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
- };