@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
@@ -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
  }, [