vuetify 3.5.8 → 3.5.9

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 (81) hide show
  1. package/dist/json/attributes.json +419 -7
  2. package/dist/json/importMap-labs.json +20 -8
  3. package/dist/json/importMap.json +150 -150
  4. package/dist/json/tags.json +118 -0
  5. package/dist/json/web-types.json +1315 -8
  6. package/dist/vuetify-labs.css +1437 -1420
  7. package/dist/vuetify-labs.d.ts +3021 -692
  8. package/dist/vuetify-labs.esm.js +790 -230
  9. package/dist/vuetify-labs.esm.js.map +1 -1
  10. package/dist/vuetify-labs.js +790 -230
  11. package/dist/vuetify-labs.min.css +2 -2
  12. package/dist/vuetify.css +592 -591
  13. package/dist/vuetify.d.ts +569 -68
  14. package/dist/vuetify.esm.js +220 -20
  15. package/dist/vuetify.esm.js.map +1 -1
  16. package/dist/vuetify.js +220 -20
  17. package/dist/vuetify.js.map +1 -1
  18. package/dist/vuetify.min.css +2 -2
  19. package/dist/vuetify.min.js +486 -466
  20. package/dist/vuetify.min.js.map +1 -1
  21. package/lib/components/VAutocomplete/VAutocomplete.mjs +5 -3
  22. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  23. package/lib/components/VAutocomplete/index.d.mts +138 -6
  24. package/lib/components/VColorPicker/VColorPickerPreview.css +1 -0
  25. package/lib/components/VColorPicker/VColorPickerPreview.sass +1 -0
  26. package/lib/components/VColorPicker/_variables.scss +1 -0
  27. package/lib/components/VCombobox/VCombobox.mjs +5 -3
  28. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  29. package/lib/components/VCombobox/index.d.mts +138 -6
  30. package/lib/components/VDatePicker/VDatePickerControls.mjs +1 -0
  31. package/lib/components/VDatePicker/VDatePickerControls.mjs.map +1 -1
  32. package/lib/components/VList/VList.mjs +8 -2
  33. package/lib/components/VList/VList.mjs.map +1 -1
  34. package/lib/components/VList/VListGroup.mjs +3 -1
  35. package/lib/components/VList/VListGroup.mjs.map +1 -1
  36. package/lib/components/VList/VListItem.mjs +17 -4
  37. package/lib/components/VList/VListItem.mjs.map +1 -1
  38. package/lib/components/VList/index.d.mts +108 -6
  39. package/lib/components/VSelect/VSelect.mjs +5 -3
  40. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  41. package/lib/components/VSelect/index.d.mts +138 -6
  42. package/lib/components/index.d.mts +522 -24
  43. package/lib/composables/nested/activeStrategies.mjs +121 -0
  44. package/lib/composables/nested/activeStrategies.mjs.map +1 -0
  45. package/lib/composables/nested/nested.mjs +50 -1
  46. package/lib/composables/nested/nested.mjs.map +1 -1
  47. package/lib/composables/nested/selectStrategies.mjs +4 -2
  48. package/lib/composables/nested/selectStrategies.mjs.map +1 -1
  49. package/lib/entry-bundler.mjs +1 -1
  50. package/lib/framework.mjs +1 -1
  51. package/lib/iconsets/fa.mjs +2 -0
  52. package/lib/iconsets/fa.mjs.map +1 -1
  53. package/lib/iconsets/fa4.mjs +2 -0
  54. package/lib/iconsets/fa4.mjs.map +1 -1
  55. package/lib/iconsets/md.mjs +2 -0
  56. package/lib/iconsets/md.mjs.map +1 -1
  57. package/lib/iconsets/mdi-svg.mjs +2 -0
  58. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  59. package/lib/iconsets/mdi.mjs +2 -0
  60. package/lib/iconsets/mdi.mjs.map +1 -1
  61. package/lib/index.d.mts +47 -44
  62. package/lib/labs/VTreeview/VTreeview.mjs +154 -0
  63. package/lib/labs/VTreeview/VTreeview.mjs.map +1 -0
  64. package/lib/labs/VTreeview/VTreeviewChildren.mjs +98 -0
  65. package/lib/labs/VTreeview/VTreeviewChildren.mjs.map +1 -0
  66. package/lib/labs/VTreeview/VTreeviewGroup.mjs +48 -0
  67. package/lib/labs/VTreeview/VTreeviewGroup.mjs.map +1 -0
  68. package/lib/labs/VTreeview/VTreeviewItem.css +17 -0
  69. package/lib/labs/VTreeview/VTreeviewItem.mjs +86 -0
  70. package/lib/labs/VTreeview/VTreeviewItem.mjs.map +1 -0
  71. package/lib/labs/VTreeview/VTreeviewItem.sass +19 -0
  72. package/lib/labs/VTreeview/index.d.mts +1975 -0
  73. package/lib/labs/VTreeview/index.mjs +4 -0
  74. package/lib/labs/VTreeview/index.mjs.map +1 -0
  75. package/lib/labs/VTreeview/shared.mjs +4 -0
  76. package/lib/labs/VTreeview/shared.mjs.map +1 -0
  77. package/lib/labs/VTreeview/variables.scss +8 -0
  78. package/lib/labs/components.d.mts +3708 -1773
  79. package/lib/labs/components.mjs +3 -2
  80. package/lib/labs/components.mjs.map +1 -1
  81. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.5.8
2
+ * Vuetify v3.5.9
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -4372,6 +4372,8 @@ const aliases = {
4372
4372
  plus: 'mdi-plus',
4373
4373
  minus: 'mdi-minus',
4374
4374
  calendar: 'mdi-calendar',
4375
+ treeviewCollapse: 'mdi-menu-down',
4376
+ treeviewExpand: 'mdi-menu-right',
4375
4377
  eyeDropper: 'mdi-eyedropper'
4376
4378
  };
4377
4379
  const mdi = {
@@ -7758,6 +7760,126 @@ function useList() {
7758
7760
  return inject$1(ListKey, null);
7759
7761
  }
7760
7762
 
7763
+ /* eslint-disable sonarjs/no-identical-functions */
7764
+ // Utilities
7765
+ const independentActiveStrategy = mandatory => {
7766
+ const strategy = {
7767
+ activate: _ref => {
7768
+ let {
7769
+ id,
7770
+ value,
7771
+ activated
7772
+ } = _ref;
7773
+ id = toRaw(id);
7774
+
7775
+ // When mandatory and we're trying to deselect when id
7776
+ // is the only currently selected item then do nothing
7777
+ if (mandatory && !value && activated.size === 1 && activated.has(id)) return activated;
7778
+ if (value) {
7779
+ activated.add(id);
7780
+ } else {
7781
+ activated.delete(id);
7782
+ }
7783
+ return activated;
7784
+ },
7785
+ in: (v, children, parents) => {
7786
+ let set = new Set();
7787
+ for (const id of v || []) {
7788
+ set = strategy.activate({
7789
+ id,
7790
+ value: true,
7791
+ activated: new Set(set),
7792
+ children,
7793
+ parents
7794
+ });
7795
+ }
7796
+ return set;
7797
+ },
7798
+ out: v => {
7799
+ return Array.from(v);
7800
+ }
7801
+ };
7802
+ return strategy;
7803
+ };
7804
+ const independentSingleActiveStrategy = mandatory => {
7805
+ const parentStrategy = independentActiveStrategy(mandatory);
7806
+ const strategy = {
7807
+ activate: _ref2 => {
7808
+ let {
7809
+ activated,
7810
+ id,
7811
+ ...rest
7812
+ } = _ref2;
7813
+ id = toRaw(id);
7814
+ const singleSelected = activated.has(id) ? new Set([id]) : new Set();
7815
+ return parentStrategy.activate({
7816
+ ...rest,
7817
+ id,
7818
+ activated: singleSelected
7819
+ });
7820
+ },
7821
+ in: (v, children, parents) => {
7822
+ let set = new Set();
7823
+ if (v?.length) {
7824
+ set = parentStrategy.in(v.slice(0, 1), children, parents);
7825
+ }
7826
+ return set;
7827
+ },
7828
+ out: (v, children, parents) => {
7829
+ return parentStrategy.out(v, children, parents);
7830
+ }
7831
+ };
7832
+ return strategy;
7833
+ };
7834
+ const leafActiveStrategy = mandatory => {
7835
+ const parentStrategy = independentActiveStrategy(mandatory);
7836
+ const strategy = {
7837
+ activate: _ref3 => {
7838
+ let {
7839
+ id,
7840
+ activated,
7841
+ children,
7842
+ ...rest
7843
+ } = _ref3;
7844
+ id = toRaw(id);
7845
+ if (children.has(id)) return activated;
7846
+ return parentStrategy.activate({
7847
+ id,
7848
+ activated,
7849
+ children,
7850
+ ...rest
7851
+ });
7852
+ },
7853
+ in: parentStrategy.in,
7854
+ out: parentStrategy.out
7855
+ };
7856
+ return strategy;
7857
+ };
7858
+ const leafSingleActiveStrategy = mandatory => {
7859
+ const parentStrategy = independentSingleActiveStrategy(mandatory);
7860
+ const strategy = {
7861
+ activate: _ref4 => {
7862
+ let {
7863
+ id,
7864
+ activated,
7865
+ children,
7866
+ ...rest
7867
+ } = _ref4;
7868
+ id = toRaw(id);
7869
+ if (children.has(id)) return activated;
7870
+ return parentStrategy.activate({
7871
+ id,
7872
+ activated,
7873
+ children,
7874
+ ...rest
7875
+ });
7876
+ },
7877
+ in: parentStrategy.in,
7878
+ out: parentStrategy.out
7879
+ };
7880
+ return strategy;
7881
+ };
7882
+
7761
7883
  const singleOpenStrategy = {
7762
7884
  open: _ref => {
7763
7885
  let {
@@ -7842,7 +7964,8 @@ const independentSelectStrategy = mandatory => {
7842
7964
  if (mandatory && !value) {
7843
7965
  const on = Array.from(selected.entries()).reduce((arr, _ref2) => {
7844
7966
  let [key, value] = _ref2;
7845
- return value === 'on' ? [...arr, key] : arr;
7967
+ if (value === 'on') arr.push(key);
7968
+ return arr;
7846
7969
  }, []);
7847
7970
  if (on.length === 1 && on[0] === id) return selected;
7848
7971
  }
@@ -7984,7 +8107,8 @@ const classicSelectStrategy = mandatory => {
7984
8107
  if (mandatory && !value) {
7985
8108
  const on = Array.from(selected.entries()).reduce((arr, _ref7) => {
7986
8109
  let [key, value] = _ref7;
7987
- return value === 'on' ? [...arr, key] : arr;
8110
+ if (value === 'on') arr.push(key);
8111
+ return arr;
7988
8112
  }, []);
7989
8113
  if (on.length === 0) return original;
7990
8114
  }
@@ -8028,16 +8152,24 @@ const emptyNested = {
8028
8152
  children: ref(new Map()),
8029
8153
  open: () => null,
8030
8154
  openOnSelect: () => null,
8155
+ activate: () => null,
8031
8156
  select: () => null,
8157
+ activatable: ref(false),
8158
+ selectable: ref(false),
8032
8159
  opened: ref(new Set()),
8160
+ activated: ref(new Set()),
8033
8161
  selected: ref(new Map()),
8034
8162
  selectedValues: ref([])
8035
8163
  }
8036
8164
  };
8037
8165
  const makeNestedProps = propsFactory({
8166
+ activatable: Boolean,
8167
+ selectable: Boolean,
8168
+ activeStrategy: [String, Function],
8038
8169
  selectStrategy: [String, Function],
8039
8170
  openStrategy: [String, Object],
8040
8171
  opened: Array,
8172
+ activated: Array,
8041
8173
  selected: Array,
8042
8174
  mandatory: Boolean
8043
8175
  }, 'nested');
@@ -8046,6 +8178,20 @@ const useNested = props => {
8046
8178
  const children = ref(new Map());
8047
8179
  const parents = ref(new Map());
8048
8180
  const opened = useProxiedModel(props, 'opened', props.opened, v => new Set(v), v => [...v.values()]);
8181
+ const activeStrategy = computed(() => {
8182
+ if (typeof props.activeStrategy === 'object') return props.activeStrategy;
8183
+ switch (props.activeStrategy) {
8184
+ case 'leaf':
8185
+ return leafActiveStrategy(props.mandatory);
8186
+ case 'single-leaf':
8187
+ return leafSingleActiveStrategy(props.mandatory);
8188
+ case 'independent':
8189
+ return independentActiveStrategy(props.mandatory);
8190
+ case 'single-independent':
8191
+ default:
8192
+ return independentSingleActiveStrategy(props.mandatory);
8193
+ }
8194
+ });
8049
8195
  const selectStrategy = computed(() => {
8050
8196
  if (typeof props.selectStrategy === 'object') return props.selectStrategy;
8051
8197
  switch (props.selectStrategy) {
@@ -8074,6 +8220,7 @@ const useNested = props => {
8074
8220
  return multipleOpenStrategy;
8075
8221
  }
8076
8222
  });
8223
+ const activated = useProxiedModel(props, 'activated', props.activated, v => activeStrategy.value.in(v, children.value, parents.value), v => activeStrategy.value.out(v, children.value, parents.value));
8077
8224
  const selected = useProxiedModel(props, 'selected', props.selected, v => selectStrategy.value.in(v, children.value, parents.value), v => selectStrategy.value.out(v, children.value, parents.value));
8078
8225
  onBeforeUnmount(() => {
8079
8226
  isUnmounted = true;
@@ -8092,6 +8239,9 @@ const useNested = props => {
8092
8239
  id: shallowRef(),
8093
8240
  root: {
8094
8241
  opened,
8242
+ activatable: toRef(props, 'activatable'),
8243
+ selectable: toRef(props, 'selectable'),
8244
+ activated,
8095
8245
  selected,
8096
8246
  selectedValues: computed(() => {
8097
8247
  const arr = [];
@@ -8165,6 +8315,26 @@ const useNested = props => {
8165
8315
  newSelected && (selected.value = newSelected);
8166
8316
  nested.root.openOnSelect(id, value, event);
8167
8317
  },
8318
+ activate: (id, value, event) => {
8319
+ if (!props.activatable) {
8320
+ return nested.root.select(id, true, event);
8321
+ }
8322
+ vm.emit('click:activate', {
8323
+ id,
8324
+ value,
8325
+ path: getPath(id),
8326
+ event
8327
+ });
8328
+ const newActivated = activeStrategy.value.activate({
8329
+ id,
8330
+ value,
8331
+ activated: new Set(activated.value),
8332
+ children: children.value,
8333
+ parents: parents.value,
8334
+ event
8335
+ });
8336
+ newActivated && (activated.value = newActivated);
8337
+ },
8168
8338
  children,
8169
8339
  parents
8170
8340
  }
@@ -8183,6 +8353,8 @@ const useNestedItem = (id, isGroup) => {
8183
8353
  openOnSelect: (open, e) => parent.root.openOnSelect(computedId.value, open, e),
8184
8354
  isOpen: computed(() => parent.root.opened.value.has(computedId.value)),
8185
8355
  parent: computed(() => parent.root.parents.value.get(computedId.value)),
8356
+ activate: (activated, e) => parent.root.activate(computedId.value, activated, e),
8357
+ isActivated: computed(() => parent.root.activated.value.has(toRaw(computedId.value))),
8186
8358
  select: (selected, e) => parent.root.select(computedId.value, selected, e),
8187
8359
  isSelected: computed(() => parent.root.selected.value.get(toRaw(computedId.value)) === 'on'),
8188
8360
  isIndeterminate: computed(() => parent.root.selected.value.get(computedId.value) === 'indeterminate'),
@@ -8305,7 +8477,9 @@ const VListGroup = genericComponent()({
8305
8477
  }, [slots.default?.()]), [[vShow, isOpen.value]])]
8306
8478
  })]
8307
8479
  }));
8308
- return {};
8480
+ return {
8481
+ isOpen
8482
+ };
8309
8483
  }
8310
8484
  });
8311
8485
 
@@ -8378,6 +8552,8 @@ const VListItem = genericComponent()({
8378
8552
  const link = useLink(props, attrs);
8379
8553
  const id = computed(() => props.value === undefined ? link.href.value : props.value);
8380
8554
  const {
8555
+ activate,
8556
+ isActivated,
8381
8557
  select,
8382
8558
  isSelected,
8383
8559
  isIndeterminate,
@@ -8387,9 +8563,9 @@ const VListItem = genericComponent()({
8387
8563
  openOnSelect
8388
8564
  } = useNestedItem(id, false);
8389
8565
  const list = useList();
8390
- const isActive = computed(() => props.active !== false && (props.active || link.isActive?.value || isSelected.value));
8566
+ const isActive = computed(() => props.active !== false && (props.active || link.isActive?.value || (root.activatable.value ? isActivated.value : isSelected.value)));
8391
8567
  const isLink = computed(() => props.link !== false && link.isLink.value);
8392
- const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!list));
8568
+ const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || !!list && (root.selectable.value || root.activatable.value || props.value != null)));
8393
8569
  const roundedProps = computed(() => props.rounded || props.nav);
8394
8570
  const color = computed(() => props.color ?? props.activeColor);
8395
8571
  const variantProps = computed(() => ({
@@ -8440,7 +8616,13 @@ const VListItem = genericComponent()({
8440
8616
  emit('click', e);
8441
8617
  if (isGroupActivator || !isClickable.value) return;
8442
8618
  link.navigate?.(e);
8443
- props.value != null && select(!isSelected.value, e);
8619
+ if (root.activatable) {
8620
+ activate(!isActivated.value, e);
8621
+ } else if (root.selectable) {
8622
+ select(!isSelected.value, e);
8623
+ } else if (props.value != null) {
8624
+ select(!isSelected.value, e);
8625
+ }
8444
8626
  }
8445
8627
  function onKeyDown(e) {
8446
8628
  if (e.key === 'Enter' || e.key === ' ') {
@@ -8556,7 +8738,12 @@ const VListItem = genericComponent()({
8556
8738
  }, null)])]
8557
8739
  }), [[resolveDirective("ripple"), isClickable.value && props.ripple]]);
8558
8740
  });
8559
- return {};
8741
+ return {
8742
+ isGroupActivator,
8743
+ isSelected,
8744
+ list,
8745
+ select
8746
+ };
8560
8747
  }
8561
8748
  });
8562
8749
 
@@ -8898,8 +9085,10 @@ const VList = genericComponent()({
8898
9085
  props: makeVListProps(),
8899
9086
  emits: {
8900
9087
  'update:selected': value => true,
9088
+ 'update:activated': value => true,
8901
9089
  'update:opened': value => true,
8902
9090
  'click:open': value => true,
9091
+ 'click:activate': value => true,
8903
9092
  'click:select': value => true
8904
9093
  },
8905
9094
  setup(props, _ref) {
@@ -8932,7 +9121,9 @@ const VList = genericComponent()({
8932
9121
  roundedClasses
8933
9122
  } = useRounded(props);
8934
9123
  const {
9124
+ children,
8935
9125
  open,
9126
+ parents,
8936
9127
  select
8937
9128
  } = useNested(props);
8938
9129
  const lineClasses = computed(() => props.lines ? `v-list--${props.lines}-line` : undefined);
@@ -9022,7 +9213,9 @@ const VList = genericComponent()({
9022
9213
  return {
9023
9214
  open,
9024
9215
  select,
9025
- focus
9216
+ focus,
9217
+ children,
9218
+ parents
9026
9219
  };
9027
9220
  }
9028
9221
  });
@@ -11902,9 +12095,11 @@ const VSelect = genericComponent()({
11902
12095
  });
11903
12096
  }
11904
12097
  });
11905
- watch(() => props.items, val => {
11906
- if (!isFocused.value || !val.length || menu.value) return;
11907
- menu.value = true;
12098
+ watch(() => props.items, (newVal, oldVal) => {
12099
+ if (menu.value) return;
12100
+ if (isFocused.value && !oldVal.length && newVal.length) {
12101
+ menu.value = true;
12102
+ }
11908
12103
  });
11909
12104
  useRender(() => {
11910
12105
  const hasChips = !!(props.chips || slots.chip);
@@ -12464,9 +12659,11 @@ const VAutocomplete = genericComponent()({
12464
12659
  });
12465
12660
  }
12466
12661
  });
12467
- watch(() => props.items, val => {
12468
- if (!isFocused.value || !val.length || menu.value) return;
12469
- menu.value = true;
12662
+ watch(() => props.items, (newVal, oldVal) => {
12663
+ if (menu.value) return;
12664
+ if (isFocused.value && !oldVal.length && newVal.length) {
12665
+ menu.value = true;
12666
+ }
12470
12667
  });
12471
12668
  useRender(() => {
12472
12669
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
@@ -16269,9 +16466,11 @@ const VCombobox = genericComponent()({
16269
16466
  });
16270
16467
  }
16271
16468
  });
16272
- watch(() => props.items, val => {
16273
- if (!isFocused.value || !val.length || menu.value) return;
16274
- menu.value = true;
16469
+ watch(() => props.items, (newVal, oldVal) => {
16470
+ if (menu.value) return;
16471
+ if (isFocused.value && !oldVal.length && newVal.length) {
16472
+ menu.value = true;
16473
+ }
16275
16474
  });
16276
16475
  useRender(() => {
16277
16476
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
@@ -20292,6 +20491,7 @@ const VDatePickerControls = genericComponent()({
20292
20491
  emit('click:month');
20293
20492
  }
20294
20493
  useRender(() => {
20494
+ // TODO: add slot support and scope defaults
20295
20495
  return createVNode("div", {
20296
20496
  "class": ['v-date-picker-controls']
20297
20497
  }, [createVNode(VBtn, {
@@ -25398,78 +25598,6 @@ const VValidation = genericComponent()({
25398
25598
  }
25399
25599
  });
25400
25600
 
25401
- // Types
25402
-
25403
- const makeVConfirmEditProps = propsFactory({
25404
- modelValue: null,
25405
- color: String,
25406
- cancelText: {
25407
- type: String,
25408
- default: '$vuetify.confirmEdit.cancel'
25409
- },
25410
- okText: {
25411
- type: String,
25412
- default: '$vuetify.confirmEdit.ok'
25413
- }
25414
- }, 'VConfirmEdit');
25415
- const VConfirmEdit = genericComponent()({
25416
- name: 'VConfirmEdit',
25417
- props: makeVConfirmEditProps(),
25418
- emits: {
25419
- cancel: () => true,
25420
- save: value => true,
25421
- 'update:modelValue': value => true
25422
- },
25423
- setup(props, _ref) {
25424
- let {
25425
- emit,
25426
- slots
25427
- } = _ref;
25428
- const model = useProxiedModel(props, 'modelValue');
25429
- const internalModel = ref();
25430
- watchEffect(() => {
25431
- internalModel.value = structuredClone(toRaw(model.value));
25432
- });
25433
- const {
25434
- t
25435
- } = useLocale();
25436
- const isPristine = computed(() => {
25437
- return deepEqual(model.value, internalModel.value);
25438
- });
25439
- function save() {
25440
- model.value = internalModel.value;
25441
- emit('save', internalModel.value);
25442
- }
25443
- function cancel() {
25444
- internalModel.value = structuredClone(toRaw(model.value));
25445
- emit('cancel');
25446
- }
25447
- let actionsUsed = false;
25448
- useRender(() => {
25449
- const actions = createVNode(Fragment, null, [createVNode(VBtn, {
25450
- "disabled": isPristine.value,
25451
- "variant": "text",
25452
- "color": props.color,
25453
- "onClick": cancel,
25454
- "text": t(props.cancelText)
25455
- }, null), createVNode(VBtn, {
25456
- "disabled": isPristine.value,
25457
- "variant": "text",
25458
- "color": props.color,
25459
- "onClick": save,
25460
- "text": t(props.okText)
25461
- }, null)]);
25462
- return createVNode(Fragment, null, [slots.default?.({
25463
- model: internalModel,
25464
- get actions() {
25465
- actionsUsed = true;
25466
- return actions;
25467
- }
25468
- }), !actionsUsed && actions]);
25469
- });
25470
- }
25471
- });
25472
-
25473
25601
  const makeVCalendarIntervalEventProps = propsFactory({
25474
25602
  allDay: Boolean,
25475
25603
  interval: Object,
@@ -25941,45 +26069,248 @@ const VCalendar = genericComponent()({
25941
26069
  }
25942
26070
  });
25943
26071
 
25944
- const makeVFabProps = propsFactory({
25945
- app: Boolean,
25946
- appear: Boolean,
25947
- extended: Boolean,
25948
- location: {
26072
+ // Types
26073
+
26074
+ const makeVConfirmEditProps = propsFactory({
26075
+ modelValue: null,
26076
+ color: String,
26077
+ cancelText: {
25949
26078
  type: String,
25950
- default: 'bottom end'
25951
- },
25952
- offset: Boolean,
25953
- modelValue: {
25954
- type: Boolean,
25955
- default: true
26079
+ default: '$vuetify.confirmEdit.cancel'
25956
26080
  },
25957
- ...omit(makeVBtnProps({
25958
- active: true
25959
- }), ['location']),
25960
- ...makeLayoutItemProps(),
25961
- ...makeTransitionProps({
25962
- transition: 'fab-transition'
25963
- })
25964
- }, 'VFab');
25965
- const VFab = genericComponent()({
25966
- name: 'VFab',
25967
- props: makeVFabProps(),
26081
+ okText: {
26082
+ type: String,
26083
+ default: '$vuetify.confirmEdit.ok'
26084
+ }
26085
+ }, 'VConfirmEdit');
26086
+ const VConfirmEdit = genericComponent()({
26087
+ name: 'VConfirmEdit',
26088
+ props: makeVConfirmEditProps(),
25968
26089
  emits: {
26090
+ cancel: () => true,
26091
+ save: value => true,
25969
26092
  'update:modelValue': value => true
25970
26093
  },
25971
26094
  setup(props, _ref) {
25972
26095
  let {
26096
+ emit,
25973
26097
  slots
25974
26098
  } = _ref;
25975
26099
  const model = useProxiedModel(props, 'modelValue');
25976
- const height = shallowRef(56);
25977
- const layoutItemStyles = ref();
26100
+ const internalModel = ref();
26101
+ watchEffect(() => {
26102
+ internalModel.value = structuredClone(toRaw(model.value));
26103
+ });
25978
26104
  const {
25979
- resizeRef
25980
- } = useResizeObserver(entries => {
25981
- if (!entries.length) return;
25982
- height.value = entries[0].target.clientHeight;
26105
+ t
26106
+ } = useLocale();
26107
+ const isPristine = computed(() => {
26108
+ return deepEqual(model.value, internalModel.value);
26109
+ });
26110
+ function save() {
26111
+ model.value = internalModel.value;
26112
+ emit('save', internalModel.value);
26113
+ }
26114
+ function cancel() {
26115
+ internalModel.value = structuredClone(toRaw(model.value));
26116
+ emit('cancel');
26117
+ }
26118
+ let actionsUsed = false;
26119
+ useRender(() => {
26120
+ const actions = createVNode(Fragment, null, [createVNode(VBtn, {
26121
+ "disabled": isPristine.value,
26122
+ "variant": "text",
26123
+ "color": props.color,
26124
+ "onClick": cancel,
26125
+ "text": t(props.cancelText)
26126
+ }, null), createVNode(VBtn, {
26127
+ "disabled": isPristine.value,
26128
+ "variant": "text",
26129
+ "color": props.color,
26130
+ "onClick": save,
26131
+ "text": t(props.okText)
26132
+ }, null)]);
26133
+ return createVNode(Fragment, null, [slots.default?.({
26134
+ model: internalModel,
26135
+ get actions() {
26136
+ actionsUsed = true;
26137
+ return actions;
26138
+ }
26139
+ }), !actionsUsed && actions]);
26140
+ });
26141
+ }
26142
+ });
26143
+
26144
+ // Types
26145
+
26146
+ // Types
26147
+
26148
+ const makeVEmptyStateProps = propsFactory({
26149
+ actionText: String,
26150
+ bgColor: String,
26151
+ color: String,
26152
+ icon: IconValue,
26153
+ image: String,
26154
+ justify: {
26155
+ type: String,
26156
+ default: 'center'
26157
+ },
26158
+ headline: String,
26159
+ title: String,
26160
+ text: String,
26161
+ textWidth: {
26162
+ type: [Number, String],
26163
+ default: 500
26164
+ },
26165
+ href: String,
26166
+ to: String,
26167
+ ...makeComponentProps(),
26168
+ ...makeDimensionProps(),
26169
+ ...makeSizeProps({
26170
+ size: undefined
26171
+ }),
26172
+ ...makeThemeProps()
26173
+ }, 'VEmptyState');
26174
+ const VEmptyState = genericComponent()({
26175
+ name: 'VEmptyState',
26176
+ props: makeVEmptyStateProps(),
26177
+ emits: {
26178
+ 'click:action': e => true
26179
+ },
26180
+ setup(props, _ref) {
26181
+ let {
26182
+ emit,
26183
+ slots
26184
+ } = _ref;
26185
+ const {
26186
+ themeClasses
26187
+ } = provideTheme(props);
26188
+ const {
26189
+ backgroundColorClasses,
26190
+ backgroundColorStyles
26191
+ } = useBackgroundColor(toRef(props, 'bgColor'));
26192
+ const {
26193
+ dimensionStyles
26194
+ } = useDimension(props);
26195
+ function onClickAction(e) {
26196
+ emit('click:action', e);
26197
+ }
26198
+ useRender(() => {
26199
+ const hasActions = !!(slots.actions || props.actionText);
26200
+ const hasHeadline = !!(slots.headline || props.headline);
26201
+ const hasTitle = !!(slots.title || props.title);
26202
+ const hasText = !!(slots.text || props.text);
26203
+ const hasMedia = !!(slots.media || props.image || props.icon);
26204
+ const size = props.size || (props.image ? 200 : 96);
26205
+ return createVNode("div", {
26206
+ "class": ['v-empty-state', {
26207
+ [`v-empty-state--${props.justify}`]: true
26208
+ }, themeClasses.value, backgroundColorClasses.value, props.class],
26209
+ "style": [backgroundColorStyles.value, dimensionStyles.value, props.style]
26210
+ }, [hasMedia && createVNode("div", {
26211
+ "key": "media",
26212
+ "class": "v-empty-state__media"
26213
+ }, [!slots.media ? createVNode(Fragment, null, [props.image ? createVNode(VImg, {
26214
+ "key": "image",
26215
+ "src": props.image,
26216
+ "height": size
26217
+ }, null) : props.icon ? createVNode(VIcon, {
26218
+ "key": "icon",
26219
+ "size": size,
26220
+ "icon": props.icon
26221
+ }, null) : undefined]) : createVNode(VDefaultsProvider, {
26222
+ "key": "media-defaults",
26223
+ "defaults": {
26224
+ VImg: {
26225
+ src: props.image,
26226
+ height: size
26227
+ },
26228
+ VIcon: {
26229
+ size,
26230
+ icon: props.icon
26231
+ }
26232
+ }
26233
+ }, {
26234
+ default: () => [slots.media()]
26235
+ })]), hasHeadline && createVNode("div", {
26236
+ "key": "headline",
26237
+ "class": "v-empty-state__headline"
26238
+ }, [slots.headline?.() ?? props.headline]), hasTitle && createVNode("div", {
26239
+ "key": "title",
26240
+ "class": "v-empty-state__title"
26241
+ }, [slots.title?.() ?? props.title]), hasText && createVNode("div", {
26242
+ "key": "text",
26243
+ "class": "v-empty-state__text",
26244
+ "style": {
26245
+ maxWidth: convertToUnit(props.textWidth)
26246
+ }
26247
+ }, [slots.text?.() ?? props.text]), slots.default && createVNode("div", {
26248
+ "key": "content",
26249
+ "class": "v-empty-state__content"
26250
+ }, [slots.default()]), hasActions && createVNode("div", {
26251
+ "key": "actions",
26252
+ "class": "v-empty-state__actions"
26253
+ }, [createVNode(VDefaultsProvider, {
26254
+ "defaults": {
26255
+ VBtn: {
26256
+ class: 'v-empty-state__action-btn',
26257
+ color: props.color,
26258
+ text: props.actionText
26259
+ }
26260
+ }
26261
+ }, {
26262
+ default: () => [slots.actions?.({
26263
+ props: {
26264
+ onClick: onClickAction
26265
+ }
26266
+ }) ?? createVNode(VBtn, {
26267
+ "onClick": onClickAction
26268
+ }, null)]
26269
+ })])]);
26270
+ });
26271
+ return {};
26272
+ }
26273
+ });
26274
+
26275
+ const makeVFabProps = propsFactory({
26276
+ app: Boolean,
26277
+ appear: Boolean,
26278
+ extended: Boolean,
26279
+ location: {
26280
+ type: String,
26281
+ default: 'bottom end'
26282
+ },
26283
+ offset: Boolean,
26284
+ modelValue: {
26285
+ type: Boolean,
26286
+ default: true
26287
+ },
26288
+ ...omit(makeVBtnProps({
26289
+ active: true
26290
+ }), ['location']),
26291
+ ...makeLayoutItemProps(),
26292
+ ...makeTransitionProps({
26293
+ transition: 'fab-transition'
26294
+ })
26295
+ }, 'VFab');
26296
+ const VFab = genericComponent()({
26297
+ name: 'VFab',
26298
+ props: makeVFabProps(),
26299
+ emits: {
26300
+ 'update:modelValue': value => true
26301
+ },
26302
+ setup(props, _ref) {
26303
+ let {
26304
+ slots
26305
+ } = _ref;
26306
+ const model = useProxiedModel(props, 'modelValue');
26307
+ const height = shallowRef(56);
26308
+ const layoutItemStyles = ref();
26309
+ const {
26310
+ resizeRef
26311
+ } = useResizeObserver(entries => {
26312
+ if (!entries.length) return;
26313
+ height.value = entries[0].target.clientHeight;
25983
26314
  });
25984
26315
  const hasPosition = computed(() => props.app || props.absolute);
25985
26316
  const position = computed(() => {
@@ -26536,132 +26867,358 @@ const VSpeedDial = genericComponent()({
26536
26867
 
26537
26868
  // Types
26538
26869
 
26870
+ const makeVTreeviewGroupProps = propsFactory({
26871
+ ...omit(makeVListGroupProps({
26872
+ collapseIcon: '$treeviewCollapse',
26873
+ expandIcon: '$treeviewExpand'
26874
+ }), ['subgroup'])
26875
+ }, 'VTreeviewGroup');
26876
+ const VTreeviewGroup = genericComponent()({
26877
+ name: 'VTreeviewGroup',
26878
+ props: makeVTreeviewGroupProps(),
26879
+ setup(props, _ref) {
26880
+ let {
26881
+ slots
26882
+ } = _ref;
26883
+ const vListGroupRef = ref();
26884
+ const toggleIcon = computed(() => vListGroupRef.value?.isOpen ? props.collapseIcon : props.expandIcon);
26885
+ const activatorDefaults = computed(() => ({
26886
+ VTreeviewItem: {
26887
+ prependIcon: undefined,
26888
+ appendIcon: undefined,
26889
+ active: vListGroupRef.value?.isOpen,
26890
+ toggleIcon: toggleIcon.value
26891
+ }
26892
+ }));
26893
+ useRender(() => {
26894
+ const listGroupProps = VListGroup.filterProps(props);
26895
+ return createVNode(VListGroup, mergeProps(listGroupProps, {
26896
+ "ref": vListGroupRef,
26897
+ "class": ['v-treeview-group', props.class],
26898
+ "subgroup": true
26899
+ }), {
26900
+ ...slots,
26901
+ activator: slots.activator ? slotProps => createVNode(Fragment, null, [createVNode(VDefaultsProvider, {
26902
+ "defaults": activatorDefaults.value
26903
+ }, {
26904
+ default: () => [slots.activator?.(slotProps)]
26905
+ })]) : undefined
26906
+ });
26907
+ });
26908
+ return {};
26909
+ }
26910
+ });
26911
+
26539
26912
  // Types
26540
26913
 
26541
- const makeVEmptyStateProps = propsFactory({
26542
- actionText: String,
26543
- bgColor: String,
26544
- color: String,
26545
- icon: IconValue,
26546
- image: String,
26547
- justify: {
26914
+ const VTreeviewSymbol = Symbol.for('vuetify:v-treeview');
26915
+
26916
+ const makeVTreeviewItemProps = propsFactory({
26917
+ loading: Boolean,
26918
+ toggleIcon: IconValue,
26919
+ ...makeVListItemProps({
26920
+ slim: true
26921
+ })
26922
+ }, 'VTreeviewItem');
26923
+ const VTreeviewItem = genericComponent()({
26924
+ name: 'VTreeviewItem',
26925
+ props: makeVTreeviewItemProps(),
26926
+ setup(props, _ref) {
26927
+ let {
26928
+ attrs,
26929
+ slots,
26930
+ emit
26931
+ } = _ref;
26932
+ const link = useLink(props, attrs);
26933
+ const id = computed(() => props.value === undefined ? link.href.value : props.value);
26934
+ const vListItemRef = ref();
26935
+ const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!vListItemRef.value?.list));
26936
+ function onClick(e) {
26937
+ if (!vListItemRef.value?.isGroupActivator || !isClickable.value) return;
26938
+ props.value != null && vListItemRef.value?.select(!vListItemRef.value?.isSelected, e);
26939
+ }
26940
+ function onKeyDown(e) {
26941
+ if (e.key === 'Enter' || e.key === ' ') {
26942
+ e.preventDefault();
26943
+ onClick(e);
26944
+ }
26945
+ }
26946
+ const visibleIds = inject$1(VTreeviewSymbol, {
26947
+ visibleIds: ref()
26948
+ }).visibleIds;
26949
+ useRender(() => {
26950
+ const listItemProps = VListItem.filterProps(props);
26951
+ const hasPrepend = slots.prepend || props.toggleIcon;
26952
+ return createVNode(VListItem, mergeProps({
26953
+ "ref": vListItemRef
26954
+ }, listItemProps, {
26955
+ "class": ['v-treeview-item', {
26956
+ 'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(id.value)
26957
+ }, props.class],
26958
+ "onClick": onClick,
26959
+ "onKeydown": isClickable.value && onKeyDown
26960
+ }), {
26961
+ ...slots,
26962
+ prepend: hasPrepend ? slotProps => {
26963
+ return createVNode(Fragment, null, [props.toggleIcon && createVNode(VListItemAction, {
26964
+ "start": false
26965
+ }, {
26966
+ default: () => [createVNode(VBtn, {
26967
+ "density": "compact",
26968
+ "icon": props.toggleIcon,
26969
+ "loading": props.loading,
26970
+ "variant": "text"
26971
+ }, {
26972
+ loader() {
26973
+ return createVNode(VProgressCircular, {
26974
+ "indeterminate": "disable-shrink",
26975
+ "size": "20",
26976
+ "width": "2"
26977
+ }, null);
26978
+ }
26979
+ })]
26980
+ }), slots.prepend?.(slotProps)]);
26981
+ } : undefined
26982
+ });
26983
+ });
26984
+ return {};
26985
+ }
26986
+ });
26987
+
26988
+ // Types
26989
+
26990
+ const makeVTreeviewChildrenProps = propsFactory({
26991
+ loadChildren: Function,
26992
+ loadingIcon: {
26548
26993
  type: String,
26549
- default: 'center'
26994
+ default: '$loading'
26550
26995
  },
26551
- headline: String,
26552
- title: String,
26553
- text: String,
26554
- textWidth: {
26555
- type: [Number, String],
26556
- default: 500
26557
- },
26558
- href: String,
26559
- to: String,
26560
- ...makeComponentProps(),
26561
- ...makeDimensionProps(),
26562
- ...makeSizeProps({
26563
- size: undefined
26996
+ items: Array,
26997
+ selectable: Boolean
26998
+ }, 'VTreeviewChildren');
26999
+ const VTreeviewChildren = genericComponent()({
27000
+ name: 'VTreeviewChildren',
27001
+ props: makeVTreeviewChildrenProps(),
27002
+ setup(props, _ref) {
27003
+ let {
27004
+ emit,
27005
+ slots
27006
+ } = _ref;
27007
+ const isLoading = shallowRef(false);
27008
+ const hasLoaded = shallowRef(false);
27009
+ function checkChildren(item) {
27010
+ return new Promise(resolve => {
27011
+ if (!props.items?.length || !props.loadChildren || hasLoaded.value) return resolve();
27012
+ isLoading.value = true;
27013
+ props.loadChildren(item).then(resolve);
27014
+ }).then(() => {
27015
+ hasLoaded.value = true;
27016
+ }).finally(() => {
27017
+ isLoading.value = false;
27018
+ });
27019
+ }
27020
+ function onClick(e, item) {
27021
+ e.stopPropagation();
27022
+ checkChildren(item);
27023
+ }
27024
+ return () => slots.default?.() ?? props.items?.map(_ref2 => {
27025
+ let {
27026
+ children,
27027
+ props: itemProps,
27028
+ raw: item
27029
+ } = _ref2;
27030
+ const slotsWithItem = {
27031
+ prepend: slots.prepend ? slotProps => slots.prepend?.({
27032
+ ...slotProps,
27033
+ item
27034
+ }) : props.selectable ? _ref3 => {
27035
+ let {
27036
+ isSelected,
27037
+ isIndeterminate
27038
+ } = _ref3;
27039
+ return createVNode(VCheckboxBtn, {
27040
+ "key": item.value,
27041
+ "tabindex": "-1",
27042
+ "modelValue": isSelected,
27043
+ "loading": isLoading.value,
27044
+ "indeterminate": isIndeterminate,
27045
+ "onClick": e => onClick(e, item)
27046
+ }, null);
27047
+ } : undefined,
27048
+ append: slots.append ? slotProps => slots.append?.({
27049
+ ...slotProps,
27050
+ item
27051
+ }) : undefined,
27052
+ title: slots.title ? slotProps => slots.title?.({
27053
+ ...slotProps,
27054
+ item
27055
+ }) : undefined
27056
+ };
27057
+ const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps);
27058
+ const treeviewChildrenProps = VTreeviewChildren.filterProps(props);
27059
+ return children ? createVNode(VTreeviewGroup, mergeProps({
27060
+ "value": itemProps?.value
27061
+ }, treeviewGroupProps), {
27062
+ activator: _ref4 => {
27063
+ let {
27064
+ props: activatorProps
27065
+ } = _ref4;
27066
+ return createVNode(VTreeviewItem, mergeProps(itemProps, activatorProps, {
27067
+ "loading": isLoading.value,
27068
+ "onClick": e => onClick(e, item)
27069
+ }), slotsWithItem);
27070
+ },
27071
+ default: () => createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
27072
+ "items": children
27073
+ }), slots)
27074
+ }) : slots.item?.({
27075
+ props: itemProps
27076
+ }) ?? createVNode(VTreeviewItem, itemProps, slotsWithItem);
27077
+ });
27078
+ }
27079
+ });
27080
+
27081
+ function flatten(items) {
27082
+ let flat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
27083
+ for (const item of items) {
27084
+ flat.push(item);
27085
+ if (item.children) flatten(item.children, flat);
27086
+ }
27087
+ return flat;
27088
+ }
27089
+ const makeVTreeviewProps = propsFactory({
27090
+ openAll: Boolean,
27091
+ search: String,
27092
+ ...makeFilterProps({
27093
+ filterKeys: ['title']
26564
27094
  }),
26565
- ...makeThemeProps()
26566
- }, 'VEmptyState');
26567
- const VEmptyState = genericComponent()({
26568
- name: 'VEmptyState',
26569
- props: makeVEmptyStateProps(),
27095
+ ...makeVTreeviewChildrenProps(),
27096
+ ...omit(makeVListProps({
27097
+ collapseIcon: '$treeviewCollapse',
27098
+ expandIcon: '$treeviewExpand',
27099
+ selectStrategy: 'independent',
27100
+ openStrategy: 'multiple',
27101
+ slim: true
27102
+ }), ['nav'])
27103
+ }, 'VTreeview');
27104
+ const VTreeview = genericComponent()({
27105
+ name: 'VTreeview',
27106
+ props: makeVTreeviewProps(),
26570
27107
  emits: {
26571
- 'click:action': e => true
27108
+ 'update:opened': val => true,
27109
+ 'update:activated': val => true,
27110
+ 'update:selected': val => true,
27111
+ 'click:open': value => true,
27112
+ 'click:select': value => true
26572
27113
  },
26573
27114
  setup(props, _ref) {
26574
27115
  let {
26575
- emit,
26576
27116
  slots
26577
27117
  } = _ref;
26578
27118
  const {
26579
- themeClasses
26580
- } = provideTheme(props);
26581
- const {
26582
- backgroundColorClasses,
26583
- backgroundColorStyles
26584
- } = useBackgroundColor(toRef(props, 'bgColor'));
27119
+ items
27120
+ } = useListItems(props);
27121
+ const activeColor = toRef(props, 'activeColor');
27122
+ const baseColor = toRef(props, 'baseColor');
27123
+ const color = toRef(props, 'color');
27124
+ const opened = useProxiedModel(props, 'opened');
27125
+ const activated = useProxiedModel(props, 'activated');
27126
+ const selected = useProxiedModel(props, 'selected');
27127
+ const vListRef = ref();
27128
+ const flatItems = computed(() => flatten(items.value));
27129
+ const search = toRef(props, 'search');
26585
27130
  const {
26586
- dimensionStyles
26587
- } = useDimension(props);
26588
- function onClickAction(e) {
26589
- emit('click:action', e);
27131
+ filteredItems
27132
+ } = useFilter(props, flatItems, search);
27133
+ const visibleIds = computed(() => {
27134
+ if (!search.value) {
27135
+ return null;
27136
+ }
27137
+ return new Set(filteredItems.value.flatMap(item => {
27138
+ return [...getPath(item.props.value), ...getChildren(item.props.value)];
27139
+ }));
27140
+ });
27141
+ function getPath(id) {
27142
+ const path = [];
27143
+ let parent = id;
27144
+ while (parent != null) {
27145
+ path.unshift(parent);
27146
+ parent = vListRef.value?.parents.get(parent);
27147
+ }
27148
+ return path;
26590
27149
  }
26591
- useRender(() => {
26592
- const hasActions = !!(slots.actions || props.actionText);
26593
- const hasHeadline = !!(slots.headline || props.headline);
26594
- const hasTitle = !!(slots.title || props.title);
26595
- const hasText = !!(slots.text || props.text);
26596
- const hasMedia = !!(slots.media || props.image || props.icon);
26597
- const size = props.size || (props.image ? 200 : 96);
26598
- return createVNode("div", {
26599
- "class": ['v-empty-state', {
26600
- [`v-empty-state--${props.justify}`]: true
26601
- }, themeClasses.value, backgroundColorClasses.value, props.class],
26602
- "style": [backgroundColorStyles.value, dimensionStyles.value, props.style]
26603
- }, [hasMedia && createVNode("div", {
26604
- "key": "media",
26605
- "class": "v-empty-state__media"
26606
- }, [!slots.media ? createVNode(Fragment, null, [props.image ? createVNode(VImg, {
26607
- "key": "image",
26608
- "src": props.image,
26609
- "height": size
26610
- }, null) : props.icon ? createVNode(VIcon, {
26611
- "key": "icon",
26612
- "size": size,
26613
- "icon": props.icon
26614
- }, null) : undefined]) : createVNode(VDefaultsProvider, {
26615
- "key": "media-defaults",
26616
- "defaults": {
26617
- VImg: {
26618
- src: props.image,
26619
- height: size
26620
- },
26621
- VIcon: {
26622
- size,
26623
- icon: props.icon
26624
- }
26625
- }
26626
- }, {
26627
- default: () => [slots.media()]
26628
- })]), hasHeadline && createVNode("div", {
26629
- "key": "headline",
26630
- "class": "v-empty-state__headline"
26631
- }, [slots.headline?.() ?? props.headline]), hasTitle && createVNode("div", {
26632
- "key": "title",
26633
- "class": "v-empty-state__title"
26634
- }, [slots.title?.() ?? props.title]), hasText && createVNode("div", {
26635
- "key": "text",
26636
- "class": "v-empty-state__text",
26637
- "style": {
26638
- maxWidth: convertToUnit(props.textWidth)
26639
- }
26640
- }, [slots.text?.() ?? props.text]), slots.default && createVNode("div", {
26641
- "key": "content",
26642
- "class": "v-empty-state__content"
26643
- }, [slots.default()]), hasActions && createVNode("div", {
26644
- "key": "actions",
26645
- "class": "v-empty-state__actions"
26646
- }, [createVNode(VDefaultsProvider, {
26647
- "defaults": {
26648
- VBtn: {
26649
- class: 'v-empty-state__action-btn',
26650
- color: props.color,
26651
- text: props.actionText
26652
- }
27150
+ function getChildren(id) {
27151
+ const arr = [];
27152
+ const queue = (vListRef.value?.children.get(id) ?? []).slice();
27153
+ while (queue.length) {
27154
+ const child = queue.shift();
27155
+ if (!child) continue;
27156
+ arr.push(child);
27157
+ queue.push(...(vListRef.value?.children.get(child) ?? []).slice());
27158
+ }
27159
+ return arr;
27160
+ }
27161
+ watch(() => props.openAll, val => {
27162
+ opened.value = val ? openAll(items.value) : [];
27163
+ }, {
27164
+ immediate: true
27165
+ });
27166
+ function openAll(item) {
27167
+ let ids = [];
27168
+ for (const i of item) {
27169
+ if (!i.children) continue;
27170
+ ids.push(i.value);
27171
+ if (i.children) {
27172
+ ids = ids.concat(openAll(i.children));
26653
27173
  }
26654
- }, {
26655
- default: () => [slots.actions?.({
26656
- props: {
26657
- onClick: onClickAction
26658
- }
26659
- }) ?? createVNode(VBtn, {
26660
- "onClick": onClickAction
26661
- }, null)]
26662
- })])]);
27174
+ }
27175
+ return ids;
27176
+ }
27177
+ provide(VTreeviewSymbol, {
27178
+ visibleIds
26663
27179
  });
26664
- return {};
27180
+ provideDefaults({
27181
+ VTreeviewGroup: {
27182
+ activeColor,
27183
+ baseColor,
27184
+ color,
27185
+ collapseIcon: toRef(props, 'collapseIcon'),
27186
+ expandIcon: toRef(props, 'expandIcon')
27187
+ },
27188
+ VTreeviewItem: {
27189
+ activeClass: toRef(props, 'activeClass'),
27190
+ activeColor,
27191
+ baseColor,
27192
+ color,
27193
+ density: toRef(props, 'density'),
27194
+ disabled: toRef(props, 'disabled'),
27195
+ lines: toRef(props, 'lines'),
27196
+ variant: toRef(props, 'variant')
27197
+ }
27198
+ });
27199
+ useRender(() => {
27200
+ const listProps = VList.filterProps(props);
27201
+ const treeviewChildrenProps = VTreeviewChildren.filterProps(props);
27202
+ return createVNode(VList, mergeProps({
27203
+ "ref": vListRef
27204
+ }, listProps, {
27205
+ "class": ['v-treeview', props.class],
27206
+ "style": props.style,
27207
+ "opened": opened.value,
27208
+ "onUpdate:opened": $event => opened.value = $event,
27209
+ "activated": activated.value,
27210
+ "onUpdate:activated": $event => activated.value = $event,
27211
+ "selected": selected.value,
27212
+ "onUpdate:selected": $event => selected.value = $event
27213
+ }), {
27214
+ default: () => [createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
27215
+ "items": items.value
27216
+ }), slots)]
27217
+ });
27218
+ });
27219
+ return {
27220
+ open
27221
+ };
26665
27222
  }
26666
27223
  });
26667
27224
 
@@ -26833,6 +27390,9 @@ var components = /*#__PURE__*/Object.freeze({
26833
27390
  VToolbarItems: VToolbarItems,
26834
27391
  VToolbarTitle: VToolbarTitle,
26835
27392
  VTooltip: VTooltip,
27393
+ VTreeview: VTreeview,
27394
+ VTreeviewGroup: VTreeviewGroup,
27395
+ VTreeviewItem: VTreeviewItem,
26836
27396
  VValidation: VValidation,
26837
27397
  VVirtualScroll: VVirtualScroll,
26838
27398
  VWindow: VWindow,
@@ -27059,7 +27619,7 @@ function createVuetify$1() {
27059
27619
  goTo
27060
27620
  };
27061
27621
  }
27062
- const version$1 = "3.5.8";
27622
+ const version$1 = "3.5.9";
27063
27623
  createVuetify$1.version = version$1;
27064
27624
 
27065
27625
  // Vue's inject() can only be used in setup
@@ -27073,7 +27633,7 @@ function inject(key) {
27073
27633
 
27074
27634
  /* eslint-disable local-rules/sort-imports */
27075
27635
 
27076
- const version = "3.5.8";
27636
+ const version = "3.5.9";
27077
27637
 
27078
27638
  /* eslint-disable local-rules/sort-imports */
27079
27639