vuetify 3.5.8 → 3.5.10

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 (189) hide show
  1. package/dist/_component-variables-labs.sass +1 -0
  2. package/dist/json/attributes.json +525 -13
  3. package/dist/json/importMap-labs.json +24 -8
  4. package/dist/json/importMap.json +130 -130
  5. package/dist/json/tags.json +148 -0
  6. package/dist/json/web-types.json +2021 -147
  7. package/dist/vuetify-labs.css +2819 -2760
  8. package/dist/vuetify-labs.d.ts +5860 -2816
  9. package/dist/vuetify-labs.esm.js +1286 -248
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +1286 -247
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +553 -547
  14. package/dist/vuetify.d.ts +2835 -2281
  15. package/dist/vuetify.esm.js +883 -408
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +882 -406
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +1137 -1109
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/components/VAlert/index.d.mts +15 -15
  23. package/lib/components/VApp/index.d.mts +8 -8
  24. package/lib/components/VAppBar/index.d.mts +7 -7
  25. package/lib/components/VAutocomplete/VAutocomplete.mjs +9 -7
  26. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  27. package/lib/components/VAutocomplete/index.d.mts +232 -100
  28. package/lib/components/VAvatar/index.d.mts +8 -8
  29. package/lib/components/VBadge/index.d.mts +7 -7
  30. package/lib/components/VBanner/index.d.mts +20 -20
  31. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
  32. package/lib/components/VBreadcrumbs/index.d.mts +27 -26
  33. package/lib/components/VBtnGroup/index.d.mts +8 -8
  34. package/lib/components/VCard/index.d.mts +32 -32
  35. package/lib/components/VCarousel/index.d.mts +6 -6
  36. package/lib/components/VCheckbox/index.d.mts +44 -44
  37. package/lib/components/VChip/index.d.mts +7 -7
  38. package/lib/components/VCode/index.d.mts +8 -8
  39. package/lib/components/VColorPicker/VColorPickerPreview.css +1 -0
  40. package/lib/components/VColorPicker/VColorPickerPreview.sass +1 -0
  41. package/lib/components/VColorPicker/_variables.scss +1 -0
  42. package/lib/components/VCombobox/VCombobox.mjs +10 -7
  43. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  44. package/lib/components/VCombobox/index.d.mts +232 -100
  45. package/lib/components/VDataTable/index.d.mts +6 -6
  46. package/lib/components/VDatePicker/VDatePickerControls.mjs +1 -0
  47. package/lib/components/VDatePicker/VDatePickerControls.mjs.map +1 -1
  48. package/lib/components/VDatePicker/VDatePickerMonth.mjs +10 -4
  49. package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
  50. package/lib/components/VDatePicker/index.d.mts +10 -10
  51. package/lib/components/VDefaultsProvider/index.d.mts +8 -8
  52. package/lib/components/VDialog/index.d.mts +12 -6
  53. package/lib/components/VDivider/index.d.mts +8 -8
  54. package/lib/components/VExpansionPanel/index.d.mts +19 -19
  55. package/lib/components/VField/VField.css +2 -0
  56. package/lib/components/VField/VField.mjs +1 -1
  57. package/lib/components/VField/VField.mjs.map +1 -1
  58. package/lib/components/VField/VField.sass +2 -0
  59. package/lib/components/VField/index.d.mts +28 -28
  60. package/lib/components/VFileInput/index.d.mts +133 -133
  61. package/lib/components/VFooter/index.d.mts +8 -8
  62. package/lib/components/VGrid/index.d.mts +32 -32
  63. package/lib/components/VIcon/VIcon.css +4 -0
  64. package/lib/components/VIcon/VIcon.mjs +7 -3
  65. package/lib/components/VIcon/VIcon.mjs.map +1 -1
  66. package/lib/components/VIcon/VIcon.sass +4 -0
  67. package/lib/components/VIcon/_variables.scss +1 -0
  68. package/lib/components/VIcon/index.d.mts +25 -16
  69. package/lib/components/VImg/index.d.mts +4 -4
  70. package/lib/components/VInput/index.d.mts +21 -21
  71. package/lib/components/VKbd/index.d.mts +8 -8
  72. package/lib/components/VLabel/index.d.mts +8 -8
  73. package/lib/components/VLayout/index.d.mts +16 -16
  74. package/lib/components/VLazy/index.d.mts +8 -8
  75. package/lib/components/VList/VList.mjs +8 -2
  76. package/lib/components/VList/VList.mjs.map +1 -1
  77. package/lib/components/VList/VListGroup.mjs +3 -1
  78. package/lib/components/VList/VListGroup.mjs.map +1 -1
  79. package/lib/components/VList/VListItem.mjs +17 -4
  80. package/lib/components/VList/VListItem.mjs.map +1 -1
  81. package/lib/components/VList/index.d.mts +156 -54
  82. package/lib/components/VLocaleProvider/index.d.mts +12 -12
  83. package/lib/components/VMain/index.d.mts +8 -8
  84. package/lib/components/VMenu/VMenu.mjs +3 -0
  85. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  86. package/lib/components/VMenu/index.d.mts +14 -8
  87. package/lib/components/VNavigationDrawer/VNavigationDrawer.css +1 -1
  88. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +22 -8
  89. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  90. package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +2 -1
  91. package/lib/components/VNavigationDrawer/index.d.mts +11 -11
  92. package/lib/components/VOtpInput/VOtpInput.mjs +7 -2
  93. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  94. package/lib/components/VOtpInput/index.d.mts +31 -31
  95. package/lib/components/VOverlay/VOverlay.mjs +8 -3
  96. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  97. package/lib/components/VOverlay/index.d.mts +3 -0
  98. package/lib/components/VOverlay/scrollStrategies.mjs +2 -2
  99. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  100. package/lib/components/VPagination/index.d.mts +7 -7
  101. package/lib/components/VProgressLinear/VProgressLinear.css +0 -1
  102. package/lib/components/VProgressLinear/VProgressLinear.sass +0 -1
  103. package/lib/components/VProgressLinear/index.d.mts +7 -7
  104. package/lib/components/VRadioGroup/index.d.mts +44 -44
  105. package/lib/components/VRangeSlider/index.d.mts +47 -47
  106. package/lib/components/VRating/index.d.mts +7 -7
  107. package/lib/components/VResponsive/index.d.mts +8 -8
  108. package/lib/components/VSelect/VSelect.mjs +5 -3
  109. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  110. package/lib/components/VSelect/index.d.mts +232 -100
  111. package/lib/components/VSheet/index.d.mts +8 -8
  112. package/lib/components/VSkeletonLoader/index.d.mts +8 -8
  113. package/lib/components/VSlider/index.d.mts +47 -47
  114. package/lib/components/VSnackbar/index.d.mts +25 -19
  115. package/lib/components/VStepper/index.d.mts +41 -41
  116. package/lib/components/VSwitch/index.d.mts +39 -39
  117. package/lib/components/VSystemBar/index.d.mts +8 -8
  118. package/lib/components/VTabs/index.d.mts +15 -15
  119. package/lib/components/VTextField/index.d.mts +173 -173
  120. package/lib/components/VTextarea/index.d.mts +119 -119
  121. package/lib/components/VThemeProvider/index.d.mts +8 -8
  122. package/lib/components/VTimeline/index.d.mts +8 -8
  123. package/lib/components/VToolbar/index.d.mts +8 -8
  124. package/lib/components/VTooltip/index.d.mts +14 -8
  125. package/lib/components/VWindow/index.d.mts +10 -10
  126. package/lib/components/index.d.mts +2478 -1943
  127. package/lib/components/transitions/index.d.mts +128 -128
  128. package/lib/composables/date/adapters/vuetify.mjs +1 -1
  129. package/lib/composables/date/adapters/vuetify.mjs.map +1 -1
  130. package/lib/composables/nested/activeStrategies.mjs +121 -0
  131. package/lib/composables/nested/activeStrategies.mjs.map +1 -0
  132. package/lib/composables/nested/nested.mjs +50 -1
  133. package/lib/composables/nested/nested.mjs.map +1 -1
  134. package/lib/composables/nested/selectStrategies.mjs +4 -2
  135. package/lib/composables/nested/selectStrategies.mjs.map +1 -1
  136. package/lib/composables/theme.mjs +1 -1
  137. package/lib/composables/theme.mjs.map +1 -1
  138. package/lib/entry-bundler.mjs +3 -2
  139. package/lib/entry-bundler.mjs.map +1 -1
  140. package/lib/framework.mjs +1 -1
  141. package/lib/framework.mjs.map +1 -1
  142. package/lib/iconsets/fa.mjs +2 -0
  143. package/lib/iconsets/fa.mjs.map +1 -1
  144. package/lib/iconsets/fa4.mjs +2 -0
  145. package/lib/iconsets/fa4.mjs.map +1 -1
  146. package/lib/iconsets/md.mjs +2 -0
  147. package/lib/iconsets/md.mjs.map +1 -1
  148. package/lib/iconsets/mdi-svg.mjs +2 -0
  149. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  150. package/lib/iconsets/mdi.mjs +2 -0
  151. package/lib/iconsets/mdi.mjs.map +1 -1
  152. package/lib/index.d.mts +48 -44
  153. package/lib/labs/VCalendar/index.d.mts +32 -32
  154. package/lib/labs/VFab/index.d.mts +15 -15
  155. package/lib/labs/VNumberInput/VNumberInput.css +38 -0
  156. package/lib/labs/VNumberInput/VNumberInput.mjs +209 -0
  157. package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -0
  158. package/lib/labs/VNumberInput/VNumberInput.sass +47 -0
  159. package/lib/labs/VNumberInput/_variables.scss +1 -0
  160. package/lib/labs/VNumberInput/index.d.mts +607 -0
  161. package/lib/labs/VNumberInput/index.mjs +2 -0
  162. package/lib/labs/VNumberInput/index.mjs.map +1 -0
  163. package/lib/labs/VPicker/index.d.mts +8 -8
  164. package/lib/labs/VSparkline/index.d.mts +7 -7
  165. package/lib/labs/VSpeedDial/VSpeedDial.mjs +9 -5
  166. package/lib/labs/VSpeedDial/VSpeedDial.mjs.map +1 -1
  167. package/lib/labs/VSpeedDial/index.d.mts +120 -24
  168. package/lib/labs/VTreeview/VTreeview.mjs +154 -0
  169. package/lib/labs/VTreeview/VTreeview.mjs.map +1 -0
  170. package/lib/labs/VTreeview/VTreeviewChildren.mjs +98 -0
  171. package/lib/labs/VTreeview/VTreeviewChildren.mjs.map +1 -0
  172. package/lib/labs/VTreeview/VTreeviewGroup.mjs +48 -0
  173. package/lib/labs/VTreeview/VTreeviewGroup.mjs.map +1 -0
  174. package/lib/labs/VTreeview/VTreeviewItem.css +17 -0
  175. package/lib/labs/VTreeview/VTreeviewItem.mjs +86 -0
  176. package/lib/labs/VTreeview/VTreeviewItem.mjs.map +1 -0
  177. package/lib/labs/VTreeview/VTreeviewItem.sass +19 -0
  178. package/lib/labs/VTreeview/index.d.mts +1975 -0
  179. package/lib/labs/VTreeview/index.mjs +4 -0
  180. package/lib/labs/VTreeview/index.mjs.map +1 -0
  181. package/lib/labs/VTreeview/shared.mjs +4 -0
  182. package/lib/labs/VTreeview/shared.mjs.map +1 -0
  183. package/lib/labs/VTreeview/variables.scss +8 -0
  184. package/lib/labs/components.d.mts +4553 -1925
  185. package/lib/labs/components.mjs +4 -2
  186. package/lib/labs/components.mjs.map +1 -1
  187. package/lib/locale/no.mjs +1 -1
  188. package/lib/locale/no.mjs.map +1 -1
  189. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.5.8
2
+ * Vuetify v3.5.10
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -2388,7 +2388,7 @@ function createTheme(options) {
2388
2388
  const current = computed(() => computedThemes.value[name.value]);
2389
2389
  const styles = computed(() => {
2390
2390
  const lines = [];
2391
- if (current.value.dark) {
2391
+ if (current.value?.dark) {
2392
2392
  createCssClass(lines, ':root', ['color-scheme: dark']);
2393
2393
  }
2394
2394
  createCssClass(lines, ':root', genCssVariables(current.value));
@@ -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 = {
@@ -4566,6 +4568,7 @@ function useSize(props) {
4566
4568
 
4567
4569
  const makeVIconProps = propsFactory({
4568
4570
  color: String,
4571
+ disabled: Boolean,
4569
4572
  start: Boolean,
4570
4573
  end: Boolean,
4571
4574
  icon: IconValue,
@@ -4603,11 +4606,13 @@ const VIcon = genericComponent()({
4603
4606
  if (slotValue) {
4604
4607
  slotIcon.value = flattenFragments(slotValue).filter(node => node.type === Text && node.children && typeof node.children === 'string')[0]?.children;
4605
4608
  }
4609
+ const hasClick = !!(attrs.onClick || attrs.onClickOnce);
4606
4610
  return createVNode(iconData.value.component, {
4607
4611
  "tag": props.tag,
4608
4612
  "icon": iconData.value.icon,
4609
4613
  "class": ['v-icon', 'notranslate', themeClasses.value, sizeClasses.value, textColorClasses.value, {
4610
- 'v-icon--clickable': !!attrs.onClick,
4614
+ 'v-icon--clickable': hasClick,
4615
+ 'v-icon--disabled': props.disabled,
4611
4616
  'v-icon--start': props.start,
4612
4617
  'v-icon--end': props.end
4613
4618
  }, props.class],
@@ -4616,8 +4621,9 @@ const VIcon = genericComponent()({
4616
4621
  height: convertToUnit(props.size),
4617
4622
  width: convertToUnit(props.size)
4618
4623
  } : undefined, textColorStyles.value, props.style],
4619
- "role": attrs.onClick ? 'button' : undefined,
4620
- "aria-hidden": !attrs.onClick
4624
+ "role": hasClick ? 'button' : undefined,
4625
+ "aria-hidden": !hasClick,
4626
+ "tabindex": hasClick ? props.disabled ? -1 : 0 : undefined
4621
4627
  }, {
4622
4628
  default: () => [slotValue]
4623
4629
  });
@@ -7758,6 +7764,126 @@ function useList() {
7758
7764
  return inject$1(ListKey, null);
7759
7765
  }
7760
7766
 
7767
+ /* eslint-disable sonarjs/no-identical-functions */
7768
+ // Utilities
7769
+ const independentActiveStrategy = mandatory => {
7770
+ const strategy = {
7771
+ activate: _ref => {
7772
+ let {
7773
+ id,
7774
+ value,
7775
+ activated
7776
+ } = _ref;
7777
+ id = toRaw(id);
7778
+
7779
+ // When mandatory and we're trying to deselect when id
7780
+ // is the only currently selected item then do nothing
7781
+ if (mandatory && !value && activated.size === 1 && activated.has(id)) return activated;
7782
+ if (value) {
7783
+ activated.add(id);
7784
+ } else {
7785
+ activated.delete(id);
7786
+ }
7787
+ return activated;
7788
+ },
7789
+ in: (v, children, parents) => {
7790
+ let set = new Set();
7791
+ for (const id of v || []) {
7792
+ set = strategy.activate({
7793
+ id,
7794
+ value: true,
7795
+ activated: new Set(set),
7796
+ children,
7797
+ parents
7798
+ });
7799
+ }
7800
+ return set;
7801
+ },
7802
+ out: v => {
7803
+ return Array.from(v);
7804
+ }
7805
+ };
7806
+ return strategy;
7807
+ };
7808
+ const independentSingleActiveStrategy = mandatory => {
7809
+ const parentStrategy = independentActiveStrategy(mandatory);
7810
+ const strategy = {
7811
+ activate: _ref2 => {
7812
+ let {
7813
+ activated,
7814
+ id,
7815
+ ...rest
7816
+ } = _ref2;
7817
+ id = toRaw(id);
7818
+ const singleSelected = activated.has(id) ? new Set([id]) : new Set();
7819
+ return parentStrategy.activate({
7820
+ ...rest,
7821
+ id,
7822
+ activated: singleSelected
7823
+ });
7824
+ },
7825
+ in: (v, children, parents) => {
7826
+ let set = new Set();
7827
+ if (v?.length) {
7828
+ set = parentStrategy.in(v.slice(0, 1), children, parents);
7829
+ }
7830
+ return set;
7831
+ },
7832
+ out: (v, children, parents) => {
7833
+ return parentStrategy.out(v, children, parents);
7834
+ }
7835
+ };
7836
+ return strategy;
7837
+ };
7838
+ const leafActiveStrategy = mandatory => {
7839
+ const parentStrategy = independentActiveStrategy(mandatory);
7840
+ const strategy = {
7841
+ activate: _ref3 => {
7842
+ let {
7843
+ id,
7844
+ activated,
7845
+ children,
7846
+ ...rest
7847
+ } = _ref3;
7848
+ id = toRaw(id);
7849
+ if (children.has(id)) return activated;
7850
+ return parentStrategy.activate({
7851
+ id,
7852
+ activated,
7853
+ children,
7854
+ ...rest
7855
+ });
7856
+ },
7857
+ in: parentStrategy.in,
7858
+ out: parentStrategy.out
7859
+ };
7860
+ return strategy;
7861
+ };
7862
+ const leafSingleActiveStrategy = mandatory => {
7863
+ const parentStrategy = independentSingleActiveStrategy(mandatory);
7864
+ const strategy = {
7865
+ activate: _ref4 => {
7866
+ let {
7867
+ id,
7868
+ activated,
7869
+ children,
7870
+ ...rest
7871
+ } = _ref4;
7872
+ id = toRaw(id);
7873
+ if (children.has(id)) return activated;
7874
+ return parentStrategy.activate({
7875
+ id,
7876
+ activated,
7877
+ children,
7878
+ ...rest
7879
+ });
7880
+ },
7881
+ in: parentStrategy.in,
7882
+ out: parentStrategy.out
7883
+ };
7884
+ return strategy;
7885
+ };
7886
+
7761
7887
  const singleOpenStrategy = {
7762
7888
  open: _ref => {
7763
7889
  let {
@@ -7842,7 +7968,8 @@ const independentSelectStrategy = mandatory => {
7842
7968
  if (mandatory && !value) {
7843
7969
  const on = Array.from(selected.entries()).reduce((arr, _ref2) => {
7844
7970
  let [key, value] = _ref2;
7845
- return value === 'on' ? [...arr, key] : arr;
7971
+ if (value === 'on') arr.push(key);
7972
+ return arr;
7846
7973
  }, []);
7847
7974
  if (on.length === 1 && on[0] === id) return selected;
7848
7975
  }
@@ -7984,7 +8111,8 @@ const classicSelectStrategy = mandatory => {
7984
8111
  if (mandatory && !value) {
7985
8112
  const on = Array.from(selected.entries()).reduce((arr, _ref7) => {
7986
8113
  let [key, value] = _ref7;
7987
- return value === 'on' ? [...arr, key] : arr;
8114
+ if (value === 'on') arr.push(key);
8115
+ return arr;
7988
8116
  }, []);
7989
8117
  if (on.length === 0) return original;
7990
8118
  }
@@ -8028,16 +8156,24 @@ const emptyNested = {
8028
8156
  children: ref(new Map()),
8029
8157
  open: () => null,
8030
8158
  openOnSelect: () => null,
8159
+ activate: () => null,
8031
8160
  select: () => null,
8161
+ activatable: ref(false),
8162
+ selectable: ref(false),
8032
8163
  opened: ref(new Set()),
8164
+ activated: ref(new Set()),
8033
8165
  selected: ref(new Map()),
8034
8166
  selectedValues: ref([])
8035
8167
  }
8036
8168
  };
8037
8169
  const makeNestedProps = propsFactory({
8170
+ activatable: Boolean,
8171
+ selectable: Boolean,
8172
+ activeStrategy: [String, Function],
8038
8173
  selectStrategy: [String, Function],
8039
8174
  openStrategy: [String, Object],
8040
8175
  opened: Array,
8176
+ activated: Array,
8041
8177
  selected: Array,
8042
8178
  mandatory: Boolean
8043
8179
  }, 'nested');
@@ -8046,6 +8182,20 @@ const useNested = props => {
8046
8182
  const children = ref(new Map());
8047
8183
  const parents = ref(new Map());
8048
8184
  const opened = useProxiedModel(props, 'opened', props.opened, v => new Set(v), v => [...v.values()]);
8185
+ const activeStrategy = computed(() => {
8186
+ if (typeof props.activeStrategy === 'object') return props.activeStrategy;
8187
+ switch (props.activeStrategy) {
8188
+ case 'leaf':
8189
+ return leafActiveStrategy(props.mandatory);
8190
+ case 'single-leaf':
8191
+ return leafSingleActiveStrategy(props.mandatory);
8192
+ case 'independent':
8193
+ return independentActiveStrategy(props.mandatory);
8194
+ case 'single-independent':
8195
+ default:
8196
+ return independentSingleActiveStrategy(props.mandatory);
8197
+ }
8198
+ });
8049
8199
  const selectStrategy = computed(() => {
8050
8200
  if (typeof props.selectStrategy === 'object') return props.selectStrategy;
8051
8201
  switch (props.selectStrategy) {
@@ -8074,6 +8224,7 @@ const useNested = props => {
8074
8224
  return multipleOpenStrategy;
8075
8225
  }
8076
8226
  });
8227
+ 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
8228
  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
8229
  onBeforeUnmount(() => {
8079
8230
  isUnmounted = true;
@@ -8092,6 +8243,9 @@ const useNested = props => {
8092
8243
  id: shallowRef(),
8093
8244
  root: {
8094
8245
  opened,
8246
+ activatable: toRef(props, 'activatable'),
8247
+ selectable: toRef(props, 'selectable'),
8248
+ activated,
8095
8249
  selected,
8096
8250
  selectedValues: computed(() => {
8097
8251
  const arr = [];
@@ -8165,6 +8319,26 @@ const useNested = props => {
8165
8319
  newSelected && (selected.value = newSelected);
8166
8320
  nested.root.openOnSelect(id, value, event);
8167
8321
  },
8322
+ activate: (id, value, event) => {
8323
+ if (!props.activatable) {
8324
+ return nested.root.select(id, true, event);
8325
+ }
8326
+ vm.emit('click:activate', {
8327
+ id,
8328
+ value,
8329
+ path: getPath(id),
8330
+ event
8331
+ });
8332
+ const newActivated = activeStrategy.value.activate({
8333
+ id,
8334
+ value,
8335
+ activated: new Set(activated.value),
8336
+ children: children.value,
8337
+ parents: parents.value,
8338
+ event
8339
+ });
8340
+ newActivated && (activated.value = newActivated);
8341
+ },
8168
8342
  children,
8169
8343
  parents
8170
8344
  }
@@ -8183,6 +8357,8 @@ const useNestedItem = (id, isGroup) => {
8183
8357
  openOnSelect: (open, e) => parent.root.openOnSelect(computedId.value, open, e),
8184
8358
  isOpen: computed(() => parent.root.opened.value.has(computedId.value)),
8185
8359
  parent: computed(() => parent.root.parents.value.get(computedId.value)),
8360
+ activate: (activated, e) => parent.root.activate(computedId.value, activated, e),
8361
+ isActivated: computed(() => parent.root.activated.value.has(toRaw(computedId.value))),
8186
8362
  select: (selected, e) => parent.root.select(computedId.value, selected, e),
8187
8363
  isSelected: computed(() => parent.root.selected.value.get(toRaw(computedId.value)) === 'on'),
8188
8364
  isIndeterminate: computed(() => parent.root.selected.value.get(computedId.value) === 'indeterminate'),
@@ -8305,7 +8481,9 @@ const VListGroup = genericComponent()({
8305
8481
  }, [slots.default?.()]), [[vShow, isOpen.value]])]
8306
8482
  })]
8307
8483
  }));
8308
- return {};
8484
+ return {
8485
+ isOpen
8486
+ };
8309
8487
  }
8310
8488
  });
8311
8489
 
@@ -8378,6 +8556,8 @@ const VListItem = genericComponent()({
8378
8556
  const link = useLink(props, attrs);
8379
8557
  const id = computed(() => props.value === undefined ? link.href.value : props.value);
8380
8558
  const {
8559
+ activate,
8560
+ isActivated,
8381
8561
  select,
8382
8562
  isSelected,
8383
8563
  isIndeterminate,
@@ -8387,9 +8567,9 @@ const VListItem = genericComponent()({
8387
8567
  openOnSelect
8388
8568
  } = useNestedItem(id, false);
8389
8569
  const list = useList();
8390
- const isActive = computed(() => props.active !== false && (props.active || link.isActive?.value || isSelected.value));
8570
+ const isActive = computed(() => props.active !== false && (props.active || link.isActive?.value || (root.activatable.value ? isActivated.value : isSelected.value)));
8391
8571
  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));
8572
+ const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || !!list && (root.selectable.value || root.activatable.value || props.value != null)));
8393
8573
  const roundedProps = computed(() => props.rounded || props.nav);
8394
8574
  const color = computed(() => props.color ?? props.activeColor);
8395
8575
  const variantProps = computed(() => ({
@@ -8440,7 +8620,13 @@ const VListItem = genericComponent()({
8440
8620
  emit('click', e);
8441
8621
  if (isGroupActivator || !isClickable.value) return;
8442
8622
  link.navigate?.(e);
8443
- props.value != null && select(!isSelected.value, e);
8623
+ if (root.activatable.value) {
8624
+ activate(!isActivated.value, e);
8625
+ } else if (root.selectable.value) {
8626
+ select(!isSelected.value, e);
8627
+ } else if (props.value != null) {
8628
+ select(!isSelected.value, e);
8629
+ }
8444
8630
  }
8445
8631
  function onKeyDown(e) {
8446
8632
  if (e.key === 'Enter' || e.key === ' ') {
@@ -8556,7 +8742,12 @@ const VListItem = genericComponent()({
8556
8742
  }, null)])]
8557
8743
  }), [[resolveDirective("ripple"), isClickable.value && props.ripple]]);
8558
8744
  });
8559
- return {};
8745
+ return {
8746
+ isGroupActivator,
8747
+ isSelected,
8748
+ list,
8749
+ select
8750
+ };
8560
8751
  }
8561
8752
  });
8562
8753
 
@@ -8898,8 +9089,10 @@ const VList = genericComponent()({
8898
9089
  props: makeVListProps(),
8899
9090
  emits: {
8900
9091
  'update:selected': value => true,
9092
+ 'update:activated': value => true,
8901
9093
  'update:opened': value => true,
8902
9094
  'click:open': value => true,
9095
+ 'click:activate': value => true,
8903
9096
  'click:select': value => true
8904
9097
  },
8905
9098
  setup(props, _ref) {
@@ -8932,7 +9125,9 @@ const VList = genericComponent()({
8932
9125
  roundedClasses
8933
9126
  } = useRounded(props);
8934
9127
  const {
9128
+ children,
8935
9129
  open,
9130
+ parents,
8936
9131
  select
8937
9132
  } = useNested(props);
8938
9133
  const lineClasses = computed(() => props.lines ? `v-list--${props.lines}-line` : undefined);
@@ -9022,7 +9217,9 @@ const VList = genericComponent()({
9022
9217
  return {
9023
9218
  open,
9024
9219
  select,
9025
- focus
9220
+ focus,
9221
+ children,
9222
+ parents
9026
9223
  };
9027
9224
  }
9028
9225
  });
@@ -9564,7 +9761,7 @@ function useScrollStrategies(props, data) {
9564
9761
  scope?.stop();
9565
9762
  if (!(data.isActive.value && props.scrollStrategy)) return;
9566
9763
  scope = effectScope();
9567
- await nextTick();
9764
+ await new Promise(resolve => setTimeout(resolve));
9568
9765
  scope.active && scope.run(() => {
9569
9766
  if (typeof props.scrollStrategy === 'function') {
9570
9767
  props.scrollStrategy(data, props, scope);
@@ -10313,6 +10510,7 @@ const VOverlay = genericComponent()({
10313
10510
  if (v) isActive.value = false;
10314
10511
  });
10315
10512
  const root = ref();
10513
+ const scrimEl = ref();
10316
10514
  const contentEl = ref();
10317
10515
  const {
10318
10516
  contentStyles,
@@ -10334,8 +10532,10 @@ const VOverlay = genericComponent()({
10334
10532
  emit('click:outside', e);
10335
10533
  if (!props.persistent) isActive.value = false;else animateClick();
10336
10534
  }
10337
- function closeConditional() {
10338
- return isActive.value && globalTop.value;
10535
+ function closeConditional(e) {
10536
+ return isActive.value && globalTop.value && (
10537
+ // If using scrim, only close if clicking on it rather than anything opened on top
10538
+ !props.scrim || e.target === scrimEl.value);
10339
10539
  }
10340
10540
  IN_BROWSER && watch(isActive, val => {
10341
10541
  if (val) {
@@ -10422,7 +10622,8 @@ const VOverlay = genericComponent()({
10422
10622
  "ref": root
10423
10623
  }, scopeId, attrs), [createVNode(Scrim, mergeProps({
10424
10624
  "color": scrimColor,
10425
- "modelValue": isActive.value && !!props.scrim
10625
+ "modelValue": isActive.value && !!props.scrim,
10626
+ "ref": scrimEl
10426
10627
  }, scrimEvents.value), null), createVNode(MaybeTransition, {
10427
10628
  "appear": true,
10428
10629
  "persisted": true,
@@ -10445,6 +10646,7 @@ const VOverlay = genericComponent()({
10445
10646
  })]));
10446
10647
  return {
10447
10648
  activatorEl,
10649
+ scrimEl,
10448
10650
  target,
10449
10651
  animateClick,
10450
10652
  contentEl,
@@ -10640,6 +10842,9 @@ const VMenu = genericComponent()({
10640
10842
  isActive.value = false;
10641
10843
  overlay.value?.activatorEl?.focus();
10642
10844
  }
10845
+ } else if (['Enter', ' '].includes(e.key) && props.closeOnContentClick) {
10846
+ isActive.value = false;
10847
+ parent?.closeParents();
10643
10848
  }
10644
10849
  }
10645
10850
  function onActivatorKeydown(e) {
@@ -10917,7 +11122,7 @@ const VField = genericComponent()({
10917
11122
  }
10918
11123
  useRender(() => {
10919
11124
  const isOutlined = props.variant === 'outlined';
10920
- const hasPrepend = slots['prepend-inner'] || props.prependInnerIcon;
11125
+ const hasPrepend = !!(slots['prepend-inner'] || props.prependInnerIcon);
10921
11126
  const hasClear = !!(props.clearable || slots.clear);
10922
11127
  const hasAppend = !!(slots['append-inner'] || props.appendInnerIcon || hasClear);
10923
11128
  const label = () => slots.label ? slots.label({
@@ -11902,9 +12107,11 @@ const VSelect = genericComponent()({
11902
12107
  });
11903
12108
  }
11904
12109
  });
11905
- watch(() => props.items, val => {
11906
- if (!isFocused.value || !val.length || menu.value) return;
11907
- menu.value = true;
12110
+ watch(() => props.items, (newVal, oldVal) => {
12111
+ if (menu.value) return;
12112
+ if (isFocused.value && !oldVal.length && newVal.length) {
12113
+ menu.value = true;
12114
+ }
11908
12115
  });
11909
12116
  useRender(() => {
11910
12117
  const hasChips = !!(props.chips || slots.chip);
@@ -12339,8 +12546,8 @@ const VAutocomplete = genericComponent()({
12339
12546
  if (e.key === 'ArrowDown' && highlightFirst.value) {
12340
12547
  listRef.value?.focus('next');
12341
12548
  }
12342
- if (!props.multiple) return;
12343
12549
  if (['Backspace', 'Delete'].includes(e.key)) {
12550
+ if (!props.multiple && hasSelectionSlot.value && model.value.length > 0) return select(model.value[0], false);
12344
12551
  if (selectionIndex.value < 0) {
12345
12552
  if (e.key === 'Backspace' && !search.value) {
12346
12553
  selectionIndex.value = length - 1;
@@ -12348,10 +12555,10 @@ const VAutocomplete = genericComponent()({
12348
12555
  return;
12349
12556
  }
12350
12557
  const originalSelectionIndex = selectionIndex.value;
12351
- const selectedItem = model.value[selectionIndex.value];
12352
- if (selectedItem && !selectedItem.props.disabled) select(selectedItem, false);
12558
+ select(model.value[selectionIndex.value], false);
12353
12559
  selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
12354
12560
  }
12561
+ if (!props.multiple) return;
12355
12562
  if (e.key === 'ArrowLeft') {
12356
12563
  if (selectionIndex.value < 0 && selectionStart > 0) return;
12357
12564
  const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
@@ -12404,7 +12611,7 @@ const VAutocomplete = genericComponent()({
12404
12611
  /** @param set - null means toggle */
12405
12612
  function select(item) {
12406
12613
  let set = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
12407
- if (item.props.disabled) return;
12614
+ if (!item || item.props.disabled) return;
12408
12615
  if (props.multiple) {
12409
12616
  const index = model.value.findIndex(selection => props.valueComparator(selection.value, item.value));
12410
12617
  const add = set == null ? !~index : set;
@@ -12464,9 +12671,11 @@ const VAutocomplete = genericComponent()({
12464
12671
  });
12465
12672
  }
12466
12673
  });
12467
- watch(() => props.items, val => {
12468
- if (!isFocused.value || !val.length || menu.value) return;
12469
- menu.value = true;
12674
+ watch(() => props.items, (newVal, oldVal) => {
12675
+ if (menu.value) return;
12676
+ if (isFocused.value && !oldVal.length && newVal.length) {
12677
+ menu.value = true;
12678
+ }
12470
12679
  });
12471
12680
  useRender(() => {
12472
12681
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
@@ -16123,6 +16332,7 @@ const VCombobox = genericComponent()({
16123
16332
  }
16124
16333
  menu.value = !menu.value;
16125
16334
  }
16335
+ // eslint-disable-next-line complexity
16126
16336
  function onKeydown(e) {
16127
16337
  if (isComposingIgnoreKey(e) || props.readonly || form?.isReadonly.value) return;
16128
16338
  const selectionStart = vTextFieldRef.value.selectionStart;
@@ -16149,8 +16359,8 @@ const VCombobox = genericComponent()({
16149
16359
  select(transformItem$3(props, search.value));
16150
16360
  if (hasSelectionSlot.value) _search.value = '';
16151
16361
  }
16152
- if (!props.multiple) return;
16153
16362
  if (['Backspace', 'Delete'].includes(e.key)) {
16363
+ if (!props.multiple && hasSelectionSlot.value && model.value.length > 0) return select(model.value[0], false);
16154
16364
  if (selectionIndex.value < 0) {
16155
16365
  if (e.key === 'Backspace' && !search.value) {
16156
16366
  selectionIndex.value = length - 1;
@@ -16158,10 +16368,10 @@ const VCombobox = genericComponent()({
16158
16368
  return;
16159
16369
  }
16160
16370
  const originalSelectionIndex = selectionIndex.value;
16161
- const selectedItem = model.value[selectionIndex.value];
16162
- if (selectedItem && !selectedItem.props.disabled) select(selectedItem, false);
16371
+ select(model.value[selectionIndex.value], false);
16163
16372
  selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
16164
16373
  }
16374
+ if (!props.multiple) return;
16165
16375
  if (e.key === 'ArrowLeft') {
16166
16376
  if (selectionIndex.value < 0 && selectionStart > 0) return;
16167
16377
  const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
@@ -16192,7 +16402,7 @@ const VCombobox = genericComponent()({
16192
16402
  /** @param set - null means toggle */
16193
16403
  function select(item) {
16194
16404
  let set = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
16195
- if (item.props.disabled) return;
16405
+ if (!item || item.props.disabled) return;
16196
16406
  if (props.multiple) {
16197
16407
  const index = model.value.findIndex(selection => props.valueComparator(selection.value, item.value));
16198
16408
  const add = set == null ? !~index : set;
@@ -16269,9 +16479,11 @@ const VCombobox = genericComponent()({
16269
16479
  });
16270
16480
  }
16271
16481
  });
16272
- watch(() => props.items, val => {
16273
- if (!isFocused.value || !val.length || menu.value) return;
16274
- menu.value = true;
16482
+ watch(() => props.items, (newVal, oldVal) => {
16483
+ if (menu.value) return;
16484
+ if (isFocused.value && !oldVal.length && newVal.length) {
16485
+ menu.value = true;
16486
+ }
16275
16487
  });
16276
16488
  useRender(() => {
16277
16489
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
@@ -17418,7 +17630,7 @@ function setYear(date, year) {
17418
17630
  return d;
17419
17631
  }
17420
17632
  function startOfDay(date) {
17421
- return new Date(date.getFullYear(), date.getMonth(), date.getDate());
17633
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0, 0);
17422
17634
  }
17423
17635
  function endOfDay(date) {
17424
17636
  return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59, 999);
@@ -20292,6 +20504,7 @@ const VDatePickerControls = genericComponent()({
20292
20504
  emit('click:month');
20293
20505
  }
20294
20506
  useRender(() => {
20507
+ // TODO: add slot support and scope defaults
20295
20508
  return createVNode("div", {
20296
20509
  "class": ['v-date-picker-controls']
20297
20510
  }, [createVNode(VBtn, {
@@ -20570,6 +20783,12 @@ const VDatePickerMonth = genericComponent()({
20570
20783
  const adapter = useDate();
20571
20784
  const rangeStart = shallowRef();
20572
20785
  const rangeStop = shallowRef();
20786
+ if (props.multiple === 'range' && model.value.length > 0) {
20787
+ rangeStart.value = model.value[0];
20788
+ if (model.value.length > 1) {
20789
+ rangeStop.value = model.value[model.value.length - 1];
20790
+ }
20791
+ }
20573
20792
  const atMax = computed(() => {
20574
20793
  const max = ['number', 'string'].includes(typeof props.multiple) ? Number(props.multiple) : Infinity;
20575
20794
  return model.value.length >= max;
@@ -20580,15 +20799,15 @@ const VDatePickerMonth = genericComponent()({
20580
20799
  rangeStart.value = _value;
20581
20800
  model.value = [rangeStart.value];
20582
20801
  } else if (!rangeStop.value) {
20583
- if (adapter.isSameDay(value, rangeStart.value)) {
20802
+ if (adapter.isSameDay(_value, rangeStart.value)) {
20584
20803
  rangeStart.value = undefined;
20585
20804
  model.value = [];
20586
20805
  return;
20587
- } else if (adapter.isBefore(value, rangeStart.value)) {
20588
- rangeStop.value = rangeStart.value;
20806
+ } else if (adapter.isBefore(_value, rangeStart.value)) {
20807
+ rangeStop.value = adapter.endOfDay(rangeStart.value);
20589
20808
  rangeStart.value = _value;
20590
20809
  } else {
20591
- rangeStop.value = _value;
20810
+ rangeStop.value = adapter.endOfDay(_value);
20592
20811
  }
20593
20812
  const diff = adapter.getDiff(rangeStop.value, rangeStart.value, 'days');
20594
20813
  const datesInRange = [rangeStart.value];
@@ -22755,12 +22974,24 @@ const VNavigationDrawer = genericComponent()({
22755
22974
  default: () => [hasImage && createVNode("div", {
22756
22975
  "key": "image",
22757
22976
  "class": "v-navigation-drawer__img"
22758
- }, [slots.image ? slots.image?.({
22759
- image: props.image
22760
- }) : createVNode("img", {
22761
- "src": props.image,
22762
- "alt": ""
22763
- }, null)]), slots.prepend && createVNode("div", {
22977
+ }, [!slots.image ? createVNode(VImg, {
22978
+ "key": "image-img",
22979
+ "alt": "",
22980
+ "cover": true,
22981
+ "height": "inherit",
22982
+ "src": props.image
22983
+ }, null) : createVNode(VDefaultsProvider, {
22984
+ "key": "image-defaults",
22985
+ "disabled": !props.image,
22986
+ "defaults": {
22987
+ VImg: {
22988
+ alt: '',
22989
+ cover: true,
22990
+ height: 'inherit',
22991
+ src: props.image
22992
+ }
22993
+ }
22994
+ }, slots.image)]), slots.prepend && createVNode("div", {
22764
22995
  "class": "v-navigation-drawer__prepend"
22765
22996
  }, [slots.prepend?.()]), createVNode("div", {
22766
22997
  "class": "v-navigation-drawer__content"
@@ -22861,7 +23092,7 @@ const VOtpInput = genericComponent()({
22861
23092
  function onInput() {
22862
23093
  // The maxlength attribute doesn't work for the number type input, so the text type is used.
22863
23094
  // The following logic simulates the behavior of a number input.
22864
- if (props.type === 'number' && /[^0-9]/g.test(current.value.value)) {
23095
+ if (isValidNumber(current.value.value)) {
22865
23096
  current.value.value = '';
22866
23097
  return;
22867
23098
  }
@@ -22907,7 +23138,9 @@ const VOtpInput = genericComponent()({
22907
23138
  function onPaste(index, e) {
22908
23139
  e.preventDefault();
22909
23140
  e.stopPropagation();
22910
- model.value = (e?.clipboardData?.getData('Text') ?? '').split('');
23141
+ const clipboardText = e?.clipboardData?.getData('Text') ?? '';
23142
+ if (!isValidNumber(clipboardText)) return;
23143
+ model.value = clipboardText.split('');
22911
23144
  inputRef.value?.[index].blur();
22912
23145
  }
22913
23146
  function reset() {
@@ -22921,6 +23154,9 @@ const VOtpInput = genericComponent()({
22921
23154
  blur();
22922
23155
  focusIndex.value = -1;
22923
23156
  }
23157
+ function isValidNumber(value) {
23158
+ return props.type === 'number' && !isNaN(Number(value));
23159
+ }
22924
23160
  provideDefaults({
22925
23161
  VField: {
22926
23162
  color: computed(() => props.color),
@@ -25398,78 +25634,6 @@ const VValidation = genericComponent()({
25398
25634
  }
25399
25635
  });
25400
25636
 
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
25637
  const makeVCalendarIntervalEventProps = propsFactory({
25474
25638
  allDay: Boolean,
25475
25639
  interval: Object,
@@ -25941,20 +26105,223 @@ const VCalendar = genericComponent()({
25941
26105
  }
25942
26106
  });
25943
26107
 
25944
- const makeVFabProps = propsFactory({
25945
- app: Boolean,
25946
- appear: Boolean,
25947
- extended: Boolean,
25948
- location: {
26108
+ // Types
26109
+
26110
+ const makeVConfirmEditProps = propsFactory({
26111
+ modelValue: null,
26112
+ color: String,
26113
+ cancelText: {
25949
26114
  type: String,
25950
- default: 'bottom end'
26115
+ default: '$vuetify.confirmEdit.cancel'
25951
26116
  },
25952
- offset: Boolean,
25953
- modelValue: {
25954
- type: Boolean,
25955
- default: true
26117
+ okText: {
26118
+ type: String,
26119
+ default: '$vuetify.confirmEdit.ok'
26120
+ }
26121
+ }, 'VConfirmEdit');
26122
+ const VConfirmEdit = genericComponent()({
26123
+ name: 'VConfirmEdit',
26124
+ props: makeVConfirmEditProps(),
26125
+ emits: {
26126
+ cancel: () => true,
26127
+ save: value => true,
26128
+ 'update:modelValue': value => true
25956
26129
  },
25957
- ...omit(makeVBtnProps({
26130
+ setup(props, _ref) {
26131
+ let {
26132
+ emit,
26133
+ slots
26134
+ } = _ref;
26135
+ const model = useProxiedModel(props, 'modelValue');
26136
+ const internalModel = ref();
26137
+ watchEffect(() => {
26138
+ internalModel.value = structuredClone(toRaw(model.value));
26139
+ });
26140
+ const {
26141
+ t
26142
+ } = useLocale();
26143
+ const isPristine = computed(() => {
26144
+ return deepEqual(model.value, internalModel.value);
26145
+ });
26146
+ function save() {
26147
+ model.value = internalModel.value;
26148
+ emit('save', internalModel.value);
26149
+ }
26150
+ function cancel() {
26151
+ internalModel.value = structuredClone(toRaw(model.value));
26152
+ emit('cancel');
26153
+ }
26154
+ let actionsUsed = false;
26155
+ useRender(() => {
26156
+ const actions = createVNode(Fragment, null, [createVNode(VBtn, {
26157
+ "disabled": isPristine.value,
26158
+ "variant": "text",
26159
+ "color": props.color,
26160
+ "onClick": cancel,
26161
+ "text": t(props.cancelText)
26162
+ }, null), createVNode(VBtn, {
26163
+ "disabled": isPristine.value,
26164
+ "variant": "text",
26165
+ "color": props.color,
26166
+ "onClick": save,
26167
+ "text": t(props.okText)
26168
+ }, null)]);
26169
+ return createVNode(Fragment, null, [slots.default?.({
26170
+ model: internalModel,
26171
+ get actions() {
26172
+ actionsUsed = true;
26173
+ return actions;
26174
+ }
26175
+ }), !actionsUsed && actions]);
26176
+ });
26177
+ }
26178
+ });
26179
+
26180
+ // Types
26181
+
26182
+ // Types
26183
+
26184
+ const makeVEmptyStateProps = propsFactory({
26185
+ actionText: String,
26186
+ bgColor: String,
26187
+ color: String,
26188
+ icon: IconValue,
26189
+ image: String,
26190
+ justify: {
26191
+ type: String,
26192
+ default: 'center'
26193
+ },
26194
+ headline: String,
26195
+ title: String,
26196
+ text: String,
26197
+ textWidth: {
26198
+ type: [Number, String],
26199
+ default: 500
26200
+ },
26201
+ href: String,
26202
+ to: String,
26203
+ ...makeComponentProps(),
26204
+ ...makeDimensionProps(),
26205
+ ...makeSizeProps({
26206
+ size: undefined
26207
+ }),
26208
+ ...makeThemeProps()
26209
+ }, 'VEmptyState');
26210
+ const VEmptyState = genericComponent()({
26211
+ name: 'VEmptyState',
26212
+ props: makeVEmptyStateProps(),
26213
+ emits: {
26214
+ 'click:action': e => true
26215
+ },
26216
+ setup(props, _ref) {
26217
+ let {
26218
+ emit,
26219
+ slots
26220
+ } = _ref;
26221
+ const {
26222
+ themeClasses
26223
+ } = provideTheme(props);
26224
+ const {
26225
+ backgroundColorClasses,
26226
+ backgroundColorStyles
26227
+ } = useBackgroundColor(toRef(props, 'bgColor'));
26228
+ const {
26229
+ dimensionStyles
26230
+ } = useDimension(props);
26231
+ function onClickAction(e) {
26232
+ emit('click:action', e);
26233
+ }
26234
+ useRender(() => {
26235
+ const hasActions = !!(slots.actions || props.actionText);
26236
+ const hasHeadline = !!(slots.headline || props.headline);
26237
+ const hasTitle = !!(slots.title || props.title);
26238
+ const hasText = !!(slots.text || props.text);
26239
+ const hasMedia = !!(slots.media || props.image || props.icon);
26240
+ const size = props.size || (props.image ? 200 : 96);
26241
+ return createVNode("div", {
26242
+ "class": ['v-empty-state', {
26243
+ [`v-empty-state--${props.justify}`]: true
26244
+ }, themeClasses.value, backgroundColorClasses.value, props.class],
26245
+ "style": [backgroundColorStyles.value, dimensionStyles.value, props.style]
26246
+ }, [hasMedia && createVNode("div", {
26247
+ "key": "media",
26248
+ "class": "v-empty-state__media"
26249
+ }, [!slots.media ? createVNode(Fragment, null, [props.image ? createVNode(VImg, {
26250
+ "key": "image",
26251
+ "src": props.image,
26252
+ "height": size
26253
+ }, null) : props.icon ? createVNode(VIcon, {
26254
+ "key": "icon",
26255
+ "size": size,
26256
+ "icon": props.icon
26257
+ }, null) : undefined]) : createVNode(VDefaultsProvider, {
26258
+ "key": "media-defaults",
26259
+ "defaults": {
26260
+ VImg: {
26261
+ src: props.image,
26262
+ height: size
26263
+ },
26264
+ VIcon: {
26265
+ size,
26266
+ icon: props.icon
26267
+ }
26268
+ }
26269
+ }, {
26270
+ default: () => [slots.media()]
26271
+ })]), hasHeadline && createVNode("div", {
26272
+ "key": "headline",
26273
+ "class": "v-empty-state__headline"
26274
+ }, [slots.headline?.() ?? props.headline]), hasTitle && createVNode("div", {
26275
+ "key": "title",
26276
+ "class": "v-empty-state__title"
26277
+ }, [slots.title?.() ?? props.title]), hasText && createVNode("div", {
26278
+ "key": "text",
26279
+ "class": "v-empty-state__text",
26280
+ "style": {
26281
+ maxWidth: convertToUnit(props.textWidth)
26282
+ }
26283
+ }, [slots.text?.() ?? props.text]), slots.default && createVNode("div", {
26284
+ "key": "content",
26285
+ "class": "v-empty-state__content"
26286
+ }, [slots.default()]), hasActions && createVNode("div", {
26287
+ "key": "actions",
26288
+ "class": "v-empty-state__actions"
26289
+ }, [createVNode(VDefaultsProvider, {
26290
+ "defaults": {
26291
+ VBtn: {
26292
+ class: 'v-empty-state__action-btn',
26293
+ color: props.color,
26294
+ text: props.actionText
26295
+ }
26296
+ }
26297
+ }, {
26298
+ default: () => [slots.actions?.({
26299
+ props: {
26300
+ onClick: onClickAction
26301
+ }
26302
+ }) ?? createVNode(VBtn, {
26303
+ "onClick": onClickAction
26304
+ }, null)]
26305
+ })])]);
26306
+ });
26307
+ return {};
26308
+ }
26309
+ });
26310
+
26311
+ const makeVFabProps = propsFactory({
26312
+ app: Boolean,
26313
+ appear: Boolean,
26314
+ extended: Boolean,
26315
+ location: {
26316
+ type: String,
26317
+ default: 'bottom end'
26318
+ },
26319
+ offset: Boolean,
26320
+ modelValue: {
26321
+ type: Boolean,
26322
+ default: true
26323
+ },
26324
+ ...omit(makeVBtnProps({
25958
26325
  active: true
25959
26326
  }), ['location']),
25960
26327
  ...makeLayoutItemProps(),
@@ -26041,6 +26408,203 @@ const VFab = genericComponent()({
26041
26408
  }
26042
26409
  });
26043
26410
 
26411
+ // Types
26412
+
26413
+ const makeVNumberInputProps = propsFactory({
26414
+ controlVariant: {
26415
+ type: String,
26416
+ default: 'default'
26417
+ },
26418
+ inset: Boolean,
26419
+ hideInput: Boolean,
26420
+ min: Number,
26421
+ max: Number,
26422
+ step: Number,
26423
+ ...only(makeVInputProps(), ['density', 'disabled', 'focused', 'hideDetails', 'hint', 'label', 'persistentHint', 'readonly']),
26424
+ ...only(makeVFieldProps(), ['baseColor', 'bgColor', 'class', 'color', 'disabled', 'error', 'loading', 'reverse', 'rounded', 'style', 'theme', 'variant']),
26425
+ ...makeFocusProps()
26426
+ }, 'VNumberInput');
26427
+ const VNumberInput = genericComponent()({
26428
+ name: 'VNumberInput',
26429
+ inheritAttrs: false,
26430
+ props: {
26431
+ ...makeVNumberInputProps(),
26432
+ modelValue: {
26433
+ type: [Number, String],
26434
+ default: 0
26435
+ }
26436
+ },
26437
+ emits: {
26438
+ 'update:modelValue': val => true
26439
+ },
26440
+ setup(props, _ref) {
26441
+ let {
26442
+ attrs,
26443
+ emit,
26444
+ slots
26445
+ } = _ref;
26446
+ const model = useProxiedModel(props, 'modelValue');
26447
+ const {
26448
+ isFocused,
26449
+ focus,
26450
+ blur
26451
+ } = useFocus(props);
26452
+ const inputRef = ref();
26453
+ function onFocus() {
26454
+ if (!isFocused.value) focus();
26455
+ }
26456
+ const controlVariant = computed(() => {
26457
+ return props.hideInput ? 'stacked' : props.controlVariant;
26458
+ });
26459
+ function toggleUpDown() {
26460
+ let increment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
26461
+ if (increment) {
26462
+ inputRef.value?.stepUp();
26463
+ } else {
26464
+ inputRef.value?.stepDown();
26465
+ }
26466
+ if (inputRef.value) model.value = parseInt(inputRef.value.value, 10);
26467
+ }
26468
+ function onClickUp() {
26469
+ toggleUpDown();
26470
+ }
26471
+ function onClickDown() {
26472
+ toggleUpDown(false);
26473
+ }
26474
+ const incrementSlotProps = computed(() => ({
26475
+ click: onClickUp
26476
+ }));
26477
+ const decrementSlotProps = computed(() => ({
26478
+ click: onClickDown
26479
+ }));
26480
+ useRender(() => {
26481
+ const fieldProps = filterFieldProps(props);
26482
+ const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
26483
+ const {
26484
+ modelValue: _,
26485
+ ...inputProps
26486
+ } = VInput.filterProps(props);
26487
+ function controlNode() {
26488
+ const defaultHeight = controlVariant.value === 'stacked' ? 'auto' : '100%';
26489
+ return createVNode("div", {
26490
+ "class": "v-number-input__control"
26491
+ }, [!slots.decrement ? createVNode(VBtn, {
26492
+ "flat": true,
26493
+ "key": "decrement-btn",
26494
+ "height": defaultHeight,
26495
+ "icon": "mdi-chevron-down",
26496
+ "rounded": "0",
26497
+ "size": "small",
26498
+ "onClick": onClickDown
26499
+ }, null) : createVNode(VDefaultsProvider, {
26500
+ "key": "decrement-defaults",
26501
+ "defaults": {
26502
+ VBtn: {
26503
+ flat: true,
26504
+ rounded: '0',
26505
+ height: defaultHeight,
26506
+ size: 'small',
26507
+ icon: 'mdi-chevron-down'
26508
+ }
26509
+ }
26510
+ }, {
26511
+ default: () => [slots.decrement(decrementSlotProps.value)]
26512
+ }), createVNode(VDivider, {
26513
+ "vertical": controlVariant.value !== 'stacked'
26514
+ }, null), !slots.increment ? createVNode(VBtn, {
26515
+ "flat": true,
26516
+ "key": "increment-btn",
26517
+ "height": defaultHeight,
26518
+ "icon": "mdi-chevron-up",
26519
+ "onClick": onClickUp,
26520
+ "rounded": "0",
26521
+ "size": "small"
26522
+ }, null) : createVNode(VDefaultsProvider, {
26523
+ "key": "increment-defaults",
26524
+ "defaults": {
26525
+ VBtn: {
26526
+ flat: true,
26527
+ height: defaultHeight,
26528
+ rounded: '0',
26529
+ size: 'small',
26530
+ icon: 'mdi-chevron-up'
26531
+ }
26532
+ }
26533
+ }, {
26534
+ default: () => [slots.increment(incrementSlotProps.value)]
26535
+ })]);
26536
+ }
26537
+ function dividerNode() {
26538
+ return !props.hideInput && !props.inset ? createVNode(VDivider, {
26539
+ "vertical": true
26540
+ }, null) : undefined;
26541
+ }
26542
+ return createVNode(VInput, mergeProps({
26543
+ "class": ['v-number-input', {
26544
+ 'v-number-input--default': controlVariant.value === 'default',
26545
+ 'v-number-input--hide-input': props.hideInput,
26546
+ 'v-number-input--inset': props.inset,
26547
+ 'v-number-input--reverse': props.reverse,
26548
+ 'v-number-input--split': controlVariant.value === 'split',
26549
+ 'v-number-input--stacked': controlVariant.value === 'stacked'
26550
+ }, props.class]
26551
+ }, rootAttrs, inputProps, {
26552
+ "focused": isFocused.value,
26553
+ "style": props.style
26554
+ }), {
26555
+ ...slots,
26556
+ default: () => createVNode(VField, mergeProps(fieldProps, {
26557
+ "active": true,
26558
+ "focused": isFocused.value
26559
+ }), {
26560
+ ...slots,
26561
+ default: _ref2 => {
26562
+ let {
26563
+ props: {
26564
+ class: fieldClass,
26565
+ ...slotProps
26566
+ }
26567
+ } = _ref2;
26568
+ return createVNode("input", mergeProps({
26569
+ "ref": inputRef,
26570
+ "type": "number",
26571
+ "value": model.value,
26572
+ "class": fieldClass,
26573
+ "max": props.max,
26574
+ "min": props.min,
26575
+ "step": props.step,
26576
+ "onFocus": onFocus,
26577
+ "onBlur": blur
26578
+ }, inputAttrs), null);
26579
+ },
26580
+ 'append-inner': controlVariant.value === 'split' ? () => createVNode("div", {
26581
+ "class": "v-number-input__control"
26582
+ }, [createVNode(VDivider, {
26583
+ "vertical": true
26584
+ }, null), createVNode(VBtn, {
26585
+ "flat": true,
26586
+ "height": "100%",
26587
+ "icon": "mdi-plus",
26588
+ "tile": true,
26589
+ "onClick": onClickUp
26590
+ }, null)]) : !props.reverse ? () => createVNode(Fragment, null, [dividerNode(), controlNode()]) : undefined,
26591
+ 'prepend-inner': controlVariant.value === 'split' ? () => createVNode("div", {
26592
+ "class": "v-number-input__control"
26593
+ }, [createVNode(VBtn, {
26594
+ "flat": true,
26595
+ "height": "100%",
26596
+ "icon": "mdi-minus",
26597
+ "tile": true,
26598
+ "onClick": onClickDown
26599
+ }, null), createVNode(VDivider, {
26600
+ "vertical": true
26601
+ }, null)]) : props.reverse ? () => createVNode(Fragment, null, [controlNode(), dividerNode()]) : undefined
26602
+ })
26603
+ });
26604
+ });
26605
+ }
26606
+ });
26607
+
26044
26608
  // Utilities
26045
26609
 
26046
26610
  // Types
@@ -26488,6 +27052,8 @@ const VSparkline = genericComponent()({
26488
27052
  }
26489
27053
  });
26490
27054
 
27055
+ // Types
27056
+
26491
27057
  const makeVSpeedDialProps = propsFactory({
26492
27058
  ...makeComponentProps(),
26493
27059
  ...makeVMenuProps({
@@ -26506,14 +27072,17 @@ const VSpeedDial = genericComponent()({
26506
27072
  let {
26507
27073
  slots
26508
27074
  } = _ref;
27075
+ const menuRef = ref();
26509
27076
  useRender(() => {
26510
27077
  const menuProps = VMenu.filterProps(props);
26511
27078
  return createVNode(VMenu, mergeProps(menuProps, {
26512
27079
  "class": props.class,
26513
27080
  "style": props.style,
26514
- "contentClass": "v-speed-dial__content"
27081
+ "contentClass": "v-speed-dial__content",
27082
+ "ref": menuRef
26515
27083
  }), {
26516
- default: () => [createVNode(VDefaultsProvider, {
27084
+ ...slots,
27085
+ default: slotProps => createVNode(VDefaultsProvider, {
26517
27086
  "defaults": {
26518
27087
  VBtn: {
26519
27088
  size: 'small'
@@ -26525,9 +27094,9 @@ const VSpeedDial = genericComponent()({
26525
27094
  "group": true,
26526
27095
  "transition": props.transition
26527
27096
  }, {
26528
- default: () => [slots.default?.()]
27097
+ default: () => [slots.default?.(slotProps)]
26529
27098
  })]
26530
- })]
27099
+ })
26531
27100
  });
26532
27101
  });
26533
27102
  return {};
@@ -26536,132 +27105,358 @@ const VSpeedDial = genericComponent()({
26536
27105
 
26537
27106
  // Types
26538
27107
 
27108
+ const makeVTreeviewGroupProps = propsFactory({
27109
+ ...omit(makeVListGroupProps({
27110
+ collapseIcon: '$treeviewCollapse',
27111
+ expandIcon: '$treeviewExpand'
27112
+ }), ['subgroup'])
27113
+ }, 'VTreeviewGroup');
27114
+ const VTreeviewGroup = genericComponent()({
27115
+ name: 'VTreeviewGroup',
27116
+ props: makeVTreeviewGroupProps(),
27117
+ setup(props, _ref) {
27118
+ let {
27119
+ slots
27120
+ } = _ref;
27121
+ const vListGroupRef = ref();
27122
+ const toggleIcon = computed(() => vListGroupRef.value?.isOpen ? props.collapseIcon : props.expandIcon);
27123
+ const activatorDefaults = computed(() => ({
27124
+ VTreeviewItem: {
27125
+ prependIcon: undefined,
27126
+ appendIcon: undefined,
27127
+ active: vListGroupRef.value?.isOpen,
27128
+ toggleIcon: toggleIcon.value
27129
+ }
27130
+ }));
27131
+ useRender(() => {
27132
+ const listGroupProps = VListGroup.filterProps(props);
27133
+ return createVNode(VListGroup, mergeProps(listGroupProps, {
27134
+ "ref": vListGroupRef,
27135
+ "class": ['v-treeview-group', props.class],
27136
+ "subgroup": true
27137
+ }), {
27138
+ ...slots,
27139
+ activator: slots.activator ? slotProps => createVNode(Fragment, null, [createVNode(VDefaultsProvider, {
27140
+ "defaults": activatorDefaults.value
27141
+ }, {
27142
+ default: () => [slots.activator?.(slotProps)]
27143
+ })]) : undefined
27144
+ });
27145
+ });
27146
+ return {};
27147
+ }
27148
+ });
27149
+
26539
27150
  // Types
26540
27151
 
26541
- const makeVEmptyStateProps = propsFactory({
26542
- actionText: String,
26543
- bgColor: String,
26544
- color: String,
26545
- icon: IconValue,
26546
- image: String,
26547
- justify: {
27152
+ const VTreeviewSymbol = Symbol.for('vuetify:v-treeview');
27153
+
27154
+ const makeVTreeviewItemProps = propsFactory({
27155
+ loading: Boolean,
27156
+ toggleIcon: IconValue,
27157
+ ...makeVListItemProps({
27158
+ slim: true
27159
+ })
27160
+ }, 'VTreeviewItem');
27161
+ const VTreeviewItem = genericComponent()({
27162
+ name: 'VTreeviewItem',
27163
+ props: makeVTreeviewItemProps(),
27164
+ setup(props, _ref) {
27165
+ let {
27166
+ attrs,
27167
+ slots,
27168
+ emit
27169
+ } = _ref;
27170
+ const link = useLink(props, attrs);
27171
+ const id = computed(() => props.value === undefined ? link.href.value : props.value);
27172
+ const vListItemRef = ref();
27173
+ const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!vListItemRef.value?.list));
27174
+ function onClick(e) {
27175
+ if (!vListItemRef.value?.isGroupActivator || !isClickable.value) return;
27176
+ props.value != null && vListItemRef.value?.select(!vListItemRef.value?.isSelected, e);
27177
+ }
27178
+ function onKeyDown(e) {
27179
+ if (e.key === 'Enter' || e.key === ' ') {
27180
+ e.preventDefault();
27181
+ onClick(e);
27182
+ }
27183
+ }
27184
+ const visibleIds = inject$1(VTreeviewSymbol, {
27185
+ visibleIds: ref()
27186
+ }).visibleIds;
27187
+ useRender(() => {
27188
+ const listItemProps = VListItem.filterProps(props);
27189
+ const hasPrepend = slots.prepend || props.toggleIcon;
27190
+ return createVNode(VListItem, mergeProps({
27191
+ "ref": vListItemRef
27192
+ }, listItemProps, {
27193
+ "class": ['v-treeview-item', {
27194
+ 'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(id.value)
27195
+ }, props.class],
27196
+ "onClick": onClick,
27197
+ "onKeydown": isClickable.value && onKeyDown
27198
+ }), {
27199
+ ...slots,
27200
+ prepend: hasPrepend ? slotProps => {
27201
+ return createVNode(Fragment, null, [props.toggleIcon && createVNode(VListItemAction, {
27202
+ "start": false
27203
+ }, {
27204
+ default: () => [createVNode(VBtn, {
27205
+ "density": "compact",
27206
+ "icon": props.toggleIcon,
27207
+ "loading": props.loading,
27208
+ "variant": "text"
27209
+ }, {
27210
+ loader() {
27211
+ return createVNode(VProgressCircular, {
27212
+ "indeterminate": "disable-shrink",
27213
+ "size": "20",
27214
+ "width": "2"
27215
+ }, null);
27216
+ }
27217
+ })]
27218
+ }), slots.prepend?.(slotProps)]);
27219
+ } : undefined
27220
+ });
27221
+ });
27222
+ return {};
27223
+ }
27224
+ });
27225
+
27226
+ // Types
27227
+
27228
+ const makeVTreeviewChildrenProps = propsFactory({
27229
+ loadChildren: Function,
27230
+ loadingIcon: {
26548
27231
  type: String,
26549
- default: 'center'
26550
- },
26551
- headline: String,
26552
- title: String,
26553
- text: String,
26554
- textWidth: {
26555
- type: [Number, String],
26556
- default: 500
27232
+ default: '$loading'
26557
27233
  },
26558
- href: String,
26559
- to: String,
26560
- ...makeComponentProps(),
26561
- ...makeDimensionProps(),
26562
- ...makeSizeProps({
26563
- size: undefined
27234
+ items: Array,
27235
+ selectable: Boolean
27236
+ }, 'VTreeviewChildren');
27237
+ const VTreeviewChildren = genericComponent()({
27238
+ name: 'VTreeviewChildren',
27239
+ props: makeVTreeviewChildrenProps(),
27240
+ setup(props, _ref) {
27241
+ let {
27242
+ emit,
27243
+ slots
27244
+ } = _ref;
27245
+ const isLoading = shallowRef(false);
27246
+ const hasLoaded = shallowRef(false);
27247
+ function checkChildren(item) {
27248
+ return new Promise(resolve => {
27249
+ if (!props.items?.length || !props.loadChildren || hasLoaded.value) return resolve();
27250
+ isLoading.value = true;
27251
+ props.loadChildren(item).then(resolve);
27252
+ }).then(() => {
27253
+ hasLoaded.value = true;
27254
+ }).finally(() => {
27255
+ isLoading.value = false;
27256
+ });
27257
+ }
27258
+ function onClick(e, item) {
27259
+ e.stopPropagation();
27260
+ checkChildren(item);
27261
+ }
27262
+ return () => slots.default?.() ?? props.items?.map(_ref2 => {
27263
+ let {
27264
+ children,
27265
+ props: itemProps,
27266
+ raw: item
27267
+ } = _ref2;
27268
+ const slotsWithItem = {
27269
+ prepend: slots.prepend ? slotProps => slots.prepend?.({
27270
+ ...slotProps,
27271
+ item
27272
+ }) : props.selectable ? _ref3 => {
27273
+ let {
27274
+ isSelected,
27275
+ isIndeterminate
27276
+ } = _ref3;
27277
+ return createVNode(VCheckboxBtn, {
27278
+ "key": item.value,
27279
+ "tabindex": "-1",
27280
+ "modelValue": isSelected,
27281
+ "loading": isLoading.value,
27282
+ "indeterminate": isIndeterminate,
27283
+ "onClick": e => onClick(e, item)
27284
+ }, null);
27285
+ } : undefined,
27286
+ append: slots.append ? slotProps => slots.append?.({
27287
+ ...slotProps,
27288
+ item
27289
+ }) : undefined,
27290
+ title: slots.title ? slotProps => slots.title?.({
27291
+ ...slotProps,
27292
+ item
27293
+ }) : undefined
27294
+ };
27295
+ const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps);
27296
+ const treeviewChildrenProps = VTreeviewChildren.filterProps(props);
27297
+ return children ? createVNode(VTreeviewGroup, mergeProps({
27298
+ "value": itemProps?.value
27299
+ }, treeviewGroupProps), {
27300
+ activator: _ref4 => {
27301
+ let {
27302
+ props: activatorProps
27303
+ } = _ref4;
27304
+ return createVNode(VTreeviewItem, mergeProps(itemProps, activatorProps, {
27305
+ "loading": isLoading.value,
27306
+ "onClick": e => onClick(e, item)
27307
+ }), slotsWithItem);
27308
+ },
27309
+ default: () => createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
27310
+ "items": children
27311
+ }), slots)
27312
+ }) : slots.item?.({
27313
+ props: itemProps
27314
+ }) ?? createVNode(VTreeviewItem, itemProps, slotsWithItem);
27315
+ });
27316
+ }
27317
+ });
27318
+
27319
+ function flatten(items) {
27320
+ let flat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
27321
+ for (const item of items) {
27322
+ flat.push(item);
27323
+ if (item.children) flatten(item.children, flat);
27324
+ }
27325
+ return flat;
27326
+ }
27327
+ const makeVTreeviewProps = propsFactory({
27328
+ openAll: Boolean,
27329
+ search: String,
27330
+ ...makeFilterProps({
27331
+ filterKeys: ['title']
26564
27332
  }),
26565
- ...makeThemeProps()
26566
- }, 'VEmptyState');
26567
- const VEmptyState = genericComponent()({
26568
- name: 'VEmptyState',
26569
- props: makeVEmptyStateProps(),
27333
+ ...makeVTreeviewChildrenProps(),
27334
+ ...omit(makeVListProps({
27335
+ collapseIcon: '$treeviewCollapse',
27336
+ expandIcon: '$treeviewExpand',
27337
+ selectStrategy: 'independent',
27338
+ openStrategy: 'multiple',
27339
+ slim: true
27340
+ }), ['nav'])
27341
+ }, 'VTreeview');
27342
+ const VTreeview = genericComponent()({
27343
+ name: 'VTreeview',
27344
+ props: makeVTreeviewProps(),
26570
27345
  emits: {
26571
- 'click:action': e => true
27346
+ 'update:opened': val => true,
27347
+ 'update:activated': val => true,
27348
+ 'update:selected': val => true,
27349
+ 'click:open': value => true,
27350
+ 'click:select': value => true
26572
27351
  },
26573
27352
  setup(props, _ref) {
26574
27353
  let {
26575
- emit,
26576
27354
  slots
26577
27355
  } = _ref;
26578
27356
  const {
26579
- themeClasses
26580
- } = provideTheme(props);
26581
- const {
26582
- backgroundColorClasses,
26583
- backgroundColorStyles
26584
- } = useBackgroundColor(toRef(props, 'bgColor'));
27357
+ items
27358
+ } = useListItems(props);
27359
+ const activeColor = toRef(props, 'activeColor');
27360
+ const baseColor = toRef(props, 'baseColor');
27361
+ const color = toRef(props, 'color');
27362
+ const opened = useProxiedModel(props, 'opened');
27363
+ const activated = useProxiedModel(props, 'activated');
27364
+ const selected = useProxiedModel(props, 'selected');
27365
+ const vListRef = ref();
27366
+ const flatItems = computed(() => flatten(items.value));
27367
+ const search = toRef(props, 'search');
26585
27368
  const {
26586
- dimensionStyles
26587
- } = useDimension(props);
26588
- function onClickAction(e) {
26589
- emit('click:action', e);
27369
+ filteredItems
27370
+ } = useFilter(props, flatItems, search);
27371
+ const visibleIds = computed(() => {
27372
+ if (!search.value) {
27373
+ return null;
27374
+ }
27375
+ return new Set(filteredItems.value.flatMap(item => {
27376
+ return [...getPath(item.props.value), ...getChildren(item.props.value)];
27377
+ }));
27378
+ });
27379
+ function getPath(id) {
27380
+ const path = [];
27381
+ let parent = id;
27382
+ while (parent != null) {
27383
+ path.unshift(parent);
27384
+ parent = vListRef.value?.parents.get(parent);
27385
+ }
27386
+ return path;
26590
27387
  }
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
- }
27388
+ function getChildren(id) {
27389
+ const arr = [];
27390
+ const queue = (vListRef.value?.children.get(id) ?? []).slice();
27391
+ while (queue.length) {
27392
+ const child = queue.shift();
27393
+ if (!child) continue;
27394
+ arr.push(child);
27395
+ queue.push(...(vListRef.value?.children.get(child) ?? []).slice());
27396
+ }
27397
+ return arr;
27398
+ }
27399
+ watch(() => props.openAll, val => {
27400
+ opened.value = val ? openAll(items.value) : [];
27401
+ }, {
27402
+ immediate: true
27403
+ });
27404
+ function openAll(item) {
27405
+ let ids = [];
27406
+ for (const i of item) {
27407
+ if (!i.children) continue;
27408
+ ids.push(i.value);
27409
+ if (i.children) {
27410
+ ids = ids.concat(openAll(i.children));
26653
27411
  }
26654
- }, {
26655
- default: () => [slots.actions?.({
26656
- props: {
26657
- onClick: onClickAction
26658
- }
26659
- }) ?? createVNode(VBtn, {
26660
- "onClick": onClickAction
26661
- }, null)]
26662
- })])]);
27412
+ }
27413
+ return ids;
27414
+ }
27415
+ provide(VTreeviewSymbol, {
27416
+ visibleIds
26663
27417
  });
26664
- return {};
27418
+ provideDefaults({
27419
+ VTreeviewGroup: {
27420
+ activeColor,
27421
+ baseColor,
27422
+ color,
27423
+ collapseIcon: toRef(props, 'collapseIcon'),
27424
+ expandIcon: toRef(props, 'expandIcon')
27425
+ },
27426
+ VTreeviewItem: {
27427
+ activeClass: toRef(props, 'activeClass'),
27428
+ activeColor,
27429
+ baseColor,
27430
+ color,
27431
+ density: toRef(props, 'density'),
27432
+ disabled: toRef(props, 'disabled'),
27433
+ lines: toRef(props, 'lines'),
27434
+ variant: toRef(props, 'variant')
27435
+ }
27436
+ });
27437
+ useRender(() => {
27438
+ const listProps = VList.filterProps(props);
27439
+ const treeviewChildrenProps = VTreeviewChildren.filterProps(props);
27440
+ return createVNode(VList, mergeProps({
27441
+ "ref": vListRef
27442
+ }, listProps, {
27443
+ "class": ['v-treeview', props.class],
27444
+ "style": props.style,
27445
+ "opened": opened.value,
27446
+ "onUpdate:opened": $event => opened.value = $event,
27447
+ "activated": activated.value,
27448
+ "onUpdate:activated": $event => activated.value = $event,
27449
+ "selected": selected.value,
27450
+ "onUpdate:selected": $event => selected.value = $event
27451
+ }), {
27452
+ default: () => [createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
27453
+ "items": items.value
27454
+ }), slots)]
27455
+ });
27456
+ });
27457
+ return {
27458
+ open
27459
+ };
26665
27460
  }
26666
27461
  });
26667
27462
 
@@ -26777,6 +27572,7 @@ var components = /*#__PURE__*/Object.freeze({
26777
27572
  VMessages: VMessages,
26778
27573
  VNavigationDrawer: VNavigationDrawer,
26779
27574
  VNoSsr: VNoSsr,
27575
+ VNumberInput: VNumberInput,
26780
27576
  VOtpInput: VOtpInput,
26781
27577
  VOverlay: VOverlay,
26782
27578
  VPagination: VPagination,
@@ -26833,6 +27629,9 @@ var components = /*#__PURE__*/Object.freeze({
26833
27629
  VToolbarItems: VToolbarItems,
26834
27630
  VToolbarTitle: VToolbarTitle,
26835
27631
  VTooltip: VTooltip,
27632
+ VTreeview: VTreeview,
27633
+ VTreeviewGroup: VTreeviewGroup,
27634
+ VTreeviewItem: VTreeviewItem,
26836
27635
  VValidation: VValidation,
26837
27636
  VVirtualScroll: VVirtualScroll,
26838
27637
  VWindow: VWindow,
@@ -27059,7 +27858,7 @@ function createVuetify$1() {
27059
27858
  goTo
27060
27859
  };
27061
27860
  }
27062
- const version$1 = "3.5.8";
27861
+ const version$1 = "3.5.10";
27063
27862
  createVuetify$1.version = version$1;
27064
27863
 
27065
27864
  // Vue's inject() can only be used in setup
@@ -27071,9 +27870,248 @@ function inject(key) {
27071
27870
  }
27072
27871
  }
27073
27872
 
27873
+ // Icons
27874
+
27875
+ // Types
27876
+
27877
+ const md1 = {
27878
+ defaults: {
27879
+ global: {
27880
+ rounded: 'sm'
27881
+ },
27882
+ VAvatar: {
27883
+ rounded: 'circle'
27884
+ },
27885
+ VAutocomplete: {
27886
+ variant: 'underlined'
27887
+ },
27888
+ VBanner: {
27889
+ color: 'primary'
27890
+ },
27891
+ VBtn: {
27892
+ color: 'primary',
27893
+ rounded: 0
27894
+ },
27895
+ VCheckbox: {
27896
+ color: 'secondary'
27897
+ },
27898
+ VCombobox: {
27899
+ variant: 'underlined'
27900
+ },
27901
+ VSelect: {
27902
+ variant: 'underlined'
27903
+ },
27904
+ VSlider: {
27905
+ color: 'primary'
27906
+ },
27907
+ VTabs: {
27908
+ color: 'primary'
27909
+ },
27910
+ VTextarea: {
27911
+ variant: 'underlined'
27912
+ },
27913
+ VTextField: {
27914
+ variant: 'underlined'
27915
+ },
27916
+ VToolbar: {
27917
+ VBtn: {
27918
+ color: null
27919
+ }
27920
+ }
27921
+ },
27922
+ icons: {
27923
+ defaultSet: 'mdi',
27924
+ sets: {
27925
+ mdi
27926
+ }
27927
+ },
27928
+ theme: {
27929
+ themes: {
27930
+ light: {
27931
+ colors: {
27932
+ primary: '#3F51B5',
27933
+ 'primary-darken-1': '#303F9F',
27934
+ 'primary-lighten-1': '#C5CAE9',
27935
+ secondary: '#FF4081',
27936
+ 'secondary-darken-1': '#F50057',
27937
+ 'secondary-lighten-1': '#FF80AB',
27938
+ accent: '#009688'
27939
+ }
27940
+ }
27941
+ }
27942
+ }
27943
+ };
27944
+
27945
+ // Icons
27946
+
27947
+ // Types
27948
+
27949
+ const md2 = {
27950
+ defaults: {
27951
+ global: {
27952
+ rounded: 'md'
27953
+ },
27954
+ VAvatar: {
27955
+ rounded: 'circle'
27956
+ },
27957
+ VAutocomplete: {
27958
+ variant: 'filled'
27959
+ },
27960
+ VBanner: {
27961
+ color: 'primary'
27962
+ },
27963
+ VBtn: {
27964
+ color: 'primary'
27965
+ },
27966
+ VCheckbox: {
27967
+ color: 'secondary'
27968
+ },
27969
+ VCombobox: {
27970
+ variant: 'filled'
27971
+ },
27972
+ VSelect: {
27973
+ variant: 'filled'
27974
+ },
27975
+ VSlider: {
27976
+ color: 'primary'
27977
+ },
27978
+ VTabs: {
27979
+ color: 'primary'
27980
+ },
27981
+ VTextarea: {
27982
+ variant: 'filled'
27983
+ },
27984
+ VTextField: {
27985
+ variant: 'filled'
27986
+ },
27987
+ VToolbar: {
27988
+ VBtn: {
27989
+ color: null
27990
+ }
27991
+ }
27992
+ },
27993
+ icons: {
27994
+ defaultSet: 'mdi',
27995
+ sets: {
27996
+ mdi
27997
+ }
27998
+ },
27999
+ theme: {
28000
+ themes: {
28001
+ light: {
28002
+ colors: {
28003
+ primary: '#6200EE',
28004
+ 'primary-darken-1': '#3700B3',
28005
+ secondary: '#03DAC6',
28006
+ 'secondary-darken-1': '#018786',
28007
+ error: '#B00020'
28008
+ }
28009
+ }
28010
+ }
28011
+ }
28012
+ };
28013
+
28014
+ // Icons
28015
+
28016
+ // Types
28017
+
28018
+ const md3 = {
28019
+ defaults: {
28020
+ VAppBar: {
28021
+ flat: true
28022
+ },
28023
+ VAutocomplete: {
28024
+ variant: 'filled'
28025
+ },
28026
+ VBanner: {
28027
+ color: 'primary'
28028
+ },
28029
+ VBottomSheet: {
28030
+ contentClass: 'rounded-t-xl overflow-hidden'
28031
+ },
28032
+ VBtn: {
28033
+ color: 'primary',
28034
+ rounded: 'xl'
28035
+ },
28036
+ VBtnGroup: {
28037
+ rounded: 'xl',
28038
+ VBtn: {
28039
+ rounded: null
28040
+ }
28041
+ },
28042
+ VCard: {
28043
+ rounded: 'lg'
28044
+ },
28045
+ VCheckbox: {
28046
+ color: 'secondary',
28047
+ inset: true
28048
+ },
28049
+ VChip: {
28050
+ rounded: 'sm'
28051
+ },
28052
+ VCombobox: {
28053
+ variant: 'filled'
28054
+ },
28055
+ VNavigationDrawer: {
28056
+ // VList: {
28057
+ // nav: true,
28058
+ // VListItem: {
28059
+ // rounded: 'xl',
28060
+ // },
28061
+ // },
28062
+ },
28063
+ VSelect: {
28064
+ variant: 'filled'
28065
+ },
28066
+ VSlider: {
28067
+ color: 'primary'
28068
+ },
28069
+ VTabs: {
28070
+ color: 'primary'
28071
+ },
28072
+ VTextarea: {
28073
+ variant: 'filled'
28074
+ },
28075
+ VTextField: {
28076
+ variant: 'filled'
28077
+ },
28078
+ VToolbar: {
28079
+ VBtn: {
28080
+ color: null
28081
+ }
28082
+ }
28083
+ },
28084
+ icons: {
28085
+ defaultSet: 'mdi',
28086
+ sets: {
28087
+ mdi
28088
+ }
28089
+ },
28090
+ theme: {
28091
+ themes: {
28092
+ light: {
28093
+ colors: {
28094
+ primary: '#6750a4',
28095
+ secondary: '#b4b0bb',
28096
+ tertiary: '#7d5260',
28097
+ error: '#b3261e',
28098
+ surface: '#fffbfe'
28099
+ }
28100
+ }
28101
+ }
28102
+ }
28103
+ };
28104
+
28105
+ var index = /*#__PURE__*/Object.freeze({
28106
+ __proto__: null,
28107
+ md1: md1,
28108
+ md2: md2,
28109
+ md3: md3
28110
+ });
28111
+
27074
28112
  /* eslint-disable local-rules/sort-imports */
27075
28113
 
27076
- const version = "3.5.8";
28114
+ const version = "3.5.10";
27077
28115
 
27078
28116
  /* eslint-disable local-rules/sort-imports */
27079
28117
 
@@ -27086,5 +28124,5 @@ const createVuetify = function () {
27086
28124
  });
27087
28125
  };
27088
28126
 
27089
- export { components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
28127
+ export { index as blueprints, components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
27090
28128
  //# sourceMappingURL=vuetify-labs.esm.js.map