@vuetify/v0 0.0.24-beta.1 → 0.1.0

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 (33) hide show
  1. package/README.md +2 -2
  2. package/dist/adapter-L4Php1_S.d.mts +97 -0
  3. package/dist/browser/index.js +1318 -842
  4. package/dist/components/index.d.mts +4 -4
  5. package/dist/components/index.mjs +6 -6
  6. package/dist/{components-Dd4KKVtk.mjs → components-V4KaMfn-.mjs} +442 -117
  7. package/dist/composables/index.d.mts +5 -4
  8. package/dist/composables/index.mjs +4 -4
  9. package/dist/constants/index.d.mts +1 -1
  10. package/dist/constants/index.mjs +3 -3
  11. package/dist/date/index.d.mts +124 -0
  12. package/dist/date/index.mjs +7514 -0
  13. package/dist/{globals-CiCJWcbb.mjs → globals-CgcVstn0.mjs} +1 -1
  14. package/dist/{index-CAEB2sxS.d.mts → index-CSjKBMhp.d.mts} +738 -349
  15. package/dist/{index-C8YcMooA.d.mts → index-CoO8LW8o.d.mts} +13 -9
  16. package/dist/{index-DYSwiS9k.d.mts → index-DlxrzbvZ.d.mts} +21 -1
  17. package/dist/{index-rcTqb9U3.d.mts → index-DsiFkTD8.d.mts} +662 -306
  18. package/dist/{index-Bby5ljat.d.mts → index-t-t6sAn3.d.mts} +222 -41
  19. package/dist/index.d.mts +8 -7
  20. package/dist/index.mjs +7 -7
  21. package/dist/json/attributes.json +104 -0
  22. package/dist/json/importMap.json +20 -0
  23. package/dist/json/tags.json +46 -0
  24. package/dist/json/web-types.json +309 -9
  25. package/dist/types/index.d.mts +2 -2
  26. package/dist/{useClickOutside-BfEvdnA4.mjs → useClickOutside-Cj8CguMD.mjs} +844 -699
  27. package/dist/utilities/index.d.mts +3 -3
  28. package/dist/utilities/index.mjs +2 -2
  29. package/dist/{utilities-9i1hJnMd.mjs → utilities-B58TiS_S.mjs} +41 -34
  30. package/package.json +21 -3
  31. /package/dist/{constants-3l8TGg5J.mjs → constants-DHKqjdjH.mjs} +0 -0
  32. /package/dist/{htmlElements-CXObxj0V.mjs → htmlElements-DO9n35bD.mjs} +0 -0
  33. /package/dist/{index-DMQJJUrv.d.mts → index-cPmI99rd.d.mts} +0 -0
@@ -1,6 +1,6 @@
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";
3
+ import flagsmith from "flagsmith";
4
4
 
5
5
  //#region src/constants/htmlElements.ts
6
6
  const selfClosingTags = [
@@ -78,6 +78,31 @@ function isSelfClosingTag(tag) {
78
78
  return SELF_CLOSING_TAGS.has(tag.toLowerCase());
79
79
  }
80
80
 
81
+ //#endregion
82
+ //#region src/utilities/instance.ts
83
+ /**
84
+ * Vue 3.6+ exposes `currentInstance` for Vapor mode compatibility.
85
+ * `getCurrentInstance()` returns null in Vapor components by design,
86
+ * so we access `currentInstance` directly when available.
87
+ *
88
+ * Uses dynamic key to avoid bundler static analysis warnings.
89
+ *
90
+ * @see https://github.com/orgs/vuejs/discussions/13629
91
+ * @internal
92
+ */
93
+ const INSTANCE_KEY = "currentInstance";
94
+ function getInstanceCompat() {
95
+ const vueExports = Vue;
96
+ if (INSTANCE_KEY in vueExports) return vueExports[INSTANCE_KEY];
97
+ return Vue.getCurrentInstance();
98
+ }
99
+ function instanceExists() {
100
+ return !/* @__PURE__ */ isNull(getInstanceCompat());
101
+ }
102
+ function instanceName() {
103
+ return getInstanceCompat()?.type?.name;
104
+ }
105
+
81
106
  //#endregion
82
107
  //#region src/utilities/helpers.ts
83
108
  /**
@@ -358,24 +383,30 @@ function mergeDeep(target, ...sources) {
358
383
  }
359
384
  return /* @__PURE__ */ mergeDeep(target, ...sources);
360
385
  }
386
+ let idCounter = 0;
361
387
  /**
362
- * Generates a random 7-character alphanumeric ID
388
+ * Generates a unique ID, using Vue's useId when in component context
363
389
  *
364
- * @returns A random string of 7 characters (a-z, 0-9)
390
+ * @returns A unique string ID
365
391
  *
366
392
  * @remarks
367
- * Uses `Math.random()` converted to base-36. Not cryptographically secure.
368
- * Suitable for unique keys in UI components, not for security purposes.
393
+ * - In component setup/lifecycle: Uses Vue's `useId()` for SSR-safe hydration
394
+ * - Outside components: Falls back to sequential counter (`v0-0`, `v0-1`, ...)
395
+ * - Vapor mode compatible
369
396
  *
370
397
  * @example
371
398
  * ```ts
372
- * genId() // 'k7x9m2p'
373
- * genId() // 'a3b8c1d'
399
+ * // In component setup - SSR safe
400
+ * const id = useId() // 'v:0', 'v:1', etc. (Vue's format)
401
+ *
402
+ * // Outside component - counter fallback
403
+ * const id = useId() // 'v0-0', 'v0-1', etc.
374
404
  * ```
375
405
  */
376
406
  /* @__NO_SIDE_EFFECTS__ */
377
- function genId() {
378
- return Math.random().toString(36).slice(2, 9);
407
+ function useId() {
408
+ if (instanceExists()) return useId$1();
409
+ return `v0-${idCounter++}`;
379
410
  }
380
411
  /**
381
412
  * Clamps a value between a minimum and maximum
@@ -446,31 +477,6 @@ function debounce(fn, delay) {
446
477
  return debounced;
447
478
  }
448
479
 
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
480
  //#endregion
475
481
  //#region src/components/Atom/Atom.vue
476
482
  /**
@@ -494,7 +500,7 @@ function instanceName() {
494
500
  * serving as the foundation for all other components that need polymorphic
495
501
  * rendering capabilities.
496
502
  */
497
- const _sfc_main$42 = /* @__PURE__ */ defineComponent({
503
+ const _sfc_main$46 = /* @__PURE__ */ defineComponent({
498
504
  name: "Atom",
499
505
  __name: "Atom",
500
506
  props: {
@@ -525,7 +531,7 @@ const _sfc_main$42 = /* @__PURE__ */ defineComponent({
525
531
  };
526
532
  }
527
533
  });
528
- var Atom_default = _sfc_main$42;
534
+ var Atom_default = _sfc_main$46;
529
535
 
530
536
  //#endregion
531
537
  //#region src/composables/createContext/index.ts
@@ -680,7 +686,7 @@ const SUPPORTS_MATCH_MEDIA = IN_BROWSER && "matchMedia" in window && typeof wind
680
686
  const SUPPORTS_OBSERVER = IN_BROWSER && "ResizeObserver" in window;
681
687
  const SUPPORTS_INTERSECTION_OBSERVER = IN_BROWSER && "IntersectionObserver" in window;
682
688
  const SUPPORTS_MUTATION_OBSERVER = IN_BROWSER && "MutationObserver" in window;
683
- const version = "0.0.24-beta.1";
689
+ const version = "0.1.0";
684
690
  /* v8 ignore next -- build-time constant, __DEV__ short-circuits in tests */
685
691
  const __LOGGER_ENABLED__ = false;
686
692
 
@@ -1137,12 +1143,13 @@ function useLogger(namespace = "v0:logger") {
1137
1143
  */
1138
1144
  function createRegistry(options) {
1139
1145
  const logger$1 = useLogger();
1140
- const collection = /* @__PURE__ */ new Map();
1146
+ const events = options?.events ?? false;
1147
+ const reactive$1 = options?.reactive ?? false;
1148
+ const collection = reactive$1 ? shallowReactive(/* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
1141
1149
  const catalog = /* @__PURE__ */ new Map();
1142
1150
  const directory = /* @__PURE__ */ new Map();
1143
1151
  const cache = /* @__PURE__ */ new Map();
1144
1152
  const listeners = /* @__PURE__ */ new Map();
1145
- const events = options?.events ?? false;
1146
1153
  let indexDependentCount = 0;
1147
1154
  let needsReindex = false;
1148
1155
  let minDirtyIndex = Infinity;
@@ -1322,7 +1329,7 @@ function createRegistry(options) {
1322
1329
  }
1323
1330
  function register(registration = {}) {
1324
1331
  const size = collection.size;
1325
- const id = registration.id ?? /* @__PURE__ */ genId();
1332
+ const id = registration.id ?? /* @__PURE__ */ useId();
1326
1333
  if (has(id)) {
1327
1334
  logger$1.warn(`Ticket "${id}" already exists. Use \`upsert()\` to update or check \`has()\` before registering.`);
1328
1335
  return get(id);
@@ -1332,13 +1339,14 @@ function createRegistry(options) {
1332
1339
  const value = valueIsUndefined ? index : registration.value;
1333
1340
  const valueIsIndex = valueIsUndefined;
1334
1341
  if (valueIsIndex) indexDependentCount++;
1335
- const ticket = {
1342
+ const rawTicket = {
1336
1343
  ...registration,
1337
1344
  id,
1338
1345
  index,
1339
1346
  value,
1340
1347
  valueIsIndex
1341
1348
  };
1349
+ const ticket = reactive$1 ? shallowReactive(rawTicket) : rawTicket;
1342
1350
  collection.set(ticket.id, ticket);
1343
1351
  directory.set(ticket.index, ticket.id);
1344
1352
  assign(ticket.value, ticket.id);
@@ -1491,8 +1499,9 @@ function createRegistryContext(_options = {}) {
1491
1499
  * Supports disabled items, mandatory selection enforcement, and auto-enrollment.
1492
1500
  *
1493
1501
  * @param options The options for the selection instance.
1494
- * @template Z The type of the selection ticket.
1495
- * @template E The type of the selection context.
1502
+ * @template Z The input ticket type - what users provide to register(). Extend SelectionTicketInput to add custom properties.
1503
+ * @template E The output ticket type - what users receive from get(). Automatically includes selection methods.
1504
+ * @template R The context type. Defaults to SelectionContext<Z, E>.
1496
1505
  * @returns A new selection instance with selection management methods.
1497
1506
  *
1498
1507
  * @remarks
@@ -1515,6 +1524,7 @@ function createRegistryContext(_options = {}) {
1515
1524
  * ```ts
1516
1525
  * import { createSelection } from '@vuetify/v0'
1517
1526
  *
1527
+ * // Basic usage
1518
1528
  * const selection = createSelection({ mandatory: true })
1519
1529
  *
1520
1530
  * selection.onboard([
@@ -1529,6 +1539,23 @@ function createRegistryContext(_options = {}) {
1529
1539
  * console.log(selection.selectedIds) // Set { 'item-1', 'item-3' }
1530
1540
  * console.log(Array.from(selection.selectedValues.value)) // ['Item 1', 'Item 3']
1531
1541
  * ```
1542
+ *
1543
+ * @example
1544
+ * ```ts
1545
+ * // With custom ticket type
1546
+ * interface MyTicket extends SelectionTicketInput {
1547
+ * label: string
1548
+ * icon?: string
1549
+ * }
1550
+ *
1551
+ * const tabs = createSelection<MyTicket>()
1552
+ *
1553
+ * tabs.register({ label: 'Home', icon: 'mdi-home' })
1554
+ * tabs.register({ label: 'Settings' })
1555
+ *
1556
+ * const ticket = tabs.get('...')
1557
+ * // ticket has: label, icon, isSelected, select(), unselect(), toggle()
1558
+ * ```
1532
1559
  */
1533
1560
  function createSelection(_options = {}) {
1534
1561
  const { disabled = false, enroll = false, mandatory = false, multiple = false, ...options } = _options;
@@ -1569,7 +1596,7 @@ function createSelection(_options = {}) {
1569
1596
  return selectedIds.has(id);
1570
1597
  }
1571
1598
  function register(registration = {}) {
1572
- const id = registration.id ?? /* @__PURE__ */ genId();
1599
+ const id = registration.id ?? /* @__PURE__ */ useId();
1573
1600
  const item = {
1574
1601
  disabled: false,
1575
1602
  select: () => select(id),
@@ -1626,8 +1653,9 @@ function createSelection(_options = {}) {
1626
1653
  * Creates a new selection context.
1627
1654
  *
1628
1655
  * @param options The options for the selection context.
1629
- * @template Z The type of the selection ticket.
1630
- * @template E The type of the selection context.
1656
+ * @template Z The input ticket type - what users provide to register().
1657
+ * @template E The output ticket type - what users receive from get().
1658
+ * @template R The context type. Defaults to SelectionContext<Z, E>.
1631
1659
  * @returns A new selection context.
1632
1660
  *
1633
1661
  * @see https://0.vuetifyjs.com/composables/selection/use-selection
@@ -1649,6 +1677,17 @@ function createSelection(_options = {}) {
1649
1677
  * const checkboxes = useCheckboxes()
1650
1678
  * checkboxes.select('checkbox-1')
1651
1679
  * ```
1680
+ *
1681
+ * @example
1682
+ * ```ts
1683
+ * // With custom ticket type
1684
+ * interface TabTicket extends SelectionTicketInput {
1685
+ * label: string
1686
+ * icon?: string
1687
+ * }
1688
+ *
1689
+ * export const [useTabs, provideTabs, tabs] = createSelectionContext<TabTicket>()
1690
+ * ```
1652
1691
  */
1653
1692
  function createSelectionContext(_options = {}) {
1654
1693
  const { namespace = "v0:selection", ...options } = _options;
@@ -1663,6 +1702,9 @@ function createSelectionContext(_options = {}) {
1663
1702
  * Returns the current selection instance.
1664
1703
  *
1665
1704
  * @param namespace The namespace for the selection context. Defaults to `'v0:selection'`.
1705
+ * @template Z The input ticket type.
1706
+ * @template E The output ticket type.
1707
+ * @template R The context type.
1666
1708
  * @returns The current selection instance.
1667
1709
  *
1668
1710
  * @see https://0.vuetifyjs.com/composables/selection/use-selection
@@ -1689,7 +1731,7 @@ function useSelection(namespace = "v0:selection") {
1689
1731
  //#endregion
1690
1732
  //#region src/components/Avatar/AvatarRoot.vue
1691
1733
  const [useAvatarRoot, provideAvatarContext] = createContext();
1692
- const _sfc_main$41 = /* @__PURE__ */ defineComponent({
1734
+ const _sfc_main$45 = /* @__PURE__ */ defineComponent({
1693
1735
  name: "AvatarRoot",
1694
1736
  __name: "AvatarRoot",
1695
1737
  props: {
@@ -1714,11 +1756,11 @@ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
1714
1756
  };
1715
1757
  }
1716
1758
  });
1717
- var AvatarRoot_default = _sfc_main$41;
1759
+ var AvatarRoot_default = _sfc_main$45;
1718
1760
 
1719
1761
  //#endregion
1720
1762
  //#region src/components/Avatar/AvatarFallback.vue
1721
- const _sfc_main$40 = /* @__PURE__ */ defineComponent({
1763
+ const _sfc_main$44 = /* @__PURE__ */ defineComponent({
1722
1764
  name: "AvatarFallback",
1723
1765
  __name: "AvatarFallback",
1724
1766
  props: {
@@ -1743,11 +1785,11 @@ const _sfc_main$40 = /* @__PURE__ */ defineComponent({
1743
1785
  };
1744
1786
  }
1745
1787
  });
1746
- var AvatarFallback_default = _sfc_main$40;
1788
+ var AvatarFallback_default = _sfc_main$44;
1747
1789
 
1748
1790
  //#endregion
1749
1791
  //#region src/components/Avatar/AvatarImage.vue
1750
- const _sfc_main$39 = /* @__PURE__ */ defineComponent({
1792
+ const _sfc_main$43 = /* @__PURE__ */ defineComponent({
1751
1793
  name: "AvatarImage",
1752
1794
  inheritAttrs: false,
1753
1795
  __name: "AvatarImage",
@@ -1807,7 +1849,7 @@ const _sfc_main$39 = /* @__PURE__ */ defineComponent({
1807
1849
  };
1808
1850
  }
1809
1851
  });
1810
- var AvatarImage_default = _sfc_main$39;
1852
+ var AvatarImage_default = _sfc_main$43;
1811
1853
 
1812
1854
  //#endregion
1813
1855
  //#region src/components/Avatar/index.ts
@@ -2059,7 +2101,7 @@ function createGroup(_options = {}) {
2059
2101
  else selection.toggle(id);
2060
2102
  }
2061
2103
  function register(registration = {}) {
2062
- const id = registration.id ?? /* @__PURE__ */ genId();
2104
+ const id = registration.id ?? /* @__PURE__ */ useId();
2063
2105
  const item = {
2064
2106
  ...registration,
2065
2107
  id,
@@ -2148,8 +2190,9 @@ function createGroup(_options = {}) {
2148
2190
  * Creates a new group context.
2149
2191
  *
2150
2192
  * @param options The options for the group context.
2151
- * @template Z The type of the group ticket.
2152
- * @template E The type of the group context.
2193
+ * @template Z The input ticket type.
2194
+ * @template E The output ticket type.
2195
+ * @template R The context type.
2153
2196
  * @returns A new group context.
2154
2197
  *
2155
2198
  * @see https://0.vuetifyjs.com/composables/selection/use-group
@@ -2184,6 +2227,9 @@ function createGroupContext(_options = {}) {
2184
2227
  * Returns the current group instance.
2185
2228
  *
2186
2229
  * @param namespace The namespace for the group context. Defaults to `'v0:group'`.
2230
+ * @template Z The input ticket type.
2231
+ * @template E The output ticket type.
2232
+ * @template R The context type.
2187
2233
  * @returns The current group instance.
2188
2234
  *
2189
2235
  * @see https://0.vuetifyjs.com/composables/selection/use-group
@@ -2320,7 +2366,7 @@ function useProxyModel(registry, model, options) {
2320
2366
  //#endregion
2321
2367
  //#region src/components/Checkbox/CheckboxGroup.vue
2322
2368
  const [useCheckboxGroup, provideCheckboxGroup] = createContext();
2323
- const _sfc_main$38 = /* @__PURE__ */ defineComponent({
2369
+ const _sfc_main$42 = /* @__PURE__ */ defineComponent({
2324
2370
  name: "CheckboxGroup",
2325
2371
  __name: "CheckboxGroup",
2326
2372
  props: /* @__PURE__ */ mergeModels({
@@ -2386,17 +2432,17 @@ const _sfc_main$38 = /* @__PURE__ */ defineComponent({
2386
2432
  };
2387
2433
  }
2388
2434
  });
2389
- var CheckboxGroup_default = _sfc_main$38;
2435
+ var CheckboxGroup_default = _sfc_main$42;
2390
2436
 
2391
2437
  //#endregion
2392
2438
  //#region src/components/Checkbox/CheckboxRoot.vue
2393
2439
  const [useCheckboxRoot, provideCheckboxRoot] = createContext();
2394
- const _sfc_main$37 = /* @__PURE__ */ defineComponent({
2440
+ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
2395
2441
  name: "CheckboxRoot",
2396
2442
  inheritAttrs: false,
2397
2443
  __name: "CheckboxRoot",
2398
2444
  props: /* @__PURE__ */ mergeModels({
2399
- id: { default: () => /* @__PURE__ */ genId() },
2445
+ id: { default: () => useId$1() },
2400
2446
  label: {},
2401
2447
  value: {},
2402
2448
  name: {},
@@ -2525,7 +2571,7 @@ const _sfc_main$37 = /* @__PURE__ */ defineComponent({
2525
2571
  };
2526
2572
  }
2527
2573
  });
2528
- var CheckboxRoot_default = _sfc_main$37;
2574
+ var CheckboxRoot_default = _sfc_main$41;
2529
2575
 
2530
2576
  //#endregion
2531
2577
  //#region src/components/Checkbox/CheckboxHiddenInput.vue
@@ -2547,7 +2593,7 @@ const visuallyHiddenStyle$1 = {
2547
2593
  whiteSpace: "nowrap",
2548
2594
  border: "0"
2549
2595
  };
2550
- const _sfc_main$36 = /* @__PURE__ */ defineComponent({
2596
+ const _sfc_main$40 = /* @__PURE__ */ defineComponent({
2551
2597
  name: "CheckboxHiddenInput",
2552
2598
  __name: "CheckboxHiddenInput",
2553
2599
  props: {
@@ -2583,11 +2629,11 @@ const _sfc_main$36 = /* @__PURE__ */ defineComponent({
2583
2629
  };
2584
2630
  }
2585
2631
  });
2586
- var CheckboxHiddenInput_default = _sfc_main$36;
2632
+ var CheckboxHiddenInput_default = _sfc_main$40;
2587
2633
 
2588
2634
  //#endregion
2589
2635
  //#region src/components/Checkbox/CheckboxIndicator.vue
2590
- const _sfc_main$35 = /* @__PURE__ */ defineComponent({
2636
+ const _sfc_main$39 = /* @__PURE__ */ defineComponent({
2591
2637
  name: "CheckboxIndicator",
2592
2638
  __name: "CheckboxIndicator",
2593
2639
  props: {
@@ -2620,11 +2666,11 @@ const _sfc_main$35 = /* @__PURE__ */ defineComponent({
2620
2666
  };
2621
2667
  }
2622
2668
  });
2623
- var CheckboxIndicator_default = _sfc_main$35;
2669
+ var CheckboxIndicator_default = _sfc_main$39;
2624
2670
 
2625
2671
  //#endregion
2626
2672
  //#region src/components/Checkbox/CheckboxSelectAll.vue
2627
- const _sfc_main$34 = /* @__PURE__ */ defineComponent({
2673
+ const _sfc_main$38 = /* @__PURE__ */ defineComponent({
2628
2674
  name: "CheckboxSelectAll",
2629
2675
  inheritAttrs: false,
2630
2676
  __name: "CheckboxSelectAll",
@@ -2643,7 +2689,7 @@ const _sfc_main$34 = /* @__PURE__ */ defineComponent({
2643
2689
  const props = __props;
2644
2690
  const { as = "button", renderless, label, namespace = "v0:checkbox:root", groupNamespace = "v0:checkbox:group" } = props;
2645
2691
  const group = useCheckboxGroup(groupNamespace);
2646
- const id = /* @__PURE__ */ genId();
2692
+ const id = useId$1();
2647
2693
  const isAllSelected = toRef(() => group.isAllSelected.value);
2648
2694
  const isMixed = toRef(() => group.isMixed.value);
2649
2695
  const isDisabled = toRef(() => toValue(props.disabled) || toValue(group.disabled));
@@ -2710,7 +2756,7 @@ const _sfc_main$34 = /* @__PURE__ */ defineComponent({
2710
2756
  };
2711
2757
  }
2712
2758
  });
2713
- var CheckboxSelectAll_default = _sfc_main$34;
2759
+ var CheckboxSelectAll_default = _sfc_main$38;
2714
2760
 
2715
2761
  //#endregion
2716
2762
  //#region src/components/Checkbox/index.ts
@@ -2746,7 +2792,7 @@ const Checkbox = {
2746
2792
  //#endregion
2747
2793
  //#region src/components/Dialog/DialogRoot.vue
2748
2794
  const [useDialogContext, provideDialogContext] = createContext();
2749
- const _sfc_main$33 = /* @__PURE__ */ defineComponent({
2795
+ const _sfc_main$37 = /* @__PURE__ */ defineComponent({
2750
2796
  name: "DialogRoot",
2751
2797
  __name: "DialogRoot",
2752
2798
  props: /* @__PURE__ */ mergeModels({
@@ -2763,11 +2809,10 @@ const _sfc_main$33 = /* @__PURE__ */ defineComponent({
2763
2809
  }),
2764
2810
  emits: /* @__PURE__ */ mergeModels(["update:modelValue"], ["update:modelValue"]),
2765
2811
  setup(__props) {
2766
- const props = createPropsRestProxy(__props, ["as", "namespace"]);
2767
2812
  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`);
2813
+ const id = __props.id ?? useId$1();
2814
+ const titleId = `${id}-title`;
2815
+ const descriptionId = `${id}-description`;
2771
2816
  function open() {
2772
2817
  isOpen.value = true;
2773
2818
  }
@@ -2776,14 +2821,14 @@ const _sfc_main$33 = /* @__PURE__ */ defineComponent({
2776
2821
  }
2777
2822
  provideDialogContext(__props.namespace, {
2778
2823
  isOpen,
2779
- id: toValue(id),
2780
- titleId: toValue(titleId),
2781
- descriptionId: toValue(descriptionId),
2824
+ id,
2825
+ titleId,
2826
+ descriptionId,
2782
2827
  open,
2783
2828
  close
2784
2829
  });
2785
2830
  const slotProps = toRef(() => ({
2786
- id: toValue(id),
2831
+ id,
2787
2832
  isOpen: isOpen.value,
2788
2833
  open,
2789
2834
  close
@@ -2799,11 +2844,11 @@ const _sfc_main$33 = /* @__PURE__ */ defineComponent({
2799
2844
  };
2800
2845
  }
2801
2846
  });
2802
- var DialogRoot_default = _sfc_main$33;
2847
+ var DialogRoot_default = _sfc_main$37;
2803
2848
 
2804
2849
  //#endregion
2805
2850
  //#region src/components/Dialog/DialogClose.vue
2806
- const _sfc_main$32 = /* @__PURE__ */ defineComponent({
2851
+ const _sfc_main$36 = /* @__PURE__ */ defineComponent({
2807
2852
  name: "DialogClose",
2808
2853
  __name: "DialogClose",
2809
2854
  props: {
@@ -2831,7 +2876,7 @@ const _sfc_main$32 = /* @__PURE__ */ defineComponent({
2831
2876
  };
2832
2877
  }
2833
2878
  });
2834
- var DialogClose_default = _sfc_main$32;
2879
+ var DialogClose_default = _sfc_main$36;
2835
2880
 
2836
2881
  //#endregion
2837
2882
  //#region src/composables/toReactive/index.ts
@@ -3006,18 +3051,26 @@ function toReactive(objectRef) {
3006
3051
  */
3007
3052
  function createHydration() {
3008
3053
  const isHydrated = shallowRef(false);
3054
+ const isSettled = shallowRef(false);
3009
3055
  function hydrate() {
3010
3056
  isHydrated.value = true;
3011
3057
  }
3058
+ function settle() {
3059
+ isSettled.value = true;
3060
+ }
3012
3061
  return {
3013
3062
  isHydrated: shallowReadonly(isHydrated),
3014
- hydrate
3063
+ isSettled: shallowReadonly(isSettled),
3064
+ hydrate,
3065
+ settle
3015
3066
  };
3016
3067
  }
3017
3068
  function createFallbackHydration() {
3018
3069
  return {
3019
3070
  isHydrated: shallowReadonly(shallowRef(true)),
3020
- hydrate: () => {}
3071
+ isSettled: shallowReadonly(shallowRef(true)),
3072
+ hydrate: () => {},
3073
+ settle: () => {}
3021
3074
  };
3022
3075
  }
3023
3076
  /**
@@ -3081,9 +3134,11 @@ function createHydrationPlugin(_options = {}) {
3081
3134
  provideHydrationContext(context, app);
3082
3135
  },
3083
3136
  setup: (app) => {
3084
- app.mixin({ mounted() {
3137
+ app.mixin({ async mounted() {
3085
3138
  if (!/* @__PURE__ */ isNull(this.$parent)) return;
3086
3139
  context.hydrate();
3140
+ await nextTick();
3141
+ context.settle();
3087
3142
  } });
3088
3143
  }
3089
3144
  });
@@ -3101,13 +3156,16 @@ function createHydrationPlugin(_options = {}) {
3101
3156
  * <script setup lang="ts">
3102
3157
  * import { useHydration } from '@vuetify/v0'
3103
3158
  *
3104
- * const hydration = useHydration()
3159
+ * const { isHydrated, isSettled } = useHydration()
3160
+ *
3161
+ * // Use isSettled to gate animations after state restoration
3162
+ * const transition = computed(() => isSettled.value ? 'fade' : undefined)
3105
3163
  * <\/script>
3106
3164
  *
3107
3165
  * <template>
3108
- * <div>
3109
- * <p>Is hydrated: {{ hydration.isHydrated.value }}</p>
3110
- * </div>
3166
+ * <Transition :name="transition">
3167
+ * <div v-if="show">Animates only after hydration settles</div>
3168
+ * </Transition>
3111
3169
  * </template>
3112
3170
  * ```
3113
3171
  */
@@ -3408,8 +3466,9 @@ function useBreakpoints(namespace = "v0:breakpoints") {
3408
3466
  * Adds computed singular properties: `selectedId`, `selectedItem`, `selectedIndex`, `selectedValue`.
3409
3467
  *
3410
3468
  * @param options The options for the single selection instance.
3411
- * @template Z The type of the single selection ticket.
3412
- * @template E The type of the single selection context.
3469
+ * @template Z The input ticket type - what users provide to register().
3470
+ * @template E The output ticket type - what users receive from get().
3471
+ * @template R The context type.
3413
3472
  * @returns A new single selection instance with single-selection enforcement.
3414
3473
  *
3415
3474
  * @remarks
@@ -3450,6 +3509,18 @@ function useBreakpoints(namespace = "v0:breakpoints") {
3450
3509
  * console.log(tabs.selectedId.value) // 'about'
3451
3510
  * console.log(tabs.selectedIds.size) // 1 (always enforces single selection)
3452
3511
  * ```
3512
+ *
3513
+ * @example
3514
+ * ```ts
3515
+ * // With custom ticket type
3516
+ * interface TabTicket extends SingleTicketInput {
3517
+ * label: string
3518
+ * icon?: string
3519
+ * }
3520
+ *
3521
+ * const tabs = createSingle<TabTicket>()
3522
+ * tabs.register({ label: 'Home', icon: 'mdi-home' })
3523
+ * ```
3453
3524
  */
3454
3525
  function createSingle(_options = {}) {
3455
3526
  const { mandatory = false, multiple = false, ...options } = _options;
@@ -3487,8 +3558,9 @@ function createSingle(_options = {}) {
3487
3558
  * Creates a new single selection context.
3488
3559
  *
3489
3560
  * @param options The options for the single selection context.
3490
- * @template Z The type of the single selection ticket.
3491
- * @template E The type of the single selection context.
3561
+ * @template Z The input ticket type.
3562
+ * @template E The output ticket type.
3563
+ * @template R The context type.
3492
3564
  * @returns A new single selection context.
3493
3565
  *
3494
3566
  * @see https://0.vuetifyjs.com/composables/selection/use-single
@@ -3521,6 +3593,9 @@ function createSingleContext(_options = {}) {
3521
3593
  * Returns the current single selection instance.
3522
3594
  *
3523
3595
  * @param namespace The namespace for the single selection context. Defaults to `'v0:single'`.
3596
+ * @template Z The input ticket type.
3597
+ * @template E The output ticket type.
3598
+ * @template R The context type.
3524
3599
  * @returns The current single selection instance.
3525
3600
  *
3526
3601
  * @see https://0.vuetifyjs.com/composables/selection/use-single
@@ -3990,585 +4065,6 @@ function useLocale(namespace = "v0:locale") {
3990
4065
  }
3991
4066
  }
3992
4067
 
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
4068
  //#endregion
4573
4069
  //#region src/composables/useDate/index.ts
4574
4070
  /**
@@ -4579,16 +4075,16 @@ var Vuetify0DateAdapter = class {
4579
4075
  *
4580
4076
  * Key features:
4581
4077
  * - Adapter pattern for date library abstraction
4582
- * - Temporal API as default adapter (modern, immutable dates)
4583
4078
  * - Locale-aware formatting via Intl.DateTimeFormat
4584
4079
  * - Integration with useLocale for automatic locale sync
4585
4080
  *
4586
- * @example
4081
+ * @example Using the built-in Temporal adapter
4587
4082
  * ```ts
4083
+ * import { Vuetify0DateAdapter } from '@vuetify/v0/date'
4588
4084
  * import { createDatePlugin } from '@vuetify/v0'
4589
4085
  *
4590
4086
  * const app = createApp(App)
4591
- * app.use(createDatePlugin())
4087
+ * app.use(createDatePlugin({ adapter: new Vuetify0DateAdapter() }))
4592
4088
  *
4593
4089
  * // In a component:
4594
4090
  * const { adapter } = useDate()
@@ -4604,7 +4100,7 @@ var Vuetify0DateAdapter = class {
4604
4100
  * // ... implementation
4605
4101
  * }
4606
4102
  *
4607
- * const context = createDate({ adapter: new DateFnsAdapter() })
4103
+ * app.use(createDatePlugin({ adapter: new DateFnsAdapter() }))
4608
4104
  * ```
4609
4105
  */
4610
4106
  /**
@@ -4627,7 +4123,8 @@ const defaultLocales = {
4627
4123
  /**
4628
4124
  * Creates a new date context.
4629
4125
  *
4630
- * @param options Optional adapter and locale configuration.
4126
+ * @param options Adapter and locale configuration.
4127
+ * @template Z The date type used by the adapter.
4631
4128
  * @template E The date context type.
4632
4129
  * @returns A date context.
4633
4130
  *
@@ -4635,18 +4132,20 @@ const defaultLocales = {
4635
4132
  *
4636
4133
  * @example
4637
4134
  * ```ts
4638
- * const { adapter } = createDate()
4639
- * const today = adapter.date() // Temporal.PlainDateTime
4135
+ * import { Vuetify0DateAdapter } from '@vuetify/v0/date'
4640
4136
  *
4641
- * // With locale options
4642
- * const { adapter: deAdapter } = createDate({ locale: 'de-DE' })
4137
+ * const { adapter } = createDate({ adapter: new Vuetify0DateAdapter() })
4138
+ * const today = adapter.date()
4643
4139
  *
4644
- * // With custom adapter
4645
- * const { adapter } = createDate({ adapter: new DateFnsAdapter() })
4140
+ * // With locale options
4141
+ * const { adapter } = createDate({
4142
+ * adapter: new Vuetify0DateAdapter(),
4143
+ * locale: 'de-DE',
4144
+ * })
4646
4145
  * ```
4647
4146
  */
4648
- function createDate(options = {}) {
4649
- const { locales = defaultLocales, adapter = new Vuetify0DateAdapter(), locale: initialLocale } = options;
4147
+ function createDate(options) {
4148
+ const { locales = defaultLocales, adapter, locale: initialLocale } = options;
4650
4149
  let selectedId;
4651
4150
  try {
4652
4151
  if (instanceExists()) selectedId = useLocale().selectedId;
@@ -4674,22 +4173,10 @@ function createDate(options = {}) {
4674
4173
  };
4675
4174
  }
4676
4175
  /**
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
4176
  * Creates a new date context trinity.
4691
4177
  *
4692
- * @param options Optional adapter, locale, and namespace configuration.
4178
+ * @param options Adapter, locale, and namespace configuration.
4179
+ * @template Z The date type used by the adapter.
4693
4180
  * @template E The date context type.
4694
4181
  * @returns A trinity [useContext, provideContext, defaultContext].
4695
4182
  *
@@ -4697,18 +4184,15 @@ function createDateFallback() {
4697
4184
  *
4698
4185
  * @example
4699
4186
  * ```ts
4700
- * const [useAppDate, provideAppDate] = createDateContext({
4701
- * namespace: 'app:date',
4702
- * })
4187
+ * import { Vuetify0DateAdapter } from '@vuetify/v0/date'
4703
4188
  *
4704
- * // With custom adapter
4705
4189
  * const [useAppDate, provideAppDate] = createDateContext({
4706
- * adapter: new DateFnsAdapter(),
4190
+ * adapter: new Vuetify0DateAdapter(),
4707
4191
  * namespace: 'app:date',
4708
4192
  * })
4709
4193
  * ```
4710
4194
  */
4711
- function createDateContext(options = {}) {
4195
+ function createDateContext(options) {
4712
4196
  const { namespace = "v0:date", ...dateOptions } = options;
4713
4197
  const [useDateContext, _provideDateContext] = createContext(namespace);
4714
4198
  const context = createDate(dateOptions);
@@ -4720,7 +4204,8 @@ function createDateContext(options = {}) {
4720
4204
  /**
4721
4205
  * Creates a new date plugin.
4722
4206
  *
4723
- * @param options Optional adapter, locale, and namespace configuration.
4207
+ * @param options Adapter, locale, and namespace configuration.
4208
+ * @template Z The date type used by the adapter.
4724
4209
  * @template E The date context type.
4725
4210
  * @returns A Vue plugin.
4726
4211
  *
@@ -4728,17 +4213,19 @@ function createDateContext(options = {}) {
4728
4213
  *
4729
4214
  * @example
4730
4215
  * ```ts
4731
- * const app = createApp(App)
4732
- * app.use(createDatePlugin())
4216
+ * import { Vuetify0DateAdapter } from '@vuetify/v0/date'
4733
4217
  *
4734
- * // With options
4735
- * app.use(createDatePlugin({ locale: 'de-DE' }))
4218
+ * const app = createApp(App)
4219
+ * app.use(createDatePlugin({ adapter: new Vuetify0DateAdapter() }))
4736
4220
  *
4737
- * // With custom adapter
4738
- * app.use(createDatePlugin({ adapter: new DateFnsAdapter() }))
4221
+ * // With locale options
4222
+ * app.use(createDatePlugin({
4223
+ * adapter: new Vuetify0DateAdapter(),
4224
+ * locale: 'de-DE',
4225
+ * }))
4739
4226
  * ```
4740
4227
  */
4741
- function createDatePlugin(options = {}) {
4228
+ function createDatePlugin(options) {
4742
4229
  const { namespace = "v0:date", ...dateOptions } = options;
4743
4230
  const [, provideDateContext, context] = createDateContext({
4744
4231
  namespace,
@@ -4754,16 +4241,26 @@ function createDatePlugin(options = {}) {
4754
4241
  /**
4755
4242
  * Returns the current date context.
4756
4243
  *
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.
4244
+ * Requires `createDatePlugin` to be installed with an adapter.
4759
4245
  *
4760
4246
  * @param namespace The namespace to look up (defaults to 'v0:date').
4247
+ * @template Z The date type used by the adapter.
4761
4248
  * @template E The date context type.
4762
4249
  * @returns The current date context.
4250
+ * @throws If called outside a component or without a date plugin installed.
4763
4251
  *
4764
4252
  * @see https://0.vuetifyjs.com/composables/plugins/use-date
4765
4253
  *
4766
4254
  * @example
4255
+ * ```ts
4256
+ * // main.ts
4257
+ * import { Vuetify0DateAdapter } from '@vuetify/v0/date'
4258
+ * import { createDatePlugin } from '@vuetify/v0'
4259
+ *
4260
+ * app.use(createDatePlugin({ adapter: new Vuetify0DateAdapter() }))
4261
+ * ```
4262
+ *
4263
+ * @example
4767
4264
  * ```vue
4768
4265
  * <script setup lang="ts">
4769
4266
  * import { useDate } from '@vuetify/v0'
@@ -4774,15 +4271,126 @@ function createDatePlugin(options = {}) {
4774
4271
  * ```
4775
4272
  */
4776
4273
  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
- }
4274
+ 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() }))");
4275
+ return useContext(namespace);
4784
4276
  }
4785
4277
 
4278
+ //#endregion
4279
+ //#region src/composables/useFeatures/adapters/generic/index.ts
4280
+ var FeaturesAdapter = class {};
4281
+
4282
+ //#endregion
4283
+ //#region src/composables/useFeatures/adapters/flagsmith/index.ts
4284
+ /**
4285
+ * @module FlagsmithFeatureAdapter
4286
+ *
4287
+ * @remarks
4288
+ * Flagsmith adapter for feature flags.
4289
+ */
4290
+ var FlagsmithFeatureAdapter = class {
4291
+ client;
4292
+ options;
4293
+ constructor(client = flagsmith, options) {
4294
+ this.client = client;
4295
+ this.options = options;
4296
+ }
4297
+ setup(onUpdate) {
4298
+ const updateFlags = () => {
4299
+ const flags = this.client.getAllFlags();
4300
+ const adapterFlags = {};
4301
+ if (flags) for (const [key, flag] of Object.entries(flags)) {
4302
+ const isEnabled = flag.enabled;
4303
+ const variation = flag.value;
4304
+ adapterFlags[key] = variation !== null && variation !== void 0 ? {
4305
+ $value: isEnabled,
4306
+ $variation: variation
4307
+ } : isEnabled;
4308
+ }
4309
+ return adapterFlags;
4310
+ };
4311
+ this.client.init({
4312
+ ...this.options,
4313
+ onChange: (oldFlags, params, loadingState) => {
4314
+ onUpdate(updateFlags());
4315
+ this.options.onChange?.(oldFlags, params, loadingState);
4316
+ }
4317
+ });
4318
+ this.disposeFn = () => this.client.stopListening();
4319
+ return updateFlags();
4320
+ }
4321
+ dispose() {
4322
+ this.disposeFn();
4323
+ }
4324
+ disposeFn = () => {};
4325
+ };
4326
+
4327
+ //#endregion
4328
+ //#region src/composables/useFeatures/adapters/launchdarkly/index.ts
4329
+ var LaunchDarklyFeatureAdapter = class {
4330
+ constructor(client) {
4331
+ this.client = client;
4332
+ }
4333
+ setup(onUpdate) {
4334
+ const updateFlags = () => {
4335
+ const allFlags = this.client.allFlags();
4336
+ const flags = {};
4337
+ for (const [key, value] of Object.entries(allFlags)) flags[key] = typeof value === "boolean" ? value : {
4338
+ $value: true,
4339
+ $variation: value
4340
+ };
4341
+ onUpdate(flags);
4342
+ return flags;
4343
+ };
4344
+ this.client.on("change", updateFlags);
4345
+ this.disposeFn = () => this.client.off("change", updateFlags);
4346
+ return updateFlags();
4347
+ }
4348
+ dispose() {
4349
+ this.disposeFn();
4350
+ }
4351
+ disposeFn = () => {};
4352
+ };
4353
+
4354
+ //#endregion
4355
+ //#region src/composables/useFeatures/adapters/posthog/index.ts
4356
+ var PostHogFeatureAdapter = class {
4357
+ constructor(client) {
4358
+ this.client = client;
4359
+ }
4360
+ setup(onUpdate) {
4361
+ const updateFlags = () => {
4362
+ const flags = {};
4363
+ const activeFlags = this.client.featureFlags.getFlags();
4364
+ if (activeFlags) {
4365
+ for (const key of activeFlags) {
4366
+ const isEnabled = this.client.isFeatureEnabled(key) ?? false;
4367
+ const payload = this.client.getFeatureFlagPayload(key);
4368
+ if (payload !== void 0 && payload !== null) flags[key] = {
4369
+ $value: isEnabled,
4370
+ $variation: payload
4371
+ };
4372
+ else {
4373
+ const variant = this.client.getFeatureFlag(key);
4374
+ flags[key] = variant !== true && variant !== false && variant !== void 0 && variant !== null ? {
4375
+ $value: true,
4376
+ $variation: variant
4377
+ } : isEnabled;
4378
+ }
4379
+ }
4380
+ onUpdate(flags);
4381
+ return flags;
4382
+ }
4383
+ return {};
4384
+ };
4385
+ this.disposeFn = this.client.onFeatureFlags(updateFlags);
4386
+ return updateFlags();
4387
+ }
4388
+ dispose() {
4389
+ this.disposeFn();
4390
+ }
4391
+ disposeFn = () => {};
4392
+ };
4393
+
4786
4394
  //#endregion
4787
4395
  //#region src/composables/useFeatures/index.ts
4788
4396
  /**
@@ -4799,6 +4407,7 @@ function useDate(namespace = "v0:date") {
4799
4407
  * - Auto-selection of enabled features
4800
4408
  * - Multi-select support for feature combinations
4801
4409
  * - Perfect for A/B testing, progressive rollout, feature toggles
4410
+ * - Adapter pattern for external feature flag services
4802
4411
  *
4803
4412
  * Inheritance chain: useRegistry → createSelection → createGroup → createFeatures
4804
4413
  * Integrates with useTokens for token-based features.
@@ -4829,7 +4438,10 @@ function useDate(namespace = "v0:date") {
4829
4438
  function createFeatures(_options = {}) {
4830
4439
  const { features, ...options } = _options;
4831
4440
  const tokens = createTokens(features, { flat: true });
4832
- const registry = createGroup(options);
4441
+ const registry = createGroup({
4442
+ ...options,
4443
+ reactive: true
4444
+ });
4833
4445
  for (const [id, { value }] of tokens.entries()) register({
4834
4446
  id,
4835
4447
  value
@@ -4848,10 +4460,22 @@ function createFeatures(_options = {}) {
4848
4460
  if (/* @__PURE__ */ isBoolean(ticket.value) && ticket.value === true || /* @__PURE__ */ isObject(ticket.value) && /* @__PURE__ */ isBoolean(ticket.value.$value) && ticket.value.$value === true) registry.select(ticket.id);
4849
4461
  return ticket;
4850
4462
  }
4463
+ function sync(flags) {
4464
+ for (const [id, value] of Object.entries(flags)) if (registry.get(id)) {
4465
+ const shouldSelect = /* @__PURE__ */ isBoolean(value) ? value === true : /* @__PURE__ */ isObject(value) && /* @__PURE__ */ isBoolean(value.$value) && value.$value === true;
4466
+ registry.upsert(id, { value });
4467
+ if (shouldSelect) registry.select(id);
4468
+ else registry.unselect(id);
4469
+ } else register({
4470
+ id,
4471
+ value
4472
+ });
4473
+ }
4851
4474
  return {
4852
4475
  ...registry,
4853
4476
  variation,
4854
4477
  register,
4478
+ sync,
4855
4479
  get size() {
4856
4480
  return registry.size;
4857
4481
  }
@@ -4920,7 +4544,7 @@ function createFeaturesContext(_options = {}) {
4920
4544
  * ```
4921
4545
  */
4922
4546
  function createFeaturesPlugin(_options = {}) {
4923
- const { namespace = "v0:features", ...options } = _options;
4547
+ const { namespace = "v0:features", adapter, ...options } = _options;
4924
4548
  const [, provideFeaturesContext, context] = createFeaturesContext({
4925
4549
  ...options,
4926
4550
  namespace
@@ -4929,6 +4553,17 @@ function createFeaturesPlugin(_options = {}) {
4929
4553
  namespace,
4930
4554
  provide: (app) => {
4931
4555
  provideFeaturesContext(context, app);
4556
+ },
4557
+ setup: (app) => {
4558
+ if (!adapter) return;
4559
+ const adapters = /* @__PURE__ */ isArray(adapter) ? adapter : [adapter];
4560
+ for (const adapter$1 of adapters) {
4561
+ const initialFlags = adapter$1.setup((flags) => {
4562
+ context.sync(flags);
4563
+ });
4564
+ context.sync(initialFlags);
4565
+ if (/* @__PURE__ */ isFunction(adapter$1.dispose)) app.onUnmount(() => adapter$1.dispose());
4566
+ }
4932
4567
  }
4933
4568
  });
4934
4569
  }
@@ -5780,7 +5415,7 @@ function matchesKeyGroup(e, group, platformIsMac) {
5780
5415
  */
5781
5416
  function useIntersectionObserver(target, callback, options = {}) {
5782
5417
  const { isHydrated } = useHydration();
5783
- const targetRef = isRef(target) ? target : shallowRef(target);
5418
+ const targetRef = toRef(target);
5784
5419
  const observer = shallowRef();
5785
5420
  const isPaused = shallowRef(false);
5786
5421
  const isIntersecting = shallowRef(false);
@@ -5819,17 +5454,17 @@ function useIntersectionObserver(target, callback, options = {}) {
5819
5454
  }]);
5820
5455
  }
5821
5456
  watch(() => targetRef.value, (el, oldEl) => {
5822
- if (oldEl) cleanup();
5457
+ if (oldEl || observer.value) cleanup();
5823
5458
  if (isHydrated.value && el) setup();
5824
5459
  }, { immediate: true });
5825
- if (!isHydrated.value) {
5826
- const stopHydrationWatch = watch(() => isHydrated.value, (hydrated) => {
5827
- if (hydrated && targetRef.value && !observer.value) {
5828
- setup();
5829
- stopHydrationWatch();
5830
- }
5831
- });
5832
- }
5460
+ let stopHydrationWatch;
5461
+ if (!isHydrated.value) stopHydrationWatch = watch(() => isHydrated.value, (hydrated) => {
5462
+ if (hydrated && targetRef.value && !observer.value) {
5463
+ setup();
5464
+ stopHydrationWatch?.();
5465
+ stopHydrationWatch = void 0;
5466
+ }
5467
+ });
5833
5468
  function cleanup() {
5834
5469
  if (observer.value) {
5835
5470
  observer.value.disconnect();
@@ -5846,6 +5481,8 @@ function useIntersectionObserver(target, callback, options = {}) {
5846
5481
  setup();
5847
5482
  }
5848
5483
  function stop() {
5484
+ stopHydrationWatch?.();
5485
+ stopHydrationWatch = void 0;
5849
5486
  cleanup();
5850
5487
  observer.value = null;
5851
5488
  }
@@ -6181,6 +5818,7 @@ function usePrefersContrast() {
6181
5818
  */
6182
5819
  function useMutationObserver(target, callback, options = {}) {
6183
5820
  const { isHydrated } = useHydration();
5821
+ const targetRef = toRef(target);
6184
5822
  const observer = shallowRef();
6185
5823
  const isPaused = shallowRef(false);
6186
5824
  const isActive = toRef(() => !!observer.value);
@@ -6195,7 +5833,7 @@ function useMutationObserver(target, callback, options = {}) {
6195
5833
  };
6196
5834
  function setup() {
6197
5835
  if (/* @__PURE__ */ isNull(observer.value)) return;
6198
- if (!isHydrated.value || !SUPPORTS_MUTATION_OBSERVER || !target.value || isPaused.value) return;
5836
+ if (!isHydrated.value || !SUPPORTS_MUTATION_OBSERVER || !targetRef.value || isPaused.value) return;
6199
5837
  observer.value = new MutationObserver((mutations) => {
6200
5838
  callback(mutations.map((mutation) => ({
6201
5839
  type: mutation.type,
@@ -6210,7 +5848,7 @@ function useMutationObserver(target, callback, options = {}) {
6210
5848
  })));
6211
5849
  if (options.once) stop();
6212
5850
  });
6213
- observer.value.observe(target.value, observerOptions);
5851
+ observer.value.observe(targetRef.value, observerOptions);
6214
5852
  if (options.immediate) {
6215
5853
  const emptyNodeList = {
6216
5854
  length: 0,
@@ -6220,7 +5858,7 @@ function useMutationObserver(target, callback, options = {}) {
6220
5858
  };
6221
5859
  callback([{
6222
5860
  type: "childList",
6223
- target: target.value,
5861
+ target: targetRef.value,
6224
5862
  addedNodes: emptyNodeList,
6225
5863
  removedNodes: emptyNodeList,
6226
5864
  previousSibling: null,
@@ -6232,18 +5870,18 @@ function useMutationObserver(target, callback, options = {}) {
6232
5870
  if (options.once) stop();
6233
5871
  }
6234
5872
  }
6235
- watch(() => target.value, (el, oldEl) => {
6236
- if (oldEl) cleanup();
5873
+ watch(() => targetRef.value, (el, oldEl) => {
5874
+ if (oldEl || observer.value) cleanup();
6237
5875
  if (isHydrated.value && el) setup();
6238
5876
  }, { immediate: true });
6239
- if (!isHydrated.value) {
6240
- const stopHydrationWatch = watch(() => isHydrated.value, (hydrated) => {
6241
- if (hydrated && target.value && !observer.value) {
6242
- setup();
6243
- stopHydrationWatch();
6244
- }
6245
- });
6246
- }
5877
+ let stopHydrationWatch;
5878
+ if (!isHydrated.value) stopHydrationWatch = watch(() => isHydrated.value, (hydrated) => {
5879
+ if (hydrated && targetRef.value && !observer.value) {
5880
+ setup();
5881
+ stopHydrationWatch?.();
5882
+ stopHydrationWatch = void 0;
5883
+ }
5884
+ });
6247
5885
  function cleanup() {
6248
5886
  if (observer.value) {
6249
5887
  observer.value.disconnect();
@@ -6259,6 +5897,8 @@ function useMutationObserver(target, callback, options = {}) {
6259
5897
  setup();
6260
5898
  }
6261
5899
  function stop() {
5900
+ stopHydrationWatch?.();
5901
+ stopHydrationWatch = void 0;
6262
5902
  cleanup();
6263
5903
  observer.value = null;
6264
5904
  }
@@ -6272,6 +5912,509 @@ function useMutationObserver(target, callback, options = {}) {
6272
5912
  };
6273
5913
  }
6274
5914
 
5915
+ //#endregion
5916
+ //#region src/composables/createNested/strategies.ts
5917
+ /**
5918
+ * Multiple open strategy: allows multiple nodes to be open simultaneously.
5919
+ *
5920
+ * @remarks
5921
+ * Perfect for tree views, file explorers, and nested menus where users expect
5922
+ * to keep multiple sections expanded at once.
5923
+ *
5924
+ * @example
5925
+ * ```ts
5926
+ * const tree = createNested({ openStrategy: multipleOpenStrategy })
5927
+ * tree.open('node-1')
5928
+ * tree.open('node-2')
5929
+ * // Both nodes are now open
5930
+ * ```
5931
+ */
5932
+ const multipleOpenStrategy = {
5933
+ onOpen: void 0,
5934
+ onClose: void 0
5935
+ };
5936
+ /**
5937
+ * Single open strategy: only one node can be open at a time (accordion behavior).
5938
+ *
5939
+ * @remarks
5940
+ * Perfect for accordions, single-select navigation, and contexts where only
5941
+ * one section should be visible at a time.
5942
+ *
5943
+ * @example
5944
+ * ```ts
5945
+ * const tree = createNested({ openStrategy: singleOpenStrategy })
5946
+ * tree.open('node-1') // node-1 opens
5947
+ * tree.open('node-2') // node-1 closes, node-2 opens
5948
+ * ```
5949
+ */
5950
+ const singleOpenStrategy = {
5951
+ onOpen: (id, context) => {
5952
+ for (const openedId of context.openedIds) if (openedId !== id) context.openedIds.delete(openedId);
5953
+ },
5954
+ onClose: void 0
5955
+ };
5956
+
5957
+ //#endregion
5958
+ //#region src/composables/createNested/index.ts
5959
+ /**
5960
+ * @module createNested
5961
+ *
5962
+ * @remarks
5963
+ * Hierarchical tree management composable extending createGroup with:
5964
+ * - Parent-child relationship tracking (children/parents Maps)
5965
+ * - Open/close state management
5966
+ * - Tree traversal utilities (getPath, getDescendants, etc.)
5967
+ * - Pluggable open strategies
5968
+ *
5969
+ * Inheritance chain: createSelection → createGroup → createNested
5970
+ */
5971
+ /**
5972
+ * Resolves open mode to an OpenStrategy.
5973
+ */
5974
+ function resolveOpenStrategy(open = "multiple") {
5975
+ return open === "single" ? singleOpenStrategy : multipleOpenStrategy;
5976
+ }
5977
+ /**
5978
+ * Creates a new nested tree instance with hierarchical management.
5979
+ *
5980
+ * Extends `createGroup` to support parent-child relationships, tree traversal,
5981
+ * and open/close state management. Perfect for tree views, nested navigation,
5982
+ * and hierarchical data structures.
5983
+ *
5984
+ * @param options The options for the nested instance.
5985
+ * @template Z The type of the nested ticket.
5986
+ * @template E The type of the nested context.
5987
+ * @returns A new nested instance with tree management capabilities.
5988
+ *
5989
+ * @remarks
5990
+ * **Key Differences from `createGroup`:**
5991
+ * - `register()` accepts `parentId` for establishing parent-child relationships
5992
+ * - `unregister()` accepts optional `cascade` parameter for cascading deletions
5993
+ * - Adds tree traversal methods: `getPath()`, `getAncestors()`, `getDescendants()`
5994
+ * - Adds computed properties: `roots`, `leaves`, `isLeaf()`, `getDepth()`
5995
+ * - Adds open state management: `open()`, `close()`, `flip()`, `opened()`
5996
+ *
5997
+ * @see https://0.vuetifyjs.com/composables/selection/use-nested
5998
+ *
5999
+ * @example
6000
+ * ```ts
6001
+ * import { createNested } from '@vuetify/v0'
6002
+ *
6003
+ * const tree = createNested()
6004
+ *
6005
+ * const root = tree.register({ id: 'root', value: 'Root' })
6006
+ * const child1 = tree.register({ id: 'child-1', value: 'Child 1', parentId: 'root' })
6007
+ * const child2 = tree.register({ id: 'child-2', value: 'Child 2', parentId: 'root' })
6008
+ *
6009
+ * console.log(tree.getPath('child-1')) // ['root', 'child-1']
6010
+ * console.log(tree.getDescendants('root')) // ['child-1', 'child-2']
6011
+ * console.log(tree.isLeaf('child-2')) // true
6012
+ *
6013
+ * tree.open('root')
6014
+ * console.log(tree.opened('root')) // true
6015
+ * ```
6016
+ */
6017
+ function createNested(_options = {}) {
6018
+ const { open: openMode = "multiple", openAll = false, reveal: revealOnOpen = false, selection: selectionMode = "cascade", openStrategy, ...options } = _options;
6019
+ const resolvedOpenStrategy = openStrategy ?? resolveOpenStrategy(openMode);
6020
+ const group = createGroup(options);
6021
+ const logger$1 = useLogger();
6022
+ const children = shallowReactive(/* @__PURE__ */ new Map());
6023
+ const parents = shallowReactive(/* @__PURE__ */ new Map());
6024
+ const openedIds = shallowReactive(/* @__PURE__ */ new Set());
6025
+ const openedItems = computed(() => {
6026
+ return new Set(Array.from(openedIds).map((id) => group.get(id)).filter((item) => !/* @__PURE__ */ isUndefined(item)));
6027
+ });
6028
+ const roots = computed(() => {
6029
+ return group.values().filter((item) => /* @__PURE__ */ isUndefined(parents.get(item.id)));
6030
+ });
6031
+ const leaves = computed(() => {
6032
+ return group.values().filter((item) => {
6033
+ const childList = children.get(item.id);
6034
+ return /* @__PURE__ */ isUndefined(childList) || childList.length === 0;
6035
+ });
6036
+ });
6037
+ function opened(id) {
6038
+ return openedIds.has(id);
6039
+ }
6040
+ function open(ids) {
6041
+ for (const id of toArray(ids)) {
6042
+ if (!group.has(id)) continue;
6043
+ if (revealOnOpen) {
6044
+ let parentId = parents.get(id);
6045
+ while (!/* @__PURE__ */ isUndefined(parentId)) {
6046
+ openedIds.add(parentId);
6047
+ parentId = parents.get(parentId);
6048
+ }
6049
+ }
6050
+ openedIds.add(id);
6051
+ resolvedOpenStrategy.onOpen?.(id, context);
6052
+ }
6053
+ }
6054
+ function close(ids) {
6055
+ for (const id of toArray(ids)) {
6056
+ if (!group.has(id)) continue;
6057
+ openedIds.delete(id);
6058
+ resolvedOpenStrategy.onClose?.(id, context);
6059
+ }
6060
+ }
6061
+ function flip(ids) {
6062
+ for (const id of toArray(ids)) {
6063
+ if (!group.has(id)) continue;
6064
+ if (opened(id)) close(id);
6065
+ else open(id);
6066
+ }
6067
+ }
6068
+ /**
6069
+ * Open node(s) and their immediate non-leaf children.
6070
+ * Useful for expanding a section with its immediate subcategories.
6071
+ */
6072
+ function unfold(ids) {
6073
+ for (const id of toArray(ids)) {
6074
+ if (!group.has(id)) continue;
6075
+ open(id);
6076
+ const childIds = children.get(id) ?? [];
6077
+ for (const childId of childIds) if (!isLeaf(childId)) open(childId);
6078
+ }
6079
+ }
6080
+ /**
6081
+ * Reveal a node by opening all its ancestors.
6082
+ * Makes the node visible in a collapsed tree without opening the node itself.
6083
+ */
6084
+ function reveal(ids) {
6085
+ for (const id of toArray(ids)) {
6086
+ if (!group.has(id)) continue;
6087
+ const ancestorIds = getAncestors(id);
6088
+ if (ancestorIds.length > 0) open(ancestorIds);
6089
+ }
6090
+ }
6091
+ /**
6092
+ * Fully expand a node and all its non-leaf descendants.
6093
+ * Opens the entire subtree rooted at the given node.
6094
+ */
6095
+ function expand(ids) {
6096
+ for (const id of toArray(ids)) {
6097
+ if (!group.has(id)) continue;
6098
+ if (!isLeaf(id)) open(id);
6099
+ for (const descendantId of getDescendants(id)) if (!isLeaf(descendantId)) open(descendantId);
6100
+ }
6101
+ }
6102
+ function expandAll() {
6103
+ for (const id of group.keys()) if (!isLeaf(id)) openedIds.add(id);
6104
+ }
6105
+ function collapseAll() {
6106
+ openedIds.clear();
6107
+ }
6108
+ function getPath(id) {
6109
+ const path = [];
6110
+ let currentId = id;
6111
+ while (!/* @__PURE__ */ isUndefined(currentId)) {
6112
+ path.unshift(currentId);
6113
+ currentId = parents.get(currentId);
6114
+ }
6115
+ return path;
6116
+ }
6117
+ function getAncestors(id) {
6118
+ return getPath(id).slice(0, -1);
6119
+ }
6120
+ function getDescendants(id) {
6121
+ const descendants = [];
6122
+ const queue = [...children.get(id) ?? []];
6123
+ let index = 0;
6124
+ while (index < queue.length) {
6125
+ const currentId = queue[index++];
6126
+ descendants.push(currentId);
6127
+ queue.push(...children.get(currentId) ?? []);
6128
+ }
6129
+ return descendants;
6130
+ }
6131
+ function isLeaf(id) {
6132
+ const childList = children.get(id);
6133
+ return /* @__PURE__ */ isUndefined(childList) || childList.length === 0;
6134
+ }
6135
+ function getDepth(id) {
6136
+ return getAncestors(id).length;
6137
+ }
6138
+ /**
6139
+ * Check if `ancestorId` is an ancestor of `descendantId`.
6140
+ * Returns false if either ID doesn't exist in the tree.
6141
+ */
6142
+ function isAncestorOf(ancestorId, descendantId) {
6143
+ if (!group.has(ancestorId) || !group.has(descendantId)) return false;
6144
+ if (ancestorId === descendantId) return false;
6145
+ let currentId = parents.get(descendantId);
6146
+ while (!/* @__PURE__ */ isUndefined(currentId)) {
6147
+ if (currentId === ancestorId) return true;
6148
+ currentId = parents.get(currentId);
6149
+ }
6150
+ return false;
6151
+ }
6152
+ /**
6153
+ * Check if `id` has `ancestorId` as an ancestor.
6154
+ * Semantic alias for isAncestorOf(ancestorId, id).
6155
+ */
6156
+ function hasAncestor(id, ancestorId) {
6157
+ return isAncestorOf(ancestorId, id);
6158
+ }
6159
+ /**
6160
+ * Get siblings of a node (including self).
6161
+ * For root nodes, returns all root IDs.
6162
+ */
6163
+ function siblings(id) {
6164
+ if (!group.has(id)) return [];
6165
+ const parentId = parents.get(id);
6166
+ if (/* @__PURE__ */ isUndefined(parentId)) return group.values().filter((item) => /* @__PURE__ */ isUndefined(parents.get(item.id))).map((item) => item.id);
6167
+ return children.get(parentId) ?? [];
6168
+ }
6169
+ /**
6170
+ * Get 1-indexed position among siblings (for aria-posinset).
6171
+ * Returns 0 if node not found.
6172
+ */
6173
+ function position(id) {
6174
+ const index = siblings(id).indexOf(id);
6175
+ return index === -1 ? 0 : index + 1;
6176
+ }
6177
+ function updateAncestors(id) {
6178
+ const ancestorIds = getAncestors(id).toReversed();
6179
+ for (const aid of ancestorIds) {
6180
+ const childIds = children.get(aid) ?? [];
6181
+ if (childIds.length === 0) continue;
6182
+ const allSelected = childIds.every((cid) => group.selected(cid));
6183
+ const someSelected = childIds.some((cid) => group.selected(cid) || group.mixed(cid));
6184
+ if (allSelected) {
6185
+ group.unmix(aid);
6186
+ group.select(aid);
6187
+ } else if (someSelected) {
6188
+ group.unselect(aid);
6189
+ group.mix(aid);
6190
+ } else {
6191
+ group.unmix(aid);
6192
+ group.unselect(aid);
6193
+ }
6194
+ }
6195
+ }
6196
+ function getLeafDescendants(id) {
6197
+ return getDescendants(id).filter((did) => isLeaf(did));
6198
+ }
6199
+ function select(ids) {
6200
+ for (const id of toArray(ids)) {
6201
+ if (!group.has(id)) continue;
6202
+ if (selectionMode === "independent") group.select(id);
6203
+ else if (selectionMode === "leaf") if (isLeaf(id)) group.select(id);
6204
+ else for (const lid of getLeafDescendants(id)) group.select(lid);
6205
+ else {
6206
+ group.unmix(id);
6207
+ group.select(id);
6208
+ for (const did of getDescendants(id)) {
6209
+ group.unmix(did);
6210
+ group.select(did);
6211
+ }
6212
+ updateAncestors(id);
6213
+ }
6214
+ }
6215
+ }
6216
+ function unselect(ids) {
6217
+ for (const id of toArray(ids)) {
6218
+ if (!group.has(id)) continue;
6219
+ if (selectionMode === "independent") group.unselect(id);
6220
+ else if (selectionMode === "leaf") if (isLeaf(id)) group.unselect(id);
6221
+ else for (const lid of getLeafDescendants(id)) group.unselect(lid);
6222
+ else {
6223
+ group.unmix(id);
6224
+ group.unselect(id);
6225
+ for (const did of getDescendants(id)) {
6226
+ group.unmix(did);
6227
+ group.unselect(did);
6228
+ }
6229
+ updateAncestors(id);
6230
+ }
6231
+ }
6232
+ }
6233
+ function toggle(ids) {
6234
+ for (const id of toArray(ids)) if (selectionMode === "independent") group.toggle(id);
6235
+ else if (selectionMode === "leaf") if (isLeaf(id)) group.toggle(id);
6236
+ else {
6237
+ const leafIds = getLeafDescendants(id);
6238
+ if (leafIds.every((lid) => group.selected(lid))) for (const lid of leafIds) group.unselect(lid);
6239
+ else for (const lid of leafIds) group.select(lid);
6240
+ }
6241
+ else if (group.selected(id) || group.mixed(id)) unselect(id);
6242
+ else select(id);
6243
+ }
6244
+ /**
6245
+ * Converts the tree to a flat array with parentId references.
6246
+ * Useful for serialization or sending to APIs/AI systems.
6247
+ */
6248
+ function toFlat() {
6249
+ return group.values().map((item) => ({
6250
+ id: item.id,
6251
+ parentId: parents.get(item.id),
6252
+ value: item.value
6253
+ }));
6254
+ }
6255
+ function register(registration = {}) {
6256
+ const id = registration.id ?? /* @__PURE__ */ useId();
6257
+ const parentId = registration.parentId;
6258
+ const nested = registration.children;
6259
+ if (!/* @__PURE__ */ isUndefined(parentId) && !group.has(parentId)) logger$1.warn(`Parent with id "${parentId}" does not exist. Registering "${id}" without parent.`);
6260
+ if (!/* @__PURE__ */ isUndefined(parentId) && group.has(parentId)) {
6261
+ parents.set(id, parentId);
6262
+ const list = children.get(parentId);
6263
+ if (list) list.push(id);
6264
+ else children.set(parentId, [id]);
6265
+ if (openAll) openedIds.add(parentId);
6266
+ } else parents.set(id, void 0);
6267
+ const { children: _, ...rest } = registration;
6268
+ const item = {
6269
+ ...rest,
6270
+ id,
6271
+ parentId: parents.get(id),
6272
+ isOpen: toRef(() => opened(id)),
6273
+ isLeaf: toRef(() => isLeaf(id)),
6274
+ depth: toRef(() => getDepth(id)),
6275
+ open: () => open(id),
6276
+ close: () => close(id),
6277
+ flip: () => flip(id),
6278
+ reveal: () => reveal(id),
6279
+ getPath: () => getPath(id),
6280
+ getAncestors: () => getAncestors(id),
6281
+ getDescendants: () => getDescendants(id),
6282
+ isAncestorOf: (descendantId) => isAncestorOf(id, descendantId),
6283
+ hasAncestor: (ancestorId) => hasAncestor(id, ancestorId),
6284
+ siblings: () => siblings(id),
6285
+ position: () => position(id)
6286
+ };
6287
+ const ticket = group.register(item);
6288
+ if (nested?.length) for (const child of nested) register({
6289
+ ...child,
6290
+ parentId: id
6291
+ });
6292
+ return ticket;
6293
+ }
6294
+ function unregister(id, cascade = false) {
6295
+ if (!group.has(id)) return;
6296
+ const parentId = parents.get(id);
6297
+ if (!/* @__PURE__ */ isUndefined(parentId)) {
6298
+ const siblings$1 = children.get(parentId);
6299
+ if (siblings$1) {
6300
+ const filtered = siblings$1.filter((sid) => sid !== id);
6301
+ if (filtered.length === 0) children.delete(parentId);
6302
+ else children.set(parentId, filtered);
6303
+ }
6304
+ }
6305
+ const list = children.get(id);
6306
+ if (list?.length) if (cascade) for (const did of getDescendants(id)) {
6307
+ parents.delete(did);
6308
+ children.delete(did);
6309
+ openedIds.delete(did);
6310
+ group.unregister(did);
6311
+ }
6312
+ else {
6313
+ for (const did of getDescendants(id)) openedIds.delete(did);
6314
+ for (const cid of list) parents.set(cid, void 0);
6315
+ }
6316
+ parents.delete(id);
6317
+ children.delete(id);
6318
+ openedIds.delete(id);
6319
+ group.unregister(id);
6320
+ }
6321
+ function offboard(ids, cascade = false) {
6322
+ for (const id of ids) unregister(id, cascade);
6323
+ }
6324
+ function onboard(registrations) {
6325
+ return registrations.map((registration) => register(registration));
6326
+ }
6327
+ function clear() {
6328
+ children.clear();
6329
+ parents.clear();
6330
+ openedIds.clear();
6331
+ group.reset();
6332
+ }
6333
+ function reset() {
6334
+ clear();
6335
+ }
6336
+ const context = {
6337
+ ...group,
6338
+ children,
6339
+ parents,
6340
+ openedIds,
6341
+ openedItems,
6342
+ roots,
6343
+ leaves,
6344
+ getPath,
6345
+ getAncestors,
6346
+ getDescendants,
6347
+ isLeaf,
6348
+ getDepth,
6349
+ isAncestorOf,
6350
+ hasAncestor,
6351
+ siblings,
6352
+ position,
6353
+ open,
6354
+ close,
6355
+ flip,
6356
+ opened,
6357
+ unfold,
6358
+ reveal,
6359
+ expand,
6360
+ expandAll,
6361
+ collapseAll,
6362
+ toFlat,
6363
+ openStrategy: resolvedOpenStrategy,
6364
+ select,
6365
+ unselect,
6366
+ toggle,
6367
+ register,
6368
+ unregister,
6369
+ offboard,
6370
+ onboard,
6371
+ clear,
6372
+ reset,
6373
+ get size() {
6374
+ return group.size;
6375
+ }
6376
+ };
6377
+ return context;
6378
+ }
6379
+ /**
6380
+ * Creates a new nested context with provide/inject pattern.
6381
+ *
6382
+ * @param options The options for the nested context.
6383
+ * @returns A trinity tuple [useNested, provideNested, defaultNested]
6384
+ *
6385
+ * @see https://0.vuetifyjs.com/composables/selection/use-nested
6386
+ *
6387
+ * @example
6388
+ * ```ts
6389
+ * import { createNestedContext } from '@vuetify/v0'
6390
+ *
6391
+ * export const [useTree, provideTree, tree] = createNestedContext()
6392
+ *
6393
+ * // In parent: provideTree()
6394
+ * // In child: const tree = useTree()
6395
+ * ```
6396
+ */
6397
+ function createNestedContext(_options = {}) {
6398
+ const { namespace = "v0:nested", ...options } = _options;
6399
+ const [useNestedContext, _provideNestedContext] = createContext(namespace);
6400
+ const context = createNested(options);
6401
+ function provideNestedContext(_context = context, app) {
6402
+ return _provideNestedContext(_context, app);
6403
+ }
6404
+ return createTrinity(useNestedContext, provideNestedContext, context);
6405
+ }
6406
+ /**
6407
+ * Returns the current nested instance from context.
6408
+ *
6409
+ * @param namespace The namespace for the nested context. Defaults to `'v0:nested'`.
6410
+ * @returns The current nested instance.
6411
+ *
6412
+ * @see https://0.vuetifyjs.com/composables/selection/use-nested
6413
+ */
6414
+ function useNested(namespace = "v0:nested") {
6415
+ return useContext(namespace);
6416
+ }
6417
+
6275
6418
  //#endregion
6276
6419
  //#region src/composables/useResizeObserver/index.ts
6277
6420
  /**
@@ -6333,12 +6476,13 @@ function useMutationObserver(target, callback, options = {}) {
6333
6476
  */
6334
6477
  function useResizeObserver(target, callback, options = {}) {
6335
6478
  const { isHydrated } = useHydration();
6479
+ const targetRef = toRef(target);
6336
6480
  const observer = shallowRef();
6337
6481
  const isPaused = shallowRef(false);
6338
6482
  const isActive = toRef(() => !!observer.value);
6339
6483
  function setup() {
6340
6484
  if (/* @__PURE__ */ isNull(observer.value)) return;
6341
- if (!isHydrated.value || !SUPPORTS_OBSERVER || !target.value || isPaused.value) return;
6485
+ if (!isHydrated.value || !SUPPORTS_OBSERVER || !targetRef.value || isPaused.value) return;
6342
6486
  observer.value = new ResizeObserver((entries) => {
6343
6487
  callback(entries.map((entry) => ({
6344
6488
  contentRect: {
@@ -6351,9 +6495,9 @@ function useResizeObserver(target, callback, options = {}) {
6351
6495
  })));
6352
6496
  if (options.once) stop();
6353
6497
  });
6354
- observer.value.observe(target.value, { box: options.box || "content-box" });
6498
+ observer.value.observe(targetRef.value, { box: options.box || "content-box" });
6355
6499
  if (options.immediate) {
6356
- const rect = target.value.getBoundingClientRect();
6500
+ const rect = targetRef.value.getBoundingClientRect();
6357
6501
  callback([{
6358
6502
  contentRect: {
6359
6503
  width: rect.width,
@@ -6361,22 +6505,22 @@ function useResizeObserver(target, callback, options = {}) {
6361
6505
  top: rect.top,
6362
6506
  left: rect.left
6363
6507
  },
6364
- target: target.value
6508
+ target: targetRef.value
6365
6509
  }]);
6366
6510
  }
6367
6511
  }
6368
- watch(() => target.value, (el, oldEl) => {
6369
- if (oldEl) cleanup();
6512
+ watch(() => targetRef.value, (el, oldEl) => {
6513
+ if (oldEl || observer.value) cleanup();
6370
6514
  if (isHydrated.value && el) setup();
6371
6515
  }, { immediate: true });
6372
- if (!isHydrated.value) {
6373
- const stopHydrationWatch = watch(() => isHydrated.value, (hydrated) => {
6374
- if (hydrated && target.value && !observer.value) {
6375
- setup();
6376
- stopHydrationWatch();
6377
- }
6378
- });
6379
- }
6516
+ let stopHydrationWatch;
6517
+ if (!isHydrated.value) stopHydrationWatch = watch(() => isHydrated.value, (hydrated) => {
6518
+ if (hydrated && targetRef.value && !observer.value) {
6519
+ setup();
6520
+ stopHydrationWatch?.();
6521
+ stopHydrationWatch = void 0;
6522
+ }
6523
+ });
6380
6524
  function cleanup() {
6381
6525
  if (observer.value) {
6382
6526
  observer.value.disconnect();
@@ -6392,6 +6536,8 @@ function useResizeObserver(target, callback, options = {}) {
6392
6536
  setup();
6393
6537
  }
6394
6538
  function stop() {
6539
+ stopHydrationWatch?.();
6540
+ stopHydrationWatch = void 0;
6395
6541
  cleanup();
6396
6542
  observer.value = null;
6397
6543
  }
@@ -7128,7 +7274,7 @@ function createQueue(_options = {}) {
7128
7274
  }
7129
7275
  }
7130
7276
  function register(registration = {}) {
7131
- const id = registration.id ?? /* @__PURE__ */ genId();
7277
+ const id = registration.id ?? /* @__PURE__ */ useId();
7132
7278
  const timeout = Object.prototype.hasOwnProperty.call(registration, "timeout") ? registration.timeout : _timeout;
7133
7279
  const ticket = {
7134
7280
  ...registration,
@@ -7385,8 +7531,9 @@ function createStep(_options = {}) {
7385
7531
  * Creates a new step context.
7386
7532
  *
7387
7533
  * @param options The options for the step context.
7388
- * @template Z The type of the step ticket.
7389
- * @template E The type of the step context.
7534
+ * @template Z The input ticket type.
7535
+ * @template E The output ticket type.
7536
+ * @template R The context type.
7390
7537
  * @returns A new step context.
7391
7538
  *
7392
7539
  * @see https://0.vuetifyjs.com/composables/selection/use-step
@@ -7419,6 +7566,9 @@ function createStepContext(_options = {}) {
7419
7566
  * Returns the current step instance.
7420
7567
  *
7421
7568
  * @param namespace The namespace for the step context. Defaults to `'v0:step'`.
7569
+ * @template Z The input ticket type.
7570
+ * @template E The output ticket type.
7571
+ * @template R The context type.
7422
7572
  * @returns The current step instance.
7423
7573
  *
7424
7574
  * @see https://0.vuetifyjs.com/composables/selection/use-step
@@ -8841,7 +8991,7 @@ function useClickOutside(target, handler, options = {}) {
8841
8991
 
8842
8992
  //#endregion
8843
8993
  //#region src/components/Dialog/DialogContent.vue
8844
- const _sfc_main$31 = /* @__PURE__ */ defineComponent({
8994
+ const _sfc_main$35 = /* @__PURE__ */ defineComponent({
8845
8995
  name: "DialogContent",
8846
8996
  __name: "DialogContent",
8847
8997
  props: {
@@ -8907,11 +9057,11 @@ const _sfc_main$31 = /* @__PURE__ */ defineComponent({
8907
9057
  };
8908
9058
  }
8909
9059
  });
8910
- var DialogContent_default = _sfc_main$31;
9060
+ var DialogContent_default = _sfc_main$35;
8911
9061
 
8912
9062
  //#endregion
8913
9063
  //#region src/components/Dialog/DialogDescription.vue
8914
- const _sfc_main$30 = /* @__PURE__ */ defineComponent({
9064
+ const _sfc_main$34 = /* @__PURE__ */ defineComponent({
8915
9065
  name: "DialogDescription",
8916
9066
  __name: "DialogDescription",
8917
9067
  props: {
@@ -8930,11 +9080,11 @@ const _sfc_main$30 = /* @__PURE__ */ defineComponent({
8930
9080
  };
8931
9081
  }
8932
9082
  });
8933
- var DialogDescription_default = _sfc_main$30;
9083
+ var DialogDescription_default = _sfc_main$34;
8934
9084
 
8935
9085
  //#endregion
8936
9086
  //#region src/components/Dialog/DialogTitle.vue
8937
- const _sfc_main$29 = /* @__PURE__ */ defineComponent({
9087
+ const _sfc_main$33 = /* @__PURE__ */ defineComponent({
8938
9088
  name: "DialogTitle",
8939
9089
  __name: "DialogTitle",
8940
9090
  props: {
@@ -8953,11 +9103,11 @@ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
8953
9103
  };
8954
9104
  }
8955
9105
  });
8956
- var DialogTitle_default = _sfc_main$29;
9106
+ var DialogTitle_default = _sfc_main$33;
8957
9107
 
8958
9108
  //#endregion
8959
9109
  //#region src/components/Dialog/DialogActivator.vue
8960
- const _sfc_main$28 = /* @__PURE__ */ defineComponent({
9110
+ const _sfc_main$32 = /* @__PURE__ */ defineComponent({
8961
9111
  name: "DialogActivator",
8962
9112
  __name: "DialogActivator",
8963
9113
  props: {
@@ -8987,7 +9137,7 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
8987
9137
  };
8988
9138
  }
8989
9139
  });
8990
- var DialogActivator_default = _sfc_main$28;
9140
+ var DialogActivator_default = _sfc_main$32;
8991
9141
 
8992
9142
  //#endregion
8993
9143
  //#region src/components/Dialog/index.ts
@@ -9032,7 +9182,7 @@ const Dialog = {
9032
9182
  //#endregion
9033
9183
  //#region src/components/ExpansionPanel/ExpansionPanelRoot.vue
9034
9184
  const [useExpansionPanelRoot, provideExpansionPanelSelection] = createContext();
9035
- const _sfc_main$27 = /* @__PURE__ */ defineComponent({
9185
+ const _sfc_main$31 = /* @__PURE__ */ defineComponent({
9036
9186
  name: "ExpansionPanelRoot",
9037
9187
  __name: "ExpansionPanelRoot",
9038
9188
  props: /* @__PURE__ */ mergeModels({
@@ -9089,12 +9239,12 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
9089
9239
  };
9090
9240
  }
9091
9241
  });
9092
- var ExpansionPanelRoot_default = _sfc_main$27;
9242
+ var ExpansionPanelRoot_default = _sfc_main$31;
9093
9243
 
9094
9244
  //#endregion
9095
9245
  //#region src/components/ExpansionPanel/ExpansionPanelItem.vue
9096
9246
  const [useExpansionPanelItem, provideExpansionPanelItem] = createContext({ suffix: "item" });
9097
- const _sfc_main$26 = /* @__PURE__ */ defineComponent({
9247
+ const _sfc_main$30 = /* @__PURE__ */ defineComponent({
9098
9248
  name: "ExpansionPanelItem",
9099
9249
  __name: "ExpansionPanelItem",
9100
9250
  props: {
@@ -9138,11 +9288,11 @@ const _sfc_main$26 = /* @__PURE__ */ defineComponent({
9138
9288
  };
9139
9289
  }
9140
9290
  });
9141
- var ExpansionPanelItem_default = _sfc_main$26;
9291
+ var ExpansionPanelItem_default = _sfc_main$30;
9142
9292
 
9143
9293
  //#endregion
9144
9294
  //#region src/components/ExpansionPanel/ExpansionPanelActivator.vue
9145
- const _sfc_main$25 = /* @__PURE__ */ defineComponent({
9295
+ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
9146
9296
  name: "ExpansionPanelActivator",
9147
9297
  __name: "ExpansionPanelActivator",
9148
9298
  props: {
@@ -9188,11 +9338,11 @@ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
9188
9338
  };
9189
9339
  }
9190
9340
  });
9191
- var ExpansionPanelActivator_default = _sfc_main$25;
9341
+ var ExpansionPanelActivator_default = _sfc_main$29;
9192
9342
 
9193
9343
  //#endregion
9194
9344
  //#region src/components/ExpansionPanel/ExpansionPanelContent.vue
9195
- const _sfc_main$24 = /* @__PURE__ */ defineComponent({
9345
+ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
9196
9346
  name: "ExpansionPanelContent",
9197
9347
  __name: "ExpansionPanelContent",
9198
9348
  props: {
@@ -9223,11 +9373,11 @@ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
9223
9373
  };
9224
9374
  }
9225
9375
  });
9226
- var ExpansionPanelContent_default = _sfc_main$24;
9376
+ var ExpansionPanelContent_default = _sfc_main$28;
9227
9377
 
9228
9378
  //#endregion
9229
9379
  //#region src/components/ExpansionPanel/ExpansionPanelHeader.vue
9230
- const _sfc_main$23 = /* @__PURE__ */ defineComponent({
9380
+ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
9231
9381
  name: "ExpansionPanelHeader",
9232
9382
  __name: "ExpansionPanelHeader",
9233
9383
  props: {
@@ -9252,7 +9402,7 @@ const _sfc_main$23 = /* @__PURE__ */ defineComponent({
9252
9402
  };
9253
9403
  }
9254
9404
  });
9255
- var ExpansionPanelHeader_default = _sfc_main$23;
9405
+ var ExpansionPanelHeader_default = _sfc_main$27;
9256
9406
 
9257
9407
  //#endregion
9258
9408
  //#region src/components/ExpansionPanel/index.ts
@@ -9272,7 +9422,7 @@ const ExpansionPanel = {
9272
9422
  //#endregion
9273
9423
  //#region src/components/Group/GroupRoot.vue
9274
9424
  const [useGroupRoot, provideGroupRoot] = createContext();
9275
- const _sfc_main$22 = /* @__PURE__ */ defineComponent({
9425
+ const _sfc_main$26 = /* @__PURE__ */ defineComponent({
9276
9426
  name: "GroupRoot",
9277
9427
  __name: "GroupRoot",
9278
9428
  props: /* @__PURE__ */ mergeModels({
@@ -9322,11 +9472,11 @@ const _sfc_main$22 = /* @__PURE__ */ defineComponent({
9322
9472
  };
9323
9473
  }
9324
9474
  });
9325
- var GroupRoot_default = _sfc_main$22;
9475
+ var GroupRoot_default = _sfc_main$26;
9326
9476
 
9327
9477
  //#endregion
9328
9478
  //#region src/components/Group/GroupItem.vue
9329
- const _sfc_main$21 = /* @__PURE__ */ defineComponent({
9479
+ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
9330
9480
  name: "GroupItem",
9331
9481
  __name: "GroupItem",
9332
9482
  props: {
@@ -9375,7 +9525,7 @@ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
9375
9525
  };
9376
9526
  }
9377
9527
  });
9378
- var GroupItem_default = _sfc_main$21;
9528
+ var GroupItem_default = _sfc_main$25;
9379
9529
 
9380
9530
  //#endregion
9381
9531
  //#region src/components/Group/index.ts
@@ -9394,7 +9544,7 @@ const Group = {
9394
9544
  const [usePaginationRoot, providePaginationRoot] = createContext();
9395
9545
  const [usePaginationControls, providePaginationControls] = createContext({ suffix: "controls" });
9396
9546
  const [usePaginationItems, providePaginationItems] = createContext({ suffix: "items" });
9397
- const _sfc_main$20 = /* @__PURE__ */ defineComponent({
9547
+ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
9398
9548
  name: "PaginationRoot",
9399
9549
  __name: "PaginationRoot",
9400
9550
  props: /* @__PURE__ */ mergeModels({
@@ -9494,17 +9644,17 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
9494
9644
  };
9495
9645
  }
9496
9646
  });
9497
- var PaginationRoot_default = _sfc_main$20;
9647
+ var PaginationRoot_default = _sfc_main$24;
9498
9648
 
9499
9649
  //#endregion
9500
9650
  //#region src/components/Pagination/PaginationEllipsis.vue
9501
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
9651
+ const _sfc_main$23 = /* @__PURE__ */ defineComponent({
9502
9652
  name: "PaginationEllipsis",
9503
9653
  __name: "PaginationEllipsis",
9504
9654
  props: {
9505
9655
  namespace: { default: "v0:pagination" },
9506
9656
  ellipsis: {},
9507
- id: { default: () => /* @__PURE__ */ genId() },
9657
+ id: { default: () => useId$1() },
9508
9658
  as: { default: "span" },
9509
9659
  renderless: { type: Boolean }
9510
9660
  },
@@ -9539,17 +9689,17 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
9539
9689
  };
9540
9690
  }
9541
9691
  });
9542
- var PaginationEllipsis_default = _sfc_main$19;
9692
+ var PaginationEllipsis_default = _sfc_main$23;
9543
9693
 
9544
9694
  //#endregion
9545
9695
  //#region src/components/Pagination/PaginationFirst.vue
9546
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
9696
+ const _sfc_main$22 = /* @__PURE__ */ defineComponent({
9547
9697
  name: "PaginationFirst",
9548
9698
  __name: "PaginationFirst",
9549
9699
  props: {
9550
9700
  namespace: { default: "v0:pagination" },
9551
9701
  disabled: { type: Boolean },
9552
- id: { default: () => /* @__PURE__ */ genId() },
9702
+ id: { default: () => useId$1() },
9553
9703
  as: { default: "button" },
9554
9704
  renderless: { type: Boolean }
9555
9705
  },
@@ -9598,11 +9748,11 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
9598
9748
  };
9599
9749
  }
9600
9750
  });
9601
- var PaginationFirst_default = _sfc_main$18;
9751
+ var PaginationFirst_default = _sfc_main$22;
9602
9752
 
9603
9753
  //#endregion
9604
9754
  //#region src/components/Pagination/PaginationItem.vue
9605
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
9755
+ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
9606
9756
  name: "PaginationItem",
9607
9757
  __name: "PaginationItem",
9608
9758
  props: {
@@ -9612,7 +9762,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
9612
9762
  type: Boolean,
9613
9763
  default: false
9614
9764
  },
9615
- id: { default: () => /* @__PURE__ */ genId() },
9765
+ id: { default: () => useId$1() },
9616
9766
  as: { default: "button" },
9617
9767
  renderless: { type: Boolean }
9618
9768
  },
@@ -9668,17 +9818,17 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
9668
9818
  };
9669
9819
  }
9670
9820
  });
9671
- var PaginationItem_default = _sfc_main$17;
9821
+ var PaginationItem_default = _sfc_main$21;
9672
9822
 
9673
9823
  //#endregion
9674
9824
  //#region src/components/Pagination/PaginationLast.vue
9675
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
9825
+ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
9676
9826
  name: "PaginationLast",
9677
9827
  __name: "PaginationLast",
9678
9828
  props: {
9679
9829
  namespace: { default: "v0:pagination" },
9680
9830
  disabled: { type: Boolean },
9681
- id: { default: () => /* @__PURE__ */ genId() },
9831
+ id: { default: () => useId$1() },
9682
9832
  as: { default: "button" },
9683
9833
  renderless: { type: Boolean }
9684
9834
  },
@@ -9727,17 +9877,17 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
9727
9877
  };
9728
9878
  }
9729
9879
  });
9730
- var PaginationLast_default = _sfc_main$16;
9880
+ var PaginationLast_default = _sfc_main$20;
9731
9881
 
9732
9882
  //#endregion
9733
9883
  //#region src/components/Pagination/PaginationNext.vue
9734
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
9884
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
9735
9885
  name: "PaginationNext",
9736
9886
  __name: "PaginationNext",
9737
9887
  props: {
9738
9888
  namespace: { default: "v0:pagination" },
9739
9889
  disabled: { type: Boolean },
9740
- id: { default: () => /* @__PURE__ */ genId() },
9890
+ id: { default: () => useId$1() },
9741
9891
  as: { default: "button" },
9742
9892
  renderless: { type: Boolean }
9743
9893
  },
@@ -9786,17 +9936,17 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
9786
9936
  };
9787
9937
  }
9788
9938
  });
9789
- var PaginationNext_default = _sfc_main$15;
9939
+ var PaginationNext_default = _sfc_main$19;
9790
9940
 
9791
9941
  //#endregion
9792
9942
  //#region src/components/Pagination/PaginationPrev.vue
9793
- const _sfc_main$14 = /* @__PURE__ */ defineComponent({
9943
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
9794
9944
  name: "PaginationPrev",
9795
9945
  __name: "PaginationPrev",
9796
9946
  props: {
9797
9947
  namespace: { default: "v0:pagination" },
9798
9948
  disabled: { type: Boolean },
9799
- id: { default: () => /* @__PURE__ */ genId() },
9949
+ id: { default: () => useId$1() },
9800
9950
  as: { default: "button" },
9801
9951
  renderless: { type: Boolean }
9802
9952
  },
@@ -9845,11 +9995,11 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
9845
9995
  };
9846
9996
  }
9847
9997
  });
9848
- var PaginationPrev_default = _sfc_main$14;
9998
+ var PaginationPrev_default = _sfc_main$18;
9849
9999
 
9850
10000
  //#endregion
9851
10001
  //#region src/components/Pagination/PaginationStatus.vue
9852
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
10002
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
9853
10003
  name: "PaginationStatus",
9854
10004
  __name: "PaginationStatus",
9855
10005
  props: {
@@ -9893,7 +10043,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
9893
10043
  };
9894
10044
  }
9895
10045
  });
9896
- var PaginationStatus_default = _sfc_main$13;
10046
+ var PaginationStatus_default = _sfc_main$17;
9897
10047
 
9898
10048
  //#endregion
9899
10049
  //#region src/components/Pagination/index.ts
@@ -9916,7 +10066,7 @@ const Pagination = {
9916
10066
  //#endregion
9917
10067
  //#region src/components/Popover/PopoverRoot.vue
9918
10068
  const [usePopoverContext, providePopoverContext] = createContext("Popover");
9919
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
10069
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
9920
10070
  name: "PopoverRoot",
9921
10071
  __name: "PopoverRoot",
9922
10072
  props: /* @__PURE__ */ mergeModels({
@@ -9932,19 +10082,18 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9932
10082
  }),
9933
10083
  emits: ["update:modelValue"],
9934
10084
  setup(__props) {
9935
- const props = createPropsRestProxy(__props, ["as"]);
9936
10085
  const isSelected = useModel(__props, "modelValue");
9937
- const id = toRef(() => props.id ?? useId());
10086
+ const id = __props.id ?? useId$1();
9938
10087
  function toggle() {
9939
10088
  isSelected.value = !isSelected.value;
9940
10089
  }
9941
10090
  providePopoverContext({
9942
10091
  isSelected,
9943
10092
  toggle,
9944
- id: toValue(id)
10093
+ id
9945
10094
  });
9946
10095
  const slotProps = toRef(() => ({
9947
- id: toValue(id),
10096
+ id,
9948
10097
  isSelected: isSelected.value,
9949
10098
  toggle
9950
10099
  }));
@@ -9959,11 +10108,11 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9959
10108
  };
9960
10109
  }
9961
10110
  });
9962
- var PopoverRoot_default = _sfc_main$12;
10111
+ var PopoverRoot_default = _sfc_main$16;
9963
10112
 
9964
10113
  //#endregion
9965
10114
  //#region src/components/Popover/PopoverActivator.vue
9966
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
10115
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
9967
10116
  name: "PopoverActivator",
9968
10117
  __name: "PopoverActivator",
9969
10118
  props: {
@@ -9995,11 +10144,11 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
9995
10144
  };
9996
10145
  }
9997
10146
  });
9998
- var PopoverActivator_default = _sfc_main$11;
10147
+ var PopoverActivator_default = _sfc_main$15;
9999
10148
 
10000
10149
  //#endregion
10001
10150
  //#region src/components/Popover/PopoverContent.vue
10002
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
10151
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
10003
10152
  name: "PopoverContent",
10004
10153
  __name: "PopoverContent",
10005
10154
  props: {
@@ -10030,11 +10179,13 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
10030
10179
  });
10031
10180
  watch(context.isSelected, (isOpen) => {
10032
10181
  const element = ref$1.value?.element;
10033
- if (!element || isOpen === element.matches?.(":popover-open")) return;
10182
+ if (!element?.isConnected) return;
10183
+ if (isOpen === element.matches?.(":popover-open")) return;
10034
10184
  if (isOpen) element.showPopover?.();
10035
10185
  else element.hidePopover?.();
10036
10186
  });
10037
10187
  function onToggle(e) {
10188
+ if (!ref$1.value?.element?.isConnected) return;
10038
10189
  context.isSelected.value = e.newState === "open";
10039
10190
  }
10040
10191
  /* v8 ignore stop */
@@ -10063,7 +10214,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
10063
10214
  };
10064
10215
  }
10065
10216
  });
10066
- var PopoverContent_default = _sfc_main$10;
10217
+ var PopoverContent_default = _sfc_main$14;
10067
10218
 
10068
10219
  //#endregion
10069
10220
  //#region src/components/Popover/index.ts
@@ -10081,7 +10232,7 @@ const Popover = {
10081
10232
  //#endregion
10082
10233
  //#region src/components/Radio/RadioGroup.vue
10083
10234
  const [useRadioGroup, provideRadioGroup] = createContext();
10084
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
10235
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
10085
10236
  name: "RadioGroup",
10086
10237
  __name: "RadioGroup",
10087
10238
  props: /* @__PURE__ */ mergeModels({
@@ -10099,6 +10250,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
10099
10250
  ariaDescribedby: {},
10100
10251
  ariaRequired: { type: Boolean },
10101
10252
  name: {},
10253
+ activation: { default: "automatic" },
10102
10254
  as: { default: "div" },
10103
10255
  renderless: { type: Boolean }
10104
10256
  }, {
@@ -10116,11 +10268,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
10116
10268
  useProxyModel(single, model, { multiple: false });
10117
10269
  provideRadioGroup(__props.namespace, {
10118
10270
  ...single,
10119
- name: __props.name
10271
+ name: __props.name,
10272
+ activation: toRef(() => __props.activation)
10120
10273
  });
10121
10274
  const slotProps = toRef(() => ({
10122
10275
  isDisabled: toValue(single.disabled),
10123
10276
  isNoneSelected: single.selectedIds.size === 0,
10277
+ activation: __props.activation,
10124
10278
  attrs: {
10125
10279
  "role": "radiogroup",
10126
10280
  "aria-label": __props.label || void 0,
@@ -10140,17 +10294,17 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
10140
10294
  };
10141
10295
  }
10142
10296
  });
10143
- var RadioGroup_default = _sfc_main$9;
10297
+ var RadioGroup_default = _sfc_main$13;
10144
10298
 
10145
10299
  //#endregion
10146
10300
  //#region src/components/Radio/RadioRoot.vue
10147
10301
  const [useRadioRoot, provideRadioRoot] = createContext();
10148
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
10302
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
10149
10303
  name: "RadioRoot",
10150
10304
  inheritAttrs: false,
10151
10305
  __name: "RadioRoot",
10152
10306
  props: {
10153
- id: { default: () => /* @__PURE__ */ genId() },
10307
+ id: { default: () => useId$1() },
10154
10308
  label: {},
10155
10309
  value: {},
10156
10310
  name: {},
@@ -10195,7 +10349,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
10195
10349
  select();
10196
10350
  }
10197
10351
  function onKeydown(e) {
10198
- if (e.key === " ") {
10352
+ if (e.key === " " || e.key === "Enter") {
10199
10353
  e.preventDefault();
10200
10354
  select();
10201
10355
  return;
@@ -10215,7 +10369,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
10215
10369
  else nextIndex = currentIndex === items.length - 1 ? 0 : currentIndex + 1;
10216
10370
  const nextItem = items[nextIndex];
10217
10371
  if (!nextItem) return;
10218
- nextItem.select();
10372
+ if (group.activation.value === "automatic") nextItem.select();
10219
10373
  toValue(nextItem.el)?.focus();
10220
10374
  }
10221
10375
  onUnmounted(() => {
@@ -10270,7 +10424,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
10270
10424
  };
10271
10425
  }
10272
10426
  });
10273
- var RadioRoot_default = _sfc_main$8;
10427
+ var RadioRoot_default = _sfc_main$12;
10274
10428
 
10275
10429
  //#endregion
10276
10430
  //#region src/components/Radio/RadioHiddenInput.vue
@@ -10292,7 +10446,7 @@ const visuallyHiddenStyle = {
10292
10446
  whiteSpace: "nowrap",
10293
10447
  border: "0"
10294
10448
  };
10295
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
10449
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
10296
10450
  name: "RadioHiddenInput",
10297
10451
  __name: "RadioHiddenInput",
10298
10452
  props: {
@@ -10327,11 +10481,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
10327
10481
  };
10328
10482
  }
10329
10483
  });
10330
- var RadioHiddenInput_default = _sfc_main$7;
10484
+ var RadioHiddenInput_default = _sfc_main$11;
10331
10485
 
10332
10486
  //#endregion
10333
10487
  //#region src/components/Radio/RadioIndicator.vue
10334
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10488
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
10335
10489
  name: "RadioIndicator",
10336
10490
  __name: "RadioIndicator",
10337
10491
  props: {
@@ -10361,7 +10515,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10361
10515
  };
10362
10516
  }
10363
10517
  });
10364
- var RadioIndicator_default = _sfc_main$6;
10518
+ var RadioIndicator_default = _sfc_main$10;
10365
10519
 
10366
10520
  //#endregion
10367
10521
  //#region src/components/Radio/index.ts
@@ -10407,7 +10561,7 @@ const Radio = {
10407
10561
  //#endregion
10408
10562
  //#region src/components/Selection/SelectionRoot.vue
10409
10563
  const [useSelectionRoot, provideSelectionRoot] = createContext();
10410
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
10564
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
10411
10565
  name: "SelectionRoot",
10412
10566
  __name: "SelectionRoot",
10413
10567
  props: /* @__PURE__ */ mergeModels({
@@ -10457,11 +10611,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
10457
10611
  };
10458
10612
  }
10459
10613
  });
10460
- var SelectionRoot_default = _sfc_main$5;
10614
+ var SelectionRoot_default = _sfc_main$9;
10461
10615
 
10462
10616
  //#endregion
10463
10617
  //#region src/components/Selection/SelectionItem.vue
10464
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
10618
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
10465
10619
  name: "SelectionItem",
10466
10620
  __name: "SelectionItem",
10467
10621
  props: {
@@ -10503,7 +10657,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
10503
10657
  };
10504
10658
  }
10505
10659
  });
10506
- var SelectionItem_default = _sfc_main$4;
10660
+ var SelectionItem_default = _sfc_main$8;
10507
10661
 
10508
10662
  //#endregion
10509
10663
  //#region src/components/Selection/index.ts
@@ -10520,7 +10674,7 @@ const Selection = {
10520
10674
  //#endregion
10521
10675
  //#region src/components/Single/SingleRoot.vue
10522
10676
  const [useSingleRoot, provideSingleRoot] = createContext();
10523
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
10677
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
10524
10678
  name: "SingleRoot",
10525
10679
  __name: "SingleRoot",
10526
10680
  props: /* @__PURE__ */ mergeModels({
@@ -10564,11 +10718,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
10564
10718
  };
10565
10719
  }
10566
10720
  });
10567
- var SingleRoot_default = _sfc_main$3;
10721
+ var SingleRoot_default = _sfc_main$7;
10568
10722
 
10569
10723
  //#endregion
10570
10724
  //#region src/components/Single/SingleItem.vue
10571
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10725
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10572
10726
  name: "SingleItem",
10573
10727
  __name: "SingleItem",
10574
10728
  props: {
@@ -10610,7 +10764,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10610
10764
  };
10611
10765
  }
10612
10766
  });
10613
- var SingleItem_default = _sfc_main$2;
10767
+ var SingleItem_default = _sfc_main$6;
10614
10768
 
10615
10769
  //#endregion
10616
10770
  //#region src/components/Single/index.ts
@@ -10627,7 +10781,7 @@ const Single = {
10627
10781
  //#endregion
10628
10782
  //#region src/components/Step/StepRoot.vue
10629
10783
  const [useStepRoot, provideStepRoot] = createContext();
10630
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10784
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
10631
10785
  name: "StepRoot",
10632
10786
  __name: "StepRoot",
10633
10787
  props: /* @__PURE__ */ mergeModels({
@@ -10676,11 +10830,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10676
10830
  };
10677
10831
  }
10678
10832
  });
10679
- var StepRoot_default = _sfc_main$1;
10833
+ var StepRoot_default = _sfc_main$5;
10680
10834
 
10681
10835
  //#endregion
10682
10836
  //#region src/components/Step/StepItem.vue
10683
- const _sfc_main = /* @__PURE__ */ defineComponent({
10837
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
10684
10838
  name: "StepItem",
10685
10839
  __name: "StepItem",
10686
10840
  props: {
@@ -10722,7 +10876,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10722
10876
  };
10723
10877
  }
10724
10878
  });
10725
- var StepItem_default = _sfc_main;
10879
+ var StepItem_default = _sfc_main$4;
10726
10880
 
10727
10881
  //#endregion
10728
10882
  //#region src/components/Step/index.ts
@@ -10737,4 +10891,326 @@ const Step = {
10737
10891
  };
10738
10892
 
10739
10893
  //#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 };
10894
+ //#region src/components/Tabs/TabsRoot.vue
10895
+ const [useTabsRoot, provideTabsRoot] = createContext();
10896
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
10897
+ name: "TabsRoot",
10898
+ __name: "TabsRoot",
10899
+ props: /* @__PURE__ */ mergeModels({
10900
+ namespace: { default: "v0:tabs" },
10901
+ disabled: {
10902
+ type: Boolean,
10903
+ default: false
10904
+ },
10905
+ enroll: {
10906
+ type: Boolean,
10907
+ default: false
10908
+ },
10909
+ mandatory: {
10910
+ type: [Boolean, String],
10911
+ default: "force"
10912
+ },
10913
+ circular: {
10914
+ type: Boolean,
10915
+ default: true
10916
+ },
10917
+ orientation: { default: "horizontal" },
10918
+ activation: { default: "automatic" }
10919
+ }, {
10920
+ "modelValue": {},
10921
+ "modelModifiers": {}
10922
+ }),
10923
+ emits: /* @__PURE__ */ mergeModels(["update:model-value"], ["update:modelValue"]),
10924
+ setup(__props) {
10925
+ const model = useModel(__props, "modelValue");
10926
+ const rootId = useId$1();
10927
+ const step = createStep({
10928
+ disabled: toRef(() => __props.disabled),
10929
+ enroll: __props.enroll,
10930
+ mandatory: __props.mandatory,
10931
+ circular: __props.circular,
10932
+ events: true
10933
+ });
10934
+ useProxyModel(step, model, { multiple: false });
10935
+ const context = {
10936
+ ...step,
10937
+ orientation: toRef(() => __props.orientation),
10938
+ activation: toRef(() => __props.activation),
10939
+ circular: toRef(() => __props.circular),
10940
+ rootId
10941
+ };
10942
+ provideTabsRoot(__props.namespace, context);
10943
+ const slotProps = toRef(() => ({
10944
+ isDisabled: toValue(step.disabled),
10945
+ orientation: __props.orientation,
10946
+ activation: __props.activation,
10947
+ first: step.first,
10948
+ last: step.last,
10949
+ next: step.next,
10950
+ prev: step.prev,
10951
+ step: step.step,
10952
+ select: step.select,
10953
+ unselect: step.unselect,
10954
+ toggle: step.toggle,
10955
+ attrs: { "aria-multiselectable": false }
10956
+ }));
10957
+ return (_ctx, _cache) => {
10958
+ return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)));
10959
+ };
10960
+ }
10961
+ });
10962
+ var TabsRoot_default = _sfc_main$3;
10963
+
10964
+ //#endregion
10965
+ //#region src/components/Tabs/TabsList.vue
10966
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10967
+ name: "TabsList",
10968
+ inheritAttrs: false,
10969
+ __name: "TabsList",
10970
+ props: {
10971
+ label: {},
10972
+ namespace: { default: "v0:tabs" },
10973
+ as: { default: "div" },
10974
+ renderless: { type: Boolean }
10975
+ },
10976
+ setup(__props) {
10977
+ const attrs = useAttrs();
10978
+ const tabs = useTabsRoot(__props.namespace);
10979
+ const isDisabled = toRef(() => toValue(tabs.disabled));
10980
+ const slotProps = toRef(() => ({
10981
+ orientation: tabs.orientation.value,
10982
+ isDisabled: isDisabled.value,
10983
+ attrs: {
10984
+ "role": "tablist",
10985
+ "aria-orientation": tabs.orientation.value,
10986
+ "aria-label": __props.label,
10987
+ "aria-disabled": isDisabled.value || void 0,
10988
+ "data-disabled": isDisabled.value || void 0
10989
+ }
10990
+ }));
10991
+ return (_ctx, _cache) => {
10992
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
10993
+ ...unref(attrs),
10994
+ ...slotProps.value.attrs
10995
+ }, {
10996
+ as: __props.as,
10997
+ renderless: __props.renderless
10998
+ }), {
10999
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
11000
+ _: 3
11001
+ }, 16, ["as", "renderless"]);
11002
+ };
11003
+ }
11004
+ });
11005
+ var TabsList_default = _sfc_main$2;
11006
+
11007
+ //#endregion
11008
+ //#region src/components/Tabs/TabsItem.vue
11009
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
11010
+ name: "TabsItem",
11011
+ inheritAttrs: false,
11012
+ __name: "TabsItem",
11013
+ props: {
11014
+ id: {},
11015
+ value: {},
11016
+ disabled: {},
11017
+ namespace: { default: "v0:tabs" },
11018
+ ariaLabel: {},
11019
+ ariaLabelledby: {},
11020
+ ariaDescribedby: {},
11021
+ as: { default: "button" },
11022
+ renderless: { type: Boolean }
11023
+ },
11024
+ setup(__props) {
11025
+ const attrs = useAttrs();
11026
+ const rootRef = useTemplateRef("root");
11027
+ const tabs = useTabsRoot(__props.namespace);
11028
+ const el = toRef(() => rootRef.value?.element ?? void 0);
11029
+ const ticket = tabs.register({
11030
+ id: __props.id,
11031
+ value: __props.value,
11032
+ disabled: __props.disabled,
11033
+ el
11034
+ });
11035
+ const isDisabled = toRef(() => toValue(ticket.disabled) || toValue(tabs.disabled));
11036
+ const tabId = toRef(() => `${tabs.rootId}-tab-${ticket.id}`);
11037
+ const panelId = toRef(() => `${tabs.rootId}-panel-${ticket.id}`);
11038
+ onUnmounted(() => {
11039
+ tabs.unregister(ticket.id);
11040
+ });
11041
+ function focusSelectedTab() {
11042
+ nextTick(() => {
11043
+ const selected = tabs.selectedItem.value;
11044
+ if (selected) toValue(selected.el)?.focus();
11045
+ });
11046
+ }
11047
+ function onKeydown(e) {
11048
+ const isHorizontal = tabs.orientation.value === "horizontal";
11049
+ if (isHorizontal && e.key === "ArrowRight" || !isHorizontal && e.key === "ArrowDown") {
11050
+ e.preventDefault();
11051
+ tabs.next();
11052
+ focusSelectedTab();
11053
+ return;
11054
+ }
11055
+ if (isHorizontal && e.key === "ArrowLeft" || !isHorizontal && e.key === "ArrowUp") {
11056
+ e.preventDefault();
11057
+ tabs.prev();
11058
+ focusSelectedTab();
11059
+ return;
11060
+ }
11061
+ if (e.key === "Home") {
11062
+ e.preventDefault();
11063
+ tabs.first();
11064
+ focusSelectedTab();
11065
+ return;
11066
+ }
11067
+ if (e.key === "End") {
11068
+ e.preventDefault();
11069
+ tabs.last();
11070
+ focusSelectedTab();
11071
+ return;
11072
+ }
11073
+ if (tabs.activation.value === "manual" && (e.key === "Enter" || e.key === " ")) {
11074
+ e.preventDefault();
11075
+ ticket.select();
11076
+ }
11077
+ }
11078
+ function onClick() {
11079
+ if (!isDisabled.value) ticket.select();
11080
+ }
11081
+ function onFocus() {
11082
+ if (tabs.activation.value === "automatic" && !isDisabled.value) ticket.select();
11083
+ }
11084
+ const slotProps = toRef(() => ({
11085
+ id: String(ticket.id),
11086
+ isSelected: toValue(ticket.isSelected),
11087
+ isDisabled: toValue(isDisabled),
11088
+ select: ticket.select,
11089
+ attrs: {
11090
+ "id": tabId.value,
11091
+ "role": "tab",
11092
+ "tabindex": toValue(ticket.isSelected) ? 0 : -1,
11093
+ "aria-selected": toValue(ticket.isSelected),
11094
+ "aria-controls": panelId.value,
11095
+ "aria-disabled": toValue(isDisabled) || void 0,
11096
+ "aria-label": __props.ariaLabel,
11097
+ "aria-labelledby": __props.ariaLabelledby,
11098
+ "aria-describedby": __props.ariaDescribedby,
11099
+ "data-selected": toValue(ticket.isSelected) || void 0,
11100
+ "data-disabled": toValue(isDisabled) || void 0,
11101
+ "disabled": __props.as === "button" ? toValue(isDisabled) : void 0,
11102
+ "type": __props.as === "button" ? "button" : void 0,
11103
+ "onClick": onClick,
11104
+ "onKeydown": onKeydown,
11105
+ "onFocus": onFocus
11106
+ }
11107
+ }));
11108
+ return (_ctx, _cache) => {
11109
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({ ref: "root" }, {
11110
+ ...unref(attrs),
11111
+ ...slotProps.value.attrs
11112
+ }, {
11113
+ as: __props.as,
11114
+ renderless: __props.renderless
11115
+ }), {
11116
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
11117
+ _: 3
11118
+ }, 16, ["as", "renderless"]);
11119
+ };
11120
+ }
11121
+ });
11122
+ var TabsItem_default = _sfc_main$1;
11123
+
11124
+ //#endregion
11125
+ //#region src/components/Tabs/TabsPanel.vue
11126
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11127
+ name: "TabsPanel",
11128
+ inheritAttrs: false,
11129
+ __name: "TabsPanel",
11130
+ props: {
11131
+ value: {},
11132
+ namespace: { default: "v0:tabs" },
11133
+ as: { default: "div" },
11134
+ renderless: { type: Boolean }
11135
+ },
11136
+ setup(__props) {
11137
+ const attrs = useAttrs();
11138
+ const tabs = useTabsRoot(__props.namespace);
11139
+ const ticket = toRef(() => {
11140
+ const ids = tabs.browse(__props.value);
11141
+ if (ids && ids.length > 0) return tabs.get(ids[0]) ?? null;
11142
+ return null;
11143
+ });
11144
+ const isSelected = toRef(() => {
11145
+ const t = ticket.value;
11146
+ return t ? toValue(t.isSelected) : false;
11147
+ });
11148
+ const ticketId = toRef(() => ticket.value?.id ?? __props.value);
11149
+ const panelId = toRef(() => `${tabs.rootId}-panel-${ticketId.value}`);
11150
+ const tabId = toRef(() => `${tabs.rootId}-tab-${ticketId.value}`);
11151
+ const slotProps = toRef(() => ({
11152
+ isSelected: isSelected.value,
11153
+ attrs: {
11154
+ "id": panelId.value,
11155
+ "role": "tabpanel",
11156
+ "aria-labelledby": tabId.value,
11157
+ "tabindex": isSelected.value ? 0 : -1,
11158
+ "hidden": !isSelected.value,
11159
+ "data-selected": isSelected.value || void 0
11160
+ }
11161
+ }));
11162
+ return (_ctx, _cache) => {
11163
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
11164
+ ...unref(attrs),
11165
+ ...slotProps.value.attrs
11166
+ }, {
11167
+ as: __props.as,
11168
+ renderless: __props.renderless
11169
+ }), {
11170
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
11171
+ _: 3
11172
+ }, 16, ["as", "renderless"]);
11173
+ };
11174
+ }
11175
+ });
11176
+ var TabsPanel_default = _sfc_main;
11177
+
11178
+ //#endregion
11179
+ //#region src/components/Tabs/index.ts
11180
+ /**
11181
+ * Tabs component with sub-components for building accessible tab interfaces.
11182
+ *
11183
+ * @see https://0.vuetifyjs.com/components/tabs
11184
+ *
11185
+ * @example
11186
+ * ```vue
11187
+ * <script lang="ts" setup>
11188
+ * import { Tabs } from '@vuetify/v0'
11189
+ *
11190
+ * const selected = ref('profile')
11191
+ * <\/script>
11192
+ *
11193
+ * <template>
11194
+ * <Tabs.Root v-model="selected">
11195
+ * <Tabs.List label="Account settings">
11196
+ * <Tabs.Item value="profile">Profile</Tabs.Item>
11197
+ * <Tabs.Item value="password">Password</Tabs.Item>
11198
+ * <Tabs.Item value="billing" disabled>Billing</Tabs.Item>
11199
+ * </Tabs.List>
11200
+ *
11201
+ * <Tabs.Panel value="profile">Profile content</Tabs.Panel>
11202
+ * <Tabs.Panel value="password">Password content</Tabs.Panel>
11203
+ * <Tabs.Panel value="billing">Billing content</Tabs.Panel>
11204
+ * </Tabs.Root>
11205
+ * </template>
11206
+ * ```
11207
+ */
11208
+ const Tabs = {
11209
+ Root: TabsRoot_default,
11210
+ List: TabsList_default,
11211
+ Item: TabsItem_default,
11212
+ Panel: TabsPanel_default
11213
+ };
11214
+
11215
+ //#endregion
11216
+ 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, FeaturesAdapter, FlagsmithFeatureAdapter, Group, GroupItem_default as GroupItem, GroupRoot_default as GroupRoot, IN_BROWSER, LaunchDarklyFeatureAdapter, 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, PostHogFeatureAdapter, 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 };