@dimailn/vuetify 2.7.2-alpha26 → 2.7.2-alpha27

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 (444) hide show
  1. package/dist/vuetify.js +1109 -1021
  2. package/dist/vuetify.js.map +1 -1
  3. package/dist/vuetify.min.css +1 -1
  4. package/dist/vuetify.min.js +2 -2
  5. package/es5/components/VAlert/VAlert.js +1 -0
  6. package/es5/components/VAlert/VAlert.js.map +1 -1
  7. package/es5/components/VAppBar/VAppBar.js +17 -6
  8. package/es5/components/VAppBar/VAppBar.js.map +1 -1
  9. package/es5/components/VBadge/VBadge.js +1 -0
  10. package/es5/components/VBadge/VBadge.js.map +1 -1
  11. package/es5/components/VBanner/VBanner.js +11 -12
  12. package/es5/components/VBanner/VBanner.js.map +1 -1
  13. package/es5/components/VBottomNavigation/VBottomNavigation.js +8 -7
  14. package/es5/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
  15. package/es5/components/VBtn/VBtn.js +2 -2
  16. package/es5/components/VBtn/VBtn.js.map +1 -1
  17. package/es5/components/VCalendar/VCalendar.js +27 -29
  18. package/es5/components/VCalendar/VCalendar.js.map +1 -1
  19. package/es5/components/VCalendar/VCalendarCategory.js +26 -34
  20. package/es5/components/VCalendar/VCalendarCategory.js.map +1 -1
  21. package/es5/components/VCalendar/VCalendarDaily.js +43 -60
  22. package/es5/components/VCalendar/VCalendarDaily.js.map +1 -1
  23. package/es5/components/VCalendar/VCalendarMonthly.js +2 -2
  24. package/es5/components/VCalendar/VCalendarMonthly.js.map +1 -1
  25. package/es5/components/VCalendar/VCalendarWeekly.js +26 -35
  26. package/es5/components/VCalendar/VCalendarWeekly.js.map +1 -1
  27. package/es5/components/VCalendar/mixins/calendar-base.js +5 -10
  28. package/es5/components/VCalendar/mixins/calendar-base.js.map +1 -1
  29. package/es5/components/VCalendar/mixins/calendar-with-events.js +43 -58
  30. package/es5/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
  31. package/es5/components/VCalendar/mixins/calendar-with-intervals.js +2 -2
  32. package/es5/components/VCalendar/mixins/calendar-with-intervals.js.map +1 -1
  33. package/es5/components/VCalendar/mixins/times.js.map +1 -1
  34. package/es5/components/VCarousel/VCarousel.js +10 -9
  35. package/es5/components/VCarousel/VCarousel.js.map +1 -1
  36. package/es5/components/VCheckbox/VCheckbox.js +31 -2
  37. package/es5/components/VCheckbox/VCheckbox.js.map +1 -1
  38. package/es5/components/VCheckbox/VSimpleCheckbox.js +0 -3
  39. package/es5/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
  40. package/es5/components/VChip/VChip.js +14 -6
  41. package/es5/components/VChip/VChip.js.map +1 -1
  42. package/es5/components/VData/VData.js +1 -0
  43. package/es5/components/VData/VData.js.map +1 -1
  44. package/es5/components/VDataIterator/VDataFooter.js +1 -0
  45. package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
  46. package/es5/components/VDataIterator/VDataIterator.js +1 -0
  47. package/es5/components/VDataIterator/VDataIterator.js.map +1 -1
  48. package/es5/components/VDataTable/VDataTable.js +1 -6
  49. package/es5/components/VDataTable/VDataTable.js.map +1 -1
  50. package/es5/components/VDataTable/VDataTableHeaderDesktop.js +1 -0
  51. package/es5/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
  52. package/es5/components/VDataTable/VDataTableHeaderMobile.js +1 -0
  53. package/es5/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
  54. package/es5/components/VDataTable/VEditDialog.js +19 -18
  55. package/es5/components/VDataTable/VEditDialog.js.map +1 -1
  56. package/es5/components/VDataTable/mixins/header.js +0 -6
  57. package/es5/components/VDataTable/mixins/header.js.map +1 -1
  58. package/es5/components/VDatePicker/VDatePicker.js +13 -18
  59. package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
  60. package/es5/components/VDatePicker/VDatePickerHeader.js +48 -26
  61. package/es5/components/VDatePicker/VDatePickerHeader.js.map +1 -1
  62. package/es5/components/VDatePicker/VDatePickerMonthTable.js +6 -3
  63. package/es5/components/VDatePicker/VDatePickerMonthTable.js.map +1 -1
  64. package/es5/components/VDatePicker/VDatePickerTitle.js +4 -3
  65. package/es5/components/VDatePicker/VDatePickerTitle.js.map +1 -1
  66. package/es5/components/VDatePicker/VDatePickerYears.js +11 -12
  67. package/es5/components/VDatePicker/VDatePickerYears.js.map +1 -1
  68. package/es5/components/VDatePicker/mixins/date-picker-table.js +16 -13
  69. package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
  70. package/es5/components/VDatePicker/util/createNativeLocaleFormatter.js +4 -0
  71. package/es5/components/VDatePicker/util/createNativeLocaleFormatter.js.map +1 -1
  72. package/es5/components/VDialog/VDialog.js +1 -0
  73. package/es5/components/VDialog/VDialog.js.map +1 -1
  74. package/es5/components/VExpansionPanel/VExpansionPanel.js +1 -0
  75. package/es5/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
  76. package/es5/components/VExpansionPanel/VExpansionPanelHeader.js +1 -10
  77. package/es5/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
  78. package/es5/components/VFileInput/VFileInput.js +1 -0
  79. package/es5/components/VFileInput/VFileInput.js.map +1 -1
  80. package/es5/components/VForm/VForm.js +1 -0
  81. package/es5/components/VForm/VForm.js.map +1 -1
  82. package/es5/components/VHover/VHover.js +1 -0
  83. package/es5/components/VHover/VHover.js.map +1 -1
  84. package/es5/components/VImg/VImg.js +3 -5
  85. package/es5/components/VImg/VImg.js.map +1 -1
  86. package/es5/components/VInput/VInput.js +1 -0
  87. package/es5/components/VInput/VInput.js.map +1 -1
  88. package/es5/components/VItemGroup/VItem.js +2 -1
  89. package/es5/components/VItemGroup/VItem.js.map +1 -1
  90. package/es5/components/VItemGroup/VItemGroup.js +5 -1
  91. package/es5/components/VItemGroup/VItemGroup.js.map +1 -1
  92. package/es5/components/VLazy/VLazy.js +8 -15
  93. package/es5/components/VLazy/VLazy.js.map +1 -1
  94. package/es5/components/VList/VListGroup.js +3 -11
  95. package/es5/components/VList/VListGroup.js.map +1 -1
  96. package/es5/components/VList/VListItem.js +26 -12
  97. package/es5/components/VList/VListItem.js.map +1 -1
  98. package/es5/components/VList/VListItemAction.js +23 -9
  99. package/es5/components/VList/VListItemAction.js.map +1 -1
  100. package/es5/components/VMenu/VMenu.js +1 -0
  101. package/es5/components/VMenu/VMenu.js.map +1 -1
  102. package/es5/components/VNavigationDrawer/VNavigationDrawer.js +1 -7
  103. package/es5/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
  104. package/es5/components/VOtpInput/VOtpInput.js +1 -5
  105. package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
  106. package/es5/components/VOverflowBtn/VOverflowBtn.js +1 -0
  107. package/es5/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
  108. package/es5/components/VOverlay/VOverlay.js +1 -0
  109. package/es5/components/VOverlay/VOverlay.js.map +1 -1
  110. package/es5/components/VPagination/VPagination.js +1 -3
  111. package/es5/components/VPagination/VPagination.js.map +1 -1
  112. package/es5/components/VPicker/VPicker.js +2 -3
  113. package/es5/components/VPicker/VPicker.js.map +1 -1
  114. package/es5/components/VProgressCircular/VProgressCircular.js +1 -10
  115. package/es5/components/VProgressCircular/VProgressCircular.js.map +1 -1
  116. package/es5/components/VProgressLinear/VProgressLinear.js +4 -12
  117. package/es5/components/VProgressLinear/VProgressLinear.js.map +1 -1
  118. package/es5/components/VRadioGroup/VRadio.js +1 -0
  119. package/es5/components/VRadioGroup/VRadio.js.map +1 -1
  120. package/es5/components/VSelect/VSelect.js +111 -64
  121. package/es5/components/VSelect/VSelect.js.map +1 -1
  122. package/es5/components/VSelect/VSelectList.js +13 -17
  123. package/es5/components/VSelect/VSelectList.js.map +1 -1
  124. package/es5/components/VSlideGroup/VSlideGroup.js +1 -4
  125. package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
  126. package/es5/components/VSlideGroup/VSlideItem.js +2 -1
  127. package/es5/components/VSlideGroup/VSlideItem.js.map +1 -1
  128. package/es5/components/VSlider/VSlider.js +0 -3
  129. package/es5/components/VSlider/VSlider.js.map +1 -1
  130. package/es5/components/VSnackbar/VSnackbar.js +1 -0
  131. package/es5/components/VSnackbar/VSnackbar.js.map +1 -1
  132. package/es5/components/VSparkline/VSparkline.js +48 -68
  133. package/es5/components/VSparkline/VSparkline.js.map +1 -1
  134. package/es5/components/VSpeedDial/VSpeedDial.js +4 -10
  135. package/es5/components/VSpeedDial/VSpeedDial.js.map +1 -1
  136. package/es5/components/VStepper/VStepper.js +1 -0
  137. package/es5/components/VStepper/VStepper.js.map +1 -1
  138. package/es5/components/VStepper/VStepperStep.js +11 -19
  139. package/es5/components/VStepper/VStepperStep.js.map +1 -1
  140. package/es5/components/VSwitch/VSwitch.js +1 -3
  141. package/es5/components/VSwitch/VSwitch.js.map +1 -1
  142. package/es5/components/VTabs/VTab.js +1 -0
  143. package/es5/components/VTabs/VTab.js.map +1 -1
  144. package/es5/components/VTabs/VTabs.js +11 -4
  145. package/es5/components/VTabs/VTabs.js.map +1 -1
  146. package/es5/components/VTabs/VTabsItems.js +1 -0
  147. package/es5/components/VTabs/VTabsItems.js.map +1 -1
  148. package/es5/components/VTextField/VTextField.js +31 -27
  149. package/es5/components/VTextField/VTextField.js.map +1 -1
  150. package/es5/components/VTimePicker/VTimePicker.js +72 -44
  151. package/es5/components/VTimePicker/VTimePicker.js.map +1 -1
  152. package/es5/components/VTimePicker/VTimePickerClock.js +37 -48
  153. package/es5/components/VTimePicker/VTimePickerClock.js.map +1 -1
  154. package/es5/components/VTimePicker/VTimePickerTitle.js +13 -11
  155. package/es5/components/VTimePicker/VTimePickerTitle.js.map +1 -1
  156. package/es5/components/VToolbar/VToolbar.js +1 -3
  157. package/es5/components/VToolbar/VToolbar.js.map +1 -1
  158. package/es5/components/VTooltip/VTooltip.js +6 -3
  159. package/es5/components/VTooltip/VTooltip.js.map +1 -1
  160. package/es5/components/VVirtualScroll/VVirtualScroll.js +0 -3
  161. package/es5/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
  162. package/es5/components/VWindow/VWindow.js +0 -3
  163. package/es5/components/VWindow/VWindow.js.map +1 -1
  164. package/es5/components/VWindow/VWindowItem.js +1 -5
  165. package/es5/components/VWindow/VWindowItem.js.map +1 -1
  166. package/es5/framework.js +1 -1
  167. package/es5/mixins/detachable/index.js +9 -5
  168. package/es5/mixins/detachable/index.js.map +1 -1
  169. package/lib/components/VAlert/VAlert.js +1 -0
  170. package/lib/components/VAlert/VAlert.js.map +1 -1
  171. package/lib/components/VAppBar/VAppBar.js +17 -6
  172. package/lib/components/VAppBar/VAppBar.js.map +1 -1
  173. package/lib/components/VBadge/VBadge.js +1 -0
  174. package/lib/components/VBadge/VBadge.js.map +1 -1
  175. package/lib/components/VBanner/VBanner.js +7 -11
  176. package/lib/components/VBanner/VBanner.js.map +1 -1
  177. package/lib/components/VBottomNavigation/VBottomNavigation.js +8 -7
  178. package/lib/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
  179. package/lib/components/VBtn/VBtn.js +2 -2
  180. package/lib/components/VBtn/VBtn.js.map +1 -1
  181. package/lib/components/VCalendar/VCalendar.js +26 -31
  182. package/lib/components/VCalendar/VCalendar.js.map +1 -1
  183. package/lib/components/VCalendar/VCalendarCategory.js +8 -10
  184. package/lib/components/VCalendar/VCalendarCategory.js.map +1 -1
  185. package/lib/components/VCalendar/VCalendarDaily.js +21 -33
  186. package/lib/components/VCalendar/VCalendarDaily.js.map +1 -1
  187. package/lib/components/VCalendar/VCalendarMonthly.js +2 -2
  188. package/lib/components/VCalendar/VCalendarMonthly.js.map +1 -1
  189. package/lib/components/VCalendar/VCalendarWeekly.js +17 -30
  190. package/lib/components/VCalendar/VCalendarWeekly.js.map +1 -1
  191. package/lib/components/VCalendar/mixins/calendar-base.js +7 -11
  192. package/lib/components/VCalendar/mixins/calendar-base.js.map +1 -1
  193. package/lib/components/VCalendar/mixins/calendar-with-events.js +16 -39
  194. package/lib/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
  195. package/lib/components/VCalendar/mixins/calendar-with-intervals.js +2 -2
  196. package/lib/components/VCalendar/mixins/calendar-with-intervals.js.map +1 -1
  197. package/lib/components/VCalendar/mixins/times.js.map +1 -1
  198. package/lib/components/VCarousel/VCarousel.js +12 -11
  199. package/lib/components/VCarousel/VCarousel.js.map +1 -1
  200. package/lib/components/VCheckbox/VCheckbox.js +14 -1
  201. package/lib/components/VCheckbox/VCheckbox.js.map +1 -1
  202. package/lib/components/VCheckbox/VSimpleCheckbox.js +0 -3
  203. package/lib/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
  204. package/lib/components/VChip/VChip.js +14 -6
  205. package/lib/components/VChip/VChip.js.map +1 -1
  206. package/lib/components/VData/VData.js +1 -0
  207. package/lib/components/VData/VData.js.map +1 -1
  208. package/lib/components/VDataIterator/VDataFooter.js +1 -0
  209. package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
  210. package/lib/components/VDataIterator/VDataIterator.js +1 -0
  211. package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
  212. package/lib/components/VDataTable/VDataTable.js +2 -7
  213. package/lib/components/VDataTable/VDataTable.js.map +1 -1
  214. package/lib/components/VDataTable/VDataTableHeaderDesktop.js +1 -0
  215. package/lib/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
  216. package/lib/components/VDataTable/VDataTableHeaderMobile.js +1 -0
  217. package/lib/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
  218. package/lib/components/VDataTable/VEditDialog.js +15 -14
  219. package/lib/components/VDataTable/VEditDialog.js.map +1 -1
  220. package/lib/components/VDataTable/mixins/header.js +0 -5
  221. package/lib/components/VDataTable/mixins/header.js.map +1 -1
  222. package/lib/components/VDatePicker/VDatePicker.js +11 -16
  223. package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
  224. package/lib/components/VDatePicker/VDatePickerHeader.js +33 -20
  225. package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
  226. package/lib/components/VDatePicker/VDatePickerMonthTable.js +3 -1
  227. package/lib/components/VDatePicker/VDatePickerMonthTable.js.map +1 -1
  228. package/lib/components/VDatePicker/VDatePickerTitle.js +4 -3
  229. package/lib/components/VDatePicker/VDatePickerTitle.js.map +1 -1
  230. package/lib/components/VDatePicker/VDatePickerYears.js +8 -9
  231. package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
  232. package/lib/components/VDatePicker/mixins/date-picker-table.js +17 -13
  233. package/lib/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
  234. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.js +4 -0
  235. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.js.map +1 -1
  236. package/lib/components/VDialog/VDialog.js +1 -0
  237. package/lib/components/VDialog/VDialog.js.map +1 -1
  238. package/lib/components/VExpansionPanel/VExpansionPanel.js +1 -0
  239. package/lib/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
  240. package/lib/components/VExpansionPanel/VExpansionPanelHeader.js +1 -4
  241. package/lib/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
  242. package/lib/components/VFileInput/VFileInput.js +1 -0
  243. package/lib/components/VFileInput/VFileInput.js.map +1 -1
  244. package/lib/components/VForm/VForm.js +1 -0
  245. package/lib/components/VForm/VForm.js.map +1 -1
  246. package/lib/components/VHover/VHover.js +1 -0
  247. package/lib/components/VHover/VHover.js.map +1 -1
  248. package/lib/components/VImg/VImg.js +2 -6
  249. package/lib/components/VImg/VImg.js.map +1 -1
  250. package/lib/components/VInput/VInput.js +1 -0
  251. package/lib/components/VInput/VInput.js.map +1 -1
  252. package/lib/components/VItemGroup/VItem.js +2 -1
  253. package/lib/components/VItemGroup/VItem.js.map +1 -1
  254. package/lib/components/VItemGroup/VItemGroup.js +6 -1
  255. package/lib/components/VItemGroup/VItemGroup.js.map +1 -1
  256. package/lib/components/VLazy/VLazy.js +8 -15
  257. package/lib/components/VLazy/VLazy.js.map +1 -1
  258. package/lib/components/VList/VListGroup.js +3 -5
  259. package/lib/components/VList/VListGroup.js.map +1 -1
  260. package/lib/components/VList/VListItem.js +25 -14
  261. package/lib/components/VList/VListItem.js.map +1 -1
  262. package/lib/components/VList/VListItemAction.js +15 -9
  263. package/lib/components/VList/VListItemAction.js.map +1 -1
  264. package/lib/components/VMenu/VMenu.js +1 -0
  265. package/lib/components/VMenu/VMenu.js.map +1 -1
  266. package/lib/components/VNavigationDrawer/VNavigationDrawer.js +1 -6
  267. package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
  268. package/lib/components/VOtpInput/VOtpInput.js +2 -6
  269. package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
  270. package/lib/components/VOverflowBtn/VOverflowBtn.js +1 -0
  271. package/lib/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
  272. package/lib/components/VOverlay/VOverlay.js +1 -0
  273. package/lib/components/VOverlay/VOverlay.js.map +1 -1
  274. package/lib/components/VPagination/VPagination.js +1 -3
  275. package/lib/components/VPagination/VPagination.js.map +1 -1
  276. package/lib/components/VPicker/VPicker.js +3 -3
  277. package/lib/components/VPicker/VPicker.js.map +1 -1
  278. package/lib/components/VProgressCircular/VProgressCircular.js +1 -4
  279. package/lib/components/VProgressCircular/VProgressCircular.js.map +1 -1
  280. package/lib/components/VProgressLinear/VProgressLinear.js +4 -6
  281. package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
  282. package/lib/components/VRadioGroup/VRadio.js +1 -0
  283. package/lib/components/VRadioGroup/VRadio.js.map +1 -1
  284. package/lib/components/VSelect/VSelect.js +64 -19
  285. package/lib/components/VSelect/VSelect.js.map +1 -1
  286. package/lib/components/VSelect/VSelectList.js +13 -15
  287. package/lib/components/VSelect/VSelectList.js.map +1 -1
  288. package/lib/components/VSlideGroup/VSlideGroup.js +1 -4
  289. package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
  290. package/lib/components/VSlideGroup/VSlideItem.js +2 -1
  291. package/lib/components/VSlideGroup/VSlideItem.js.map +1 -1
  292. package/lib/components/VSlider/VSlider.js +0 -3
  293. package/lib/components/VSlider/VSlider.js.map +1 -1
  294. package/lib/components/VSnackbar/VSnackbar.js +1 -0
  295. package/lib/components/VSnackbar/VSnackbar.js.map +1 -1
  296. package/lib/components/VSparkline/VSparkline.js +48 -67
  297. package/lib/components/VSparkline/VSparkline.js.map +1 -1
  298. package/lib/components/VSpeedDial/VSpeedDial.js +3 -9
  299. package/lib/components/VSpeedDial/VSpeedDial.js.map +1 -1
  300. package/lib/components/VStepper/VStepper.js +1 -0
  301. package/lib/components/VStepper/VStepper.js.map +1 -1
  302. package/lib/components/VStepper/VStepperStep.js +7 -18
  303. package/lib/components/VStepper/VStepperStep.js.map +1 -1
  304. package/lib/components/VSwitch/VSwitch.js +1 -3
  305. package/lib/components/VSwitch/VSwitch.js.map +1 -1
  306. package/lib/components/VTabs/VTab.js +1 -0
  307. package/lib/components/VTabs/VTab.js.map +1 -1
  308. package/lib/components/VTabs/VTabs.js +14 -4
  309. package/lib/components/VTabs/VTabs.js.map +1 -1
  310. package/lib/components/VTabs/VTabsItems.js +1 -0
  311. package/lib/components/VTabs/VTabsItems.js.map +1 -1
  312. package/lib/components/VTextField/VTextField.js +6 -15
  313. package/lib/components/VTextField/VTextField.js.map +1 -1
  314. package/lib/components/VTimePicker/VTimePicker.js +65 -31
  315. package/lib/components/VTimePicker/VTimePicker.js.map +1 -1
  316. package/lib/components/VTimePicker/VTimePickerClock.js +24 -39
  317. package/lib/components/VTimePicker/VTimePickerClock.js.map +1 -1
  318. package/lib/components/VTimePicker/VTimePickerTitle.js +3 -2
  319. package/lib/components/VTimePicker/VTimePickerTitle.js.map +1 -1
  320. package/lib/components/VToolbar/VToolbar.js +1 -3
  321. package/lib/components/VToolbar/VToolbar.js.map +1 -1
  322. package/lib/components/VTooltip/VTooltip.js +1 -2
  323. package/lib/components/VTooltip/VTooltip.js.map +1 -1
  324. package/lib/components/VVirtualScroll/VVirtualScroll.js +0 -3
  325. package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
  326. package/lib/components/VWindow/VWindow.js +0 -3
  327. package/lib/components/VWindow/VWindow.js.map +1 -1
  328. package/lib/components/VWindow/VWindowItem.js +2 -6
  329. package/lib/components/VWindow/VWindowItem.js.map +1 -1
  330. package/lib/framework.js +1 -1
  331. package/lib/mixins/detachable/index.js +9 -5
  332. package/lib/mixins/detachable/index.js.map +1 -1
  333. package/package.json +1 -1
  334. package/src/components/VAlert/VAlert.ts +2 -0
  335. package/src/components/VAppBar/VAppBar.ts +12 -3
  336. package/src/components/VBadge/VBadge.ts +1 -1
  337. package/src/components/VBanner/VBanner.ts +14 -14
  338. package/src/components/VBottomNavigation/VBottomNavigation.ts +10 -8
  339. package/src/components/VBtn/VBtn.ts +2 -2
  340. package/src/components/VCalendar/VCalendar.ts +29 -27
  341. package/src/components/VCalendar/VCalendarCategory.ts +9 -8
  342. package/src/components/VCalendar/VCalendarDaily.ts +18 -28
  343. package/src/components/VCalendar/VCalendarMonthly.ts +2 -1
  344. package/src/components/VCalendar/VCalendarWeekly.ts +18 -30
  345. package/src/components/VCalendar/__tests__/VCalendar.spec.ts +18 -34
  346. package/src/components/VCalendar/__tests__/VCalendarCategory.spec.ts +16 -14
  347. package/src/components/VCalendar/__tests__/VCalendarDaily.spec.ts +30 -28
  348. package/src/components/VCalendar/__tests__/__snapshots__/VCalendar.spec.ts.snap +206 -205
  349. package/src/components/VCalendar/__tests__/__snapshots__/VCalendarDaily.spec.ts.snap +122 -122
  350. package/src/components/VCalendar/mixins/__tests__/__snapshots__/calendar-with-events.spec.ts.snap +1 -56
  351. package/src/components/VCalendar/mixins/__tests__/calendar-base.spec.ts +24 -21
  352. package/src/components/VCalendar/mixins/__tests__/calendar-with-events.spec.ts +27 -34
  353. package/src/components/VCalendar/mixins/__tests__/calendar-with-intervals.spec.ts +31 -28
  354. package/src/components/VCalendar/mixins/__tests__/times.spec.ts +10 -9
  355. package/src/components/VCalendar/mixins/calendar-base.ts +8 -12
  356. package/src/components/VCalendar/mixins/calendar-with-events.ts +19 -38
  357. package/src/components/VCalendar/mixins/calendar-with-intervals.ts +1 -1
  358. package/src/components/VCalendar/mixins/times.ts +1 -1
  359. package/src/components/VCarousel/VCarousel.ts +13 -9
  360. package/src/components/VCheckbox/VCheckbox.ts +19 -1
  361. package/src/components/VCheckbox/VSimpleCheckbox.ts +0 -3
  362. package/src/components/VChip/VChip.ts +16 -13
  363. package/src/components/VData/VData.ts +2 -0
  364. package/src/components/VDataIterator/VDataFooter.ts +2 -0
  365. package/src/components/VDataIterator/VDataIterator.ts +2 -0
  366. package/src/components/VDataTable/VDataTable.ts +2 -4
  367. package/src/components/VDataTable/VDataTableHeaderDesktop.ts +5 -0
  368. package/src/components/VDataTable/VDataTableHeaderMobile.ts +2 -0
  369. package/src/components/VDataTable/VEditDialog.ts +19 -17
  370. package/src/components/VDataTable/mixins/header.ts +0 -4
  371. package/src/components/VDatePicker/VDatePicker.ts +13 -18
  372. package/src/components/VDatePicker/VDatePickerHeader.ts +44 -32
  373. package/src/components/VDatePicker/VDatePickerMonthTable.ts +1 -1
  374. package/src/components/VDatePicker/VDatePickerTitle.ts +7 -5
  375. package/src/components/VDatePicker/VDatePickerYears.ts +6 -10
  376. package/src/components/VDatePicker/__tests__/VDatePicker.date.spec.ts +302 -246
  377. package/src/components/VDatePicker/__tests__/VDatePicker.month.spec.ts +90 -86
  378. package/src/components/VDatePicker/__tests__/VDatePickerDateTable.spec.ts +76 -90
  379. package/src/components/VDatePicker/__tests__/VDatePickerHeader.spec.ts +96 -71
  380. package/src/components/VDatePicker/__tests__/VDatePickerMonthTable.spec.ts +63 -77
  381. package/src/components/VDatePicker/__tests__/VDatePickerTitle.spec.ts +48 -28
  382. package/src/components/VDatePicker/__tests__/VDatePickerYears.spec.ts +25 -22
  383. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.date.spec.ts.snap +601 -586
  384. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.month.spec.ts.snap +203 -193
  385. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerDateTable.spec.ts.snap +615 -615
  386. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerHeader.spec.ts.snap +52 -52
  387. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerMonthTable.spec.ts.snap +144 -144
  388. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerTitle.spec.ts.snap +3 -4
  389. package/src/components/VDatePicker/mixins/date-picker-table.ts +18 -13
  390. package/src/components/VDatePicker/util/__tests__/createNativeLocaleFormatter.spec.ts +7 -0
  391. package/src/components/VDatePicker/util/createNativeLocaleFormatter.ts +3 -0
  392. package/src/components/VDialog/VDialog.ts +7 -5
  393. package/src/components/VExpansionPanel/VExpansionPanel.ts +5 -0
  394. package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +0 -1
  395. package/src/components/VFileInput/VFileInput.ts +2 -0
  396. package/src/components/VForm/VForm.ts +2 -0
  397. package/src/components/VHover/VHover.ts +2 -0
  398. package/src/components/VImg/VImg.ts +2 -1
  399. package/src/components/VInput/VInput.ts +2 -0
  400. package/src/components/VItemGroup/VItem.ts +4 -0
  401. package/src/components/VItemGroup/VItemGroup.ts +7 -1
  402. package/src/components/VLazy/VLazy.ts +11 -13
  403. package/src/components/VList/VListGroup.ts +7 -8
  404. package/src/components/VList/VListItem.ts +29 -15
  405. package/src/components/VList/VListItemAction.ts +11 -10
  406. package/src/components/VMenu/VMenu.ts +3 -1
  407. package/src/components/VNavigationDrawer/VNavigationDrawer.ts +2 -5
  408. package/src/components/VOtpInput/VOtpInput.ts +2 -3
  409. package/src/components/VOverflowBtn/VOverflowBtn.ts +2 -0
  410. package/src/components/VOverlay/VOverlay.ts +2 -0
  411. package/src/components/VPagination/VPagination.ts +2 -1
  412. package/src/components/VPicker/VPicker.ts +8 -10
  413. package/src/components/VPicker/__tests__/VPicker.spec.ts +14 -15
  414. package/src/components/VProgressCircular/VProgressCircular.ts +0 -1
  415. package/src/components/VProgressLinear/VProgressLinear.ts +14 -13
  416. package/src/components/VRadioGroup/VRadio.ts +2 -0
  417. package/src/components/VSelect/VSelect.ts +59 -19
  418. package/src/components/VSelect/VSelectList.ts +13 -9
  419. package/src/components/VSlideGroup/VSlideGroup.ts +2 -4
  420. package/src/components/VSlideGroup/VSlideItem.ts +2 -0
  421. package/src/components/VSlider/VSlider.ts +0 -3
  422. package/src/components/VSnackbar/VSnackbar.ts +1 -1
  423. package/src/components/VSparkline/VSparkline.ts +54 -92
  424. package/src/components/VSpeedDial/VSpeedDial.ts +6 -8
  425. package/src/components/VStepper/VStepper.ts +3 -1
  426. package/src/components/VStepper/VStepperStep.ts +8 -15
  427. package/src/components/VSwitch/VSwitch.ts +4 -5
  428. package/src/components/VTabs/VTab.ts +2 -0
  429. package/src/components/VTabs/VTabs.ts +16 -10
  430. package/src/components/VTabs/VTabsItems.ts +2 -0
  431. package/src/components/VTextField/VTextField.ts +9 -12
  432. package/src/components/VTimePicker/VTimePicker.ts +199 -89
  433. package/src/components/VTimePicker/VTimePickerClock.ts +40 -45
  434. package/src/components/VTimePicker/VTimePickerTitle.ts +5 -4
  435. package/src/components/VTimePicker/__tests__/VTimePicker.spec.ts +153 -140
  436. package/src/components/VTimePicker/__tests__/VTimePickerClock.spec.ts +78 -81
  437. package/src/components/VTimePicker/__tests__/VTimePickerTitle.spec.ts +47 -41
  438. package/src/components/VTimePicker/__tests__/__snapshots__/VTimePicker.spec.ts.snap +160 -40
  439. package/src/components/VToolbar/VToolbar.ts +1 -1
  440. package/src/components/VTooltip/VTooltip.ts +1 -1
  441. package/src/components/VVirtualScroll/VVirtualScroll.ts +0 -1
  442. package/src/components/VWindow/VWindow.ts +0 -1
  443. package/src/components/VWindow/VWindowItem.ts +2 -3
  444. package/src/mixins/detachable/index.ts +11 -5
@@ -6,8 +6,11 @@ import {
6
6
  mount,
7
7
  MountOptions,
8
8
  Wrapper,
9
+ enableAutoUnmount,
9
10
  } from '@vue/test-utils'
10
11
 
12
+ enableAutoUnmount(afterEach)
13
+
11
14
  describe('VDatePickerMonthTable.ts', () => {
12
15
  type Instance = InstanceType<typeof VDatePickerMonthTable>
13
16
  let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
@@ -15,9 +18,11 @@ describe('VDatePickerMonthTable.ts', () => {
15
18
  mountFunction = (options?: MountOptions<Instance>) => {
16
19
  return mount(VDatePickerMonthTable, {
17
20
  ...options,
18
- mocks: {
19
- $vuetify: {
20
- lang: new Lang(preset),
21
+ global: {
22
+ mocks: {
23
+ $vuetify: {
24
+ lang: new Lang(preset),
25
+ },
21
26
  },
22
27
  },
23
28
  })
@@ -26,10 +31,10 @@ describe('VDatePickerMonthTable.ts', () => {
26
31
 
27
32
  it('should render component and match snapshot', () => {
28
33
  const wrapper = mountFunction({
29
- propsData: {
34
+ props: {
30
35
  tableDate: '2005',
31
36
  current: '2005-05',
32
- value: '2005-11',
37
+ modelValue: '2005-11',
33
38
  },
34
39
  })
35
40
 
@@ -38,10 +43,10 @@ describe('VDatePickerMonthTable.ts', () => {
38
43
 
39
44
  it('should render component and match snapshot (multiple)', () => {
40
45
  const wrapper = mountFunction({
41
- propsData: {
46
+ props: {
42
47
  tableDate: '2005',
43
48
  current: '2005-05',
44
- value: ['2005-11', '2005-10'],
49
+ modelValue: ['2005-11', '2005-10'],
45
50
  },
46
51
  })
47
52
 
@@ -50,165 +55,146 @@ describe('VDatePickerMonthTable.ts', () => {
50
55
 
51
56
  it.skip('should watch tableDate value and run transition', async () => { // TODO: make this one work
52
57
  const wrapper = mountFunction({
53
- propsData: {
58
+ props: {
54
59
  tableDate: '2005',
55
60
  current: '2005-05',
56
- value: '2005-11',
61
+ modelValue: '2005-11',
57
62
  },
58
63
  })
59
64
 
60
- wrapper.setProps({
65
+ await wrapper.setProps({
61
66
  tableDate: '2006',
62
67
  })
63
68
  await wrapper.vm.$nextTick()
64
- expect(wrapper.findAll('table').at(0).element.className).toBe('tab-transition-enter tab-transition-enter-active')
69
+ expect(wrapper.findAll('table')[0].element.className).toBe('tab-transition-enter tab-transition-enter-active')
65
70
  })
66
71
 
67
72
  it.skip('should watch tableDate value and run reverse transition', async () => { // TODO: make this one work
68
73
  const wrapper = mountFunction({
69
- propsData: {
74
+ props: {
70
75
  tableDate: '2005',
71
76
  current: '2005-05',
72
- value: '2005-11',
77
+ modelValue: '2005-11',
73
78
  },
74
79
  })
75
80
 
76
- wrapper.setProps({
81
+ await wrapper.setProps({
77
82
  tableDate: '2004',
78
83
  })
79
84
  await wrapper.vm.$nextTick()
80
- expect(wrapper.findAll('table').at(0).element.className).toBe('tab-reverse-transition-enter tab-reverse-transition-enter-active')
85
+ expect(wrapper.findAll('table')[0].element.className).toBe('tab-reverse-transition-enter tab-reverse-transition-enter-active')
81
86
  })
82
87
 
83
- it('should emit event when month button is clicked', () => {
88
+ it('should emit event when month button is clicked', async () => {
84
89
  const wrapper = mountFunction({
85
- propsData: {
90
+ props: {
86
91
  tableDate: '2005',
87
92
  current: '2005-05',
88
- value: '2005-11',
93
+ modelValue: '2005-11',
89
94
  },
90
95
  })
91
96
 
92
- const input = jest.fn()
93
- wrapper.vm.$on('input', input)
94
-
95
- wrapper.findAll('tbody button').at(0).trigger('click')
96
- expect(input).toHaveBeenCalledWith('2005-01')
97
+ await wrapper.findAll('tbody button')[0].trigger('click')
98
+ expect(wrapper.emitted('update:modelValue')).toBeTruthy()
99
+ expect(wrapper.emitted('update:modelValue')[0]).toEqual(['2005-01'])
97
100
  })
98
101
 
99
- it('should not emit event when disabled month button is clicked', () => {
102
+ it('should not emit event when disabled month button is clicked', async () => {
100
103
  const wrapper = mountFunction({
101
- propsData: {
104
+ props: {
102
105
  tableDate: '2005',
103
106
  current: '2005-05',
104
- value: '2005-11',
107
+ modelValue: '2005-11',
105
108
  allowedDates: () => false,
106
109
  },
107
110
  })
108
111
 
109
- const input = jest.fn()
110
- wrapper.vm.$on('input', input)
111
-
112
- wrapper.findAll('tbody button').at(0).trigger('click')
113
- expect(input).not.toHaveBeenCalled()
112
+ await wrapper.findAll('tbody button')[0].trigger('click')
113
+ expect(wrapper.emitted('update:modelValue')).toBeFalsy()
114
114
  })
115
115
 
116
- it('should emit tableDate event when scrolled and scrollable', () => {
116
+ it('should emit tableDate event when scrolled and scrollable', async () => {
117
117
  const wrapper = mountFunction({
118
- propsData: {
118
+ props: {
119
119
  tableDate: '2005',
120
120
  scrollable: true,
121
121
  },
122
122
  })
123
123
 
124
- const tableDate = jest.fn()
125
- wrapper.vm.$on('update:table-date', tableDate)
126
-
127
- wrapper.trigger('wheel', { deltaY: 1 })
128
- expect(tableDate).toHaveBeenCalledWith('2006')
124
+ await wrapper.trigger('wheel', { deltaY: 1 })
125
+ expect(wrapper.emitted('update:table-date')).toBeTruthy()
126
+ expect(wrapper.emitted('update:table-date')[0]).toEqual(['2006'])
129
127
  })
130
128
 
131
- it('should not emit tableDate event when scrolled and not scrollable', () => {
129
+ it('should not emit tableDate event when scrolled and not scrollable', async () => {
132
130
  const wrapper = mountFunction({
133
- propsData: {
131
+ props: {
134
132
  tableDate: '2005',
135
133
  },
136
134
  })
137
135
 
138
- const tableDate = jest.fn()
139
- wrapper.vm.$on('update:table-date', tableDate)
140
-
141
- wrapper.trigger('wheel', { deltaY: 1 })
142
- expect(tableDate).not.toHaveBeenCalled()
136
+ await wrapper.trigger('wheel', { deltaY: 1 })
137
+ expect(wrapper.emitted('update:table-date')).toBeFalsy()
143
138
  })
144
139
 
145
- it('should not emit tableDate event when scrollable but tableDate less than min', () => {
140
+ it('should not emit tableDate event when scrollable but tableDate less than min', async () => {
146
141
  const wrapper = mountFunction({
147
- propsData: {
142
+ props: {
148
143
  tableDate: '2005',
149
144
  scrollable: true,
150
145
  min: '2005',
151
146
  },
152
147
  })
153
148
 
154
- const tableDate = jest.fn()
155
- wrapper.vm.$on('update:table-date', tableDate)
156
-
157
- wrapper.trigger('wheel', { deltaY: -50 })
158
- expect(tableDate).not.toHaveBeenCalled()
149
+ await wrapper.trigger('wheel', { deltaY: -50 })
150
+ expect(wrapper.emitted('update:table-date')).toBeFalsy()
159
151
  })
160
152
 
161
- it('should emit tableDate event when scrollable and tableDate greater than min', () => {
153
+ it('should emit tableDate event when scrollable and tableDate greater than min', async () => {
162
154
  const wrapper = mountFunction({
163
- propsData: {
155
+ props: {
164
156
  tableDate: '2005',
165
157
  scrollable: true,
166
158
  min: '2003',
167
159
  },
168
160
  })
169
161
 
170
- const tableDate = jest.fn()
171
- wrapper.vm.$on('update:table-date', tableDate)
172
-
173
- wrapper.trigger('wheel', { deltaY: -50 })
174
- expect(tableDate).toHaveBeenCalledWith('2004')
162
+ await wrapper.trigger('wheel', { deltaY: -50 })
163
+ expect(wrapper.emitted('update:table-date')).toBeTruthy()
164
+ expect(wrapper.emitted('update:table-date')[0]).toEqual(['2004'])
175
165
  })
176
166
 
177
167
  // TODO
178
- it.skip('should emit tableDate event when swiped', () => {
168
+ it.skip('should emit tableDate event when swiped', async () => {
179
169
  const wrapper = mountFunction({
180
- propsData: {
170
+ props: {
181
171
  tableDate: '2005',
182
172
  },
183
173
  })
184
174
 
185
- const tableDate = jest.fn()
186
- wrapper.vm.$on('update:table-date', tableDate)
187
-
188
- wrapper.trigger('touchstart')
189
- wrapper.trigger('touchend')
190
- expect(tableDate).toHaveBeenCalledWith(2006)
175
+ await wrapper.trigger('touchstart')
176
+ await wrapper.trigger('touchend')
177
+ expect(wrapper.emitted('update:table-date')).toBeTruthy()
178
+ expect(wrapper.emitted('update:table-date')[0]).toEqual([2006])
191
179
  })
192
180
 
193
181
  it('should change tableDate when touch is called', () => {
194
182
  const wrapper = mountFunction({
195
- propsData: {
183
+ props: {
196
184
  tableDate: '2005',
197
185
  },
198
186
  })
199
187
 
200
- const tableDate = jest.fn()
201
- wrapper.vm.$on('update:table-date', tableDate)
202
-
203
188
  wrapper.vm.touch(1, wrapper.vm.calculateTableDate)
204
- expect(tableDate).toHaveBeenCalledWith('2006')
189
+ expect(wrapper.emitted('update:table-date')).toBeTruthy()
190
+ expect(wrapper.emitted('update:table-date')[0]).toEqual(['2006'])
205
191
  wrapper.vm.touch(-1, wrapper.vm.calculateTableDate)
206
- expect(tableDate).toHaveBeenCalledWith('2004')
192
+ expect(wrapper.emitted('update:table-date')[1]).toEqual(['2004'])
207
193
  })
208
194
 
209
195
  it('should render component with events (array) and match snapshot', () => {
210
196
  const wrapper = mountFunction({
211
- propsData: {
197
+ props: {
212
198
  tableDate: '2005',
213
199
  events: ['2005-07', '2005-11'],
214
200
  eventColor: 'red',
@@ -220,7 +206,7 @@ describe('VDatePickerMonthTable.ts', () => {
220
206
 
221
207
  it('should render component with events (function) and match snapshot', () => {
222
208
  const wrapper = mountFunction({
223
- propsData: {
209
+ props: {
224
210
  tableDate: '2005',
225
211
  events: date => date === '2005-07' || date === '2005-11',
226
212
  eventColor: 'red',
@@ -232,7 +218,7 @@ describe('VDatePickerMonthTable.ts', () => {
232
218
 
233
219
  it('should render component with events colored by object and match snapshot', () => {
234
220
  const wrapper = mountFunction({
235
- propsData: {
221
+ props: {
236
222
  tableDate: '2005',
237
223
  events: ['2005-07', '2005-11'],
238
224
  eventColor: { '2005-07': 'red', '2005-11': 'blue lighten-1' },
@@ -244,7 +230,7 @@ describe('VDatePickerMonthTable.ts', () => {
244
230
 
245
231
  it('should render component with events colored by function and match snapshot', () => {
246
232
  const wrapper = mountFunction({
247
- propsData: {
233
+ props: {
248
234
  tableDate: '2005',
249
235
  events: ['2005-07', '2005-11'],
250
236
  eventColor: date => ({ '2005-07': 'red', '2005-11': 'blue lighten-1' }[date]),
@@ -3,20 +3,39 @@ import {
3
3
  mount,
4
4
  MountOptions,
5
5
  Wrapper,
6
+ enableAutoUnmount,
6
7
  } from '@vue/test-utils'
7
8
 
8
9
  describe('VDatePickerTitle.ts', () => {
9
10
  type Instance = InstanceType<typeof VDatePickerTitle>
10
11
  let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
12
+
13
+ enableAutoUnmount(afterEach)
14
+
11
15
  beforeEach(() => {
12
16
  mountFunction = (options?: MountOptions<Instance>) => {
13
- return mount(VDatePickerTitle, options)
17
+ return mount(VDatePickerTitle, {
18
+ ...options,
19
+ global: {
20
+ mocks: {
21
+ $vuetify: {
22
+ icons: {
23
+ values: {
24
+ next: 'mdi-chevron-right',
25
+ prev: 'mdi-chevron-left',
26
+ },
27
+ component: 'mdi',
28
+ },
29
+ },
30
+ },
31
+ },
32
+ })
14
33
  }
15
34
  })
16
35
 
17
36
  it('should render component and match snapshot', () => {
18
37
  const wrapper = mountFunction({
19
- propsData: {
38
+ props: {
20
39
  year: '1234',
21
40
  date: '2005-11-01',
22
41
  },
@@ -27,7 +46,7 @@ describe('VDatePickerTitle.ts', () => {
27
46
 
28
47
  it('should render disabled component and match snapshot', () => {
29
48
  const wrapper = mountFunction({
30
- propsData: {
49
+ props: {
31
50
  year: '1234',
32
51
  date: '2005-11-01',
33
52
  disabled: true,
@@ -39,7 +58,7 @@ describe('VDatePickerTitle.ts', () => {
39
58
 
40
59
  it('should render readonly component and match snapshot', () => {
41
60
  const wrapper = mountFunction({
42
- propsData: {
61
+ props: {
43
62
  year: '1234',
44
63
  date: '2005-11-01',
45
64
  readonly: true,
@@ -51,7 +70,7 @@ describe('VDatePickerTitle.ts', () => {
51
70
 
52
71
  it('should render component when selecting year and match snapshot', () => {
53
72
  const wrapper = mountFunction({
54
- propsData: {
73
+ props: {
55
74
  year: '1234',
56
75
  date: '2005-11-01',
57
76
  selectingYear: true,
@@ -63,60 +82,61 @@ describe('VDatePickerTitle.ts', () => {
63
82
 
64
83
  it('should render year icon', () => {
65
84
  const wrapper = mountFunction({
66
- propsData: {
85
+ props: {
67
86
  year: '1234',
68
87
  yearIcon: 'year',
69
88
  date: '2005-11-01',
70
89
  },
71
90
  })
72
91
 
73
- expect(wrapper.findAll('.v-date-picker-title__year').at(0).html()).toMatchSnapshot()
92
+ expect(wrapper.findAll('.v-date-picker-title__year')[0].html()).toMatchSnapshot()
74
93
  })
75
94
 
76
- it('should emit input event on year/date click', () => {
95
+ it('should emit input event on year/date click', async () => {
77
96
  const wrapper = mountFunction({
78
- propsData: {
97
+ props: {
79
98
  year: '1234',
80
99
  yearIcon: 'year',
81
100
  date: '2005-11-01',
82
101
  },
83
102
  })
84
103
 
85
- const input = jest.fn(value => wrapper.setProps({ selectingYear: value }))
86
- wrapper.vm.$on('update:selecting-year', input)
87
-
88
- wrapper.findAll('.v-date-picker-title__date').at(0).trigger('click')
89
- expect(input).not.toHaveBeenCalled()
90
- wrapper.findAll('.v-date-picker-title__year').at(0).trigger('click')
91
- expect(input).toHaveBeenCalledWith(true)
92
- wrapper.findAll('.v-date-picker-title__date').at(0).trigger('click')
93
- expect(input).toHaveBeenCalledWith(false)
94
- wrapper.findAll('.v-date-picker-title__year').at(0).trigger('click')
95
- wrapper.findAll('.v-date-picker-title__year').at(0).trigger('click')
96
- expect(input).toHaveBeenCalledWith(false)
104
+ // Клик по дате не должен эмитить событие
105
+ await wrapper.findAll('.v-date-picker-title__date')[0].trigger('click')
106
+ expect(wrapper.emitted('update:selecting-year')).toBeFalsy()
107
+
108
+ // Клик по году должен эмитить true
109
+ await wrapper.findAll('.v-date-picker-title__year')[0].trigger('click')
110
+ expect(wrapper.emitted('update:selecting-year')).toHaveLength(1)
111
+ expect(wrapper.emitted('update:selecting-year')[0]).toEqual([true])
112
+
113
+ // Клик по дате должен эмитить false (переключение обратно)
114
+ await wrapper.findAll('.v-date-picker-title__date')[0].trigger('click')
115
+ expect(wrapper.emitted('update:selecting-year')).toHaveLength(2)
116
+ expect(wrapper.emitted('update:selecting-year')[1]).toEqual([false])
97
117
  })
98
118
 
99
- it('should have the correct transition', () => {
119
+ it('should have the correct transition', async () => {
100
120
  const wrapper = mountFunction({
101
- propsData: {
121
+ props: {
102
122
  year: '2018',
103
123
  date: 'Tue, Mar 3',
104
- value: '2018-03-03',
124
+ modelValue: '2018-03-03',
105
125
  },
106
126
  })
107
127
 
108
128
  expect(wrapper.vm.isReversing).toBe(false)
109
129
 
110
- wrapper.setProps({
130
+ await wrapper.setProps({
111
131
  date: 'Wed, Mar 4',
112
- value: '2018-03-04',
132
+ modelValue: '2018-03-04',
113
133
  })
114
134
 
115
135
  expect(wrapper.vm.isReversing).toBe(false)
116
136
 
117
- wrapper.setProps({
137
+ await wrapper.setProps({
118
138
  date: 'Wed, Mar 3',
119
- value: '2018-03-03',
139
+ modelValue: '2018-03-03',
120
140
  })
121
141
 
122
142
  expect(wrapper.vm.isReversing).toBe(true)
@@ -3,8 +3,11 @@ import {
3
3
  mount,
4
4
  MountOptions,
5
5
  Wrapper,
6
+ enableAutoUnmount,
6
7
  } from '@vue/test-utils'
7
8
 
9
+ enableAutoUnmount(afterEach)
10
+
8
11
  describe('VDatePickerYears.ts', () => {
9
12
  type Instance = InstanceType<typeof VDatePickerYears>
10
13
  let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
@@ -12,11 +15,13 @@ describe('VDatePickerYears.ts', () => {
12
15
  mountFunction = (options?: MountOptions<Instance>) => {
13
16
  return mount(VDatePickerYears, {
14
17
  ...options,
15
- mocks: {
16
- $vuetify: {
17
- rtl: false,
18
- lang: {
19
- t: () => {},
18
+ global: {
19
+ mocks: {
20
+ $vuetify: {
21
+ rtl: false,
22
+ lang: {
23
+ t: () => {},
24
+ },
20
25
  },
21
26
  },
22
27
  },
@@ -26,8 +31,8 @@ describe('VDatePickerYears.ts', () => {
26
31
 
27
32
  it('should render component and match snapshot', () => {
28
33
  const wrapper = mountFunction({
29
- propsData: {
30
- value: '2000',
34
+ props: {
35
+ modelValue: '2000',
31
36
  },
32
37
  })
33
38
 
@@ -36,51 +41,49 @@ describe('VDatePickerYears.ts', () => {
36
41
 
37
42
  it('should respect min/max props', async () => {
38
43
  const wrapper = mountFunction({
39
- propsData: {
44
+ props: {
40
45
  min: 1234,
41
46
  max: 1238,
42
47
  },
43
48
  })
44
49
 
45
- expect(wrapper.findAll('li:first-child').at(0).element.textContent).toBe('1238')
46
- expect(wrapper.findAll('li:last-child').at(0).element.textContent).toBe('1234')
50
+ expect(wrapper.findAll('li:first-child')[0].element.textContent).toBe('1238')
51
+ expect(wrapper.findAll('li:last-child')[0].element.textContent).toBe('1234')
47
52
  })
48
53
 
49
54
  it('should not allow min to be greater then max', async () => {
50
55
  const wrapper = mountFunction({
51
- propsData: {
56
+ props: {
52
57
  min: 1238,
53
58
  max: 1234,
54
59
  },
55
60
  })
56
61
  expect(wrapper.findAll('li')).toHaveLength(1)
57
- expect(wrapper.findAll('li').at(0).element.textContent).toBe('1234')
58
- expect(wrapper.findAll('li').at(0).element.textContent).toBe('1234')
62
+ expect(wrapper.findAll('li')[0].element.textContent).toBe('1234')
63
+ expect(wrapper.findAll('li')[0].element.textContent).toBe('1234')
59
64
  })
60
65
 
61
66
  it('should emit event on year click', async () => {
62
67
  const wrapper = mountFunction({
63
- propsData: {
64
- value: 1999,
68
+ props: {
69
+ modelValue: 1999,
65
70
  },
66
71
  })
67
72
 
68
- const input = jest.fn()
69
- wrapper.vm.$on('input', input)
70
-
71
- wrapper.findAll('li.active + li').at(0).trigger('click')
72
- expect(input).toHaveBeenCalledWith(1998)
73
+ await wrapper.findAll('li.active + li')[0].trigger('click')
74
+ expect(wrapper.emitted('update:modelValue')).toBeTruthy()
75
+ expect(wrapper.emitted('update:modelValue')?.[0]).toEqual([1998])
73
76
  })
74
77
 
75
78
  it('should format years', async () => {
76
79
  const wrapper = mountFunction({
77
- propsData: {
80
+ props: {
78
81
  format: year => `(${year})`,
79
82
  min: 1001,
80
83
  max: 1001,
81
84
  },
82
85
  })
83
86
 
84
- expect(wrapper.findAll('li').at(0).element.textContent).toBe('(1001)')
87
+ expect(wrapper.findAll('li')[0].element.textContent).toBe('(1001)')
85
88
  })
86
89
  })