@vuetify/v0 1.0.0-rc.7 → 1.0.0-rc.8

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 (86) hide show
  1. package/dist/{adapter-CMdKyFLz.d.mts → adapter-CVNRHfrz.d.mts} +1 -1
  2. package/dist/browser/index.d.ts +33 -33
  3. package/dist/browser/index.js +164 -108
  4. package/dist/components/index.d.mts +1 -1
  5. package/dist/components/index.mjs +1 -1
  6. package/dist/{components-D87gpuRI.mjs → components-Cl9fclA1.mjs} +17 -20
  7. package/dist/composables/index.d.mts +6 -6
  8. package/dist/composables/index.mjs +21 -21
  9. package/dist/{composables-DAc4DbYb.mjs → composables-CU2JD9oM.mjs} +13 -11
  10. package/dist/constants/index.mjs +1 -1
  11. package/dist/{createDataTable-C86TFzxJ.mjs → createDataTable-BaYtcmAO.mjs} +3 -3
  12. package/dist/{createGroup-DKVmhWJZ.mjs → createGroup-5UjYS6_G.mjs} +1 -1
  13. package/dist/{createRegistry-DaRYxox5.mjs → createRegistry-C_M475FE.mjs} +23 -13
  14. package/dist/{createSelection-CZFfJnBv.mjs → createSelection-BokWvmnd.mjs} +27 -13
  15. package/dist/{createSingle-D08Et-36.mjs → createSingle-DTqmo-GH.mjs} +1 -1
  16. package/dist/{createTokens-BY_7TedA.mjs → createTokens-q-A6Ywox.mjs} +7 -7
  17. package/dist/data-table/index.d.mts +1 -1
  18. package/dist/data-table/index.mjs +1 -1
  19. package/dist/date/index.mjs +1 -1
  20. package/dist/features/adapters/posthog/index.mjs +1 -1
  21. package/dist/features/index.d.mts +1 -1
  22. package/dist/features/index.mjs +1 -1
  23. package/dist/{globals-Djy_aCgG.mjs → globals-C0tKiM_M.mjs} +1 -1
  24. package/dist/{index-B5ybQyJO.d.mts → index-BwNRi6BK.d.mts} +9 -7
  25. package/dist/{index-CIf2yTGR.d.mts → index-CrFFilCd.d.mts} +2 -2
  26. package/dist/{index-CfSenWTN.d.mts → index-DCtHbY0a.d.mts} +1 -1
  27. package/dist/{index-CUdlfMMw.d.mts → index-DOjheBVl.d.mts} +103 -106
  28. package/dist/{index-DTYOP7ci.d.mts → index-RGiSdjYt.d.mts} +8 -7
  29. package/dist/index.d.mts +7 -7
  30. package/dist/index.mjs +23 -23
  31. package/dist/json/web-types.json +1 -1
  32. package/dist/locale/adapters/index.d.mts +2 -2
  33. package/dist/locale/adapters/index.mjs +1 -1
  34. package/dist/locale/adapters/v0/index.d.mts +1 -1
  35. package/dist/locale/adapters/v0/index.mjs +1 -1
  36. package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
  37. package/dist/locale/index.d.mts +3 -3
  38. package/dist/locale/index.mjs +2 -2
  39. package/dist/locale/messages/en/index.d.mts +3 -0
  40. package/dist/locale/messages/en/index.mjs +1 -0
  41. package/dist/logger/adapters/index.mjs +1 -1
  42. package/dist/logger/adapters/v0/index.mjs +1 -1
  43. package/dist/logger/index.d.mts +1 -1
  44. package/dist/logger/index.mjs +2 -2
  45. package/dist/notifications/index.d.mts +1 -1
  46. package/dist/notifications/index.mjs +2 -2
  47. package/dist/palettes/ant/index.d.mts +1 -1
  48. package/dist/palettes/index.d.mts +2 -2
  49. package/dist/palettes/material/index.d.mts +1 -1
  50. package/dist/palettes/md1/index.d.mts +1 -1
  51. package/dist/palettes/md2/index.d.mts +1 -1
  52. package/dist/palettes/radix/index.d.mts +1 -1
  53. package/dist/palettes/tailwind/index.d.mts +1 -1
  54. package/dist/permissions/adapters/index.d.mts +1 -1
  55. package/dist/permissions/adapters/v0/index.d.mts +1 -1
  56. package/dist/permissions/index.d.mts +1 -1
  57. package/dist/permissions/index.mjs +1 -1
  58. package/dist/rules/index.d.mts +1 -1
  59. package/dist/rules/index.mjs +1 -1
  60. package/dist/storage/index.d.mts +1 -1
  61. package/dist/storage/index.mjs +1 -1
  62. package/dist/theme/adapters/index.d.mts +1 -1
  63. package/dist/theme/adapters/index.mjs +2 -2
  64. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  65. package/dist/theme/adapters/unhead/index.mjs +1 -1
  66. package/dist/theme/adapters/v0/index.d.mts +1 -1
  67. package/dist/theme/adapters/v0/index.mjs +1 -1
  68. package/dist/theme/index.d.mts +1 -1
  69. package/dist/theme/index.mjs +3 -3
  70. package/dist/{unhead-CAPMhSV7.mjs → unhead-BXJ8cqN-.mjs} +1 -1
  71. package/dist/{useEventListener-BtOsc1qg.mjs → useEventListener-UJ8VS4eS.mjs} +1 -1
  72. package/dist/{useFeatures-B5I-8W8H.mjs → useFeatures-Cn-HGB7v.mjs} +4 -4
  73. package/dist/{useLocale-AKOyyv43.mjs → useLocale-BFKJosku.mjs} +4 -4
  74. package/dist/{useLogger-bHW-Guij.mjs → useLogger-DGG3fsnB.mjs} +2 -2
  75. package/dist/{useNotifications-P-1VQHi8.mjs → useNotifications-DO10ylRQ.mjs} +3 -3
  76. package/dist/{usePermissions-nuWucbL_.mjs → usePermissions-BC-ppxf2.mjs} +2 -2
  77. package/dist/{useRovingFocus-BfbmLJoo.mjs → useRovingFocus-BWww4Lm1.mjs} +109 -76
  78. package/dist/{useRules-SLj8Le-M.mjs → useRules-CMDEY2-D.mjs} +2 -2
  79. package/dist/{useStorage-B4eV6lZZ.mjs → useStorage-BkutRChm.mjs} +3 -3
  80. package/dist/{useTheme-SVM2VmlS.mjs → useTheme-CJ5fgT5y.mjs} +4 -4
  81. package/dist/utilities/index.mjs +1 -1
  82. package/dist/{v0-DcTsWvzJ.d.mts → v0-C0OfckSF.d.mts} +1 -1
  83. package/dist/{v0-D5BwU_Up.mjs → v0-DUvaNE4R.mjs} +1 -1
  84. package/dist/{v0-BoEyw8RC.mjs → v0-M7azful7.mjs} +1 -1
  85. package/dist/{v0-gVrU_ObF.mjs → v0-sTRNcP5u.mjs} +1 -1
  86. package/package.json +7 -2
@@ -1,2 +1,2 @@
1
- import { t as V0UnheadThemeAdapter } from "../../../unhead-CAPMhSV7.mjs";
1
+ import { t as V0UnheadThemeAdapter } from "../../../unhead-BXJ8cqN-.mjs";
2
2
  export { V0UnheadThemeAdapter };
@@ -1,2 +1,2 @@
1
- import { A as Vuetify0ThemeOptions, k as V0StyleSheetThemeAdapter } from "../../../index-B5ybQyJO.mjs";
1
+ import { A as Vuetify0ThemeOptions, k as V0StyleSheetThemeAdapter } from "../../../index-BwNRi6BK.mjs";
2
2
  export { V0StyleSheetThemeAdapter, Vuetify0ThemeOptions };
@@ -1,2 +1,2 @@
1
- import { t as V0StyleSheetThemeAdapter } from "../../../v0-gVrU_ObF.mjs";
1
+ import { t as V0StyleSheetThemeAdapter } from "../../../v0-sTRNcP5u.mjs";
2
2
  export { V0StyleSheetThemeAdapter };
@@ -1,2 +1,2 @@
1
- import { C as createTheme, D as V0UnheadThemeAdapter, E as useTheme, S as ThemeTicketInput, T as createThemePlugin, _ as ThemeContextOptions, b as ThemeRecord, g as ThemeContext, h as ThemeColors, j as ThemeAdapter, k as V0StyleSheetThemeAdapter, m as Colors, v as ThemeOptions, w as createThemeContext, x as ThemeTicket, y as ThemePluginOptions } from "../index-B5ybQyJO.mjs";
1
+ import { C as createTheme, D as V0UnheadThemeAdapter, E as useTheme, S as ThemeTicketInput, T as createThemePlugin, _ as ThemeContextOptions, b as ThemeRecord, g as ThemeContext, h as ThemeColors, j as ThemeAdapter, k as V0StyleSheetThemeAdapter, m as Colors, v as ThemeOptions, w as createThemeContext, x as ThemeTicket, y as ThemePluginOptions } from "../index-BwNRi6BK.mjs";
2
2
  export { Colors, ThemeAdapter, ThemeColors, ThemeContext, ThemeContextOptions, ThemeOptions, ThemePluginOptions, ThemeRecord, ThemeTicket, ThemeTicketInput, V0StyleSheetThemeAdapter, V0UnheadThemeAdapter, createTheme, createThemeContext, createThemePlugin, useTheme };
@@ -1,5 +1,5 @@
1
1
  import { t as ThemeAdapter } from "../adapter-lS_VpRow.mjs";
2
- import { t as V0StyleSheetThemeAdapter } from "../v0-gVrU_ObF.mjs";
3
- import { t as V0UnheadThemeAdapter } from "../unhead-CAPMhSV7.mjs";
4
- import { i as useTheme, n as createThemeContext, r as createThemePlugin, t as createTheme } from "../useTheme-SVM2VmlS.mjs";
2
+ import { t as V0StyleSheetThemeAdapter } from "../v0-sTRNcP5u.mjs";
3
+ import { t as V0UnheadThemeAdapter } from "../unhead-BXJ8cqN-.mjs";
4
+ import { i as useTheme, n as createThemeContext, r as createThemePlugin, t as createTheme } from "../useTheme-CJ5fgT5y.mjs";
5
5
  export { ThemeAdapter, V0StyleSheetThemeAdapter, V0UnheadThemeAdapter, createTheme, createThemeContext, createThemePlugin, useTheme };
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-Djy_aCgG.mjs";
1
+ import { t as IN_BROWSER } from "./globals-C0tKiM_M.mjs";
2
2
  import { isNull, isString } from "./utilities/index.mjs";
3
3
  import { t as ThemeAdapter } from "./adapter-lS_VpRow.mjs";
4
4
  import { watch } from "vue";
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-Djy_aCgG.mjs";
1
+ import { t as IN_BROWSER } from "./globals-C0tKiM_M.mjs";
2
2
  import { t as toArray } from "./toArray-C89ZaEuF.mjs";
3
3
  import { onScopeDispose, toValue, unref, watch } from "vue";
4
4
  //#region src/composables/useEventListener/index.ts
@@ -1,7 +1,7 @@
1
1
  import { isArray, isBoolean, isFunction, isObject } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-bHW-Guij.mjs";
3
- import { t as createTokens } from "./createTokens-BY_7TedA.mjs";
4
- import { t as createGroup } from "./createGroup-DKVmhWJZ.mjs";
2
+ import { o as createPluginContext } from "./useLogger-DGG3fsnB.mjs";
3
+ import { t as createTokens } from "./createTokens-q-A6Ywox.mjs";
4
+ import { t as createGroup } from "./createGroup-5UjYS6_G.mjs";
5
5
  //#region src/composables/useFeatures/index.ts
6
6
  /**
7
7
  * @module useFeatures
@@ -82,7 +82,7 @@ function createFeatures(_options = {}) {
82
82
  const shouldSelect = /* @__PURE__ */ isBoolean(value) ? value === true : /* @__PURE__ */ isObject(value) && /* @__PURE__ */ isBoolean(value.$value) && value.$value === true;
83
83
  registry.upsert(id, { value });
84
84
  if (shouldSelect) registry.select(id);
85
- else registry.unselect(id);
85
+ else registry.selectedIds.delete(id);
86
86
  } else register({
87
87
  id,
88
88
  value
@@ -1,8 +1,8 @@
1
1
  import { isNumber, isString } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-bHW-Guij.mjs";
3
- import { t as createSingle } from "./createSingle-D08Et-36.mjs";
4
- import { r as flatten, t as createTokens } from "./createTokens-BY_7TedA.mjs";
5
- import { t as V0LocaleAdapter } from "./v0-BoEyw8RC.mjs";
2
+ import { o as createPluginContext } from "./useLogger-DGG3fsnB.mjs";
3
+ import { t as createSingle } from "./createSingle-DTqmo-GH.mjs";
4
+ import { r as flatten, t as createTokens } from "./createTokens-q-A6Ywox.mjs";
5
+ import { t as V0LocaleAdapter } from "./v0-M7azful7.mjs";
6
6
  //#region src/composables/useLocale/index.ts
7
7
  /**
8
8
  * @module useLocale
@@ -1,7 +1,7 @@
1
- import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-Djy_aCgG.mjs";
1
+ import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-C0tKiM_M.mjs";
2
2
  import { isNullOrUndefined, isUndefined } from "./utilities/index.mjs";
3
3
  import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
4
- import { t as V0LoggerAdapter } from "./v0-D5BwU_Up.mjs";
4
+ import { t as V0LoggerAdapter } from "./v0-DUvaNE4R.mjs";
5
5
  import { hasInjectionContext, inject, watch } from "vue";
6
6
  //#region src/composables/createPlugin/index.ts
7
7
  /**
@@ -1,8 +1,8 @@
1
- import { t as IN_BROWSER } from "./globals-Djy_aCgG.mjs";
1
+ import { t as IN_BROWSER } from "./globals-C0tKiM_M.mjs";
2
2
  import { isFunction, isNull, isUndefined, useId as useId$1 } from "./utilities/index.mjs";
3
3
  import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
4
- import { o as createPluginContext } from "./useLogger-bHW-Guij.mjs";
5
- import { t as createRegistry } from "./createRegistry-DaRYxox5.mjs";
4
+ import { o as createPluginContext } from "./useLogger-DGG3fsnB.mjs";
5
+ import { t as createRegistry } from "./createRegistry-C_M475FE.mjs";
6
6
  import { onScopeDispose, shallowRef, toValue } from "vue";
7
7
  //#region src/composables/useTimer/index.ts
8
8
  /**
@@ -1,6 +1,6 @@
1
1
  import { UNSAFE_KEYS } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-bHW-Guij.mjs";
3
- import { t as createTokens } from "./createTokens-BY_7TedA.mjs";
2
+ import { o as createPluginContext } from "./useLogger-DGG3fsnB.mjs";
3
+ import { t as createTokens } from "./createTokens-q-A6Ywox.mjs";
4
4
  import { t as toArray } from "./toArray-C89ZaEuF.mjs";
5
5
  import { t as V0PermissionsAdapter } from "./v0-UNyykD27.mjs";
6
6
  //#region src/composables/usePermissions/index.ts
@@ -1,16 +1,16 @@
1
- import { a as SUPPORTS_OBSERVER, n as SUPPORTS_INTERSECTION_OBSERVER, t as IN_BROWSER } from "./globals-Djy_aCgG.mjs";
1
+ import { a as SUPPORTS_OBSERVER, n as SUPPORTS_INTERSECTION_OBSERVER, t as IN_BROWSER } from "./globals-C0tKiM_M.mjs";
2
2
  import { clamp, instanceExists, isArray, isElement, isFunction, isNull, isNullOrUndefined, isObject, isString, isUndefined, range, resolveIds, resolveIndexes, useId as useId$1 } from "./utilities/index.mjs";
3
3
  import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
4
- import { a as createPlugin, i as useLogger, o as createPluginContext } from "./useLogger-bHW-Guij.mjs";
5
- import { t as createRegistry } from "./createRegistry-DaRYxox5.mjs";
6
- import { i as createModel, t as createSelection } from "./createSelection-CZFfJnBv.mjs";
7
- import { t as createSingle } from "./createSingle-D08Et-36.mjs";
4
+ import { a as createPlugin, i as useLogger, o as createPluginContext } from "./useLogger-DGG3fsnB.mjs";
5
+ import { t as createRegistry } from "./createRegistry-C_M475FE.mjs";
6
+ import { i as createModel, t as createSelection } from "./createSelection-BokWvmnd.mjs";
7
+ import { t as createSingle } from "./createSingle-DTqmo-GH.mjs";
8
8
  import { t as toArray } from "./toArray-C89ZaEuF.mjs";
9
- import { n as useEventListener, r as useWindowEventListener, t as useDocumentEventListener } from "./useEventListener-BtOsc1qg.mjs";
10
- import { t as createGroup } from "./createGroup-DKVmhWJZ.mjs";
11
- import { c as useTimer } from "./useNotifications-P-1VQHi8.mjs";
9
+ import { n as useEventListener, r as useWindowEventListener, t as useDocumentEventListener } from "./useEventListener-UJ8VS4eS.mjs";
10
+ import { t as createGroup } from "./createGroup-5UjYS6_G.mjs";
11
+ import { c as useTimer } from "./useNotifications-DO10ylRQ.mjs";
12
12
  import { i as createFilter } from "./createPagination-B5dfqY-a.mjs";
13
- import { a as useRules, o as isStandardSchema } from "./useRules-SLj8Le-M.mjs";
13
+ import { a as useRules, o as isStandardSchema } from "./useRules-CMDEY2-D.mjs";
14
14
  import { computed, effectScope, hasInjectionContext, isReadonly, isRef, nextTick, onMounted, onScopeDispose, ref, shallowReactive, shallowReadonly, shallowRef, toRef, toValue, watch } from "vue";
15
15
  //#region src/composables/useClickOutside/index.ts
16
16
  /**
@@ -1608,11 +1608,14 @@ function useProxyModel(context, model, options) {
1608
1608
  return toValue(multiple) ? val : val[0];
1609
1609
  }
1610
1610
  const applyOptions = toValue(multiple) === toValue(context.multiple ?? false) ? void 0 : { multiple: toValue(multiple) };
1611
- const modelAsArray = transformIn(model);
1612
- const pending = new Set(modelAsArray);
1613
- context.apply(modelAsArray, applyOptions);
1614
- const selected = new Set(context.selectedValues.value);
1615
- for (const value of modelAsArray) if (selected.has(value)) pending.delete(value);
1611
+ const pending = /* @__PURE__ */ new Set();
1612
+ function reconcile(values) {
1613
+ context.apply(values, applyOptions);
1614
+ const selected = new Set(context.selectedValues.value);
1615
+ pending.clear();
1616
+ for (const value of values) if (!selected.has(value)) pending.add(value);
1617
+ }
1618
+ reconcile(transformIn(model));
1616
1619
  let syncing = false;
1617
1620
  function shallowEqual(a, b) {
1618
1621
  if (a === b) return true;
@@ -1621,15 +1624,17 @@ function useProxyModel(context, model, options) {
1621
1624
  }
1622
1625
  const contextWatch = watch(context.selectedValues, (val) => {
1623
1626
  if (syncing) return;
1627
+ syncing = true;
1624
1628
  modelWatch.pause();
1625
1629
  model.value = transformOut(Array.from(toValue(val)));
1626
1630
  modelWatch.resume();
1631
+ syncing = false;
1627
1632
  }, { flush: "sync" });
1628
1633
  const modelWatch = watch(model, (val) => {
1629
1634
  if (syncing) return;
1630
1635
  syncing = true;
1631
1636
  contextWatch.pause();
1632
- context.apply(transformIn(val), applyOptions);
1637
+ reconcile(transformIn(val));
1633
1638
  const actual = transformOut(Array.from(context.selectedValues.value));
1634
1639
  if (!shallowEqual(val, actual)) model.value = actual;
1635
1640
  contextWatch.resume();
@@ -2534,7 +2539,11 @@ function createCombobox(options = {}) {
2534
2539
  function clear() {
2535
2540
  query.value = "";
2536
2541
  pristine.value = true;
2537
- for (const id of Array.from(selection.selectedIds)) selection.unselect(id);
2542
+ if (toValue(disabled)) return;
2543
+ for (const id of Array.from(selection.selectedIds)) {
2544
+ if (toValue(mandatory) && selection.selectedIds.size === 1) break;
2545
+ selection.selectedIds.delete(id);
2546
+ }
2538
2547
  }
2539
2548
  watch(isOpen, (open) => {
2540
2549
  if (!open) cursor.clear();
@@ -3114,6 +3123,8 @@ function createValidation(_options = {}) {
3114
3123
  const isValid = shallowRef(null);
3115
3124
  const isValidating = shallowRef(false);
3116
3125
  let generation = 0;
3126
+ let visible = 0;
3127
+ let latest;
3117
3128
  function register(input) {
3118
3129
  if (/* @__PURE__ */ isFunction(input) || /* @__PURE__ */ isString(input) || /* @__PURE__ */ isStandardSchema(input)) {
3119
3130
  const resolved = rulesContext.resolve([input]);
@@ -3124,8 +3135,15 @@ function createValidation(_options = {}) {
3124
3135
  function onboard(rules) {
3125
3136
  return group.batch(() => rules.map((r) => register(r)));
3126
3137
  }
3127
- async function validate(_value = UNSET, silent = false) {
3128
- const gen = ++generation;
3138
+ async function wait() {
3139
+ while (true) {
3140
+ const current = latest;
3141
+ if (/* @__PURE__ */ isUndefined(current)) return false;
3142
+ const result = await current.promise;
3143
+ if (current.generation === generation) return result;
3144
+ }
3145
+ }
3146
+ async function run(gen, _value, silent) {
3129
3147
  const val = _value === UNSET ? toValue(valueSource) : _value;
3130
3148
  const activeRules = [];
3131
3149
  for (const ticket of group.selectedItems.value) activeRules.push(ticket.value);
@@ -3140,7 +3158,7 @@ function createValidation(_options = {}) {
3140
3158
  if (!silent) isValidating.value = true;
3141
3159
  try {
3142
3160
  const results = await Promise.all(activeRules.map((rule) => rule(val)));
3143
- if (gen !== generation) return false;
3161
+ if (gen !== generation) return wait();
3144
3162
  const errorMessages = results.filter((result) => /* @__PURE__ */ isString(result) || result === false).map((result) => result === false ? "Validation failed" : result);
3145
3163
  if (!silent) {
3146
3164
  errors.value = errorMessages;
@@ -3148,21 +3166,32 @@ function createValidation(_options = {}) {
3148
3166
  }
3149
3167
  return errorMessages.length === 0;
3150
3168
  } catch (error) {
3151
- if (gen !== generation) return false;
3169
+ if (gen !== generation) return wait();
3152
3170
  if (!silent) {
3153
3171
  errors.value = [error instanceof Error ? error.message : "Validation error"];
3154
3172
  isValid.value = false;
3155
3173
  }
3156
3174
  return false;
3157
3175
  } finally {
3158
- if (gen === generation && !silent) isValidating.value = false;
3176
+ if (!silent && gen === visible) isValidating.value = false;
3159
3177
  }
3160
3178
  }
3179
+ async function validate(_value = UNSET, silent = false) {
3180
+ const gen = ++generation;
3181
+ if (!silent) visible = gen;
3182
+ const promise = run(gen, _value, silent);
3183
+ latest = {
3184
+ generation: gen,
3185
+ promise
3186
+ };
3187
+ return promise;
3188
+ }
3161
3189
  function reset() {
3162
3190
  errors.value = [];
3163
3191
  isValid.value = null;
3164
3192
  isValidating.value = false;
3165
3193
  generation++;
3194
+ latest = void 0;
3166
3195
  }
3167
3196
  if (initialRules.length > 0) onboard(initialRules);
3168
3197
  const context = {
@@ -3470,6 +3499,7 @@ function createNumberField(options = {}) {
3470
3499
  return Number.isNaN(result) ? null : result;
3471
3500
  }
3472
3501
  function commit(next) {
3502
+ if (isLocked()) return;
3473
3503
  const val = arguments.length === 0 ? value.value : next;
3474
3504
  if (/* @__PURE__ */ isNull(val)) return;
3475
3505
  if (!shouldClamp && (val < numeric.min || val > numeric.max)) {
@@ -3764,7 +3794,7 @@ function createProgress(options = {}) {
3764
3794
  });
3765
3795
  function fromValue(value) {
3766
3796
  if (extent === 0) return 0;
3767
- return /* @__PURE__ */ clamp(value, 0, extent) / extent * 100;
3797
+ return (/* @__PURE__ */ clamp(value, min, max) - min) / extent * 100;
3768
3798
  }
3769
3799
  function register(registration = {}) {
3770
3800
  const index = segments.value.length;
@@ -4116,7 +4146,7 @@ function createSlider(options = {}) {
4116
4146
  }
4117
4147
  }
4118
4148
  function set(index, value) {
4119
- if (readonly.value) return;
4149
+ if (disabled.value || readonly.value) return;
4120
4150
  const snapped = snap(value);
4121
4151
  const current = values.value;
4122
4152
  let constrained = snapped;
@@ -4344,7 +4374,6 @@ function createNested(_options = {}) {
4344
4374
  function open(ids) {
4345
4375
  if (toValue(group.disabled)) return;
4346
4376
  for (const id of /* @__PURE__ */ toArray(ids)) {
4347
- if (!group.has(id)) continue;
4348
4377
  const item = group.get(id);
4349
4378
  if (!item || toValue(item.disabled)) continue;
4350
4379
  openedIds.add(id);
@@ -4369,7 +4398,6 @@ function createNested(_options = {}) {
4369
4398
  function close(ids) {
4370
4399
  if (toValue(group.disabled)) return;
4371
4400
  for (const id of /* @__PURE__ */ toArray(ids)) {
4372
- if (!group.has(id)) continue;
4373
4401
  const item = group.get(id);
4374
4402
  if (!item || toValue(item.disabled)) continue;
4375
4403
  openedIds.delete(id);
@@ -4378,7 +4406,6 @@ function createNested(_options = {}) {
4378
4406
  function flip(ids) {
4379
4407
  if (toValue(group.disabled)) return;
4380
4408
  for (const id of /* @__PURE__ */ toArray(ids)) {
4381
- if (!group.has(id)) continue;
4382
4409
  const item = group.get(id);
4383
4410
  if (!item || toValue(item.disabled)) continue;
4384
4411
  if (opened(id)) close(id);
@@ -4606,75 +4633,81 @@ function createNested(_options = {}) {
4606
4633
  function getLeafDescendants(id) {
4607
4634
  return getDescendants(id).filter((did) => isLeaf(did));
4608
4635
  }
4636
+ function removeLeaves(leafIds) {
4637
+ const { selectedIds, mixedIds } = group;
4638
+ const ids = new Set(leafIds);
4639
+ if (toValue(mandatoryOption) && [...selectedIds].every((id) => ids.has(id))) return;
4640
+ for (const id of ids) {
4641
+ mixedIds.delete(id);
4642
+ selectedIds.delete(id);
4643
+ }
4644
+ for (const id of ids) updateAncestors(id);
4645
+ }
4609
4646
  function select(ids) {
4610
4647
  if (toValue(group.disabled)) return;
4611
- for (const id of /* @__PURE__ */ toArray(ids)) {
4612
- if (!group.has(id)) continue;
4648
+ for (const id of /* @__PURE__ */ toArray(ids)) if (selectionMode === "independent") group.select(id);
4649
+ else if (selectionMode === "leaf") if (isLeaf(id)) group.select(id);
4650
+ else {
4613
4651
  const item = group.get(id);
4614
4652
  if (!item || toValue(item.disabled)) continue;
4615
- if (selectionMode === "independent") group.select(id);
4616
- else if (selectionMode === "leaf") if (isLeaf(id)) group.select(id);
4617
- else for (const lid of getLeafDescendants(id)) group.select(lid);
4618
- else {
4619
- if (!toValue(multipleOption)) {
4620
- group.select(id);
4621
- return;
4622
- }
4623
- const { selectedIds, mixedIds } = group;
4624
- mixedIds.delete(id);
4625
- selectedIds.add(id);
4626
- for (const did of getDescendants(id)) {
4627
- const desc = group.get(did);
4628
- if (desc && toValue(desc.disabled)) continue;
4629
- mixedIds.delete(did);
4630
- selectedIds.add(did);
4631
- }
4632
- updateAncestors(id);
4653
+ for (const lid of getLeafDescendants(id)) group.select(lid);
4654
+ }
4655
+ else {
4656
+ const item = group.get(id);
4657
+ if (!item || toValue(item.disabled)) continue;
4658
+ if (!toValue(multipleOption)) {
4659
+ group.select(id);
4660
+ return;
4633
4661
  }
4662
+ const { selectedIds, mixedIds } = group;
4663
+ mixedIds.delete(id);
4664
+ selectedIds.add(id);
4665
+ for (const did of getDescendants(id)) {
4666
+ const desc = group.get(did);
4667
+ if (desc && toValue(desc.disabled)) continue;
4668
+ mixedIds.delete(did);
4669
+ selectedIds.add(did);
4670
+ }
4671
+ updateAncestors(id);
4634
4672
  }
4635
4673
  }
4636
4674
  function unselect(ids) {
4637
4675
  if (toValue(group.disabled)) return;
4638
- for (const id of /* @__PURE__ */ toArray(ids)) {
4639
- if (!group.has(id)) continue;
4676
+ for (const id of /* @__PURE__ */ toArray(ids)) if (selectionMode === "independent") group.unselect(id);
4677
+ else if (selectionMode === "leaf") {
4640
4678
  const item = group.get(id);
4641
4679
  if (!item || toValue(item.disabled)) continue;
4642
- if (selectionMode === "independent") group.unselect(id);
4643
- else if (selectionMode === "leaf") if (isLeaf(id)) group.unselect(id);
4644
- else for (const lid of getLeafDescendants(id)) group.unselect(lid);
4645
- else {
4646
- const { selectedIds, mixedIds } = group;
4647
- if (toValue(mandatoryOption)) {
4648
- const toRemove = new Set([id, ...getDescendants(id)]);
4649
- if ([...selectedIds].every((sid) => toRemove.has(sid))) return;
4650
- }
4651
- mixedIds.delete(id);
4652
- selectedIds.delete(id);
4653
- for (const did of getDescendants(id)) {
4654
- const desc = group.get(did);
4655
- if (desc && toValue(desc.disabled)) continue;
4656
- mixedIds.delete(did);
4657
- selectedIds.delete(did);
4658
- }
4659
- updateAncestors(id);
4680
+ removeLeaves(isLeaf(id) ? [id] : getLeafDescendants(id));
4681
+ } else {
4682
+ const item = group.get(id);
4683
+ if (!item || toValue(item.disabled)) continue;
4684
+ const { selectedIds, mixedIds } = group;
4685
+ if (toValue(mandatoryOption)) {
4686
+ const toRemove = new Set([id, ...getDescendants(id)]);
4687
+ if ([...selectedIds].every((sid) => toRemove.has(sid))) return;
4660
4688
  }
4689
+ mixedIds.delete(id);
4690
+ selectedIds.delete(id);
4691
+ for (const did of getDescendants(id)) {
4692
+ mixedIds.delete(did);
4693
+ selectedIds.delete(did);
4694
+ }
4695
+ updateAncestors(id);
4661
4696
  }
4662
4697
  }
4663
4698
  function toggle(ids) {
4664
4699
  if (toValue(group.disabled)) return;
4665
- for (const id of /* @__PURE__ */ toArray(ids)) {
4700
+ for (const id of /* @__PURE__ */ toArray(ids)) if (selectionMode === "independent") group.toggle(id);
4701
+ else if (selectionMode === "leaf") if (isLeaf(id)) group.toggle(id);
4702
+ else {
4666
4703
  const item = group.get(id);
4667
4704
  if (!item || toValue(item.disabled)) continue;
4668
- if (selectionMode === "independent") group.toggle(id);
4669
- else if (selectionMode === "leaf") if (isLeaf(id)) group.toggle(id);
4670
- else {
4671
- const leafIds = getLeafDescendants(id);
4672
- if (leafIds.every((lid) => group.selected(lid))) for (const lid of leafIds) group.unselect(lid);
4673
- else for (const lid of leafIds) group.select(lid);
4674
- }
4675
- else if (group.selected(id) || group.mixed(id)) unselect(id);
4676
- else select(id);
4705
+ const leafIds = getLeafDescendants(id);
4706
+ if (leafIds.every((lid) => group.selected(lid))) removeLeaves(leafIds);
4707
+ else for (const lid of leafIds) group.select(lid);
4677
4708
  }
4709
+ else if (group.selected(id) || group.mixed(id)) unselect(id);
4710
+ else select(id);
4678
4711
  }
4679
4712
  function selectAll() {
4680
4713
  if (toValue(group.disabled)) return;
@@ -1,6 +1,6 @@
1
1
  import { instanceExists, isFunction, isObject } from "./utilities/index.mjs";
2
- import { i as useLogger, o as createPluginContext } from "./useLogger-bHW-Guij.mjs";
3
- import { a as useLocale } from "./useLocale-AKOyyv43.mjs";
2
+ import { i as useLogger, o as createPluginContext } from "./useLogger-DGG3fsnB.mjs";
3
+ import { a as useLocale } from "./useLocale-BFKJosku.mjs";
4
4
  //#region src/composables/useRules/adapters/standard.ts
5
5
  /**
6
6
  * Type guard for Standard Schema objects.
@@ -1,7 +1,7 @@
1
- import { t as IN_BROWSER } from "./globals-Djy_aCgG.mjs";
1
+ import { t as IN_BROWSER } from "./globals-C0tKiM_M.mjs";
2
2
  import { isArray, isNullOrUndefined, isObject } from "./utilities/index.mjs";
3
- import { i as useLogger, o as createPluginContext } from "./useLogger-bHW-Guij.mjs";
4
- import { r as useWindowEventListener } from "./useEventListener-BtOsc1qg.mjs";
3
+ import { i as useLogger, o as createPluginContext } from "./useLogger-DGG3fsnB.mjs";
4
+ import { r as useWindowEventListener } from "./useEventListener-UJ8VS4eS.mjs";
5
5
  import { t as MemoryStorageAdapter } from "./memory-BJjkQzxs.mjs";
6
6
  import { ref, watch } from "vue";
7
7
  //#region src/composables/useStorage/index.ts
@@ -1,8 +1,8 @@
1
1
  import { foreground, isNumber, isString } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-bHW-Guij.mjs";
3
- import { t as createSingle } from "./createSingle-D08Et-36.mjs";
4
- import { r as flatten, t as createTokens } from "./createTokens-BY_7TedA.mjs";
5
- import { t as V0StyleSheetThemeAdapter } from "./v0-gVrU_ObF.mjs";
2
+ import { o as createPluginContext } from "./useLogger-DGG3fsnB.mjs";
3
+ import { t as createSingle } from "./createSingle-DTqmo-GH.mjs";
4
+ import { r as flatten, t as createTokens } from "./createTokens-q-A6Ywox.mjs";
5
+ import { t as V0StyleSheetThemeAdapter } from "./v0-sTRNcP5u.mjs";
6
6
  import { computed, shallowRef, toRef } from "vue";
7
7
  //#region src/composables/useTheme/index.ts
8
8
  /**
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "../globals-Djy_aCgG.mjs";
1
+ import { t as IN_BROWSER } from "../globals-C0tKiM_M.mjs";
2
2
  import * as Vue from "vue";
3
3
  import { useId as useId$1 } from "vue";
4
4
  //#region src/utilities/color.ts
@@ -1,4 +1,4 @@
1
- import { n as LocaleAdapterContext, t as LocaleAdapter } from "./adapter-CMdKyFLz.mjs";
1
+ import { n as LocaleAdapterContext, t as LocaleAdapter } from "./adapter-CVNRHfrz.mjs";
2
2
 
3
3
  //#region src/composables/useLocale/adapters/v0.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-Djy_aCgG.mjs";
1
+ import { t as IN_BROWSER } from "./globals-C0tKiM_M.mjs";
2
2
  import { isFunction } from "./utilities/index.mjs";
3
3
  import { t as LoggerAdapter } from "./adapter-Chznb9Ju.mjs";
4
4
  //#region src/composables/useLogger/adapters/v0.ts
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-Djy_aCgG.mjs";
1
+ import { t as IN_BROWSER } from "./globals-C0tKiM_M.mjs";
2
2
  import { isObject, isString, isUndefined } from "./utilities/index.mjs";
3
3
  import { t as LocaleAdapter } from "./adapter-bwZo7b5p.mjs";
4
4
  //#region src/composables/useLocale/adapters/v0.ts
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-Djy_aCgG.mjs";
1
+ import { t as IN_BROWSER } from "./globals-C0tKiM_M.mjs";
2
2
  import { isNull, isString } from "./utilities/index.mjs";
3
3
  import { t as ThemeAdapter } from "./adapter-lS_VpRow.mjs";
4
4
  import { watch } from "vue";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuetify/v0",
3
- "version": "1.0.0-rc.7",
3
+ "version": "1.0.0-rc.8",
4
4
  "description": "A meta UI framework for building applications, component libraries, and design systems with Vue 3",
5
5
  "license": "MIT",
6
6
  "funding": [
@@ -68,6 +68,8 @@
68
68
  "@flagsmith/flagsmith": "^11.0.0",
69
69
  "@js-temporal/polyfill": "0.5.1",
70
70
  "@material/material-color-utilities": "^0.4.0",
71
+ "@testing-library/vue": "^8.1.0",
72
+ "@vitest/browser-playwright": "4.1.5",
71
73
  "@vue/compiler-dom": "^3.5.33",
72
74
  "@vue/test-utils": "^2.4.10",
73
75
  "launchdarkly-js-client-sdk": "^3.9.1",
@@ -142,6 +144,9 @@
142
144
  "build:tsdown": "tsdown",
143
145
  "build:web-types": "node scripts/generate-web-types.ts",
144
146
  "generate:web-types": "node scripts/generate-web-types.ts",
145
- "typecheck": "vue-tsc --noEmit --incremental"
147
+ "typecheck": "vue-tsc --noEmit --incremental",
148
+ "test:unit": "vitest --project v0:unit",
149
+ "test:browser": "vitest --project v0:browser",
150
+ "test:open": "TEST_BAIL=1 vitest --project v0:browser -w"
146
151
  }
147
152
  }