@nuxt/ui 3.2.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nuxt/ui/button.ts +42 -42
- package/.nuxt/ui/command-palette.ts +2 -1
- package/.nuxt/ui/drawer.ts +1 -1
- package/.nuxt/ui/file-upload.ts +290 -0
- package/.nuxt/ui/index.ts +1 -0
- package/.nuxt/ui/input.ts +1 -1
- package/.nuxt/ui/kbd.ts +167 -3
- package/.nuxt/ui/select.ts +7 -7
- package/.nuxt/ui/table.ts +8 -0
- package/.nuxt/ui/tabs.ts +4 -2
- package/.nuxt/ui/textarea.ts +1 -1
- package/.nuxt/ui/toast.ts +8 -15
- package/.nuxt/ui/tooltip.ts +1 -1
- package/cli/templates.mjs +8 -3
- package/dist/module.d.mts +15 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +3 -3
- package/dist/runtime/components/Accordion.vue.d.ts +1 -1
- package/dist/runtime/components/Alert.vue.d.ts +2 -2
- package/dist/runtime/components/App.vue.d.ts +1 -1
- package/dist/runtime/components/Avatar.vue.d.ts +1 -1
- package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Badge.vue.d.ts +1 -1
- package/dist/runtime/components/Breadcrumb.vue.d.ts +1 -1
- package/dist/runtime/components/Button.vue +6 -6
- package/dist/runtime/components/Button.vue.d.ts +1 -5
- package/dist/runtime/components/ButtonGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Calendar.vue.d.ts +1 -1
- package/dist/runtime/components/Card.vue.d.ts +1 -1
- package/dist/runtime/components/Carousel.vue +18 -14
- package/dist/runtime/components/Carousel.vue.d.ts +1 -1
- package/dist/runtime/components/Checkbox.vue.d.ts +1 -1
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Chip.vue.d.ts +2 -2
- package/dist/runtime/components/Collapsible.vue.d.ts +1 -1
- package/dist/runtime/components/ColorPicker.vue +1 -2
- package/dist/runtime/components/ColorPicker.vue.d.ts +1 -1
- package/dist/runtime/components/CommandPalette.vue +4 -0
- package/dist/runtime/components/CommandPalette.vue.d.ts +6 -1
- package/dist/runtime/components/Container.vue.d.ts +1 -1
- package/dist/runtime/components/ContextMenu.vue.d.ts +1 -1
- package/dist/runtime/components/ContextMenuContent.vue +5 -3
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +1 -1
- package/dist/runtime/components/Drawer.vue +4 -4
- package/dist/runtime/components/Drawer.vue.d.ts +6 -1
- package/dist/runtime/components/DropdownMenu.vue.d.ts +1 -1
- package/dist/runtime/components/DropdownMenuContent.vue +5 -3
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +8 -5
- package/dist/runtime/components/FileUpload.vue +248 -0
- package/dist/runtime/components/FileUpload.vue.d.ts +167 -0
- package/dist/runtime/components/Form.vue +3 -3
- package/dist/runtime/components/Form.vue.d.ts +6 -5
- package/dist/runtime/components/FormField.vue +2 -2
- package/dist/runtime/components/FormField.vue.d.ts +4 -4
- package/dist/runtime/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/components/Input.vue +10 -7
- package/dist/runtime/components/Input.vue.d.ts +9 -9
- package/dist/runtime/components/InputMenu.vue +25 -13
- package/dist/runtime/components/InputMenu.vue.d.ts +16 -221
- package/dist/runtime/components/InputNumber.vue +3 -2
- package/dist/runtime/components/InputNumber.vue.d.ts +7 -81
- package/dist/runtime/components/InputTags.vue +2 -0
- package/dist/runtime/components/InputTags.vue.d.ts +7 -5
- package/dist/runtime/components/Kbd.vue +2 -1
- package/dist/runtime/components/Kbd.vue.d.ts +5 -1
- package/dist/runtime/components/Link.vue +6 -5
- package/dist/runtime/components/Link.vue.d.ts +1 -3
- package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
- package/dist/runtime/components/Modal.vue.d.ts +2 -2
- package/dist/runtime/components/NavigationMenu.vue +3 -2
- package/dist/runtime/components/NavigationMenu.vue.d.ts +1 -1
- package/dist/runtime/components/OverlayProvider.vue.d.ts +1 -1
- package/dist/runtime/components/Pagination.vue.d.ts +1 -1
- package/dist/runtime/components/PinInput.vue +3 -1
- package/dist/runtime/components/PinInput.vue.d.ts +5 -5
- package/dist/runtime/components/Popover.vue +2 -1
- package/dist/runtime/components/Popover.vue.d.ts +8 -2
- package/dist/runtime/components/Progress.vue.d.ts +1 -1
- package/dist/runtime/components/RadioGroup.vue +1 -1
- package/dist/runtime/components/RadioGroup.vue.d.ts +5 -4
- package/dist/runtime/components/Select.vue +16 -6
- package/dist/runtime/components/Select.vue.d.ts +3 -3
- package/dist/runtime/components/SelectMenu.vue +18 -10
- package/dist/runtime/components/SelectMenu.vue.d.ts +3 -3
- package/dist/runtime/components/Separator.vue.d.ts +1 -1
- package/dist/runtime/components/Skeleton.vue.d.ts +1 -1
- package/dist/runtime/components/Slideover.vue.d.ts +2 -2
- package/dist/runtime/components/Slider.vue.d.ts +5 -5
- package/dist/runtime/components/Stepper.vue.d.ts +1 -1
- package/dist/runtime/components/Switch.vue.d.ts +1 -1
- package/dist/runtime/components/Table.vue +83 -8
- package/dist/runtime/components/Table.vue.d.ts +20 -4
- package/dist/runtime/components/Tabs.vue +12 -2
- package/dist/runtime/components/Tabs.vue.d.ts +8 -3
- package/dist/runtime/components/Textarea.vue +10 -7
- package/dist/runtime/components/Textarea.vue.d.ts +10 -9
- package/dist/runtime/components/Timeline.vue.d.ts +1 -1
- package/dist/runtime/components/Toast.vue +12 -4
- package/dist/runtime/components/Toast.vue.d.ts +14 -13
- package/dist/runtime/components/Toaster.vue.d.ts +1 -1
- package/dist/runtime/components/Tooltip.vue +4 -3
- package/dist/runtime/components/Tooltip.vue.d.ts +8 -2
- package/dist/runtime/components/Tree.vue +31 -28
- package/dist/runtime/components/Tree.vue.d.ts +2 -1
- package/dist/runtime/composables/defineShortcuts.js +5 -3
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
- package/dist/runtime/composables/useFileUpload.d.ts +19 -0
- package/dist/runtime/composables/useFileUpload.js +69 -0
- package/dist/runtime/composables/useFormField.d.ts +3 -6
- package/dist/runtime/composables/useFormField.js +5 -2
- package/dist/runtime/composables/useKbd.d.ts +1 -1
- package/dist/runtime/composables/useLocale.js +2 -2
- package/dist/runtime/composables/useOverlay.d.ts +29 -2
- package/dist/runtime/composables/useOverlay.js +8 -7
- package/dist/runtime/composables/usePortal.d.ts +1 -1
- package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
- package/dist/runtime/inertia/components/LinkBase.vue.d.ts +1 -1
- package/dist/runtime/inertia/stubs.d.ts +1 -0
- package/dist/runtime/inertia/stubs.js +4 -2
- package/dist/runtime/locale/ar.js +5 -1
- package/dist/runtime/locale/az.js +4 -0
- package/dist/runtime/locale/bg.js +4 -0
- package/dist/runtime/locale/bn.js +4 -0
- package/dist/runtime/locale/ca.js +4 -0
- package/dist/runtime/locale/ckb.js +5 -1
- package/dist/runtime/locale/cs.js +4 -0
- package/dist/runtime/locale/da.js +4 -0
- package/dist/runtime/locale/de.js +4 -0
- package/dist/runtime/locale/el.js +4 -0
- package/dist/runtime/locale/en.js +4 -0
- package/dist/runtime/locale/es.js +4 -0
- package/dist/runtime/locale/et.js +4 -0
- package/dist/runtime/locale/fa_ir.js +4 -0
- package/dist/runtime/locale/fi.js +4 -0
- package/dist/runtime/locale/fr.js +4 -0
- package/dist/runtime/locale/he.js +4 -0
- package/dist/runtime/locale/hi.js +5 -1
- package/dist/runtime/locale/hu.js +4 -0
- package/dist/runtime/locale/hy.js +4 -0
- package/dist/runtime/locale/id.js +4 -0
- package/dist/runtime/locale/it.js +4 -0
- package/dist/runtime/locale/ja.js +4 -0
- package/dist/runtime/locale/kk.js +4 -0
- package/dist/runtime/locale/km.js +5 -1
- package/dist/runtime/locale/ko.js +4 -0
- package/dist/runtime/locale/ky.js +4 -0
- package/dist/runtime/locale/lb.js +4 -0
- package/dist/runtime/locale/lt.js +4 -0
- package/dist/runtime/locale/mn.js +4 -0
- package/dist/runtime/locale/ms.js +4 -0
- package/dist/runtime/locale/nb_no.js +4 -0
- package/dist/runtime/locale/nl.js +4 -0
- package/dist/runtime/locale/pl.js +4 -0
- package/dist/runtime/locale/pt.js +4 -0
- package/dist/runtime/locale/pt_br.js +4 -0
- package/dist/runtime/locale/ro.js +4 -0
- package/dist/runtime/locale/ru.js +4 -0
- package/dist/runtime/locale/sk.js +4 -0
- package/dist/runtime/locale/sl.js +4 -0
- package/dist/runtime/locale/sv.js +4 -0
- package/dist/runtime/locale/th.js +4 -0
- package/dist/runtime/locale/tj.js +4 -0
- package/dist/runtime/locale/tr.js +4 -0
- package/dist/runtime/locale/ug_cn.js +4 -0
- package/dist/runtime/locale/uk.js +4 -0
- package/dist/runtime/locale/ur.js +4 -0
- package/dist/runtime/locale/uz.js +4 -0
- package/dist/runtime/locale/vi.js +4 -0
- package/dist/runtime/locale/zh_cn.js +4 -0
- package/dist/runtime/locale/zh_tw.js +4 -0
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/locale.d.ts +4 -0
- package/dist/runtime/utils/index.d.ts +6 -0
- package/dist/runtime/utils/index.js +27 -0
- package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/vue/components/Link.vue.d.ts +1 -1
- package/dist/runtime/vue/stubs.d.ts +1 -0
- package/dist/runtime/vue/stubs.js +3 -1
- package/dist/shared/{ui.BPVxSPGY.mjs → ui.BTUFJHYJ.mjs} +299 -36
- package/dist/unplugin.d.mts +2 -0
- package/dist/unplugin.mjs +6 -3
- package/dist/vite.mjs +1 -1
- package/package.json +31 -27
|
@@ -37,6 +37,7 @@ export default defineLocale({
|
|
|
37
37
|
carousel: {
|
|
38
38
|
prev: "Ortga",
|
|
39
39
|
next: "Oldinga",
|
|
40
|
+
dots: "Ko\u02BBrsatish uchun slaydni tanlang",
|
|
40
41
|
goto: "{slide}-slaydga o\u2018tish"
|
|
41
42
|
},
|
|
42
43
|
modal: {
|
|
@@ -50,6 +51,9 @@ export default defineLocale({
|
|
|
50
51
|
},
|
|
51
52
|
table: {
|
|
52
53
|
noData: "Ma\u02BClumot yo\u02BBq"
|
|
54
|
+
},
|
|
55
|
+
fileUpload: {
|
|
56
|
+
removeFile: "{filename}ni o\u02BBchirish"
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
});
|
|
@@ -37,6 +37,7 @@ export default defineLocale({
|
|
|
37
37
|
carousel: {
|
|
38
38
|
prev: "Tr\u01B0\u1EDBc",
|
|
39
39
|
next: "Sau",
|
|
40
|
+
dots: "Ch\u1ECDn slide \u0111\u1EC3 hi\u1EC3n th\u1ECB",
|
|
40
41
|
goto: "\u0110i t\u1EDBi \xF4 {slide}"
|
|
41
42
|
},
|
|
42
43
|
modal: {
|
|
@@ -50,6 +51,9 @@ export default defineLocale({
|
|
|
50
51
|
},
|
|
51
52
|
table: {
|
|
52
53
|
noData: "Kh\xF4ng c\xF3 d\u1EEF li\u1EC7u"
|
|
54
|
+
},
|
|
55
|
+
fileUpload: {
|
|
56
|
+
removeFile: "X\xF3a {filename}"
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
});
|
|
@@ -37,6 +37,7 @@ export default defineLocale({
|
|
|
37
37
|
carousel: {
|
|
38
38
|
prev: "\u4E0A\u4E00\u9875",
|
|
39
39
|
next: "\u4E0B\u4E00\u9875",
|
|
40
|
+
dots: "\u9009\u62E9\u8981\u663E\u793A\u7684\u5E7B\u706F\u7247",
|
|
40
41
|
goto: "\u8DF3\u8F6C\u5230\u7B2C {slide} \u9875"
|
|
41
42
|
},
|
|
42
43
|
modal: {
|
|
@@ -50,6 +51,9 @@ export default defineLocale({
|
|
|
50
51
|
},
|
|
51
52
|
table: {
|
|
52
53
|
noData: "\u6CA1\u6709\u6570\u636E"
|
|
54
|
+
},
|
|
55
|
+
fileUpload: {
|
|
56
|
+
removeFile: "\u5220\u9664 {filename}"
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
});
|
|
@@ -37,6 +37,7 @@ export default defineLocale({
|
|
|
37
37
|
carousel: {
|
|
38
38
|
prev: "\u4E0A\u4E00\u9801",
|
|
39
39
|
next: "\u4E0B\u4E00\u9801",
|
|
40
|
+
dots: "\u9078\u64C7\u8981\u986F\u793A\u7684\u6295\u5F71\u7247",
|
|
40
41
|
goto: "\u8DF3\u8F49\u5230\u7B2C {slide} \u9801"
|
|
41
42
|
},
|
|
42
43
|
modal: {
|
|
@@ -50,6 +51,9 @@ export default defineLocale({
|
|
|
50
51
|
},
|
|
51
52
|
table: {
|
|
52
53
|
noData: "\u6C92\u6709\u8CC7\u6599"
|
|
54
|
+
},
|
|
55
|
+
fileUpload: {
|
|
56
|
+
removeFile: "\u79FB\u9664 {filename}"
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
});
|
|
@@ -20,6 +20,7 @@ export * from '../components/Container.vue';
|
|
|
20
20
|
export * from '../components/ContextMenu.vue';
|
|
21
21
|
export * from '../components/Drawer.vue';
|
|
22
22
|
export * from '../components/DropdownMenu.vue';
|
|
23
|
+
export * from '../components/FileUpload.vue';
|
|
23
24
|
export * from '../components/Form.vue';
|
|
24
25
|
export * from '../components/FormField.vue';
|
|
25
26
|
export * from '../components/Icon.vue';
|
|
@@ -20,6 +20,7 @@ export * from "../components/Container.vue";
|
|
|
20
20
|
export * from "../components/ContextMenu.vue";
|
|
21
21
|
export * from "../components/Drawer.vue";
|
|
22
22
|
export * from "../components/DropdownMenu.vue";
|
|
23
|
+
export * from "../components/FileUpload.vue";
|
|
23
24
|
export * from "../components/Form.vue";
|
|
24
25
|
export * from "../components/FormField.vue";
|
|
25
26
|
export * from "../components/Icon.vue";
|
|
@@ -33,6 +33,7 @@ export type Messages = {
|
|
|
33
33
|
carousel: {
|
|
34
34
|
prev: string;
|
|
35
35
|
next: string;
|
|
36
|
+
dots: string;
|
|
36
37
|
goto: string;
|
|
37
38
|
};
|
|
38
39
|
modal: {
|
|
@@ -47,6 +48,9 @@ export type Messages = {
|
|
|
47
48
|
table: {
|
|
48
49
|
noData: string;
|
|
49
50
|
};
|
|
51
|
+
fileUpload: {
|
|
52
|
+
removeFile: string;
|
|
53
|
+
};
|
|
50
54
|
};
|
|
51
55
|
export type Direction = 'ltr' | 'rtl';
|
|
52
56
|
export type Locale<M> = {
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import type { GetItemKeys, NestedItem } from '../types';
|
|
1
2
|
export declare function pick<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Pick<Data, Keys>;
|
|
2
3
|
export declare function omit<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Omit<Data, Keys>;
|
|
3
4
|
export declare function get(object: Record<string, any> | undefined, path: (string | number)[] | string, defaultValue?: any): any;
|
|
4
5
|
export declare function set(object: Record<string, any>, path: (string | number)[] | string, value: any): void;
|
|
5
6
|
export declare function looseToNumber(val: any): any;
|
|
6
7
|
export declare function compare<T>(value?: T, currentValue?: T, comparator?: string | ((a: T, b: T) => boolean)): boolean;
|
|
8
|
+
export declare function getDisplayValue<T, V>(items: T[], value: V | undefined | null, options?: {
|
|
9
|
+
valueKey?: GetItemKeys<T>;
|
|
10
|
+
labelKey?: keyof NestedItem<T>;
|
|
11
|
+
}): string | undefined;
|
|
7
12
|
export declare function isArrayOfArray<A>(item: A[] | A[][]): item is A[][];
|
|
13
|
+
export declare function mergeClasses(appConfigClass?: string | string[], propClass?: string): "" | (string | undefined)[];
|
|
@@ -61,6 +61,33 @@ export function compare(value, currentValue, comparator) {
|
|
|
61
61
|
}
|
|
62
62
|
return isEqual(value, currentValue);
|
|
63
63
|
}
|
|
64
|
+
export function getDisplayValue(items, value, options = {}) {
|
|
65
|
+
const { valueKey, labelKey } = options;
|
|
66
|
+
if (value === null || value === void 0) {
|
|
67
|
+
return void 0;
|
|
68
|
+
}
|
|
69
|
+
const foundItem = items.find((item) => {
|
|
70
|
+
const itemValue = typeof item === "object" && item !== null && valueKey ? get(item, valueKey) : item;
|
|
71
|
+
return compare(itemValue, value);
|
|
72
|
+
});
|
|
73
|
+
const source = foundItem ?? value;
|
|
74
|
+
if (source === null || source === void 0) {
|
|
75
|
+
return void 0;
|
|
76
|
+
}
|
|
77
|
+
if (typeof source === "object") {
|
|
78
|
+
return labelKey ? get(source, labelKey) : void 0;
|
|
79
|
+
}
|
|
80
|
+
return String(source);
|
|
81
|
+
}
|
|
64
82
|
export function isArrayOfArray(item) {
|
|
65
83
|
return Array.isArray(item[0]);
|
|
66
84
|
}
|
|
85
|
+
export function mergeClasses(appConfigClass, propClass) {
|
|
86
|
+
if (!appConfigClass && !propClass) {
|
|
87
|
+
return "";
|
|
88
|
+
}
|
|
89
|
+
return [
|
|
90
|
+
...Array.isArray(appConfigClass) ? appConfigClass : [appConfigClass],
|
|
91
|
+
propClass
|
|
92
|
+
].filter(Boolean);
|
|
93
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface IconProps {
|
|
2
2
|
name: string;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: import("vue").DefineComponent<IconProps,
|
|
4
|
+
declare const _default: import("vue").DefineComponent<IconProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
5
|
export default _default;
|
|
@@ -77,7 +77,7 @@ export interface LinkSlots {
|
|
|
77
77
|
active: boolean;
|
|
78
78
|
}): any;
|
|
79
79
|
}
|
|
80
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps,
|
|
80
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
|
|
81
81
|
type: "reset" | "submit" | "button";
|
|
82
82
|
as: any;
|
|
83
83
|
activeClass: string;
|
|
@@ -6,6 +6,7 @@ export { useAppConfig } from './composables/useAppConfig';
|
|
|
6
6
|
export { defineShortcuts } from '../composables/defineShortcuts';
|
|
7
7
|
export { defineLocale } from '../composables/defineLocale';
|
|
8
8
|
export { useLocale } from '../composables/useLocale';
|
|
9
|
+
export declare const clearError: () => void;
|
|
9
10
|
export declare const useColorMode: () => {
|
|
10
11
|
forced: boolean;
|
|
11
12
|
preference?: undefined;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ref, onScopeDispose } from "vue";
|
|
2
2
|
import { createHooks } from "hookable";
|
|
3
|
-
import appConfig from "#build/app.config";
|
|
4
3
|
import { useColorMode as useColorModeVueUse } from "@vueuse/core";
|
|
4
|
+
import appConfig from "#build/app.config";
|
|
5
5
|
export { useHead } from "@unhead/vue";
|
|
6
6
|
export { useRoute, useRouter } from "vue-router";
|
|
7
7
|
export { useAppConfig } from "./composables/useAppConfig.js";
|
|
8
8
|
export { defineShortcuts } from "../composables/defineShortcuts.js";
|
|
9
9
|
export { defineLocale } from "../composables/defineLocale.js";
|
|
10
10
|
export { useLocale } from "../composables/useLocale.js";
|
|
11
|
+
export const clearError = () => {
|
|
12
|
+
};
|
|
11
13
|
export const useColorMode = () => {
|
|
12
14
|
if (!appConfig.colorMode) {
|
|
13
15
|
return {
|