@nuxt/ui 2.18.3 → 2.18.5

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 (76) hide show
  1. package/README.md +1 -1
  2. package/dist/module.d.mts +1 -6
  3. package/dist/module.d.ts +1 -6
  4. package/dist/module.json +2 -2
  5. package/dist/module.mjs +16 -8
  6. package/dist/runtime/components/data/Table.vue +5 -4
  7. package/dist/runtime/components/data/Table.vue.d.ts +1749 -9
  8. package/dist/runtime/components/elements/Accordion.vue.d.ts +1014 -9
  9. package/dist/runtime/components/elements/Alert.vue.d.ts +1257 -7
  10. package/dist/runtime/components/elements/Avatar.vue.d.ts +53 -7
  11. package/dist/runtime/components/elements/AvatarGroup.d.ts +6 -6
  12. package/dist/runtime/components/elements/Badge.vue.d.ts +6 -6
  13. package/dist/runtime/components/elements/Button.vue.d.ts +280 -10
  14. package/dist/runtime/components/elements/ButtonGroup.d.ts +7 -7
  15. package/dist/runtime/components/elements/Carousel.vue.d.ts +857 -7
  16. package/dist/runtime/components/elements/Chip.vue.d.ts +6 -6
  17. package/dist/runtime/components/elements/Dropdown.vue.d.ts +639 -10
  18. package/dist/runtime/components/elements/Icon.vue.d.ts +4 -4
  19. package/dist/runtime/components/elements/Kbd.vue.d.ts +6 -6
  20. package/dist/runtime/components/elements/Link.vue +1 -0
  21. package/dist/runtime/components/elements/Link.vue.d.ts +8 -8
  22. package/dist/runtime/components/elements/Meter.vue.d.ts +54 -8
  23. package/dist/runtime/components/elements/MeterGroup.d.ts +9 -7
  24. package/dist/runtime/components/elements/Progress.vue.d.ts +9 -9
  25. package/dist/runtime/components/forms/Checkbox.vue.d.ts +9 -9
  26. package/dist/runtime/components/forms/Form.vue +6 -8
  27. package/dist/runtime/components/forms/Form.vue.d.ts +13 -6
  28. package/dist/runtime/components/forms/FormGroup.vue.d.ts +8 -8
  29. package/dist/runtime/components/forms/Input.vue +1 -2
  30. package/dist/runtime/components/forms/Input.vue.d.ts +56 -10
  31. package/dist/runtime/components/forms/InputMenu.vue.d.ts +710 -13
  32. package/dist/runtime/components/forms/Radio.vue.d.ts +9 -9
  33. package/dist/runtime/components/forms/RadioGroup.vue +1 -1
  34. package/dist/runtime/components/forms/RadioGroup.vue.d.ts +188 -8
  35. package/dist/runtime/components/forms/Range.vue.d.ts +10 -10
  36. package/dist/runtime/components/forms/Select.vue.d.ts +55 -9
  37. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +909 -12
  38. package/dist/runtime/components/forms/Textarea.vue +3 -0
  39. package/dist/runtime/components/forms/Textarea.vue.d.ts +10 -10
  40. package/dist/runtime/components/forms/Toggle.vue.d.ts +143 -9
  41. package/dist/runtime/components/layout/Card.vue.d.ts +6 -6
  42. package/dist/runtime/components/layout/Container.vue.d.ts +6 -6
  43. package/dist/runtime/components/layout/Divider.vue.d.ts +408 -7
  44. package/dist/runtime/components/layout/Skeleton.vue.d.ts +6 -6
  45. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +276 -6
  46. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +1729 -9
  47. package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +545 -6
  48. package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +768 -6
  49. package/dist/runtime/components/navigation/Pagination.vue +4 -0
  50. package/dist/runtime/components/navigation/Pagination.vue.d.ts +859 -9
  51. package/dist/runtime/components/navigation/Tabs.vue +9 -2
  52. package/dist/runtime/components/navigation/Tabs.vue.d.ts +234 -11
  53. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +1413 -6
  54. package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +9 -9
  55. package/dist/runtime/components/overlays/Modal.vue.d.ts +343 -9
  56. package/dist/runtime/components/overlays/Notification.vue.d.ts +1258 -8
  57. package/dist/runtime/components/overlays/Notifications.vue.d.ts +1541 -11
  58. package/dist/runtime/components/overlays/Popover.vue.d.ts +113 -11
  59. package/dist/runtime/components/overlays/Slideover.vue +2 -2
  60. package/dist/runtime/components/overlays/Slideover.vue.d.ts +343 -9
  61. package/dist/runtime/components/overlays/Tooltip.vue.d.ts +107 -9
  62. package/dist/runtime/composables/useFormGroup.d.ts +2 -2
  63. package/dist/runtime/composables/useFormGroup.js +17 -19
  64. package/dist/runtime/composables/useModal.d.ts +1 -1
  65. package/dist/runtime/composables/usePopper.d.ts +262 -1
  66. package/dist/runtime/composables/useShortcuts.d.ts +4 -4
  67. package/dist/runtime/composables/useSlideover.d.ts +1 -1
  68. package/dist/runtime/composables/useUI.d.ts +1 -1
  69. package/dist/runtime/plugins/colors.js +5 -5
  70. package/dist/runtime/types/command-palette.d.ts +2 -2
  71. package/dist/runtime/ui.config/elements/button.js +9 -9
  72. package/dist/runtime/ui.config/elements/carousel.js +1 -1
  73. package/dist/runtime/utils/colors.js +75 -67
  74. package/dist/runtime/utils/index.d.ts +2 -1
  75. package/dist/runtime/utils/index.js +5 -1
  76. package/package.json +26 -28
@@ -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;
@@ -36,7 +36,7 @@ declare const config: {
36
36
  placement: string;
37
37
  };
38
38
  };
39
- declare const _default: import("vue").DefineComponent<{
39
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
40
40
  text: {
41
41
  type: StringConstructor;
42
42
  default: any;
@@ -71,7 +71,7 @@ declare const _default: import("vue").DefineComponent<{
71
71
  }>;
72
72
  default: () => {};
73
73
  };
74
- }, {
74
+ }>, {
75
75
  ui: import("vue").ComputedRef<{
76
76
  wrapper: string;
77
77
  container: string;
@@ -112,12 +112,12 @@ declare const _default: import("vue").DefineComponent<{
112
112
  [x: string]: unknown;
113
113
  }, string>>;
114
114
  popper: import("vue").ComputedRef<PopperOptions>;
115
- trigger: import("vue").Ref<import("@vueuse/core").MaybeElement>;
116
- container: import("vue").Ref<import("@vueuse/core").MaybeElement>;
117
- open: import("vue").Ref<boolean>;
115
+ trigger: import("vue").Ref<import("@vueuse/core").MaybeElement, import("@vueuse/core").MaybeElement>;
116
+ container: import("vue").Ref<import("@vueuse/core").MaybeElement, import("@vueuse/core").MaybeElement>;
117
+ open: import("vue").Ref<boolean, boolean>;
118
118
  onMouseEnter: () => void;
119
119
  onMouseLeave: () => void;
120
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
120
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
121
121
  text: {
122
122
  type: StringConstructor;
123
123
  default: any;
@@ -152,7 +152,7 @@ declare const _default: import("vue").DefineComponent<{
152
152
  }>;
153
153
  default: () => {};
154
154
  };
155
- }>>, {
155
+ }>> & Readonly<{}>, {
156
156
  class: any;
157
157
  popper: PopperOptions;
158
158
  text: string;
@@ -161,5 +161,103 @@ declare const _default: import("vue").DefineComponent<{
161
161
  closeDelay: number;
162
162
  shortcuts: string[];
163
163
  prevent: boolean;
164
- }, {}>;
164
+ }, {}, {
165
+ UKbd: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
166
+ value: {
167
+ type: StringConstructor;
168
+ default: any;
169
+ };
170
+ size: {
171
+ type: PropType<import("../../types/kbd").KbdSize>;
172
+ default: () => string;
173
+ validator(value: string): boolean;
174
+ };
175
+ class: {
176
+ type: PropType<any>;
177
+ default: () => "";
178
+ };
179
+ ui: {
180
+ type: PropType<Partial<{
181
+ base: string;
182
+ padding: string;
183
+ size: {
184
+ xs: string;
185
+ sm: string;
186
+ md: string;
187
+ };
188
+ rounded: string;
189
+ font: string;
190
+ background: string;
191
+ ring: string;
192
+ default: {
193
+ size: string;
194
+ };
195
+ }> & {
196
+ strategy?: Strategy;
197
+ }>;
198
+ default: () => {};
199
+ };
200
+ }>, {
201
+ ui: import("vue").ComputedRef<{
202
+ base: string;
203
+ padding: string;
204
+ size: {
205
+ xs: string;
206
+ sm: string;
207
+ md: string;
208
+ };
209
+ rounded: string;
210
+ font: string;
211
+ background: string;
212
+ ring: string;
213
+ default: {
214
+ size: string;
215
+ };
216
+ }>;
217
+ attrs: import("vue").ComputedRef<Pick<{
218
+ [x: string]: unknown;
219
+ }, string>>;
220
+ kbdClass: import("vue").ComputedRef<string>;
221
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
222
+ value: {
223
+ type: StringConstructor;
224
+ default: any;
225
+ };
226
+ size: {
227
+ type: PropType<import("../../types/kbd").KbdSize>;
228
+ default: () => string;
229
+ validator(value: string): boolean;
230
+ };
231
+ class: {
232
+ type: PropType<any>;
233
+ default: () => "";
234
+ };
235
+ ui: {
236
+ type: PropType<Partial<{
237
+ base: string;
238
+ padding: string;
239
+ size: {
240
+ xs: string;
241
+ sm: string;
242
+ md: string;
243
+ };
244
+ rounded: string;
245
+ font: string;
246
+ background: string;
247
+ ring: string;
248
+ default: {
249
+ size: string;
250
+ };
251
+ }> & {
252
+ strategy?: Strategy;
253
+ }>;
254
+ default: () => {};
255
+ };
256
+ }>> & Readonly<{}>, {
257
+ size: import("../../types/kbd").KbdSize;
258
+ class: any;
259
+ ui: {};
260
+ value: string;
261
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
262
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
165
263
  export default _default;
@@ -6,10 +6,10 @@ type InputProps = {
6
6
  eagerValidation?: boolean;
7
7
  legend?: string | null;
8
8
  };
9
- export declare const useFormGroup: (inputProps?: InputProps, config?: any) => {
9
+ export declare const useFormGroup: (inputProps?: InputProps, config?: any, bind?: boolean) => {
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,17 @@
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
- export const useFormGroup = (inputProps, config) => {
3
+ export const useFormGroup = (inputProps, config, bind = true) => {
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) {
12
- if (inputProps?.id) {
13
- formGroup2.inputId.value = inputProps?.id;
7
+ if (formGroup) {
8
+ if (!bind || inputProps.legend) {
9
+ formGroup.inputId.value = void 0;
10
+ } else if (inputProps?.id) {
11
+ formGroup.inputId.value = inputProps?.id;
14
12
  }
15
13
  if (formInputs) {
16
- formInputs.value[formGroup2.name.value] = formGroup2.inputId.value;
14
+ formInputs.value[formGroup.name.value] = formGroup.inputId.value;
17
15
  }
18
16
  }
19
17
  const blurred = ref(false);
@@ -23,25 +21,25 @@ export const useFormGroup = (inputProps, config) => {
23
21
  }
24
22
  }
25
23
  function emitFormBlur() {
26
- emitFormEvent("blur", formGroup2?.name.value);
24
+ emitFormEvent("blur", formGroup?.name.value);
27
25
  blurred.value = true;
28
26
  }
29
27
  function emitFormChange() {
30
- emitFormEvent("change", formGroup2?.name.value);
28
+ emitFormEvent("change", formGroup?.name.value);
31
29
  }
32
30
  const emitFormInput = useDebounceFn(() => {
33
- if (blurred.value || formGroup2?.eagerValidation.value) {
34
- emitFormEvent("input", formGroup2?.name.value);
31
+ if (blurred.value || formGroup?.eagerValidation.value) {
32
+ emitFormEvent("input", formGroup?.name.value);
35
33
  }
36
34
  }, 300);
37
35
  return {
38
- inputId: computed(() => inputProps?.id ?? formGroup2?.inputId.value),
39
- name: computed(() => inputProps?.name ?? formGroup2?.name.value),
36
+ inputId: computed(() => inputProps?.id ?? formGroup?.inputId.value),
37
+ name: computed(() => inputProps?.name ?? formGroup?.name.value),
40
38
  size: computed(() => {
41
- const formGroupSize = config.size[formGroup2?.size.value] ? formGroup2?.size.value : null;
42
- return inputProps?.size ?? formGroupSize ?? formGroupConfig?.default?.size;
39
+ const formGroupSize = config.size[formGroup?.size.value] ? formGroup?.size.value : null;
40
+ return inputProps?.size ?? formGroupSize ?? config.default?.size;
43
41
  }),
44
- color: computed(() => formGroup2?.error?.value ? "red" : inputProps?.color),
42
+ color: computed(() => formGroup?.error?.value ? "red" : inputProps?.color),
45
43
  emitFormBlur,
46
44
  emitFormInput,
47
45
  emitFormChange
@@ -7,7 +7,7 @@ declare function _useModal(): {
7
7
  close: () => Promise<void>;
8
8
  reset: () => void;
9
9
  patch: <T extends Component = {}>(props: Partial<Modal & ComponentProps<T>>) => void;
10
- isOpen: import("vue").Ref<boolean>;
10
+ isOpen: import("vue").Ref<boolean, boolean>;
11
11
  };
12
12
  export declare const useModal: typeof _useModal;
13
13
  export {};
@@ -4,7 +4,268 @@ import type { Instance } from '@popperjs/core';
4
4
  import type { MaybeElement } from '@vueuse/core';
5
5
  import type { PopperOptions } from '../types/popper.js';
6
6
  export declare const createPopper: <TModifier extends Partial<import("@popperjs/core").Modifier<any, any>>>(reference: Element | VirtualElement, popper: HTMLElement, options?: Partial<import("@popperjs/core").OptionsGeneric<TModifier>>) => Instance;
7
- export declare function usePopper({ locked, overflowPadding, offsetDistance, offsetSkid, gpuAcceleration, adaptive, scroll, resize, arrow, placement, strategy }: PopperOptions, virtualReference?: Ref<Element | VirtualElement>): readonly [Ref<MaybeElement>, Ref<MaybeElement>, Ref<{
7
+ export declare function usePopper({ locked, overflowPadding, offsetDistance, offsetSkid, gpuAcceleration, adaptive, scroll, resize, arrow, placement, strategy }: PopperOptions, virtualReference?: Ref<Element | VirtualElement>): readonly [Ref<MaybeElement, MaybeElement>, Ref<MaybeElement, MaybeElement>, Ref<{
8
+ state: {
9
+ elements: {
10
+ reference: Element | {
11
+ getBoundingClientRect: () => ClientRect | DOMRect;
12
+ contextElement?: Element;
13
+ };
14
+ popper: HTMLElement;
15
+ arrow?: HTMLElement;
16
+ };
17
+ options: {
18
+ placement: import("@popperjs/core").Placement;
19
+ modifiers: any[];
20
+ strategy: import("@popperjs/core").PositioningStrategy;
21
+ onFirstUpdate?: (arg0: Partial<import("@popperjs/core").State>) => void;
22
+ };
23
+ placement: import("@popperjs/core").Placement;
24
+ strategy: import("@popperjs/core").PositioningStrategy;
25
+ orderedModifiers: {
26
+ name: any;
27
+ enabled: boolean;
28
+ phase: import("@popperjs/core").ModifierPhases;
29
+ requires?: Array<string>;
30
+ requiresIfExists?: Array<string>;
31
+ fn: (arg0: import("@popperjs/core").ModifierArguments<any>) => import("@popperjs/core").State | void;
32
+ effect?: (arg0: import("@popperjs/core").ModifierArguments<any>) => (() => void) | void;
33
+ options?: Partial<any>;
34
+ data?: import("@popperjs/core").Obj;
35
+ }[];
36
+ rects: {
37
+ reference: {
38
+ width: number;
39
+ height: number;
40
+ x: number;
41
+ y: number;
42
+ };
43
+ popper: {
44
+ width: number;
45
+ height: number;
46
+ x: number;
47
+ y: number;
48
+ };
49
+ };
50
+ scrollParents: {
51
+ reference: (Element | {
52
+ innerHeight: number;
53
+ offsetHeight: number;
54
+ innerWidth: number;
55
+ offsetWidth: number;
56
+ pageXOffset: number;
57
+ pageYOffset: number;
58
+ getComputedStyle: typeof getComputedStyle;
59
+ addEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
60
+ removeEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
61
+ Element: Element;
62
+ HTMLElement: HTMLElement;
63
+ Node: Node;
64
+ toString: () => "[object Window]";
65
+ devicePixelRatio: number;
66
+ visualViewport?: {
67
+ addEventListener: {
68
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
69
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
70
+ };
71
+ dispatchEvent: {
72
+ (event: Event): boolean;
73
+ (event: Event): boolean;
74
+ };
75
+ removeEventListener: {
76
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
77
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
78
+ };
79
+ width: number;
80
+ height: number;
81
+ offsetLeft: number;
82
+ offsetTop: number;
83
+ scale: number;
84
+ };
85
+ ShadowRoot: ShadowRoot;
86
+ } | {
87
+ addEventListener: {
88
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
89
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
90
+ };
91
+ dispatchEvent: {
92
+ (event: Event): boolean;
93
+ (event: Event): boolean;
94
+ };
95
+ removeEventListener: {
96
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
97
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
98
+ };
99
+ width: number;
100
+ height: number;
101
+ offsetLeft: number;
102
+ offsetTop: number;
103
+ scale: number;
104
+ })[];
105
+ popper: (Element | {
106
+ innerHeight: number;
107
+ offsetHeight: number;
108
+ innerWidth: number;
109
+ offsetWidth: number;
110
+ pageXOffset: number;
111
+ pageYOffset: number;
112
+ getComputedStyle: typeof getComputedStyle;
113
+ addEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
114
+ removeEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
115
+ Element: Element;
116
+ HTMLElement: HTMLElement;
117
+ Node: Node;
118
+ toString: () => "[object Window]";
119
+ devicePixelRatio: number;
120
+ visualViewport?: {
121
+ addEventListener: {
122
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
123
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
124
+ };
125
+ dispatchEvent: {
126
+ (event: Event): boolean;
127
+ (event: Event): boolean;
128
+ };
129
+ removeEventListener: {
130
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
131
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
132
+ };
133
+ width: number;
134
+ height: number;
135
+ offsetLeft: number;
136
+ offsetTop: number;
137
+ scale: number;
138
+ };
139
+ ShadowRoot: ShadowRoot;
140
+ } | {
141
+ addEventListener: {
142
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
143
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
144
+ };
145
+ dispatchEvent: {
146
+ (event: Event): boolean;
147
+ (event: Event): boolean;
148
+ };
149
+ removeEventListener: {
150
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
151
+ (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
152
+ };
153
+ width: number;
154
+ height: number;
155
+ offsetLeft: number;
156
+ offsetTop: number;
157
+ scale: number;
158
+ })[];
159
+ };
160
+ styles: {
161
+ [key: string]: Partial<CSSStyleDeclaration>;
162
+ };
163
+ attributes: {
164
+ [key: string]: {
165
+ [key: string]: string | boolean;
166
+ };
167
+ };
168
+ modifiersData: {
169
+ [x: string]: any;
170
+ arrow?: {
171
+ x?: number;
172
+ y?: number;
173
+ centerOffset: number;
174
+ };
175
+ hide?: {
176
+ isReferenceHidden: boolean;
177
+ hasPopperEscaped: boolean;
178
+ referenceClippingOffsets: {
179
+ top: number;
180
+ left: number;
181
+ right: number;
182
+ bottom: number;
183
+ };
184
+ popperEscapeOffsets: {
185
+ top: number;
186
+ left: number;
187
+ right: number;
188
+ bottom: number;
189
+ };
190
+ };
191
+ offset?: {
192
+ "bottom-end"?: {
193
+ y: number;
194
+ x: number;
195
+ };
196
+ "bottom-start"?: {
197
+ y: number;
198
+ x: number;
199
+ };
200
+ bottom?: {
201
+ y: number;
202
+ x: number;
203
+ };
204
+ left?: {
205
+ y: number;
206
+ x: number;
207
+ };
208
+ right?: {
209
+ y: number;
210
+ x: number;
211
+ };
212
+ top?: {
213
+ y: number;
214
+ x: number;
215
+ };
216
+ auto?: {
217
+ y: number;
218
+ x: number;
219
+ };
220
+ "auto-start"?: {
221
+ y: number;
222
+ x: number;
223
+ };
224
+ "auto-end"?: {
225
+ y: number;
226
+ x: number;
227
+ };
228
+ "top-start"?: {
229
+ y: number;
230
+ x: number;
231
+ };
232
+ "top-end"?: {
233
+ y: number;
234
+ x: number;
235
+ };
236
+ "right-start"?: {
237
+ y: number;
238
+ x: number;
239
+ };
240
+ "right-end"?: {
241
+ y: number;
242
+ x: number;
243
+ };
244
+ "left-start"?: {
245
+ y: number;
246
+ x: number;
247
+ };
248
+ "left-end"?: {
249
+ y: number;
250
+ x: number;
251
+ };
252
+ };
253
+ preventOverflow?: {
254
+ y: number;
255
+ x: number;
256
+ };
257
+ popperOffsets?: {
258
+ y: number;
259
+ x: number;
260
+ };
261
+ };
262
+ reset: boolean;
263
+ };
264
+ destroy: () => void;
265
+ forceUpdate: () => void;
266
+ update: () => Promise<Partial<import("@popperjs/core").State>>;
267
+ setOptions: (setOptionsAction: Partial<import("@popperjs/core").OptionsGeneric<any>> | ((prev: Partial<import("@popperjs/core").OptionsGeneric<any>>) => Partial<import("@popperjs/core").OptionsGeneric<any>>)) => Promise<Partial<import("@popperjs/core").State>>;
268
+ }, Instance | {
8
269
  state: {
9
270
  elements: {
10
271
  reference: Element | {
@@ -1,12 +1,12 @@
1
1
  export declare const _useShortcuts: () => {
2
2
  macOS: import("vue").ComputedRef<RegExpMatchArray>;
3
- metaSymbol: import("vue").Ref<string>;
4
- activeElement: import("vue").Ref<HTMLElement>;
3
+ metaSymbol: import("vue").Ref<string, string>;
4
+ activeElement: import("vue").Ref<HTMLElement, HTMLElement>;
5
5
  usingInput: import("vue").ComputedRef<string | boolean>;
6
6
  };
7
7
  export declare const useShortcuts: () => {
8
8
  macOS: import("vue").ComputedRef<RegExpMatchArray>;
9
- metaSymbol: import("vue").Ref<string>;
10
- activeElement: import("vue").Ref<HTMLElement>;
9
+ metaSymbol: import("vue").Ref<string, string>;
10
+ activeElement: import("vue").Ref<HTMLElement, HTMLElement>;
11
11
  usingInput: import("vue").ComputedRef<string | boolean>;
12
12
  };
@@ -7,7 +7,7 @@ declare function _useSlideover(): {
7
7
  close: () => Promise<void>;
8
8
  reset: () => void;
9
9
  patch: <T extends Component = {}>(props: Partial<Slideover & ComponentProps<T>>) => void;
10
- isOpen: import("vue").Ref<boolean>;
10
+ isOpen: import("vue").Ref<boolean, boolean>;
11
11
  };
12
12
  export declare const useSlideover: typeof _useSlideover;
13
13
  export {};
@@ -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, parseConfigValue } 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
  }
@@ -15,10 +15,10 @@ export default defineNuxtPlugin(() => {
15
15
  console.warn(`[@nuxt/ui] Gray color '${appConfig.ui.gray}' not found in Tailwind config`);
16
16
  }
17
17
  return `:root {
18
- ${Object.entries(primary || colors.green).map(([key, value]) => `--color-primary-${key}: ${hexToRgb(value)};`).join("\n")}
18
+ ${Object.entries(primary || colors.green).map(([key, value]) => `--color-primary-${key}: ${parseConfigValue(value)};`).join("\n")}
19
19
  --color-primary-DEFAULT: var(--color-primary-500);
20
20
 
21
- ${Object.entries(gray || colors.cool).map(([key, value]) => `--color-gray-${key}: ${hexToRgb(value)};`).join("\n")}
21
+ ${Object.entries(gray || colors.cool).map(([key, value]) => `--color-gray-${key}: ${parseConfigValue(value)};`).join("\n")}
22
22
  }
23
23
 
24
24
  .dark {
@@ -1,4 +1,4 @@
1
- import Fuse from 'fuse.js'
1
+ import { FuseResultMatch } from 'fuse.js'
2
2
  import type { Avatar } from './avatar'
3
3
 
4
4
  export interface Command {
@@ -13,7 +13,7 @@ export interface Command {
13
13
  shortcuts?: string[]
14
14
  group?: string
15
15
  score?: number
16
- matches?: Fuse.FuseResultMatch[]
16
+ matches?: FuseResultMatch[]
17
17
  [key: string]: any
18
18
  }
19
19
 
@@ -1,5 +1,5 @@
1
1
  export default {
2
- base: "focus:outline-none focus-visible:outline-0 disabled:cursor-not-allowed disabled:opacity-75 flex-shrink-0",
2
+ base: "focus:outline-none focus-visible:outline-0 disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 flex-shrink-0",
3
3
  font: "font-medium",
4
4
  rounded: "rounded-md",
5
5
  truncate: "text-left break-all line-clamp-1",
@@ -39,25 +39,25 @@ export default {
39
39
  },
40
40
  color: {
41
41
  white: {
42
- solid: "shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-900 dark:text-white bg-white hover:bg-gray-50 disabled:bg-white dark:bg-gray-900 dark:hover:bg-gray-800/50 dark:disabled:bg-gray-900 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",
42
+ solid: "shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-900 dark:text-white bg-white hover:bg-gray-50 disabled:bg-white aria-disabled:bg-white dark:bg-gray-900 dark:hover:bg-gray-800/50 dark:disabled:bg-gray-900 dark:aria-disabled:bg-gray-900 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",
43
43
  ghost: "text-gray-900 dark:text-white hover:bg-white dark:hover:bg-gray-900 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"
44
44
  },
45
45
  gray: {
46
- solid: "shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-50 hover:bg-gray-100 disabled:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:disabled:bg-gray-800 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",
46
+ solid: "shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-50 hover:bg-gray-100 disabled:bg-gray-50 aria-disabled:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:disabled:bg-gray-800 dark:aria-disabled:bg-gray-800 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",
47
47
  ghost: "text-gray-700 dark:text-gray-200 hover:text-gray-900 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-gray-800 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",
48
48
  link: "text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 underline-offset-4 hover:underline focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"
49
49
  },
50
50
  black: {
51
- solid: "shadow-sm text-white dark:text-gray-900 bg-gray-900 hover:bg-gray-800 disabled:bg-gray-900 dark:bg-white dark:hover:bg-gray-100 dark:disabled:bg-white focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",
51
+ solid: "shadow-sm text-white dark:text-gray-900 bg-gray-900 hover:bg-gray-800 disabled:bg-gray-900 aria-disabled:bg-gray-900 dark:bg-white dark:hover:bg-gray-100 dark:disabled:bg-white dark:aria-disabled:bg-white focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",
52
52
  link: "text-gray-900 dark:text-white underline-offset-4 hover:underline focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"
53
53
  }
54
54
  },
55
55
  variant: {
56
- solid: "shadow-sm text-white dark:text-gray-900 bg-{color}-500 hover:bg-{color}-600 disabled:bg-{color}-500 dark:bg-{color}-400 dark:hover:bg-{color}-500 dark:disabled:bg-{color}-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-{color}-500 dark:focus-visible:outline-{color}-400",
57
- outline: "ring-1 ring-inset ring-current text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",
58
- soft: "text-{color}-500 dark:text-{color}-400 bg-{color}-50 hover:bg-{color}-100 disabled:bg-{color}-50 dark:bg-{color}-950 dark:hover:bg-{color}-900 dark:disabled:bg-{color}-950 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",
59
- ghost: "text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",
60
- link: "text-{color}-500 hover:text-{color}-600 disabled:text-{color}-500 dark:text-{color}-400 dark:hover:text-{color}-500 dark:disabled:text-{color}-400 underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400"
56
+ solid: "shadow-sm text-white dark:text-gray-900 bg-{color}-500 hover:bg-{color}-600 disabled:bg-{color}-500 aria-disabled:bg-{color}-500 dark:bg-{color}-400 dark:hover:bg-{color}-500 dark:disabled:bg-{color}-400 dark:aria-disabled:bg-{color}-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-{color}-500 dark:focus-visible:outline-{color}-400",
57
+ outline: "ring-1 ring-inset ring-current text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent aria-disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",
58
+ soft: "text-{color}-500 dark:text-{color}-400 bg-{color}-50 hover:bg-{color}-100 disabled:bg-{color}-50 aria-disabled:bg-{color}-50 dark:bg-{color}-950 dark:hover:bg-{color}-900 dark:disabled:bg-{color}-950 dark:aria-disabled:bg-{color}-950 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",
59
+ ghost: "text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent aria-disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",
60
+ link: "text-{color}-500 hover:text-{color}-600 disabled:text-{color}-500 aria-disabled:text-{color}-500 dark:text-{color}-400 dark:hover:text-{color}-500 dark:disabled:text-{color}-400 dark:aria-disabled:text-{color}-400 underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400"
61
61
  },
62
62
  icon: {
63
63
  base: "flex-shrink-0",
@@ -20,7 +20,7 @@ export default {
20
20
  nextButton: {
21
21
  color: "black",
22
22
  class: "rtl:[&_span:last-child]:rotate-180 absolute right-4 top-1/2 transform -translate-y-1/2 rounded-full",
23
- icon: "i-heroicons-chevron-right-20-solid "
23
+ icon: "i-heroicons-chevron-right-20-solid"
24
24
  }
25
25
  }
26
26
  };