@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
|
@@ -4,12 +4,15 @@ import VListGroup from '../VListGroup'
|
|
|
4
4
|
// Utilities
|
|
5
5
|
import {
|
|
6
6
|
mount,
|
|
7
|
-
|
|
7
|
+
VueWrapper,
|
|
8
|
+
enableAutoUnmount,
|
|
8
9
|
} from '@vue/test-utils'
|
|
9
10
|
|
|
10
11
|
describe('VListGroup.ts', () => {
|
|
11
12
|
type Instance = InstanceType<typeof VListGroup>
|
|
12
|
-
let mountFunction: (options?: object) =>
|
|
13
|
+
let mountFunction: (options?: object) => VueWrapper<Instance>
|
|
14
|
+
|
|
15
|
+
enableAutoUnmount(afterEach)
|
|
13
16
|
|
|
14
17
|
beforeEach(() => {
|
|
15
18
|
mountFunction = (options = {}) => {
|
|
@@ -29,42 +32,49 @@ describe('VListGroup.ts', () => {
|
|
|
29
32
|
const $route = { path: '/foo' }
|
|
30
33
|
const listClick = jest.fn()
|
|
31
34
|
const wrapper = mountFunction({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
global: {
|
|
36
|
+
provide: {
|
|
37
|
+
list: {
|
|
38
|
+
listClick,
|
|
39
|
+
register: jest.fn(),
|
|
40
|
+
unregister: jest.fn(),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
mocks: {
|
|
44
|
+
$route,
|
|
37
45
|
},
|
|
38
46
|
},
|
|
39
|
-
|
|
47
|
+
props: {
|
|
40
48
|
group: 'foo',
|
|
41
49
|
},
|
|
42
|
-
mocks: {
|
|
43
|
-
$route,
|
|
44
|
-
},
|
|
45
50
|
})
|
|
46
51
|
|
|
47
52
|
await wrapper.vm.$nextTick()
|
|
48
|
-
expect(listClick).toHaveBeenCalledWith(wrapper.vm
|
|
53
|
+
expect(listClick).toHaveBeenCalledWith(wrapper.vm.$.uid)
|
|
49
54
|
})
|
|
50
55
|
|
|
51
56
|
it('should toggle when clicked', async () => {
|
|
52
|
-
const wrapper = mountFunction(
|
|
57
|
+
const wrapper = mountFunction({
|
|
58
|
+
props: {
|
|
59
|
+
modelValue: false,
|
|
60
|
+
},
|
|
61
|
+
})
|
|
53
62
|
|
|
54
|
-
const input = jest.fn()
|
|
55
|
-
wrapper.vm.$on('input', input)
|
|
56
63
|
wrapper.vm.click()
|
|
57
64
|
await wrapper.vm.$nextTick()
|
|
58
|
-
expect(
|
|
65
|
+
expect(wrapper.emitted('click')).toBeTruthy()
|
|
66
|
+
expect(wrapper.vm.isActive).toBe(true)
|
|
59
67
|
})
|
|
60
68
|
|
|
61
69
|
it('should register when mounted', () => {
|
|
62
70
|
const register = jest.fn()
|
|
63
71
|
const wrapper = mountFunction({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
global: {
|
|
73
|
+
provide: {
|
|
74
|
+
list: {
|
|
75
|
+
register,
|
|
76
|
+
unregister: () => {},
|
|
77
|
+
},
|
|
68
78
|
},
|
|
69
79
|
},
|
|
70
80
|
})
|
|
@@ -75,15 +85,17 @@ describe('VListGroup.ts', () => {
|
|
|
75
85
|
it('should unregister when destroyed', async () => {
|
|
76
86
|
const unregister = jest.fn()
|
|
77
87
|
const wrapper = mountFunction({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
global: {
|
|
89
|
+
provide: {
|
|
90
|
+
list: {
|
|
91
|
+
register: () => {},
|
|
92
|
+
unregister,
|
|
93
|
+
},
|
|
82
94
|
},
|
|
83
95
|
},
|
|
84
96
|
})
|
|
85
97
|
|
|
86
|
-
wrapper.
|
|
98
|
+
wrapper.unmount()
|
|
87
99
|
await wrapper.vm.$nextTick()
|
|
88
100
|
expect(unregister).toHaveBeenCalledWith(wrapper.vm)
|
|
89
101
|
})
|
|
@@ -91,12 +103,8 @@ describe('VListGroup.ts', () => {
|
|
|
91
103
|
it('should render a custom affix icons', async () => {
|
|
92
104
|
const wrapper = mountFunction({
|
|
93
105
|
slots: {
|
|
94
|
-
appendIcon:
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
prependIcon: {
|
|
98
|
-
render: h => h('span', 'bar'),
|
|
99
|
-
},
|
|
106
|
+
appendIcon: '<span>foo</span>',
|
|
107
|
+
prependIcon: '<span>bar</span>',
|
|
100
108
|
},
|
|
101
109
|
})
|
|
102
110
|
|
|
@@ -104,10 +112,8 @@ describe('VListGroup.ts', () => {
|
|
|
104
112
|
expect(wrapper.html()).toContain('<span>bar</span>')
|
|
105
113
|
})
|
|
106
114
|
|
|
107
|
-
it('should respond to keydown.enter on header', () => {
|
|
108
|
-
const click = jest.fn()
|
|
115
|
+
it('should respond to keydown.enter on header', async () => {
|
|
109
116
|
const wrapper = mountFunction({
|
|
110
|
-
methods: { click },
|
|
111
117
|
slots: {
|
|
112
118
|
activator: {
|
|
113
119
|
template: '<span>foo</span>',
|
|
@@ -117,26 +123,28 @@ describe('VListGroup.ts', () => {
|
|
|
117
123
|
|
|
118
124
|
const span = wrapper.find('span')
|
|
119
125
|
|
|
120
|
-
span.trigger('keydown.enter')
|
|
126
|
+
await span.trigger('keydown.enter')
|
|
121
127
|
|
|
122
|
-
expect(
|
|
128
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
123
129
|
})
|
|
124
130
|
|
|
125
131
|
it('should set active state if route changes and group present', async () => {
|
|
126
132
|
const listClick = jest.fn()
|
|
127
133
|
const $route = { path: '/bar' }
|
|
128
134
|
const wrapper = mountFunction({
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
global: {
|
|
136
|
+
provide: {
|
|
137
|
+
list: {
|
|
138
|
+
listClick,
|
|
139
|
+
register: () => {},
|
|
140
|
+
unregister: () => {},
|
|
141
|
+
},
|
|
134
142
|
},
|
|
143
|
+
mocks: { $route },
|
|
135
144
|
},
|
|
136
|
-
|
|
145
|
+
props: {
|
|
137
146
|
group: 'foo',
|
|
138
147
|
},
|
|
139
|
-
mocks: { $route },
|
|
140
148
|
})
|
|
141
149
|
|
|
142
150
|
expect(wrapper.vm.isActive).toBe(false)
|
|
@@ -146,12 +154,12 @@ describe('VListGroup.ts', () => {
|
|
|
146
154
|
wrapper.vm.onRouteChange(wrapper.vm.$route)
|
|
147
155
|
|
|
148
156
|
expect(wrapper.vm.isActive).toBe(true)
|
|
149
|
-
expect(listClick).toHaveBeenCalledWith(wrapper.vm
|
|
157
|
+
expect(listClick).toHaveBeenCalledWith(wrapper.vm.$.uid)
|
|
150
158
|
})
|
|
151
159
|
|
|
152
|
-
it('should not react to clicks when disabled', () => {
|
|
160
|
+
it('should not react to clicks when disabled', async () => {
|
|
153
161
|
const wrapper = mountFunction({
|
|
154
|
-
|
|
162
|
+
props: {
|
|
155
163
|
disabled: true,
|
|
156
164
|
},
|
|
157
165
|
slots: {
|
|
@@ -162,7 +170,7 @@ describe('VListGroup.ts', () => {
|
|
|
162
170
|
const span = wrapper.find('span.bar')
|
|
163
171
|
|
|
164
172
|
expect(wrapper.vm.isActive).toBe(false)
|
|
165
|
-
span.trigger('click')
|
|
173
|
+
await span.trigger('click')
|
|
166
174
|
expect(wrapper.vm.isActive).toBe(false)
|
|
167
175
|
})
|
|
168
176
|
|
|
@@ -173,20 +181,20 @@ describe('VListGroup.ts', () => {
|
|
|
173
181
|
wrapper.vm.toggle(100)
|
|
174
182
|
await wrapper.vm.$nextTick()
|
|
175
183
|
expect(wrapper.vm.isActive).toBe(false)
|
|
176
|
-
wrapper.vm.toggle(wrapper.vm
|
|
184
|
+
wrapper.vm.toggle(wrapper.vm.$.uid)
|
|
177
185
|
await wrapper.vm.$nextTick()
|
|
178
186
|
expect(wrapper.vm.isActive).toBe(true)
|
|
179
187
|
})
|
|
180
188
|
|
|
181
|
-
it('should have the correct a11y attributes', () => {
|
|
189
|
+
it('should have the correct a11y attributes', async () => {
|
|
182
190
|
const wrapper = mountFunction()
|
|
183
191
|
const header = wrapper.find('.v-list-group__header')
|
|
184
192
|
|
|
185
|
-
expect(header.element.tabIndex).toBe(
|
|
193
|
+
expect(header.element.tabIndex).toBe(-1)
|
|
186
194
|
expect(header.element.getAttribute('aria-expanded')).toBe('false')
|
|
187
195
|
expect(header.element.getAttribute('role')).toBe('button')
|
|
188
196
|
|
|
189
|
-
wrapper.setData({ isActive: true })
|
|
197
|
+
await wrapper.setData({ isActive: true })
|
|
190
198
|
|
|
191
199
|
expect(header.element.getAttribute('aria-expanded')).toBe('true')
|
|
192
200
|
})
|
|
@@ -4,16 +4,26 @@ import VListItem from '../VListItem'
|
|
|
4
4
|
// Utilities
|
|
5
5
|
import {
|
|
6
6
|
mount,
|
|
7
|
-
|
|
7
|
+
VueWrapper,
|
|
8
|
+
enableAutoUnmount,
|
|
8
9
|
} from '@vue/test-utils'
|
|
10
|
+
import { Vue3RouterLinkStub } from '../../../../test/util/stubs'
|
|
9
11
|
|
|
10
12
|
describe('VListItem.ts', () => {
|
|
11
13
|
type Instance = InstanceType<typeof VListItem>
|
|
12
|
-
let mountFunction: (options?:
|
|
14
|
+
let mountFunction: (options?: any) => VueWrapper<Instance>
|
|
15
|
+
|
|
16
|
+
enableAutoUnmount(afterEach)
|
|
13
17
|
|
|
14
18
|
beforeEach(() => {
|
|
15
19
|
mountFunction = (options = {}) => {
|
|
16
20
|
return mount(VListItem, {
|
|
21
|
+
global: {
|
|
22
|
+
stubs: {
|
|
23
|
+
'router-link': Vue3RouterLinkStub,
|
|
24
|
+
},
|
|
25
|
+
...options.global,
|
|
26
|
+
},
|
|
17
27
|
...options,
|
|
18
28
|
})
|
|
19
29
|
}
|
|
@@ -21,80 +31,70 @@ describe('VListItem.ts', () => {
|
|
|
21
31
|
|
|
22
32
|
it('should render with a div when inactive is true and href is used', () => {
|
|
23
33
|
const wrapper = mountFunction({
|
|
24
|
-
|
|
34
|
+
props: {
|
|
25
35
|
href: 'http://www.google.com',
|
|
26
36
|
inactive: true,
|
|
27
37
|
},
|
|
28
38
|
})
|
|
29
39
|
|
|
30
|
-
expect(wrapper.
|
|
40
|
+
expect(wrapper.element.tagName.toLowerCase()).toBe('div')
|
|
31
41
|
expect(wrapper.classes('v-list-item--link')).toBe(false)
|
|
32
42
|
})
|
|
33
43
|
|
|
34
44
|
it('should render with a tag when tag is specified', () => {
|
|
35
45
|
const wrapper = mountFunction({
|
|
36
|
-
|
|
46
|
+
props: {
|
|
37
47
|
tag: 'code',
|
|
38
48
|
},
|
|
39
49
|
})
|
|
40
50
|
|
|
41
|
-
expect(wrapper.
|
|
51
|
+
expect(wrapper.element.tagName.toLowerCase()).toBe('code')
|
|
42
52
|
})
|
|
43
53
|
|
|
44
54
|
it('should render with a div when href and to are not used', () => {
|
|
45
55
|
const wrapper = mountFunction()
|
|
46
56
|
|
|
47
|
-
expect(wrapper.
|
|
57
|
+
expect(wrapper.element.tagName.toLowerCase()).toBe('div')
|
|
48
58
|
expect(wrapper.html()).toMatchSnapshot()
|
|
49
59
|
})
|
|
50
60
|
|
|
51
61
|
it('should render with <a> when using href prop', () => {
|
|
52
62
|
const wrapper = mountFunction({
|
|
53
|
-
|
|
63
|
+
props: {
|
|
54
64
|
href: 'http://www.google.com',
|
|
55
65
|
},
|
|
56
66
|
})
|
|
57
67
|
|
|
58
68
|
const a = wrapper.find('a')
|
|
59
69
|
|
|
60
|
-
expect(wrapper.
|
|
70
|
+
expect(wrapper.element.tagName.toLowerCase()).toBe('a')
|
|
61
71
|
expect(a.element.getAttribute('href')).toBe('http://www.google.com')
|
|
62
72
|
expect(wrapper.html()).toMatchSnapshot()
|
|
63
73
|
})
|
|
64
74
|
|
|
65
|
-
it('should have --link class when href/to prop present or link prop is used', () => {
|
|
75
|
+
it('should have --link class when href/to prop present or link prop is used', async () => {
|
|
66
76
|
const wrapper = mountFunction({
|
|
67
|
-
|
|
77
|
+
props: {
|
|
68
78
|
href: '/home',
|
|
69
79
|
},
|
|
70
80
|
})
|
|
71
81
|
|
|
72
82
|
expect(wrapper.classes('v-list-item--link')).toBe(true)
|
|
73
83
|
|
|
74
|
-
wrapper.setProps({ href: undefined, to: '/foo' })
|
|
84
|
+
await wrapper.setProps({ href: undefined, to: '/foo' })
|
|
75
85
|
expect(wrapper.classes('v-list-item--link')).toBe(true)
|
|
76
86
|
|
|
77
|
-
wrapper.setProps({ to: undefined, link: true })
|
|
87
|
+
await wrapper.setProps({ to: undefined, link: true })
|
|
78
88
|
expect(wrapper.classes('v-list-item--link')).toBe(true)
|
|
79
89
|
|
|
80
|
-
wrapper.setProps({ link: false })
|
|
90
|
+
await wrapper.setProps({ link: false })
|
|
81
91
|
expect(wrapper.classes('v-list-item--link')).toBe(false)
|
|
82
92
|
})
|
|
83
93
|
|
|
84
94
|
it('should have --link class when click handler present', () => {
|
|
85
95
|
const wrapper = mountFunction({
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
expect(wrapper.classes('v-list-item--link')).toBe(true)
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
it('should have --link class when click.prevent.stop handler present', () => {
|
|
95
|
-
const wrapper = mountFunction({
|
|
96
|
-
listeners: {
|
|
97
|
-
'!click': () => {},
|
|
96
|
+
props: {
|
|
97
|
+
link: true,
|
|
98
98
|
},
|
|
99
99
|
})
|
|
100
100
|
|
|
@@ -103,7 +103,7 @@ describe('VListItem.ts', () => {
|
|
|
103
103
|
|
|
104
104
|
it('should have --selectable class if the selectable property is true', () => {
|
|
105
105
|
const wrapper = mountFunction({
|
|
106
|
-
|
|
106
|
+
props: {
|
|
107
107
|
selectable: true,
|
|
108
108
|
},
|
|
109
109
|
})
|
|
@@ -111,81 +111,82 @@ describe('VListItem.ts', () => {
|
|
|
111
111
|
expect(wrapper.classes('v-list-item--selectable')).toBe(true)
|
|
112
112
|
})
|
|
113
113
|
|
|
114
|
-
it('should react to keydown.enter', () => {
|
|
114
|
+
it('should react to keydown.enter', async () => {
|
|
115
115
|
const click = jest.fn()
|
|
116
|
-
const wrapper = mountFunction({
|
|
117
|
-
methods: { click },
|
|
118
|
-
})
|
|
116
|
+
const wrapper = mountFunction({})
|
|
119
117
|
|
|
120
|
-
|
|
118
|
+
// Мокируем метод click компонента
|
|
119
|
+
wrapper.vm.click = click
|
|
120
|
+
|
|
121
|
+
await wrapper.trigger('keydown.enter')
|
|
121
122
|
|
|
122
123
|
expect(click).toHaveBeenCalled()
|
|
123
124
|
})
|
|
124
125
|
|
|
125
126
|
it('should react to clicks', async () => {
|
|
126
127
|
const blur = jest.fn()
|
|
127
|
-
const click = jest.fn()
|
|
128
128
|
const toggle = jest.fn()
|
|
129
|
-
const wrapper = mountFunction({
|
|
130
|
-
methods: { toggle },
|
|
131
|
-
})
|
|
129
|
+
const wrapper = mountFunction({})
|
|
132
130
|
|
|
133
131
|
wrapper.vm.$el.blur = blur
|
|
134
|
-
wrapper.vm
|
|
132
|
+
wrapper.vm.toggle = toggle
|
|
135
133
|
|
|
136
|
-
wrapper.trigger('click')
|
|
134
|
+
await wrapper.trigger('click')
|
|
137
135
|
expect(blur).not.toHaveBeenCalled()
|
|
138
|
-
expect(click).
|
|
136
|
+
expect(wrapper.emitted('click')).toBeTruthy()
|
|
139
137
|
expect(toggle).toHaveBeenCalled()
|
|
140
138
|
|
|
141
139
|
wrapper.vm.click({ detail: 1 })
|
|
142
140
|
|
|
143
141
|
expect(blur).toHaveBeenCalled()
|
|
144
142
|
|
|
145
|
-
wrapper.setProps({ to: '/foo' })
|
|
143
|
+
await wrapper.setProps({ to: '/foo' })
|
|
146
144
|
await wrapper.vm.$nextTick()
|
|
147
145
|
|
|
148
146
|
expect(toggle).toHaveBeenCalledTimes(2)
|
|
149
|
-
wrapper.trigger('click')
|
|
147
|
+
await wrapper.trigger('click')
|
|
150
148
|
expect(toggle).toHaveBeenCalledTimes(2)
|
|
151
149
|
})
|
|
152
150
|
|
|
153
151
|
it('should inherit listItemGroup activeClass', () => {
|
|
154
152
|
const wrapper = mountFunction({
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
153
|
+
global: {
|
|
154
|
+
provide: {
|
|
155
|
+
listItemGroup: {
|
|
156
|
+
activeClass: 'foobar',
|
|
157
|
+
register: () => {},
|
|
158
|
+
unregister: () => {},
|
|
159
|
+
},
|
|
160
160
|
},
|
|
161
161
|
},
|
|
162
162
|
})
|
|
163
163
|
|
|
164
|
-
expect(wrapper.vm
|
|
164
|
+
expect(wrapper.vm.$activeClass).toBe('foobar')
|
|
165
165
|
})
|
|
166
166
|
|
|
167
|
-
it('should have the correct aria attributes and tabindex', () => {
|
|
167
|
+
it('should have the correct aria attributes and tabindex', async () => {
|
|
168
168
|
const wrapper = mountFunction({
|
|
169
|
-
|
|
169
|
+
props: { disabled: true },
|
|
170
170
|
})
|
|
171
171
|
|
|
172
172
|
expect(wrapper.element.getAttribute('aria-disabled')).toBe('true')
|
|
173
173
|
expect(wrapper.element.tabIndex).toBe(-1)
|
|
174
174
|
|
|
175
|
-
wrapper.setProps({
|
|
175
|
+
await wrapper.setProps({
|
|
176
176
|
disabled: false,
|
|
177
|
-
|
|
177
|
+
modelValue: true,
|
|
178
178
|
})
|
|
179
179
|
|
|
180
180
|
expect(wrapper.element.getAttribute('aria-disabled')).toBeNull()
|
|
181
181
|
expect(wrapper.element.tabIndex).toBe(-1)
|
|
182
182
|
|
|
183
|
-
wrapper.setProps({ link: true })
|
|
183
|
+
await wrapper.setProps({ link: true })
|
|
184
|
+
await wrapper.vm.$nextTick()
|
|
184
185
|
|
|
185
186
|
expect(wrapper.element.tabIndex).toBe(0)
|
|
186
187
|
})
|
|
187
188
|
|
|
188
|
-
it('should have the correct role', () => {
|
|
189
|
+
it('should have the correct role', async () => {
|
|
189
190
|
// Custom provided
|
|
190
191
|
const wrapper = mountFunction({
|
|
191
192
|
attrs: { role: 'item' },
|
|
@@ -194,27 +195,37 @@ describe('VListItem.ts', () => {
|
|
|
194
195
|
|
|
195
196
|
// In nav
|
|
196
197
|
const wrapper2 = mountFunction({
|
|
197
|
-
|
|
198
|
+
global: {
|
|
199
|
+
provide: { isInNav: true },
|
|
200
|
+
},
|
|
198
201
|
})
|
|
199
202
|
expect(wrapper2.element.getAttribute('role')).toBeNull()
|
|
200
203
|
|
|
201
204
|
// In list-item-group
|
|
202
205
|
const wrapper3 = mountFunction({
|
|
203
|
-
|
|
206
|
+
global: {
|
|
207
|
+
provide: { isInGroup: true },
|
|
208
|
+
},
|
|
204
209
|
})
|
|
205
210
|
expect(wrapper3.element.getAttribute('role')).toBe('option')
|
|
211
|
+
expect(wrapper3.element.getAttribute('aria-selected')).toBe('false')
|
|
206
212
|
|
|
207
213
|
// In menu
|
|
208
214
|
const wrapper4 = mountFunction({
|
|
209
|
-
|
|
215
|
+
global: {
|
|
216
|
+
provide: { isInMenu: true },
|
|
217
|
+
},
|
|
210
218
|
})
|
|
211
219
|
expect(wrapper4.element.getAttribute('role')).toBeNull()
|
|
212
|
-
wrapper4.setProps({ href: '#' }) // could be `to` or `link` as well
|
|
220
|
+
await wrapper4.setProps({ href: '#' }) // could be `to` or `link` as well
|
|
213
221
|
expect(wrapper4.element.getAttribute('role')).toBe('menuitem')
|
|
222
|
+
expect(wrapper4.element.getAttribute('id')).toMatch(/^list-item-\d+$/)
|
|
214
223
|
|
|
215
224
|
// In list not a link
|
|
216
225
|
const wrapper5 = mountFunction({
|
|
217
|
-
|
|
226
|
+
global: {
|
|
227
|
+
provide: { isInList: true },
|
|
228
|
+
},
|
|
218
229
|
})
|
|
219
230
|
expect(wrapper5.element.getAttribute('role')).toBe('listitem')
|
|
220
231
|
})
|
|
@@ -228,22 +239,90 @@ describe('VListItem.ts', () => {
|
|
|
228
239
|
wrapper.vm.toggle()
|
|
229
240
|
expect(wrapper.vm.isActive).toBeFalsy()
|
|
230
241
|
|
|
231
|
-
const wrapper2 = mountFunction({
|
|
242
|
+
const wrapper2 = mountFunction({
|
|
243
|
+
props: { to: { name: 'test' } },
|
|
244
|
+
global: {
|
|
245
|
+
stubs: {
|
|
246
|
+
'router-link': Vue3RouterLinkStub,
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
})
|
|
232
250
|
|
|
233
251
|
expect(wrapper2.vm.isActive).toBeFalsy()
|
|
234
252
|
wrapper2.vm.toggle()
|
|
235
253
|
expect(wrapper2.vm.isActive).toBeTruthy()
|
|
236
254
|
})
|
|
237
255
|
|
|
238
|
-
it('should not react to keydown.enter when disabled', () => {
|
|
256
|
+
it('should not react to keydown.enter when disabled', async () => {
|
|
239
257
|
const click = jest.fn()
|
|
240
258
|
const wrapper = mountFunction({
|
|
241
|
-
|
|
242
|
-
|
|
259
|
+
global: {
|
|
260
|
+
mocks: { click },
|
|
261
|
+
},
|
|
262
|
+
props: { disabled: true },
|
|
243
263
|
})
|
|
244
264
|
|
|
245
|
-
wrapper.trigger('keydown.enter')
|
|
265
|
+
await wrapper.trigger('keydown.enter')
|
|
246
266
|
|
|
247
267
|
expect(click).not.toHaveBeenCalled()
|
|
248
268
|
})
|
|
269
|
+
|
|
270
|
+
it('should be clickable when href is provided', () => {
|
|
271
|
+
const wrapper = mountFunction({
|
|
272
|
+
props: {
|
|
273
|
+
href: 'http://www.google.com',
|
|
274
|
+
},
|
|
275
|
+
})
|
|
276
|
+
|
|
277
|
+
expect(wrapper.vm.isClickable).toBe(true)
|
|
278
|
+
})
|
|
279
|
+
|
|
280
|
+
it('should be clickable when to is provided', () => {
|
|
281
|
+
const wrapper = mountFunction({
|
|
282
|
+
props: {
|
|
283
|
+
to: '/home',
|
|
284
|
+
},
|
|
285
|
+
})
|
|
286
|
+
|
|
287
|
+
expect(wrapper.vm.isClickable).toBe(true)
|
|
288
|
+
})
|
|
289
|
+
|
|
290
|
+
it('should be clickable when in listItemGroup', () => {
|
|
291
|
+
const wrapper = mountFunction({
|
|
292
|
+
global: {
|
|
293
|
+
provide: {
|
|
294
|
+
listItemGroup: {
|
|
295
|
+
register: () => {},
|
|
296
|
+
unregister: () => {},
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
})
|
|
301
|
+
|
|
302
|
+
expect(wrapper.vm.isClickable).toBe(true)
|
|
303
|
+
})
|
|
304
|
+
|
|
305
|
+
it('should not be clickable when no href, to, or listItemGroup', () => {
|
|
306
|
+
const wrapper = mountFunction()
|
|
307
|
+
|
|
308
|
+
expect(wrapper.vm.isClickable).toBe(false)
|
|
309
|
+
})
|
|
310
|
+
|
|
311
|
+
it('should be clickable when both href and listItemGroup are present', () => {
|
|
312
|
+
const wrapper = mountFunction({
|
|
313
|
+
props: {
|
|
314
|
+
href: 'http://www.google.com',
|
|
315
|
+
},
|
|
316
|
+
global: {
|
|
317
|
+
provide: {
|
|
318
|
+
listItemGroup: {
|
|
319
|
+
register: () => {},
|
|
320
|
+
unregister: () => {},
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
})
|
|
325
|
+
|
|
326
|
+
expect(wrapper.vm.isClickable).toBe(true)
|
|
327
|
+
})
|
|
249
328
|
})
|
|
@@ -4,7 +4,8 @@ import VListItemAvatar from '../VListItemAvatar'
|
|
|
4
4
|
// Utilities
|
|
5
5
|
import {
|
|
6
6
|
mount,
|
|
7
|
-
|
|
7
|
+
VueWrapper,
|
|
8
|
+
enableAutoUnmount,
|
|
8
9
|
} from '@vue/test-utils'
|
|
9
10
|
|
|
10
11
|
// Types
|
|
@@ -12,7 +13,9 @@ import { ExtractVue } from '../../../util/mixins'
|
|
|
12
13
|
|
|
13
14
|
describe('VListItemAvatar.ts', () => {
|
|
14
15
|
type Instance = ExtractVue<typeof VListItemAvatar>
|
|
15
|
-
let mountFunction: (options?: object) =>
|
|
16
|
+
let mountFunction: (options?: object) => VueWrapper<Instance>
|
|
17
|
+
|
|
18
|
+
enableAutoUnmount(afterEach)
|
|
16
19
|
|
|
17
20
|
beforeEach(() => {
|
|
18
21
|
mountFunction = (options = {}) => {
|
|
@@ -4,12 +4,15 @@ import VListItemGroup from '../VListItemGroup'
|
|
|
4
4
|
// Utilities
|
|
5
5
|
import {
|
|
6
6
|
mount,
|
|
7
|
-
|
|
7
|
+
VueWrapper,
|
|
8
|
+
enableAutoUnmount,
|
|
8
9
|
} from '@vue/test-utils'
|
|
9
10
|
|
|
10
11
|
describe('VListItemGroup.ts', () => {
|
|
11
12
|
type Instance = InstanceType<typeof VListItemGroup>
|
|
12
|
-
let mountFunction: (options?: object) =>
|
|
13
|
+
let mountFunction: (options?: object) => VueWrapper<Instance>
|
|
14
|
+
|
|
15
|
+
enableAutoUnmount(afterEach)
|
|
13
16
|
|
|
14
17
|
beforeEach(() => {
|
|
15
18
|
mountFunction = (options = {}) => {
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`VList.ts should render a dense component and match snapshot 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
|
|
4
|
+
<div class="v-sheet theme--light v-list--dense v-list"
|
|
5
|
+
role="list"
|
|
6
6
|
>
|
|
7
7
|
</div>
|
|
8
8
|
`;
|
|
9
9
|
|
|
10
10
|
exports[`VList.ts should render a subheader component and match snapshot 1`] = `
|
|
11
|
-
<div
|
|
12
|
-
|
|
11
|
+
<div class="v-sheet theme--light v-list--subheader v-list"
|
|
12
|
+
role="list"
|
|
13
13
|
>
|
|
14
14
|
</div>
|
|
15
15
|
`;
|
|
16
16
|
|
|
17
17
|
exports[`VList.ts should render a threeLine component and match snapshot 1`] = `
|
|
18
|
-
<div
|
|
19
|
-
|
|
18
|
+
<div class="v-sheet theme--light v-list--three-line v-list"
|
|
19
|
+
role="list"
|
|
20
20
|
>
|
|
21
21
|
</div>
|
|
22
22
|
`;
|
|
23
23
|
|
|
24
24
|
exports[`VList.ts should render a twoLine component and match snapshot 1`] = `
|
|
25
|
-
<div
|
|
26
|
-
|
|
25
|
+
<div class="v-sheet theme--light v-list--two-line v-list"
|
|
26
|
+
role="list"
|
|
27
27
|
>
|
|
28
28
|
</div>
|
|
29
29
|
`;
|
|
30
30
|
|
|
31
31
|
exports[`VList.ts should render component and match snapshot 1`] = `
|
|
32
|
-
<div
|
|
33
|
-
|
|
32
|
+
<div class="v-sheet theme--light v-list"
|
|
33
|
+
role="list"
|
|
34
34
|
>
|
|
35
35
|
</div>
|
|
36
36
|
`;
|