@vuetify/v0 0.0.23 → 0.0.24

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 (32) hide show
  1. package/dist/adapter-L4Php1_S.d.mts +97 -0
  2. package/dist/browser/index.js +1069 -809
  3. package/dist/components/index.d.mts +4 -4
  4. package/dist/components/index.mjs +6 -6
  5. package/dist/{components-BI9xdoz5.mjs → components-D_yAxHwn.mjs} +433 -113
  6. package/dist/composables/index.d.mts +5 -4
  7. package/dist/composables/index.mjs +4 -4
  8. package/dist/constants/index.d.mts +1 -1
  9. package/dist/constants/index.mjs +3 -3
  10. package/dist/date/index.d.mts +124 -0
  11. package/dist/date/index.mjs +7514 -0
  12. package/dist/{globals-WKdFmgwy.mjs → globals-BhNI7no7.mjs} +1 -1
  13. package/dist/{index-Bby5ljat.d.mts → index-DknfL2GU.d.mts} +1 -1
  14. package/dist/{index-_y91DmIS.d.mts → index-OghXharF.d.mts} +721 -359
  15. package/dist/{index-DYSwiS9k.d.mts → index-ZW2YLa57.d.mts} +21 -2
  16. package/dist/{index-rcTqb9U3.d.mts → index-isYKpbs6.d.mts} +426 -266
  17. package/dist/{index-C8YcMooA.d.mts → index-kvJsAOSg.d.mts} +13 -9
  18. package/dist/index.d.mts +8 -7
  19. package/dist/index.mjs +7 -7
  20. package/dist/json/attributes.json +100 -0
  21. package/dist/json/importMap.json +64 -0
  22. package/dist/json/tags.json +45 -0
  23. package/dist/json/web-types.json +1303 -392
  24. package/dist/types/index.d.mts +2 -2
  25. package/dist/{useClickOutside-B47X8X6-.mjs → useClickOutside-w-Y2QxHh.mjs} +591 -657
  26. package/dist/utilities/index.d.mts +3 -3
  27. package/dist/utilities/index.mjs +2 -2
  28. package/dist/{utilities-9i1hJnMd.mjs → utilities-B58TiS_S.mjs} +41 -34
  29. package/package.json +3 -2
  30. /package/dist/{constants-3l8TGg5J.mjs → constants-DHKqjdjH.mjs} +0 -0
  31. /package/dist/{htmlElements-CXObxj0V.mjs → htmlElements-DO9n35bD.mjs} +0 -0
  32. /package/dist/{index-DMQJJUrv.d.mts → index-cPmI99rd.d.mts} +0 -0
@@ -1,6 +1,5 @@
1
1
  import * as Vue from "vue";
2
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createPropsRestProxy, createTextVNode, createVNode, defineComponent, effectScope, guardReactiveProps, inject, isRef, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, renderSlot, resolveDynamicComponent, shallowReactive, shallowReadonly, shallowRef, toDisplayString, toRef, toValue, unref, useAttrs, useId, useModel, useTemplateRef, vShow, watch, watchEffect, withCtx, withDirectives } from "vue";
3
- import { Temporal } from "@js-temporal/polyfill";
2
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createPropsRestProxy, createTextVNode, createVNode, defineComponent, effectScope, guardReactiveProps, inject, isRef, mergeModels, mergeProps, nextTick, normalizeProps, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, renderSlot, resolveDynamicComponent, shallowReactive, shallowReadonly, shallowRef, toDisplayString, toRef, toValue, unref, useAttrs, useId as useId$1, useModel, useTemplateRef, vShow, watch, watchEffect, withCtx, withDirectives } from "vue";
4
3
 
5
4
  //#region src/constants/htmlElements.ts
6
5
  const selfClosingTags = [
@@ -78,6 +77,31 @@ function isSelfClosingTag(tag) {
78
77
  return SELF_CLOSING_TAGS.has(tag.toLowerCase());
79
78
  }
80
79
 
80
+ //#endregion
81
+ //#region src/utilities/instance.ts
82
+ /**
83
+ * Vue 3.6+ exposes `currentInstance` for Vapor mode compatibility.
84
+ * `getCurrentInstance()` returns null in Vapor components by design,
85
+ * so we access `currentInstance` directly when available.
86
+ *
87
+ * Uses dynamic key to avoid bundler static analysis warnings.
88
+ *
89
+ * @see https://github.com/orgs/vuejs/discussions/13629
90
+ * @internal
91
+ */
92
+ const INSTANCE_KEY = "currentInstance";
93
+ function getInstanceCompat() {
94
+ const vueExports = Vue;
95
+ if (INSTANCE_KEY in vueExports) return vueExports[INSTANCE_KEY];
96
+ return Vue.getCurrentInstance();
97
+ }
98
+ function instanceExists() {
99
+ return !/* @__PURE__ */ isNull(getInstanceCompat());
100
+ }
101
+ function instanceName() {
102
+ return getInstanceCompat()?.type?.name;
103
+ }
104
+
81
105
  //#endregion
82
106
  //#region src/utilities/helpers.ts
83
107
  /**
@@ -358,24 +382,30 @@ function mergeDeep(target, ...sources) {
358
382
  }
359
383
  return /* @__PURE__ */ mergeDeep(target, ...sources);
360
384
  }
385
+ let idCounter = 0;
361
386
  /**
362
- * Generates a random 7-character alphanumeric ID
387
+ * Generates a unique ID, using Vue's useId when in component context
363
388
  *
364
- * @returns A random string of 7 characters (a-z, 0-9)
389
+ * @returns A unique string ID
365
390
  *
366
391
  * @remarks
367
- * Uses `Math.random()` converted to base-36. Not cryptographically secure.
368
- * Suitable for unique keys in UI components, not for security purposes.
392
+ * - In component setup/lifecycle: Uses Vue's `useId()` for SSR-safe hydration
393
+ * - Outside components: Falls back to sequential counter (`v0-0`, `v0-1`, ...)
394
+ * - Vapor mode compatible
369
395
  *
370
396
  * @example
371
397
  * ```ts
372
- * genId() // 'k7x9m2p'
373
- * genId() // 'a3b8c1d'
398
+ * // In component setup - SSR safe
399
+ * const id = useId() // 'v:0', 'v:1', etc. (Vue's format)
400
+ *
401
+ * // Outside component - counter fallback
402
+ * const id = useId() // 'v0-0', 'v0-1', etc.
374
403
  * ```
375
404
  */
376
405
  /* @__NO_SIDE_EFFECTS__ */
377
- function genId() {
378
- return Math.random().toString(36).slice(2, 9);
406
+ function useId() {
407
+ if (instanceExists()) return useId$1();
408
+ return `v0-${idCounter++}`;
379
409
  }
380
410
  /**
381
411
  * Clamps a value between a minimum and maximum
@@ -446,31 +476,6 @@ function debounce(fn, delay) {
446
476
  return debounced;
447
477
  }
448
478
 
449
- //#endregion
450
- //#region src/utilities/instance.ts
451
- /**
452
- * Vue 3.6+ exposes `currentInstance` for Vapor mode compatibility.
453
- * `getCurrentInstance()` returns null in Vapor components by design,
454
- * so we access `currentInstance` directly when available.
455
- *
456
- * Uses dynamic key to avoid bundler static analysis warnings.
457
- *
458
- * @see https://github.com/orgs/vuejs/discussions/13629
459
- * @internal
460
- */
461
- const INSTANCE_KEY = "currentInstance";
462
- function getInstanceCompat() {
463
- const vueExports = Vue;
464
- if (INSTANCE_KEY in vueExports) return vueExports[INSTANCE_KEY];
465
- return Vue.getCurrentInstance();
466
- }
467
- function instanceExists() {
468
- return !/* @__PURE__ */ isNull(getInstanceCompat());
469
- }
470
- function instanceName() {
471
- return getInstanceCompat()?.type?.name;
472
- }
473
-
474
479
  //#endregion
475
480
  //#region src/components/Atom/Atom.vue
476
481
  /**
@@ -494,7 +499,7 @@ function instanceName() {
494
499
  * serving as the foundation for all other components that need polymorphic
495
500
  * rendering capabilities.
496
501
  */
497
- const _sfc_main$42 = /* @__PURE__ */ defineComponent({
502
+ const _sfc_main$46 = /* @__PURE__ */ defineComponent({
498
503
  name: "Atom",
499
504
  __name: "Atom",
500
505
  props: {
@@ -525,7 +530,7 @@ const _sfc_main$42 = /* @__PURE__ */ defineComponent({
525
530
  };
526
531
  }
527
532
  });
528
- var Atom_default = _sfc_main$42;
533
+ var Atom_default = _sfc_main$46;
529
534
 
530
535
  //#endregion
531
536
  //#region src/composables/createContext/index.ts
@@ -680,7 +685,7 @@ const SUPPORTS_MATCH_MEDIA = IN_BROWSER && "matchMedia" in window && typeof wind
680
685
  const SUPPORTS_OBSERVER = IN_BROWSER && "ResizeObserver" in window;
681
686
  const SUPPORTS_INTERSECTION_OBSERVER = IN_BROWSER && "IntersectionObserver" in window;
682
687
  const SUPPORTS_MUTATION_OBSERVER = IN_BROWSER && "MutationObserver" in window;
683
- const version = "0.0.23";
688
+ const version = "0.0.24";
684
689
  /* v8 ignore next -- build-time constant, __DEV__ short-circuits in tests */
685
690
  const __LOGGER_ENABLED__ = false;
686
691
 
@@ -1322,7 +1327,7 @@ function createRegistry(options) {
1322
1327
  }
1323
1328
  function register(registration = {}) {
1324
1329
  const size = collection.size;
1325
- const id = registration.id ?? /* @__PURE__ */ genId();
1330
+ const id = registration.id ?? /* @__PURE__ */ useId();
1326
1331
  if (has(id)) {
1327
1332
  logger$1.warn(`Ticket "${id}" already exists. Use \`upsert()\` to update or check \`has()\` before registering.`);
1328
1333
  return get(id);
@@ -1569,7 +1574,7 @@ function createSelection(_options = {}) {
1569
1574
  return selectedIds.has(id);
1570
1575
  }
1571
1576
  function register(registration = {}) {
1572
- const id = registration.id ?? /* @__PURE__ */ genId();
1577
+ const id = registration.id ?? /* @__PURE__ */ useId();
1573
1578
  const item = {
1574
1579
  disabled: false,
1575
1580
  select: () => select(id),
@@ -1689,7 +1694,7 @@ function useSelection(namespace = "v0:selection") {
1689
1694
  //#endregion
1690
1695
  //#region src/components/Avatar/AvatarRoot.vue
1691
1696
  const [useAvatarRoot, provideAvatarContext] = createContext();
1692
- const _sfc_main$41 = /* @__PURE__ */ defineComponent({
1697
+ const _sfc_main$45 = /* @__PURE__ */ defineComponent({
1693
1698
  name: "AvatarRoot",
1694
1699
  __name: "AvatarRoot",
1695
1700
  props: {
@@ -1714,11 +1719,11 @@ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
1714
1719
  };
1715
1720
  }
1716
1721
  });
1717
- var AvatarRoot_default = _sfc_main$41;
1722
+ var AvatarRoot_default = _sfc_main$45;
1718
1723
 
1719
1724
  //#endregion
1720
1725
  //#region src/components/Avatar/AvatarFallback.vue
1721
- const _sfc_main$40 = /* @__PURE__ */ defineComponent({
1726
+ const _sfc_main$44 = /* @__PURE__ */ defineComponent({
1722
1727
  name: "AvatarFallback",
1723
1728
  __name: "AvatarFallback",
1724
1729
  props: {
@@ -1743,11 +1748,11 @@ const _sfc_main$40 = /* @__PURE__ */ defineComponent({
1743
1748
  };
1744
1749
  }
1745
1750
  });
1746
- var AvatarFallback_default = _sfc_main$40;
1751
+ var AvatarFallback_default = _sfc_main$44;
1747
1752
 
1748
1753
  //#endregion
1749
1754
  //#region src/components/Avatar/AvatarImage.vue
1750
- const _sfc_main$39 = /* @__PURE__ */ defineComponent({
1755
+ const _sfc_main$43 = /* @__PURE__ */ defineComponent({
1751
1756
  name: "AvatarImage",
1752
1757
  inheritAttrs: false,
1753
1758
  __name: "AvatarImage",
@@ -1807,7 +1812,7 @@ const _sfc_main$39 = /* @__PURE__ */ defineComponent({
1807
1812
  };
1808
1813
  }
1809
1814
  });
1810
- var AvatarImage_default = _sfc_main$39;
1815
+ var AvatarImage_default = _sfc_main$43;
1811
1816
 
1812
1817
  //#endregion
1813
1818
  //#region src/components/Avatar/index.ts
@@ -2059,7 +2064,7 @@ function createGroup(_options = {}) {
2059
2064
  else selection.toggle(id);
2060
2065
  }
2061
2066
  function register(registration = {}) {
2062
- const id = registration.id ?? /* @__PURE__ */ genId();
2067
+ const id = registration.id ?? /* @__PURE__ */ useId();
2063
2068
  const item = {
2064
2069
  ...registration,
2065
2070
  id,
@@ -2320,7 +2325,7 @@ function useProxyModel(registry, model, options) {
2320
2325
  //#endregion
2321
2326
  //#region src/components/Checkbox/CheckboxGroup.vue
2322
2327
  const [useCheckboxGroup, provideCheckboxGroup] = createContext();
2323
- const _sfc_main$38 = /* @__PURE__ */ defineComponent({
2328
+ const _sfc_main$42 = /* @__PURE__ */ defineComponent({
2324
2329
  name: "CheckboxGroup",
2325
2330
  __name: "CheckboxGroup",
2326
2331
  props: /* @__PURE__ */ mergeModels({
@@ -2386,17 +2391,17 @@ const _sfc_main$38 = /* @__PURE__ */ defineComponent({
2386
2391
  };
2387
2392
  }
2388
2393
  });
2389
- var CheckboxGroup_default = _sfc_main$38;
2394
+ var CheckboxGroup_default = _sfc_main$42;
2390
2395
 
2391
2396
  //#endregion
2392
2397
  //#region src/components/Checkbox/CheckboxRoot.vue
2393
2398
  const [useCheckboxRoot, provideCheckboxRoot] = createContext();
2394
- const _sfc_main$37 = /* @__PURE__ */ defineComponent({
2399
+ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
2395
2400
  name: "CheckboxRoot",
2396
2401
  inheritAttrs: false,
2397
2402
  __name: "CheckboxRoot",
2398
2403
  props: /* @__PURE__ */ mergeModels({
2399
- id: { default: () => /* @__PURE__ */ genId() },
2404
+ id: { default: () => useId$1() },
2400
2405
  label: {},
2401
2406
  value: {},
2402
2407
  name: {},
@@ -2525,7 +2530,7 @@ const _sfc_main$37 = /* @__PURE__ */ defineComponent({
2525
2530
  };
2526
2531
  }
2527
2532
  });
2528
- var CheckboxRoot_default = _sfc_main$37;
2533
+ var CheckboxRoot_default = _sfc_main$41;
2529
2534
 
2530
2535
  //#endregion
2531
2536
  //#region src/components/Checkbox/CheckboxHiddenInput.vue
@@ -2547,7 +2552,7 @@ const visuallyHiddenStyle$1 = {
2547
2552
  whiteSpace: "nowrap",
2548
2553
  border: "0"
2549
2554
  };
2550
- const _sfc_main$36 = /* @__PURE__ */ defineComponent({
2555
+ const _sfc_main$40 = /* @__PURE__ */ defineComponent({
2551
2556
  name: "CheckboxHiddenInput",
2552
2557
  __name: "CheckboxHiddenInput",
2553
2558
  props: {
@@ -2583,11 +2588,11 @@ const _sfc_main$36 = /* @__PURE__ */ defineComponent({
2583
2588
  };
2584
2589
  }
2585
2590
  });
2586
- var CheckboxHiddenInput_default = _sfc_main$36;
2591
+ var CheckboxHiddenInput_default = _sfc_main$40;
2587
2592
 
2588
2593
  //#endregion
2589
2594
  //#region src/components/Checkbox/CheckboxIndicator.vue
2590
- const _sfc_main$35 = /* @__PURE__ */ defineComponent({
2595
+ const _sfc_main$39 = /* @__PURE__ */ defineComponent({
2591
2596
  name: "CheckboxIndicator",
2592
2597
  __name: "CheckboxIndicator",
2593
2598
  props: {
@@ -2620,11 +2625,11 @@ const _sfc_main$35 = /* @__PURE__ */ defineComponent({
2620
2625
  };
2621
2626
  }
2622
2627
  });
2623
- var CheckboxIndicator_default = _sfc_main$35;
2628
+ var CheckboxIndicator_default = _sfc_main$39;
2624
2629
 
2625
2630
  //#endregion
2626
2631
  //#region src/components/Checkbox/CheckboxSelectAll.vue
2627
- const _sfc_main$34 = /* @__PURE__ */ defineComponent({
2632
+ const _sfc_main$38 = /* @__PURE__ */ defineComponent({
2628
2633
  name: "CheckboxSelectAll",
2629
2634
  inheritAttrs: false,
2630
2635
  __name: "CheckboxSelectAll",
@@ -2643,7 +2648,7 @@ const _sfc_main$34 = /* @__PURE__ */ defineComponent({
2643
2648
  const props = __props;
2644
2649
  const { as = "button", renderless, label, namespace = "v0:checkbox:root", groupNamespace = "v0:checkbox:group" } = props;
2645
2650
  const group = useCheckboxGroup(groupNamespace);
2646
- const id = /* @__PURE__ */ genId();
2651
+ const id = useId$1();
2647
2652
  const isAllSelected = toRef(() => group.isAllSelected.value);
2648
2653
  const isMixed = toRef(() => group.isMixed.value);
2649
2654
  const isDisabled = toRef(() => toValue(props.disabled) || toValue(group.disabled));
@@ -2710,7 +2715,7 @@ const _sfc_main$34 = /* @__PURE__ */ defineComponent({
2710
2715
  };
2711
2716
  }
2712
2717
  });
2713
- var CheckboxSelectAll_default = _sfc_main$34;
2718
+ var CheckboxSelectAll_default = _sfc_main$38;
2714
2719
 
2715
2720
  //#endregion
2716
2721
  //#region src/components/Checkbox/index.ts
@@ -2746,7 +2751,7 @@ const Checkbox = {
2746
2751
  //#endregion
2747
2752
  //#region src/components/Dialog/DialogRoot.vue
2748
2753
  const [useDialogContext, provideDialogContext] = createContext();
2749
- const _sfc_main$33 = /* @__PURE__ */ defineComponent({
2754
+ const _sfc_main$37 = /* @__PURE__ */ defineComponent({
2750
2755
  name: "DialogRoot",
2751
2756
  __name: "DialogRoot",
2752
2757
  props: /* @__PURE__ */ mergeModels({
@@ -2763,11 +2768,10 @@ const _sfc_main$33 = /* @__PURE__ */ defineComponent({
2763
2768
  }),
2764
2769
  emits: /* @__PURE__ */ mergeModels(["update:modelValue"], ["update:modelValue"]),
2765
2770
  setup(__props) {
2766
- const props = createPropsRestProxy(__props, ["as", "namespace"]);
2767
2771
  const isOpen = useModel(__props, "modelValue");
2768
- const id = toRef(() => props.id ?? useId());
2769
- const titleId = toRef(() => `${toValue(id)}-title`);
2770
- const descriptionId = toRef(() => `${toValue(id)}-description`);
2772
+ const id = __props.id ?? useId$1();
2773
+ const titleId = `${id}-title`;
2774
+ const descriptionId = `${id}-description`;
2771
2775
  function open() {
2772
2776
  isOpen.value = true;
2773
2777
  }
@@ -2776,14 +2780,14 @@ const _sfc_main$33 = /* @__PURE__ */ defineComponent({
2776
2780
  }
2777
2781
  provideDialogContext(__props.namespace, {
2778
2782
  isOpen,
2779
- id: toValue(id),
2780
- titleId: toValue(titleId),
2781
- descriptionId: toValue(descriptionId),
2783
+ id,
2784
+ titleId,
2785
+ descriptionId,
2782
2786
  open,
2783
2787
  close
2784
2788
  });
2785
2789
  const slotProps = toRef(() => ({
2786
- id: toValue(id),
2790
+ id,
2787
2791
  isOpen: isOpen.value,
2788
2792
  open,
2789
2793
  close
@@ -2799,11 +2803,11 @@ const _sfc_main$33 = /* @__PURE__ */ defineComponent({
2799
2803
  };
2800
2804
  }
2801
2805
  });
2802
- var DialogRoot_default = _sfc_main$33;
2806
+ var DialogRoot_default = _sfc_main$37;
2803
2807
 
2804
2808
  //#endregion
2805
2809
  //#region src/components/Dialog/DialogClose.vue
2806
- const _sfc_main$32 = /* @__PURE__ */ defineComponent({
2810
+ const _sfc_main$36 = /* @__PURE__ */ defineComponent({
2807
2811
  name: "DialogClose",
2808
2812
  __name: "DialogClose",
2809
2813
  props: {
@@ -2831,7 +2835,7 @@ const _sfc_main$32 = /* @__PURE__ */ defineComponent({
2831
2835
  };
2832
2836
  }
2833
2837
  });
2834
- var DialogClose_default = _sfc_main$32;
2838
+ var DialogClose_default = _sfc_main$36;
2835
2839
 
2836
2840
  //#endregion
2837
2841
  //#region src/composables/toReactive/index.ts
@@ -3006,18 +3010,26 @@ function toReactive(objectRef) {
3006
3010
  */
3007
3011
  function createHydration() {
3008
3012
  const isHydrated = shallowRef(false);
3013
+ const isSettled = shallowRef(false);
3009
3014
  function hydrate() {
3010
3015
  isHydrated.value = true;
3011
3016
  }
3017
+ function settle() {
3018
+ isSettled.value = true;
3019
+ }
3012
3020
  return {
3013
3021
  isHydrated: shallowReadonly(isHydrated),
3014
- hydrate
3022
+ isSettled: shallowReadonly(isSettled),
3023
+ hydrate,
3024
+ settle
3015
3025
  };
3016
3026
  }
3017
3027
  function createFallbackHydration() {
3018
3028
  return {
3019
3029
  isHydrated: shallowReadonly(shallowRef(true)),
3020
- hydrate: () => {}
3030
+ isSettled: shallowReadonly(shallowRef(true)),
3031
+ hydrate: () => {},
3032
+ settle: () => {}
3021
3033
  };
3022
3034
  }
3023
3035
  /**
@@ -3081,9 +3093,11 @@ function createHydrationPlugin(_options = {}) {
3081
3093
  provideHydrationContext(context, app);
3082
3094
  },
3083
3095
  setup: (app) => {
3084
- app.mixin({ mounted() {
3096
+ app.mixin({ async mounted() {
3085
3097
  if (!/* @__PURE__ */ isNull(this.$parent)) return;
3086
3098
  context.hydrate();
3099
+ await nextTick();
3100
+ context.settle();
3087
3101
  } });
3088
3102
  }
3089
3103
  });
@@ -3101,13 +3115,16 @@ function createHydrationPlugin(_options = {}) {
3101
3115
  * <script setup lang="ts">
3102
3116
  * import { useHydration } from '@vuetify/v0'
3103
3117
  *
3104
- * const hydration = useHydration()
3118
+ * const { isHydrated, isSettled } = useHydration()
3119
+ *
3120
+ * // Use isSettled to gate animations after state restoration
3121
+ * const transition = computed(() => isSettled.value ? 'fade' : undefined)
3105
3122
  * <\/script>
3106
3123
  *
3107
3124
  * <template>
3108
- * <div>
3109
- * <p>Is hydrated: {{ hydration.isHydrated.value }}</p>
3110
- * </div>
3125
+ * <Transition :name="transition">
3126
+ * <div v-if="show">Animates only after hydration settles</div>
3127
+ * </Transition>
3111
3128
  * </template>
3112
3129
  * ```
3113
3130
  */
@@ -3990,585 +4007,6 @@ function useLocale(namespace = "v0:locale") {
3990
4007
  }
3991
4008
  }
3992
4009
 
3993
- //#endregion
3994
- //#region src/composables/useDate/adapters/v0.ts
3995
- /**
3996
- * @module Vuetify0DateAdapter
3997
- *
3998
- * @remarks
3999
- * Default DateAdapter for v0, built on the Temporal API.
4000
- * Uses Temporal.PlainDateTime as the primary date type.
4001
- *
4002
- * Implements the full date-io IUtils interface for industry compatibility.
4003
- *
4004
- * Requires native Temporal support or @js-temporal/polyfill.
4005
- *
4006
- * @see https://tc39.es/proposal-temporal/docs/
4007
- * @see https://github.com/dmtrKovalenko/date-io
4008
- */
4009
- /** Single regex for token replacement in formatByString */
4010
- const FORMAT_TOKEN_REGEX = /YYYY|YY|MMMM|MMM|MM|M|dddd|ddd|DD|D|HH|H|hh|h|mm|m|ss|s|A|a/g;
4011
- /** Maximum cache size to prevent memory leaks */
4012
- const MAX_CACHE_SIZE = 50;
4013
- var Vuetify0DateAdapter = class {
4014
- _locale;
4015
- /** Cache for Intl.DateTimeFormat instances, keyed by locale + options */
4016
- formatCache = /* @__PURE__ */ new Map();
4017
- /** Cache for Intl.NumberFormat instances, keyed by locale */
4018
- numberFormatCache = /* @__PURE__ */ new Map();
4019
- constructor(locale = "en-US") {
4020
- this._locale = locale;
4021
- }
4022
- /** Current locale. Setting a new locale clears format caches. */
4023
- get locale() {
4024
- return this._locale;
4025
- }
4026
- set locale(value) {
4027
- if (this._locale !== value) {
4028
- this._locale = value;
4029
- this.formatCache.clear();
4030
- this.numberFormatCache.clear();
4031
- }
4032
- }
4033
- /**
4034
- * Create a date from various input types.
4035
- *
4036
- * @param value - Date value (PlainDateTime, PlainDate, ZonedDateTime, Date, ISO string, timestamp)
4037
- * @returns PlainDateTime or null if invalid
4038
- *
4039
- * @remarks
4040
- * **SSR Safety:** When called without arguments:
4041
- * - Browser: Returns current time via `Temporal.Now.plainDateTimeISO()`
4042
- * - Server: Returns epoch (1970-01-01T00:00:00) for deterministic rendering
4043
- *
4044
- * For SSR apps needing current time, pass `Date.now()` explicitly and handle
4045
- * hydration via `<ClientOnly>` (Nuxt) or `v-if` + `onMounted` pattern.
4046
- */
4047
- date(value) {
4048
- if (/* @__PURE__ */ isNullOrUndefined(value)) return IN_BROWSER ? Temporal.Now.plainDateTimeISO() : Temporal.PlainDateTime.from({
4049
- year: 1970,
4050
- month: 1,
4051
- day: 1,
4052
- hour: 0,
4053
- minute: 0,
4054
- second: 0
4055
- });
4056
- if (value instanceof Temporal.PlainDateTime) return value;
4057
- if (value instanceof Temporal.PlainDate) return value.toPlainDateTime();
4058
- if (value instanceof Temporal.ZonedDateTime) return value.toPlainDateTime();
4059
- if (value instanceof Date) return Temporal.PlainDateTime.from({
4060
- year: value.getFullYear(),
4061
- month: value.getMonth() + 1,
4062
- day: value.getDate(),
4063
- hour: value.getHours(),
4064
- minute: value.getMinutes(),
4065
- second: value.getSeconds(),
4066
- millisecond: value.getMilliseconds()
4067
- });
4068
- if (/* @__PURE__ */ isString(value)) try {
4069
- return Temporal.PlainDateTime.from(value);
4070
- } catch {
4071
- try {
4072
- return this.parseISO(value);
4073
- } catch {
4074
- return null;
4075
- }
4076
- }
4077
- if (/* @__PURE__ */ isNumber(value)) {
4078
- const date = new Date(value);
4079
- return Temporal.PlainDateTime.from({
4080
- year: date.getFullYear(),
4081
- month: date.getMonth() + 1,
4082
- day: date.getDate(),
4083
- hour: date.getHours(),
4084
- minute: date.getMinutes(),
4085
- second: date.getSeconds(),
4086
- millisecond: date.getMilliseconds()
4087
- });
4088
- }
4089
- return null;
4090
- }
4091
- toJsDate(value) {
4092
- return new Date(value.year, value.month - 1, value.day, value.hour, value.minute, value.second, value.millisecond);
4093
- }
4094
- parseISO(dateString) {
4095
- if (/^\d{4}-\d{2}-\d{2}$/.test(dateString)) return Temporal.PlainDate.from(dateString).toPlainDateTime();
4096
- if (dateString.includes("Z") || /[+-]\d{2}:\d{2}$/.test(dateString)) return Temporal.Instant.from(dateString).toZonedDateTimeISO("UTC").toPlainDateTime();
4097
- return Temporal.PlainDateTime.from(dateString);
4098
- }
4099
- toISO(date) {
4100
- return date.toString();
4101
- }
4102
- /**
4103
- * Parses a date string into a PlainDateTime.
4104
- *
4105
- * **Known limitation**: The `format` parameter is currently ignored.
4106
- * Temporal API doesn't provide built-in format parsing, and implementing
4107
- * full format string parsing (e.g., 'MM/DD/YYYY') would require a
4108
- * substantial custom parser. This method delegates to `date()` which
4109
- * handles ISO 8601 strings and common formats.
4110
- *
4111
- * For custom format parsing, consider using a library like date-fns or
4112
- * luxon with a custom adapter.
4113
- *
4114
- * @param value - The date string to parse
4115
- * @param _format - Format hint (currently ignored)
4116
- * @returns Parsed PlainDateTime or null if invalid
4117
- */
4118
- parse(value, _format) {
4119
- try {
4120
- return this.date(value);
4121
- } catch {
4122
- return null;
4123
- }
4124
- }
4125
- isValid(date) {
4126
- if (/* @__PURE__ */ isNullOrUndefined(date)) return false;
4127
- if (date instanceof Temporal.PlainDateTime) return true;
4128
- if (date instanceof Temporal.PlainDate) return true;
4129
- if (date instanceof Temporal.ZonedDateTime) return true;
4130
- if (date instanceof Date) return !Number.isNaN(date.getTime());
4131
- if (/* @__PURE__ */ isString(date)) try {
4132
- Temporal.PlainDateTime.from(date);
4133
- return true;
4134
- } catch {
4135
- try {
4136
- Temporal.PlainDate.from(date);
4137
- return true;
4138
- } catch {
4139
- return false;
4140
- }
4141
- }
4142
- return false;
4143
- }
4144
- isNull(value) {
4145
- return /* @__PURE__ */ isNullOrUndefined(value);
4146
- }
4147
- getCurrentLocaleCode() {
4148
- return this.locale;
4149
- }
4150
- is12HourCycleInCurrentLocale() {
4151
- return new Intl.DateTimeFormat(this.locale, { hour: "numeric" }).resolvedOptions().hour12 ?? false;
4152
- }
4153
- format(date, formatString) {
4154
- const jsDate = this.toJsDate(date);
4155
- const options = {
4156
- fullDate: { dateStyle: "full" },
4157
- fullDateWithWeekday: {
4158
- weekday: "long",
4159
- year: "numeric",
4160
- month: "long",
4161
- day: "numeric"
4162
- },
4163
- normalDate: { dateStyle: "medium" },
4164
- shortDate: { dateStyle: "short" },
4165
- year: { year: "numeric" },
4166
- month: { month: "long" },
4167
- monthShort: { month: "short" },
4168
- monthAndYear: {
4169
- year: "numeric",
4170
- month: "long"
4171
- },
4172
- monthAndDate: {
4173
- month: "long",
4174
- day: "numeric"
4175
- },
4176
- weekday: { weekday: "long" },
4177
- weekdayShort: { weekday: "short" },
4178
- dayOfMonth: { day: "numeric" },
4179
- hours12h: {
4180
- hour: "numeric",
4181
- hour12: true
4182
- },
4183
- hours24h: {
4184
- hour: "numeric",
4185
- hour12: false
4186
- },
4187
- minutes: { minute: "numeric" },
4188
- seconds: { second: "numeric" },
4189
- fullTime: { timeStyle: "medium" },
4190
- fullTime12h: {
4191
- hour: "numeric",
4192
- minute: "numeric",
4193
- second: "numeric",
4194
- hour12: true
4195
- },
4196
- fullTime24h: {
4197
- hour: "numeric",
4198
- minute: "numeric",
4199
- second: "numeric",
4200
- hour12: false
4201
- },
4202
- fullDateTime: {
4203
- dateStyle: "full",
4204
- timeStyle: "short"
4205
- },
4206
- fullDateTime12h: {
4207
- dateStyle: "full",
4208
- hour: "numeric",
4209
- minute: "numeric",
4210
- hour12: true
4211
- },
4212
- fullDateTime24h: {
4213
- dateStyle: "full",
4214
- hour: "numeric",
4215
- minute: "numeric",
4216
- hour12: false
4217
- },
4218
- keyboardDate: {
4219
- year: "numeric",
4220
- month: "2-digit",
4221
- day: "2-digit"
4222
- },
4223
- keyboardDateTime: {
4224
- year: "numeric",
4225
- month: "2-digit",
4226
- day: "2-digit",
4227
- hour: "numeric",
4228
- minute: "numeric"
4229
- },
4230
- keyboardDateTime12h: {
4231
- year: "numeric",
4232
- month: "2-digit",
4233
- day: "2-digit",
4234
- hour: "numeric",
4235
- minute: "numeric",
4236
- hour12: true
4237
- },
4238
- keyboardDateTime24h: {
4239
- year: "numeric",
4240
- month: "2-digit",
4241
- day: "2-digit",
4242
- hour: "numeric",
4243
- minute: "numeric",
4244
- hour12: false
4245
- }
4246
- }[formatString];
4247
- if (options) return this.getFormatter(options).format(jsDate);
4248
- return this.getFormatter({}).format(jsDate);
4249
- }
4250
- formatByString(date, formatString) {
4251
- const jsDate = this.toJsDate(date);
4252
- const getTokenValue = (token) => {
4253
- switch (token) {
4254
- case "YYYY": return String(date.year);
4255
- case "YY": return String(date.year).slice(-2);
4256
- case "MM": return String(date.month).padStart(2, "0");
4257
- case "M": return String(date.month);
4258
- case "DD": return String(date.day).padStart(2, "0");
4259
- case "D": return String(date.day);
4260
- case "HH": return String(date.hour).padStart(2, "0");
4261
- case "H": return String(date.hour);
4262
- case "hh": return String(date.hour % 12 || 12).padStart(2, "0");
4263
- case "h": return String(date.hour % 12 || 12);
4264
- case "mm": return String(date.minute).padStart(2, "0");
4265
- case "m": return String(date.minute);
4266
- case "ss": return String(date.second).padStart(2, "0");
4267
- case "s": return String(date.second);
4268
- case "A": return date.hour < 12 ? "AM" : "PM";
4269
- case "a": return date.hour < 12 ? "am" : "pm";
4270
- case "MMMM": return this.getFormatter({ month: "long" }).format(jsDate);
4271
- case "MMM": return this.getFormatter({ month: "short" }).format(jsDate);
4272
- case "dddd": return this.getFormatter({ weekday: "long" }).format(jsDate);
4273
- case "ddd": return this.getFormatter({ weekday: "short" }).format(jsDate);
4274
- default: return token;
4275
- }
4276
- };
4277
- return formatString.replace(FORMAT_TOKEN_REGEX, (match) => getTokenValue(match));
4278
- }
4279
- getFormatHelperText(format) {
4280
- return {
4281
- keyboardDate: "mm/dd/yyyy",
4282
- keyboardDateTime: "mm/dd/yyyy hh:mm",
4283
- keyboardDateTime12h: "mm/dd/yyyy hh:mm am/pm",
4284
- keyboardDateTime24h: "mm/dd/yyyy hh:mm"
4285
- }[format] ?? format.replace(/YYYY/g, "yyyy").replace(/MM/g, "mm").replace(/DD/g, "dd").replace(/HH/g, "hh").replace(/mm/g, "mm").replace(/ss/g, "ss");
4286
- }
4287
- formatNumber(numberToFormat) {
4288
- return this.getNumberFormatter().format(Number(numberToFormat));
4289
- }
4290
- getMeridiemText(ampm) {
4291
- const date = ampm === "am" ? new Date(2020, 0, 1, 9, 0) : new Date(2020, 0, 1, 15, 0);
4292
- const match = this.getFormatter({
4293
- hour: "numeric",
4294
- hour12: true
4295
- }).format(date).match(/[AP]M|[ap]m|午前|午後|上午|下午/i);
4296
- return match ? match[0] : ampm.toUpperCase();
4297
- }
4298
- startOfDay(date) {
4299
- return date.with({
4300
- hour: 0,
4301
- minute: 0,
4302
- second: 0,
4303
- millisecond: 0,
4304
- microsecond: 0,
4305
- nanosecond: 0
4306
- });
4307
- }
4308
- endOfDay(date) {
4309
- return date.with({
4310
- hour: 23,
4311
- minute: 59,
4312
- second: 59,
4313
- millisecond: 999,
4314
- microsecond: 999,
4315
- nanosecond: 999
4316
- });
4317
- }
4318
- startOfWeek(date, firstDayOfWeek = 0) {
4319
- const diff = (date.dayOfWeek % 7 - firstDayOfWeek + 7) % 7;
4320
- return this.startOfDay(date.subtract({ days: diff }));
4321
- }
4322
- endOfWeek(date, firstDayOfWeek = 0) {
4323
- const start = this.startOfWeek(date, firstDayOfWeek);
4324
- return this.endOfDay(start.add({ days: 6 }));
4325
- }
4326
- startOfMonth(date) {
4327
- return this.startOfDay(date.with({ day: 1 }));
4328
- }
4329
- endOfMonth(date) {
4330
- return this.endOfDay(date.with({ day: date.daysInMonth }));
4331
- }
4332
- startOfYear(date) {
4333
- return this.startOfDay(date.with({
4334
- month: 1,
4335
- day: 1
4336
- }));
4337
- }
4338
- endOfYear(date) {
4339
- return this.endOfDay(date.with({
4340
- month: 12,
4341
- day: 31
4342
- }));
4343
- }
4344
- addSeconds(date, amount) {
4345
- return date.add({ seconds: amount });
4346
- }
4347
- addMinutes(date, amount) {
4348
- return date.add({ minutes: amount });
4349
- }
4350
- addHours(date, amount) {
4351
- return date.add({ hours: amount });
4352
- }
4353
- addDays(date, amount) {
4354
- return date.add({ days: amount });
4355
- }
4356
- addWeeks(date, amount) {
4357
- return date.add({ weeks: amount });
4358
- }
4359
- addMonths(date, amount) {
4360
- return date.add({ months: amount });
4361
- }
4362
- addYears(date, amount) {
4363
- return date.add({ years: amount });
4364
- }
4365
- isAfter(date, comparing) {
4366
- return Temporal.PlainDateTime.compare(date, comparing) > 0;
4367
- }
4368
- isAfterDay(date, comparing) {
4369
- return Temporal.PlainDate.compare(date.toPlainDate(), comparing.toPlainDate()) > 0;
4370
- }
4371
- isAfterMonth(date, comparing) {
4372
- if (date.year !== comparing.year) return date.year > comparing.year;
4373
- return date.month > comparing.month;
4374
- }
4375
- isAfterYear(date, comparing) {
4376
- return date.year > comparing.year;
4377
- }
4378
- isBefore(date, comparing) {
4379
- return Temporal.PlainDateTime.compare(date, comparing) < 0;
4380
- }
4381
- isBeforeDay(date, comparing) {
4382
- return Temporal.PlainDate.compare(date.toPlainDate(), comparing.toPlainDate()) < 0;
4383
- }
4384
- isBeforeMonth(date, comparing) {
4385
- if (date.year !== comparing.year) return date.year < comparing.year;
4386
- return date.month < comparing.month;
4387
- }
4388
- isBeforeYear(date, comparing) {
4389
- return date.year < comparing.year;
4390
- }
4391
- isEqual(date, comparing) {
4392
- return Temporal.PlainDateTime.compare(date, comparing) === 0;
4393
- }
4394
- isSameDay(date, comparing) {
4395
- return Temporal.PlainDate.compare(date.toPlainDate(), comparing.toPlainDate()) === 0;
4396
- }
4397
- isSameMonth(date, comparing) {
4398
- return date.year === comparing.year && date.month === comparing.month;
4399
- }
4400
- isSameYear(date, comparing) {
4401
- return date.year === comparing.year;
4402
- }
4403
- isSameHour(date, comparing) {
4404
- return date.year === comparing.year && date.month === comparing.month && date.day === comparing.day && date.hour === comparing.hour;
4405
- }
4406
- isWithinRange(date, [start, end]) {
4407
- return Temporal.PlainDateTime.compare(date, start) >= 0 && Temporal.PlainDateTime.compare(date, end) <= 0;
4408
- }
4409
- getYear(date) {
4410
- return date.year;
4411
- }
4412
- getMonth(date) {
4413
- return date.month - 1;
4414
- }
4415
- getDate(date) {
4416
- return date.day;
4417
- }
4418
- getHours(date) {
4419
- return date.hour;
4420
- }
4421
- getMinutes(date) {
4422
- return date.minute;
4423
- }
4424
- getSeconds(date) {
4425
- return date.second;
4426
- }
4427
- getDiff(date, comparing, unit) {
4428
- const unitKey = unit ?? "days";
4429
- const comp = /* @__PURE__ */ isString(comparing) ? this.date(comparing) : comparing;
4430
- if (/* @__PURE__ */ isNull(comp)) return 0;
4431
- const duration = date.since(comp, { largestUnit: unitKey });
4432
- switch (unitKey) {
4433
- case "years": return duration.years;
4434
- case "months": return duration.months + duration.years * 12;
4435
- case "weeks": return duration.weeks + Math.floor(duration.days / 7);
4436
- case "days": return duration.days + duration.weeks * 7;
4437
- case "hours": return Math.round(duration.total({ unit: "hours" }));
4438
- case "minutes": return Math.round(duration.total({ unit: "minutes" }));
4439
- case "seconds": return Math.round(duration.total({ unit: "seconds" }));
4440
- default: return duration.days;
4441
- }
4442
- }
4443
- getWeek(date, firstDayOfWeek = 0, minimalDays = 1) {
4444
- const startOfYear = this.startOfYear(date);
4445
- const startOfFirstWeek = this.startOfWeek(startOfYear, firstDayOfWeek);
4446
- let firstWeekStart = startOfFirstWeek;
4447
- if (startOfYear.day - startOfFirstWeek.day < minimalDays) firstWeekStart = startOfFirstWeek.add({ weeks: 1 });
4448
- const startOfCurrentWeek = this.startOfWeek(date, firstDayOfWeek);
4449
- const diff = this.getDiff(startOfCurrentWeek, firstWeekStart, "weeks");
4450
- return Math.max(1, diff + 1);
4451
- }
4452
- getDaysInMonth(date) {
4453
- return date.daysInMonth;
4454
- }
4455
- setYear(date, year) {
4456
- return date.with({ year });
4457
- }
4458
- setMonth(date, month) {
4459
- return date.with({ month: month + 1 });
4460
- }
4461
- setDate(date, day) {
4462
- return date.with({ day });
4463
- }
4464
- setHours(date, hours) {
4465
- return date.with({ hour: hours });
4466
- }
4467
- setMinutes(date, minutes) {
4468
- return date.with({ minute: minutes });
4469
- }
4470
- setSeconds(date, seconds) {
4471
- return date.with({ second: seconds });
4472
- }
4473
- getWeekdays(firstDayOfWeek = 0, format = "short") {
4474
- const weekdays = [];
4475
- const refDate = Temporal.PlainDate.from("2015-01-04");
4476
- const formatter = this.getFormatter({ weekday: format });
4477
- for (let i = 0; i < 7; i++) {
4478
- const day = refDate.add({ days: (i + firstDayOfWeek) % 7 });
4479
- const jsDate = new Date(day.year, day.month - 1, day.day);
4480
- weekdays.push(formatter.format(jsDate));
4481
- }
4482
- return weekdays;
4483
- }
4484
- getWeekArray(date, firstDayOfWeek = 0) {
4485
- const weeks = [];
4486
- const monthStart = this.startOfMonth(date);
4487
- const monthEnd = this.endOfMonth(date);
4488
- let current = this.startOfWeek(monthStart, firstDayOfWeek);
4489
- const end = this.endOfWeek(monthEnd);
4490
- while (Temporal.PlainDateTime.compare(current, end) <= 0) {
4491
- const week = [];
4492
- for (let i = 0; i < 7; i++) {
4493
- week.push(current);
4494
- current = current.add({ days: 1 });
4495
- }
4496
- weeks.push(week);
4497
- }
4498
- return weeks;
4499
- }
4500
- getMonthArray(date) {
4501
- const year = date.year;
4502
- const months = [];
4503
- for (let month = 1; month <= 12; month++) months.push(Temporal.PlainDateTime.from({
4504
- year,
4505
- month,
4506
- day: 1
4507
- }));
4508
- return months;
4509
- }
4510
- getYearRange(start, end) {
4511
- const years = [];
4512
- let current = start.year;
4513
- while (current <= end.year) {
4514
- years.push(Temporal.PlainDateTime.from({
4515
- year: current,
4516
- month: 1,
4517
- day: 1
4518
- }));
4519
- current++;
4520
- }
4521
- return years;
4522
- }
4523
- getNextMonth(date) {
4524
- return this.startOfMonth(date.add({ months: 1 }));
4525
- }
4526
- getPreviousMonth(date) {
4527
- return this.startOfMonth(date.subtract({ months: 1 }));
4528
- }
4529
- mergeDateAndTime(date, time) {
4530
- return date.with({
4531
- hour: time.hour,
4532
- minute: time.minute,
4533
- second: time.second,
4534
- millisecond: time.millisecond
4535
- });
4536
- }
4537
- /**
4538
- * Gets a cached Intl.DateTimeFormat instance or creates one if not cached.
4539
- * Cache is limited to MAX_CACHE_SIZE entries to prevent memory leaks.
4540
- */
4541
- getFormatter(options) {
4542
- const key = `${this.locale}:${JSON.stringify(options)}`;
4543
- let formatter = this.formatCache.get(key);
4544
- if (!formatter) {
4545
- if (this.formatCache.size >= MAX_CACHE_SIZE) {
4546
- const firstKey = this.formatCache.keys().next().value;
4547
- if (firstKey) this.formatCache.delete(firstKey);
4548
- }
4549
- formatter = new Intl.DateTimeFormat(this.locale, options);
4550
- this.formatCache.set(key, formatter);
4551
- }
4552
- return formatter;
4553
- }
4554
- /**
4555
- * Gets a cached Intl.NumberFormat instance or creates one if not cached.
4556
- * Cache is limited to MAX_CACHE_SIZE entries to prevent memory leaks.
4557
- */
4558
- getNumberFormatter() {
4559
- let formatter = this.numberFormatCache.get(this.locale);
4560
- if (!formatter) {
4561
- if (this.numberFormatCache.size >= MAX_CACHE_SIZE) {
4562
- const firstKey = this.numberFormatCache.keys().next().value;
4563
- if (firstKey) this.numberFormatCache.delete(firstKey);
4564
- }
4565
- formatter = new Intl.NumberFormat(this.locale);
4566
- this.numberFormatCache.set(this.locale, formatter);
4567
- }
4568
- return formatter;
4569
- }
4570
- };
4571
-
4572
4010
  //#endregion
4573
4011
  //#region src/composables/useDate/index.ts
4574
4012
  /**
@@ -4579,16 +4017,16 @@ var Vuetify0DateAdapter = class {
4579
4017
  *
4580
4018
  * Key features:
4581
4019
  * - Adapter pattern for date library abstraction
4582
- * - Temporal API as default adapter (modern, immutable dates)
4583
4020
  * - Locale-aware formatting via Intl.DateTimeFormat
4584
4021
  * - Integration with useLocale for automatic locale sync
4585
4022
  *
4586
- * @example
4023
+ * @example Using the built-in Temporal adapter
4587
4024
  * ```ts
4025
+ * import { Vuetify0DateAdapter } from '@vuetify/v0/date'
4588
4026
  * import { createDatePlugin } from '@vuetify/v0'
4589
4027
  *
4590
4028
  * const app = createApp(App)
4591
- * app.use(createDatePlugin())
4029
+ * app.use(createDatePlugin({ adapter: new Vuetify0DateAdapter() }))
4592
4030
  *
4593
4031
  * // In a component:
4594
4032
  * const { adapter } = useDate()
@@ -4604,7 +4042,7 @@ var Vuetify0DateAdapter = class {
4604
4042
  * // ... implementation
4605
4043
  * }
4606
4044
  *
4607
- * const context = createDate({ adapter: new DateFnsAdapter() })
4045
+ * app.use(createDatePlugin({ adapter: new DateFnsAdapter() }))
4608
4046
  * ```
4609
4047
  */
4610
4048
  /**
@@ -4627,7 +4065,8 @@ const defaultLocales = {
4627
4065
  /**
4628
4066
  * Creates a new date context.
4629
4067
  *
4630
- * @param options Optional adapter and locale configuration.
4068
+ * @param options Adapter and locale configuration.
4069
+ * @template Z The date type used by the adapter.
4631
4070
  * @template E The date context type.
4632
4071
  * @returns A date context.
4633
4072
  *
@@ -4635,18 +4074,20 @@ const defaultLocales = {
4635
4074
  *
4636
4075
  * @example
4637
4076
  * ```ts
4638
- * const { adapter } = createDate()
4639
- * const today = adapter.date() // Temporal.PlainDateTime
4077
+ * import { Vuetify0DateAdapter } from '@vuetify/v0/date'
4640
4078
  *
4641
- * // With locale options
4642
- * const { adapter: deAdapter } = createDate({ locale: 'de-DE' })
4079
+ * const { adapter } = createDate({ adapter: new Vuetify0DateAdapter() })
4080
+ * const today = adapter.date()
4643
4081
  *
4644
- * // With custom adapter
4645
- * const { adapter } = createDate({ adapter: new DateFnsAdapter() })
4082
+ * // With locale options
4083
+ * const { adapter } = createDate({
4084
+ * adapter: new Vuetify0DateAdapter(),
4085
+ * locale: 'de-DE',
4086
+ * })
4646
4087
  * ```
4647
4088
  */
4648
- function createDate(options = {}) {
4649
- const { locales = defaultLocales, adapter = new Vuetify0DateAdapter(), locale: initialLocale } = options;
4089
+ function createDate(options) {
4090
+ const { locales = defaultLocales, adapter, locale: initialLocale } = options;
4650
4091
  let selectedId;
4651
4092
  try {
4652
4093
  if (instanceExists()) selectedId = useLocale().selectedId;
@@ -4674,22 +4115,10 @@ function createDate(options = {}) {
4674
4115
  };
4675
4116
  }
4676
4117
  /**
4677
- * Creates a fallback date context for when useDate is called outside of a Vue component.
4678
- *
4679
- * @returns A fallback date context with Vuetify0DateAdapter.
4680
- * @internal
4681
- */
4682
- function createDateFallback() {
4683
- const adapter = new Vuetify0DateAdapter();
4684
- return {
4685
- adapter,
4686
- locale: computed(() => adapter.locale ?? "en-US")
4687
- };
4688
- }
4689
- /**
4690
4118
  * Creates a new date context trinity.
4691
4119
  *
4692
- * @param options Optional adapter, locale, and namespace configuration.
4120
+ * @param options Adapter, locale, and namespace configuration.
4121
+ * @template Z The date type used by the adapter.
4693
4122
  * @template E The date context type.
4694
4123
  * @returns A trinity [useContext, provideContext, defaultContext].
4695
4124
  *
@@ -4697,18 +4126,15 @@ function createDateFallback() {
4697
4126
  *
4698
4127
  * @example
4699
4128
  * ```ts
4700
- * const [useAppDate, provideAppDate] = createDateContext({
4701
- * namespace: 'app:date',
4702
- * })
4129
+ * import { Vuetify0DateAdapter } from '@vuetify/v0/date'
4703
4130
  *
4704
- * // With custom adapter
4705
4131
  * const [useAppDate, provideAppDate] = createDateContext({
4706
- * adapter: new DateFnsAdapter(),
4132
+ * adapter: new Vuetify0DateAdapter(),
4707
4133
  * namespace: 'app:date',
4708
4134
  * })
4709
4135
  * ```
4710
4136
  */
4711
- function createDateContext(options = {}) {
4137
+ function createDateContext(options) {
4712
4138
  const { namespace = "v0:date", ...dateOptions } = options;
4713
4139
  const [useDateContext, _provideDateContext] = createContext(namespace);
4714
4140
  const context = createDate(dateOptions);
@@ -4720,7 +4146,8 @@ function createDateContext(options = {}) {
4720
4146
  /**
4721
4147
  * Creates a new date plugin.
4722
4148
  *
4723
- * @param options Optional adapter, locale, and namespace configuration.
4149
+ * @param options Adapter, locale, and namespace configuration.
4150
+ * @template Z The date type used by the adapter.
4724
4151
  * @template E The date context type.
4725
4152
  * @returns A Vue plugin.
4726
4153
  *
@@ -4728,17 +4155,19 @@ function createDateContext(options = {}) {
4728
4155
  *
4729
4156
  * @example
4730
4157
  * ```ts
4731
- * const app = createApp(App)
4732
- * app.use(createDatePlugin())
4158
+ * import { Vuetify0DateAdapter } from '@vuetify/v0/date'
4733
4159
  *
4734
- * // With options
4735
- * app.use(createDatePlugin({ locale: 'de-DE' }))
4160
+ * const app = createApp(App)
4161
+ * app.use(createDatePlugin({ adapter: new Vuetify0DateAdapter() }))
4736
4162
  *
4737
- * // With custom adapter
4738
- * app.use(createDatePlugin({ adapter: new DateFnsAdapter() }))
4163
+ * // With locale options
4164
+ * app.use(createDatePlugin({
4165
+ * adapter: new Vuetify0DateAdapter(),
4166
+ * locale: 'de-DE',
4167
+ * }))
4739
4168
  * ```
4740
4169
  */
4741
- function createDatePlugin(options = {}) {
4170
+ function createDatePlugin(options) {
4742
4171
  const { namespace = "v0:date", ...dateOptions } = options;
4743
4172
  const [, provideDateContext, context] = createDateContext({
4744
4173
  namespace,
@@ -4754,16 +4183,26 @@ function createDatePlugin(options = {}) {
4754
4183
  /**
4755
4184
  * Returns the current date context.
4756
4185
  *
4757
- * When called inside a component with a provided date context (via plugin or provider),
4758
- * returns that context. Otherwise, returns a fallback context with Vuetify0DateAdapter.
4186
+ * Requires `createDatePlugin` to be installed with an adapter.
4759
4187
  *
4760
4188
  * @param namespace The namespace to look up (defaults to 'v0:date').
4189
+ * @template Z The date type used by the adapter.
4761
4190
  * @template E The date context type.
4762
4191
  * @returns The current date context.
4192
+ * @throws If called outside a component or without a date plugin installed.
4763
4193
  *
4764
4194
  * @see https://0.vuetifyjs.com/composables/plugins/use-date
4765
4195
  *
4766
4196
  * @example
4197
+ * ```ts
4198
+ * // main.ts
4199
+ * import { Vuetify0DateAdapter } from '@vuetify/v0/date'
4200
+ * import { createDatePlugin } from '@vuetify/v0'
4201
+ *
4202
+ * app.use(createDatePlugin({ adapter: new Vuetify0DateAdapter() }))
4203
+ * ```
4204
+ *
4205
+ * @example
4767
4206
  * ```vue
4768
4207
  * <script setup lang="ts">
4769
4208
  * import { useDate } from '@vuetify/v0'
@@ -4774,13 +4213,8 @@ function createDatePlugin(options = {}) {
4774
4213
  * ```
4775
4214
  */
4776
4215
  function useDate(namespace = "v0:date") {
4777
- const fallback = createDateFallback();
4778
- if (!instanceExists()) return fallback;
4779
- try {
4780
- return useContext(namespace, fallback);
4781
- } catch {
4782
- return fallback;
4783
- }
4216
+ if (!instanceExists()) throw new Error("[v0] useDate() must be called inside a Vue component with createDatePlugin installed.\n\nExample:\n import { Vuetify0DateAdapter } from '@vuetify/v0/date'\n import { createDatePlugin } from '@vuetify/v0'\n\n app.use(createDatePlugin({ adapter: new Vuetify0DateAdapter() }))");
4217
+ return useContext(namespace);
4784
4218
  }
4785
4219
 
4786
4220
  //#endregion
@@ -5780,7 +5214,7 @@ function matchesKeyGroup(e, group, platformIsMac) {
5780
5214
  */
5781
5215
  function useIntersectionObserver(target, callback, options = {}) {
5782
5216
  const { isHydrated } = useHydration();
5783
- const targetRef = isRef(target) ? target : shallowRef(target);
5217
+ const targetRef = toRef(target);
5784
5218
  const observer = shallowRef();
5785
5219
  const isPaused = shallowRef(false);
5786
5220
  const isIntersecting = shallowRef(false);
@@ -6181,6 +5615,7 @@ function usePrefersContrast() {
6181
5615
  */
6182
5616
  function useMutationObserver(target, callback, options = {}) {
6183
5617
  const { isHydrated } = useHydration();
5618
+ const targetRef = toRef(target);
6184
5619
  const observer = shallowRef();
6185
5620
  const isPaused = shallowRef(false);
6186
5621
  const isActive = toRef(() => !!observer.value);
@@ -6195,7 +5630,7 @@ function useMutationObserver(target, callback, options = {}) {
6195
5630
  };
6196
5631
  function setup() {
6197
5632
  if (/* @__PURE__ */ isNull(observer.value)) return;
6198
- if (!isHydrated.value || !SUPPORTS_MUTATION_OBSERVER || !target.value || isPaused.value) return;
5633
+ if (!isHydrated.value || !SUPPORTS_MUTATION_OBSERVER || !targetRef.value || isPaused.value) return;
6199
5634
  observer.value = new MutationObserver((mutations) => {
6200
5635
  callback(mutations.map((mutation) => ({
6201
5636
  type: mutation.type,
@@ -6210,7 +5645,7 @@ function useMutationObserver(target, callback, options = {}) {
6210
5645
  })));
6211
5646
  if (options.once) stop();
6212
5647
  });
6213
- observer.value.observe(target.value, observerOptions);
5648
+ observer.value.observe(targetRef.value, observerOptions);
6214
5649
  if (options.immediate) {
6215
5650
  const emptyNodeList = {
6216
5651
  length: 0,
@@ -6220,7 +5655,7 @@ function useMutationObserver(target, callback, options = {}) {
6220
5655
  };
6221
5656
  callback([{
6222
5657
  type: "childList",
6223
- target: target.value,
5658
+ target: targetRef.value,
6224
5659
  addedNodes: emptyNodeList,
6225
5660
  removedNodes: emptyNodeList,
6226
5661
  previousSibling: null,
@@ -6232,13 +5667,13 @@ function useMutationObserver(target, callback, options = {}) {
6232
5667
  if (options.once) stop();
6233
5668
  }
6234
5669
  }
6235
- watch(() => target.value, (el, oldEl) => {
5670
+ watch(() => targetRef.value, (el, oldEl) => {
6236
5671
  if (oldEl) cleanup();
6237
5672
  if (isHydrated.value && el) setup();
6238
5673
  }, { immediate: true });
6239
5674
  if (!isHydrated.value) {
6240
5675
  const stopHydrationWatch = watch(() => isHydrated.value, (hydrated) => {
6241
- if (hydrated && target.value && !observer.value) {
5676
+ if (hydrated && targetRef.value && !observer.value) {
6242
5677
  setup();
6243
5678
  stopHydrationWatch();
6244
5679
  }
@@ -6273,23 +5708,526 @@ function useMutationObserver(target, callback, options = {}) {
6273
5708
  }
6274
5709
 
6275
5710
  //#endregion
6276
- //#region src/composables/useResizeObserver/index.ts
5711
+ //#region src/composables/createNested/strategies.ts
6277
5712
  /**
6278
- * @module useResizeObserver
5713
+ * Multiple open strategy: allows multiple nodes to be open simultaneously.
6279
5714
  *
6280
5715
  * @remarks
6281
- * ResizeObserver composable with lifecycle management.
6282
- *
6283
- * Key features:
6284
- * - ResizeObserver API wrapper
6285
- * - Pause/resume/stop functionality
6286
- * - Automatic cleanup on unmount
6287
- * - SSR-safe (checks SUPPORTS_OBSERVER)
6288
- * - Hydration-aware
6289
- * - Box model options (content-box/border-box)
5716
+ * Perfect for tree views, file explorers, and nested menus where users expect
5717
+ * to keep multiple sections expanded at once.
6290
5718
  *
6291
- * Perfect for responsive components and size-based rendering.
6292
- */
5719
+ * @example
5720
+ * ```ts
5721
+ * const tree = createNested({ openStrategy: multipleOpenStrategy })
5722
+ * tree.open('node-1')
5723
+ * tree.open('node-2')
5724
+ * // Both nodes are now open
5725
+ * ```
5726
+ */
5727
+ const multipleOpenStrategy = {
5728
+ onOpen: void 0,
5729
+ onClose: void 0
5730
+ };
5731
+ /**
5732
+ * Single open strategy: only one node can be open at a time (accordion behavior).
5733
+ *
5734
+ * @remarks
5735
+ * Perfect for accordions, single-select navigation, and contexts where only
5736
+ * one section should be visible at a time.
5737
+ *
5738
+ * @example
5739
+ * ```ts
5740
+ * const tree = createNested({ openStrategy: singleOpenStrategy })
5741
+ * tree.open('node-1') // node-1 opens
5742
+ * tree.open('node-2') // node-1 closes, node-2 opens
5743
+ * ```
5744
+ */
5745
+ const singleOpenStrategy = {
5746
+ onOpen: (id, context) => {
5747
+ for (const openedId of context.openedIds) if (openedId !== id) context.openedIds.delete(openedId);
5748
+ },
5749
+ onClose: void 0
5750
+ };
5751
+
5752
+ //#endregion
5753
+ //#region src/composables/createNested/index.ts
5754
+ /**
5755
+ * @module createNested
5756
+ *
5757
+ * @remarks
5758
+ * Hierarchical tree management composable extending createGroup with:
5759
+ * - Parent-child relationship tracking (children/parents Maps)
5760
+ * - Open/close state management
5761
+ * - Tree traversal utilities (getPath, getDescendants, etc.)
5762
+ * - Pluggable open strategies
5763
+ *
5764
+ * Inheritance chain: createSelection → createGroup → createNested
5765
+ */
5766
+ /**
5767
+ * Resolves open mode to an OpenStrategy.
5768
+ */
5769
+ function resolveOpenStrategy(open = "multiple") {
5770
+ return open === "single" ? singleOpenStrategy : multipleOpenStrategy;
5771
+ }
5772
+ /**
5773
+ * Creates a new nested tree instance with hierarchical management.
5774
+ *
5775
+ * Extends `createGroup` to support parent-child relationships, tree traversal,
5776
+ * and open/close state management. Perfect for tree views, nested navigation,
5777
+ * and hierarchical data structures.
5778
+ *
5779
+ * @param options The options for the nested instance.
5780
+ * @template Z The type of the nested ticket.
5781
+ * @template E The type of the nested context.
5782
+ * @returns A new nested instance with tree management capabilities.
5783
+ *
5784
+ * @remarks
5785
+ * **Key Differences from `createGroup`:**
5786
+ * - `register()` accepts `parentId` for establishing parent-child relationships
5787
+ * - `unregister()` accepts optional `cascade` parameter for cascading deletions
5788
+ * - Adds tree traversal methods: `getPath()`, `getAncestors()`, `getDescendants()`
5789
+ * - Adds computed properties: `roots`, `leaves`, `isLeaf()`, `getDepth()`
5790
+ * - Adds open state management: `open()`, `close()`, `flip()`, `opened()`
5791
+ *
5792
+ * @see https://0.vuetifyjs.com/composables/selection/use-nested
5793
+ *
5794
+ * @example
5795
+ * ```ts
5796
+ * import { createNested } from '@vuetify/v0'
5797
+ *
5798
+ * const tree = createNested()
5799
+ *
5800
+ * const root = tree.register({ id: 'root', value: 'Root' })
5801
+ * const child1 = tree.register({ id: 'child-1', value: 'Child 1', parentId: 'root' })
5802
+ * const child2 = tree.register({ id: 'child-2', value: 'Child 2', parentId: 'root' })
5803
+ *
5804
+ * console.log(tree.getPath('child-1')) // ['root', 'child-1']
5805
+ * console.log(tree.getDescendants('root')) // ['child-1', 'child-2']
5806
+ * console.log(tree.isLeaf('child-2')) // true
5807
+ *
5808
+ * tree.open('root')
5809
+ * console.log(tree.opened('root')) // true
5810
+ * ```
5811
+ */
5812
+ function createNested(_options = {}) {
5813
+ const { open: openMode = "multiple", openAll = false, reveal: revealOnOpen = false, selection: selectionMode = "cascade", openStrategy, ...options } = _options;
5814
+ const resolvedOpenStrategy = openStrategy ?? resolveOpenStrategy(openMode);
5815
+ const group = createGroup(options);
5816
+ const logger$1 = useLogger();
5817
+ const children = shallowReactive(/* @__PURE__ */ new Map());
5818
+ const parents = shallowReactive(/* @__PURE__ */ new Map());
5819
+ const openedIds = shallowReactive(/* @__PURE__ */ new Set());
5820
+ const openedItems = computed(() => {
5821
+ return new Set(Array.from(openedIds).map((id) => group.get(id)).filter((item) => !/* @__PURE__ */ isUndefined(item)));
5822
+ });
5823
+ const roots = computed(() => {
5824
+ return group.values().filter((item) => /* @__PURE__ */ isUndefined(parents.get(item.id)));
5825
+ });
5826
+ const leaves = computed(() => {
5827
+ return group.values().filter((item) => {
5828
+ const childList = children.get(item.id);
5829
+ return /* @__PURE__ */ isUndefined(childList) || childList.length === 0;
5830
+ });
5831
+ });
5832
+ function opened(id) {
5833
+ return openedIds.has(id);
5834
+ }
5835
+ function open(ids) {
5836
+ for (const id of toArray(ids)) {
5837
+ if (!group.has(id)) continue;
5838
+ if (revealOnOpen) {
5839
+ let parentId = parents.get(id);
5840
+ while (!/* @__PURE__ */ isUndefined(parentId)) {
5841
+ openedIds.add(parentId);
5842
+ parentId = parents.get(parentId);
5843
+ }
5844
+ }
5845
+ openedIds.add(id);
5846
+ resolvedOpenStrategy.onOpen?.(id, context);
5847
+ }
5848
+ }
5849
+ function close(ids) {
5850
+ for (const id of toArray(ids)) {
5851
+ if (!group.has(id)) continue;
5852
+ openedIds.delete(id);
5853
+ resolvedOpenStrategy.onClose?.(id, context);
5854
+ }
5855
+ }
5856
+ function flip(ids) {
5857
+ for (const id of toArray(ids)) {
5858
+ if (!group.has(id)) continue;
5859
+ if (opened(id)) close(id);
5860
+ else open(id);
5861
+ }
5862
+ }
5863
+ /**
5864
+ * Open node(s) and their immediate non-leaf children.
5865
+ * Useful for expanding a section with its immediate subcategories.
5866
+ */
5867
+ function unfold(ids) {
5868
+ for (const id of toArray(ids)) {
5869
+ if (!group.has(id)) continue;
5870
+ open(id);
5871
+ const childIds = children.get(id) ?? [];
5872
+ for (const childId of childIds) if (!isLeaf(childId)) open(childId);
5873
+ }
5874
+ }
5875
+ /**
5876
+ * Reveal a node by opening all its ancestors.
5877
+ * Makes the node visible in a collapsed tree without opening the node itself.
5878
+ */
5879
+ function reveal(ids) {
5880
+ for (const id of toArray(ids)) {
5881
+ if (!group.has(id)) continue;
5882
+ const ancestorIds = getAncestors(id);
5883
+ if (ancestorIds.length > 0) open(ancestorIds);
5884
+ }
5885
+ }
5886
+ /**
5887
+ * Fully expand a node and all its non-leaf descendants.
5888
+ * Opens the entire subtree rooted at the given node.
5889
+ */
5890
+ function expand(ids) {
5891
+ for (const id of toArray(ids)) {
5892
+ if (!group.has(id)) continue;
5893
+ if (!isLeaf(id)) open(id);
5894
+ for (const descendantId of getDescendants(id)) if (!isLeaf(descendantId)) open(descendantId);
5895
+ }
5896
+ }
5897
+ function expandAll() {
5898
+ for (const id of group.keys()) if (!isLeaf(id)) openedIds.add(id);
5899
+ }
5900
+ function collapseAll() {
5901
+ openedIds.clear();
5902
+ }
5903
+ function getPath(id) {
5904
+ const path = [];
5905
+ let currentId = id;
5906
+ while (!/* @__PURE__ */ isUndefined(currentId)) {
5907
+ path.unshift(currentId);
5908
+ currentId = parents.get(currentId);
5909
+ }
5910
+ return path;
5911
+ }
5912
+ function getAncestors(id) {
5913
+ return getPath(id).slice(0, -1);
5914
+ }
5915
+ function getDescendants(id) {
5916
+ const descendants = [];
5917
+ const queue = [...children.get(id) ?? []];
5918
+ let index = 0;
5919
+ while (index < queue.length) {
5920
+ const currentId = queue[index++];
5921
+ descendants.push(currentId);
5922
+ queue.push(...children.get(currentId) ?? []);
5923
+ }
5924
+ return descendants;
5925
+ }
5926
+ function isLeaf(id) {
5927
+ const childList = children.get(id);
5928
+ return /* @__PURE__ */ isUndefined(childList) || childList.length === 0;
5929
+ }
5930
+ function getDepth(id) {
5931
+ return getAncestors(id).length;
5932
+ }
5933
+ /**
5934
+ * Check if `ancestorId` is an ancestor of `descendantId`.
5935
+ * Returns false if either ID doesn't exist in the tree.
5936
+ */
5937
+ function isAncestorOf(ancestorId, descendantId) {
5938
+ if (!group.has(ancestorId) || !group.has(descendantId)) return false;
5939
+ if (ancestorId === descendantId) return false;
5940
+ let currentId = parents.get(descendantId);
5941
+ while (!/* @__PURE__ */ isUndefined(currentId)) {
5942
+ if (currentId === ancestorId) return true;
5943
+ currentId = parents.get(currentId);
5944
+ }
5945
+ return false;
5946
+ }
5947
+ /**
5948
+ * Check if `id` has `ancestorId` as an ancestor.
5949
+ * Semantic alias for isAncestorOf(ancestorId, id).
5950
+ */
5951
+ function hasAncestor(id, ancestorId) {
5952
+ return isAncestorOf(ancestorId, id);
5953
+ }
5954
+ /**
5955
+ * Get siblings of a node (including self).
5956
+ * For root nodes, returns all root IDs.
5957
+ */
5958
+ function siblings(id) {
5959
+ if (!group.has(id)) return [];
5960
+ const parentId = parents.get(id);
5961
+ if (/* @__PURE__ */ isUndefined(parentId)) return group.values().filter((item) => /* @__PURE__ */ isUndefined(parents.get(item.id))).map((item) => item.id);
5962
+ return children.get(parentId) ?? [];
5963
+ }
5964
+ /**
5965
+ * Get 1-indexed position among siblings (for aria-posinset).
5966
+ * Returns 0 if node not found.
5967
+ */
5968
+ function position(id) {
5969
+ const index = siblings(id).indexOf(id);
5970
+ return index === -1 ? 0 : index + 1;
5971
+ }
5972
+ function updateAncestors(id) {
5973
+ const ancestorIds = getAncestors(id).toReversed();
5974
+ for (const aid of ancestorIds) {
5975
+ const childIds = children.get(aid) ?? [];
5976
+ if (childIds.length === 0) continue;
5977
+ const allSelected = childIds.every((cid) => group.selected(cid));
5978
+ const someSelected = childIds.some((cid) => group.selected(cid) || group.mixed(cid));
5979
+ if (allSelected) {
5980
+ group.unmix(aid);
5981
+ group.select(aid);
5982
+ } else if (someSelected) {
5983
+ group.unselect(aid);
5984
+ group.mix(aid);
5985
+ } else {
5986
+ group.unmix(aid);
5987
+ group.unselect(aid);
5988
+ }
5989
+ }
5990
+ }
5991
+ function getLeafDescendants(id) {
5992
+ return getDescendants(id).filter((did) => isLeaf(did));
5993
+ }
5994
+ function select(ids) {
5995
+ for (const id of toArray(ids)) {
5996
+ if (!group.has(id)) continue;
5997
+ if (selectionMode === "independent") group.select(id);
5998
+ else if (selectionMode === "leaf") if (isLeaf(id)) group.select(id);
5999
+ else for (const lid of getLeafDescendants(id)) group.select(lid);
6000
+ else {
6001
+ group.unmix(id);
6002
+ group.select(id);
6003
+ for (const did of getDescendants(id)) {
6004
+ group.unmix(did);
6005
+ group.select(did);
6006
+ }
6007
+ updateAncestors(id);
6008
+ }
6009
+ }
6010
+ }
6011
+ function unselect(ids) {
6012
+ for (const id of toArray(ids)) {
6013
+ if (!group.has(id)) continue;
6014
+ if (selectionMode === "independent") group.unselect(id);
6015
+ else if (selectionMode === "leaf") if (isLeaf(id)) group.unselect(id);
6016
+ else for (const lid of getLeafDescendants(id)) group.unselect(lid);
6017
+ else {
6018
+ group.unmix(id);
6019
+ group.unselect(id);
6020
+ for (const did of getDescendants(id)) {
6021
+ group.unmix(did);
6022
+ group.unselect(did);
6023
+ }
6024
+ updateAncestors(id);
6025
+ }
6026
+ }
6027
+ }
6028
+ function toggle(ids) {
6029
+ for (const id of toArray(ids)) if (selectionMode === "independent") group.toggle(id);
6030
+ else if (selectionMode === "leaf") if (isLeaf(id)) group.toggle(id);
6031
+ else {
6032
+ const leafIds = getLeafDescendants(id);
6033
+ if (leafIds.every((lid) => group.selected(lid))) for (const lid of leafIds) group.unselect(lid);
6034
+ else for (const lid of leafIds) group.select(lid);
6035
+ }
6036
+ else if (group.selected(id) || group.mixed(id)) unselect(id);
6037
+ else select(id);
6038
+ }
6039
+ /**
6040
+ * Converts the tree to a flat array with parentId references.
6041
+ * Useful for serialization or sending to APIs/AI systems.
6042
+ */
6043
+ function toFlat() {
6044
+ return group.values().map((item) => ({
6045
+ id: item.id,
6046
+ parentId: parents.get(item.id),
6047
+ value: item.value
6048
+ }));
6049
+ }
6050
+ function register(registration = {}) {
6051
+ const id = registration.id ?? /* @__PURE__ */ useId();
6052
+ const parentId = registration.parentId;
6053
+ const nested = registration.children;
6054
+ if (!/* @__PURE__ */ isUndefined(parentId) && !group.has(parentId)) logger$1.warn(`Parent with id "${parentId}" does not exist. Registering "${id}" without parent.`);
6055
+ if (!/* @__PURE__ */ isUndefined(parentId) && group.has(parentId)) {
6056
+ parents.set(id, parentId);
6057
+ const list = children.get(parentId);
6058
+ if (list) list.push(id);
6059
+ else children.set(parentId, [id]);
6060
+ if (openAll) openedIds.add(parentId);
6061
+ } else parents.set(id, void 0);
6062
+ const { children: _, ...rest } = registration;
6063
+ const item = {
6064
+ ...rest,
6065
+ id,
6066
+ parentId: parents.get(id),
6067
+ isOpen: toRef(() => opened(id)),
6068
+ isLeaf: toRef(() => isLeaf(id)),
6069
+ depth: toRef(() => getDepth(id)),
6070
+ open: () => open(id),
6071
+ close: () => close(id),
6072
+ flip: () => flip(id),
6073
+ reveal: () => reveal(id),
6074
+ getPath: () => getPath(id),
6075
+ getAncestors: () => getAncestors(id),
6076
+ getDescendants: () => getDescendants(id),
6077
+ isAncestorOf: (descendantId) => isAncestorOf(id, descendantId),
6078
+ hasAncestor: (ancestorId) => hasAncestor(id, ancestorId),
6079
+ siblings: () => siblings(id),
6080
+ position: () => position(id)
6081
+ };
6082
+ const ticket = group.register(item);
6083
+ if (nested?.length) for (const child of nested) register({
6084
+ ...child,
6085
+ parentId: id
6086
+ });
6087
+ return ticket;
6088
+ }
6089
+ function unregister(id, cascade = false) {
6090
+ if (!group.has(id)) return;
6091
+ const parentId = parents.get(id);
6092
+ if (!/* @__PURE__ */ isUndefined(parentId)) {
6093
+ const siblings$1 = children.get(parentId);
6094
+ if (siblings$1) {
6095
+ const filtered = siblings$1.filter((sid) => sid !== id);
6096
+ if (filtered.length === 0) children.delete(parentId);
6097
+ else children.set(parentId, filtered);
6098
+ }
6099
+ }
6100
+ const list = children.get(id);
6101
+ if (list?.length) if (cascade) for (const did of getDescendants(id)) {
6102
+ parents.delete(did);
6103
+ children.delete(did);
6104
+ openedIds.delete(did);
6105
+ group.unregister(did);
6106
+ }
6107
+ else {
6108
+ for (const did of getDescendants(id)) openedIds.delete(did);
6109
+ for (const cid of list) parents.set(cid, void 0);
6110
+ }
6111
+ parents.delete(id);
6112
+ children.delete(id);
6113
+ openedIds.delete(id);
6114
+ group.unregister(id);
6115
+ }
6116
+ function offboard(ids, cascade = false) {
6117
+ for (const id of ids) unregister(id, cascade);
6118
+ }
6119
+ function onboard(registrations) {
6120
+ return registrations.map((registration) => register(registration));
6121
+ }
6122
+ function clear() {
6123
+ children.clear();
6124
+ parents.clear();
6125
+ openedIds.clear();
6126
+ group.reset();
6127
+ }
6128
+ function reset() {
6129
+ clear();
6130
+ }
6131
+ const context = {
6132
+ ...group,
6133
+ children,
6134
+ parents,
6135
+ openedIds,
6136
+ openedItems,
6137
+ roots,
6138
+ leaves,
6139
+ getPath,
6140
+ getAncestors,
6141
+ getDescendants,
6142
+ isLeaf,
6143
+ getDepth,
6144
+ isAncestorOf,
6145
+ hasAncestor,
6146
+ siblings,
6147
+ position,
6148
+ open,
6149
+ close,
6150
+ flip,
6151
+ opened,
6152
+ unfold,
6153
+ reveal,
6154
+ expand,
6155
+ expandAll,
6156
+ collapseAll,
6157
+ toFlat,
6158
+ openStrategy: resolvedOpenStrategy,
6159
+ select,
6160
+ unselect,
6161
+ toggle,
6162
+ register,
6163
+ unregister,
6164
+ offboard,
6165
+ onboard,
6166
+ clear,
6167
+ reset,
6168
+ get size() {
6169
+ return group.size;
6170
+ }
6171
+ };
6172
+ return context;
6173
+ }
6174
+ /**
6175
+ * Creates a new nested context with provide/inject pattern.
6176
+ *
6177
+ * @param options The options for the nested context.
6178
+ * @returns A trinity tuple [useNested, provideNested, defaultNested]
6179
+ *
6180
+ * @see https://0.vuetifyjs.com/composables/selection/use-nested
6181
+ *
6182
+ * @example
6183
+ * ```ts
6184
+ * import { createNestedContext } from '@vuetify/v0'
6185
+ *
6186
+ * export const [useTree, provideTree, tree] = createNestedContext()
6187
+ *
6188
+ * // In parent: provideTree()
6189
+ * // In child: const tree = useTree()
6190
+ * ```
6191
+ */
6192
+ function createNestedContext(_options = {}) {
6193
+ const { namespace = "v0:nested", ...options } = _options;
6194
+ const [useNestedContext, _provideNestedContext] = createContext(namespace);
6195
+ const context = createNested(options);
6196
+ function provideNestedContext(_context = context, app) {
6197
+ return _provideNestedContext(_context, app);
6198
+ }
6199
+ return createTrinity(useNestedContext, provideNestedContext, context);
6200
+ }
6201
+ /**
6202
+ * Returns the current nested instance from context.
6203
+ *
6204
+ * @param namespace The namespace for the nested context. Defaults to `'v0:nested'`.
6205
+ * @returns The current nested instance.
6206
+ *
6207
+ * @see https://0.vuetifyjs.com/composables/selection/use-nested
6208
+ */
6209
+ function useNested(namespace = "v0:nested") {
6210
+ return useContext(namespace);
6211
+ }
6212
+
6213
+ //#endregion
6214
+ //#region src/composables/useResizeObserver/index.ts
6215
+ /**
6216
+ * @module useResizeObserver
6217
+ *
6218
+ * @remarks
6219
+ * ResizeObserver composable with lifecycle management.
6220
+ *
6221
+ * Key features:
6222
+ * - ResizeObserver API wrapper
6223
+ * - Pause/resume/stop functionality
6224
+ * - Automatic cleanup on unmount
6225
+ * - SSR-safe (checks SUPPORTS_OBSERVER)
6226
+ * - Hydration-aware
6227
+ * - Box model options (content-box/border-box)
6228
+ *
6229
+ * Perfect for responsive components and size-based rendering.
6230
+ */
6293
6231
  /**
6294
6232
  * A composable that uses the Resize Observer API to detect when an element's
6295
6233
  * size changes.
@@ -6333,12 +6271,13 @@ function useMutationObserver(target, callback, options = {}) {
6333
6271
  */
6334
6272
  function useResizeObserver(target, callback, options = {}) {
6335
6273
  const { isHydrated } = useHydration();
6274
+ const targetRef = toRef(target);
6336
6275
  const observer = shallowRef();
6337
6276
  const isPaused = shallowRef(false);
6338
6277
  const isActive = toRef(() => !!observer.value);
6339
6278
  function setup() {
6340
6279
  if (/* @__PURE__ */ isNull(observer.value)) return;
6341
- if (!isHydrated.value || !SUPPORTS_OBSERVER || !target.value || isPaused.value) return;
6280
+ if (!isHydrated.value || !SUPPORTS_OBSERVER || !targetRef.value || isPaused.value) return;
6342
6281
  observer.value = new ResizeObserver((entries) => {
6343
6282
  callback(entries.map((entry) => ({
6344
6283
  contentRect: {
@@ -6351,9 +6290,9 @@ function useResizeObserver(target, callback, options = {}) {
6351
6290
  })));
6352
6291
  if (options.once) stop();
6353
6292
  });
6354
- observer.value.observe(target.value, { box: options.box || "content-box" });
6293
+ observer.value.observe(targetRef.value, { box: options.box || "content-box" });
6355
6294
  if (options.immediate) {
6356
- const rect = target.value.getBoundingClientRect();
6295
+ const rect = targetRef.value.getBoundingClientRect();
6357
6296
  callback([{
6358
6297
  contentRect: {
6359
6298
  width: rect.width,
@@ -6361,17 +6300,17 @@ function useResizeObserver(target, callback, options = {}) {
6361
6300
  top: rect.top,
6362
6301
  left: rect.left
6363
6302
  },
6364
- target: target.value
6303
+ target: targetRef.value
6365
6304
  }]);
6366
6305
  }
6367
6306
  }
6368
- watch(() => target.value, (el, oldEl) => {
6307
+ watch(() => targetRef.value, (el, oldEl) => {
6369
6308
  if (oldEl) cleanup();
6370
6309
  if (isHydrated.value && el) setup();
6371
6310
  }, { immediate: true });
6372
6311
  if (!isHydrated.value) {
6373
6312
  const stopHydrationWatch = watch(() => isHydrated.value, (hydrated) => {
6374
- if (hydrated && target.value && !observer.value) {
6313
+ if (hydrated && targetRef.value && !observer.value) {
6375
6314
  setup();
6376
6315
  stopHydrationWatch();
6377
6316
  }
@@ -7128,7 +7067,7 @@ function createQueue(_options = {}) {
7128
7067
  }
7129
7068
  }
7130
7069
  function register(registration = {}) {
7131
- const id = registration.id ?? /* @__PURE__ */ genId();
7070
+ const id = registration.id ?? /* @__PURE__ */ useId();
7132
7071
  const timeout = Object.prototype.hasOwnProperty.call(registration, "timeout") ? registration.timeout : _timeout;
7133
7072
  const ticket = {
7134
7073
  ...registration,
@@ -8841,7 +8780,7 @@ function useClickOutside(target, handler, options = {}) {
8841
8780
 
8842
8781
  //#endregion
8843
8782
  //#region src/components/Dialog/DialogContent.vue
8844
- const _sfc_main$31 = /* @__PURE__ */ defineComponent({
8783
+ const _sfc_main$35 = /* @__PURE__ */ defineComponent({
8845
8784
  name: "DialogContent",
8846
8785
  __name: "DialogContent",
8847
8786
  props: {
@@ -8907,11 +8846,11 @@ const _sfc_main$31 = /* @__PURE__ */ defineComponent({
8907
8846
  };
8908
8847
  }
8909
8848
  });
8910
- var DialogContent_default = _sfc_main$31;
8849
+ var DialogContent_default = _sfc_main$35;
8911
8850
 
8912
8851
  //#endregion
8913
8852
  //#region src/components/Dialog/DialogDescription.vue
8914
- const _sfc_main$30 = /* @__PURE__ */ defineComponent({
8853
+ const _sfc_main$34 = /* @__PURE__ */ defineComponent({
8915
8854
  name: "DialogDescription",
8916
8855
  __name: "DialogDescription",
8917
8856
  props: {
@@ -8930,11 +8869,11 @@ const _sfc_main$30 = /* @__PURE__ */ defineComponent({
8930
8869
  };
8931
8870
  }
8932
8871
  });
8933
- var DialogDescription_default = _sfc_main$30;
8872
+ var DialogDescription_default = _sfc_main$34;
8934
8873
 
8935
8874
  //#endregion
8936
8875
  //#region src/components/Dialog/DialogTitle.vue
8937
- const _sfc_main$29 = /* @__PURE__ */ defineComponent({
8876
+ const _sfc_main$33 = /* @__PURE__ */ defineComponent({
8938
8877
  name: "DialogTitle",
8939
8878
  __name: "DialogTitle",
8940
8879
  props: {
@@ -8953,11 +8892,11 @@ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
8953
8892
  };
8954
8893
  }
8955
8894
  });
8956
- var DialogTitle_default = _sfc_main$29;
8895
+ var DialogTitle_default = _sfc_main$33;
8957
8896
 
8958
8897
  //#endregion
8959
8898
  //#region src/components/Dialog/DialogActivator.vue
8960
- const _sfc_main$28 = /* @__PURE__ */ defineComponent({
8899
+ const _sfc_main$32 = /* @__PURE__ */ defineComponent({
8961
8900
  name: "DialogActivator",
8962
8901
  __name: "DialogActivator",
8963
8902
  props: {
@@ -8987,7 +8926,7 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
8987
8926
  };
8988
8927
  }
8989
8928
  });
8990
- var DialogActivator_default = _sfc_main$28;
8929
+ var DialogActivator_default = _sfc_main$32;
8991
8930
 
8992
8931
  //#endregion
8993
8932
  //#region src/components/Dialog/index.ts
@@ -9032,7 +8971,7 @@ const Dialog = {
9032
8971
  //#endregion
9033
8972
  //#region src/components/ExpansionPanel/ExpansionPanelRoot.vue
9034
8973
  const [useExpansionPanelRoot, provideExpansionPanelSelection] = createContext();
9035
- const _sfc_main$27 = /* @__PURE__ */ defineComponent({
8974
+ const _sfc_main$31 = /* @__PURE__ */ defineComponent({
9036
8975
  name: "ExpansionPanelRoot",
9037
8976
  __name: "ExpansionPanelRoot",
9038
8977
  props: /* @__PURE__ */ mergeModels({
@@ -9089,12 +9028,12 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
9089
9028
  };
9090
9029
  }
9091
9030
  });
9092
- var ExpansionPanelRoot_default = _sfc_main$27;
9031
+ var ExpansionPanelRoot_default = _sfc_main$31;
9093
9032
 
9094
9033
  //#endregion
9095
9034
  //#region src/components/ExpansionPanel/ExpansionPanelItem.vue
9096
9035
  const [useExpansionPanelItem, provideExpansionPanelItem] = createContext({ suffix: "item" });
9097
- const _sfc_main$26 = /* @__PURE__ */ defineComponent({
9036
+ const _sfc_main$30 = /* @__PURE__ */ defineComponent({
9098
9037
  name: "ExpansionPanelItem",
9099
9038
  __name: "ExpansionPanelItem",
9100
9039
  props: {
@@ -9138,11 +9077,11 @@ const _sfc_main$26 = /* @__PURE__ */ defineComponent({
9138
9077
  };
9139
9078
  }
9140
9079
  });
9141
- var ExpansionPanelItem_default = _sfc_main$26;
9080
+ var ExpansionPanelItem_default = _sfc_main$30;
9142
9081
 
9143
9082
  //#endregion
9144
9083
  //#region src/components/ExpansionPanel/ExpansionPanelActivator.vue
9145
- const _sfc_main$25 = /* @__PURE__ */ defineComponent({
9084
+ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
9146
9085
  name: "ExpansionPanelActivator",
9147
9086
  __name: "ExpansionPanelActivator",
9148
9087
  props: {
@@ -9188,11 +9127,11 @@ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
9188
9127
  };
9189
9128
  }
9190
9129
  });
9191
- var ExpansionPanelActivator_default = _sfc_main$25;
9130
+ var ExpansionPanelActivator_default = _sfc_main$29;
9192
9131
 
9193
9132
  //#endregion
9194
9133
  //#region src/components/ExpansionPanel/ExpansionPanelContent.vue
9195
- const _sfc_main$24 = /* @__PURE__ */ defineComponent({
9134
+ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
9196
9135
  name: "ExpansionPanelContent",
9197
9136
  __name: "ExpansionPanelContent",
9198
9137
  props: {
@@ -9223,11 +9162,11 @@ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
9223
9162
  };
9224
9163
  }
9225
9164
  });
9226
- var ExpansionPanelContent_default = _sfc_main$24;
9165
+ var ExpansionPanelContent_default = _sfc_main$28;
9227
9166
 
9228
9167
  //#endregion
9229
9168
  //#region src/components/ExpansionPanel/ExpansionPanelHeader.vue
9230
- const _sfc_main$23 = /* @__PURE__ */ defineComponent({
9169
+ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
9231
9170
  name: "ExpansionPanelHeader",
9232
9171
  __name: "ExpansionPanelHeader",
9233
9172
  props: {
@@ -9252,7 +9191,7 @@ const _sfc_main$23 = /* @__PURE__ */ defineComponent({
9252
9191
  };
9253
9192
  }
9254
9193
  });
9255
- var ExpansionPanelHeader_default = _sfc_main$23;
9194
+ var ExpansionPanelHeader_default = _sfc_main$27;
9256
9195
 
9257
9196
  //#endregion
9258
9197
  //#region src/components/ExpansionPanel/index.ts
@@ -9272,7 +9211,7 @@ const ExpansionPanel = {
9272
9211
  //#endregion
9273
9212
  //#region src/components/Group/GroupRoot.vue
9274
9213
  const [useGroupRoot, provideGroupRoot] = createContext();
9275
- const _sfc_main$22 = /* @__PURE__ */ defineComponent({
9214
+ const _sfc_main$26 = /* @__PURE__ */ defineComponent({
9276
9215
  name: "GroupRoot",
9277
9216
  __name: "GroupRoot",
9278
9217
  props: /* @__PURE__ */ mergeModels({
@@ -9322,11 +9261,11 @@ const _sfc_main$22 = /* @__PURE__ */ defineComponent({
9322
9261
  };
9323
9262
  }
9324
9263
  });
9325
- var GroupRoot_default = _sfc_main$22;
9264
+ var GroupRoot_default = _sfc_main$26;
9326
9265
 
9327
9266
  //#endregion
9328
9267
  //#region src/components/Group/GroupItem.vue
9329
- const _sfc_main$21 = /* @__PURE__ */ defineComponent({
9268
+ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
9330
9269
  name: "GroupItem",
9331
9270
  __name: "GroupItem",
9332
9271
  props: {
@@ -9375,7 +9314,7 @@ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
9375
9314
  };
9376
9315
  }
9377
9316
  });
9378
- var GroupItem_default = _sfc_main$21;
9317
+ var GroupItem_default = _sfc_main$25;
9379
9318
 
9380
9319
  //#endregion
9381
9320
  //#region src/components/Group/index.ts
@@ -9394,7 +9333,7 @@ const Group = {
9394
9333
  const [usePaginationRoot, providePaginationRoot] = createContext();
9395
9334
  const [usePaginationControls, providePaginationControls] = createContext({ suffix: "controls" });
9396
9335
  const [usePaginationItems, providePaginationItems] = createContext({ suffix: "items" });
9397
- const _sfc_main$20 = /* @__PURE__ */ defineComponent({
9336
+ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
9398
9337
  name: "PaginationRoot",
9399
9338
  __name: "PaginationRoot",
9400
9339
  props: /* @__PURE__ */ mergeModels({
@@ -9494,17 +9433,17 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
9494
9433
  };
9495
9434
  }
9496
9435
  });
9497
- var PaginationRoot_default = _sfc_main$20;
9436
+ var PaginationRoot_default = _sfc_main$24;
9498
9437
 
9499
9438
  //#endregion
9500
9439
  //#region src/components/Pagination/PaginationEllipsis.vue
9501
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
9440
+ const _sfc_main$23 = /* @__PURE__ */ defineComponent({
9502
9441
  name: "PaginationEllipsis",
9503
9442
  __name: "PaginationEllipsis",
9504
9443
  props: {
9505
9444
  namespace: { default: "v0:pagination" },
9506
9445
  ellipsis: {},
9507
- id: { default: () => /* @__PURE__ */ genId() },
9446
+ id: { default: () => useId$1() },
9508
9447
  as: { default: "span" },
9509
9448
  renderless: { type: Boolean }
9510
9449
  },
@@ -9539,17 +9478,17 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
9539
9478
  };
9540
9479
  }
9541
9480
  });
9542
- var PaginationEllipsis_default = _sfc_main$19;
9481
+ var PaginationEllipsis_default = _sfc_main$23;
9543
9482
 
9544
9483
  //#endregion
9545
9484
  //#region src/components/Pagination/PaginationFirst.vue
9546
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
9485
+ const _sfc_main$22 = /* @__PURE__ */ defineComponent({
9547
9486
  name: "PaginationFirst",
9548
9487
  __name: "PaginationFirst",
9549
9488
  props: {
9550
9489
  namespace: { default: "v0:pagination" },
9551
9490
  disabled: { type: Boolean },
9552
- id: { default: () => /* @__PURE__ */ genId() },
9491
+ id: { default: () => useId$1() },
9553
9492
  as: { default: "button" },
9554
9493
  renderless: { type: Boolean }
9555
9494
  },
@@ -9598,11 +9537,11 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
9598
9537
  };
9599
9538
  }
9600
9539
  });
9601
- var PaginationFirst_default = _sfc_main$18;
9540
+ var PaginationFirst_default = _sfc_main$22;
9602
9541
 
9603
9542
  //#endregion
9604
9543
  //#region src/components/Pagination/PaginationItem.vue
9605
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
9544
+ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
9606
9545
  name: "PaginationItem",
9607
9546
  __name: "PaginationItem",
9608
9547
  props: {
@@ -9612,7 +9551,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
9612
9551
  type: Boolean,
9613
9552
  default: false
9614
9553
  },
9615
- id: { default: () => /* @__PURE__ */ genId() },
9554
+ id: { default: () => useId$1() },
9616
9555
  as: { default: "button" },
9617
9556
  renderless: { type: Boolean }
9618
9557
  },
@@ -9668,17 +9607,17 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
9668
9607
  };
9669
9608
  }
9670
9609
  });
9671
- var PaginationItem_default = _sfc_main$17;
9610
+ var PaginationItem_default = _sfc_main$21;
9672
9611
 
9673
9612
  //#endregion
9674
9613
  //#region src/components/Pagination/PaginationLast.vue
9675
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
9614
+ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
9676
9615
  name: "PaginationLast",
9677
9616
  __name: "PaginationLast",
9678
9617
  props: {
9679
9618
  namespace: { default: "v0:pagination" },
9680
9619
  disabled: { type: Boolean },
9681
- id: { default: () => /* @__PURE__ */ genId() },
9620
+ id: { default: () => useId$1() },
9682
9621
  as: { default: "button" },
9683
9622
  renderless: { type: Boolean }
9684
9623
  },
@@ -9727,17 +9666,17 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
9727
9666
  };
9728
9667
  }
9729
9668
  });
9730
- var PaginationLast_default = _sfc_main$16;
9669
+ var PaginationLast_default = _sfc_main$20;
9731
9670
 
9732
9671
  //#endregion
9733
9672
  //#region src/components/Pagination/PaginationNext.vue
9734
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
9673
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
9735
9674
  name: "PaginationNext",
9736
9675
  __name: "PaginationNext",
9737
9676
  props: {
9738
9677
  namespace: { default: "v0:pagination" },
9739
9678
  disabled: { type: Boolean },
9740
- id: { default: () => /* @__PURE__ */ genId() },
9679
+ id: { default: () => useId$1() },
9741
9680
  as: { default: "button" },
9742
9681
  renderless: { type: Boolean }
9743
9682
  },
@@ -9786,17 +9725,17 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
9786
9725
  };
9787
9726
  }
9788
9727
  });
9789
- var PaginationNext_default = _sfc_main$15;
9728
+ var PaginationNext_default = _sfc_main$19;
9790
9729
 
9791
9730
  //#endregion
9792
9731
  //#region src/components/Pagination/PaginationPrev.vue
9793
- const _sfc_main$14 = /* @__PURE__ */ defineComponent({
9732
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
9794
9733
  name: "PaginationPrev",
9795
9734
  __name: "PaginationPrev",
9796
9735
  props: {
9797
9736
  namespace: { default: "v0:pagination" },
9798
9737
  disabled: { type: Boolean },
9799
- id: { default: () => /* @__PURE__ */ genId() },
9738
+ id: { default: () => useId$1() },
9800
9739
  as: { default: "button" },
9801
9740
  renderless: { type: Boolean }
9802
9741
  },
@@ -9845,11 +9784,11 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
9845
9784
  };
9846
9785
  }
9847
9786
  });
9848
- var PaginationPrev_default = _sfc_main$14;
9787
+ var PaginationPrev_default = _sfc_main$18;
9849
9788
 
9850
9789
  //#endregion
9851
9790
  //#region src/components/Pagination/PaginationStatus.vue
9852
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
9791
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
9853
9792
  name: "PaginationStatus",
9854
9793
  __name: "PaginationStatus",
9855
9794
  props: {
@@ -9893,7 +9832,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
9893
9832
  };
9894
9833
  }
9895
9834
  });
9896
- var PaginationStatus_default = _sfc_main$13;
9835
+ var PaginationStatus_default = _sfc_main$17;
9897
9836
 
9898
9837
  //#endregion
9899
9838
  //#region src/components/Pagination/index.ts
@@ -9916,7 +9855,7 @@ const Pagination = {
9916
9855
  //#endregion
9917
9856
  //#region src/components/Popover/PopoverRoot.vue
9918
9857
  const [usePopoverContext, providePopoverContext] = createContext("Popover");
9919
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9858
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
9920
9859
  name: "PopoverRoot",
9921
9860
  __name: "PopoverRoot",
9922
9861
  props: /* @__PURE__ */ mergeModels({
@@ -9932,19 +9871,18 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9932
9871
  }),
9933
9872
  emits: ["update:modelValue"],
9934
9873
  setup(__props) {
9935
- const props = createPropsRestProxy(__props, ["as"]);
9936
9874
  const isSelected = useModel(__props, "modelValue");
9937
- const id = toRef(() => props.id ?? useId());
9875
+ const id = __props.id ?? useId$1();
9938
9876
  function toggle() {
9939
9877
  isSelected.value = !isSelected.value;
9940
9878
  }
9941
9879
  providePopoverContext({
9942
9880
  isSelected,
9943
9881
  toggle,
9944
- id: toValue(id)
9882
+ id
9945
9883
  });
9946
9884
  const slotProps = toRef(() => ({
9947
- id: toValue(id),
9885
+ id,
9948
9886
  isSelected: isSelected.value,
9949
9887
  toggle
9950
9888
  }));
@@ -9959,11 +9897,11 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9959
9897
  };
9960
9898
  }
9961
9899
  });
9962
- var PopoverRoot_default = _sfc_main$12;
9900
+ var PopoverRoot_default = _sfc_main$16;
9963
9901
 
9964
9902
  //#endregion
9965
9903
  //#region src/components/Popover/PopoverActivator.vue
9966
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
9904
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
9967
9905
  name: "PopoverActivator",
9968
9906
  __name: "PopoverActivator",
9969
9907
  props: {
@@ -9995,11 +9933,11 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
9995
9933
  };
9996
9934
  }
9997
9935
  });
9998
- var PopoverActivator_default = _sfc_main$11;
9936
+ var PopoverActivator_default = _sfc_main$15;
9999
9937
 
10000
9938
  //#endregion
10001
9939
  //#region src/components/Popover/PopoverContent.vue
10002
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9940
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
10003
9941
  name: "PopoverContent",
10004
9942
  __name: "PopoverContent",
10005
9943
  props: {
@@ -10063,7 +10001,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
10063
10001
  };
10064
10002
  }
10065
10003
  });
10066
- var PopoverContent_default = _sfc_main$10;
10004
+ var PopoverContent_default = _sfc_main$14;
10067
10005
 
10068
10006
  //#endregion
10069
10007
  //#region src/components/Popover/index.ts
@@ -10081,7 +10019,7 @@ const Popover = {
10081
10019
  //#endregion
10082
10020
  //#region src/components/Radio/RadioGroup.vue
10083
10021
  const [useRadioGroup, provideRadioGroup] = createContext();
10084
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
10022
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
10085
10023
  name: "RadioGroup",
10086
10024
  __name: "RadioGroup",
10087
10025
  props: /* @__PURE__ */ mergeModels({
@@ -10140,17 +10078,17 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
10140
10078
  };
10141
10079
  }
10142
10080
  });
10143
- var RadioGroup_default = _sfc_main$9;
10081
+ var RadioGroup_default = _sfc_main$13;
10144
10082
 
10145
10083
  //#endregion
10146
10084
  //#region src/components/Radio/RadioRoot.vue
10147
10085
  const [useRadioRoot, provideRadioRoot] = createContext();
10148
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
10086
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
10149
10087
  name: "RadioRoot",
10150
10088
  inheritAttrs: false,
10151
10089
  __name: "RadioRoot",
10152
10090
  props: {
10153
- id: { default: () => /* @__PURE__ */ genId() },
10091
+ id: { default: () => useId$1() },
10154
10092
  label: {},
10155
10093
  value: {},
10156
10094
  name: {},
@@ -10270,7 +10208,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
10270
10208
  };
10271
10209
  }
10272
10210
  });
10273
- var RadioRoot_default = _sfc_main$8;
10211
+ var RadioRoot_default = _sfc_main$12;
10274
10212
 
10275
10213
  //#endregion
10276
10214
  //#region src/components/Radio/RadioHiddenInput.vue
@@ -10292,7 +10230,7 @@ const visuallyHiddenStyle = {
10292
10230
  whiteSpace: "nowrap",
10293
10231
  border: "0"
10294
10232
  };
10295
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
10233
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
10296
10234
  name: "RadioHiddenInput",
10297
10235
  __name: "RadioHiddenInput",
10298
10236
  props: {
@@ -10327,11 +10265,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
10327
10265
  };
10328
10266
  }
10329
10267
  });
10330
- var RadioHiddenInput_default = _sfc_main$7;
10268
+ var RadioHiddenInput_default = _sfc_main$11;
10331
10269
 
10332
10270
  //#endregion
10333
10271
  //#region src/components/Radio/RadioIndicator.vue
10334
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10272
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
10335
10273
  name: "RadioIndicator",
10336
10274
  __name: "RadioIndicator",
10337
10275
  props: {
@@ -10361,7 +10299,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10361
10299
  };
10362
10300
  }
10363
10301
  });
10364
- var RadioIndicator_default = _sfc_main$6;
10302
+ var RadioIndicator_default = _sfc_main$10;
10365
10303
 
10366
10304
  //#endregion
10367
10305
  //#region src/components/Radio/index.ts
@@ -10407,7 +10345,7 @@ const Radio = {
10407
10345
  //#endregion
10408
10346
  //#region src/components/Selection/SelectionRoot.vue
10409
10347
  const [useSelectionRoot, provideSelectionRoot] = createContext();
10410
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
10348
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
10411
10349
  name: "SelectionRoot",
10412
10350
  __name: "SelectionRoot",
10413
10351
  props: /* @__PURE__ */ mergeModels({
@@ -10457,11 +10395,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
10457
10395
  };
10458
10396
  }
10459
10397
  });
10460
- var SelectionRoot_default = _sfc_main$5;
10398
+ var SelectionRoot_default = _sfc_main$9;
10461
10399
 
10462
10400
  //#endregion
10463
10401
  //#region src/components/Selection/SelectionItem.vue
10464
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
10402
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
10465
10403
  name: "SelectionItem",
10466
10404
  __name: "SelectionItem",
10467
10405
  props: {
@@ -10503,7 +10441,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
10503
10441
  };
10504
10442
  }
10505
10443
  });
10506
- var SelectionItem_default = _sfc_main$4;
10444
+ var SelectionItem_default = _sfc_main$8;
10507
10445
 
10508
10446
  //#endregion
10509
10447
  //#region src/components/Selection/index.ts
@@ -10520,7 +10458,7 @@ const Selection = {
10520
10458
  //#endregion
10521
10459
  //#region src/components/Single/SingleRoot.vue
10522
10460
  const [useSingleRoot, provideSingleRoot] = createContext();
10523
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
10461
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
10524
10462
  name: "SingleRoot",
10525
10463
  __name: "SingleRoot",
10526
10464
  props: /* @__PURE__ */ mergeModels({
@@ -10564,11 +10502,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
10564
10502
  };
10565
10503
  }
10566
10504
  });
10567
- var SingleRoot_default = _sfc_main$3;
10505
+ var SingleRoot_default = _sfc_main$7;
10568
10506
 
10569
10507
  //#endregion
10570
10508
  //#region src/components/Single/SingleItem.vue
10571
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10509
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10572
10510
  name: "SingleItem",
10573
10511
  __name: "SingleItem",
10574
10512
  props: {
@@ -10610,7 +10548,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10610
10548
  };
10611
10549
  }
10612
10550
  });
10613
- var SingleItem_default = _sfc_main$2;
10551
+ var SingleItem_default = _sfc_main$6;
10614
10552
 
10615
10553
  //#endregion
10616
10554
  //#region src/components/Single/index.ts
@@ -10627,7 +10565,7 @@ const Single = {
10627
10565
  //#endregion
10628
10566
  //#region src/components/Step/StepRoot.vue
10629
10567
  const [useStepRoot, provideStepRoot] = createContext();
10630
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10568
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
10631
10569
  name: "StepRoot",
10632
10570
  __name: "StepRoot",
10633
10571
  props: /* @__PURE__ */ mergeModels({
@@ -10676,11 +10614,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10676
10614
  };
10677
10615
  }
10678
10616
  });
10679
- var StepRoot_default = _sfc_main$1;
10617
+ var StepRoot_default = _sfc_main$5;
10680
10618
 
10681
10619
  //#endregion
10682
10620
  //#region src/components/Step/StepItem.vue
10683
- const _sfc_main = /* @__PURE__ */ defineComponent({
10621
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
10684
10622
  name: "StepItem",
10685
10623
  __name: "StepItem",
10686
10624
  props: {
@@ -10722,7 +10660,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10722
10660
  };
10723
10661
  }
10724
10662
  });
10725
- var StepItem_default = _sfc_main;
10663
+ var StepItem_default = _sfc_main$4;
10726
10664
 
10727
10665
  //#endregion
10728
10666
  //#region src/components/Step/index.ts
@@ -10737,4 +10675,326 @@ const Step = {
10737
10675
  };
10738
10676
 
10739
10677
  //#endregion
10740
- export { Atom_default as Atom, Avatar, AvatarFallback_default as AvatarFallback, AvatarImage_default as AvatarImage, AvatarRoot_default as AvatarRoot, COMMON_ELEMENTS, Checkbox, CheckboxGroup_default as CheckboxGroup, CheckboxHiddenInput_default as CheckboxHiddenInput, CheckboxIndicator_default as CheckboxIndicator, CheckboxRoot_default as CheckboxRoot, CheckboxSelectAll_default as CheckboxSelectAll, ConsolaLoggerAdapter, Dialog, DialogActivator_default as DialogActivator, DialogClose_default as DialogClose, DialogContent_default as DialogContent, DialogDescription_default as DialogDescription, DialogRoot_default as DialogRoot, DialogTitle_default as DialogTitle, ExpansionPanel, ExpansionPanelActivator_default as ExpansionPanelActivator, ExpansionPanelContent_default as ExpansionPanelContent, ExpansionPanelHeader_default as ExpansionPanelHeader, ExpansionPanelItem_default as ExpansionPanelItem, ExpansionPanelRoot_default as ExpansionPanelRoot, Group, GroupItem_default as GroupItem, GroupRoot_default as GroupRoot, IN_BROWSER, MemoryAdapter, Pagination, PaginationEllipsis_default as PaginationEllipsis, PaginationFirst_default as PaginationFirst, PaginationItem_default as PaginationItem, PaginationLast_default as PaginationLast, PaginationNext_default as PaginationNext, PaginationPrev_default as PaginationPrev, PaginationRoot_default as PaginationRoot, PaginationStatus_default as PaginationStatus, PermissionAdapter, PinoLoggerAdapter, Popover, PopoverActivator_default as PopoverActivator, PopoverContent_default as PopoverContent, PopoverRoot_default as PopoverRoot, Radio, RadioGroup_default as RadioGroup, RadioHiddenInput_default as RadioHiddenInput, RadioIndicator_default as RadioIndicator, RadioRoot_default as RadioRoot, SELF_CLOSING_TAGS, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, Selection, SelectionItem_default as SelectionItem, SelectionRoot_default as SelectionRoot, Single, SingleItem_default as SingleItem, SingleRoot_default as SingleRoot, Step, StepItem_default as StepItem, StepRoot_default as StepRoot, Vuetify0DateAdapter, Vuetify0LocaleAdapter, Vuetify0LoggerAdapter, Vuetify0ThemeAdapter, __LOGGER_ENABLED__, clamp, createBreakpoints, createBreakpointsContext, createBreakpointsPlugin, createContext, createDate, createDateContext, createDateFallback, createDatePlugin, createFallbackHydration, createFeatures, createFeaturesContext, createFeaturesPlugin, createFilter, createFilterContext, createForm, createFormContext, createGroup, createGroupContext, createHydration, createHydrationContext, createHydrationPlugin, createLocale, createLocaleContext, createLocaleFallback, createLocalePlugin, createLogger, createLoggerContext, createLoggerPlugin, createOverflow, createOverflowContext, createPagination, createPaginationContext, createPermissions, createPermissionsContext, createPermissionsPlugin, createPlugin, createQueue, createQueueContext, createRegistry, createRegistryContext, createSelection, createSelectionContext, createSingle, createSingleContext, createStep, createStepContext, createStorage, createStorageContext, createStoragePlugin, createTheme, createThemeContext, createThemePlugin, createTimeline, createTimelineContext, createTokens, createTokensContext, createTrinity, debounce, genId, instanceExists, instanceName, isArray, isBoolean, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isSelfClosingTag, isString, isSymbol, isUndefined, mergeDeep, provideAvatarContext, provideCheckboxGroup, provideCheckboxRoot, provideContext, provideDialogContext, provideExpansionPanelItem, provideExpansionPanelSelection, provideGroupRoot, providePaginationControls, providePaginationItems, providePaginationRoot, providePopoverContext, provideRadioGroup, provideRadioRoot, provideSelectionRoot, provideSingleRoot, provideStepRoot, range, toArray, toReactive, useAvatarRoot, useBreakpoints, useCheckboxGroup, useCheckboxRoot, useClickOutside, useContext, useDate, useDialogContext, useDocumentEventListener, useElementIntersection, useElementSize, useEventListener, useExpansionPanelItem, useExpansionPanelRoot, useFeatures, useFilter, useFilterContext, useForm, useGroup, useGroupRoot, useHotkey, useHydration, useIntersectionObserver, useLazy, useLocale, useLogger, useMediaQuery, useMutationObserver, useOverflow, usePagination, usePaginationControls, usePaginationItems, usePaginationRoot, usePermissions, usePopoverContext, usePrefersContrast, usePrefersDark, usePrefersReducedMotion, useProxyModel, useProxyRegistry, useQueue, useRadioGroup, useRadioRoot, useResizeObserver, useSelection, useSelectionRoot, useSingle, useSingleRoot, useStep, useStepRoot, useStorage, useTheme, useTimeline, useToggleScope, useTokens, useVirtual, useWindowEventListener, version };
10678
+ //#region src/components/Tabs/TabsRoot.vue
10679
+ const [useTabsRoot, provideTabsRoot] = createContext();
10680
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
10681
+ name: "TabsRoot",
10682
+ __name: "TabsRoot",
10683
+ props: /* @__PURE__ */ mergeModels({
10684
+ namespace: { default: "v0:tabs" },
10685
+ disabled: {
10686
+ type: Boolean,
10687
+ default: false
10688
+ },
10689
+ enroll: {
10690
+ type: Boolean,
10691
+ default: false
10692
+ },
10693
+ mandatory: {
10694
+ type: [Boolean, String],
10695
+ default: "force"
10696
+ },
10697
+ circular: {
10698
+ type: Boolean,
10699
+ default: true
10700
+ },
10701
+ orientation: { default: "horizontal" },
10702
+ activation: { default: "automatic" }
10703
+ }, {
10704
+ "modelValue": {},
10705
+ "modelModifiers": {}
10706
+ }),
10707
+ emits: /* @__PURE__ */ mergeModels(["update:model-value"], ["update:modelValue"]),
10708
+ setup(__props) {
10709
+ const model = useModel(__props, "modelValue");
10710
+ const rootId = useId$1();
10711
+ const step = createStep({
10712
+ disabled: toRef(() => __props.disabled),
10713
+ enroll: __props.enroll,
10714
+ mandatory: __props.mandatory,
10715
+ circular: __props.circular,
10716
+ events: true
10717
+ });
10718
+ useProxyModel(step, model, { multiple: false });
10719
+ const context = {
10720
+ ...step,
10721
+ orientation: toRef(() => __props.orientation),
10722
+ activation: toRef(() => __props.activation),
10723
+ circular: toRef(() => __props.circular),
10724
+ rootId
10725
+ };
10726
+ provideTabsRoot(__props.namespace, context);
10727
+ const slotProps = toRef(() => ({
10728
+ isDisabled: toValue(step.disabled),
10729
+ orientation: __props.orientation,
10730
+ activation: __props.activation,
10731
+ first: step.first,
10732
+ last: step.last,
10733
+ next: step.next,
10734
+ prev: step.prev,
10735
+ step: step.step,
10736
+ select: step.select,
10737
+ unselect: step.unselect,
10738
+ toggle: step.toggle,
10739
+ attrs: { "aria-multiselectable": false }
10740
+ }));
10741
+ return (_ctx, _cache) => {
10742
+ return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)));
10743
+ };
10744
+ }
10745
+ });
10746
+ var TabsRoot_default = _sfc_main$3;
10747
+
10748
+ //#endregion
10749
+ //#region src/components/Tabs/TabsList.vue
10750
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10751
+ name: "TabsList",
10752
+ inheritAttrs: false,
10753
+ __name: "TabsList",
10754
+ props: {
10755
+ label: {},
10756
+ namespace: { default: "v0:tabs" },
10757
+ as: { default: "div" },
10758
+ renderless: { type: Boolean }
10759
+ },
10760
+ setup(__props) {
10761
+ const attrs = useAttrs();
10762
+ const tabs = useTabsRoot(__props.namespace);
10763
+ const isDisabled = toRef(() => toValue(tabs.disabled));
10764
+ const slotProps = toRef(() => ({
10765
+ orientation: tabs.orientation.value,
10766
+ isDisabled: isDisabled.value,
10767
+ attrs: {
10768
+ "role": "tablist",
10769
+ "aria-orientation": tabs.orientation.value,
10770
+ "aria-label": __props.label,
10771
+ "aria-disabled": isDisabled.value || void 0,
10772
+ "data-disabled": isDisabled.value || void 0
10773
+ }
10774
+ }));
10775
+ return (_ctx, _cache) => {
10776
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
10777
+ ...unref(attrs),
10778
+ ...slotProps.value.attrs
10779
+ }, {
10780
+ as: __props.as,
10781
+ renderless: __props.renderless
10782
+ }), {
10783
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
10784
+ _: 3
10785
+ }, 16, ["as", "renderless"]);
10786
+ };
10787
+ }
10788
+ });
10789
+ var TabsList_default = _sfc_main$2;
10790
+
10791
+ //#endregion
10792
+ //#region src/components/Tabs/TabsItem.vue
10793
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10794
+ name: "TabsItem",
10795
+ inheritAttrs: false,
10796
+ __name: "TabsItem",
10797
+ props: {
10798
+ id: {},
10799
+ value: {},
10800
+ disabled: {},
10801
+ namespace: { default: "v0:tabs" },
10802
+ ariaLabel: {},
10803
+ ariaLabelledby: {},
10804
+ ariaDescribedby: {},
10805
+ as: { default: "button" },
10806
+ renderless: { type: Boolean }
10807
+ },
10808
+ setup(__props) {
10809
+ const attrs = useAttrs();
10810
+ const rootRef = useTemplateRef("root");
10811
+ const tabs = useTabsRoot(__props.namespace);
10812
+ const el = toRef(() => rootRef.value?.element ?? void 0);
10813
+ const ticket = tabs.register({
10814
+ id: __props.id,
10815
+ value: __props.value,
10816
+ disabled: __props.disabled,
10817
+ el
10818
+ });
10819
+ const isDisabled = toRef(() => toValue(ticket.disabled) || toValue(tabs.disabled));
10820
+ const tabId = toRef(() => `${tabs.rootId}-tab-${ticket.id}`);
10821
+ const panelId = toRef(() => `${tabs.rootId}-panel-${ticket.id}`);
10822
+ onUnmounted(() => {
10823
+ tabs.unregister(ticket.id);
10824
+ });
10825
+ function focusSelectedTab() {
10826
+ nextTick(() => {
10827
+ const selected = tabs.selectedItem.value;
10828
+ if (selected) toValue(selected.el)?.focus();
10829
+ });
10830
+ }
10831
+ function onKeydown(e) {
10832
+ const isHorizontal = tabs.orientation.value === "horizontal";
10833
+ if (isHorizontal && e.key === "ArrowRight" || !isHorizontal && e.key === "ArrowDown") {
10834
+ e.preventDefault();
10835
+ tabs.next();
10836
+ focusSelectedTab();
10837
+ return;
10838
+ }
10839
+ if (isHorizontal && e.key === "ArrowLeft" || !isHorizontal && e.key === "ArrowUp") {
10840
+ e.preventDefault();
10841
+ tabs.prev();
10842
+ focusSelectedTab();
10843
+ return;
10844
+ }
10845
+ if (e.key === "Home") {
10846
+ e.preventDefault();
10847
+ tabs.first();
10848
+ focusSelectedTab();
10849
+ return;
10850
+ }
10851
+ if (e.key === "End") {
10852
+ e.preventDefault();
10853
+ tabs.last();
10854
+ focusSelectedTab();
10855
+ return;
10856
+ }
10857
+ if (tabs.activation.value === "manual" && (e.key === "Enter" || e.key === " ")) {
10858
+ e.preventDefault();
10859
+ ticket.select();
10860
+ }
10861
+ }
10862
+ function onClick() {
10863
+ if (!isDisabled.value) ticket.select();
10864
+ }
10865
+ function onFocus() {
10866
+ if (tabs.activation.value === "automatic" && !isDisabled.value) ticket.select();
10867
+ }
10868
+ const slotProps = toRef(() => ({
10869
+ id: String(ticket.id),
10870
+ isSelected: toValue(ticket.isSelected),
10871
+ isDisabled: toValue(isDisabled),
10872
+ select: ticket.select,
10873
+ attrs: {
10874
+ "id": tabId.value,
10875
+ "role": "tab",
10876
+ "tabindex": toValue(ticket.isSelected) ? 0 : -1,
10877
+ "aria-selected": toValue(ticket.isSelected),
10878
+ "aria-controls": panelId.value,
10879
+ "aria-disabled": toValue(isDisabled) || void 0,
10880
+ "aria-label": __props.ariaLabel,
10881
+ "aria-labelledby": __props.ariaLabelledby,
10882
+ "aria-describedby": __props.ariaDescribedby,
10883
+ "data-selected": toValue(ticket.isSelected) || void 0,
10884
+ "data-disabled": toValue(isDisabled) || void 0,
10885
+ "disabled": __props.as === "button" ? toValue(isDisabled) : void 0,
10886
+ "type": __props.as === "button" ? "button" : void 0,
10887
+ "onClick": onClick,
10888
+ "onKeydown": onKeydown,
10889
+ "onFocus": onFocus
10890
+ }
10891
+ }));
10892
+ return (_ctx, _cache) => {
10893
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({ ref: "root" }, {
10894
+ ...unref(attrs),
10895
+ ...slotProps.value.attrs
10896
+ }, {
10897
+ as: __props.as,
10898
+ renderless: __props.renderless
10899
+ }), {
10900
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
10901
+ _: 3
10902
+ }, 16, ["as", "renderless"]);
10903
+ };
10904
+ }
10905
+ });
10906
+ var TabsItem_default = _sfc_main$1;
10907
+
10908
+ //#endregion
10909
+ //#region src/components/Tabs/TabsPanel.vue
10910
+ const _sfc_main = /* @__PURE__ */ defineComponent({
10911
+ name: "TabsPanel",
10912
+ inheritAttrs: false,
10913
+ __name: "TabsPanel",
10914
+ props: {
10915
+ value: {},
10916
+ namespace: { default: "v0:tabs" },
10917
+ as: { default: "div" },
10918
+ renderless: { type: Boolean }
10919
+ },
10920
+ setup(__props) {
10921
+ const attrs = useAttrs();
10922
+ const tabs = useTabsRoot(__props.namespace);
10923
+ const ticket = toRef(() => {
10924
+ const ids = tabs.browse(__props.value);
10925
+ if (ids && ids.length > 0) return tabs.get(ids[0]) ?? null;
10926
+ return null;
10927
+ });
10928
+ const isSelected = toRef(() => {
10929
+ const t = ticket.value;
10930
+ return t ? toValue(t.isSelected) : false;
10931
+ });
10932
+ const ticketId = toRef(() => ticket.value?.id ?? __props.value);
10933
+ const panelId = toRef(() => `${tabs.rootId}-panel-${ticketId.value}`);
10934
+ const tabId = toRef(() => `${tabs.rootId}-tab-${ticketId.value}`);
10935
+ const slotProps = toRef(() => ({
10936
+ isSelected: isSelected.value,
10937
+ attrs: {
10938
+ "id": panelId.value,
10939
+ "role": "tabpanel",
10940
+ "aria-labelledby": tabId.value,
10941
+ "tabindex": isSelected.value ? 0 : -1,
10942
+ "hidden": !isSelected.value,
10943
+ "data-selected": isSelected.value || void 0
10944
+ }
10945
+ }));
10946
+ return (_ctx, _cache) => {
10947
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
10948
+ ...unref(attrs),
10949
+ ...slotProps.value.attrs
10950
+ }, {
10951
+ as: __props.as,
10952
+ renderless: __props.renderless
10953
+ }), {
10954
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
10955
+ _: 3
10956
+ }, 16, ["as", "renderless"]);
10957
+ };
10958
+ }
10959
+ });
10960
+ var TabsPanel_default = _sfc_main;
10961
+
10962
+ //#endregion
10963
+ //#region src/components/Tabs/index.ts
10964
+ /**
10965
+ * Tabs component with sub-components for building accessible tab interfaces.
10966
+ *
10967
+ * @see https://0.vuetifyjs.com/components/tabs
10968
+ *
10969
+ * @example
10970
+ * ```vue
10971
+ * <script lang="ts" setup>
10972
+ * import { Tabs } from '@vuetify/v0'
10973
+ *
10974
+ * const selected = ref('profile')
10975
+ * <\/script>
10976
+ *
10977
+ * <template>
10978
+ * <Tabs.Root v-model="selected">
10979
+ * <Tabs.List label="Account settings">
10980
+ * <Tabs.Item value="profile">Profile</Tabs.Item>
10981
+ * <Tabs.Item value="password">Password</Tabs.Item>
10982
+ * <Tabs.Item value="billing" disabled>Billing</Tabs.Item>
10983
+ * </Tabs.List>
10984
+ *
10985
+ * <Tabs.Panel value="profile">Profile content</Tabs.Panel>
10986
+ * <Tabs.Panel value="password">Password content</Tabs.Panel>
10987
+ * <Tabs.Panel value="billing">Billing content</Tabs.Panel>
10988
+ * </Tabs.Root>
10989
+ * </template>
10990
+ * ```
10991
+ */
10992
+ const Tabs = {
10993
+ Root: TabsRoot_default,
10994
+ List: TabsList_default,
10995
+ Item: TabsItem_default,
10996
+ Panel: TabsPanel_default
10997
+ };
10998
+
10999
+ //#endregion
11000
+ export { Atom_default as Atom, Avatar, AvatarFallback_default as AvatarFallback, AvatarImage_default as AvatarImage, AvatarRoot_default as AvatarRoot, COMMON_ELEMENTS, Checkbox, CheckboxGroup_default as CheckboxGroup, CheckboxHiddenInput_default as CheckboxHiddenInput, CheckboxIndicator_default as CheckboxIndicator, CheckboxRoot_default as CheckboxRoot, CheckboxSelectAll_default as CheckboxSelectAll, ConsolaLoggerAdapter, Dialog, DialogActivator_default as DialogActivator, DialogClose_default as DialogClose, DialogContent_default as DialogContent, DialogDescription_default as DialogDescription, DialogRoot_default as DialogRoot, DialogTitle_default as DialogTitle, ExpansionPanel, ExpansionPanelActivator_default as ExpansionPanelActivator, ExpansionPanelContent_default as ExpansionPanelContent, ExpansionPanelHeader_default as ExpansionPanelHeader, ExpansionPanelItem_default as ExpansionPanelItem, ExpansionPanelRoot_default as ExpansionPanelRoot, Group, GroupItem_default as GroupItem, GroupRoot_default as GroupRoot, IN_BROWSER, MemoryAdapter, Pagination, PaginationEllipsis_default as PaginationEllipsis, PaginationFirst_default as PaginationFirst, PaginationItem_default as PaginationItem, PaginationLast_default as PaginationLast, PaginationNext_default as PaginationNext, PaginationPrev_default as PaginationPrev, PaginationRoot_default as PaginationRoot, PaginationStatus_default as PaginationStatus, PermissionAdapter, PinoLoggerAdapter, Popover, PopoverActivator_default as PopoverActivator, PopoverContent_default as PopoverContent, PopoverRoot_default as PopoverRoot, Radio, RadioGroup_default as RadioGroup, RadioHiddenInput_default as RadioHiddenInput, RadioIndicator_default as RadioIndicator, RadioRoot_default as RadioRoot, SELF_CLOSING_TAGS, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, Selection, SelectionItem_default as SelectionItem, SelectionRoot_default as SelectionRoot, Single, SingleItem_default as SingleItem, SingleRoot_default as SingleRoot, Step, StepItem_default as StepItem, StepRoot_default as StepRoot, Tabs, TabsItem_default as TabsItem, TabsList_default as TabsList, TabsPanel_default as TabsPanel, TabsRoot_default as TabsRoot, Vuetify0LocaleAdapter, Vuetify0LoggerAdapter, Vuetify0ThemeAdapter, __LOGGER_ENABLED__, clamp, createBreakpoints, createBreakpointsContext, createBreakpointsPlugin, createContext, createDate, createDateContext, createDatePlugin, createFallbackHydration, createFeatures, createFeaturesContext, createFeaturesPlugin, createFilter, createFilterContext, createForm, createFormContext, createGroup, createGroupContext, createHydration, createHydrationContext, createHydrationPlugin, createLocale, createLocaleContext, createLocaleFallback, createLocalePlugin, createLogger, createLoggerContext, createLoggerPlugin, createNested, createNestedContext, createOverflow, createOverflowContext, createPagination, createPaginationContext, createPermissions, createPermissionsContext, createPermissionsPlugin, createPlugin, createQueue, createQueueContext, createRegistry, createRegistryContext, createSelection, createSelectionContext, createSingle, createSingleContext, createStep, createStepContext, createStorage, createStorageContext, createStoragePlugin, createTheme, createThemeContext, createThemePlugin, createTimeline, createTimelineContext, createTokens, createTokensContext, createTrinity, debounce, instanceExists, instanceName, isArray, isBoolean, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isSelfClosingTag, isString, isSymbol, isUndefined, mergeDeep, multipleOpenStrategy, provideAvatarContext, provideCheckboxGroup, provideCheckboxRoot, provideContext, provideDialogContext, provideExpansionPanelItem, provideExpansionPanelSelection, provideGroupRoot, providePaginationControls, providePaginationItems, providePaginationRoot, providePopoverContext, provideRadioGroup, provideRadioRoot, provideSelectionRoot, provideSingleRoot, provideStepRoot, provideTabsRoot, range, singleOpenStrategy, toArray, toReactive, useAvatarRoot, useBreakpoints, useCheckboxGroup, useCheckboxRoot, useClickOutside, useContext, useDate, useDialogContext, useDocumentEventListener, useElementIntersection, useElementSize, useEventListener, useExpansionPanelItem, useExpansionPanelRoot, useFeatures, useFilter, useFilterContext, useForm, useGroup, useGroupRoot, useHotkey, useHydration, useId, useIntersectionObserver, useLazy, useLocale, useLogger, useMediaQuery, useMutationObserver, useNested, useOverflow, usePagination, usePaginationControls, usePaginationItems, usePaginationRoot, usePermissions, usePopoverContext, usePrefersContrast, usePrefersDark, usePrefersReducedMotion, useProxyModel, useProxyRegistry, useQueue, useRadioGroup, useRadioRoot, useResizeObserver, useSelection, useSelectionRoot, useSingle, useSingleRoot, useStep, useStepRoot, useStorage, useTabsRoot, useTheme, useTimeline, useToggleScope, useTokens, useVirtual, useWindowEventListener, version };