@vuetify/nightly 3.0.0-beta.13 → 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 (840) hide show
  1. package/CHANGELOG.md +23 -5
  2. package/dist/json/importMap.json +26 -30
  3. package/dist/vuetify.css +262 -173
  4. package/dist/vuetify.d.ts +16645 -7306
  5. package/dist/vuetify.esm.js +1040 -2004
  6. package/dist/vuetify.esm.js.map +1 -1
  7. package/dist/vuetify.js +1038 -2003
  8. package/dist/vuetify.js.map +1 -1
  9. package/dist/vuetify.min.css +2 -2
  10. package/dist/vuetify.min.js +531 -537
  11. package/dist/vuetify.min.js.map +1 -1
  12. package/lib/blueprints/index.d.ts +24 -32
  13. package/lib/blueprints/index.mjs.map +1 -1
  14. package/lib/blueprints/md1.d.ts +24 -32
  15. package/lib/blueprints/md1.mjs +3 -1
  16. package/lib/blueprints/md1.mjs.map +1 -1
  17. package/lib/blueprints/md2.d.ts +24 -32
  18. package/lib/blueprints/md2.mjs +3 -1
  19. package/lib/blueprints/md2.mjs.map +1 -1
  20. package/lib/blueprints/md3.d.ts +24 -32
  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 +7 -5
  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 +4 -2
  31. package/lib/components/VApp/index.mjs.map +1 -1
  32. package/lib/components/VAppBar/VAppBar.mjs +4 -8
  33. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  34. package/lib/components/VAppBar/VAppBarNavIcon.mjs +0 -4
  35. package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
  36. package/lib/components/VAppBar/VAppBarTitle.mjs +2 -4
  37. package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
  38. package/lib/components/VAppBar/index.d.ts +7 -3
  39. package/lib/components/VAppBar/index.mjs.map +1 -1
  40. package/lib/components/VAutocomplete/VAutocomplete.css +18 -1
  41. package/lib/components/VAutocomplete/VAutocomplete.mjs +16 -35
  42. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  43. package/lib/components/VAutocomplete/VAutocomplete.sass +11 -1
  44. package/lib/components/VAutocomplete/_variables.scss +1 -0
  45. package/lib/components/VAutocomplete/index.d.ts +267 -376
  46. package/lib/components/VAutocomplete/index.mjs.map +1 -1
  47. package/lib/components/VAvatar/VAvatar.mjs +3 -7
  48. package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
  49. package/lib/components/VAvatar/index.d.ts +5 -3
  50. package/lib/components/VAvatar/index.mjs.map +1 -1
  51. package/lib/components/VBadge/VBadge.mjs +2 -6
  52. package/lib/components/VBadge/VBadge.mjs.map +1 -1
  53. package/lib/components/VBadge/index.mjs.map +1 -1
  54. package/lib/components/VBanner/VBanner.mjs +5 -7
  55. package/lib/components/VBanner/VBanner.mjs.map +1 -1
  56. package/lib/components/VBanner/VBannerActions.mjs +0 -4
  57. package/lib/components/VBanner/VBannerActions.mjs.map +1 -1
  58. package/lib/components/VBanner/VBannerText.mjs.map +1 -1
  59. package/lib/components/VBanner/index.d.ts +7 -3
  60. package/lib/components/VBanner/index.mjs.map +1 -1
  61. package/lib/components/VBottomNavigation/VBottomNavigation.mjs +2 -5
  62. package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
  63. package/lib/components/VBottomNavigation/index.d.ts +5 -3
  64. package/lib/components/VBottomNavigation/index.mjs.map +1 -1
  65. package/lib/components/VBottomSheet/VBottomSheet.mjs +5 -5
  66. package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -1
  67. package/lib/components/VBottomSheet/index.mjs.map +1 -1
  68. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +5 -9
  69. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
  70. package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs.map +1 -1
  71. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +0 -5
  72. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
  73. package/lib/components/VBreadcrumbs/index.d.ts +50 -40
  74. package/lib/components/VBreadcrumbs/index.mjs.map +1 -1
  75. package/lib/components/VBtn/VBtn.mjs +2 -10
  76. package/lib/components/VBtn/VBtn.mjs.map +1 -1
  77. package/lib/components/VBtn/index.d.ts +5 -3
  78. package/lib/components/VBtn/index.mjs.map +1 -1
  79. package/lib/components/VBtnGroup/VBtnGroup.mjs +2 -4
  80. package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
  81. package/lib/components/VBtnGroup/index.d.ts +6 -3
  82. package/lib/components/VBtnGroup/index.mjs.map +1 -1
  83. package/lib/components/VBtnToggle/VBtnToggle.mjs +2 -7
  84. package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
  85. package/lib/components/VBtnToggle/index.d.ts +20 -25
  86. package/lib/components/VBtnToggle/index.mjs.map +1 -1
  87. package/lib/components/VCalendar/VCalendar.mjs +6 -67
  88. package/lib/components/VCalendar/VCalendar.mjs.map +1 -1
  89. package/lib/components/VCalendar/VCalendarCategory.mjs +7 -18
  90. package/lib/components/VCalendar/VCalendarCategory.mjs.map +1 -1
  91. package/lib/components/VCalendar/VCalendarDaily.mjs +3 -34
  92. package/lib/components/VCalendar/VCalendarDaily.mjs.map +1 -1
  93. package/lib/components/VCalendar/VCalendarMonthly.mjs +3 -7
  94. package/lib/components/VCalendar/VCalendarMonthly.mjs.map +1 -1
  95. package/lib/components/VCalendar/VCalendarWeekly.mjs +3 -32
  96. package/lib/components/VCalendar/VCalendarWeekly.mjs.map +1 -1
  97. package/lib/components/VCalendar/index.mjs.map +1 -1
  98. package/lib/components/VCalendar/mixins/calendar-base.mjs +1 -19
  99. package/lib/components/VCalendar/mixins/calendar-base.mjs.map +1 -1
  100. package/lib/components/VCalendar/mixins/calendar-with-events.mjs +14 -78
  101. package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +1 -1
  102. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs +0 -30
  103. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs.map +1 -1
  104. package/lib/components/VCalendar/mixins/mouse.mjs +7 -17
  105. package/lib/components/VCalendar/mixins/mouse.mjs.map +1 -1
  106. package/lib/components/VCalendar/mixins/times.mjs +1 -9
  107. package/lib/components/VCalendar/mixins/times.mjs.map +1 -1
  108. package/lib/components/VCalendar/modes/column.mjs +0 -3
  109. package/lib/components/VCalendar/modes/column.mjs.map +1 -1
  110. package/lib/components/VCalendar/modes/common.mjs +0 -14
  111. package/lib/components/VCalendar/modes/common.mjs.map +1 -1
  112. package/lib/components/VCalendar/modes/index.mjs +0 -1
  113. package/lib/components/VCalendar/modes/index.mjs.map +1 -1
  114. package/lib/components/VCalendar/modes/stack.mjs +3 -45
  115. package/lib/components/VCalendar/modes/stack.mjs.map +1 -1
  116. package/lib/components/VCalendar/util/events.mjs +0 -1
  117. package/lib/components/VCalendar/util/events.mjs.map +1 -1
  118. package/lib/components/VCalendar/util/parser.mjs +3 -4
  119. package/lib/components/VCalendar/util/parser.mjs.map +1 -1
  120. package/lib/components/VCalendar/util/props.mjs +0 -13
  121. package/lib/components/VCalendar/util/props.mjs.map +1 -1
  122. package/lib/components/VCalendar/util/timestamp.mjs +2 -64
  123. package/lib/components/VCalendar/util/timestamp.mjs.map +1 -1
  124. package/lib/components/VCard/VCard.mjs +3 -8
  125. package/lib/components/VCard/VCard.mjs.map +1 -1
  126. package/lib/components/VCard/VCardActions.mjs +0 -4
  127. package/lib/components/VCard/VCardActions.mjs.map +1 -1
  128. package/lib/components/VCard/VCardItem.mjs +0 -5
  129. package/lib/components/VCard/VCardItem.mjs.map +1 -1
  130. package/lib/components/VCard/VCardSubtitle.mjs.map +1 -1
  131. package/lib/components/VCard/VCardText.mjs.map +1 -1
  132. package/lib/components/VCard/VCardTitle.mjs.map +1 -1
  133. package/lib/components/VCard/index.d.ts +13 -6
  134. package/lib/components/VCard/index.mjs.map +1 -1
  135. package/lib/components/VCarousel/VCarousel.mjs +5 -9
  136. package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
  137. package/lib/components/VCarousel/VCarouselItem.mjs +0 -3
  138. package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
  139. package/lib/components/VCarousel/index.d.ts +1 -0
  140. package/lib/components/VCarousel/index.mjs.map +1 -1
  141. package/lib/components/VCheckbox/VCheckbox.mjs +6 -6
  142. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  143. package/lib/components/VCheckbox/VCheckboxBtn.mjs +7 -15
  144. package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
  145. package/lib/components/VCheckbox/index.d.ts +24 -22
  146. package/lib/components/VCheckbox/index.mjs.map +1 -1
  147. package/lib/components/VChip/VChip.css +25 -0
  148. package/lib/components/VChip/VChip.mjs +2 -10
  149. package/lib/components/VChip/VChip.mjs.map +1 -1
  150. package/lib/components/VChip/VChip.sass +1 -0
  151. package/lib/components/VChip/index.d.ts +5 -3
  152. package/lib/components/VChip/index.mjs.map +1 -1
  153. package/lib/components/VChipGroup/VChipGroup.mjs +5 -6
  154. package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
  155. package/lib/components/VChipGroup/index.mjs.map +1 -1
  156. package/lib/components/VCode/index.d.ts +1 -0
  157. package/lib/components/VCode/index.mjs.map +1 -1
  158. package/lib/components/VColorPicker/VColorPicker.mjs +9 -12
  159. package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
  160. package/lib/components/VColorPicker/VColorPickerCanvas.mjs +5 -20
  161. package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
  162. package/lib/components/VColorPicker/VColorPickerEdit.mjs +6 -10
  163. package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
  164. package/lib/components/VColorPicker/VColorPickerPreview.mjs +6 -8
  165. package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
  166. package/lib/components/VColorPicker/VColorPickerSwatches.mjs +2 -6
  167. package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
  168. package/lib/components/VColorPicker/index.mjs.map +1 -1
  169. package/lib/components/VColorPicker/util/index.mjs +24 -26
  170. package/lib/components/VColorPicker/util/index.mjs.map +1 -1
  171. package/lib/components/VCombobox/VCombobox.css +13 -0
  172. package/lib/components/VCombobox/VCombobox.mjs +23 -50
  173. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  174. package/lib/components/VCombobox/VCombobox.sass +5 -0
  175. package/lib/components/VCombobox/_variables.scss +1 -0
  176. package/lib/components/VCombobox/index.d.ts +275 -384
  177. package/lib/components/VCombobox/index.mjs.map +1 -1
  178. package/lib/components/VCounter/VCounter.mjs +2 -5
  179. package/lib/components/VCounter/VCounter.mjs.map +1 -1
  180. package/lib/components/VCounter/index.d.ts +1 -0
  181. package/lib/components/VCounter/index.mjs.map +1 -1
  182. package/lib/components/VData/VData.mjs +9 -67
  183. package/lib/components/VData/VData.mjs.map +1 -1
  184. package/lib/components/VData/index.mjs.map +1 -1
  185. package/lib/components/VDataIterator/VDataFooter.mjs +6 -25
  186. package/lib/components/VDataIterator/VDataFooter.mjs.map +1 -1
  187. package/lib/components/VDataIterator/VDataIterator.mjs +12 -51
  188. package/lib/components/VDataIterator/VDataIterator.mjs.map +1 -1
  189. package/lib/components/VDataIterator/index.mjs.map +1 -1
  190. package/lib/components/VDataTable/MobileRow.mjs +3 -8
  191. package/lib/components/VDataTable/MobileRow.mjs.map +1 -1
  192. package/lib/components/VDataTable/Row.mjs +1 -8
  193. package/lib/components/VDataTable/Row.mjs.map +1 -1
  194. package/lib/components/VDataTable/RowGroup.mjs +1 -7
  195. package/lib/components/VDataTable/RowGroup.mjs.map +1 -1
  196. package/lib/components/VDataTable/VDataTable.mjs +42 -90
  197. package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
  198. package/lib/components/VDataTable/VDataTableHeader.mjs +6 -10
  199. package/lib/components/VDataTable/VDataTableHeader.mjs.map +1 -1
  200. package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs +0 -18
  201. package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs.map +1 -1
  202. package/lib/components/VDataTable/VDataTableHeaderMobile.mjs +0 -9
  203. package/lib/components/VDataTable/VDataTableHeaderMobile.mjs.map +1 -1
  204. package/lib/components/VDataTable/VEditDialog.mjs +3 -17
  205. package/lib/components/VDataTable/VEditDialog.mjs.map +1 -1
  206. package/lib/components/VDataTable/VVirtualTable.mjs +3 -28
  207. package/lib/components/VDataTable/VVirtualTable.mjs.map +1 -1
  208. package/lib/components/VDataTable/index.mjs +0 -1
  209. package/lib/components/VDataTable/index.mjs.map +1 -1
  210. package/lib/components/VDataTable/mixins/header.mjs +0 -5
  211. package/lib/components/VDataTable/mixins/header.mjs.map +1 -1
  212. package/lib/components/VDatePicker/VDatePicker.mjs +2 -69
  213. package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
  214. package/lib/components/VDatePicker/VDatePickerDateTable.mjs +1 -29
  215. package/lib/components/VDatePicker/VDatePickerDateTable.mjs.map +1 -1
  216. package/lib/components/VDatePicker/VDatePickerHeader.mjs +4 -17
  217. package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +1 -1
  218. package/lib/components/VDatePicker/VDatePickerMonthTable.mjs +1 -12
  219. package/lib/components/VDatePicker/VDatePickerMonthTable.mjs.map +1 -1
  220. package/lib/components/VDatePicker/VDatePickerTitle.mjs +4 -15
  221. package/lib/components/VDatePicker/VDatePickerTitle.mjs.map +1 -1
  222. package/lib/components/VDatePicker/VDatePickerYears.mjs +4 -18
  223. package/lib/components/VDatePicker/VDatePickerYears.mjs.map +1 -1
  224. package/lib/components/VDatePicker/index.mjs.map +1 -1
  225. package/lib/components/VDatePicker/mixins/date-picker-table.mjs +6 -33
  226. package/lib/components/VDatePicker/mixins/date-picker-table.mjs.map +1 -1
  227. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs +0 -5
  228. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs.map +1 -1
  229. package/lib/components/VDatePicker/util/eventHelpers.mjs +2 -3
  230. package/lib/components/VDatePicker/util/eventHelpers.mjs.map +1 -1
  231. package/lib/components/VDatePicker/util/index.mjs +0 -1
  232. package/lib/components/VDatePicker/util/index.mjs.map +1 -1
  233. package/lib/components/VDatePicker/util/isDateAllowed.mjs +1 -1
  234. package/lib/components/VDatePicker/util/isDateAllowed.mjs.map +1 -1
  235. package/lib/components/VDatePicker/util/monthChange.mjs +0 -3
  236. package/lib/components/VDatePicker/util/monthChange.mjs.map +1 -1
  237. package/lib/components/VDatePicker/util/pad.mjs +1 -6
  238. package/lib/components/VDatePicker/util/pad.mjs.map +1 -1
  239. package/lib/components/VDatePicker/util/sanitizeDateString.mjs.map +1 -1
  240. package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +2 -4
  241. package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs.map +1 -1
  242. package/lib/components/VDefaultsProvider/index.d.ts +1 -0
  243. package/lib/components/VDefaultsProvider/index.mjs.map +1 -1
  244. package/lib/components/VDialog/VDialog.mjs +7 -20
  245. package/lib/components/VDialog/VDialog.mjs.map +1 -1
  246. package/lib/components/VDialog/index.d.ts +1208 -188
  247. package/lib/components/VDialog/index.mjs.map +1 -1
  248. package/lib/components/VDivider/VDivider.mjs +2 -8
  249. package/lib/components/VDivider/VDivider.mjs.map +1 -1
  250. package/lib/components/VDivider/index.d.ts +1 -0
  251. package/lib/components/VDivider/index.mjs.map +1 -1
  252. package/lib/components/VExpansionPanel/VExpansionPanel.mjs +0 -5
  253. package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
  254. package/lib/components/VExpansionPanel/VExpansionPanelText.mjs +2 -6
  255. package/lib/components/VExpansionPanel/VExpansionPanelText.mjs.map +1 -1
  256. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +3 -8
  257. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
  258. package/lib/components/VExpansionPanel/VExpansionPanels.mjs +2 -5
  259. package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
  260. package/lib/components/VExpansionPanel/index.mjs.map +1 -1
  261. package/lib/components/VField/VField.css +1 -1
  262. package/lib/components/VField/VField.mjs +4 -11
  263. package/lib/components/VField/VField.mjs.map +1 -1
  264. package/lib/components/VField/VField.sass +0 -1
  265. package/lib/components/VField/VFieldLabel.mjs +0 -3
  266. package/lib/components/VField/VFieldLabel.mjs.map +1 -1
  267. package/lib/components/VField/index.d.ts +33 -59
  268. package/lib/components/VField/index.mjs.map +1 -1
  269. package/lib/components/VFileInput/VFileInput.css +16 -0
  270. package/lib/components/VFileInput/VFileInput.mjs +6 -20
  271. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  272. package/lib/components/VFileInput/VFileInput.sass +10 -0
  273. package/lib/components/VFileInput/_variables.scss +2 -0
  274. package/lib/components/VFileInput/index.d.ts +233 -5
  275. package/lib/components/VFileInput/index.mjs.map +1 -1
  276. package/lib/components/VFooter/VFooter.mjs +2 -4
  277. package/lib/components/VFooter/VFooter.mjs.map +1 -1
  278. package/lib/components/VFooter/index.d.ts +1 -0
  279. package/lib/components/VFooter/index.mjs.map +1 -1
  280. package/lib/components/VForm/VForm.mjs +2 -13
  281. package/lib/components/VForm/VForm.mjs.map +1 -1
  282. package/lib/components/VForm/index.d.ts +1 -1
  283. package/lib/components/VForm/index.mjs.map +1 -1
  284. package/lib/components/VGrid/VCol.mjs +8 -23
  285. package/lib/components/VGrid/VCol.mjs.map +1 -1
  286. package/lib/components/VGrid/VContainer.mjs +2 -4
  287. package/lib/components/VGrid/VContainer.mjs.map +1 -1
  288. package/lib/components/VGrid/VRow.mjs +6 -24
  289. package/lib/components/VGrid/VRow.mjs.map +1 -1
  290. package/lib/components/VGrid/VSpacer.mjs.map +1 -1
  291. package/lib/components/VGrid/index.d.ts +2 -0
  292. package/lib/components/VGrid/index.mjs.map +1 -1
  293. package/lib/components/VHover/VHover.mjs +0 -4
  294. package/lib/components/VHover/VHover.mjs.map +1 -1
  295. package/lib/components/VHover/index.d.ts +1 -0
  296. package/lib/components/VHover/index.mjs.map +1 -1
  297. package/lib/components/VIcon/VIcon.mjs +2 -8
  298. package/lib/components/VIcon/VIcon.mjs.map +1 -1
  299. package/lib/components/VIcon/index.d.ts +1 -0
  300. package/lib/components/VIcon/index.mjs.map +1 -1
  301. package/lib/components/VImg/VImg.mjs +9 -35
  302. package/lib/components/VImg/VImg.mjs.map +1 -1
  303. package/lib/components/VImg/index.d.ts +8 -4
  304. package/lib/components/VImg/index.mjs.map +1 -1
  305. package/lib/components/VInput/InputIcon.mjs +0 -2
  306. package/lib/components/VInput/InputIcon.mjs.map +1 -1
  307. package/lib/components/VInput/VInput.mjs +5 -9
  308. package/lib/components/VInput/VInput.mjs.map +1 -1
  309. package/lib/components/VInput/index.d.ts +29 -45
  310. package/lib/components/VInput/index.mjs.map +1 -1
  311. package/lib/components/VItemGroup/VItem.mjs +0 -5
  312. package/lib/components/VItemGroup/VItem.mjs.map +1 -1
  313. package/lib/components/VItemGroup/VItemGroup.mjs +4 -6
  314. package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
  315. package/lib/components/VItemGroup/index.d.ts +19 -25
  316. package/lib/components/VItemGroup/index.mjs.map +1 -1
  317. package/lib/components/VKbd/index.d.ts +1 -0
  318. package/lib/components/VKbd/index.mjs.map +1 -1
  319. package/lib/components/VLabel/VLabel.mjs +2 -5
  320. package/lib/components/VLabel/VLabel.mjs.map +1 -1
  321. package/lib/components/VLabel/index.mjs.map +1 -1
  322. package/lib/components/VLayout/VLayout.mjs +2 -5
  323. package/lib/components/VLayout/VLayout.mjs.map +1 -1
  324. package/lib/components/VLayout/VLayoutItem.mjs +2 -6
  325. package/lib/components/VLayout/VLayoutItem.mjs.map +1 -1
  326. package/lib/components/VLayout/index.d.ts +5 -2
  327. package/lib/components/VLayout/index.mjs.map +1 -1
  328. package/lib/components/VLazy/VLazy.mjs +0 -8
  329. package/lib/components/VLazy/VLazy.mjs.map +1 -1
  330. package/lib/components/VLazy/index.d.ts +1 -0
  331. package/lib/components/VLazy/index.mjs.map +1 -1
  332. package/lib/components/VList/VList.mjs +2 -11
  333. package/lib/components/VList/VList.mjs.map +1 -1
  334. package/lib/components/VList/VListChildren.mjs +12 -21
  335. package/lib/components/VList/VListChildren.mjs.map +1 -1
  336. package/lib/components/VList/VListGroup.mjs +1 -12
  337. package/lib/components/VList/VListGroup.mjs.map +1 -1
  338. package/lib/components/VList/VListImg.mjs.map +1 -1
  339. package/lib/components/VList/VListItem.mjs +2 -12
  340. package/lib/components/VList/VListItem.mjs.map +1 -1
  341. package/lib/components/VList/VListItemAction.mjs +0 -3
  342. package/lib/components/VList/VListItemAction.mjs.map +1 -1
  343. package/lib/components/VList/VListItemMedia.mjs +0 -3
  344. package/lib/components/VList/VListItemMedia.mjs.map +1 -1
  345. package/lib/components/VList/VListItemSubtitle.mjs.map +1 -1
  346. package/lib/components/VList/VListItemTitle.mjs.map +1 -1
  347. package/lib/components/VList/VListSubheader.mjs +0 -4
  348. package/lib/components/VList/VListSubheader.mjs.map +1 -1
  349. package/lib/components/VList/index.d.ts +147 -170
  350. package/lib/components/VList/index.mjs.map +1 -1
  351. package/lib/components/VList/list.mjs +5 -2
  352. package/lib/components/VList/list.mjs.map +1 -1
  353. package/lib/components/VLocaleProvider/VLocaleProvider.mjs +4 -9
  354. package/lib/components/VLocaleProvider/VLocaleProvider.mjs.map +1 -1
  355. package/lib/components/VLocaleProvider/index.d.ts +1 -0
  356. package/lib/components/VLocaleProvider/index.mjs.map +1 -1
  357. package/lib/components/VMain/VMain.mjs +2 -5
  358. package/lib/components/VMain/VMain.mjs.map +1 -1
  359. package/lib/components/VMain/index.d.ts +1 -0
  360. package/lib/components/VMain/index.mjs.map +1 -1
  361. package/lib/components/VMenu/VMenu.mjs +3 -14
  362. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  363. package/lib/components/VMenu/index.d.ts +1203 -183
  364. package/lib/components/VMenu/index.mjs.map +1 -1
  365. package/lib/components/VMenu/shared.mjs.map +1 -1
  366. package/lib/components/VMessages/VMessages.mjs +2 -6
  367. package/lib/components/VMessages/VMessages.mjs.map +1 -1
  368. package/lib/components/VMessages/index.d.ts +1 -0
  369. package/lib/components/VMessages/index.mjs.map +1 -1
  370. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +6 -11
  371. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  372. package/lib/components/VNavigationDrawer/index.mjs.map +1 -1
  373. package/lib/components/VNavigationDrawer/sticky.mjs +0 -4
  374. package/lib/components/VNavigationDrawer/sticky.mjs.map +1 -1
  375. package/lib/components/VNavigationDrawer/touch.mjs +2 -15
  376. package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
  377. package/lib/components/VNoSsr/VNoSsr.mjs +0 -4
  378. package/lib/components/VNoSsr/VNoSsr.mjs.map +1 -1
  379. package/lib/components/VNoSsr/index.d.ts +1 -0
  380. package/lib/components/VNoSsr/index.mjs.map +1 -1
  381. package/lib/components/VOtpInput/VOtpInput.mjs +7 -58
  382. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  383. package/lib/components/VOtpInput/index.mjs.map +1 -1
  384. package/lib/components/VOverflowBtn/VOverflowBtn.mjs +7 -19
  385. package/lib/components/VOverflowBtn/VOverflowBtn.mjs.map +1 -1
  386. package/lib/components/VOverflowBtn/index.mjs.map +1 -1
  387. package/lib/components/VOverlay/VOverlay.mjs +8 -17
  388. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  389. package/lib/components/VOverlay/index.d.ts +32 -60
  390. package/lib/components/VOverlay/index.mjs.map +1 -1
  391. package/lib/components/VOverlay/locationStrategies.mjs +23 -56
  392. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  393. package/lib/components/VOverlay/requestNewFrame.mjs +1 -2
  394. package/lib/components/VOverlay/requestNewFrame.mjs.map +1 -1
  395. package/lib/components/VOverlay/scrollStrategies.mjs +2 -18
  396. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  397. package/lib/components/VOverlay/useActivator.mjs +6 -32
  398. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  399. package/lib/components/VOverlay/util/point.mjs +3 -4
  400. package/lib/components/VOverlay/util/point.mjs.map +1 -1
  401. package/lib/components/VPagination/VPagination.mjs +11 -23
  402. package/lib/components/VPagination/VPagination.mjs.map +1 -1
  403. package/lib/components/VPagination/index.d.ts +5 -3
  404. package/lib/components/VPagination/index.mjs.map +1 -1
  405. package/lib/components/VParallax/VParallax.mjs +6 -12
  406. package/lib/components/VParallax/VParallax.mjs.map +1 -1
  407. package/lib/components/VParallax/index.mjs.map +1 -1
  408. package/lib/components/VPicker/VPicker.mjs +3 -12
  409. package/lib/components/VPicker/VPicker.mjs.map +1 -1
  410. package/lib/components/VPicker/index.mjs.map +1 -1
  411. package/lib/components/VProgressCircular/VProgressCircular.mjs +2 -5
  412. package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
  413. package/lib/components/VProgressCircular/index.d.ts +1 -0
  414. package/lib/components/VProgressCircular/index.mjs.map +1 -1
  415. package/lib/components/VProgressLinear/VProgressLinear.mjs +5 -8
  416. package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
  417. package/lib/components/VProgressLinear/index.d.ts +1 -0
  418. package/lib/components/VProgressLinear/index.mjs.map +1 -1
  419. package/lib/components/VRadio/VRadio.mjs +2 -4
  420. package/lib/components/VRadio/VRadio.mjs.map +1 -1
  421. package/lib/components/VRadio/index.d.ts +13 -11
  422. package/lib/components/VRadio/index.mjs.map +1 -1
  423. package/lib/components/VRadioGroup/VRadioGroup.mjs +15 -20
  424. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  425. package/lib/components/VRadioGroup/index.d.ts +26 -38
  426. package/lib/components/VRadioGroup/index.mjs.map +1 -1
  427. package/lib/components/VRangeSlider/VRangeSlider.mjs +13 -26
  428. package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
  429. package/lib/components/VRangeSlider/index.d.ts +5 -3
  430. package/lib/components/VRangeSlider/index.mjs.map +1 -1
  431. package/lib/components/VRating/VRating.mjs +4 -22
  432. package/lib/components/VRating/VRating.mjs.map +1 -1
  433. package/lib/components/VRating/index.d.ts +32 -40
  434. package/lib/components/VRating/index.mjs.map +1 -1
  435. package/lib/components/VResponsive/VResponsive.mjs +2 -5
  436. package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
  437. package/lib/components/VResponsive/index.d.ts +1 -0
  438. package/lib/components/VResponsive/index.mjs.map +1 -1
  439. package/lib/components/VSelect/VSelect.css +13 -0
  440. package/lib/components/VSelect/VSelect.mjs +9 -22
  441. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  442. package/lib/components/VSelect/VSelect.sass +6 -0
  443. package/lib/components/VSelect/_variables.scss +1 -0
  444. package/lib/components/VSelect/index.d.ts +4264 -776
  445. package/lib/components/VSelect/index.mjs.map +1 -1
  446. package/lib/components/VSelectionControl/VSelectionControl.mjs +14 -58
  447. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  448. package/lib/components/VSelectionControl/index.d.ts +62 -78
  449. package/lib/components/VSelectionControl/index.mjs.map +1 -1
  450. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +1 -0
  451. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +56 -28
  452. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
  453. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.sass +1 -0
  454. package/lib/components/VSelectionControlGroup/index.d.ts +53 -4
  455. package/lib/components/VSelectionControlGroup/index.mjs.map +1 -1
  456. package/lib/components/VSheet/VSheet.mjs +2 -4
  457. package/lib/components/VSheet/VSheet.mjs.map +1 -1
  458. package/lib/components/VSheet/index.d.ts +1 -0
  459. package/lib/components/VSheet/index.mjs.map +1 -1
  460. package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs +19 -32
  461. package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
  462. package/lib/components/VSkeletonLoader/index.mjs.map +1 -1
  463. package/lib/components/VSlideGroup/VSlideGroup.mjs +16 -47
  464. package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
  465. package/lib/components/VSlideGroup/VSlideGroupItem.mjs +5 -9
  466. package/lib/components/VSlideGroup/VSlideGroupItem.mjs.map +1 -1
  467. package/lib/components/VSlideGroup/helpers.mjs +0 -2
  468. package/lib/components/VSlideGroup/helpers.mjs.map +1 -1
  469. package/lib/components/VSlideGroup/index.d.ts +342 -59
  470. package/lib/components/VSlideGroup/index.mjs.map +1 -1
  471. package/lib/components/VSlider/VSlider.mjs +6 -9
  472. package/lib/components/VSlider/VSlider.mjs.map +1 -1
  473. package/lib/components/VSlider/VSliderThumb.mjs +4 -15
  474. package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
  475. package/lib/components/VSlider/VSliderTrack.mjs +6 -8
  476. package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
  477. package/lib/components/VSlider/index.d.ts +5 -3
  478. package/lib/components/VSlider/index.mjs.map +1 -1
  479. package/lib/components/VSlider/slider.mjs +6 -27
  480. package/lib/components/VSlider/slider.mjs.map +1 -1
  481. package/lib/components/VSnackbar/VSnackbar.mjs +3 -10
  482. package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
  483. package/lib/components/VSnackbar/index.d.ts +1215 -191
  484. package/lib/components/VSnackbar/index.mjs.map +1 -1
  485. package/lib/components/VSparkline/VSparkline.mjs +5 -40
  486. package/lib/components/VSparkline/VSparkline.mjs.map +1 -1
  487. package/lib/components/VSparkline/helpers/core.mjs +1 -1
  488. package/lib/components/VSparkline/helpers/core.mjs.map +1 -1
  489. package/lib/components/VSparkline/helpers/math.mjs +2 -3
  490. package/lib/components/VSparkline/helpers/math.mjs.map +1 -1
  491. package/lib/components/VSparkline/helpers/path.mjs +0 -4
  492. package/lib/components/VSparkline/helpers/path.mjs.map +1 -1
  493. package/lib/components/VSparkline/index.mjs.map +1 -1
  494. package/lib/components/VSpeedDial/VSpeedDial.mjs +3 -12
  495. package/lib/components/VSpeedDial/VSpeedDial.mjs.map +1 -1
  496. package/lib/components/VSpeedDial/index.mjs.map +1 -1
  497. package/lib/components/VStepper/VStepper.mjs +5 -24
  498. package/lib/components/VStepper/VStepper.mjs.map +1 -1
  499. package/lib/components/VStepper/VStepperContent.mjs +4 -25
  500. package/lib/components/VStepper/VStepperContent.mjs.map +1 -1
  501. package/lib/components/VStepper/VStepperStep.mjs +0 -24
  502. package/lib/components/VStepper/VStepperStep.mjs.map +1 -1
  503. package/lib/components/VStepper/index.mjs.map +1 -1
  504. package/lib/components/VSwitch/VSwitch.mjs +14 -15
  505. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  506. package/lib/components/VSwitch/index.d.ts +15 -11
  507. package/lib/components/VSwitch/index.mjs.map +1 -1
  508. package/lib/components/VSystemBar/VSystemBar.mjs +2 -4
  509. package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
  510. package/lib/components/VSystemBar/index.d.ts +1 -0
  511. package/lib/components/VSystemBar/index.mjs.map +1 -1
  512. package/lib/components/VTable/VTable.css +3 -3
  513. package/lib/components/VTable/VTable.mjs +5 -6
  514. package/lib/components/VTable/VTable.mjs.map +1 -1
  515. package/lib/components/VTable/VTable.sass +9 -3
  516. package/lib/components/VTable/index.d.ts +8 -3
  517. package/lib/components/VTable/index.mjs.map +1 -1
  518. package/lib/components/VTabs/VTab.mjs +2 -10
  519. package/lib/components/VTabs/VTab.mjs.map +1 -1
  520. package/lib/components/VTabs/VTabs.css +5 -5
  521. package/lib/components/VTabs/VTabs.mjs +12 -17
  522. package/lib/components/VTabs/VTabs.mjs.map +1 -1
  523. package/lib/components/VTabs/VTabs.sass +4 -4
  524. package/lib/components/VTabs/_variables.scss +1 -1
  525. package/lib/components/VTabs/index.d.ts +23 -15
  526. package/lib/components/VTabs/index.mjs.map +1 -1
  527. package/lib/components/VTabs/shared.mjs.map +1 -1
  528. package/lib/components/VTextField/VTextField.mjs +13 -24
  529. package/lib/components/VTextField/VTextField.mjs.map +1 -1
  530. package/lib/components/VTextField/index.d.ts +1375 -191
  531. package/lib/components/VTextField/index.mjs.map +1 -1
  532. package/lib/components/VTextarea/VTextarea.mjs +6 -24
  533. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  534. package/lib/components/VTextarea/index.d.ts +233 -5
  535. package/lib/components/VTextarea/index.mjs.map +1 -1
  536. package/lib/components/VThemeProvider/VThemeProvider.mjs +2 -5
  537. package/lib/components/VThemeProvider/VThemeProvider.mjs.map +1 -1
  538. package/lib/components/VThemeProvider/index.d.ts +1 -0
  539. package/lib/components/VThemeProvider/index.mjs.map +1 -1
  540. package/lib/components/VTimePicker/SelectingTimes.mjs +0 -3
  541. package/lib/components/VTimePicker/SelectingTimes.mjs.map +1 -1
  542. package/lib/components/VTimePicker/VTimePicker.mjs +3 -53
  543. package/lib/components/VTimePicker/VTimePicker.mjs.map +1 -1
  544. package/lib/components/VTimePicker/VTimePickerClock.mjs +6 -42
  545. package/lib/components/VTimePicker/VTimePickerClock.mjs.map +1 -1
  546. package/lib/components/VTimePicker/VTimePickerTitle.mjs +4 -13
  547. package/lib/components/VTimePicker/VTimePickerTitle.mjs.map +1 -1
  548. package/lib/components/VTimePicker/index.mjs.map +1 -1
  549. package/lib/components/VTimeline/VTimeline.mjs +2 -9
  550. package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
  551. package/lib/components/VTimeline/VTimelineDivider.mjs +0 -5
  552. package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
  553. package/lib/components/VTimeline/VTimelineItem.mjs +0 -6
  554. package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
  555. package/lib/components/VTimeline/index.d.ts +7 -3
  556. package/lib/components/VTimeline/index.mjs.map +1 -1
  557. package/lib/components/VToolbar/VToolbar.mjs +2 -8
  558. package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
  559. package/lib/components/VToolbar/VToolbarItems.mjs +0 -4
  560. package/lib/components/VToolbar/VToolbarItems.mjs.map +1 -1
  561. package/lib/components/VToolbar/VToolbarTitle.mjs +0 -5
  562. package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -1
  563. package/lib/components/VToolbar/index.d.ts +34 -71
  564. package/lib/components/VToolbar/index.mjs.map +1 -1
  565. package/lib/components/VTooltip/VTooltip.mjs +2 -8
  566. package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
  567. package/lib/components/VTooltip/index.d.ts +1196 -176
  568. package/lib/components/VTooltip/index.mjs.map +1 -1
  569. package/lib/components/VTreeview/VTreeview.mjs +17 -72
  570. package/lib/components/VTreeview/VTreeview.mjs.map +1 -1
  571. package/lib/components/VTreeview/VTreeviewNode.mjs +2 -32
  572. package/lib/components/VTreeview/VTreeviewNode.mjs.map +1 -1
  573. package/lib/components/VTreeview/index.mjs.map +1 -1
  574. package/lib/components/VTreeview/util/filterTreeItems.mjs +0 -6
  575. package/lib/components/VTreeview/util/filterTreeItems.mjs.map +1 -1
  576. package/lib/components/VValidation/VValidation.mjs +2 -5
  577. package/lib/components/VValidation/VValidation.mjs.map +1 -1
  578. package/lib/components/VValidation/index.d.ts +1 -0
  579. package/lib/components/VValidation/index.mjs.map +1 -1
  580. package/lib/components/VVirtualScroll/VVirtualScroll.mjs +3 -18
  581. package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
  582. package/lib/components/VVirtualScroll/index.mjs.map +1 -1
  583. package/lib/components/VWindow/VWindow.mjs +5 -15
  584. package/lib/components/VWindow/VWindow.mjs.map +1 -1
  585. package/lib/components/VWindow/VWindowItem.mjs +8 -21
  586. package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
  587. package/lib/components/VWindow/index.d.ts +37 -87
  588. package/lib/components/VWindow/index.mjs.map +1 -1
  589. package/lib/components/index.d.ts +16084 -6799
  590. package/lib/components/index.mjs +0 -11
  591. package/lib/components/index.mjs.map +1 -1
  592. package/lib/components/transitions/createTransition.mjs +0 -10
  593. package/lib/components/transitions/createTransition.mjs.map +1 -1
  594. package/lib/components/transitions/dialog-transition.mjs +3 -18
  595. package/lib/components/transitions/dialog-transition.mjs.map +1 -1
  596. package/lib/components/transitions/expand-transition.mjs +2 -11
  597. package/lib/components/transitions/expand-transition.mjs.map +1 -1
  598. package/lib/components/transitions/index.d.ts +16 -0
  599. package/lib/components/transitions/index.mjs +5 -4
  600. package/lib/components/transitions/index.mjs.map +1 -1
  601. package/lib/composables/border.mjs +0 -3
  602. package/lib/composables/border.mjs.map +1 -1
  603. package/lib/composables/color.mjs +0 -4
  604. package/lib/composables/color.mjs.map +1 -1
  605. package/lib/composables/defaults.mjs +0 -5
  606. package/lib/composables/defaults.mjs.map +1 -1
  607. package/lib/composables/delay.mjs +0 -3
  608. package/lib/composables/delay.mjs.map +1 -1
  609. package/lib/composables/density.mjs +4 -1
  610. package/lib/composables/density.mjs.map +1 -1
  611. package/lib/composables/dimensions.mjs +0 -1
  612. package/lib/composables/dimensions.mjs.map +1 -1
  613. package/lib/composables/display.mjs +7 -20
  614. package/lib/composables/display.mjs.map +1 -1
  615. package/lib/composables/elevation.mjs +2 -4
  616. package/lib/composables/elevation.mjs.map +1 -1
  617. package/lib/composables/filter.mjs +7 -14
  618. package/lib/composables/filter.mjs.map +1 -1
  619. package/lib/composables/focus.mjs +0 -5
  620. package/lib/composables/focus.mjs.map +1 -1
  621. package/lib/composables/form.mjs +1 -14
  622. package/lib/composables/form.mjs.map +1 -1
  623. package/lib/composables/forwardRefs.mjs +9 -16
  624. package/lib/composables/forwardRefs.mjs.map +1 -1
  625. package/lib/composables/group.mjs +10 -33
  626. package/lib/composables/group.mjs.map +1 -1
  627. package/lib/composables/hydration.mjs +0 -1
  628. package/lib/composables/hydration.mjs.map +1 -1
  629. package/lib/composables/icons.mjs +4 -17
  630. package/lib/composables/icons.mjs.map +1 -1
  631. package/lib/composables/index.mjs +1 -2
  632. package/lib/composables/index.mjs.map +1 -1
  633. package/lib/composables/intersectionObserver.mjs +0 -3
  634. package/lib/composables/intersectionObserver.mjs.map +1 -1
  635. package/lib/composables/items.mjs +3 -15
  636. package/lib/composables/items.mjs.map +1 -1
  637. package/lib/composables/layout.mjs +29 -31
  638. package/lib/composables/layout.mjs.map +1 -1
  639. package/lib/composables/lazy.mjs +2 -3
  640. package/lib/composables/lazy.mjs.map +1 -1
  641. package/lib/composables/loader.mjs +0 -3
  642. package/lib/composables/loader.mjs.map +1 -1
  643. package/lib/composables/locale.mjs +46 -118
  644. package/lib/composables/locale.mjs.map +1 -1
  645. package/lib/composables/location.mjs +1 -8
  646. package/lib/composables/location.mjs.map +1 -1
  647. package/lib/composables/mutationObserver.mjs +3 -1
  648. package/lib/composables/mutationObserver.mjs.map +1 -1
  649. package/lib/composables/nested/nested.mjs +4 -20
  650. package/lib/composables/nested/nested.mjs.map +1 -1
  651. package/lib/composables/nested/openStrategies.mjs +0 -9
  652. package/lib/composables/nested/openStrategies.mjs.map +1 -1
  653. package/lib/composables/nested/selectStrategies.mjs +6 -21
  654. package/lib/composables/nested/selectStrategies.mjs.map +1 -1
  655. package/lib/composables/position.mjs +1 -4
  656. package/lib/composables/position.mjs.map +1 -1
  657. package/lib/composables/proxiedModel.mjs +3 -9
  658. package/lib/composables/proxiedModel.mjs.map +1 -1
  659. package/lib/composables/refs.mjs +0 -2
  660. package/lib/composables/refs.mjs.map +1 -1
  661. package/lib/composables/resizeObserver.mjs +0 -3
  662. package/lib/composables/resizeObserver.mjs.map +1 -1
  663. package/lib/composables/rounded.mjs +0 -3
  664. package/lib/composables/rounded.mjs.map +1 -1
  665. package/lib/composables/router.mjs +3 -11
  666. package/lib/composables/router.mjs.map +1 -1
  667. package/lib/composables/scopeId.mjs.map +1 -1
  668. package/lib/composables/scroll.mjs +3 -9
  669. package/lib/composables/scroll.mjs.map +1 -1
  670. package/lib/composables/selectLink.mjs +3 -2
  671. package/lib/composables/selectLink.mjs.map +1 -1
  672. package/lib/composables/size.mjs +0 -3
  673. package/lib/composables/size.mjs.map +1 -1
  674. package/lib/composables/ssrBoot.mjs +2 -1
  675. package/lib/composables/ssrBoot.mjs.map +1 -1
  676. package/lib/composables/stack.mjs +0 -6
  677. package/lib/composables/stack.mjs.map +1 -1
  678. package/lib/composables/tag.mjs +0 -1
  679. package/lib/composables/tag.mjs.map +1 -1
  680. package/lib/composables/teleport.mjs +0 -4
  681. package/lib/composables/teleport.mjs.map +1 -1
  682. package/lib/composables/theme.mjs +18 -38
  683. package/lib/composables/theme.mjs.map +1 -1
  684. package/lib/composables/toggleScope.mjs +0 -1
  685. package/lib/composables/toggleScope.mjs.map +1 -1
  686. package/lib/composables/touch.mjs +5 -28
  687. package/lib/composables/touch.mjs.map +1 -1
  688. package/lib/composables/transition.mjs +0 -2
  689. package/lib/composables/transition.mjs.map +1 -1
  690. package/lib/composables/validation.mjs +3 -13
  691. package/lib/composables/validation.mjs.map +1 -1
  692. package/lib/composables/variant.mjs +0 -2
  693. package/lib/composables/variant.mjs.map +1 -1
  694. package/lib/directives/click-outside/index.mjs +10 -22
  695. package/lib/directives/click-outside/index.mjs.map +1 -1
  696. package/lib/directives/color/index.mjs +0 -11
  697. package/lib/directives/color/index.mjs.map +1 -1
  698. package/lib/directives/index.d.ts +104 -13
  699. package/lib/directives/index.mjs +0 -1
  700. package/lib/directives/index.mjs.map +1 -1
  701. package/lib/directives/intersect/index.mjs +3 -10
  702. package/lib/directives/intersect/index.mjs.map +1 -1
  703. package/lib/directives/mutate/index.mjs +1 -5
  704. package/lib/directives/mutate/index.mjs.map +1 -1
  705. package/lib/directives/resize/index.mjs +0 -5
  706. package/lib/directives/resize/index.mjs.map +1 -1
  707. package/lib/directives/ripple/index.mjs +11 -63
  708. package/lib/directives/ripple/index.mjs.map +1 -1
  709. package/lib/directives/scroll/index.mjs +0 -4
  710. package/lib/directives/scroll/index.mjs.map +1 -1
  711. package/lib/directives/touch/index.mjs +0 -15
  712. package/lib/directives/touch/index.mjs.map +1 -1
  713. package/lib/entry-bundler.mjs +1 -1
  714. package/lib/entry-bundler.mjs.map +1 -1
  715. package/lib/framework.mjs +24 -22
  716. package/lib/framework.mjs.map +1 -1
  717. package/lib/iconsets/fa-svg.mjs +0 -1
  718. package/lib/iconsets/fa-svg.mjs.map +1 -1
  719. package/lib/iconsets/fa.mjs +0 -1
  720. package/lib/iconsets/fa.mjs.map +1 -1
  721. package/lib/iconsets/fa4.mjs +4 -3
  722. package/lib/iconsets/fa4.mjs.map +1 -1
  723. package/lib/iconsets/md.mjs +4 -3
  724. package/lib/iconsets/md.mjs.map +1 -1
  725. package/lib/iconsets/mdi-svg.mjs +0 -1
  726. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  727. package/lib/iconsets/mdi.mjs +4 -3
  728. package/lib/iconsets/mdi.mjs.map +1 -1
  729. package/lib/index.d.ts +92 -106
  730. package/lib/locale/adapters/vue-i18n.d.ts +10 -16
  731. package/lib/locale/adapters/vue-i18n.mjs +59 -52
  732. package/lib/locale/adapters/vue-i18n.mjs.map +1 -1
  733. package/lib/locale/adapters/vuetify.d.ts +24 -0
  734. package/lib/locale/adapters/vuetify.mjs +97 -0
  735. package/lib/locale/adapters/vuetify.mjs.map +1 -0
  736. package/lib/locale/af.mjs.map +1 -1
  737. package/lib/locale/ar.mjs.map +1 -1
  738. package/lib/locale/az.mjs.map +1 -1
  739. package/lib/locale/bg.mjs.map +1 -1
  740. package/lib/locale/ca.mjs.map +1 -1
  741. package/lib/locale/ckb.mjs.map +1 -1
  742. package/lib/locale/cs.mjs.map +1 -1
  743. package/lib/locale/da.mjs.map +1 -1
  744. package/lib/locale/de.mjs.map +1 -1
  745. package/lib/locale/el.mjs.map +1 -1
  746. package/lib/locale/en.mjs.map +1 -1
  747. package/lib/locale/es.mjs.map +1 -1
  748. package/lib/locale/et.mjs.map +1 -1
  749. package/lib/locale/fa.mjs.map +1 -1
  750. package/lib/locale/fi.mjs.map +1 -1
  751. package/lib/locale/fr.mjs.map +1 -1
  752. package/lib/locale/he.mjs.map +1 -1
  753. package/lib/locale/hr.mjs.map +1 -1
  754. package/lib/locale/hu.mjs.map +1 -1
  755. package/lib/locale/id.mjs.map +1 -1
  756. package/lib/locale/index.d.ts +2 -2
  757. package/lib/locale/index.mjs +1 -1
  758. package/lib/locale/index.mjs.map +1 -1
  759. package/lib/locale/it.mjs.map +1 -1
  760. package/lib/locale/ja.mjs.map +1 -1
  761. package/lib/locale/ko.mjs.map +1 -1
  762. package/lib/locale/lt.mjs.map +1 -1
  763. package/lib/locale/lv.mjs.map +1 -1
  764. package/lib/locale/nl.mjs.map +1 -1
  765. package/lib/locale/no.mjs.map +1 -1
  766. package/lib/locale/pl.mjs +7 -7
  767. package/lib/locale/pl.mjs.map +1 -1
  768. package/lib/locale/pt.mjs.map +1 -1
  769. package/lib/locale/ro.mjs.map +1 -1
  770. package/lib/locale/ru.mjs.map +1 -1
  771. package/lib/locale/sk.mjs.map +1 -1
  772. package/lib/locale/sl.mjs.map +1 -1
  773. package/lib/locale/sr-Cyrl.mjs.map +1 -1
  774. package/lib/locale/sr-Latn.mjs.map +1 -1
  775. package/lib/locale/sv.mjs.map +1 -1
  776. package/lib/locale/th.mjs.map +1 -1
  777. package/lib/locale/tr.mjs.map +1 -1
  778. package/lib/locale/uk.mjs.map +1 -1
  779. package/lib/locale/vi.mjs.map +1 -1
  780. package/lib/locale/zh-Hans.mjs.map +1 -1
  781. package/lib/locale/zh-Hant.mjs.map +1 -1
  782. package/lib/services/goto/easing-patterns.mjs +24 -24
  783. package/lib/services/goto/easing-patterns.mjs.map +1 -1
  784. package/lib/services/goto/index.mjs +11 -15
  785. package/lib/services/goto/index.mjs.map +1 -1
  786. package/lib/services/goto/util.mjs +1 -8
  787. package/lib/services/goto/util.mjs.map +1 -1
  788. package/lib/styles/main.css +4 -0
  789. package/lib/styles/settings/_utilities.scss +7 -0
  790. package/lib/util/anchor.mjs +0 -3
  791. package/lib/util/anchor.mjs.map +1 -1
  792. package/lib/util/animation.mjs +0 -6
  793. package/lib/util/animation.mjs.map +1 -1
  794. package/lib/util/box.mjs +0 -5
  795. package/lib/util/box.mjs.map +1 -1
  796. package/lib/util/color/APCA.mjs +23 -21
  797. package/lib/util/color/APCA.mjs.map +1 -1
  798. package/lib/util/color/transformCIELAB.mjs +0 -2
  799. package/lib/util/color/transformCIELAB.mjs.map +1 -1
  800. package/lib/util/color/transformSRGB.mjs +14 -12
  801. package/lib/util/color/transformSRGB.mjs.map +1 -1
  802. package/lib/util/colorUtils.mjs +8 -25
  803. package/lib/util/colorUtils.mjs.map +1 -1
  804. package/lib/util/colors.mjs.map +1 -1
  805. package/lib/util/console.mjs +5 -14
  806. package/lib/util/console.mjs.map +1 -1
  807. package/lib/util/createSimpleFunctional.mjs +0 -3
  808. package/lib/util/createSimpleFunctional.mjs.map +1 -1
  809. package/lib/util/dateTimeUtils.mjs +0 -10
  810. package/lib/util/dateTimeUtils.mjs.map +1 -1
  811. package/lib/util/defineComponent.mjs +6 -22
  812. package/lib/util/defineComponent.mjs.map +1 -1
  813. package/lib/util/dom.mjs +4 -4
  814. package/lib/util/dom.mjs.map +1 -1
  815. package/lib/util/easing.mjs +0 -1
  816. package/lib/util/easing.mjs.map +1 -1
  817. package/lib/util/getCurrentInstance.mjs +1 -7
  818. package/lib/util/getCurrentInstance.mjs.map +1 -1
  819. package/lib/util/getScrollParent.mjs +0 -3
  820. package/lib/util/getScrollParent.mjs.map +1 -1
  821. package/lib/util/globals.mjs.map +1 -1
  822. package/lib/util/helpers.mjs +18 -75
  823. package/lib/util/helpers.mjs.map +1 -1
  824. package/lib/util/injectSelf.mjs +0 -1
  825. package/lib/util/injectSelf.mjs.map +1 -1
  826. package/lib/util/isFixedPosition.mjs +0 -2
  827. package/lib/util/isFixedPosition.mjs.map +1 -1
  828. package/lib/util/propsFactory.mjs +11 -5
  829. package/lib/util/propsFactory.mjs.map +1 -1
  830. package/lib/util/useRender.mjs +0 -1
  831. package/lib/util/useRender.mjs.map +1 -1
  832. package/package.json +6 -10
  833. package/dist/json/attributes.json +0 -5602
  834. package/dist/json/tags.json +0 -1945
  835. package/dist/json/web-types.json +0 -19006
  836. package/lib/composables/rtl.mjs +0 -42
  837. package/lib/composables/rtl.mjs.map +0 -1
  838. package/lib/locale/adapters/vue-intl.d.ts +0 -42
  839. package/lib/locale/adapters/vue-intl.mjs +0 -65
  840. package/lib/locale/adapters/vue-intl.mjs.map +0 -1
@@ -1,6 +1,5 @@
1
1
  import { CircularBuffer } from "../util/index.mjs";
2
2
  const HORIZON = 100; // ms
3
-
4
3
  const HISTORY = 20; // number of samples to keep
5
4
 
6
5
  /** @see https://android.googlesource.com/platform/frameworks/native/+/master/libs/input/VelocityTracker.cpp */
@@ -8,84 +7,67 @@ function kineticEnergyToVelocity(work) {
8
7
  const sqrt2 = 1.41421356237;
9
8
  return (work < 0 ? -1.0 : 1.0) * Math.sqrt(Math.abs(work)) * sqrt2;
10
9
  }
10
+
11
11
  /**
12
12
  * Returns pointer velocity in px/s
13
13
  */
14
-
15
-
16
14
  export function calculateImpulseVelocity(samples) {
17
15
  // The input should be in reversed time order (most recent sample at index i=0)
18
16
  if (samples.length < 2) {
19
17
  // if 0 or 1 points, velocity is zero
20
18
  return 0;
21
- } // if (samples[1].t > samples[0].t) {
19
+ }
20
+ // if (samples[1].t > samples[0].t) {
22
21
  // // Algorithm will still work, but not perfectly
23
22
  // consoleWarn('Samples provided to calculateImpulseVelocity in the wrong order')
24
23
  // }
25
-
26
-
27
24
  if (samples.length === 2) {
28
25
  // if 2 points, basic linear calculation
29
26
  if (samples[1].t === samples[0].t) {
30
27
  // consoleWarn(`Events have identical time stamps t=${samples[0].t}, setting velocity = 0`)
31
28
  return 0;
32
29
  }
33
-
34
30
  return (samples[1].d - samples[0].d) / (samples[1].t - samples[0].t);
35
- } // Guaranteed to have at least 3 points here
31
+ }
32
+ // Guaranteed to have at least 3 points here
36
33
  // start with the oldest sample and go forward in time
37
-
38
-
39
34
  let work = 0;
40
-
41
35
  for (let i = samples.length - 1; i > 0; i--) {
42
36
  if (samples[i].t === samples[i - 1].t) {
43
37
  // consoleWarn(`Events have identical time stamps t=${samples[i].t}, skipping sample`)
44
38
  continue;
45
39
  }
46
-
47
40
  const vprev = kineticEnergyToVelocity(work); // v[i-1]
48
-
49
41
  const vcurr = (samples[i].d - samples[i - 1].d) / (samples[i].t - samples[i - 1].t); // v[i]
50
-
51
42
  work += (vcurr - vprev) * Math.abs(vcurr);
52
-
53
43
  if (i === samples.length - 1) {
54
44
  work *= 0.5;
55
45
  }
56
46
  }
57
-
58
47
  return kineticEnergyToVelocity(work) * 1000;
59
48
  }
60
49
  export function useVelocity() {
61
50
  const touches = {};
62
-
63
51
  function addMovement(e) {
64
52
  Array.from(e.changedTouches).forEach(touch => {
65
53
  const samples = touches[touch.identifier] ?? (touches[touch.identifier] = new CircularBuffer(HISTORY));
66
54
  samples.push([e.timeStamp, touch]);
67
55
  });
68
56
  }
69
-
70
57
  function endTouch(e) {
71
58
  Array.from(e.changedTouches).forEach(touch => {
72
59
  delete touches[touch.identifier];
73
60
  });
74
61
  }
75
-
76
62
  function getVelocity(id) {
77
63
  var _touches$id;
78
-
79
64
  const samples = (_touches$id = touches[id]) == null ? void 0 : _touches$id.values().reverse();
80
-
81
65
  if (!samples) {
82
66
  throw new Error(`No samples for touch id ${id}`);
83
67
  }
84
-
85
68
  const newest = samples[0];
86
69
  const x = [];
87
70
  const y = [];
88
-
89
71
  for (const val of samples) {
90
72
  if (newest[0] - val[0] > HORIZON) break;
91
73
  x.push({
@@ -97,11 +79,9 @@ export function useVelocity() {
97
79
  d: val[1].clientY
98
80
  });
99
81
  }
100
-
101
82
  return {
102
83
  x: calculateImpulseVelocity(x),
103
84
  y: calculateImpulseVelocity(y),
104
-
105
85
  get direction() {
106
86
  const {
107
87
  x,
@@ -110,17 +90,14 @@ export function useVelocity() {
110
90
  const [absX, absY] = [Math.abs(x), Math.abs(y)];
111
91
  return absX > absY && x >= 0 ? 'right' : absX > absY && x <= 0 ? 'left' : absY > absX && y >= 0 ? 'down' : absY > absX && y <= 0 ? 'up' : oops();
112
92
  }
113
-
114
93
  };
115
94
  }
116
-
117
95
  return {
118
96
  addMovement,
119
97
  endTouch,
120
98
  getVelocity
121
99
  };
122
100
  }
123
-
124
101
  function oops() {
125
102
  throw new Error();
126
103
  }
@@ -1 +1 @@
1
- {"version":3,"file":"touch.mjs","names":["CircularBuffer","HORIZON","HISTORY","kineticEnergyToVelocity","work","sqrt2","Math","sqrt","abs","calculateImpulseVelocity","samples","length","t","d","i","vprev","vcurr","useVelocity","touches","addMovement","e","Array","from","changedTouches","forEach","touch","identifier","push","timeStamp","endTouch","getVelocity","id","values","reverse","Error","newest","x","y","val","clientX","clientY","direction","absX","absY","oops"],"sources":["../../src/composables/touch.ts"],"sourcesContent":["import { CircularBuffer } from '@/util'\n\nconst HORIZON = 100 // ms\nconst HISTORY = 20 // number of samples to keep\n\nexport interface Sample {\n t: number\n d: number\n}\n\n/** @see https://android.googlesource.com/platform/frameworks/native/+/master/libs/input/VelocityTracker.cpp */\nfunction kineticEnergyToVelocity (work: number) {\n const sqrt2 = 1.41421356237\n return (work < 0 ? -1.0 : 1.0) * Math.sqrt(Math.abs(work)) * sqrt2\n}\n\n/**\n * Returns pointer velocity in px/s\n */\nexport function calculateImpulseVelocity (samples: Sample[]) {\n // The input should be in reversed time order (most recent sample at index i=0)\n if (samples.length < 2) {\n // if 0 or 1 points, velocity is zero\n return 0\n }\n // if (samples[1].t > samples[0].t) {\n // // Algorithm will still work, but not perfectly\n // consoleWarn('Samples provided to calculateImpulseVelocity in the wrong order')\n // }\n if (samples.length === 2) {\n // if 2 points, basic linear calculation\n if (samples[1].t === samples[0].t) {\n // consoleWarn(`Events have identical time stamps t=${samples[0].t}, setting velocity = 0`)\n return 0\n }\n return (samples[1].d - samples[0].d) / (samples[1].t - samples[0].t)\n }\n // Guaranteed to have at least 3 points here\n // start with the oldest sample and go forward in time\n let work = 0\n for (let i = samples.length - 1; i > 0; i--) {\n if (samples[i].t === samples[i - 1].t) {\n // consoleWarn(`Events have identical time stamps t=${samples[i].t}, skipping sample`)\n continue\n }\n const vprev = kineticEnergyToVelocity(work) // v[i-1]\n const vcurr = (samples[i].d - samples[i - 1].d) / (samples[i].t - samples[i - 1].t) // v[i]\n work += (vcurr - vprev) * Math.abs(vcurr)\n if (i === samples.length - 1) {\n work *= 0.5\n }\n }\n return kineticEnergyToVelocity(work) * 1000\n}\n\nexport function useVelocity () {\n const touches: Record<number, CircularBuffer<[number, Touch]> | undefined> = {}\n\n function addMovement (e: TouchEvent) {\n Array.from(e.changedTouches).forEach(touch => {\n const samples = touches[touch.identifier] ?? (touches[touch.identifier] = new CircularBuffer(HISTORY))\n samples.push([e.timeStamp, touch])\n })\n }\n\n function endTouch (e: TouchEvent) {\n Array.from(e.changedTouches).forEach(touch => {\n delete touches[touch.identifier]\n })\n }\n\n function getVelocity (id: number) {\n const samples = touches[id]?.values().reverse()\n\n if (!samples) {\n throw new Error(`No samples for touch id ${id}`)\n }\n\n const newest = samples[0]\n const x: Sample[] = []\n const y: Sample[] = []\n for (const val of samples) {\n if (newest[0] - val[0] > HORIZON) break\n\n x.push({ t: val[0], d: val[1].clientX })\n y.push({ t: val[0], d: val[1].clientY })\n }\n\n return {\n x: calculateImpulseVelocity(x),\n y: calculateImpulseVelocity(y),\n get direction () {\n const { x, y } = this\n const [absX, absY] = [Math.abs(x), Math.abs(y)]\n\n return absX > absY && x >= 0 ? 'right'\n : absX > absY && x <= 0 ? 'left'\n : absY > absX && y >= 0 ? 'down'\n : absY > absX && y <= 0 ? 'up'\n : oops()\n },\n }\n }\n\n return { addMovement, endTouch, getVelocity }\n}\n\nfunction oops (): never {\n throw new Error()\n}\n"],"mappings":"SAASA,c;AAET,MAAMC,OAAO,GAAG,GAAhB,C,CAAoB;;AACpB,MAAMC,OAAO,GAAG,EAAhB,C,CAAmB;;AAOnB;AACA,SAASC,uBAAT,CAAkCC,IAAlC,EAAgD;EAC9C,MAAMC,KAAK,GAAG,aAAd;EACA,OAAO,CAACD,IAAI,GAAG,CAAP,GAAW,CAAC,GAAZ,GAAkB,GAAnB,IAA0BE,IAAI,CAACC,IAAL,CAAUD,IAAI,CAACE,GAAL,CAASJ,IAAT,CAAV,CAA1B,GAAsDC,KAA7D;AACD;AAED;AACA;AACA;;;AACA,OAAO,SAASI,wBAAT,CAAmCC,OAAnC,EAAsD;EAC3D;EACA,IAAIA,OAAO,CAACC,MAAR,GAAiB,CAArB,EAAwB;IACtB;IACA,OAAO,CAAP;EACD,CAL0D,CAM3D;EACA;EACA;EACA;;;EACA,IAAID,OAAO,CAACC,MAAR,KAAmB,CAAvB,EAA0B;IACxB;IACA,IAAID,OAAO,CAAC,CAAD,CAAP,CAAWE,CAAX,KAAiBF,OAAO,CAAC,CAAD,CAAP,CAAWE,CAAhC,EAAmC;MACjC;MACA,OAAO,CAAP;IACD;;IACD,OAAO,CAACF,OAAO,CAAC,CAAD,CAAP,CAAWG,CAAX,GAAeH,OAAO,CAAC,CAAD,CAAP,CAAWG,CAA3B,KAAiCH,OAAO,CAAC,CAAD,CAAP,CAAWE,CAAX,GAAeF,OAAO,CAAC,CAAD,CAAP,CAAWE,CAA3D,CAAP;EACD,CAjB0D,CAkB3D;EACA;;;EACA,IAAIR,IAAI,GAAG,CAAX;;EACA,KAAK,IAAIU,CAAC,GAAGJ,OAAO,CAACC,MAAR,GAAiB,CAA9B,EAAiCG,CAAC,GAAG,CAArC,EAAwCA,CAAC,EAAzC,EAA6C;IAC3C,IAAIJ,OAAO,CAACI,CAAD,CAAP,CAAWF,CAAX,KAAiBF,OAAO,CAAC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B,GAAwB,OAAxB,GACHM,IAAI,GAAGC,IAAP,IAAeP,CAAC,IAAI,CAApB,GAAwB,MAAxB,GACAO,IAAI,GAAGD,IAAP,IAAeL,CAAC,IAAI,CAApB,GAAwB,MAAxB,GACAM,IAAI,GAAGD,IAAP,IAAeL,CAAC,IAAI,CAApB,GAAwB,IAAxB,GACAO,IAAI,EAJR;MAKD;;IAZI,CAAP;EAcD;;EAED,OAAO;IAAEzB,WAAF;IAAeU,QAAf;IAAyBC;EAAzB,CAAP;AACD;;AAED,SAASc,IAAT,GAAwB;EACtB,MAAM,IAAIV,KAAJ,EAAN;AACD"}
1
+ {"version":3,"file":"touch.mjs","names":["CircularBuffer","HORIZON","HISTORY","kineticEnergyToVelocity","work","sqrt2","Math","sqrt","abs","calculateImpulseVelocity","samples","length","t","d","i","vprev","vcurr","useVelocity","touches","addMovement","e","Array","from","changedTouches","forEach","touch","identifier","push","timeStamp","endTouch","getVelocity","id","values","reverse","Error","newest","x","y","val","clientX","clientY","direction","absX","absY","oops"],"sources":["../../src/composables/touch.ts"],"sourcesContent":["import { CircularBuffer } from '@/util'\n\nconst HORIZON = 100 // ms\nconst HISTORY = 20 // number of samples to keep\n\nexport interface Sample {\n t: number\n d: number\n}\n\n/** @see https://android.googlesource.com/platform/frameworks/native/+/master/libs/input/VelocityTracker.cpp */\nfunction kineticEnergyToVelocity (work: number) {\n const sqrt2 = 1.41421356237\n return (work < 0 ? -1.0 : 1.0) * Math.sqrt(Math.abs(work)) * sqrt2\n}\n\n/**\n * Returns pointer velocity in px/s\n */\nexport function calculateImpulseVelocity (samples: Sample[]) {\n // The input should be in reversed time order (most recent sample at index i=0)\n if (samples.length < 2) {\n // if 0 or 1 points, velocity is zero\n return 0\n }\n // if (samples[1].t > samples[0].t) {\n // // Algorithm will still work, but not perfectly\n // consoleWarn('Samples provided to calculateImpulseVelocity in the wrong order')\n // }\n if (samples.length === 2) {\n // if 2 points, basic linear calculation\n if (samples[1].t === samples[0].t) {\n // consoleWarn(`Events have identical time stamps t=${samples[0].t}, setting velocity = 0`)\n return 0\n }\n return (samples[1].d - samples[0].d) / (samples[1].t - samples[0].t)\n }\n // Guaranteed to have at least 3 points here\n // start with the oldest sample and go forward in time\n let work = 0\n for (let i = samples.length - 1; i > 0; i--) {\n if (samples[i].t === samples[i - 1].t) {\n // consoleWarn(`Events have identical time stamps t=${samples[i].t}, skipping sample`)\n continue\n }\n const vprev = kineticEnergyToVelocity(work) // v[i-1]\n const vcurr = (samples[i].d - samples[i - 1].d) / (samples[i].t - samples[i - 1].t) // v[i]\n work += (vcurr - vprev) * Math.abs(vcurr)\n if (i === samples.length - 1) {\n work *= 0.5\n }\n }\n return kineticEnergyToVelocity(work) * 1000\n}\n\nexport function useVelocity () {\n const touches: Record<number, CircularBuffer<[number, Touch]> | undefined> = {}\n\n function addMovement (e: TouchEvent) {\n Array.from(e.changedTouches).forEach(touch => {\n const samples = touches[touch.identifier] ?? (touches[touch.identifier] = new CircularBuffer(HISTORY))\n samples.push([e.timeStamp, touch])\n })\n }\n\n function endTouch (e: TouchEvent) {\n Array.from(e.changedTouches).forEach(touch => {\n delete touches[touch.identifier]\n })\n }\n\n function getVelocity (id: number) {\n const samples = touches[id]?.values().reverse()\n\n if (!samples) {\n throw new Error(`No samples for touch id ${id}`)\n }\n\n const newest = samples[0]\n const x: Sample[] = []\n const y: Sample[] = []\n for (const val of samples) {\n if (newest[0] - val[0] > HORIZON) break\n\n x.push({ t: val[0], d: val[1].clientX })\n y.push({ t: val[0], d: val[1].clientY })\n }\n\n return {\n x: calculateImpulseVelocity(x),\n y: calculateImpulseVelocity(y),\n get direction () {\n const { x, y } = this\n const [absX, absY] = [Math.abs(x), Math.abs(y)]\n\n return absX > absY && x >= 0 ? 'right'\n : absX > absY && x <= 0 ? 'left'\n : absY > absX && y >= 0 ? 'down'\n : absY > absX && y <= 0 ? 'up'\n : oops()\n },\n }\n }\n\n return { addMovement, endTouch, getVelocity }\n}\n\nfunction oops (): never {\n throw new Error()\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GAC9BM,IAAI,GAAGD,IAAI,IAAIL,CAAC,IAAI,CAAC,GAAG,IAAI,GAC5BO,IAAI,EAAE;MACZ;IACF,CAAC;EACH;EAEA,OAAO;IAAEzB,WAAW;IAAEU,QAAQ;IAAEC;EAAY,CAAC;AAC/C;AAEA,SAASc,IAAI,GAAW;EACtB,MAAM,IAAIV,KAAK,EAAE;AACnB"}
@@ -1,7 +1,6 @@
1
1
  // Utilities
2
2
  import { h, mergeProps, Transition } from 'vue';
3
3
  import { propsFactory } from "../util/index.mjs"; // Types
4
-
5
4
  export const makeTransitionProps = propsFactory({
6
5
  transition: {
7
6
  type: [Boolean, String, Object],
@@ -11,7 +10,6 @@ export const makeTransitionProps = propsFactory({
11
10
  }, 'transition');
12
11
  export const MaybeTransition = (props, _ref) => {
13
12
  var _slots$default;
14
-
15
13
  let {
16
14
  slots
17
15
  } = _ref;
@@ -1 +1 @@
1
- {"version":3,"file":"transition.mjs","names":["h","mergeProps","Transition","propsFactory","makeTransitionProps","transition","type","Boolean","String","Object","default","validator","val","MaybeTransition","props","slots","rest","component","customProps","name"],"sources":["../../src/composables/transition.ts"],"sourcesContent":["// Utilities\nimport { h, mergeProps, Transition } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { Component, FunctionalComponent, PropType, TransitionProps } from 'vue'\n\nexport const makeTransitionProps = propsFactory({\n transition: {\n type: [Boolean, String, Object] as PropType<string | boolean | TransitionProps & { component?: Component }>,\n default: 'fade-transition',\n validator: val => val !== true,\n },\n}, 'transition')\n\ninterface MaybeTransitionProps extends TransitionProps {\n transition?: string | boolean | TransitionProps & { component?: any }\n}\n\nexport const MaybeTransition: FunctionalComponent<MaybeTransitionProps> = (props, { slots }) => {\n const { transition, ...rest } = props\n\n if (!transition || typeof transition === 'boolean') return slots.default?.()\n\n const { component = Transition, ...customProps } = typeof transition === 'object' ? transition : {}\n\n return h(\n component,\n mergeProps(typeof transition === 'string' ? { name: transition } : customProps as any, rest as any),\n slots\n )\n}\n"],"mappings":"AAAA;AACA,SAASA,CAAT,EAAYC,UAAZ,EAAwBC,UAAxB,QAA0C,KAA1C;SACSC,Y,6BAET;;AAGA,OAAO,MAAMC,mBAAmB,GAAGD,YAAY,CAAC;EAC9CE,UAAU,EAAE;IACVC,IAAI,EAAE,CAACC,OAAD,EAAUC,MAAV,EAAkBC,MAAlB,CADI;IAEVC,OAAO,EAAE,iBAFC;IAGVC,SAAS,EAAEC,GAAG,IAAIA,GAAG,KAAK;EAHhB;AADkC,CAAD,EAM5C,YAN4C,CAAxC;AAYP,OAAO,MAAMC,eAA0D,GAAG,CAACC,KAAD,WAAsB;EAAA;;EAAA,IAAd;IAAEC;EAAF,CAAc;EAC9F,MAAM;IAAEV,UAAF;IAAc,GAAGW;EAAjB,IAA0BF,KAAhC;EAEA,IAAI,CAACT,UAAD,IAAe,OAAOA,UAAP,KAAsB,SAAzC,EAAoD,yBAAOU,KAAK,CAACL,OAAb,qBAAO,oBAAAK,KAAK,CAAZ;EAEpD,MAAM;IAAEE,SAAS,GAAGf,UAAd;IAA0B,GAAGgB;EAA7B,IAA6C,OAAOb,UAAP,KAAsB,QAAtB,GAAiCA,UAAjC,GAA8C,EAAjG;EAEA,OAAOL,CAAC,CACNiB,SADM,EAENhB,UAAU,CAAC,OAAOI,UAAP,KAAsB,QAAtB,GAAiC;IAAEc,IAAI,EAAEd;EAAR,CAAjC,GAAwDa,WAAzD,EAA6EF,IAA7E,CAFJ,EAGND,KAHM,CAAR;AAKD,CAZM"}
1
+ {"version":3,"file":"transition.mjs","names":["h","mergeProps","Transition","propsFactory","makeTransitionProps","transition","type","Boolean","String","Object","default","validator","val","MaybeTransition","props","slots","rest","component","customProps","name"],"sources":["../../src/composables/transition.ts"],"sourcesContent":["// Utilities\nimport { h, mergeProps, Transition } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { Component, FunctionalComponent, PropType, TransitionProps } from 'vue'\n\nexport const makeTransitionProps = propsFactory({\n transition: {\n type: [Boolean, String, Object] as PropType<string | boolean | TransitionProps & { component?: Component }>,\n default: 'fade-transition',\n validator: val => val !== true,\n },\n}, 'transition')\n\ninterface MaybeTransitionProps extends TransitionProps {\n transition?: string | boolean | TransitionProps & { component?: any }\n}\n\nexport const MaybeTransition: FunctionalComponent<MaybeTransitionProps> = (props, { slots }) => {\n const { transition, ...rest } = props\n\n if (!transition || typeof transition === 'boolean') return slots.default?.()\n\n const { component = Transition, ...customProps } = typeof transition === 'object' ? transition : {}\n\n return h(\n component,\n mergeProps(typeof transition === 'string' ? { name: transition } : customProps as any, rest as any),\n slots\n )\n}\n"],"mappings":"AAAA;AACA,SAASA,CAAC,EAAEC,UAAU,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACtCC,YAAY,6BAErB;AAGA,OAAO,MAAMC,mBAAmB,GAAGD,YAAY,CAAC;EAC9CE,UAAU,EAAE;IACVC,IAAI,EAAE,CAACC,OAAO,EAAEC,MAAM,EAAEC,MAAM,CAA6E;IAC3GC,OAAO,EAAE,iBAAiB;IAC1BC,SAAS,EAAEC,GAAG,IAAIA,GAAG,KAAK;EAC5B;AACF,CAAC,EAAE,YAAY,CAAC;AAMhB,OAAO,MAAMC,eAA0D,GAAG,CAACC,KAAK,WAAgB;EAAA;EAAA,IAAd;IAAEC;EAAM,CAAC;EACzF,MAAM;IAAEV,UAAU;IAAE,GAAGW;EAAK,CAAC,GAAGF,KAAK;EAErC,IAAI,CAACT,UAAU,IAAI,OAAOA,UAAU,KAAK,SAAS,EAAE,yBAAOU,KAAK,CAACL,OAAO,qBAAb,oBAAAK,KAAK,CAAY;EAE5E,MAAM;IAAEE,SAAS,GAAGf,UAAU;IAAE,GAAGgB;EAAY,CAAC,GAAG,OAAOb,UAAU,KAAK,QAAQ,GAAGA,UAAU,GAAG,CAAC,CAAC;EAEnG,OAAOL,CAAC,CACNiB,SAAS,EACThB,UAAU,CAAC,OAAOI,UAAU,KAAK,QAAQ,GAAG;IAAEc,IAAI,EAAEd;EAAW,CAAC,GAAGa,WAAkB,EAAEF,IAAI,CAAQ,EACnGD,KAAK,CACN;AACH,CAAC"}
@@ -1,10 +1,8 @@
1
1
  // Composables
2
2
  import { useForm } from "./form.mjs";
3
3
  import { useProxiedModel } from "./proxiedModel.mjs"; // Utilities
4
-
5
4
  import { computed, onBeforeMount, onBeforeUnmount, onMounted, ref, unref, watch } from 'vue';
6
5
  import { getCurrentInstanceName, getUid, propsFactory, wrapInArray } from "../util/index.mjs"; // Types
7
-
8
6
  export const makeValidationProps = propsFactory({
9
7
  disabled: Boolean,
10
8
  error: Boolean,
@@ -25,7 +23,7 @@ export const makeValidationProps = propsFactory({
25
23
  },
26
24
  modelValue: null,
27
25
  validationValue: null
28
- });
26
+ }, 'validation');
29
27
  export function useValidation(props) {
30
28
  let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
31
29
  let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getUid();
@@ -65,8 +63,9 @@ export function useValidation(props) {
65
63
  });
66
64
  onBeforeUnmount(() => {
67
65
  form == null ? void 0 : form.unregister(uid.value);
68
- }); // Set initial valid state, for inputs that might not have rules
66
+ });
69
67
 
68
+ // Set initial valid state, for inputs that might not have rules
70
69
  onMounted(() => form == null ? void 0 : form.update(uid.value, isValid.value, errorMessages.value));
71
70
  watch(validationModel, () => {
72
71
  if (validationModel.value != null) validate();
@@ -74,45 +73,36 @@ export function useValidation(props) {
74
73
  watch(isValid, () => {
75
74
  form == null ? void 0 : form.update(uid.value, isValid.value, errorMessages.value);
76
75
  });
77
-
78
76
  function reset() {
79
77
  resetValidation();
80
78
  model.value = null;
81
79
  }
82
-
83
80
  function resetValidation() {
84
81
  isPristine.value = true;
85
82
  internalErrorMessages.value = [];
86
83
  }
87
-
88
84
  async function validate() {
89
85
  const results = [];
90
86
  isValidating.value = true;
91
-
92
87
  for (const rule of props.rules) {
93
88
  if (results.length >= (props.maxErrors || 1)) {
94
89
  break;
95
90
  }
96
-
97
91
  const handler = typeof rule === 'function' ? rule : () => rule;
98
92
  const result = await handler(validationModel.value);
99
93
  if (result === true) continue;
100
-
101
94
  if (typeof result !== 'string') {
102
95
  // eslint-disable-next-line no-console
103
96
  console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`);
104
97
  continue;
105
98
  }
106
-
107
99
  results.push(result);
108
100
  }
109
-
110
101
  internalErrorMessages.value = results;
111
102
  isValidating.value = false;
112
103
  isPristine.value = false;
113
104
  return internalErrorMessages.value;
114
105
  }
115
-
116
106
  return {
117
107
  errorMessages,
118
108
  isDirty,
@@ -1 +1 @@
1
- {"version":3,"file":"validation.mjs","names":["useForm","useProxiedModel","computed","onBeforeMount","onBeforeUnmount","onMounted","ref","unref","watch","getCurrentInstanceName","getUid","propsFactory","wrapInArray","makeValidationProps","disabled","Boolean","error","errorMessages","type","Array","String","default","maxErrors","Number","name","label","readonly","rules","modelValue","validationValue","useValidation","props","id","model","validationModel","undefined","value","form","internalErrorMessages","isPristine","isDirty","length","isDisabled","isReadonly","isValid","isValidating","validationClasses","uid","register","validate","reset","resetValidation","unregister","update","results","rule","handler","result","console","warn","push"],"sources":["../../src/composables/validation.ts"],"sourcesContent":["// Composables\nimport { useForm } from '@/composables/form'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, onBeforeMount, onBeforeUnmount, onMounted, ref, unref, watch } from 'vue'\nimport { getCurrentInstanceName, getUid, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { MaybeRef } from '@/util'\n\nexport type ValidationResult = string | boolean\nexport type ValidationRule =\n | ValidationResult\n | PromiseLike<ValidationResult>\n | ((value: any) => ValidationResult)\n | ((value: any) => PromiseLike<ValidationResult>)\n\nexport interface ValidationProps {\n disabled: boolean\n error: boolean\n errorMessages: string | string[]\n maxErrors: string | number\n name: string | undefined\n label: string | undefined\n readonly: boolean\n rules: ValidationRule[]\n modelValue: any\n 'onUpdate:modelValue': ((val: any) => void) | undefined\n validationValue: any\n}\n\nexport const makeValidationProps = propsFactory({\n disabled: Boolean,\n error: Boolean,\n errorMessages: {\n type: [Array, String] as PropType<string | string[]>,\n default: () => ([]),\n },\n maxErrors: {\n type: [Number, String],\n default: 1,\n },\n name: String,\n label: String,\n readonly: Boolean,\n rules: {\n type: Array as PropType<ValidationRule[]>,\n default: () => ([]),\n },\n modelValue: null,\n validationValue: null,\n})\n\nexport function useValidation (\n props: ValidationProps,\n name = getCurrentInstanceName(),\n id: MaybeRef<string | number> = getUid(),\n) {\n const model = useProxiedModel(props, 'modelValue')\n const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue)\n const form = useForm()\n const internalErrorMessages = ref<string[]>([])\n const isPristine = ref(true)\n const isDirty = computed(() => !!(\n wrapInArray(model.value === '' ? null : model.value).length ||\n wrapInArray(validationModel.value === '' ? null : validationModel.value).length\n ))\n const isDisabled = computed(() => !!(props.disabled || form?.isDisabled.value))\n const isReadonly = computed(() => !!(props.readonly || form?.isReadonly.value))\n const errorMessages = computed(() => {\n return props.errorMessages.length\n ? wrapInArray(props.errorMessages)\n : internalErrorMessages.value\n })\n const isValid = computed(() => {\n if (props.error || errorMessages.value.length) return false\n if (!props.rules.length) return true\n\n return isPristine.value ? null : true\n })\n const isValidating = ref(false)\n const validationClasses = computed(() => {\n return {\n [`${name}--error`]: isValid.value === false,\n [`${name}--dirty`]: isDirty.value,\n [`${name}--disabled`]: isDisabled.value,\n [`${name}--readonly`]: isReadonly.value,\n }\n })\n\n const uid = computed(() => props.name ?? unref(id))\n\n onBeforeMount(() => {\n form?.register({\n id: uid.value,\n validate,\n reset,\n resetValidation,\n })\n })\n\n onBeforeUnmount(() => {\n form?.unregister(uid.value)\n })\n\n // Set initial valid state, for inputs that might not have rules\n onMounted(() => form?.update(uid.value, isValid.value, errorMessages.value))\n\n watch(validationModel, () => {\n if (validationModel.value != null) validate()\n })\n\n watch(isValid, () => {\n form?.update(uid.value, isValid.value, errorMessages.value)\n })\n\n function reset () {\n resetValidation()\n model.value = null\n }\n\n function resetValidation () {\n isPristine.value = true\n internalErrorMessages.value = []\n }\n\n async function validate () {\n const results = []\n\n isValidating.value = true\n\n for (const rule of props.rules) {\n if (results.length >= (props.maxErrors || 1)) {\n break\n }\n\n const handler = typeof rule === 'function' ? rule : () => rule\n const result = await handler(validationModel.value)\n\n if (result === true) continue\n\n if (typeof result !== 'string') {\n // eslint-disable-next-line no-console\n console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`)\n\n continue\n }\n\n results.push(result)\n }\n\n internalErrorMessages.value = results\n isValidating.value = false\n isPristine.value = false\n\n return internalErrorMessages.value\n }\n\n return {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n }\n}\n"],"mappings":"AAAA;SACSA,O;SACAC,e,8BAET;;AACA,SAASC,QAAT,EAAmBC,aAAnB,EAAkCC,eAAlC,EAAmDC,SAAnD,EAA8DC,GAA9D,EAAmEC,KAAnE,EAA0EC,KAA1E,QAAuF,KAAvF;SACSC,sB,EAAwBC,M,EAAQC,Y,EAAcC,W,6BAEvD;;AAyBA,OAAO,MAAMC,mBAAmB,GAAGF,YAAY,CAAC;EAC9CG,QAAQ,EAAEC,OADoC;EAE9CC,KAAK,EAAED,OAFuC;EAG9CE,aAAa,EAAE;IACbC,IAAI,EAAE,CAACC,KAAD,EAAQC,MAAR,CADO;IAEbC,OAAO,EAAE,MAAO;EAFH,CAH+B;EAO9CC,SAAS,EAAE;IACTJ,IAAI,EAAE,CAACK,MAAD,EAASH,MAAT,CADG;IAETC,OAAO,EAAE;EAFA,CAPmC;EAW9CG,IAAI,EAAEJ,MAXwC;EAY9CK,KAAK,EAAEL,MAZuC;EAa9CM,QAAQ,EAAEX,OAboC;EAc9CY,KAAK,EAAE;IACLT,IAAI,EAAEC,KADD;IAELE,OAAO,EAAE,MAAO;EAFX,CAduC;EAkB9CO,UAAU,EAAE,IAlBkC;EAmB9CC,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AR,CAAaH,MAAb;IACD;;IAEDnB,qBAAqB,CAACF,KAAtB,GAA8BkB,OAA9B;IACAT,YAAY,CAACT,KAAb,GAAqB,KAArB;IACAG,UAAU,CAACH,KAAX,GAAmB,KAAnB;IAEA,OAAOE,qBAAqB,CAACF,KAA7B;EACD;;EAED,OAAO;IACLnB,aADK;IAELuB,OAFK;IAGLE,UAHK;IAILC,UAJK;IAKLJ,UALK;IAMLK,OANK;IAOLC,YAPK;IAQLK,KARK;IASLC,eATK;IAULF,QAVK;IAWLH;EAXK,CAAP;AAaD"}
1
+ {"version":3,"file":"validation.mjs","names":["useForm","useProxiedModel","computed","onBeforeMount","onBeforeUnmount","onMounted","ref","unref","watch","getCurrentInstanceName","getUid","propsFactory","wrapInArray","makeValidationProps","disabled","Boolean","error","errorMessages","type","Array","String","default","maxErrors","Number","name","label","readonly","rules","modelValue","validationValue","useValidation","props","id","model","validationModel","undefined","value","form","internalErrorMessages","isPristine","isDirty","length","isDisabled","isReadonly","isValid","isValidating","validationClasses","uid","register","validate","reset","resetValidation","unregister","update","results","rule","handler","result","console","warn","push"],"sources":["../../src/composables/validation.ts"],"sourcesContent":["// Composables\nimport { useForm } from '@/composables/form'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, onBeforeMount, onBeforeUnmount, onMounted, ref, unref, watch } from 'vue'\nimport { getCurrentInstanceName, getUid, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { MaybeRef } from '@/util'\n\nexport type ValidationResult = string | boolean\nexport type ValidationRule =\n | ValidationResult\n | PromiseLike<ValidationResult>\n | ((value: any) => ValidationResult)\n | ((value: any) => PromiseLike<ValidationResult>)\n\nexport interface ValidationProps {\n disabled: boolean\n error: boolean\n errorMessages: string | string[]\n maxErrors: string | number\n name: string | undefined\n label: string | undefined\n readonly: boolean\n rules: ValidationRule[]\n modelValue: any\n 'onUpdate:modelValue': ((val: any) => void) | undefined\n validationValue: any\n}\n\nexport const makeValidationProps = propsFactory({\n disabled: Boolean,\n error: Boolean,\n errorMessages: {\n type: [Array, String] as PropType<string | string[]>,\n default: () => ([]),\n },\n maxErrors: {\n type: [Number, String],\n default: 1,\n },\n name: String,\n label: String,\n readonly: Boolean,\n rules: {\n type: Array as PropType<ValidationRule[]>,\n default: () => ([]),\n },\n modelValue: null,\n validationValue: null,\n}, 'validation')\n\nexport function useValidation (\n props: ValidationProps,\n name = getCurrentInstanceName(),\n id: MaybeRef<string | number> = getUid(),\n) {\n const model = useProxiedModel(props, 'modelValue')\n const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue)\n const form = useForm()\n const internalErrorMessages = ref<string[]>([])\n const isPristine = ref(true)\n const isDirty = computed(() => !!(\n wrapInArray(model.value === '' ? null : model.value).length ||\n wrapInArray(validationModel.value === '' ? null : validationModel.value).length\n ))\n const isDisabled = computed(() => !!(props.disabled || form?.isDisabled.value))\n const isReadonly = computed(() => !!(props.readonly || form?.isReadonly.value))\n const errorMessages = computed(() => {\n return props.errorMessages.length\n ? wrapInArray(props.errorMessages)\n : internalErrorMessages.value\n })\n const isValid = computed(() => {\n if (props.error || errorMessages.value.length) return false\n if (!props.rules.length) return true\n\n return isPristine.value ? null : true\n })\n const isValidating = ref(false)\n const validationClasses = computed(() => {\n return {\n [`${name}--error`]: isValid.value === false,\n [`${name}--dirty`]: isDirty.value,\n [`${name}--disabled`]: isDisabled.value,\n [`${name}--readonly`]: isReadonly.value,\n }\n })\n\n const uid = computed(() => props.name ?? unref(id))\n\n onBeforeMount(() => {\n form?.register({\n id: uid.value,\n validate,\n reset,\n resetValidation,\n })\n })\n\n onBeforeUnmount(() => {\n form?.unregister(uid.value)\n })\n\n // Set initial valid state, for inputs that might not have rules\n onMounted(() => form?.update(uid.value, isValid.value, errorMessages.value))\n\n watch(validationModel, () => {\n if (validationModel.value != null) validate()\n })\n\n watch(isValid, () => {\n form?.update(uid.value, isValid.value, errorMessages.value)\n })\n\n function reset () {\n resetValidation()\n model.value = null\n }\n\n function resetValidation () {\n isPristine.value = true\n internalErrorMessages.value = []\n }\n\n async function validate () {\n const results = []\n\n isValidating.value = true\n\n for (const rule of props.rules) {\n if (results.length >= (props.maxErrors || 1)) {\n break\n }\n\n const handler = typeof rule === 'function' ? rule : () => rule\n const result = await handler(validationModel.value)\n\n if (result === true) continue\n\n if (typeof result !== 'string') {\n // eslint-disable-next-line no-console\n console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`)\n\n continue\n }\n\n results.push(result)\n }\n\n internalErrorMessages.value = results\n isValidating.value = false\n isPristine.value = false\n\n return internalErrorMessages.value\n }\n\n return {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,OAAO;AAAA,SACPC,eAAe,8BAExB;AACA,SAASC,QAAQ,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS,EAAEC,GAAG,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACnFC,sBAAsB,EAAEC,MAAM,EAAEC,YAAY,EAAEC,WAAW,6BAElE;AAyBA,OAAO,MAAMC,mBAAmB,GAAGF,YAAY,CAAC;EAC9CG,QAAQ,EAAEC,OAAO;EACjBC,KAAK,EAAED,OAAO;EACdE,aAAa,EAAE;IACbC,IAAI,EAAE,CAACC,KAAK,EAAEC,MAAM,CAAgC;IACpDC,OAAO,EAAE,MAAO;EAClB,CAAC;EACDC,SAAS,EAAE;IACTJ,IAAI,EAAE,CAACK,MAAM,EAAEH,MAAM,CAAC;IACtBC,OAAO,EAAE;EACX,CAAC;EACDG,IAAI,EAAEJ,MAAM;EACZK,KAAK,EAAEL,MAAM;EACbM,QAAQ,EAAEX,OAAO;EACjBY,KAAK,EAAE;IACLT,IAAI,EAAEC,KAAmC;IACzCE,OAAO,EAAE,MAAO;EAClB,CAAC;EACDO,UAAU,EAAE,IAAI;EAChBC,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ACrCT,YAAY,CAACT,KAAK,GAAG,KAAK;IAC1BG,UAAU,CAACH,KAAK,GAAG,KAAK;IAExB,OAAOE,qBAAqB,CAACF,KAAK;EACpC;EAEA,OAAO;IACLnB,aAAa;IACbuB,OAAO;IACPE,UAAU;IACVC,UAAU;IACVJ,UAAU;IACVK,OAAO;IACPC,YAAY;IACZK,KAAK;IACLC,eAAe;IACfF,QAAQ;IACRH;EACF,CAAC;AACH"}
@@ -1,10 +1,8 @@
1
1
  import { createVNode as _createVNode, Fragment as _Fragment } from "vue";
2
2
  // Composables
3
3
  import { useColor } from "./color.mjs"; // Utilities
4
-
5
4
  import { computed, unref } from 'vue';
6
5
  import { getCurrentInstanceName, propsFactory } from "../util/index.mjs"; // Types
7
-
8
6
  export const allowedVariants = ['elevated', 'flat', 'tonal', 'outlined', 'text', 'plain'];
9
7
  export function genOverlays(isClickable, name) {
10
8
  return _createVNode(_Fragment, null, [isClickable && _createVNode("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"variant.mjs","names":["useColor","computed","unref","getCurrentInstanceName","propsFactory","allowedVariants","genOverlays","isClickable","name","makeVariantProps","color","String","variant","type","default","validator","v","includes","useVariant","props","variantClasses","colorClasses","colorStyles"],"sources":["../../src/composables/variant.tsx"],"sourcesContent":["// Composables\nimport { useColor } from '@/composables/color'\n\n// Utilities\nimport { computed, unref } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { MaybeRef } from '@/util'\n\nexport const allowedVariants = [\n 'elevated',\n 'flat',\n 'tonal',\n 'outlined',\n 'text',\n 'plain',\n] as const\n\nexport type Variant = typeof allowedVariants[number]\n\nexport interface VariantProps {\n color?: string\n variant: Variant\n}\n\nexport function genOverlays (isClickable: boolean, name: string) {\n return (\n <>\n { isClickable && <span key=\"overlay\" class={`${name}__overlay`} /> }\n\n <span key=\"underlay\" class={`${name}__underlay`} />\n </>\n )\n}\n\nexport const makeVariantProps = propsFactory({\n color: String,\n variant: {\n type: String as PropType<Variant>,\n default: 'elevated',\n validator: (v: any) => allowedVariants.includes(v),\n },\n}, 'variant')\n\nexport function useVariant (\n props: MaybeRef<VariantProps>,\n name = getCurrentInstanceName(),\n) {\n const variantClasses = computed(() => {\n const { variant } = unref(props)\n return `${name}--variant-${variant}`\n })\n\n const { colorClasses, colorStyles } = useColor(computed(() => {\n const { variant, color } = unref(props)\n return {\n [['elevated', 'flat'].includes(variant) ? 'background' : 'text']: color,\n }\n }))\n\n return { colorClasses, colorStyles, variantClasses }\n}\n"],"mappings":";AAAA;SACSA,Q,uBAET;;AACA,SAASC,QAAT,EAAmBC,KAAnB,QAAgC,KAAhC;SACSC,sB,EAAwBC,Y,6BAEjC;;AAIA,OAAO,MAAMC,eAAe,GAAG,CAC7B,UAD6B,EAE7B,MAF6B,EAG7B,OAH6B,EAI7B,UAJ6B,EAK7B,MAL6B,EAM7B,OAN6B,CAAxB;AAgBP,OAAO,SAASC,WAAT,CAAsBC,WAAtB,EAA4CC,IAA5C,EAA0D;EAC/D,sCAEMD,WAAW;IAAA,OAAc,SAAd;IAAA,SAAgC,GAAEC,IAAK;EAAvC,QAFjB;IAAA,OAIc,UAJd;IAAA,SAIiC,GAAEA,IAAK;EAJxC;AAOD;AAED,OAAO,MAAMC,gBAAgB,GAAGL,YAAY,CAAC;EAC3CM,KAAK,EAAEC,MADoC;EAE3CC,OAAO,EAAE;IACPC,IAAI,EAAEF,MADC;IAEPG,OAAO,EAAE,UAFF;IAGPC,SAAS,EAAGC,CAAD,IAAYX,eAAe,CAACY,QAAhB,CAAyBD,CAAzB;EAHhB;AAFkC,CAAD,EAOzC,SAPyC,CAArC;AASP,OAAO,SAASE,UAAT,CACLC,KADK,EAGL;EAAA,IADAX,IACA,uEADOL,sBAAsB,EAC7B;EACA,MAAMiB,cAAc,GAAGnB,QAAQ,CAAC,MAAM;IACpC,MAAM;MAAEW;IAAF,IAAcV,KAAK,CAACiB,KAAD,CAAzB;IACA,OAAQ,GAAEX,IAAK,aAAYI,OAAQ,EAAnC;EACD,CAH8B,CAA/B;EAKA,MAAM;IAAES,YAAF;IAAgBC;EAAhB,IAAgCtB,QAAQ,CAACC,QAAQ,CAAC,MAAM;IAC5D,MAAM;MAAEW,OAAF;MAAWF;IAAX,IAAqBR,KAAK,CAACiB,KAAD,CAAhC;IACA,OAAO;MACL,CAAC,CAAC,UAAD,EAAa,MAAb,EAAqBF,QAArB,CAA8BL,OAA9B,IAAyC,YAAzC,GAAwD,MAAzD,GAAkEF;IAD7D,CAAP;EAGD,CALsD,CAAT,CAA9C;EAOA,OAAO;IAAEW,YAAF;IAAgBC,WAAhB;IAA6BF;EAA7B,CAAP;AACD"}
1
+ {"version":3,"file":"variant.mjs","names":["useColor","computed","unref","getCurrentInstanceName","propsFactory","allowedVariants","genOverlays","isClickable","name","makeVariantProps","color","String","variant","type","default","validator","v","includes","useVariant","props","variantClasses","colorClasses","colorStyles"],"sources":["../../src/composables/variant.tsx"],"sourcesContent":["// Composables\nimport { useColor } from '@/composables/color'\n\n// Utilities\nimport { computed, unref } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { MaybeRef } from '@/util'\n\nexport const allowedVariants = [\n 'elevated',\n 'flat',\n 'tonal',\n 'outlined',\n 'text',\n 'plain',\n] as const\n\nexport type Variant = typeof allowedVariants[number]\n\nexport interface VariantProps {\n color?: string\n variant: Variant\n}\n\nexport function genOverlays (isClickable: boolean, name: string) {\n return (\n <>\n { isClickable && <span key=\"overlay\" class={`${name}__overlay`} /> }\n\n <span key=\"underlay\" class={`${name}__underlay`} />\n </>\n )\n}\n\nexport const makeVariantProps = propsFactory({\n color: String,\n variant: {\n type: String as PropType<Variant>,\n default: 'elevated',\n validator: (v: any) => allowedVariants.includes(v),\n },\n}, 'variant')\n\nexport function useVariant (\n props: MaybeRef<VariantProps>,\n name = getCurrentInstanceName(),\n) {\n const variantClasses = computed(() => {\n const { variant } = unref(props)\n return `${name}--variant-${variant}`\n })\n\n const { colorClasses, colorStyles } = useColor(computed(() => {\n const { variant, color } = unref(props)\n return {\n [['elevated', 'flat'].includes(variant) ? 'background' : 'text']: color,\n }\n }))\n\n return { colorClasses, colorStyles, variantClasses }\n}\n"],"mappings":";AAAA;AAAA,SACSA,QAAQ,uBAEjB;AACA,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,sBAAsB,EAAEC,YAAY,6BAE7C;AAIA,OAAO,MAAMC,eAAe,GAAG,CAC7B,UAAU,EACV,MAAM,EACN,OAAO,EACP,UAAU,EACV,MAAM,EACN,OAAO,CACC;AASV,OAAO,SAASC,WAAW,CAAEC,WAAoB,EAAEC,IAAY,EAAE;EAC/D,sCAEMD,WAAW;IAAA,OAAc,SAAS;IAAA,SAAS,GAAEC,IAAK;EAAU,QAAI;IAAA,OAExD,UAAU;IAAA,SAAS,GAAEA,IAAK;EAAW;AAGrD;AAEA,OAAO,MAAMC,gBAAgB,GAAGL,YAAY,CAAC;EAC3CM,KAAK,EAAEC,MAAM;EACbC,OAAO,EAAE;IACPC,IAAI,EAAEF,MAA2B;IACjCG,OAAO,EAAE,UAAU;IACnBC,SAAS,EAAGC,CAAM,IAAKX,eAAe,CAACY,QAAQ,CAACD,CAAC;EACnD;AACF,CAAC,EAAE,SAAS,CAAC;AAEb,OAAO,SAASE,UAAU,CACxBC,KAA6B,EAE7B;EAAA,IADAX,IAAI,uEAAGL,sBAAsB,EAAE;EAE/B,MAAMiB,cAAc,GAAGnB,QAAQ,CAAC,MAAM;IACpC,MAAM;MAAEW;IAAQ,CAAC,GAAGV,KAAK,CAACiB,KAAK,CAAC;IAChC,OAAQ,GAAEX,IAAK,aAAYI,OAAQ,EAAC;EACtC,CAAC,CAAC;EAEF,MAAM;IAAES,YAAY;IAAEC;EAAY,CAAC,GAAGtB,QAAQ,CAACC,QAAQ,CAAC,MAAM;IAC5D,MAAM;MAAEW,OAAO;MAAEF;IAAM,CAAC,GAAGR,KAAK,CAACiB,KAAK,CAAC;IACvC,OAAO;MACL,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAACF,QAAQ,CAACL,OAAO,CAAC,GAAG,YAAY,GAAG,MAAM,GAAGF;IACpE,CAAC;EACH,CAAC,CAAC,CAAC;EAEH,OAAO;IAAEW,YAAY;IAAEC,WAAW;IAAEF;EAAe,CAAC;AACtD"}
@@ -1,55 +1,50 @@
1
1
  import { attachedRoot } from "../../util/index.mjs";
2
-
3
2
  function defaultConditional() {
4
3
  return true;
5
4
  }
6
-
7
5
  function checkEvent(e, el, binding) {
8
6
  // The include element callbacks below can be expensive
9
7
  // so we should avoid calling them when we're not active.
10
8
  // Explicitly check for false to allow fallback compatibility
11
9
  // with non-toggleable components
12
- if (!e || checkIsActive(e, binding) === false) return false; // If we're clicking inside the shadowroot, then the app root doesn't get the same
10
+ if (!e || checkIsActive(e, binding) === false) return false;
11
+
12
+ // If we're clicking inside the shadowroot, then the app root doesn't get the same
13
13
  // level of introspection as to _what_ we're clicking. We want to check to see if
14
14
  // our target is the shadowroot parent container, and if it is, ignore.
15
-
16
15
  const root = attachedRoot(el);
17
- if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot && root.host === e.target) return false; // Check if additional elements were passed to be included in check
18
- // (click must be outside all included elements, if any)
19
-
20
- const elements = (typeof binding.value === 'object' && binding.value.include || (() => []))(); // Add the root element for the component this directive was defined on
16
+ if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot && root.host === e.target) return false;
21
17
 
18
+ // Check if additional elements were passed to be included in check
19
+ // (click must be outside all included elements, if any)
20
+ const elements = (typeof binding.value === 'object' && binding.value.include || (() => []))();
21
+ // Add the root element for the component this directive was defined on
22
+ elements.push(el);
22
23
 
23
- elements.push(el); // Check if it's a click outside our elements, and then if our callback returns true.
24
+ // Check if it's a click outside our elements, and then if our callback returns true.
24
25
  // Non-toggleable components should take action in their callback and return falsy.
25
26
  // Toggleable can return true if it wants to deactivate.
26
27
  // Note that, because we're in the capture phase, this callback will occur before
27
28
  // the bubbling click event on any outside elements.
28
-
29
29
  return !elements.some(el => el == null ? void 0 : el.contains(e.target));
30
30
  }
31
-
32
31
  function checkIsActive(e, binding) {
33
32
  const isActive = typeof binding.value === 'object' && binding.value.closeConditional || defaultConditional;
34
33
  return isActive(e);
35
34
  }
36
-
37
35
  function directive(e, el, binding) {
38
36
  const handler = typeof binding.value === 'function' ? binding.value : binding.value.handler;
39
37
  el._clickOutside.lastMousedownWasOutside && checkEvent(e, el, binding) && setTimeout(() => {
40
38
  checkIsActive(e, binding) && handler && handler(e);
41
39
  }, 0);
42
40
  }
43
-
44
41
  function handleShadow(el, callback) {
45
42
  const root = attachedRoot(el);
46
43
  callback(document);
47
-
48
44
  if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot) {
49
45
  callback(root);
50
46
  }
51
47
  }
52
-
53
48
  export const ClickOutside = {
54
49
  // [data-app] may not be found
55
50
  // if using bind, inserted makes
@@ -58,33 +53,27 @@ export const ClickOutside = {
58
53
  // clicks on body
59
54
  mounted(el, binding) {
60
55
  const onClick = e => directive(e, el, binding);
61
-
62
56
  const onMousedown = e => {
63
57
  el._clickOutside.lastMousedownWasOutside = checkEvent(e, el, binding);
64
58
  };
65
-
66
59
  handleShadow(el, app => {
67
60
  app.addEventListener('click', onClick, true);
68
61
  app.addEventListener('mousedown', onMousedown, true);
69
62
  });
70
-
71
63
  if (!el._clickOutside) {
72
64
  el._clickOutside = {
73
65
  lastMousedownWasOutside: true
74
66
  };
75
67
  }
76
-
77
68
  el._clickOutside[binding.instance.$.uid] = {
78
69
  onClick,
79
70
  onMousedown
80
71
  };
81
72
  },
82
-
83
73
  unmounted(el, binding) {
84
74
  if (!el._clickOutside) return;
85
75
  handleShadow(el, app => {
86
76
  var _el$_clickOutside;
87
-
88
77
  if (!app || !((_el$_clickOutside = el._clickOutside) != null && _el$_clickOutside[binding.instance.$.uid])) return;
89
78
  const {
90
79
  onClick,
@@ -95,7 +84,6 @@ export const ClickOutside = {
95
84
  });
96
85
  delete el._clickOutside[binding.instance.$.uid];
97
86
  }
98
-
99
87
  };
100
88
  export default ClickOutside;
101
89
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["attachedRoot","defaultConditional","checkEvent","e","el","binding","checkIsActive","root","ShadowRoot","host","target","elements","value","include","push","some","contains","isActive","closeConditional","directive","handler","_clickOutside","lastMousedownWasOutside","setTimeout","handleShadow","callback","document","ClickOutside","mounted","onClick","onMousedown","app","addEventListener","instance","$","uid","unmounted","removeEventListener"],"sources":["../../../src/directives/click-outside/index.ts"],"sourcesContent":["import { attachedRoot } from '@/util'\nimport type { DirectiveBinding } from 'vue'\n\ninterface ClickOutsideBindingArgs {\n handler: (e: MouseEvent) => void\n closeConditional?: (e: Event) => boolean\n include?: () => HTMLElement[]\n}\n\ninterface ClickOutsideDirectiveBinding extends DirectiveBinding {\n value: ((e: MouseEvent) => void) | ClickOutsideBindingArgs\n}\n\nfunction defaultConditional () {\n return true\n}\n\nfunction checkEvent (e: MouseEvent, el: HTMLElement, binding: ClickOutsideDirectiveBinding): boolean {\n // The include element callbacks below can be expensive\n // so we should avoid calling them when we're not active.\n // Explicitly check for false to allow fallback compatibility\n // with non-toggleable components\n if (!e || checkIsActive(e, binding) === false) return false\n\n // If we're clicking inside the shadowroot, then the app root doesn't get the same\n // level of introspection as to _what_ we're clicking. We want to check to see if\n // our target is the shadowroot parent container, and if it is, ignore.\n const root = attachedRoot(el)\n if (\n typeof ShadowRoot !== 'undefined' &&\n root instanceof ShadowRoot &&\n root.host === e.target\n ) return false\n\n // Check if additional elements were passed to be included in check\n // (click must be outside all included elements, if any)\n const elements = ((typeof binding.value === 'object' && binding.value.include) || (() => []))()\n // Add the root element for the component this directive was defined on\n elements.push(el)\n\n // Check if it's a click outside our elements, and then if our callback returns true.\n // Non-toggleable components should take action in their callback and return falsy.\n // Toggleable can return true if it wants to deactivate.\n // Note that, because we're in the capture phase, this callback will occur before\n // the bubbling click event on any outside elements.\n return !elements.some(el => el?.contains(e.target as Node))\n}\n\nfunction checkIsActive (e: MouseEvent, binding: ClickOutsideDirectiveBinding): boolean | void {\n const isActive = (typeof binding.value === 'object' && binding.value.closeConditional) || defaultConditional\n\n return isActive(e)\n}\n\nfunction directive (e: MouseEvent, el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n const handler = typeof binding.value === 'function' ? binding.value : binding.value.handler\n\n el._clickOutside!.lastMousedownWasOutside && checkEvent(e, el, binding) && setTimeout(() => {\n checkIsActive(e, binding) && handler && handler(e)\n }, 0)\n}\n\nfunction handleShadow (el: HTMLElement, callback: Function): void {\n const root = attachedRoot(el)\n\n callback(document)\n\n if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot) {\n callback(root)\n }\n}\n\nexport const ClickOutside = {\n // [data-app] may not be found\n // if using bind, inserted makes\n // sure that the root element is\n // available, iOS does not support\n // clicks on body\n mounted (el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n const onClick = (e: Event) => directive(e as MouseEvent, el, binding)\n const onMousedown = (e: Event) => {\n el._clickOutside!.lastMousedownWasOutside = checkEvent(e as MouseEvent, el, binding)\n }\n\n handleShadow(el, (app: HTMLElement) => {\n app.addEventListener('click', onClick, true)\n app.addEventListener('mousedown', onMousedown, true)\n })\n\n if (!el._clickOutside) {\n el._clickOutside = {\n lastMousedownWasOutside: true,\n }\n }\n\n el._clickOutside[binding.instance!.$.uid] = {\n onClick,\n onMousedown,\n }\n },\n\n unmounted (el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n if (!el._clickOutside) return\n\n handleShadow(el, (app: HTMLElement) => {\n if (!app || !el._clickOutside?.[binding.instance!.$.uid]) return\n\n const { onClick, onMousedown } = el._clickOutside[binding.instance!.$.uid]!\n\n app.removeEventListener('click', onClick, true)\n app.removeEventListener('mousedown', onMousedown, true)\n })\n\n delete el._clickOutside[binding.instance!.$.uid]\n },\n}\n\nexport default ClickOutside\n"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ACrBjB,EAAE,CAACiB,aAAH,GAAmB;QACjBC,uBAAuB,EAAE;MADR,CAAnB;IAGD;;IAEDlB,EAAE,CAACiB,aAAH,CAAiBhB,OAAO,CAAC4B,QAAR,CAAkBC,CAAlB,CAAoBC,GAArC,IAA4C;MAC1CN,OAD0C;MAE1CC;IAF0C,CAA5C;EAID,CA3ByB;;EA6B1BM,SAAS,CAAEhC,EAAF,EAAmBC,OAAnB,EAA0D;IACjE,IAAI,CAACD,EAAE,CAACiB,aAAR,EAAuB;IAEvBG,YAAY,CAACpB,EAAD,EAAM2B,GAAD,IAAsB;MAAA;;MACrC,IAAI,CAACA,GAAD,IAAQ,uBAAC3B,EAAE,CAACiB,aAAJ,aAAC,kBAAmBhB,OAAO,CAAC4B,QAAR,CAAkBC,CAAlB,CAAoBC,GAAvC,CAAD,CAAZ,EAA0D;MAE1D,MAAM;QAAEN,OAAF;QAAWC;MAAX,IAA2B1B,EAAE,CAACiB,aAAH,CAAiBhB,OAAO,CAAC4B,QAAR,CAAkBC,CAAlB,CAAoBC,GAArC,CAAjC;MAEAJ,GAAG,CAACM,mBAAJ,CAAwB,OAAxB,EAAiCR,OAAjC,EAA0C,IAA1C;MACAE,GAAG,CAACM,mBAAJ,CAAwB,WAAxB,EAAqCP,WAArC,EAAkD,IAAlD;IACD,CAPW,CAAZ;IASA,OAAO1B,EAAE,CAACiB,aAAH,CAAiBhB,OAAO,CAAC4B,QAAR,CAAkBC,CAAlB,CAAoBC,GAArC,CAAP;EACD;;AA1CyB,CAArB;AA6CP,eAAeR,YAAf"}
1
+ {"version":3,"file":"index.mjs","names":["attachedRoot","defaultConditional","checkEvent","e","el","binding","checkIsActive","root","ShadowRoot","host","target","elements","value","include","push","some","contains","isActive","closeConditional","directive","handler","_clickOutside","lastMousedownWasOutside","setTimeout","handleShadow","callback","document","ClickOutside","mounted","onClick","onMousedown","app","addEventListener","instance","$","uid","unmounted","removeEventListener"],"sources":["../../../src/directives/click-outside/index.ts"],"sourcesContent":["import { attachedRoot } from '@/util'\nimport type { DirectiveBinding } from 'vue'\n\ninterface ClickOutsideBindingArgs {\n handler: (e: MouseEvent) => void\n closeConditional?: (e: Event) => boolean\n include?: () => HTMLElement[]\n}\n\ninterface ClickOutsideDirectiveBinding extends DirectiveBinding {\n value: ((e: MouseEvent) => void) | ClickOutsideBindingArgs\n}\n\nfunction defaultConditional () {\n return true\n}\n\nfunction checkEvent (e: MouseEvent, el: HTMLElement, binding: ClickOutsideDirectiveBinding): boolean {\n // The include element callbacks below can be expensive\n // so we should avoid calling them when we're not active.\n // Explicitly check for false to allow fallback compatibility\n // with non-toggleable components\n if (!e || checkIsActive(e, binding) === false) return false\n\n // If we're clicking inside the shadowroot, then the app root doesn't get the same\n // level of introspection as to _what_ we're clicking. We want to check to see if\n // our target is the shadowroot parent container, and if it is, ignore.\n const root = attachedRoot(el)\n if (\n typeof ShadowRoot !== 'undefined' &&\n root instanceof ShadowRoot &&\n root.host === e.target\n ) return false\n\n // Check if additional elements were passed to be included in check\n // (click must be outside all included elements, if any)\n const elements = ((typeof binding.value === 'object' && binding.value.include) || (() => []))()\n // Add the root element for the component this directive was defined on\n elements.push(el)\n\n // Check if it's a click outside our elements, and then if our callback returns true.\n // Non-toggleable components should take action in their callback and return falsy.\n // Toggleable can return true if it wants to deactivate.\n // Note that, because we're in the capture phase, this callback will occur before\n // the bubbling click event on any outside elements.\n return !elements.some(el => el?.contains(e.target as Node))\n}\n\nfunction checkIsActive (e: MouseEvent, binding: ClickOutsideDirectiveBinding): boolean | void {\n const isActive = (typeof binding.value === 'object' && binding.value.closeConditional) || defaultConditional\n\n return isActive(e)\n}\n\nfunction directive (e: MouseEvent, el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n const handler = typeof binding.value === 'function' ? binding.value : binding.value.handler\n\n el._clickOutside!.lastMousedownWasOutside && checkEvent(e, el, binding) && setTimeout(() => {\n checkIsActive(e, binding) && handler && handler(e)\n }, 0)\n}\n\nfunction handleShadow (el: HTMLElement, callback: Function): void {\n const root = attachedRoot(el)\n\n callback(document)\n\n if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot) {\n callback(root)\n }\n}\n\nexport const ClickOutside = {\n // [data-app] may not be found\n // if using bind, inserted makes\n // sure that the root element is\n // available, iOS does not support\n // clicks on body\n mounted (el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n const onClick = (e: Event) => directive(e as MouseEvent, el, binding)\n const onMousedown = (e: Event) => {\n el._clickOutside!.lastMousedownWasOutside = checkEvent(e as MouseEvent, el, binding)\n }\n\n handleShadow(el, (app: HTMLElement) => {\n app.addEventListener('click', onClick, true)\n app.addEventListener('mousedown', onMousedown, true)\n })\n\n if (!el._clickOutside) {\n el._clickOutside = {\n lastMousedownWasOutside: true,\n }\n }\n\n el._clickOutside[binding.instance!.$.uid] = {\n onClick,\n onMousedown,\n }\n },\n\n unmounted (el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n if (!el._clickOutside) return\n\n handleShadow(el, (app: HTMLElement) => {\n if (!app || !el._clickOutside?.[binding.instance!.$.uid]) return\n\n const { onClick, onMousedown } = el._clickOutside[binding.instance!.$.uid]!\n\n app.removeEventListener('click', onClick, true)\n app.removeEventListener('mousedown', onMousedown, true)\n })\n\n delete el._clickOutside[binding.instance!.$.uid]\n },\n}\n\nexport default ClickOutside\n"],"mappings":"SAASA,YAAY;AAarB,SAASC,kBAAkB,GAAI;EAC7B,OAAO,IAAI;AACb;AAEA,SAASC,UAAU,CAAEC,CAAa,EAAEC,EAAe,EAAEC,OAAqC,EAAW;EACnG;EACA;EACA;EACA;EACA,IAAI,CAACF,CAAC,IAAIG,aAAa,CAACH,CAAC,EAAEE,OAAO,CAAC,KAAK,KAAK,EAAE,OAAO,KAAK;;EAE3D;EACA;EACA;EACA,MAAME,IAAI,GAAGP,YAAY,CAACI,EAAE,CAAC;EAC7B,IACE,OAAOI,UAAU,KAAK,WAAW,IACjCD,IAAI,YAAYC,UAAU,IAC1BD,IAAI,CAACE,IAAI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AEN,OAAO;QAAEC;MAAY,CAAC,GAAG1B,EAAE,CAACiB,aAAa,CAAChB,OAAO,CAAC4B,QAAQ,CAAEC,CAAC,CAACC,GAAG,CAAE;MAE3EJ,GAAG,CAACM,mBAAmB,CAAC,OAAO,EAAER,OAAO,EAAE,IAAI,CAAC;MAC/CE,GAAG,CAACM,mBAAmB,CAAC,WAAW,EAAEP,WAAW,EAAE,IAAI,CAAC;IACzD,CAAC,CAAC;IAEF,OAAO1B,EAAE,CAACiB,aAAa,CAAChB,OAAO,CAAC4B,QAAQ,CAAEC,CAAC,CAACC,GAAG,CAAC;EAClD;AACF,CAAC;AAED,eAAeR,YAAY"}
@@ -1,43 +1,34 @@
1
1
  // @ts-nocheck
2
-
3
2
  /* eslint-disable */
4
3
  // Utilities
5
4
  import { classToHex, isCssColor, parseGradient } from "../../util/colorUtils.mjs";
6
5
  import colors from "../../util/colors.mjs"; // Types
7
-
8
6
  function setTextColor(el, color, currentTheme) {
9
7
  const cssColor = !isCssColor(color) ? classToHex(color, colors, currentTheme) : color;
10
8
  el.style.color = cssColor;
11
9
  el.style.caretColor = cssColor;
12
10
  }
13
-
14
11
  function setBackgroundColor(el, color, currentTheme) {
15
12
  const cssColor = !isCssColor(color) ? classToHex(color, colors, currentTheme) : color;
16
13
  el.style.backgroundColor = cssColor;
17
14
  el.style.borderColor = cssColor;
18
15
  }
19
-
20
16
  function setBorderColor(el, color, currentTheme, modifiers) {
21
17
  const cssColor = !isCssColor(color) ? classToHex(color, colors, currentTheme) : color;
22
-
23
18
  if (!modifiers || !Object.keys(modifiers).length) {
24
19
  el.style.borderColor = cssColor;
25
20
  return;
26
21
  }
27
-
28
22
  if (modifiers.top) el.style.borderTopColor = cssColor;
29
23
  if (modifiers.right) el.style.borderRightColor = cssColor;
30
24
  if (modifiers.bottom) el.style.borderBottomColor = cssColor;
31
25
  if (modifiers.left) el.style.borderLeftColor = cssColor;
32
26
  }
33
-
34
27
  function setGradientColor(el, gradient, currentTheme) {
35
28
  el.style.backgroundImage = `linear-gradient(${parseGradient(gradient, colors, currentTheme)})`;
36
29
  }
37
-
38
30
  function updateColor(el, binding, node) {
39
31
  const currentTheme = node.context.$vuetify.theme.currentTheme;
40
-
41
32
  if (binding.arg === undefined) {
42
33
  setBackgroundColor(el, binding.value, currentTheme);
43
34
  } else if (binding.arg === 'text') {
@@ -48,12 +39,10 @@ function updateColor(el, binding, node) {
48
39
  setGradientColor(el, binding.value, currentTheme);
49
40
  }
50
41
  }
51
-
52
42
  function update(el, binding, node) {
53
43
  if (binding.value === binding.oldValue) return;
54
44
  updateColor(el, binding, node);
55
45
  }
56
-
57
46
  export const Color = {
58
47
  bind: updateColor,
59
48
  update