@nuxt/ui 2.11.1 → 2.12.1

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 (74) hide show
  1. package/dist/module.d.mts +100 -28
  2. package/dist/module.d.ts +100 -28
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +2 -2
  5. package/dist/runtime/components/data/Table.vue +26 -18
  6. package/dist/runtime/components/data/Table.vue.d.ts +21 -12
  7. package/dist/runtime/components/elements/Accordion.vue +8 -4
  8. package/dist/runtime/components/elements/Accordion.vue.d.ts +4 -4
  9. package/dist/runtime/components/elements/Alert.vue +8 -2
  10. package/dist/runtime/components/elements/Alert.vue.d.ts +5 -10
  11. package/dist/runtime/components/elements/Button.vue +6 -3
  12. package/dist/runtime/components/elements/Button.vue.d.ts +119 -1
  13. package/dist/runtime/components/elements/Chip.vue.d.ts +2 -2
  14. package/dist/runtime/components/elements/Dropdown.vue +66 -17
  15. package/dist/runtime/components/elements/Dropdown.vue.d.ts +31 -4
  16. package/dist/runtime/components/elements/Link.vue +9 -4
  17. package/dist/runtime/components/elements/Link.vue.d.ts +194 -4
  18. package/dist/runtime/components/forms/Form.vue +16 -7
  19. package/dist/runtime/components/forms/Form.vue.d.ts +1 -1
  20. package/dist/runtime/components/forms/Input.vue +1 -1
  21. package/dist/runtime/components/forms/Input.vue.d.ts +1 -1
  22. package/dist/runtime/components/forms/InputMenu.vue +419 -0
  23. package/dist/runtime/components/forms/InputMenu.vue.d.ts +332 -0
  24. package/dist/runtime/components/forms/RadioGroup.vue +1 -1
  25. package/dist/runtime/components/forms/Select.vue +1 -1
  26. package/dist/runtime/components/forms/Select.vue.d.ts +1 -1
  27. package/dist/runtime/components/forms/SelectMenu.vue +70 -21
  28. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +31 -10
  29. package/dist/runtime/components/forms/Toggle.vue +1 -1
  30. package/dist/runtime/components/forms/Toggle.vue.d.ts +2 -1
  31. package/dist/runtime/components/layout/Divider.vue +4 -5
  32. package/dist/runtime/components/navigation/Breadcrumb.vue +8 -5
  33. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +4 -2
  34. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +3 -3
  35. package/dist/runtime/components/navigation/Pagination.vue +9 -4
  36. package/dist/runtime/components/navigation/Pagination.vue.d.ts +9 -0
  37. package/dist/runtime/components/navigation/VerticalNavigation.vue +53 -38
  38. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +8 -5
  39. package/dist/runtime/components/overlays/Modal.vue.d.ts +1 -1
  40. package/dist/runtime/components/overlays/Popover.vue +49 -13
  41. package/dist/runtime/components/overlays/Popover.vue.d.ts +14 -4
  42. package/dist/runtime/components/overlays/Slideover.vue.d.ts +1 -1
  43. package/dist/runtime/components/overlays/Tooltip.vue +1 -1
  44. package/dist/runtime/composables/useShortcuts.mjs +3 -1
  45. package/dist/runtime/types/alert.d.ts +5 -0
  46. package/dist/runtime/types/breadcrumb.d.ts +1 -0
  47. package/dist/runtime/types/chip.d.ts +4 -0
  48. package/dist/runtime/types/dropdown.d.ts +2 -0
  49. package/dist/runtime/types/form.d.ts +1 -0
  50. package/dist/runtime/types/index.d.ts +1 -0
  51. package/dist/runtime/types/link.d.ts +3 -0
  52. package/dist/runtime/types/tooltip.d.ts +7 -0
  53. package/dist/runtime/types/vertical-navigation.d.ts +1 -0
  54. package/dist/runtime/ui.config/forms/input.mjs +12 -12
  55. package/dist/runtime/ui.config/forms/inputMenu.d.ts +64 -0
  56. package/dist/runtime/ui.config/forms/inputMenu.mjs +62 -0
  57. package/dist/runtime/ui.config/forms/selectMenu.d.ts +14 -12
  58. package/dist/runtime/ui.config/forms/selectMenu.mjs +7 -41
  59. package/dist/runtime/ui.config/index.d.ts +1 -0
  60. package/dist/runtime/ui.config/index.mjs +1 -0
  61. package/dist/runtime/ui.config/layout/card.mjs +1 -1
  62. package/dist/runtime/ui.config/navigation/breadcrumb.d.ts +1 -0
  63. package/dist/runtime/ui.config/navigation/breadcrumb.mjs +1 -0
  64. package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +5 -0
  65. package/dist/runtime/ui.config/navigation/verticalNavigation.mjs +5 -0
  66. package/dist/runtime/ui.config/popper.mjs +2 -1
  67. package/dist/runtime/utils/index.d.ts +1 -0
  68. package/dist/runtime/utils/index.mjs +12 -3
  69. package/dist/runtime/utils/link.d.ts +58 -0
  70. package/dist/runtime/utils/link.mjs +111 -0
  71. package/dist/runtime/utils/uid.mjs +2 -1
  72. package/dist/types.d.mts +2 -2
  73. package/dist/types.d.ts +1 -1
  74. package/package.json +31 -28
@@ -1,6 +1,9 @@
1
1
  import type { NuxtLinkProps } from '#app'
2
2
 
3
3
  export interface Link extends NuxtLinkProps {
4
+ as?: string
5
+ type?: string
6
+ disabled?: boolean
4
7
  active?: boolean
5
8
  exact?: boolean
6
9
  exactQuery?: boolean
@@ -0,0 +1,7 @@
1
+ export interface Tooltip {
2
+ text?: string
3
+ prevent?: boolean
4
+ shortcuts?: string[]
5
+ openDelay?: number
6
+ closeDelay?: number
7
+ }
@@ -3,6 +3,7 @@ import type { Avatar } from './avatar'
3
3
 
4
4
  export interface VerticalNavigationLink extends Link {
5
5
  label: string
6
+ labelClass?: string
6
7
  icon?: string
7
8
  iconClass?: string
8
9
  avatar?: Avatar
@@ -76,24 +76,24 @@ export default {
76
76
  wrapper: "absolute inset-y-0 start-0 flex items-center",
77
77
  pointer: "pointer-events-none",
78
78
  padding: {
79
- "2xs": "ps-2",
80
- xs: "ps-2.5",
81
- sm: "ps-2.5",
82
- md: "ps-3",
83
- lg: "ps-3.5",
84
- xl: "ps-3.5"
79
+ "2xs": "px-2",
80
+ xs: "px-2.5",
81
+ sm: "px-2.5",
82
+ md: "px-3",
83
+ lg: "px-3.5",
84
+ xl: "px-3.5"
85
85
  }
86
86
  },
87
87
  trailing: {
88
88
  wrapper: "absolute inset-y-0 end-0 flex items-center",
89
89
  pointer: "pointer-events-none",
90
90
  padding: {
91
- "2xs": "pe-2",
92
- xs: "pe-2.5",
93
- sm: "pe-2.5",
94
- md: "pe-3",
95
- lg: "pe-3.5",
96
- xl: "pe-3.5"
91
+ "2xs": "px-2",
92
+ xs: "px-2.5",
93
+ sm: "px-2.5",
94
+ md: "px-3",
95
+ lg: "px-3.5",
96
+ xl: "px-3.5"
97
97
  }
98
98
  }
99
99
  },
@@ -0,0 +1,64 @@
1
+ declare const _default: {
2
+ container: string;
3
+ trigger: string;
4
+ width: string;
5
+ height: string;
6
+ base: string;
7
+ background: string;
8
+ shadow: string;
9
+ rounded: string;
10
+ padding: string;
11
+ ring: string;
12
+ empty: string;
13
+ option: {
14
+ base: string;
15
+ rounded: string;
16
+ padding: string;
17
+ size: string;
18
+ color: string;
19
+ container: string;
20
+ active: string;
21
+ inactive: string;
22
+ selected: string;
23
+ disabled: string;
24
+ empty: string;
25
+ icon: {
26
+ base: string;
27
+ active: string;
28
+ inactive: string;
29
+ };
30
+ selectedIcon: {
31
+ wrapper: string;
32
+ padding: string;
33
+ base: string;
34
+ };
35
+ avatar: {
36
+ base: string;
37
+ size: "3xs";
38
+ };
39
+ chip: {
40
+ base: string;
41
+ };
42
+ };
43
+ transition: {
44
+ leaveActiveClass: string;
45
+ leaveFromClass: string;
46
+ leaveToClass: string;
47
+ };
48
+ popper: {
49
+ placement: string;
50
+ };
51
+ default: {
52
+ selectedIcon: string;
53
+ trailingIcon: string;
54
+ };
55
+ arrow: {
56
+ ring: string;
57
+ background: string;
58
+ base: string;
59
+ rounded: string;
60
+ shadow: string;
61
+ placement: string;
62
+ };
63
+ };
64
+ export default _default;
@@ -0,0 +1,62 @@
1
+ import { arrow } from "../popper.mjs";
2
+ export default {
3
+ container: "z-20 group",
4
+ trigger: "inline-flex w-full",
5
+ width: "w-full",
6
+ height: "max-h-60",
7
+ base: "relative focus:outline-none overflow-y-auto scroll-py-1",
8
+ background: "bg-white dark:bg-gray-800",
9
+ shadow: "shadow-lg",
10
+ rounded: "rounded-md",
11
+ padding: "p-1",
12
+ ring: "ring-1 ring-gray-200 dark:ring-gray-700",
13
+ empty: "text-sm text-gray-400 dark:text-gray-500 px-2 py-1.5",
14
+ option: {
15
+ base: "cursor-default select-none relative flex items-center justify-between gap-1",
16
+ rounded: "rounded-md",
17
+ padding: "px-2 py-1.5",
18
+ size: "text-sm",
19
+ color: "text-gray-900 dark:text-white",
20
+ container: "flex items-center gap-2 min-w-0",
21
+ active: "bg-gray-100 dark:bg-gray-900",
22
+ inactive: "",
23
+ selected: "pe-7",
24
+ disabled: "cursor-not-allowed opacity-50",
25
+ empty: "text-sm text-gray-400 dark:text-gray-500 px-2 py-1.5",
26
+ icon: {
27
+ base: "flex-shrink-0 h-4 w-4",
28
+ active: "text-gray-900 dark:text-white",
29
+ inactive: "text-gray-400 dark:text-gray-500"
30
+ },
31
+ selectedIcon: {
32
+ wrapper: "absolute inset-y-0 end-0 flex items-center",
33
+ padding: "pe-2",
34
+ base: "h-4 w-4 text-gray-900 dark:text-white flex-shrink-0"
35
+ },
36
+ avatar: {
37
+ base: "flex-shrink-0",
38
+ size: "3xs"
39
+ },
40
+ chip: {
41
+ base: "flex-shrink-0 w-2 h-2 mx-1 rounded-full"
42
+ }
43
+ },
44
+ // Syntax for `<Transition>` component https://vuejs.org/guide/built-ins/transition.html#css-based-transitions
45
+ transition: {
46
+ leaveActiveClass: "transition ease-in duration-100",
47
+ leaveFromClass: "opacity-100",
48
+ leaveToClass: "opacity-0"
49
+ },
50
+ popper: {
51
+ placement: "bottom-end"
52
+ },
53
+ default: {
54
+ selectedIcon: "i-heroicons-check-20-solid",
55
+ trailingIcon: "i-heroicons-chevron-down-20-solid"
56
+ },
57
+ arrow: {
58
+ ...arrow,
59
+ ring: "before:ring-1 before:ring-gray-200 dark:before:ring-gray-700",
60
+ background: "before:bg-white dark:before:bg-gray-700"
61
+ }
62
+ };
@@ -1,19 +1,10 @@
1
1
  declare const _default: {
2
- container: string;
3
- trigger: string;
4
2
  select: string;
5
- width: string;
6
- height: string;
7
- base: string;
8
- background: string;
9
- shadow: string;
10
- rounded: string;
11
- padding: string;
12
- ring: string;
13
3
  input: string;
14
4
  required: string;
15
5
  label: string;
16
6
  option: {
7
+ create: string;
17
8
  base: string;
18
9
  rounded: string;
19
10
  padding: string;
@@ -25,7 +16,6 @@ declare const _default: {
25
16
  selected: string;
26
17
  disabled: string;
27
18
  empty: string;
28
- create: string;
29
19
  icon: {
30
20
  base: string;
31
21
  active: string;
@@ -54,7 +44,8 @@ declare const _default: {
54
44
  };
55
45
  default: {
56
46
  selectedIcon: string;
57
- clearOnClose: boolean;
47
+ clearSearchOnClose: boolean;
48
+ showCreateOptionWhen: string;
58
49
  };
59
50
  arrow: {
60
51
  ring: string;
@@ -64,5 +55,16 @@ declare const _default: {
64
55
  shadow: string;
65
56
  placement: string;
66
57
  };
58
+ container: string;
59
+ trigger: string;
60
+ width: string;
61
+ height: string;
62
+ base: string;
63
+ background: string;
64
+ shadow: string;
65
+ rounded: string;
66
+ padding: string;
67
+ ring: string;
68
+ empty: string;
67
69
  };
68
70
  export default _default;
@@ -1,49 +1,14 @@
1
1
  import { arrow } from "../popper.mjs";
2
+ import inputMenu from "./inputMenu.mjs";
2
3
  export default {
3
- container: "z-20 group",
4
- trigger: "inline-flex w-full",
4
+ ...inputMenu,
5
5
  select: "inline-flex items-center text-left cursor-default",
6
- width: "w-full",
7
- height: "max-h-60",
8
- base: "relative focus:outline-none overflow-y-auto scroll-py-1",
9
- background: "bg-white dark:bg-gray-800",
10
- shadow: "shadow-lg",
11
- rounded: "rounded-md",
12
- padding: "p-1",
13
- ring: "ring-1 ring-gray-200 dark:ring-gray-700",
14
- input: "block w-[calc(100%+0.5rem)] focus:ring-transparent text-sm px-3 py-1.5 text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 border-0 border-b border-gray-200 dark:border-gray-700 focus:border-inherit sticky -top-1 -mt-1 mb-1 -mx-1 z-10 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none",
6
+ input: "block w-[calc(100%+0.5rem)] focus:ring-transparent text-sm px-3 py-1.5 text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 border-0 border-b border-gray-200 dark:border-gray-700 sticky -top-1 -mt-1 mb-1 -mx-1 z-10 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none",
15
7
  required: "absolute inset-0 w-px opacity-0 cursor-default",
16
8
  label: "block truncate",
17
9
  option: {
18
- base: "cursor-default select-none relative flex items-center justify-between gap-1",
19
- rounded: "rounded-md",
20
- padding: "px-2 py-1.5",
21
- size: "text-sm",
22
- color: "text-gray-900 dark:text-white",
23
- container: "flex items-center gap-2 min-w-0",
24
- active: "bg-gray-100 dark:bg-gray-900",
25
- inactive: "",
26
- selected: "pe-7",
27
- disabled: "cursor-not-allowed opacity-50",
28
- empty: "text-sm text-gray-400 dark:text-gray-500 px-2 py-1.5",
29
- create: "block truncate",
30
- icon: {
31
- base: "flex-shrink-0 h-4 w-4",
32
- active: "text-gray-900 dark:text-white",
33
- inactive: "text-gray-400 dark:text-gray-500"
34
- },
35
- selectedIcon: {
36
- wrapper: "absolute inset-y-0 end-0 flex items-center",
37
- padding: "pe-2",
38
- base: "h-4 w-4 text-gray-900 dark:text-white flex-shrink-0"
39
- },
40
- avatar: {
41
- base: "flex-shrink-0",
42
- size: "3xs"
43
- },
44
- chip: {
45
- base: "flex-shrink-0 w-2 h-2 mx-1 rounded-full"
46
- }
10
+ ...inputMenu.option,
11
+ create: "block truncate"
47
12
  },
48
13
  // Syntax for `<Transition>` component https://vuejs.org/guide/built-ins/transition.html#css-based-transitions
49
14
  transition: {
@@ -56,7 +21,8 @@ export default {
56
21
  },
57
22
  default: {
58
23
  selectedIcon: "i-heroicons-check-20-solid",
59
- clearOnClose: false
24
+ clearSearchOnClose: false,
25
+ showCreateOptionWhen: "empty"
60
26
  },
61
27
  arrow: {
62
28
  ...arrow,
@@ -13,6 +13,7 @@ export { default as progress } from './elements/progress';
13
13
  export { default as meter } from './elements/meter';
14
14
  export { default as meterGroup } from './elements/meterGroup';
15
15
  export { default as input } from './forms/input';
16
+ export { default as inputMenu } from './forms/inputMenu';
16
17
  export { default as formGroup } from './forms/formGroup';
17
18
  export { default as textarea } from './forms/textarea';
18
19
  export { default as select } from './forms/select';
@@ -13,6 +13,7 @@ export { default as progress } from "./elements/progress.mjs";
13
13
  export { default as meter } from "./elements/meter.mjs";
14
14
  export { default as meterGroup } from "./elements/meterGroup.mjs";
15
15
  export { default as input } from "./forms/input.mjs";
16
+ export { default as inputMenu } from "./forms/inputMenu.mjs";
16
17
  export { default as formGroup } from "./forms/formGroup.mjs";
17
18
  export { default as textarea } from "./forms/textarea.mjs";
18
19
  export { default as select } from "./forms/select.mjs";
@@ -1,5 +1,5 @@
1
1
  export default {
2
- base: "overflow-hidden",
2
+ base: "",
3
3
  background: "bg-white dark:bg-gray-900",
4
4
  divide: "divide-y divide-gray-200 dark:divide-gray-800",
5
5
  ring: "ring-1 ring-gray-200 dark:ring-gray-800",
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  ol: string;
4
4
  li: string;
5
5
  base: string;
6
+ label: string;
6
7
  icon: {
7
8
  base: string;
8
9
  active: string;
@@ -3,6 +3,7 @@ export default {
3
3
  ol: "flex items-center gap-x-1.5",
4
4
  li: "flex items-center gap-x-1.5 text-gray-500 dark:text-gray-400 text-sm",
5
5
  base: "flex items-center gap-x-1.5 group font-semibold",
6
+ label: "",
6
7
  icon: {
7
8
  base: "flex-shrink-0 w-4 h-4",
8
9
  active: "",
@@ -24,5 +24,10 @@ declare const _default: {
24
24
  active: string;
25
25
  inactive: string;
26
26
  };
27
+ divider: {
28
+ wrapper: {
29
+ base: string;
30
+ };
31
+ };
27
32
  };
28
33
  export default _default;
@@ -23,5 +23,10 @@ export default {
23
23
  base: "relative ms-auto inline-block py-0.5 px-2 text-xs rounded-md -me-1 -my-0.5",
24
24
  active: "bg-white dark:bg-gray-900",
25
25
  inactive: "bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white group-hover:bg-white dark:group-hover:bg-gray-900"
26
+ },
27
+ divider: {
28
+ wrapper: {
29
+ base: "p-2"
30
+ }
26
31
  }
27
32
  };
@@ -4,5 +4,6 @@ export const arrow = {
4
4
  rounded: "before:rounded-sm",
5
5
  background: "before:bg-gray-200 dark:before:bg-gray-800",
6
6
  shadow: "before:shadow",
7
- placement: 'group-data-[popper-placement*="right"]:-left-1 group-data-[popper-placement*="left"]:-right-1 group-data-[popper-placement*="top"]:-bottom-1 group-data-[popper-placement*="bottom"]:-top-1'
7
+ // eslint-disable-next-line quotes
8
+ placement: `group-data-[popper-placement*='right']:-left-1 group-data-[popper-placement*='left']:-right-1 group-data-[popper-placement*='top']:-bottom-1 group-data-[popper-placement*='bottom']:-top-1`
8
9
  };
@@ -8,3 +8,4 @@ export declare function getSlotsChildren(slots: any): any;
8
8
  */
9
9
  export declare function looseToNumber(val: any): any;
10
10
  export * from './lodash';
11
+ export * from './link';
@@ -1,12 +1,20 @@
1
1
  import { defu, createDefu } from "defu";
2
2
  import { extendTailwindMerge } from "tailwind-merge";
3
3
  const customTwMerge = extendTailwindMerge({
4
- classGroups: {
5
- icons: [(classPart) => /^i-/.test(classPart)]
4
+ extend: {
5
+ classGroups: {
6
+ icons: [(classPart) => /^i-/.test(classPart)]
7
+ }
6
8
  }
7
9
  });
8
10
  const defuTwMerge = createDefu((obj, key, value, namespace) => {
9
- if (namespace !== "default" && !namespace.startsWith("default.") && typeof obj[key] === "string" && typeof value === "string" && obj[key] && value) {
11
+ if (namespace === "default" || namespace.startsWith("default.")) {
12
+ return false;
13
+ }
14
+ if (namespace.endsWith("avatar") && key === "size") {
15
+ return false;
16
+ }
17
+ if (typeof obj[key] === "string" && typeof value === "string" && obj[key] && value) {
10
18
  obj[key] = customTwMerge(obj[key], value);
11
19
  return true;
12
20
  }
@@ -47,3 +55,4 @@ export function looseToNumber(val) {
47
55
  return isNaN(n) ? val : n;
48
56
  }
49
57
  export * from "./lodash.mjs";
58
+ export * from "./link.mjs";
@@ -0,0 +1,58 @@
1
+ import type { PropType } from 'vue';
2
+ import type { RouteLocationRaw } from 'vue-router';
3
+ export declare const nuxtLinkProps: {
4
+ readonly to: {
5
+ readonly type: PropType<RouteLocationRaw>;
6
+ readonly default: undefined;
7
+ };
8
+ readonly href: {
9
+ readonly type: PropType<RouteLocationRaw>;
10
+ readonly default: undefined;
11
+ };
12
+ readonly target: {
13
+ readonly type: PropType<(string & {}) | "_blank" | "_parent" | "_self" | "_top" | null>;
14
+ readonly default: undefined;
15
+ };
16
+ readonly rel: {
17
+ readonly type: StringConstructor;
18
+ readonly default: undefined;
19
+ };
20
+ readonly noRel: {
21
+ readonly type: BooleanConstructor;
22
+ readonly default: undefined;
23
+ };
24
+ readonly prefetch: {
25
+ readonly type: BooleanConstructor;
26
+ readonly default: undefined;
27
+ };
28
+ readonly noPrefetch: {
29
+ readonly type: BooleanConstructor;
30
+ readonly default: undefined;
31
+ };
32
+ readonly activeClass: {
33
+ readonly type: StringConstructor;
34
+ readonly default: undefined;
35
+ };
36
+ readonly exactActiveClass: {
37
+ readonly type: StringConstructor;
38
+ readonly default: undefined;
39
+ };
40
+ readonly prefetchedClass: {
41
+ readonly type: StringConstructor;
42
+ readonly default: undefined;
43
+ };
44
+ readonly replace: {
45
+ readonly type: BooleanConstructor;
46
+ readonly default: undefined;
47
+ };
48
+ readonly ariaCurrentValue: {
49
+ readonly type: StringConstructor;
50
+ readonly default: undefined;
51
+ };
52
+ readonly external: {
53
+ readonly type: BooleanConstructor;
54
+ readonly default: undefined;
55
+ };
56
+ };
57
+ export declare const getNuxtLinkProps: (props: any) => {};
58
+ export declare const getULinkProps: (props: any) => {};
@@ -0,0 +1,111 @@
1
+ export const nuxtLinkProps = {
2
+ to: {
3
+ type: [String, Object],
4
+ default: void 0
5
+ },
6
+ href: {
7
+ type: [String, Object],
8
+ default: void 0
9
+ },
10
+ // Attributes
11
+ target: {
12
+ type: String,
13
+ default: void 0
14
+ },
15
+ rel: {
16
+ type: String,
17
+ default: void 0
18
+ },
19
+ noRel: {
20
+ type: Boolean,
21
+ default: void 0
22
+ },
23
+ // Prefetching
24
+ prefetch: {
25
+ type: Boolean,
26
+ default: void 0
27
+ },
28
+ noPrefetch: {
29
+ type: Boolean,
30
+ default: void 0
31
+ },
32
+ // Styling
33
+ activeClass: {
34
+ type: String,
35
+ default: void 0
36
+ },
37
+ exactActiveClass: {
38
+ type: String,
39
+ default: void 0
40
+ },
41
+ prefetchedClass: {
42
+ type: String,
43
+ default: void 0
44
+ },
45
+ // Vue Router's `<RouterLink>` additional props
46
+ replace: {
47
+ type: Boolean,
48
+ default: void 0
49
+ },
50
+ ariaCurrentValue: {
51
+ type: String,
52
+ default: void 0
53
+ },
54
+ // Edge cases handling
55
+ external: {
56
+ type: Boolean,
57
+ default: void 0
58
+ }
59
+ };
60
+ const uLinkProps = {
61
+ as: {
62
+ type: String,
63
+ default: "button"
64
+ },
65
+ type: {
66
+ type: String,
67
+ default: "button"
68
+ },
69
+ disabled: {
70
+ type: Boolean,
71
+ default: null
72
+ },
73
+ active: {
74
+ type: Boolean,
75
+ default: void 0
76
+ },
77
+ exact: {
78
+ type: Boolean,
79
+ default: false
80
+ },
81
+ exactQuery: {
82
+ type: Boolean,
83
+ default: false
84
+ },
85
+ exactHash: {
86
+ type: Boolean,
87
+ default: false
88
+ },
89
+ inactiveClass: {
90
+ type: String,
91
+ default: void 0
92
+ }
93
+ };
94
+ export const getNuxtLinkProps = (props) => {
95
+ const keys = Object.keys(nuxtLinkProps);
96
+ return keys.reduce((acc, key) => {
97
+ if (props[key] !== void 0) {
98
+ acc[key] = props[key];
99
+ }
100
+ return acc;
101
+ }, {});
102
+ };
103
+ export const getULinkProps = (props) => {
104
+ const keys = [...Object.keys(nuxtLinkProps), ...Object.keys(uLinkProps)];
105
+ return keys.reduce((acc, key) => {
106
+ if (props[key] !== void 0) {
107
+ acc[key] = props[key];
108
+ }
109
+ return acc;
110
+ }, {});
111
+ };
@@ -1,4 +1,5 @@
1
1
  let _id = 0;
2
2
  export function uid() {
3
- return `nuid-${_id++}`;
3
+ _id = (_id + 1) % Number.MAX_SAFE_INTEGER;
4
+ return `nuid-${_id}`;
4
5
  }
package/dist/types.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import type { ModuleOptions } from './module'
2
+ import type { ModuleOptions } from './module.js'
3
3
 
4
4
 
5
5
  declare module '@nuxt/schema' {
@@ -13,4 +13,4 @@ declare module 'nuxt/schema' {
13
13
  }
14
14
 
15
15
 
16
- export type { accordion, alert, avatar, avatarGroup, badge, breadcrumb, button, buttonGroup, card, checkbox, chip, commandPalette, container, contextMenu, divider, dropdown, formGroup, input, kbd, meter, meterGroup, modal, notification, notifications, pagination, popover, progress, radio, radioGroup, range, select, selectMenu, skeleton, slideover, table, tabs, textarea, toggle, tooltip, verticalNavigation } from './module'
16
+ export type { accordion, alert, avatar, avatarGroup, badge, breadcrumb, button, buttonGroup, card, checkbox, chip, commandPalette, container, contextMenu, divider, dropdown, formGroup, input, inputMenu, kbd, meter, meterGroup, modal, notification, notifications, pagination, popover, progress, radio, radioGroup, range, select, selectMenu, skeleton, slideover, table, tabs, textarea, toggle, tooltip, verticalNavigation } from './module.js'
package/dist/types.d.ts CHANGED
@@ -13,4 +13,4 @@ declare module 'nuxt/schema' {
13
13
  }
14
14
 
15
15
 
16
- export type { accordion, alert, avatar, avatarGroup, badge, breadcrumb, button, buttonGroup, card, checkbox, chip, commandPalette, container, contextMenu, divider, dropdown, formGroup, input, kbd, meter, meterGroup, modal, notification, notifications, pagination, popover, progress, radio, radioGroup, range, select, selectMenu, skeleton, slideover, table, tabs, textarea, toggle, tooltip, verticalNavigation } from './module'
16
+ export type { accordion, alert, avatar, avatarGroup, badge, breadcrumb, button, buttonGroup, card, checkbox, chip, commandPalette, container, contextMenu, divider, dropdown, formGroup, input, inputMenu, kbd, meter, meterGroup, modal, notification, notifications, pagination, popover, progress, radio, radioGroup, range, select, selectMenu, skeleton, slideover, table, tabs, textarea, toggle, tooltip, verticalNavigation } from './module'