@nuxt/ui 3.3.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/drawer.ts +1 -1
- package/.nuxt/ui/input.ts +1 -1
- package/.nuxt/ui/select.ts +7 -7
- package/.nuxt/ui/textarea.ts +1 -1
- package/cli/templates.mjs +4 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/ContextMenuContent.vue +5 -3
- package/dist/runtime/components/DropdownMenuContent.vue +5 -3
- package/dist/runtime/components/FileUpload.vue +7 -1
- package/dist/runtime/components/Form.vue +3 -3
- package/dist/runtime/components/InputMenu.vue +11 -6
- package/dist/runtime/components/InputMenu.vue.d.ts +3 -211
- package/dist/runtime/components/InputNumber.vue +3 -2
- package/dist/runtime/components/InputNumber.vue.d.ts +3 -77
- package/dist/runtime/components/InputTags.vue.d.ts +2 -2
- package/dist/runtime/components/PinInput.vue +3 -1
- package/dist/runtime/components/PinInput.vue.d.ts +4 -4
- package/dist/runtime/components/Select.vue +16 -6
- package/dist/runtime/components/Select.vue.d.ts +2 -2
- package/dist/runtime/components/SelectMenu.vue +10 -5
- package/dist/runtime/components/SelectMenu.vue.d.ts +2 -2
- package/dist/runtime/components/Tabs.vue +1 -0
- package/dist/runtime/components/Toast.vue.d.ts +2 -2
- package/dist/runtime/components/Tooltip.vue +2 -2
- package/dist/runtime/components/Tree.vue +29 -27
- package/dist/runtime/components/Tree.vue.d.ts +1 -0
- package/dist/runtime/composables/useFileUpload.js +7 -1
- package/dist/runtime/composables/useOverlay.d.ts +1 -1
- package/dist/runtime/composables/useOverlay.js +4 -3
- package/dist/runtime/locale/ar.js +3 -0
- package/dist/runtime/locale/az.js +3 -0
- package/dist/runtime/locale/bg.js +3 -0
- package/dist/runtime/locale/bn.js +3 -0
- package/dist/runtime/locale/ca.js +3 -0
- package/dist/runtime/locale/ckb.js +3 -0
- package/dist/runtime/locale/cs.js +3 -0
- package/dist/runtime/locale/da.js +3 -0
- package/dist/runtime/locale/de.js +3 -0
- package/dist/runtime/locale/el.js +3 -0
- package/dist/runtime/locale/en.js +3 -0
- package/dist/runtime/locale/es.js +3 -0
- package/dist/runtime/locale/et.js +3 -0
- package/dist/runtime/locale/fa_ir.js +3 -0
- package/dist/runtime/locale/fi.js +3 -0
- package/dist/runtime/locale/fr.js +3 -0
- package/dist/runtime/locale/he.js +3 -0
- package/dist/runtime/locale/hi.js +3 -0
- package/dist/runtime/locale/hu.js +3 -0
- package/dist/runtime/locale/hy.js +3 -0
- package/dist/runtime/locale/id.js +3 -0
- package/dist/runtime/locale/it.js +3 -0
- package/dist/runtime/locale/ja.js +3 -0
- package/dist/runtime/locale/kk.js +3 -0
- package/dist/runtime/locale/km.js +3 -0
- package/dist/runtime/locale/ko.js +3 -0
- package/dist/runtime/locale/ky.js +3 -0
- package/dist/runtime/locale/lb.js +3 -0
- package/dist/runtime/locale/lt.js +3 -0
- package/dist/runtime/locale/mn.js +3 -0
- package/dist/runtime/locale/ms.js +3 -0
- package/dist/runtime/locale/nb_no.js +3 -0
- package/dist/runtime/locale/nl.js +3 -0
- package/dist/runtime/locale/pl.js +3 -0
- package/dist/runtime/locale/pt.js +3 -0
- package/dist/runtime/locale/pt_br.js +3 -0
- package/dist/runtime/locale/ro.js +3 -0
- package/dist/runtime/locale/ru.js +3 -0
- package/dist/runtime/locale/sk.js +3 -0
- package/dist/runtime/locale/sl.js +3 -0
- package/dist/runtime/locale/sv.js +3 -0
- package/dist/runtime/locale/th.js +3 -0
- package/dist/runtime/locale/tj.js +3 -0
- package/dist/runtime/locale/tr.js +3 -0
- package/dist/runtime/locale/ug_cn.js +3 -0
- package/dist/runtime/locale/uk.js +3 -0
- package/dist/runtime/locale/ur.js +3 -0
- package/dist/runtime/locale/uz.js +3 -0
- package/dist/runtime/locale/vi.js +3 -0
- package/dist/runtime/locale/zh_cn.js +3 -0
- package/dist/runtime/locale/zh_tw.js +3 -0
- package/dist/runtime/types/locale.d.ts +3 -0
- package/dist/runtime/utils/index.d.ts +5 -0
- package/dist/runtime/utils/index.js +18 -0
- package/dist/shared/{ui.BkSj2DmF.mjs → ui.BTUFJHYJ.mjs} +21 -7
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +20 -16
|
@@ -51,6 +51,9 @@ export default defineLocale({
|
|
|
51
51
|
},
|
|
52
52
|
table: {
|
|
53
53
|
noData: "\u041C\u0430\u044A\u043B\u0443\u043C\u043E\u0442 \u043D\u0435\u0441\u0442"
|
|
54
|
+
},
|
|
55
|
+
fileUpload: {
|
|
56
|
+
removeFile: "{filename}-\u0440\u043E \u0445\u043E\u0440\u0438\u04B7 \u043A\u0443\u043D\u0435\u0434"
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
59
|
});
|
|
@@ -52,6 +52,9 @@ export default defineLocale({
|
|
|
52
52
|
},
|
|
53
53
|
table: {
|
|
54
54
|
noData: "\u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642"
|
|
55
|
+
},
|
|
56
|
+
fileUpload: {
|
|
57
|
+
removeFile: "{filename} \u0626\u06C6\u0686\u06C8\u0631\u06C8\u0634"
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
});
|
|
@@ -1,8 +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[][];
|
|
8
13
|
export declare function mergeClasses(appConfigClass?: string | string[], propClass?: string): "" | (string | undefined)[];
|
|
@@ -61,6 +61,24 @@ 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
|
}
|
|
@@ -1268,7 +1268,7 @@ const drawer = (options) => ({
|
|
|
1268
1268
|
},
|
|
1269
1269
|
inset: {
|
|
1270
1270
|
true: {
|
|
1271
|
-
content: "rounded-lg after:hidden overflow-hidden"
|
|
1271
|
+
content: "rounded-lg after:hidden overflow-hidden [--initial-transform:calc(100%+1.5rem)]"
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
1274
|
},
|
|
@@ -1672,7 +1672,7 @@ const formField = {
|
|
|
1672
1672
|
const input = (options) => ({
|
|
1673
1673
|
slots: {
|
|
1674
1674
|
root: "relative inline-flex items-center",
|
|
1675
|
-
base: ["w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
|
|
1675
|
+
base: ["w-full rounded-md border-0 appearance-none placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
|
|
1676
1676
|
leading: "absolute inset-y-0 start-0 flex items-center",
|
|
1677
1677
|
leadingIcon: "shrink-0 text-dimmed",
|
|
1678
1678
|
leadingAvatar: "shrink-0",
|
|
@@ -2095,16 +2095,16 @@ const inputTags = (options) => {
|
|
|
2095
2095
|
}
|
|
2096
2096
|
},
|
|
2097
2097
|
variant: (prev) => Object.fromEntries(
|
|
2098
|
-
Object.entries(prev).map(([key, value]) => [key, replaceFocus(value)])
|
|
2098
|
+
Object.entries(prev).map(([key, value]) => [key, replaceFocus$2(value)])
|
|
2099
2099
|
)
|
|
2100
2100
|
},
|
|
2101
2101
|
compoundVariants: (prev) => prev.map((item) => ({
|
|
2102
2102
|
...item,
|
|
2103
|
-
class: typeof item.class === "string" ? replaceFocus(item.class) : item.class
|
|
2103
|
+
class: typeof item.class === "string" ? replaceFocus$2(item.class) : item.class
|
|
2104
2104
|
}))
|
|
2105
2105
|
}, input(options));
|
|
2106
2106
|
};
|
|
2107
|
-
function replaceFocus(str) {
|
|
2107
|
+
function replaceFocus$2(str) {
|
|
2108
2108
|
return str.replace(/focus:/g, "has-focus:").replace(/focus-visible:/g, "has-focus-visible:");
|
|
2109
2109
|
}
|
|
2110
2110
|
|
|
@@ -3036,9 +3036,16 @@ const select = (options) => {
|
|
|
3036
3036
|
empty: "p-2 text-base"
|
|
3037
3037
|
}
|
|
3038
3038
|
}
|
|
3039
|
-
}
|
|
3039
|
+
},
|
|
3040
|
+
compoundVariants: (prev) => prev.map((item) => ({
|
|
3041
|
+
...item,
|
|
3042
|
+
class: typeof item.class === "string" ? replaceFocus$1(item.class) : item.class
|
|
3043
|
+
}))
|
|
3040
3044
|
}, input(options));
|
|
3041
3045
|
};
|
|
3046
|
+
function replaceFocus$1(str) {
|
|
3047
|
+
return str.replace(/focus-visible:/g, "focus:");
|
|
3048
|
+
}
|
|
3042
3049
|
|
|
3043
3050
|
const selectMenu = (options) => {
|
|
3044
3051
|
return defuFn({
|
|
@@ -3046,9 +3053,16 @@ const selectMenu = (options) => {
|
|
|
3046
3053
|
input: "border-b border-default",
|
|
3047
3054
|
focusScope: "flex flex-col min-h-0",
|
|
3048
3055
|
content: (content) => [content, "origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)"]
|
|
3049
|
-
}
|
|
3056
|
+
},
|
|
3057
|
+
compoundVariants: (prev) => prev.map((item) => ({
|
|
3058
|
+
...item,
|
|
3059
|
+
class: typeof item.class === "string" ? replaceFocus(item.class) : item.class
|
|
3060
|
+
}))
|
|
3050
3061
|
}, select(options));
|
|
3051
3062
|
};
|
|
3063
|
+
function replaceFocus(str) {
|
|
3064
|
+
return str.replace(/focus:/g, "focus-visible:");
|
|
3065
|
+
}
|
|
3052
3066
|
|
|
3053
3067
|
const separator = (options) => ({
|
|
3054
3068
|
slots: {
|
package/dist/unplugin.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { join, normalize } from 'pathe';
|
|
|
3
3
|
import { createUnplugin } from 'unplugin';
|
|
4
4
|
import { defu } from 'defu';
|
|
5
5
|
import tailwind from '@tailwindcss/vite';
|
|
6
|
-
import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.
|
|
6
|
+
import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.BTUFJHYJ.mjs';
|
|
7
7
|
import { globSync } from 'tinyglobby';
|
|
8
8
|
import { genSafeVariableName } from 'knitwork';
|
|
9
9
|
import MagicString from 'magic-string';
|
package/dist/vite.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/ui",
|
|
3
3
|
"description": "A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.",
|
|
4
|
-
"version": "3.3.
|
|
5
|
-
"packageManager": "pnpm@10.
|
|
4
|
+
"version": "3.3.1",
|
|
5
|
+
"packageManager": "pnpm@10.14.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/nuxt/ui.git"
|
|
@@ -113,19 +113,19 @@
|
|
|
113
113
|
"dependencies": {
|
|
114
114
|
"@iconify/vue": "^5.0.0",
|
|
115
115
|
"@internationalized/date": "^3.8.2",
|
|
116
|
-
"@internationalized/number": "^3.6.
|
|
116
|
+
"@internationalized/number": "^3.6.4",
|
|
117
117
|
"@nuxt/fonts": "^0.11.4",
|
|
118
118
|
"@nuxt/icon": "^1.15.0",
|
|
119
|
-
"@nuxt/kit": "^4.0.
|
|
120
|
-
"@nuxt/schema": "^4.0.
|
|
119
|
+
"@nuxt/kit": "^4.0.3",
|
|
120
|
+
"@nuxt/schema": "^4.0.3",
|
|
121
121
|
"@nuxtjs/color-mode": "^3.5.2",
|
|
122
122
|
"@standard-schema/spec": "^1.0.0",
|
|
123
123
|
"@tailwindcss/postcss": "^4.1.11",
|
|
124
124
|
"@tailwindcss/vite": "^4.1.11",
|
|
125
125
|
"@tanstack/vue-table": "^8.21.3",
|
|
126
|
-
"@unhead/vue": "^2.0.
|
|
127
|
-
"@vueuse/core": "^13.
|
|
128
|
-
"@vueuse/integrations": "^13.
|
|
126
|
+
"@unhead/vue": "^2.0.14",
|
|
127
|
+
"@vueuse/core": "^13.6.0",
|
|
128
|
+
"@vueuse/integrations": "^13.6.0",
|
|
129
129
|
"colortranslator": "^5.0.0",
|
|
130
130
|
"consola": "^3.4.2",
|
|
131
131
|
"defu": "^6.1.4",
|
|
@@ -143,31 +143,32 @@
|
|
|
143
143
|
"mlly": "^1.7.4",
|
|
144
144
|
"ohash": "^2.0.11",
|
|
145
145
|
"pathe": "^2.0.3",
|
|
146
|
-
"reka-ui": "2.
|
|
146
|
+
"reka-ui": "2.4.1",
|
|
147
147
|
"scule": "^1.3.0",
|
|
148
|
-
"tailwind-
|
|
148
|
+
"tailwind-merge": "^3.3.1",
|
|
149
|
+
"tailwind-variants": "^2.0.1",
|
|
149
150
|
"tailwindcss": "^4.1.11",
|
|
150
151
|
"tinyglobby": "^0.2.14",
|
|
151
152
|
"unplugin": "^2.3.5",
|
|
152
153
|
"unplugin-auto-import": "^19.3.0",
|
|
153
154
|
"unplugin-vue-components": "^28.8.0",
|
|
154
155
|
"vaul-vue": "0.4.1",
|
|
155
|
-
"vue-component-type-helpers": "^3.0.
|
|
156
|
+
"vue-component-type-helpers": "^3.0.5"
|
|
156
157
|
},
|
|
157
158
|
"devDependencies": {
|
|
158
|
-
"@nuxt/eslint-config": "^1.
|
|
159
|
+
"@nuxt/eslint-config": "^1.8.0",
|
|
159
160
|
"@nuxt/module-builder": "^1.0.1",
|
|
160
161
|
"@nuxt/test-utils": "^3.19.2",
|
|
161
162
|
"@release-it/conventional-changelog": "^10.0.1",
|
|
162
163
|
"@vue/test-utils": "^2.4.6",
|
|
163
164
|
"embla-carousel": "^8.6.0",
|
|
164
|
-
"eslint": "^9.
|
|
165
|
+
"eslint": "^9.33.0",
|
|
165
166
|
"happy-dom": "^18.0.1",
|
|
166
|
-
"nuxt": "^4.0.
|
|
167
|
+
"nuxt": "^4.0.3",
|
|
167
168
|
"release-it": "^19.0.4",
|
|
168
169
|
"vitest": "^3.2.4",
|
|
169
170
|
"vitest-environment-nuxt": "^1.0.1",
|
|
170
|
-
"vue-tsc": "^3.0.
|
|
171
|
+
"vue-tsc": "^3.0.5"
|
|
171
172
|
},
|
|
172
173
|
"peerDependencies": {
|
|
173
174
|
"@inertiajs/vue3": "^2.0.7",
|
|
@@ -204,11 +205,14 @@
|
|
|
204
205
|
},
|
|
205
206
|
"resolutions": {
|
|
206
207
|
"@nuxt/ui": "workspace:*",
|
|
208
|
+
"@nuxt/module-builder": "1.0.1",
|
|
207
209
|
"chokidar": "3.6.0",
|
|
208
210
|
"debug": "4.3.7",
|
|
209
211
|
"rollup": "4.34.9",
|
|
210
212
|
"unimport": "4.1.1",
|
|
211
|
-
"unplugin": "^2.3.5"
|
|
213
|
+
"unplugin": "^2.3.5",
|
|
214
|
+
"tailwind-variants": "2.0.1",
|
|
215
|
+
"typescript": "5.8.3"
|
|
212
216
|
},
|
|
213
217
|
"pnpm": {
|
|
214
218
|
"onlyBuiltDependencies": [
|