@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.
- package/dist/vuetify.js +1436 -1164
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VAlert/VAlert.js +1 -0
- package/es5/components/VAlert/VAlert.js.map +1 -1
- package/es5/components/VAppBar/VAppBar.js +17 -6
- package/es5/components/VAppBar/VAppBar.js.map +1 -1
- package/es5/components/VAppBar/VAppBarNavIcon.js +5 -1
- package/es5/components/VAppBar/VAppBarNavIcon.js.map +1 -1
- package/es5/components/VBadge/VBadge.js +1 -0
- package/es5/components/VBadge/VBadge.js.map +1 -1
- package/es5/components/VBanner/VBanner.js +23 -15
- package/es5/components/VBanner/VBanner.js.map +1 -1
- package/es5/components/VBottomNavigation/VBottomNavigation.js +8 -7
- package/es5/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/es5/components/VBreadcrumbs/VBreadcrumbs.js +18 -6
- package/es5/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
- package/es5/components/VBtn/VBtn.js +6 -2
- package/es5/components/VBtn/VBtn.js.map +1 -1
- package/es5/components/VCalendar/VCalendar.js +27 -29
- package/es5/components/VCalendar/VCalendar.js.map +1 -1
- package/es5/components/VCalendar/VCalendarCategory.js +26 -34
- package/es5/components/VCalendar/VCalendarCategory.js.map +1 -1
- package/es5/components/VCalendar/VCalendarDaily.js +43 -60
- package/es5/components/VCalendar/VCalendarDaily.js.map +1 -1
- package/es5/components/VCalendar/VCalendarMonthly.js +2 -2
- package/es5/components/VCalendar/VCalendarMonthly.js.map +1 -1
- package/es5/components/VCalendar/VCalendarWeekly.js +26 -35
- package/es5/components/VCalendar/VCalendarWeekly.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-base.js +5 -10
- package/es5/components/VCalendar/mixins/calendar-base.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-with-events.js +43 -58
- package/es5/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-with-intervals.js +2 -2
- package/es5/components/VCalendar/mixins/calendar-with-intervals.js.map +1 -1
- package/es5/components/VCalendar/mixins/times.js.map +1 -1
- package/es5/components/VCarousel/VCarousel.js +20 -13
- package/es5/components/VCarousel/VCarousel.js.map +1 -1
- package/es5/components/VCarousel/VCarouselItem.js +7 -3
- package/es5/components/VCarousel/VCarouselItem.js.map +1 -1
- package/es5/components/VCheckbox/VCheckbox.js +34 -1
- package/es5/components/VCheckbox/VCheckbox.js.map +1 -1
- package/es5/components/VCheckbox/VSimpleCheckbox.js +0 -3
- package/es5/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/es5/components/VChip/VChip.js +14 -6
- package/es5/components/VChip/VChip.js.map +1 -1
- package/es5/components/VData/VData.js +1 -0
- package/es5/components/VData/VData.js.map +1 -1
- package/es5/components/VDataIterator/VDataFooter.js +6 -1
- package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
- package/es5/components/VDataIterator/VDataIterator.js +1 -0
- package/es5/components/VDataIterator/VDataIterator.js.map +1 -1
- package/es5/components/VDataTable/VDataTable.js +22 -13
- package/es5/components/VDataTable/VDataTable.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeader.js +2 -6
- package/es5/components/VDataTable/VDataTableHeader.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js +1 -0
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderMobile.js +1 -0
- package/es5/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/es5/components/VDataTable/VEditDialog.js +23 -18
- package/es5/components/VDataTable/VEditDialog.js.map +1 -1
- package/es5/components/VDataTable/mixins/header.js +5 -7
- package/es5/components/VDataTable/mixins/header.js.map +1 -1
- package/es5/components/VDatePicker/VDatePicker.js +13 -18
- package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerHeader.js +50 -22
- package/es5/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerMonthTable.js +6 -3
- package/es5/components/VDatePicker/VDatePickerMonthTable.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerTitle.js +16 -7
- package/es5/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerYears.js +11 -12
- package/es5/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js +21 -16
- package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/es5/components/VDatePicker/util/createNativeLocaleFormatter.js +4 -0
- package/es5/components/VDatePicker/util/createNativeLocaleFormatter.js.map +1 -1
- package/es5/components/VDialog/VDialog.js +17 -12
- package/es5/components/VDialog/VDialog.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanel.js +1 -0
- package/es5/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanelContent.js +11 -9
- package/es5/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js +16 -19
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/es5/components/VFileInput/VFileInput.js +1 -0
- package/es5/components/VFileInput/VFileInput.js.map +1 -1
- package/es5/components/VForm/VForm.js +1 -0
- package/es5/components/VForm/VForm.js.map +1 -1
- package/es5/components/VHover/VHover.js +1 -0
- package/es5/components/VHover/VHover.js.map +1 -1
- package/es5/components/VImg/VImg.js +9 -7
- package/es5/components/VImg/VImg.js.map +1 -1
- package/es5/components/VInput/VInput.js +11 -4
- package/es5/components/VInput/VInput.js.map +1 -1
- package/es5/components/VItemGroup/VItem.js +2 -1
- package/es5/components/VItemGroup/VItem.js.map +1 -1
- package/es5/components/VItemGroup/VItemGroup.js +5 -1
- package/es5/components/VItemGroup/VItemGroup.js.map +1 -1
- package/es5/components/VLazy/VLazy.js +8 -15
- package/es5/components/VLazy/VLazy.js.map +1 -1
- package/es5/components/VList/VListGroup.js +30 -20
- package/es5/components/VList/VListGroup.js.map +1 -1
- package/es5/components/VList/VListItem.js +31 -13
- package/es5/components/VList/VListItem.js.map +1 -1
- package/es5/components/VList/VListItemAction.js +23 -9
- package/es5/components/VList/VListItemAction.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +1 -0
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VMessages/VMessages.js +5 -1
- package/es5/components/VMessages/VMessages.js.map +1 -1
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js +1 -7
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/es5/components/VOtpInput/VOtpInput.js +1 -5
- package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js +4 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/es5/components/VOverlay/VOverlay.js +1 -0
- package/es5/components/VOverlay/VOverlay.js.map +1 -1
- package/es5/components/VPagination/VPagination.js +4 -4
- package/es5/components/VPagination/VPagination.js.map +1 -1
- package/es5/components/VPicker/VPicker.js +7 -4
- package/es5/components/VPicker/VPicker.js.map +1 -1
- package/es5/components/VProgressCircular/VProgressCircular.js +1 -10
- package/es5/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/es5/components/VProgressLinear/VProgressLinear.js +4 -12
- package/es5/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/es5/components/VRadioGroup/VRadio.js +11 -2
- package/es5/components/VRadioGroup/VRadio.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +115 -64
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +30 -26
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideGroup.js +27 -22
- package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideItem.js +2 -1
- package/es5/components/VSlideGroup/VSlideItem.js.map +1 -1
- package/es5/components/VSlider/VSlider.js +16 -15
- package/es5/components/VSlider/VSlider.js.map +1 -1
- package/es5/components/VSnackbar/VSnackbar.js +1 -0
- package/es5/components/VSnackbar/VSnackbar.js.map +1 -1
- package/es5/components/VSparkline/VSparkline.js +48 -68
- package/es5/components/VSparkline/VSparkline.js.map +1 -1
- package/es5/components/VSpeedDial/VSpeedDial.js +4 -10
- package/es5/components/VSpeedDial/VSpeedDial.js.map +1 -1
- package/es5/components/VStepper/VStepper.js +1 -0
- package/es5/components/VStepper/VStepper.js.map +1 -1
- package/es5/components/VStepper/VStepperContent.js +3 -1
- package/es5/components/VStepper/VStepperContent.js.map +1 -1
- package/es5/components/VStepper/VStepperStep.js +11 -19
- package/es5/components/VStepper/VStepperStep.js.map +1 -1
- package/es5/components/VSwitch/VSwitch.js +11 -9
- package/es5/components/VSwitch/VSwitch.js.map +1 -1
- package/es5/components/VTabs/VTab.js +1 -0
- package/es5/components/VTabs/VTab.js.map +1 -1
- package/es5/components/VTabs/VTabs.js +17 -6
- package/es5/components/VTabs/VTabs.js.map +1 -1
- package/es5/components/VTabs/VTabsItems.js +1 -0
- package/es5/components/VTabs/VTabsItems.js.map +1 -1
- package/es5/components/VTextField/VTextField.js +34 -26
- package/es5/components/VTextField/VTextField.js.map +1 -1
- package/es5/components/VTimePicker/VTimePicker.js +72 -44
- package/es5/components/VTimePicker/VTimePicker.js.map +1 -1
- package/es5/components/VTimePicker/VTimePickerClock.js +37 -48
- package/es5/components/VTimePicker/VTimePickerClock.js.map +1 -1
- package/es5/components/VTimePicker/VTimePickerTitle.js +13 -11
- package/es5/components/VTimePicker/VTimePickerTitle.js.map +1 -1
- package/es5/components/VToolbar/VToolbar.js +1 -3
- package/es5/components/VToolbar/VToolbar.js.map +1 -1
- package/es5/components/VTooltip/VTooltip.js +9 -4
- package/es5/components/VTooltip/VTooltip.js.map +1 -1
- package/es5/components/VTreeview/VTreeviewNode.js +11 -3
- package/es5/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/es5/components/VVirtualScroll/VVirtualScroll.js +0 -3
- package/es5/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/es5/components/VWindow/VWindow.js +0 -3
- package/es5/components/VWindow/VWindow.js.map +1 -1
- package/es5/components/VWindow/VWindowItem.js +1 -5
- package/es5/components/VWindow/VWindowItem.js.map +1 -1
- package/es5/components/transitions/createTransition.js +8 -2
- package/es5/components/transitions/createTransition.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/mixins/detachable/index.js +9 -5
- package/es5/mixins/detachable/index.js.map +1 -1
- package/es5/mixins/picker/index.js +13 -3
- package/es5/mixins/picker/index.js.map +1 -1
- package/lib/components/VAlert/VAlert.js +1 -0
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VAppBar/VAppBar.js +17 -6
- package/lib/components/VAppBar/VAppBar.js.map +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.js +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.js.map +1 -1
- package/lib/components/VBadge/VBadge.js +1 -0
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VBanner/VBanner.js +9 -13
- package/lib/components/VBanner/VBanner.js.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.js +8 -7
- package/lib/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js +2 -2
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
- package/lib/components/VBtn/VBtn.js +4 -2
- package/lib/components/VBtn/VBtn.js.map +1 -1
- package/lib/components/VCalendar/VCalendar.js +26 -31
- package/lib/components/VCalendar/VCalendar.js.map +1 -1
- package/lib/components/VCalendar/VCalendarCategory.js +8 -10
- package/lib/components/VCalendar/VCalendarCategory.js.map +1 -1
- package/lib/components/VCalendar/VCalendarDaily.js +21 -33
- package/lib/components/VCalendar/VCalendarDaily.js.map +1 -1
- package/lib/components/VCalendar/VCalendarMonthly.js +2 -2
- package/lib/components/VCalendar/VCalendarMonthly.js.map +1 -1
- package/lib/components/VCalendar/VCalendarWeekly.js +17 -30
- package/lib/components/VCalendar/VCalendarWeekly.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-base.js +7 -11
- package/lib/components/VCalendar/mixins/calendar-base.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.js +16 -39
- package/lib/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-intervals.js +2 -2
- package/lib/components/VCalendar/mixins/calendar-with-intervals.js.map +1 -1
- package/lib/components/VCalendar/mixins/times.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.js +15 -14
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCarousel/VCarouselItem.js +1 -1
- package/lib/components/VCarousel/VCarouselItem.js.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.js +15 -2
- package/lib/components/VCheckbox/VCheckbox.js.map +1 -1
- package/lib/components/VCheckbox/VSimpleCheckbox.js +0 -3
- package/lib/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/lib/components/VChip/VChip.js +14 -6
- package/lib/components/VChip/VChip.js.map +1 -1
- package/lib/components/VData/VData.js +1 -0
- package/lib/components/VData/VData.js.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.js +2 -1
- package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.js +1 -0
- package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.js +7 -12
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeader.js +3 -6
- package/lib/components/VDataTable/VDataTableHeader.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js +1 -0
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderMobile.js +1 -0
- package/lib/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/lib/components/VDataTable/VEditDialog.js +16 -15
- package/lib/components/VDataTable/VEditDialog.js.map +1 -1
- package/lib/components/VDataTable/mixins/header.js +1 -6
- package/lib/components/VDataTable/mixins/header.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +11 -16
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js +33 -20
- package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonthTable.js +3 -1
- package/lib/components/VDatePicker/VDatePickerMonthTable.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerTitle.js +6 -5
- package/lib/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.js +8 -9
- package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.js +18 -14
- package/lib/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.js +4 -0
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.js.map +1 -1
- package/lib/components/VDialog/VDialog.js +3 -2
- package/lib/components/VDialog/VDialog.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.js +1 -0
- package/lib/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelContent.js +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js +3 -6
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/lib/components/VFileInput/VFileInput.js +1 -0
- package/lib/components/VFileInput/VFileInput.js.map +1 -1
- package/lib/components/VForm/VForm.js +1 -0
- package/lib/components/VForm/VForm.js.map +1 -1
- package/lib/components/VHover/VHover.js +1 -0
- package/lib/components/VHover/VHover.js.map +1 -1
- package/lib/components/VImg/VImg.js +4 -8
- package/lib/components/VImg/VImg.js.map +1 -1
- package/lib/components/VInput/VInput.js +3 -2
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VItemGroup/VItem.js +2 -1
- package/lib/components/VItemGroup/VItem.js.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.js +6 -1
- package/lib/components/VItemGroup/VItemGroup.js.map +1 -1
- package/lib/components/VLazy/VLazy.js +8 -15
- package/lib/components/VLazy/VLazy.js.map +1 -1
- package/lib/components/VList/VListGroup.js +8 -10
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.js +28 -15
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VList/VListItemAction.js +15 -9
- package/lib/components/VList/VListItemAction.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +1 -0
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VMessages/VMessages.js +1 -1
- package/lib/components/VMessages/VMessages.js.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js +1 -6
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +2 -6
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js +2 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/lib/components/VOverlay/VOverlay.js +1 -0
- package/lib/components/VOverlay/VOverlay.js.map +1 -1
- package/lib/components/VPagination/VPagination.js +2 -4
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VPicker/VPicker.js +4 -4
- package/lib/components/VPicker/VPicker.js.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.js +1 -4
- package/lib/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.js +4 -6
- package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/lib/components/VRadioGroup/VRadio.js +3 -2
- package/lib/components/VRadioGroup/VRadio.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +66 -21
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +15 -17
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +4 -7
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideItem.js +2 -1
- package/lib/components/VSlideGroup/VSlideItem.js.map +1 -1
- package/lib/components/VSlider/VSlider.js +1 -4
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.js +1 -0
- package/lib/components/VSnackbar/VSnackbar.js.map +1 -1
- package/lib/components/VSparkline/VSparkline.js +48 -67
- package/lib/components/VSparkline/VSparkline.js.map +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.js +3 -9
- package/lib/components/VSpeedDial/VSpeedDial.js.map +1 -1
- package/lib/components/VStepper/VStepper.js +1 -0
- package/lib/components/VStepper/VStepper.js.map +1 -1
- package/lib/components/VStepper/VStepperContent.js +1 -1
- package/lib/components/VStepper/VStepperContent.js.map +1 -1
- package/lib/components/VStepper/VStepperStep.js +7 -18
- package/lib/components/VStepper/VStepperStep.js.map +1 -1
- package/lib/components/VSwitch/VSwitch.js +2 -4
- package/lib/components/VSwitch/VSwitch.js.map +1 -1
- package/lib/components/VTabs/VTab.js +1 -0
- package/lib/components/VTabs/VTab.js.map +1 -1
- package/lib/components/VTabs/VTabs.js +16 -6
- package/lib/components/VTabs/VTabs.js.map +1 -1
- package/lib/components/VTabs/VTabsItems.js +1 -0
- package/lib/components/VTabs/VTabsItems.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +7 -16
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTimePicker/VTimePicker.js +65 -31
- package/lib/components/VTimePicker/VTimePicker.js.map +1 -1
- package/lib/components/VTimePicker/VTimePickerClock.js +24 -39
- package/lib/components/VTimePicker/VTimePickerClock.js.map +1 -1
- package/lib/components/VTimePicker/VTimePickerTitle.js +3 -2
- package/lib/components/VTimePicker/VTimePickerTitle.js.map +1 -1
- package/lib/components/VToolbar/VToolbar.js +1 -3
- package/lib/components/VToolbar/VToolbar.js.map +1 -1
- package/lib/components/VTooltip/VTooltip.js +2 -3
- package/lib/components/VTooltip/VTooltip.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewNode.js +3 -3
- package/lib/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.js +0 -3
- package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/lib/components/VWindow/VWindow.js +0 -3
- package/lib/components/VWindow/VWindow.js.map +1 -1
- package/lib/components/VWindow/VWindowItem.js +2 -6
- package/lib/components/VWindow/VWindowItem.js.map +1 -1
- package/lib/components/transitions/createTransition.js +2 -2
- package/lib/components/transitions/createTransition.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/mixins/detachable/index.js +9 -5
- package/lib/mixins/detachable/index.js.map +1 -1
- package/lib/mixins/picker/index.js +5 -3
- package/lib/mixins/picker/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VAlert/VAlert.ts +2 -0
- package/src/components/VAppBar/VAppBar.ts +12 -3
- package/src/components/VAppBar/VAppBarNavIcon.ts +1 -1
- package/src/components/VBadge/VBadge.ts +1 -1
- package/src/components/VBanner/VBanner.ts +17 -17
- package/src/components/VBottomNavigation/VBottomNavigation.ts +10 -8
- package/src/components/VBreadcrumbs/VBreadcrumbs.ts +2 -2
- package/src/components/VBtn/VBtn.ts +8 -2
- package/src/components/VCalendar/VCalendar.ts +29 -27
- package/src/components/VCalendar/VCalendarCategory.ts +9 -8
- package/src/components/VCalendar/VCalendarDaily.ts +18 -28
- package/src/components/VCalendar/VCalendarMonthly.ts +2 -1
- package/src/components/VCalendar/VCalendarWeekly.ts +18 -30
- package/src/components/VCalendar/__tests__/VCalendar.spec.ts +18 -34
- package/src/components/VCalendar/__tests__/VCalendarCategory.spec.ts +16 -14
- package/src/components/VCalendar/__tests__/VCalendarDaily.spec.ts +30 -28
- package/src/components/VCalendar/__tests__/__snapshots__/VCalendar.spec.ts.snap +206 -205
- package/src/components/VCalendar/__tests__/__snapshots__/VCalendarDaily.spec.ts.snap +122 -122
- package/src/components/VCalendar/mixins/__tests__/__snapshots__/calendar-with-events.spec.ts.snap +1 -56
- package/src/components/VCalendar/mixins/__tests__/calendar-base.spec.ts +24 -21
- package/src/components/VCalendar/mixins/__tests__/calendar-with-events.spec.ts +27 -34
- package/src/components/VCalendar/mixins/__tests__/calendar-with-intervals.spec.ts +31 -28
- package/src/components/VCalendar/mixins/__tests__/times.spec.ts +10 -9
- package/src/components/VCalendar/mixins/calendar-base.ts +8 -12
- package/src/components/VCalendar/mixins/calendar-with-events.ts +19 -38
- package/src/components/VCalendar/mixins/calendar-with-intervals.ts +1 -1
- package/src/components/VCalendar/mixins/times.ts +1 -1
- package/src/components/VCarousel/VCarousel.ts +16 -12
- package/src/components/VCarousel/VCarouselItem.ts +1 -1
- package/src/components/VCheckbox/VCheckbox.ts +20 -2
- package/src/components/VCheckbox/VSimpleCheckbox.ts +0 -3
- package/src/components/VChip/VChip.ts +16 -13
- package/src/components/VData/VData.ts +2 -0
- package/src/components/VDataIterator/VDataFooter.ts +3 -1
- package/src/components/VDataIterator/VDataIterator.ts +2 -0
- package/src/components/VDataTable/VDataTable.ts +7 -9
- package/src/components/VDataTable/VDataTableHeader.ts +2 -4
- package/src/components/VDataTable/VDataTableHeaderDesktop.ts +5 -0
- package/src/components/VDataTable/VDataTableHeaderMobile.ts +2 -0
- package/src/components/VDataTable/VEditDialog.ts +20 -18
- package/src/components/VDataTable/mixins/header.ts +1 -5
- package/src/components/VDatePicker/VDatePicker.ts +13 -18
- package/src/components/VDatePicker/VDatePickerHeader.ts +44 -32
- package/src/components/VDatePicker/VDatePickerMonthTable.ts +1 -1
- package/src/components/VDatePicker/VDatePickerTitle.ts +9 -7
- package/src/components/VDatePicker/VDatePickerYears.ts +6 -10
- package/src/components/VDatePicker/__tests__/VDatePicker.date.spec.ts +302 -246
- package/src/components/VDatePicker/__tests__/VDatePicker.month.spec.ts +90 -86
- package/src/components/VDatePicker/__tests__/VDatePickerDateTable.spec.ts +76 -90
- package/src/components/VDatePicker/__tests__/VDatePickerHeader.spec.ts +96 -71
- package/src/components/VDatePicker/__tests__/VDatePickerMonthTable.spec.ts +63 -77
- package/src/components/VDatePicker/__tests__/VDatePickerTitle.spec.ts +48 -28
- package/src/components/VDatePicker/__tests__/VDatePickerYears.spec.ts +25 -22
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.date.spec.ts.snap +601 -586
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.month.spec.ts.snap +203 -193
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerDateTable.spec.ts.snap +615 -615
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerHeader.spec.ts.snap +52 -52
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerMonthTable.spec.ts.snap +144 -144
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerTitle.spec.ts.snap +3 -4
- package/src/components/VDatePicker/mixins/date-picker-table.ts +19 -14
- package/src/components/VDatePicker/util/__tests__/createNativeLocaleFormatter.spec.ts +7 -0
- package/src/components/VDatePicker/util/createNativeLocaleFormatter.ts +3 -0
- package/src/components/VDialog/VDialog.ts +9 -7
- package/src/components/VExpansionPanel/VExpansionPanel.ts +5 -0
- package/src/components/VExpansionPanel/VExpansionPanelContent.ts +1 -1
- package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +2 -3
- package/src/components/VFileInput/VFileInput.ts +2 -0
- package/src/components/VForm/VForm.ts +2 -0
- package/src/components/VHover/VHover.ts +2 -0
- package/src/components/VImg/VImg.ts +4 -3
- package/src/components/VInput/VInput.ts +4 -2
- package/src/components/VItemGroup/VItem.ts +4 -0
- package/src/components/VItemGroup/VItemGroup.ts +7 -1
- package/src/components/VLazy/VLazy.ts +11 -13
- package/src/components/VList/VListGroup.ts +12 -13
- package/src/components/VList/VListItem.ts +36 -19
- package/src/components/VList/VListItemAction.ts +11 -10
- package/src/components/VMenu/VMenu.ts +3 -1
- package/src/components/VMessages/VMessages.ts +1 -1
- package/src/components/VNavigationDrawer/VNavigationDrawer.ts +2 -5
- package/src/components/VOtpInput/VOtpInput.ts +2 -3
- package/src/components/VOverflowBtn/VOverflowBtn.ts +3 -1
- package/src/components/VOverlay/VOverlay.ts +2 -0
- package/src/components/VPagination/VPagination.ts +3 -2
- package/src/components/VPicker/VPicker.ts +9 -11
- package/src/components/VPicker/__tests__/VPicker.spec.ts +14 -15
- package/src/components/VProgressCircular/VProgressCircular.ts +0 -1
- package/src/components/VProgressLinear/VProgressLinear.ts +14 -13
- package/src/components/VRadioGroup/VRadio.ts +4 -2
- package/src/components/VSelect/VSelect.ts +61 -21
- package/src/components/VSelect/VSelectList.ts +16 -12
- package/src/components/VSlideGroup/VSlideGroup.ts +5 -7
- package/src/components/VSlideGroup/VSlideItem.ts +2 -0
- package/src/components/VSlider/VSlider.ts +1 -4
- package/src/components/VSnackbar/VSnackbar.ts +1 -1
- package/src/components/VSparkline/VSparkline.ts +54 -92
- package/src/components/VSpeedDial/VSpeedDial.ts +6 -8
- package/src/components/VStepper/VStepper.ts +3 -1
- package/src/components/VStepper/VStepperContent.ts +1 -1
- package/src/components/VStepper/VStepperStep.ts +8 -15
- package/src/components/VSwitch/VSwitch.ts +5 -6
- package/src/components/VTabs/VTab.ts +2 -0
- package/src/components/VTabs/VTabs.ts +18 -12
- package/src/components/VTabs/VTabsItems.ts +2 -0
- package/src/components/VTextField/VTextField.ts +10 -13
- package/src/components/VTimePicker/VTimePicker.ts +199 -89
- package/src/components/VTimePicker/VTimePickerClock.ts +40 -45
- package/src/components/VTimePicker/VTimePickerTitle.ts +5 -4
- package/src/components/VTimePicker/__tests__/VTimePicker.spec.ts +153 -140
- package/src/components/VTimePicker/__tests__/VTimePickerClock.spec.ts +78 -81
- package/src/components/VTimePicker/__tests__/VTimePickerTitle.spec.ts +47 -41
- package/src/components/VTimePicker/__tests__/__snapshots__/VTimePicker.spec.ts.snap +160 -40
- package/src/components/VToolbar/VToolbar.ts +1 -1
- package/src/components/VTooltip/VTooltip.ts +2 -2
- package/src/components/VTreeview/VTreeviewNode.ts +3 -3
- package/src/components/VVirtualScroll/VVirtualScroll.ts +0 -1
- package/src/components/VWindow/VWindow.ts +0 -1
- package/src/components/VWindow/VWindowItem.ts +2 -3
- package/src/components/transitions/createTransition.ts +2 -2
- package/src/mixins/detachable/index.ts +11 -5
- 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
|
-
|
|
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 =
|
|
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
|
|
131
|
-
|
|
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
|
|
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 =
|
|
147
|
-
|
|
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
|
|
164
|
-
|
|
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
|
|
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
|
-
|
|
208
|
+
modelValue: {
|
|
209
|
+
handler: 'setInputData',
|
|
210
|
+
immediate: false
|
|
211
|
+
},
|
|
185
212
|
},
|
|
186
213
|
|
|
187
214
|
mounted () {
|
|
188
|
-
this.setInputData(this.
|
|
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 (
|
|
195
|
-
|
|
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('
|
|
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
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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 =
|
|
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 (
|
|
339
|
+
if (
|
|
340
|
+
this.inputHour === this.lazyInputHour &&
|
|
273
341
|
this.inputMinute === this.lazyInputMinute &&
|
|
274
342
|
(!this.useSeconds || this.inputSecond === this.lazyInputSecond)
|
|
275
|
-
)
|
|
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 =
|
|
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 =
|
|
292
|
-
|
|
293
|
-
: (type === 'second'
|
|
366
|
+
const range =
|
|
367
|
+
type === 'minute'
|
|
294
368
|
? range60
|
|
295
|
-
:
|
|
296
|
-
?
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
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
|
-
:
|
|
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:
|
|
316
|
-
|
|
317
|
-
|
|
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:
|
|
320
|
-
|
|
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:
|
|
414
|
+
size:
|
|
415
|
+
Number(this.width) - (!this.fullWidth && this.landscape ? 80 : 20),
|
|
324
416
|
step: this.selecting === SelectingTimes.Hour ? 1 : 5,
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
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(
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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(
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
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
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
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
|
-
|
|
367
|
-
'update:
|
|
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
|
|
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
|
-
}
|
|
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
|
-
|
|
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.
|
|
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.
|
|
125
|
+
const color = value === this.modelValue && (this.color || 'accent')
|
|
134
126
|
children.push(h('span', this.setBackgroundColor(color, {
|
|
135
|
-
class:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
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.
|
|
144
|
+
const color = (this.modelValue != null) && (this.color || 'accent')
|
|
151
145
|
return h('div', this.setBackgroundColor(color, {
|
|
152
|
-
class:
|
|
153
|
-
|
|
154
|
-
|
|
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.
|
|
234
|
-
this
|
|
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:
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
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 &&
|
|
270
|
-
data.
|
|
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
|
|
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
|
}, [
|