@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,29 +1,20 @@
|
|
|
1
|
-
// Libraries
|
|
2
|
-
import Vue from 'vue'
|
|
3
|
-
|
|
4
1
|
// Components
|
|
5
2
|
import VLabel from '../VLabel'
|
|
6
3
|
|
|
7
4
|
// Utilities
|
|
8
5
|
import {
|
|
9
|
-
createLocalVue,
|
|
10
6
|
mount,
|
|
11
|
-
|
|
7
|
+
VueWrapper,
|
|
12
8
|
} from '@vue/test-utils'
|
|
13
9
|
|
|
14
10
|
describe('VLabel', () => {
|
|
15
|
-
|
|
16
|
-
let
|
|
11
|
+
type Instance = InstanceType<typeof VLabel>
|
|
12
|
+
let mountFunction: (options?: any) => VueWrapper<Instance>
|
|
17
13
|
|
|
18
14
|
beforeEach(() => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
mountFunction = (ctx = {}) => {
|
|
15
|
+
mountFunction = (options = {}) => {
|
|
22
16
|
return mount(VLabel, {
|
|
23
|
-
|
|
24
|
-
context: {
|
|
25
|
-
...ctx,
|
|
26
|
-
},
|
|
17
|
+
...options,
|
|
27
18
|
})
|
|
28
19
|
}
|
|
29
20
|
})
|
|
@@ -48,4 +39,239 @@ describe('VLabel', () => {
|
|
|
48
39
|
|
|
49
40
|
expect(wrapper.element.style.position).toBe('absolute')
|
|
50
41
|
})
|
|
42
|
+
|
|
43
|
+
it('should render default slot content', () => {
|
|
44
|
+
const wrapper = mountFunction({
|
|
45
|
+
slots: {
|
|
46
|
+
default: 'Custom Label Text',
|
|
47
|
+
},
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
expect(wrapper.text()).toBe('Custom Label Text')
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
it('should render complex slot content with HTML', () => {
|
|
54
|
+
const wrapper = mountFunction({
|
|
55
|
+
slots: {
|
|
56
|
+
default: '<span class="custom-class">Label with <strong>bold</strong> text</span>',
|
|
57
|
+
},
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
expect(wrapper.find('.custom-class').exists()).toBe(true)
|
|
61
|
+
expect(wrapper.find('strong').exists()).toBe(true)
|
|
62
|
+
expect(wrapper.find('strong').text()).toBe('bold')
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
it('should render slot content with components', () => {
|
|
66
|
+
const TestComponent = {
|
|
67
|
+
template: '<span class="test-component">Test Component</span>',
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const wrapper = mountFunction({
|
|
71
|
+
slots: {
|
|
72
|
+
default: TestComponent,
|
|
73
|
+
},
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
expect(wrapper.find('.test-component').exists()).toBe(true)
|
|
77
|
+
expect(wrapper.find('.test-component').text()).toBe('Test Component')
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
it('should render slot content with multiple elements', () => {
|
|
81
|
+
const wrapper = mountFunction({
|
|
82
|
+
slots: {
|
|
83
|
+
default: [
|
|
84
|
+
'<span class="first">First</span>',
|
|
85
|
+
'<span class="second">Second</span>',
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
expect(wrapper.find('.first').exists()).toBe(true)
|
|
91
|
+
expect(wrapper.find('.second').exists()).toBe(true)
|
|
92
|
+
expect(wrapper.find('.first').text()).toBe('First')
|
|
93
|
+
expect(wrapper.find('.second').text()).toBe('Second')
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
it('should render empty content when no slot provided', () => {
|
|
97
|
+
const wrapper = mountFunction()
|
|
98
|
+
|
|
99
|
+
expect(wrapper.text()).toBe('')
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
it('should apply proper classes when slot content is present', () => {
|
|
103
|
+
const wrapper = mountFunction({
|
|
104
|
+
slots: {
|
|
105
|
+
default: 'Test Label',
|
|
106
|
+
},
|
|
107
|
+
props: {
|
|
108
|
+
value: true,
|
|
109
|
+
disabled: true,
|
|
110
|
+
},
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
expect(wrapper.classes('v-label--active')).toBe(true)
|
|
114
|
+
expect(wrapper.classes('v-label--is-disabled')).toBe(true)
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
it('should render slot content with proper for attribute', () => {
|
|
118
|
+
const wrapper = mountFunction({
|
|
119
|
+
props: {
|
|
120
|
+
for: 'test-input',
|
|
121
|
+
},
|
|
122
|
+
slots: {
|
|
123
|
+
default: 'Label for input',
|
|
124
|
+
},
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
expect(wrapper.attributes('for')).toBe('test-input')
|
|
128
|
+
expect(wrapper.attributes('aria-hidden')).toBe('false')
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
it('should set aria-hidden when no for attribute provided', () => {
|
|
132
|
+
const wrapper = mountFunction({
|
|
133
|
+
slots: {
|
|
134
|
+
default: 'Label without for',
|
|
135
|
+
},
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
expect(wrapper.attributes('aria-hidden')).toBe('true')
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
it('should render slot content with proper positioning', () => {
|
|
142
|
+
const wrapper = mountFunction({
|
|
143
|
+
props: {
|
|
144
|
+
left: 10,
|
|
145
|
+
right: 20,
|
|
146
|
+
},
|
|
147
|
+
slots: {
|
|
148
|
+
default: 'Positioned label',
|
|
149
|
+
},
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
expect(wrapper.element.style.left).toBe('10px')
|
|
153
|
+
expect(wrapper.element.style.right).toBe('20px')
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
it('should render slot content with theme classes', () => {
|
|
157
|
+
const wrapper = mountFunction({
|
|
158
|
+
props: {
|
|
159
|
+
dark: true,
|
|
160
|
+
},
|
|
161
|
+
slots: {
|
|
162
|
+
default: 'Dark theme label',
|
|
163
|
+
},
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
expect(wrapper.classes('theme--dark')).toBe(true)
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
it('should handle focused state with color', () => {
|
|
170
|
+
const wrapper = mountFunction({
|
|
171
|
+
props: {
|
|
172
|
+
focused: true,
|
|
173
|
+
color: 'error',
|
|
174
|
+
},
|
|
175
|
+
slots: {
|
|
176
|
+
default: 'Focused error label',
|
|
177
|
+
},
|
|
178
|
+
})
|
|
179
|
+
|
|
180
|
+
expect(wrapper.classes('error--text')).toBe(true)
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
it('should handle disabled state', () => {
|
|
184
|
+
const wrapper = mountFunction({
|
|
185
|
+
props: {
|
|
186
|
+
disabled: true,
|
|
187
|
+
},
|
|
188
|
+
slots: {
|
|
189
|
+
default: 'Disabled label',
|
|
190
|
+
},
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
expect(wrapper.classes('v-label--is-disabled')).toBe(true)
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
it('should handle active state', () => {
|
|
197
|
+
const wrapper = mountFunction({
|
|
198
|
+
props: {
|
|
199
|
+
value: true,
|
|
200
|
+
},
|
|
201
|
+
slots: {
|
|
202
|
+
default: 'Active label',
|
|
203
|
+
},
|
|
204
|
+
})
|
|
205
|
+
|
|
206
|
+
expect(wrapper.classes('v-label--active')).toBe(true)
|
|
207
|
+
})
|
|
208
|
+
|
|
209
|
+
it('should handle custom positioning with string values', () => {
|
|
210
|
+
const wrapper = mountFunction({
|
|
211
|
+
props: {
|
|
212
|
+
left: '20%',
|
|
213
|
+
right: '30px',
|
|
214
|
+
},
|
|
215
|
+
slots: {
|
|
216
|
+
default: 'Positioned label',
|
|
217
|
+
},
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
expect(wrapper.element.style.left).toBe('20%')
|
|
221
|
+
expect(wrapper.element.style.right).toBe('30px')
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
it('should handle light theme', () => {
|
|
225
|
+
const wrapper = mountFunction({
|
|
226
|
+
props: {
|
|
227
|
+
light: true,
|
|
228
|
+
},
|
|
229
|
+
slots: {
|
|
230
|
+
default: 'Light theme label',
|
|
231
|
+
},
|
|
232
|
+
})
|
|
233
|
+
|
|
234
|
+
expect(wrapper.classes('theme--light')).toBe(true)
|
|
235
|
+
})
|
|
236
|
+
|
|
237
|
+
it('should handle multiple theme classes', () => {
|
|
238
|
+
const wrapper = mountFunction({
|
|
239
|
+
props: {
|
|
240
|
+
dark: true,
|
|
241
|
+
light: false,
|
|
242
|
+
},
|
|
243
|
+
slots: {
|
|
244
|
+
default: 'Theme label',
|
|
245
|
+
},
|
|
246
|
+
})
|
|
247
|
+
|
|
248
|
+
expect(wrapper.classes('theme--dark')).toBe(true)
|
|
249
|
+
expect(wrapper.classes('theme--light')).toBe(false)
|
|
250
|
+
})
|
|
251
|
+
|
|
252
|
+
it('should render slot content with proper element tag', () => {
|
|
253
|
+
const wrapper = mountFunction({
|
|
254
|
+
slots: {
|
|
255
|
+
default: 'Label content',
|
|
256
|
+
},
|
|
257
|
+
})
|
|
258
|
+
|
|
259
|
+
expect(wrapper.element.tagName.toLowerCase()).toBe('label')
|
|
260
|
+
})
|
|
261
|
+
|
|
262
|
+
it('should handle slot content with event listeners', () => {
|
|
263
|
+
const onClick = jest.fn()
|
|
264
|
+
|
|
265
|
+
const wrapper = mountFunction({
|
|
266
|
+
attrs: {
|
|
267
|
+
onClick,
|
|
268
|
+
},
|
|
269
|
+
slots: {
|
|
270
|
+
default: 'Clickable label',
|
|
271
|
+
},
|
|
272
|
+
})
|
|
273
|
+
|
|
274
|
+
wrapper.trigger('click')
|
|
275
|
+
expect(onClick).toHaveBeenCalled()
|
|
276
|
+
})
|
|
51
277
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Transition, h} from 'vue'
|
|
1
|
+
import { Transition, h, withDirectives, defineComponent } from 'vue'
|
|
2
2
|
// Mixins
|
|
3
3
|
import Measurable from '../../mixins/measurable'
|
|
4
4
|
import Toggleable from '../../mixins/toggleable'
|
|
@@ -20,7 +20,8 @@ export default mixins(
|
|
|
20
20
|
).extend({
|
|
21
21
|
name: 'VLazy',
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
emits: ['update:modelValue'],
|
|
24
|
+
|
|
24
25
|
|
|
25
26
|
props: {
|
|
26
27
|
options: {
|
|
@@ -73,18 +74,15 @@ export default mixins(
|
|
|
73
74
|
},
|
|
74
75
|
|
|
75
76
|
render (): VNode {
|
|
76
|
-
return h(this.tag, {
|
|
77
|
+
return withDirectives(h(this.tag, {
|
|
77
78
|
class: 'v-lazy',
|
|
78
|
-
|
|
79
|
-
directives: [{
|
|
80
|
-
name: 'intersect',
|
|
81
|
-
value: {
|
|
82
|
-
handler: this.onObserve,
|
|
83
|
-
options: this.options,
|
|
84
|
-
},
|
|
85
|
-
}],
|
|
86
|
-
on: this.$listeners,
|
|
79
|
+
...this.$attrs,
|
|
87
80
|
style: this.styles,
|
|
88
|
-
}, [this.genContent()])
|
|
81
|
+
}, [this.genContent()]), [
|
|
82
|
+
[intersect, {
|
|
83
|
+
handler: this.onObserve,
|
|
84
|
+
options: this.options,
|
|
85
|
+
}]
|
|
86
|
+
])
|
|
89
87
|
},
|
|
90
88
|
})
|
|
@@ -6,12 +6,15 @@ import {
|
|
|
6
6
|
mount,
|
|
7
7
|
MountOptions,
|
|
8
8
|
Wrapper,
|
|
9
|
+
enableAutoUnmount,
|
|
9
10
|
} from '@vue/test-utils'
|
|
10
11
|
|
|
11
12
|
describe('VLazy.ts', () => {
|
|
12
13
|
type Instance = InstanceType<typeof VLazy>
|
|
13
14
|
let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
|
|
14
15
|
|
|
16
|
+
enableAutoUnmount(afterEach)
|
|
17
|
+
|
|
15
18
|
beforeEach(() => {
|
|
16
19
|
mountFunction = (options = {}) => {
|
|
17
20
|
return mount(VLazy, {
|
|
@@ -29,16 +32,14 @@ describe('VLazy.ts', () => {
|
|
|
29
32
|
|
|
30
33
|
expect(wrapper.html()).toMatchSnapshot()
|
|
31
34
|
|
|
32
|
-
wrapper.setProps({
|
|
33
|
-
|
|
34
|
-
await wrapper.vm.$nextTick()
|
|
35
|
+
await wrapper.setProps({ modelValue: true })
|
|
35
36
|
|
|
36
37
|
expect(wrapper.html()).toMatchSnapshot()
|
|
37
38
|
})
|
|
38
39
|
|
|
39
40
|
it('should set a minimum height', () => {
|
|
40
41
|
const wrapper = mountFunction({
|
|
41
|
-
|
|
42
|
+
props: {
|
|
42
43
|
minHeight: 200,
|
|
43
44
|
},
|
|
44
45
|
})
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`VLazy.ts should conditionally render content 1`] = `
|
|
4
4
|
<div class="v-lazy">
|
|
5
|
+
false
|
|
5
6
|
</div>
|
|
6
7
|
`;
|
|
7
8
|
|
|
8
9
|
exports[`VLazy.ts should conditionally render content 2`] = `
|
|
9
10
|
<div class="v-lazy">
|
|
10
|
-
<div>
|
|
11
|
+
<div class="fade-transition-enter-from fade-transition-enter-active">
|
|
11
12
|
foobar
|
|
12
13
|
</div>
|
|
13
14
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {h, withDirectives, vShow} from 'vue'
|
|
1
|
+
import { h, withDirectives, vShow, VNode } from 'vue'
|
|
2
2
|
// Styles
|
|
3
3
|
import './VListGroup.sass'
|
|
4
4
|
|
|
@@ -26,7 +26,6 @@ import mixins, { ExtractVue } from '../../util/mixins'
|
|
|
26
26
|
import { getSlot } from '../../util/helpers'
|
|
27
27
|
|
|
28
28
|
// Types
|
|
29
|
-
import { VNode } from 'vue'
|
|
30
29
|
import { Route } from 'vue-router'
|
|
31
30
|
|
|
32
31
|
const baseMixins = mixins(
|
|
@@ -50,7 +49,6 @@ interface options extends ExtractVue<typeof baseMixins> {
|
|
|
50
49
|
export default baseMixins.extend({
|
|
51
50
|
name: 'v-list-group',
|
|
52
51
|
|
|
53
|
-
directives: { ripple },
|
|
54
52
|
|
|
55
53
|
props: {
|
|
56
54
|
activeClass: {
|
|
@@ -144,7 +142,8 @@ export default baseMixins.extend({
|
|
|
144
142
|
'v-list-group__header': true,
|
|
145
143
|
[this.activeClass]: this.isActive,
|
|
146
144
|
},
|
|
147
|
-
|
|
145
|
+
link: true,
|
|
146
|
+
modelValue: this.isActive,
|
|
148
147
|
...this.listeners$,
|
|
149
148
|
onClick: this.click
|
|
150
149
|
}, () => [
|
|
@@ -153,19 +152,19 @@ export default baseMixins.extend({
|
|
|
153
152
|
this.genAppendIcon(),
|
|
154
153
|
]),
|
|
155
154
|
[
|
|
156
|
-
[Ripple, this.ripple]
|
|
155
|
+
[Ripple, this.ripple],
|
|
157
156
|
])
|
|
158
157
|
},
|
|
159
158
|
genItems (): VNode[] {
|
|
160
159
|
const directives = [[
|
|
161
160
|
vShow,
|
|
162
|
-
this.isActive
|
|
161
|
+
this.isActive,
|
|
163
162
|
]]
|
|
164
163
|
|
|
165
164
|
return this.showLazyContent(() => [
|
|
166
165
|
withDirectives(h('div', {
|
|
167
166
|
class: 'v-list-group__items',
|
|
168
|
-
}, getSlot(this)), directives)
|
|
167
|
+
}, getSlot(this)), directives),
|
|
169
168
|
])
|
|
170
169
|
},
|
|
171
170
|
genPrependIcon (): VNode | null {
|
|
@@ -208,7 +207,7 @@ export default baseMixins.extend({
|
|
|
208
207
|
|
|
209
208
|
render (): VNode {
|
|
210
209
|
return h('div', this.setTextColor(this.isActive && this.color, {
|
|
211
|
-
class: ['v-list-group', this.classes]
|
|
210
|
+
class: ['v-list-group', this.classes],
|
|
212
211
|
}), [
|
|
213
212
|
this.genHeader(),
|
|
214
213
|
h(VExpandTransition, {}, () => this.genItems()),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {h, withDirectives} from 'vue'
|
|
1
|
+
import { h, withDirectives, VNode, PropType, PropValidator } from 'vue'
|
|
2
2
|
// Styles
|
|
3
3
|
import './VListItem.sass'
|
|
4
4
|
|
|
@@ -14,21 +14,19 @@ import Ripple from '../../directives/ripple'
|
|
|
14
14
|
|
|
15
15
|
// Utilities
|
|
16
16
|
import { getSlot, keyCodes } from './../../util/helpers'
|
|
17
|
-
import mergeData from './../../util/mergeData'
|
|
17
|
+
import mergeData, { mergeClasses } from './../../util/mergeData'
|
|
18
18
|
import { ExtractVue } from './../../util/mixins'
|
|
19
19
|
import { removed } from '../../util/console'
|
|
20
20
|
|
|
21
21
|
// Types
|
|
22
22
|
import mixins from '../../util/mixins'
|
|
23
|
-
import { VNode } from 'vue'
|
|
24
|
-
import { PropType, PropValidator } from 'vue/types/options'
|
|
25
23
|
|
|
26
24
|
const baseMixins = mixins(
|
|
27
25
|
Colorable,
|
|
28
26
|
Routable,
|
|
29
27
|
Themeable,
|
|
30
28
|
GroupableFactory('listItemGroup'),
|
|
31
|
-
ToggleableFactory('
|
|
29
|
+
ToggleableFactory('modelValue')
|
|
32
30
|
)
|
|
33
31
|
|
|
34
32
|
interface options extends ExtractVue<typeof baseMixins> {
|
|
@@ -43,10 +41,6 @@ interface options extends ExtractVue<typeof baseMixins> {
|
|
|
43
41
|
export default baseMixins.extend({
|
|
44
42
|
name: 'v-list-item',
|
|
45
43
|
|
|
46
|
-
directives: {
|
|
47
|
-
Ripple,
|
|
48
|
-
},
|
|
49
|
-
|
|
50
44
|
inject: {
|
|
51
45
|
isInGroup: {
|
|
52
46
|
default: false,
|
|
@@ -66,10 +60,11 @@ export default baseMixins.extend({
|
|
|
66
60
|
|
|
67
61
|
props: {
|
|
68
62
|
activeClass: {
|
|
69
|
-
type: String
|
|
63
|
+
type: String,
|
|
70
64
|
} as any as PropValidator<string>,
|
|
71
65
|
dense: Boolean,
|
|
72
66
|
inactive: Boolean,
|
|
67
|
+
onClick: Function as PropType<(e: MouseEvent) => void>,
|
|
73
68
|
link: Boolean,
|
|
74
69
|
selectable: {
|
|
75
70
|
type: Boolean,
|
|
@@ -80,16 +75,23 @@ export default baseMixins.extend({
|
|
|
80
75
|
},
|
|
81
76
|
threeLine: Boolean,
|
|
82
77
|
twoLine: Boolean,
|
|
83
|
-
|
|
78
|
+
modelValue: null as any as PropType<any>,
|
|
84
79
|
},
|
|
85
80
|
|
|
81
|
+
emits: [
|
|
82
|
+
'click',
|
|
83
|
+
'keydown',
|
|
84
|
+
'change',
|
|
85
|
+
'update:modelValue',
|
|
86
|
+
],
|
|
87
|
+
|
|
86
88
|
data: () => ({
|
|
87
89
|
proxyClass: 'v-list-item--active',
|
|
88
90
|
}),
|
|
89
91
|
|
|
90
92
|
computed: {
|
|
91
|
-
$activeClass() {
|
|
92
|
-
if(this.activeClass) return this.activeClass
|
|
93
|
+
$activeClass () {
|
|
94
|
+
if (this.activeClass) return this.activeClass
|
|
93
95
|
if (!this.listItemGroup) return ''
|
|
94
96
|
|
|
95
97
|
return this.listItemGroup.activeClass
|
|
@@ -131,10 +133,11 @@ export default baseMixins.extend({
|
|
|
131
133
|
this.to || this.toggle()
|
|
132
134
|
},
|
|
133
135
|
genAttrs () {
|
|
136
|
+
const { class: _, ...otherAttrs } = this.$attrs
|
|
134
137
|
const attrs: Record<string, any> = {
|
|
138
|
+
...otherAttrs,
|
|
135
139
|
'aria-disabled': this.disabled ? true : undefined,
|
|
136
140
|
tabindex: this.isClickable && !this.disabled ? 0 : -1,
|
|
137
|
-
...this.$attrs,
|
|
138
141
|
}
|
|
139
142
|
|
|
140
143
|
if (this.$attrs.hasOwnProperty('role')) {
|
|
@@ -154,19 +157,21 @@ export default baseMixins.extend({
|
|
|
154
157
|
return attrs
|
|
155
158
|
},
|
|
156
159
|
toggle () {
|
|
157
|
-
if (this.to && this.
|
|
160
|
+
if (this.to && this.modelValue === undefined) {
|
|
158
161
|
this.isActive = !this.isActive
|
|
159
162
|
}
|
|
160
163
|
this.$emit('change')
|
|
164
|
+
this.$emitLegacy('change')
|
|
161
165
|
},
|
|
162
166
|
},
|
|
163
167
|
|
|
164
168
|
render (): VNode {
|
|
165
169
|
let { tag, data, directives } = this.generateRouteLink()
|
|
170
|
+
const attrs = this.genAttrs()
|
|
166
171
|
|
|
167
172
|
data = mergeData(
|
|
168
173
|
data,
|
|
169
|
-
|
|
174
|
+
attrs
|
|
170
175
|
)
|
|
171
176
|
|
|
172
177
|
data = {
|
|
@@ -179,6 +184,8 @@ export default baseMixins.extend({
|
|
|
179
184
|
this.$emit('keydown', e)
|
|
180
185
|
}
|
|
181
186
|
},
|
|
187
|
+
// Ensure our attrs take precedence over routable
|
|
188
|
+
...attrs,
|
|
182
189
|
}
|
|
183
190
|
|
|
184
191
|
if (this.inactive) tag = 'div'
|
|
@@ -187,13 +194,26 @@ export default baseMixins.extend({
|
|
|
187
194
|
// delete data.nativeOn
|
|
188
195
|
// }
|
|
189
196
|
|
|
190
|
-
const
|
|
197
|
+
const slotProps = {
|
|
191
198
|
active: this.isActive,
|
|
192
199
|
toggle: this.toggle,
|
|
193
|
-
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const children = [
|
|
203
|
+
getSlot(this, 'prepend', slotProps),
|
|
204
|
+
getSlot(this, 'default', slotProps),
|
|
205
|
+
getSlot(this, 'append', slotProps),
|
|
206
|
+
].filter(Boolean)
|
|
194
207
|
|
|
195
208
|
const nodeData = this.isActive ? this.setTextColor(this.color, data) : data
|
|
196
209
|
|
|
210
|
+
const attrsClasses = this.$attrs.class
|
|
211
|
+
if (attrsClasses) {
|
|
212
|
+
nodeData.class = [this.classes, attrsClasses]
|
|
213
|
+
} else {
|
|
214
|
+
nodeData.class = this.classes
|
|
215
|
+
}
|
|
216
|
+
|
|
197
217
|
const node = typeof tag === 'string'
|
|
198
218
|
? h(tag, nodeData, children)
|
|
199
219
|
: h(tag, nodeData, () => children)
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
// Types
|
|
2
|
-
import { defineComponent, VNode, h } from 'vue'
|
|
2
|
+
import { defineComponent, VNode, h, Comment } from 'vue'
|
|
3
3
|
|
|
4
4
|
/* @vue/component */
|
|
5
5
|
export default defineComponent({
|
|
6
6
|
name: 'v-list-item-action',
|
|
7
7
|
|
|
8
|
-
functional: true,
|
|
9
|
-
|
|
10
8
|
render (): VNode {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const children = this.$slots.default()
|
|
9
|
+
const { class: attrClass, ...otherAttrs } = this.$attrs
|
|
10
|
+
let className = attrClass ? `v-list-item__action ${attrClass}` : 'v-list-item__action'
|
|
11
|
+
const children = this.$slots.default?.() || []
|
|
14
12
|
|
|
15
|
-
const filteredChild = children.filter(
|
|
16
|
-
return
|
|
13
|
+
const filteredChild = children.filter((vnode: any) => {
|
|
14
|
+
return vnode?.type !== Comment && vnode?.children !== ' '
|
|
17
15
|
})
|
|
18
|
-
if (filteredChild.length > 1)
|
|
16
|
+
if (filteredChild.length > 1) className += ' v-list-item__action--stack'
|
|
19
17
|
|
|
20
|
-
return h('div',
|
|
18
|
+
return h('div', {
|
|
19
|
+
...otherAttrs,
|
|
20
|
+
class: className
|
|
21
|
+
}, children)
|
|
21
22
|
},
|
|
22
23
|
})
|
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
import VList from '../VList'
|
|
3
3
|
|
|
4
4
|
// Utilities
|
|
5
|
-
import {
|
|
6
|
-
mount,
|
|
7
|
-
Wrapper,
|
|
8
|
-
} from '@vue/test-utils'
|
|
5
|
+
import { mount, VueWrapper } from '@vue/test-utils'
|
|
9
6
|
|
|
10
7
|
describe('VList.ts', () => {
|
|
11
|
-
type Instance = InstanceType<typeof VList
|
|
12
|
-
let mountFunction: (options?:
|
|
8
|
+
type Instance = InstanceType<typeof VList>;
|
|
9
|
+
let mountFunction: (options?: any) => VueWrapper<Instance>
|
|
13
10
|
|
|
14
11
|
beforeEach(() => {
|
|
15
12
|
mountFunction = (options = {}) => {
|
|
@@ -27,7 +24,7 @@ describe('VList.ts', () => {
|
|
|
27
24
|
|
|
28
25
|
it('should render a dense component and match snapshot', () => {
|
|
29
26
|
const wrapper = mountFunction({
|
|
30
|
-
|
|
27
|
+
props: {
|
|
31
28
|
dense: true,
|
|
32
29
|
},
|
|
33
30
|
})
|
|
@@ -37,7 +34,7 @@ describe('VList.ts', () => {
|
|
|
37
34
|
|
|
38
35
|
it('should render a subheader component and match snapshot', () => {
|
|
39
36
|
const wrapper = mountFunction({
|
|
40
|
-
|
|
37
|
+
props: {
|
|
41
38
|
subheader: true,
|
|
42
39
|
},
|
|
43
40
|
})
|
|
@@ -47,7 +44,7 @@ describe('VList.ts', () => {
|
|
|
47
44
|
|
|
48
45
|
it('should render a threeLine component and match snapshot', () => {
|
|
49
46
|
const wrapper = mountFunction({
|
|
50
|
-
|
|
47
|
+
props: {
|
|
51
48
|
threeLine: true,
|
|
52
49
|
},
|
|
53
50
|
})
|
|
@@ -57,7 +54,7 @@ describe('VList.ts', () => {
|
|
|
57
54
|
|
|
58
55
|
it('should render a twoLine component and match snapshot', () => {
|
|
59
56
|
const wrapper = mountFunction({
|
|
60
|
-
|
|
57
|
+
props: {
|
|
61
58
|
twoLine: true,
|
|
62
59
|
},
|
|
63
60
|
})
|
|
@@ -67,13 +64,17 @@ describe('VList.ts', () => {
|
|
|
67
64
|
|
|
68
65
|
it('should have an inferred role from injections', () => {
|
|
69
66
|
const wrapper = mountFunction({
|
|
70
|
-
|
|
67
|
+
global: {
|
|
68
|
+
provide: { isInMenu: true },
|
|
69
|
+
},
|
|
71
70
|
})
|
|
72
71
|
|
|
73
72
|
expect(wrapper.element.getAttribute('role')).toBeNull()
|
|
74
73
|
|
|
75
74
|
const wrapper2 = mountFunction({
|
|
76
|
-
|
|
75
|
+
global: {
|
|
76
|
+
provide: { isInNav: true },
|
|
77
|
+
},
|
|
77
78
|
})
|
|
78
79
|
|
|
79
80
|
expect(wrapper2.element.getAttribute('role')).toBeNull()
|