@dimailn/vuetify 2.7.2-alpha26 → 2.7.2-alpha28
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 +1185 -1041
- 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 -1
- 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/VBadge/VBadge.js +1 -0
- package/es5/components/VBadge/VBadge.js.map +1 -1
- package/es5/components/VBanner/VBanner.js +11 -12
- 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/VBtn/VBtn.js +2 -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 +10 -9
- package/es5/components/VCarousel/VCarousel.js.map +1 -1
- package/es5/components/VCheckbox/VCheckbox.js +31 -2
- 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 +15 -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 +1 -0
- 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 +1 -6
- package/es5/components/VDataTable/VDataTable.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 +19 -18
- package/es5/components/VDataTable/VEditDialog.js.map +1 -1
- package/es5/components/VDataTable/mixins/header.js +0 -6
- 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 +48 -26
- 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 +4 -3
- 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 +16 -13
- 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 +1 -0
- 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/VExpansionPanelHeader.js +1 -10
- 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 +3 -5
- package/es5/components/VImg/VImg.js.map +1 -1
- package/es5/components/VInput/VInput.js +1 -0
- 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 +3 -11
- package/es5/components/VList/VListGroup.js.map +1 -1
- package/es5/components/VList/VListItem.js +30 -14
- 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 +2 -1
- package/es5/components/VMenu/VMenu.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 +37 -5
- package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js +1 -0
- 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 +1 -3
- package/es5/components/VPagination/VPagination.js.map +1 -1
- package/es5/components/VPicker/VPicker.js +2 -3
- 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 +1 -0
- package/es5/components/VRadioGroup/VRadio.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +111 -64
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +28 -19
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideGroup.js +1 -4
- 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 +0 -3
- 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/VStepperStep.js +11 -19
- package/es5/components/VStepper/VStepperStep.js.map +1 -1
- package/es5/components/VSwitch/VSwitch.js +1 -3
- 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 +11 -4
- 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 +31 -27
- 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 -6
- package/es5/components/VTooltip/VTooltip.js.map +1 -1
- package/es5/components/VTreeview/VTreeview.js +0 -7
- package/es5/components/VTreeview/VTreeview.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/framework.js +1 -1
- package/es5/mixins/detachable/index.js +9 -5
- package/es5/mixins/detachable/index.js.map +1 -1
- package/es5/mixins/routable/index.js +5 -2
- package/es5/mixins/routable/index.js.map +1 -1
- package/lib/components/VAlert/VAlert.js +1 -1
- 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/VBadge/VBadge.js +1 -0
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VBanner/VBanner.js +7 -11
- 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/VBtn/VBtn.js +2 -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 +12 -11
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.js +14 -1
- 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 +15 -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 +1 -0
- 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 +2 -7
- package/lib/components/VDataTable/VDataTable.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 +15 -14
- package/lib/components/VDataTable/VEditDialog.js.map +1 -1
- package/lib/components/VDataTable/mixins/header.js +0 -5
- 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 +4 -3
- 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 +17 -13
- 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 +1 -0
- 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/VExpansionPanelHeader.js +1 -4
- 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 +2 -6
- package/lib/components/VImg/VImg.js.map +1 -1
- package/lib/components/VInput/VInput.js +1 -0
- 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 +3 -5
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.js +29 -16
- 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 +2 -1
- package/lib/components/VMenu/VMenu.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 +50 -6
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js +1 -0
- 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 +1 -3
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VPicker/VPicker.js +3 -3
- 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 +1 -0
- package/lib/components/VRadioGroup/VRadio.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +64 -19
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +24 -20
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +1 -4
- 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 +0 -3
- 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/VStepperStep.js +7 -18
- package/lib/components/VStepper/VStepperStep.js.map +1 -1
- package/lib/components/VSwitch/VSwitch.js +1 -3
- 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 +14 -4
- 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 +6 -15
- 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 +4 -5
- package/lib/components/VTooltip/VTooltip.js.map +1 -1
- package/lib/components/VTreeview/VTreeview.js +0 -6
- package/lib/components/VTreeview/VTreeview.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/framework.js +1 -1
- package/lib/mixins/detachable/index.js +9 -5
- package/lib/mixins/detachable/index.js.map +1 -1
- package/lib/mixins/routable/index.js +5 -2
- package/lib/mixins/routable/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VAlert/VAlert.ts +2 -1
- package/src/components/VApp/__tests__/VApp.spec.ts +24 -18
- package/src/components/VApp/__tests__/__snapshots__/VApp.spec.ts.snap +4 -4
- package/src/components/VAppBar/VAppBar.ts +12 -3
- package/src/components/VAppBar/__tests__/VAppBar.spec.ts +256 -74
- package/src/components/VAppBar/__tests__/VAppBarNavIcon.spec.ts +2 -6
- package/src/components/VAppBar/__tests__/__snapshots__/VAppBar.spec.ts.snap +13 -4
- package/src/components/VAppBar/__tests__/__snapshots__/VAppBarNavIcon.spec.ts.snap +3 -4
- package/src/components/VBadge/VBadge.ts +1 -1
- package/src/components/VBanner/VBanner.ts +14 -14
- package/src/components/VBanner/__tests__/VBanner.spec.ts +35 -36
- package/src/components/VBanner/__tests__/__snapshots__/VBanner.spec.ts.snap +1 -1
- package/src/components/VBottomNavigation/VBottomNavigation.ts +10 -8
- package/src/components/VBtn/VBtn.ts +2 -2
- package/src/components/VBtn/__tests__/VBtn.spec.ts +1 -1
- 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/VCard/__tests__/VCard.spec.ts +46 -28
- package/src/components/VCard/__tests__/__snapshots__/VCard.spec.ts.snap +2 -2
- package/src/components/VCarousel/VCarousel.ts +13 -9
- package/src/components/VCheckbox/VCheckbox.ts +19 -1
- package/src/components/VCheckbox/VSimpleCheckbox.ts +0 -3
- package/src/components/VCheckbox/__tests__/VCheckbox.spec.ts +157 -152
- package/src/components/VChip/VChip.ts +17 -13
- package/src/components/VChip/__tests__/VChip.spec.ts +50 -50
- package/src/components/VChip/__tests__/__snapshots__/VChip.spec.ts.snap +4 -4
- package/src/components/VChipGroup/__tests__/VChipGroup.spec.ts +14 -21
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +35 -35
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +10 -10
- package/src/components/VData/VData.ts +2 -0
- package/src/components/VData/__tests__/VData.spec.ts +69 -90
- package/src/components/VDataIterator/VDataFooter.ts +2 -0
- package/src/components/VDataIterator/VDataIterator.ts +2 -0
- package/src/components/VDataTable/VDataTable.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 +19 -17
- package/src/components/VDataTable/__tests__/MobileRow.spec.ts +55 -66
- package/src/components/VDataTable/__tests__/Row.spec.ts +64 -73
- package/src/components/VDataTable/__tests__/RowGroup.spec.ts +7 -5
- package/src/components/VDataTable/__tests__/VDataTable.spec.ts +910 -988
- package/src/components/VDataTable/__tests__/VEditDialog.spec.ts +26 -22
- package/src/components/VDataTable/__tests__/VSimpleTable.spec.ts +60 -29
- package/src/components/VDataTable/__tests__/VVirtualTable.spec.ts +13 -15
- package/src/components/VDataTable/__tests__/__snapshots__/Row.spec.ts.snap +30 -0
- package/src/components/VDataTable/__tests__/__snapshots__/VEditDialog.spec.ts.snap +18 -10
- package/src/components/VDataTable/mixins/__tests__/__snapshots__/header.spec.ts.snap +1 -1
- package/src/components/VDataTable/mixins/header.ts +0 -4
- 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 +7 -5
- 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 +18 -13
- 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 +7 -5
- package/src/components/VDivider/__tests__/VDivider.spec.ts +11 -15
- package/src/components/VDivider/__tests__/__snapshots__/VDivider.spec.ts.snap +2 -2
- package/src/components/VExpansionPanel/VExpansionPanel.ts +5 -0
- package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +0 -1
- package/src/components/VFileInput/VFileInput.ts +2 -0
- package/src/components/VForm/VForm.ts +2 -0
- package/src/components/VGrid/__tests__/VCol.spec.ts +17 -17
- package/src/components/VGrid/__tests__/VContainer.spec.ts +58 -3
- package/src/components/VGrid/__tests__/VFlex.spec.ts +3 -3
- package/src/components/VGrid/__tests__/VGrid.spec.ts +12 -10
- package/src/components/VGrid/__tests__/VLayout.spec.ts +3 -3
- package/src/components/VHover/VHover.ts +2 -0
- package/src/components/VIcon/__tests__/VIcon.spec.ts +176 -70
- package/src/components/VImg/VImg.ts +2 -1
- package/src/components/VImg/__tests__/__snapshots__/VImg.spec.ts.snap +55 -55
- package/src/components/VInput/VInput.ts +2 -0
- package/src/components/VItemGroup/VItem.ts +4 -0
- package/src/components/VItemGroup/VItemGroup.ts +7 -1
- package/src/components/VItemGroup/__tests__/VItem.spec.ts +22 -37
- package/src/components/VItemGroup/__tests__/VItemGroup.spec.ts +96 -124
- package/src/components/VItemGroup/__tests__/__snapshots__/VItem.spec.ts.snap +2 -0
- package/src/components/VLabel/__tests__/VLabel.spec.ts +240 -14
- package/src/components/VLazy/VLazy.ts +11 -13
- package/src/components/VLazy/__tests__/VLazy.spec.ts +5 -4
- package/src/components/VLazy/__tests__/__snapshots__/VLazy.spec.ts.snap +2 -1
- package/src/components/VList/VListGroup.ts +7 -8
- package/src/components/VList/VListItem.ts +38 -18
- package/src/components/VList/VListItemAction.ts +11 -10
- package/src/components/VList/__tests__/VList.spec.ts +13 -12
- package/src/components/VList/__tests__/VListGroup.spec.ts +59 -51
- package/src/components/VList/__tests__/VListItem.spec.ts +142 -63
- package/src/components/VList/__tests__/VListItemAvatar.spec.ts +5 -2
- package/src/components/VList/__tests__/VListItemGroup.spec.ts +5 -2
- package/src/components/VList/__tests__/__snapshots__/VList.spec.ts.snap +10 -10
- package/src/components/VList/__tests__/__snapshots__/VListGroup.spec.ts.snap +5 -6
- package/src/components/VList/__tests__/__snapshots__/VListItem.spec.ts.snap +1 -1
- package/src/components/VMain/__tests__/VMain.spec.ts +71 -17
- package/src/components/VMenu/VMenu.ts +4 -2
- package/src/components/VMessages/__tests__/VMessages.spec.ts +14 -13
- package/src/components/VNavigationDrawer/VNavigationDrawer.ts +2 -5
- package/src/components/VOtpInput/VOtpInput.ts +39 -4
- package/src/components/VOverflowBtn/VOverflowBtn.ts +2 -0
- package/src/components/VOverlay/VOverlay.ts +2 -0
- package/src/components/VPagination/VPagination.ts +2 -1
- package/src/components/VParallax/__tests__/__snapshots__/VParallax.spec.ts.snap +8 -8
- package/src/components/VPicker/VPicker.ts +8 -10
- package/src/components/VPicker/__tests__/VPicker.spec.ts +14 -15
- package/src/components/VPicker/__tests__/__snapshots__/VPicker.spec.ts.snap +2 -2
- package/src/components/VProgressCircular/VProgressCircular.ts +0 -1
- package/src/components/VProgressLinear/VProgressLinear.ts +14 -13
- package/src/components/VRadioGroup/VRadio.ts +2 -0
- package/src/components/VResponsive/__tests__/__snapshots__/VResponsive.spec.ts.snap +2 -2
- package/src/components/VSelect/VSelect.ts +59 -19
- package/src/components/VSelect/VSelectList.ts +20 -16
- package/src/components/VSelect/__tests__/VSelect.spec.ts +166 -125
- package/src/components/VSelect/__tests__/VSelect2.spec.ts +127 -111
- package/src/components/VSelect/__tests__/VSelect3.spec.ts +109 -91
- package/src/components/VSelect/__tests__/VSelect4.spec.ts +79 -68
- package/src/components/VSelect/__tests__/VSelectList.spec.ts +23 -31
- package/src/components/VSelect/__tests__/__snapshots__/VSelect.spec.ts.snap +58 -62
- package/src/components/VSelect/__tests__/__snapshots__/VSelect2.spec.ts.snap +50 -62
- package/src/components/VSelect/__tests__/__snapshots__/VSelect3.spec.ts.snap +10 -14
- package/src/components/VSlideGroup/VSlideGroup.ts +2 -4
- package/src/components/VSlideGroup/VSlideItem.ts +2 -0
- package/src/components/VSlider/VSlider.ts +0 -3
- package/src/components/VSnackbar/VSnackbar.ts +1 -1
- package/src/components/VSparkline/VSparkline.ts +54 -92
- package/src/components/VSparkline/__tests__/VSparkline.spec.ts +33 -35
- package/src/components/VSpeedDial/VSpeedDial.ts +6 -8
- package/src/components/VStepper/VStepper.ts +3 -1
- package/src/components/VStepper/VStepperStep.ts +8 -15
- package/src/components/VStepper/__tests__/VStepper.spec.ts +4 -1
- package/src/components/VStepper/__tests__/VStepperContent.spec.ts +104 -110
- package/src/components/VStepper/__tests__/VStepperStep.spec.ts +51 -44
- package/src/components/VSwitch/VSwitch.ts +4 -5
- package/src/components/VSwitch/__tests__/VSwitch.spec.ts +30 -37
- package/src/components/VTabs/VTab.ts +2 -0
- package/src/components/VTabs/VTabs.ts +16 -10
- package/src/components/VTabs/VTabsItems.ts +2 -0
- package/src/components/VTabs/__tests__/VTabs.spec.ts +0 -7
- package/src/components/VTextField/VTextField.ts +9 -12
- package/src/components/VTextField/__tests__/VTextField.spec.ts +342 -246
- package/src/components/VTextarea/__tests__/VTextarea.spec.ts +112 -35
- 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 +120 -40
- package/src/components/VToolbar/VToolbar.ts +1 -1
- package/src/components/VToolbar/__tests__/VToolbar.spec.ts +49 -25
- package/src/components/VTooltip/VTooltip.ts +4 -4
- package/src/components/VTooltip/__tests__/__snapshots__/VTooltip.spec.ts.snap +34 -18
- package/src/components/VTreeview/VTreeview.ts +0 -5
- 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/mixins/detachable/index.ts +11 -5
- package/src/mixins/routable/index.ts +6 -4
|
@@ -1,93 +1,85 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mount,
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
VueWrapper,
|
|
4
|
+
enableAutoUnmount,
|
|
5
5
|
} from '@vue/test-utils'
|
|
6
6
|
import VCheckbox from '../VCheckbox'
|
|
7
7
|
|
|
8
8
|
describe('VCheckbox.ts', () => { // eslint-disable-line max-statements
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
let mountFunction: (options?: any) => VueWrapper<any>
|
|
10
|
+
|
|
11
|
+
enableAutoUnmount(afterEach)
|
|
12
|
+
|
|
11
13
|
beforeEach(() => {
|
|
12
|
-
mountFunction = (options?:
|
|
14
|
+
mountFunction = (options?: any) => {
|
|
13
15
|
return mount(VCheckbox, options)
|
|
14
16
|
}
|
|
15
17
|
})
|
|
16
18
|
|
|
17
|
-
it('should return true when clicked', () => {
|
|
19
|
+
it('should return true when clicked', async () => {
|
|
18
20
|
const wrapper = mountFunction({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
21
|
+
props: {
|
|
22
|
+
modelValue: false,
|
|
23
|
+
} as any,
|
|
22
24
|
})
|
|
23
25
|
|
|
24
26
|
const input = wrapper.find('input')
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
wrapper.
|
|
28
|
-
|
|
29
|
-
input.trigger('click')
|
|
30
|
-
expect(change).toHaveBeenCalledTimes(1)
|
|
31
|
-
expect(change).toHaveBeenCalledWith(true)
|
|
28
|
+
await input.trigger('click')
|
|
29
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
30
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual([true])
|
|
32
31
|
})
|
|
33
32
|
|
|
34
|
-
it('should return a value when toggled on with a specified value', () => {
|
|
33
|
+
it('should return a value when toggled on with a specified value', async () => {
|
|
35
34
|
const wrapper = mountFunction({
|
|
36
|
-
|
|
35
|
+
props: {
|
|
37
36
|
value: 'John',
|
|
38
|
-
|
|
39
|
-
},
|
|
37
|
+
modelValue: null,
|
|
38
|
+
} as any,
|
|
40
39
|
})
|
|
41
40
|
|
|
42
41
|
const input = wrapper.find('input')
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
wrapper.
|
|
46
|
-
|
|
47
|
-
input.trigger('click')
|
|
48
|
-
expect(change).toHaveBeenCalledWith('John')
|
|
43
|
+
await input.trigger('click')
|
|
44
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
45
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual(['John'])
|
|
49
46
|
})
|
|
50
47
|
|
|
51
|
-
it('should return null when toggled off with a specified value', () => {
|
|
48
|
+
it('should return null when toggled off with a specified value', async () => {
|
|
52
49
|
const wrapper = mountFunction({
|
|
53
|
-
|
|
50
|
+
props: {
|
|
54
51
|
value: 'John',
|
|
55
|
-
|
|
56
|
-
},
|
|
52
|
+
modelValue: 'John',
|
|
53
|
+
} as any,
|
|
57
54
|
})
|
|
58
55
|
|
|
59
56
|
const ripple = wrapper.find('input')
|
|
60
57
|
|
|
61
|
-
|
|
62
|
-
wrapper.
|
|
63
|
-
|
|
64
|
-
ripple.trigger('click')
|
|
65
|
-
expect(change).toHaveBeenCalledWith(null)
|
|
58
|
+
await ripple.trigger('click')
|
|
59
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
60
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual([null])
|
|
66
61
|
})
|
|
67
62
|
|
|
68
|
-
it('should toggle when label is clicked', () => {
|
|
63
|
+
it('should toggle when label is clicked', async () => {
|
|
69
64
|
const wrapper = mountFunction({
|
|
70
|
-
|
|
65
|
+
props: {
|
|
71
66
|
label: 'Label',
|
|
72
67
|
value: null,
|
|
73
|
-
},
|
|
68
|
+
} as any,
|
|
74
69
|
attrs: {},
|
|
75
70
|
})
|
|
76
71
|
|
|
77
72
|
const label = wrapper.find('label')
|
|
78
73
|
|
|
79
|
-
|
|
80
|
-
wrapper.
|
|
81
|
-
|
|
82
|
-
label.trigger('click')
|
|
83
|
-
expect(change).toHaveBeenCalled()
|
|
74
|
+
await label.trigger('click')
|
|
75
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
84
76
|
})
|
|
85
77
|
|
|
86
78
|
it('should render role and aria-checked attributes on input group', async () => {
|
|
87
79
|
const wrapper = mountFunction({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
},
|
|
80
|
+
props: {
|
|
81
|
+
modelValue: false,
|
|
82
|
+
} as any,
|
|
91
83
|
})
|
|
92
84
|
|
|
93
85
|
const input = wrapper.find('input')
|
|
@@ -95,41 +87,41 @@ describe('VCheckbox.ts', () => { // eslint-disable-line max-statements
|
|
|
95
87
|
expect(input.element.getAttribute('role')).toBe('checkbox')
|
|
96
88
|
expect(input.element.getAttribute('aria-checked')).toBe('false')
|
|
97
89
|
|
|
98
|
-
wrapper.setProps({
|
|
90
|
+
await wrapper.setProps({ modelValue: true } as any)
|
|
99
91
|
expect(input.element.getAttribute('aria-checked')).toBe('true')
|
|
100
92
|
|
|
101
|
-
wrapper.setProps({ indeterminate: true })
|
|
93
|
+
await wrapper.setProps({ indeterminate: true } as any)
|
|
102
94
|
await wrapper.vm.$nextTick()
|
|
103
95
|
expect(input.element.getAttribute('aria-checked')).toBe('mixed')
|
|
104
96
|
})
|
|
105
97
|
|
|
106
98
|
it('should toggle on keypress', async () => {
|
|
107
99
|
const wrapper = mountFunction({
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
},
|
|
100
|
+
props: {
|
|
101
|
+
modelValue: false,
|
|
102
|
+
} as any,
|
|
111
103
|
})
|
|
112
104
|
|
|
113
|
-
const change = jest.fn()
|
|
114
|
-
wrapper.vm.$on('change', change)
|
|
115
105
|
const input = wrapper.find('input')
|
|
116
106
|
|
|
117
|
-
input.trigger('focus')
|
|
107
|
+
await input.trigger('focus')
|
|
118
108
|
await wrapper.vm.$nextTick()
|
|
119
109
|
|
|
120
|
-
input.trigger('change')
|
|
110
|
+
await input.trigger('change')
|
|
121
111
|
await wrapper.vm.$nextTick()
|
|
122
|
-
input.trigger('change')
|
|
112
|
+
await input.trigger('change')
|
|
123
113
|
|
|
124
|
-
expect(
|
|
114
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
115
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual([true])
|
|
116
|
+
expect(wrapper.emitted('update:modelValue')![1]).toEqual([false])
|
|
125
117
|
})
|
|
126
118
|
|
|
127
|
-
it('should enable ripple', () => {
|
|
119
|
+
it('should enable ripple', async () => {
|
|
128
120
|
const wrapper = mountFunction({
|
|
129
|
-
|
|
130
|
-
|
|
121
|
+
props: {
|
|
122
|
+
modelValue: false,
|
|
131
123
|
disabled: false,
|
|
132
|
-
},
|
|
124
|
+
} as any,
|
|
133
125
|
})
|
|
134
126
|
|
|
135
127
|
const ripple = wrapper.find('.v-input--selection-controls__ripple')
|
|
@@ -137,29 +129,29 @@ describe('VCheckbox.ts', () => { // eslint-disable-line max-statements
|
|
|
137
129
|
expect((ripple.element as any)._ripple.enabled).toBeTruthy()
|
|
138
130
|
expect((ripple.element as any)._ripple.centered).toBeTruthy()
|
|
139
131
|
|
|
140
|
-
wrapper.setProps({ disabled: true })
|
|
132
|
+
await wrapper.setProps({ disabled: true } as any)
|
|
141
133
|
|
|
142
|
-
expect(wrapper.
|
|
134
|
+
expect(wrapper.find('.v-input--selection-controls__ripple').exists()).toBeTruthy()
|
|
143
135
|
})
|
|
144
136
|
|
|
145
137
|
it('should not render ripple when ripple prop is false', () => {
|
|
146
138
|
const wrapper = mountFunction({
|
|
147
|
-
|
|
148
|
-
|
|
139
|
+
props: {
|
|
140
|
+
modelValue: false,
|
|
149
141
|
ripple: false,
|
|
150
|
-
},
|
|
142
|
+
} as any,
|
|
151
143
|
})
|
|
152
144
|
|
|
153
145
|
const ripple = wrapper.findAll('.v-input--selection-controls__ripple')
|
|
154
146
|
|
|
155
|
-
expect(ripple
|
|
147
|
+
expect(ripple).toHaveLength(0)
|
|
156
148
|
})
|
|
157
149
|
|
|
158
150
|
it('should render ripple when ripple prop is true', () => {
|
|
159
151
|
const wrapper = mountFunction({
|
|
160
|
-
|
|
152
|
+
props: {
|
|
161
153
|
ripple: true,
|
|
162
|
-
},
|
|
154
|
+
} as any,
|
|
163
155
|
})
|
|
164
156
|
|
|
165
157
|
const ripple = wrapper.find('.v-input--selection-controls__ripple')
|
|
@@ -168,182 +160,167 @@ describe('VCheckbox.ts', () => { // eslint-disable-line max-statements
|
|
|
168
160
|
expect((ripple.element as any)._ripple.centered).toBeTruthy()
|
|
169
161
|
})
|
|
170
162
|
|
|
171
|
-
it('should return a value when toggled on with a specified object value', () => {
|
|
163
|
+
it('should return a value when toggled on with a specified object value', async () => {
|
|
172
164
|
const wrapper = mountFunction({
|
|
173
|
-
|
|
165
|
+
props: {
|
|
174
166
|
value: { x: 1, y: 2 },
|
|
175
|
-
|
|
176
|
-
},
|
|
167
|
+
modelValue: null,
|
|
168
|
+
} as any,
|
|
177
169
|
})
|
|
178
170
|
|
|
179
171
|
const ripple = wrapper.find('.v-input--selection-controls__ripple')
|
|
180
172
|
|
|
181
|
-
|
|
182
|
-
wrapper.
|
|
183
|
-
|
|
184
|
-
ripple.trigger('click')
|
|
185
|
-
expect(change).toHaveBeenCalledWith({ x: 1, y: 2 })
|
|
173
|
+
await ripple.trigger('click')
|
|
174
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
175
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual([{ x: 1, y: 2 }])
|
|
186
176
|
})
|
|
187
177
|
|
|
188
|
-
it('should return a value when toggled on with a specified array value', () => {
|
|
178
|
+
it('should return a value when toggled on with a specified array value', async () => {
|
|
189
179
|
const wrapper = mountFunction({
|
|
190
|
-
|
|
180
|
+
props: {
|
|
191
181
|
value: [1, '2', { x: 1, y: 2 }],
|
|
192
|
-
|
|
193
|
-
},
|
|
182
|
+
modelValue: null,
|
|
183
|
+
} as any,
|
|
194
184
|
})
|
|
195
185
|
|
|
196
186
|
const ripple = wrapper.find('.v-input--selection-controls__ripple')
|
|
197
187
|
|
|
198
|
-
|
|
199
|
-
wrapper.
|
|
200
|
-
|
|
201
|
-
ripple.trigger('click')
|
|
202
|
-
expect(change).toHaveBeenCalledWith([1, '2', { x: 1, y: 2 }])
|
|
188
|
+
await ripple.trigger('click')
|
|
189
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
190
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual([[1, '2', { x: 1, y: 2 }]])
|
|
203
191
|
})
|
|
204
192
|
|
|
205
|
-
it('should push value to array when toggled on and is multiple', () => {
|
|
193
|
+
it('should push value to array when toggled on and is multiple', async () => {
|
|
206
194
|
const wrapper = mountFunction({
|
|
207
|
-
|
|
195
|
+
props: {
|
|
208
196
|
value: 'John',
|
|
209
|
-
|
|
210
|
-
},
|
|
197
|
+
modelValue: [],
|
|
198
|
+
} as any,
|
|
211
199
|
})
|
|
212
200
|
|
|
213
201
|
const ripple = wrapper.find('.v-input--selection-controls__ripple')
|
|
214
202
|
|
|
215
|
-
|
|
216
|
-
wrapper.
|
|
217
|
-
|
|
218
|
-
ripple.trigger('click')
|
|
219
|
-
expect(change).toHaveBeenCalledWith(['John'])
|
|
203
|
+
await ripple.trigger('click')
|
|
204
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
205
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual([['John']])
|
|
220
206
|
})
|
|
221
207
|
|
|
222
|
-
it('should push array value to array when toggled on and is multiple', () => {
|
|
208
|
+
it('should push array value to array when toggled on and is multiple', async () => {
|
|
223
209
|
const wrapper = mountFunction({
|
|
224
|
-
|
|
210
|
+
props: {
|
|
225
211
|
value: [1, 2, { x: 1, y: 2 }],
|
|
226
|
-
|
|
227
|
-
},
|
|
212
|
+
modelValue: ['Existing'],
|
|
213
|
+
} as any,
|
|
228
214
|
})
|
|
229
215
|
|
|
230
216
|
const ripple = wrapper.find('.v-input--selection-controls__ripple')
|
|
231
217
|
|
|
232
|
-
|
|
233
|
-
wrapper.
|
|
234
|
-
|
|
235
|
-
ripple.trigger('click')
|
|
236
|
-
expect(change).toHaveBeenCalledWith(['Existing', [1, 2, { x: 1, y: 2 }]])
|
|
218
|
+
await ripple.trigger('click')
|
|
219
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
220
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual([['Existing', [1, 2, { x: 1, y: 2 }]]])
|
|
237
221
|
})
|
|
238
222
|
|
|
239
|
-
it('should return null when toggled off with a specified array value', () => {
|
|
223
|
+
it('should return null when toggled off with a specified array value', async () => {
|
|
240
224
|
const wrapper = mountFunction({
|
|
241
|
-
|
|
225
|
+
props: {
|
|
242
226
|
multiple: false, // must use multiple flag for array values
|
|
243
227
|
value: ['John'],
|
|
244
|
-
|
|
245
|
-
},
|
|
228
|
+
modelValue: ['John'],
|
|
229
|
+
} as any,
|
|
246
230
|
})
|
|
247
231
|
|
|
248
232
|
const ripple = wrapper.find('.v-input--selection-controls__ripple')
|
|
249
233
|
|
|
250
|
-
|
|
251
|
-
wrapper.
|
|
252
|
-
|
|
253
|
-
ripple.trigger('click')
|
|
254
|
-
expect(change).toHaveBeenCalledWith(null)
|
|
234
|
+
await ripple.trigger('click')
|
|
235
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
236
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual([null])
|
|
255
237
|
})
|
|
256
238
|
|
|
257
|
-
it('should remove value(s) from array when toggled off and multiple', () => {
|
|
239
|
+
it('should remove value(s) from array when toggled off and multiple', async () => {
|
|
258
240
|
const wrapper = mountFunction({
|
|
259
|
-
|
|
241
|
+
props: {
|
|
260
242
|
value: 1,
|
|
261
|
-
|
|
262
|
-
},
|
|
243
|
+
modelValue: [1, 2, 1, 3],
|
|
244
|
+
} as any,
|
|
263
245
|
})
|
|
264
246
|
|
|
265
247
|
const ripple = wrapper.find('.v-input--selection-controls__ripple')
|
|
266
248
|
|
|
267
|
-
|
|
268
|
-
wrapper.
|
|
269
|
-
|
|
270
|
-
ripple.trigger('click')
|
|
271
|
-
expect(change).toHaveBeenCalledWith([2, 3])
|
|
249
|
+
await ripple.trigger('click')
|
|
250
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
251
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual([[2, 3]])
|
|
272
252
|
})
|
|
273
253
|
|
|
274
|
-
it('should remove value(s) from array when toggled off and multiple - with objects', () => {
|
|
254
|
+
it('should remove value(s) from array when toggled off and multiple - with objects', async () => {
|
|
275
255
|
const wrapper = mountFunction({
|
|
276
|
-
|
|
256
|
+
props: {
|
|
277
257
|
value: { a: 1 },
|
|
278
|
-
|
|
279
|
-
},
|
|
258
|
+
modelValue: [{ a: 1 }, { b: 1 }, { a: 1 }, { c: 1 }],
|
|
259
|
+
} as any,
|
|
280
260
|
})
|
|
281
261
|
|
|
282
262
|
const ripple = wrapper.find('.v-input--selection-controls__ripple')
|
|
283
263
|
|
|
284
|
-
|
|
285
|
-
wrapper.
|
|
286
|
-
|
|
287
|
-
ripple.trigger('click')
|
|
288
|
-
expect(change).toHaveBeenCalledWith([{ b: 1 }, { c: 1 }])
|
|
264
|
+
await ripple.trigger('click')
|
|
265
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
266
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual([[{ b: 1 }, { c: 1 }]])
|
|
289
267
|
})
|
|
290
268
|
|
|
291
|
-
it('should work with custom true- and false-value', () => {
|
|
269
|
+
it('should work with custom true- and false-value', async () => {
|
|
292
270
|
const wrapper = mountFunction({
|
|
293
|
-
|
|
271
|
+
props: {
|
|
294
272
|
trueValue: 'on',
|
|
295
273
|
falseValue: 'off',
|
|
296
|
-
|
|
297
|
-
},
|
|
274
|
+
modelValue: null,
|
|
275
|
+
} as any,
|
|
298
276
|
})
|
|
299
277
|
|
|
300
278
|
const ripple = wrapper.find('.v-input--selection-controls__ripple')
|
|
301
279
|
|
|
302
|
-
|
|
303
|
-
wrapper.
|
|
304
|
-
|
|
305
|
-
ripple.trigger('click')
|
|
306
|
-
expect(change).toHaveBeenCalledWith('on')
|
|
280
|
+
await ripple.trigger('click')
|
|
281
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
282
|
+
expect(wrapper.emitted('update:modelValue')![0]).toEqual(['on'])
|
|
307
283
|
|
|
308
|
-
ripple.trigger('click')
|
|
309
|
-
expect(
|
|
284
|
+
await ripple.trigger('click')
|
|
285
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
286
|
+
expect(wrapper.emitted('update:modelValue')![1]).toEqual(['off'])
|
|
310
287
|
|
|
311
|
-
expect(
|
|
288
|
+
expect(wrapper.emitted('update:modelValue')).toHaveLength(2)
|
|
312
289
|
})
|
|
313
290
|
|
|
314
291
|
// https://github.com/vuetifyjs/vuetify/issues/2119
|
|
315
292
|
it('should put id on internal input', () => {
|
|
316
293
|
const wrapper = mountFunction({
|
|
317
|
-
|
|
294
|
+
props: { id: 'foo' } as any,
|
|
318
295
|
})
|
|
319
296
|
|
|
320
297
|
const input = wrapper.find('input')
|
|
321
298
|
expect(input.element.id).toBe('foo')
|
|
322
299
|
})
|
|
323
300
|
|
|
324
|
-
it('should use custom icons', () => {
|
|
301
|
+
it('should use custom icons', async () => {
|
|
325
302
|
const wrapper = mountFunction({
|
|
326
|
-
|
|
303
|
+
props: {
|
|
327
304
|
indeterminateIcon: 'fizzbuzz',
|
|
328
305
|
onIcon: 'foo',
|
|
329
306
|
offIcon: 'bar',
|
|
330
307
|
indeterminate: true,
|
|
331
308
|
value: 'fizz',
|
|
332
|
-
},
|
|
309
|
+
} as any,
|
|
333
310
|
})
|
|
334
311
|
|
|
335
312
|
expect(wrapper.html()).toMatchSnapshot()
|
|
336
|
-
wrapper.setProps({
|
|
313
|
+
await wrapper.setProps({ modelValue: true } as any)
|
|
337
314
|
expect(wrapper.html()).toMatchSnapshot()
|
|
338
|
-
wrapper.setProps({
|
|
315
|
+
await wrapper.setProps({ modelValue: false } as any)
|
|
339
316
|
expect(wrapper.html()).toMatchSnapshot()
|
|
340
317
|
})
|
|
341
318
|
|
|
342
319
|
it('should render themed component', () => {
|
|
343
320
|
const wrapper = mountFunction({
|
|
344
|
-
|
|
321
|
+
props: {
|
|
345
322
|
light: true,
|
|
346
|
-
},
|
|
323
|
+
} as any,
|
|
347
324
|
})
|
|
348
325
|
|
|
349
326
|
expect(wrapper.html()).toMatchSnapshot()
|
|
@@ -351,7 +328,7 @@ describe('VCheckbox.ts', () => { // eslint-disable-line max-statements
|
|
|
351
328
|
|
|
352
329
|
it('should be disabled', () => {
|
|
353
330
|
const wrapper = mountFunction({
|
|
354
|
-
|
|
331
|
+
props: { disabled: true } as any,
|
|
355
332
|
})
|
|
356
333
|
const input = wrapper.find('input')
|
|
357
334
|
|
|
@@ -360,9 +337,37 @@ describe('VCheckbox.ts', () => { // eslint-disable-line max-statements
|
|
|
360
337
|
|
|
361
338
|
it('should be render colored checkbox', () => {
|
|
362
339
|
const wrapper = mountFunction({
|
|
363
|
-
|
|
340
|
+
props: { color: 'yellow' } as any,
|
|
364
341
|
})
|
|
365
342
|
|
|
366
343
|
expect(wrapper.html()).toMatchSnapshot()
|
|
367
344
|
})
|
|
345
|
+
|
|
346
|
+
it('should apply classes to root element', () => {
|
|
347
|
+
const wrapper = mountFunction({
|
|
348
|
+
props: {
|
|
349
|
+
modelValue: true,
|
|
350
|
+
class: 'shrink mr-2 mt-0',
|
|
351
|
+
} as any,
|
|
352
|
+
})
|
|
353
|
+
|
|
354
|
+
const rootElement = wrapper.element
|
|
355
|
+
|
|
356
|
+
// Проверяем что корневой элемент имеет основные классы VInput
|
|
357
|
+
expect(rootElement.classList.contains('v-input')).toBe(true)
|
|
358
|
+
expect(rootElement.classList.contains('v-input--selection-controls')).toBe(true)
|
|
359
|
+
expect(rootElement.classList.contains('v-input--checkbox')).toBe(true)
|
|
360
|
+
expect(rootElement.classList.contains('v-input--is-dirty')).toBe(true)
|
|
361
|
+
|
|
362
|
+
// Проверяем что переданные классы применены к корневому элементу
|
|
363
|
+
expect(rootElement.classList.contains('shrink')).toBe(true)
|
|
364
|
+
expect(rootElement.classList.contains('mr-2')).toBe(true)
|
|
365
|
+
expect(rootElement.classList.contains('mt-0')).toBe(true)
|
|
366
|
+
|
|
367
|
+
// Проверяем что HTML input НЕ содержит эти классы
|
|
368
|
+
const input = wrapper.find('input')
|
|
369
|
+
expect(input.element.classList.contains('shrink')).toBe(false)
|
|
370
|
+
expect(input.element.classList.contains('mr-2')).toBe(false)
|
|
371
|
+
expect(input.element.classList.contains('mt-0')).toBe(false)
|
|
372
|
+
})
|
|
368
373
|
})
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {h, vShow, withDirectives} from 'vue'
|
|
1
|
+
import { h, vShow, withDirectives, VNode } from 'vue'
|
|
2
2
|
// Styles
|
|
3
3
|
import './VChip.sass'
|
|
4
|
-
|
|
5
|
-
// Types
|
|
6
|
-
import { VNode } from 'vue'
|
|
7
4
|
import mixins from '../../util/mixins'
|
|
8
5
|
|
|
9
6
|
// Components
|
|
@@ -32,10 +29,12 @@ export default mixins(
|
|
|
32
29
|
Routable,
|
|
33
30
|
Themeable,
|
|
34
31
|
GroupableFactory('chipGroup'),
|
|
35
|
-
ToggleableFactory(
|
|
32
|
+
ToggleableFactory()
|
|
36
33
|
).extend({
|
|
37
34
|
name: 'v-chip',
|
|
38
35
|
|
|
36
|
+
emits: ['update:modelValue', 'click:close', 'click', 'change'],
|
|
37
|
+
|
|
39
38
|
props: {
|
|
40
39
|
active: {
|
|
41
40
|
type: Boolean,
|
|
@@ -45,6 +44,7 @@ export default mixins(
|
|
|
45
44
|
type: String,
|
|
46
45
|
} as any as PropValidator<string>,
|
|
47
46
|
close: Boolean,
|
|
47
|
+
onClick: Function as PropType<(e: MouseEvent) => void>,
|
|
48
48
|
closeIcon: {
|
|
49
49
|
type: String,
|
|
50
50
|
default: '$delete',
|
|
@@ -69,7 +69,7 @@ export default mixins(
|
|
|
69
69
|
default: 'span',
|
|
70
70
|
},
|
|
71
71
|
textColor: String,
|
|
72
|
-
|
|
72
|
+
modelValue: null as any as PropType<any>,
|
|
73
73
|
},
|
|
74
74
|
|
|
75
75
|
data: () => ({
|
|
@@ -77,9 +77,10 @@ export default mixins(
|
|
|
77
77
|
}),
|
|
78
78
|
|
|
79
79
|
computed: {
|
|
80
|
-
$activeClass() {
|
|
81
|
-
if(this.activeClass)
|
|
80
|
+
$activeClass () {
|
|
81
|
+
if (this.activeClass) {
|
|
82
82
|
return this.activeClass
|
|
83
|
+
}
|
|
83
84
|
if (!this.chipGroup) return ''
|
|
84
85
|
|
|
85
86
|
return this.chipGroup.activeClass
|
|
@@ -117,8 +118,8 @@ export default mixins(
|
|
|
117
118
|
const breakingProps = [
|
|
118
119
|
['outline', 'outlined'],
|
|
119
120
|
['selected', 'input-value'],
|
|
120
|
-
['value', '
|
|
121
|
-
['
|
|
121
|
+
['value', 'modelValue'],
|
|
122
|
+
['onInput', 'onUpdate:modelValue'],
|
|
122
123
|
]
|
|
123
124
|
|
|
124
125
|
/* istanbul ignore next */
|
|
@@ -131,7 +132,10 @@ export default mixins(
|
|
|
131
132
|
click (e: MouseEvent): void {
|
|
132
133
|
this.$emit('click', e)
|
|
133
134
|
|
|
134
|
-
this.chipGroup
|
|
135
|
+
if (this.chipGroup) {
|
|
136
|
+
this.toggle()
|
|
137
|
+
this.$emit('update:modelValue', this.isActive)
|
|
138
|
+
}
|
|
135
139
|
},
|
|
136
140
|
genFilter (): VNode {
|
|
137
141
|
const children = []
|
|
@@ -158,8 +162,8 @@ export default mixins(
|
|
|
158
162
|
e.preventDefault()
|
|
159
163
|
|
|
160
164
|
this.$emit('click:close')
|
|
161
|
-
this.$emit('update:
|
|
162
|
-
}
|
|
165
|
+
this.$emit('update:modelValue', false)
|
|
166
|
+
},
|
|
163
167
|
}, this.closeIcon)
|
|
164
168
|
},
|
|
165
169
|
genContent (): VNode {
|