@nuxt/ui 3.3.4 → 3.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/.nuxt/ui/drawer.ts +23 -0
  2. package/.nuxt/ui/progress.ts +3 -3
  3. package/README.md +10 -10
  4. package/dist/module.d.mts +6 -6
  5. package/dist/module.json +2 -2
  6. package/dist/module.mjs +3 -3
  7. package/dist/runtime/components/Accordion.d.vue.ts +78 -0
  8. package/dist/runtime/components/Accordion.vue.d.ts +6 -5
  9. package/dist/runtime/components/Alert.d.vue.ts +82 -0
  10. package/dist/runtime/components/Alert.vue.d.ts +2 -1
  11. package/dist/runtime/components/App.d.vue.ts +25 -0
  12. package/dist/runtime/components/App.vue +1 -1
  13. package/dist/runtime/components/App.vue.d.ts +5 -4
  14. package/dist/runtime/components/Avatar.d.vue.ts +42 -0
  15. package/dist/runtime/components/Avatar.vue.d.ts +2 -1
  16. package/dist/runtime/components/AvatarGroup.d.vue.ts +32 -0
  17. package/dist/runtime/components/AvatarGroup.vue.d.ts +2 -1
  18. package/dist/runtime/components/Badge.d.vue.ts +44 -0
  19. package/dist/runtime/components/Badge.vue.d.ts +2 -1
  20. package/dist/runtime/components/Breadcrumb.d.vue.ts +67 -0
  21. package/dist/runtime/components/Breadcrumb.vue.d.ts +4 -3
  22. package/dist/runtime/components/Button.d.vue.ts +45 -0
  23. package/dist/runtime/components/Button.vue.d.ts +2 -1
  24. package/dist/runtime/components/ButtonGroup.d.vue.ts +35 -0
  25. package/dist/runtime/components/ButtonGroup.vue.d.ts +2 -1
  26. package/dist/runtime/components/Calendar.d.vue.ts +113 -0
  27. package/dist/runtime/components/Calendar.vue.d.ts +9 -8
  28. package/dist/runtime/components/Card.d.vue.ts +30 -0
  29. package/dist/runtime/components/Card.vue.d.ts +2 -1
  30. package/dist/runtime/components/Carousel.d.vue.ts +128 -0
  31. package/dist/runtime/components/Carousel.vue +32 -12
  32. package/dist/runtime/components/Carousel.vue.d.ts +7 -6
  33. package/dist/runtime/components/Checkbox.d.vue.ts +74 -0
  34. package/dist/runtime/components/Checkbox.vue.d.ts +2 -1
  35. package/dist/runtime/components/CheckboxGroup.d.vue.ts +85 -0
  36. package/dist/runtime/components/CheckboxGroup.vue.d.ts +7 -6
  37. package/dist/runtime/components/Chip.d.vue.ts +58 -0
  38. package/dist/runtime/components/Chip.vue.d.ts +2 -1
  39. package/dist/runtime/components/Collapsible.d.vue.ts +36 -0
  40. package/dist/runtime/components/Collapsible.vue.d.ts +2 -1
  41. package/dist/runtime/components/ColorPicker.d.vue.ts +49 -0
  42. package/dist/runtime/components/ColorPicker.vue.d.ts +2 -1
  43. package/dist/runtime/components/CommandPalette.d.vue.ts +193 -0
  44. package/dist/runtime/components/CommandPalette.vue.d.ts +13 -12
  45. package/dist/runtime/components/Container.d.vue.ts +19 -0
  46. package/dist/runtime/components/Container.vue.d.ts +2 -1
  47. package/dist/runtime/components/ContextMenu.d.vue.ts +110 -0
  48. package/dist/runtime/components/ContextMenu.vue.d.ts +6 -5
  49. package/dist/runtime/components/ContextMenuContent.d.vue.ts +50 -0
  50. package/dist/runtime/components/ContextMenuContent.vue.d.ts +10 -9
  51. package/dist/runtime/components/Drawer.d.vue.ts +87 -0
  52. package/dist/runtime/components/Drawer.vue +19 -5
  53. package/dist/runtime/components/Drawer.vue.d.ts +5 -1
  54. package/dist/runtime/components/DropdownMenu.d.vue.ts +120 -0
  55. package/dist/runtime/components/DropdownMenu.vue.d.ts +6 -5
  56. package/dist/runtime/components/DropdownMenuContent.d.vue.ts +56 -0
  57. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +10 -9
  58. package/dist/runtime/components/FileUpload.d.vue.ts +167 -0
  59. package/dist/runtime/components/FileUpload.vue.d.ts +9 -8
  60. package/dist/runtime/components/Form.d.vue.ts +72 -0
  61. package/dist/runtime/components/Form.vue.d.ts +7 -6
  62. package/dist/runtime/components/FormField.d.vue.ts +62 -0
  63. package/dist/runtime/components/FormField.vue.d.ts +2 -1
  64. package/dist/runtime/components/Icon.d.vue.ts +9 -0
  65. package/dist/runtime/components/Icon.vue.d.ts +2 -1
  66. package/dist/runtime/components/Input.d.vue.ts +78 -0
  67. package/dist/runtime/components/Input.vue.d.ts +9 -8
  68. package/dist/runtime/components/InputMenu.d.vue.ts +330 -0
  69. package/dist/runtime/components/InputMenu.vue +1 -1
  70. package/dist/runtime/components/InputMenu.vue.d.ts +19 -24
  71. package/dist/runtime/components/InputNumber.d.vue.ts +187 -0
  72. package/dist/runtime/components/InputNumber.vue.d.ts +2 -1
  73. package/dist/runtime/components/InputTags.d.vue.ts +186 -0
  74. package/dist/runtime/components/InputTags.vue +2 -2
  75. package/dist/runtime/components/InputTags.vue.d.ts +13 -12
  76. package/dist/runtime/components/Kbd.d.vue.ts +39 -0
  77. package/dist/runtime/components/Kbd.vue.d.ts +2 -1
  78. package/dist/runtime/components/Link.d.vue.ts +92 -0
  79. package/dist/runtime/components/Link.vue.d.ts +2 -1
  80. package/dist/runtime/components/LinkBase.d.vue.ts +26 -0
  81. package/dist/runtime/components/LinkBase.vue.d.ts +2 -1
  82. package/dist/runtime/components/Modal.d.vue.ts +107 -0
  83. package/dist/runtime/components/Modal.vue.d.ts +4 -3
  84. package/dist/runtime/components/NavigationMenu.d.vue.ts +171 -0
  85. package/dist/runtime/components/NavigationMenu.vue.d.ts +6 -5
  86. package/dist/runtime/components/OverlayProvider.d.vue.ts +3 -0
  87. package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -1
  88. package/dist/runtime/components/Pagination.d.vue.ts +119 -0
  89. package/dist/runtime/components/Pagination.vue +4 -4
  90. package/dist/runtime/components/Pagination.vue.d.ts +2 -1
  91. package/dist/runtime/components/PinInput.d.vue.ts +61 -0
  92. package/dist/runtime/components/PinInput.vue.d.ts +10 -9
  93. package/dist/runtime/components/Popover.d.vue.ts +71 -0
  94. package/dist/runtime/components/Popover.vue.d.ts +2 -1
  95. package/dist/runtime/components/Progress.d.vue.ts +67 -0
  96. package/dist/runtime/components/Progress.vue +2 -3
  97. package/dist/runtime/components/Progress.vue.d.ts +2 -1
  98. package/dist/runtime/components/RadioGroup.d.vue.ts +95 -0
  99. package/dist/runtime/components/RadioGroup.vue.d.ts +7 -6
  100. package/dist/runtime/components/Select.d.vue.ts +254 -0
  101. package/dist/runtime/components/Select.vue.d.ts +11 -10
  102. package/dist/runtime/components/SelectMenu.d.vue.ts +303 -0
  103. package/dist/runtime/components/SelectMenu.vue.d.ts +16 -15
  104. package/dist/runtime/components/Separator.d.vue.ts +55 -0
  105. package/dist/runtime/components/Separator.vue.d.ts +2 -1
  106. package/dist/runtime/components/Skeleton.d.vue.ts +18 -0
  107. package/dist/runtime/components/Skeleton.vue.d.ts +2 -1
  108. package/dist/runtime/components/Slideover.d.vue.ts +108 -0
  109. package/dist/runtime/components/Slideover.vue.d.ts +4 -3
  110. package/dist/runtime/components/Slider.d.vue.ts +58 -0
  111. package/dist/runtime/components/Slider.vue.d.ts +8 -7
  112. package/dist/runtime/components/Stepper.d.vue.ts +86 -0
  113. package/dist/runtime/components/Stepper.vue.d.ts +10 -9
  114. package/dist/runtime/components/Switch.d.vue.ts +71 -0
  115. package/dist/runtime/components/Switch.vue.d.ts +2 -1
  116. package/dist/runtime/components/Table.d.vue.ts +202 -0
  117. package/dist/runtime/components/Table.vue +19 -1
  118. package/dist/runtime/components/Table.vue.d.ts +20 -19
  119. package/dist/runtime/components/Tabs.d.vue.ts +99 -0
  120. package/dist/runtime/components/Tabs.vue +2 -2
  121. package/dist/runtime/components/Tabs.vue.d.ts +7 -6
  122. package/dist/runtime/components/Textarea.d.vue.ts +80 -0
  123. package/dist/runtime/components/Textarea.vue.d.ts +9 -8
  124. package/dist/runtime/components/Timeline.d.vue.ts +71 -0
  125. package/dist/runtime/components/Timeline.vue.d.ts +7 -6
  126. package/dist/runtime/components/Toast.d.vue.ts +165 -0
  127. package/dist/runtime/components/Toast.vue.d.ts +2 -1
  128. package/dist/runtime/components/Toaster.d.vue.ts +45 -0
  129. package/dist/runtime/components/Toaster.vue.d.ts +2 -1
  130. package/dist/runtime/components/Tooltip.d.vue.ts +57 -0
  131. package/dist/runtime/components/Tooltip.vue.d.ts +2 -1
  132. package/dist/runtime/components/Tree.d.vue.ts +115 -0
  133. package/dist/runtime/components/Tree.vue.d.ts +7 -6
  134. package/dist/runtime/composables/useKbd.js +1 -1
  135. package/dist/runtime/composables/usePortal.d.ts +3 -3
  136. package/dist/runtime/composables/usePortal.js +5 -10
  137. package/dist/runtime/inertia/components/Link.d.vue.ts +64 -0
  138. package/dist/runtime/inertia/components/Link.vue.d.ts +2 -1
  139. package/dist/runtime/inertia/components/LinkBase.d.vue.ts +26 -0
  140. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +2 -1
  141. package/dist/runtime/types/tv.d.ts +9 -2
  142. package/dist/runtime/vue/components/Icon.d.vue.ts +6 -0
  143. package/dist/runtime/vue/components/Icon.vue.d.ts +2 -1
  144. package/dist/runtime/vue/components/Link.d.vue.ts +94 -0
  145. package/dist/runtime/vue/components/Link.vue.d.ts +2 -1
  146. package/dist/shared/{ui.BTUFJHYJ.mjs → ui.DBpKc5X3.mjs} +100 -68
  147. package/dist/unplugin.mjs +1 -1
  148. package/dist/vite.mjs +1 -1
  149. package/package.json +18 -18
@@ -0,0 +1,115 @@
1
+ import type { TreeRootProps, TreeRootEmits } from 'reka-ui';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/ui/tree';
4
+ import type { DynamicSlots, GetItemKeys, GetModelValue, GetModelValueEmits, NestedItem, ComponentConfig } from '../types/utils';
5
+ type Tree = ComponentConfig<typeof theme, AppConfig, 'tree'>;
6
+ export type TreeItem = {
7
+ /**
8
+ * @IconifyIcon
9
+ */
10
+ icon?: string;
11
+ label?: string;
12
+ /**
13
+ * @IconifyIcon
14
+ */
15
+ trailingIcon?: string;
16
+ defaultExpanded?: boolean;
17
+ disabled?: boolean;
18
+ value?: string;
19
+ slot?: string;
20
+ children?: TreeItem[];
21
+ onToggle?(e: Event): void;
22
+ onSelect?(e?: Event): void;
23
+ class?: any;
24
+ ui?: Pick<Tree['slots'], 'item' | 'itemWithChildren' | 'link' | 'linkLeadingIcon' | 'linkLabel' | 'linkTrailing' | 'linkTrailingIcon' | 'listWithChildren'>;
25
+ [key: string]: any;
26
+ };
27
+ export interface TreeProps<T extends TreeItem[] = TreeItem[], VK extends GetItemKeys<T> = 'value', M extends boolean = false> extends Pick<TreeRootProps<T>, 'expanded' | 'defaultExpanded' | 'selectionBehavior' | 'propagateSelect' | 'disabled' | 'bubbleSelect'> {
28
+ /**
29
+ * The element or component this component should render as.
30
+ * @defaultValue 'ul'
31
+ */
32
+ as?: any;
33
+ /**
34
+ * @defaultValue 'primary'
35
+ */
36
+ color?: Tree['variants']['color'];
37
+ /**
38
+ * @defaultValue 'md'
39
+ */
40
+ size?: Tree['variants']['size'];
41
+ /**
42
+ * The key used to get the value from the item.
43
+ * @defaultValue 'value'
44
+ */
45
+ valueKey?: VK;
46
+ /**
47
+ * The key used to get the label from the item.
48
+ * @defaultValue 'label'
49
+ */
50
+ labelKey?: keyof NestedItem<T>;
51
+ /**
52
+ * The icon displayed on the right side of a parent node.
53
+ * @defaultValue appConfig.ui.icons.chevronDown
54
+ * @IconifyIcon
55
+ */
56
+ trailingIcon?: string;
57
+ /**
58
+ * The icon displayed when a parent node is expanded.
59
+ * @defaultValue appConfig.ui.icons.folderOpen
60
+ * @IconifyIcon
61
+ */
62
+ expandedIcon?: string;
63
+ /**
64
+ * The icon displayed when a parent node is collapsed.
65
+ * @defaultValue appConfig.ui.icons.folder
66
+ * @IconifyIcon
67
+ */
68
+ collapsedIcon?: string;
69
+ items?: T;
70
+ /** The controlled value of the Tree. Can be bind as `v-model`. */
71
+ modelValue?: GetModelValue<T, VK, M>;
72
+ /** The value of the Tree when initially rendered. Use when you do not need to control the state of the Tree. */
73
+ defaultValue?: GetModelValue<T, VK, M>;
74
+ /** Whether multiple options can be selected or not. */
75
+ multiple?: M & boolean;
76
+ class?: any;
77
+ ui?: Tree['slots'];
78
+ }
79
+ export type TreeEmits<A extends TreeItem[], VK extends GetItemKeys<A> | undefined, M extends boolean> = Omit<TreeRootEmits, 'update:modelValue'> & GetModelValueEmits<A, VK, M>;
80
+ type SlotProps<T extends TreeItem> = (props: {
81
+ item: T;
82
+ index: number;
83
+ level: number;
84
+ expanded: boolean;
85
+ selected: boolean;
86
+ }) => any;
87
+ export type TreeSlots<A extends TreeItem[] = TreeItem[], T extends NestedItem<A> = NestedItem<A>> = {
88
+ 'item-wrapper': SlotProps<T>;
89
+ 'item': SlotProps<T>;
90
+ 'item-leading': SlotProps<T>;
91
+ 'item-label': SlotProps<T>;
92
+ 'item-trailing': SlotProps<T>;
93
+ } & DynamicSlots<T, undefined, {
94
+ index: number;
95
+ level: number;
96
+ expanded: boolean;
97
+ selected: boolean;
98
+ }>;
99
+ declare const __VLS_export: <T extends TreeItem[], VK extends GetItemKeys<T> = "value", M extends boolean = false>(__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<{
100
+ props: __VLS_PrettifyLocal<TreeProps<T, VK, M> & {
101
+ "onUpdate:modelValue"?: ((value: GetModelValue<T, VK, M>) => any) | undefined;
102
+ "onUpdate:expanded"?: ((val: string[]) => any) | undefined;
103
+ }> & import("vue").PublicProps;
104
+ expose: (exposed: {}) => void;
105
+ attrs: any;
106
+ slots: TreeSlots<T, NestedItem<T>>;
107
+ emit: ((evt: "update:modelValue", value: GetModelValue<T, VK, M>) => void) & ((evt: "update:expanded", val: string[]) => void);
108
+ }>) => import("vue").VNode & {
109
+ __ctx?: Awaited<typeof __VLS_setup>;
110
+ };
111
+ declare const _default: typeof __VLS_export;
112
+ export default _default;
113
+ type __VLS_PrettifyLocal<T> = {
114
+ [K in keyof T as K]: T[K];
115
+ } & {};
@@ -96,18 +96,19 @@ export type TreeSlots<A extends TreeItem[] = TreeItem[], T extends NestedItem<A>
96
96
  expanded: boolean;
97
97
  selected: boolean;
98
98
  }>;
99
- declare const _default: <T extends TreeItem[], VK extends GetItemKeys<T> = "value", M extends boolean = false>(__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<{
100
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
101
- readonly "onUpdate:modelValue"?: ((value: GetModelValue<T, VK, M>) => any) | undefined;
102
- readonly "onUpdate:expanded"?: ((val: string[]) => any) | undefined;
103
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:expanded"> & TreeProps<T, VK, M> & {}> & import("vue").PublicProps;
104
- expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
99
+ declare const __VLS_export: <T extends TreeItem[], VK extends GetItemKeys<T> = "value", M extends boolean = false>(__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<{
100
+ props: __VLS_PrettifyLocal<TreeProps<T, VK, M> & {
101
+ "onUpdate:modelValue"?: ((value: GetModelValue<T, VK, M>) => any) | undefined;
102
+ "onUpdate:expanded"?: ((val: string[]) => any) | undefined;
103
+ }> & import("vue").PublicProps;
104
+ expose: (exposed: {}) => void;
105
105
  attrs: any;
106
106
  slots: TreeSlots<T, NestedItem<T>>;
107
107
  emit: ((evt: "update:modelValue", value: GetModelValue<T, VK, M>) => void) & ((evt: "update:expanded", val: string[]) => void);
108
108
  }>) => import("vue").VNode & {
109
109
  __ctx?: Awaited<typeof __VLS_setup>;
110
110
  };
111
+ declare const _default: typeof __VLS_export;
111
112
  export default _default;
112
113
  type __VLS_PrettifyLocal<T> = {
113
114
  [K in keyof T as K]: T[K];
@@ -12,7 +12,7 @@ export const kbdKeysMap = {
12
12
  enter: "\u21B5",
13
13
  delete: "\u2326",
14
14
  backspace: "\u232B",
15
- escape: "\u238B",
15
+ escape: "Esc",
16
16
  tab: "\u21E5",
17
17
  capslock: "\u21EA",
18
18
  arrowup: "\u2191",
@@ -1,6 +1,6 @@
1
1
  import type { Ref, InjectionKey } from 'vue';
2
- export declare const portalTargetInjectionKey: InjectionKey<Ref<string | HTMLElement>>;
3
- export declare function usePortal(portal: Ref<string | HTMLElement | boolean | undefined>): import("vue").ComputedRef<{
4
- to: string | HTMLElement;
2
+ export declare const portalTargetInjectionKey: InjectionKey<Ref<boolean | string | HTMLElement>>;
3
+ export declare function usePortal(portal: Ref<boolean | string | HTMLElement | undefined>): import("vue").ComputedRef<{
4
+ to: string | HTMLElement | undefined;
5
5
  disabled: boolean;
6
6
  }>;
@@ -1,15 +1,10 @@
1
- import { inject, provide, computed } from "vue";
1
+ import { inject, computed } from "vue";
2
2
  export const portalTargetInjectionKey = Symbol("nuxt-ui.portal-target");
3
3
  export function usePortal(portal) {
4
- const portalTarget = inject(portalTargetInjectionKey, void 0);
5
- const to = computed(() => {
6
- if (typeof portal.value === "boolean" || portal.value === void 0) {
7
- return portalTarget?.value ?? "body";
8
- }
9
- return portal.value;
10
- });
11
- const disabled = computed(() => typeof portal.value === "boolean" ? !portal.value : false);
12
- provide(portalTargetInjectionKey, computed(() => to.value));
4
+ const globalPortal = inject(portalTargetInjectionKey, void 0);
5
+ const value = computed(() => portal.value === true ? globalPortal?.value : portal.value);
6
+ const disabled = computed(() => typeof value.value === "boolean" ? !value.value : false);
7
+ const to = computed(() => typeof value.value === "boolean" ? "body" : value.value);
13
8
  return computed(() => ({
14
9
  to: to.value,
15
10
  disabled: disabled.value
@@ -0,0 +1,64 @@
1
+ import type { ButtonHTMLAttributes } from 'vue';
2
+ import type { InertiaLinkProps } from '@inertiajs/vue3';
3
+ interface NuxtLinkProps extends Omit<InertiaLinkProps, 'href' | 'onClick'> {
4
+ activeClass?: string;
5
+ /**
6
+ * Route Location the link should navigate to when clicked on.
7
+ */
8
+ to?: string;
9
+ /**
10
+ * An alias for `to`. If used with `to`, `href` will be ignored
11
+ */
12
+ href?: NuxtLinkProps['to'];
13
+ /**
14
+ * Forces the link to be considered as external (true) or internal (false). This is helpful to handle edge-cases
15
+ */
16
+ external?: boolean;
17
+ /**
18
+ * Where to display the linked URL, as the name for a browsing context.
19
+ */
20
+ target?: '_blank' | '_parent' | '_self' | '_top' | (string & {}) | null;
21
+ ariaCurrentValue?: string;
22
+ }
23
+ export interface LinkProps extends NuxtLinkProps {
24
+ /**
25
+ * The element or component this component should render as when not a link.
26
+ * @defaultValue 'button'
27
+ */
28
+ as?: any;
29
+ /**
30
+ * The type of the button when not a link.
31
+ * @defaultValue 'button'
32
+ */
33
+ type?: ButtonHTMLAttributes['type'];
34
+ disabled?: boolean;
35
+ /** Force the link to be active independent of the current route. */
36
+ active?: boolean;
37
+ /** Will only be active if the current route is an exact match. */
38
+ exact?: boolean;
39
+ /** The class to apply when the link is inactive. */
40
+ inactiveClass?: string;
41
+ custom?: boolean;
42
+ /** When `true`, only styles from `class`, `activeClass`, and `inactiveClass` will be applied. */
43
+ raw?: boolean;
44
+ class?: any;
45
+ }
46
+ export interface LinkSlots {
47
+ default(props: {
48
+ active: boolean;
49
+ }): any;
50
+ }
51
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
52
+ type: "reset" | "submit" | "button";
53
+ as: any;
54
+ activeClass: string;
55
+ active: boolean;
56
+ inactiveClass: string;
57
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
58
+ declare const _default: typeof __VLS_export;
59
+ export default _default;
60
+ type __VLS_WithSlots<T, S> = T & {
61
+ new (): {
62
+ $slots: S;
63
+ };
64
+ };
@@ -48,13 +48,14 @@ export interface LinkSlots {
48
48
  active: boolean;
49
49
  }): any;
50
50
  }
51
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
51
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
52
52
  type: "reset" | "submit" | "button";
53
53
  as: any;
54
54
  activeClass: string;
55
55
  active: boolean;
56
56
  inactiveClass: string;
57
57
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
58
+ declare const _default: typeof __VLS_export;
58
59
  export default _default;
59
60
  type __VLS_WithSlots<T, S> = T & {
60
61
  new (): {
@@ -0,0 +1,26 @@
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 __VLS_export: __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
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -9,7 +9,7 @@ export interface LinkBaseProps {
9
9
  active?: boolean;
10
10
  isExternal?: boolean;
11
11
  }
12
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
12
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
13
13
  type: string;
14
14
  as: string;
15
15
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -17,6 +17,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkBasePr
17
17
  } & {
18
18
  default?: (props: {}) => any;
19
19
  }>;
20
+ declare const _default: typeof __VLS_export;
20
21
  export default _default;
21
22
  type __VLS_WithSlots<T, S> = T & {
22
23
  new (): {
@@ -4,11 +4,18 @@ import type { ClassValue, TVVariants, TVCompoundVariants, TVDefaultVariants } fr
4
4
  */
5
5
  export type TVConfig<T extends Record<string, any>> = {
6
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' ? {
7
+ [K in keyof T[P] as K extends 'base' | 'slots' | 'variants' | 'defaultVariants' ? K : never]?: K extends 'base' ? ClassValue : K extends 'slots' ? {
8
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;
9
+ } : K extends 'variants' ? TVVariants<T[P]['slots'], ClassValue, WidenVariantsValues<T[P]['variants']>> : K extends 'defaultVariants' ? TVDefaultVariants<WidenVariantsValues<T[P]['variants']>, T[P]['slots'], object, undefined> : never;
10
+ };
11
+ } & {
12
+ [P in keyof T]?: {
13
+ compoundVariants?: TVCompoundVariants<WidenVariantsValues<T[P]['variants']>, T[P]['slots'], ClassValue, object, undefined>;
10
14
  };
11
15
  };
16
+ type WidenVariantsValues<V extends Record<string, any> | undefined> = V extends Record<string, any> ? V & {
17
+ [K in keyof V]: V[K] extends Record<string, any> ? V[K] & Record<string & {}, any> : V[K];
18
+ } : V;
12
19
  /**
13
20
  * Utility type to flatten intersection types for better IDE hover information.
14
21
  * @template T The type to flatten.
@@ -0,0 +1,6 @@
1
+ export interface IconProps {
2
+ name: string;
3
+ }
4
+ declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  export interface IconProps {
2
2
  name: string;
3
3
  }
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>;
4
+ declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
5
6
  export default _default;
@@ -0,0 +1,94 @@
1
+ import type { ButtonHTMLAttributes } from 'vue';
2
+ import type { RouterLinkProps, RouteLocationRaw } from 'vue-router';
3
+ interface NuxtLinkProps extends Omit<RouterLinkProps, 'to'> {
4
+ /**
5
+ * Route Location the link should navigate to when clicked on.
6
+ */
7
+ to?: RouteLocationRaw;
8
+ /**
9
+ * An alias for `to`. If used with `to`, `href` will be ignored
10
+ */
11
+ href?: NuxtLinkProps['to'];
12
+ /**
13
+ * Forces the link to be considered as external (true) or internal (false). This is helpful to handle edge-cases
14
+ */
15
+ external?: boolean;
16
+ /**
17
+ * Where to display the linked URL, as the name for a browsing context.
18
+ */
19
+ target?: '_blank' | '_parent' | '_self' | '_top' | (string & {}) | null;
20
+ /**
21
+ * A rel attribute value to apply on the link. Defaults to "noopener noreferrer" for external links.
22
+ */
23
+ rel?: 'noopener' | 'noreferrer' | 'nofollow' | 'sponsored' | 'ugc' | (string & {}) | null;
24
+ /**
25
+ * If set to true, no rel attribute will be added to the link
26
+ */
27
+ noRel?: boolean;
28
+ /**
29
+ * A class to apply to links that have been prefetched.
30
+ */
31
+ prefetchedClass?: string;
32
+ /**
33
+ * When enabled will prefetch middleware, layouts and payloads of links in the viewport.
34
+ */
35
+ prefetch?: boolean;
36
+ /**
37
+ * Allows controlling when to prefetch links. By default, prefetch is triggered only on visibility.
38
+ */
39
+ prefetchOn?: 'visibility' | 'interaction' | Partial<{
40
+ visibility: boolean;
41
+ interaction: boolean;
42
+ }>;
43
+ /**
44
+ * Escape hatch to disable `prefetch` attribute.
45
+ */
46
+ noPrefetch?: boolean;
47
+ }
48
+ export interface LinkProps extends NuxtLinkProps {
49
+ /**
50
+ * The element or component this component should render as when not a link.
51
+ * @defaultValue 'button'
52
+ */
53
+ as?: any;
54
+ /**
55
+ * The type of the button when not a link.
56
+ * @defaultValue 'button'
57
+ */
58
+ type?: ButtonHTMLAttributes['type'];
59
+ disabled?: boolean;
60
+ /** Force the link to be active independent of the current route. */
61
+ active?: boolean;
62
+ /** Will only be active if the current route is an exact match. */
63
+ exact?: boolean;
64
+ /** Will only be active if the current route query is an exact match. */
65
+ exactQuery?: boolean | 'partial';
66
+ /** Will only be active if the current route hash is an exact match. */
67
+ exactHash?: boolean;
68
+ /** The class to apply when the link is inactive. */
69
+ inactiveClass?: string;
70
+ custom?: boolean;
71
+ /** When `true`, only styles from `class`, `activeClass`, and `inactiveClass` will be applied. */
72
+ raw?: boolean;
73
+ class?: any;
74
+ }
75
+ export interface LinkSlots {
76
+ default(props: {
77
+ active: boolean;
78
+ }): any;
79
+ }
80
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
81
+ type: "reset" | "submit" | "button";
82
+ as: any;
83
+ activeClass: string;
84
+ ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
85
+ active: boolean;
86
+ inactiveClass: string;
87
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
88
+ declare const _default: typeof __VLS_export;
89
+ export default _default;
90
+ type __VLS_WithSlots<T, S> = T & {
91
+ new (): {
92
+ $slots: S;
93
+ };
94
+ };
@@ -77,7 +77,7 @@ export interface LinkSlots {
77
77
  active: boolean;
78
78
  }): any;
79
79
  }
80
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
80
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
81
81
  type: "reset" | "submit" | "button";
82
82
  as: any;
83
83
  activeClass: string;
@@ -85,6 +85,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps,
85
85
  active: boolean;
86
86
  inactiveClass: string;
87
87
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
88
+ declare const _default: typeof __VLS_export;
88
89
  export default _default;
89
90
  type __VLS_WithSlots<T, S> = T & {
90
91
  new (): {