@nuxt/ui 3.3.3 → 3.3.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.
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
  Nuxt UI harnesses the combined strengths of [Reka UI](https://reka-ui.com/), [Tailwind CSS](https://tailwindcss.com/), and [Tailwind Variants](https://www.tailwind-variants.org/) to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.
15
15
 
16
16
  > [!NOTE]
17
- > You are on the `v3` development branch, check out the [v2 branch](https://github.com/nuxt/ui/tree/v2) for Nuxt UI v2.
17
+ > You are on the `v3` branch, check out the [v4 branch](https://github.com/nuxt/ui/tree/v4) for Nuxt UI v4 or [v2 branch](https://github.com/nuxt/ui/tree/v2) for Nuxt UI v2.
18
18
 
19
19
  > [!TIP]
20
20
  > **Looking for more components ?**
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "docs": "https://ui.nuxt.com/getting-started/installation/nuxt",
5
5
  "configKey": "ui",
6
6
  "compatibility": {
package/dist/module.mjs CHANGED
@@ -8,7 +8,7 @@ import 'tailwindcss/colors';
8
8
  import 'knitwork';
9
9
 
10
10
  const name = "@nuxt/ui";
11
- const version = "3.3.3";
11
+ const version = "3.3.4";
12
12
 
13
13
  const module = defineNuxtModule({
14
14
  meta: {
@@ -193,6 +193,7 @@ defineExpose({
193
193
  <component
194
194
  :is="variant === 'button' ? 'button' : 'div'"
195
195
  ref="dropzoneRef"
196
+ :type="variant === 'button' ? 'button' : void 0"
196
197
  :role="variant === 'button' ? void 0 : 'button'"
197
198
  :data-dragging="isDragging"
198
199
  :class="ui.base({ class: props.ui?.base })"
@@ -113,14 +113,16 @@ async function _validate(opts = { silent: false, nested: true, transform: false
113
113
  })
114
114
  ) : [];
115
115
  if (names) {
116
- const otherErrors = errors.value.filter((error) => !names.some((name) => {
117
- const pattern = inputs.value?.[name]?.pattern;
118
- return name === error.name || pattern && error.name?.match(pattern);
119
- }));
120
- const pathErrors = (await getErrors()).filter((error) => names.some((name) => {
121
- const pattern = inputs.value?.[name]?.pattern;
122
- return name === error.name || pattern && error.name?.match(pattern);
123
- }));
116
+ const namesSet = new Set(names);
117
+ const patterns = names.map((name) => inputs.value?.[name]?.pattern).filter(Boolean);
118
+ const isErrorForPath = (error) => {
119
+ if (!error.name) return false;
120
+ if (namesSet.has(error.name)) return true;
121
+ return patterns.some((pattern) => pattern.test(error.name));
122
+ };
123
+ const allNewErrors = await getErrors();
124
+ const otherErrors = errors.value.filter((error) => !isErrorForPath(error));
125
+ const pathErrors = allNewErrors.filter(isErrorForPath);
124
126
  errors.value = otherErrors.concat(pathErrors);
125
127
  } else {
126
128
  errors.value = await getErrors();
@@ -243,7 +243,10 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
243
243
  };
244
244
  $forceUpdate: () => void;
245
245
  $nextTick: typeof nextTick;
246
- $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
246
+ $watch<T_1 extends string | ((... /**
247
+ * When `items` is an array of objects, select the field to use as the label.
248
+ * @defaultValue 'label'
249
+ */args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
247
250
  } & Readonly<{
248
251
  as: import("reka-ui").AsTag | import("vue").Component;
249
252
  }> & Omit<Readonly<import("reka-ui").ComboboxInputProps> & Readonly<{
@@ -303,7 +306,10 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
303
306
  };
304
307
  $forceUpdate: () => void;
305
308
  $nextTick: typeof nextTick;
306
- $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
309
+ $watch<T_1 extends string | ((... /**
310
+ * When `items` is an array of objects, select the field to use as the label.
311
+ * @defaultValue 'label'
312
+ */args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
307
313
  } & Readonly<{
308
314
  as: import("reka-ui").AsTag | import("vue").Component;
309
315
  }> & Omit<Readonly<import("reka-ui").ComboboxInputProps> & Readonly<{
@@ -1,6 +1,6 @@
1
1
  import { defineLocale } from "../composables/defineLocale.js";
2
2
  export default defineLocale({
3
- name: "Indonesia",
3
+ name: "Bahasa Indonesia",
4
4
  code: "id",
5
5
  messages: {
6
6
  inputMenu: {
@@ -92,13 +92,16 @@ export function isEmpty(value) {
92
92
  }
93
93
  export function getDisplayValue(items, value, options = {}) {
94
94
  const { valueKey, labelKey } = options;
95
- if (isEmpty(value)) {
96
- return void 0;
97
- }
98
95
  const foundItem = items.find((item) => {
99
96
  const itemValue = typeof item === "object" && item !== null && valueKey ? get(item, valueKey) : item;
100
97
  return compare(itemValue, value);
101
98
  });
99
+ if (isEmpty(value) && foundItem) {
100
+ return labelKey ? get(foundItem, labelKey) : void 0;
101
+ }
102
+ if (isEmpty(value)) {
103
+ return void 0;
104
+ }
102
105
  const source = foundItem ?? value;
103
106
  if (source === null || source === void 0) {
104
107
  return void 0;
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.3",
5
- "packageManager": "pnpm@10.15.0",
4
+ "version": "3.3.4",
5
+ "packageManager": "pnpm@10.16.1",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/nuxt/ui.git"
@@ -120,12 +120,12 @@
120
120
  "@nuxt/schema": "^4.0.3",
121
121
  "@nuxtjs/color-mode": "^3.5.2",
122
122
  "@standard-schema/spec": "^1.0.0",
123
- "@tailwindcss/postcss": "^4.1.12",
124
- "@tailwindcss/vite": "^4.1.12",
123
+ "@tailwindcss/postcss": "^4.1.13",
124
+ "@tailwindcss/vite": "^4.1.13",
125
125
  "@tanstack/vue-table": "^8.21.3",
126
126
  "@unhead/vue": "^2.0.14",
127
- "@vueuse/core": "^13.8.0",
128
- "@vueuse/integrations": "^13.8.0",
127
+ "@vueuse/core": "^13.9.0",
128
+ "@vueuse/integrations": "^13.9.0",
129
129
  "colortranslator": "^5.0.0",
130
130
  "consola": "^3.4.2",
131
131
  "defu": "^6.1.4",
@@ -139,21 +139,21 @@
139
139
  "fuse.js": "^7.1.0",
140
140
  "hookable": "^5.5.3",
141
141
  "knitwork": "^1.2.0",
142
- "magic-string": "^0.30.18",
142
+ "magic-string": "^0.30.19",
143
143
  "mlly": "^1.8.0",
144
144
  "ohash": "^2.0.11",
145
145
  "pathe": "^2.0.3",
146
146
  "reka-ui": "2.5.0",
147
147
  "scule": "^1.3.0",
148
148
  "tailwind-merge": "^3.3.1",
149
- "tailwind-variants": "^3.1.0",
150
- "tailwindcss": "^4.1.12",
151
- "tinyglobby": "^0.2.14",
149
+ "tailwind-variants": "^3.1.1",
150
+ "tailwindcss": "^4.1.13",
151
+ "tinyglobby": "^0.2.15",
152
152
  "unplugin": "^2.3.10",
153
153
  "unplugin-auto-import": "^19.3.0",
154
154
  "unplugin-vue-components": "^28.8.0",
155
155
  "vaul-vue": "0.4.1",
156
- "vue-component-type-helpers": "^3.0.6"
156
+ "vue-component-type-helpers": "^3.0.7"
157
157
  },
158
158
  "devDependencies": {
159
159
  "@nuxt/eslint-config": "^1.9.0",
@@ -162,13 +162,13 @@
162
162
  "@release-it/conventional-changelog": "^10.0.1",
163
163
  "@vue/test-utils": "^2.4.6",
164
164
  "embla-carousel": "^8.6.0",
165
- "eslint": "^9.34.0",
165
+ "eslint": "^9.35.0",
166
166
  "happy-dom": "^18.0.1",
167
167
  "nuxt": "^4.0.3",
168
168
  "release-it": "^19.0.4",
169
169
  "vitest": "^3.2.4",
170
170
  "vitest-environment-nuxt": "^1.0.1",
171
- "vue-tsc": "^3.0.6"
171
+ "vue-tsc": "^3.0.7"
172
172
  },
173
173
  "peerDependencies": {
174
174
  "@inertiajs/vue3": "^2.0.7",
@@ -204,26 +204,14 @@
204
204
  }
205
205
  },
206
206
  "resolutions": {
207
- "@nuxt/ui": "workspace:*",
207
+ "@nuxt/kit": "4.0.3",
208
208
  "@nuxt/module-builder": "1.0.1",
209
+ "@nuxt/ui": "workspace:*",
209
210
  "chokidar": "3.6.0",
210
211
  "debug": "4.3.7",
212
+ "typescript": "5.8.3",
211
213
  "unimport": "4.1.1",
212
- "unplugin": "^2.3.10",
213
- "typescript": "5.8.3"
214
- },
215
- "pnpm": {
216
- "onlyBuiltDependencies": [
217
- "better-sqlite3",
218
- "puppeteer",
219
- "sharp"
220
- ],
221
- "ignoredBuiltDependencies": [
222
- "@parcel/watcher",
223
- "esbuild",
224
- "vue-demi",
225
- "workerd"
226
- ]
214
+ "unplugin": "^2.3.10"
227
215
  },
228
216
  "keywords": [
229
217
  "nuxt-ui",