@dimailn/vuetify 2.7.2-alpha25 → 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 (494) hide show
  1. package/dist/vuetify.js +1436 -1164
  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/VAppBar/VAppBarNavIcon.js +5 -1
  10. package/es5/components/VAppBar/VAppBarNavIcon.js.map +1 -1
  11. package/es5/components/VBadge/VBadge.js +1 -0
  12. package/es5/components/VBadge/VBadge.js.map +1 -1
  13. package/es5/components/VBanner/VBanner.js +23 -15
  14. package/es5/components/VBanner/VBanner.js.map +1 -1
  15. package/es5/components/VBottomNavigation/VBottomNavigation.js +8 -7
  16. package/es5/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
  17. package/es5/components/VBreadcrumbs/VBreadcrumbs.js +18 -6
  18. package/es5/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
  19. package/es5/components/VBtn/VBtn.js +6 -2
  20. package/es5/components/VBtn/VBtn.js.map +1 -1
  21. package/es5/components/VCalendar/VCalendar.js +27 -29
  22. package/es5/components/VCalendar/VCalendar.js.map +1 -1
  23. package/es5/components/VCalendar/VCalendarCategory.js +26 -34
  24. package/es5/components/VCalendar/VCalendarCategory.js.map +1 -1
  25. package/es5/components/VCalendar/VCalendarDaily.js +43 -60
  26. package/es5/components/VCalendar/VCalendarDaily.js.map +1 -1
  27. package/es5/components/VCalendar/VCalendarMonthly.js +2 -2
  28. package/es5/components/VCalendar/VCalendarMonthly.js.map +1 -1
  29. package/es5/components/VCalendar/VCalendarWeekly.js +26 -35
  30. package/es5/components/VCalendar/VCalendarWeekly.js.map +1 -1
  31. package/es5/components/VCalendar/mixins/calendar-base.js +5 -10
  32. package/es5/components/VCalendar/mixins/calendar-base.js.map +1 -1
  33. package/es5/components/VCalendar/mixins/calendar-with-events.js +43 -58
  34. package/es5/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
  35. package/es5/components/VCalendar/mixins/calendar-with-intervals.js +2 -2
  36. package/es5/components/VCalendar/mixins/calendar-with-intervals.js.map +1 -1
  37. package/es5/components/VCalendar/mixins/times.js.map +1 -1
  38. package/es5/components/VCarousel/VCarousel.js +20 -13
  39. package/es5/components/VCarousel/VCarousel.js.map +1 -1
  40. package/es5/components/VCarousel/VCarouselItem.js +7 -3
  41. package/es5/components/VCarousel/VCarouselItem.js.map +1 -1
  42. package/es5/components/VCheckbox/VCheckbox.js +34 -1
  43. package/es5/components/VCheckbox/VCheckbox.js.map +1 -1
  44. package/es5/components/VCheckbox/VSimpleCheckbox.js +0 -3
  45. package/es5/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
  46. package/es5/components/VChip/VChip.js +14 -6
  47. package/es5/components/VChip/VChip.js.map +1 -1
  48. package/es5/components/VData/VData.js +1 -0
  49. package/es5/components/VData/VData.js.map +1 -1
  50. package/es5/components/VDataIterator/VDataFooter.js +6 -1
  51. package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
  52. package/es5/components/VDataIterator/VDataIterator.js +1 -0
  53. package/es5/components/VDataIterator/VDataIterator.js.map +1 -1
  54. package/es5/components/VDataTable/VDataTable.js +22 -13
  55. package/es5/components/VDataTable/VDataTable.js.map +1 -1
  56. package/es5/components/VDataTable/VDataTableHeader.js +2 -6
  57. package/es5/components/VDataTable/VDataTableHeader.js.map +1 -1
  58. package/es5/components/VDataTable/VDataTableHeaderDesktop.js +1 -0
  59. package/es5/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
  60. package/es5/components/VDataTable/VDataTableHeaderMobile.js +1 -0
  61. package/es5/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
  62. package/es5/components/VDataTable/VEditDialog.js +23 -18
  63. package/es5/components/VDataTable/VEditDialog.js.map +1 -1
  64. package/es5/components/VDataTable/mixins/header.js +5 -7
  65. package/es5/components/VDataTable/mixins/header.js.map +1 -1
  66. package/es5/components/VDatePicker/VDatePicker.js +13 -18
  67. package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
  68. package/es5/components/VDatePicker/VDatePickerHeader.js +50 -22
  69. package/es5/components/VDatePicker/VDatePickerHeader.js.map +1 -1
  70. package/es5/components/VDatePicker/VDatePickerMonthTable.js +6 -3
  71. package/es5/components/VDatePicker/VDatePickerMonthTable.js.map +1 -1
  72. package/es5/components/VDatePicker/VDatePickerTitle.js +16 -7
  73. package/es5/components/VDatePicker/VDatePickerTitle.js.map +1 -1
  74. package/es5/components/VDatePicker/VDatePickerYears.js +11 -12
  75. package/es5/components/VDatePicker/VDatePickerYears.js.map +1 -1
  76. package/es5/components/VDatePicker/mixins/date-picker-table.js +21 -16
  77. package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
  78. package/es5/components/VDatePicker/util/createNativeLocaleFormatter.js +4 -0
  79. package/es5/components/VDatePicker/util/createNativeLocaleFormatter.js.map +1 -1
  80. package/es5/components/VDialog/VDialog.js +17 -12
  81. package/es5/components/VDialog/VDialog.js.map +1 -1
  82. package/es5/components/VExpansionPanel/VExpansionPanel.js +1 -0
  83. package/es5/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
  84. package/es5/components/VExpansionPanel/VExpansionPanelContent.js +11 -9
  85. package/es5/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
  86. package/es5/components/VExpansionPanel/VExpansionPanelHeader.js +16 -19
  87. package/es5/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
  88. package/es5/components/VFileInput/VFileInput.js +1 -0
  89. package/es5/components/VFileInput/VFileInput.js.map +1 -1
  90. package/es5/components/VForm/VForm.js +1 -0
  91. package/es5/components/VForm/VForm.js.map +1 -1
  92. package/es5/components/VHover/VHover.js +1 -0
  93. package/es5/components/VHover/VHover.js.map +1 -1
  94. package/es5/components/VImg/VImg.js +9 -7
  95. package/es5/components/VImg/VImg.js.map +1 -1
  96. package/es5/components/VInput/VInput.js +11 -4
  97. package/es5/components/VInput/VInput.js.map +1 -1
  98. package/es5/components/VItemGroup/VItem.js +2 -1
  99. package/es5/components/VItemGroup/VItem.js.map +1 -1
  100. package/es5/components/VItemGroup/VItemGroup.js +5 -1
  101. package/es5/components/VItemGroup/VItemGroup.js.map +1 -1
  102. package/es5/components/VLazy/VLazy.js +8 -15
  103. package/es5/components/VLazy/VLazy.js.map +1 -1
  104. package/es5/components/VList/VListGroup.js +30 -20
  105. package/es5/components/VList/VListGroup.js.map +1 -1
  106. package/es5/components/VList/VListItem.js +31 -13
  107. package/es5/components/VList/VListItem.js.map +1 -1
  108. package/es5/components/VList/VListItemAction.js +23 -9
  109. package/es5/components/VList/VListItemAction.js.map +1 -1
  110. package/es5/components/VMenu/VMenu.js +1 -0
  111. package/es5/components/VMenu/VMenu.js.map +1 -1
  112. package/es5/components/VMessages/VMessages.js +5 -1
  113. package/es5/components/VMessages/VMessages.js.map +1 -1
  114. package/es5/components/VNavigationDrawer/VNavigationDrawer.js +1 -7
  115. package/es5/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
  116. package/es5/components/VOtpInput/VOtpInput.js +1 -5
  117. package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
  118. package/es5/components/VOverflowBtn/VOverflowBtn.js +4 -1
  119. package/es5/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
  120. package/es5/components/VOverlay/VOverlay.js +1 -0
  121. package/es5/components/VOverlay/VOverlay.js.map +1 -1
  122. package/es5/components/VPagination/VPagination.js +4 -4
  123. package/es5/components/VPagination/VPagination.js.map +1 -1
  124. package/es5/components/VPicker/VPicker.js +7 -4
  125. package/es5/components/VPicker/VPicker.js.map +1 -1
  126. package/es5/components/VProgressCircular/VProgressCircular.js +1 -10
  127. package/es5/components/VProgressCircular/VProgressCircular.js.map +1 -1
  128. package/es5/components/VProgressLinear/VProgressLinear.js +4 -12
  129. package/es5/components/VProgressLinear/VProgressLinear.js.map +1 -1
  130. package/es5/components/VRadioGroup/VRadio.js +11 -2
  131. package/es5/components/VRadioGroup/VRadio.js.map +1 -1
  132. package/es5/components/VSelect/VSelect.js +115 -64
  133. package/es5/components/VSelect/VSelect.js.map +1 -1
  134. package/es5/components/VSelect/VSelectList.js +30 -26
  135. package/es5/components/VSelect/VSelectList.js.map +1 -1
  136. package/es5/components/VSlideGroup/VSlideGroup.js +27 -22
  137. package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
  138. package/es5/components/VSlideGroup/VSlideItem.js +2 -1
  139. package/es5/components/VSlideGroup/VSlideItem.js.map +1 -1
  140. package/es5/components/VSlider/VSlider.js +16 -15
  141. package/es5/components/VSlider/VSlider.js.map +1 -1
  142. package/es5/components/VSnackbar/VSnackbar.js +1 -0
  143. package/es5/components/VSnackbar/VSnackbar.js.map +1 -1
  144. package/es5/components/VSparkline/VSparkline.js +48 -68
  145. package/es5/components/VSparkline/VSparkline.js.map +1 -1
  146. package/es5/components/VSpeedDial/VSpeedDial.js +4 -10
  147. package/es5/components/VSpeedDial/VSpeedDial.js.map +1 -1
  148. package/es5/components/VStepper/VStepper.js +1 -0
  149. package/es5/components/VStepper/VStepper.js.map +1 -1
  150. package/es5/components/VStepper/VStepperContent.js +3 -1
  151. package/es5/components/VStepper/VStepperContent.js.map +1 -1
  152. package/es5/components/VStepper/VStepperStep.js +11 -19
  153. package/es5/components/VStepper/VStepperStep.js.map +1 -1
  154. package/es5/components/VSwitch/VSwitch.js +11 -9
  155. package/es5/components/VSwitch/VSwitch.js.map +1 -1
  156. package/es5/components/VTabs/VTab.js +1 -0
  157. package/es5/components/VTabs/VTab.js.map +1 -1
  158. package/es5/components/VTabs/VTabs.js +17 -6
  159. package/es5/components/VTabs/VTabs.js.map +1 -1
  160. package/es5/components/VTabs/VTabsItems.js +1 -0
  161. package/es5/components/VTabs/VTabsItems.js.map +1 -1
  162. package/es5/components/VTextField/VTextField.js +34 -26
  163. package/es5/components/VTextField/VTextField.js.map +1 -1
  164. package/es5/components/VTimePicker/VTimePicker.js +72 -44
  165. package/es5/components/VTimePicker/VTimePicker.js.map +1 -1
  166. package/es5/components/VTimePicker/VTimePickerClock.js +37 -48
  167. package/es5/components/VTimePicker/VTimePickerClock.js.map +1 -1
  168. package/es5/components/VTimePicker/VTimePickerTitle.js +13 -11
  169. package/es5/components/VTimePicker/VTimePickerTitle.js.map +1 -1
  170. package/es5/components/VToolbar/VToolbar.js +1 -3
  171. package/es5/components/VToolbar/VToolbar.js.map +1 -1
  172. package/es5/components/VTooltip/VTooltip.js +9 -4
  173. package/es5/components/VTooltip/VTooltip.js.map +1 -1
  174. package/es5/components/VTreeview/VTreeviewNode.js +11 -3
  175. package/es5/components/VTreeview/VTreeviewNode.js.map +1 -1
  176. package/es5/components/VVirtualScroll/VVirtualScroll.js +0 -3
  177. package/es5/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
  178. package/es5/components/VWindow/VWindow.js +0 -3
  179. package/es5/components/VWindow/VWindow.js.map +1 -1
  180. package/es5/components/VWindow/VWindowItem.js +1 -5
  181. package/es5/components/VWindow/VWindowItem.js.map +1 -1
  182. package/es5/components/transitions/createTransition.js +8 -2
  183. package/es5/components/transitions/createTransition.js.map +1 -1
  184. package/es5/framework.js +1 -1
  185. package/es5/mixins/detachable/index.js +9 -5
  186. package/es5/mixins/detachable/index.js.map +1 -1
  187. package/es5/mixins/picker/index.js +13 -3
  188. package/es5/mixins/picker/index.js.map +1 -1
  189. package/lib/components/VAlert/VAlert.js +1 -0
  190. package/lib/components/VAlert/VAlert.js.map +1 -1
  191. package/lib/components/VAppBar/VAppBar.js +17 -6
  192. package/lib/components/VAppBar/VAppBar.js.map +1 -1
  193. package/lib/components/VAppBar/VAppBarNavIcon.js +1 -1
  194. package/lib/components/VAppBar/VAppBarNavIcon.js.map +1 -1
  195. package/lib/components/VBadge/VBadge.js +1 -0
  196. package/lib/components/VBadge/VBadge.js.map +1 -1
  197. package/lib/components/VBanner/VBanner.js +9 -13
  198. package/lib/components/VBanner/VBanner.js.map +1 -1
  199. package/lib/components/VBottomNavigation/VBottomNavigation.js +8 -7
  200. package/lib/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
  201. package/lib/components/VBreadcrumbs/VBreadcrumbs.js +2 -2
  202. package/lib/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
  203. package/lib/components/VBtn/VBtn.js +4 -2
  204. package/lib/components/VBtn/VBtn.js.map +1 -1
  205. package/lib/components/VCalendar/VCalendar.js +26 -31
  206. package/lib/components/VCalendar/VCalendar.js.map +1 -1
  207. package/lib/components/VCalendar/VCalendarCategory.js +8 -10
  208. package/lib/components/VCalendar/VCalendarCategory.js.map +1 -1
  209. package/lib/components/VCalendar/VCalendarDaily.js +21 -33
  210. package/lib/components/VCalendar/VCalendarDaily.js.map +1 -1
  211. package/lib/components/VCalendar/VCalendarMonthly.js +2 -2
  212. package/lib/components/VCalendar/VCalendarMonthly.js.map +1 -1
  213. package/lib/components/VCalendar/VCalendarWeekly.js +17 -30
  214. package/lib/components/VCalendar/VCalendarWeekly.js.map +1 -1
  215. package/lib/components/VCalendar/mixins/calendar-base.js +7 -11
  216. package/lib/components/VCalendar/mixins/calendar-base.js.map +1 -1
  217. package/lib/components/VCalendar/mixins/calendar-with-events.js +16 -39
  218. package/lib/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
  219. package/lib/components/VCalendar/mixins/calendar-with-intervals.js +2 -2
  220. package/lib/components/VCalendar/mixins/calendar-with-intervals.js.map +1 -1
  221. package/lib/components/VCalendar/mixins/times.js.map +1 -1
  222. package/lib/components/VCarousel/VCarousel.js +15 -14
  223. package/lib/components/VCarousel/VCarousel.js.map +1 -1
  224. package/lib/components/VCarousel/VCarouselItem.js +1 -1
  225. package/lib/components/VCarousel/VCarouselItem.js.map +1 -1
  226. package/lib/components/VCheckbox/VCheckbox.js +15 -2
  227. package/lib/components/VCheckbox/VCheckbox.js.map +1 -1
  228. package/lib/components/VCheckbox/VSimpleCheckbox.js +0 -3
  229. package/lib/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
  230. package/lib/components/VChip/VChip.js +14 -6
  231. package/lib/components/VChip/VChip.js.map +1 -1
  232. package/lib/components/VData/VData.js +1 -0
  233. package/lib/components/VData/VData.js.map +1 -1
  234. package/lib/components/VDataIterator/VDataFooter.js +2 -1
  235. package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
  236. package/lib/components/VDataIterator/VDataIterator.js +1 -0
  237. package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
  238. package/lib/components/VDataTable/VDataTable.js +7 -12
  239. package/lib/components/VDataTable/VDataTable.js.map +1 -1
  240. package/lib/components/VDataTable/VDataTableHeader.js +3 -6
  241. package/lib/components/VDataTable/VDataTableHeader.js.map +1 -1
  242. package/lib/components/VDataTable/VDataTableHeaderDesktop.js +1 -0
  243. package/lib/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
  244. package/lib/components/VDataTable/VDataTableHeaderMobile.js +1 -0
  245. package/lib/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
  246. package/lib/components/VDataTable/VEditDialog.js +16 -15
  247. package/lib/components/VDataTable/VEditDialog.js.map +1 -1
  248. package/lib/components/VDataTable/mixins/header.js +1 -6
  249. package/lib/components/VDataTable/mixins/header.js.map +1 -1
  250. package/lib/components/VDatePicker/VDatePicker.js +11 -16
  251. package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
  252. package/lib/components/VDatePicker/VDatePickerHeader.js +33 -20
  253. package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
  254. package/lib/components/VDatePicker/VDatePickerMonthTable.js +3 -1
  255. package/lib/components/VDatePicker/VDatePickerMonthTable.js.map +1 -1
  256. package/lib/components/VDatePicker/VDatePickerTitle.js +6 -5
  257. package/lib/components/VDatePicker/VDatePickerTitle.js.map +1 -1
  258. package/lib/components/VDatePicker/VDatePickerYears.js +8 -9
  259. package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
  260. package/lib/components/VDatePicker/mixins/date-picker-table.js +18 -14
  261. package/lib/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
  262. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.js +4 -0
  263. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.js.map +1 -1
  264. package/lib/components/VDialog/VDialog.js +3 -2
  265. package/lib/components/VDialog/VDialog.js.map +1 -1
  266. package/lib/components/VExpansionPanel/VExpansionPanel.js +1 -0
  267. package/lib/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
  268. package/lib/components/VExpansionPanel/VExpansionPanelContent.js +1 -1
  269. package/lib/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
  270. package/lib/components/VExpansionPanel/VExpansionPanelHeader.js +3 -6
  271. package/lib/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
  272. package/lib/components/VFileInput/VFileInput.js +1 -0
  273. package/lib/components/VFileInput/VFileInput.js.map +1 -1
  274. package/lib/components/VForm/VForm.js +1 -0
  275. package/lib/components/VForm/VForm.js.map +1 -1
  276. package/lib/components/VHover/VHover.js +1 -0
  277. package/lib/components/VHover/VHover.js.map +1 -1
  278. package/lib/components/VImg/VImg.js +4 -8
  279. package/lib/components/VImg/VImg.js.map +1 -1
  280. package/lib/components/VInput/VInput.js +3 -2
  281. package/lib/components/VInput/VInput.js.map +1 -1
  282. package/lib/components/VItemGroup/VItem.js +2 -1
  283. package/lib/components/VItemGroup/VItem.js.map +1 -1
  284. package/lib/components/VItemGroup/VItemGroup.js +6 -1
  285. package/lib/components/VItemGroup/VItemGroup.js.map +1 -1
  286. package/lib/components/VLazy/VLazy.js +8 -15
  287. package/lib/components/VLazy/VLazy.js.map +1 -1
  288. package/lib/components/VList/VListGroup.js +8 -10
  289. package/lib/components/VList/VListGroup.js.map +1 -1
  290. package/lib/components/VList/VListItem.js +28 -15
  291. package/lib/components/VList/VListItem.js.map +1 -1
  292. package/lib/components/VList/VListItemAction.js +15 -9
  293. package/lib/components/VList/VListItemAction.js.map +1 -1
  294. package/lib/components/VMenu/VMenu.js +1 -0
  295. package/lib/components/VMenu/VMenu.js.map +1 -1
  296. package/lib/components/VMessages/VMessages.js +1 -1
  297. package/lib/components/VMessages/VMessages.js.map +1 -1
  298. package/lib/components/VNavigationDrawer/VNavigationDrawer.js +1 -6
  299. package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
  300. package/lib/components/VOtpInput/VOtpInput.js +2 -6
  301. package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
  302. package/lib/components/VOverflowBtn/VOverflowBtn.js +2 -1
  303. package/lib/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
  304. package/lib/components/VOverlay/VOverlay.js +1 -0
  305. package/lib/components/VOverlay/VOverlay.js.map +1 -1
  306. package/lib/components/VPagination/VPagination.js +2 -4
  307. package/lib/components/VPagination/VPagination.js.map +1 -1
  308. package/lib/components/VPicker/VPicker.js +4 -4
  309. package/lib/components/VPicker/VPicker.js.map +1 -1
  310. package/lib/components/VProgressCircular/VProgressCircular.js +1 -4
  311. package/lib/components/VProgressCircular/VProgressCircular.js.map +1 -1
  312. package/lib/components/VProgressLinear/VProgressLinear.js +4 -6
  313. package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
  314. package/lib/components/VRadioGroup/VRadio.js +3 -2
  315. package/lib/components/VRadioGroup/VRadio.js.map +1 -1
  316. package/lib/components/VSelect/VSelect.js +66 -21
  317. package/lib/components/VSelect/VSelect.js.map +1 -1
  318. package/lib/components/VSelect/VSelectList.js +15 -17
  319. package/lib/components/VSelect/VSelectList.js.map +1 -1
  320. package/lib/components/VSlideGroup/VSlideGroup.js +4 -7
  321. package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
  322. package/lib/components/VSlideGroup/VSlideItem.js +2 -1
  323. package/lib/components/VSlideGroup/VSlideItem.js.map +1 -1
  324. package/lib/components/VSlider/VSlider.js +1 -4
  325. package/lib/components/VSlider/VSlider.js.map +1 -1
  326. package/lib/components/VSnackbar/VSnackbar.js +1 -0
  327. package/lib/components/VSnackbar/VSnackbar.js.map +1 -1
  328. package/lib/components/VSparkline/VSparkline.js +48 -67
  329. package/lib/components/VSparkline/VSparkline.js.map +1 -1
  330. package/lib/components/VSpeedDial/VSpeedDial.js +3 -9
  331. package/lib/components/VSpeedDial/VSpeedDial.js.map +1 -1
  332. package/lib/components/VStepper/VStepper.js +1 -0
  333. package/lib/components/VStepper/VStepper.js.map +1 -1
  334. package/lib/components/VStepper/VStepperContent.js +1 -1
  335. package/lib/components/VStepper/VStepperContent.js.map +1 -1
  336. package/lib/components/VStepper/VStepperStep.js +7 -18
  337. package/lib/components/VStepper/VStepperStep.js.map +1 -1
  338. package/lib/components/VSwitch/VSwitch.js +2 -4
  339. package/lib/components/VSwitch/VSwitch.js.map +1 -1
  340. package/lib/components/VTabs/VTab.js +1 -0
  341. package/lib/components/VTabs/VTab.js.map +1 -1
  342. package/lib/components/VTabs/VTabs.js +16 -6
  343. package/lib/components/VTabs/VTabs.js.map +1 -1
  344. package/lib/components/VTabs/VTabsItems.js +1 -0
  345. package/lib/components/VTabs/VTabsItems.js.map +1 -1
  346. package/lib/components/VTextField/VTextField.js +7 -16
  347. package/lib/components/VTextField/VTextField.js.map +1 -1
  348. package/lib/components/VTimePicker/VTimePicker.js +65 -31
  349. package/lib/components/VTimePicker/VTimePicker.js.map +1 -1
  350. package/lib/components/VTimePicker/VTimePickerClock.js +24 -39
  351. package/lib/components/VTimePicker/VTimePickerClock.js.map +1 -1
  352. package/lib/components/VTimePicker/VTimePickerTitle.js +3 -2
  353. package/lib/components/VTimePicker/VTimePickerTitle.js.map +1 -1
  354. package/lib/components/VToolbar/VToolbar.js +1 -3
  355. package/lib/components/VToolbar/VToolbar.js.map +1 -1
  356. package/lib/components/VTooltip/VTooltip.js +2 -3
  357. package/lib/components/VTooltip/VTooltip.js.map +1 -1
  358. package/lib/components/VTreeview/VTreeviewNode.js +3 -3
  359. package/lib/components/VTreeview/VTreeviewNode.js.map +1 -1
  360. package/lib/components/VVirtualScroll/VVirtualScroll.js +0 -3
  361. package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
  362. package/lib/components/VWindow/VWindow.js +0 -3
  363. package/lib/components/VWindow/VWindow.js.map +1 -1
  364. package/lib/components/VWindow/VWindowItem.js +2 -6
  365. package/lib/components/VWindow/VWindowItem.js.map +1 -1
  366. package/lib/components/transitions/createTransition.js +2 -2
  367. package/lib/components/transitions/createTransition.js.map +1 -1
  368. package/lib/framework.js +1 -1
  369. package/lib/mixins/detachable/index.js +9 -5
  370. package/lib/mixins/detachable/index.js.map +1 -1
  371. package/lib/mixins/picker/index.js +5 -3
  372. package/lib/mixins/picker/index.js.map +1 -1
  373. package/package.json +1 -1
  374. package/src/components/VAlert/VAlert.ts +2 -0
  375. package/src/components/VAppBar/VAppBar.ts +12 -3
  376. package/src/components/VAppBar/VAppBarNavIcon.ts +1 -1
  377. package/src/components/VBadge/VBadge.ts +1 -1
  378. package/src/components/VBanner/VBanner.ts +17 -17
  379. package/src/components/VBottomNavigation/VBottomNavigation.ts +10 -8
  380. package/src/components/VBreadcrumbs/VBreadcrumbs.ts +2 -2
  381. package/src/components/VBtn/VBtn.ts +8 -2
  382. package/src/components/VCalendar/VCalendar.ts +29 -27
  383. package/src/components/VCalendar/VCalendarCategory.ts +9 -8
  384. package/src/components/VCalendar/VCalendarDaily.ts +18 -28
  385. package/src/components/VCalendar/VCalendarMonthly.ts +2 -1
  386. package/src/components/VCalendar/VCalendarWeekly.ts +18 -30
  387. package/src/components/VCalendar/__tests__/VCalendar.spec.ts +18 -34
  388. package/src/components/VCalendar/__tests__/VCalendarCategory.spec.ts +16 -14
  389. package/src/components/VCalendar/__tests__/VCalendarDaily.spec.ts +30 -28
  390. package/src/components/VCalendar/__tests__/__snapshots__/VCalendar.spec.ts.snap +206 -205
  391. package/src/components/VCalendar/__tests__/__snapshots__/VCalendarDaily.spec.ts.snap +122 -122
  392. package/src/components/VCalendar/mixins/__tests__/__snapshots__/calendar-with-events.spec.ts.snap +1 -56
  393. package/src/components/VCalendar/mixins/__tests__/calendar-base.spec.ts +24 -21
  394. package/src/components/VCalendar/mixins/__tests__/calendar-with-events.spec.ts +27 -34
  395. package/src/components/VCalendar/mixins/__tests__/calendar-with-intervals.spec.ts +31 -28
  396. package/src/components/VCalendar/mixins/__tests__/times.spec.ts +10 -9
  397. package/src/components/VCalendar/mixins/calendar-base.ts +8 -12
  398. package/src/components/VCalendar/mixins/calendar-with-events.ts +19 -38
  399. package/src/components/VCalendar/mixins/calendar-with-intervals.ts +1 -1
  400. package/src/components/VCalendar/mixins/times.ts +1 -1
  401. package/src/components/VCarousel/VCarousel.ts +16 -12
  402. package/src/components/VCarousel/VCarouselItem.ts +1 -1
  403. package/src/components/VCheckbox/VCheckbox.ts +20 -2
  404. package/src/components/VCheckbox/VSimpleCheckbox.ts +0 -3
  405. package/src/components/VChip/VChip.ts +16 -13
  406. package/src/components/VData/VData.ts +2 -0
  407. package/src/components/VDataIterator/VDataFooter.ts +3 -1
  408. package/src/components/VDataIterator/VDataIterator.ts +2 -0
  409. package/src/components/VDataTable/VDataTable.ts +7 -9
  410. package/src/components/VDataTable/VDataTableHeader.ts +2 -4
  411. package/src/components/VDataTable/VDataTableHeaderDesktop.ts +5 -0
  412. package/src/components/VDataTable/VDataTableHeaderMobile.ts +2 -0
  413. package/src/components/VDataTable/VEditDialog.ts +20 -18
  414. package/src/components/VDataTable/mixins/header.ts +1 -5
  415. package/src/components/VDatePicker/VDatePicker.ts +13 -18
  416. package/src/components/VDatePicker/VDatePickerHeader.ts +44 -32
  417. package/src/components/VDatePicker/VDatePickerMonthTable.ts +1 -1
  418. package/src/components/VDatePicker/VDatePickerTitle.ts +9 -7
  419. package/src/components/VDatePicker/VDatePickerYears.ts +6 -10
  420. package/src/components/VDatePicker/__tests__/VDatePicker.date.spec.ts +302 -246
  421. package/src/components/VDatePicker/__tests__/VDatePicker.month.spec.ts +90 -86
  422. package/src/components/VDatePicker/__tests__/VDatePickerDateTable.spec.ts +76 -90
  423. package/src/components/VDatePicker/__tests__/VDatePickerHeader.spec.ts +96 -71
  424. package/src/components/VDatePicker/__tests__/VDatePickerMonthTable.spec.ts +63 -77
  425. package/src/components/VDatePicker/__tests__/VDatePickerTitle.spec.ts +48 -28
  426. package/src/components/VDatePicker/__tests__/VDatePickerYears.spec.ts +25 -22
  427. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.date.spec.ts.snap +601 -586
  428. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.month.spec.ts.snap +203 -193
  429. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerDateTable.spec.ts.snap +615 -615
  430. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerHeader.spec.ts.snap +52 -52
  431. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerMonthTable.spec.ts.snap +144 -144
  432. package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerTitle.spec.ts.snap +3 -4
  433. package/src/components/VDatePicker/mixins/date-picker-table.ts +19 -14
  434. package/src/components/VDatePicker/util/__tests__/createNativeLocaleFormatter.spec.ts +7 -0
  435. package/src/components/VDatePicker/util/createNativeLocaleFormatter.ts +3 -0
  436. package/src/components/VDialog/VDialog.ts +9 -7
  437. package/src/components/VExpansionPanel/VExpansionPanel.ts +5 -0
  438. package/src/components/VExpansionPanel/VExpansionPanelContent.ts +1 -1
  439. package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +2 -3
  440. package/src/components/VFileInput/VFileInput.ts +2 -0
  441. package/src/components/VForm/VForm.ts +2 -0
  442. package/src/components/VHover/VHover.ts +2 -0
  443. package/src/components/VImg/VImg.ts +4 -3
  444. package/src/components/VInput/VInput.ts +4 -2
  445. package/src/components/VItemGroup/VItem.ts +4 -0
  446. package/src/components/VItemGroup/VItemGroup.ts +7 -1
  447. package/src/components/VLazy/VLazy.ts +11 -13
  448. package/src/components/VList/VListGroup.ts +12 -13
  449. package/src/components/VList/VListItem.ts +36 -19
  450. package/src/components/VList/VListItemAction.ts +11 -10
  451. package/src/components/VMenu/VMenu.ts +3 -1
  452. package/src/components/VMessages/VMessages.ts +1 -1
  453. package/src/components/VNavigationDrawer/VNavigationDrawer.ts +2 -5
  454. package/src/components/VOtpInput/VOtpInput.ts +2 -3
  455. package/src/components/VOverflowBtn/VOverflowBtn.ts +3 -1
  456. package/src/components/VOverlay/VOverlay.ts +2 -0
  457. package/src/components/VPagination/VPagination.ts +3 -2
  458. package/src/components/VPicker/VPicker.ts +9 -11
  459. package/src/components/VPicker/__tests__/VPicker.spec.ts +14 -15
  460. package/src/components/VProgressCircular/VProgressCircular.ts +0 -1
  461. package/src/components/VProgressLinear/VProgressLinear.ts +14 -13
  462. package/src/components/VRadioGroup/VRadio.ts +4 -2
  463. package/src/components/VSelect/VSelect.ts +61 -21
  464. package/src/components/VSelect/VSelectList.ts +16 -12
  465. package/src/components/VSlideGroup/VSlideGroup.ts +5 -7
  466. package/src/components/VSlideGroup/VSlideItem.ts +2 -0
  467. package/src/components/VSlider/VSlider.ts +1 -4
  468. package/src/components/VSnackbar/VSnackbar.ts +1 -1
  469. package/src/components/VSparkline/VSparkline.ts +54 -92
  470. package/src/components/VSpeedDial/VSpeedDial.ts +6 -8
  471. package/src/components/VStepper/VStepper.ts +3 -1
  472. package/src/components/VStepper/VStepperContent.ts +1 -1
  473. package/src/components/VStepper/VStepperStep.ts +8 -15
  474. package/src/components/VSwitch/VSwitch.ts +5 -6
  475. package/src/components/VTabs/VTab.ts +2 -0
  476. package/src/components/VTabs/VTabs.ts +18 -12
  477. package/src/components/VTabs/VTabsItems.ts +2 -0
  478. package/src/components/VTextField/VTextField.ts +10 -13
  479. package/src/components/VTimePicker/VTimePicker.ts +199 -89
  480. package/src/components/VTimePicker/VTimePickerClock.ts +40 -45
  481. package/src/components/VTimePicker/VTimePickerTitle.ts +5 -4
  482. package/src/components/VTimePicker/__tests__/VTimePicker.spec.ts +153 -140
  483. package/src/components/VTimePicker/__tests__/VTimePickerClock.spec.ts +78 -81
  484. package/src/components/VTimePicker/__tests__/VTimePickerTitle.spec.ts +47 -41
  485. package/src/components/VTimePicker/__tests__/__snapshots__/VTimePicker.spec.ts.snap +160 -40
  486. package/src/components/VToolbar/VToolbar.ts +1 -1
  487. package/src/components/VTooltip/VTooltip.ts +2 -2
  488. package/src/components/VTreeview/VTreeviewNode.ts +3 -3
  489. package/src/components/VVirtualScroll/VVirtualScroll.ts +0 -1
  490. package/src/components/VWindow/VWindow.ts +0 -1
  491. package/src/components/VWindow/VWindowItem.ts +2 -3
  492. package/src/components/transitions/createTransition.ts +2 -2
  493. package/src/mixins/detachable/index.ts +11 -5
  494. package/src/mixins/picker/index.ts +4 -4
@@ -12,7 +12,7 @@ import pad from '../VDatePicker/util/pad'
12
12
  import mixins from '../../util/mixins'
13
13
 
14
14
  // Types
15
- import { VNode, PropType } from 'vue'
15
+ import { VNode, PropType, h, defineComponent } from 'vue'
16
16
  import { SelectingTimes } from './SelectingTimes'
17
17
 
18
18
  const rangeHours24 = createRange(24)
@@ -29,7 +29,7 @@ type ActivePicker = 'HOUR' | 'MINUTE' | 'SECOND'
29
29
  export default mixins(
30
30
  Picker,
31
31
  PickerButton
32
- /* @vue/component */
32
+ /* @vue/component */
33
33
  ).extend({
34
34
  name: 'v-time-picker',
35
35
 
@@ -51,10 +51,18 @@ export default mixins(
51
51
  readonly: Boolean,
52
52
  scrollable: Boolean,
53
53
  useSeconds: Boolean,
54
- value: null as any as PropType<any>,
54
+ modelValue: (null as any) as PropType<any>,
55
55
  ampmInTitle: Boolean,
56
56
  },
57
-
57
+ emits: [
58
+ 'update:modelValue',
59
+ 'change',
60
+ 'update:active-picker',
61
+ 'update:period',
62
+ 'click:hour',
63
+ 'click:minute',
64
+ 'click:second',
65
+ ],
58
66
  data () {
59
67
  return {
60
68
  inputHour: null as number | null,
@@ -108,15 +116,16 @@ export default mixins(
108
116
  const maxHour = this.max ? Number(this.max.split(':')[0]) : 23
109
117
 
110
118
  return (val: number) => {
111
- return val >= minHour * 1 &&
112
- val <= maxHour * 1 &&
113
- (!cb || cb(val))
119
+ return val >= minHour * 1 && val <= maxHour * 1 && (!cb || cb(val))
114
120
  }
115
121
  },
116
122
  isAllowedMinuteCb (): AllowFunction {
117
123
  let cb: AllowFunction
118
124
 
119
- const isHourAllowed = !this.isAllowedHourCb || this.inputHour === null || this.isAllowedHourCb(this.inputHour)
125
+ const isHourAllowed =
126
+ !this.isAllowedHourCb ||
127
+ this.inputHour === null ||
128
+ this.isAllowedHourCb(this.inputHour)
120
129
  if (this.allowedMinutes instanceof Array) {
121
130
  cb = (val: number) => (this.allowedMinutes as number[]).includes(val)
122
131
  } else {
@@ -127,28 +136,37 @@ export default mixins(
127
136
  return isHourAllowed ? cb : () => false
128
137
  }
129
138
 
130
- const [minHour, minMinute] = this.min ? this.min.split(':').map(Number) : [0, 0]
131
- const [maxHour, maxMinute] = this.max ? this.max.split(':').map(Number) : [23, 59]
139
+ const [minHour, minMinute] = this.min
140
+ ? this.min.split(':').map(Number)
141
+ : [0, 0]
142
+ const [maxHour, maxMinute] = this.max
143
+ ? this.max.split(':').map(Number)
144
+ : [23, 59]
132
145
  const minTime = minHour * 60 + minMinute * 1
133
146
  const maxTime = maxHour * 60 + maxMinute * 1
134
147
 
135
148
  return (val: number) => {
136
149
  const time = 60 * this.inputHour! + val
137
- return time >= minTime &&
150
+ return (
151
+ time >= minTime &&
138
152
  time <= maxTime &&
139
153
  isHourAllowed &&
140
154
  (!cb || cb(val))
155
+ )
141
156
  }
142
157
  },
143
158
  isAllowedSecondCb (): AllowFunction {
144
159
  let cb: AllowFunction
145
160
 
146
- const isHourAllowed = !this.isAllowedHourCb || this.inputHour === null || this.isAllowedHourCb(this.inputHour)
147
- const isMinuteAllowed = isHourAllowed &&
161
+ const isHourAllowed =
162
+ !this.isAllowedHourCb ||
163
+ this.inputHour === null ||
164
+ this.isAllowedHourCb(this.inputHour)
165
+ const isMinuteAllowed =
166
+ isHourAllowed &&
148
167
  (!this.isAllowedMinuteCb ||
149
168
  this.inputMinute === null ||
150
- this.isAllowedMinuteCb(this.inputMinute)
151
- )
169
+ this.isAllowedMinuteCb(this.inputMinute))
152
170
 
153
171
  if (this.allowedSeconds instanceof Array) {
154
172
  cb = (val: number) => (this.allowedSeconds as number[]).includes(val)
@@ -160,17 +178,23 @@ export default mixins(
160
178
  return isMinuteAllowed ? cb : () => false
161
179
  }
162
180
 
163
- const [minHour, minMinute, minSecond] = this.min ? this.min.split(':').map(Number) : [0, 0, 0]
164
- const [maxHour, maxMinute, maxSecond] = this.max ? this.max.split(':').map(Number) : [23, 59, 59]
181
+ const [minHour, minMinute, minSecond] = this.min
182
+ ? this.min.split(':').map(Number)
183
+ : [0, 0, 0]
184
+ const [maxHour, maxMinute, maxSecond] = this.max
185
+ ? this.max.split(':').map(Number)
186
+ : [23, 59, 59]
165
187
  const minTime = minHour * 3600 + minMinute * 60 + (minSecond || 0) * 1
166
188
  const maxTime = maxHour * 3600 + maxMinute * 60 + (maxSecond || 0) * 1
167
189
 
168
190
  return (val: number) => {
169
191
  const time = 3600 * this.inputHour! + 60 * this.inputMinute! + val
170
- return time >= minTime &&
192
+ return (
193
+ time >= minTime &&
171
194
  time <= maxTime &&
172
195
  isMinuteAllowed &&
173
196
  (!cb || cb(val))
197
+ )
174
198
  }
175
199
  },
176
200
  isAmPm (): boolean {
@@ -181,25 +205,39 @@ export default mixins(
181
205
  watch: {
182
206
  activePicker: 'setPicker',
183
207
  selecting: 'emitPicker',
184
- value: 'setInputData',
208
+ modelValue: {
209
+ handler: 'setInputData',
210
+ immediate: false
211
+ },
185
212
  },
186
213
 
187
214
  mounted () {
188
- this.setInputData(this.value)
215
+ this.setInputData(this.modelValue)
189
216
  this.$on('update:period', this.setPeriod)
190
217
  },
191
218
 
219
+ beforeUnmount () {
220
+ this.$off('update:period', this.setPeriod)
221
+ },
222
+
192
223
  methods: {
193
224
  genValue () {
194
- if (this.inputHour != null && this.inputMinute != null && (!this.useSeconds || this.inputSecond != null)) {
195
- return `${pad(this.inputHour)}:${pad(this.inputMinute)}` + (this.useSeconds ? `:${pad(this.inputSecond!)}` : '')
225
+ if (
226
+ this.inputHour != null &&
227
+ this.inputMinute != null &&
228
+ (!this.useSeconds || this.inputSecond != null)
229
+ ) {
230
+ return (
231
+ `${pad(this.inputHour)}:${pad(this.inputMinute)}` +
232
+ (this.useSeconds ? `:${pad(this.inputSecond!)}` : '')
233
+ )
196
234
  }
197
235
 
198
236
  return null
199
237
  },
200
238
  emitValue () {
201
239
  const value = this.genValue()
202
- if (value !== null) this.$emit('input', value)
240
+ if (value !== null) this.$emit('update:modelValue', value)
203
241
  },
204
242
  emitPicker (value: SelectingTimes) {
205
243
  let activePicker = 'HOUR'
@@ -213,7 +251,7 @@ export default mixins(
213
251
  setPicker (picker: ActivePicker) {
214
252
  if (picker === 'HOUR') this.selecting = SelectingTimes.Hour
215
253
  else if (picker === 'MINUTE') this.selecting = SelectingTimes.Minute
216
- else if (picker === 'SECOND' && this.useSeconds) this.selecting = SelectingTimes.Second
254
+ else if (picker === 'SECOND' && this.useSeconds) { this.selecting = SelectingTimes.Second }
217
255
  },
218
256
  setPeriod (period: Period) {
219
257
  this.period = period
@@ -233,24 +271,48 @@ export default mixins(
233
271
  this.inputMinute = value.getMinutes()
234
272
  this.inputSecond = value.getSeconds()
235
273
  } else {
236
- const [, hour, minute, , second, period] = value.trim().toLowerCase().match(/^(\d+):(\d+)(:(\d+))?([ap]m)?$/) || new Array(6)
237
-
238
- this.inputHour = period ? this.convert12to24(parseInt(hour, 10), period as Period) : parseInt(hour, 10)
239
- this.inputMinute = parseInt(minute, 10)
240
- this.inputSecond = parseInt(second || 0, 10)
274
+ const match = value
275
+ .trim()
276
+ .match(/^(\d+):(\d+)(:(\d+))?\s*([ap]m)?$/i)
277
+
278
+ if (match) {
279
+ const [, hour, minute, , second, period] = match
280
+ const normalizedPeriod = period ? period.toLowerCase() as Period : null
281
+ this.inputHour = normalizedPeriod
282
+ ? this.convert12to24(parseInt(hour, 10), normalizedPeriod)
283
+ : parseInt(hour, 10)
284
+ this.inputMinute = parseInt(minute, 10)
285
+ this.inputSecond = parseInt(second || 0, 10)
286
+
287
+ // Устанавливаем период только если он был указан в строке
288
+ if (normalizedPeriod) {
289
+ this.period = normalizedPeriod
290
+ } else if (this.inputHour != null) {
291
+ this.period = this.inputHour < 12 ? 'am' : 'pm'
292
+ }
293
+ } else {
294
+ this.inputHour = null
295
+ this.inputMinute = null
296
+ this.inputSecond = null
297
+ }
241
298
  }
242
299
 
243
- this.period = (this.inputHour == null || this.inputHour < 12) ? 'am' : 'pm'
300
+ // Для Date объектов устанавливаем период на основе 24-часового формата
301
+ if (value instanceof Date && this.inputHour != null) {
302
+ this.period = this.inputHour < 12 ? 'am' : 'pm'
303
+ }
244
304
  },
245
305
  convert24to12 (hour: number) {
246
- return hour ? ((hour - 1) % 12 + 1) : 12
306
+ return hour ? ((hour - 1) % 12) + 1 : 12
247
307
  },
248
308
  convert12to24 (hour: number, period: Period) {
249
- return hour % 12 + (period === 'pm' ? 12 : 0)
309
+ return (hour % 12) + (period === 'pm' ? 12 : 0)
250
310
  },
251
311
  onInput (value: number) {
252
312
  if (this.selecting === SelectingTimes.Hour) {
253
- this.inputHour = this.isAmPm ? this.convert12to24(value, this.period) : value
313
+ this.inputHour = this.isAmPm
314
+ ? this.convert12to24(value, this.period)
315
+ : value
254
316
  } else if (this.selecting === SelectingTimes.Minute) {
255
317
  this.inputMinute = value
256
318
  } else {
@@ -259,9 +321,14 @@ export default mixins(
259
321
  this.emitValue()
260
322
  },
261
323
  onChange (value: number) {
324
+ // Сначала обновляем значение через onInput - это ключевой момент!
325
+ this.onInput(value)
326
+
262
327
  this.$emit(`click:${selectingNames[this.selecting]}`, value)
263
328
 
264
- const emitChange = this.selecting === (this.useSeconds ? SelectingTimes.Second : SelectingTimes.Minute)
329
+ const emitChange =
330
+ this.selecting ===
331
+ (this.useSeconds ? SelectingTimes.Second : SelectingTimes.Minute)
265
332
 
266
333
  if (this.selecting === SelectingTimes.Hour) {
267
334
  this.selecting = SelectingTimes.Minute
@@ -269,10 +336,13 @@ export default mixins(
269
336
  this.selecting = SelectingTimes.Second
270
337
  }
271
338
 
272
- if (this.inputHour === this.lazyInputHour &&
339
+ if (
340
+ this.inputHour === this.lazyInputHour &&
273
341
  this.inputMinute === this.lazyInputMinute &&
274
342
  (!this.useSeconds || this.inputSecond === this.lazyInputSecond)
275
- ) return
343
+ ) {
344
+ return
345
+ }
276
346
 
277
347
  const time = this.genValue()
278
348
  if (time === null) return
@@ -284,91 +354,131 @@ export default mixins(
284
354
  emitChange && this.$emit('change', time)
285
355
  },
286
356
  firstAllowed (type: 'hour' | 'minute' | 'second', value: number) {
287
- const allowedFn = type === 'hour' ? this.isAllowedHourCb : (type === 'minute' ? this.isAllowedMinuteCb : this.isAllowedSecondCb)
357
+ const allowedFn =
358
+ type === 'hour'
359
+ ? this.isAllowedHourCb
360
+ : type === 'minute'
361
+ ? this.isAllowedMinuteCb
362
+ : this.isAllowedSecondCb
288
363
  if (!allowedFn) return value
289
364
 
290
365
  // TODO: clean up
291
- const range = type === 'minute'
292
- ? range60
293
- : (type === 'second'
366
+ const range =
367
+ type === 'minute'
294
368
  ? range60
295
- : (this.isAmPm
296
- ? (value < 12
297
- ? rangeHours12am
298
- : rangeHours12pm)
299
- : rangeHours24))
300
- const first = range.find(v => allowedFn((v + value) % range.length + range[0]))
301
- return ((first || 0) + value) % range.length + range[0]
369
+ : type === 'second'
370
+ ? range60
371
+ : this.isAmPm
372
+ ? value < 12
373
+ ? rangeHours12am
374
+ : rangeHours12pm
375
+ : rangeHours24
376
+ const first = range.find(v =>
377
+ allowedFn(((v + value) % range.length) + range[0])
378
+ )
379
+ return (((first || 0) + value) % range.length) + range[0]
302
380
  },
303
381
  genClock () {
304
382
  return h(VTimePickerClock, {
305
383
  allowedValues:
306
384
  this.selecting === SelectingTimes.Hour
307
385
  ? this.isAllowedHourCb
308
- : (this.selecting === SelectingTimes.Minute
386
+ : this.selecting === SelectingTimes.Minute
309
387
  ? this.isAllowedMinuteCb
310
- : this.isAllowedSecondCb),
388
+ : this.isAllowedSecondCb,
311
389
  color: this.color,
312
390
  dark: this.dark,
313
391
  disabled: this.disabled,
314
392
  double: this.selecting === SelectingTimes.Hour && !this.isAmPm,
315
- format: this.selecting === SelectingTimes.Hour
316
- ? (this.isAmPm ? this.convert24to12 : (val: number) => val)
317
- : (val: number) => pad(val, 2),
393
+ format:
394
+ this.selecting === SelectingTimes.Hour
395
+ ? this.isAmPm
396
+ ? this.convert24to12
397
+ : (val: number) => val
398
+ : (val: number) => pad(val, 2),
318
399
  light: this.light,
319
- max: this.selecting === SelectingTimes.Hour ? (this.isAmPm && this.period === 'am' ? 11 : 23) : 59,
320
- min: this.selecting === SelectingTimes.Hour && this.isAmPm && this.period === 'pm' ? 12 : 0,
400
+ max:
401
+ this.selecting === SelectingTimes.Hour
402
+ ? this.isAmPm && this.period === 'am'
403
+ ? 11
404
+ : 23
405
+ : 59,
406
+ min:
407
+ this.selecting === SelectingTimes.Hour &&
408
+ this.isAmPm &&
409
+ this.period === 'pm'
410
+ ? 12
411
+ : 0,
321
412
  readonly: this.readonly,
322
413
  scrollable: this.scrollable,
323
- size: Number(this.width) - ((!this.fullWidth && this.landscape) ? 80 : 20),
414
+ size:
415
+ Number(this.width) - (!this.fullWidth && this.landscape ? 80 : 20),
324
416
  step: this.selecting === SelectingTimes.Hour ? 1 : 5,
325
- value: this.selecting === SelectingTimes.Hour
326
- ? this.inputHour
327
- : (this.selecting === SelectingTimes.Minute
328
- ? this.inputMinute
329
- : this.inputSecond),
330
- onInput: this.onInput,
417
+ modelValue:
418
+ this.selecting === SelectingTimes.Hour
419
+ ? this.inputHour
420
+ : this.selecting === SelectingTimes.Minute
421
+ ? this.inputMinute
422
+ : this.inputSecond,
423
+ onUpdateModelValue: this.onInput,
331
424
  onChange: this.onChange,
332
425
  ref: 'clock',
333
426
  })
334
427
  },
335
428
  genClockAmPm () {
336
- return h('div', this.setTextColor(this.color || 'primary', {
337
- class: 'v-time-picker-clock__ampm',
338
- }), [
339
- this.genPickerButton('period', 'am', this.$vuetify.lang.t('$vuetify.timePicker.am'), this.disabled || this.readonly),
340
- this.genPickerButton('period', 'pm', this.$vuetify.lang.t('$vuetify.timePicker.pm'), this.disabled || this.readonly),
341
- ])
429
+ return h(
430
+ 'div',
431
+ this.setTextColor(this.color || 'primary', {
432
+ class: 'v-time-picker-clock__ampm',
433
+ }),
434
+ [
435
+ this.genPickerButton(
436
+ 'period',
437
+ 'am',
438
+ this.$vuetify.lang.t('$vuetify.timePicker.am'),
439
+ this.disabled || this.readonly
440
+ ),
441
+ this.genPickerButton(
442
+ 'period',
443
+ 'pm',
444
+ this.$vuetify.lang.t('$vuetify.timePicker.pm'),
445
+ this.disabled || this.readonly
446
+ ),
447
+ ]
448
+ )
342
449
  },
343
450
  genPickerBody () {
344
- return h('div', {
345
- class: 'v-time-picker-clock__container',
346
- key: this.selecting,
347
- }, [
348
- !this.ampmInTitle && this.isAmPm && this.genClockAmPm(),
349
- this.genClock(),
350
- ])
451
+ return h(
452
+ 'div',
453
+ {
454
+ class: 'v-time-picker-clock__container',
455
+ key: this.selecting,
456
+ },
457
+ [
458
+ !this.ampmInTitle && this.isAmPm && this.genClockAmPm(),
459
+ this.genClock(),
460
+ ]
461
+ )
351
462
  },
352
463
  genPickerTitle () {
353
464
  return h(VTimePickerTitle, {
354
- props: {
355
- ampm: this.isAmPm,
356
- ampmReadonly: this.isAmPm && !this.ampmInTitle,
357
- disabled: this.disabled,
358
- hour: this.inputHour,
359
- minute: this.inputMinute,
360
- second: this.inputSecond,
361
- period: this.period,
362
- readonly: this.readonly,
363
- useSeconds: this.useSeconds,
364
- selecting: this.selecting,
465
+ ampm: this.isAmPm,
466
+ ampmReadonly: this.isAmPm && !this.ampmInTitle,
467
+ disabled: this.disabled,
468
+ hour: this.inputHour,
469
+ minute: this.inputMinute,
470
+ second: this.inputSecond,
471
+ period: this.period,
472
+ readonly: this.readonly,
473
+ useSeconds: this.useSeconds,
474
+ selecting: this.selecting,
475
+ 'onUpdate:selecting': (value: 1 | 2 | 3) => {
476
+ this.selecting = value
365
477
  },
366
- on: {
367
- 'update:selecting': (value: 1 | 2 | 3) => (this.selecting = value),
368
- 'update:period': (period: string) => this.$emit('update:period', period),
478
+ 'onUpdate:period': (period: string) => {
479
+ this.$emit('update:period', period)
369
480
  },
370
481
  ref: 'title',
371
- slot: 'title',
372
482
  })
373
483
  },
374
484
  },
@@ -1,4 +1,4 @@
1
- import {h} from 'vue'
1
+ import { h, VNode, PropType, VNodeData } from 'vue'
2
2
  import './VTimePickerClock.sass'
3
3
 
4
4
  // Mixins
@@ -7,15 +7,13 @@ import Themeable from '../../mixins/themeable'
7
7
 
8
8
  // Types
9
9
  import mixins, { ExtractVue } from '../../util/mixins'
10
- import Vue, { VNode, PropType, VNodeData } from 'vue'
11
- import { PropValidator } from 'vue/types/options'
12
10
 
13
11
  interface Point {
14
12
  x: number
15
13
  y: number
16
14
  }
17
15
 
18
- interface options extends Vue {
16
+ interface options {
19
17
  $refs: {
20
18
  clock: HTMLElement
21
19
  innerClock: HTMLElement
@@ -42,9 +40,9 @@ export default mixins<options &
42
40
  disabled: Boolean,
43
41
  double: Boolean,
44
42
  format: {
45
- type: Function,
43
+ type: Function as PropType<(val: string | number) => string | number>,
46
44
  default: (val: string | number) => val,
47
- } as PropValidator<(val: string | number) => string | number>,
45
+ },
48
46
  max: {
49
47
  type: Number,
50
48
  required: true,
@@ -63,12 +61,11 @@ export default mixins<options &
63
61
  type: Number,
64
62
  default: 1,
65
63
  },
66
- value: Number,
64
+ modelValue: Number,
67
65
  },
68
66
 
69
67
  data () {
70
68
  return {
71
- inputValue: this.value,
72
69
  isDragging: false,
73
70
  valueOnMouseDown: null as number | null,
74
71
  valueOnMouseUp: null as number | null,
@@ -86,7 +83,7 @@ export default mixins<options &
86
83
  return this.degreesPerUnit * Math.PI / 180
87
84
  },
88
85
  displayedValue (): number {
89
- return this.value == null ? this.min : this.value
86
+ return this.modelValue == null ? this.min : this.modelValue
90
87
  },
91
88
  innerRadiusScale (): number {
92
89
  return 0.62
@@ -96,11 +93,6 @@ export default mixins<options &
96
93
  },
97
94
  },
98
95
 
99
- watch: {
100
- value (value) {
101
- this.inputValue = value
102
- },
103
- },
104
96
 
105
97
  methods: {
106
98
  wheel (e: WheelEvent) {
@@ -130,15 +122,17 @@ export default mixins<options &
130
122
  const children: VNode[] = []
131
123
 
132
124
  for (let value = this.min; value <= this.max; value = value + this.step) {
133
- const color = value === this.value && (this.color || 'accent')
125
+ const color = value === this.modelValue && (this.color || 'accent')
134
126
  children.push(h('span', this.setBackgroundColor(color, {
135
- class: 'v-time-picker-clock__item',
136
- class: {
137
- 'v-time-picker-clock__item--active': value === this.displayedValue,
138
- 'v-time-picker-clock__item--disabled': this.disabled || !this.isAllowed(value),
139
- },
127
+ class: [
128
+ 'v-time-picker-clock__item',
129
+ {
130
+ 'v-time-picker-clock__item--active': value === this.displayedValue,
131
+ 'v-time-picker-clock__item--disabled': this.disabled || !this.isAllowed(value),
132
+ },
133
+ ],
140
134
  style: this.getTransform(value),
141
- domProps: { innerHTML: `<span>${this.format(value)}</span>` },
135
+ innerHTML: `<span>${this.format(value)}</span>`,
142
136
  })))
143
137
  }
144
138
 
@@ -147,12 +141,14 @@ export default mixins<options &
147
141
  genHand () {
148
142
  const scale = `scaleY(${this.handScale(this.displayedValue)})`
149
143
  const angle = this.rotate + this.degreesPerUnit * (this.displayedValue - this.min)
150
- const color = (this.value != null) && (this.color || 'accent')
144
+ const color = (this.modelValue != null) && (this.color || 'accent')
151
145
  return h('div', this.setBackgroundColor(color, {
152
- class: 'v-time-picker-clock__hand',
153
- class: {
154
- 'v-time-picker-clock__hand--inner': this.isInner(this.value),
155
- },
146
+ class: [
147
+ 'v-time-picker-clock__hand',
148
+ {
149
+ 'v-time-picker-clock__hand--inner': this.isInner(this.modelValue),
150
+ },
151
+ ],
156
152
  style: {
157
153
  transform: `rotate(${angle}deg) ${scale}`,
158
154
  },
@@ -230,9 +226,8 @@ export default mixins<options &
230
226
  this.update(value)
231
227
  },
232
228
  update (value: number) {
233
- if (this.inputValue !== value) {
234
- this.inputValue = value
235
- this.$emit('input', value)
229
+ if (this.modelValue !== value) {
230
+ this.$emit('update:modelValue', value)
236
231
  }
237
232
  },
238
233
  euclidean (p0: Point, p1: Point) {
@@ -249,25 +244,25 @@ export default mixins<options &
249
244
 
250
245
  render (): VNode {
251
246
  const data: VNodeData = {
252
- class: 'v-time-picker-clock',
253
- class: {
254
- 'v-time-picker-clock--indeterminate': this.value == null,
255
- ...this.themeClasses,
256
- },
257
- on: (this.readonly || this.disabled) ? undefined : {
258
- mousedown: this.onMouseDown,
259
- mouseup: this.onMouseUp,
260
- mouseleave: (e: MouseEvent) => (this.isDragging && this.onMouseUp(e)),
261
- touchstart: this.onMouseDown,
262
- touchend: this.onMouseUp,
263
- mousemove: this.onDragMove,
264
- touchmove: this.onDragMove,
265
- },
247
+ class: [
248
+ 'v-time-picker-clock',
249
+ {
250
+ 'v-time-picker-clock--indeterminate': this.modelValue == null,
251
+ ...this.themeClasses,
252
+ },
253
+ ],
254
+ onMousedown: (this.readonly || this.disabled) ? undefined : this.onMouseDown,
255
+ onMouseup: (this.readonly || this.disabled) ? undefined : this.onMouseUp,
256
+ onMouseleave: (this.readonly || this.disabled) ? undefined : (e: MouseEvent) => (this.isDragging && this.onMouseUp(e)),
257
+ onTouchstart: (this.readonly || this.disabled) ? undefined : this.onMouseDown,
258
+ onTouchend: (this.readonly || this.disabled) ? undefined : this.onMouseUp,
259
+ onMousemove: (this.readonly || this.disabled) ? undefined : this.onDragMove,
260
+ onTouchmove: (this.readonly || this.disabled) ? undefined : this.onDragMove,
266
261
  ref: 'clock',
267
262
  }
268
263
 
269
- if (this.scrollable && data.on) {
270
- data.on.wheel = this.wheel
264
+ if (this.scrollable && !this.readonly && !this.disabled) {
265
+ data.onWheel = this.wheel
271
266
  }
272
267
 
273
268
  return h('div', data, [
@@ -1,15 +1,14 @@
1
- import {h} from 'vue'
1
+ import { h, VNode, PropType, defineComponent } from 'vue'
2
2
  import './VTimePickerTitle.sass'
3
3
 
4
4
  // Mixins
5
5
  import PickerButton from '../../mixins/picker-button'
6
6
 
7
7
  // Utils
8
- import { pad } from '../VDatePicker/util'
8
+ import pad from '../VDatePicker/util/pad'
9
9
  import mixins from '../../util/mixins'
10
10
 
11
11
  import { SelectingTimes } from './SelectingTimes'
12
- import { VNode, PropType } from 'vue'
13
12
 
14
13
  export default mixins(
15
14
  PickerButton
@@ -33,6 +32,8 @@ export default mixins(
33
32
  selecting: Number,
34
33
  },
35
34
 
35
+ emits: ['update:selecting', 'update:period'],
36
+
36
37
  methods: {
37
38
  genTime () {
38
39
  let hour = this.hour
@@ -59,8 +60,8 @@ export default mixins(
59
60
  },
60
61
  genAmPm () {
61
62
  return h('div', {
62
- class: 'v-time-picker-title__ampm',
63
63
  class: {
64
+ 'v-time-picker-title__ampm': true,
64
65
  'v-time-picker-title__ampm--readonly': this.ampmReadonly,
65
66
  },
66
67
  }, [