@nuxt/ui 2.11.0 → 2.12.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 (159) hide show
  1. package/dist/module.d.mts +294 -48
  2. package/dist/module.d.ts +294 -48
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +6 -4
  5. package/dist/runtime/components/data/Table.vue +29 -21
  6. package/dist/runtime/components/data/Table.vue.d.ts +28 -19
  7. package/dist/runtime/components/elements/Accordion.vue +10 -6
  8. package/dist/runtime/components/elements/Accordion.vue.d.ts +11 -11
  9. package/dist/runtime/components/elements/Alert.vue +12 -6
  10. package/dist/runtime/components/elements/Alert.vue.d.ts +12 -17
  11. package/dist/runtime/components/elements/Avatar.vue +2 -2
  12. package/dist/runtime/components/elements/Avatar.vue.d.ts +7 -7
  13. package/dist/runtime/components/elements/AvatarGroup.d.ts +7 -7
  14. package/dist/runtime/components/elements/AvatarGroup.mjs +2 -2
  15. package/dist/runtime/components/elements/Badge.vue +2 -2
  16. package/dist/runtime/components/elements/Badge.vue.d.ts +7 -7
  17. package/dist/runtime/components/elements/Button.vue +8 -6
  18. package/dist/runtime/components/elements/Button.vue.d.ts +9 -8
  19. package/dist/runtime/components/elements/ButtonGroup.d.ts +7 -7
  20. package/dist/runtime/components/elements/ButtonGroup.mjs +3 -16
  21. package/dist/runtime/components/elements/Chip.vue +2 -2
  22. package/dist/runtime/components/elements/Chip.vue.d.ts +9 -9
  23. package/dist/runtime/components/elements/Dropdown.vue +68 -19
  24. package/dist/runtime/components/elements/Dropdown.vue.d.ts +37 -9
  25. package/dist/runtime/components/elements/Kbd.vue +2 -2
  26. package/dist/runtime/components/elements/Kbd.vue.d.ts +7 -7
  27. package/dist/runtime/components/elements/Link.vue +2 -2
  28. package/dist/runtime/components/elements/Meter.vue +2 -2
  29. package/dist/runtime/components/elements/Meter.vue.d.ts +7 -7
  30. package/dist/runtime/components/elements/MeterGroup.d.ts +9 -9
  31. package/dist/runtime/components/elements/MeterGroup.mjs +8 -21
  32. package/dist/runtime/components/elements/Progress.vue +5 -94
  33. package/dist/runtime/components/elements/Progress.vue.d.ts +123 -1
  34. package/dist/runtime/components/forms/Checkbox.vue +7 -7
  35. package/dist/runtime/components/forms/Checkbox.vue.d.ts +8 -8
  36. package/dist/runtime/components/forms/Form.vue +17 -8
  37. package/dist/runtime/components/forms/Form.vue.d.ts +1 -1
  38. package/dist/runtime/components/forms/FormGroup.vue +2 -2
  39. package/dist/runtime/components/forms/FormGroup.vue.d.ts +7 -7
  40. package/dist/runtime/components/forms/Input.vue +8 -8
  41. package/dist/runtime/components/forms/Input.vue.d.ts +11 -11
  42. package/dist/runtime/components/forms/InputMenu.vue +410 -0
  43. package/dist/runtime/components/forms/InputMenu.vue.d.ts +331 -0
  44. package/dist/runtime/components/forms/Radio.vue +7 -7
  45. package/dist/runtime/components/forms/Radio.vue.d.ts +7 -7
  46. package/dist/runtime/components/forms/RadioGroup.vue +5 -5
  47. package/dist/runtime/components/forms/RadioGroup.vue.d.ts +13 -13
  48. package/dist/runtime/components/forms/Range.vue +5 -5
  49. package/dist/runtime/components/forms/Range.vue.d.ts +8 -8
  50. package/dist/runtime/components/forms/Select.vue +8 -8
  51. package/dist/runtime/components/forms/Select.vue.d.ts +10 -10
  52. package/dist/runtime/components/forms/SelectMenu.vue +69 -36
  53. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +40 -20
  54. package/dist/runtime/components/forms/Textarea.vue +3 -3
  55. package/dist/runtime/components/forms/Textarea.vue.d.ts +10 -10
  56. package/dist/runtime/components/forms/Toggle.vue +10 -10
  57. package/dist/runtime/components/forms/Toggle.vue.d.ts +16 -15
  58. package/dist/runtime/components/layout/Card.vue +2 -2
  59. package/dist/runtime/components/layout/Card.vue.d.ts +7 -7
  60. package/dist/runtime/components/layout/Container.vue +2 -2
  61. package/dist/runtime/components/layout/Container.vue.d.ts +7 -7
  62. package/dist/runtime/components/layout/Divider.vue +3 -8
  63. package/dist/runtime/components/layout/Divider.vue.d.ts +7 -7
  64. package/dist/runtime/components/layout/Skeleton.vue +2 -2
  65. package/dist/runtime/components/layout/Skeleton.vue.d.ts +7 -7
  66. package/dist/runtime/components/navigation/Breadcrumb.vue +9 -6
  67. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +10 -7
  68. package/dist/runtime/components/navigation/CommandPalette.vue +42 -33
  69. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +16 -9
  70. package/dist/runtime/components/navigation/CommandPaletteGroup.vue +1 -3
  71. package/dist/runtime/components/navigation/Pagination.vue +16 -11
  72. package/dist/runtime/components/navigation/Pagination.vue.d.ts +16 -7
  73. package/dist/runtime/components/navigation/Tabs.vue +8 -5
  74. package/dist/runtime/components/navigation/Tabs.vue.d.ts +9 -9
  75. package/dist/runtime/components/navigation/VerticalNavigation.vue +56 -39
  76. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +14 -10
  77. package/dist/runtime/components/overlays/ContextMenu.vue +4 -3
  78. package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +7 -7
  79. package/dist/runtime/components/overlays/Modal.vue +3 -6
  80. package/dist/runtime/components/overlays/Modal.vue.d.ts +8 -8
  81. package/dist/runtime/components/overlays/Notification.vue +7 -7
  82. package/dist/runtime/components/overlays/Notification.vue.d.ts +7 -7
  83. package/dist/runtime/components/overlays/Notifications.vue +2 -2
  84. package/dist/runtime/components/overlays/Notifications.vue.d.ts +7 -7
  85. package/dist/runtime/components/overlays/Popover.vue +54 -17
  86. package/dist/runtime/components/overlays/Popover.vue.d.ts +21 -11
  87. package/dist/runtime/components/overlays/Slideover.vue +6 -6
  88. package/dist/runtime/components/overlays/Slideover.vue.d.ts +8 -8
  89. package/dist/runtime/components/overlays/Tooltip.vue +6 -5
  90. package/dist/runtime/components/overlays/Tooltip.vue.d.ts +7 -7
  91. package/dist/runtime/composables/useFormGroup.d.ts +3 -3
  92. package/dist/runtime/composables/useFormGroup.mjs +1 -1
  93. package/dist/runtime/composables/useShortcuts.mjs +3 -1
  94. package/dist/runtime/composables/useUI.d.ts +3 -3
  95. package/dist/runtime/types/alert.d.ts +5 -0
  96. package/dist/runtime/types/breadcrumb.d.ts +3 -0
  97. package/dist/runtime/types/dropdown.d.ts +2 -0
  98. package/dist/runtime/types/form.d.ts +2 -1
  99. package/dist/runtime/types/popper.d.ts +2 -0
  100. package/dist/runtime/types/utils.d.ts +4 -4
  101. package/dist/runtime/types/vertical-navigation.d.ts +1 -0
  102. package/dist/runtime/ui.config/data/table.d.ts +2 -2
  103. package/dist/runtime/ui.config/elements/accordion.d.ts +1 -1
  104. package/dist/runtime/ui.config/elements/alert.d.ts +5 -4
  105. package/dist/runtime/ui.config/elements/alert.mjs +1 -0
  106. package/dist/runtime/ui.config/elements/button.d.ts +4 -0
  107. package/dist/runtime/ui.config/elements/button.mjs +4 -0
  108. package/dist/runtime/ui.config/elements/buttonGroup.d.ts +92 -0
  109. package/dist/runtime/ui.config/elements/buttonGroup.mjs +12 -1
  110. package/dist/runtime/ui.config/elements/dropdown.d.ts +3 -1
  111. package/dist/runtime/ui.config/elements/dropdown.mjs +4 -2
  112. package/dist/runtime/ui.config/elements/meterGroup.d.ts +40 -0
  113. package/dist/runtime/ui.config/elements/meterGroup.mjs +14 -1
  114. package/dist/runtime/ui.config/forms/checkbox.d.ts +3 -0
  115. package/dist/runtime/ui.config/forms/checkbox.mjs +3 -0
  116. package/dist/runtime/ui.config/forms/input.d.ts +2 -0
  117. package/dist/runtime/ui.config/forms/input.mjs +14 -12
  118. package/dist/runtime/ui.config/forms/inputMenu.d.ts +64 -0
  119. package/dist/runtime/ui.config/forms/inputMenu.mjs +62 -0
  120. package/dist/runtime/ui.config/forms/radio.d.ts +3 -0
  121. package/dist/runtime/ui.config/forms/radio.mjs +3 -0
  122. package/dist/runtime/ui.config/forms/select.d.ts +2 -0
  123. package/dist/runtime/ui.config/forms/select.mjs +1 -0
  124. package/dist/runtime/ui.config/forms/selectMenu.d.ts +18 -11
  125. package/dist/runtime/ui.config/forms/selectMenu.mjs +12 -41
  126. package/dist/runtime/ui.config/forms/textarea.d.ts +2 -0
  127. package/dist/runtime/ui.config/forms/textarea.mjs +1 -0
  128. package/dist/runtime/ui.config/index.d.ts +1 -0
  129. package/dist/runtime/ui.config/index.mjs +1 -0
  130. package/dist/runtime/ui.config/layout/card.mjs +1 -1
  131. package/dist/runtime/ui.config/layout/divider.d.ts +6 -1
  132. package/dist/runtime/ui.config/layout/divider.mjs +5 -0
  133. package/dist/runtime/ui.config/navigation/breadcrumb.d.ts +1 -0
  134. package/dist/runtime/ui.config/navigation/breadcrumb.mjs +2 -1
  135. package/dist/runtime/ui.config/navigation/commandPalette.d.ts +5 -1
  136. package/dist/runtime/ui.config/navigation/commandPalette.mjs +5 -1
  137. package/dist/runtime/ui.config/navigation/pagination.d.ts +6 -6
  138. package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +6 -1
  139. package/dist/runtime/ui.config/navigation/verticalNavigation.mjs +5 -0
  140. package/dist/runtime/ui.config/overlays/contextMenu.mjs +1 -1
  141. package/dist/runtime/ui.config/overlays/modal.d.ts +1 -0
  142. package/dist/runtime/ui.config/overlays/modal.mjs +3 -2
  143. package/dist/runtime/ui.config/overlays/notification.d.ts +5 -4
  144. package/dist/runtime/ui.config/overlays/notification.mjs +1 -0
  145. package/dist/runtime/ui.config/overlays/popover.d.ts +1 -0
  146. package/dist/runtime/ui.config/overlays/popover.mjs +2 -1
  147. package/dist/runtime/ui.config/overlays/slideover.d.ts +5 -0
  148. package/dist/runtime/ui.config/overlays/slideover.mjs +5 -0
  149. package/dist/runtime/ui.config/overlays/tooltip.d.ts +1 -0
  150. package/dist/runtime/ui.config/overlays/tooltip.mjs +2 -1
  151. package/dist/runtime/ui.config/{_popperArrow.d.ts → popper.d.ts} +1 -2
  152. package/dist/runtime/ui.config/popper.mjs +9 -0
  153. package/dist/runtime/ui.css +1 -13
  154. package/dist/runtime/utils/index.mjs +11 -3
  155. package/dist/runtime/utils/uid.mjs +2 -1
  156. package/dist/types.d.mts +2 -2
  157. package/dist/types.d.ts +1 -1
  158. package/package.json +29 -28
  159. package/dist/runtime/ui.config/_popperArrow.mjs +0 -8
@@ -18,6 +18,10 @@ declare const _default: import("vue").DefineComponent<{
18
18
  default: number;
19
19
  validate(value: any): boolean;
20
20
  };
21
+ disabled: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
21
25
  size: {
22
26
  type: PropType<ButtonSize>;
23
27
  default: () => any;
@@ -61,11 +65,11 @@ declare const _default: import("vue").DefineComponent<{
61
65
  };
62
66
  class: {
63
67
  type: PropType<any>;
64
- default: undefined;
68
+ default: () => "";
65
69
  };
66
70
  ui: {
67
- type: PropType<Partial<any>>;
68
- default: undefined;
71
+ type: PropType<any>;
72
+ default: () => {};
69
73
  };
70
74
  }, {
71
75
  ui: import("vue").ComputedRef<any>;
@@ -100,6 +104,10 @@ declare const _default: import("vue").DefineComponent<{
100
104
  default: number;
101
105
  validate(value: any): boolean;
102
106
  };
107
+ disabled: {
108
+ type: BooleanConstructor;
109
+ default: boolean;
110
+ };
103
111
  size: {
104
112
  type: PropType<ButtonSize>;
105
113
  default: () => any;
@@ -143,18 +151,19 @@ declare const _default: import("vue").DefineComponent<{
143
151
  };
144
152
  class: {
145
153
  type: PropType<any>;
146
- default: undefined;
154
+ default: () => "";
147
155
  };
148
156
  ui: {
149
- type: PropType<Partial<any>>;
150
- default: undefined;
157
+ type: PropType<any>;
158
+ default: () => {};
151
159
  };
152
160
  }>> & {
153
161
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
154
162
  }, {
155
163
  size: ButtonSize;
156
- ui: Partial<any>;
164
+ ui: any;
157
165
  class: any;
166
+ disabled: boolean;
158
167
  max: number;
159
168
  divider: string;
160
169
  pageCount: number;
@@ -86,11 +86,11 @@ export default defineComponent({
86
86
  },
87
87
  class: {
88
88
  type: [String, Object, Array],
89
- default: void 0
89
+ default: () => ""
90
90
  },
91
91
  ui: {
92
92
  type: Object,
93
- default: void 0
93
+ default: () => ({})
94
94
  }
95
95
  },
96
96
  emits: ["update:modelValue", "change"],
@@ -105,6 +105,9 @@ export default defineComponent({
105
105
  if (!tab) {
106
106
  return;
107
107
  }
108
+ if (!markerRef.value) {
109
+ return;
110
+ }
108
111
  markerRef.value.style.top = `${tab.offsetTop}px`;
109
112
  markerRef.value.style.left = `${tab.offsetLeft}px`;
110
113
  markerRef.value.style.width = `${tab.offsetWidth}px`;
@@ -114,16 +117,16 @@ export default defineComponent({
114
117
  selectedIndex.value = index;
115
118
  emit("change", index);
116
119
  if (props.modelValue !== void 0) {
117
- emit("update:modelValue", index);
120
+ emit("update:modelValue", selectedIndex.value);
118
121
  }
119
- calcMarkerSize(index);
122
+ calcMarkerSize(selectedIndex.value);
120
123
  }
121
124
  useResizeObserver(listRef, () => {
122
125
  calcMarkerSize(selectedIndex.value);
123
126
  });
124
127
  watch(() => props.modelValue, (value) => {
125
128
  selectedIndex.value = value;
126
- calcMarkerSize(value);
129
+ calcMarkerSize(selectedIndex.value);
127
130
  });
128
131
  onMounted(() => calcMarkerSize(selectedIndex.value));
129
132
  return {
@@ -20,11 +20,11 @@ declare const _default: import("vue").DefineComponent<{
20
20
  };
21
21
  class: {
22
22
  type: PropType<any>;
23
- default: undefined;
23
+ default: () => string;
24
24
  };
25
25
  ui: {
26
- type: PropType<Partial<any>>;
27
- default: undefined;
26
+ type: PropType<any>;
27
+ default: () => {};
28
28
  };
29
29
  }, {
30
30
  ui: import("vue").ComputedRef<any>;
@@ -34,8 +34,8 @@ declare const _default: import("vue").DefineComponent<{
34
34
  listRef: import("vue").Ref<HTMLElement | undefined>;
35
35
  itemRefs: import("vue").Ref<HTMLElement[]>;
36
36
  markerRef: import("vue").Ref<HTMLElement | undefined>;
37
- selectedIndex: import("vue").Ref<number>;
38
- onChange: (index: any) => void;
37
+ selectedIndex: import("vue").Ref<number | undefined>;
38
+ onChange: (index: number) => void;
39
39
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
40
40
  modelValue: {
41
41
  type: NumberConstructor;
@@ -56,18 +56,18 @@ declare const _default: import("vue").DefineComponent<{
56
56
  };
57
57
  class: {
58
58
  type: PropType<any>;
59
- default: undefined;
59
+ default: () => string;
60
60
  };
61
61
  ui: {
62
- type: PropType<Partial<any>>;
63
- default: undefined;
62
+ type: PropType<any>;
63
+ default: () => {};
64
64
  };
65
65
  }>> & {
66
66
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
67
67
  onChange?: ((...args: any[]) => any) | undefined;
68
68
  }, {
69
69
  orientation: "horizontal" | "vertical";
70
- ui: Partial<any>;
70
+ ui: any;
71
71
  class: any;
72
72
  modelValue: number;
73
73
  items: TabItem[];
@@ -1,47 +1,57 @@
1
1
  <template>
2
2
  <nav :class="ui.wrapper" v-bind="attrs">
3
- <ULink
4
- v-for="(link, index) of links"
5
- v-slot="{ isActive }"
6
- :key="index"
7
- v-bind="omit(link, ['label', 'icon', 'iconClass', 'avatar', 'badge', 'click'])"
8
- :class="[ui.base, ui.padding, ui.width, ui.ring, ui.rounded, ui.font, ui.size]"
9
- :active-class="ui.active"
10
- :inactive-class="ui.inactive"
11
- @click="link.click"
12
- @keyup.enter="$event.target.blur()"
13
- >
14
- <slot name="avatar" :link="link" :is-active="isActive">
15
- <UAvatar
16
- v-if="link.avatar"
17
- v-bind="{ size: ui.avatar.size, ...link.avatar }"
18
- :class="[ui.avatar.base]"
19
- />
20
- </slot>
21
- <slot name="icon" :link="link" :is-active="isActive">
22
- <UIcon
23
- v-if="link.icon"
24
- :name="link.icon"
25
- :class="[ui.icon.base, isActive ? ui.icon.active : ui.icon.inactive, link.iconClass]"
26
- />
27
- </slot>
28
- <slot :link="link" :is-active="isActive">
29
- <span v-if="link.label" :class="ui.label">{{ link.label }}</span>
30
- </slot>
31
- <slot name="badge" :link="link" :is-active="isActive">
32
- <span v-if="link.badge" :class="[ui.badge.base, isActive ? ui.badge.active : ui.badge.inactive]">
33
- {{ link.badge }}
34
- </span>
35
- </slot>
36
- </ULink>
3
+ <ul v-for="(section, sectionIndex) of linkSections" :key="`linkSection${sectionIndex}`">
4
+ <li v-for="(link, index) of section" :key="`linkSection${sectionIndex}-${index}`">
5
+ <ULink
6
+ v-slot="{ isActive }"
7
+ v-bind="omit(link, ['label', 'labelClass', 'icon', 'iconClass', 'avatar', 'badge', 'click'])"
8
+ :class="[ui.base, ui.padding, ui.width, ui.ring, ui.rounded, ui.font, ui.size]"
9
+ :active-class="ui.active"
10
+ :inactive-class="ui.inactive"
11
+ @click="link.click"
12
+ @keyup.enter="$event.target.blur()"
13
+ >
14
+ <slot name="avatar" :link="link" :is-active="isActive">
15
+ <UAvatar
16
+ v-if="link.avatar"
17
+ v-bind="{ size: ui.avatar.size, ...link.avatar }"
18
+ :class="[ui.avatar.base]"
19
+ />
20
+ </slot>
21
+ <slot name="icon" :link="link" :is-active="isActive">
22
+ <UIcon
23
+ v-if="link.icon"
24
+ :name="link.icon"
25
+ :class="twMerge(twJoin(ui.icon.base, isActive ? ui.icon.active : ui.icon.inactive), link.iconClass)"
26
+ />
27
+ </slot>
28
+ <slot :link="link" :is-active="isActive">
29
+ <span v-if="link.label" :class="twMerge(ui.label, link.labelClass)">
30
+ <span v-if="isActive" class="sr-only">
31
+ Current page:
32
+ </span>
33
+ {{ link.label }}
34
+ </span>
35
+ </slot>
36
+ <slot name="badge" :link="link" :is-active="isActive">
37
+ <span v-if="link.badge" :class="[ui.badge.base, isActive ? ui.badge.active : ui.badge.inactive]">
38
+ {{ link.badge }}
39
+ </span>
40
+ </slot>
41
+ </ULink>
42
+ </li>
43
+ <UDivider v-if="sectionIndex < linkSections.length - 1" :ui="ui.divider" />
44
+ </ul>
37
45
  </nav>
38
46
  </template>
39
47
 
40
48
  <script>
41
- import { toRef, defineComponent } from "vue";
49
+ import { toRef, defineComponent, computed } from "vue";
50
+ import { twMerge, twJoin } from "tailwind-merge";
42
51
  import UIcon from "../elements/Icon.vue";
43
52
  import UAvatar from "../elements/Avatar.vue";
44
53
  import ULink from "../elements/Link.vue";
54
+ import UDivider from "../layout/Divider.vue";
45
55
  import { useUI } from "../../composables/useUI";
46
56
  import { mergeConfig, omit } from "../../utils";
47
57
  import appConfig from "#build/app.config";
@@ -51,7 +61,8 @@ export default defineComponent({
51
61
  components: {
52
62
  UIcon,
53
63
  UAvatar,
54
- ULink
64
+ ULink,
65
+ UDivider
55
66
  },
56
67
  inheritAttrs: false,
57
68
  props: {
@@ -61,20 +72,26 @@ export default defineComponent({
61
72
  },
62
73
  class: {
63
74
  type: [String, Object, Array],
64
- default: void 0
75
+ default: () => ""
65
76
  },
66
77
  ui: {
67
78
  type: Object,
68
- default: void 0
79
+ default: () => ({})
69
80
  }
70
81
  },
71
82
  setup(props) {
72
83
  const { ui, attrs } = useUI("verticalNavigation", toRef(props, "ui"), config, toRef(props, "class"));
84
+ const linkSections = computed(() => {
85
+ return Array.isArray(props.links[0]) ? props.links : [props.links];
86
+ });
73
87
  return {
74
88
  // eslint-disable-next-line vue/no-dupe-keys
75
89
  ui,
76
90
  attrs,
77
- omit
91
+ omit,
92
+ linkSections,
93
+ twMerge,
94
+ twJoin
78
95
  };
79
96
  }
80
97
  });
@@ -1,18 +1,19 @@
1
1
  import type { PropType } from 'vue';
2
+ import { twJoin } from 'tailwind-merge';
2
3
  import { omit } from '../../utils';
3
4
  import type { VerticalNavigationLink } from '../../types';
4
5
  declare const _default: import("vue").DefineComponent<{
5
6
  links: {
6
- type: PropType<VerticalNavigationLink[]>;
7
+ type: PropType<VerticalNavigationLink[] | VerticalNavigationLink[][]>;
7
8
  default: () => never[];
8
9
  };
9
10
  class: {
10
11
  type: PropType<any>;
11
- default: undefined;
12
+ default: () => string;
12
13
  };
13
14
  ui: {
14
- type: PropType<Partial<any>>;
15
- default: undefined;
15
+ type: PropType<any>;
16
+ default: () => {};
16
17
  };
17
18
  }, {
18
19
  ui: import("vue").ComputedRef<any>;
@@ -20,22 +21,25 @@ declare const _default: import("vue").DefineComponent<{
20
21
  [x: string]: unknown;
21
22
  }, string>>;
22
23
  omit: typeof omit;
24
+ linkSections: import("vue").ComputedRef<VerticalNavigationLink[][]>;
25
+ twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
26
+ twJoin: typeof twJoin;
23
27
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
28
  links: {
25
- type: PropType<VerticalNavigationLink[]>;
29
+ type: PropType<VerticalNavigationLink[] | VerticalNavigationLink[][]>;
26
30
  default: () => never[];
27
31
  };
28
32
  class: {
29
33
  type: PropType<any>;
30
- default: undefined;
34
+ default: () => string;
31
35
  };
32
36
  ui: {
33
- type: PropType<Partial<any>>;
34
- default: undefined;
37
+ type: PropType<any>;
38
+ default: () => {};
35
39
  };
36
40
  }>>, {
37
- ui: Partial<any>;
41
+ ui: any;
38
42
  class: any;
39
- links: VerticalNavigationLink[];
43
+ links: VerticalNavigationLink[] | VerticalNavigationLink[][];
40
44
  }, {}>;
41
45
  export default _default;
@@ -2,7 +2,8 @@
2
2
  <div v-if="isOpen" ref="container" :class="wrapperClass" v-bind="attrs">
3
3
  <Transition appear v-bind="ui.transition">
4
4
  <div>
5
- <div v-if="popper.arrow" data-popper-arrow :class="['invisible before:visible before:block before:rotate-45 before:z-[-1]', Object.values(ui.arrow)]" />
5
+ <div v-if="popper.arrow" data-popper-arrow :class="Object.values(ui.arrow)" />
6
+
6
7
  <div :class="[ui.base, ui.ring, ui.rounded, ui.shadow, ui.background]">
7
8
  <slot />
8
9
  </div>
@@ -39,11 +40,11 @@ export default defineComponent({
39
40
  },
40
41
  class: {
41
42
  type: [String, Object, Array],
42
- default: void 0
43
+ default: () => ""
43
44
  },
44
45
  ui: {
45
46
  type: Object,
46
- default: void 0
47
+ default: () => ({})
47
48
  }
48
49
  },
49
50
  emits: ["update:modelValue", "close"],
@@ -15,11 +15,11 @@ declare const _default: import("vue").DefineComponent<{
15
15
  };
16
16
  class: {
17
17
  type: PropType<any>;
18
- default: undefined;
18
+ default: () => string;
19
19
  };
20
20
  ui: {
21
- type: PropType<Partial<any>>;
22
- default: undefined;
21
+ type: PropType<any>;
22
+ default: () => {};
23
23
  };
24
24
  }, {
25
25
  ui: import("vue").ComputedRef<any>;
@@ -45,17 +45,17 @@ declare const _default: import("vue").DefineComponent<{
45
45
  };
46
46
  class: {
47
47
  type: PropType<any>;
48
- default: undefined;
48
+ default: () => string;
49
49
  };
50
50
  ui: {
51
- type: PropType<Partial<any>>;
52
- default: undefined;
51
+ type: PropType<any>;
52
+ default: () => {};
53
53
  };
54
54
  }>> & {
55
55
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
56
56
  onClose?: ((...args: any[]) => any) | undefined;
57
57
  }, {
58
- ui: Partial<any>;
58
+ ui: any;
59
59
  popper: PopperOptions;
60
60
  class: any;
61
61
  modelValue: boolean;
@@ -14,10 +14,7 @@
14
14
  ui.background,
15
15
  ui.ring,
16
16
  ui.shadow,
17
- fullscreen ? 'w-screen' : ui.width,
18
- fullscreen ? 'h-screen' : ui.height,
19
- fullscreen ? 'rounded-none' : ui.rounded,
20
- fullscreen ? 'm-0' : ui.margin
17
+ fullscreen ? ui.fullscreen : [ui.width, ui.height, ui.rounded, ui.margin],
21
18
  ]"
22
19
  >
23
20
  <slot />
@@ -72,11 +69,11 @@ export default defineComponent({
72
69
  },
73
70
  class: {
74
71
  type: [String, Object, Array],
75
- default: void 0
72
+ default: () => ""
76
73
  },
77
74
  ui: {
78
75
  type: Object,
79
- default: void 0
76
+ default: () => ({})
80
77
  }
81
78
  },
82
79
  emits: ["update:modelValue", "close"],
@@ -26,11 +26,11 @@ declare const _default: import("vue").DefineComponent<{
26
26
  };
27
27
  class: {
28
28
  type: PropType<any>;
29
- default: undefined;
29
+ default: () => string;
30
30
  };
31
31
  ui: {
32
- type: PropType<Partial<any>>;
33
- default: undefined;
32
+ type: PropType<any>;
33
+ default: () => {};
34
34
  };
35
35
  }, {
36
36
  ui: import("vue").ComputedRef<any>;
@@ -67,22 +67,22 @@ declare const _default: import("vue").DefineComponent<{
67
67
  };
68
68
  class: {
69
69
  type: PropType<any>;
70
- default: undefined;
70
+ default: () => string;
71
71
  };
72
72
  ui: {
73
- type: PropType<Partial<any>>;
74
- default: undefined;
73
+ type: PropType<any>;
74
+ default: () => {};
75
75
  };
76
76
  }>> & {
77
77
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
78
78
  onClose?: ((...args: any[]) => any) | undefined;
79
79
  }, {
80
- ui: Partial<any>;
80
+ ui: any;
81
+ transition: boolean;
81
82
  class: any;
82
83
  modelValue: boolean;
83
84
  appear: boolean;
84
85
  overlay: boolean;
85
- transition: boolean;
86
86
  preventClose: boolean;
87
87
  fullscreen: boolean;
88
88
  }, {}>;
@@ -12,7 +12,7 @@
12
12
  <UIcon v-if="icon" :name="icon" :class="iconClass" />
13
13
  <UAvatar v-if="avatar" v-bind="{ size: ui.avatar.size, ...avatar }" :class="ui.avatar.base" />
14
14
 
15
- <div class="w-0 flex-1">
15
+ <div :class="ui.inner">
16
16
  <p :class="ui.title">
17
17
  <slot name="title" :title="title">
18
18
  {{ title }}
@@ -25,15 +25,15 @@
25
25
  </p>
26
26
 
27
27
  <div v-if="(description || $slots.description) && actions.length" :class="ui.actions">
28
- <UButton v-for="(action, index) of actions" :key="index" v-bind="{ ...ui.default.actionButton, ...action }" @click.stop="onAction(action)" />
28
+ <UButton v-for="(action, index) of actions" :key="index" v-bind="{ ...(ui.default.actionButton || {}), ...action }" @click.stop="onAction(action)" />
29
29
  </div>
30
30
  </div>
31
31
  <div v-if="closeButton || (!description && !$slots.description && actions.length)" :class="twMerge(ui.actions, 'mt-0')">
32
32
  <template v-if="!description && !$slots.description && actions.length">
33
- <UButton v-for="(action, index) of actions" :key="index" v-bind="{ ...ui.default.actionButton, ...action }" @click.stop="onAction(action)" />
33
+ <UButton v-for="(action, index) of actions" :key="index" v-bind="{ ...(ui.default.actionButton || {}), ...action }" @click.stop="onAction(action)" />
34
34
  </template>
35
35
 
36
- <UButton v-if="closeButton" aria-label="Close" v-bind="{ ...ui.default.closeButton, ...closeButton }" @click.stop="onClose" />
36
+ <UButton v-if="closeButton" aria-label="Close" v-bind="{ ...(ui.default.closeButton || {}), ...closeButton }" @click.stop="onClose" />
37
37
  </div>
38
38
  </div>
39
39
  <div v-if="timeout" :class="progressClass" :style="progressStyle" />
@@ -107,11 +107,11 @@ export default defineComponent({
107
107
  },
108
108
  class: {
109
109
  type: [String, Object, Array],
110
- default: void 0
110
+ default: () => ""
111
111
  },
112
112
  ui: {
113
113
  type: Object,
114
- default: void 0
114
+ default: () => ({})
115
115
  }
116
116
  },
117
117
  emits: ["close"],
@@ -122,7 +122,7 @@ export default defineComponent({
122
122
  const wrapperClass = computed(() => {
123
123
  return twMerge(twJoin(
124
124
  ui.value.wrapper,
125
- ui.value.background,
125
+ ui.value.background?.replaceAll("{color}", props.color),
126
126
  ui.value.rounded,
127
127
  ui.value.shadow
128
128
  ), props.class);
@@ -44,11 +44,11 @@ declare const _default: import("vue").DefineComponent<{
44
44
  };
45
45
  class: {
46
46
  type: PropType<any>;
47
- default: undefined;
47
+ default: () => "";
48
48
  };
49
49
  ui: {
50
- type: PropType<Partial<any>>;
51
- default: undefined;
50
+ type: PropType<any>;
51
+ default: () => {};
52
52
  };
53
53
  }, {
54
54
  ui: import("vue").ComputedRef<any>;
@@ -110,16 +110,16 @@ declare const _default: import("vue").DefineComponent<{
110
110
  };
111
111
  class: {
112
112
  type: PropType<any>;
113
- default: undefined;
113
+ default: () => "";
114
114
  };
115
115
  ui: {
116
- type: PropType<Partial<any>>;
117
- default: undefined;
116
+ type: PropType<any>;
117
+ default: () => {};
118
118
  };
119
119
  }>> & {
120
120
  onClose?: ((...args: any[]) => any) | undefined;
121
121
  }, {
122
- ui: Partial<any>;
122
+ ui: any;
123
123
  description: string;
124
124
  icon: string;
125
125
  avatar: Avatar;
@@ -38,11 +38,11 @@ export default defineComponent({
38
38
  props: {
39
39
  class: {
40
40
  type: [String, Object, Array],
41
- default: void 0
41
+ default: () => ""
42
42
  },
43
43
  ui: {
44
44
  type: Object,
45
- default: void 0
45
+ default: () => ({})
46
46
  }
47
47
  },
48
48
  setup(props) {
@@ -3,11 +3,11 @@ import type { Notification } from '../../types';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  class: {
5
5
  type: PropType<any>;
6
- default: undefined;
6
+ default: () => string;
7
7
  };
8
8
  ui: {
9
- type: PropType<Partial<any>>;
10
- default: undefined;
9
+ type: PropType<any>;
10
+ default: () => {};
11
11
  };
12
12
  }, {
13
13
  ui: import("vue").ComputedRef<any>;
@@ -36,14 +36,14 @@ declare const _default: import("vue").DefineComponent<{
36
36
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
37
37
  class: {
38
38
  type: PropType<any>;
39
- default: undefined;
39
+ default: () => string;
40
40
  };
41
41
  ui: {
42
- type: PropType<Partial<any>>;
43
- default: undefined;
42
+ type: PropType<any>;
43
+ default: () => {};
44
44
  };
45
45
  }>>, {
46
- ui: Partial<any>;
46
+ ui: any;
47
47
  class: any;
48
48
  }, {}>;
49
49
  export default _default;