vuetify 2.0.19 → 2.1.0
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/json/attributes.json +208 -16
- package/dist/json/tags.json +58 -0
- package/dist/vuetify.css +548 -57
- package/dist/vuetify.css.map +1 -1
- package/dist/vuetify.js +917 -249
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +3 -3
- package/es5/components/VAlert/VAlert.js +3 -18
- package/es5/components/VAlert/VAlert.js.map +1 -1
- package/es5/components/VAppBar/VAppBarNavIcon.js +1 -1
- package/es5/components/VAppBar/VAppBarNavIcon.js.map +1 -1
- package/es5/components/VAutocomplete/VAutocomplete.js +20 -0
- package/es5/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/es5/components/VBtn/VBtn.js +2 -0
- package/es5/components/VBtn/VBtn.js.map +1 -1
- package/es5/components/VBtnToggle/VBtnToggle.js +16 -3
- package/es5/components/VBtnToggle/VBtnToggle.js.map +1 -1
- package/es5/components/VCard/VCard.js +4 -2
- package/es5/components/VCard/VCard.js.map +1 -1
- package/es5/components/VCarousel/VCarousel.js +1 -1
- package/es5/components/VCarousel/VCarousel.js.map +1 -1
- package/es5/components/VCheckbox/VCheckbox.js +3 -3
- package/es5/components/VCheckbox/VCheckbox.js.map +1 -1
- package/es5/components/VCheckbox/VSimpleCheckbox.js +3 -3
- package/es5/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/es5/components/VChip/VChip.js +2 -2
- package/es5/components/VChip/VChip.js.map +1 -1
- package/es5/components/VColorPicker/VColorPickerEdit.js +1 -1
- package/es5/components/VColorPicker/VColorPickerEdit.js.map +1 -1
- package/es5/components/VColorPicker/VColorPickerSwatches.js +1 -1
- package/es5/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
- package/es5/components/VCombobox/VCombobox.js +16 -0
- package/es5/components/VCombobox/VCombobox.js.map +1 -1
- package/es5/components/VDataIterator/VDataFooter.js +10 -6
- package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
- package/es5/components/VDataIterator/VDataIterator.js +3 -0
- package/es5/components/VDataIterator/VDataIterator.js.map +1 -1
- package/es5/components/VDataTable/VDataTable.js +5 -5
- package/es5/components/VDataTable/VDataTable.js.map +1 -1
- package/es5/components/VDataTable/mixins/header.js +1 -1
- package/es5/components/VDataTable/mixins/header.js.map +1 -1
- package/es5/components/VDatePicker/VDatePicker.js +55 -16
- package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerHeader.js +2 -2
- package/es5/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/es5/components/VDialog/VDialog.js +3 -0
- package/es5/components/VDialog/VDialog.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/es5/components/VFileInput/VFileInput.js +1 -1
- package/es5/components/VFileInput/VFileInput.js.map +1 -1
- package/es5/components/VGrid/VCol.js +8 -1
- package/es5/components/VGrid/VCol.js.map +1 -1
- package/es5/components/VImg/VImg.js +34 -7
- package/es5/components/VImg/VImg.js.map +1 -1
- package/es5/components/VInput/VInput.js +6 -1
- package/es5/components/VInput/VInput.js.map +1 -1
- package/es5/components/VLazy/VLazy.js +90 -0
- package/es5/components/VLazy/VLazy.js.map +1 -0
- package/es5/components/VLazy/index.js +20 -0
- package/es5/components/VLazy/index.js.map +1 -0
- package/es5/components/VList/VListGroup.js +2 -2
- package/es5/components/VList/VListGroup.js.map +1 -1
- package/es5/components/VList/VListItem.js +4 -0
- package/es5/components/VList/VListItem.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +3 -0
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VPagination/VPagination.js +2 -2
- package/es5/components/VPagination/VPagination.js.map +1 -1
- package/es5/components/VRadioGroup/VRadio.js +2 -2
- package/es5/components/VRadioGroup/VRadio.js.map +1 -1
- package/es5/components/VRating/VRating.js +3 -3
- package/es5/components/VRating/VRating.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +1 -2
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSkeletonLoader/VSkeletonLoader.js +193 -0
- package/es5/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -0
- package/es5/components/VSkeletonLoader/index.js +20 -0
- package/es5/components/VSkeletonLoader/index.js.map +1 -0
- package/es5/components/VSlideGroup/VSlideGroup.js +2 -2
- package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/es5/components/VStepper/VStepperStep.js +3 -3
- package/es5/components/VStepper/VStepperStep.js.map +1 -1
- package/es5/components/VTabs/VTabs.js +2 -2
- package/es5/components/VTabs/VTabs.js.map +1 -1
- package/es5/components/VTextField/VTextField.js +1 -1
- package/es5/components/VTextField/VTextField.js.map +1 -1
- package/es5/components/VTimePicker/VTimePicker.js +1 -1
- package/es5/components/VTimePicker/VTimePicker.js.map +1 -1
- package/es5/components/VTimePicker/VTimePickerTitle.js +1 -1
- package/es5/components/VTimePicker/VTimePickerTitle.js.map +1 -1
- package/es5/components/VTooltip/VTooltip.js +2 -1
- package/es5/components/VTooltip/VTooltip.js.map +1 -1
- package/es5/components/VTreeview/VTreeviewNode.js +5 -5
- package/es5/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/es5/components/VWindow/VWindow.js +2 -2
- package/es5/components/VWindow/VWindow.js.map +1 -1
- package/es5/components/index.js +24 -0
- package/es5/components/index.js.map +1 -1
- package/es5/directives/index.js +16 -0
- package/es5/directives/index.js.map +1 -1
- package/es5/directives/intersect/index.js +61 -0
- package/es5/directives/intersect/index.js.map +1 -0
- package/es5/directives/mutate/index.js +71 -0
- package/es5/directives/mutate/index.js.map +1 -0
- package/es5/framework.js +1 -1
- package/es5/locale/af.js +6 -2
- package/es5/locale/af.js.map +1 -1
- package/es5/locale/ar.js +6 -2
- package/es5/locale/ar.js.map +1 -1
- package/es5/locale/ca.js +6 -2
- package/es5/locale/ca.js.map +1 -1
- package/es5/locale/cs.js +52 -0
- package/es5/locale/cs.js.map +1 -0
- package/es5/locale/de.js +6 -2
- package/es5/locale/de.js.map +1 -1
- package/es5/locale/el.js +6 -2
- package/es5/locale/el.js.map +1 -1
- package/es5/locale/en.js +6 -2
- package/es5/locale/en.js.map +1 -1
- package/es5/locale/es.js +6 -2
- package/es5/locale/es.js.map +1 -1
- package/es5/locale/et.js +14 -10
- package/es5/locale/et.js.map +1 -1
- package/es5/locale/fa.js +6 -2
- package/es5/locale/fa.js.map +1 -1
- package/es5/locale/fr.js +6 -2
- package/es5/locale/fr.js.map +1 -1
- package/es5/locale/he.js +6 -2
- package/es5/locale/he.js.map +1 -1
- package/es5/locale/hr.js +20 -16
- package/es5/locale/hr.js.map +1 -1
- package/es5/locale/hu.js +6 -2
- package/es5/locale/hu.js.map +1 -1
- package/es5/locale/id.js +6 -2
- package/es5/locale/id.js.map +1 -1
- package/es5/locale/index.js +24 -0
- package/es5/locale/index.js.map +1 -1
- package/es5/locale/it.js +6 -2
- package/es5/locale/it.js.map +1 -1
- package/es5/locale/ja.js +6 -2
- package/es5/locale/ja.js.map +1 -1
- package/es5/locale/ko.js +6 -2
- package/es5/locale/ko.js.map +1 -1
- package/es5/locale/lt.js +52 -0
- package/es5/locale/lt.js.map +1 -0
- package/es5/locale/lv.js +6 -2
- package/es5/locale/lv.js.map +1 -1
- package/es5/locale/nl.js +6 -2
- package/es5/locale/nl.js.map +1 -1
- package/es5/locale/no.js +6 -2
- package/es5/locale/no.js.map +1 -1
- package/es5/locale/pl.js +6 -2
- package/es5/locale/pl.js.map +1 -1
- package/es5/locale/pt.js +6 -2
- package/es5/locale/pt.js.map +1 -1
- package/es5/locale/ro.js +6 -2
- package/es5/locale/ro.js.map +1 -1
- package/es5/locale/ru.js +6 -2
- package/es5/locale/ru.js.map +1 -1
- package/es5/locale/sl.js +14 -10
- package/es5/locale/sl.js.map +1 -1
- package/es5/locale/sr-Cyrl.js +6 -2
- package/es5/locale/sr-Cyrl.js.map +1 -1
- package/es5/locale/sv.js +52 -0
- package/es5/locale/sv.js.map +1 -0
- package/es5/locale/th.js +6 -2
- package/es5/locale/th.js.map +1 -1
- package/es5/locale/tr.js +6 -2
- package/es5/locale/tr.js.map +1 -1
- package/es5/locale/uk.js +6 -2
- package/es5/locale/uk.js.map +1 -1
- package/es5/locale/zh-Hans.js +6 -2
- package/es5/locale/zh-Hans.js.map +1 -1
- package/es5/locale/zh-Hant.js +6 -2
- package/es5/locale/zh-Hant.js.map +1 -1
- package/es5/mixins/overlayable/index.js +6 -2
- package/es5/mixins/overlayable/index.js.map +1 -1
- package/es5/services/lang/index.js +7 -2
- package/es5/services/lang/index.js.map +1 -1
- package/es5/util/helpers.js +5 -5
- package/es5/util/helpers.js.map +1 -1
- package/lib/components/VAlert/VAlert.js +3 -18
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.js +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.js +22 -0
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VBtn/VBtn.js +2 -0
- package/lib/components/VBtn/VBtn.js.map +1 -1
- package/lib/components/VBtnToggle/VBtnToggle.js +15 -2
- package/lib/components/VBtnToggle/VBtnToggle.js.map +1 -1
- package/lib/components/VCard/VCard.js +3 -1
- package/lib/components/VCard/VCard.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.js +1 -1
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.js +3 -3
- package/lib/components/VCheckbox/VCheckbox.js.map +1 -1
- package/lib/components/VCheckbox/VSimpleCheckbox.js +3 -3
- package/lib/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/lib/components/VChip/VChip.js +2 -2
- package/lib/components/VChip/VChip.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.js +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.js +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
- package/lib/components/VCombobox/VCombobox.js +16 -0
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.js +10 -6
- package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.js +3 -0
- package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.js +5 -5
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/mixins/header.js +1 -1
- package/lib/components/VDataTable/mixins/header.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +39 -16
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js +2 -2
- package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/lib/components/VDialog/VDialog.js +3 -0
- package/lib/components/VDialog/VDialog.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/lib/components/VFileInput/VFileInput.js +1 -1
- package/lib/components/VFileInput/VFileInput.js.map +1 -1
- package/lib/components/VGrid/VCol.js +7 -1
- package/lib/components/VGrid/VCol.js.map +1 -1
- package/lib/components/VImg/VImg.js +30 -8
- package/lib/components/VImg/VImg.js.map +1 -1
- package/lib/components/VInput/VInput.js +5 -0
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VLazy/VLazy.js +76 -0
- package/lib/components/VLazy/VLazy.js.map +1 -0
- package/lib/components/VLazy/index.js +4 -0
- package/lib/components/VLazy/index.js.map +1 -0
- package/lib/components/VList/VListGroup.js +2 -2
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.js +4 -0
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +3 -0
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VPagination/VPagination.js +2 -2
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VRadioGroup/VRadio.js +2 -2
- package/lib/components/VRadioGroup/VRadio.js.map +1 -1
- package/lib/components/VRating/VRating.js +3 -3
- package/lib/components/VRating/VRating.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +1 -2
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSkeletonLoader/VSkeletonLoader.js +170 -0
- package/lib/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -0
- package/lib/components/VSkeletonLoader/index.js +4 -0
- package/lib/components/VSkeletonLoader/index.js.map +1 -0
- package/lib/components/VSlideGroup/VSlideGroup.js +2 -2
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VStepper/VStepperStep.js +3 -3
- package/lib/components/VStepper/VStepperStep.js.map +1 -1
- package/lib/components/VTabs/VTabs.js +2 -2
- package/lib/components/VTabs/VTabs.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +1 -1
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTimePicker/VTimePicker.js +1 -1
- package/lib/components/VTimePicker/VTimePicker.js.map +1 -1
- package/lib/components/VTimePicker/VTimePickerTitle.js +1 -1
- package/lib/components/VTimePicker/VTimePickerTitle.js.map +1 -1
- package/lib/components/VTooltip/VTooltip.js +2 -1
- package/lib/components/VTooltip/VTooltip.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewNode.js +5 -5
- package/lib/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/lib/components/VWindow/VWindow.js +2 -2
- package/lib/components/VWindow/VWindow.js.map +1 -1
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/directives/index.js +2 -0
- package/lib/directives/index.js.map +1 -1
- package/lib/directives/intersect/index.js +45 -0
- package/lib/directives/intersect/index.js.map +1 -0
- package/lib/directives/mutate/index.js +56 -0
- package/lib/directives/mutate/index.js.map +1 -0
- package/lib/framework.js +1 -1
- package/lib/locale/af.js +6 -2
- package/lib/locale/af.js.map +1 -1
- package/lib/locale/ar.js +6 -2
- package/lib/locale/ar.js.map +1 -1
- package/lib/locale/ca.js +6 -2
- package/lib/locale/ca.js.map +1 -1
- package/lib/locale/cs.js +45 -0
- package/lib/locale/cs.js.map +1 -0
- package/lib/locale/de.js +6 -2
- package/lib/locale/de.js.map +1 -1
- package/lib/locale/el.js +6 -2
- package/lib/locale/el.js.map +1 -1
- package/lib/locale/en.js +6 -2
- package/lib/locale/en.js.map +1 -1
- package/lib/locale/es.js +6 -2
- package/lib/locale/es.js.map +1 -1
- package/lib/locale/et.js +14 -10
- package/lib/locale/et.js.map +1 -1
- package/lib/locale/fa.js +6 -2
- package/lib/locale/fa.js.map +1 -1
- package/lib/locale/fr.js +6 -2
- package/lib/locale/fr.js.map +1 -1
- package/lib/locale/he.js +6 -2
- package/lib/locale/he.js.map +1 -1
- package/lib/locale/hr.js +20 -16
- package/lib/locale/hr.js.map +1 -1
- package/lib/locale/hu.js +6 -2
- package/lib/locale/hu.js.map +1 -1
- package/lib/locale/id.js +6 -2
- package/lib/locale/id.js.map +1 -1
- package/lib/locale/index.js +3 -0
- package/lib/locale/index.js.map +1 -1
- package/lib/locale/it.js +6 -2
- package/lib/locale/it.js.map +1 -1
- package/lib/locale/ja.js +6 -2
- package/lib/locale/ja.js.map +1 -1
- package/lib/locale/ko.js +6 -2
- package/lib/locale/ko.js.map +1 -1
- package/lib/locale/lt.js +45 -0
- package/lib/locale/lt.js.map +1 -0
- package/lib/locale/lv.js +6 -2
- package/lib/locale/lv.js.map +1 -1
- package/lib/locale/nl.js +6 -2
- package/lib/locale/nl.js.map +1 -1
- package/lib/locale/no.js +6 -2
- package/lib/locale/no.js.map +1 -1
- package/lib/locale/pl.js +6 -2
- package/lib/locale/pl.js.map +1 -1
- package/lib/locale/pt.js +6 -2
- package/lib/locale/pt.js.map +1 -1
- package/lib/locale/ro.js +6 -2
- package/lib/locale/ro.js.map +1 -1
- package/lib/locale/ru.js +6 -2
- package/lib/locale/ru.js.map +1 -1
- package/lib/locale/sl.js +14 -10
- package/lib/locale/sl.js.map +1 -1
- package/lib/locale/sr-Cyrl.js +6 -2
- package/lib/locale/sr-Cyrl.js.map +1 -1
- package/lib/locale/sv.js +45 -0
- package/lib/locale/sv.js.map +1 -0
- package/lib/locale/th.js +6 -2
- package/lib/locale/th.js.map +1 -1
- package/lib/locale/tr.js +6 -2
- package/lib/locale/tr.js.map +1 -1
- package/lib/locale/uk.js +6 -2
- package/lib/locale/uk.js.map +1 -1
- package/lib/locale/zh-Hans.js +6 -2
- package/lib/locale/zh-Hans.js.map +1 -1
- package/lib/locale/zh-Hant.js +6 -2
- package/lib/locale/zh-Hant.js.map +1 -1
- package/lib/mixins/overlayable/index.js +6 -2
- package/lib/mixins/overlayable/index.js.map +1 -1
- package/lib/services/lang/index.js +6 -2
- package/lib/services/lang/index.js.map +1 -1
- package/lib/util/helpers.js +3 -4
- package/lib/util/helpers.js.map +1 -1
- package/package.json +2 -2
- package/src/components/VAlert/VAlert.sass +4 -0
- package/src/components/VAlert/VAlert.ts +3 -8
- package/src/components/VAlert/__tests__/__snapshots__/VAlert.spec.ts.snap +2 -2
- package/src/components/VAlert/_variables.scss +1 -0
- package/src/components/VAppBar/VAppBarNavIcon.ts +1 -1
- package/src/components/VAppBar/__tests__/__snapshots__/VAppBarNavIcon.spec.ts.snap +1 -1
- package/src/components/VAutocomplete/VAutocomplete.ts +19 -0
- package/src/components/VAutocomplete/__tests__/VAutocomplete3.spec.ts +54 -0
- package/src/components/VBtn/VBtn.ts +2 -0
- package/src/components/VBtn/__tests__/VBtn.spec.ts +20 -0
- package/src/components/VBtn/_variables.scss +1 -1
- package/src/components/VBtnToggle/VBtnToggle.sass +50 -24
- package/src/components/VBtnToggle/VBtnToggle.ts +16 -1
- package/src/components/VBtnToggle/__tests__/VBtnToggle.spec.ts +10 -3
- package/src/components/VBtnToggle/_variables.scss +7 -0
- package/src/components/VCalendar/VCalendarWeekly.sass +3 -0
- package/src/components/VCalendar/_variables.scss +1 -1
- package/src/components/VCard/VCard.sass +7 -0
- package/src/components/VCard/VCard.ts +2 -0
- package/src/components/VCard/_variables.scss +2 -0
- package/src/components/VCarousel/VCarousel.ts +1 -1
- package/src/components/VCheckbox/VCheckbox.ts +3 -3
- package/src/components/VCheckbox/VSimpleCheckbox.ts +3 -3
- package/src/components/VCheckbox/__tests__/__snapshots__/VCheckbox.spec.ts.snap +1 -1
- package/src/components/VChip/VChip.ts +2 -2
- package/src/components/VChip/__tests__/__snapshots__/VChip.spec.ts.snap +1 -1
- package/src/components/VChip/_variables.scss +1 -1
- package/src/components/VColorPicker/VColorPicker.sass +2 -0
- package/src/components/VColorPicker/VColorPickerEdit.sass +2 -1
- package/src/components/VColorPicker/VColorPickerEdit.ts +1 -1
- package/src/components/VColorPicker/VColorPickerSwatches.ts +1 -1
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +5 -5
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +5 -5
- package/src/components/VColorPicker/_variables.scss +1 -0
- package/src/components/VCombobox/VCombobox.ts +16 -0
- package/src/components/VCombobox/__tests__/VCombobox-multiple.spec.ts +41 -0
- package/src/components/VDataIterator/VDataFooter.ts +9 -5
- package/src/components/VDataIterator/VDataIterator.ts +1 -0
- package/src/components/VDataIterator/__tests__/VDataIterator.spec.ts +3 -0
- package/src/components/VDataTable/VDataTable.ts +5 -5
- package/src/components/VDataTable/__tests__/VDataTable.spec.ts +71 -0
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTable.spec.ts.snap +1408 -446
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTableHeader.spec.ts.snap +35 -35
- package/src/components/VDataTable/mixins/__tests__/__snapshots__/header.spec.ts.snap +3 -3
- package/src/components/VDataTable/mixins/header.ts +2 -1
- package/src/components/VDatePicker/VDatePicker.ts +40 -16
- package/src/components/VDatePicker/VDatePickerHeader.ts +2 -2
- package/src/components/VDatePicker/__tests__/VDatePicker.date.spec.ts +20 -0
- package/src/components/VDialog/VDialog.sass +4 -7
- package/src/components/VDialog/VDialog.ts +6 -0
- package/src/components/VDialog/_variables.scss +1 -1
- package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +1 -1
- package/src/components/VExpansionPanel/__tests__/__snapshots__/VExpansionPanel.spec.ts.snap +1 -1
- package/src/components/VExpansionPanel/_variables.scss +1 -1
- package/src/components/VFileInput/VFileInput.sass +4 -0
- package/src/components/VFileInput/VFileInput.ts +1 -1
- package/src/components/VFileInput/__tests__/__snapshots__/VFileInput.spec.ts.snap +16 -16
- package/src/components/VGrid/VCol.ts +6 -0
- package/src/components/VGrid/__tests__/VCol.spec.ts +13 -0
- package/src/components/VIcon/__tests__/VIcon.spec.ts +11 -11
- package/src/components/VImg/VImg.ts +35 -6
- package/src/components/VImg/__tests__/VImg.spec.ts +4 -1
- package/src/components/VImg/__tests__/__snapshots__/VImg.spec.ts.snap +23 -46
- package/src/components/VInput/VInput.sass +3 -0
- package/src/components/VInput/VInput.ts +5 -0
- package/src/components/VInput/__tests__/__snapshots__/VInput.spec.ts.snap +3 -1
- package/src/components/VLazy/VLazy.ts +80 -0
- package/src/components/VLazy/__tests__/VLazy.spec.ts +78 -0
- package/src/components/VLazy/__tests__/__snapshots__/VLazy.spec.ts.snap +14 -0
- package/src/components/VLazy/index.ts +4 -0
- package/src/components/VList/VList.sass +2 -1
- package/src/components/VList/VListGroup.ts +2 -2
- package/src/components/VList/VListItem.sass +3 -0
- package/src/components/VList/VListItem.ts +4 -0
- package/src/components/VList/__tests__/VListItem.spec.ts +10 -0
- package/src/components/VList/__tests__/__snapshots__/VListGroup.spec.ts.snap +1 -1
- package/src/components/VList/_variables.scss +1 -1
- package/src/components/VMenu/VMenu.sass +3 -8
- package/src/components/VMenu/VMenu.ts +6 -0
- package/src/components/VMenu/_variables.scss +1 -1
- package/src/components/VOverflowBtn/VOverflowBtn.sass +4 -0
- package/src/components/VOverflowBtn/__tests__/__snapshots__/VOverflowBtn.spec.ts.snap +2 -2
- package/src/components/VPagination/VPagination.sass +3 -3
- package/src/components/VPagination/VPagination.ts +2 -2
- package/src/components/VPagination/_variables.scss +1 -0
- package/src/components/VPicker/_variables.scss +1 -1
- package/src/components/VProgressLinear/VProgressLinear.sass +1 -1
- package/src/components/VProgressLinear/_variables.scss +1 -0
- package/src/components/VRadioGroup/VRadio.ts +2 -2
- package/src/components/VRadioGroup/__tests__/__snapshots__/VRadio.spec.ts.snap +3 -3
- package/src/components/VRating/VRating.ts +3 -3
- package/src/components/VSelect/VSelect.sass +17 -0
- package/src/components/VSelect/VSelect.ts +1 -2
- package/src/components/VSelect/__tests__/__snapshots__/VSelect.spec.ts.snap +7 -7
- package/src/components/VSelect/__tests__/__snapshots__/VSelect2.spec.ts.snap +5 -5
- package/src/components/VSelect/__tests__/__snapshots__/VSelect3.spec.ts.snap +1 -1
- package/src/components/VSheet/VSheet.sass +0 -11
- package/src/components/VSkeletonLoader/VSkeletonLoader.sass +364 -0
- package/src/components/VSkeletonLoader/VSkeletonLoader.ts +179 -0
- package/src/components/VSkeletonLoader/__tests__/VSkeletonLoader.spec.ts +84 -0
- package/src/components/VSkeletonLoader/__tests__/__snapshots__/VSkeletonLoader.spec.ts.snap +994 -0
- package/src/components/VSkeletonLoader/_variables.scss +9 -0
- package/src/components/VSkeletonLoader/index.ts +4 -0
- package/src/components/VSlideGroup/VSlideGroup.ts +2 -2
- package/src/components/VSlideGroup/__tests__/__snapshots__/VSlideGroup.spec.ts.snap +4 -4
- package/src/components/VSnackbar/VSnackbar.sass +1 -1
- package/src/components/VSnackbar/_variables.scss +1 -0
- package/src/components/VStepper/VStepper.sass +2 -1
- package/src/components/VStepper/VStepperStep.ts +3 -3
- package/src/components/VStepper/_variables.scss +1 -0
- package/src/components/VTabs/VTabs.ts +2 -2
- package/src/components/VTextField/VTextField.sass +55 -13
- package/src/components/VTextField/VTextField.ts +1 -1
- package/src/components/VTextField/_mixins.sass +18 -0
- package/src/components/VTextField/_variables.scss +1 -0
- package/src/components/VTimePicker/VTimePicker.ts +2 -2
- package/src/components/VTimePicker/VTimePickerTitle.ts +2 -2
- package/src/components/VTimePicker/__tests__/VTimePicker.spec.ts +5 -0
- package/src/components/VTimePicker/__tests__/VTimePickerTitle.spec.ts +6 -0
- package/src/components/VTimePicker/__tests__/__snapshots__/VTimePickerTitle.spec.ts.snap +8 -8
- package/src/components/VTooltip/VTooltip.sass +5 -2
- package/src/components/VTooltip/VTooltip.ts +4 -0
- package/src/components/VTooltip/_variables.sass +1 -1
- package/src/components/VTreeview/VTreeviewNode.ts +5 -5
- package/src/components/VTreeview/__tests__/VTreeviewNode.spec.ts +2 -2
- package/src/components/VTreeview/__tests__/__snapshots__/VTreeview.spec.ts.snap +1 -1
- package/src/components/VWindow/VWindow.ts +2 -2
- package/src/components/index.ts +2 -0
- package/src/directives/index.ts +2 -0
- package/src/directives/intersect/__tests__/intersect.spec.ts +47 -0
- package/src/directives/intersect/index.ts +57 -0
- package/src/directives/mutate/__tests__/mutate.spec.ts +130 -0
- package/src/directives/mutate/index.ts +63 -0
- package/src/globals.d.ts +7 -0
- package/src/locale/af.ts +5 -1
- package/src/locale/ar.ts +5 -1
- package/src/locale/ca.ts +5 -1
- package/src/locale/cs.ts +44 -0
- package/src/locale/de.ts +5 -1
- package/src/locale/el.ts +5 -1
- package/src/locale/en.ts +5 -1
- package/src/locale/es.ts +5 -1
- package/src/locale/et.ts +13 -9
- package/src/locale/fa.ts +5 -1
- package/src/locale/fr.ts +5 -1
- package/src/locale/he.ts +5 -1
- package/src/locale/hr.ts +20 -16
- package/src/locale/hu.ts +5 -1
- package/src/locale/id.ts +5 -1
- package/src/locale/index.ts +3 -0
- package/src/locale/it.ts +5 -1
- package/src/locale/ja.ts +5 -1
- package/src/locale/ko.ts +5 -1
- package/src/locale/lt.ts +44 -0
- package/src/locale/lv.ts +5 -1
- package/src/locale/nl.ts +5 -1
- package/src/locale/no.ts +5 -1
- package/src/locale/pl.ts +5 -1
- package/src/locale/pt.ts +5 -1
- package/src/locale/ro.ts +5 -1
- package/src/locale/ru.ts +5 -1
- package/src/locale/sl.ts +13 -9
- package/src/locale/sr-Cyrl.ts +5 -1
- package/src/locale/sv.ts +44 -0
- package/src/locale/th.ts +5 -1
- package/src/locale/tr.ts +5 -1
- package/src/locale/uk.ts +5 -1
- package/src/locale/zh-Hans.ts +5 -1
- package/src/locale/zh-Hant.ts +5 -1
- package/src/mixins/overlayable/index.ts +4 -0
- package/src/services/lang/__tests__/lang.spec.ts +8 -0
- package/src/services/lang/index.ts +6 -2
- package/src/styles/settings/_dark.scss +1 -0
- package/src/styles/settings/_light.scss +1 -0
- package/src/styles/settings/_variables.scss +4 -3
- package/src/util/helpers.ts +3 -5
- package/src/components/VBtnToggle/_variables.sass +0 -6
- package/src/components/VSheet/_variables.scss +0 -1
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
// Imports
|
|
2
|
+
@import '../../styles/styles.sass'
|
|
3
|
+
@import './_variables.scss'
|
|
4
|
+
|
|
5
|
+
// Theme
|
|
6
|
+
+theme(v-skeleton-loader) using ($material)
|
|
7
|
+
.v-skeleton-loader__bone::after
|
|
8
|
+
background: map-get($material, 'skeleton')
|
|
9
|
+
|
|
10
|
+
.v-skeleton-loader__avatar,
|
|
11
|
+
.v-skeleton-loader__button,
|
|
12
|
+
.v-skeleton-loader__chip,
|
|
13
|
+
.v-skeleton-loader__divider,
|
|
14
|
+
.v-skeleton-loader__heading,
|
|
15
|
+
.v-skeleton-loader__image,
|
|
16
|
+
.v-skeleton-loader__text
|
|
17
|
+
background: map-get($material, 'dividers')
|
|
18
|
+
|
|
19
|
+
.v-skeleton-loader__actions,
|
|
20
|
+
.v-skeleton-loader__article,
|
|
21
|
+
.v-skeleton-loader__card-heading,
|
|
22
|
+
.v-skeleton-loader__card-text,
|
|
23
|
+
.v-skeleton-loader__date-picker,
|
|
24
|
+
.v-skeleton-loader__list-item,
|
|
25
|
+
.v-skeleton-loader__list-item-avatar,
|
|
26
|
+
.v-skeleton-loader__list-item-text,
|
|
27
|
+
.v-skeleton-loader__list-item-two-line,
|
|
28
|
+
.v-skeleton-loader__list-item-avatar-two-line,
|
|
29
|
+
.v-skeleton-loader__list-item-three-line,
|
|
30
|
+
.v-skeleton-loader__list-item-avatar-three-line,
|
|
31
|
+
.v-skeleton-loader__table-heading,
|
|
32
|
+
.v-skeleton-loader__table-thead,
|
|
33
|
+
.v-skeleton-loader__table-tbody,
|
|
34
|
+
.v-skeleton-loader__table-tfoot
|
|
35
|
+
background: map-get($material, 'cards')
|
|
36
|
+
|
|
37
|
+
.v-skeleton-loader
|
|
38
|
+
border-radius: $skeleton-loader-border-radius
|
|
39
|
+
position: relative
|
|
40
|
+
vertical-align: top
|
|
41
|
+
|
|
42
|
+
&__actions
|
|
43
|
+
padding: 16px 16px 8px
|
|
44
|
+
text-align: right
|
|
45
|
+
|
|
46
|
+
.v-skeleton-loader__button
|
|
47
|
+
display: inline-block
|
|
48
|
+
|
|
49
|
+
&:first-child
|
|
50
|
+
+ltr()
|
|
51
|
+
margin-right: 12px
|
|
52
|
+
|
|
53
|
+
+rtl()
|
|
54
|
+
margin-left: 12px
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
.v-skeleton-loader__list-item,
|
|
58
|
+
.v-skeleton-loader__list-item-avatar,
|
|
59
|
+
.v-skeleton-loader__list-item-text,
|
|
60
|
+
.v-skeleton-loader__list-item-two-line,
|
|
61
|
+
.v-skeleton-loader__list-item-avatar-two-line,
|
|
62
|
+
.v-skeleton-loader__list-item-three-line,
|
|
63
|
+
.v-skeleton-loader__list-item-avatar-three-line
|
|
64
|
+
border-radius: $skeleton-loader-border-radius
|
|
65
|
+
|
|
66
|
+
.v-skeleton-loader__actions,
|
|
67
|
+
.v-skeleton-loader__article,
|
|
68
|
+
.v-skeleton-loader__card,
|
|
69
|
+
.v-skeleton-loader__card-avatar,
|
|
70
|
+
.v-skeleton-loader__card-heading,
|
|
71
|
+
.v-skeleton-loader__card-text,
|
|
72
|
+
.v-skeleton-loader__date-picker,
|
|
73
|
+
.v-skeleton-loader__date-picker-options,
|
|
74
|
+
.v-skeleton-loader__date-picker-days,
|
|
75
|
+
.v-skeleton-loader__list-item,
|
|
76
|
+
.v-skeleton-loader__list-item-avatar,
|
|
77
|
+
.v-skeleton-loader__list-item-text,
|
|
78
|
+
.v-skeleton-loader__list-item-two-line,
|
|
79
|
+
.v-skeleton-loader__list-item-avatar-two-line,
|
|
80
|
+
.v-skeleton-loader__list-item-three-line,
|
|
81
|
+
.v-skeleton-loader__list-item-avatar-three-line,
|
|
82
|
+
.v-skeleton-loader__paragraph,
|
|
83
|
+
.v-skeleton-loader__sentences,
|
|
84
|
+
.v-skeleton-loader__table,
|
|
85
|
+
.v-skeleton-loader__table-cell,
|
|
86
|
+
.v-skeleton-loader__table-heading,
|
|
87
|
+
.v-skeleton-loader__table-thead,
|
|
88
|
+
.v-skeleton-loader__table-tbody,
|
|
89
|
+
.v-skeleton-loader__table-tfoot,
|
|
90
|
+
.v-skeleton-loader__table-row,
|
|
91
|
+
.v-skeleton-loader__table-row-divider
|
|
92
|
+
&::after
|
|
93
|
+
display: none
|
|
94
|
+
|
|
95
|
+
&__article
|
|
96
|
+
.v-skeleton-loader__heading
|
|
97
|
+
+ltr()
|
|
98
|
+
margin: 16px 0 8px 16px
|
|
99
|
+
|
|
100
|
+
+rtl()
|
|
101
|
+
margin: 16px 8px 0 16px
|
|
102
|
+
|
|
103
|
+
.v-skeleton-loader__paragraph
|
|
104
|
+
padding: 16px
|
|
105
|
+
|
|
106
|
+
&__avatar
|
|
107
|
+
border-radius: 50%
|
|
108
|
+
height: 48px
|
|
109
|
+
width: 48px
|
|
110
|
+
|
|
111
|
+
&__bone
|
|
112
|
+
overflow: hidden
|
|
113
|
+
position: relative
|
|
114
|
+
|
|
115
|
+
&::after
|
|
116
|
+
animation: $skeleton-loader-loading-animation
|
|
117
|
+
content: ''
|
|
118
|
+
height: 100%
|
|
119
|
+
left: 0
|
|
120
|
+
position: absolute
|
|
121
|
+
right: 0
|
|
122
|
+
top: 0
|
|
123
|
+
transform: $skeleton-loader-loading-transform
|
|
124
|
+
z-index: 1
|
|
125
|
+
|
|
126
|
+
&__button
|
|
127
|
+
border-radius: $skeleton-loader-button-border-radius
|
|
128
|
+
height: 36px
|
|
129
|
+
width: 64px
|
|
130
|
+
|
|
131
|
+
&__card-heading
|
|
132
|
+
.v-skeleton-loader__heading
|
|
133
|
+
margin: 16px
|
|
134
|
+
|
|
135
|
+
&__card-text
|
|
136
|
+
padding: 16px
|
|
137
|
+
|
|
138
|
+
&__chip
|
|
139
|
+
border-radius: $skeleton-loader-chip-border-radius
|
|
140
|
+
height: 32px
|
|
141
|
+
width: 96px
|
|
142
|
+
|
|
143
|
+
&__date-picker
|
|
144
|
+
border-radius: $skeleton-loader-date-picker-border-radius
|
|
145
|
+
|
|
146
|
+
.v-skeleton-loader__list-item:first-child
|
|
147
|
+
.v-skeleton-loader__text
|
|
148
|
+
max-width: 88px
|
|
149
|
+
width: 20%
|
|
150
|
+
|
|
151
|
+
.v-skeleton-loader__heading
|
|
152
|
+
max-width: 256px
|
|
153
|
+
width: 40%
|
|
154
|
+
|
|
155
|
+
&__date-picker-days
|
|
156
|
+
display: flex
|
|
157
|
+
flex-wrap: wrap
|
|
158
|
+
padding: 0 12px
|
|
159
|
+
margin: 0 auto
|
|
160
|
+
|
|
161
|
+
.v-skeleton-loader__avatar
|
|
162
|
+
border-radius: $skeleton-loader-border-radius
|
|
163
|
+
flex: 1 1 auto
|
|
164
|
+
margin: 4px
|
|
165
|
+
height: 40px
|
|
166
|
+
width: 40px
|
|
167
|
+
|
|
168
|
+
&__date-picker-options
|
|
169
|
+
align-items: center
|
|
170
|
+
display: flex
|
|
171
|
+
padding: 16px
|
|
172
|
+
|
|
173
|
+
.v-skeleton-loader__avatar
|
|
174
|
+
height: 40px
|
|
175
|
+
width: 40px
|
|
176
|
+
|
|
177
|
+
&:nth-child(2)
|
|
178
|
+
margin-left: auto
|
|
179
|
+
|
|
180
|
+
+ltr()
|
|
181
|
+
margin-right: 8px
|
|
182
|
+
|
|
183
|
+
+rtl()
|
|
184
|
+
margin-left: 8px
|
|
185
|
+
|
|
186
|
+
.v-skeleton-loader__text.v-skeleton-loader__bone:first-child
|
|
187
|
+
margin-bottom: 0px
|
|
188
|
+
max-width: 50%
|
|
189
|
+
width: 456px
|
|
190
|
+
|
|
191
|
+
&__divider
|
|
192
|
+
border-radius: $skeleton-loader-divider-border-radius
|
|
193
|
+
height: 2px
|
|
194
|
+
|
|
195
|
+
&__heading
|
|
196
|
+
border-radius: $skeleton-loader-heading-border-radius
|
|
197
|
+
height: 24px
|
|
198
|
+
width: 45%
|
|
199
|
+
|
|
200
|
+
&__image
|
|
201
|
+
height: 200px
|
|
202
|
+
|
|
203
|
+
&:not(:first-child):not(:last-child)
|
|
204
|
+
border-radius: 0
|
|
205
|
+
|
|
206
|
+
&__list-item
|
|
207
|
+
height: 48px
|
|
208
|
+
|
|
209
|
+
&__list-item-three-line
|
|
210
|
+
flex-wrap: wrap
|
|
211
|
+
|
|
212
|
+
> *
|
|
213
|
+
flex: 1 0 100%
|
|
214
|
+
width: 100%
|
|
215
|
+
|
|
216
|
+
&__list-item-avatar,
|
|
217
|
+
&__list-item-avatar-two-line,
|
|
218
|
+
&__list-item-avatar-three-line
|
|
219
|
+
.v-skeleton-loader__avatar
|
|
220
|
+
height: 40px
|
|
221
|
+
width: 40px
|
|
222
|
+
|
|
223
|
+
&__list-item-avatar
|
|
224
|
+
height: 56px
|
|
225
|
+
|
|
226
|
+
&__list-item-two-line,
|
|
227
|
+
&__list-item-avatar-two-line
|
|
228
|
+
height: 72px
|
|
229
|
+
|
|
230
|
+
&__list-item-three-line,
|
|
231
|
+
&__list-item-avatar-three-line
|
|
232
|
+
height: 88px
|
|
233
|
+
|
|
234
|
+
&__list-item-avatar-three-line
|
|
235
|
+
.v-skeleton-loader__avatar
|
|
236
|
+
align-self: flex-start
|
|
237
|
+
|
|
238
|
+
&__list-item,
|
|
239
|
+
&__list-item-avatar,
|
|
240
|
+
&__list-item-two-line,
|
|
241
|
+
&__list-item-three-line,
|
|
242
|
+
&__list-item-avatar-two-line,
|
|
243
|
+
&__list-item-avatar-three-line
|
|
244
|
+
align-content: center
|
|
245
|
+
align-items: center
|
|
246
|
+
display: flex
|
|
247
|
+
flex-wrap: wrap
|
|
248
|
+
padding: 0 16px
|
|
249
|
+
|
|
250
|
+
.v-skeleton-loader__avatar
|
|
251
|
+
+ltr()
|
|
252
|
+
margin-right: 16px
|
|
253
|
+
|
|
254
|
+
+rtl()
|
|
255
|
+
margin-left: 16px
|
|
256
|
+
|
|
257
|
+
.v-skeleton-loader__text:last-child,
|
|
258
|
+
.v-skeleton-loader__text:only-child
|
|
259
|
+
margin-bottom: 0
|
|
260
|
+
|
|
261
|
+
&__paragraph,
|
|
262
|
+
&__sentences
|
|
263
|
+
flex: 1 0 auto
|
|
264
|
+
|
|
265
|
+
&__paragraph
|
|
266
|
+
&:not(:last-child)
|
|
267
|
+
margin-bottom: 6px
|
|
268
|
+
|
|
269
|
+
.v-skeleton-loader__text:nth-child(1)
|
|
270
|
+
max-width: 100%
|
|
271
|
+
|
|
272
|
+
.v-skeleton-loader__text:nth-child(2)
|
|
273
|
+
max-width: 50%
|
|
274
|
+
|
|
275
|
+
.v-skeleton-loader__text:nth-child(3)
|
|
276
|
+
max-width: 70%
|
|
277
|
+
|
|
278
|
+
&__sentences
|
|
279
|
+
.v-skeleton-loader__text:nth-child(2)
|
|
280
|
+
max-width: 70%
|
|
281
|
+
|
|
282
|
+
&:not(:last-child)
|
|
283
|
+
margin-bottom: 6px
|
|
284
|
+
|
|
285
|
+
&__table-heading
|
|
286
|
+
align-items: center
|
|
287
|
+
display: flex
|
|
288
|
+
justify-content: space-between
|
|
289
|
+
padding: 16px
|
|
290
|
+
|
|
291
|
+
.v-skeleton-loader__heading
|
|
292
|
+
max-width: 15%
|
|
293
|
+
|
|
294
|
+
.v-skeleton-loader__text
|
|
295
|
+
max-width: 40%
|
|
296
|
+
|
|
297
|
+
&__table-thead
|
|
298
|
+
display: flex
|
|
299
|
+
justify-content: space-between
|
|
300
|
+
padding: 16px
|
|
301
|
+
|
|
302
|
+
.v-skeleton-loader__heading
|
|
303
|
+
max-width: 5%
|
|
304
|
+
|
|
305
|
+
&__table-tbody
|
|
306
|
+
padding: 16px 16px 0
|
|
307
|
+
|
|
308
|
+
&__table-tfoot
|
|
309
|
+
align-items: center
|
|
310
|
+
display: flex
|
|
311
|
+
justify-content: flex-end
|
|
312
|
+
padding: 16px
|
|
313
|
+
|
|
314
|
+
> *
|
|
315
|
+
margin-left: 8px
|
|
316
|
+
|
|
317
|
+
.v-skeleton-loader__avatar
|
|
318
|
+
height: 40px
|
|
319
|
+
width: 40px
|
|
320
|
+
|
|
321
|
+
.v-skeleton-loader__text
|
|
322
|
+
margin-bottom: 0
|
|
323
|
+
|
|
324
|
+
&:nth-child(1)
|
|
325
|
+
max-width: 128px
|
|
326
|
+
|
|
327
|
+
&:nth-child(2)
|
|
328
|
+
max-width: 64px
|
|
329
|
+
|
|
330
|
+
&__table-row
|
|
331
|
+
display: flex
|
|
332
|
+
justify-content: space-between
|
|
333
|
+
|
|
334
|
+
&__table-cell
|
|
335
|
+
align-items: center
|
|
336
|
+
display: flex
|
|
337
|
+
height: 48px
|
|
338
|
+
width: 88px
|
|
339
|
+
|
|
340
|
+
.v-skeleton-loader__text
|
|
341
|
+
margin-bottom: 0
|
|
342
|
+
|
|
343
|
+
&__text
|
|
344
|
+
border-radius: $skeleton-loader-text-border-radius
|
|
345
|
+
flex: 1 0 auto
|
|
346
|
+
height: 12px
|
|
347
|
+
margin-bottom: 6px
|
|
348
|
+
|
|
349
|
+
&--boilerplate
|
|
350
|
+
.v-skeleton-loader__bone:after
|
|
351
|
+
display: none
|
|
352
|
+
|
|
353
|
+
&--is-loading
|
|
354
|
+
overflow: hidden
|
|
355
|
+
|
|
356
|
+
&--tile
|
|
357
|
+
border-radius: 0
|
|
358
|
+
|
|
359
|
+
.v-skeleton-loader__bone
|
|
360
|
+
border-radius: 0
|
|
361
|
+
|
|
362
|
+
@keyframes loading
|
|
363
|
+
100%
|
|
364
|
+
transform: translateX(100%)
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// Styles
|
|
2
|
+
import './VSkeletonLoader.sass'
|
|
3
|
+
|
|
4
|
+
// Mixins
|
|
5
|
+
import Elevatable from '../../mixins/elevatable'
|
|
6
|
+
import Measurable from '../../mixins/measurable'
|
|
7
|
+
import Themeable from '../../mixins/themeable'
|
|
8
|
+
|
|
9
|
+
// Utilities
|
|
10
|
+
import mixins from '../../util/mixins'
|
|
11
|
+
|
|
12
|
+
// Types
|
|
13
|
+
import { VNode } from 'vue'
|
|
14
|
+
import { getSlot } from '../../util/helpers'
|
|
15
|
+
|
|
16
|
+
/* @vue/component */
|
|
17
|
+
export default mixins(
|
|
18
|
+
Elevatable,
|
|
19
|
+
Measurable,
|
|
20
|
+
Themeable,
|
|
21
|
+
).extend({
|
|
22
|
+
name: 'VSkeletonLoader',
|
|
23
|
+
|
|
24
|
+
props: {
|
|
25
|
+
boilerplate: Boolean,
|
|
26
|
+
loading: Boolean,
|
|
27
|
+
tile: Boolean,
|
|
28
|
+
transition: String,
|
|
29
|
+
type: String,
|
|
30
|
+
types: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: () => ({}),
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
computed: {
|
|
37
|
+
attrs (): object {
|
|
38
|
+
if (!this.isLoading) return this.$attrs
|
|
39
|
+
|
|
40
|
+
return !this.boilerplate ? {
|
|
41
|
+
'aria-busy': true,
|
|
42
|
+
'aria-live': 'polite',
|
|
43
|
+
role: 'alert',
|
|
44
|
+
...this.$attrs,
|
|
45
|
+
} : {}
|
|
46
|
+
},
|
|
47
|
+
classes (): object {
|
|
48
|
+
return {
|
|
49
|
+
'v-skeleton-loader--boilerplate': this.boilerplate,
|
|
50
|
+
'v-skeleton-loader--is-loading': this.isLoading,
|
|
51
|
+
'v-skeleton-loader--tile': this.tile,
|
|
52
|
+
...this.themeClasses,
|
|
53
|
+
...this.elevationClasses,
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
isLoading (): boolean {
|
|
57
|
+
return Boolean(
|
|
58
|
+
!getSlot(this) ||
|
|
59
|
+
this.loading
|
|
60
|
+
)
|
|
61
|
+
},
|
|
62
|
+
rootTypes (): Record<string, string> {
|
|
63
|
+
return {
|
|
64
|
+
actions: 'button@2',
|
|
65
|
+
article: 'heading, paragraph',
|
|
66
|
+
avatar: 'avatar',
|
|
67
|
+
button: 'button',
|
|
68
|
+
card: 'image, card-heading',
|
|
69
|
+
'card-avatar': 'image, list-item-avatar',
|
|
70
|
+
'card-heading': 'heading',
|
|
71
|
+
chip: 'chip',
|
|
72
|
+
'date-picker': 'list-item, card-heading, divider, date-picker-options, date-picker-days, actions',
|
|
73
|
+
'date-picker-options': 'text, avatar@2',
|
|
74
|
+
'date-picker-days': 'avatar@28',
|
|
75
|
+
heading: 'heading',
|
|
76
|
+
image: 'image',
|
|
77
|
+
'list-item': 'text',
|
|
78
|
+
'list-item-avatar': 'avatar, text',
|
|
79
|
+
'list-item-two-line': 'sentences',
|
|
80
|
+
'list-item-avatar-two-line': 'avatar, sentences',
|
|
81
|
+
'list-item-three-line': 'paragraph',
|
|
82
|
+
'list-item-avatar-three-line': 'avatar, paragraph',
|
|
83
|
+
paragraph: 'text@3',
|
|
84
|
+
sentences: 'text@2',
|
|
85
|
+
table: 'table-heading, table-thead, table-tbody, table-tfoot',
|
|
86
|
+
'table-heading': 'heading, text',
|
|
87
|
+
'table-thead': 'heading@6',
|
|
88
|
+
'table-tbody': 'table-row-divider@6',
|
|
89
|
+
'table-row-divider': 'table-row, divider',
|
|
90
|
+
'table-row': 'table-cell@6',
|
|
91
|
+
'table-cell': 'text',
|
|
92
|
+
'table-tfoot': 'text@2, avatar@2',
|
|
93
|
+
text: 'text',
|
|
94
|
+
...this.types,
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
methods: {
|
|
100
|
+
genBone (text: string, children: VNode[]) {
|
|
101
|
+
return this.$createElement('div', {
|
|
102
|
+
staticClass: `v-skeleton-loader__${text} v-skeleton-loader__bone`,
|
|
103
|
+
}, children)
|
|
104
|
+
},
|
|
105
|
+
genBones (bone: string): VNode[] {
|
|
106
|
+
// e.g. 'text@3'
|
|
107
|
+
const [type, length] = bone.split('@') as [string, number]
|
|
108
|
+
const generator = () => this.genStructure(type)
|
|
109
|
+
|
|
110
|
+
// Generate a length array based upon
|
|
111
|
+
// value after @ in the bone string
|
|
112
|
+
return Array.from({ length }).map(generator)
|
|
113
|
+
},
|
|
114
|
+
// Fix type when this is merged
|
|
115
|
+
// https://github.com/microsoft/TypeScript/pull/33050
|
|
116
|
+
genStructure (type?: string): any {
|
|
117
|
+
let children = []
|
|
118
|
+
type = type || this.type || ''
|
|
119
|
+
const bone = this.rootTypes[type] || ''
|
|
120
|
+
|
|
121
|
+
// End of recursion, do nothing
|
|
122
|
+
/* eslint-disable-next-line no-empty, brace-style */
|
|
123
|
+
if (type === bone) {}
|
|
124
|
+
// Array of values - e.g. 'heading, paragraph, text@2'
|
|
125
|
+
else if (type.indexOf(',') > -1) return this.mapBones(type)
|
|
126
|
+
// Array of values - e.g. 'paragraph@4'
|
|
127
|
+
else if (type.indexOf('@') > -1) return this.genBones(type)
|
|
128
|
+
// Array of values - e.g. 'card@2'
|
|
129
|
+
else if (bone.indexOf(',') > -1) children = this.mapBones(bone)
|
|
130
|
+
// Array of values - e.g. 'list-item@2'
|
|
131
|
+
else if (bone.indexOf('@') > -1) children = this.genBones(bone)
|
|
132
|
+
// Single value - e.g. 'card-heading'
|
|
133
|
+
else if (bone) children.push(this.genStructure(bone))
|
|
134
|
+
|
|
135
|
+
return [this.genBone(type, children)]
|
|
136
|
+
},
|
|
137
|
+
genSkeleton () {
|
|
138
|
+
const children = []
|
|
139
|
+
const slot = getSlot(this)
|
|
140
|
+
|
|
141
|
+
if (!this.isLoading) children.push(slot)
|
|
142
|
+
else children.push(this.genStructure())
|
|
143
|
+
|
|
144
|
+
/* istanbul ignore else */
|
|
145
|
+
if (!this.transition) return children
|
|
146
|
+
|
|
147
|
+
/* istanbul ignore next */
|
|
148
|
+
return this.$createElement('transition', {
|
|
149
|
+
props: {
|
|
150
|
+
name: this.transition,
|
|
151
|
+
},
|
|
152
|
+
// Only show transition when
|
|
153
|
+
// content has been loaded
|
|
154
|
+
on: {
|
|
155
|
+
enter: (el: HTMLElement) => {
|
|
156
|
+
if (this.isLoading) el.style.transition = 'none'
|
|
157
|
+
},
|
|
158
|
+
beforeLeave: (el: HTMLElement) => {
|
|
159
|
+
el.style.display = 'none'
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
}, children)
|
|
163
|
+
},
|
|
164
|
+
mapBones (bones: string) {
|
|
165
|
+
// Remove spaces and return array of structures
|
|
166
|
+
return bones.replace(/\s/g, '').split(',').map(this.genStructure)
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
render (h): VNode {
|
|
171
|
+
return h('div', {
|
|
172
|
+
staticClass: 'v-skeleton-loader',
|
|
173
|
+
attrs: this.attrs,
|
|
174
|
+
on: this.$listeners,
|
|
175
|
+
class: this.classes,
|
|
176
|
+
style: this.isLoading ? this.measurableStyles : undefined,
|
|
177
|
+
}, [this.genSkeleton()])
|
|
178
|
+
},
|
|
179
|
+
})
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// Components
|
|
2
|
+
import VSkeletonLoader from '../VSkeletonLoader'
|
|
3
|
+
|
|
4
|
+
// Utilities
|
|
5
|
+
import {
|
|
6
|
+
mount,
|
|
7
|
+
MountOptions,
|
|
8
|
+
Wrapper,
|
|
9
|
+
} from '@vue/test-utils'
|
|
10
|
+
|
|
11
|
+
describe('VSkeletonLoader.ts', () => {
|
|
12
|
+
type Instance = InstanceType<typeof VSkeletonLoader>
|
|
13
|
+
let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
mountFunction = (options = {}) => {
|
|
17
|
+
return mount(VSkeletonLoader, {
|
|
18
|
+
...options,
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it('should generate an array of elements based upon @ value', () => {
|
|
24
|
+
const wrapper = mountFunction()
|
|
25
|
+
|
|
26
|
+
expect(wrapper.vm.genBones('text@4')).toHaveLength(4)
|
|
27
|
+
expect(wrapper.vm.genBones('text@2')).toHaveLength(2)
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('should generate a skeleton recursive tree', () => {
|
|
31
|
+
const wrapper = mountFunction()
|
|
32
|
+
|
|
33
|
+
for (const key in wrapper.vm.rootTypes) {
|
|
34
|
+
const type = wrapper.vm.rootTypes[key]
|
|
35
|
+
|
|
36
|
+
const iteration = mountFunction({ propsData: { type } })
|
|
37
|
+
|
|
38
|
+
expect(iteration.html()).toMatchSnapshot()
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
it('should dynamically render content', () => {
|
|
43
|
+
const wrapper = mountFunction({
|
|
44
|
+
slots: {
|
|
45
|
+
default: '<div>foobar</div>',
|
|
46
|
+
},
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
50
|
+
|
|
51
|
+
wrapper.setProps({ loading: true })
|
|
52
|
+
|
|
53
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
it('should have the correct a11y attributes when loading', () => {
|
|
57
|
+
const wrapper = mountFunction({
|
|
58
|
+
propsData: { loading: true },
|
|
59
|
+
slots: {
|
|
60
|
+
// Add a default slot to allow
|
|
61
|
+
// toggling the loading prop
|
|
62
|
+
default: '<div>foobar</div>',
|
|
63
|
+
},
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
expect(wrapper.element.getAttribute('aria-busy')).toBe('true')
|
|
67
|
+
expect(wrapper.element.getAttribute('aria-live')).toBe('polite')
|
|
68
|
+
expect(wrapper.element.getAttribute('role')).toBe('alert')
|
|
69
|
+
|
|
70
|
+
wrapper.setProps({ loading: false })
|
|
71
|
+
|
|
72
|
+
expect(wrapper.element.getAttribute('aria-busy')).toBeNull()
|
|
73
|
+
expect(wrapper.element.getAttribute('aria-live')).toBeNull()
|
|
74
|
+
expect(wrapper.element.getAttribute('role')).toBeNull()
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
it('should not render aria attributes when using boilerplate', () => {
|
|
78
|
+
const wrapper = mountFunction({
|
|
79
|
+
propsData: { boilerplate: true },
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
expect(wrapper.vm.attrs).toEqual({})
|
|
83
|
+
})
|
|
84
|
+
})
|