vuetify 3.3.2 → 3.3.4

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 (356) hide show
  1. package/dist/_component-variables-labs.sass +2 -0
  2. package/dist/json/attributes.json +460 -20
  3. package/dist/json/importMap-labs.json +32 -0
  4. package/dist/json/importMap.json +24 -24
  5. package/dist/json/tags.json +150 -0
  6. package/dist/json/web-types.json +1639 -40
  7. package/dist/vuetify-labs.css +499 -230
  8. package/dist/vuetify-labs.d.ts +5421 -326
  9. package/dist/vuetify-labs.esm.js +2124 -1098
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +2123 -1097
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +219 -210
  14. package/dist/vuetify.d.ts +314 -165
  15. package/dist/vuetify.esm.js +330 -179
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +329 -178
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +792 -784
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/blueprints/index.d.mts +34 -27
  23. package/lib/blueprints/md1.d.mts +34 -27
  24. package/lib/blueprints/md2.d.mts +34 -27
  25. package/lib/blueprints/md3.d.mts +34 -27
  26. package/lib/components/VAppBar/VAppBar.mjs +3 -10
  27. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  28. package/lib/components/VAppBar/index.d.mts +24 -8
  29. package/lib/components/VAutocomplete/VAutocomplete.css +4 -22
  30. package/lib/components/VAutocomplete/VAutocomplete.mjs +17 -12
  31. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  32. package/lib/components/VAutocomplete/VAutocomplete.sass +6 -17
  33. package/lib/components/VBreadcrumbs/index.d.mts +7 -7
  34. package/lib/components/VBtn/VBtn.css +11 -11
  35. package/lib/components/VBtn/VBtn.mjs +1 -1
  36. package/lib/components/VBtn/VBtn.mjs.map +1 -1
  37. package/lib/components/VBtn/VBtn.sass +1 -1
  38. package/lib/components/VBtn/_mixins.scss +1 -1
  39. package/lib/components/VBtn/index.d.mts +24 -8
  40. package/lib/components/VCard/VCard.mjs +1 -1
  41. package/lib/components/VCard/VCard.mjs.map +1 -1
  42. package/lib/components/VCard/index.d.mts +44 -28
  43. package/lib/components/VCheckbox/VCheckbox.mjs +8 -1
  44. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  45. package/lib/components/VCheckbox/index.d.mts +7 -1
  46. package/lib/components/VChip/VChip.css +67 -67
  47. package/lib/components/VChip/VChip.mjs +2 -2
  48. package/lib/components/VChip/VChip.mjs.map +1 -1
  49. package/lib/components/VChip/_variables.scss +1 -1
  50. package/lib/components/VChip/index.d.mts +48 -32
  51. package/lib/components/VCombobox/VCombobox.css +4 -22
  52. package/lib/components/VCombobox/VCombobox.mjs +16 -8
  53. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  54. package/lib/components/VCombobox/VCombobox.sass +6 -17
  55. package/lib/components/VCombobox/_variables.scss +3 -3
  56. package/lib/components/VCounter/index.d.mts +8 -8
  57. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +1 -1
  58. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
  59. package/lib/components/VExpansionPanel/index.d.mts +56 -24
  60. package/lib/components/VField/VField.css +72 -8
  61. package/lib/components/VField/VField.sass +10 -5
  62. package/lib/components/VField/_mixins.sass +7 -0
  63. package/lib/components/VFileInput/VFileInput.css +2 -17
  64. package/lib/components/VFileInput/VFileInput.mjs +0 -2
  65. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  66. package/lib/components/VFileInput/VFileInput.sass +2 -11
  67. package/lib/components/VFileInput/_variables.scss +3 -3
  68. package/lib/components/VIcon/VIcon.mjs +2 -2
  69. package/lib/components/VIcon/VIcon.mjs.map +1 -1
  70. package/lib/components/VInput/VInput.css +14 -1
  71. package/lib/components/VInput/VInput.sass +6 -0
  72. package/lib/components/VInput/_variables.scss +5 -1
  73. package/lib/components/VList/VListItem.mjs +2 -2
  74. package/lib/components/VList/VListItem.mjs.map +1 -1
  75. package/lib/components/VList/index.d.mts +24 -8
  76. package/lib/components/VMenu/VMenu.mjs +29 -3
  77. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  78. package/lib/components/VOverlay/VOverlay.mjs +7 -4
  79. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  80. package/lib/components/VOverlay/useActivator.mjs +29 -35
  81. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  82. package/lib/components/VSelect/VSelect.css +2 -20
  83. package/lib/components/VSelect/VSelect.mjs +16 -11
  84. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  85. package/lib/components/VSelect/VSelect.sass +2 -12
  86. package/lib/components/VSelect/_variables.scss +3 -3
  87. package/lib/components/VSlider/VSliderThumb.mjs +2 -2
  88. package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
  89. package/lib/components/VTabs/VTab.mjs +2 -2
  90. package/lib/components/VTabs/VTab.mjs.map +1 -1
  91. package/lib/components/VTabs/VTabs.css +1 -0
  92. package/lib/components/VTabs/VTabs.sass +1 -0
  93. package/lib/components/VTabs/index.d.mts +24 -8
  94. package/lib/components/VTextarea/VTextarea.css +7 -7
  95. package/lib/components/VTextarea/VTextarea.sass +9 -9
  96. package/lib/components/VTimePicker/VTimePickerTitle.mjs +1 -1
  97. package/lib/components/index.d.mts +266 -132
  98. package/lib/components/index.mjs +1 -2
  99. package/lib/components/index.mjs.map +1 -1
  100. package/lib/composables/icons.mjs.map +1 -1
  101. package/lib/composables/list-items.mjs +5 -2
  102. package/lib/composables/list-items.mjs.map +1 -1
  103. package/lib/composables/nested/nested.mjs +1 -1
  104. package/lib/composables/nested/nested.mjs.map +1 -1
  105. package/lib/composables/theme.mjs +1 -1
  106. package/lib/composables/theme.mjs.map +1 -1
  107. package/lib/entry-bundler.mjs +1 -1
  108. package/lib/framework.mjs +1 -1
  109. package/lib/iconsets/fa-svg.d.mts +1 -0
  110. package/lib/iconsets/fa.d.mts +1 -0
  111. package/lib/iconsets/fa.mjs +2 -1
  112. package/lib/iconsets/fa.mjs.map +1 -1
  113. package/lib/iconsets/fa4.d.mts +1 -0
  114. package/lib/iconsets/fa4.mjs +2 -1
  115. package/lib/iconsets/fa4.mjs.map +1 -1
  116. package/lib/iconsets/md.d.mts +1 -0
  117. package/lib/iconsets/md.mjs +2 -1
  118. package/lib/iconsets/md.mjs.map +1 -1
  119. package/lib/iconsets/mdi-svg.d.mts +1 -0
  120. package/lib/iconsets/mdi-svg.mjs +36 -35
  121. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  122. package/lib/iconsets/mdi.d.mts +1 -0
  123. package/lib/iconsets/mdi.mjs +2 -1
  124. package/lib/iconsets/mdi.mjs.map +1 -1
  125. package/lib/index.d.mts +48 -33
  126. package/lib/labs/VDataTable/VDataTable.css +4 -14
  127. package/lib/labs/VDataTable/VDataTable.sass +6 -15
  128. package/lib/labs/VDataTable/VDataTableHeaders.mjs +2 -2
  129. package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
  130. package/lib/labs/VDataTable/VDataTableVirtual.mjs +16 -12
  131. package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
  132. package/lib/labs/VDataTable/composables/headers.mjs +2 -5
  133. package/lib/labs/VDataTable/composables/headers.mjs.map +1 -1
  134. package/lib/labs/VDataTable/composables/select.mjs +3 -2
  135. package/lib/labs/VDataTable/composables/select.mjs.map +1 -1
  136. package/lib/labs/VDateInput/VDateInput.mjs +127 -0
  137. package/lib/labs/VDateInput/VDateInput.mjs.map +1 -0
  138. package/lib/labs/VDateInput/VDateInput.sass +11 -0
  139. package/lib/labs/VDateInput/VDateRangeInput.mjs +223 -0
  140. package/lib/labs/VDateInput/VDateRangeInput.mjs.map +1 -0
  141. package/lib/labs/VDateInput/VDateRangeInput.sass +10 -0
  142. package/lib/labs/VDateInput/composables.mjs +59 -0
  143. package/lib/labs/VDateInput/composables.mjs.map +1 -0
  144. package/lib/labs/VDateInput/index.d.mts +1352 -0
  145. package/lib/labs/VDateInput/index.mjs +3 -0
  146. package/lib/labs/VDateInput/index.mjs.map +1 -0
  147. package/lib/labs/VDatePicker/VDateCard.css +33 -0
  148. package/lib/labs/VDatePicker/VDateCard.mjs +112 -0
  149. package/lib/labs/VDatePicker/VDateCard.mjs.map +1 -0
  150. package/lib/labs/VDatePicker/VDateCard.sass +32 -0
  151. package/lib/labs/VDatePicker/VDatePicker.css +23 -0
  152. package/lib/labs/VDatePicker/VDatePicker.mjs +172 -0
  153. package/lib/labs/VDatePicker/VDatePicker.mjs.map +1 -0
  154. package/lib/labs/VDatePicker/VDatePicker.sass +23 -0
  155. package/lib/labs/VDatePicker/VDatePickerControls.css +15 -0
  156. package/lib/labs/VDatePicker/VDatePickerControls.mjs +80 -0
  157. package/lib/labs/VDatePicker/VDatePickerControls.mjs.map +1 -0
  158. package/lib/labs/VDatePicker/VDatePickerControls.sass +15 -0
  159. package/lib/labs/VDatePicker/VDatePickerHeader.css +54 -0
  160. package/lib/labs/VDatePicker/VDatePickerHeader.mjs +75 -0
  161. package/lib/labs/VDatePicker/VDatePickerHeader.mjs.map +1 -0
  162. package/lib/labs/VDatePicker/VDatePickerHeader.sass +51 -0
  163. package/lib/labs/VDatePicker/VDatePickerInput.sass +17 -0
  164. package/lib/labs/VDatePicker/VDatePickerMonth.css +77 -0
  165. package/lib/labs/VDatePicker/VDatePickerMonth.mjs +286 -0
  166. package/lib/labs/VDatePicker/VDatePickerMonth.mjs.map +1 -0
  167. package/lib/labs/VDatePicker/VDatePickerMonth.sass +69 -0
  168. package/lib/{components → labs}/VDatePicker/VDatePickerTitle.mjs +1 -1
  169. package/lib/labs/VDatePicker/VDatePickerTitle.mjs.map +1 -0
  170. package/lib/labs/VDatePicker/VDatePickerYears.css +18 -0
  171. package/lib/labs/VDatePicker/VDatePickerYears.mjs +64 -0
  172. package/lib/labs/VDatePicker/VDatePickerYears.mjs.map +1 -0
  173. package/lib/labs/VDatePicker/VDatePickerYears.sass +16 -0
  174. package/lib/labs/VDatePicker/composables.mjs +33 -0
  175. package/lib/labs/VDatePicker/composables.mjs.map +1 -0
  176. package/lib/labs/VDatePicker/index.d.mts +4430 -0
  177. package/lib/labs/VDatePicker/index.mjs +7 -0
  178. package/lib/labs/VDatePicker/index.mjs.map +1 -0
  179. package/lib/labs/VDatePicker/mixins/date-picker-table.mjs.map +1 -0
  180. package/lib/labs/VDatePicker/util/createNativeLocaleFormatter.mjs.map +1 -0
  181. package/lib/labs/VDatePicker/util/eventHelpers.mjs.map +1 -0
  182. package/lib/labs/VDatePicker/util/index.mjs.map +1 -0
  183. package/lib/labs/VDatePicker/util/isDateAllowed.mjs.map +1 -0
  184. package/lib/labs/VDatePicker/util/monthChange.mjs.map +1 -0
  185. package/lib/labs/VDatePicker/util/pad.mjs.map +1 -0
  186. package/lib/labs/VDatePicker/util/sanitizeDateString.mjs.map +1 -0
  187. package/lib/labs/VDatePicker/utils.mjs +69 -0
  188. package/lib/labs/VDatePicker/utils.mjs.map +1 -0
  189. package/lib/labs/VDateRangePicker/VDateRangeCard.mjs +87 -0
  190. package/lib/labs/VDateRangePicker/VDateRangeCard.mjs.map +1 -0
  191. package/lib/labs/VDateRangePicker/VDateRangeCard.sass +33 -0
  192. package/lib/labs/VDateRangePicker/VDateRangePicker.mjs +131 -0
  193. package/lib/labs/VDateRangePicker/VDateRangePicker.mjs.map +1 -0
  194. package/lib/labs/VDateRangePicker/VDateRangePicker.sass +21 -0
  195. package/lib/labs/VDateRangePicker/VDateRangePickerHeader.mjs +103 -0
  196. package/lib/labs/VDateRangePicker/VDateRangePickerHeader.mjs.map +1 -0
  197. package/lib/labs/VDateRangePicker/VDateRangePickerHeader.sass +39 -0
  198. package/lib/labs/VDateRangePicker/VDateRangePickerMonth.mjs +61 -0
  199. package/lib/labs/VDateRangePicker/VDateRangePickerMonth.mjs.map +1 -0
  200. package/lib/labs/VDateRangePicker/VDateRangePickerMonth.sass +12 -0
  201. package/lib/labs/VDateRangePicker/index.d.mts +1065 -0
  202. package/lib/labs/VDateRangePicker/index.mjs +3 -0
  203. package/lib/labs/VDateRangePicker/index.mjs.map +1 -0
  204. package/lib/labs/VPicker/VPicker.css +57 -0
  205. package/lib/labs/VPicker/VPicker.mjs +47 -0
  206. package/lib/labs/VPicker/VPicker.mjs.map +1 -0
  207. package/lib/labs/VPicker/VPicker.sass +53 -0
  208. package/lib/labs/VPicker/VPickerTitle.mjs +4 -0
  209. package/lib/labs/VPicker/VPickerTitle.mjs.map +1 -0
  210. package/lib/labs/VPicker/index.d.mts +541 -0
  211. package/lib/labs/VPicker/index.mjs +3 -0
  212. package/lib/labs/VPicker/index.mjs.map +1 -0
  213. package/lib/labs/components.d.mts +5136 -198
  214. package/lib/labs/components.mjs +2 -0
  215. package/lib/labs/components.mjs.map +1 -1
  216. package/lib/labs/date/DateAdapter.mjs.map +1 -1
  217. package/lib/labs/date/adapters/vuetify.d.mts +28 -25
  218. package/lib/labs/date/adapters/vuetify.mjs +65 -75
  219. package/lib/labs/date/adapters/vuetify.mjs.map +1 -1
  220. package/lib/labs/date/date.mjs +82 -11
  221. package/lib/labs/date/date.mjs.map +1 -1
  222. package/lib/labs/date/index.d.mts +31 -30
  223. package/lib/locale/af.mjs +14 -5
  224. package/lib/locale/af.mjs.map +1 -1
  225. package/lib/locale/ar.mjs +14 -5
  226. package/lib/locale/ar.mjs.map +1 -1
  227. package/lib/locale/az.mjs +14 -5
  228. package/lib/locale/az.mjs.map +1 -1
  229. package/lib/locale/bg.mjs +14 -5
  230. package/lib/locale/bg.mjs.map +1 -1
  231. package/lib/locale/ca.mjs +14 -5
  232. package/lib/locale/ca.mjs.map +1 -1
  233. package/lib/locale/ckb.mjs +14 -5
  234. package/lib/locale/ckb.mjs.map +1 -1
  235. package/lib/locale/cs.mjs +14 -5
  236. package/lib/locale/cs.mjs.map +1 -1
  237. package/lib/locale/da.mjs +14 -5
  238. package/lib/locale/da.mjs.map +1 -1
  239. package/lib/locale/de.mjs +14 -5
  240. package/lib/locale/de.mjs.map +1 -1
  241. package/lib/locale/el.mjs +14 -5
  242. package/lib/locale/el.mjs.map +1 -1
  243. package/lib/locale/en.mjs +14 -5
  244. package/lib/locale/en.mjs.map +1 -1
  245. package/lib/locale/es.mjs +14 -5
  246. package/lib/locale/es.mjs.map +1 -1
  247. package/lib/locale/et.mjs +14 -5
  248. package/lib/locale/et.mjs.map +1 -1
  249. package/lib/locale/fa.mjs +14 -5
  250. package/lib/locale/fa.mjs.map +1 -1
  251. package/lib/locale/fi.mjs +14 -5
  252. package/lib/locale/fi.mjs.map +1 -1
  253. package/lib/locale/fr.mjs +14 -5
  254. package/lib/locale/fr.mjs.map +1 -1
  255. package/lib/locale/he.mjs +14 -5
  256. package/lib/locale/he.mjs.map +1 -1
  257. package/lib/locale/hr.mjs +14 -5
  258. package/lib/locale/hr.mjs.map +1 -1
  259. package/lib/locale/hu.mjs +14 -5
  260. package/lib/locale/hu.mjs.map +1 -1
  261. package/lib/locale/id.mjs +14 -5
  262. package/lib/locale/id.mjs.map +1 -1
  263. package/lib/locale/index.d.mts +588 -210
  264. package/lib/locale/it.mjs +14 -5
  265. package/lib/locale/it.mjs.map +1 -1
  266. package/lib/locale/ja.mjs +14 -5
  267. package/lib/locale/ja.mjs.map +1 -1
  268. package/lib/locale/ko.mjs +14 -5
  269. package/lib/locale/ko.mjs.map +1 -1
  270. package/lib/locale/lt.mjs +14 -5
  271. package/lib/locale/lt.mjs.map +1 -1
  272. package/lib/locale/lv.mjs +14 -5
  273. package/lib/locale/lv.mjs.map +1 -1
  274. package/lib/locale/nl.mjs +14 -5
  275. package/lib/locale/nl.mjs.map +1 -1
  276. package/lib/locale/no.mjs +14 -5
  277. package/lib/locale/no.mjs.map +1 -1
  278. package/lib/locale/pl.mjs +14 -5
  279. package/lib/locale/pl.mjs.map +1 -1
  280. package/lib/locale/pt.mjs +14 -5
  281. package/lib/locale/pt.mjs.map +1 -1
  282. package/lib/locale/ro.mjs +14 -5
  283. package/lib/locale/ro.mjs.map +1 -1
  284. package/lib/locale/ru.mjs +14 -5
  285. package/lib/locale/ru.mjs.map +1 -1
  286. package/lib/locale/sk.mjs +14 -5
  287. package/lib/locale/sk.mjs.map +1 -1
  288. package/lib/locale/sl.mjs +14 -5
  289. package/lib/locale/sl.mjs.map +1 -1
  290. package/lib/locale/sr-Cyrl.mjs +14 -5
  291. package/lib/locale/sr-Cyrl.mjs.map +1 -1
  292. package/lib/locale/sr-Latn.mjs +14 -5
  293. package/lib/locale/sr-Latn.mjs.map +1 -1
  294. package/lib/locale/sv.mjs +14 -5
  295. package/lib/locale/sv.mjs.map +1 -1
  296. package/lib/locale/th.mjs +14 -5
  297. package/lib/locale/th.mjs.map +1 -1
  298. package/lib/locale/tr.mjs +14 -5
  299. package/lib/locale/tr.mjs.map +1 -1
  300. package/lib/locale/uk.mjs +14 -5
  301. package/lib/locale/uk.mjs.map +1 -1
  302. package/lib/locale/vi.mjs +14 -5
  303. package/lib/locale/vi.mjs.map +1 -1
  304. package/lib/locale/zh-Hans.mjs +14 -5
  305. package/lib/locale/zh-Hans.mjs.map +1 -1
  306. package/lib/locale/zh-Hant.mjs +14 -5
  307. package/lib/locale/zh-Hant.mjs.map +1 -1
  308. package/lib/util/bindProps.mjs +49 -0
  309. package/lib/util/bindProps.mjs.map +1 -0
  310. package/lib/util/dateTimeUtils.mjs +68 -0
  311. package/lib/util/dateTimeUtils.mjs.map +1 -1
  312. package/lib/util/helpers.mjs +3 -0
  313. package/lib/util/helpers.mjs.map +1 -1
  314. package/lib/util/index.mjs +1 -0
  315. package/lib/util/index.mjs.map +1 -1
  316. package/package.json +5 -2
  317. package/lib/components/VDatePicker/VDatePicker.mjs +0 -475
  318. package/lib/components/VDatePicker/VDatePicker.mjs.map +0 -1
  319. package/lib/components/VDatePicker/VDatePickerDateTable.mjs +0 -120
  320. package/lib/components/VDatePicker/VDatePickerDateTable.mjs.map +0 -1
  321. package/lib/components/VDatePicker/VDatePickerHeader.mjs +0 -136
  322. package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +0 -1
  323. package/lib/components/VDatePicker/VDatePickerHeader.sass +0 -46
  324. package/lib/components/VDatePicker/VDatePickerMonthTable.mjs +0 -48
  325. package/lib/components/VDatePicker/VDatePickerMonthTable.mjs.map +0 -1
  326. package/lib/components/VDatePicker/VDatePickerTitle.mjs.map +0 -1
  327. package/lib/components/VDatePicker/VDatePickerYears.mjs +0 -84
  328. package/lib/components/VDatePicker/VDatePickerYears.mjs.map +0 -1
  329. package/lib/components/VDatePicker/VDatePickerYears.sass +0 -30
  330. package/lib/components/VDatePicker/index.mjs +0 -18
  331. package/lib/components/VDatePicker/index.mjs.map +0 -1
  332. package/lib/components/VDatePicker/mixins/date-picker-table.mjs.map +0 -1
  333. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs.map +0 -1
  334. package/lib/components/VDatePicker/util/eventHelpers.mjs.map +0 -1
  335. package/lib/components/VDatePicker/util/index.mjs.map +0 -1
  336. package/lib/components/VDatePicker/util/isDateAllowed.mjs.map +0 -1
  337. package/lib/components/VDatePicker/util/monthChange.mjs.map +0 -1
  338. package/lib/components/VDatePicker/util/pad.mjs.map +0 -1
  339. package/lib/components/VDatePicker/util/sanitizeDateString.mjs.map +0 -1
  340. package/lib/components/VPicker/VPicker.mjs +0 -86
  341. package/lib/components/VPicker/VPicker.mjs.map +0 -1
  342. package/lib/components/VPicker/VPicker.sass +0 -94
  343. package/lib/components/VPicker/index.mjs +0 -4
  344. package/lib/components/VPicker/index.mjs.map +0 -1
  345. /package/lib/{components → labs}/VDatePicker/VDatePickerTable.sass +0 -0
  346. /package/lib/{components → labs}/VDatePicker/VDatePickerTitle.sass +0 -0
  347. /package/lib/{components → labs}/VDatePicker/_variables.scss +0 -0
  348. /package/lib/{components → labs}/VDatePicker/mixins/date-picker-table.mjs +0 -0
  349. /package/lib/{components → labs}/VDatePicker/util/createNativeLocaleFormatter.mjs +0 -0
  350. /package/lib/{components → labs}/VDatePicker/util/eventHelpers.mjs +0 -0
  351. /package/lib/{components → labs}/VDatePicker/util/index.mjs +0 -0
  352. /package/lib/{components → labs}/VDatePicker/util/isDateAllowed.mjs +0 -0
  353. /package/lib/{components → labs}/VDatePicker/util/monthChange.mjs +0 -0
  354. /package/lib/{components → labs}/VDatePicker/util/pad.mjs +0 -0
  355. /package/lib/{components → labs}/VDatePicker/util/sanitizeDateString.mjs +0 -0
  356. /package/lib/{components → labs}/VPicker/_variables.scss +0 -0
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * Vuetify v3.3.2
2
+ * Vuetify v3.3.4
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
- import { reactive, computed, watchEffect, toRefs, capitalize, warn, watch, onScopeDispose, effectScope, ref, unref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, readonly, onDeactivated, onActivated, onMounted, toRaw, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, Fragment, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, toHandlers, Teleport, cloneVNode, createTextVNode, onBeforeUpdate, vModelText, onUpdated, withModifiers } from 'vue';
7
+ import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, warn, watch, onScopeDispose, effectScope, ref, unref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, readonly, onDeactivated, onActivated, onMounted, toRaw, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, Teleport, cloneVNode, createTextVNode, onBeforeUpdate, vModelText, onUpdated, withModifiers } from 'vue';
8
8
 
9
9
  // Types
10
10
  // eslint-disable-line vue/prefer-import-from-vue
@@ -294,6 +294,15 @@ function mergeDeep() {
294
294
  }
295
295
  return out;
296
296
  }
297
+ function flattenFragments(nodes) {
298
+ return nodes.map(node => {
299
+ if (node.type === Fragment) {
300
+ return flattenFragments(node.children);
301
+ } else {
302
+ return node;
303
+ }
304
+ }).flat();
305
+ }
297
306
  function toKebabCase() {
298
307
  let str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
299
308
  if (toKebabCase.cache.has(str)) return toKebabCase.cache.get(str);
@@ -373,6 +382,9 @@ function includes(arr, val) {
373
382
  }
374
383
  const onRE = /^on[^a-z]/;
375
384
  const isOn = key => onRE.test(key);
385
+ function eventName(propName) {
386
+ return propName[2].toLowerCase() + propName.slice(3);
387
+ }
376
388
  const EventProp = () => [Function, Array];
377
389
  function hasEvent(props, name) {
378
390
  name = 'on' + capitalize(name);
@@ -571,6 +583,54 @@ function animate(el, keyframes, options) {
571
583
  return animation;
572
584
  }
573
585
 
586
+ // Utilities
587
+ const handlers = new WeakMap();
588
+ function bindProps(el, props) {
589
+ Object.keys(props).forEach(k => {
590
+ if (isOn(k)) {
591
+ const name = eventName(k);
592
+ const handler = handlers.get(el);
593
+ if (props[k] == null) {
594
+ handler?.forEach(v => {
595
+ const [n, fn] = v;
596
+ if (n === name) {
597
+ el.removeEventListener(name, fn);
598
+ handler.delete(v);
599
+ }
600
+ });
601
+ } else if (!handler || ![...handler]?.some(v => v[0] === name && v[1] === props[k])) {
602
+ el.addEventListener(name, props[k]);
603
+ const _handler = handler || new Set();
604
+ _handler.add([name, props[k]]);
605
+ if (!handlers.has(el)) handlers.set(el, _handler);
606
+ }
607
+ } else {
608
+ if (props[k] == null) {
609
+ el.removeAttribute(k);
610
+ } else {
611
+ el.setAttribute(k, props[k]);
612
+ }
613
+ }
614
+ });
615
+ }
616
+ function unbindProps(el, props) {
617
+ Object.keys(props).forEach(k => {
618
+ if (isOn(k)) {
619
+ const name = eventName(k);
620
+ const handler = handlers.get(el);
621
+ handler?.forEach(v => {
622
+ const [n, fn] = v;
623
+ if (n === name) {
624
+ el.removeEventListener(name, fn);
625
+ handler.delete(v);
626
+ }
627
+ });
628
+ } else {
629
+ el.removeAttribute(k);
630
+ }
631
+ });
632
+ }
633
+
574
634
  /* eslint-disable no-console */
575
635
 
576
636
  function consoleWarn(message) {
@@ -1583,12 +1643,21 @@ var en = {
1583
1643
  lastPage: 'Last page',
1584
1644
  pageText: '{0}-{1} of {2}'
1585
1645
  },
1646
+ dateRangeInput: {
1647
+ divider: 'to'
1648
+ },
1586
1649
  datePicker: {
1587
- itemsSelected: '{0} selected',
1588
- nextMonthAriaLabel: 'Next month',
1589
- nextYearAriaLabel: 'Next year',
1590
- prevMonthAriaLabel: 'Previous month',
1591
- prevYearAriaLabel: 'Previous year'
1650
+ ok: 'OK',
1651
+ cancel: 'Cancel',
1652
+ range: {
1653
+ title: 'Select dates',
1654
+ header: 'Enter dates'
1655
+ },
1656
+ title: 'Select date',
1657
+ header: 'Enter date',
1658
+ input: {
1659
+ placeholder: 'Enter date'
1660
+ }
1592
1661
  },
1593
1662
  noDataText: 'No data available',
1594
1663
  carousel: {
@@ -2158,6 +2227,7 @@ function createTheme(options) {
2158
2227
  };
2159
2228
  }
2160
2229
  function install(app) {
2230
+ if (parsedOptions.isDisabled) return;
2161
2231
  const head = app._context.provides.usehead;
2162
2232
  if (head) {
2163
2233
  if (head.push) {
@@ -2179,7 +2249,6 @@ function createTheme(options) {
2179
2249
  immediate: true
2180
2250
  });
2181
2251
  function updateStyles() {
2182
- if (parsedOptions.isDisabled) return;
2183
2252
  if (typeof document !== 'undefined' && !styleEl) {
2184
2253
  const el = document.createElement('style');
2185
2254
  el.type = 'text/css';
@@ -3571,7 +3640,7 @@ const VAppBar = genericComponent()({
3571
3640
  const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0;
3572
3641
  return height + extensionHeight;
3573
3642
  });
3574
- function setActive() {
3643
+ watchEffect(() => {
3575
3644
  if (scrollBehavior.value.hide) {
3576
3645
  if (scrollBehavior.value.inverted) {
3577
3646
  isActive.value = currentScroll.value > scrollThreshold.value;
@@ -3581,12 +3650,6 @@ const VAppBar = genericComponent()({
3581
3650
  } else {
3582
3651
  isActive.value = true;
3583
3652
  }
3584
- }
3585
- useToggleScope(() => !!props.scrollBehavior, () => {
3586
- watch(currentScroll, setActive, {
3587
- immediate: true
3588
- });
3589
- watch(scrollBehavior, setActive);
3590
3653
  });
3591
3654
  const {
3592
3655
  ssrBootStyles
@@ -4041,7 +4104,8 @@ const aliases = {
4041
4104
  unfold: 'mdi-unfold-more-horizontal',
4042
4105
  file: 'mdi-paperclip',
4043
4106
  plus: 'mdi-plus',
4044
- minus: 'mdi-minus'
4107
+ minus: 'mdi-minus',
4108
+ calendar: 'mdi-calendar'
4045
4109
  };
4046
4110
  const mdi = {
4047
4111
  // Not using mergeProps here, functional components merge props by default (?)
@@ -4266,7 +4330,7 @@ const VIcon = genericComponent()({
4266
4330
  useRender(() => {
4267
4331
  const slotValue = slots.default?.();
4268
4332
  if (slotValue) {
4269
- slotIcon.value = slotValue.filter(node => node.type === Text && node.children && typeof node.children === 'string')[0]?.children;
4333
+ slotIcon.value = flattenFragments(slotValue).filter(node => node.type === Text && node.children && typeof node.children === 'string')[0]?.children;
4270
4334
  }
4271
4335
  return createVNode(iconData.value.component, {
4272
4336
  "tag": props.tag,
@@ -5103,7 +5167,7 @@ const makeVBtnProps = propsFactory({
5103
5167
  block: Boolean,
5104
5168
  stacked: Boolean,
5105
5169
  ripple: {
5106
- type: Boolean,
5170
+ type: [Boolean, Object],
5107
5171
  default: true
5108
5172
  },
5109
5173
  text: String,
@@ -6386,6 +6450,7 @@ const VCheckbox = genericComponent()({
6386
6450
  inheritAttrs: false,
6387
6451
  props: makeVCheckboxProps(),
6388
6452
  emits: {
6453
+ 'update:modelValue': value => true,
6389
6454
  'update:focused': focused => true
6390
6455
  },
6391
6456
  setup(props, _ref) {
@@ -6393,6 +6458,7 @@ const VCheckbox = genericComponent()({
6393
6458
  attrs,
6394
6459
  slots
6395
6460
  } = _ref;
6461
+ const model = useProxiedModel(props, 'modelValue');
6396
6462
  const {
6397
6463
  isFocused,
6398
6464
  focus,
@@ -6407,6 +6473,8 @@ const VCheckbox = genericComponent()({
6407
6473
  return createVNode(VInput, mergeProps({
6408
6474
  "class": ['v-checkbox', props.class]
6409
6475
  }, inputAttrs, inputProps, {
6476
+ "modelValue": model.value,
6477
+ "onUpdate:modelValue": $event => model.value = $event,
6410
6478
  "id": id.value,
6411
6479
  "focused": isFocused.value,
6412
6480
  "style": props.style
@@ -6425,6 +6493,8 @@ const VCheckbox = genericComponent()({
6425
6493
  "disabled": isDisabled.value,
6426
6494
  "readonly": isReadonly.value
6427
6495
  }, controlAttrs, {
6496
+ "modelValue": model.value,
6497
+ "onUpdate:modelValue": $event => model.value = $event,
6428
6498
  "onFocus": focus,
6429
6499
  "onBlur": blur
6430
6500
  }), slots);
@@ -6562,6 +6632,8 @@ const VChipGroup = genericComponent()({
6562
6632
  }
6563
6633
  });
6564
6634
 
6635
+ // Types
6636
+
6565
6637
  const makeVChipProps = propsFactory({
6566
6638
  activeClass: String,
6567
6639
  appendAvatar: String,
@@ -6590,7 +6662,7 @@ const makeVChipProps = propsFactory({
6590
6662
  prependAvatar: String,
6591
6663
  prependIcon: IconValue,
6592
6664
  ripple: {
6593
- type: Boolean,
6665
+ type: [Boolean, Object],
6594
6666
  default: true
6595
6667
  },
6596
6668
  text: String,
@@ -7243,7 +7315,7 @@ const useNested = props => {
7243
7315
  const useNestedItem = (id, isGroup) => {
7244
7316
  const parent = inject$1(VNestedSymbol, emptyNested);
7245
7317
  const uidSymbol = Symbol(getUid());
7246
- const computedId = computed(() => id.value ?? uidSymbol);
7318
+ const computedId = computed(() => id.value !== undefined ? id.value : uidSymbol);
7247
7319
  const item = {
7248
7320
  ...parent,
7249
7321
  id: computedId,
@@ -7406,7 +7478,7 @@ const makeVListItemProps = propsFactory({
7406
7478
  prependAvatar: String,
7407
7479
  prependIcon: IconValue,
7408
7480
  ripple: {
7409
- type: Boolean,
7481
+ type: [Boolean, Object],
7410
7482
  default: true
7411
7483
  },
7412
7484
  subtitle: [String, Number, Boolean],
@@ -7443,7 +7515,7 @@ const VListItem = genericComponent()({
7443
7515
  emit
7444
7516
  } = _ref;
7445
7517
  const link = useLink(props, attrs);
7446
- const id = computed(() => props.value ?? link.href.value);
7518
+ const id = computed(() => props.value === undefined ? link.href.value : props.value);
7447
7519
  const {
7448
7520
  select,
7449
7521
  isSelected,
@@ -7840,10 +7912,13 @@ function useItems(props) {
7840
7912
  }
7841
7913
  function useTransformItems(items, transform) {
7842
7914
  function transformIn(value) {
7843
- return value.map(v => {
7915
+ return value
7916
+ // When the model value is null, returns an InternalItem based on null
7917
+ // only if null is one of the items
7918
+ .filter(v => v !== null || items.value.some(item => item.value === null)).map(v => {
7844
7919
  const existingItem = items.value.find(item => deepEqual(v, item.value));
7845
7920
  // Nullish existingItem means value is a custom input value from combobox
7846
- // In this case, use transformItem to create an { value: unknown } based on value
7921
+ // In this case, use transformItem to create an InternalItem based on value
7847
7922
  return existingItem ?? transform(v);
7848
7923
  });
7849
7924
  }
@@ -8779,29 +8854,29 @@ function useActivator(props, _ref) {
8779
8854
  }
8780
8855
  });
8781
8856
  const availableEvents = {
8782
- click: e => {
8857
+ onClick: e => {
8783
8858
  e.stopPropagation();
8784
8859
  activatorEl.value = e.currentTarget || e.target;
8785
8860
  isActive.value = !isActive.value;
8786
8861
  },
8787
- mouseenter: e => {
8862
+ onMouseenter: e => {
8788
8863
  if (e.sourceCapabilities?.firesTouchEvents) return;
8789
8864
  isHovered = true;
8790
8865
  activatorEl.value = e.currentTarget || e.target;
8791
8866
  runOpenDelay();
8792
8867
  },
8793
- mouseleave: e => {
8868
+ onMouseleave: e => {
8794
8869
  isHovered = false;
8795
8870
  runCloseDelay();
8796
8871
  },
8797
- focus: e => {
8872
+ onFocus: e => {
8798
8873
  if (SUPPORTS_FOCUS_VISIBLE && !e.target.matches(':focus-visible')) return;
8799
8874
  isFocused = true;
8800
8875
  e.stopPropagation();
8801
8876
  activatorEl.value = e.currentTarget || e.target;
8802
8877
  runOpenDelay();
8803
8878
  },
8804
- blur: e => {
8879
+ onBlur: e => {
8805
8880
  isFocused = false;
8806
8881
  e.stopPropagation();
8807
8882
  runCloseDelay();
@@ -8810,33 +8885,43 @@ function useActivator(props, _ref) {
8810
8885
  const activatorEvents = computed(() => {
8811
8886
  const events = {};
8812
8887
  if (openOnClick.value) {
8813
- events.click = availableEvents.click;
8888
+ events.onClick = availableEvents.onClick;
8814
8889
  }
8815
8890
  if (props.openOnHover) {
8816
- events.mouseenter = availableEvents.mouseenter;
8817
- events.mouseleave = availableEvents.mouseleave;
8891
+ events.onMouseenter = availableEvents.onMouseenter;
8892
+ events.onMouseleave = availableEvents.onMouseleave;
8818
8893
  }
8819
8894
  if (openOnFocus.value) {
8820
- events.focus = availableEvents.focus;
8821
- events.blur = availableEvents.blur;
8895
+ events.onFocus = availableEvents.onFocus;
8896
+ events.onBlur = availableEvents.onBlur;
8822
8897
  }
8823
8898
  return events;
8824
8899
  });
8825
8900
  const contentEvents = computed(() => {
8826
8901
  const events = {};
8827
8902
  if (props.openOnHover) {
8828
- events.mouseenter = () => {
8903
+ events.onMouseenter = () => {
8829
8904
  isHovered = true;
8830
8905
  runOpenDelay();
8831
8906
  };
8832
- events.mouseleave = () => {
8907
+ events.onMouseleave = () => {
8833
8908
  isHovered = false;
8834
8909
  runCloseDelay();
8835
8910
  };
8836
8911
  }
8912
+ if (openOnFocus.value) {
8913
+ events.onFocusin = () => {
8914
+ isFocused = true;
8915
+ runOpenDelay();
8916
+ };
8917
+ events.onFocusout = () => {
8918
+ isFocused = false;
8919
+ runCloseDelay();
8920
+ };
8921
+ }
8837
8922
  if (props.closeOnContentClick) {
8838
8923
  const menu = inject$1(VMenuSymbol, null);
8839
- events.click = () => {
8924
+ events.onClick = () => {
8840
8925
  isActive.value = false;
8841
8926
  menu?.closeParents();
8842
8927
  };
@@ -8846,14 +8931,14 @@ function useActivator(props, _ref) {
8846
8931
  const scrimEvents = computed(() => {
8847
8932
  const events = {};
8848
8933
  if (props.openOnHover) {
8849
- events.mouseenter = () => {
8934
+ events.onMouseenter = () => {
8850
8935
  if (firstEnter) {
8851
8936
  isHovered = true;
8852
8937
  firstEnter = false;
8853
8938
  runOpenDelay();
8854
8939
  }
8855
8940
  };
8856
- events.mouseleave = () => {
8941
+ events.onMouseleave = () => {
8857
8942
  isHovered = false;
8858
8943
  runCloseDelay();
8859
8944
  };
@@ -8927,29 +9012,13 @@ function _useActivator(props, vm, _ref2) {
8927
9012
  let el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getActivator();
8928
9013
  let _props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.activatorProps;
8929
9014
  if (!el) return;
8930
- Object.entries(activatorEvents.value).forEach(_ref3 => {
8931
- let [name, cb] = _ref3;
8932
- el.addEventListener(name, cb);
8933
- });
8934
- Object.keys(_props).forEach(k => {
8935
- if (_props[k] == null) {
8936
- el.removeAttribute(k);
8937
- } else {
8938
- el.setAttribute(k, _props[k]);
8939
- }
8940
- });
9015
+ bindProps(el, mergeProps(activatorEvents.value, _props));
8941
9016
  }
8942
9017
  function unbindActivatorProps() {
8943
9018
  let el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getActivator();
8944
9019
  let _props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.activatorProps;
8945
9020
  if (!el) return;
8946
- Object.entries(activatorEvents.value).forEach(_ref4 => {
8947
- let [name, cb] = _ref4;
8948
- el.removeEventListener(name, cb);
8949
- });
8950
- Object.keys(_props).forEach(k => {
8951
- el.removeAttribute(k);
8952
- });
9021
+ unbindProps(el, mergeProps(activatorEvents.value, _props));
8953
9022
  }
8954
9023
  function getActivator() {
8955
9024
  let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;
@@ -9476,6 +9545,9 @@ const VOverlay = genericComponent()({
9476
9545
  if (e.key === 'Escape' && globalTop.value) {
9477
9546
  if (!props.persistent) {
9478
9547
  isActive.value = false;
9548
+ if (contentEl.value?.contains(document.activeElement)) {
9549
+ activatorEl.value?.focus();
9550
+ }
9479
9551
  } else animateClick();
9480
9552
  }
9481
9553
  }
@@ -9518,7 +9590,7 @@ const VOverlay = genericComponent()({
9518
9590
  isActive: isActive.value,
9519
9591
  props: mergeProps({
9520
9592
  ref: activatorRef
9521
- }, toHandlers(activatorEvents.value), props.activatorProps)
9593
+ }, activatorEvents.value, props.activatorProps)
9522
9594
  }), isMounted.value && createVNode(Teleport, {
9523
9595
  "disabled": !teleportTarget.value,
9524
9596
  "to": teleportTarget.value
@@ -9536,7 +9608,7 @@ const VOverlay = genericComponent()({
9536
9608
  }, scopeId, attrs), [createVNode(Scrim, mergeProps({
9537
9609
  "color": scrimColor,
9538
9610
  "modelValue": isActive.value && !!props.scrim
9539
- }, toHandlers(scrimEvents.value)), null), createVNode(MaybeTransition, {
9611
+ }, scrimEvents.value), null), createVNode(MaybeTransition, {
9540
9612
  "appear": true,
9541
9613
  "persisted": true,
9542
9614
  "transition": props.transition,
@@ -9550,7 +9622,7 @@ const VOverlay = genericComponent()({
9550
9622
  "ref": contentEl,
9551
9623
  "class": ['v-overlay__content', props.contentClass],
9552
9624
  "style": [dimensionStyles.value, contentStyles.value]
9553
- }, toHandlers(contentEvents.value), props.contentProps), [slots.default?.({
9625
+ }, contentEvents.value, props.contentProps), [slots.default?.({
9554
9626
  isActive
9555
9627
  })]), [[vShow, isActive.value], [resolveDirective("click-outside"), {
9556
9628
  handler: onClickOutside,
@@ -9710,10 +9782,35 @@ const VMenu = genericComponent()({
9710
9782
  function onClickOutside() {
9711
9783
  parent?.closeParents();
9712
9784
  }
9785
+ function onKeydown(e) {
9786
+ if (props.disabled) return;
9787
+ if (e.key === 'Tab') {
9788
+ isActive.value = false;
9789
+ overlay.value?.activatorEl?.focus();
9790
+ }
9791
+ }
9792
+ function onActivatorKeydown(e) {
9793
+ if (props.disabled) return;
9794
+ const el = overlay.value?.contentEl;
9795
+ if (el && isActive.value) {
9796
+ if (e.key === 'ArrowDown') {
9797
+ e.preventDefault();
9798
+ focusChild(el, 'next');
9799
+ } else if (e.key === 'ArrowUp') {
9800
+ e.preventDefault();
9801
+ focusChild(el, 'prev');
9802
+ }
9803
+ } else if (['ArrowDown', 'ArrowUp'].includes(e.key)) {
9804
+ isActive.value = true;
9805
+ e.preventDefault();
9806
+ setTimeout(() => setTimeout(() => onActivatorKeydown(e)));
9807
+ }
9808
+ }
9713
9809
  const activatorProps = computed(() => mergeProps({
9714
9810
  'aria-haspopup': 'menu',
9715
9811
  'aria-expanded': String(isActive.value),
9716
- 'aria-owns': id.value
9812
+ 'aria-owns': id.value,
9813
+ onKeydown: onActivatorKeydown
9717
9814
  }, props.activatorProps));
9718
9815
  useRender(() => {
9719
9816
  const [overlayProps] = VOverlay.filterProps(props);
@@ -9726,7 +9823,8 @@ const VMenu = genericComponent()({
9726
9823
  "onUpdate:modelValue": $event => isActive.value = $event,
9727
9824
  "absolute": true,
9728
9825
  "activatorProps": activatorProps.value,
9729
- "onClick:outside": onClickOutside
9826
+ "onClick:outside": onClickOutside,
9827
+ "onKeydown": onKeydown
9730
9828
  }, scopeId), {
9731
9829
  activator: slots.activator,
9732
9830
  default: function () {
@@ -10350,7 +10448,7 @@ const VSelect = genericComponent()({
10350
10448
  transformIn,
10351
10449
  transformOut
10352
10450
  } = useItems(props);
10353
- const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
10451
+ const model = useProxiedModel(props, 'modelValue', [], v => transformIn(v === null ? [null] : wrapInArray(v)), v => {
10354
10452
  const transformed = transformOut(v);
10355
10453
  return props.multiple ? transformed : transformed[0] ?? null;
10356
10454
  });
@@ -10370,6 +10468,7 @@ const VSelect = genericComponent()({
10370
10468
  }
10371
10469
  return items.value;
10372
10470
  });
10471
+ const menuDisabled = computed(() => props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value);
10373
10472
  const listRef = ref();
10374
10473
  function onClear(e) {
10375
10474
  if (props.openOnClear) {
@@ -10377,7 +10476,7 @@ const VSelect = genericComponent()({
10377
10476
  }
10378
10477
  }
10379
10478
  function onMousedownControl() {
10380
- if (props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value) return;
10479
+ if (menuDisabled.value) return;
10381
10480
  menu.value = !menu.value;
10382
10481
  }
10383
10482
  function onKeydown(e) {
@@ -10391,11 +10490,7 @@ const VSelect = genericComponent()({
10391
10490
  if (['Escape', 'Tab'].includes(e.key)) {
10392
10491
  menu.value = false;
10393
10492
  }
10394
- if (e.key === 'ArrowDown') {
10395
- listRef.value?.focus('next');
10396
- } else if (e.key === 'ArrowUp') {
10397
- listRef.value?.focus('prev');
10398
- } else if (e.key === 'Home') {
10493
+ if (e.key === 'Home') {
10399
10494
  listRef.value?.focus('first');
10400
10495
  } else if (e.key === 'End') {
10401
10496
  listRef.value?.focus('last');
@@ -10421,6 +10516,11 @@ const VSelect = genericComponent()({
10421
10516
  model.value = [item];
10422
10517
  }
10423
10518
  }
10519
+ function onListKeydown(e) {
10520
+ if (e.key === 'Tab') {
10521
+ vTextFieldRef.value?.focus();
10522
+ }
10523
+ }
10424
10524
  function select(item) {
10425
10525
  if (props.multiple) {
10426
10526
  const index = selected.value.findIndex(selection => props.valueComparator(selection, item.value));
@@ -10451,7 +10551,7 @@ const VSelect = genericComponent()({
10451
10551
  }
10452
10552
  useRender(() => {
10453
10553
  const hasChips = !!(props.chips || slots.chip);
10454
- const hasList = !!(!props.hideNoData || displayItems.value.length || slots.prepend || slots.append || slots['no-data']);
10554
+ const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
10455
10555
  const isDirty = model.value.length > 0;
10456
10556
  const [textFieldProps] = VTextField.filterProps(props);
10457
10557
  const placeholder = isDirty || !isFocused.value && props.label && !props.persistentPlaceholder ? undefined : props.placeholder;
@@ -10488,6 +10588,7 @@ const VSelect = genericComponent()({
10488
10588
  "onUpdate:modelValue": $event => menu.value = $event,
10489
10589
  "activator": "parent",
10490
10590
  "contentClass": "v-select__content",
10591
+ "disabled": menuDisabled.value,
10491
10592
  "eager": props.eager,
10492
10593
  "maxHeight": 310,
10493
10594
  "openOnClick": false,
@@ -10500,11 +10601,13 @@ const VSelect = genericComponent()({
10500
10601
  "selected": selected.value,
10501
10602
  "selectStrategy": props.multiple ? 'independent' : 'single-independent',
10502
10603
  "onMousedown": e => e.preventDefault(),
10503
- "onFocusin": onFocusin
10604
+ "onKeydown": onListKeydown,
10605
+ "onFocusin": onFocusin,
10606
+ "tabindex": "-1"
10504
10607
  }, {
10505
- default: () => [!displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
10608
+ default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
10506
10609
  "title": t(props.noDataText)
10507
- }, null)), slots['prepend-item']?.(), displayItems.value.map((item, index) => {
10610
+ }, null)), displayItems.value.map((item, index) => {
10508
10611
  const itemProps = mergeProps(item.props, {
10509
10612
  key: index,
10510
10613
  onClick: () => select(item)
@@ -10770,7 +10873,7 @@ const VAutocomplete = genericComponent()({
10770
10873
  textColorStyles
10771
10874
  } = useTextColor(color);
10772
10875
  const search = useProxiedModel(props, 'search', '');
10773
- const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
10876
+ const model = useProxiedModel(props, 'modelValue', [], v => transformIn(v === null ? [null] : wrapInArray(v)), v => {
10774
10877
  const transformed = transformOut(v);
10775
10878
  return props.multiple ? transformed : transformed[0] ?? null;
10776
10879
  });
@@ -10796,6 +10899,7 @@ const VAutocomplete = genericComponent()({
10796
10899
  const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === 'exact' && search.value === displayItems.value[0]?.title;
10797
10900
  return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;
10798
10901
  });
10902
+ const menuDisabled = computed(() => props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value);
10799
10903
  const listRef = ref();
10800
10904
  function onClear(e) {
10801
10905
  if (props.openOnClear) {
@@ -10804,10 +10908,11 @@ const VAutocomplete = genericComponent()({
10804
10908
  search.value = '';
10805
10909
  }
10806
10910
  function onMousedownControl() {
10807
- if (props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value) return;
10911
+ if (menuDisabled.value) return;
10808
10912
  menu.value = true;
10809
10913
  }
10810
10914
  function onMousedownMenuIcon(e) {
10915
+ if (menuDisabled.value) return;
10811
10916
  if (isFocused.value) {
10812
10917
  e.preventDefault();
10813
10918
  e.stopPropagation();
@@ -10833,13 +10938,8 @@ const VAutocomplete = genericComponent()({
10833
10938
  }
10834
10939
  isPristine.value = true;
10835
10940
  }
10836
- if (e.key === 'ArrowDown') {
10941
+ if (e.key === 'ArrowDown' && highlightFirst.value) {
10837
10942
  listRef.value?.focus('next');
10838
- if (highlightFirst.value) {
10839
- listRef.value?.focus('next');
10840
- }
10841
- } else if (e.key === 'ArrowUp') {
10842
- listRef.value?.focus('prev');
10843
10943
  }
10844
10944
  if (!props.multiple) return;
10845
10945
  if (['Backspace', 'Delete'].includes(e.key)) {
@@ -10874,6 +10974,11 @@ const VAutocomplete = genericComponent()({
10874
10974
  }
10875
10975
  }
10876
10976
  }
10977
+ function onListKeydown(e) {
10978
+ if (e.key === 'Tab') {
10979
+ vTextFieldRef.value?.focus();
10980
+ }
10981
+ }
10877
10982
  function onInput(e) {
10878
10983
  search.value = e.target.value;
10879
10984
  }
@@ -10943,7 +11048,7 @@ const VAutocomplete = genericComponent()({
10943
11048
  });
10944
11049
  useRender(() => {
10945
11050
  const hasChips = !!(props.chips || slots.chip);
10946
- const hasList = !!(!props.hideNoData || displayItems.value.length || slots.prepend || slots.append || slots['no-data']);
11051
+ const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
10947
11052
  const isDirty = model.value.length > 0;
10948
11053
  const [textFieldProps] = VTextField.filterProps(props);
10949
11054
  return createVNode(VTextField, mergeProps({
@@ -10976,6 +11081,7 @@ const VAutocomplete = genericComponent()({
10976
11081
  "onUpdate:modelValue": $event => menu.value = $event,
10977
11082
  "activator": "parent",
10978
11083
  "contentClass": "v-autocomplete__content",
11084
+ "disabled": menuDisabled.value,
10979
11085
  "eager": props.eager,
10980
11086
  "maxHeight": 310,
10981
11087
  "openOnClick": false,
@@ -10988,12 +11094,14 @@ const VAutocomplete = genericComponent()({
10988
11094
  "selected": selected.value,
10989
11095
  "selectStrategy": props.multiple ? 'independent' : 'single-independent',
10990
11096
  "onMousedown": e => e.preventDefault(),
11097
+ "onKeydown": onListKeydown,
10991
11098
  "onFocusin": onFocusin,
10992
- "onFocusout": onFocusout
11099
+ "onFocusout": onFocusout,
11100
+ "tabindex": "-1"
10993
11101
  }, {
10994
- default: () => [!displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
11102
+ default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
10995
11103
  "title": t(props.noDataText)
10996
- }, null)), slots['prepend-item']?.(), displayItems.value.map((item, index) => {
11104
+ }, null)), displayItems.value.map((item, index) => {
10997
11105
  const itemProps = mergeProps(item.props, {
10998
11106
  key: index,
10999
11107
  active: highlightFirst.value && index === 0 ? true : undefined,
@@ -11743,7 +11851,7 @@ const makeVCardProps = propsFactory({
11743
11851
  prependAvatar: String,
11744
11852
  prependIcon: IconValue,
11745
11853
  ripple: {
11746
- type: Boolean,
11854
+ type: [Boolean, Object],
11747
11855
  default: true
11748
11856
  },
11749
11857
  subtitle: String,
@@ -13148,6 +13256,8 @@ const useSlider = _ref => {
13148
13256
  return data;
13149
13257
  };
13150
13258
 
13259
+ // Types
13260
+
13151
13261
  const makeVSliderThumbProps = propsFactory({
13152
13262
  focused: Boolean,
13153
13263
  max: {
@@ -13167,7 +13277,7 @@ const makeVSliderThumbProps = propsFactory({
13167
13277
  required: true
13168
13278
  },
13169
13279
  ripple: {
13170
- type: Boolean,
13280
+ type: [Boolean, Object],
13171
13281
  default: true
13172
13282
  },
13173
13283
  ...makeComponentProps()
@@ -14326,6 +14436,7 @@ const VCombobox = genericComponent()({
14326
14436
  const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === 'exact' && search.value === displayItems.value[0]?.title;
14327
14437
  return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;
14328
14438
  });
14439
+ const menuDisabled = computed(() => props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value);
14329
14440
  const listRef = ref();
14330
14441
  function onClear(e) {
14331
14442
  cleared = true;
@@ -14334,10 +14445,11 @@ const VCombobox = genericComponent()({
14334
14445
  }
14335
14446
  }
14336
14447
  function onMousedownControl() {
14337
- if (props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value) return;
14448
+ if (menuDisabled.value) return;
14338
14449
  menu.value = true;
14339
14450
  }
14340
14451
  function onMousedownMenuIcon(e) {
14452
+ if (menuDisabled.value) return;
14341
14453
  if (isFocused.value) {
14342
14454
  e.preventDefault();
14343
14455
  e.stopPropagation();
@@ -14363,10 +14475,8 @@ const VCombobox = genericComponent()({
14363
14475
  }
14364
14476
  isPristine.value = true;
14365
14477
  }
14366
- if (e.key === 'ArrowDown') {
14478
+ if (e.key === 'ArrowDown' && highlightFirst.value) {
14367
14479
  listRef.value?.focus('next');
14368
- } else if (e.key === 'ArrowUp') {
14369
- listRef.value?.focus('prev');
14370
14480
  }
14371
14481
  if (!props.multiple) return;
14372
14482
  if (['Backspace', 'Delete'].includes(e.key)) {
@@ -14405,6 +14515,11 @@ const VCombobox = genericComponent()({
14405
14515
  search.value = '';
14406
14516
  }
14407
14517
  }
14518
+ function onListKeydown(e) {
14519
+ if (e.key === 'Tab') {
14520
+ vTextFieldRef.value?.focus();
14521
+ }
14522
+ }
14408
14523
  function onAfterLeave() {
14409
14524
  if (isFocused.value) {
14410
14525
  isPristine.value = true;
@@ -14466,7 +14581,7 @@ const VCombobox = genericComponent()({
14466
14581
  });
14467
14582
  useRender(() => {
14468
14583
  const hasChips = !!(props.chips || slots.chip);
14469
- const hasList = !!(!props.hideNoData || displayItems.value.length || slots.prepend || slots.append || slots['no-data']);
14584
+ const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
14470
14585
  const isDirty = model.value.length > 0;
14471
14586
  const [textFieldProps] = VTextField.filterProps(props);
14472
14587
  return createVNode(VTextField, mergeProps({
@@ -14499,6 +14614,7 @@ const VCombobox = genericComponent()({
14499
14614
  "onUpdate:modelValue": $event => menu.value = $event,
14500
14615
  "activator": "parent",
14501
14616
  "contentClass": "v-combobox__content",
14617
+ "disabled": menuDisabled.value,
14502
14618
  "eager": props.eager,
14503
14619
  "maxHeight": 310,
14504
14620
  "openOnClick": false,
@@ -14511,12 +14627,14 @@ const VCombobox = genericComponent()({
14511
14627
  "selected": selected.value,
14512
14628
  "selectStrategy": props.multiple ? 'independent' : 'single-independent',
14513
14629
  "onMousedown": e => e.preventDefault(),
14630
+ "onKeydown": onListKeydown,
14514
14631
  "onFocusin": onFocusin,
14515
- "onFocusout": onFocusout
14632
+ "onFocusout": onFocusout,
14633
+ "tabindex": "-1"
14516
14634
  }, {
14517
- default: () => [!displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
14635
+ default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
14518
14636
  "title": t(props.noDataText)
14519
- }, null)), slots['prepend-item']?.(), displayItems.value.map((item, index) => {
14637
+ }, null)), displayItems.value.map((item, index) => {
14520
14638
  const itemProps = mergeProps(item.props, {
14521
14639
  key: index,
14522
14640
  active: highlightFirst.value && index === 0 ? true : undefined,
@@ -14808,6 +14926,8 @@ const VExpansionPanelText = genericComponent()({
14808
14926
  }
14809
14927
  });
14810
14928
 
14929
+ // Types
14930
+
14811
14931
  const makeVExpansionPanelTitleProps = propsFactory({
14812
14932
  color: String,
14813
14933
  expandIcon: {
@@ -15080,8 +15200,6 @@ const VFileInput = genericComponent()({
15080
15200
  "modelValue": model.value,
15081
15201
  "onUpdate:modelValue": $event => model.value = $event,
15082
15202
  "class": ['v-file-input', {
15083
- 'v-file-input--chips': !!props.chips,
15084
- 'v-file-input--selection-slot': !!slots.selection,
15085
15203
  'v-text-field--plain-underlined': isPlainOrUnderlined.value
15086
15204
  }, props.class],
15087
15205
  "style": props.style,
@@ -18078,8 +18196,8 @@ const VTab = genericComponent()({
18078
18196
  const initialScale = prevBox[widthHeight] / nextBox[widthHeight];
18079
18197
  const sigma = 1.5;
18080
18198
  animate(nextEl, {
18081
- backgroundColor: [color, ''],
18082
- transform: [`translate${XY}(${delta}px) scale${XY}(${initialScale})`, `translate${XY}(${delta / sigma}px) scale${XY}(${(scale - 1) / sigma + 1})`, ''],
18199
+ backgroundColor: [color, 'currentcolor'],
18200
+ transform: [`translate${XY}(${delta}px) scale${XY}(${initialScale})`, `translate${XY}(${delta / sigma}px) scale${XY}(${(scale - 1) / sigma + 1})`, 'none'],
18083
18201
  transformOrigin: Array(3).fill(origin)
18084
18202
  }, {
18085
18203
  duration: 225,
@@ -19503,9 +19621,10 @@ const singleSelectStrategy = {
19503
19621
  allSelected: () => [],
19504
19622
  select: _ref => {
19505
19623
  let {
19506
- items
19624
+ items,
19625
+ value
19507
19626
  } = _ref;
19508
- return new Set([items[0]?.value]);
19627
+ return new Set(value ? [items[0]?.value] : []);
19509
19628
  },
19510
19629
  selectAll: _ref2 => {
19511
19630
  let {
@@ -20117,7 +20236,7 @@ const VDataTableHeadersSymbol = Symbol.for('vuetify:data-table-headers');
20117
20236
  function createHeaders(props, options) {
20118
20237
  const headers = ref([]);
20119
20238
  const columns = ref([]);
20120
- watch(() => props.headers, () => {
20239
+ watchEffect(() => {
20121
20240
  const wrapped = !props.headers.length ? [] : Array.isArray(props.headers[0]) ? props.headers : [props.headers];
20122
20241
  const flat = wrapped.flatMap((row, index) => row.map(column => ({
20123
20242
  column,
@@ -20237,9 +20356,6 @@ function createHeaders(props, options) {
20237
20356
  return filtered;
20238
20357
  });
20239
20358
  columns.value = fixedRows.at(-1) ?? [];
20240
- }, {
20241
- deep: true,
20242
- immediate: true
20243
20359
  });
20244
20360
  const data = {
20245
20361
  headers,
@@ -20393,11 +20509,11 @@ const VDataTableHeaders = genericComponent()({
20393
20509
  "x": x,
20394
20510
  "y": y
20395
20511
  }, null))])), props.loading && createVNode("tr", {
20396
- "class": "v-data-table__progress"
20512
+ "class": "v-data-table-progress"
20397
20513
  }, [createVNode("th", {
20398
20514
  "colspan": columns.value.length
20399
20515
  }, [createVNode(LoaderSlot, {
20400
- "name": "v-data-table-headers",
20516
+ "name": "v-data-table-progress",
20401
20517
  "active": true,
20402
20518
  "color": typeof props.loading === 'boolean' ? undefined : props.loading,
20403
20519
  "indeterminate": true
@@ -21072,18 +21188,22 @@ const VDataTableVirtual = genericComponent()({
21072
21188
  "items": displayItems.value
21073
21189
  }), {
21074
21190
  ...slots,
21075
- item: itemSlotProps => {
21076
- return slots.item?.(itemSlotProps) ?? createVNode(VVirtualScrollItem, {
21077
- "key": itemSlotProps.item.index,
21078
- "dynamicHeight": true,
21079
- "renderless": true,
21080
- "onUpdate:height": height => handleItemResize(itemSlotProps.item.index, height)
21081
- }, {
21082
- default: slotProps => createVNode(VDataTableRow, mergeProps(itemSlotProps.props, slotProps?.props, {
21083
- "key": itemSlotProps.item.index
21084
- }), slots)
21085
- });
21086
- }
21191
+ item: itemSlotProps => createVNode(VVirtualScrollItem, {
21192
+ "key": itemSlotProps.item.index,
21193
+ "dynamicHeight": true,
21194
+ "renderless": true,
21195
+ "onUpdate:height": height => handleItemResize(itemSlotProps.item.index, height)
21196
+ }, {
21197
+ default: slotProps => slots.item?.({
21198
+ ...itemSlotProps,
21199
+ props: {
21200
+ ...itemSlotProps.props,
21201
+ ...slotProps?.props
21202
+ }
21203
+ }) ?? createVNode(VDataTableRow, mergeProps(itemSlotProps.props, slotProps?.props, {
21204
+ "key": itemSlotProps.item.index
21205
+ }), slots)
21206
+ })
21087
21207
  }), createVNode("tr", {
21088
21208
  "style": {
21089
21209
  height: convertToUnit(paddingBottom.value),
@@ -21271,1038 +21391,1944 @@ const VDataTableServer = genericComponent()({
21271
21391
  }
21272
21392
  });
21273
21393
 
21394
+ // Utilities
21395
+
21274
21396
  // Types
21275
21397
 
21276
- const makeVInfiniteScrollProps = propsFactory({
21277
- color: String,
21278
- direction: {
21279
- type: String,
21280
- default: 'vertical',
21281
- validator: v => ['vertical', 'horizontal'].includes(v)
21282
- },
21283
- side: {
21284
- type: String,
21285
- default: 'end',
21286
- validator: v => ['start', 'end', 'both'].includes(v)
21287
- },
21288
- mode: {
21289
- type: String,
21290
- default: 'intersect',
21291
- validator: v => ['intersect', 'manual'].includes(v)
21292
- },
21293
- margin: [Number, String],
21294
- loadMoreText: {
21295
- type: String,
21296
- default: '$vuetify.infiniteScroll.loadMore'
21297
- },
21298
- emptyText: {
21299
- type: String,
21300
- default: '$vuetify.infiniteScroll.empty'
21301
- },
21302
- ...makeDimensionProps(),
21303
- ...makeTagProps()
21304
- }, 'VInfiniteScroll');
21305
- const VInfiniteScrollIntersect = defineComponent({
21306
- name: 'VInfiniteScrollIntersect',
21307
- props: {
21308
- side: {
21309
- type: String,
21310
- required: true
21311
- },
21312
- rootRef: null,
21313
- rootMargin: String
21314
- },
21315
- emits: {
21316
- intersect: side => true
21317
- },
21318
- setup(props, _ref) {
21319
- let {
21320
- emit
21321
- } = _ref;
21322
- const {
21323
- intersectionRef,
21324
- isIntersecting
21325
- } = useIntersectionObserver(entries => {}, props.rootMargin ? {
21326
- root: props.rootRef,
21327
- rootMargin: props.rootMargin
21328
- } : undefined);
21329
- watch(isIntersecting, async val => {
21330
- if (val) emit('intersect', props.side);
21331
- });
21332
- useRender(() => createVNode("div", {
21333
- "class": "v-infinite-scroll-intersect",
21334
- "ref": intersectionRef
21335
- }, [createTextVNode("\xA0")]));
21336
- return {};
21337
- }
21338
- });
21339
- const VInfiniteScroll = genericComponent()({
21340
- name: 'VInfiniteScroll',
21341
- props: makeVInfiniteScrollProps(),
21342
- emits: {
21343
- load: options => true
21344
- },
21345
- setup(props, _ref2) {
21346
- let {
21347
- slots,
21348
- emit
21349
- } = _ref2;
21350
- const rootEl = ref();
21351
- const startStatus = ref('ok');
21352
- const endStatus = ref('ok');
21353
- const margin = computed(() => convertToUnit(props.margin));
21354
- function setScrollAmount(amount) {
21355
- if (!rootEl.value) return;
21356
- const property = props.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
21357
- rootEl.value[property] = amount;
21358
- }
21359
- function getScrollAmount() {
21360
- if (!rootEl.value) return 0;
21361
- const property = props.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
21362
- return rootEl.value[property];
21363
- }
21364
- function getScrollSize() {
21365
- if (!rootEl.value) return 0;
21366
- const property = props.direction === 'vertical' ? 'scrollHeight' : 'scrollWidth';
21367
- return rootEl.value[property];
21368
- }
21369
- function getContainerSize() {
21370
- if (!rootEl.value) return 0;
21371
- const property = props.direction === 'vertical' ? 'clientHeight' : 'clientWidth';
21372
- return rootEl.value[property];
21373
- }
21374
- onMounted(() => {
21375
- if (!rootEl.value) return;
21376
- if (props.side === 'start') {
21377
- setScrollAmount(getScrollSize());
21378
- } else if (props.side === 'both') {
21379
- setScrollAmount(getScrollSize() / 2 - getContainerSize() / 2);
21380
- }
21381
- });
21382
- function setStatus(side, status) {
21383
- if (side === 'start') {
21384
- startStatus.value = status;
21385
- } else if (side === 'end') {
21386
- endStatus.value = status;
21387
- }
21388
- }
21389
- function getStatus(side) {
21390
- return side === 'start' ? startStatus.value : endStatus.value;
21391
- }
21392
- let previousScrollSize = 0;
21393
- function handleIntersect(side) {
21394
- const status = getStatus(side);
21395
- if (!rootEl.value || status === 'loading') return;
21396
- previousScrollSize = getScrollSize();
21397
- setStatus(side, 'loading');
21398
- function done(status) {
21399
- setStatus(side, status);
21400
- nextTick(() => {
21401
- if (status === 'ok' && side === 'start') {
21402
- setScrollAmount(getScrollSize() - previousScrollSize + getScrollAmount());
21403
- }
21404
- });
21405
- }
21406
- emit('load', {
21407
- side,
21408
- done
21409
- });
21410
- }
21411
- const {
21412
- t
21413
- } = useLocale();
21414
- function renderSide(side, status) {
21415
- if (props.side !== side && props.side !== 'both') return;
21416
- const onClick = () => handleIntersect(side);
21417
- const slotProps = {
21418
- side,
21419
- props: {
21420
- onClick,
21421
- color: props.color
21422
- }
21423
- };
21424
- if (status === 'error') return slots.error?.(slotProps);
21425
- if (status === 'empty') return slots.empty?.(slotProps) ?? createVNode("div", null, [t(props.emptyText)]);
21426
- if (props.mode === 'manual') {
21427
- if (status === 'loading') {
21428
- return slots.loading?.(slotProps) ?? createVNode(VProgressCircular, {
21429
- "indeterminate": true,
21430
- "color": props.color
21431
- }, null);
21432
- }
21433
- return slots['load-more']?.(slotProps) ?? createVNode(VBtn, {
21434
- "variant": "outlined",
21435
- "color": props.color,
21436
- "onClick": onClick
21437
- }, {
21438
- default: () => [t(props.loadMoreText)]
21439
- });
21440
- }
21441
- return slots.loading?.(slotProps) ?? createVNode(VProgressCircular, {
21442
- "indeterminate": true,
21443
- "color": props.color
21444
- }, null);
21398
+ const firstDay = {
21399
+ '001': 1,
21400
+ AD: 1,
21401
+ AE: 6,
21402
+ AF: 6,
21403
+ AG: 0,
21404
+ AI: 1,
21405
+ AL: 1,
21406
+ AM: 1,
21407
+ AN: 1,
21408
+ AR: 1,
21409
+ AS: 0,
21410
+ AT: 1,
21411
+ AU: 1,
21412
+ AX: 1,
21413
+ AZ: 1,
21414
+ BA: 1,
21415
+ BD: 0,
21416
+ BE: 1,
21417
+ BG: 1,
21418
+ BH: 6,
21419
+ BM: 1,
21420
+ BN: 1,
21421
+ BR: 0,
21422
+ BS: 0,
21423
+ BT: 0,
21424
+ BW: 0,
21425
+ BY: 1,
21426
+ BZ: 0,
21427
+ CA: 0,
21428
+ CH: 1,
21429
+ CL: 1,
21430
+ CM: 1,
21431
+ CN: 1,
21432
+ CO: 0,
21433
+ CR: 1,
21434
+ CY: 1,
21435
+ CZ: 1,
21436
+ DE: 1,
21437
+ DJ: 6,
21438
+ DK: 1,
21439
+ DM: 0,
21440
+ DO: 0,
21441
+ DZ: 6,
21442
+ EC: 1,
21443
+ EE: 1,
21444
+ EG: 6,
21445
+ ES: 1,
21446
+ ET: 0,
21447
+ FI: 1,
21448
+ FJ: 1,
21449
+ FO: 1,
21450
+ FR: 1,
21451
+ GB: 1,
21452
+ 'GB-alt-variant': 0,
21453
+ GE: 1,
21454
+ GF: 1,
21455
+ GP: 1,
21456
+ GR: 1,
21457
+ GT: 0,
21458
+ GU: 0,
21459
+ HK: 0,
21460
+ HN: 0,
21461
+ HR: 1,
21462
+ HU: 1,
21463
+ ID: 0,
21464
+ IE: 1,
21465
+ IL: 0,
21466
+ IN: 0,
21467
+ IQ: 6,
21468
+ IR: 6,
21469
+ IS: 1,
21470
+ IT: 1,
21471
+ JM: 0,
21472
+ JO: 6,
21473
+ JP: 0,
21474
+ KE: 0,
21475
+ KG: 1,
21476
+ KH: 0,
21477
+ KR: 0,
21478
+ KW: 6,
21479
+ KZ: 1,
21480
+ LA: 0,
21481
+ LB: 1,
21482
+ LI: 1,
21483
+ LK: 1,
21484
+ LT: 1,
21485
+ LU: 1,
21486
+ LV: 1,
21487
+ LY: 6,
21488
+ MC: 1,
21489
+ MD: 1,
21490
+ ME: 1,
21491
+ MH: 0,
21492
+ MK: 1,
21493
+ MM: 0,
21494
+ MN: 1,
21495
+ MO: 0,
21496
+ MQ: 1,
21497
+ MT: 0,
21498
+ MV: 5,
21499
+ MX: 0,
21500
+ MY: 1,
21501
+ MZ: 0,
21502
+ NI: 0,
21503
+ NL: 1,
21504
+ NO: 1,
21505
+ NP: 0,
21506
+ NZ: 1,
21507
+ OM: 6,
21508
+ PA: 0,
21509
+ PE: 0,
21510
+ PH: 0,
21511
+ PK: 0,
21512
+ PL: 1,
21513
+ PR: 0,
21514
+ PT: 0,
21515
+ PY: 0,
21516
+ QA: 6,
21517
+ RE: 1,
21518
+ RO: 1,
21519
+ RS: 1,
21520
+ RU: 1,
21521
+ SA: 0,
21522
+ SD: 6,
21523
+ SE: 1,
21524
+ SG: 0,
21525
+ SI: 1,
21526
+ SK: 1,
21527
+ SM: 1,
21528
+ SV: 0,
21529
+ SY: 6,
21530
+ TH: 0,
21531
+ TJ: 1,
21532
+ TM: 1,
21533
+ TR: 1,
21534
+ TT: 0,
21535
+ TW: 0,
21536
+ UA: 1,
21537
+ UM: 0,
21538
+ US: 0,
21539
+ UY: 1,
21540
+ UZ: 1,
21541
+ VA: 1,
21542
+ VE: 0,
21543
+ VI: 0,
21544
+ VN: 1,
21545
+ WS: 0,
21546
+ XK: 1,
21547
+ YE: 0,
21548
+ ZA: 0,
21549
+ ZW: 0
21550
+ };
21551
+ function getWeekArray(date, locale) {
21552
+ const weeks = [];
21553
+ let currentWeek = [];
21554
+ const firstDayOfMonth = startOfMonth(date);
21555
+ const lastDayOfMonth = endOfMonth(date);
21556
+ const firstDayWeekIndex = firstDayOfMonth.getDay() - firstDay[locale.slice(-2).toUpperCase()];
21557
+ const lastDayWeekIndex = lastDayOfMonth.getDay() - firstDay[locale.slice(-2).toUpperCase()];
21558
+ for (let i = 0; i < firstDayWeekIndex; i++) {
21559
+ const adjacentDay = new Date(firstDayOfMonth);
21560
+ adjacentDay.setDate(adjacentDay.getDate() - (firstDayWeekIndex - i));
21561
+ currentWeek.push(adjacentDay);
21562
+ }
21563
+ for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {
21564
+ const day = new Date(date.getFullYear(), date.getMonth(), i);
21565
+
21566
+ // Add the day to the current week
21567
+ currentWeek.push(day);
21568
+
21569
+ // If the current week has 7 days, add it to the weeks array and start a new week
21570
+ if (currentWeek.length === 7) {
21571
+ weeks.push(currentWeek);
21572
+ currentWeek = [];
21445
21573
  }
21446
- const {
21447
- dimensionStyles
21448
- } = useDimension(props);
21449
- useRender(() => {
21450
- const Tag = props.tag;
21451
- const hasStartIntersect = props.side === 'start' || props.side === 'both';
21452
- const hasEndIntersect = props.side === 'end' || props.side === 'both';
21453
- const intersectMode = props.mode === 'intersect';
21454
- return createVNode(Tag, {
21455
- "ref": rootEl,
21456
- "class": ['v-infinite-scroll', `v-infinite-scroll--${props.direction}`, {
21457
- 'v-infinite-scroll--start': hasStartIntersect,
21458
- 'v-infinite-scroll--end': hasEndIntersect
21459
- }],
21460
- "style": dimensionStyles.value
21461
- }, {
21462
- default: () => [createVNode("div", {
21463
- "class": "v-infinite-scroll__side"
21464
- }, [renderSide('start', startStatus.value)]), rootEl.value && hasStartIntersect && intersectMode && createVNode(VInfiniteScrollIntersect, {
21465
- "key": "start",
21466
- "side": "start",
21467
- "onIntersect": handleIntersect,
21468
- "rootRef": rootEl.value,
21469
- "rootMargin": margin.value
21470
- }, null), slots.default?.(), rootEl.value && hasEndIntersect && intersectMode && createVNode(VInfiniteScrollIntersect, {
21471
- "key": "end",
21472
- "side": "end",
21473
- "onIntersect": handleIntersect,
21474
- "rootRef": rootEl.value,
21475
- "rootMargin": margin.value
21476
- }, null), createVNode("div", {
21477
- "class": "v-infinite-scroll__side"
21478
- }, [renderSide('end', endStatus.value)])]
21479
- });
21480
- });
21481
21574
  }
21482
- });
21575
+ for (let i = 1; i < 7 - lastDayWeekIndex; i++) {
21576
+ const adjacentDay = new Date(lastDayOfMonth);
21577
+ adjacentDay.setDate(adjacentDay.getDate() + i);
21578
+ currentWeek.push(adjacentDay);
21579
+ }
21580
+ weeks.push(currentWeek);
21581
+ return weeks;
21582
+ }
21583
+ function startOfMonth(date) {
21584
+ return new Date(date.getFullYear(), date.getMonth(), 1);
21585
+ }
21586
+ function endOfMonth(date) {
21587
+ return new Date(date.getFullYear(), date.getMonth() + 1, 0);
21588
+ }
21589
+ function date(value) {
21590
+ if (value == null) return new Date();
21591
+ if (value instanceof Date) return value;
21592
+ if (typeof value === 'string') {
21593
+ const parsed = Date.parse(value);
21594
+ if (!isNaN(parsed)) return new Date(parsed);
21595
+ }
21596
+ return null;
21597
+ }
21598
+ const sundayJanuarySecond2000 = new Date(2000, 0, 2);
21599
+ function getWeekdays(locale) {
21600
+ const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()];
21601
+ return createRange(7).map(i => {
21602
+ const weekday = new Date(sundayJanuarySecond2000);
21603
+ weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
21604
+ return new Intl.DateTimeFormat(locale, {
21605
+ weekday: 'short'
21606
+ }).format(weekday);
21607
+ });
21608
+ }
21609
+ function format(value, formatString, locale) {
21610
+ const date = new Date(value);
21611
+ let options = {};
21612
+ switch (formatString) {
21613
+ case 'fullDateWithWeekday':
21614
+ options = {
21615
+ weekday: 'long',
21616
+ day: 'numeric',
21617
+ month: 'long',
21618
+ year: 'numeric'
21619
+ };
21620
+ break;
21621
+ case 'normalDateWithWeekday':
21622
+ options = {
21623
+ weekday: 'short',
21624
+ day: 'numeric',
21625
+ month: 'short'
21626
+ };
21627
+ break;
21628
+ case 'keyboardDate':
21629
+ options = {};
21630
+ break;
21631
+ case 'monthAndDate':
21632
+ options = {
21633
+ month: 'long',
21634
+ day: 'numeric'
21635
+ };
21636
+ break;
21637
+ case 'monthAndYear':
21638
+ options = {
21639
+ month: 'long',
21640
+ year: 'numeric'
21641
+ };
21642
+ break;
21643
+ case 'dayOfMonth':
21644
+ options = {
21645
+ day: 'numeric'
21646
+ };
21647
+ break;
21648
+ default:
21649
+ options = {
21650
+ timeZone: 'UTC',
21651
+ timeZoneName: 'short'
21652
+ };
21653
+ }
21654
+ return new Intl.DateTimeFormat(locale, options).format(date);
21655
+ }
21656
+ function addDays(date, amount) {
21657
+ const d = new Date(date);
21658
+ d.setDate(d.getDate() + amount);
21659
+ return d;
21660
+ }
21661
+ function addMonths(date, amount) {
21662
+ const d = new Date(date);
21663
+ d.setMonth(d.getMonth() + amount);
21664
+ return d;
21665
+ }
21666
+ function getYear(date) {
21667
+ return date.getFullYear();
21668
+ }
21669
+ function getMonth(date) {
21670
+ return date.getMonth();
21671
+ }
21672
+ function startOfYear(date) {
21673
+ return new Date(date.getFullYear(), 0, 1);
21674
+ }
21675
+ function endOfYear(date) {
21676
+ return new Date(date.getFullYear(), 11, 31);
21677
+ }
21678
+ function isWithinRange(date, range) {
21679
+ return isAfter(date, range[0]) && isBefore(date, range[1]);
21680
+ }
21681
+ function isValid(date) {
21682
+ const d = new Date(date);
21683
+ return d instanceof Date && !isNaN(d.getTime());
21684
+ }
21685
+ function isAfter(date, comparing) {
21686
+ return date.getTime() > comparing.getTime();
21687
+ }
21688
+ function isBefore(date, comparing) {
21689
+ return date.getTime() < comparing.getTime();
21690
+ }
21691
+ function isEqual(date, comparing) {
21692
+ return date.getTime() === comparing.getTime();
21693
+ }
21694
+ function isSameDay(date, comparing) {
21695
+ return date.getDate() === comparing.getDate() && date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
21696
+ }
21697
+ function isSameMonth(date, comparing) {
21698
+ return date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
21699
+ }
21700
+ function getDiff(date, comparing, unit) {
21701
+ const d = new Date(date);
21702
+ const c = new Date(comparing);
21703
+ if (unit === 'month') {
21704
+ return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12;
21705
+ }
21706
+ return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24));
21707
+ }
21708
+ function setYear(date, year) {
21709
+ const d = new Date(date);
21710
+ d.setFullYear(year);
21711
+ return d;
21712
+ }
21713
+ class VuetifyDateAdapter {
21714
+ constructor(options) {
21715
+ this.locale = options.locale;
21716
+ }
21717
+ date(value) {
21718
+ return date(value);
21719
+ }
21720
+ toJsDate(date) {
21721
+ return date;
21722
+ }
21723
+ addDays(date, amount) {
21724
+ return addDays(date, amount);
21725
+ }
21726
+ addMonths(date, amount) {
21727
+ return addMonths(date, amount);
21728
+ }
21729
+ getWeekArray(date) {
21730
+ return getWeekArray(date, this.locale);
21731
+ }
21732
+ startOfMonth(date) {
21733
+ return startOfMonth(date);
21734
+ }
21735
+ endOfMonth(date) {
21736
+ return endOfMonth(date);
21737
+ }
21738
+ format(date, formatString) {
21739
+ return format(date, formatString, this.locale);
21740
+ }
21741
+ isEqual(date, comparing) {
21742
+ return isEqual(date, comparing);
21743
+ }
21744
+ isValid(date) {
21745
+ return isValid(date);
21746
+ }
21747
+ isWithinRange(date, range) {
21748
+ return isWithinRange(date, range);
21749
+ }
21750
+ isAfter(date, comparing) {
21751
+ return isAfter(date, comparing);
21752
+ }
21753
+ isBefore(date, comparing) {
21754
+ return !isAfter(date, comparing) && !isEqual(date, comparing);
21755
+ }
21756
+ isSameDay(date, comparing) {
21757
+ return isSameDay(date, comparing);
21758
+ }
21759
+ isSameMonth(date, comparing) {
21760
+ return isSameMonth(date, comparing);
21761
+ }
21762
+ setYear(date, year) {
21763
+ return setYear(date, year);
21764
+ }
21765
+ getDiff(date, comparing, unit) {
21766
+ return getDiff(date, comparing, unit);
21767
+ }
21768
+ getWeekdays() {
21769
+ return getWeekdays(this.locale);
21770
+ }
21771
+ getYear(date) {
21772
+ return getYear(date);
21773
+ }
21774
+ getMonth(date) {
21775
+ return getMonth(date);
21776
+ }
21777
+ startOfYear(date) {
21778
+ return startOfYear(date);
21779
+ }
21780
+ endOfYear(date) {
21781
+ return endOfYear(date);
21782
+ }
21783
+ }
21784
+
21785
+ // Composables
21483
21786
 
21484
21787
  // Types
21485
21788
 
21486
- const rootTypes = {
21487
- actions: 'button@2',
21488
- article: 'heading, paragraph',
21489
- avatar: 'avatar',
21490
- button: 'button',
21491
- card: 'image, heading',
21492
- 'card-avatar': 'image, list-item-avatar',
21493
- chip: 'chip',
21494
- 'date-picker': 'list-item, heading, divider, date-picker-options, date-picker-days, actions',
21495
- 'date-picker-options': 'text, avatar@2',
21496
- 'date-picker-days': 'avatar@28',
21497
- divider: 'divider',
21498
- heading: 'heading',
21499
- image: 'image',
21500
- 'list-item': 'text',
21501
- 'list-item-avatar': 'avatar, text',
21502
- 'list-item-two-line': 'sentences',
21503
- 'list-item-avatar-two-line': 'avatar, sentences',
21504
- 'list-item-three-line': 'paragraph',
21505
- 'list-item-avatar-three-line': 'avatar, paragraph',
21506
- paragraph: 'text@3',
21507
- sentences: 'text@2',
21508
- subtitle: 'text',
21509
- table: 'table-heading, table-thead, table-tbody, table-tfoot',
21510
- 'table-heading': 'chip, text',
21511
- 'table-thead': 'heading@6',
21512
- 'table-tbody': 'table-row-divider@6',
21513
- 'table-row-divider': 'table-row, divider',
21514
- 'table-row': 'text@6',
21515
- 'table-tfoot': 'text@2, avatar@2',
21516
- text: 'text'
21517
- };
21518
- function genBone(type) {
21519
- let children = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
21520
- return createVNode("div", {
21521
- "class": ['v-skeleton-loader__bone', `v-skeleton-loader__${type}`]
21522
- }, [children]);
21789
+ const DateAdapterSymbol = Symbol.for('vuetify:date-adapter');
21790
+ function createDate(options) {
21791
+ return mergeDeep({
21792
+ adapter: VuetifyDateAdapter,
21793
+ locale: {
21794
+ af: 'af-ZA',
21795
+ // ar: '', # not the same value for all variants
21796
+ bg: 'bg-BG',
21797
+ ca: 'ca-ES',
21798
+ ckb: '',
21799
+ cs: '',
21800
+ de: 'de-DE',
21801
+ el: 'el-GR',
21802
+ en: 'en-US',
21803
+ // es: '', # not the same value for all variants
21804
+ et: 'et-EE',
21805
+ fa: 'fa-IR',
21806
+ fi: 'fi-FI',
21807
+ // fr: '', #not the same value for all variants
21808
+ hr: 'hr-HR',
21809
+ hu: 'hu-HU',
21810
+ he: 'he-IL',
21811
+ id: 'id-ID',
21812
+ it: 'it-IT',
21813
+ ja: 'ja-JP',
21814
+ ko: 'ko-KR',
21815
+ lv: 'lv-LV',
21816
+ lt: 'lt-LT',
21817
+ nl: 'nl-NL',
21818
+ no: 'nn-NO',
21819
+ pl: 'pl-PL',
21820
+ pt: 'pt-PT',
21821
+ ro: 'ro-RO',
21822
+ ru: 'ru-RU',
21823
+ sk: 'sk-SK',
21824
+ sl: 'sl-SI',
21825
+ srCyrl: 'sr-SP',
21826
+ srLatn: 'sr-SP',
21827
+ sv: 'sv-SE',
21828
+ th: 'th-TH',
21829
+ tr: 'tr-TR',
21830
+ az: 'az-AZ',
21831
+ uk: 'uk-UA',
21832
+ vi: 'vi-VN',
21833
+ zhHans: 'zh-CN',
21834
+ zhHant: 'zh-TW'
21835
+ }
21836
+ }, options);
21837
+ }
21838
+ function useDate() {
21839
+ const date = inject$1(DateAdapterSymbol);
21840
+ const locale = useLocale();
21841
+ if (!date) throw new Error('[Vuetify] Could not find injected date');
21842
+ const instance = typeof date.adapter === 'function'
21843
+ // eslint-disable-next-line new-cap
21844
+ ? new date.adapter({
21845
+ locale: date.locale?.[locale.current.value] ?? locale.current.value
21846
+ }) : date.adapter;
21847
+ watch(locale.current, value => {
21848
+ const newLocale = date.locale ? date.locale[value] : value;
21849
+ instance.locale = newLocale ?? instance.locale;
21850
+ });
21851
+ return instance;
21852
+ }
21853
+ function toIso(adapter, value) {
21854
+ const date = adapter.toJsDate(value);
21855
+ return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
21856
+ }
21857
+ function getMondayOfFirstWeekOfYear(year) {
21858
+ return new Date(year, 0, 1);
21523
21859
  }
21524
- function genBones(bone) {
21525
- // e.g. 'text@3'
21526
- const [type, length] = bone.split('@');
21527
21860
 
21528
- // Generate a length array based upon
21529
- // value after @ in the bone string
21530
- return Array.from({
21531
- length
21532
- }).map(() => genStructure(type));
21861
+ // https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
21862
+ function getWeek(adapter, value) {
21863
+ const date = adapter.toJsDate(value);
21864
+ let year = date.getFullYear();
21865
+ let d1w1 = getMondayOfFirstWeekOfYear(year);
21866
+ if (date < d1w1) {
21867
+ year = year - 1;
21868
+ d1w1 = getMondayOfFirstWeekOfYear(year);
21869
+ } else {
21870
+ const tv = getMondayOfFirstWeekOfYear(year + 1);
21871
+ if (date >= tv) {
21872
+ year = year + 1;
21873
+ d1w1 = tv;
21874
+ }
21875
+ }
21876
+ const diffTime = Math.abs(date.getTime() - d1w1.getTime());
21877
+ const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
21878
+ return Math.floor(diffDays / 7) + 1;
21533
21879
  }
21534
- function genStructure(type) {
21535
- let children = [];
21536
- if (!type) return children;
21537
21880
 
21538
- // TODO: figure out a better way to type this
21539
- const bone = rootTypes[type];
21881
+ // Composables
21882
+
21883
+ // Types
21884
+
21885
+ const makeDateProps = propsFactory({
21886
+ modelValue: {
21887
+ type: null,
21888
+ default: () => []
21889
+ },
21890
+ displayDate: {
21891
+ type: null,
21892
+ default: new Date()
21893
+ },
21894
+ inputMode: {
21895
+ type: String,
21896
+ default: 'calendar'
21897
+ },
21898
+ viewMode: {
21899
+ type: String,
21900
+ default: 'month'
21901
+ },
21902
+ format: String
21903
+ }, 'date');
21904
+ const dateEmits = {
21905
+ 'update:modelValue': date => true,
21906
+ 'update:displayDate': date => true,
21907
+ 'update:focused': focused => true,
21908
+ 'update:inputMode': inputMode => true,
21909
+ 'update:viewMode': viewMode => true
21910
+ };
21911
+
21912
+ const makeVDatePickerControlsProps = propsFactory({
21913
+ nextIcon: {
21914
+ type: [String],
21915
+ default: '$next'
21916
+ },
21917
+ prevIcon: {
21918
+ type: [String],
21919
+ default: '$prev'
21920
+ },
21921
+ expandIcon: {
21922
+ type: [String],
21923
+ default: '$expand'
21924
+ },
21925
+ collapseIcon: {
21926
+ type: [String],
21927
+ default: '$collapse'
21928
+ },
21929
+ range: {
21930
+ default: false,
21931
+ type: [String, Boolean],
21932
+ validator: v => v === false || ['start', 'end'].includes(v)
21933
+ },
21934
+ ...omit(makeDateProps(), ['modelValue', 'inputMode'])
21935
+ }, 'VDatePickerControls');
21936
+ const VDatePickerControls = genericComponent()({
21937
+ name: 'VDatePickerControls',
21938
+ props: makeVDatePickerControlsProps(),
21939
+ emits: {
21940
+ ...omit(dateEmits, ['update:modelValue', 'update:inputMode'])
21941
+ },
21942
+ setup(props, _ref) {
21943
+ let {
21944
+ emit
21945
+ } = _ref;
21946
+ const adapter = useDate();
21947
+ const monthAndYear = computed(() => {
21948
+ const month = props.range === 'end' ? adapter.addMonths(props.displayDate, 1) : props.displayDate;
21949
+ return adapter.format(month, 'monthAndYear');
21950
+ });
21951
+ useRender(() => {
21952
+ const prevBtn = createVNode(VBtn, {
21953
+ "variant": "text",
21954
+ "icon": props.prevIcon,
21955
+ "onClick": () => emit('update:displayDate', adapter.addMonths(props.displayDate, -1))
21956
+ }, null);
21957
+ const nextBtn = createVNode(VBtn, {
21958
+ "variant": "text",
21959
+ "icon": props.nextIcon,
21960
+ "onClick": () => emit('update:displayDate', adapter.addMonths(props.displayDate, 1))
21961
+ }, null);
21962
+ return createVNode("div", {
21963
+ "class": "v-date-picker-controls"
21964
+ }, [props.viewMode === 'month' && props.range === 'start' && prevBtn, !!props.range && createVNode(VSpacer, {
21965
+ "key": "range-spacer"
21966
+ }, null), createVNode("div", {
21967
+ "class": "v-date-picker-controls__date"
21968
+ }, [monthAndYear.value]), createVNode(VBtn, {
21969
+ "key": "expand-btn",
21970
+ "variant": "text",
21971
+ "icon": props.viewMode === 'month' ? props.expandIcon : props.collapseIcon,
21972
+ "onClick": () => emit('update:viewMode', props.viewMode === 'month' ? 'year' : 'month')
21973
+ }, null), createVNode(VSpacer, null, null), props.viewMode === 'month' && !props.range && createVNode("div", {
21974
+ "key": "month-buttons"
21975
+ }, [prevBtn, nextBtn]), props.viewMode === 'month' && props.range === 'end' && nextBtn]);
21976
+ });
21977
+ return {};
21978
+ }
21979
+ });
21980
+
21981
+ // Utilities
21540
21982
 
21541
- // End of recursion, do nothing
21542
- /* eslint-disable-next-line no-empty, brace-style */
21543
- if (type === bone) ;
21544
- // Array of values - e.g. 'heading, paragraph, text@2'
21545
- else if (type.includes(',')) return mapBones(type);
21546
- // Array of values - e.g. 'paragraph@4'
21547
- else if (type.includes('@')) return genBones(type);
21548
- // Array of values - e.g. 'card@2'
21549
- else if (bone.includes(',')) children = mapBones(bone);
21550
- // Array of values - e.g. 'list-item@2'
21551
- else if (bone.includes('@')) children = genBones(bone);
21552
- // Single value - e.g. 'card-heading'
21553
- else if (bone) children.push(genStructure(bone));
21554
- return [genBone(type, children)];
21983
+ // Types
21984
+
21985
+ const DatePickerSymbol = Symbol.for('vuetify:date-picker');
21986
+ function createDatePicker(props) {
21987
+ const hoverDate = ref();
21988
+ const hoverMonth = ref();
21989
+ const isDragging = ref(false);
21990
+ const dragHandle = ref(null);
21991
+ const hasScrolled = ref(false);
21992
+ provide(DatePickerSymbol, {
21993
+ hoverDate,
21994
+ hoverMonth,
21995
+ isDragging,
21996
+ dragHandle,
21997
+ hasScrolled
21998
+ });
21999
+ return {
22000
+ hoverDate,
22001
+ hoverMonth,
22002
+ isDragging,
22003
+ dragHandle,
22004
+ hasScrolled
22005
+ };
21555
22006
  }
21556
- function mapBones(bones) {
21557
- // Remove spaces and return array of structures
21558
- return bones.replace(/\s/g, '').split(',').map(genStructure);
22007
+ function useDatePicker() {
22008
+ const datePicker = inject$1(DatePickerSymbol);
22009
+ if (!datePicker) throw new Error('foo');
22010
+ return datePicker;
21559
22011
  }
21560
- const makeVSkeletonLoaderProps = propsFactory({
21561
- boilerplate: Boolean,
22012
+
22013
+ const makeVDatePickerMonthProps = propsFactory({
21562
22014
  color: String,
21563
- loading: Boolean,
21564
- loadingText: {
21565
- type: String,
21566
- default: '$vuetify.loading'
22015
+ showAdjacentMonths: Boolean,
22016
+ hideWeekdays: Boolean,
22017
+ showWeek: Boolean,
22018
+ range: {
22019
+ default: false,
22020
+ type: [String, Boolean],
22021
+ validator: v => typeof v === 'boolean' || ['start', 'end'].includes(v)
21567
22022
  },
21568
- type: {
21569
- type: [String, Array],
21570
- default: 'image'
22023
+ hoverDate: null,
22024
+ multiple: Boolean,
22025
+ side: {
22026
+ type: String
22027
+ },
22028
+ ...omit(makeDateProps(), ['inputMode', 'viewMode'])
22029
+ }, 'VDatePickerMonth');
22030
+ const VDatePickerMonth = genericComponent()({
22031
+ name: 'VDatePickerMonth',
22032
+ props: makeVDatePickerMonthProps({
22033
+ color: 'surface-variant'
22034
+ }),
22035
+ emits: {
22036
+ ...omit(dateEmits, ['update:inputMode', 'update:viewMode']),
22037
+ 'update:hoverDate': date => true
21571
22038
  },
21572
- ...makeDimensionProps(),
21573
- ...makeElevationProps(),
21574
- ...makeThemeProps()
21575
- }, 'VSkeletonLoader');
21576
- const VSkeletonLoader = genericComponent()({
21577
- name: 'VSkeletonLoader',
21578
- props: makeVSkeletonLoaderProps(),
21579
22039
  setup(props, _ref) {
21580
22040
  let {
22041
+ emit,
21581
22042
  slots
21582
22043
  } = _ref;
22044
+ const adapter = useDate();
22045
+ const {
22046
+ isDragging,
22047
+ dragHandle,
22048
+ hasScrolled
22049
+ } = useDatePicker();
22050
+ const month = computed(() => props.displayDate);
22051
+ const findClosestDate = (date, dates) => {
22052
+ const {
22053
+ isSameDay,
22054
+ getDiff
22055
+ } = adapter;
22056
+ const [startDate, endDate] = dates;
22057
+ if (isSameDay(startDate, endDate)) {
22058
+ return getDiff(date, startDate, 'days') > 0 ? endDate : startDate;
22059
+ }
22060
+ const distStart = Math.abs(getDiff(date, startDate));
22061
+ const distEnd = Math.abs(getDiff(date, endDate));
22062
+ return distStart < distEnd ? startDate : endDate;
22063
+ };
22064
+
22065
+ // const hoverRange = computed<[any, any] | null>(() => {
22066
+ // if (!props.hoverDate) return null
22067
+
22068
+ // const closestDate = findClosestDate(props.hoverDate, props.modelValue)
22069
+
22070
+ // if (!closestDate) return null
22071
+
22072
+ // return adapter.isAfter(props.hoverDate, closestDate) ? [closestDate, props.hoverDate] : [props.hoverDate, closestDate]
22073
+ // })
22074
+
22075
+ const weeksInMonth = computed(() => {
22076
+ const weeks = adapter.getWeekArray(month.value);
22077
+ const days = weeks.flat();
22078
+
22079
+ // Make sure there's always 6 weeks in month (6 * 7 days)
22080
+ // But only do it if we're not hiding adjacent months?
22081
+ const daysInMonth = 6 * 7;
22082
+ if (days.length < daysInMonth && props.showAdjacentMonths) {
22083
+ const lastDay = days[days.length - 1];
22084
+ let week = [];
22085
+ for (let day = 1; day <= daysInMonth - days.length; day++) {
22086
+ week.push(adapter.addDays(lastDay, day));
22087
+ if (day % 7 === 0) {
22088
+ weeks.push(week);
22089
+ week = [];
22090
+ }
22091
+ }
22092
+ }
22093
+ return weeks;
22094
+ });
22095
+ const daysInMonth = computed(() => {
22096
+ const validDates = props.modelValue.filter(v => !!v);
22097
+ const isRange = validDates.length > 1;
22098
+ const days = weeksInMonth.value.flat();
22099
+ const today = adapter.date();
22100
+ const startDate = validDates[0];
22101
+ const endDate = validDates[1];
22102
+ return days.map((date, index) => {
22103
+ const isStart = startDate && adapter.isSameDay(date, startDate);
22104
+ const isEnd = endDate && adapter.isSameDay(date, endDate);
22105
+ const isAdjacent = !adapter.isSameMonth(date, month.value);
22106
+ const isSame = validDates.length === 2 && adapter.isSameDay(startDate, endDate);
22107
+ return {
22108
+ date,
22109
+ isoDate: toIso(adapter, date),
22110
+ formatted: adapter.format(date, 'keyboardDate'),
22111
+ year: adapter.getYear(date),
22112
+ month: adapter.getMonth(date),
22113
+ isWeekStart: index % 7 === 0,
22114
+ isWeekEnd: index % 7 === 6,
22115
+ isSelected: isStart || isEnd,
22116
+ isStart,
22117
+ isEnd,
22118
+ isToday: adapter.isSameDay(date, today),
22119
+ isAdjacent,
22120
+ isHidden: isAdjacent && !props.showAdjacentMonths,
22121
+ inRange: isRange && !isSame && (isStart || isEnd || validDates.length === 2 && adapter.isWithinRange(date, validDates)),
22122
+ // isHovered: props.hoverDate === date,
22123
+ // inHover: hoverRange.value && isWithinRange(date, hoverRange.value),
22124
+ isHovered: false,
22125
+ inHover: false,
22126
+ localized: adapter.format(date, 'dayOfMonth')
22127
+ };
22128
+ });
22129
+ });
22130
+ const weeks = computed(() => {
22131
+ return weeksInMonth.value.map(week => {
22132
+ return getWeek(adapter, week[0]);
22133
+ });
22134
+ });
21583
22135
  const {
21584
22136
  backgroundColorClasses,
21585
22137
  backgroundColorStyles
21586
- } = useBackgroundColor(toRef(props, 'color'));
21587
- const {
21588
- dimensionStyles
21589
- } = useDimension(props);
21590
- const {
21591
- elevationClasses
21592
- } = useElevation(props);
21593
- const {
21594
- themeClasses
21595
- } = provideTheme(props);
21596
- const {
21597
- t
21598
- } = useLocale();
21599
- const items = computed(() => genStructure(wrapInArray(props.type).join(',')));
21600
- useRender(() => {
21601
- const isLoading = !slots.default || props.loading;
21602
- return createVNode("div", {
21603
- "class": ['v-skeleton-loader', {
21604
- 'v-skeleton-loader--boilerplate': props.boilerplate
21605
- }, themeClasses.value, backgroundColorClasses.value, elevationClasses.value],
21606
- "style": [backgroundColorStyles.value, isLoading ? dimensionStyles.value : {}],
21607
- "aria-busy": !props.boilerplate ? isLoading : undefined,
21608
- "aria-live": !props.boilerplate ? 'polite' : undefined,
21609
- "aria-label": !props.boilerplate ? t(props.loadingText) : undefined,
21610
- "role": !props.boilerplate ? 'alert' : undefined
21611
- }, [isLoading ? items.value : slots.default?.()]);
21612
- });
21613
- return {};
21614
- }
21615
- });
21616
-
21617
- var components = /*#__PURE__*/Object.freeze({
21618
- __proto__: null,
21619
- VAlert: VAlert,
21620
- VAlertTitle: VAlertTitle,
21621
- VApp: VApp,
21622
- VAppBar: VAppBar,
21623
- VAppBarNavIcon: VAppBarNavIcon,
21624
- VAppBarTitle: VAppBarTitle,
21625
- VAutocomplete: VAutocomplete,
21626
- VAvatar: VAvatar,
21627
- VBadge: VBadge,
21628
- VBanner: VBanner,
21629
- VBannerActions: VBannerActions,
21630
- VBannerText: VBannerText,
21631
- VBottomNavigation: VBottomNavigation,
21632
- VBottomSheet: VBottomSheet,
21633
- VBreadcrumbs: VBreadcrumbs,
21634
- VBreadcrumbsDivider: VBreadcrumbsDivider,
21635
- VBreadcrumbsItem: VBreadcrumbsItem,
21636
- VBtn: VBtn,
21637
- VBtnGroup: VBtnGroup,
21638
- VBtnToggle: VBtnToggle,
21639
- VCard: VCard,
21640
- VCardActions: VCardActions,
21641
- VCardItem: VCardItem,
21642
- VCardSubtitle: VCardSubtitle,
21643
- VCardText: VCardText,
21644
- VCardTitle: VCardTitle,
21645
- VCarousel: VCarousel,
21646
- VCarouselItem: VCarouselItem,
21647
- VCheckbox: VCheckbox,
21648
- VCheckboxBtn: VCheckboxBtn,
21649
- VChip: VChip,
21650
- VChipGroup: VChipGroup,
21651
- VClassIcon: VClassIcon,
21652
- VCode: VCode,
21653
- VCol: VCol,
21654
- VColorPicker: VColorPicker,
21655
- VCombobox: VCombobox,
21656
- VComponentIcon: VComponentIcon,
21657
- VContainer: VContainer,
21658
- VCounter: VCounter,
21659
- VDataIterator: VDataIterator,
21660
- VDataTable: VDataTable,
21661
- VDataTableFooter: VDataTableFooter,
21662
- VDataTableRow: VDataTableRow,
21663
- VDataTableRows: VDataTableRows,
21664
- VDataTableServer: VDataTableServer,
21665
- VDataTableVirtual: VDataTableVirtual,
21666
- VDefaultsProvider: VDefaultsProvider,
21667
- VDialog: VDialog,
21668
- VDialogBottomTransition: VDialogBottomTransition,
21669
- VDialogTopTransition: VDialogTopTransition,
21670
- VDialogTransition: VDialogTransition,
21671
- VDivider: VDivider,
21672
- VExpandTransition: VExpandTransition,
21673
- VExpandXTransition: VExpandXTransition,
21674
- VExpansionPanel: VExpansionPanel,
21675
- VExpansionPanelText: VExpansionPanelText,
21676
- VExpansionPanelTitle: VExpansionPanelTitle,
21677
- VExpansionPanels: VExpansionPanels,
21678
- VFabTransition: VFabTransition,
21679
- VFadeTransition: VFadeTransition,
21680
- VField: VField,
21681
- VFieldLabel: VFieldLabel,
21682
- VFileInput: VFileInput,
21683
- VFooter: VFooter,
21684
- VForm: VForm,
21685
- VHover: VHover,
21686
- VIcon: VIcon,
21687
- VImg: VImg,
21688
- VInfiniteScroll: VInfiniteScroll,
21689
- VInput: VInput,
21690
- VItem: VItem,
21691
- VItemGroup: VItemGroup,
21692
- VKbd: VKbd,
21693
- VLabel: VLabel,
21694
- VLayout: VLayout,
21695
- VLayoutItem: VLayoutItem,
21696
- VLazy: VLazy,
21697
- VLigatureIcon: VLigatureIcon,
21698
- VList: VList,
21699
- VListGroup: VListGroup,
21700
- VListImg: VListImg,
21701
- VListItem: VListItem,
21702
- VListItemAction: VListItemAction,
21703
- VListItemMedia: VListItemMedia,
21704
- VListItemSubtitle: VListItemSubtitle,
21705
- VListItemTitle: VListItemTitle,
21706
- VListSubheader: VListSubheader,
21707
- VLocaleProvider: VLocaleProvider,
21708
- VMain: VMain,
21709
- VMenu: VMenu,
21710
- VMessages: VMessages,
21711
- VNavigationDrawer: VNavigationDrawer,
21712
- VNoSsr: VNoSsr,
21713
- VOverlay: VOverlay,
21714
- VPagination: VPagination,
21715
- VParallax: VParallax,
21716
- VProgressCircular: VProgressCircular,
21717
- VProgressLinear: VProgressLinear,
21718
- VRadio: VRadio,
21719
- VRadioGroup: VRadioGroup,
21720
- VRangeSlider: VRangeSlider,
21721
- VRating: VRating,
21722
- VResponsive: VResponsive,
21723
- VRow: VRow,
21724
- VScaleTransition: VScaleTransition,
21725
- VScrollXReverseTransition: VScrollXReverseTransition,
21726
- VScrollXTransition: VScrollXTransition,
21727
- VScrollYReverseTransition: VScrollYReverseTransition,
21728
- VScrollYTransition: VScrollYTransition,
21729
- VSelect: VSelect,
21730
- VSelectionControl: VSelectionControl,
21731
- VSelectionControlGroup: VSelectionControlGroup,
21732
- VSheet: VSheet,
21733
- VSkeletonLoader: VSkeletonLoader,
21734
- VSlideGroup: VSlideGroup,
21735
- VSlideGroupItem: VSlideGroupItem,
21736
- VSlideXReverseTransition: VSlideXReverseTransition,
21737
- VSlideXTransition: VSlideXTransition,
21738
- VSlideYReverseTransition: VSlideYReverseTransition,
21739
- VSlideYTransition: VSlideYTransition,
21740
- VSlider: VSlider,
21741
- VSnackbar: VSnackbar,
21742
- VSpacer: VSpacer,
21743
- VSvgIcon: VSvgIcon,
21744
- VSwitch: VSwitch,
21745
- VSystemBar: VSystemBar,
21746
- VTab: VTab,
21747
- VTable: VTable,
21748
- VTabs: VTabs,
21749
- VTextField: VTextField,
21750
- VTextarea: VTextarea,
21751
- VThemeProvider: VThemeProvider,
21752
- VTimeline: VTimeline,
21753
- VTimelineItem: VTimelineItem,
21754
- VToolbar: VToolbar,
21755
- VToolbarItems: VToolbarItems,
21756
- VToolbarTitle: VToolbarTitle,
21757
- VTooltip: VTooltip,
21758
- VValidation: VValidation,
21759
- VVirtualScroll: VVirtualScroll,
21760
- VWindow: VWindow,
21761
- VWindowItem: VWindowItem
22138
+ } = useBackgroundColor(props, 'color');
22139
+ function selectDate(date) {
22140
+ let newModel = props.modelValue.slice();
22141
+ if (props.multiple) {
22142
+ if (isDragging.value && dragHandle.value != null) {
22143
+ const otherIndex = (dragHandle.value + 1) % 2;
22144
+ const fn = otherIndex === 0 ? 'isBefore' : 'isAfter';
22145
+ if (adapter[fn](date, newModel[otherIndex])) {
22146
+ newModel[dragHandle.value] = newModel[otherIndex];
22147
+ newModel[otherIndex] = date;
22148
+ dragHandle.value = otherIndex;
22149
+ } else {
22150
+ newModel[dragHandle.value] = date;
22151
+ }
22152
+ } else {
22153
+ if (newModel.find(d => adapter.isSameDay(d, date))) {
22154
+ newModel = newModel.filter(v => !adapter.isSameDay(v, date));
22155
+ } else if (newModel.length === 2) {
22156
+ let index;
22157
+ if (!props.side || adapter.isSameMonth(newModel[0], newModel[1])) {
22158
+ const closest = findClosestDate(date, newModel);
22159
+ index = newModel.indexOf(closest);
22160
+ } else {
22161
+ index = props.side === 'start' ? 0 : props.side === 'end' ? 1 : undefined;
22162
+ }
22163
+ newModel = newModel.map((v, i) => i === index ? date : v);
22164
+ } else {
22165
+ if (newModel[0] && adapter.isBefore(newModel[0], date)) {
22166
+ newModel = [newModel[0], date];
22167
+ } else {
22168
+ newModel = [date, newModel[0]];
22169
+ }
22170
+ }
22171
+ }
22172
+ } else {
22173
+ newModel = [date];
22174
+ }
22175
+ emit('update:modelValue', newModel.filter(v => !!v));
22176
+ }
22177
+ const daysRef = ref();
22178
+ function findElement(el) {
22179
+ if (!el || el === daysRef.value) return null;
22180
+ if ('vDate' in el.dataset) {
22181
+ return adapter.date(el.dataset.vDate);
22182
+ }
22183
+ return findElement(el.parentElement);
22184
+ }
22185
+ function findDate(e) {
22186
+ const x = 'changedTouches' in e ? e.changedTouches[0]?.clientX : e.clientX;
22187
+ const y = 'changedTouches' in e ? e.changedTouches[0]?.clientY : e.clientY;
22188
+ const el = document.elementFromPoint(x, y);
22189
+ return findElement(el);
22190
+ }
22191
+ let canDrag = false;
22192
+ function handleMousedown(e) {
22193
+ hasScrolled.value = false;
22194
+ const selected = findDate(e);
22195
+ if (!selected) return;
22196
+ const modelIndex = props.modelValue.findIndex(d => adapter.isEqual(d, selected));
22197
+ if (modelIndex >= 0) {
22198
+ canDrag = true;
22199
+ dragHandle.value = modelIndex;
22200
+ window.addEventListener('touchmove', handleTouchmove, {
22201
+ passive: false
22202
+ });
22203
+ window.addEventListener('mousemove', handleTouchmove, {
22204
+ passive: false
22205
+ });
22206
+ e.preventDefault();
22207
+ }
22208
+ window.addEventListener('touchend', handleTouchend, {
22209
+ passive: false
22210
+ });
22211
+ window.addEventListener('mouseup', handleTouchend, {
22212
+ passive: false
22213
+ });
22214
+ }
22215
+ function handleTouchmove(e) {
22216
+ if (!canDrag) return;
22217
+ e.preventDefault();
22218
+ isDragging.value = true;
22219
+ const over = findDate(e);
22220
+ if (!over) return;
22221
+ selectDate(over);
22222
+ }
22223
+ function handleTouchend(e) {
22224
+ if (e.cancelable) e.preventDefault();
22225
+ window.removeEventListener('touchmove', handleTouchmove);
22226
+ window.removeEventListener('mousemove', handleTouchmove);
22227
+ window.removeEventListener('touchend', handleTouchend);
22228
+ window.removeEventListener('mouseup', handleTouchend);
22229
+ const end = findDate(e);
22230
+ if (!end) return;
22231
+ if (!hasScrolled.value) {
22232
+ selectDate(end);
22233
+ }
22234
+ isDragging.value = false;
22235
+ dragHandle.value = null;
22236
+ canDrag = false;
22237
+ }
22238
+ return () => createVNode("div", {
22239
+ "class": "v-date-picker-month"
22240
+ }, [props.showWeek && createVNode("div", {
22241
+ "key": "weeks",
22242
+ "class": "v-date-picker-month__weeks"
22243
+ }, [!props.hideWeekdays && createVNode("div", {
22244
+ "key": "hide-week-days",
22245
+ "class": "v-date-picker-month__day"
22246
+ }, [createTextVNode("\xA0")]), weeks.value.map(week => createVNode("div", {
22247
+ "class": ['v-date-picker-month__day', 'v-date-picker-month__day--adjacent']
22248
+ }, [week]))]), createVNode("div", {
22249
+ "ref": daysRef,
22250
+ "class": "v-date-picker-month__days",
22251
+ "onMousedown": handleMousedown,
22252
+ "onTouchstart": handleMousedown
22253
+ }, [!props.hideWeekdays && adapter.getWeekdays().map(weekDay => createVNode("div", {
22254
+ "class": ['v-date-picker-month__day', 'v-date-picker-month__weekday']
22255
+ }, [weekDay.charAt(0)])), daysInMonth.value.map((item, index) => createVNode("div", {
22256
+ "class": ['v-date-picker-month__day', {
22257
+ 'v-date-picker-month__day--selected': item.isSelected,
22258
+ 'v-date-picker-month__day--start': item.isStart,
22259
+ 'v-date-picker-month__day--end': item.isEnd,
22260
+ 'v-date-picker-month__day--adjacent': item.isAdjacent,
22261
+ 'v-date-picker-month__day--hide-adjacent': item.isHidden,
22262
+ 'v-date-picker-month__day--week-start': item.isWeekStart,
22263
+ 'v-date-picker-month__day--week-end': item.isWeekEnd,
22264
+ 'v-date-picker-month__day--hovered': item.isHovered
22265
+ }],
22266
+ "data-v-date": !item.isHidden ? item.isoDate : undefined
22267
+ }, [item.inRange && createVNode("div", {
22268
+ "key": "in-range",
22269
+ "class": ['v-date-picker-month__day--range', backgroundColorClasses.value],
22270
+ "style": backgroundColorStyles.value
22271
+ }, null), item.inHover && !item.isStart && !item.isEnd && !item.isHovered && !item.inRange && createVNode("div", {
22272
+ "key": "in-hover",
22273
+ "class": "v-date-picker-month__day--hover"
22274
+ }, null), (props.showAdjacentMonths || !item.isAdjacent) && createVNode(VBtn, {
22275
+ "icon": true,
22276
+ "ripple": false,
22277
+ "variant": (item.isToday || item.isHovered) && !item.isSelected ? 'outlined' : 'flat',
22278
+ "active": item.isSelected,
22279
+ "color": item.isSelected || item.isToday ? props.color : item.isHovered ? undefined : 'transparent'
22280
+ }, {
22281
+ default: () => [item.localized]
22282
+ })]))])]);
22283
+ }
22284
+ });
22285
+
22286
+ const makeVDatePickerYearsProps = propsFactory({
22287
+ color: String,
22288
+ min: Number,
22289
+ max: Number,
22290
+ height: [String, Number],
22291
+ displayDate: null
22292
+ }, 'VDatePickerYears');
22293
+ const VDatePickerYears = genericComponent()({
22294
+ name: 'VDatePickerYears',
22295
+ props: makeVDatePickerYearsProps(),
22296
+ emits: {
22297
+ 'update:displayDate': date => true,
22298
+ 'update:viewMode': date => true
22299
+ },
22300
+ setup(props, _ref) {
22301
+ let {
22302
+ emit
22303
+ } = _ref;
22304
+ const adapter = useDate();
22305
+ const displayYear = computed(() => adapter.getYear(props.displayDate ?? new Date()));
22306
+ const years = computed(() => {
22307
+ const min = props.min ?? displayYear.value - 50 - 2;
22308
+ const max = props.max ?? displayYear.value + 50;
22309
+ return createRange(max - min, min);
22310
+ });
22311
+ const yearRef = ref();
22312
+ onMounted(() => {
22313
+ yearRef.value?.$el.scrollIntoView({
22314
+ block: 'center'
22315
+ });
22316
+ });
22317
+ useRender(() => createVNode("div", {
22318
+ "class": "v-date-picker-years",
22319
+ "style": {
22320
+ height: convertToUnit(props.height)
22321
+ }
22322
+ }, [createVNode("div", {
22323
+ "class": "v-date-picker-years__content"
22324
+ }, [years.value.map(year => createVNode(VBtn, {
22325
+ "ref": year === displayYear.value ? yearRef : undefined,
22326
+ "variant": year === displayYear.value ? 'flat' : 'text',
22327
+ "rounded": "xl",
22328
+ "active": year === displayYear.value,
22329
+ "color": year === displayYear.value ? props.color : undefined,
22330
+ "onClick": () => {
22331
+ emit('update:displayDate', adapter.setYear(props.displayDate, year));
22332
+ emit('update:viewMode', 'month');
22333
+ }
22334
+ }, {
22335
+ default: () => [year]
22336
+ }))])]));
22337
+ return {};
22338
+ }
21762
22339
  });
21763
22340
 
21764
22341
  // Types
21765
22342
 
21766
- function mounted$2(el, binding) {
21767
- const modifiers = binding.modifiers || {};
21768
- const value = binding.value;
21769
- const {
21770
- once,
21771
- immediate,
21772
- ...modifierKeys
21773
- } = modifiers;
21774
- const defaultValue = !Object.keys(modifierKeys).length;
21775
- const {
21776
- handler,
21777
- options
21778
- } = typeof value === 'object' ? value : {
21779
- handler: value,
21780
- options: {
21781
- attributes: modifierKeys?.attr ?? defaultValue,
21782
- characterData: modifierKeys?.char ?? defaultValue,
21783
- childList: modifierKeys?.child ?? defaultValue,
21784
- subtree: modifierKeys?.sub ?? defaultValue
22343
+ const makeVDateCardProps = propsFactory({
22344
+ cancelText: {
22345
+ type: String,
22346
+ default: '$vuetify.datePicker.cancel'
22347
+ },
22348
+ okText: {
22349
+ type: String,
22350
+ default: '$vuetify.datePicker.ok'
22351
+ },
22352
+ inputMode: {
22353
+ type: String,
22354
+ default: 'calendar'
22355
+ },
22356
+ hideActions: Boolean,
22357
+ ...makeVDatePickerControlsProps(),
22358
+ ...makeVDatePickerMonthProps(),
22359
+ ...makeVDatePickerYearsProps(),
22360
+ ...makeTransitionProps({
22361
+ transition: {
22362
+ component: VFadeTransition,
22363
+ leaveAbsolute: true
21785
22364
  }
21786
- };
21787
- const observer = new MutationObserver(function () {
21788
- let mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
21789
- let observer = arguments.length > 1 ? arguments[1] : undefined;
21790
- handler?.(mutations, observer);
21791
- if (once) unmounted$2(el, binding);
21792
- });
21793
- if (immediate) handler?.([], observer);
21794
- el._mutate = Object(el._mutate);
21795
- el._mutate[binding.instance.$.uid] = {
21796
- observer
21797
- };
21798
- observer.observe(el, options);
21799
- }
21800
- function unmounted$2(el, binding) {
21801
- if (!el._mutate?.[binding.instance.$.uid]) return;
21802
- el._mutate[binding.instance.$.uid].observer.disconnect();
21803
- delete el._mutate[binding.instance.$.uid];
21804
- }
21805
- const Mutate = {
21806
- mounted: mounted$2,
21807
- unmounted: unmounted$2
21808
- };
22365
+ })
22366
+ }, 'VDateCard');
22367
+ const VDateCard = genericComponent()({
22368
+ name: 'VDateCard',
22369
+ props: makeVDateCardProps(),
22370
+ emits: {
22371
+ save: () => true,
22372
+ cancel: () => true,
22373
+ 'update:displayDate': value => true,
22374
+ 'update:inputMode': value => true,
22375
+ 'update:modelValue': value => true,
22376
+ 'update:viewMode': mode => true
22377
+ },
22378
+ setup(props, _ref) {
22379
+ let {
22380
+ emit,
22381
+ slots
22382
+ } = _ref;
22383
+ const model = useProxiedModel(props, 'modelValue');
22384
+ const {
22385
+ t
22386
+ } = useLocale();
22387
+ createDatePicker();
22388
+ function onDisplayUpdate(val) {
22389
+ emit('update:displayDate', val);
22390
+ }
22391
+ function onViewModeUpdate(val) {
22392
+ emit('update:viewMode', val);
22393
+ }
22394
+ function onSave() {
22395
+ emit('update:modelValue', model.value);
22396
+ emit('save');
22397
+ }
22398
+ function onCancel() {
22399
+ emit('cancel');
22400
+ }
22401
+ useRender(() => {
22402
+ const [cardProps] = VCard.filterProps(props);
22403
+ const [datePickerControlsProps] = VDatePickerControls.filterProps(props);
22404
+ const [datePickerMonthProps] = VDatePickerMonth.filterProps(props);
22405
+ const [datePickerYearsProps] = VDatePickerYears.filterProps(props);
22406
+ const hasActions = !props.hideActions || !!slots.actions;
22407
+ return createVNode(VCard, mergeProps(cardProps, {
22408
+ "class": "v-date-card"
22409
+ }), {
22410
+ ...slots,
22411
+ default: () => createVNode(Fragment, null, [createVNode(VDatePickerControls, mergeProps(datePickerControlsProps, {
22412
+ "onUpdate:displayDate": onDisplayUpdate,
22413
+ "onUpdate:viewMode": onViewModeUpdate
22414
+ }), null), createVNode(MaybeTransition, {
22415
+ "transition": props.transition
22416
+ }, {
22417
+ default: () => [props.viewMode === 'month' ? createVNode(VDatePickerMonth, mergeProps(datePickerMonthProps, {
22418
+ "modelValue": model.value,
22419
+ "onUpdate:modelValue": $event => model.value = $event,
22420
+ "onUpdate:displayDate": onDisplayUpdate
22421
+ }), null) : createVNode(VDatePickerYears, mergeProps(datePickerYearsProps, {
22422
+ "onUpdate:displayDate": onDisplayUpdate,
22423
+ "onUpdate:viewMode": onViewModeUpdate
22424
+ }), null)]
22425
+ })]),
22426
+ actions: !hasActions ? undefined : () => createVNode(Fragment, null, [slots.actions?.() ?? createVNode(Fragment, null, [createVNode(VBtn, {
22427
+ "onClick": onCancel,
22428
+ "text": t(props.cancelText)
22429
+ }, null), createVNode(VBtn, {
22430
+ "onClick": onSave,
22431
+ "text": t(props.okText)
22432
+ }, null)])])
22433
+ });
22434
+ });
22435
+ return {};
22436
+ }
22437
+ });
21809
22438
 
21810
22439
  // Types
21811
22440
 
21812
- function mounted$1(el, binding) {
21813
- const handler = binding.value;
21814
- const options = {
21815
- passive: !binding.modifiers?.active
21816
- };
21817
- window.addEventListener('resize', handler, options);
21818
- el._onResize = Object(el._onResize);
21819
- el._onResize[binding.instance.$.uid] = {
21820
- handler,
21821
- options
21822
- };
21823
- if (!binding.modifiers?.quiet) {
21824
- handler();
22441
+ const makeVDatePickerHeaderProps = propsFactory({
22442
+ appendIcon: String,
22443
+ color: String,
22444
+ header: String,
22445
+ transition: String
22446
+ }, 'VDatePickerHeader');
22447
+ const VDatePickerHeader = genericComponent()({
22448
+ name: 'VDatePickerHeader',
22449
+ props: makeVDatePickerHeaderProps(),
22450
+ emits: {
22451
+ 'click:append': () => true
22452
+ },
22453
+ setup(props, _ref) {
22454
+ let {
22455
+ emit,
22456
+ slots
22457
+ } = _ref;
22458
+ const {
22459
+ backgroundColorClasses,
22460
+ backgroundColorStyles
22461
+ } = useBackgroundColor(props, 'color');
22462
+ function onClickAppend() {
22463
+ emit('click:append');
22464
+ }
22465
+ useRender(() => {
22466
+ const hasContent = !!(slots.default || props.header);
22467
+ const hasAppend = !!(slots.append || props.appendIcon);
22468
+ return createVNode("div", {
22469
+ "class": ['v-date-picker-header', backgroundColorClasses.value],
22470
+ "style": backgroundColorStyles.value
22471
+ }, [slots.prepend && createVNode("div", {
22472
+ "key": "prepend",
22473
+ "class": "v-date-picker-header__prepend"
22474
+ }, [slots.prepend()]), hasContent && createVNode(MaybeTransition, {
22475
+ "key": "content",
22476
+ "name": props.transition
22477
+ }, {
22478
+ default: () => [createVNode("div", {
22479
+ "key": props.header,
22480
+ "class": "v-date-picker-header__content"
22481
+ }, [slots.default?.() ?? props.header])]
22482
+ }), hasAppend && createVNode("div", {
22483
+ "class": "v-date-picker-header__append"
22484
+ }, [!slots.append ? createVNode(VBtn, {
22485
+ "key": "append-btn",
22486
+ "icon": props.appendIcon,
22487
+ "variant": "text",
22488
+ "onClick": onClickAppend
22489
+ }, null) : createVNode(VDefaultsProvider, {
22490
+ "key": "append-defaults",
22491
+ "disabled": !props.appendIcon,
22492
+ "defaults": {
22493
+ VBtn: {
22494
+ icon: props.appendIcon,
22495
+ variant: 'text'
22496
+ }
22497
+ }
22498
+ }, {
22499
+ default: () => [slots.append?.()]
22500
+ })])]);
22501
+ });
22502
+ return {};
21825
22503
  }
21826
- }
21827
- function unmounted$1(el, binding) {
21828
- if (!el._onResize?.[binding.instance.$.uid]) return;
21829
- const {
21830
- handler,
21831
- options
21832
- } = el._onResize[binding.instance.$.uid];
21833
- window.removeEventListener('resize', handler, options);
21834
- delete el._onResize[binding.instance.$.uid];
21835
- }
21836
- const Resize = {
21837
- mounted: mounted$1,
21838
- unmounted: unmounted$1
21839
- };
22504
+ });
22505
+
22506
+ // Utilities
22507
+ const VPickerTitle = createSimpleFunctional('v-picker-title');
22508
+
22509
+ // Types
22510
+
22511
+ const makeVPickerProps = propsFactory({
22512
+ landscape: Boolean,
22513
+ title: String,
22514
+ ...omit(makeVSheetProps(), ['color'])
22515
+ }, 'VPicker');
22516
+ const VPicker = genericComponent()({
22517
+ name: 'VPicker',
22518
+ props: makeVPickerProps(),
22519
+ setup(props, _ref) {
22520
+ let {
22521
+ slots
22522
+ } = _ref;
22523
+ useRender(() => {
22524
+ const [sheetProps] = VSheet.filterProps(props);
22525
+ const hasTitle = !!(props.title || slots.title);
22526
+ return createVNode(VSheet, mergeProps(sheetProps, {
22527
+ "class": ['v-picker', {
22528
+ 'v-picker--landscape': props.landscape,
22529
+ 'v-picker--with-actions': !!slots.actions
22530
+ }, props.class],
22531
+ "style": props.style
22532
+ }), {
22533
+ default: () => [hasTitle && createVNode(VPickerTitle, {
22534
+ "key": "picker-title"
22535
+ }, {
22536
+ default: () => [slots.title?.() ?? props.title]
22537
+ }), slots.header && createVNode("div", {
22538
+ "class": "v-picker__header"
22539
+ }, [slots.header()]), createVNode("div", {
22540
+ "class": "v-picker__body"
22541
+ }, [slots.default?.()]), slots.actions && createVNode("div", {
22542
+ "class": "v-picker__actions"
22543
+ }, [slots.actions()])]
22544
+ });
22545
+ });
22546
+ return {};
22547
+ }
22548
+ });
22549
+
22550
+ // Types
22551
+
22552
+ const makeVDatePickerProps = propsFactory({
22553
+ calendarIcon: {
22554
+ type: String,
22555
+ default: '$calendar'
22556
+ },
22557
+ keyboardIcon: {
22558
+ type: String,
22559
+ default: '$edit'
22560
+ },
22561
+ cancelText: {
22562
+ type: String,
22563
+ default: '$vuetify.datePicker.cancel'
22564
+ },
22565
+ okText: {
22566
+ type: String,
22567
+ default: '$vuetify.datePicker.ok'
22568
+ },
22569
+ inputText: {
22570
+ type: String,
22571
+ default: '$vuetify.datePicker.input.placeholder'
22572
+ },
22573
+ header: {
22574
+ type: String,
22575
+ default: '$vuetify.datePicker.header'
22576
+ },
22577
+ hideActions: Boolean,
22578
+ ...makeDateProps(),
22579
+ ...makeTransitionProps({
22580
+ transition: 'fade'
22581
+ }),
22582
+ ...makeVDatePickerControlsProps(),
22583
+ ...makeVDatePickerMonthProps(),
22584
+ ...makeVDatePickerYearsProps(),
22585
+ ...makeVPickerProps({
22586
+ title: '$vuetify.datePicker.title'
22587
+ })
22588
+ }, 'VDatePicker');
22589
+ const VDatePicker = genericComponent()({
22590
+ name: 'VDatePicker',
22591
+ props: makeVDatePickerProps(),
22592
+ emits: {
22593
+ 'click:cancel': () => true,
22594
+ 'click:save': () => true,
22595
+ ...dateEmits
22596
+ },
22597
+ setup(props, _ref) {
22598
+ let {
22599
+ emit,
22600
+ slots
22601
+ } = _ref;
22602
+ const adapter = useDate();
22603
+ const {
22604
+ t
22605
+ } = useLocale();
22606
+ createDatePicker();
22607
+ const model = ref(props.modelValue ?? []);
22608
+ const isReversing = ref(false);
22609
+ const displayDate = useProxiedModel(props, 'displayDate', props.displayDate);
22610
+ const inputMode = useProxiedModel(props, 'inputMode', props.inputMode);
22611
+ const viewMode = useProxiedModel(props, 'viewMode', props.viewMode);
22612
+ const inputModel = computed(() => model.value.length ? adapter.format(model.value[0], 'keyboardDate') : '');
22613
+ const title = computed(() => t(props.title));
22614
+ const header = computed(() => model.value.length ? adapter.format(model.value[0], 'normalDateWithWeekday') : t(props.header));
22615
+ const headerIcon = computed(() => inputMode.value === 'calendar' ? props.keyboardIcon : props.calendarIcon);
22616
+ const headerTransition = computed(() => `date-picker-header${isReversing.value ? '-reverse' : ''}-transition`);
22617
+ watch(inputModel, () => {
22618
+ const {
22619
+ isValid,
22620
+ date
22621
+ } = adapter;
22622
+ model.value = isValid(inputModel.value) ? [date(inputModel.value)] : [];
22623
+ });
22624
+ watch(model, (val, oldVal) => {
22625
+ if (props.hideActions) {
22626
+ emit('update:modelValue', val);
22627
+ }
22628
+ isReversing.value = adapter.isBefore(val[0], oldVal[0]);
22629
+ });
22630
+ function onClickCancel() {
22631
+ emit('click:cancel');
22632
+ }
22633
+ function onClickSave() {
22634
+ emit('click:save');
22635
+ emit('update:modelValue', model.value);
22636
+ }
22637
+ function onClickAppend() {
22638
+ inputMode.value = inputMode.value === 'calendar' ? 'keyboard' : 'calendar';
22639
+ }
22640
+ const headerSlotProps = computed(() => ({
22641
+ header: header.value,
22642
+ appendIcon: headerIcon.value,
22643
+ transition: headerTransition.value,
22644
+ 'onClick:append': onClickAppend
22645
+ }));
22646
+ useRender(() => {
22647
+ const [pickerProps] = VPicker.filterProps(props);
22648
+ const [datePickerControlsProps] = VDatePickerControls.filterProps(props);
22649
+ const [datePickerMonthProps] = VDatePickerMonth.filterProps(props);
22650
+ const [datePickerYearsProps] = VDatePickerYears.filterProps(props);
22651
+ return createVNode(VPicker, mergeProps(pickerProps, {
22652
+ "class": ['v-date-picker', props.class],
22653
+ "style": props.style,
22654
+ "title": title.value
22655
+ }), {
22656
+ header: () => slots.header?.(headerSlotProps.value) ?? createVNode(VDatePickerHeader, mergeProps({
22657
+ "key": "header"
22658
+ }, headerSlotProps.value), null),
22659
+ default: () => inputMode.value === 'calendar' ? createVNode(Fragment, null, [createVNode(VDatePickerControls, mergeProps(datePickerControlsProps, {
22660
+ "displayDate": displayDate.value,
22661
+ "onUpdate:displayDate": $event => displayDate.value = $event,
22662
+ "viewMode": viewMode.value,
22663
+ "onUpdate:viewMode": $event => viewMode.value = $event
22664
+ }), null), createVNode(MaybeTransition, {
22665
+ "transition": props.transition,
22666
+ "mode": "out-in"
22667
+ }, {
22668
+ default: () => [viewMode.value === 'month' ? createVNode(VDatePickerMonth, mergeProps(datePickerMonthProps, {
22669
+ "modelValue": model.value,
22670
+ "onUpdate:modelValue": $event => model.value = $event,
22671
+ "displayDate": displayDate.value,
22672
+ "onUpdate:displayDate": $event => displayDate.value = $event
22673
+ }), null) : createVNode(VDatePickerYears, mergeProps(datePickerYearsProps, {
22674
+ "displayDate": displayDate.value,
22675
+ "onUpdate:displayDate": $event => displayDate.value = $event,
22676
+ "viewMode": viewMode.value,
22677
+ "onUpdate:viewMode": $event => viewMode.value = $event
22678
+ }), null)]
22679
+ })]) : createVNode("div", {
22680
+ "class": "v-date-picker__input"
22681
+ }, [createVNode(VTextField, {
22682
+ "modelValue": inputModel.value,
22683
+ "onUpdate:modelValue": $event => inputModel.value = $event,
22684
+ "label": t(props.inputText),
22685
+ "placeholder": "dd/mm/yyyy"
22686
+ }, null)]),
22687
+ actions: !props.hideActions ? () => createVNode("div", null, [createVNode(VBtn, {
22688
+ "variant": "text",
22689
+ "color": props.color,
22690
+ "onClick": onClickCancel,
22691
+ "text": t(props.cancelText)
22692
+ }, null), createVNode(VBtn, {
22693
+ "variant": "text",
22694
+ "color": props.color,
22695
+ "onClick": onClickSave,
22696
+ "text": t(props.okText)
22697
+ }, null)]) : undefined
22698
+ });
22699
+ });
22700
+ return {};
22701
+ }
22702
+ });
21840
22703
 
21841
22704
  // Types
21842
22705
 
21843
- function mounted(el, binding) {
21844
- const {
21845
- self = false
21846
- } = binding.modifiers ?? {};
21847
- const value = binding.value;
21848
- const options = typeof value === 'object' && value.options || {
21849
- passive: true
21850
- };
21851
- const handler = typeof value === 'function' || 'handleEvent' in value ? value : value.handler;
21852
- const target = self ? el : binding.arg ? document.querySelector(binding.arg) : window;
21853
- if (!target) return;
21854
- target.addEventListener('scroll', handler, options);
21855
- el._onScroll = Object(el._onScroll);
21856
- el._onScroll[binding.instance.$.uid] = {
21857
- handler,
21858
- options,
21859
- // Don't reference self
21860
- target: self ? undefined : target
21861
- };
21862
- }
21863
- function unmounted(el, binding) {
21864
- if (!el._onScroll?.[binding.instance.$.uid]) return;
21865
- const {
21866
- handler,
21867
- options,
21868
- target = el
21869
- } = el._onScroll[binding.instance.$.uid];
21870
- target.removeEventListener('scroll', handler, options);
21871
- delete el._onScroll[binding.instance.$.uid];
21872
- }
21873
- function updated(el, binding) {
21874
- if (binding.value === binding.oldValue) return;
21875
- unmounted(el, binding);
21876
- mounted(el, binding);
21877
- }
21878
- const Scroll = {
21879
- mounted,
21880
- unmounted,
21881
- updated
21882
- };
21883
-
21884
- var directives = /*#__PURE__*/Object.freeze({
21885
- __proto__: null,
21886
- ClickOutside: ClickOutside,
21887
- Intersect: Intersect,
21888
- Mutate: Mutate,
21889
- Resize: Resize,
21890
- Ripple: Ripple,
21891
- Scroll: Scroll,
21892
- Touch: Touch
22706
+ const makeVInfiniteScrollProps = propsFactory({
22707
+ color: String,
22708
+ direction: {
22709
+ type: String,
22710
+ default: 'vertical',
22711
+ validator: v => ['vertical', 'horizontal'].includes(v)
22712
+ },
22713
+ side: {
22714
+ type: String,
22715
+ default: 'end',
22716
+ validator: v => ['start', 'end', 'both'].includes(v)
22717
+ },
22718
+ mode: {
22719
+ type: String,
22720
+ default: 'intersect',
22721
+ validator: v => ['intersect', 'manual'].includes(v)
22722
+ },
22723
+ margin: [Number, String],
22724
+ loadMoreText: {
22725
+ type: String,
22726
+ default: '$vuetify.infiniteScroll.loadMore'
22727
+ },
22728
+ emptyText: {
22729
+ type: String,
22730
+ default: '$vuetify.infiniteScroll.empty'
22731
+ },
22732
+ ...makeDimensionProps(),
22733
+ ...makeTagProps()
22734
+ }, 'VInfiniteScroll');
22735
+ const VInfiniteScrollIntersect = defineComponent({
22736
+ name: 'VInfiniteScrollIntersect',
22737
+ props: {
22738
+ side: {
22739
+ type: String,
22740
+ required: true
22741
+ },
22742
+ rootRef: null,
22743
+ rootMargin: String
22744
+ },
22745
+ emits: {
22746
+ intersect: side => true
22747
+ },
22748
+ setup(props, _ref) {
22749
+ let {
22750
+ emit
22751
+ } = _ref;
22752
+ const {
22753
+ intersectionRef,
22754
+ isIntersecting
22755
+ } = useIntersectionObserver(entries => {}, props.rootMargin ? {
22756
+ root: props.rootRef,
22757
+ rootMargin: props.rootMargin
22758
+ } : undefined);
22759
+ watch(isIntersecting, async val => {
22760
+ if (val) emit('intersect', props.side);
22761
+ });
22762
+ useRender(() => createVNode("div", {
22763
+ "class": "v-infinite-scroll-intersect",
22764
+ "ref": intersectionRef
22765
+ }, [createTextVNode("\xA0")]));
22766
+ return {};
22767
+ }
22768
+ });
22769
+ const VInfiniteScroll = genericComponent()({
22770
+ name: 'VInfiniteScroll',
22771
+ props: makeVInfiniteScrollProps(),
22772
+ emits: {
22773
+ load: options => true
22774
+ },
22775
+ setup(props, _ref2) {
22776
+ let {
22777
+ slots,
22778
+ emit
22779
+ } = _ref2;
22780
+ const rootEl = ref();
22781
+ const startStatus = ref('ok');
22782
+ const endStatus = ref('ok');
22783
+ const margin = computed(() => convertToUnit(props.margin));
22784
+ function setScrollAmount(amount) {
22785
+ if (!rootEl.value) return;
22786
+ const property = props.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
22787
+ rootEl.value[property] = amount;
22788
+ }
22789
+ function getScrollAmount() {
22790
+ if (!rootEl.value) return 0;
22791
+ const property = props.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
22792
+ return rootEl.value[property];
22793
+ }
22794
+ function getScrollSize() {
22795
+ if (!rootEl.value) return 0;
22796
+ const property = props.direction === 'vertical' ? 'scrollHeight' : 'scrollWidth';
22797
+ return rootEl.value[property];
22798
+ }
22799
+ function getContainerSize() {
22800
+ if (!rootEl.value) return 0;
22801
+ const property = props.direction === 'vertical' ? 'clientHeight' : 'clientWidth';
22802
+ return rootEl.value[property];
22803
+ }
22804
+ onMounted(() => {
22805
+ if (!rootEl.value) return;
22806
+ if (props.side === 'start') {
22807
+ setScrollAmount(getScrollSize());
22808
+ } else if (props.side === 'both') {
22809
+ setScrollAmount(getScrollSize() / 2 - getContainerSize() / 2);
22810
+ }
22811
+ });
22812
+ function setStatus(side, status) {
22813
+ if (side === 'start') {
22814
+ startStatus.value = status;
22815
+ } else if (side === 'end') {
22816
+ endStatus.value = status;
22817
+ }
22818
+ }
22819
+ function getStatus(side) {
22820
+ return side === 'start' ? startStatus.value : endStatus.value;
22821
+ }
22822
+ let previousScrollSize = 0;
22823
+ function handleIntersect(side) {
22824
+ const status = getStatus(side);
22825
+ if (!rootEl.value || status === 'loading') return;
22826
+ previousScrollSize = getScrollSize();
22827
+ setStatus(side, 'loading');
22828
+ function done(status) {
22829
+ setStatus(side, status);
22830
+ nextTick(() => {
22831
+ if (status === 'ok' && side === 'start') {
22832
+ setScrollAmount(getScrollSize() - previousScrollSize + getScrollAmount());
22833
+ }
22834
+ });
22835
+ }
22836
+ emit('load', {
22837
+ side,
22838
+ done
22839
+ });
22840
+ }
22841
+ const {
22842
+ t
22843
+ } = useLocale();
22844
+ function renderSide(side, status) {
22845
+ if (props.side !== side && props.side !== 'both') return;
22846
+ const onClick = () => handleIntersect(side);
22847
+ const slotProps = {
22848
+ side,
22849
+ props: {
22850
+ onClick,
22851
+ color: props.color
22852
+ }
22853
+ };
22854
+ if (status === 'error') return slots.error?.(slotProps);
22855
+ if (status === 'empty') return slots.empty?.(slotProps) ?? createVNode("div", null, [t(props.emptyText)]);
22856
+ if (props.mode === 'manual') {
22857
+ if (status === 'loading') {
22858
+ return slots.loading?.(slotProps) ?? createVNode(VProgressCircular, {
22859
+ "indeterminate": true,
22860
+ "color": props.color
22861
+ }, null);
22862
+ }
22863
+ return slots['load-more']?.(slotProps) ?? createVNode(VBtn, {
22864
+ "variant": "outlined",
22865
+ "color": props.color,
22866
+ "onClick": onClick
22867
+ }, {
22868
+ default: () => [t(props.loadMoreText)]
22869
+ });
22870
+ }
22871
+ return slots.loading?.(slotProps) ?? createVNode(VProgressCircular, {
22872
+ "indeterminate": true,
22873
+ "color": props.color
22874
+ }, null);
22875
+ }
22876
+ const {
22877
+ dimensionStyles
22878
+ } = useDimension(props);
22879
+ useRender(() => {
22880
+ const Tag = props.tag;
22881
+ const hasStartIntersect = props.side === 'start' || props.side === 'both';
22882
+ const hasEndIntersect = props.side === 'end' || props.side === 'both';
22883
+ const intersectMode = props.mode === 'intersect';
22884
+ return createVNode(Tag, {
22885
+ "ref": rootEl,
22886
+ "class": ['v-infinite-scroll', `v-infinite-scroll--${props.direction}`, {
22887
+ 'v-infinite-scroll--start': hasStartIntersect,
22888
+ 'v-infinite-scroll--end': hasEndIntersect
22889
+ }],
22890
+ "style": dimensionStyles.value
22891
+ }, {
22892
+ default: () => [createVNode("div", {
22893
+ "class": "v-infinite-scroll__side"
22894
+ }, [renderSide('start', startStatus.value)]), rootEl.value && hasStartIntersect && intersectMode && createVNode(VInfiniteScrollIntersect, {
22895
+ "key": "start",
22896
+ "side": "start",
22897
+ "onIntersect": handleIntersect,
22898
+ "rootRef": rootEl.value,
22899
+ "rootMargin": margin.value
22900
+ }, null), slots.default?.(), rootEl.value && hasEndIntersect && intersectMode && createVNode(VInfiniteScrollIntersect, {
22901
+ "key": "end",
22902
+ "side": "end",
22903
+ "onIntersect": handleIntersect,
22904
+ "rootRef": rootEl.value,
22905
+ "rootMargin": margin.value
22906
+ }, null), createVNode("div", {
22907
+ "class": "v-infinite-scroll__side"
22908
+ }, [renderSide('end', endStatus.value)])]
22909
+ });
22910
+ });
22911
+ }
21893
22912
  });
21894
22913
 
21895
- // Utilities
21896
-
21897
22914
  // Types
21898
-
21899
- function getWeekArray(date) {
21900
- let currentWeek = [];
21901
- const weeks = [];
21902
- const firstDayOfMonth = startOfMonth(date);
21903
- const lastDayOfMonth = endOfMonth(date);
21904
- for (let i = 0; i < firstDayOfMonth.getDay(); i++) {
21905
- currentWeek.push(null);
21906
- }
21907
- for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {
21908
- const day = new Date(date.getFullYear(), date.getMonth(), i);
21909
-
21910
- // Add the day to the current week
21911
- currentWeek.push(day);
21912
-
21913
- // If the current week has 7 days, add it to the weeks array and start a new week
21914
- if (currentWeek.length === 7) {
21915
- weeks.push(currentWeek);
21916
- currentWeek = [];
21917
- }
21918
- }
21919
- for (let i = currentWeek.length; i < 7; i++) {
21920
- currentWeek.push(null);
21921
- }
21922
- weeks.push(currentWeek);
21923
- return weeks;
21924
- }
21925
- function startOfMonth(date) {
21926
- return new Date(date.getFullYear(), date.getMonth(), 1);
21927
- }
21928
- function endOfMonth(date) {
21929
- return new Date(date.getFullYear(), date.getMonth() + 1, 0);
21930
- }
21931
- function date(value) {
21932
- if (value == null) return null;
21933
- if (value instanceof Date) return value;
21934
- if (typeof value === 'string') {
21935
- const parsed = Date.parse(value);
21936
- if (!isNaN(parsed)) return new Date(parsed);
21937
- }
21938
- return null;
21939
- }
21940
- const firstDay = {
21941
- '001': 1,
21942
- AD: 1,
21943
- AE: 6,
21944
- AF: 6,
21945
- AG: 0,
21946
- AI: 1,
21947
- AL: 1,
21948
- AM: 1,
21949
- AN: 1,
21950
- AR: 1,
21951
- AS: 0,
21952
- AT: 1,
21953
- AU: 0,
21954
- AX: 1,
21955
- AZ: 1,
21956
- BA: 1,
21957
- BD: 0,
21958
- BE: 1,
21959
- BG: 1,
21960
- BH: 6,
21961
- BM: 1,
21962
- BN: 1,
21963
- BR: 0,
21964
- BS: 0,
21965
- BT: 0,
21966
- BW: 0,
21967
- BY: 1,
21968
- BZ: 0,
21969
- CA: 0,
21970
- CH: 1,
21971
- CL: 1,
21972
- CM: 1,
21973
- CN: 0,
21974
- CO: 0,
21975
- CR: 1,
21976
- CY: 1,
21977
- CZ: 1,
21978
- DE: 1,
21979
- DJ: 6,
21980
- DK: 1,
21981
- DM: 0,
21982
- DO: 0,
21983
- DZ: 6,
21984
- EC: 1,
21985
- EE: 1,
21986
- EG: 6,
21987
- ES: 1,
21988
- ET: 0,
21989
- FI: 1,
21990
- FJ: 1,
21991
- FO: 1,
21992
- FR: 1,
21993
- GB: 1,
21994
- 'GB-alt-variant': 0,
21995
- GE: 1,
21996
- GF: 1,
21997
- GP: 1,
21998
- GR: 1,
21999
- GT: 0,
22000
- GU: 0,
22001
- HK: 0,
22002
- HN: 0,
22003
- HR: 1,
22004
- HU: 1,
22005
- ID: 0,
22006
- IE: 1,
22007
- IL: 0,
22008
- IN: 0,
22009
- IQ: 6,
22010
- IR: 6,
22011
- IS: 1,
22012
- IT: 1,
22013
- JM: 0,
22014
- JO: 6,
22015
- JP: 0,
22016
- KE: 0,
22017
- KG: 1,
22018
- KH: 0,
22019
- KR: 0,
22020
- KW: 6,
22021
- KZ: 1,
22022
- LA: 0,
22023
- LB: 1,
22024
- LI: 1,
22025
- LK: 1,
22026
- LT: 1,
22027
- LU: 1,
22028
- LV: 1,
22029
- LY: 6,
22030
- MC: 1,
22031
- MD: 1,
22032
- ME: 1,
22033
- MH: 0,
22034
- MK: 1,
22035
- MM: 0,
22036
- MN: 1,
22037
- MO: 0,
22038
- MQ: 1,
22039
- MT: 0,
22040
- MV: 5,
22041
- MX: 0,
22042
- MY: 1,
22043
- MZ: 0,
22044
- NI: 0,
22045
- NL: 1,
22046
- NO: 1,
22047
- NP: 0,
22048
- NZ: 1,
22049
- OM: 6,
22050
- PA: 0,
22051
- PE: 0,
22052
- PH: 0,
22053
- PK: 0,
22054
- PL: 1,
22055
- PR: 0,
22056
- PT: 0,
22057
- PY: 0,
22058
- QA: 6,
22059
- RE: 1,
22060
- RO: 1,
22061
- RS: 1,
22062
- RU: 1,
22063
- SA: 0,
22064
- SD: 6,
22065
- SE: 1,
22066
- SG: 0,
22067
- SI: 1,
22068
- SK: 1,
22069
- SM: 1,
22070
- SV: 0,
22071
- SY: 6,
22072
- TH: 0,
22073
- TJ: 1,
22074
- TM: 1,
22075
- TR: 1,
22076
- TT: 0,
22077
- TW: 0,
22078
- UA: 1,
22079
- UM: 0,
22080
- US: 0,
22081
- UY: 1,
22082
- UZ: 1,
22083
- VA: 1,
22084
- VE: 0,
22085
- VI: 0,
22086
- VN: 1,
22087
- WS: 0,
22088
- XK: 1,
22089
- YE: 0,
22090
- ZA: 0,
22091
- ZW: 0
22092
- };
22093
- const sundayJanuarySecond2000 = new Date(2000, 0, 2);
22094
- function getWeekdays(locale) {
22095
- const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()];
22096
- return createRange(7).map(i => {
22097
- const weekday = new Date(sundayJanuarySecond2000);
22098
- weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
22099
- return new Intl.DateTimeFormat(locale, {
22100
- weekday: 'long'
22101
- }).format(weekday);
22102
- });
22103
- }
22104
- function format(value, formatString, locale) {
22105
- const date = new Date(value);
22106
- let options = {};
22107
- switch (formatString) {
22108
- case 'fullDateWithWeekday':
22109
- options = {
22110
- weekday: 'long',
22111
- day: 'numeric',
22112
- month: 'long',
22113
- year: 'numeric'
22114
- };
22115
- break;
22116
- case 'normalDateWithWeekday':
22117
- options = {
22118
- weekday: 'short',
22119
- day: 'numeric',
22120
- month: 'short',
22121
- year: 'numeric'
22122
- };
22123
- break;
22124
- case 'keyboardDate':
22125
- options = {};
22126
- break;
22127
- case 'monthAndDate':
22128
- options = {
22129
- month: 'long',
22130
- day: 'numeric'
22131
- };
22132
- break;
22133
- case 'monthAndYear':
22134
- options = {
22135
- month: 'long',
22136
- year: 'numeric'
22137
- };
22138
- break;
22139
- default:
22140
- options = {
22141
- timeZone: 'UTC',
22142
- timeZoneName: 'short'
22143
- };
22144
- }
22145
- return new Intl.DateTimeFormat(locale, options).format(date);
22146
- }
22147
- function addDays(date, amount) {
22148
- const d = new Date(date);
22149
- d.setDate(d.getDate() + amount);
22150
- return d;
22151
- }
22152
- function addMonths(date, amount) {
22153
- const d = new Date(date);
22154
- d.setMonth(d.getMonth() + amount);
22155
- return d;
22156
- }
22157
- function getYear(date) {
22158
- return date.getFullYear();
22159
- }
22160
- function getMonth(date) {
22161
- return date.getMonth();
22915
+
22916
+ const rootTypes = {
22917
+ actions: 'button@2',
22918
+ article: 'heading, paragraph',
22919
+ avatar: 'avatar',
22920
+ button: 'button',
22921
+ card: 'image, heading',
22922
+ 'card-avatar': 'image, list-item-avatar',
22923
+ chip: 'chip',
22924
+ 'date-picker': 'list-item, heading, divider, date-picker-options, date-picker-days, actions',
22925
+ 'date-picker-options': 'text, avatar@2',
22926
+ 'date-picker-days': 'avatar@28',
22927
+ divider: 'divider',
22928
+ heading: 'heading',
22929
+ image: 'image',
22930
+ 'list-item': 'text',
22931
+ 'list-item-avatar': 'avatar, text',
22932
+ 'list-item-two-line': 'sentences',
22933
+ 'list-item-avatar-two-line': 'avatar, sentences',
22934
+ 'list-item-three-line': 'paragraph',
22935
+ 'list-item-avatar-three-line': 'avatar, paragraph',
22936
+ paragraph: 'text@3',
22937
+ sentences: 'text@2',
22938
+ subtitle: 'text',
22939
+ table: 'table-heading, table-thead, table-tbody, table-tfoot',
22940
+ 'table-heading': 'chip, text',
22941
+ 'table-thead': 'heading@6',
22942
+ 'table-tbody': 'table-row-divider@6',
22943
+ 'table-row-divider': 'table-row, divider',
22944
+ 'table-row': 'text@6',
22945
+ 'table-tfoot': 'text@2, avatar@2',
22946
+ text: 'text'
22947
+ };
22948
+ function genBone(type) {
22949
+ let children = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
22950
+ return createVNode("div", {
22951
+ "class": ['v-skeleton-loader__bone', `v-skeleton-loader__${type}`]
22952
+ }, [children]);
22162
22953
  }
22163
- function startOfYear(date) {
22164
- return new Date(date.getFullYear(), 0, 1);
22954
+ function genBones(bone) {
22955
+ // e.g. 'text@3'
22956
+ const [type, length] = bone.split('@');
22957
+
22958
+ // Generate a length array based upon
22959
+ // value after @ in the bone string
22960
+ return Array.from({
22961
+ length
22962
+ }).map(() => genStructure(type));
22165
22963
  }
22166
- function endOfYear(date) {
22167
- return new Date(date.getFullYear(), 11, 31);
22964
+ function genStructure(type) {
22965
+ let children = [];
22966
+ if (!type) return children;
22967
+
22968
+ // TODO: figure out a better way to type this
22969
+ const bone = rootTypes[type];
22970
+
22971
+ // End of recursion, do nothing
22972
+ /* eslint-disable-next-line no-empty, brace-style */
22973
+ if (type === bone) ;
22974
+ // Array of values - e.g. 'heading, paragraph, text@2'
22975
+ else if (type.includes(',')) return mapBones(type);
22976
+ // Array of values - e.g. 'paragraph@4'
22977
+ else if (type.includes('@')) return genBones(type);
22978
+ // Array of values - e.g. 'card@2'
22979
+ else if (bone.includes(',')) children = mapBones(bone);
22980
+ // Array of values - e.g. 'list-item@2'
22981
+ else if (bone.includes('@')) children = genBones(bone);
22982
+ // Single value - e.g. 'card-heading'
22983
+ else if (bone) children.push(genStructure(bone));
22984
+ return [genBone(type, children)];
22168
22985
  }
22169
- function getMondayOfFirstWeekOfYear(year) {
22170
- return new Date(year, 0, 1);
22986
+ function mapBones(bones) {
22987
+ // Remove spaces and return array of structures
22988
+ return bones.replace(/\s/g, '').split(',').map(genStructure);
22171
22989
  }
22990
+ const makeVSkeletonLoaderProps = propsFactory({
22991
+ boilerplate: Boolean,
22992
+ color: String,
22993
+ loading: Boolean,
22994
+ loadingText: {
22995
+ type: String,
22996
+ default: '$vuetify.loading'
22997
+ },
22998
+ type: {
22999
+ type: [String, Array],
23000
+ default: 'image'
23001
+ },
23002
+ ...makeDimensionProps(),
23003
+ ...makeElevationProps(),
23004
+ ...makeThemeProps()
23005
+ }, 'VSkeletonLoader');
23006
+ const VSkeletonLoader = genericComponent()({
23007
+ name: 'VSkeletonLoader',
23008
+ props: makeVSkeletonLoaderProps(),
23009
+ setup(props, _ref) {
23010
+ let {
23011
+ slots
23012
+ } = _ref;
23013
+ const {
23014
+ backgroundColorClasses,
23015
+ backgroundColorStyles
23016
+ } = useBackgroundColor(toRef(props, 'color'));
23017
+ const {
23018
+ dimensionStyles
23019
+ } = useDimension(props);
23020
+ const {
23021
+ elevationClasses
23022
+ } = useElevation(props);
23023
+ const {
23024
+ themeClasses
23025
+ } = provideTheme(props);
23026
+ const {
23027
+ t
23028
+ } = useLocale();
23029
+ const items = computed(() => genStructure(wrapInArray(props.type).join(',')));
23030
+ useRender(() => {
23031
+ const isLoading = !slots.default || props.loading;
23032
+ return createVNode("div", {
23033
+ "class": ['v-skeleton-loader', {
23034
+ 'v-skeleton-loader--boilerplate': props.boilerplate
23035
+ }, themeClasses.value, backgroundColorClasses.value, elevationClasses.value],
23036
+ "style": [backgroundColorStyles.value, isLoading ? dimensionStyles.value : {}],
23037
+ "aria-busy": !props.boilerplate ? isLoading : undefined,
23038
+ "aria-live": !props.boilerplate ? 'polite' : undefined,
23039
+ "aria-label": !props.boilerplate ? t(props.loadingText) : undefined,
23040
+ "role": !props.boilerplate ? 'alert' : undefined
23041
+ }, [isLoading ? items.value : slots.default?.()]);
23042
+ });
23043
+ return {};
23044
+ }
23045
+ });
23046
+
23047
+ var components = /*#__PURE__*/Object.freeze({
23048
+ __proto__: null,
23049
+ VAlert: VAlert,
23050
+ VAlertTitle: VAlertTitle,
23051
+ VApp: VApp,
23052
+ VAppBar: VAppBar,
23053
+ VAppBarNavIcon: VAppBarNavIcon,
23054
+ VAppBarTitle: VAppBarTitle,
23055
+ VAutocomplete: VAutocomplete,
23056
+ VAvatar: VAvatar,
23057
+ VBadge: VBadge,
23058
+ VBanner: VBanner,
23059
+ VBannerActions: VBannerActions,
23060
+ VBannerText: VBannerText,
23061
+ VBottomNavigation: VBottomNavigation,
23062
+ VBottomSheet: VBottomSheet,
23063
+ VBreadcrumbs: VBreadcrumbs,
23064
+ VBreadcrumbsDivider: VBreadcrumbsDivider,
23065
+ VBreadcrumbsItem: VBreadcrumbsItem,
23066
+ VBtn: VBtn,
23067
+ VBtnGroup: VBtnGroup,
23068
+ VBtnToggle: VBtnToggle,
23069
+ VCard: VCard,
23070
+ VCardActions: VCardActions,
23071
+ VCardItem: VCardItem,
23072
+ VCardSubtitle: VCardSubtitle,
23073
+ VCardText: VCardText,
23074
+ VCardTitle: VCardTitle,
23075
+ VCarousel: VCarousel,
23076
+ VCarouselItem: VCarouselItem,
23077
+ VCheckbox: VCheckbox,
23078
+ VCheckboxBtn: VCheckboxBtn,
23079
+ VChip: VChip,
23080
+ VChipGroup: VChipGroup,
23081
+ VClassIcon: VClassIcon,
23082
+ VCode: VCode,
23083
+ VCol: VCol,
23084
+ VColorPicker: VColorPicker,
23085
+ VCombobox: VCombobox,
23086
+ VComponentIcon: VComponentIcon,
23087
+ VContainer: VContainer,
23088
+ VCounter: VCounter,
23089
+ VDataIterator: VDataIterator,
23090
+ VDataTable: VDataTable,
23091
+ VDataTableFooter: VDataTableFooter,
23092
+ VDataTableRow: VDataTableRow,
23093
+ VDataTableRows: VDataTableRows,
23094
+ VDataTableServer: VDataTableServer,
23095
+ VDataTableVirtual: VDataTableVirtual,
23096
+ VDateCard: VDateCard,
23097
+ VDatePicker: VDatePicker,
23098
+ VDatePickerControls: VDatePickerControls,
23099
+ VDatePickerHeader: VDatePickerHeader,
23100
+ VDatePickerMonth: VDatePickerMonth,
23101
+ VDatePickerYears: VDatePickerYears,
23102
+ VDefaultsProvider: VDefaultsProvider,
23103
+ VDialog: VDialog,
23104
+ VDialogBottomTransition: VDialogBottomTransition,
23105
+ VDialogTopTransition: VDialogTopTransition,
23106
+ VDialogTransition: VDialogTransition,
23107
+ VDivider: VDivider,
23108
+ VExpandTransition: VExpandTransition,
23109
+ VExpandXTransition: VExpandXTransition,
23110
+ VExpansionPanel: VExpansionPanel,
23111
+ VExpansionPanelText: VExpansionPanelText,
23112
+ VExpansionPanelTitle: VExpansionPanelTitle,
23113
+ VExpansionPanels: VExpansionPanels,
23114
+ VFabTransition: VFabTransition,
23115
+ VFadeTransition: VFadeTransition,
23116
+ VField: VField,
23117
+ VFieldLabel: VFieldLabel,
23118
+ VFileInput: VFileInput,
23119
+ VFooter: VFooter,
23120
+ VForm: VForm,
23121
+ VHover: VHover,
23122
+ VIcon: VIcon,
23123
+ VImg: VImg,
23124
+ VInfiniteScroll: VInfiniteScroll,
23125
+ VInput: VInput,
23126
+ VItem: VItem,
23127
+ VItemGroup: VItemGroup,
23128
+ VKbd: VKbd,
23129
+ VLabel: VLabel,
23130
+ VLayout: VLayout,
23131
+ VLayoutItem: VLayoutItem,
23132
+ VLazy: VLazy,
23133
+ VLigatureIcon: VLigatureIcon,
23134
+ VList: VList,
23135
+ VListGroup: VListGroup,
23136
+ VListImg: VListImg,
23137
+ VListItem: VListItem,
23138
+ VListItemAction: VListItemAction,
23139
+ VListItemMedia: VListItemMedia,
23140
+ VListItemSubtitle: VListItemSubtitle,
23141
+ VListItemTitle: VListItemTitle,
23142
+ VListSubheader: VListSubheader,
23143
+ VLocaleProvider: VLocaleProvider,
23144
+ VMain: VMain,
23145
+ VMenu: VMenu,
23146
+ VMessages: VMessages,
23147
+ VNavigationDrawer: VNavigationDrawer,
23148
+ VNoSsr: VNoSsr,
23149
+ VOverlay: VOverlay,
23150
+ VPagination: VPagination,
23151
+ VParallax: VParallax,
23152
+ VPicker: VPicker,
23153
+ VPickerTitle: VPickerTitle,
23154
+ VProgressCircular: VProgressCircular,
23155
+ VProgressLinear: VProgressLinear,
23156
+ VRadio: VRadio,
23157
+ VRadioGroup: VRadioGroup,
23158
+ VRangeSlider: VRangeSlider,
23159
+ VRating: VRating,
23160
+ VResponsive: VResponsive,
23161
+ VRow: VRow,
23162
+ VScaleTransition: VScaleTransition,
23163
+ VScrollXReverseTransition: VScrollXReverseTransition,
23164
+ VScrollXTransition: VScrollXTransition,
23165
+ VScrollYReverseTransition: VScrollYReverseTransition,
23166
+ VScrollYTransition: VScrollYTransition,
23167
+ VSelect: VSelect,
23168
+ VSelectionControl: VSelectionControl,
23169
+ VSelectionControlGroup: VSelectionControlGroup,
23170
+ VSheet: VSheet,
23171
+ VSkeletonLoader: VSkeletonLoader,
23172
+ VSlideGroup: VSlideGroup,
23173
+ VSlideGroupItem: VSlideGroupItem,
23174
+ VSlideXReverseTransition: VSlideXReverseTransition,
23175
+ VSlideXTransition: VSlideXTransition,
23176
+ VSlideYReverseTransition: VSlideYReverseTransition,
23177
+ VSlideYTransition: VSlideYTransition,
23178
+ VSlider: VSlider,
23179
+ VSnackbar: VSnackbar,
23180
+ VSpacer: VSpacer,
23181
+ VSvgIcon: VSvgIcon,
23182
+ VSwitch: VSwitch,
23183
+ VSystemBar: VSystemBar,
23184
+ VTab: VTab,
23185
+ VTable: VTable,
23186
+ VTabs: VTabs,
23187
+ VTextField: VTextField,
23188
+ VTextarea: VTextarea,
23189
+ VThemeProvider: VThemeProvider,
23190
+ VTimeline: VTimeline,
23191
+ VTimelineItem: VTimelineItem,
23192
+ VToolbar: VToolbar,
23193
+ VToolbarItems: VToolbarItems,
23194
+ VToolbarTitle: VToolbarTitle,
23195
+ VTooltip: VTooltip,
23196
+ VValidation: VValidation,
23197
+ VVirtualScroll: VVirtualScroll,
23198
+ VWindow: VWindow,
23199
+ VWindowItem: VWindowItem
23200
+ });
22172
23201
 
22173
- // https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
22174
- function getWeek(date) {
22175
- let year = date.getFullYear();
22176
- let d1w1 = getMondayOfFirstWeekOfYear(year);
22177
- if (date < d1w1) {
22178
- year = year - 1;
22179
- d1w1 = getMondayOfFirstWeekOfYear(year);
22180
- } else {
22181
- const tv = getMondayOfFirstWeekOfYear(year + 1);
22182
- if (date >= tv) {
22183
- year = year + 1;
22184
- d1w1 = tv;
23202
+ // Types
23203
+
23204
+ function mounted$2(el, binding) {
23205
+ const modifiers = binding.modifiers || {};
23206
+ const value = binding.value;
23207
+ const {
23208
+ once,
23209
+ immediate,
23210
+ ...modifierKeys
23211
+ } = modifiers;
23212
+ const defaultValue = !Object.keys(modifierKeys).length;
23213
+ const {
23214
+ handler,
23215
+ options
23216
+ } = typeof value === 'object' ? value : {
23217
+ handler: value,
23218
+ options: {
23219
+ attributes: modifierKeys?.attr ?? defaultValue,
23220
+ characterData: modifierKeys?.char ?? defaultValue,
23221
+ childList: modifierKeys?.child ?? defaultValue,
23222
+ subtree: modifierKeys?.sub ?? defaultValue
22185
23223
  }
22186
- }
22187
- const diffTime = Math.abs(date.getTime() - d1w1.getTime());
22188
- const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
22189
- return Math.floor(diffDays / 7) + 1;
22190
- }
22191
- function isWithinRange(date, range) {
22192
- return isAfter(date, range[0]) && isBefore(date, range[1]);
22193
- }
22194
- function isValid(date) {
22195
- const d = new Date(date);
22196
- return d instanceof Date && !isNaN(d.getTime());
22197
- }
22198
- function isAfter(date, comparing) {
22199
- return date.getTime() > comparing.getTime();
22200
- }
22201
- function isBefore(date, comparing) {
22202
- return date.getTime() < comparing.getTime();
22203
- }
22204
- function isEqual(date, comparing) {
22205
- return date.getTime() === comparing.getTime();
22206
- }
22207
- function isSameDay(date, comparing) {
22208
- return date.getDate() === comparing.getDate() && date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
23224
+ };
23225
+ const observer = new MutationObserver(function () {
23226
+ let mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
23227
+ let observer = arguments.length > 1 ? arguments[1] : undefined;
23228
+ handler?.(mutations, observer);
23229
+ if (once) unmounted$2(el, binding);
23230
+ });
23231
+ if (immediate) handler?.([], observer);
23232
+ el._mutate = Object(el._mutate);
23233
+ el._mutate[binding.instance.$.uid] = {
23234
+ observer
23235
+ };
23236
+ observer.observe(el, options);
22209
23237
  }
22210
- function isSameMonth(date, comparing) {
22211
- return date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
23238
+ function unmounted$2(el, binding) {
23239
+ if (!el._mutate?.[binding.instance.$.uid]) return;
23240
+ el._mutate[binding.instance.$.uid].observer.disconnect();
23241
+ delete el._mutate[binding.instance.$.uid];
22212
23242
  }
22213
- function getDiff(date, comparing, unit) {
22214
- const d = new Date(date);
22215
- const c = new Date(comparing);
22216
- if (unit === 'month') {
22217
- return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12;
23243
+ const Mutate = {
23244
+ mounted: mounted$2,
23245
+ unmounted: unmounted$2
23246
+ };
23247
+
23248
+ // Types
23249
+
23250
+ function mounted$1(el, binding) {
23251
+ const handler = binding.value;
23252
+ const options = {
23253
+ passive: !binding.modifiers?.active
23254
+ };
23255
+ window.addEventListener('resize', handler, options);
23256
+ el._onResize = Object(el._onResize);
23257
+ el._onResize[binding.instance.$.uid] = {
23258
+ handler,
23259
+ options
23260
+ };
23261
+ if (!binding.modifiers?.quiet) {
23262
+ handler();
22218
23263
  }
22219
- return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24));
22220
- }
22221
- function setYear(date, year) {
22222
- const d = new Date(date);
22223
- d.setFullYear(year);
22224
- return d;
22225
23264
  }
22226
- class VuetifyDateAdapter {
22227
- constructor() {
22228
- let locale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'en';
22229
- this.locale = locale;
22230
- }
22231
- date(value) {
22232
- return date(value);
22233
- }
22234
- addDays(date, amount) {
22235
- return addDays(date, amount);
22236
- }
22237
- addMonths(date, amount) {
22238
- return addMonths(date, amount);
22239
- }
22240
- getWeekArray(date) {
22241
- return getWeekArray(date);
22242
- }
22243
- startOfMonth(date) {
22244
- return startOfMonth(date);
22245
- }
22246
- endOfMonth(date) {
22247
- return endOfMonth(date);
22248
- }
22249
- format(date, formatString) {
22250
- return format(date, formatString, this.locale);
22251
- }
22252
- isEqual(date, comparing) {
22253
- return isEqual(date, comparing);
22254
- }
22255
- isValid(date) {
22256
- return isValid(date);
22257
- }
22258
- isWithinRange(date, range) {
22259
- return isWithinRange(date, range);
22260
- }
22261
- isAfter(date, comparing) {
22262
- return isAfter(date, comparing);
22263
- }
22264
- isSameDay(date, comparing) {
22265
- return isSameDay(date, comparing);
22266
- }
22267
- isSameMonth(date, comparing) {
22268
- return isSameMonth(date, comparing);
22269
- }
22270
- setYear(date, year) {
22271
- return setYear(date, year);
22272
- }
22273
- getDiff(date, comparing, unit) {
22274
- return getDiff(date, comparing, unit);
22275
- }
22276
- getWeek(date) {
22277
- return getWeek(date);
22278
- }
22279
- getWeekdays() {
22280
- return getWeekdays(this.locale);
22281
- }
22282
- getYear(date) {
22283
- return getYear(date);
22284
- }
22285
- getMonth(date) {
22286
- return getMonth(date);
22287
- }
22288
- startOfYear(date) {
22289
- return startOfYear(date);
22290
- }
22291
- endOfYear(date) {
22292
- return endOfYear(date);
22293
- }
23265
+ function unmounted$1(el, binding) {
23266
+ if (!el._onResize?.[binding.instance.$.uid]) return;
23267
+ const {
23268
+ handler,
23269
+ options
23270
+ } = el._onResize[binding.instance.$.uid];
23271
+ window.removeEventListener('resize', handler, options);
23272
+ delete el._onResize[binding.instance.$.uid];
22294
23273
  }
22295
-
22296
- // Composables
23274
+ const Resize = {
23275
+ mounted: mounted$1,
23276
+ unmounted: unmounted$1
23277
+ };
22297
23278
 
22298
23279
  // Types
22299
23280
 
22300
- const DateAdapterSymbol = Symbol.for('vuetify:date-adapter');
22301
- function createDate(options) {
22302
- return options ?? {
22303
- adapter: VuetifyDateAdapter
23281
+ function mounted(el, binding) {
23282
+ const {
23283
+ self = false
23284
+ } = binding.modifiers ?? {};
23285
+ const value = binding.value;
23286
+ const options = typeof value === 'object' && value.options || {
23287
+ passive: true
23288
+ };
23289
+ const handler = typeof value === 'function' || 'handleEvent' in value ? value : value.handler;
23290
+ const target = self ? el : binding.arg ? document.querySelector(binding.arg) : window;
23291
+ if (!target) return;
23292
+ target.addEventListener('scroll', handler, options);
23293
+ el._onScroll = Object(el._onScroll);
23294
+ el._onScroll[binding.instance.$.uid] = {
23295
+ handler,
23296
+ options,
23297
+ // Don't reference self
23298
+ target: self ? undefined : target
22304
23299
  };
22305
23300
  }
23301
+ function unmounted(el, binding) {
23302
+ if (!el._onScroll?.[binding.instance.$.uid]) return;
23303
+ const {
23304
+ handler,
23305
+ options,
23306
+ target = el
23307
+ } = el._onScroll[binding.instance.$.uid];
23308
+ target.removeEventListener('scroll', handler, options);
23309
+ delete el._onScroll[binding.instance.$.uid];
23310
+ }
23311
+ function updated(el, binding) {
23312
+ if (binding.value === binding.oldValue) return;
23313
+ unmounted(el, binding);
23314
+ mounted(el, binding);
23315
+ }
23316
+ const Scroll = {
23317
+ mounted,
23318
+ unmounted,
23319
+ updated
23320
+ };
23321
+
23322
+ var directives = /*#__PURE__*/Object.freeze({
23323
+ __proto__: null,
23324
+ ClickOutside: ClickOutside,
23325
+ Intersect: Intersect,
23326
+ Mutate: Mutate,
23327
+ Resize: Resize,
23328
+ Ripple: Ripple,
23329
+ Scroll: Scroll,
23330
+ Touch: Touch
23331
+ });
22306
23332
 
22307
23333
  // Composables
22308
23334
  function createVuetify$1() {
@@ -22389,7 +23415,7 @@ function createVuetify$1() {
22389
23415
  date
22390
23416
  };
22391
23417
  }
22392
- const version$1 = "3.3.2";
23418
+ const version$1 = "3.3.4";
22393
23419
  createVuetify$1.version = version$1;
22394
23420
 
22395
23421
  // Vue's inject() can only be used in setup
@@ -22403,7 +23429,7 @@ function inject(key) {
22403
23429
 
22404
23430
  /* eslint-disable local-rules/sort-imports */
22405
23431
 
22406
- const version = "3.3.2";
23432
+ const version = "3.3.4";
22407
23433
 
22408
23434
  /* eslint-disable local-rules/sort-imports */
22409
23435