@vuetify/v0 1.2.0 → 1.2.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.
Files changed (96) hide show
  1. package/README.md +5 -0
  2. package/dist/{adapter-CqS8xexO.d.mts → adapter-FckJSz_o.d.mts} +1 -1
  3. package/dist/browser/index.d.ts +155 -97
  4. package/dist/browser/index.js +148 -63
  5. package/dist/components/index.d.mts +1 -1
  6. package/dist/components/index.mjs +1 -1
  7. package/dist/{components-DBhVg-t1.mjs → components-MCFhfNlt.mjs} +56 -38
  8. package/dist/composables/index.d.mts +7 -7
  9. package/dist/composables/index.mjs +23 -23
  10. package/dist/{composables-ZGhVN2EJ.mjs → composables-8xtFVviy.mjs} +7 -7
  11. package/dist/constants/index.mjs +1 -1
  12. package/dist/{createDataTable-VmQEDn-7.mjs → createDataTable-OCGnpy-N.mjs} +4 -4
  13. package/dist/{createGroup-B_LL7xRr.mjs → createGroup-DtVYu-VY.mjs} +13 -2
  14. package/dist/{createRegistry-DVdvep0v.mjs → createRegistry-DSQiALGi.mjs} +3 -3
  15. package/dist/{createSelection-BNdDz8oY.mjs → createSelection-TB5oK1FG.mjs} +2 -1
  16. package/dist/{createSingle-DHyIQ9Cj.mjs → createSingle-CV1qigP2.mjs} +1 -1
  17. package/dist/{createTokens-DoISbwd7.mjs → createTokens-B0CqJEL6.mjs} +2 -2
  18. package/dist/data-table/index.d.mts +1 -1
  19. package/dist/data-table/index.mjs +1 -1
  20. package/dist/date/index.mjs +1 -1
  21. package/dist/features/adapters/posthog/index.mjs +1 -1
  22. package/dist/features/index.d.mts +1 -1
  23. package/dist/features/index.mjs +1 -1
  24. package/dist/{globals-DaoKtIGF.mjs → globals-wvVdMRFF.mjs} +1 -1
  25. package/dist/{index-Di9e8sOm.d.mts → index-3bThcqCN.d.mts} +2 -2
  26. package/dist/{index-D0ub61GV.d.mts → index-3vvA76pZ.d.mts} +1 -1
  27. package/dist/{index-DSPkZ0ql.d.mts → index-4Z38WhA9.d.mts} +7 -1
  28. package/dist/{index-Cm6CbqI6.d.mts → index-BTdCsSz0.d.mts} +25 -18
  29. package/dist/{index-DjRE4lLl.d.mts → index-CORslci7.d.mts} +17 -4
  30. package/dist/{index-Cx0cWGlx.d.mts → index-Dgkt7Ve9.d.mts} +43 -11
  31. package/dist/index.d.mts +8 -8
  32. package/dist/index.mjs +25 -25
  33. package/dist/json/attributes.json +14 -2
  34. package/dist/json/tags.json +3 -0
  35. package/dist/json/web-types.json +32 -3
  36. package/dist/locale/adapters/index.d.mts +2 -2
  37. package/dist/locale/adapters/index.mjs +1 -1
  38. package/dist/locale/adapters/v0/index.d.mts +1 -1
  39. package/dist/locale/adapters/v0/index.mjs +1 -1
  40. package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
  41. package/dist/locale/index.d.mts +3 -3
  42. package/dist/locale/index.mjs +2 -2
  43. package/dist/locale/messages/en/index.d.mts +3 -0
  44. package/dist/locale/messages/en/index.mjs +1 -0
  45. package/dist/logger/adapters/index.mjs +1 -1
  46. package/dist/logger/adapters/v0/index.mjs +1 -1
  47. package/dist/logger/index.d.mts +1 -1
  48. package/dist/logger/index.mjs +2 -2
  49. package/dist/notifications/index.d.mts +1 -1
  50. package/dist/notifications/index.mjs +2 -2
  51. package/dist/palettes/ant/index.d.mts +1 -1
  52. package/dist/palettes/index.d.mts +2 -2
  53. package/dist/palettes/material/index.d.mts +1 -1
  54. package/dist/palettes/md1/index.d.mts +1 -1
  55. package/dist/palettes/md2/index.d.mts +1 -1
  56. package/dist/palettes/radix/index.d.mts +1 -1
  57. package/dist/palettes/tailwind/index.d.mts +1 -1
  58. package/dist/permissions/adapters/index.d.mts +1 -1
  59. package/dist/permissions/adapters/v0/index.d.mts +1 -1
  60. package/dist/permissions/index.d.mts +1 -1
  61. package/dist/permissions/index.mjs +1 -1
  62. package/dist/popover/adapters/floating-ui/index.mjs +1 -1
  63. package/dist/popover/index.d.mts +1 -1
  64. package/dist/popover/index.mjs +1 -1
  65. package/dist/rules/index.d.mts +1 -1
  66. package/dist/rules/index.mjs +1 -1
  67. package/dist/storage/index.d.mts +1 -1
  68. package/dist/storage/index.mjs +1 -1
  69. package/dist/theme/adapters/index.d.mts +1 -1
  70. package/dist/theme/adapters/index.mjs +2 -2
  71. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  72. package/dist/theme/adapters/unhead/index.mjs +1 -1
  73. package/dist/theme/adapters/v0/index.d.mts +1 -1
  74. package/dist/theme/adapters/v0/index.mjs +1 -1
  75. package/dist/theme/index.d.mts +1 -1
  76. package/dist/theme/index.mjs +3 -3
  77. package/dist/{unhead-C8zbWr45.mjs → unhead-SyU953Pt.mjs} +1 -1
  78. package/dist/{useEventListener-2eAMwUdw.mjs → useEventListener-hF6R2p6X.mjs} +1 -1
  79. package/dist/{useFeatures-DLafCOWt.mjs → useFeatures-CTpkM6hV.mjs} +2 -2
  80. package/dist/{useLocale-K_45ulPt.mjs → useLocale-D-iWu08b.mjs} +3 -3
  81. package/dist/{useLogger-YyWuYvrH.mjs → useLogger-CDsgHbzO.mjs} +2 -2
  82. package/dist/{useNotifications-Kh_KvM7j.mjs → useNotifications-DhNjvRt1.mjs} +2 -2
  83. package/dist/{usePermissions-BCGwsOES.mjs → usePermissions-CKe8xcvz.mjs} +1 -1
  84. package/dist/{usePopover-BTo0AGIQ.mjs → usePopover-DyAdne_S.mjs} +10 -9
  85. package/dist/{useRovingFocus-CkRnVmJ1.mjs → useRovingFocus-D0OOozbe.mjs} +54 -29
  86. package/dist/{useRules-BuE5ffOJ.mjs → useRules-DA8bNhNq.mjs} +2 -2
  87. package/dist/{useStorage-BT8-mjVs.mjs → useStorage-D9c6xx4N.mjs} +3 -3
  88. package/dist/{useTheme-DkK6tPqY.mjs → useTheme-BrXA5VBp.mjs} +5 -5
  89. package/dist/{useTimer-CGVXk397.mjs → useTimer-DLtkRCHw.mjs} +1 -1
  90. package/dist/utilities/index.d.mts +1 -1
  91. package/dist/utilities/index.mjs +35 -12
  92. package/dist/{v0-CDW1Ktk-.d.mts → v0-C09lR5fc.d.mts} +1 -1
  93. package/dist/{v0-B_53w7Fu.mjs → v0-CaTmC7C4.mjs} +1 -1
  94. package/dist/{v0-SuxTihEe.mjs → v0-DpFVF6pD.mjs} +1 -1
  95. package/dist/{v0-D0Exc2bO.mjs → v0-cC-WxCLd.mjs} +1 -1
  96. package/package.json +1 -1
@@ -210,11 +210,38 @@ function project(ranges, map) {
210
210
  }
211
211
  return projected;
212
212
  }
213
+ function search(text, query, ignoreCase, foldQuery, foldTarget, matchAll) {
214
+ const folded = foldQuery ? fold(query) : query;
215
+ const needle = ignoreCase ? lower(folded) : folded;
216
+ if (needle.length === 0) return [];
217
+ if (!foldTarget) {
218
+ if (!ignoreCase) return collect(text, needle, matchAll);
219
+ const lowered = lower(text);
220
+ if (lowered.length === text.length) return collect(lowered, needle, matchAll);
221
+ }
222
+ const { folded: haystack, map } = foldWithMap(text, ignoreCase, foldTarget);
223
+ return project(collect(haystack, needle, matchAll), map);
224
+ }
225
+ function mergeRanges(a, b) {
226
+ const combined = [...a, ...b].toSorted((x, y) => x[0] - y[0] || x[1] - y[1]);
227
+ const merged = [];
228
+ for (const range of combined) {
229
+ const last = merged.at(-1);
230
+ if (last && range[0] < last[1]) continue;
231
+ merged.push(range);
232
+ }
233
+ return merged;
234
+ }
213
235
  /**
214
236
  * Finds `[start, end]` index pairs where `query` occurs in `text`, optionally
215
237
  * folding accents on either side. Returned indices always address the original
216
238
  * `text`, even when folding or case-conversion changed its length.
217
239
  *
240
+ * Directional folding (`'query'` or `'target'`) only transforms one side, but
241
+ * a spelling that's already identical on both sides — accents and all — is
242
+ * merged in verbatim, so folding one side never hides a match the other side
243
+ * already has.
244
+ *
218
245
  * @param text The string to search.
219
246
  * @param query The term to look for. An empty query yields no ranges.
220
247
  * @param options Optional `ignoreCase`, `ignoreAccents`, `matchAll`.
@@ -229,6 +256,9 @@ function project(ranges, map) {
229
256
  *
230
257
  * findMatchRanges('Łódź', 'Lo', { ignoreAccents: 'target' })
231
258
  * // [[0, 2]]
259
+ *
260
+ * findMatchRanges('… Kraków …', 'Kraków', { ignoreAccents: 'query' })
261
+ * // [[2, 8]] — typing the exact accented name always finds itself
232
262
  * ```
233
263
  */
234
264
  /* @__NO_SIDE_EFFECTS__ */
@@ -236,16 +266,9 @@ function findMatchRanges(text, query, options = {}) {
236
266
  const { ignoreCase = false, ignoreAccents = false, matchAll = false } = options;
237
267
  const foldQuery = ignoreAccents === true || ignoreAccents === "query";
238
268
  const foldTarget = ignoreAccents === true || ignoreAccents === "target";
239
- const folded = foldQuery ? fold(query) : query;
240
- const needle = ignoreCase ? lower(folded) : folded;
241
- if (needle.length === 0) return [];
242
- if (!foldTarget) {
243
- if (!ignoreCase) return collect(text, needle, matchAll);
244
- const lowered = lower(text);
245
- if (lowered.length === text.length) return collect(lowered, needle, matchAll);
246
- }
247
- const { folded: haystack, map } = foldWithMap(text, ignoreCase, foldTarget);
248
- return project(collect(haystack, needle, matchAll), map);
269
+ if (foldQuery === foldTarget) return search(text, query, ignoreCase, foldQuery, foldTarget, matchAll);
270
+ const merged = mergeRanges(search(text, query, ignoreCase, false, false, true), search(text, query, ignoreCase, foldQuery, foldTarget, true));
271
+ return matchAll ? merged : merged.slice(0, 1);
249
272
  }
250
273
  //#endregion
251
274
  //#region src/constants/globals.ts
@@ -255,7 +278,7 @@ const SUPPORTS_MATCH_MEDIA = IN_BROWSER && "matchMedia" in window && typeof wind
255
278
  const SUPPORTS_OBSERVER = IN_BROWSER && "ResizeObserver" in window;
256
279
  const SUPPORTS_INTERSECTION_OBSERVER = IN_BROWSER && "IntersectionObserver" in window;
257
280
  const SUPPORTS_MUTATION_OBSERVER = IN_BROWSER && "MutationObserver" in window;
258
- const version = "1.2.0";
281
+ const version = "1.2.1";
259
282
  /* v8 ignore next -- build-time constant, __DEV__ short-circuits in tests */
260
283
  const __LOGGER_ENABLED__ = false;
261
284
  //#endregion
@@ -287,6 +310,13 @@ function instanceName() {
287
310
  //#endregion
288
311
  //#region src/utilities/helpers.ts
289
312
  /**
313
+ * @module utilities/helpers
314
+ *
315
+ * @remarks
316
+ * Collection of utility functions for type checking, object manipulation,
317
+ * and common transformations. All exports are tree-shakeable.
318
+ */
319
+ /**
290
320
  * Checks if a value is a function
291
321
  *
292
322
  * @param item The value to check
@@ -473,7 +503,7 @@ function isElement(item) {
473
503
  */
474
504
  /* @__NO_SIDE_EFFECTS__ */
475
505
  function getActiveElement() {
476
- if (typeof document === "undefined") return null;
506
+ if (!IN_BROWSER) return null;
477
507
  let active = document.activeElement;
478
508
  while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
479
509
  return active;
@@ -2276,12 +2306,12 @@ function createRegistry(options) {
2276
2306
  const valueIsIndex = registration.valueIsIndex ?? valueIsUndefined;
2277
2307
  if (valueIsIndex) indexDependentCount++;
2278
2308
  const input = {
2309
+ unregister: () => unregister(id),
2279
2310
  ...registration,
2280
2311
  id,
2281
2312
  index,
2282
2313
  value,
2283
- valueIsIndex,
2284
- unregister: () => unregister(id)
2314
+ valueIsIndex
2285
2315
  };
2286
2316
  const ticket = reactive ? shallowReactive(input) : input;
2287
2317
  if (auto) minted.add(ticket);
@@ -2618,6 +2648,7 @@ function createModel(_options = {}) {
2618
2648
  const id = registration.id ?? /* @__PURE__ */ useId();
2619
2649
  const item = {
2620
2650
  disabled: false,
2651
+ unregister: () => unregister(id),
2621
2652
  ...registration,
2622
2653
  isSelected: toRef(() => selected(id)),
2623
2654
  id
@@ -6398,7 +6429,8 @@ function createGroup(_options = {}) {
6398
6429
  unselect: () => unselect(id),
6399
6430
  toggle: () => toggle(id),
6400
6431
  mix: () => mix(id),
6401
- unmix: () => unmix(id)
6432
+ unmix: () => unmix(id),
6433
+ unregister: () => unregister(id)
6402
6434
  };
6403
6435
  const ticket = selection.register(item);
6404
6436
  if (toValue(registration.indeterminate)) mix(id);
@@ -6421,6 +6453,14 @@ function createGroup(_options = {}) {
6421
6453
  mixedIds.clear();
6422
6454
  selection.reset();
6423
6455
  }
6456
+ function clear() {
6457
+ mixedIds.clear();
6458
+ selection.clear();
6459
+ }
6460
+ function dispose() {
6461
+ mixedIds.clear();
6462
+ selection.dispose();
6463
+ }
6424
6464
  const selectableItems = computed(() => {
6425
6465
  return proxy.values.filter((item) => !toValue(item.disabled));
6426
6466
  });
@@ -6462,6 +6502,8 @@ function createGroup(_options = {}) {
6462
6502
  offboard,
6463
6503
  onboard,
6464
6504
  reset,
6505
+ clear,
6506
+ dispose,
6465
6507
  selectAll,
6466
6508
  unselectAll,
6467
6509
  toggleAll,
@@ -6624,7 +6666,7 @@ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
6624
6666
  const fD = firstDividerWidth.value;
6625
6667
  const eW = ellipsisWidth.value;
6626
6668
  const reserved = fI + __props.gap + fD + __props.gap + eW + __props.gap;
6627
- if (capacity === Infinity || capacity >= measuredCount) {
6669
+ if (ellipsisTickets.length === 0 || capacity === Infinity || capacity >= measuredCount) {
6628
6670
  hiddenCount.value = 0;
6629
6671
  if (expanded.value) expanded.value = false;
6630
6672
  for (const t of ellipsisTickets) group.unselect(t.id);
@@ -8049,6 +8091,7 @@ function createStep(_options = {}) {
8049
8091
  function step(count = 1) {
8050
8092
  const length = registry.size;
8051
8093
  if (!length) return;
8094
+ registry.lookup(0);
8052
8095
  const currentIndex = registry.selectedIndex.value;
8053
8096
  const direction = Math.sign(count || 1);
8054
8097
  let hops = 0;
@@ -10216,17 +10259,18 @@ function createPopoverFallback() {
10216
10259
  * import { FloatingUIPopoverAdapter } from '@vuetify/v0/popover/adapters/floating-ui'
10217
10260
  *
10218
10261
  * export const [useAppPopover, provideAppPopover, appPopover] = createPopoverContext({
10219
- * namespace: 'app:popover-plugin',
10262
+ * namespace: 'app:popover',
10220
10263
  * adapter: new FloatingUIPopoverAdapter(),
10221
10264
  * })
10222
10265
  * ```
10223
10266
  *
10224
10267
  * Plugin trinity for an app-wide popover positioning adapter.
10225
10268
  *
10226
- * Namespace is `v0:popover-plugin` not `v0:popover`, which `Popover.Root`
10227
- * already owns for compound context. The generated consumer is module-private;
10228
- * `usePopover()` consults it internally. Fallback is `{ adapter: undefined }`,
10229
- * so zero-config matches today's `V0PopoverAdapter` default.
10269
+ * Namespace is `v0:popover`. Compound `Popover.Root` context lives at
10270
+ * `v0:popover:root` so the two do not collide. The generated consumer is
10271
+ * module-private; `usePopover()` consults it internally. Fallback is
10272
+ * `{ adapter: undefined }`, so zero-config matches today's `V0PopoverAdapter`
10273
+ * default.
10230
10274
  *
10231
10275
  * @example
10232
10276
  * ```ts
@@ -10236,7 +10280,7 @@ function createPopoverFallback() {
10236
10280
  * app.use(createPopoverPlugin({ adapter: new FloatingUIPopoverAdapter() }))
10237
10281
  * ```
10238
10282
  */
10239
- const [createPopoverContext, createPopoverPlugin, usePopoverPlugin] = createPluginContext("v0:popover-plugin", createPopover, { fallback: () => createPopoverFallback() });
10283
+ const [createPopoverContext, createPopoverPlugin, usePopoverPlugin] = createPluginContext("v0:popover", createPopover, { fallback: () => createPopoverFallback() });
10240
10284
  function bindOption(source, fallback) {
10241
10285
  const override = shallowRef();
10242
10286
  return computed({
@@ -12477,9 +12521,9 @@ function createDataTable(options = {}) {
12477
12521
  }
12478
12522
  const { selectedId: selectedLocale } = useLocale();
12479
12523
  const locale = toRef(() => {
12524
+ if (!/* @__PURE__ */ isNullOrUndefined(initialLocale)) return initialLocale;
12480
12525
  const selected = selectedLocale?.value;
12481
12526
  if (!/* @__PURE__ */ isNullOrUndefined(selected)) return String(selected);
12482
- return initialLocale;
12483
12527
  });
12484
12528
  const leaves = computed(() => /* @__PURE__ */ extractLeaves(columns.values()));
12485
12529
  const headers = computed(() => /* @__PURE__ */ resolveHeaders(columns.values()));
@@ -14894,7 +14938,6 @@ const _sfc_main$65 = /* @__PURE__ */ defineComponent({
14894
14938
  if (!/* @__PURE__ */ isUndefined(current)) context.expansion.toggle(current);
14895
14939
  }
14896
14940
  function onSplitterLayout(sizes) {
14897
- if (sizes.length !== context.layout.columns.value.length) return;
14898
14941
  const visible = new Set(context.layout.columns.value.map((c) => c.id));
14899
14942
  const assigned = /* @__PURE__ */ new Map();
14900
14943
  for (const [index, size] of sizes.entries()) {
@@ -14910,7 +14953,6 @@ const _sfc_main$65 = /* @__PURE__ */ defineComponent({
14910
14953
  if (/* @__PURE__ */ isUndefined(size)) return;
14911
14954
  permuted.push(size);
14912
14955
  }
14913
- if (permuted.length !== sizes.length) return;
14914
14956
  context.layout.distribute(permuted);
14915
14957
  }
14916
14958
  const slotProps = toRef(() => ({
@@ -18189,7 +18231,7 @@ const UNSET = /* @__PURE__ */ Symbol("unset");
18189
18231
  * ```
18190
18232
  */
18191
18233
  function createValidation(_options = {}) {
18192
- const { rules: initialRules = [], value: valueSource, enroll = true, ...options } = _options;
18234
+ const { rules: initialRules = [], value: valueSource, enroll = true, formNamespace = "v0:form", ...options } = _options;
18193
18235
  const group = createGroup({
18194
18236
  ...options,
18195
18237
  enroll,
@@ -18204,8 +18246,8 @@ function createValidation(_options = {}) {
18204
18246
  let latest;
18205
18247
  function register(input) {
18206
18248
  if (/* @__PURE__ */ isFunction(input) || /* @__PURE__ */ isString(input) || /* @__PURE__ */ isStandardSchema(input)) {
18207
- const resolved = rulesContext.resolve([input]);
18208
- return group.register({ value: resolved[0] ?? (() => true) });
18249
+ const rule = rulesContext.resolve([input])[0] ?? (() => /* @__PURE__ */ isString(input) ? `Unknown validation rule "${input}"` : false);
18250
+ return group.register({ value: rule });
18209
18251
  }
18210
18252
  return group.register(input);
18211
18253
  }
@@ -18284,7 +18326,7 @@ function createValidation(_options = {}) {
18284
18326
  return group.size;
18285
18327
  }
18286
18328
  };
18287
- const form = useForm();
18329
+ const form = useForm(formNamespace);
18288
18330
  const ticket = form?.register({ value: context });
18289
18331
  onScopeDispose(() => {
18290
18332
  if (!ticket || !form) return;
@@ -18312,15 +18354,24 @@ function createValidation(_options = {}) {
18312
18354
  * import { createInput } from '@vuetify/v0'
18313
18355
  *
18314
18356
  * const value = shallowRef('')
18315
- * const input = createInput({ value, label: 'Name', rules: ['required'] })
18357
+ * const input = createInput({ value, label: 'Name', required: true })
18316
18358
  * await input.validate()
18317
18359
  * ```
18318
18360
  */
18319
18361
  function createInput(options) {
18320
- const { value, id = /* @__PURE__ */ useId(), label, name, form, required, disabled = false, readonly: _readonly = false, rules = [], error = false, errorMessages, dirty: dirtyFn, equals = (a, b) => a === b } = options;
18362
+ const { value, id = /* @__PURE__ */ useId(), label, name, form, formNamespace, required, disabled = false, readonly: _readonly = false, rules = [], error = false, errorMessages, dirty: dirtyFn, equals = (a, b) => a === b } = options;
18363
+ function filled(val) {
18364
+ if (dirtyFn) return dirtyFn(val);
18365
+ return /* @__PURE__ */ isString(val) ? val.length > 0 : !/* @__PURE__ */ isNullOrUndefined(val);
18366
+ }
18367
+ const locale = useLocale();
18368
+ function requiredRule(v) {
18369
+ return filled(v) || (locale.ti("Input.required") ?? "Required");
18370
+ }
18321
18371
  const validation = createValidation({
18322
- rules,
18323
- value
18372
+ rules: required ? [requiredRule, ...rules] : rules,
18373
+ value,
18374
+ formNamespace
18324
18375
  });
18325
18376
  const initialValue = value.value;
18326
18377
  const isFocused = shallowRef(false);
@@ -18333,10 +18384,7 @@ function createInput(options) {
18333
18384
  const isReadonly = toRef(() => toValue(_readonly));
18334
18385
  const descriptionId = `${id}-description`;
18335
18386
  const errorId = `${id}-error`;
18336
- const isDirty = toRef(() => {
18337
- if (dirtyFn) return dirtyFn(value.value);
18338
- return /* @__PURE__ */ isString(value.value) ? value.value.length > 0 : !/* @__PURE__ */ isNullOrUndefined(value.value);
18339
- });
18387
+ const isDirty = toRef(() => filled(value.value));
18340
18388
  const isPristine = shallowRef(true);
18341
18389
  watch(value, (val) => {
18342
18390
  isPristine.value = equals(val, initialValue);
@@ -18426,6 +18474,7 @@ const _sfc_main$97 = /* @__PURE__ */ defineComponent({
18426
18474
  },
18427
18475
  errorMessages: {},
18428
18476
  namespace: { default: "v0:input:root" },
18477
+ formNamespace: { default: "v0:form" },
18429
18478
  as: { default: "div" },
18430
18479
  renderless: { type: Boolean }
18431
18480
  }, {
@@ -18448,6 +18497,7 @@ const _sfc_main$97 = /* @__PURE__ */ defineComponent({
18448
18497
  label: __props.label,
18449
18498
  name: __props.name,
18450
18499
  form: __props.form,
18500
+ formNamespace: __props.formNamespace,
18451
18501
  required: __props.required,
18452
18502
  disabled: () => toValue(__props.disabled),
18453
18503
  readonly: () => toValue(__props.readonly),
@@ -18545,6 +18595,11 @@ const _sfc_main$97 = /* @__PURE__ */ defineComponent({
18545
18595
  });
18546
18596
  //#endregion
18547
18597
  //#region src/components/Input/InputControl.vue
18598
+ function defined(attrs) {
18599
+ const result = {};
18600
+ for (const key of Object.keys(attrs)) if (!/* @__PURE__ */ isUndefined(attrs[key])) result[key] = attrs[key];
18601
+ return result;
18602
+ }
18548
18603
  const _sfc_main$94 = /* @__PURE__ */ defineComponent({
18549
18604
  name: "InputControl",
18550
18605
  inheritAttrs: false,
@@ -18575,7 +18630,7 @@ const _sfc_main$94 = /* @__PURE__ */ defineComponent({
18575
18630
  const disabled = root.isDisabled.value;
18576
18631
  const readonly = root.isReadonly.value;
18577
18632
  const isFocused = root.isFocused.value;
18578
- return {
18633
+ return defined({
18579
18634
  "id": root.id,
18580
18635
  "type": root.type.value,
18581
18636
  "name": root.name,
@@ -18596,7 +18651,7 @@ const _sfc_main$94 = /* @__PURE__ */ defineComponent({
18596
18651
  "onInput": onInput,
18597
18652
  "onFocus": onFocus,
18598
18653
  "onBlur": onBlur
18599
- };
18654
+ });
18600
18655
  });
18601
18656
  const slotProps = toRef(() => ({
18602
18657
  value: root.value.value,
@@ -18972,7 +19027,7 @@ function createNumeric(options = {}) {
18972
19027
  * ```
18973
19028
  */
18974
19029
  function createNumberField(options = {}) {
18975
- const { value = ref(null), locale = "en-US", format: formatOptions, clamp: shouldClamp = true, commitOn = "change", disabled = false, readonly: _readonly = false, min, max, step, leap, wrap, id, label, name, rules, error, errorMessages } = options;
19030
+ const { value = ref(null), locale = "en-US", format: formatOptions, clamp: shouldClamp = true, commitOn = "change", disabled = false, readonly: _readonly = false, min, max, step, leap, wrap, id, label, name, formNamespace, required, rules, error, errorMessages } = options;
18976
19031
  const numeric = createNumeric({
18977
19032
  min,
18978
19033
  max,
@@ -18985,6 +19040,8 @@ function createNumberField(options = {}) {
18985
19040
  id,
18986
19041
  label,
18987
19042
  name,
19043
+ formNamespace,
19044
+ required,
18988
19045
  disabled,
18989
19046
  readonly: _readonly,
18990
19047
  rules,
@@ -19137,6 +19194,7 @@ const _sfc_main$104 = /* @__PURE__ */ defineComponent({
19137
19194
  default: false
19138
19195
  },
19139
19196
  namespace: { default: "v0:number-field:root" },
19197
+ formNamespace: { default: "v0:form" },
19140
19198
  as: { default: "div" },
19141
19199
  renderless: { type: Boolean }
19142
19200
  }, {
@@ -19152,6 +19210,8 @@ const _sfc_main$104 = /* @__PURE__ */ defineComponent({
19152
19210
  id: __props.id,
19153
19211
  label: __props.label,
19154
19212
  name: __props.name,
19213
+ formNamespace: __props.formNamespace,
19214
+ required: __props.required,
19155
19215
  locale: __props.locale,
19156
19216
  format: __props.format,
19157
19217
  clamp: __props.clamp,
@@ -20897,7 +20957,7 @@ const Pagination = {
20897
20957
  };
20898
20958
  //#endregion
20899
20959
  //#region src/components/Popover/PopoverRoot.vue
20900
- const [usePopoverContext, providePopoverContext] = createContext("v0:popover");
20960
+ const [usePopoverContext, providePopoverContext] = createContext("v0:popover:root");
20901
20961
  const _sfc_main$119 = /* @__PURE__ */ defineComponent({
20902
20962
  name: "PopoverRoot",
20903
20963
  __name: "PopoverRoot",
@@ -21017,7 +21077,14 @@ const _sfc_main$118 = /* @__PURE__ */ defineComponent({
21017
21077
  if (!/* @__PURE__ */ isUndefined(value)) context.positionTry.value = value;
21018
21078
  }, { immediate: true });
21019
21079
  const id = toRef(() => __props.id ?? context.id);
21020
- const style = toRef(() => context.contentStyles.value);
21080
+ const style = toRef(() => {
21081
+ const styles = context.contentStyles.value;
21082
+ if (/* @__PURE__ */ isUndefined(__props.id)) return styles;
21083
+ return {
21084
+ ...styles,
21085
+ "position-anchor": `--${String(__props.id).replace(/[^a-zA-Z0-9_-]/g, "")}`
21086
+ };
21087
+ });
21021
21088
  context.attach(() => ref.value?.element);
21022
21089
  function onBeforeToggle(e) {
21023
21090
  emit("beforetoggle", e);
@@ -21477,6 +21544,9 @@ function createProgress(options = {}) {
21477
21544
  if (pending && segments.value.length >= pending.length) pending = null;
21478
21545
  return ticket;
21479
21546
  }
21547
+ function onboard(registrations) {
21548
+ return model.batch(() => registrations.map((registration) => register(registration)));
21549
+ }
21480
21550
  function apply(incoming, _options) {
21481
21551
  const clamped = incoming.map((v) => /* @__PURE__ */ clamp(Number(v), min, max));
21482
21552
  if (segments.value.length === 0) {
@@ -21496,6 +21566,7 @@ function createProgress(options = {}) {
21496
21566
  isIndeterminate,
21497
21567
  fromValue,
21498
21568
  register,
21569
+ onboard,
21499
21570
  apply,
21500
21571
  min,
21501
21572
  max,
@@ -21548,7 +21619,6 @@ const _sfc_main$126 = /* @__PURE__ */ defineComponent({
21548
21619
  setup(__props) {
21549
21620
  const attrs = useAttrs();
21550
21621
  const model = useModel(__props, "modelValue");
21551
- const scalar = !/* @__PURE__ */ isArray(model.value) && !/* @__PURE__ */ isNullOrUndefined(model.value);
21552
21622
  const internal = computed({
21553
21623
  get: () => {
21554
21624
  if (/* @__PURE__ */ isNullOrUndefined(model.value)) return [];
@@ -21557,8 +21627,8 @@ const _sfc_main$126 = /* @__PURE__ */ defineComponent({
21557
21627
  set: (arr) => {
21558
21628
  /* v8 ignore next -- defensive guard for null/undefined model with empty registry */
21559
21629
  if (/* @__PURE__ */ isNullOrUndefined(model.value) && arr.length === 0) return;
21560
- /* v8 ignore next -- arr[0] always defined when scalar=true since model started as a number */
21561
- model.value = scalar ? arr[0] ?? 0 : arr;
21630
+ /* v8 ignore next -- arr[0] is defined once a fill has registered a value */
21631
+ model.value = /* @__PURE__ */ isArray(model.value) ? arr : arr[0] ?? 0;
21562
21632
  }
21563
21633
  });
21564
21634
  const progress = createProgress({
@@ -21679,16 +21749,19 @@ const _sfc_main$123 = /* @__PURE__ */ defineComponent({
21679
21749
  /* v8 ignore next -- defensive: registered ticket.value always coalesces to number via toRef getter above */
21680
21750
  const current = toRef(() => toValue(ticket.value) ?? 0);
21681
21751
  const percent = toRef(() => root.fromValue(current.value));
21682
- const slotProps = toRef(() => ({
21683
- value: current.value,
21684
- percent: percent.value,
21685
- index: ticket.index,
21686
- attrs: {
21687
- "data-index": ticket.index,
21688
- "data-state": root.isIndeterminate.value ? "indeterminate" : "determinate",
21689
- "style": { width: `${percent.value}%` }
21690
- }
21691
- }));
21752
+ const slotProps = toRef(() => {
21753
+ const indeterminate = root.isIndeterminate.value;
21754
+ return {
21755
+ value: current.value,
21756
+ percent: percent.value,
21757
+ index: ticket.index,
21758
+ attrs: {
21759
+ "data-index": ticket.index,
21760
+ "data-state": indeterminate ? "indeterminate" : "determinate",
21761
+ "style": indeterminate ? void 0 : { width: `${percent.value}%` }
21762
+ }
21763
+ };
21764
+ });
21692
21765
  return (_ctx, _cache) => {
21693
21766
  return openBlock(), createBlock(unref(_sfc_main$12), mergeProps(mergeProps(unref(attrs), slotProps.value.attrs), {
21694
21767
  as: __props.as,
@@ -26855,6 +26928,7 @@ const _sfc_main$170 = /* @__PURE__ */ defineComponent({
26855
26928
  ariaLabel: {},
26856
26929
  ariaLabelledby: {},
26857
26930
  ariaDescribedby: {},
26931
+ el: {},
26858
26932
  as: { default: "button" },
26859
26933
  renderless: { type: Boolean }
26860
26934
  },
@@ -26862,7 +26936,7 @@ const _sfc_main$170 = /* @__PURE__ */ defineComponent({
26862
26936
  const attrs = useAttrs();
26863
26937
  const rootRef = useTemplateRef("root");
26864
26938
  const tabs = useTabsRoot(__props.namespace);
26865
- const el = toRef(() => /* @__PURE__ */ toElement(rootRef.value?.element) ?? void 0);
26939
+ const el = toRef(() => /* @__PURE__ */ toElement(__props.el) ?? /* @__PURE__ */ toElement(rootRef.value?.element) ?? void 0);
26866
26940
  const ticket = tabs.register({
26867
26941
  id: __props.id,
26868
26942
  value: __props.value,
@@ -26878,7 +26952,7 @@ const _sfc_main$170 = /* @__PURE__ */ defineComponent({
26878
26952
  function focusSelectedTab() {
26879
26953
  nextTick(() => {
26880
26954
  const selected = tabs.selectedItem.value;
26881
- if (selected) toValue(selected.el)?.focus();
26955
+ if (selected) (/* @__PURE__ */ toElement(selected.el))?.focus();
26882
26956
  });
26883
26957
  }
26884
26958
  function focusAdjacent(direction) {
@@ -26893,7 +26967,7 @@ const _sfc_main$170 = /* @__PURE__ */ defineComponent({
26893
26967
  else if (index < 0 || index >= length) return;
26894
26968
  const item = all[index];
26895
26969
  if (item && !toValue(item.disabled)) {
26896
- nextTick(() => toValue(item.el)?.focus());
26970
+ nextTick(() => (/* @__PURE__ */ toElement(item.el))?.focus());
26897
26971
  return;
26898
26972
  }
26899
26973
  index += direction;
@@ -26902,7 +26976,7 @@ const _sfc_main$170 = /* @__PURE__ */ defineComponent({
26902
26976
  }
26903
26977
  function focusEdge(edge) {
26904
26978
  const item = tabs.seek(edge);
26905
- if (item) nextTick(() => toValue(item.el)?.focus());
26979
+ if (item) nextTick(() => (/* @__PURE__ */ toElement(item.el))?.focus());
26906
26980
  }
26907
26981
  function onKeydown(e) {
26908
26982
  const isHorizontal = tabs.orientation.value === "horizontal";
@@ -28822,12 +28896,13 @@ function createNested(_options = {}) {
28822
28896
  }
28823
28897
  function unselectAll() {
28824
28898
  if (toValue(group.disabled)) return;
28825
- const first = group.selectedIds.values().next().value;
28826
28899
  group.selectedIds.clear();
28827
28900
  group.mixedIds.clear();
28828
- if (toValue(mandatoryOption) && first) {
28829
- group.selectedIds.add(first);
28830
- updateAncestors(first);
28901
+ if (!toValue(mandatoryOption)) return;
28902
+ const ticket = group.seek("first");
28903
+ if (ticket) {
28904
+ group.selectedIds.add(ticket.id);
28905
+ updateAncestors(ticket.id);
28831
28906
  }
28832
28907
  }
28833
28908
  function toggleAll() {
@@ -28901,6 +28976,7 @@ function createNested(_options = {}) {
28901
28976
  ticket.select = () => select(id);
28902
28977
  ticket.unselect = () => unselect(id);
28903
28978
  ticket.toggle = () => toggle(id);
28979
+ ticket.unregister = () => unregister(id);
28904
28980
  if (registration.active) activate(id);
28905
28981
  if (nested?.length) for (const child of nested) register({
28906
28982
  ...child,
@@ -28984,6 +29060,14 @@ function createNested(_options = {}) {
28984
29060
  rootIds.clear();
28985
29061
  group.reset();
28986
29062
  }
29063
+ function dispose() {
29064
+ children.clear();
29065
+ parents.clear();
29066
+ openedIds.clear();
29067
+ activeIds.clear();
29068
+ rootIds.clear();
29069
+ group.dispose();
29070
+ }
28987
29071
  return {
28988
29072
  ...group,
28989
29073
  children,
@@ -29032,6 +29116,7 @@ function createNested(_options = {}) {
29032
29116
  onboard,
29033
29117
  clear,
29034
29118
  reset,
29119
+ dispose,
29035
29120
  get size() {
29036
29121
  return group.size;
29037
29122
  }