@nuxt/ui 2.18.2 → 2.18.4

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 (127) hide show
  1. package/dist/module.d.mts +1 -1
  2. package/dist/module.d.ts +1 -1
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +1 -1
  5. package/dist/runtime/components/data/Table.vue.d.ts +2 -2
  6. package/dist/runtime/components/elements/Accordion.vue.d.ts +2 -3
  7. package/dist/runtime/components/elements/Alert.vue.d.ts +4 -4
  8. package/dist/runtime/components/elements/Avatar.vue.d.ts +3 -3
  9. package/dist/runtime/components/elements/AvatarGroup.d.ts +1 -1
  10. package/dist/runtime/components/elements/Badge.vue.d.ts +2 -2
  11. package/dist/runtime/components/elements/Button.vue.d.ts +15 -15
  12. package/dist/runtime/components/elements/ButtonGroup.d.ts +1 -1
  13. package/dist/runtime/components/elements/Carousel.vue.d.ts +1 -1
  14. package/dist/runtime/components/elements/Chip.vue.d.ts +4 -4
  15. package/dist/runtime/components/elements/Dropdown.vue.d.ts +2 -2
  16. package/dist/runtime/components/elements/Kbd.vue.d.ts +1 -1
  17. package/dist/runtime/components/elements/Link.vue.d.ts +9 -9
  18. package/dist/runtime/components/elements/Meter.vue.d.ts +2 -2
  19. package/dist/runtime/components/elements/MeterGroup.d.ts +2 -2
  20. package/dist/runtime/components/elements/Progress.vue.d.ts +2 -2
  21. package/dist/runtime/components/forms/Checkbox.vue.d.ts +3 -3
  22. package/dist/runtime/components/forms/Form.vue +2 -5
  23. package/dist/runtime/components/forms/Form.vue.d.ts +1 -1
  24. package/dist/runtime/components/forms/FormGroup.vue.d.ts +2 -2
  25. package/dist/runtime/components/forms/Input.vue.d.ts +5 -5
  26. package/dist/runtime/components/forms/InputMenu.vue.d.ts +6 -6
  27. package/dist/runtime/components/forms/Radio.vue.d.ts +3 -3
  28. package/dist/runtime/components/forms/RadioGroup.vue.d.ts +3 -3
  29. package/dist/runtime/components/forms/Range.vue.d.ts +3 -3
  30. package/dist/runtime/components/forms/Select.vue.d.ts +5 -5
  31. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +6 -6
  32. package/dist/runtime/components/forms/Textarea.vue.d.ts +4 -4
  33. package/dist/runtime/components/forms/Toggle.vue.d.ts +2 -2
  34. package/dist/runtime/components/layout/Card.vue.d.ts +1 -1
  35. package/dist/runtime/components/layout/Container.vue.d.ts +1 -1
  36. package/dist/runtime/components/layout/Divider.vue.d.ts +3 -3
  37. package/dist/runtime/components/layout/Skeleton.vue.d.ts +1 -1
  38. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +1 -1
  39. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +1 -1
  40. package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +1 -1
  41. package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +1 -1
  42. package/dist/runtime/components/navigation/Pagination.vue.d.ts +1 -1
  43. package/dist/runtime/components/navigation/Tabs.vue +5 -2
  44. package/dist/runtime/components/navigation/Tabs.vue.d.ts +2 -2
  45. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +1 -1
  46. package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +2 -2
  47. package/dist/runtime/components/overlays/Modal.vue.d.ts +2 -2
  48. package/dist/runtime/components/overlays/Notification.vue.d.ts +4 -4
  49. package/dist/runtime/components/overlays/Notifications.vue.d.ts +5 -5
  50. package/dist/runtime/components/overlays/Popover.vue.d.ts +2 -2
  51. package/dist/runtime/components/overlays/Slideover.vue +1 -1
  52. package/dist/runtime/components/overlays/Slideover.vue.d.ts +3 -3
  53. package/dist/runtime/components/overlays/Tooltip.vue.d.ts +3 -3
  54. package/dist/runtime/composables/useFormGroup.d.ts +1 -1
  55. package/dist/runtime/composables/useFormGroup.js +13 -17
  56. package/dist/runtime/composables/usePopper.d.ts +6 -6
  57. package/dist/runtime/composables/useUI.d.ts +1 -1
  58. package/dist/runtime/plugins/colors.js +3 -3
  59. package/dist/runtime/types/accordion.d.ts +7 -6
  60. package/dist/runtime/types/alert.d.ts +10 -8
  61. package/dist/runtime/types/avatar.d.ts +15 -13
  62. package/dist/runtime/types/badge.d.ts +13 -11
  63. package/dist/runtime/types/breadcrumb.d.ts +8 -6
  64. package/dist/runtime/types/button.d.ts +29 -27
  65. package/dist/runtime/types/chip.d.ts +13 -11
  66. package/dist/runtime/types/clipboard.d.ts +1 -7
  67. package/dist/runtime/types/command-palette.d.ts +25 -23
  68. package/dist/runtime/types/component.d.ts +14 -17
  69. package/dist/runtime/types/divider.d.ts +3 -2
  70. package/dist/runtime/types/dropdown.d.ts +13 -12
  71. package/dist/runtime/types/form-group.d.ts +5 -4
  72. package/dist/runtime/types/form.d.ts +28 -29
  73. package/dist/runtime/types/horizontal-navigation.d.ts +11 -10
  74. package/dist/runtime/types/index.js +31 -31
  75. package/dist/runtime/types/input.d.ts +8 -7
  76. package/dist/runtime/types/kbd.d.ts +5 -4
  77. package/dist/runtime/types/link.d.ts +10 -9
  78. package/dist/runtime/types/meter.d.ts +5 -4
  79. package/dist/runtime/types/modal.d.ts +15 -13
  80. package/dist/runtime/types/notification.d.ts +20 -17
  81. package/dist/runtime/types/popper.d.ts +15 -13
  82. package/dist/runtime/types/progress.d.ts +6 -5
  83. package/dist/runtime/types/range.d.ts +7 -6
  84. package/dist/runtime/types/select.d.ts +8 -7
  85. package/dist/runtime/types/slideover.d.ts +12 -10
  86. package/dist/runtime/types/tabs.d.ts +6 -6
  87. package/dist/runtime/types/textarea.d.ts +8 -7
  88. package/dist/runtime/types/toggle.d.ts +7 -6
  89. package/dist/runtime/types/tooltip.d.ts +5 -5
  90. package/dist/runtime/types/utils.d.ts +31 -11
  91. package/dist/runtime/types/vertical-navigation.d.ts +11 -10
  92. package/dist/runtime/utils/colors.js +75 -67
  93. package/dist/runtime/utils/index.d.ts +1 -1
  94. package/dist/runtime/utils/link.d.ts +1 -1
  95. package/package.json +6 -6
  96. package/dist/runtime/types/accordion.js +0 -0
  97. package/dist/runtime/types/alert.js +0 -0
  98. package/dist/runtime/types/avatar.js +0 -0
  99. package/dist/runtime/types/badge.js +0 -0
  100. package/dist/runtime/types/breadcrumb.js +0 -0
  101. package/dist/runtime/types/button.js +0 -0
  102. package/dist/runtime/types/chip.js +0 -0
  103. package/dist/runtime/types/clipboard.js +0 -0
  104. package/dist/runtime/types/command-palette.js +0 -0
  105. package/dist/runtime/types/component.js +0 -0
  106. package/dist/runtime/types/divider.js +0 -0
  107. package/dist/runtime/types/dropdown.js +0 -0
  108. package/dist/runtime/types/form-group.js +0 -0
  109. package/dist/runtime/types/form.js +0 -0
  110. package/dist/runtime/types/horizontal-navigation.js +0 -0
  111. package/dist/runtime/types/input.js +0 -0
  112. package/dist/runtime/types/kbd.js +0 -0
  113. package/dist/runtime/types/link.js +0 -0
  114. package/dist/runtime/types/meter.js +0 -0
  115. package/dist/runtime/types/modal.js +0 -0
  116. package/dist/runtime/types/notification.js +0 -0
  117. package/dist/runtime/types/popper.js +0 -0
  118. package/dist/runtime/types/progress.js +0 -0
  119. package/dist/runtime/types/range.js +0 -0
  120. package/dist/runtime/types/select.js +0 -0
  121. package/dist/runtime/types/slideover.js +0 -0
  122. package/dist/runtime/types/tabs.js +0 -0
  123. package/dist/runtime/types/textarea.js +0 -0
  124. package/dist/runtime/types/toggle.js +0 -0
  125. package/dist/runtime/types/tooltip.js +0 -0
  126. package/dist/runtime/types/utils.js +0 -0
  127. package/dist/runtime/types/vertical-navigation.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { ToggleSize, ToggleColor, Strategy } from '../../types.js';
2
+ import type { ToggleSize, ToggleColor, Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  base: string;
5
5
  rounded: string;
@@ -249,9 +249,9 @@ declare const _default: import("vue").DefineComponent<{
249
249
  name: string;
250
250
  size: ToggleSize;
251
251
  class: any;
252
+ color: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
252
253
  disabled: boolean;
253
254
  ui: {};
254
- color: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
255
255
  id: string;
256
256
  modelValue: boolean;
257
257
  loading: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { Strategy } from '../../types.js';
2
+ import type { Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  base: string;
5
5
  background: string;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { Strategy } from '../../types.js';
2
+ import type { Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  base: string;
5
5
  padding: string;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { Avatar, DividerSize, Strategy } from '../../types.js';
2
+ import type { Avatar, DividerSize, Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: {
5
5
  base: string;
@@ -189,10 +189,10 @@ declare const _default: import("vue").DefineComponent<{
189
189
  size: DividerSize;
190
190
  type: "solid" | "dotted" | "dashed";
191
191
  class: any;
192
- ui: {};
193
192
  avatar: any;
194
193
  label: string;
195
- icon: string;
196
194
  orientation: "horizontal" | "vertical";
195
+ ui: {};
196
+ icon: string;
197
197
  }, {}>;
198
198
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { Strategy } from '../../types.js';
2
+ import type { Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  base: string;
5
5
  background: string;
@@ -1,6 +1,6 @@
1
1
  import type { PropType } from 'vue';
2
2
  import { twJoin } from 'tailwind-merge';
3
- import type { BreadcrumbLink, Strategy } from '../../types.js';
3
+ import type { BreadcrumbLink, Strategy } from '../../types/index.js';
4
4
  declare const config: {
5
5
  wrapper: string;
6
6
  ol: string;
@@ -1,6 +1,6 @@
1
1
  import type { ComputedRef, PropType, ComponentPublicInstance } from 'vue';
2
2
  import type { UseFuseOptions } from '@vueuse/integrations/useFuse';
3
- import type { Group, Command, Button, Strategy } from '../../types.js';
3
+ import type { Group, Command, Button, Strategy } from '../../types/index.js';
4
4
  declare const config: {
5
5
  wrapper: string;
6
6
  container: string;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { Command, Group } from '../../types.js';
2
+ import type { Command, Group } from '../../types/index.js';
3
3
  import { commandPalette } from '#ui/ui.config';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  group: {
@@ -1,6 +1,6 @@
1
1
  import type { PropType } from 'vue';
2
2
  import { twJoin } from 'tailwind-merge';
3
- import type { HorizontalNavigationLink, Strategy } from '../../types.js';
3
+ import type { HorizontalNavigationLink, Strategy } from '../../types/index.js';
4
4
  declare const config: {
5
5
  wrapper: string;
6
6
  container: string;
@@ -1,6 +1,6 @@
1
1
  import type { PropType } from 'vue';
2
2
  import type { RouteLocationRaw } from '#vue-router';
3
- import type { Button, ButtonSize, Strategy } from '../../types.js';
3
+ import type { Button, ButtonSize, Strategy } from '../../types/index.js';
4
4
  declare const config: {
5
5
  wrapper: string;
6
6
  base: string;
@@ -53,7 +53,7 @@
53
53
  </template>
54
54
 
55
55
  <script>
56
- import { toRef, ref, watch, onMounted, defineComponent } from "vue";
56
+ import { toRef, ref, watch, onMounted, defineComponent, nextTick } from "vue";
57
57
  import { TabGroup as HTabGroup, TabList as HTabList, Tab as HTab, TabPanels as HTabPanels, TabPanel as HTabPanel, provideUseId } from "@headlessui/vue";
58
58
  import { useResizeObserver } from "@vueuse/core";
59
59
  import UIcon from "../elements/Icon.vue";
@@ -143,7 +143,10 @@ export default defineComponent({
143
143
  selectedIndex.value = value;
144
144
  calcMarkerSize(selectedIndex.value);
145
145
  });
146
- onMounted(() => calcMarkerSize(selectedIndex.value));
146
+ onMounted(async () => {
147
+ await nextTick();
148
+ calcMarkerSize(selectedIndex.value);
149
+ });
147
150
  provideUseId(() => useId());
148
151
  return {
149
152
  // eslint-disable-next-line vue/no-dupe-keys
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { TabItem, Strategy } from '../../types.js';
2
+ import type { TabItem, Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: string;
5
5
  container: string;
@@ -154,9 +154,9 @@ declare const _default: import("vue").DefineComponent<{
154
154
  "onUpdate:modelValue"?: (...args: any[]) => any;
155
155
  }, {
156
156
  class: any;
157
- ui: {};
158
157
  content: boolean;
159
158
  orientation: "horizontal" | "vertical";
159
+ ui: {};
160
160
  modelValue: number;
161
161
  unmount: boolean;
162
162
  items: TabItem[];
@@ -1,6 +1,6 @@
1
1
  import type { PropType } from 'vue';
2
2
  import { twJoin } from 'tailwind-merge';
3
- import type { VerticalNavigationLink, Strategy } from '../../types.js';
3
+ import type { VerticalNavigationLink, Strategy } from '../../types/index.js';
4
4
  declare const config: {
5
5
  wrapper: string;
6
6
  base: string;
@@ -1,5 +1,5 @@
1
1
  import type { PropType, Ref } from 'vue';
2
- import type { PopperOptions, Strategy } from '../../types.js';
2
+ import type { PopperOptions, Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: string;
5
5
  container: string;
@@ -119,8 +119,8 @@ declare const _default: import("vue").DefineComponent<{
119
119
  "onUpdate:modelValue"?: (...args: any[]) => any;
120
120
  }, {
121
121
  class: any;
122
- ui: {};
123
122
  popper: PopperOptions;
123
+ ui: {};
124
124
  modelValue: boolean;
125
125
  }, {}>;
126
126
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { Strategy } from '../../types.js';
2
+ import type { Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: string;
5
5
  inner: string;
@@ -155,8 +155,8 @@ declare const _default: import("vue").DefineComponent<{
155
155
  "onAfter-leave"?: (...args: any[]) => any;
156
156
  }, {
157
157
  class: any;
158
- ui: {};
159
158
  transition: boolean;
159
+ ui: {};
160
160
  appear: boolean;
161
161
  overlay: boolean;
162
162
  preventClose: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { Avatar, Button, NotificationColor, NotificationAction, Strategy } from '../../types.js';
2
+ import type { Avatar, Button, NotificationColor, NotificationAction, Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: string;
5
5
  container: string;
@@ -221,12 +221,12 @@ declare const _default: import("vue").DefineComponent<{
221
221
  onClose?: (...args: any[]) => any;
222
222
  }, {
223
223
  class: any;
224
- ui: {};
225
- color: NotificationColor;
226
224
  avatar: any;
227
- icon: string;
225
+ color: NotificationColor;
228
226
  title: string;
227
+ ui: {};
229
228
  description: string;
229
+ icon: string;
230
230
  closeButton: Button;
231
231
  timeout: number;
232
232
  actions: NotificationAction[];
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { Notification, Strategy } from '../../types.js';
2
+ import type { Notification, Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: string;
5
5
  position: string;
@@ -33,13 +33,13 @@ declare const _default: import("vue").DefineComponent<{
33
33
  title?: string;
34
34
  description?: string;
35
35
  icon?: string;
36
- avatar?: import("../../types").Avatar;
37
- closeButton?: import("../../types").Button;
36
+ avatar?: import("../../types/avatar").Avatar;
37
+ closeButton?: import("../../types/button").Button;
38
38
  timeout?: number;
39
- actions?: import("../../types").NotificationAction[];
39
+ actions?: import("../../types/notification").NotificationAction[];
40
40
  click?: (...args: any[]) => void;
41
41
  callback?: (...args: any[]) => void;
42
- color?: import("../../types").NotificationColor;
42
+ color?: import("../../types/notification").NotificationColor;
43
43
  ui?: any;
44
44
  };
45
45
  remove: (id: string) => void;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { PopperOptions, Strategy } from '../../types.js';
2
+ import type { PopperOptions, Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: string;
5
5
  container: string;
@@ -209,9 +209,9 @@ declare const _default: import("vue").DefineComponent<{
209
209
  }, {
210
210
  mode: "click" | "hover";
211
211
  class: any;
212
+ popper: PopperOptions;
212
213
  disabled: boolean;
213
214
  ui: {};
214
- popper: PopperOptions;
215
215
  overlay: boolean;
216
216
  open: boolean;
217
217
  openDelay: number;
@@ -149,4 +149,4 @@ export default defineComponent({
149
149
  };
150
150
  }
151
151
  });
152
- </script>
152
+ </script>
@@ -1,5 +1,5 @@
1
1
  import type { WritableComputedRef, PropType } from 'vue';
2
- import type { Strategy } from '../../types.js';
2
+ import type { Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: string;
5
5
  overlay: {
@@ -156,12 +156,12 @@ declare const _default: import("vue").DefineComponent<{
156
156
  "onAfter-leave"?: (...args: any[]) => any;
157
157
  }, {
158
158
  class: any;
159
- ui: {};
160
159
  transition: boolean;
160
+ ui: {};
161
161
  appear: boolean;
162
162
  overlay: boolean;
163
163
  preventClose: boolean;
164
- side: "right" | "left" | "top" | "bottom";
164
+ side: "bottom" | "left" | "right" | "top";
165
165
  modelValue: boolean;
166
166
  }, {}>;
167
167
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { PopperOptions, Strategy } from '../../types.js';
2
+ import type { PopperOptions, Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: string;
5
5
  container: string;
@@ -154,12 +154,12 @@ declare const _default: import("vue").DefineComponent<{
154
154
  };
155
155
  }>>, {
156
156
  class: any;
157
- ui: {};
158
- shortcuts: string[];
159
157
  popper: PopperOptions;
160
158
  text: string;
159
+ ui: {};
161
160
  openDelay: number;
162
161
  closeDelay: number;
162
+ shortcuts: string[];
163
163
  prevent: boolean;
164
164
  }, {}>;
165
165
  export default _default;
@@ -9,7 +9,7 @@ type InputProps = {
9
9
  export declare const useFormGroup: (inputProps?: InputProps, config?: any) => {
10
10
  inputId: import("vue").ComputedRef<string>;
11
11
  name: import("vue").ComputedRef<string>;
12
- size: import("vue").ComputedRef<string | number | symbol>;
12
+ size: import("vue").ComputedRef<any>;
13
13
  color: import("vue").ComputedRef<string>;
14
14
  emitFormBlur: () => void;
15
15
  emitFormInput: import("@vueuse/shared").PromisifyFn<() => void>;
@@ -1,19 +1,15 @@
1
1
  import { inject, ref, computed } from "vue";
2
2
  import { useDebounceFn } from "@vueuse/core";
3
- import { mergeConfig } from "../utils/index.js";
4
- import appConfig from "#build/app.config";
5
- import { formGroup } from "#ui/ui.config";
6
- const formGroupConfig = mergeConfig(appConfig.ui.strategy, appConfig.ui.formGroup, formGroup);
7
3
  export const useFormGroup = (inputProps, config) => {
8
4
  const formBus = inject("form-events", void 0);
9
- const formGroup2 = inject("form-group", void 0);
5
+ const formGroup = inject("form-group", void 0);
10
6
  const formInputs = inject("form-inputs", void 0);
11
- if (formGroup2) {
7
+ if (formGroup) {
12
8
  if (inputProps?.id) {
13
- formGroup2.inputId.value = inputProps?.id;
9
+ formGroup.inputId.value = inputProps?.id;
14
10
  }
15
11
  if (formInputs) {
16
- formInputs.value[formGroup2.name.value] = formGroup2.inputId.value;
12
+ formInputs.value[formGroup.name.value] = formGroup.inputId.value;
17
13
  }
18
14
  }
19
15
  const blurred = ref(false);
@@ -23,25 +19,25 @@ export const useFormGroup = (inputProps, config) => {
23
19
  }
24
20
  }
25
21
  function emitFormBlur() {
26
- emitFormEvent("blur", formGroup2?.name.value);
22
+ emitFormEvent("blur", formGroup?.name.value);
27
23
  blurred.value = true;
28
24
  }
29
25
  function emitFormChange() {
30
- emitFormEvent("change", formGroup2?.name.value);
26
+ emitFormEvent("change", formGroup?.name.value);
31
27
  }
32
28
  const emitFormInput = useDebounceFn(() => {
33
- if (blurred.value || formGroup2?.eagerValidation.value) {
34
- emitFormEvent("input", formGroup2?.name.value);
29
+ if (blurred.value || formGroup?.eagerValidation.value) {
30
+ emitFormEvent("input", formGroup?.name.value);
35
31
  }
36
32
  }, 300);
37
33
  return {
38
- inputId: computed(() => inputProps?.id ?? formGroup2?.inputId.value),
39
- name: computed(() => inputProps?.name ?? formGroup2?.name.value),
34
+ inputId: computed(() => inputProps?.id ?? formGroup?.inputId.value),
35
+ name: computed(() => inputProps?.name ?? formGroup?.name.value),
40
36
  size: computed(() => {
41
- const formGroupSize = config.size[formGroup2?.size.value] ? formGroup2?.size.value : null;
42
- return inputProps?.size ?? formGroupSize ?? formGroupConfig?.default?.size;
37
+ const formGroupSize = config.size[formGroup?.size.value] ? formGroup?.size.value : null;
38
+ return inputProps?.size ?? formGroupSize ?? config.default?.size;
43
39
  }),
44
- color: computed(() => formGroup2?.error?.value ? "red" : inputProps?.color),
40
+ color: computed(() => formGroup?.error?.value ? "red" : inputProps?.color),
45
41
  emitFormBlur,
46
42
  emitFormInput,
47
43
  emitFormChange
@@ -197,7 +197,7 @@ export declare function usePopper({ locked, overflowPadding, offsetDistance, off
197
197
  y: number;
198
198
  x: number;
199
199
  };
200
- right?: {
200
+ bottom?: {
201
201
  y: number;
202
202
  x: number;
203
203
  };
@@ -205,23 +205,23 @@ export declare function usePopper({ locked, overflowPadding, offsetDistance, off
205
205
  y: number;
206
206
  x: number;
207
207
  };
208
- auto?: {
208
+ right?: {
209
209
  y: number;
210
210
  x: number;
211
211
  };
212
- "auto-start"?: {
212
+ top?: {
213
213
  y: number;
214
214
  x: number;
215
215
  };
216
- "auto-end"?: {
216
+ auto?: {
217
217
  y: number;
218
218
  x: number;
219
219
  };
220
- top?: {
220
+ "auto-start"?: {
221
221
  y: number;
222
222
  x: number;
223
223
  };
224
- bottom?: {
224
+ "auto-end"?: {
225
225
  y: number;
226
226
  x: number;
227
227
  };
@@ -1,5 +1,5 @@
1
1
  import type { Ref } from 'vue';
2
- import type { Strategy } from '../types.js';
2
+ import type { Strategy } from '../types/index.js';
3
3
  export declare const useUI: <T>(key: any, $ui?: Ref<(Partial<T> & {
4
4
  strategy?: Strategy;
5
5
  }) | undefined>, $config?: Ref<T> | T, $wrapperClass?: Ref<string>, withAppConfig?: boolean) => {
@@ -1,13 +1,13 @@
1
1
  import { computed } from "vue";
2
- import { hexToRgb } from "../utils/index.js";
2
+ import { get, hexToRgb } from "../utils/index.js";
3
3
  import { defineNuxtPlugin, useAppConfig, useNuxtApp, useHead } from "#imports";
4
4
  import colors from "#tailwind-config/theme/colors";
5
5
  export default defineNuxtPlugin(() => {
6
6
  const appConfig = useAppConfig();
7
7
  const nuxtApp = useNuxtApp();
8
8
  const root = computed(() => {
9
- const primary = colors[appConfig.ui.primary];
10
- const gray = colors[appConfig.ui.gray];
9
+ const primary = get(colors, appConfig.ui.primary);
10
+ const gray = get(colors, appConfig.ui.gray);
11
11
  if (!primary) {
12
12
  console.warn(`[@nuxt/ui] Primary color '${appConfig.ui.primary}' not found in Tailwind config`);
13
13
  }
@@ -1,8 +1,9 @@
1
- import type { Button } from './button.js';
1
+ import type { Button } from './button'
2
+
2
3
  export interface AccordionItem extends Button {
3
- slot?: string;
4
- disabled?: boolean;
5
- content?: string;
6
- defaultOpen?: boolean;
7
- closeOthers?: boolean;
4
+ slot?: string
5
+ disabled?: boolean
6
+ content?: string
7
+ defaultOpen?: boolean
8
+ closeOthers?: boolean
8
9
  }
@@ -1,10 +1,12 @@
1
- import { alert } from '../ui.config.js';
2
- import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.';
3
- import type { Button } from './button.js';
4
- import colors from '#ui-colors';
5
- import type { AppConfig } from 'nuxt/schema';
6
- export type AlertColor = keyof typeof alert.color | ExtractDeepKey<AppConfig, ['ui', 'alert', 'color']> | typeof colors[number];
7
- export type AlertVariant = keyof typeof alert.variant | ExtractDeepKey<AppConfig, ['ui', 'alert', 'variant']> | NestedKeyOf<typeof alert.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'alert', 'color']>>;
1
+ import { alert } from '../ui.config'
2
+ import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
3
+ import type { Button } from './button'
4
+ import colors from '#ui-colors'
5
+ import type { AppConfig } from 'nuxt/schema'
6
+
7
+ export type AlertColor = keyof typeof alert.color | ExtractDeepKey<AppConfig, ['ui', 'alert', 'color']> | typeof colors[number]
8
+ export type AlertVariant = keyof typeof alert.variant | ExtractDeepKey<AppConfig, ['ui', 'alert', 'variant']> | NestedKeyOf<typeof alert.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'alert', 'color']>>
9
+
8
10
  export interface AlertAction extends Button {
9
- click?: (...args: any[]) => void;
11
+ click?: (...args: any[]) => void
10
12
  }
@@ -1,15 +1,17 @@
1
- import { avatar } from '../ui.config.js';
2
- import type { ExtractDeepKey } from '.';
3
- import colors from '#ui-colors';
4
- import type { AppConfig } from 'nuxt/schema';
5
- export type AvatarSize = keyof typeof avatar.size | ExtractDeepKey<AppConfig, ['ui', 'avatar', 'size']>;
6
- export type AvatarChipColor = 'gray' | typeof colors[number];
7
- export type AvatarChipPosition = keyof typeof avatar.chip.position;
1
+ import { avatar } from '../ui.config'
2
+ import type { ExtractDeepKey } from '.'
3
+ import colors from '#ui-colors'
4
+ import type { AppConfig } from 'nuxt/schema'
5
+
6
+ export type AvatarSize = keyof typeof avatar.size | ExtractDeepKey<AppConfig, ['ui', 'avatar', 'size']>
7
+ export type AvatarChipColor = 'gray' | typeof colors[number]
8
+ export type AvatarChipPosition = keyof typeof avatar.chip.position
9
+
8
10
  export interface Avatar {
9
- src?: string | boolean;
10
- alt?: string;
11
- text?: string;
12
- size?: AvatarSize;
13
- chipColor?: AvatarChipColor;
14
- chipPosition?: AvatarChipPosition;
11
+ src?: string | boolean
12
+ alt?: string
13
+ text?: string
14
+ size?: AvatarSize
15
+ chipColor?: AvatarChipColor
16
+ chipPosition?: AvatarChipPosition
15
17
  }
@@ -1,13 +1,15 @@
1
- import { badge } from '../ui.config.js';
2
- import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.';
3
- import colors from '#ui-colors';
4
- import type { AppConfig } from 'nuxt/schema';
5
- export type BadgeSize = keyof typeof badge.size | ExtractDeepKey<AppConfig, ['ui', 'badge', 'size']>;
6
- export type BadgeColor = keyof typeof badge.color | ExtractDeepKey<AppConfig, ['ui', 'badge', 'color']> | typeof colors[number];
7
- export type BadgeVariant = keyof typeof badge.variant | ExtractDeepKey<AppConfig, ['ui', 'badge', 'variant']> | NestedKeyOf<typeof badge.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'badge', 'color']>>;
1
+ import { badge } from '../ui.config'
2
+ import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
3
+ import colors from '#ui-colors'
4
+ import type { AppConfig } from 'nuxt/schema'
5
+
6
+ export type BadgeSize = keyof typeof badge.size | ExtractDeepKey<AppConfig, ['ui', 'badge', 'size']>
7
+ export type BadgeColor = keyof typeof badge.color | ExtractDeepKey<AppConfig, ['ui', 'badge', 'color']> | typeof colors[number]
8
+ export type BadgeVariant = keyof typeof badge.variant | ExtractDeepKey<AppConfig, ['ui', 'badge', 'variant']> | NestedKeyOf<typeof badge.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'badge', 'color']>>
9
+
8
10
  export interface Badge {
9
- label?: string;
10
- size?: BadgeSize;
11
- color?: BadgeColor;
12
- variant?: BadgeVariant;
11
+ label?: string
12
+ size?: BadgeSize
13
+ color?: BadgeColor
14
+ variant?: BadgeVariant
13
15
  }
@@ -1,8 +1,10 @@
1
- import type { Link } from './link.js';
1
+ import type { Link } from './link'
2
+
2
3
  export interface BreadcrumbLink extends Link {
3
- label: string;
4
- labelClass?: string;
5
- icon?: string;
6
- iconClass?: string;
7
- [key: string]: any;
4
+ label: string
5
+ labelClass?: string
6
+ icon?: string
7
+ iconClass?: string
8
+ // FIXME: This is a workaround for `link.to` not being resolved although it extends `NuxtLinkProps`
9
+ [key: string]: any
8
10
  }
@@ -1,29 +1,31 @@
1
- import type { Link } from './link.js';
2
- import { button } from '../ui.config.js';
3
- import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.';
4
- import colors from '#ui-colors';
5
- import type { AppConfig } from 'nuxt/schema';
6
- export type ButtonSize = keyof typeof button.size | ExtractDeepKey<AppConfig, ['ui', 'button', 'size']>;
7
- export type ButtonColor = keyof typeof button.color | ExtractDeepKey<AppConfig, ['ui', 'button', 'color']> | typeof colors[number];
8
- export type ButtonVariant = keyof typeof button.variant | ExtractDeepKey<AppConfig, ['ui', 'button', 'variant']> | NestedKeyOf<typeof button.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'button', 'color']>>;
1
+ import type { Link } from './link'
2
+ import { button } from '../ui.config'
3
+ import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
4
+ import colors from '#ui-colors'
5
+ import type { AppConfig } from 'nuxt/schema'
6
+
7
+ export type ButtonSize = keyof typeof button.size | ExtractDeepKey<AppConfig, ['ui', 'button', 'size']>
8
+ export type ButtonColor = keyof typeof button.color | ExtractDeepKey<AppConfig, ['ui', 'button', 'color']> | typeof colors[number]
9
+ export type ButtonVariant = keyof typeof button.variant | ExtractDeepKey<AppConfig, ['ui', 'button', 'variant']> | NestedKeyOf<typeof button.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'button', 'color']>>
10
+
9
11
  export interface Button extends Link {
10
- type?: string;
11
- block?: boolean;
12
- label?: string;
13
- loading?: boolean;
14
- disabled?: boolean;
15
- padded?: boolean;
16
- size?: ButtonSize;
17
- color?: ButtonColor;
18
- variant?: ButtonVariant;
19
- icon?: string;
20
- loadingIcon?: string;
21
- leadingIcon?: string;
22
- trailingIcon?: string;
23
- trailing?: boolean;
24
- leading?: boolean;
25
- to?: string | object;
26
- target?: string;
27
- square?: boolean;
28
- truncate?: boolean;
12
+ type?: string
13
+ block?: boolean
14
+ label?: string
15
+ loading?: boolean
16
+ disabled?: boolean
17
+ padded?: boolean
18
+ size?: ButtonSize
19
+ color?: ButtonColor
20
+ variant?: ButtonVariant
21
+ icon?: string
22
+ loadingIcon?: string
23
+ leadingIcon?: string
24
+ trailingIcon?: string
25
+ trailing?: boolean
26
+ leading?: boolean
27
+ to?: string | object
28
+ target?: string
29
+ square?: boolean
30
+ truncate?: boolean
29
31
  }