@vuetify/nightly 3.0.0-beta.10 → 3.0.0-beta.15

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 (881) hide show
  1. package/CHANGELOG.md +31 -2
  2. package/dist/json/importMap.json +54 -58
  3. package/dist/vuetify.css +477 -284
  4. package/dist/vuetify.d.ts +17577 -6202
  5. package/dist/vuetify.esm.js +1350 -2179
  6. package/dist/vuetify.esm.js.map +1 -1
  7. package/dist/vuetify.js +1325 -2155
  8. package/dist/vuetify.js.map +1 -1
  9. package/dist/vuetify.min.css +3 -3
  10. package/dist/vuetify.min.js +575 -575
  11. package/dist/vuetify.min.js.map +1 -1
  12. package/lib/blueprints/index.d.ts +163 -0
  13. package/lib/blueprints/index.mjs.map +1 -1
  14. package/lib/blueprints/md1.d.ts +159 -0
  15. package/lib/blueprints/md1.mjs +3 -1
  16. package/lib/blueprints/md1.mjs.map +1 -1
  17. package/lib/blueprints/md2.d.ts +159 -0
  18. package/lib/blueprints/md2.mjs +3 -1
  19. package/lib/blueprints/md2.mjs.map +1 -1
  20. package/lib/blueprints/md3.d.ts +159 -0
  21. package/lib/blueprints/md3.mjs +2 -2
  22. package/lib/blueprints/md3.mjs.map +1 -1
  23. package/lib/components/VAlert/VAlert.mjs +2 -9
  24. package/lib/components/VAlert/VAlert.mjs.map +1 -1
  25. package/lib/components/VAlert/VAlertTitle.mjs.map +1 -1
  26. package/lib/components/VAlert/index.d.ts +187 -0
  27. package/lib/components/VAlert/index.mjs.map +1 -1
  28. package/lib/components/VApp/VApp.mjs +5 -7
  29. package/lib/components/VApp/VApp.mjs.map +1 -1
  30. package/lib/components/VApp/index.d.ts +85 -0
  31. package/lib/components/VApp/index.mjs.map +1 -1
  32. package/lib/components/VAppBar/VAppBar.css +3 -0
  33. package/lib/components/VAppBar/VAppBar.mjs +4 -8
  34. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  35. package/lib/components/VAppBar/VAppBar.sass +3 -0
  36. package/lib/components/VAppBar/VAppBarNavIcon.mjs +0 -4
  37. package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
  38. package/lib/components/VAppBar/VAppBarTitle.mjs +2 -4
  39. package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
  40. package/lib/components/VAppBar/index.d.ts +160 -0
  41. package/lib/components/VAppBar/index.mjs.map +1 -1
  42. package/lib/components/VAutocomplete/VAutocomplete.css +18 -1
  43. package/lib/components/VAutocomplete/VAutocomplete.mjs +17 -36
  44. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  45. package/lib/components/VAutocomplete/VAutocomplete.sass +11 -1
  46. package/lib/components/VAutocomplete/_variables.scss +1 -0
  47. package/lib/components/VAutocomplete/index.d.ts +1460 -0
  48. package/lib/components/VAutocomplete/index.mjs.map +1 -1
  49. package/lib/components/VAvatar/VAvatar.css +44 -2
  50. package/lib/components/VAvatar/VAvatar.mjs +19 -19
  51. package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
  52. package/lib/components/VAvatar/VAvatar.sass +5 -1
  53. package/lib/components/VAvatar/_variables.scss +9 -4
  54. package/lib/components/VAvatar/index.d.ts +82 -0
  55. package/lib/components/VAvatar/index.mjs.map +1 -1
  56. package/lib/components/VBadge/VBadge.mjs +2 -6
  57. package/lib/components/VBadge/VBadge.mjs.map +1 -1
  58. package/lib/components/VBadge/index.d.ts +123 -0
  59. package/lib/components/VBadge/index.mjs.map +1 -1
  60. package/lib/components/VBanner/VBanner.mjs +5 -7
  61. package/lib/components/VBanner/VBanner.mjs.map +1 -1
  62. package/lib/components/VBanner/VBannerActions.mjs +0 -4
  63. package/lib/components/VBanner/VBannerActions.mjs.map +1 -1
  64. package/lib/components/VBanner/VBannerText.mjs.map +1 -1
  65. package/lib/components/VBanner/index.d.ts +126 -0
  66. package/lib/components/VBanner/index.mjs.map +1 -1
  67. package/lib/components/VBottomNavigation/VBottomNavigation.mjs +2 -5
  68. package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
  69. package/lib/components/VBottomNavigation/index.d.ts +145 -0
  70. package/lib/components/VBottomNavigation/index.mjs.map +1 -1
  71. package/lib/components/VBottomSheet/VBottomSheet.mjs +5 -5
  72. package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -1
  73. package/lib/components/VBottomSheet/index.mjs.map +1 -1
  74. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +5 -9
  75. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
  76. package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs.map +1 -1
  77. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +2 -7
  78. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
  79. package/lib/components/VBreadcrumbs/index.d.ts +311 -0
  80. package/lib/components/VBreadcrumbs/index.mjs.map +1 -1
  81. package/lib/components/VBtn/VBtn.css +8 -3
  82. package/lib/components/VBtn/VBtn.mjs +17 -15
  83. package/lib/components/VBtn/VBtn.mjs.map +1 -1
  84. package/lib/components/VBtn/index.d.ts +212 -0
  85. package/lib/components/VBtn/index.mjs.map +1 -1
  86. package/lib/components/VBtnGroup/VBtnGroup.mjs +2 -4
  87. package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
  88. package/lib/components/VBtnGroup/index.d.ts +68 -0
  89. package/lib/components/VBtnGroup/index.mjs.map +1 -1
  90. package/lib/components/VBtnToggle/VBtnToggle.mjs +3 -10
  91. package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
  92. package/lib/components/VBtnToggle/index.d.ts +170 -0
  93. package/lib/components/VBtnToggle/index.mjs.map +1 -1
  94. package/lib/components/VCalendar/VCalendar.mjs +6 -67
  95. package/lib/components/VCalendar/VCalendar.mjs.map +1 -1
  96. package/lib/components/VCalendar/VCalendarCategory.mjs +7 -18
  97. package/lib/components/VCalendar/VCalendarCategory.mjs.map +1 -1
  98. package/lib/components/VCalendar/VCalendarDaily.mjs +3 -34
  99. package/lib/components/VCalendar/VCalendarDaily.mjs.map +1 -1
  100. package/lib/components/VCalendar/VCalendarMonthly.mjs +3 -7
  101. package/lib/components/VCalendar/VCalendarMonthly.mjs.map +1 -1
  102. package/lib/components/VCalendar/VCalendarWeekly.mjs +3 -32
  103. package/lib/components/VCalendar/VCalendarWeekly.mjs.map +1 -1
  104. package/lib/components/VCalendar/index.mjs.map +1 -1
  105. package/lib/components/VCalendar/mixins/calendar-base.mjs +1 -19
  106. package/lib/components/VCalendar/mixins/calendar-base.mjs.map +1 -1
  107. package/lib/components/VCalendar/mixins/calendar-with-events.mjs +14 -78
  108. package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +1 -1
  109. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs +0 -30
  110. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs.map +1 -1
  111. package/lib/components/VCalendar/mixins/mouse.mjs +7 -17
  112. package/lib/components/VCalendar/mixins/mouse.mjs.map +1 -1
  113. package/lib/components/VCalendar/mixins/times.mjs +1 -9
  114. package/lib/components/VCalendar/mixins/times.mjs.map +1 -1
  115. package/lib/components/VCalendar/modes/column.mjs +0 -3
  116. package/lib/components/VCalendar/modes/column.mjs.map +1 -1
  117. package/lib/components/VCalendar/modes/common.mjs +0 -14
  118. package/lib/components/VCalendar/modes/common.mjs.map +1 -1
  119. package/lib/components/VCalendar/modes/index.mjs +0 -1
  120. package/lib/components/VCalendar/modes/index.mjs.map +1 -1
  121. package/lib/components/VCalendar/modes/stack.mjs +3 -45
  122. package/lib/components/VCalendar/modes/stack.mjs.map +1 -1
  123. package/lib/components/VCalendar/util/events.mjs +0 -1
  124. package/lib/components/VCalendar/util/events.mjs.map +1 -1
  125. package/lib/components/VCalendar/util/parser.mjs +3 -4
  126. package/lib/components/VCalendar/util/parser.mjs.map +1 -1
  127. package/lib/components/VCalendar/util/props.mjs +0 -13
  128. package/lib/components/VCalendar/util/props.mjs.map +1 -1
  129. package/lib/components/VCalendar/util/timestamp.mjs +2 -64
  130. package/lib/components/VCalendar/util/timestamp.mjs.map +1 -1
  131. package/lib/components/VCard/VCard.css +8 -3
  132. package/lib/components/VCard/VCard.mjs +3 -8
  133. package/lib/components/VCard/VCard.mjs.map +1 -1
  134. package/lib/components/VCard/VCardActions.mjs +0 -4
  135. package/lib/components/VCard/VCardActions.mjs.map +1 -1
  136. package/lib/components/VCard/VCardItem.mjs +0 -5
  137. package/lib/components/VCard/VCardItem.mjs.map +1 -1
  138. package/lib/components/VCard/VCardSubtitle.mjs.map +1 -1
  139. package/lib/components/VCard/VCardText.mjs.map +1 -1
  140. package/lib/components/VCard/VCardTitle.mjs.map +1 -1
  141. package/lib/components/VCard/index.d.ts +237 -0
  142. package/lib/components/VCard/index.mjs.map +1 -1
  143. package/lib/components/VCarousel/VCarousel.mjs +8 -12
  144. package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
  145. package/lib/components/VCarousel/VCarouselItem.mjs +0 -3
  146. package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
  147. package/lib/components/VCarousel/index.d.ts +81 -0
  148. package/lib/components/VCarousel/index.mjs.map +1 -1
  149. package/lib/components/VCheckbox/VCheckbox.mjs +6 -6
  150. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  151. package/lib/components/VCheckbox/VCheckboxBtn.mjs +7 -15
  152. package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
  153. package/lib/components/VCheckbox/index.d.ts +293 -0
  154. package/lib/components/VCheckbox/index.mjs.map +1 -1
  155. package/lib/components/VChip/VChip.css +25 -0
  156. package/lib/components/VChip/VChip.mjs +2 -10
  157. package/lib/components/VChip/VChip.mjs.map +1 -1
  158. package/lib/components/VChip/VChip.sass +1 -0
  159. package/lib/components/VChip/index.d.ts +197 -0
  160. package/lib/components/VChip/index.mjs.map +1 -1
  161. package/lib/components/VChipGroup/VChipGroup.mjs +5 -6
  162. package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
  163. package/lib/components/VChipGroup/index.d.ts +89 -0
  164. package/lib/components/VChipGroup/index.mjs.map +1 -1
  165. package/lib/components/VCode/index.d.ts +20 -0
  166. package/lib/components/VCode/index.mjs.map +1 -1
  167. package/lib/components/VColorPicker/VColorPicker.mjs +9 -12
  168. package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
  169. package/lib/components/VColorPicker/VColorPickerCanvas.mjs +5 -20
  170. package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
  171. package/lib/components/VColorPicker/VColorPickerEdit.mjs +6 -10
  172. package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
  173. package/lib/components/VColorPicker/VColorPickerPreview.mjs +6 -8
  174. package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
  175. package/lib/components/VColorPicker/VColorPickerSwatches.mjs +2 -6
  176. package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
  177. package/lib/components/VColorPicker/index.d.ts +116 -0
  178. package/lib/components/VColorPicker/index.mjs.map +1 -1
  179. package/lib/components/VColorPicker/util/index.mjs +24 -26
  180. package/lib/components/VColorPicker/util/index.mjs.map +1 -1
  181. package/lib/components/VCombobox/VCombobox.css +13 -0
  182. package/lib/components/VCombobox/VCombobox.mjs +24 -51
  183. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  184. package/lib/components/VCombobox/VCombobox.sass +5 -0
  185. package/lib/components/VCombobox/_variables.scss +1 -0
  186. package/lib/components/VCombobox/index.d.ts +1481 -0
  187. package/lib/components/VCombobox/index.mjs.map +1 -1
  188. package/lib/components/VCounter/VCounter.mjs +2 -5
  189. package/lib/components/VCounter/VCounter.mjs.map +1 -1
  190. package/lib/components/VCounter/index.d.ts +224 -0
  191. package/lib/components/VCounter/index.mjs.map +1 -1
  192. package/lib/components/VData/VData.mjs +9 -67
  193. package/lib/components/VData/VData.mjs.map +1 -1
  194. package/lib/components/VData/index.mjs.map +1 -1
  195. package/lib/components/VDataIterator/VDataFooter.mjs +6 -25
  196. package/lib/components/VDataIterator/VDataFooter.mjs.map +1 -1
  197. package/lib/components/VDataIterator/VDataIterator.mjs +12 -51
  198. package/lib/components/VDataIterator/VDataIterator.mjs.map +1 -1
  199. package/lib/components/VDataIterator/index.mjs.map +1 -1
  200. package/lib/components/VDataTable/MobileRow.mjs +3 -8
  201. package/lib/components/VDataTable/MobileRow.mjs.map +1 -1
  202. package/lib/components/VDataTable/Row.mjs +1 -8
  203. package/lib/components/VDataTable/Row.mjs.map +1 -1
  204. package/lib/components/VDataTable/RowGroup.mjs +1 -7
  205. package/lib/components/VDataTable/RowGroup.mjs.map +1 -1
  206. package/lib/components/VDataTable/VDataTable.mjs +42 -90
  207. package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
  208. package/lib/components/VDataTable/VDataTableHeader.mjs +6 -10
  209. package/lib/components/VDataTable/VDataTableHeader.mjs.map +1 -1
  210. package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs +0 -18
  211. package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs.map +1 -1
  212. package/lib/components/VDataTable/VDataTableHeaderMobile.mjs +0 -9
  213. package/lib/components/VDataTable/VDataTableHeaderMobile.mjs.map +1 -1
  214. package/lib/components/VDataTable/VEditDialog.mjs +3 -17
  215. package/lib/components/VDataTable/VEditDialog.mjs.map +1 -1
  216. package/lib/components/VDataTable/VVirtualTable.mjs +3 -28
  217. package/lib/components/VDataTable/VVirtualTable.mjs.map +1 -1
  218. package/lib/components/VDataTable/index.mjs +0 -1
  219. package/lib/components/VDataTable/index.mjs.map +1 -1
  220. package/lib/components/VDataTable/mixins/header.mjs +0 -5
  221. package/lib/components/VDataTable/mixins/header.mjs.map +1 -1
  222. package/lib/components/VDatePicker/VDatePicker.mjs +2 -69
  223. package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
  224. package/lib/components/VDatePicker/VDatePickerDateTable.mjs +1 -29
  225. package/lib/components/VDatePicker/VDatePickerDateTable.mjs.map +1 -1
  226. package/lib/components/VDatePicker/VDatePickerHeader.mjs +4 -17
  227. package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +1 -1
  228. package/lib/components/VDatePicker/VDatePickerMonthTable.mjs +1 -12
  229. package/lib/components/VDatePicker/VDatePickerMonthTable.mjs.map +1 -1
  230. package/lib/components/VDatePicker/VDatePickerTitle.mjs +4 -15
  231. package/lib/components/VDatePicker/VDatePickerTitle.mjs.map +1 -1
  232. package/lib/components/VDatePicker/VDatePickerYears.mjs +4 -18
  233. package/lib/components/VDatePicker/VDatePickerYears.mjs.map +1 -1
  234. package/lib/components/VDatePicker/index.mjs.map +1 -1
  235. package/lib/components/VDatePicker/mixins/date-picker-table.mjs +6 -33
  236. package/lib/components/VDatePicker/mixins/date-picker-table.mjs.map +1 -1
  237. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs +0 -5
  238. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs.map +1 -1
  239. package/lib/components/VDatePicker/util/eventHelpers.mjs +2 -3
  240. package/lib/components/VDatePicker/util/eventHelpers.mjs.map +1 -1
  241. package/lib/components/VDatePicker/util/index.mjs +0 -1
  242. package/lib/components/VDatePicker/util/index.mjs.map +1 -1
  243. package/lib/components/VDatePicker/util/isDateAllowed.mjs +1 -1
  244. package/lib/components/VDatePicker/util/isDateAllowed.mjs.map +1 -1
  245. package/lib/components/VDatePicker/util/monthChange.mjs +0 -3
  246. package/lib/components/VDatePicker/util/monthChange.mjs.map +1 -1
  247. package/lib/components/VDatePicker/util/pad.mjs +1 -6
  248. package/lib/components/VDatePicker/util/pad.mjs.map +1 -1
  249. package/lib/components/VDatePicker/util/sanitizeDateString.mjs.map +1 -1
  250. package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +2 -4
  251. package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs.map +1 -1
  252. package/lib/components/VDefaultsProvider/index.d.ts +27 -0
  253. package/lib/components/VDefaultsProvider/index.mjs.map +1 -1
  254. package/lib/components/VDialog/VDialog.css +2 -0
  255. package/lib/components/VDialog/VDialog.mjs +22 -30
  256. package/lib/components/VDialog/VDialog.mjs.map +1 -1
  257. package/lib/components/VDialog/VDialog.sass +2 -0
  258. package/lib/components/VDialog/index.d.ts +1879 -0
  259. package/lib/components/VDialog/index.mjs.map +1 -1
  260. package/lib/components/VDivider/VDivider.mjs +2 -8
  261. package/lib/components/VDivider/VDivider.mjs.map +1 -1
  262. package/lib/components/VDivider/index.d.ts +23 -0
  263. package/lib/components/VDivider/index.mjs.map +1 -1
  264. package/lib/components/VExpansionPanel/VExpansionPanel.css +8 -3
  265. package/lib/components/VExpansionPanel/VExpansionPanel.mjs +0 -5
  266. package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
  267. package/lib/components/VExpansionPanel/VExpansionPanelText.mjs +2 -6
  268. package/lib/components/VExpansionPanel/VExpansionPanelText.mjs.map +1 -1
  269. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +3 -8
  270. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
  271. package/lib/components/VExpansionPanel/VExpansionPanels.mjs +2 -5
  272. package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
  273. package/lib/components/VExpansionPanel/index.d.ts +206 -0
  274. package/lib/components/VExpansionPanel/index.mjs.map +1 -1
  275. package/lib/components/VField/VField.css +28 -25
  276. package/lib/components/VField/VField.mjs +5 -12
  277. package/lib/components/VField/VField.mjs.map +1 -1
  278. package/lib/components/VField/VField.sass +23 -22
  279. package/lib/components/VField/VFieldLabel.mjs +0 -3
  280. package/lib/components/VField/VFieldLabel.mjs.map +1 -1
  281. package/lib/components/VField/index.d.ts +306 -0
  282. package/lib/components/VField/index.mjs.map +1 -1
  283. package/lib/components/VFileInput/VFileInput.css +16 -0
  284. package/lib/components/VFileInput/VFileInput.mjs +9 -23
  285. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  286. package/lib/components/VFileInput/VFileInput.sass +10 -0
  287. package/lib/components/VFileInput/_variables.scss +2 -0
  288. package/lib/components/VFileInput/index.d.ts +464 -0
  289. package/lib/components/VFileInput/index.mjs.map +1 -1
  290. package/lib/components/VFooter/VFooter.css +7 -0
  291. package/lib/components/VFooter/VFooter.mjs +2 -4
  292. package/lib/components/VFooter/VFooter.mjs.map +1 -1
  293. package/lib/components/VFooter/VFooter.sass +1 -1
  294. package/lib/components/VFooter/_variables.scss +11 -0
  295. package/lib/components/VFooter/index.d.ts +77 -0
  296. package/lib/components/VFooter/index.mjs.map +1 -1
  297. package/lib/components/VForm/VForm.mjs +2 -13
  298. package/lib/components/VForm/VForm.mjs.map +1 -1
  299. package/lib/components/VForm/index.d.ts +72 -0
  300. package/lib/components/VForm/index.mjs.map +1 -1
  301. package/lib/components/VGrid/VCol.mjs +8 -23
  302. package/lib/components/VGrid/VCol.mjs.map +1 -1
  303. package/lib/components/VGrid/VContainer.mjs +2 -4
  304. package/lib/components/VGrid/VContainer.mjs.map +1 -1
  305. package/lib/components/VGrid/VRow.mjs +6 -24
  306. package/lib/components/VGrid/VRow.mjs.map +1 -1
  307. package/lib/components/VGrid/VSpacer.mjs.map +1 -1
  308. package/lib/components/VGrid/index.d.ts +156 -0
  309. package/lib/components/VGrid/index.mjs.map +1 -1
  310. package/lib/components/VHover/VHover.mjs +0 -4
  311. package/lib/components/VHover/VHover.mjs.map +1 -1
  312. package/lib/components/VHover/index.d.ts +31 -0
  313. package/lib/components/VHover/index.mjs.map +1 -1
  314. package/lib/components/VIcon/VIcon.mjs +2 -8
  315. package/lib/components/VIcon/VIcon.mjs.map +1 -1
  316. package/lib/components/VIcon/index.d.ts +125 -0
  317. package/lib/components/VIcon/index.mjs.map +1 -1
  318. package/lib/components/VImg/VImg.mjs +36 -60
  319. package/lib/components/VImg/VImg.mjs.map +1 -1
  320. package/lib/components/VImg/index.d.ts +93 -0
  321. package/lib/components/VImg/index.mjs.map +1 -1
  322. package/lib/components/VInput/InputIcon.mjs +0 -2
  323. package/lib/components/VInput/InputIcon.mjs.map +1 -1
  324. package/lib/components/VInput/VInput.mjs +9 -13
  325. package/lib/components/VInput/VInput.mjs.map +1 -1
  326. package/lib/components/VInput/index.d.ts +309 -0
  327. package/lib/components/VInput/index.mjs.map +1 -1
  328. package/lib/components/VItemGroup/VItem.mjs +0 -5
  329. package/lib/components/VItemGroup/VItem.mjs.map +1 -1
  330. package/lib/components/VItemGroup/VItemGroup.mjs +4 -6
  331. package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
  332. package/lib/components/VItemGroup/index.d.ts +204 -0
  333. package/lib/components/VItemGroup/index.mjs.map +1 -1
  334. package/lib/components/VKbd/index.d.ts +20 -0
  335. package/lib/components/VKbd/index.mjs.map +1 -1
  336. package/lib/components/VLabel/VLabel.css +4 -1
  337. package/lib/components/VLabel/VLabel.mjs +6 -6
  338. package/lib/components/VLabel/VLabel.mjs.map +1 -1
  339. package/lib/components/VLabel/VLabel.sass +3 -1
  340. package/lib/components/VLabel/index.d.ts +16 -0
  341. package/lib/components/VLabel/index.mjs.map +1 -1
  342. package/lib/components/VLayout/VLayout.mjs +2 -5
  343. package/lib/components/VLayout/VLayout.mjs.map +1 -1
  344. package/lib/components/VLayout/VLayoutItem.mjs +2 -6
  345. package/lib/components/VLayout/VLayoutItem.mjs.map +1 -1
  346. package/lib/components/VLayout/index.d.ts +78 -0
  347. package/lib/components/VLayout/index.mjs.map +1 -1
  348. package/lib/components/VLazy/VLazy.mjs +0 -8
  349. package/lib/components/VLazy/VLazy.mjs.map +1 -1
  350. package/lib/components/VLazy/index.d.ts +86 -0
  351. package/lib/components/VLazy/index.mjs.map +1 -1
  352. package/lib/components/VList/VList.mjs +2 -11
  353. package/lib/components/VList/VList.mjs.map +1 -1
  354. package/lib/components/VList/VListChildren.mjs +12 -21
  355. package/lib/components/VList/VListChildren.mjs.map +1 -1
  356. package/lib/components/VList/VListGroup.mjs +1 -12
  357. package/lib/components/VList/VListGroup.mjs.map +1 -1
  358. package/lib/components/VList/VListImg.mjs.map +1 -1
  359. package/lib/components/VList/VListItem.css +8 -3
  360. package/lib/components/VList/VListItem.mjs +6 -16
  361. package/lib/components/VList/VListItem.mjs.map +1 -1
  362. package/lib/components/VList/VListItemAction.mjs +0 -3
  363. package/lib/components/VList/VListItemAction.mjs.map +1 -1
  364. package/lib/components/VList/VListItemMedia.mjs +0 -3
  365. package/lib/components/VList/VListItemMedia.mjs.map +1 -1
  366. package/lib/components/VList/VListItemSubtitle.mjs.map +1 -1
  367. package/lib/components/VList/VListItemTitle.mjs.map +1 -1
  368. package/lib/components/VList/VListSubheader.mjs +0 -4
  369. package/lib/components/VList/VListSubheader.mjs.map +1 -1
  370. package/lib/components/VList/index.d.ts +1227 -0
  371. package/lib/components/VList/index.mjs.map +1 -1
  372. package/lib/components/VList/list.mjs +5 -2
  373. package/lib/components/VList/list.mjs.map +1 -1
  374. package/lib/components/VLocaleProvider/VLocaleProvider.mjs +4 -9
  375. package/lib/components/VLocaleProvider/VLocaleProvider.mjs.map +1 -1
  376. package/lib/components/VLocaleProvider/index.d.ts +24 -0
  377. package/lib/components/VLocaleProvider/index.mjs.map +1 -1
  378. package/lib/components/VMain/VMain.mjs +2 -5
  379. package/lib/components/VMain/VMain.mjs.map +1 -1
  380. package/lib/components/VMain/index.d.ts +27 -0
  381. package/lib/components/VMain/index.mjs.map +1 -1
  382. package/lib/components/VMenu/VMenu.mjs +17 -15
  383. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  384. package/lib/components/VMenu/index.d.ts +1837 -0
  385. package/lib/components/VMenu/index.mjs.map +1 -1
  386. package/lib/components/VMenu/shared.mjs.map +1 -1
  387. package/lib/components/VMessages/VMessages.mjs +2 -6
  388. package/lib/components/VMessages/VMessages.mjs.map +1 -1
  389. package/lib/components/VMessages/index.d.ts +235 -0
  390. package/lib/components/VMessages/index.mjs.map +1 -1
  391. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +6 -11
  392. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  393. package/lib/components/VNavigationDrawer/index.d.ts +148 -0
  394. package/lib/components/VNavigationDrawer/index.mjs.map +1 -1
  395. package/lib/components/VNavigationDrawer/sticky.mjs +0 -4
  396. package/lib/components/VNavigationDrawer/sticky.mjs.map +1 -1
  397. package/lib/components/VNavigationDrawer/touch.mjs +2 -15
  398. package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
  399. package/lib/components/VNoSsr/VNoSsr.mjs +0 -4
  400. package/lib/components/VNoSsr/VNoSsr.mjs.map +1 -1
  401. package/lib/components/VNoSsr/index.d.ts +8 -0
  402. package/lib/components/VNoSsr/index.mjs.map +1 -1
  403. package/lib/components/VOtpInput/VOtpInput.mjs +7 -58
  404. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  405. package/lib/components/VOtpInput/index.mjs.map +1 -1
  406. package/lib/components/VOverflowBtn/VOverflowBtn.mjs +7 -19
  407. package/lib/components/VOverflowBtn/VOverflowBtn.mjs.map +1 -1
  408. package/lib/components/VOverflowBtn/index.mjs.map +1 -1
  409. package/lib/components/VOverlay/VOverlay.mjs +12 -20
  410. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  411. package/lib/components/VOverlay/index.d.ts +551 -0
  412. package/lib/components/VOverlay/index.mjs.map +1 -1
  413. package/lib/components/VOverlay/locationStrategies.mjs +23 -56
  414. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  415. package/lib/components/VOverlay/requestNewFrame.mjs +1 -2
  416. package/lib/components/VOverlay/requestNewFrame.mjs.map +1 -1
  417. package/lib/components/VOverlay/scrollStrategies.mjs +2 -18
  418. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  419. package/lib/components/VOverlay/useActivator.mjs +29 -29
  420. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  421. package/lib/components/VOverlay/util/point.mjs +3 -4
  422. package/lib/components/VOverlay/util/point.mjs.map +1 -1
  423. package/lib/components/VPagination/VPagination.mjs +16 -25
  424. package/lib/components/VPagination/VPagination.mjs.map +1 -1
  425. package/lib/components/VPagination/index.d.ts +249 -0
  426. package/lib/components/VPagination/index.mjs.map +1 -1
  427. package/lib/components/VParallax/VParallax.mjs +30 -22
  428. package/lib/components/VParallax/VParallax.mjs.map +1 -1
  429. package/lib/components/VParallax/index.d.ts +18 -0
  430. package/lib/components/VParallax/index.mjs.map +1 -1
  431. package/lib/components/VPicker/VPicker.mjs +3 -12
  432. package/lib/components/VPicker/VPicker.mjs.map +1 -1
  433. package/lib/components/VPicker/index.mjs.map +1 -1
  434. package/lib/components/VProgressCircular/VProgressCircular.mjs +2 -5
  435. package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
  436. package/lib/components/VProgressCircular/index.d.ts +69 -0
  437. package/lib/components/VProgressCircular/index.mjs.map +1 -1
  438. package/lib/components/VProgressLinear/VProgressLinear.mjs +5 -8
  439. package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
  440. package/lib/components/VProgressLinear/index.d.ts +102 -0
  441. package/lib/components/VProgressLinear/index.mjs.map +1 -1
  442. package/lib/components/VRadio/VRadio.mjs +2 -4
  443. package/lib/components/VRadio/VRadio.mjs.map +1 -1
  444. package/lib/components/VRadio/index.d.ts +105 -0
  445. package/lib/components/VRadio/index.mjs.map +1 -1
  446. package/lib/components/VRadioGroup/VRadioGroup.css +2 -3
  447. package/lib/components/VRadioGroup/VRadioGroup.mjs +17 -21
  448. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  449. package/lib/components/VRadioGroup/VRadioGroup.sass +2 -2
  450. package/lib/components/VRadioGroup/_variables.scss +0 -1
  451. package/lib/components/VRadioGroup/index.d.ts +174 -0
  452. package/lib/components/VRadioGroup/index.mjs.map +1 -1
  453. package/lib/components/VRangeSlider/VRangeSlider.mjs +24 -27
  454. package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
  455. package/lib/components/VRangeSlider/index.d.ts +244 -0
  456. package/lib/components/VRangeSlider/index.mjs.map +1 -1
  457. package/lib/components/VRating/VRating.mjs +4 -22
  458. package/lib/components/VRating/VRating.mjs.map +1 -1
  459. package/lib/components/VRating/index.d.ts +348 -0
  460. package/lib/components/VRating/index.mjs.map +1 -1
  461. package/lib/components/VResponsive/VResponsive.mjs +2 -5
  462. package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
  463. package/lib/components/VResponsive/index.d.ts +24 -0
  464. package/lib/components/VResponsive/index.mjs.map +1 -1
  465. package/lib/components/VSelect/VSelect.css +13 -0
  466. package/lib/components/VSelect/VSelect.mjs +10 -23
  467. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  468. package/lib/components/VSelect/VSelect.sass +6 -0
  469. package/lib/components/VSelect/_variables.scss +1 -0
  470. package/lib/components/VSelect/index.d.ts +5009 -0
  471. package/lib/components/VSelect/index.mjs.map +1 -1
  472. package/lib/components/VSelectionControl/VSelectionControl.mjs +16 -59
  473. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  474. package/lib/components/VSelectionControl/index.d.ts +259 -0
  475. package/lib/components/VSelectionControl/index.mjs.map +1 -1
  476. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +6 -0
  477. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +59 -29
  478. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
  479. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.sass +6 -0
  480. package/lib/components/VSelectionControlGroup/index.d.ts +96 -0
  481. package/lib/components/VSelectionControlGroup/index.mjs.map +1 -1
  482. package/lib/components/VSheet/VSheet.mjs +2 -4
  483. package/lib/components/VSheet/VSheet.mjs.map +1 -1
  484. package/lib/components/VSheet/index.d.ts +69 -0
  485. package/lib/components/VSheet/index.mjs.map +1 -1
  486. package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs +19 -32
  487. package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
  488. package/lib/components/VSkeletonLoader/index.mjs.map +1 -1
  489. package/lib/components/VSlideGroup/VSlideGroup.mjs +16 -47
  490. package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
  491. package/lib/components/VSlideGroup/VSlideGroupItem.mjs +5 -9
  492. package/lib/components/VSlideGroup/VSlideGroupItem.mjs.map +1 -1
  493. package/lib/components/VSlideGroup/helpers.mjs +0 -2
  494. package/lib/components/VSlideGroup/helpers.mjs.map +1 -1
  495. package/lib/components/VSlideGroup/index.d.ts +434 -0
  496. package/lib/components/VSlideGroup/index.mjs.map +1 -1
  497. package/lib/components/VSlider/VSlider.css +7 -2
  498. package/lib/components/VSlider/VSlider.mjs +19 -12
  499. package/lib/components/VSlider/VSlider.mjs.map +1 -1
  500. package/lib/components/VSlider/VSlider.sass +6 -2
  501. package/lib/components/VSlider/VSliderThumb.mjs +4 -15
  502. package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
  503. package/lib/components/VSlider/VSliderTrack.css +20 -20
  504. package/lib/components/VSlider/VSliderTrack.mjs +13 -11
  505. package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
  506. package/lib/components/VSlider/VSliderTrack.sass +14 -14
  507. package/lib/components/VSlider/_variables.scss +2 -2
  508. package/lib/components/VSlider/index.d.ts +241 -0
  509. package/lib/components/VSlider/index.mjs.map +1 -1
  510. package/lib/components/VSlider/slider.mjs +8 -29
  511. package/lib/components/VSlider/slider.mjs.map +1 -1
  512. package/lib/components/VSnackbar/VSnackbar.mjs +5 -11
  513. package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
  514. package/lib/components/VSnackbar/index.d.ts +1916 -0
  515. package/lib/components/VSnackbar/index.mjs.map +1 -1
  516. package/lib/components/VSparkline/VSparkline.mjs +5 -40
  517. package/lib/components/VSparkline/VSparkline.mjs.map +1 -1
  518. package/lib/components/VSparkline/helpers/core.mjs +1 -1
  519. package/lib/components/VSparkline/helpers/core.mjs.map +1 -1
  520. package/lib/components/VSparkline/helpers/math.mjs +2 -3
  521. package/lib/components/VSparkline/helpers/math.mjs.map +1 -1
  522. package/lib/components/VSparkline/helpers/path.mjs +0 -4
  523. package/lib/components/VSparkline/helpers/path.mjs.map +1 -1
  524. package/lib/components/VSparkline/index.mjs.map +1 -1
  525. package/lib/components/VSpeedDial/VSpeedDial.mjs +3 -12
  526. package/lib/components/VSpeedDial/VSpeedDial.mjs.map +1 -1
  527. package/lib/components/VSpeedDial/index.mjs.map +1 -1
  528. package/lib/components/VStepper/VStepper.mjs +5 -24
  529. package/lib/components/VStepper/VStepper.mjs.map +1 -1
  530. package/lib/components/VStepper/VStepperContent.mjs +4 -25
  531. package/lib/components/VStepper/VStepperContent.mjs.map +1 -1
  532. package/lib/components/VStepper/VStepperStep.mjs +0 -24
  533. package/lib/components/VStepper/VStepperStep.mjs.map +1 -1
  534. package/lib/components/VStepper/index.mjs.map +1 -1
  535. package/lib/components/VSwitch/VSwitch.mjs +14 -15
  536. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  537. package/lib/components/VSwitch/index.d.ts +179 -0
  538. package/lib/components/VSwitch/index.mjs.map +1 -1
  539. package/lib/components/VSystemBar/VSystemBar.mjs +2 -4
  540. package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
  541. package/lib/components/VSystemBar/index.d.ts +62 -0
  542. package/lib/components/VSystemBar/index.mjs.map +1 -1
  543. package/lib/components/VTable/VTable.css +3 -3
  544. package/lib/components/VTable/VTable.mjs +5 -6
  545. package/lib/components/VTable/VTable.mjs.map +1 -1
  546. package/lib/components/VTable/VTable.sass +9 -3
  547. package/lib/components/VTable/index.d.ts +44 -0
  548. package/lib/components/VTable/index.mjs.map +1 -1
  549. package/lib/components/VTabs/VTab.mjs +3 -10
  550. package/lib/components/VTabs/VTab.mjs.map +1 -1
  551. package/lib/components/VTabs/VTabs.css +5 -5
  552. package/lib/components/VTabs/VTabs.mjs +12 -17
  553. package/lib/components/VTabs/VTabs.mjs.map +1 -1
  554. package/lib/components/VTabs/VTabs.sass +4 -4
  555. package/lib/components/VTabs/_variables.scss +1 -1
  556. package/lib/components/VTabs/index.d.ts +186 -0
  557. package/lib/components/VTabs/index.mjs.map +1 -1
  558. package/lib/components/VTabs/shared.mjs.map +1 -1
  559. package/lib/components/VTextField/VTextField.css +2 -3
  560. package/lib/components/VTextField/VTextField.mjs +13 -24
  561. package/lib/components/VTextField/VTextField.mjs.map +1 -1
  562. package/lib/components/VTextField/VTextField.sass +2 -4
  563. package/lib/components/VTextField/index.d.ts +1766 -0
  564. package/lib/components/VTextField/index.mjs.map +1 -1
  565. package/lib/components/VTextarea/VTextarea.css +5 -3
  566. package/lib/components/VTextarea/VTextarea.mjs +8 -25
  567. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  568. package/lib/components/VTextarea/VTextarea.sass +5 -4
  569. package/lib/components/VTextarea/index.d.ts +446 -0
  570. package/lib/components/VTextarea/index.mjs.map +1 -1
  571. package/lib/components/VThemeProvider/VThemeProvider.mjs +2 -5
  572. package/lib/components/VThemeProvider/VThemeProvider.mjs.map +1 -1
  573. package/lib/components/VThemeProvider/index.d.ts +25 -0
  574. package/lib/components/VThemeProvider/index.mjs.map +1 -1
  575. package/lib/components/VTimePicker/SelectingTimes.mjs +0 -3
  576. package/lib/components/VTimePicker/SelectingTimes.mjs.map +1 -1
  577. package/lib/components/VTimePicker/VTimePicker.mjs +3 -53
  578. package/lib/components/VTimePicker/VTimePicker.mjs.map +1 -1
  579. package/lib/components/VTimePicker/VTimePickerClock.mjs +6 -42
  580. package/lib/components/VTimePicker/VTimePickerClock.mjs.map +1 -1
  581. package/lib/components/VTimePicker/VTimePickerTitle.mjs +4 -13
  582. package/lib/components/VTimePicker/VTimePickerTitle.mjs.map +1 -1
  583. package/lib/components/VTimePicker/index.mjs.map +1 -1
  584. package/lib/components/VTimeline/VTimeline.css +21 -6
  585. package/lib/components/VTimeline/VTimeline.mjs +8 -10
  586. package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
  587. package/lib/components/VTimeline/VTimeline.sass +16 -2
  588. package/lib/components/VTimeline/VTimelineDivider.mjs +0 -5
  589. package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
  590. package/lib/components/VTimeline/VTimelineItem.mjs +0 -6
  591. package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
  592. package/lib/components/VTimeline/_variables.scss +4 -3
  593. package/lib/components/VTimeline/index.d.ts +158 -0
  594. package/lib/components/VTimeline/index.mjs.map +1 -1
  595. package/lib/components/VToolbar/VToolbar.css +0 -1
  596. package/lib/components/VToolbar/VToolbar.mjs +2 -8
  597. package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
  598. package/lib/components/VToolbar/VToolbar.sass +0 -1
  599. package/lib/components/VToolbar/VToolbarItems.mjs +0 -4
  600. package/lib/components/VToolbar/VToolbarItems.mjs.map +1 -1
  601. package/lib/components/VToolbar/VToolbarTitle.mjs +0 -5
  602. package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -1
  603. package/lib/components/VToolbar/index.d.ts +377 -0
  604. package/lib/components/VToolbar/index.mjs.map +1 -1
  605. package/lib/components/VTooltip/VTooltip.mjs +2 -8
  606. package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
  607. package/lib/components/VTooltip/index.d.ts +1819 -0
  608. package/lib/components/VTooltip/index.mjs.map +1 -1
  609. package/lib/components/VTreeview/VTreeview.mjs +17 -72
  610. package/lib/components/VTreeview/VTreeview.mjs.map +1 -1
  611. package/lib/components/VTreeview/VTreeviewNode.mjs +2 -32
  612. package/lib/components/VTreeview/VTreeviewNode.mjs.map +1 -1
  613. package/lib/components/VTreeview/index.mjs.map +1 -1
  614. package/lib/components/VTreeview/util/filterTreeItems.mjs +0 -6
  615. package/lib/components/VTreeview/util/filterTreeItems.mjs.map +1 -1
  616. package/lib/components/VValidation/VValidation.mjs +2 -5
  617. package/lib/components/VValidation/VValidation.mjs.map +1 -1
  618. package/lib/components/VValidation/index.d.ts +62 -0
  619. package/lib/components/VValidation/index.mjs.map +1 -1
  620. package/lib/components/VVirtualScroll/VVirtualScroll.mjs +3 -18
  621. package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
  622. package/lib/components/VVirtualScroll/index.mjs.map +1 -1
  623. package/lib/components/VWindow/VWindow.mjs +5 -15
  624. package/lib/components/VWindow/VWindow.mjs.map +1 -1
  625. package/lib/components/VWindow/VWindowItem.mjs +8 -21
  626. package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
  627. package/lib/components/VWindow/index.d.ts +378 -0
  628. package/lib/components/VWindow/index.mjs.map +1 -1
  629. package/lib/components/index.d.ts +18944 -7631
  630. package/lib/components/index.mjs +0 -11
  631. package/lib/components/index.mjs.map +1 -1
  632. package/lib/components/transitions/createTransition.mjs +0 -10
  633. package/lib/components/transitions/createTransition.mjs.map +1 -1
  634. package/lib/components/transitions/dialog-transition.mjs +3 -18
  635. package/lib/components/transitions/dialog-transition.mjs.map +1 -1
  636. package/lib/components/transitions/expand-transition.mjs +2 -11
  637. package/lib/components/transitions/expand-transition.mjs.map +1 -1
  638. package/lib/components/transitions/index.d.ts +470 -0
  639. package/lib/components/transitions/index.mjs +5 -4
  640. package/lib/components/transitions/index.mjs.map +1 -1
  641. package/lib/composables/border.mjs +0 -3
  642. package/lib/composables/border.mjs.map +1 -1
  643. package/lib/composables/color.mjs +0 -4
  644. package/lib/composables/color.mjs.map +1 -1
  645. package/lib/composables/defaults.mjs +0 -5
  646. package/lib/composables/defaults.mjs.map +1 -1
  647. package/lib/composables/delay.mjs +0 -3
  648. package/lib/composables/delay.mjs.map +1 -1
  649. package/lib/composables/density.mjs +4 -1
  650. package/lib/composables/density.mjs.map +1 -1
  651. package/lib/composables/dimensions.mjs +0 -1
  652. package/lib/composables/dimensions.mjs.map +1 -1
  653. package/lib/composables/display.mjs +8 -21
  654. package/lib/composables/display.mjs.map +1 -1
  655. package/lib/composables/elevation.mjs +2 -4
  656. package/lib/composables/elevation.mjs.map +1 -1
  657. package/lib/composables/filter.mjs +7 -14
  658. package/lib/composables/filter.mjs.map +1 -1
  659. package/lib/composables/focus.mjs +0 -5
  660. package/lib/composables/focus.mjs.map +1 -1
  661. package/lib/composables/form.mjs +1 -14
  662. package/lib/composables/form.mjs.map +1 -1
  663. package/lib/composables/forwardRefs.mjs +9 -16
  664. package/lib/composables/forwardRefs.mjs.map +1 -1
  665. package/lib/composables/group.mjs +10 -33
  666. package/lib/composables/group.mjs.map +1 -1
  667. package/lib/composables/hydration.mjs +0 -1
  668. package/lib/composables/hydration.mjs.map +1 -1
  669. package/lib/composables/icons.mjs +4 -17
  670. package/lib/composables/icons.mjs.map +1 -1
  671. package/lib/composables/index.mjs +1 -2
  672. package/lib/composables/index.mjs.map +1 -1
  673. package/lib/composables/intersectionObserver.mjs +0 -3
  674. package/lib/composables/intersectionObserver.mjs.map +1 -1
  675. package/lib/composables/items.mjs +3 -15
  676. package/lib/composables/items.mjs.map +1 -1
  677. package/lib/composables/layout.mjs +29 -31
  678. package/lib/composables/layout.mjs.map +1 -1
  679. package/lib/composables/lazy.mjs +2 -3
  680. package/lib/composables/lazy.mjs.map +1 -1
  681. package/lib/composables/loader.mjs +0 -3
  682. package/lib/composables/loader.mjs.map +1 -1
  683. package/lib/composables/locale.mjs +48 -113
  684. package/lib/composables/locale.mjs.map +1 -1
  685. package/lib/composables/location.mjs +1 -8
  686. package/lib/composables/location.mjs.map +1 -1
  687. package/lib/composables/mutationObserver.mjs +3 -1
  688. package/lib/composables/mutationObserver.mjs.map +1 -1
  689. package/lib/composables/nested/nested.mjs +4 -20
  690. package/lib/composables/nested/nested.mjs.map +1 -1
  691. package/lib/composables/nested/openStrategies.mjs +0 -9
  692. package/lib/composables/nested/openStrategies.mjs.map +1 -1
  693. package/lib/composables/nested/selectStrategies.mjs +6 -21
  694. package/lib/composables/nested/selectStrategies.mjs.map +1 -1
  695. package/lib/composables/position.mjs +1 -4
  696. package/lib/composables/position.mjs.map +1 -1
  697. package/lib/composables/proxiedModel.mjs +28 -16
  698. package/lib/composables/proxiedModel.mjs.map +1 -1
  699. package/lib/composables/refs.mjs +0 -2
  700. package/lib/composables/refs.mjs.map +1 -1
  701. package/lib/composables/resizeObserver.mjs +0 -3
  702. package/lib/composables/resizeObserver.mjs.map +1 -1
  703. package/lib/composables/rounded.mjs +0 -3
  704. package/lib/composables/rounded.mjs.map +1 -1
  705. package/lib/composables/router.mjs +12 -12
  706. package/lib/composables/router.mjs.map +1 -1
  707. package/lib/composables/scopeId.mjs.map +1 -1
  708. package/lib/composables/scroll.mjs +3 -9
  709. package/lib/composables/scroll.mjs.map +1 -1
  710. package/lib/composables/selectLink.mjs +7 -6
  711. package/lib/composables/selectLink.mjs.map +1 -1
  712. package/lib/composables/size.mjs +0 -3
  713. package/lib/composables/size.mjs.map +1 -1
  714. package/lib/composables/ssrBoot.mjs +2 -1
  715. package/lib/composables/ssrBoot.mjs.map +1 -1
  716. package/lib/composables/stack.mjs +0 -6
  717. package/lib/composables/stack.mjs.map +1 -1
  718. package/lib/composables/tag.mjs +0 -1
  719. package/lib/composables/tag.mjs.map +1 -1
  720. package/lib/composables/teleport.mjs +0 -4
  721. package/lib/composables/teleport.mjs.map +1 -1
  722. package/lib/composables/theme.mjs +53 -69
  723. package/lib/composables/theme.mjs.map +1 -1
  724. package/lib/composables/toggleScope.mjs +0 -1
  725. package/lib/composables/toggleScope.mjs.map +1 -1
  726. package/lib/composables/touch.mjs +5 -28
  727. package/lib/composables/touch.mjs.map +1 -1
  728. package/lib/composables/transition.mjs +0 -2
  729. package/lib/composables/transition.mjs.map +1 -1
  730. package/lib/composables/validation.mjs +4 -14
  731. package/lib/composables/validation.mjs.map +1 -1
  732. package/lib/composables/variant.mjs +0 -2
  733. package/lib/composables/variant.mjs.map +1 -1
  734. package/lib/directives/click-outside/index.mjs +10 -22
  735. package/lib/directives/click-outside/index.mjs.map +1 -1
  736. package/lib/directives/color/index.mjs +0 -11
  737. package/lib/directives/color/index.mjs.map +1 -1
  738. package/lib/directives/index.d.ts +104 -13
  739. package/lib/directives/index.mjs +0 -1
  740. package/lib/directives/index.mjs.map +1 -1
  741. package/lib/directives/intersect/index.mjs +3 -10
  742. package/lib/directives/intersect/index.mjs.map +1 -1
  743. package/lib/directives/mutate/index.mjs +1 -5
  744. package/lib/directives/mutate/index.mjs.map +1 -1
  745. package/lib/directives/resize/index.mjs +0 -5
  746. package/lib/directives/resize/index.mjs.map +1 -1
  747. package/lib/directives/ripple/index.mjs +11 -63
  748. package/lib/directives/ripple/index.mjs.map +1 -1
  749. package/lib/directives/scroll/index.mjs +0 -4
  750. package/lib/directives/scroll/index.mjs.map +1 -1
  751. package/lib/directives/touch/index.mjs +0 -15
  752. package/lib/directives/touch/index.mjs.map +1 -1
  753. package/lib/entry-bundler.mjs +1 -1
  754. package/lib/entry-bundler.mjs.map +1 -1
  755. package/lib/framework.mjs +59 -62
  756. package/lib/framework.mjs.map +1 -1
  757. package/lib/iconsets/fa-svg.mjs +0 -1
  758. package/lib/iconsets/fa-svg.mjs.map +1 -1
  759. package/lib/iconsets/fa.mjs +0 -1
  760. package/lib/iconsets/fa.mjs.map +1 -1
  761. package/lib/iconsets/fa4.mjs +4 -3
  762. package/lib/iconsets/fa4.mjs.map +1 -1
  763. package/lib/iconsets/md.mjs +4 -3
  764. package/lib/iconsets/md.mjs.map +1 -1
  765. package/lib/iconsets/mdi-svg.mjs +0 -1
  766. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  767. package/lib/iconsets/mdi.mjs +4 -3
  768. package/lib/iconsets/mdi.mjs.map +1 -1
  769. package/lib/index.d.ts +115 -120
  770. package/lib/locale/adapters/vue-i18n.d.ts +29 -0
  771. package/lib/locale/adapters/vue-i18n.mjs +59 -52
  772. package/lib/locale/adapters/vue-i18n.mjs.map +1 -1
  773. package/lib/locale/adapters/vuetify.d.ts +24 -0
  774. package/lib/locale/adapters/vuetify.mjs +97 -0
  775. package/lib/locale/adapters/vuetify.mjs.map +1 -0
  776. package/lib/locale/af.mjs.map +1 -1
  777. package/lib/locale/ar.mjs.map +1 -1
  778. package/lib/locale/az.mjs.map +1 -1
  779. package/lib/locale/bg.mjs.map +1 -1
  780. package/lib/locale/ca.mjs.map +1 -1
  781. package/lib/locale/ckb.mjs.map +1 -1
  782. package/lib/locale/cs.mjs.map +1 -1
  783. package/lib/locale/da.mjs.map +1 -1
  784. package/lib/locale/de.mjs.map +1 -1
  785. package/lib/locale/el.mjs.map +1 -1
  786. package/lib/locale/en.mjs.map +1 -1
  787. package/lib/locale/es.mjs.map +1 -1
  788. package/lib/locale/et.mjs.map +1 -1
  789. package/lib/locale/fa.mjs.map +1 -1
  790. package/lib/locale/fi.mjs.map +1 -1
  791. package/lib/locale/fr.mjs.map +1 -1
  792. package/lib/locale/he.mjs.map +1 -1
  793. package/lib/locale/hr.mjs.map +1 -1
  794. package/lib/locale/hu.mjs.map +1 -1
  795. package/lib/locale/id.mjs.map +1 -1
  796. package/lib/locale/index.d.ts +2 -2
  797. package/lib/locale/index.mjs +1 -1
  798. package/lib/locale/index.mjs.map +1 -1
  799. package/lib/locale/it.mjs.map +1 -1
  800. package/lib/locale/ja.mjs.map +1 -1
  801. package/lib/locale/ko.mjs.map +1 -1
  802. package/lib/locale/lt.mjs.map +1 -1
  803. package/lib/locale/lv.mjs.map +1 -1
  804. package/lib/locale/nl.mjs.map +1 -1
  805. package/lib/locale/no.mjs.map +1 -1
  806. package/lib/locale/pl.mjs +7 -7
  807. package/lib/locale/pl.mjs.map +1 -1
  808. package/lib/locale/pt.mjs.map +1 -1
  809. package/lib/locale/ro.mjs.map +1 -1
  810. package/lib/locale/ru.mjs.map +1 -1
  811. package/lib/locale/sk.mjs.map +1 -1
  812. package/lib/locale/sl.mjs.map +1 -1
  813. package/lib/locale/sr-Cyrl.mjs.map +1 -1
  814. package/lib/locale/sr-Latn.mjs.map +1 -1
  815. package/lib/locale/sv.mjs.map +1 -1
  816. package/lib/locale/th.mjs.map +1 -1
  817. package/lib/locale/tr.mjs.map +1 -1
  818. package/lib/locale/uk.mjs.map +1 -1
  819. package/lib/locale/vi.mjs.map +1 -1
  820. package/lib/locale/zh-Hans.mjs.map +1 -1
  821. package/lib/locale/zh-Hant.mjs.map +1 -1
  822. package/lib/services/goto/easing-patterns.mjs +24 -24
  823. package/lib/services/goto/easing-patterns.mjs.map +1 -1
  824. package/lib/services/goto/index.mjs +11 -15
  825. package/lib/services/goto/index.mjs.map +1 -1
  826. package/lib/services/goto/util.mjs +1 -8
  827. package/lib/services/goto/util.mjs.map +1 -1
  828. package/lib/styles/main.css +77 -73
  829. package/lib/styles/settings/_colors.scss +84 -84
  830. package/lib/styles/settings/_utilities.scss +7 -0
  831. package/lib/styles/tools/_states.sass +8 -3
  832. package/lib/util/anchor.mjs +0 -3
  833. package/lib/util/anchor.mjs.map +1 -1
  834. package/lib/util/animation.mjs +0 -6
  835. package/lib/util/animation.mjs.map +1 -1
  836. package/lib/util/box.mjs +0 -5
  837. package/lib/util/box.mjs.map +1 -1
  838. package/lib/util/color/APCA.mjs +23 -21
  839. package/lib/util/color/APCA.mjs.map +1 -1
  840. package/lib/util/color/transformCIELAB.mjs +0 -2
  841. package/lib/util/color/transformCIELAB.mjs.map +1 -1
  842. package/lib/util/color/transformSRGB.mjs +14 -12
  843. package/lib/util/color/transformSRGB.mjs.map +1 -1
  844. package/lib/util/colorUtils.mjs +8 -25
  845. package/lib/util/colorUtils.mjs.map +1 -1
  846. package/lib/util/colors.mjs.map +1 -1
  847. package/lib/util/console.mjs +5 -14
  848. package/lib/util/console.mjs.map +1 -1
  849. package/lib/util/createSimpleFunctional.mjs +0 -3
  850. package/lib/util/createSimpleFunctional.mjs.map +1 -1
  851. package/lib/util/dateTimeUtils.mjs +0 -10
  852. package/lib/util/dateTimeUtils.mjs.map +1 -1
  853. package/lib/util/defineComponent.mjs +6 -22
  854. package/lib/util/defineComponent.mjs.map +1 -1
  855. package/lib/util/dom.mjs +4 -4
  856. package/lib/util/dom.mjs.map +1 -1
  857. package/lib/util/easing.mjs +0 -1
  858. package/lib/util/easing.mjs.map +1 -1
  859. package/lib/util/getCurrentInstance.mjs +3 -10
  860. package/lib/util/getCurrentInstance.mjs.map +1 -1
  861. package/lib/util/getScrollParent.mjs +0 -3
  862. package/lib/util/getScrollParent.mjs.map +1 -1
  863. package/lib/util/globals.mjs.map +1 -1
  864. package/lib/util/helpers.mjs +23 -85
  865. package/lib/util/helpers.mjs.map +1 -1
  866. package/lib/util/injectSelf.mjs +0 -1
  867. package/lib/util/injectSelf.mjs.map +1 -1
  868. package/lib/util/isFixedPosition.mjs +0 -2
  869. package/lib/util/isFixedPosition.mjs.map +1 -1
  870. package/lib/util/propsFactory.mjs +11 -5
  871. package/lib/util/propsFactory.mjs.map +1 -1
  872. package/lib/util/useRender.mjs +0 -1
  873. package/lib/util/useRender.mjs.map +1 -1
  874. package/package.json +9 -11
  875. package/dist/json/attributes.json +0 -5594
  876. package/dist/json/tags.json +0 -1943
  877. package/dist/json/web-types.json +0 -18992
  878. package/lib/composables/rtl.mjs +0 -42
  879. package/lib/composables/rtl.mjs.map +0 -1
  880. package/lib/locale/adapters/vue-intl.mjs +0 -65
  881. package/lib/locale/adapters/vue-intl.mjs.map +0 -1
@@ -1,6 +1,5 @@
1
1
  // Utilities
2
2
  import { IN_BROWSER, propsFactory } from "../util/index.mjs"; // Types
3
-
4
3
  // Composables
5
4
  export const makeDelayProps = propsFactory({
6
5
  closeDelay: [Number, String],
@@ -8,7 +7,6 @@ export const makeDelayProps = propsFactory({
8
7
  }, 'delay');
9
8
  export function useDelay(props, cb) {
10
9
  const delays = {};
11
-
12
10
  const runDelayFactory = prop => () => {
13
11
  // istanbul ignore next
14
12
  if (!IN_BROWSER) return Promise.resolve(true);
@@ -25,7 +23,6 @@ export function useDelay(props, cb) {
25
23
  }, delay);
26
24
  });
27
25
  };
28
-
29
26
  return {
30
27
  runCloseDelay: runDelayFactory('closeDelay'),
31
28
  runOpenDelay: runDelayFactory('openDelay')
@@ -1 +1 @@
1
- {"version":3,"file":"delay.mjs","names":["IN_BROWSER","propsFactory","makeDelayProps","closeDelay","Number","String","openDelay","useDelay","props","cb","delays","runDelayFactory","prop","Promise","resolve","active","window","clearTimeout","delay","parseInt","setTimeout","runCloseDelay","runOpenDelay"],"sources":["../../src/composables/delay.ts"],"sourcesContent":["// Utilities\nimport { IN_BROWSER, propsFactory } from '@/util'\n\n// Types\nexport interface DelayProps {\n closeDelay?: number | string\n openDelay?: number | string\n}\n\n// Composables\nexport const makeDelayProps = propsFactory({\n closeDelay: [Number, String],\n openDelay: [Number, String],\n}, 'delay')\n\nexport function useDelay (props: DelayProps, cb?: (value: boolean) => void) {\n const delays: Partial<Record<keyof DelayProps, number>> = {}\n const runDelayFactory = (prop: keyof DelayProps) => (): Promise<boolean> => {\n // istanbul ignore next\n if (!IN_BROWSER) return Promise.resolve(true)\n\n const active = prop === 'openDelay'\n\n delays.closeDelay && window.clearTimeout(delays.closeDelay)\n delete delays.closeDelay\n\n delays.openDelay && window.clearTimeout(delays.openDelay)\n delete delays.openDelay\n\n return new Promise(resolve => {\n const delay = parseInt(props[prop] ?? 0, 10)\n\n delays[prop] = window.setTimeout(() => {\n cb?.(active)\n resolve(active)\n }, delay)\n })\n }\n\n return {\n runCloseDelay: runDelayFactory('closeDelay'),\n runOpenDelay: runDelayFactory('openDelay'),\n }\n}\n"],"mappings":"AAAA;SACSA,U,EAAYC,Y,6BAErB;;AAMA;AACA,OAAO,MAAMC,cAAc,GAAGD,YAAY,CAAC;EACzCE,UAAU,EAAE,CAACC,MAAD,EAASC,MAAT,CAD6B;EAEzCC,SAAS,EAAE,CAACF,MAAD,EAASC,MAAT;AAF8B,CAAD,EAGvC,OAHuC,CAAnC;AAKP,OAAO,SAASE,QAAT,CAAmBC,KAAnB,EAAsCC,EAAtC,EAAqE;EAC1E,MAAMC,MAAiD,GAAG,EAA1D;;EACA,MAAMC,eAAe,GAAIC,IAAD,IAA4B,MAAwB;IAC1E;IACA,IAAI,CAACZ,UAAL,EAAiB,OAAOa,OAAO,CAACC,OAAR,CAAgB,IAAhB,CAAP;IAEjB,MAAMC,MAAM,GAAGH,IAAI,KAAK,WAAxB;IAEAF,MAAM,CAACP,UAAP,IAAqBa,MAAM,CAACC,YAAP,CAAoBP,MAAM,CAACP,UAA3B,CAArB;IACA,OAAOO,MAAM,CAACP,UAAd;IAEAO,MAAM,CAACJ,SAAP,IAAoBU,MAAM,CAACC,YAAP,CAAoBP,MAAM,CAACJ,SAA3B,CAApB;IACA,OAAOI,MAAM,CAACJ,SAAd;IAEA,OAAO,IAAIO,OAAJ,CAAYC,OAAO,IAAI;MAC5B,MAAMI,KAAK,GAAGC,QAAQ,CAACX,KAAK,CAACI,IAAD,CAAL,IAAe,CAAhB,EAAmB,EAAnB,CAAtB;MAEAF,MAAM,CAACE,IAAD,CAAN,GAAeI,MAAM,CAACI,UAAP,CAAkB,MAAM;QACrCX,EAAE,QAAF,YAAAA,EAAE,CAAGM,MAAH,CAAF;QACAD,OAAO,CAACC,MAAD,CAAP;MACD,CAHc,EAGZG,KAHY,CAAf;IAID,CAPM,CAAP;EAQD,CApBD;;EAsBA,OAAO;IACLG,aAAa,EAAEV,eAAe,CAAC,YAAD,CADzB;IAELW,YAAY,EAAEX,eAAe,CAAC,WAAD;EAFxB,CAAP;AAID"}
1
+ {"version":3,"file":"delay.mjs","names":["IN_BROWSER","propsFactory","makeDelayProps","closeDelay","Number","String","openDelay","useDelay","props","cb","delays","runDelayFactory","prop","Promise","resolve","active","window","clearTimeout","delay","parseInt","setTimeout","runCloseDelay","runOpenDelay"],"sources":["../../src/composables/delay.ts"],"sourcesContent":["// Utilities\nimport { IN_BROWSER, propsFactory } from '@/util'\n\n// Types\nexport interface DelayProps {\n closeDelay?: number | string\n openDelay?: number | string\n}\n\n// Composables\nexport const makeDelayProps = propsFactory({\n closeDelay: [Number, String],\n openDelay: [Number, String],\n}, 'delay')\n\nexport function useDelay (props: DelayProps, cb?: (value: boolean) => void) {\n const delays: Partial<Record<keyof DelayProps, number>> = {}\n const runDelayFactory = (prop: keyof DelayProps) => (): Promise<boolean> => {\n // istanbul ignore next\n if (!IN_BROWSER) return Promise.resolve(true)\n\n const active = prop === 'openDelay'\n\n delays.closeDelay && window.clearTimeout(delays.closeDelay)\n delete delays.closeDelay\n\n delays.openDelay && window.clearTimeout(delays.openDelay)\n delete delays.openDelay\n\n return new Promise(resolve => {\n const delay = parseInt(props[prop] ?? 0, 10)\n\n delays[prop] = window.setTimeout(() => {\n cb?.(active)\n resolve(active)\n }, delay)\n })\n }\n\n return {\n runCloseDelay: runDelayFactory('closeDelay'),\n runOpenDelay: runDelayFactory('openDelay'),\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,UAAU,EAAEC,YAAY,6BAEjC;AAMA;AACA,OAAO,MAAMC,cAAc,GAAGD,YAAY,CAAC;EACzCE,UAAU,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;EAC5BC,SAAS,EAAE,CAACF,MAAM,EAAEC,MAAM;AAC5B,CAAC,EAAE,OAAO,CAAC;AAEX,OAAO,SAASE,QAAQ,CAAEC,KAAiB,EAAEC,EAA6B,EAAE;EAC1E,MAAMC,MAAiD,GAAG,CAAC,CAAC;EAC5D,MAAMC,eAAe,GAAIC,IAAsB,IAAK,MAAwB;IAC1E;IACA,IAAI,CAACZ,UAAU,EAAE,OAAOa,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;IAE7C,MAAMC,MAAM,GAAGH,IAAI,KAAK,WAAW;IAEnCF,MAAM,CAACP,UAAU,IAAIa,MAAM,CAACC,YAAY,CAACP,MAAM,CAACP,UAAU,CAAC;IAC3D,OAAOO,MAAM,CAACP,UAAU;IAExBO,MAAM,CAACJ,SAAS,IAAIU,MAAM,CAACC,YAAY,CAACP,MAAM,CAACJ,SAAS,CAAC;IACzD,OAAOI,MAAM,CAACJ,SAAS;IAEvB,OAAO,IAAIO,OAAO,CAACC,OAAO,IAAI;MAC5B,MAAMI,KAAK,GAAGC,QAAQ,CAACX,KAAK,CAACI,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;MAE5CF,MAAM,CAACE,IAAI,CAAC,GAAGI,MAAM,CAACI,UAAU,CAAC,MAAM;QACrCX,EAAE,oBAAFA,EAAE,CAAGM,MAAM,CAAC;QACZD,OAAO,CAACC,MAAM,CAAC;MACjB,CAAC,EAAEG,KAAK,CAAC;IACX,CAAC,CAAC;EACJ,CAAC;EAED,OAAO;IACLG,aAAa,EAAEV,eAAe,CAAC,YAAY,CAAC;IAC5CW,YAAY,EAAEX,eAAe,CAAC,WAAW;EAC3C,CAAC;AACH"}
@@ -1,8 +1,11 @@
1
1
  // Utilities
2
2
  import { computed } from 'vue';
3
3
  import { getCurrentInstanceName, propsFactory } from "../util/index.mjs"; // Types
4
-
5
4
  const allowedDensities = [null, 'default', 'comfortable', 'compact'];
5
+
6
+ // typeof allowedDensities[number] evalutes to any
7
+ // when generating api types for whatever reason.
8
+
6
9
  // Composables
7
10
  export const makeDensityProps = propsFactory({
8
11
  density: {
@@ -1 +1 @@
1
- {"version":3,"file":"density.mjs","names":["computed","getCurrentInstanceName","propsFactory","allowedDensities","makeDensityProps","density","type","String","default","validator","v","includes","useDensity","props","name","densityClasses"],"sources":["../../src/composables/density.ts"],"sourcesContent":["// Utilities\nimport { computed } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nconst allowedDensities = [null, 'default', 'comfortable', 'compact'] as const\n\nexport type Density = typeof allowedDensities[number]\n\nexport interface DensityProps {\n density?: Density\n}\n\n// Composables\nexport const makeDensityProps = propsFactory({\n density: {\n type: String as PropType<Density>,\n default: 'default',\n validator: (v: any) => allowedDensities.includes(v),\n },\n}, 'density')\n\nexport function useDensity (\n props: DensityProps,\n name = getCurrentInstanceName(),\n) {\n const densityClasses = computed(() => {\n return `${name}--density-${props.density}`\n })\n\n return { densityClasses }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAT,QAAyB,KAAzB;SACSC,sB,EAAwBC,Y,6BAEjC;;AAGA,MAAMC,gBAAgB,GAAG,CAAC,IAAD,EAAO,SAAP,EAAkB,aAAlB,EAAiC,SAAjC,CAAzB;AAQA;AACA,OAAO,MAAMC,gBAAgB,GAAGF,YAAY,CAAC;EAC3CG,OAAO,EAAE;IACPC,IAAI,EAAEC,MADC;IAEPC,OAAO,EAAE,SAFF;IAGPC,SAAS,EAAGC,CAAD,IAAYP,gBAAgB,CAACQ,QAAjB,CAA0BD,CAA1B;EAHhB;AADkC,CAAD,EAMzC,SANyC,CAArC;AAQP,OAAO,SAASE,UAAT,CACLC,KADK,EAGL;EAAA,IADAC,IACA,uEADOb,sBAAsB,EAC7B;EACA,MAAMc,cAAc,GAAGf,QAAQ,CAAC,MAAM;IACpC,OAAQ,GAAEc,IAAK,aAAYD,KAAK,CAACR,OAAQ,EAAzC;EACD,CAF8B,CAA/B;EAIA,OAAO;IAAEU;EAAF,CAAP;AACD"}
1
+ {"version":3,"file":"density.mjs","names":["computed","getCurrentInstanceName","propsFactory","allowedDensities","makeDensityProps","density","type","String","default","validator","v","includes","useDensity","props","name","densityClasses"],"sources":["../../src/composables/density.ts"],"sourcesContent":["// Utilities\nimport { computed } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nconst allowedDensities = [null, 'default', 'comfortable', 'compact'] as const\n\n// typeof allowedDensities[number] evalutes to any\n// when generating api types for whatever reason.\nexport type Density = null | 'default' | 'comfortable' | 'compact'\n\nexport interface DensityProps {\n density?: Density\n}\n\n// Composables\nexport const makeDensityProps = propsFactory({\n density: {\n type: String as PropType<Density>,\n default: 'default',\n validator: (v: any) => allowedDensities.includes(v),\n },\n}, 'density')\n\nexport function useDensity (\n props: DensityProps,\n name = getCurrentInstanceName(),\n) {\n const densityClasses = computed(() => {\n return `${name}--density-${props.density}`\n })\n\n return { densityClasses }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,QAAQ,KAAK;AAAA,SACrBC,sBAAsB,EAAEC,YAAY,6BAE7C;AAGA,MAAMC,gBAAgB,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,CAAU;;AAE7E;AACA;;AAOA;AACA,OAAO,MAAMC,gBAAgB,GAAGF,YAAY,CAAC;EAC3CG,OAAO,EAAE;IACPC,IAAI,EAAEC,MAA2B;IACjCC,OAAO,EAAE,SAAS;IAClBC,SAAS,EAAGC,CAAM,IAAKP,gBAAgB,CAACQ,QAAQ,CAACD,CAAC;EACpD;AACF,CAAC,EAAE,SAAS,CAAC;AAEb,OAAO,SAASE,UAAU,CACxBC,KAAmB,EAEnB;EAAA,IADAC,IAAI,uEAAGb,sBAAsB,EAAE;EAE/B,MAAMc,cAAc,GAAGf,QAAQ,CAAC,MAAM;IACpC,OAAQ,GAAEc,IAAK,aAAYD,KAAK,CAACR,OAAQ,EAAC;EAC5C,CAAC,CAAC;EAEF,OAAO;IAAEU;EAAe,CAAC;AAC3B"}
@@ -1,7 +1,6 @@
1
1
  // Utilities
2
2
  import { computed } from 'vue';
3
3
  import { convertToUnit, propsFactory } from "../util/index.mjs"; // Types
4
-
5
4
  // Composables
6
5
  export const makeDimensionProps = propsFactory({
7
6
  height: [Number, String],
@@ -1 +1 @@
1
- {"version":3,"file":"dimensions.mjs","names":["computed","convertToUnit","propsFactory","makeDimensionProps","height","Number","String","maxHeight","maxWidth","minHeight","minWidth","width","useDimension","props","dimensionStyles"],"sources":["../../src/composables/dimensions.ts"],"sourcesContent":["// Utilities\nimport { computed } from 'vue'\nimport { convertToUnit, propsFactory } from '@/util'\n\n// Types\nexport interface DimensionProps {\n height?: number | string\n maxHeight?: number | string\n maxWidth?: number | string\n minHeight?: number | string\n minWidth?: number | string\n width?: number | string\n}\n\n// Composables\nexport const makeDimensionProps = propsFactory({\n height: [Number, String],\n maxHeight: [Number, String],\n maxWidth: [Number, String],\n minHeight: [Number, String],\n minWidth: [Number, String],\n width: [Number, String],\n}, 'dimension')\n\nexport function useDimension (props: DimensionProps) {\n const dimensionStyles = computed(() => ({\n height: convertToUnit(props.height),\n maxHeight: convertToUnit(props.maxHeight),\n maxWidth: convertToUnit(props.maxWidth),\n minHeight: convertToUnit(props.minHeight),\n minWidth: convertToUnit(props.minWidth),\n width: convertToUnit(props.width),\n }))\n\n return { dimensionStyles }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAT,QAAyB,KAAzB;SACSC,a,EAAeC,Y,6BAExB;;AAUA;AACA,OAAO,MAAMC,kBAAkB,GAAGD,YAAY,CAAC;EAC7CE,MAAM,EAAE,CAACC,MAAD,EAASC,MAAT,CADqC;EAE7CC,SAAS,EAAE,CAACF,MAAD,EAASC,MAAT,CAFkC;EAG7CE,QAAQ,EAAE,CAACH,MAAD,EAASC,MAAT,CAHmC;EAI7CG,SAAS,EAAE,CAACJ,MAAD,EAASC,MAAT,CAJkC;EAK7CI,QAAQ,EAAE,CAACL,MAAD,EAASC,MAAT,CALmC;EAM7CK,KAAK,EAAE,CAACN,MAAD,EAASC,MAAT;AANsC,CAAD,EAO3C,WAP2C,CAAvC;AASP,OAAO,SAASM,YAAT,CAAuBC,KAAvB,EAA8C;EACnD,MAAMC,eAAe,GAAGd,QAAQ,CAAC,OAAO;IACtCI,MAAM,EAAEH,aAAa,CAACY,KAAK,CAACT,MAAP,CADiB;IAEtCG,SAAS,EAAEN,aAAa,CAACY,KAAK,CAACN,SAAP,CAFc;IAGtCC,QAAQ,EAAEP,aAAa,CAACY,KAAK,CAACL,QAAP,CAHe;IAItCC,SAAS,EAAER,aAAa,CAACY,KAAK,CAACJ,SAAP,CAJc;IAKtCC,QAAQ,EAAET,aAAa,CAACY,KAAK,CAACH,QAAP,CALe;IAMtCC,KAAK,EAAEV,aAAa,CAACY,KAAK,CAACF,KAAP;EANkB,CAAP,CAAD,CAAhC;EASA,OAAO;IAAEG;EAAF,CAAP;AACD"}
1
+ {"version":3,"file":"dimensions.mjs","names":["computed","convertToUnit","propsFactory","makeDimensionProps","height","Number","String","maxHeight","maxWidth","minHeight","minWidth","width","useDimension","props","dimensionStyles"],"sources":["../../src/composables/dimensions.ts"],"sourcesContent":["// Utilities\nimport { computed } from 'vue'\nimport { convertToUnit, propsFactory } from '@/util'\n\n// Types\nexport interface DimensionProps {\n height?: number | string\n maxHeight?: number | string\n maxWidth?: number | string\n minHeight?: number | string\n minWidth?: number | string\n width?: number | string\n}\n\n// Composables\nexport const makeDimensionProps = propsFactory({\n height: [Number, String],\n maxHeight: [Number, String],\n maxWidth: [Number, String],\n minHeight: [Number, String],\n minWidth: [Number, String],\n width: [Number, String],\n}, 'dimension')\n\nexport function useDimension (props: DimensionProps) {\n const dimensionStyles = computed(() => ({\n height: convertToUnit(props.height),\n maxHeight: convertToUnit(props.maxHeight),\n maxWidth: convertToUnit(props.maxWidth),\n minHeight: convertToUnit(props.minHeight),\n minWidth: convertToUnit(props.minWidth),\n width: convertToUnit(props.width),\n }))\n\n return { dimensionStyles }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,QAAQ,KAAK;AAAA,SACrBC,aAAa,EAAEC,YAAY,6BAEpC;AAUA;AACA,OAAO,MAAMC,kBAAkB,GAAGD,YAAY,CAAC;EAC7CE,MAAM,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;EACxBC,SAAS,EAAE,CAACF,MAAM,EAAEC,MAAM,CAAC;EAC3BE,QAAQ,EAAE,CAACH,MAAM,EAAEC,MAAM,CAAC;EAC1BG,SAAS,EAAE,CAACJ,MAAM,EAAEC,MAAM,CAAC;EAC3BI,QAAQ,EAAE,CAACL,MAAM,EAAEC,MAAM,CAAC;EAC1BK,KAAK,EAAE,CAACN,MAAM,EAAEC,MAAM;AACxB,CAAC,EAAE,WAAW,CAAC;AAEf,OAAO,SAASM,YAAY,CAAEC,KAAqB,EAAE;EACnD,MAAMC,eAAe,GAAGd,QAAQ,CAAC,OAAO;IACtCI,MAAM,EAAEH,aAAa,CAACY,KAAK,CAACT,MAAM,CAAC;IACnCG,SAAS,EAAEN,aAAa,CAACY,KAAK,CAACN,SAAS,CAAC;IACzCC,QAAQ,EAAEP,aAAa,CAACY,KAAK,CAACL,QAAQ,CAAC;IACvCC,SAAS,EAAER,aAAa,CAACY,KAAK,CAACJ,SAAS,CAAC;IACzCC,QAAQ,EAAET,aAAa,CAACY,KAAK,CAACH,QAAQ,CAAC;IACvCC,KAAK,EAAEV,aAAa,CAACY,KAAK,CAACF,KAAK;EAClC,CAAC,CAAC,CAAC;EAEH,OAAO;IAAEG;EAAgB,CAAC;AAC5B"}
@@ -1,9 +1,7 @@
1
1
  // Utilities
2
- import { inject, nextTick, reactive, ref, toRefs, watchEffect } from 'vue';
2
+ import { inject, reactive, ref, toRefs, watchEffect } from 'vue';
3
3
  import { mergeDeep } from "../util/index.mjs"; // Globals
4
-
5
4
  import { IN_BROWSER, SUPPORTS_TOUCH } from "../util/globals.mjs"; // Types
6
-
7
5
  export const DisplaySymbol = Symbol.for('vuetify:display');
8
6
  const defaultDisplayOptions = {
9
7
  mobileBreakpoint: 'lg',
@@ -16,27 +14,21 @@ const defaultDisplayOptions = {
16
14
  xxl: 2560
17
15
  }
18
16
  };
19
-
20
17
  const parseDisplayOptions = function () {
21
18
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultDisplayOptions;
22
19
  return mergeDeep(defaultDisplayOptions, options);
23
20
  };
24
-
25
21
  function getClientWidth(isHydrate) {
26
22
  return IN_BROWSER && !isHydrate ? window.innerWidth : 0;
27
23
  }
28
-
29
24
  function getClientHeight(isHydrate) {
30
25
  return IN_BROWSER && !isHydrate ? window.innerHeight : 0;
31
26
  }
32
-
33
27
  function getPlatform() {
34
28
  const userAgent = IN_BROWSER ? window.navigator.userAgent : 'ssr';
35
-
36
29
  function match(regexp) {
37
30
  return Boolean(userAgent.match(regexp));
38
31
  }
39
-
40
32
  const android = match(/android/i);
41
33
  const ios = match(/iphone|ipad|ipod/i);
42
34
  const cordova = match(/cordova/i);
@@ -65,7 +57,6 @@ function getPlatform() {
65
57
  ssr
66
58
  };
67
59
  }
68
-
69
60
  export function createDisplay(options, isHydrate) {
70
61
  const {
71
62
  thresholds,
@@ -75,17 +66,12 @@ export function createDisplay(options, isHydrate) {
75
66
  const platform = getPlatform();
76
67
  const state = reactive({});
77
68
  const width = ref(getClientWidth(isHydrate));
78
-
79
- function onResize() {
69
+ function update() {
80
70
  height.value = getClientHeight();
81
71
  width.value = getClientWidth();
82
72
  }
83
73
 
84
- if (isHydrate) {
85
- nextTick(() => onResize());
86
- } // eslint-disable-next-line max-statements
87
-
88
-
74
+ // eslint-disable-next-line max-statements
89
75
  watchEffect(() => {
90
76
  const xs = width.value < thresholds.sm;
91
77
  const sm = width.value < thresholds.md && !xs;
@@ -118,14 +104,15 @@ export function createDisplay(options, isHydrate) {
118
104
  state.platform = platform;
119
105
  state.thresholds = thresholds;
120
106
  });
121
-
122
107
  if (IN_BROWSER) {
123
- window.addEventListener('resize', onResize, {
108
+ window.addEventListener('resize', update, {
124
109
  passive: true
125
110
  });
126
111
  }
127
-
128
- return toRefs(state);
112
+ return {
113
+ ...toRefs(state),
114
+ update
115
+ };
129
116
  }
130
117
  export function useDisplay() {
131
118
  const display = inject(DisplaySymbol);
@@ -1 +1 @@
1
- {"version":3,"file":"display.mjs","names":["inject","nextTick","reactive","ref","toRefs","watchEffect","mergeDeep","IN_BROWSER","SUPPORTS_TOUCH","DisplaySymbol","Symbol","for","defaultDisplayOptions","mobileBreakpoint","thresholds","xs","sm","md","lg","xl","xxl","parseDisplayOptions","options","getClientWidth","isHydrate","window","innerWidth","getClientHeight","innerHeight","getPlatform","userAgent","navigator","match","regexp","Boolean","android","ios","cordova","electron","chrome","edge","firefox","opera","win","mac","linux","ssr","touch","createDisplay","height","platform","state","width","onResize","value","name","breakpointValue","mobile","smAndUp","mdAndUp","lgAndUp","xlAndUp","smAndDown","mdAndDown","lgAndDown","xlAndDown","addEventListener","passive","useDisplay","display","Error"],"sources":["../../src/composables/display.ts"],"sourcesContent":["// Utilities\nimport { inject, nextTick, reactive, ref, toRefs, watchEffect } from 'vue'\nimport { mergeDeep } from '@/util'\n\n// Globals\nimport { IN_BROWSER, SUPPORTS_TOUCH } from '@/util/globals'\n\n// Types\nimport type { InjectionKey, ToRefs } from 'vue'\n\nexport type DisplayBreakpoint = keyof DisplayThresholds\n\nexport interface DisplayThresholds {\n xs: number\n sm: number\n md: number\n lg: number\n xl: number\n xxl: number\n}\n\nexport interface DisplayOptions {\n mobileBreakpoint?: number | DisplayBreakpoint\n thresholds?: Partial<DisplayThresholds>\n}\n\nexport interface InternalDisplayOptions {\n mobileBreakpoint: number | DisplayBreakpoint\n thresholds: DisplayThresholds\n}\n\nexport interface DisplayPlatform {\n android: boolean\n ios: boolean\n cordova: boolean\n electron: boolean\n chrome: boolean\n edge: boolean\n firefox: boolean\n opera: boolean\n win: boolean\n mac: boolean\n linux: boolean\n touch: boolean\n ssr: boolean\n}\n\nexport interface DisplayInstance {\n xs: boolean\n sm: boolean\n md: boolean\n lg: boolean\n xl: boolean\n xxl: boolean\n smAndUp: boolean\n mdAndUp: boolean\n lgAndUp: boolean\n xlAndUp: boolean\n smAndDown: boolean\n mdAndDown: boolean\n lgAndDown: boolean\n xlAndDown: boolean\n name: DisplayBreakpoint\n height: number\n width: number\n mobile: boolean\n mobileBreakpoint: number | DisplayBreakpoint\n platform: DisplayPlatform\n thresholds: DisplayThresholds\n}\n\nexport const DisplaySymbol: InjectionKey<ToRefs<DisplayInstance>> = Symbol.for('vuetify:display')\n\nconst defaultDisplayOptions: DisplayOptions = {\n mobileBreakpoint: 'lg',\n thresholds: {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n xxl: 2560,\n },\n}\n\nconst parseDisplayOptions = (options: DisplayOptions = defaultDisplayOptions) => {\n return mergeDeep(defaultDisplayOptions, options) as InternalDisplayOptions\n}\n\nfunction getClientWidth (isHydrate?: boolean) {\n return IN_BROWSER && !isHydrate\n ? window.innerWidth\n : 0\n}\n\nfunction getClientHeight (isHydrate?: boolean) {\n return IN_BROWSER && !isHydrate\n ? window.innerHeight\n : 0\n}\n\nfunction getPlatform (): DisplayPlatform {\n const userAgent = IN_BROWSER ? window.navigator.userAgent : 'ssr'\n\n function match (regexp: RegExp) {\n return Boolean(userAgent.match(regexp))\n }\n\n const android = match(/android/i)\n const ios = match(/iphone|ipad|ipod/i)\n const cordova = match(/cordova/i)\n const electron = match(/electron/i)\n const chrome = match(/chrome/i)\n const edge = match(/edge/i)\n const firefox = match(/firefox/i)\n const opera = match(/opera/i)\n const win = match(/win/i)\n const mac = match(/mac/i)\n const linux = match(/linux/i)\n const ssr = match(/ssr/i)\n\n return {\n android,\n ios,\n cordova,\n electron,\n chrome,\n edge,\n firefox,\n opera,\n win,\n mac,\n linux,\n touch: SUPPORTS_TOUCH,\n ssr,\n }\n}\n\nexport function createDisplay (options?: DisplayOptions, isHydrate?: boolean): ToRefs<DisplayInstance> {\n const { thresholds, mobileBreakpoint } = parseDisplayOptions(options)\n\n const height = ref(getClientHeight(isHydrate))\n const platform = getPlatform()\n const state = reactive({} as DisplayInstance)\n const width = ref(getClientWidth(isHydrate))\n\n function onResize () {\n height.value = getClientHeight()\n width.value = getClientWidth()\n }\n\n if (isHydrate) {\n nextTick(() => onResize())\n }\n\n // eslint-disable-next-line max-statements\n watchEffect(() => {\n const xs = width.value < thresholds.sm\n const sm = width.value < thresholds.md && !xs\n const md = width.value < thresholds.lg && !(sm || xs)\n const lg = width.value < thresholds.xl && !(md || sm || xs)\n const xl = width.value < thresholds.xxl && !(lg || md || sm || xs)\n const xxl = width.value >= thresholds.xxl\n const name =\n xs ? 'xs'\n : sm ? 'sm'\n : md ? 'md'\n : lg ? 'lg'\n : xl ? 'xl'\n : 'xxl'\n const breakpointValue = typeof mobileBreakpoint === 'number' ? mobileBreakpoint : thresholds[mobileBreakpoint]\n const mobile = !platform.ssr\n ? width.value < breakpointValue\n : platform.android || platform.ios || platform.opera\n\n state.xs = xs\n state.sm = sm\n state.md = md\n state.lg = lg\n state.xl = xl\n state.xxl = xxl\n state.smAndUp = !xs\n state.mdAndUp = !(xs || sm)\n state.lgAndUp = !(xs || sm || md)\n state.xlAndUp = !(xs || sm || md || lg)\n state.smAndDown = !(md || lg || xl || xxl)\n state.mdAndDown = !(lg || xl || xxl)\n state.lgAndDown = !(xl || xxl)\n state.xlAndDown = !xxl\n state.name = name\n state.height = height.value\n state.width = width.value\n state.mobile = mobile\n state.mobileBreakpoint = mobileBreakpoint\n state.platform = platform\n state.thresholds = thresholds\n })\n\n if (IN_BROWSER) {\n window.addEventListener('resize', onResize, { passive: true })\n }\n\n return toRefs(state)\n}\n\nexport function useDisplay () {\n const display = inject(DisplaySymbol)\n\n if (!display) throw new Error('Could not find Vuetify display injection')\n\n return display\n}\n"],"mappings":"AAAA;AACA,SAASA,MAAT,EAAiBC,QAAjB,EAA2BC,QAA3B,EAAqCC,GAArC,EAA0CC,MAA1C,EAAkDC,WAAlD,QAAqE,KAArE;SACSC,S,6BAET;;SACSC,U,EAAYC,c,+BAErB;;AAgEA,OAAO,MAAMC,aAAoD,GAAGC,MAAM,CAACC,GAAP,CAAW,iBAAX,CAA7D;AAEP,MAAMC,qBAAqC,GAAG;EAC5CC,gBAAgB,EAAE,IAD0B;EAE5CC,UAAU,EAAE;IACVC,EAAE,EAAE,CADM;IAEVC,EAAE,EAAE,GAFM;IAGVC,EAAE,EAAE,GAHM;IAIVC,EAAE,EAAE,IAJM;IAKVC,EAAE,EAAE,IALM;IAMVC,GAAG,EAAE;EANK;AAFgC,CAA9C;;AAYA,MAAMC,mBAAmB,GAAG,YAAqD;EAAA,IAApDC,OAAoD,uEAA1BV,qBAA0B;EAC/E,OAAON,SAAS,CAACM,qBAAD,EAAwBU,OAAxB,CAAhB;AACD,CAFD;;AAIA,SAASC,cAAT,CAAyBC,SAAzB,EAA8C;EAC5C,OAAOjB,UAAU,IAAI,CAACiB,SAAf,GACHC,MAAM,CAACC,UADJ,GAEH,CAFJ;AAGD;;AAED,SAASC,eAAT,CAA0BH,SAA1B,EAA+C;EAC7C,OAAOjB,UAAU,IAAI,CAAC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KAAK,CAACC,KAAN,GAAcA,KAAK,CAACE,KAApB;IACAH,KAAK,CAACM,MAAN,GAAeA,MAAf;IACAN,KAAK,CAACtC,gBAAN,GAAyBA,gBAAzB;IACAsC,KAAK,CAACD,QAAN,GAAiBA,QAAjB;IACAC,KAAK,CAACrC,UAAN,GAAmBA,UAAnB;EACD,CAxCU,CAAX;;EA0CA,IAAIP,UAAJ,EAAgB;IACdkB,MAAM,CAACyC,gBAAP,CAAwB,QAAxB,EAAkCb,QAAlC,EAA4C;MAAEc,OAAO,EAAE;IAAX,CAA5C;EACD;;EAED,OAAO/D,MAAM,CAAC+C,KAAD,CAAb;AACD;AAED,OAAO,SAASiB,UAAT,GAAuB;EAC5B,MAAMC,OAAO,GAAGrE,MAAM,CAACS,aAAD,CAAtB;EAEA,IAAI,CAAC4D,OAAL,EAAc,MAAM,IAAIC,KAAJ,CAAU,0CAAV,CAAN;EAEd,OAAOD,OAAP;AACD"}
1
+ {"version":3,"file":"display.mjs","names":["inject","reactive","ref","toRefs","watchEffect","mergeDeep","IN_BROWSER","SUPPORTS_TOUCH","DisplaySymbol","Symbol","for","defaultDisplayOptions","mobileBreakpoint","thresholds","xs","sm","md","lg","xl","xxl","parseDisplayOptions","options","getClientWidth","isHydrate","window","innerWidth","getClientHeight","innerHeight","getPlatform","userAgent","navigator","match","regexp","Boolean","android","ios","cordova","electron","chrome","edge","firefox","opera","win","mac","linux","ssr","touch","createDisplay","height","platform","state","width","update","value","name","breakpointValue","mobile","smAndUp","mdAndUp","lgAndUp","xlAndUp","smAndDown","mdAndDown","lgAndDown","xlAndDown","addEventListener","passive","useDisplay","display","Error"],"sources":["../../src/composables/display.ts"],"sourcesContent":["// Utilities\nimport { inject, reactive, ref, toRefs, watchEffect } from 'vue'\nimport { mergeDeep } from '@/util'\n\n// Globals\nimport { IN_BROWSER, SUPPORTS_TOUCH } from '@/util/globals'\n\n// Types\nimport type { InjectionKey, Ref } from 'vue'\n\nexport type DisplayBreakpoint = keyof DisplayThresholds\n\nexport interface DisplayThresholds {\n xs: number\n sm: number\n md: number\n lg: number\n xl: number\n xxl: number\n}\n\nexport interface DisplayOptions {\n mobileBreakpoint?: number | DisplayBreakpoint\n thresholds?: Partial<DisplayThresholds>\n}\n\nexport interface InternalDisplayOptions {\n mobileBreakpoint: number | DisplayBreakpoint\n thresholds: DisplayThresholds\n}\n\nexport interface DisplayPlatform {\n android: boolean\n ios: boolean\n cordova: boolean\n electron: boolean\n chrome: boolean\n edge: boolean\n firefox: boolean\n opera: boolean\n win: boolean\n mac: boolean\n linux: boolean\n touch: boolean\n ssr: boolean\n}\n\nexport interface DisplayInstance {\n xs: Ref<boolean>\n sm: Ref<boolean>\n md: Ref<boolean>\n lg: Ref<boolean>\n xl: Ref<boolean>\n xxl: Ref<boolean>\n smAndUp: Ref<boolean>\n mdAndUp: Ref<boolean>\n lgAndUp: Ref<boolean>\n xlAndUp: Ref<boolean>\n smAndDown: Ref<boolean>\n mdAndDown: Ref<boolean>\n lgAndDown: Ref<boolean>\n xlAndDown: Ref<boolean>\n name: Ref<DisplayBreakpoint>\n height: Ref<number>\n width: Ref<number>\n mobile: Ref<boolean>\n mobileBreakpoint: Ref<number | DisplayBreakpoint>\n platform: Ref<DisplayPlatform>\n thresholds: Ref<DisplayThresholds>\n\n update (): void\n}\n\nexport const DisplaySymbol: InjectionKey<DisplayInstance> = Symbol.for('vuetify:display')\n\nconst defaultDisplayOptions: DisplayOptions = {\n mobileBreakpoint: 'lg',\n thresholds: {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n xxl: 2560,\n },\n}\n\nconst parseDisplayOptions = (options: DisplayOptions = defaultDisplayOptions) => {\n return mergeDeep(defaultDisplayOptions, options) as InternalDisplayOptions\n}\n\nfunction getClientWidth (isHydrate?: boolean) {\n return IN_BROWSER && !isHydrate\n ? window.innerWidth\n : 0\n}\n\nfunction getClientHeight (isHydrate?: boolean) {\n return IN_BROWSER && !isHydrate\n ? window.innerHeight\n : 0\n}\n\nfunction getPlatform (): DisplayPlatform {\n const userAgent = IN_BROWSER ? window.navigator.userAgent : 'ssr'\n\n function match (regexp: RegExp) {\n return Boolean(userAgent.match(regexp))\n }\n\n const android = match(/android/i)\n const ios = match(/iphone|ipad|ipod/i)\n const cordova = match(/cordova/i)\n const electron = match(/electron/i)\n const chrome = match(/chrome/i)\n const edge = match(/edge/i)\n const firefox = match(/firefox/i)\n const opera = match(/opera/i)\n const win = match(/win/i)\n const mac = match(/mac/i)\n const linux = match(/linux/i)\n const ssr = match(/ssr/i)\n\n return {\n android,\n ios,\n cordova,\n electron,\n chrome,\n edge,\n firefox,\n opera,\n win,\n mac,\n linux,\n touch: SUPPORTS_TOUCH,\n ssr,\n }\n}\n\nexport function createDisplay (options?: DisplayOptions, isHydrate?: boolean): DisplayInstance {\n const { thresholds, mobileBreakpoint } = parseDisplayOptions(options)\n\n const height = ref(getClientHeight(isHydrate))\n const platform = getPlatform()\n const state = reactive({} as DisplayInstance)\n const width = ref(getClientWidth(isHydrate))\n\n function update () {\n height.value = getClientHeight()\n width.value = getClientWidth()\n }\n\n // eslint-disable-next-line max-statements\n watchEffect(() => {\n const xs = width.value < thresholds.sm\n const sm = width.value < thresholds.md && !xs\n const md = width.value < thresholds.lg && !(sm || xs)\n const lg = width.value < thresholds.xl && !(md || sm || xs)\n const xl = width.value < thresholds.xxl && !(lg || md || sm || xs)\n const xxl = width.value >= thresholds.xxl\n const name =\n xs ? 'xs'\n : sm ? 'sm'\n : md ? 'md'\n : lg ? 'lg'\n : xl ? 'xl'\n : 'xxl'\n const breakpointValue = typeof mobileBreakpoint === 'number' ? mobileBreakpoint : thresholds[mobileBreakpoint]\n const mobile = !platform.ssr\n ? width.value < breakpointValue\n : platform.android || platform.ios || platform.opera\n\n state.xs = xs\n state.sm = sm\n state.md = md\n state.lg = lg\n state.xl = xl\n state.xxl = xxl\n state.smAndUp = !xs\n state.mdAndUp = !(xs || sm)\n state.lgAndUp = !(xs || sm || md)\n state.xlAndUp = !(xs || sm || md || lg)\n state.smAndDown = !(md || lg || xl || xxl)\n state.mdAndDown = !(lg || xl || xxl)\n state.lgAndDown = !(xl || xxl)\n state.xlAndDown = !xxl\n state.name = name\n state.height = height.value\n state.width = width.value\n state.mobile = mobile\n state.mobileBreakpoint = mobileBreakpoint\n state.platform = platform\n state.thresholds = thresholds\n })\n\n if (IN_BROWSER) {\n window.addEventListener('resize', update, { passive: true })\n }\n\n return { ...toRefs(state), update }\n}\n\nexport function useDisplay () {\n const display = inject(DisplaySymbol)\n\n if (!display) throw new Error('Could not find Vuetify display injection')\n\n return display\n}\n"],"mappings":"AAAA;AACA,SAASA,MAAM,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,MAAM,EAAEC,WAAW,QAAQ,KAAK;AAAA,SACvDC,SAAS,6BAElB;AAAA,SACSC,UAAU,EAAEC,cAAc,+BAEnC;AAkEA,OAAO,MAAMC,aAA4C,GAAGC,MAAM,CAACC,GAAG,CAAC,iBAAiB,CAAC;AAEzF,MAAMC,qBAAqC,GAAG;EAC5CC,gBAAgB,EAAE,IAAI;EACtBC,UAAU,EAAE;IACVC,EAAE,EAAE,CAAC;IACLC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE,IAAI;IACRC,EAAE,EAAE,IAAI;IACRC,GAAG,EAAE;EACP;AACF,CAAC;AAED,MAAMC,mBAAmB,GAAG,YAAqD;EAAA,IAApDC,OAAuB,uEAAGV,qBAAqB;EAC1E,OAAON,SAAS,CAACM,qBAAqB,EAAEU,OAAO,CAAC;AAClD,CAAC;AAED,SAASC,cAAc,CAAEC,SAAmB,EAAE;EAC5C,OAAOjB,UAAU,IAAI,CAACiB,SAAS,GAC3BC,MAAM,CAACC,UAAU,GACjB,CAAC;AACP;AAEA,SAASC,eAAe,CAAEH,SAAmB,EAAE;EAC7C,OAAOjB,UAAU,IAAI,CAACiB,SAAS,GAC3BC,MAAM,CAACG,WAAW,GAClB,CAAC;AACP;AAEA,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AQ;IACzBC,KAAK,CAACrC,UAAU,GAAGA,UAAU;EAC/B,CAAC,CAAC;EAEF,IAAIP,UAAU,EAAE;IACdkB,MAAM,CAACyC,gBAAgB,CAAC,QAAQ,EAAEb,MAAM,EAAE;MAAEc,OAAO,EAAE;IAAK,CAAC,CAAC;EAC9D;EAEA,OAAO;IAAE,GAAG/D,MAAM,CAAC+C,KAAK,CAAC;IAAEE;EAAO,CAAC;AACrC;AAEA,OAAO,SAASe,UAAU,GAAI;EAC5B,MAAMC,OAAO,GAAGpE,MAAM,CAACQ,aAAa,CAAC;EAErC,IAAI,CAAC4D,OAAO,EAAE,MAAM,IAAIC,KAAK,CAAC,0CAA0C,CAAC;EAEzE,OAAOD,OAAO;AAChB"}
@@ -1,19 +1,17 @@
1
1
  // Utilities
2
2
  import { computed, isRef } from 'vue';
3
3
  import { propsFactory } from "../util/index.mjs"; // Types
4
-
5
4
  // Composables
6
5
  export const makeElevationProps = propsFactory({
7
6
  elevation: {
8
7
  type: [Number, String],
9
-
10
8
  validator(v) {
11
9
  const value = parseInt(v);
12
- return !isNaN(value) && value >= 0 && // Material Design has a maximum elevation of 24
10
+ return !isNaN(value) && value >= 0 &&
11
+ // Material Design has a maximum elevation of 24
13
12
  // https://material.io/design/environment/elevation.html#default-elevations
14
13
  value <= 24;
15
14
  }
16
-
17
15
  }
18
16
  }, 'elevation');
19
17
  export function useElevation(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"elevation.mjs","names":["computed","isRef","propsFactory","makeElevationProps","elevation","type","Number","String","validator","v","value","parseInt","isNaN","useElevation","props","elevationClasses","classes","push"],"sources":["../../src/composables/elevation.ts"],"sourcesContent":["// Utilities\nimport { computed, isRef } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { Ref } from 'vue'\nexport interface ElevationProps {\n elevation?: number | string | null\n}\n\n// Composables\nexport const makeElevationProps = propsFactory({\n elevation: {\n type: [Number, String],\n validator (v: any) {\n const value = parseInt(v)\n\n return (\n !isNaN(value) &&\n value >= 0 &&\n // Material Design has a maximum elevation of 24\n // https://material.io/design/environment/elevation.html#default-elevations\n value <= 24\n )\n },\n },\n}, 'elevation')\n\ntype ElevationData = {\n elevationClasses: Ref<string[]>\n}\n\nexport function useElevation (props: ElevationProps | Ref<number | string | undefined>): ElevationData {\n const elevationClasses = computed(() => {\n const elevation = isRef(props) ? props.value : props.elevation\n const classes: string[] = []\n\n if (elevation == null) return classes\n\n classes.push(`elevation-${elevation}`)\n\n return classes\n })\n\n return { elevationClasses }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAT,EAAmBC,KAAnB,QAAgC,KAAhC;SACSC,Y,6BAET;;AAMA;AACA,OAAO,MAAMC,kBAAkB,GAAGD,YAAY,CAAC;EAC7CE,SAAS,EAAE;IACTC,IAAI,EAAE,CAACC,MAAD,EAASC,MAAT,CADG;;IAETC,SAAS,CAAEC,CAAF,EAAU;MACjB,MAAMC,KAAK,GAAGC,QAAQ,CAACF,CAAD,CAAtB;MAEA,OACE,CAACG,KAAK,CAACF,KAAD,CAAN,IACAA,KAAK,IAAI,CADT,IAEA;MACA;MACAA,KAAK,IAAI,EALX;IAOD;;EAZQ;AADkC,CAAD,EAe3C,WAf2C,CAAvC;AAqBP,OAAO,SAASG,YAAT,CAAuBC,KAAvB,EAAgG;EACrG,MAAMC,gBAAgB,GAAGf,QAAQ,CAAC,MAAM;IACtC,MAAMI,SAAS,GAAGH,KAAK,CAACa,KAAD,CAAL,GAAeA,KAAK,CAACJ,KAArB,GAA6BI,KAAK,CAACV,SAArD;IACA,MAAMY,OAAiB,GAAG,EAA1B;IAEA,IAAIZ,SAAS,IAAI,IAAjB,EAAuB,OAAOY,OAAP;IAEvBA,OAAO,CAACC,IAAR,CAAc,aAAYb,SAAU,EAApC;IAEA,OAAOY,OAAP;EACD,CATgC,CAAjC;EAWA,OAAO;IAAED;EAAF,CAAP;AACD"}
1
+ {"version":3,"file":"elevation.mjs","names":["computed","isRef","propsFactory","makeElevationProps","elevation","type","Number","String","validator","v","value","parseInt","isNaN","useElevation","props","elevationClasses","classes","push"],"sources":["../../src/composables/elevation.ts"],"sourcesContent":["// Utilities\nimport { computed, isRef } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { Ref } from 'vue'\nexport interface ElevationProps {\n elevation?: number | string | null\n}\n\n// Composables\nexport const makeElevationProps = propsFactory({\n elevation: {\n type: [Number, String],\n validator (v: any) {\n const value = parseInt(v)\n\n return (\n !isNaN(value) &&\n value >= 0 &&\n // Material Design has a maximum elevation of 24\n // https://material.io/design/environment/elevation.html#default-elevations\n value <= 24\n )\n },\n },\n}, 'elevation')\n\ntype ElevationData = {\n elevationClasses: Ref<string[]>\n}\n\nexport function useElevation (props: ElevationProps | Ref<number | string | undefined>): ElevationData {\n const elevationClasses = computed(() => {\n const elevation = isRef(props) ? props.value : props.elevation\n const classes: string[] = []\n\n if (elevation == null) return classes\n\n classes.push(`elevation-${elevation}`)\n\n return classes\n })\n\n return { elevationClasses }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,YAAY,6BAErB;AAMA;AACA,OAAO,MAAMC,kBAAkB,GAAGD,YAAY,CAAC;EAC7CE,SAAS,EAAE;IACTC,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;IACtBC,SAAS,CAAEC,CAAM,EAAE;MACjB,MAAMC,KAAK,GAAGC,QAAQ,CAACF,CAAC,CAAC;MAEzB,OACE,CAACG,KAAK,CAACF,KAAK,CAAC,IACbA,KAAK,IAAI,CAAC;MACV;MACA;MACAA,KAAK,IAAI,EAAE;IAEf;EACF;AACF,CAAC,EAAE,WAAW,CAAC;AAMf,OAAO,SAASG,YAAY,CAAEC,KAAwD,EAAiB;EACrG,MAAMC,gBAAgB,GAAGf,QAAQ,CAAC,MAAM;IACtC,MAAMI,SAAS,GAAGH,KAAK,CAACa,KAAK,CAAC,GAAGA,KAAK,CAACJ,KAAK,GAAGI,KAAK,CAACV,SAAS;IAC9D,MAAMY,OAAiB,GAAG,EAAE;IAE5B,IAAIZ,SAAS,IAAI,IAAI,EAAE,OAAOY,OAAO;IAErCA,OAAO,CAACC,IAAI,CAAE,aAAYb,SAAU,EAAC,CAAC;IAEtC,OAAOY,OAAO;EAChB,CAAC,CAAC;EAEF,OAAO;IAAED;EAAiB,CAAC;AAC7B"}
@@ -1,9 +1,10 @@
1
1
  /* eslint-disable max-statements */
2
-
3
2
  /* eslint-disable no-labels */
4
3
  // Utilities
5
4
  import { getPropertyFromItem, propsFactory, wrapInArray } from "../util/index.mjs";
6
- import { computed, unref } from 'vue'; // Types
5
+ import { computed, unref } from 'vue';
6
+
7
+ // Types
7
8
 
8
9
  // Composables
9
10
  export const defaultFilter = (value, query, item) => {
@@ -21,30 +22,25 @@ export const makeFilterProps = propsFactory({
21
22
  noFilter: Boolean
22
23
  }, 'filter');
23
24
  export function filterItems(items, query, options) {
24
- const array = []; // always ensure we fall back to a functioning filter
25
-
25
+ const array = [];
26
+ // always ensure we fall back to a functioning filter
26
27
  const filter = (options == null ? void 0 : options.default) ?? defaultFilter;
27
28
  const keys = options != null && options.filterKeys ? wrapInArray(options.filterKeys) : false;
28
29
  const customFiltersLength = Object.keys((options == null ? void 0 : options.customKeyFilter) ?? {}).length;
29
30
  if (!(items != null && items.length)) return array;
30
-
31
31
  loop: for (let i = 0; i < items.length; i++) {
32
32
  const item = items[i];
33
33
  const customMatches = {};
34
34
  const defaultMatches = {};
35
35
  let match = -1;
36
-
37
36
  if (query && !(options != null && options.noFilter)) {
38
37
  if (typeof item === 'object') {
39
38
  const filterKeys = keys || Object.keys(item);
40
-
41
39
  for (const key of filterKeys) {
42
40
  var _options$customKeyFil;
43
-
44
41
  const value = getPropertyFromItem(item, key, item);
45
42
  const keyFilter = options == null ? void 0 : (_options$customKeyFil = options.customKeyFilter) == null ? void 0 : _options$customKeyFil[key];
46
43
  match = keyFilter ? keyFilter(value, query, item) : filter(value, query, item);
47
-
48
44
  if (match !== -1 && match !== false) {
49
45
  if (keyFilter) customMatches[key] = match;else defaultMatches[key] = match;
50
46
  } else if ((options == null ? void 0 : options.filterMode) === 'every') {
@@ -53,27 +49,24 @@ export function filterItems(items, query, options) {
53
49
  }
54
50
  } else {
55
51
  match = filter(item, query, item);
56
-
57
52
  if (match !== -1 && match !== false) {
58
53
  defaultMatches.title = match;
59
54
  }
60
55
  }
61
-
62
56
  const defaultMatchesLength = Object.keys(defaultMatches).length;
63
57
  const customMatchesLength = Object.keys(customMatches).length;
64
58
  if (!defaultMatchesLength && !customMatchesLength) continue;
65
59
  if ((options == null ? void 0 : options.filterMode) === 'union' && customMatchesLength !== customFiltersLength && !defaultMatchesLength) continue;
66
60
  if ((options == null ? void 0 : options.filterMode) === 'intersection' && (customMatchesLength !== customFiltersLength || !defaultMatchesLength)) continue;
67
61
  }
68
-
69
62
  array.push({
70
63
  index: i,
71
- matches: { ...defaultMatches,
64
+ matches: {
65
+ ...defaultMatches,
72
66
  ...customMatches
73
67
  }
74
68
  });
75
69
  }
76
-
77
70
  return array;
78
71
  }
79
72
  export function useFilter(props, items, query) {
@@ -1 +1 @@
1
- {"version":3,"file":"filter.mjs","names":["getPropertyFromItem","propsFactory","wrapInArray","computed","unref","defaultFilter","value","query","item","toString","toLocaleLowerCase","indexOf","makeFilterProps","customFilter","Function","customKeyFilter","Object","filterKeys","Array","String","filterMode","type","default","noFilter","Boolean","filterItems","items","options","array","filter","keys","customFiltersLength","length","loop","i","customMatches","defaultMatches","match","key","keyFilter","title","defaultMatchesLength","customMatchesLength","push","index","matches","useFilter","props","strQuery","filteredItems","transformedItems","map"],"sources":["../../src/composables/filter.ts"],"sourcesContent":["/* eslint-disable max-statements */\n/* eslint-disable no-labels */\n\n// Utilities\nimport { getPropertyFromItem, propsFactory, wrapInArray } from '@/util'\nimport { computed, unref } from 'vue'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { MaybeRef } from '@/util'\nimport type { InternalItem } from './items'\n\n/**\n * - match without highlight\n * - single match (index), length already known\n * - single match (start, end)\n * - multiple matches (start, end), probably shouldn't overlap\n */\nexport type FilterMatch = boolean | number | [number, number] | [number, number][]\nexport type FilterFunction = (value: string, query: string, item?: any) => FilterMatch\nexport type FilterKeyFunctions = Record<string, FilterFunction>\nexport type FilterKeys = string | string[]\nexport type FilterMode = 'some' | 'every' | 'union' | 'intersection'\n\nexport interface FilterProps {\n customFilter?: FilterFunction\n customKeyFilter?: FilterKeyFunctions\n filterKeys?: FilterKeys\n filterMode?: FilterMode\n noFilter?: boolean\n}\n\n// Composables\nexport const defaultFilter: FilterFunction = (value, query, item) => {\n if (value == null || query == null) return -1\n\n return value.toString().toLocaleLowerCase().indexOf(query.toString().toLocaleLowerCase())\n}\n\nexport const makeFilterProps = propsFactory({\n customFilter: Function as PropType<FilterFunction>,\n customKeyFilter: Object as PropType<FilterKeyFunctions>,\n filterKeys: [Array, String] as PropType<FilterKeys>,\n filterMode: {\n type: String as PropType<FilterMode>,\n default: 'intersection',\n },\n noFilter: Boolean,\n}, 'filter')\n\nexport function filterItems (\n items: any[],\n query: string,\n options?: {\n customKeyFilter?: FilterKeyFunctions\n default?: FilterFunction\n filterKeys?: FilterKeys\n filterMode?: FilterMode\n noFilter?: boolean\n },\n) {\n const array: { index: number, matches: Record<string, FilterMatch> }[] = []\n // always ensure we fall back to a functioning filter\n const filter = options?.default ?? defaultFilter\n const keys = options?.filterKeys ? wrapInArray(options.filterKeys) : false\n const customFiltersLength = Object.keys(options?.customKeyFilter ?? {}).length\n\n if (!items?.length) return array\n\n loop:\n for (let i = 0; i < items.length; i++) {\n const item = items[i]\n const customMatches: Record<string, FilterMatch> = {}\n const defaultMatches: Record<string, FilterMatch> = {}\n let match: FilterMatch = -1\n\n if (query && !options?.noFilter) {\n if (typeof item === 'object') {\n const filterKeys = keys || Object.keys(item)\n\n for (const key of filterKeys) {\n const value = getPropertyFromItem(item as any, key, item)\n const keyFilter = options?.customKeyFilter?.[key]\n\n match = keyFilter\n ? keyFilter(value, query, item)\n : filter(value, query, item)\n\n if (match !== -1 && match !== false) {\n if (keyFilter) customMatches[key] = match\n else defaultMatches[key] = match\n } else if (options?.filterMode === 'every') {\n continue loop\n }\n }\n } else {\n match = filter(item, query, item)\n if (match !== -1 && match !== false) {\n defaultMatches.title = match\n }\n }\n\n const defaultMatchesLength = Object.keys(defaultMatches).length\n const customMatchesLength = Object.keys(customMatches).length\n\n if (!defaultMatchesLength && !customMatchesLength) continue\n\n if (\n options?.filterMode === 'union' &&\n customMatchesLength !== customFiltersLength &&\n !defaultMatchesLength\n ) continue\n\n if (\n options?.filterMode === 'intersection' &&\n (\n customMatchesLength !== customFiltersLength ||\n !defaultMatchesLength\n )\n ) continue\n }\n\n array.push({ index: i, matches: { ...defaultMatches, ...customMatches } })\n }\n\n return array\n}\n\nexport function useFilter (\n props: FilterProps,\n items: MaybeRef<InternalItem[]>,\n query?: Ref<string | undefined>,\n) {\n const strQuery = computed(() => (\n typeof query?.value !== 'string' &&\n typeof query?.value !== 'number'\n ) ? '' : String(query.value))\n\n const filteredItems = computed(() => {\n const transformedItems = unref(items)\n const matches = filterItems(\n transformedItems,\n strQuery.value,\n {\n customKeyFilter: props.customKeyFilter,\n default: props.customFilter,\n filterKeys: props.filterKeys,\n filterMode: props.filterMode,\n noFilter: props.noFilter,\n },\n )\n\n return matches.map(({ index, matches }) => ({\n item: transformedItems[index],\n matches,\n }))\n })\n\n return { filteredItems }\n}\n"],"mappings":"AAAA;;AACA;AAEA;SACSA,mB,EAAqBC,Y,EAAcC,W;AAC5C,SAASC,QAAT,EAAmBC,KAAnB,QAAgC,KAAhC,C,CAEA;;AAyBA;AACA,OAAO,MAAMC,aAA6B,GAAG,CAACC,KAAD,EAAQC,KAAR,EAAeC,IAAf,KAAwB;EACnE,IAAIF,KAAK,IAAI,IAAT,IAAiBC,KAAK,IAAI,IAA9B,EAAoC,OAAO,CAAC,CAAR;EAEpC,OAAOD,KAAK,CAACG,QAAN,GAAiBC,iBA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AA,IAAC;QAAEP,KAAF;QAASC;MAAT,CAAD;MAAA,OAAyB;QAC1CrC,IAAI,EAAE0C,gBAAgB,CAACN,KAAD,CADoB;QAE1CC;MAF0C,CAAzB;IAAA,CAAZ,CAAP;EAID,CAlB6B,CAA9B;EAoBA,OAAO;IAAEI;EAAF,CAAP;AACD"}
1
+ {"version":3,"file":"filter.mjs","names":["getPropertyFromItem","propsFactory","wrapInArray","computed","unref","defaultFilter","value","query","item","toString","toLocaleLowerCase","indexOf","makeFilterProps","customFilter","Function","customKeyFilter","Object","filterKeys","Array","String","filterMode","type","default","noFilter","Boolean","filterItems","items","options","array","filter","keys","customFiltersLength","length","loop","i","customMatches","defaultMatches","match","key","keyFilter","title","defaultMatchesLength","customMatchesLength","push","index","matches","useFilter","props","strQuery","filteredItems","transformedItems","map"],"sources":["../../src/composables/filter.ts"],"sourcesContent":["/* eslint-disable max-statements */\n/* eslint-disable no-labels */\n\n// Utilities\nimport { getPropertyFromItem, propsFactory, wrapInArray } from '@/util'\nimport { computed, unref } from 'vue'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { MaybeRef } from '@/util'\nimport type { InternalItem } from './items'\n\n/**\n * - match without highlight\n * - single match (index), length already known\n * - single match (start, end)\n * - multiple matches (start, end), probably shouldn't overlap\n */\nexport type FilterMatch = boolean | number | [number, number] | [number, number][]\nexport type FilterFunction = (value: string, query: string, item?: any) => FilterMatch\nexport type FilterKeyFunctions = Record<string, FilterFunction>\nexport type FilterKeys = string | string[]\nexport type FilterMode = 'some' | 'every' | 'union' | 'intersection'\n\nexport interface FilterProps {\n customFilter?: FilterFunction\n customKeyFilter?: FilterKeyFunctions\n filterKeys?: FilterKeys\n filterMode?: FilterMode\n noFilter?: boolean\n}\n\n// Composables\nexport const defaultFilter: FilterFunction = (value, query, item) => {\n if (value == null || query == null) return -1\n\n return value.toString().toLocaleLowerCase().indexOf(query.toString().toLocaleLowerCase())\n}\n\nexport const makeFilterProps = propsFactory({\n customFilter: Function as PropType<FilterFunction>,\n customKeyFilter: Object as PropType<FilterKeyFunctions>,\n filterKeys: [Array, String] as PropType<FilterKeys>,\n filterMode: {\n type: String as PropType<FilterMode>,\n default: 'intersection',\n },\n noFilter: Boolean,\n}, 'filter')\n\nexport function filterItems (\n items: any[],\n query: string,\n options?: {\n customKeyFilter?: FilterKeyFunctions\n default?: FilterFunction\n filterKeys?: FilterKeys\n filterMode?: FilterMode\n noFilter?: boolean\n },\n) {\n const array: { index: number, matches: Record<string, FilterMatch> }[] = []\n // always ensure we fall back to a functioning filter\n const filter = options?.default ?? defaultFilter\n const keys = options?.filterKeys ? wrapInArray(options.filterKeys) : false\n const customFiltersLength = Object.keys(options?.customKeyFilter ?? {}).length\n\n if (!items?.length) return array\n\n loop:\n for (let i = 0; i < items.length; i++) {\n const item = items[i]\n const customMatches: Record<string, FilterMatch> = {}\n const defaultMatches: Record<string, FilterMatch> = {}\n let match: FilterMatch = -1\n\n if (query && !options?.noFilter) {\n if (typeof item === 'object') {\n const filterKeys = keys || Object.keys(item)\n\n for (const key of filterKeys) {\n const value = getPropertyFromItem(item as any, key, item)\n const keyFilter = options?.customKeyFilter?.[key]\n\n match = keyFilter\n ? keyFilter(value, query, item)\n : filter(value, query, item)\n\n if (match !== -1 && match !== false) {\n if (keyFilter) customMatches[key] = match\n else defaultMatches[key] = match\n } else if (options?.filterMode === 'every') {\n continue loop\n }\n }\n } else {\n match = filter(item, query, item)\n if (match !== -1 && match !== false) {\n defaultMatches.title = match\n }\n }\n\n const defaultMatchesLength = Object.keys(defaultMatches).length\n const customMatchesLength = Object.keys(customMatches).length\n\n if (!defaultMatchesLength && !customMatchesLength) continue\n\n if (\n options?.filterMode === 'union' &&\n customMatchesLength !== customFiltersLength &&\n !defaultMatchesLength\n ) continue\n\n if (\n options?.filterMode === 'intersection' &&\n (\n customMatchesLength !== customFiltersLength ||\n !defaultMatchesLength\n )\n ) continue\n }\n\n array.push({ index: i, matches: { ...defaultMatches, ...customMatches } })\n }\n\n return array\n}\n\nexport function useFilter (\n props: FilterProps,\n items: MaybeRef<InternalItem[]>,\n query?: Ref<string | undefined>,\n) {\n const strQuery = computed(() => (\n typeof query?.value !== 'string' &&\n typeof query?.value !== 'number'\n ) ? '' : String(query.value))\n\n const filteredItems = computed(() => {\n const transformedItems = unref(items)\n const matches = filterItems(\n transformedItems,\n strQuery.value,\n {\n customKeyFilter: props.customKeyFilter,\n default: props.customFilter,\n filterKeys: props.filterKeys,\n filterMode: props.filterMode,\n noFilter: props.noFilter,\n },\n )\n\n return matches.map(({ index, matches }) => ({\n item: transformedItems[index],\n matches,\n }))\n })\n\n return { filteredItems }\n}\n"],"mappings":"AAAA;AACA;AAEA;AAAA,SACSA,mBAAmB,EAAEC,YAAY,EAAEC,WAAW;AACvD,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;;AAErC;;AAyBA;AACA,OAAO,MAAMC,aAA6B,GAAG,CAACC,KAAK,EAAEC,KAAK,EAAEC,IAAI,KAAK;EACnE,IAAIF,KAAK,IAAI,IAAI,IAAIC,KAAK,IAAI,IAAI,EAAE,OAAO,CAAC,CAAC;EAE7C,OAAOD,KAAK,CAACG,QAAQ,EAAE,CAACC,iBAAiB,EAAE,CAACC,OAAO,CAACJ,KAAK,CAACE,QAAQ,EAAE,CAACC,iBAAiB,EAAE,CAAC;AAC3F,CAAC;AAED,OAAO,MAAME,eAAe,GAAGX,YAAY,CAAC;EAC1CY,YAAY,EAAEC,QAAoC;EAClDC,eAAe,EAAEC,MAAsC;EACvDC,UAAU,EAAE,CAACC,KAAK,EAAEC,MAAM,CAAyB;EACnDC,UAAU,EAAE;IACVC,IAAI,EAAEF,MAA8B;IACpCG,OAAO,EAAE;EACX,CAAC;EACDC,QAAQ,EAAEC;AACZ,CAAC,EAAE,QAAQ,CAAC;AAEZ,OAAO,SAASC,WAAW,CACzBC,KAAY,EACZnB,KAAa,EACboB,OAMC,EACD;EACA,MAAMC,KAAgE,GAAG,EAAE;EAC3E;EACA,MAAMC,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EAC/B;EACA,MAAMyC,QAAQ,GAAG7C,QAAQ,CAAC,MACxB,QAAOI,KAAK,oBAALA,KAAK,CAAED,KAAK,MAAK,QAAQ,IAChC,QAAOC,KAAK,oBAALA,KAAK,CAAED,KAAK,MAAK,QAAQ,GAC9B,EAAE,GAAGa,MAAM,CAACZ,KAAK,CAACD,KAAK,CAAC,CAAC;EAE7B,MAAM2C,aAAa,GAAG9C,QAAQ,CAAC,MAAM;IACnC,MAAM+C,gBAAgB,GAAG9C,KAAK,CAACsB,KAAK,CAAC;IACrC,MAAMmB,OAAO,GAAGpB,WAAW,CACzByB,gBAAgB,EAChBF,QAAQ,CAAC1C,KAAK,EACd;MACES,eAAe,EAAEgC,KAAK,CAAChC,eAAe;MACtCO,OAAO,EAAEyB,KAAK,CAAClC,YAAY;MAC3BI,UAAU,EAAE8B,KAAK,CAAC9B,UAAU;MAC5BG,UAAU,EAAE2B,KAAK,CAAC3B,UAAU;MAC5BG,QAAQ,EAAEwB,KAAK,CAACxB;IAClB,CAAC,CACF;IAED,OAAOsB,OAAO,CAACM,GAAG,CAAC;MAAA,IAAC;QAAEP,KAAK;QAAEC;MAAQ,CAAC;MAAA,OAAM;QAC1CrC,IAAI,EAAE0C,gBAAgB,CAACN,KAAK,CAAC;QAC7BC;MACF,CAAC;IAAA,CAAC,CAAC;EACL,CAAC,CAAC;EAEF,OAAO;IAAEI;EAAc,CAAC;AAC1B"}
@@ -1,9 +1,7 @@
1
1
  // Components
2
2
  import { useProxiedModel } from "./proxiedModel.mjs"; // Utilities
3
-
4
3
  import { computed } from 'vue';
5
4
  import { getCurrentInstanceName, propsFactory } from "../util/index.mjs"; // Types
6
-
7
5
  // Composables
8
6
  export const makeFocusProps = propsFactory({
9
7
  focused: Boolean
@@ -16,15 +14,12 @@ export function useFocus(props) {
16
14
  [`${name}--focused`]: isFocused.value
17
15
  };
18
16
  });
19
-
20
17
  function focus() {
21
18
  isFocused.value = true;
22
19
  }
23
-
24
20
  function blur() {
25
21
  isFocused.value = false;
26
22
  }
27
-
28
23
  return {
29
24
  focusClasses,
30
25
  isFocused,
@@ -1 +1 @@
1
- {"version":3,"file":"focus.mjs","names":["useProxiedModel","computed","getCurrentInstanceName","propsFactory","makeFocusProps","focused","Boolean","useFocus","props","name","isFocused","focusClasses","value","focus","blur"],"sources":["../../src/composables/focus.ts"],"sourcesContent":["// Components\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nexport interface FocusProps {\n focused: boolean\n 'onUpdate:focused': ((val: boolean) => void) | undefined\n}\n\n// Composables\nexport const makeFocusProps = propsFactory({\n focused: Boolean,\n}, 'focus')\n\nexport function useFocus (\n props: FocusProps,\n name = getCurrentInstanceName()\n) {\n const isFocused = useProxiedModel(props, 'focused')\n const focusClasses = computed(() => {\n return ({\n [`${name}--focused`]: isFocused.value,\n })\n })\n\n function focus () {\n isFocused.value = true\n }\n\n function blur () {\n isFocused.value = false\n }\n\n return { focusClasses, isFocused, focus, blur }\n}\n"],"mappings":"AAAA;SACSA,e,8BAET;;AACA,SAASC,QAAT,QAAyB,KAAzB;SACSC,sB,EAAwBC,Y,6BAEjC;;AAMA;AACA,OAAO,MAAMC,cAAc,GAAGD,YAAY,CAAC;EACzCE,OAAO,EAAEC;AADgC,CAAD,EAEvC,OAFuC,CAAnC;AAIP,OAAO,SAASC,QAAT,CACLC,KADK,EAGL;EAAA,IADAC,IACA,uEADOP,sBAAsB,EAC7B;EACA,MAAMQ,SAAS,GAAGV,eAAe,CAACQ,KAAD,EAAQ,SAAR,CAAjC;EACA,MAAMG,YAAY,GAAGV,QAAQ,CAAC,MAAM;IAClC,OAAQ;MACN,CAAE,GAAEQ,IAAK,WAAT,GAAsBC,SAAS,CAACE;IAD1B,CAAR;EAGD,CAJ4B,CAA7B;;EAMA,SAASC,KAAT,GAAkB;IAChBH,SAAS,CAACE,KAAV,GAAkB,IAAlB;EACD;;EAED,SAASE,IAAT,GAAiB;IACfJ,SAAS,CAACE,KAAV,GAAkB,KAAlB;EACD;;EAED,OAAO;IAAED,YAAF;IAAgBD,SAAhB;IAA2BG,KAA3B;IAAkCC;EAAlC,CAAP;AACD"}
1
+ {"version":3,"file":"focus.mjs","names":["useProxiedModel","computed","getCurrentInstanceName","propsFactory","makeFocusProps","focused","Boolean","useFocus","props","name","isFocused","focusClasses","value","focus","blur"],"sources":["../../src/composables/focus.ts"],"sourcesContent":["// Components\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nexport interface FocusProps {\n focused: boolean\n 'onUpdate:focused': ((val: boolean) => void) | undefined\n}\n\n// Composables\nexport const makeFocusProps = propsFactory({\n focused: Boolean,\n}, 'focus')\n\nexport function useFocus (\n props: FocusProps,\n name = getCurrentInstanceName()\n) {\n const isFocused = useProxiedModel(props, 'focused')\n const focusClasses = computed(() => {\n return ({\n [`${name}--focused`]: isFocused.value,\n })\n })\n\n function focus () {\n isFocused.value = true\n }\n\n function blur () {\n isFocused.value = false\n }\n\n return { focusClasses, isFocused, focus, blur }\n}\n"],"mappings":"AAAA;AAAA,SACSA,eAAe,8BAExB;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,sBAAsB,EAAEC,YAAY,6BAE7C;AAMA;AACA,OAAO,MAAMC,cAAc,GAAGD,YAAY,CAAC;EACzCE,OAAO,EAAEC;AACX,CAAC,EAAE,OAAO,CAAC;AAEX,OAAO,SAASC,QAAQ,CACtBC,KAAiB,EAEjB;EAAA,IADAC,IAAI,uEAAGP,sBAAsB,EAAE;EAE/B,MAAMQ,SAAS,GAAGV,eAAe,CAACQ,KAAK,EAAE,SAAS,CAAC;EACnD,MAAMG,YAAY,GAAGV,QAAQ,CAAC,MAAM;IAClC,OAAQ;MACN,CAAE,GAAEQ,IAAK,WAAU,GAAGC,SAAS,CAACE;IAClC,CAAC;EACH,CAAC,CAAC;EAEF,SAASC,KAAK,GAAI;IAChBH,SAAS,CAACE,KAAK,GAAG,IAAI;EACxB;EAEA,SAASE,IAAI,GAAI;IACfJ,SAAS,CAACE,KAAK,GAAG,KAAK;EACzB;EAEA,OAAO;IAAED,YAAY;IAAED,SAAS;IAAEG,KAAK;IAAEC;EAAK,CAAC;AACjD"}
@@ -2,7 +2,6 @@
2
2
  import { computed, inject, provide, ref, watch } from 'vue';
3
3
  import { useProxiedModel } from "./proxiedModel.mjs";
4
4
  import { consoleWarn, propsFactory } from "../util/index.mjs"; // Types
5
-
6
5
  export const FormKey = Symbol.for('vuetify:form');
7
6
  export const makeFormProps = propsFactory({
8
7
  disabled: Boolean,
@@ -13,7 +12,7 @@ export const makeFormProps = propsFactory({
13
12
  type: Boolean,
14
13
  default: null
15
14
  }
16
- });
15
+ }, 'form');
17
16
  export function createForm(props) {
18
17
  const model = useProxiedModel(props, 'modelValue');
19
18
  const isDisabled = computed(() => props.disabled);
@@ -21,16 +20,13 @@ export function createForm(props) {
21
20
  const isValidating = ref(false);
22
21
  const items = ref([]);
23
22
  const errors = ref([]);
24
-
25
23
  async function validate() {
26
24
  const results = [];
27
25
  let valid = true;
28
26
  errors.value = [];
29
27
  isValidating.value = true;
30
-
31
28
  for (const item of items.value) {
32
29
  const itemErrorMessages = await item.validate();
33
-
34
30
  if (itemErrorMessages.length > 0) {
35
31
  valid = false;
36
32
  results.push({
@@ -38,10 +34,8 @@ export function createForm(props) {
38
34
  errorMessages: itemErrorMessages
39
35
  });
40
36
  }
41
-
42
37
  if (!valid && props.fastFail) break;
43
38
  }
44
-
45
39
  errors.value = results;
46
40
  isValidating.value = false;
47
41
  return {
@@ -49,23 +43,19 @@ export function createForm(props) {
49
43
  errors: errors.value
50
44
  };
51
45
  }
52
-
53
46
  function reset() {
54
47
  items.value.forEach(item => item.reset());
55
48
  model.value = null;
56
49
  }
57
-
58
50
  function resetValidation() {
59
51
  items.value.forEach(item => item.resetValidation());
60
52
  errors.value = [];
61
53
  model.value = null;
62
54
  }
63
-
64
55
  watch(items, () => {
65
56
  let valid = 0;
66
57
  let invalid = 0;
67
58
  const results = [];
68
-
69
59
  for (const item of items.value) {
70
60
  if (item.isValid === false) {
71
61
  invalid++;
@@ -75,7 +65,6 @@ export function createForm(props) {
75
65
  });
76
66
  } else if (item.isValid === true) valid++;
77
67
  }
78
-
79
68
  errors.value = results;
80
69
  model.value = invalid > 0 ? false : valid === items.value.length ? true : null;
81
70
  }, {
@@ -89,11 +78,9 @@ export function createForm(props) {
89
78
  reset,
90
79
  resetValidation
91
80
  } = _ref;
92
-
93
81
  if (items.value.some(item => item.id === id)) {
94
82
  consoleWarn(`Duplicate input name "${id}"`);
95
83
  }
96
-
97
84
  items.value.push({
98
85
  id,
99
86
  validate,
@@ -1 +1 @@
1
- {"version":3,"file":"form.mjs","names":["computed","inject","provide","ref","watch","useProxiedModel","consoleWarn","propsFactory","FormKey","Symbol","for","makeFormProps","disabled","Boolean","fastFail","lazyValidation","readonly","modelValue","type","default","createForm","props","model","isDisabled","isReadonly","isValidating","items","errors","validate","results","valid","value","item","itemErrorMessages","length","push","id","errorMessages","reset","forEach","resetValidation","invalid","isValid","deep","register","some","unregister","filter","update","found","find","useForm"],"sources":["../../src/composables/form.ts"],"sourcesContent":["// Utilities\nimport { computed, inject, provide, ref, watch } from 'vue'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { consoleWarn, propsFactory } from '@/util'\n\n// Types\nimport type { ComputedRef, InjectionKey, PropType, Ref } from 'vue'\n\nexport interface FormProvide {\n register: (item: {\n id: number | string\n validate: () => Promise<string[]>\n reset: () => void\n resetValidation: () => void\n }) => void\n unregister: (id: number | string) => void\n update: (id: number | string, isValid: boolean | null, errorMessages: string[]) => void\n items: Ref<FormField[]>\n isDisabled: ComputedRef<boolean>\n isReadonly: ComputedRef<boolean>\n isValidating: Ref<boolean>\n}\n\ninterface FormField {\n id: number | string\n validate: () => Promise<string[]>\n reset: () => void\n resetValidation: () => void\n isValid: boolean | null\n errorMessages: string[]\n}\n\ninterface FieldValidationResult {\n id: number | string\n errorMessages: string[]\n}\n\ninterface FormValidationResult {\n valid: boolean\n errors: FieldValidationResult[]\n}\n\nexport interface SubmitEventPromise extends SubmitEvent, Promise<FormValidationResult> {}\n\nexport const FormKey: InjectionKey<FormProvide> = Symbol.for('vuetify:form')\n\nexport interface FormProps {\n disabled: boolean\n fastFail: boolean\n lazyValidation: boolean\n readonly: boolean\n modelValue: boolean | null\n 'onUpdate:modelValue': ((val: boolean | null) => void) | undefined\n}\n\nexport const makeFormProps = propsFactory({\n disabled: Boolean,\n fastFail: Boolean,\n lazyValidation: Boolean,\n readonly: Boolean,\n modelValue: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n})\n\nexport function createForm (props: FormProps) {\n const model = useProxiedModel(props, 'modelValue')\n\n const isDisabled = computed(() => props.disabled)\n const isReadonly = computed(() => props.readonly)\n const isValidating = ref(false)\n const items = ref<FormField[]>([])\n const errors = ref<FieldValidationResult[]>([])\n\n async function validate () {\n const results = []\n let valid = true\n\n errors.value = []\n isValidating.value = true\n\n for (const item of items.value) {\n const itemErrorMessages = await item.validate()\n\n if (itemErrorMessages.length > 0) {\n valid = false\n\n results.push({\n id: item.id,\n errorMessages: itemErrorMessages,\n })\n }\n\n if (!valid && props.fastFail) break\n }\n\n errors.value = results\n isValidating.value = false\n\n return { valid, errors: errors.value }\n }\n\n function reset () {\n items.value.forEach(item => item.reset())\n model.value = null\n }\n\n function resetValidation () {\n items.value.forEach(item => item.resetValidation())\n errors.value = []\n model.value = null\n }\n\n watch(items, () => {\n let valid = 0\n let invalid = 0\n const results = []\n\n for (const item of items.value) {\n if (item.isValid === false) {\n invalid++\n results.push({\n id: item.id,\n errorMessages: item.errorMessages,\n })\n } else if (item.isValid === true) valid++\n }\n\n errors.value = results\n model.value =\n invalid > 0 ? false\n : valid === items.value.length ? true\n : null\n }, { deep: true })\n\n provide(FormKey, {\n register: ({ id, validate, reset, resetValidation }) => {\n if (items.value.some(item => item.id === id)) {\n consoleWarn(`Duplicate input name \"${id}\"`)\n }\n\n items.value.push({\n id,\n validate,\n reset,\n resetValidation,\n isValid: null,\n errorMessages: [],\n })\n },\n unregister: id => {\n items.value = items.value.filter(item => {\n return item.id !== id\n })\n },\n update: (id, isValid, errorMessages) => {\n const found = items.value.find(item => item.id === id)\n\n if (!found) return\n\n found.isValid = isValid\n found.errorMessages = errorMessages\n },\n isDisabled,\n isReadonly,\n isValidating,\n items,\n })\n\n return {\n errors,\n isDisabled,\n isReadonly,\n isValidating,\n items,\n validate,\n reset,\n resetValidation,\n }\n}\n\nexport function useForm () {\n return inject(FormKey, null)\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAT,EAAmBC,MAAnB,EAA2BC,OAA3B,EAAoCC,GAApC,EAAyCC,KAAzC,QAAsD,KAAtD;SACSC,e;SACAC,W,EAAaC,Y,6BAEtB;;AAuCA,OAAO,MAAMC,OAAkC,GAAGC,MAAM,CAACC,GAAP,CAAW,cAAX,CAA3C;AAWP,OAAO,MAAMC,aAAa,GAAGJ,YAAY,CAAC;EACxCK,QAAQ,EAAEC,OAD8B;EAExCC,QAAQ,EAAED,OAF8B;EAGxCE,cAAc,EAAEF,OAHwB;EAIxCG,QAAQ,EAAEH,OAJ8B;EAKxCI,UAAU,EAAE;IACVC,IAAI,EAAEL,OADI;IAEVM,OAAO,EAAE;EAFC;AAL4B,CAAD,CAAlC;AAWP,OAAO,SAASC,UAAT,CAAqBC,KAArB,EAAuC;EAC5C,MAAMC,KAAK,GAAGjB,eAAe,CAACgB,KAAD,EAAQ,YAAR,CAA7B;EAEA,MAAME,UAAU,GAAGvB,QAAQ,CAAC,MAAMqB,KAAK,CAACT,QAAb,CAA3B;EACA,MAAMY,UAAU,GAAGxB,QAAQ,CAAC,MAAMqB,KAAK,CAACL,QAAb,CAA3B;EACA,MAAMS,YAAY,GAAGtB,GAAG,CAAC,KAAD,CAAxB;EACA,MAAMuB,KAAK,GA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AFa,CAAd;IAGD,CAnBc;IAoBfY,MAAM,EAAE,CAACZ,EAAD,EAAKM,OAAL,EAAcL,aAAd,KAAgC;MACtC,MAAMY,KAAK,GAAGvB,KAAK,CAACK,KAAN,CAAYmB,IAAZ,CAAiBlB,IAAI,IAAIA,IAAI,CAACI,EAAL,KAAYA,EAArC,CAAd;MAEA,IAAI,CAACa,KAAL,EAAY;MAEZA,KAAK,CAACP,OAAN,GAAgBA,OAAhB;MACAO,KAAK,CAACZ,aAAN,GAAsBA,aAAtB;IACD,CA3Bc;IA4Bfd,UA5Be;IA6BfC,UA7Be;IA8BfC,YA9Be;IA+BfC;EA/Be,CAAV,CAAP;EAkCA,OAAO;IACLC,MADK;IAELJ,UAFK;IAGLC,UAHK;IAILC,YAJK;IAKLC,KALK;IAMLE,QANK;IAOLU,KAPK;IAQLE;EARK,CAAP;AAUD;AAED,OAAO,SAASW,OAAT,GAAoB;EACzB,OAAOlD,MAAM,CAACO,OAAD,EAAU,IAAV,CAAb;AACD"}
1
+ {"version":3,"file":"form.mjs","names":["computed","inject","provide","ref","watch","useProxiedModel","consoleWarn","propsFactory","FormKey","Symbol","for","makeFormProps","disabled","Boolean","fastFail","lazyValidation","readonly","modelValue","type","default","createForm","props","model","isDisabled","isReadonly","isValidating","items","errors","validate","results","valid","value","item","itemErrorMessages","length","push","id","errorMessages","reset","forEach","resetValidation","invalid","isValid","deep","register","some","unregister","filter","update","found","find","useForm"],"sources":["../../src/composables/form.ts"],"sourcesContent":["// Utilities\nimport { computed, inject, provide, ref, watch } from 'vue'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { consoleWarn, propsFactory } from '@/util'\n\n// Types\nimport type { ComputedRef, InjectionKey, PropType, Ref } from 'vue'\n\nexport interface FormProvide {\n register: (item: {\n id: number | string\n validate: () => Promise<string[]>\n reset: () => void\n resetValidation: () => void\n }) => void\n unregister: (id: number | string) => void\n update: (id: number | string, isValid: boolean | null, errorMessages: string[]) => void\n items: Ref<FormField[]>\n isDisabled: ComputedRef<boolean>\n isReadonly: ComputedRef<boolean>\n isValidating: Ref<boolean>\n}\n\ninterface FormField {\n id: number | string\n validate: () => Promise<string[]>\n reset: () => void\n resetValidation: () => void\n isValid: boolean | null\n errorMessages: string[]\n}\n\ninterface FieldValidationResult {\n id: number | string\n errorMessages: string[]\n}\n\ninterface FormValidationResult {\n valid: boolean\n errors: FieldValidationResult[]\n}\n\nexport interface SubmitEventPromise extends SubmitEvent, Promise<FormValidationResult> {}\n\nexport const FormKey: InjectionKey<FormProvide> = Symbol.for('vuetify:form')\n\nexport interface FormProps {\n disabled: boolean\n fastFail: boolean\n lazyValidation: boolean\n readonly: boolean\n modelValue: boolean | null\n 'onUpdate:modelValue': ((val: boolean | null) => void) | undefined\n}\n\nexport const makeFormProps = propsFactory({\n disabled: Boolean,\n fastFail: Boolean,\n lazyValidation: Boolean,\n readonly: Boolean,\n modelValue: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n}, 'form')\n\nexport function createForm (props: FormProps) {\n const model = useProxiedModel(props, 'modelValue')\n\n const isDisabled = computed(() => props.disabled)\n const isReadonly = computed(() => props.readonly)\n const isValidating = ref(false)\n const items = ref<FormField[]>([])\n const errors = ref<FieldValidationResult[]>([])\n\n async function validate () {\n const results = []\n let valid = true\n\n errors.value = []\n isValidating.value = true\n\n for (const item of items.value) {\n const itemErrorMessages = await item.validate()\n\n if (itemErrorMessages.length > 0) {\n valid = false\n\n results.push({\n id: item.id,\n errorMessages: itemErrorMessages,\n })\n }\n\n if (!valid && props.fastFail) break\n }\n\n errors.value = results\n isValidating.value = false\n\n return { valid, errors: errors.value }\n }\n\n function reset () {\n items.value.forEach(item => item.reset())\n model.value = null\n }\n\n function resetValidation () {\n items.value.forEach(item => item.resetValidation())\n errors.value = []\n model.value = null\n }\n\n watch(items, () => {\n let valid = 0\n let invalid = 0\n const results = []\n\n for (const item of items.value) {\n if (item.isValid === false) {\n invalid++\n results.push({\n id: item.id,\n errorMessages: item.errorMessages,\n })\n } else if (item.isValid === true) valid++\n }\n\n errors.value = results\n model.value =\n invalid > 0 ? false\n : valid === items.value.length ? true\n : null\n }, { deep: true })\n\n provide(FormKey, {\n register: ({ id, validate, reset, resetValidation }) => {\n if (items.value.some(item => item.id === id)) {\n consoleWarn(`Duplicate input name \"${id}\"`)\n }\n\n items.value.push({\n id,\n validate,\n reset,\n resetValidation,\n isValid: null,\n errorMessages: [],\n })\n },\n unregister: id => {\n items.value = items.value.filter(item => {\n return item.id !== id\n })\n },\n update: (id, isValid, errorMessages) => {\n const found = items.value.find(item => item.id === id)\n\n if (!found) return\n\n found.isValid = isValid\n found.errorMessages = errorMessages\n },\n isDisabled,\n isReadonly,\n isValidating,\n items,\n })\n\n return {\n errors,\n isDisabled,\n isReadonly,\n isValidating,\n items,\n validate,\n reset,\n resetValidation,\n }\n}\n\nexport function useForm () {\n return inject(FormKey, null)\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,OAAO,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAClDC,eAAe;AAAA,SACfC,WAAW,EAAEC,YAAY,6BAElC;AAuCA,OAAO,MAAMC,OAAkC,GAAGC,MAAM,CAACC,GAAG,CAAC,cAAc,CAAC;AAW5E,OAAO,MAAMC,aAAa,GAAGJ,YAAY,CAAC;EACxCK,QAAQ,EAAEC,OAAO;EACjBC,QAAQ,EAAED,OAAO;EACjBE,cAAc,EAAEF,OAAO;EACvBG,QAAQ,EAAEH,OAAO;EACjBI,UAAU,EAAE;IACVC,IAAI,EAAEL,OAAmC;IACzCM,OAAO,EAAE;EACX;AACF,CAAC,EAAE,MAAM,CAAC;AAEV,OAAO,SAASC,UAAU,CAAEC,KAAgB,EAAE;EAC5C,MAAMC,KAAK,GAAGjB,eAAe,CAACgB,KAAK,EAAE,YAAY,CAAC;EAElD,MAAME,UAAU,GAAGvB,QAAQ,CAAC,MAAMqB,KAAK,CAACT,QAAQ,CAAC;EACjD,MAAM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