@vuetify/nightly 4.0.0-dev-20230426.0 → 4.0.0-dev-20230427.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/CHANGELOG.md +10 -2
- package/dist/json/attributes.json +218 -194
- package/dist/json/importMap.json +12 -12
- package/dist/json/tags.json +7 -1
- package/dist/json/web-types.json +379 -326
- package/dist/vuetify-labs.css +1361 -1362
- package/dist/vuetify-labs.d.ts +5791 -8230
- package/dist/vuetify-labs.esm.js +1286 -1090
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +1285 -1089
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +29 -30
- package/dist/vuetify.d.ts +5991 -7516
- package/dist/vuetify.esm.js +1248 -1063
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +1247 -1062
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +743 -738
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.ts +1 -1
- package/lib/blueprints/md1.d.ts +1 -1
- package/lib/blueprints/md2.d.ts +1 -1
- package/lib/blueprints/md3.d.ts +1 -1
- package/lib/components/VAlert/VAlert.mjs +6 -4
- package/lib/components/VAlert/VAlert.mjs.map +1 -1
- package/lib/components/VAlert/index.d.ts +57 -55
- package/lib/components/VApp/VApp.mjs +4 -2
- package/lib/components/VApp/VApp.mjs.map +1 -1
- package/lib/components/VApp/index.d.ts +22 -13
- package/lib/components/VAppBar/VAppBar.mjs +3 -3
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.mjs +7 -4
- package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.ts +87 -92
- package/lib/components/VAutocomplete/VAutocomplete.mjs +2 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.ts +225 -403
- package/lib/components/VAvatar/VAvatar.mjs +4 -2
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VAvatar/index.d.ts +23 -14
- package/lib/components/VBadge/VBadge.mjs +6 -5
- package/lib/components/VBadge/VBadge.mjs.map +1 -1
- package/lib/components/VBadge/index.d.ts +27 -22
- package/lib/components/VBanner/VBanner.mjs +6 -4
- package/lib/components/VBanner/VBanner.mjs.map +1 -1
- package/lib/components/VBanner/VBannerActions.mjs +5 -2
- package/lib/components/VBanner/VBannerActions.mjs.map +1 -1
- package/lib/components/VBanner/index.d.ts +92 -66
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs +4 -2
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
- package/lib/components/VBottomNavigation/index.d.ts +22 -13
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +35 -18
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs +6 -3
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +4 -2
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.ts +134 -93
- package/lib/components/VBtn/VBtn.mjs +5 -3
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/index.d.ts +33 -36
- package/lib/components/VBtnGroup/VBtnGroup.mjs +4 -1
- package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
- package/lib/components/VBtnGroup/index.d.ts +22 -13
- package/lib/components/VBtnToggle/VBtnToggle.mjs +4 -2
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VBtnToggle/index.d.ts +30 -21
- package/lib/components/VCard/VCard.mjs +5 -3
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/VCardActions.mjs +7 -4
- package/lib/components/VCard/VCardActions.mjs.map +1 -1
- package/lib/components/VCard/VCardItem.mjs +5 -2
- package/lib/components/VCard/VCardItem.mjs.map +1 -1
- package/lib/components/VCard/index.d.ts +250 -141
- package/lib/components/VCarousel/VCarousel.mjs +3 -3
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/VCarouselItem.mjs +6 -3
- package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.ts +78 -141
- package/lib/components/VCheckbox/VCheckbox.mjs +3 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +2 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.ts +69 -103
- package/lib/components/VChip/VChip.mjs +7 -8
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/index.d.ts +27 -30
- package/lib/components/VChipGroup/VChipGroup.mjs +4 -1
- package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
- package/lib/components/VChipGroup/index.d.ts +22 -13
- package/lib/components/VCode/index.d.ts +30 -17
- package/lib/components/VColorPicker/VColorPicker.mjs +3 -3
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs +5 -2
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.mjs +6 -3
- package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.mjs +6 -3
- package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs +7 -5
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
- package/lib/components/VColorPicker/index.d.ts +34 -1
- package/lib/components/VCombobox/VCombobox.mjs +2 -1
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.ts +225 -403
- package/lib/components/VCounter/VCounter.mjs +4 -1
- package/lib/components/VCounter/VCounter.mjs.map +1 -1
- package/lib/components/VCounter/index.d.ts +22 -145
- package/lib/components/VDefaultsProvider/index.d.ts +0 -12
- package/lib/components/VDialog/VDialog.mjs +4 -3
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/index.d.ts +104 -282
- package/lib/components/VDivider/VDivider.mjs +4 -2
- package/lib/components/VDivider/VDivider.mjs.map +1 -1
- package/lib/components/VDivider/index.d.ts +22 -13
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs +4 -2
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs +4 -1
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +4 -2
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs +4 -1
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.d.ts +109 -81
- package/lib/components/VField/VField.css +0 -1
- package/lib/components/VField/VField.mjs +9 -6
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VField.sass +0 -1
- package/lib/components/VField/VFieldLabel.mjs +6 -3
- package/lib/components/VField/VFieldLabel.mjs.map +1 -1
- package/lib/components/VField/index.d.ts +119 -70
- package/lib/components/VFileInput/VFileInput.mjs +2 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.ts +99 -150
- package/lib/components/VFooter/VFooter.mjs +4 -2
- package/lib/components/VFooter/VFooter.mjs.map +1 -1
- package/lib/components/VFooter/index.d.ts +22 -13
- package/lib/components/VForm/VForm.mjs +5 -2
- package/lib/components/VForm/VForm.mjs.map +1 -1
- package/lib/components/VForm/index.d.ts +30 -17
- package/lib/components/VGrid/VCol.mjs +4 -1
- package/lib/components/VGrid/VCol.mjs.map +1 -1
- package/lib/components/VGrid/VContainer.mjs +4 -1
- package/lib/components/VGrid/VContainer.mjs.map +1 -1
- package/lib/components/VGrid/VRow.mjs +4 -1
- package/lib/components/VGrid/VRow.mjs.map +1 -1
- package/lib/components/VGrid/index.d.ts +104 -60
- package/lib/components/VHover/index.d.ts +20 -44
- package/lib/components/VIcon/VIcon.mjs +4 -2
- package/lib/components/VIcon/VIcon.mjs.map +1 -1
- package/lib/components/VIcon/index.d.ts +23 -26
- package/lib/components/VImg/VImg.mjs +5 -3
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/index.d.ts +26 -29
- package/lib/components/VInput/VInput.mjs +4 -1
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.ts +31 -34
- package/lib/components/VItemGroup/VItemGroup.mjs +4 -1
- package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
- package/lib/components/VItemGroup/index.d.ts +30 -33
- package/lib/components/VKbd/index.d.ts +30 -17
- package/lib/components/VLabel/VLabel.mjs +4 -1
- package/lib/components/VLabel/VLabel.mjs.map +1 -1
- package/lib/components/VLabel/index.d.ts +22 -13
- package/lib/components/VLayout/VLayout.mjs +8 -4
- package/lib/components/VLayout/VLayout.mjs.map +1 -1
- package/lib/components/VLayout/VLayoutItem.mjs +4 -2
- package/lib/components/VLayout/VLayoutItem.mjs.map +1 -1
- package/lib/components/VLayout/index.d.ts +44 -26
- package/lib/components/VLazy/VLazy.mjs +4 -2
- package/lib/components/VLazy/VLazy.mjs.map +1 -1
- package/lib/components/VLazy/index.d.ts +22 -13
- package/lib/components/VList/VList.mjs +7 -24
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListChildren.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +5 -2
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +4 -2
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListItemAction.mjs +4 -1
- package/lib/components/VList/VListItemAction.mjs.map +1 -1
- package/lib/components/VList/VListItemMedia.mjs +4 -1
- package/lib/components/VList/VListItemMedia.mjs.map +1 -1
- package/lib/components/VList/VListSubheader.mjs +5 -3
- package/lib/components/VList/VListSubheader.mjs.map +1 -1
- package/lib/components/VList/index.d.ts +932 -826
- package/lib/components/VLocaleProvider/VLocaleProvider.mjs +5 -2
- package/lib/components/VLocaleProvider/VLocaleProvider.mjs.map +1 -1
- package/lib/components/VLocaleProvider/index.d.ts +30 -17
- package/lib/components/VMain/VMain.mjs +4 -2
- package/lib/components/VMain/VMain.mjs.map +1 -1
- package/lib/components/VMain/index.d.ts +30 -17
- package/lib/components/VMenu/VMenu.mjs +2 -1
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.ts +104 -282
- package/lib/components/VMessages/VMessages.mjs +4 -2
- package/lib/components/VMessages/VMessages.mjs.map +1 -1
- package/lib/components/VMessages/index.d.ts +22 -145
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +4 -2
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/index.d.ts +26 -29
- package/lib/components/VNoSsr/VNoSsr.mjs.map +1 -1
- package/lib/components/VNoSsr/index.d.ts +3 -13
- package/lib/components/VOverlay/VOverlay.mjs +5 -3
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.ts +38 -45
- package/lib/components/VPagination/VPagination.mjs +4 -1
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VPagination/index.d.ts +23 -30
- package/lib/components/VParallax/VParallax.mjs +5 -2
- package/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/lib/components/VParallax/index.d.ts +34 -33
- package/lib/components/VProgressCircular/VProgressCircular.mjs +4 -2
- package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
- package/lib/components/VProgressCircular/index.d.ts +22 -13
- package/lib/components/VProgressLinear/VProgressLinear.mjs +6 -4
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/index.d.ts +42 -45
- package/lib/components/VRadio/VRadio.mjs +2 -1
- package/lib/components/VRadio/VRadio.mjs.map +1 -1
- package/lib/components/VRadio/index.d.ts +27 -38
- package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +39 -62
- package/lib/components/VRangeSlider/VRangeSlider.mjs +2 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.ts +27 -38
- package/lib/components/VRating/VRating.mjs +4 -1
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VRating/index.d.ts +23 -18
- package/lib/components/VResponsive/VResponsive.mjs +4 -2
- package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
- package/lib/components/VResponsive/index.d.ts +43 -31
- package/lib/components/VSelect/VSelect.mjs +2 -1
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +194 -552
- package/lib/components/VSelectionControl/VSelectionControl.mjs +6 -2
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.ts +76 -46
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +4 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/index.d.ts +23 -14
- package/lib/components/VSheet/VSheet.mjs +4 -2
- package/lib/components/VSheet/VSheet.mjs.map +1 -1
- package/lib/components/VSheet/index.d.ts +22 -13
- package/lib/components/VSlideGroup/VSlideGroup.mjs +6 -3
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.ts +59 -90
- package/lib/components/VSlider/VSlider.mjs +2 -1
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/VSliderThumb.mjs +6 -4
- package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
- package/lib/components/VSlider/VSliderTrack.mjs +6 -4
- package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
- package/lib/components/VSlider/index.d.ts +27 -38
- package/lib/components/VSnackbar/VSnackbar.mjs +2 -1
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.ts +92 -142
- package/lib/components/VSwitch/VSwitch.mjs +2 -1
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +39 -66
- package/lib/components/VSystemBar/VSystemBar.mjs +4 -2
- package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
- package/lib/components/VSystemBar/index.d.ts +22 -13
- package/lib/components/VTable/VTable.mjs +4 -1
- package/lib/components/VTable/VTable.mjs.map +1 -1
- package/lib/components/VTable/index.d.ts +26 -29
- package/lib/components/VTabs/VTab.mjs +2 -2
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.mjs +2 -2
- package/lib/components/VTabs/VTabs.mjs.map +1 -1
- package/lib/components/VTabs/index.d.ts +45 -27
- package/lib/components/VTextField/VTextField.mjs +2 -1
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.ts +208 -269
- package/lib/components/VTextarea/VTextarea.mjs +2 -1
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +79 -122
- package/lib/components/VThemeProvider/VThemeProvider.mjs +6 -3
- package/lib/components/VThemeProvider/VThemeProvider.mjs.map +1 -1
- package/lib/components/VThemeProvider/index.d.ts +22 -13
- package/lib/components/VTimeline/VTimeline.mjs +5 -3
- package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
- package/lib/components/VTimeline/VTimelineDivider.mjs +4 -1
- package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
- package/lib/components/VTimeline/VTimelineItem.mjs +8 -6
- package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
- package/lib/components/VTimeline/index.d.ts +67 -57
- package/lib/components/VToolbar/VToolbar.mjs +4 -2
- package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbarItems.mjs +9 -4
- package/lib/components/VToolbar/VToolbarItems.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbarTitle.mjs +5 -2
- package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -1
- package/lib/components/VToolbar/index.d.ts +74 -71
- package/lib/components/VTooltip/VTooltip.mjs +2 -1
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VTooltip/index.d.ts +104 -150
- package/lib/components/VValidation/index.d.ts +0 -12
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs +21 -23
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScrollItem.mjs +5 -2
- package/lib/components/VVirtualScroll/VVirtualScrollItem.mjs.map +1 -1
- package/lib/components/VVirtualScroll/index.d.ts +70 -30
- package/lib/components/VWindow/VWindow.mjs +4 -1
- package/lib/components/VWindow/VWindow.mjs.map +1 -1
- package/lib/components/VWindow/VWindowItem.mjs +4 -1
- package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
- package/lib/components/VWindow/index.d.ts +61 -79
- package/lib/components/index.d.ts +5229 -6754
- package/lib/components/transitions/index.d.ts +0 -192
- package/lib/composables/component.mjs +11 -0
- package/lib/composables/component.mjs.map +1 -0
- package/lib/composables/defaults.mjs +51 -5
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/icons.mjs +15 -4
- package/lib/composables/icons.mjs.map +1 -1
- package/lib/composables/index.mjs +1 -1
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/loader.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +2 -2
- package/lib/framework.mjs.map +1 -1
- package/lib/iconsets/fa-svg.d.ts +1 -1
- package/lib/iconsets/fa.d.ts +1 -1
- package/lib/iconsets/fa4.d.ts +1 -1
- package/lib/iconsets/md.d.ts +1 -1
- package/lib/iconsets/mdi-svg.d.ts +1 -1
- package/lib/iconsets/mdi.d.ts +1 -1
- package/lib/index.d.ts +11 -11
- package/lib/labs/VDataTable/VDataTable.mjs +1 -1
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableHeaders.mjs +34 -20
- package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRow.mjs +2 -4
- package/lib/labs/VDataTable/VDataTableRow.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +2 -2
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.ts +61 -933
- package/lib/labs/VInfiniteScroll/index.d.ts +8 -36
- package/lib/labs/VSkeletonLoader/index.d.ts +0 -12
- package/lib/labs/components.d.ts +115 -1027
- package/lib/labs/date/DateAdapter.mjs +2 -0
- package/lib/labs/date/DateAdapter.mjs.map +1 -0
- package/lib/labs/date/adapters/vuetify.d.ts +52 -0
- package/lib/{adapters → labs/date/adapters}/vuetify.mjs +2 -2
- package/lib/labs/date/adapters/vuetify.mjs.map +1 -0
- package/lib/{composables → labs/date}/date.mjs +3 -3
- package/lib/labs/date/date.mjs.map +1 -0
- package/lib/labs/date/index.d.ts +40 -0
- package/lib/labs/date/index.mjs +2 -0
- package/lib/labs/date/index.mjs.map +1 -0
- package/lib/labs/index.mjs +3 -2
- package/lib/labs/index.mjs.map +1 -1
- package/lib/util/createSimpleFunctional.mjs +9 -4
- package/lib/util/createSimpleFunctional.mjs.map +1 -1
- package/lib/util/defineComponent.mjs +11 -43
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/helpers.mjs +28 -2
- package/lib/util/helpers.mjs.map +1 -1
- package/lib/util/index.mjs +1 -0
- package/lib/util/index.mjs.map +1 -1
- package/package.json +2 -1
- package/lib/adapters/date-adapter.mjs +0 -2
- package/lib/adapters/date-adapter.mjs.map +0 -1
- package/lib/adapters/vuetify.mjs.map +0 -1
- package/lib/composables/date.mjs.map +0 -1
@@ -4,6 +4,7 @@ import "./VFooter.css";
|
|
4
4
|
|
5
5
|
// Composables
|
6
6
|
import { makeBorderProps, useBorder } from "../../composables/border.mjs";
|
7
|
+
import { makeComponentProps } from "../../composables/component.mjs";
|
7
8
|
import { makeElevationProps, useElevation } from "../../composables/elevation.mjs";
|
8
9
|
import { makeLayoutItemProps, useLayoutItem } from "../../composables/layout.mjs";
|
9
10
|
import { makeRoundedProps, useRounded } from "../../composables/rounded.mjs";
|
@@ -23,6 +24,7 @@ export const VFooter = genericComponent()({
|
|
23
24
|
default: 'auto'
|
24
25
|
},
|
25
26
|
...makeBorderProps(),
|
27
|
+
...makeComponentProps(),
|
26
28
|
...makeElevationProps(),
|
27
29
|
...makeLayoutItemProps(),
|
28
30
|
...makeRoundedProps(),
|
@@ -72,8 +74,8 @@ export const VFooter = genericComponent()({
|
|
72
74
|
});
|
73
75
|
useRender(() => _createVNode(props.tag, {
|
74
76
|
"ref": resizeRef,
|
75
|
-
"class": ['v-footer', themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value],
|
76
|
-
"style": [backgroundColorStyles.value, props.app ? layoutItemStyles.value : undefined]
|
77
|
+
"class": ['v-footer', themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
78
|
+
"style": [backgroundColorStyles.value, props.app ? layoutItemStyles.value : undefined, props.style]
|
77
79
|
}, slots));
|
78
80
|
return {};
|
79
81
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VFooter.mjs","names":["makeBorderProps","useBorder","makeElevationProps","useElevation","makeLayoutItemProps","useLayoutItem","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","useBackgroundColor","useResizeObserver","computed","ref","toRef","genericComponent","useRender","VFooter","name","props","app","Boolean","color","String","height","type","Number","default","tag","setup","_ref","slots","themeClasses","backgroundColorClasses","backgroundColorStyles","borderClasses","elevationClasses","roundedClasses","autoHeight","resizeRef","entries","length","value","target","clientHeight","parseInt","layoutItemStyles","id","order","position","layoutSize","elementSize","undefined","active","absolute","_createVNode"],"sources":["../../../src/components/VFooter/VFooter.tsx"],"sourcesContent":["// Styles\nimport './VFooter.sass'\n\n// Composables\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeLayoutItemProps, useLayoutItem } from '@/composables/layout'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { useBackgroundColor } from '@/composables/color'\nimport { useResizeObserver } from '@/composables/resizeObserver'\n\n// Utilities\nimport { computed, ref, toRef } from 'vue'\nimport { genericComponent, useRender } from '@/util'\n\nexport const VFooter = genericComponent()({\n name: 'VFooter',\n\n props: {\n app: Boolean,\n color: String,\n height: {\n type: [Number, String],\n default: 'auto',\n },\n\n ...makeBorderProps(),\n ...makeElevationProps(),\n ...makeLayoutItemProps(),\n ...makeRoundedProps(),\n ...makeTagProps({ tag: 'footer' }),\n ...makeThemeProps(),\n },\n\n setup (props, { slots }) {\n const { themeClasses } = provideTheme(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'color'))\n const { borderClasses } = useBorder(props)\n const { elevationClasses } = useElevation(props)\n const { roundedClasses } = useRounded(props)\n\n const autoHeight = ref(32)\n const { resizeRef } = useResizeObserver(entries => {\n if (!entries.length) return\n autoHeight.value = entries[0].target.clientHeight\n })\n const height = computed(() => props.height === 'auto' ? autoHeight.value : parseInt(props.height, 10))\n const { layoutItemStyles } = useLayoutItem({\n id: props.name,\n order: computed(() => parseInt(props.order, 10)),\n position: computed(() => 'bottom'),\n layoutSize: height,\n elementSize: computed(() => props.height === 'auto' ? undefined : height.value),\n active: computed(() => props.app),\n absolute: toRef(props, 'absolute'),\n })\n\n useRender(() => (\n <props.tag\n ref={ resizeRef }\n class={[\n 'v-footer',\n themeClasses.value,\n backgroundColorClasses.value,\n borderClasses.value,\n elevationClasses.value,\n roundedClasses.value,\n ]}\n style={[\n backgroundColorStyles.value,\n props.app ? layoutItemStyles.value : undefined,\n ]}\n v-slots={ slots }\n />\n ))\n\n return {}\n },\n})\n\nexport type VFooter = InstanceType<typeof VFooter>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,mBAAmB,EAAEC,aAAa;AAAA,SAClCC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,kBAAkB;AAAA,SAClBC,iBAAiB,gDAE1B;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACjCC,gBAAgB,EAAEC,SAAS;AAEpC,OAAO,MAAMC,OAAO,GAAGF,gBAAgB,EAAE,CAAC;EACxCG,IAAI,EAAE,SAAS;EAEfC,KAAK,EAAE;IACLC,GAAG,EAAEC,OAAO;IACZC,KAAK,EAAEC,MAAM;IACbC,MAAM,EAAE;MACNC,IAAI,EAAE,CAACC,MAAM,EAAEH,MAAM,CAAC;MACtBI,OAAO,EAAE;IACX,CAAC;IAED,
|
1
|
+
{"version":3,"file":"VFooter.mjs","names":["makeBorderProps","useBorder","makeComponentProps","makeElevationProps","useElevation","makeLayoutItemProps","useLayoutItem","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","useBackgroundColor","useResizeObserver","computed","ref","toRef","genericComponent","useRender","VFooter","name","props","app","Boolean","color","String","height","type","Number","default","tag","setup","_ref","slots","themeClasses","backgroundColorClasses","backgroundColorStyles","borderClasses","elevationClasses","roundedClasses","autoHeight","resizeRef","entries","length","value","target","clientHeight","parseInt","layoutItemStyles","id","order","position","layoutSize","elementSize","undefined","active","absolute","_createVNode","class","style"],"sources":["../../../src/components/VFooter/VFooter.tsx"],"sourcesContent":["// Styles\nimport './VFooter.sass'\n\n// Composables\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeLayoutItemProps, useLayoutItem } from '@/composables/layout'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { useBackgroundColor } from '@/composables/color'\nimport { useResizeObserver } from '@/composables/resizeObserver'\n\n// Utilities\nimport { computed, ref, toRef } from 'vue'\nimport { genericComponent, useRender } from '@/util'\n\nexport const VFooter = genericComponent()({\n name: 'VFooter',\n\n props: {\n app: Boolean,\n color: String,\n height: {\n type: [Number, String],\n default: 'auto',\n },\n\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeElevationProps(),\n ...makeLayoutItemProps(),\n ...makeRoundedProps(),\n ...makeTagProps({ tag: 'footer' }),\n ...makeThemeProps(),\n },\n\n setup (props, { slots }) {\n const { themeClasses } = provideTheme(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'color'))\n const { borderClasses } = useBorder(props)\n const { elevationClasses } = useElevation(props)\n const { roundedClasses } = useRounded(props)\n\n const autoHeight = ref(32)\n const { resizeRef } = useResizeObserver(entries => {\n if (!entries.length) return\n autoHeight.value = entries[0].target.clientHeight\n })\n const height = computed(() => props.height === 'auto' ? autoHeight.value : parseInt(props.height, 10))\n const { layoutItemStyles } = useLayoutItem({\n id: props.name,\n order: computed(() => parseInt(props.order, 10)),\n position: computed(() => 'bottom'),\n layoutSize: height,\n elementSize: computed(() => props.height === 'auto' ? undefined : height.value),\n active: computed(() => props.app),\n absolute: toRef(props, 'absolute'),\n })\n\n useRender(() => (\n <props.tag\n ref={ resizeRef }\n class={[\n 'v-footer',\n themeClasses.value,\n backgroundColorClasses.value,\n borderClasses.value,\n elevationClasses.value,\n roundedClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n props.app ? layoutItemStyles.value : undefined,\n props.style,\n ]}\n v-slots={ slots }\n />\n ))\n\n return {}\n },\n})\n\nexport type VFooter = InstanceType<typeof VFooter>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB;AAAA,SAClBC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,mBAAmB,EAAEC,aAAa;AAAA,SAClCC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,kBAAkB;AAAA,SAClBC,iBAAiB,gDAE1B;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACjCC,gBAAgB,EAAEC,SAAS;AAEpC,OAAO,MAAMC,OAAO,GAAGF,gBAAgB,EAAE,CAAC;EACxCG,IAAI,EAAE,SAAS;EAEfC,KAAK,EAAE;IACLC,GAAG,EAAEC,OAAO;IACZC,KAAK,EAAEC,MAAM;IACbC,MAAM,EAAE;MACNC,IAAI,EAAE,CAACC,MAAM,EAAEH,MAAM,CAAC;MACtBI,OAAO,EAAE;IACX,CAAC;IAED,GAAG7B,eAAe,EAAE;IACpB,GAAGE,kBAAkB,EAAE;IACvB,GAAGC,kBAAkB,EAAE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EAAE,EAAE,CAAC,CAAC;MAChDC,QAAQ,EAAErC,QAAQ,CAAC,MAAM,QAAQ,CAAC;MAClCsC,UAAU,EAAE1B,MAAM;MAClB2B,WAAW,EAAEvC,QAAQ,CAAC,MAAMO,KAAK,CAACK,MAAM,KAAK,MAAM,GAAG4B,SAAS,GAAG5B,MAAM,CAACkB,KAAK,CAAC;MAC/EW,MAAM,EAAEzC,QAAQ,CAAC,MAAMO,KAAK,CAACC,GAAG,CAAC;MACjCkC,QAAQ,EAAExC,KAAK,CAACK,KAAK,EAAE,UAAU;IACnC,CAAC,CAAC;IAEFH,SAAS,CAAC,MAAAuC,YAAA,CAAApC,KAAA,CAAAS,GAAA;MAAA,OAEAW,SAAS;MAAA,SACR,CACL,UAAU,EACVP,YAAY,CAACU,KAAK,EAClBT,sBAAsB,CAACS,KAAK,EAC5BP,aAAa,CAACO,KAAK,EACnBN,gBAAgB,CAACM,KAAK,EACtBL,cAAc,CAACK,KAAK,EACpBvB,KAAK,CAACqC,KAAK,CACZ;MAAA,SACM,CACLtB,qBAAqB,CAACQ,KAAK,EAC3BvB,KAAK,CAACC,GAAG,GAAG0B,gBAAgB,CAACJ,KAAK,GAAGU,SAAS,EAC9CjC,KAAK,CAACsC,KAAK;IACZ,GACS1B,KAAK,CAElB,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
@@ -13,6 +13,7 @@ declare const VFooter: {
|
|
13
13
|
absolute: boolean;
|
14
14
|
height: string | number;
|
15
15
|
order: string | number;
|
16
|
+
style: vue.StyleValue;
|
16
17
|
tag: string;
|
17
18
|
app: boolean;
|
18
19
|
rounded: string | number | boolean;
|
@@ -20,12 +21,14 @@ declare const VFooter: {
|
|
20
21
|
absolute: boolean;
|
21
22
|
height: string | number;
|
22
23
|
order: string | number;
|
24
|
+
style: vue.StyleValue;
|
23
25
|
tag: string;
|
24
26
|
app: boolean;
|
25
27
|
} & {
|
26
28
|
name?: string | undefined;
|
27
29
|
border?: string | number | boolean | undefined;
|
28
30
|
color?: string | undefined;
|
31
|
+
class?: any;
|
29
32
|
elevation?: string | number | undefined;
|
30
33
|
theme?: string | undefined;
|
31
34
|
rounded?: string | number | boolean | undefined;
|
@@ -33,15 +36,12 @@ declare const VFooter: {
|
|
33
36
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
34
37
|
default?: (() => vue.VNodeChild) | undefined;
|
35
38
|
};
|
36
|
-
$slots?: {
|
37
|
-
default?: (() => vue.VNodeChild) | undefined;
|
38
|
-
} | undefined;
|
39
39
|
'v-slots'?: {
|
40
40
|
default?: false | (() => vue.VNodeChild) | undefined;
|
41
41
|
} | undefined;
|
42
42
|
} & {
|
43
43
|
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
44
|
-
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "absolute" | "height" | "order" | "tag" | "app" | "rounded">;
|
44
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "absolute" | "height" | "order" | "style" | "tag" | "app" | "rounded">;
|
45
45
|
$attrs: {
|
46
46
|
[x: string]: unknown;
|
47
47
|
};
|
@@ -59,12 +59,14 @@ declare const VFooter: {
|
|
59
59
|
absolute: boolean;
|
60
60
|
height: string | number;
|
61
61
|
order: string | number;
|
62
|
+
style: vue.StyleValue;
|
62
63
|
tag: string;
|
63
64
|
app: boolean;
|
64
65
|
} & {
|
65
66
|
name?: string | undefined;
|
66
67
|
border?: string | number | boolean | undefined;
|
67
68
|
color?: string | undefined;
|
69
|
+
class?: any;
|
68
70
|
elevation?: string | number | undefined;
|
69
71
|
theme?: string | undefined;
|
70
72
|
rounded?: string | number | boolean | undefined;
|
@@ -72,9 +74,6 @@ declare const VFooter: {
|
|
72
74
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
73
75
|
default?: (() => vue.VNodeChild) | undefined;
|
74
76
|
};
|
75
|
-
$slots?: {
|
76
|
-
default?: (() => vue.VNodeChild) | undefined;
|
77
|
-
} | undefined;
|
78
77
|
'v-slots'?: {
|
79
78
|
default?: false | (() => vue.VNodeChild) | undefined;
|
80
79
|
} | undefined;
|
@@ -84,6 +83,7 @@ declare const VFooter: {
|
|
84
83
|
absolute: boolean;
|
85
84
|
height: string | number;
|
86
85
|
order: string | number;
|
86
|
+
style: vue.StyleValue;
|
87
87
|
tag: string;
|
88
88
|
app: boolean;
|
89
89
|
rounded: string | number | boolean;
|
@@ -111,12 +111,14 @@ declare const VFooter: {
|
|
111
111
|
absolute: boolean;
|
112
112
|
height: string | number;
|
113
113
|
order: string | number;
|
114
|
+
style: vue.StyleValue;
|
114
115
|
tag: string;
|
115
116
|
app: boolean;
|
116
117
|
} & {
|
117
118
|
name?: string | undefined;
|
118
119
|
border?: string | number | boolean | undefined;
|
119
120
|
color?: string | undefined;
|
121
|
+
class?: any;
|
120
122
|
elevation?: string | number | undefined;
|
121
123
|
theme?: string | undefined;
|
122
124
|
rounded?: string | number | boolean | undefined;
|
@@ -124,9 +126,6 @@ declare const VFooter: {
|
|
124
126
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
125
127
|
default?: (() => vue.VNodeChild) | undefined;
|
126
128
|
};
|
127
|
-
$slots?: {
|
128
|
-
default?: (() => vue.VNodeChild) | undefined;
|
129
|
-
} | undefined;
|
130
129
|
'v-slots'?: {
|
131
130
|
default?: false | (() => vue.VNodeChild) | undefined;
|
132
131
|
} | undefined;
|
@@ -140,12 +139,14 @@ declare const VFooter: {
|
|
140
139
|
absolute: boolean;
|
141
140
|
height: string | number;
|
142
141
|
order: string | number;
|
142
|
+
style: vue.StyleValue;
|
143
143
|
tag: string;
|
144
144
|
app: boolean;
|
145
145
|
} & {
|
146
146
|
name?: string | undefined;
|
147
147
|
border?: string | number | boolean | undefined;
|
148
148
|
color?: string | undefined;
|
149
|
+
class?: any;
|
149
150
|
elevation?: string | number | undefined;
|
150
151
|
theme?: string | undefined;
|
151
152
|
rounded?: string | number | boolean | undefined;
|
@@ -153,9 +154,6 @@ declare const VFooter: {
|
|
153
154
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
154
155
|
default?: (() => vue.VNodeChild) | undefined;
|
155
156
|
};
|
156
|
-
$slots?: {
|
157
|
-
default?: (() => vue.VNodeChild) | undefined;
|
158
|
-
} | undefined;
|
159
157
|
'v-slots'?: {
|
160
158
|
default?: false | (() => vue.VNodeChild) | undefined;
|
161
159
|
} | undefined;
|
@@ -165,6 +163,7 @@ declare const VFooter: {
|
|
165
163
|
absolute: boolean;
|
166
164
|
height: string | number;
|
167
165
|
order: string | number;
|
166
|
+
style: vue.StyleValue;
|
168
167
|
tag: string;
|
169
168
|
app: boolean;
|
170
169
|
rounded: string | number | boolean;
|
@@ -193,6 +192,11 @@ declare const VFooter: {
|
|
193
192
|
type: (StringConstructor | NumberConstructor)[];
|
194
193
|
validator(v: any): boolean;
|
195
194
|
};
|
195
|
+
class: vue.PropType<any>;
|
196
|
+
style: {
|
197
|
+
type: vue.PropType<vue.StyleValue>;
|
198
|
+
default: null;
|
199
|
+
};
|
196
200
|
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
197
201
|
app: BooleanConstructor;
|
198
202
|
color: StringConstructor;
|
@@ -225,6 +229,11 @@ declare const VFooter: {
|
|
225
229
|
type: (StringConstructor | NumberConstructor)[];
|
226
230
|
validator(v: any): boolean;
|
227
231
|
};
|
232
|
+
class: vue.PropType<any>;
|
233
|
+
style: {
|
234
|
+
type: vue.PropType<vue.StyleValue>;
|
235
|
+
default: null;
|
236
|
+
};
|
228
237
|
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
229
238
|
app: BooleanConstructor;
|
230
239
|
color: StringConstructor;
|
@@ -1,12 +1,14 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
2
|
// Composables
|
3
3
|
import { createForm, makeFormProps } from "../../composables/form.mjs";
|
4
|
-
import { forwardRefs } from "../../composables/forwardRefs.mjs";
|
4
|
+
import { forwardRefs } from "../../composables/forwardRefs.mjs";
|
5
|
+
import { makeComponentProps } from "../../composables/component.mjs"; // Utilities
|
5
6
|
import { ref } from 'vue';
|
6
7
|
import { genericComponent, useRender } from "../../util/index.mjs"; // Types
|
7
8
|
export const VForm = genericComponent()({
|
8
9
|
name: 'VForm',
|
9
10
|
props: {
|
11
|
+
...makeComponentProps(),
|
10
12
|
...makeFormProps()
|
11
13
|
},
|
12
14
|
emits: {
|
@@ -45,7 +47,8 @@ export const VForm = genericComponent()({
|
|
45
47
|
}
|
46
48
|
useRender(() => _createVNode("form", {
|
47
49
|
"ref": formRef,
|
48
|
-
"class":
|
50
|
+
"class": ['v-form', props.class],
|
51
|
+
"style": props.style,
|
49
52
|
"novalidate": true,
|
50
53
|
"onReset": onReset,
|
51
54
|
"onSubmit": onSubmit
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VForm.mjs","names":["createForm","makeFormProps","forwardRefs","ref","genericComponent","useRender","VForm","name","props","emits","val","submit","e","setup","_ref","slots","emit","form","formRef","onReset","preventDefault","reset","onSubmit","_e","ready","validate","then","bind","catch","finally","defaultPrevented","_ref2","valid","value","_createVNode","default"],"sources":["../../../src/components/VForm/VForm.tsx"],"sourcesContent":["// Composables\nimport { createForm, makeFormProps } from '@/composables/form'\nimport { forwardRefs } from '@/composables/forwardRefs'\n\n// Utilities\nimport { ref } from 'vue'\nimport { genericComponent, useRender } from '@/util'\n\n// Types\nimport type { SubmitEventPromise } from '@/composables/form'\n\nexport const VForm = genericComponent()({\n name: 'VForm',\n\n props: {\n ...makeFormProps(),\n },\n\n emits: {\n 'update:modelValue': (val: boolean | null) => true,\n submit: (e: SubmitEventPromise) => true,\n },\n\n setup (props, { slots, emit }) {\n const form = createForm(props)\n const formRef = ref<HTMLFormElement>()\n\n function onReset (e: Event) {\n e.preventDefault()\n form.reset()\n }\n\n function onSubmit (_e: Event) {\n const e = _e as SubmitEventPromise\n\n const ready = form.validate()\n e.then = ready.then.bind(ready)\n e.catch = ready.catch.bind(ready)\n e.finally = ready.finally.bind(ready)\n\n emit('submit', e)\n\n if (!e.defaultPrevented) {\n ready.then(({ valid }) => {\n if (valid) {\n formRef.value?.submit()\n }\n })\n }\n\n e.preventDefault()\n }\n\n useRender(() => ((\n <form\n ref={ formRef }\n class
|
1
|
+
{"version":3,"file":"VForm.mjs","names":["createForm","makeFormProps","forwardRefs","makeComponentProps","ref","genericComponent","useRender","VForm","name","props","emits","val","submit","e","setup","_ref","slots","emit","form","formRef","onReset","preventDefault","reset","onSubmit","_e","ready","validate","then","bind","catch","finally","defaultPrevented","_ref2","valid","value","_createVNode","class","style","default"],"sources":["../../../src/components/VForm/VForm.tsx"],"sourcesContent":["// Composables\nimport { createForm, makeFormProps } from '@/composables/form'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { makeComponentProps } from '@/composables/component'\n\n// Utilities\nimport { ref } from 'vue'\nimport { genericComponent, useRender } from '@/util'\n\n// Types\nimport type { SubmitEventPromise } from '@/composables/form'\n\nexport const VForm = genericComponent()({\n name: 'VForm',\n\n props: {\n ...makeComponentProps(),\n ...makeFormProps(),\n },\n\n emits: {\n 'update:modelValue': (val: boolean | null) => true,\n submit: (e: SubmitEventPromise) => true,\n },\n\n setup (props, { slots, emit }) {\n const form = createForm(props)\n const formRef = ref<HTMLFormElement>()\n\n function onReset (e: Event) {\n e.preventDefault()\n form.reset()\n }\n\n function onSubmit (_e: Event) {\n const e = _e as SubmitEventPromise\n\n const ready = form.validate()\n e.then = ready.then.bind(ready)\n e.catch = ready.catch.bind(ready)\n e.finally = ready.finally.bind(ready)\n\n emit('submit', e)\n\n if (!e.defaultPrevented) {\n ready.then(({ valid }) => {\n if (valid) {\n formRef.value?.submit()\n }\n })\n }\n\n e.preventDefault()\n }\n\n useRender(() => ((\n <form\n ref={ formRef }\n class={[\n 'v-form',\n props.class,\n ]}\n style={ props.style }\n novalidate\n onReset={ onReset }\n onSubmit={ onSubmit }\n >\n { slots.default?.(form) }\n </form>\n )))\n\n return forward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ACA,CAAC,CAACkB,gBAAgB,EAAE;QACvBN,KAAK,CAACE,IAAI,CAACK,KAAA,IAAe;UAAA,IAAd;YAAEC;UAAM,CAAC,GAAAD,KAAA;UACnB,IAAIC,KAAK,EAAE;YACTd,OAAO,CAACe,KAAK,EAAEtB,MAAM,EAAE;UACzB;QACF,CAAC,CAAC;MACJ;MAEAC,CAAC,CAACQ,cAAc,EAAE;IACpB;IAEAf,SAAS,CAAC,MAAA6B,YAAA;MAAA,OAEAhB,OAAO;MAAA,SACN,CACL,QAAQ,EACRV,KAAK,CAAC2B,KAAK,CACZ;MAAA,SACO3B,KAAK,CAAC4B,KAAK;MAAA;MAAA,WAETjB,OAAO;MAAA,YACNG;IAAQ,IAEjBP,KAAK,CAACsB,OAAO,GAAGpB,IAAI,CAAC,EAEzB,CAAC;IAEH,OAAOhB,WAAW,CAACgB,IAAI,EAAEC,OAAO,CAAC;EACnC;AACF,CAAC,CAAC"}
|
@@ -21,24 +21,25 @@ declare const VForm: {
|
|
21
21
|
$: vue.ComponentInternalInstance;
|
22
22
|
$data: {};
|
23
23
|
$props: Partial<{
|
24
|
+
style: vue.StyleValue;
|
24
25
|
disabled: boolean;
|
25
26
|
readonly: boolean;
|
26
27
|
modelValue: boolean | null;
|
27
28
|
validateOn: "input" | "blur" | "submit" | undefined;
|
28
29
|
fastFail: boolean;
|
29
30
|
}> & Omit<{
|
31
|
+
style: vue.StyleValue;
|
30
32
|
disabled: boolean;
|
31
33
|
readonly: boolean;
|
32
34
|
modelValue: boolean | null;
|
33
35
|
validateOn: "input" | "blur" | "submit" | undefined;
|
34
36
|
fastFail: boolean;
|
35
|
-
} & {
|
37
|
+
} & {
|
38
|
+
class?: any;
|
39
|
+
} & {
|
36
40
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
37
41
|
default?: (() => vue.VNodeChild) | undefined;
|
38
42
|
};
|
39
|
-
$slots?: {
|
40
|
-
default?: (() => vue.VNodeChild) | undefined;
|
41
|
-
} | undefined;
|
42
43
|
'v-slots'?: {
|
43
44
|
default?: false | (() => vue.VNodeChild) | undefined;
|
44
45
|
} | undefined;
|
@@ -47,7 +48,7 @@ declare const VForm: {
|
|
47
48
|
} & {
|
48
49
|
onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
|
49
50
|
"onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
|
50
|
-
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "disabled" | "readonly" | "modelValue" | "validateOn" | "fastFail">;
|
51
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "style" | "disabled" | "readonly" | "modelValue" | "validateOn" | "fastFail">;
|
51
52
|
$attrs: {
|
52
53
|
[x: string]: unknown;
|
53
54
|
};
|
@@ -62,18 +63,18 @@ declare const VForm: {
|
|
62
63
|
$emit: ((event: "submit", e: SubmitEventPromise) => void) & ((event: "update:modelValue", val: boolean | null) => void);
|
63
64
|
$el: any;
|
64
65
|
$options: vue.ComponentOptionsBase<{
|
66
|
+
style: vue.StyleValue;
|
65
67
|
disabled: boolean;
|
66
68
|
readonly: boolean;
|
67
69
|
modelValue: boolean | null;
|
68
70
|
validateOn: "input" | "blur" | "submit" | undefined;
|
69
71
|
fastFail: boolean;
|
70
|
-
} & {
|
72
|
+
} & {
|
73
|
+
class?: any;
|
74
|
+
} & {
|
71
75
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
72
76
|
default?: (() => vue.VNodeChild) | undefined;
|
73
77
|
};
|
74
|
-
$slots?: {
|
75
|
-
default?: (() => vue.VNodeChild) | undefined;
|
76
|
-
} | undefined;
|
77
78
|
'v-slots'?: {
|
78
79
|
default?: false | (() => vue.VNodeChild) | undefined;
|
79
80
|
} | undefined;
|
@@ -111,6 +112,7 @@ declare const VForm: {
|
|
111
112
|
'update:modelValue': (val: boolean | null) => true;
|
112
113
|
submit: (e: SubmitEventPromise) => true;
|
113
114
|
}, string, {
|
115
|
+
style: vue.StyleValue;
|
114
116
|
disabled: boolean;
|
115
117
|
readonly: boolean;
|
116
118
|
modelValue: boolean | null;
|
@@ -137,18 +139,18 @@ declare const VForm: {
|
|
137
139
|
$nextTick: typeof vue.nextTick;
|
138
140
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: vue.WatchOptions<boolean> | undefined): vue.WatchStopHandle;
|
139
141
|
} & {
|
142
|
+
style: vue.StyleValue;
|
140
143
|
disabled: boolean;
|
141
144
|
readonly: boolean;
|
142
145
|
modelValue: boolean | null;
|
143
146
|
validateOn: "input" | "blur" | "submit" | undefined;
|
144
147
|
fastFail: boolean;
|
145
|
-
} & {
|
148
|
+
} & {
|
149
|
+
class?: any;
|
150
|
+
} & {
|
146
151
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
147
152
|
default?: (() => vue.VNodeChild) | undefined;
|
148
153
|
};
|
149
|
-
$slots?: {
|
150
|
-
default?: (() => vue.VNodeChild) | undefined;
|
151
|
-
} | undefined;
|
152
154
|
'v-slots'?: {
|
153
155
|
default?: false | (() => vue.VNodeChild) | undefined;
|
154
156
|
} | undefined;
|
@@ -187,18 +189,18 @@ declare const VForm: {
|
|
187
189
|
__isTeleport?: undefined;
|
188
190
|
__isSuspense?: undefined;
|
189
191
|
} & vue.ComponentOptionsBase<{
|
192
|
+
style: vue.StyleValue;
|
190
193
|
disabled: boolean;
|
191
194
|
readonly: boolean;
|
192
195
|
modelValue: boolean | null;
|
193
196
|
validateOn: "input" | "blur" | "submit" | undefined;
|
194
197
|
fastFail: boolean;
|
195
|
-
} & {
|
198
|
+
} & {
|
199
|
+
class?: any;
|
200
|
+
} & {
|
196
201
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
197
202
|
default?: (() => vue.VNodeChild) | undefined;
|
198
203
|
};
|
199
|
-
$slots?: {
|
200
|
-
default?: (() => vue.VNodeChild) | undefined;
|
201
|
-
} | undefined;
|
202
204
|
'v-slots'?: {
|
203
205
|
default?: false | (() => vue.VNodeChild) | undefined;
|
204
206
|
} | undefined;
|
@@ -236,6 +238,7 @@ declare const VForm: {
|
|
236
238
|
'update:modelValue': (val: boolean | null) => true;
|
237
239
|
submit: (e: SubmitEventPromise) => true;
|
238
240
|
}, string, {
|
241
|
+
style: vue.StyleValue;
|
239
242
|
disabled: boolean;
|
240
243
|
readonly: boolean;
|
241
244
|
modelValue: boolean | null;
|
@@ -253,6 +256,11 @@ declare const VForm: {
|
|
253
256
|
type: vue.PropType<"input" | "blur" | "submit" | undefined>;
|
254
257
|
default: string;
|
255
258
|
};
|
259
|
+
class: vue.PropType<any>;
|
260
|
+
style: {
|
261
|
+
type: vue.PropType<vue.StyleValue>;
|
262
|
+
default: null;
|
263
|
+
};
|
256
264
|
}, vue.ExtractPropTypes<{
|
257
265
|
disabled: BooleanConstructor;
|
258
266
|
fastFail: BooleanConstructor;
|
@@ -265,6 +273,11 @@ declare const VForm: {
|
|
265
273
|
type: vue.PropType<"input" | "blur" | "submit" | undefined>;
|
266
274
|
default: string;
|
267
275
|
};
|
276
|
+
class: vue.PropType<any>;
|
277
|
+
style: {
|
278
|
+
type: vue.PropType<vue.StyleValue>;
|
279
|
+
default: null;
|
280
|
+
};
|
268
281
|
}>>;
|
269
282
|
type VForm = InstanceType<typeof VForm>;
|
270
283
|
|
@@ -3,6 +3,7 @@ import "./VGrid.css";
|
|
3
3
|
|
4
4
|
// Composables
|
5
5
|
import { breakpoints } from "../../composables/display.mjs";
|
6
|
+
import { makeComponentProps } from "../../composables/component.mjs";
|
6
7
|
import { makeTagProps } from "../../composables/tag.mjs"; // Utilities
|
7
8
|
import { capitalize, computed, h } from 'vue';
|
8
9
|
import { genericComponent } from "../../util/index.mjs"; // Types
|
@@ -87,6 +88,7 @@ export const VCol = genericComponent()({
|
|
87
88
|
default: null,
|
88
89
|
validator: str => ALIGN_SELF_VALUES.includes(str)
|
89
90
|
},
|
91
|
+
...makeComponentProps(),
|
90
92
|
...makeTagProps()
|
91
93
|
},
|
92
94
|
setup(props, _ref) {
|
@@ -117,7 +119,8 @@ export const VCol = genericComponent()({
|
|
117
119
|
return classList;
|
118
120
|
});
|
119
121
|
return () => h(props.tag, {
|
120
|
-
class: classes.value
|
122
|
+
class: [classes.value, props.class],
|
123
|
+
style: props.style
|
121
124
|
}, slots.default?.());
|
122
125
|
}
|
123
126
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VCol.mjs","names":["breakpoints","makeTagProps","capitalize","computed","h","genericComponent","breakpointProps","reduce","props","val","type","Boolean","String","Number","default","offsetProps","offsetKey","orderProps","orderKey","propMap","col","Object","keys","offset","order","breakpointClass","prop","className","undefined","breakpoint","replace","toLowerCase","ALIGN_SELF_VALUES","VCol","name","cols","alignSelf","validator","str","includes","setup","_ref","slots","classes","classList","forEach","value","push","hasColClasses","some","startsWith","tag","class"],"sources":["../../../src/components/VGrid/VCol.ts"],"sourcesContent":["// Styles\nimport './VGrid.sass'\n\n// Composables\nimport { breakpoints } from '@/composables/display'\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { capitalize, computed, h } from 'vue'\nimport { genericComponent } from '@/util'\n\n// Types\nimport type { Breakpoint } from '@/composables/display'\nimport type { Prop, PropType } from 'vue'\n\ntype BreakpointOffset = `offset${Capitalize<Breakpoint>}`\ntype BreakpointOrder = `order${Capitalize<Breakpoint>}`\n\nconst breakpointProps = (() => {\n return breakpoints.reduce((props, val) => {\n props[val] = {\n type: [Boolean, String, Number],\n default: false,\n }\n return props\n }, {} as Record<Breakpoint, Prop<boolean | string | number, false>>)\n})()\n\nconst offsetProps = (() => {\n return breakpoints.reduce((props, val) => {\n const offsetKey = ('offset' + capitalize(val)) as BreakpointOffset\n props[offsetKey] = {\n type: [String, Number],\n default: null,\n }\n return props\n }, {} as Record<BreakpointOffset, Prop<string | number, null>>)\n})()\n\nconst orderProps = (() => {\n return breakpoints.reduce((props, val) => {\n const orderKey = ('order' + capitalize(val)) as BreakpointOrder\n props[orderKey] = {\n type: [String, Number],\n default: null,\n }\n return props\n }, {} as Record<BreakpointOrder, Prop<string | number, null>>)\n})()\n\nconst propMap = {\n col: Object.keys(breakpointProps),\n offset: Object.keys(offsetProps),\n order: Object.keys(orderProps),\n}\n\nfunction breakpointClass (type: keyof typeof propMap, prop: string, val: boolean | string | number) {\n let className: string = type\n if (val == null || val === false) {\n return undefined\n }\n if (prop) {\n const breakpoint = prop.replace(type, '')\n className += `-${breakpoint}`\n }\n if (type === 'col') {\n className = 'v-' + className\n }\n // Handling the boolean style prop when accepting [Boolean, String, Number]\n // means Vue will not convert <v-col sm></v-col> to sm: true for us.\n // Since the default is false, an empty string indicates the prop's presence.\n if (type === 'col' && (val === '' || val === true)) {\n // .v-col-md\n return className.toLowerCase()\n }\n // .order-md-6\n className += `-${val}`\n return className.toLowerCase()\n}\n\nconst ALIGN_SELF_VALUES = ['auto', 'start', 'end', 'center', 'baseline', 'stretch'] as const\n\nexport const VCol = genericComponent()({\n name: 'VCol',\n\n props: {\n cols: {\n type: [Boolean, String, Number],\n default: false,\n },\n ...breakpointProps,\n offset: {\n type: [String, Number],\n default: null,\n },\n ...offsetProps,\n order: {\n type: [String, Number],\n default: null,\n },\n ...orderProps,\n alignSelf: {\n type: String as PropType<typeof ALIGN_SELF_VALUES[number]>,\n default: null,\n validator: (str: any) => ALIGN_SELF_VALUES.includes(str),\n },\n\n ...makeTagProps(),\n },\n\n setup (props, { slots }) {\n const classes = computed(() => {\n const classList: any[] = []\n\n // Loop through `col`, `offset`, `order` breakpoint props\n let type: keyof typeof propMap\n for (type in propMap) {\n propMap[type].forEach(prop => {\n const value: string | number | boolean = (props as any)[prop]\n const className = breakpointClass(type, prop, value)\n if (className) classList!.push(className)\n })\n }\n\n const hasColClasses = classList.some(className => className.startsWith('v-col-'))\n\n classList.push({\n // Default to .v-col if no other col-{bp}-* classes generated nor `cols` specified.\n 'v-col': !hasColClasses || !props.cols,\n [`v-col-${props.cols}`]: props.cols,\n [`offset-${props.offset}`]: props.offset,\n [`order-${props.order}`]: props.order,\n [`align-self-${props.alignSelf}`]: props.alignSelf,\n })\n\n return classList\n })\n\n return () => h(props.tag, {\n class: classes.value,\n }, slots.default?.())\n },\n})\n\nexport type VCol = InstanceType<typeof VCol>\n"],"mappings":"AAAA;AACA;;AAEA;AAAA,SACSA,WAAW;AAAA,SACXC,YAAY,qCAErB;AACA,SAASC,UAAU,EAAEC,QAAQ,EAAEC,CAAC,QAAQ,KAAK;AAAA,SACpCC,gBAAgB,gCAEzB;AAOA,MAAMC,eAAe,GAAG,CAAC,MAAM;EAC7B,
|
1
|
+
{"version":3,"file":"VCol.mjs","names":["breakpoints","makeComponentProps","makeTagProps","capitalize","computed","h","genericComponent","breakpointProps","reduce","props","val","type","Boolean","String","Number","default","offsetProps","offsetKey","orderProps","orderKey","propMap","col","Object","keys","offset","order","breakpointClass","prop","className","undefined","breakpoint","replace","toLowerCase","ALIGN_SELF_VALUES","VCol","name","cols","alignSelf","validator","str","includes","setup","_ref","slots","classes","classList","forEach","value","push","hasColClasses","some","startsWith","tag","class","style"],"sources":["../../../src/components/VGrid/VCol.ts"],"sourcesContent":["// Styles\nimport './VGrid.sass'\n\n// Composables\nimport { breakpoints } from '@/composables/display'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { capitalize, computed, h } from 'vue'\nimport { genericComponent } from '@/util'\n\n// Types\nimport type { Breakpoint } from '@/composables/display'\nimport type { Prop, PropType } from 'vue'\n\ntype BreakpointOffset = `offset${Capitalize<Breakpoint>}`\ntype BreakpointOrder = `order${Capitalize<Breakpoint>}`\n\nconst breakpointProps = (() => {\n return breakpoints.reduce((props, val) => {\n props[val] = {\n type: [Boolean, String, Number],\n default: false,\n }\n return props\n }, {} as Record<Breakpoint, Prop<boolean | string | number, false>>)\n})()\n\nconst offsetProps = (() => {\n return breakpoints.reduce((props, val) => {\n const offsetKey = ('offset' + capitalize(val)) as BreakpointOffset\n props[offsetKey] = {\n type: [String, Number],\n default: null,\n }\n return props\n }, {} as Record<BreakpointOffset, Prop<string | number, null>>)\n})()\n\nconst orderProps = (() => {\n return breakpoints.reduce((props, val) => {\n const orderKey = ('order' + capitalize(val)) as BreakpointOrder\n props[orderKey] = {\n type: [String, Number],\n default: null,\n }\n return props\n }, {} as Record<BreakpointOrder, Prop<string | number, null>>)\n})()\n\nconst propMap = {\n col: Object.keys(breakpointProps),\n offset: Object.keys(offsetProps),\n order: Object.keys(orderProps),\n}\n\nfunction breakpointClass (type: keyof typeof propMap, prop: string, val: boolean | string | number) {\n let className: string = type\n if (val == null || val === false) {\n return undefined\n }\n if (prop) {\n const breakpoint = prop.replace(type, '')\n className += `-${breakpoint}`\n }\n if (type === 'col') {\n className = 'v-' + className\n }\n // Handling the boolean style prop when accepting [Boolean, String, Number]\n // means Vue will not convert <v-col sm></v-col> to sm: true for us.\n // Since the default is false, an empty string indicates the prop's presence.\n if (type === 'col' && (val === '' || val === true)) {\n // .v-col-md\n return className.toLowerCase()\n }\n // .order-md-6\n className += `-${val}`\n return className.toLowerCase()\n}\n\nconst ALIGN_SELF_VALUES = ['auto', 'start', 'end', 'center', 'baseline', 'stretch'] as const\n\nexport const VCol = genericComponent()({\n name: 'VCol',\n\n props: {\n cols: {\n type: [Boolean, String, Number],\n default: false,\n },\n ...breakpointProps,\n offset: {\n type: [String, Number],\n default: null,\n },\n ...offsetProps,\n order: {\n type: [String, Number],\n default: null,\n },\n ...orderProps,\n alignSelf: {\n type: String as PropType<typeof ALIGN_SELF_VALUES[number]>,\n default: null,\n validator: (str: any) => ALIGN_SELF_VALUES.includes(str),\n },\n\n ...makeComponentProps(),\n ...makeTagProps(),\n },\n\n setup (props, { slots }) {\n const classes = computed(() => {\n const classList: any[] = []\n\n // Loop through `col`, `offset`, `order` breakpoint props\n let type: keyof typeof propMap\n for (type in propMap) {\n propMap[type].forEach(prop => {\n const value: string | number | boolean = (props as any)[prop]\n const className = breakpointClass(type, prop, value)\n if (className) classList!.push(className)\n })\n }\n\n const hasColClasses = classList.some(className => className.startsWith('v-col-'))\n\n classList.push({\n // Default to .v-col if no other col-{bp}-* classes generated nor `cols` specified.\n 'v-col': !hasColClasses || !props.cols,\n [`v-col-${props.cols}`]: props.cols,\n [`offset-${props.offset}`]: props.offset,\n [`order-${props.order}`]: props.order,\n [`align-self-${props.alignSelf}`]: props.alignSelf,\n })\n\n return classList\n })\n\n return () => h(props.tag, {\n class: [\n classes.value,\n props.class,\n ],\n style: props.style,\n }, slots.default?.())\n },\n})\n\nexport type VCol = InstanceType<typeof VCol>\n"],"mappings":"AAAA;AACA;;AAEA;AAAA,SACSA,WAAW;AAAA,SACXC,kBAAkB;AAAA,SAClBC,YAAY,qCAErB;AACA,SAASC,UAAU,EAAEC,QAAQ,EAAEC,CAAC,QAAQ,KAAK;AAAA,SACpCC,gBAAgB,gCAEzB;AAOA,MAAMC,eAAe,GAAG,CAAC,MAAM;EAC7B,OAAOP,WAAW,CAACQ,MAAM,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;IACxCD,KAAK,CAACC,GAAG,CAAC,GAAG;MACXC,IAAI,EAAE,CAACC,OAAO,EAAEC,MAAM,EAAEC,MAAM,CAAC;MAC/BC,OAAO,EAAE;IACX,CAAC;IACD,OAAON,KAAK;EACd,CAAC,EAAE,CAAC,CAAC,CAA+D;AACtE,CAAC,GAAG;AAEJ,MAAMO,WAAW,GAAG,CAAC,MAAM;EACzB,OAAOhB,WAAW,CAACQ,MAAM,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;IACxC,MAAMO,SAAS,GAAI,QAAQ,GAAGd,UAAU,CAACO,GAAG,CAAsB;IAClED,KAAK,CAACQ,SAAS,CAAC,GAAG;MACjBN,IAAI,EAAE,CAACE,MAAM,EAAEC,MAAM,CAAC;MACtBC,OAAO,EAAE;IACX,CAAC;IACD,OAAON,KAAK;EACd,CAAC,EAAE,CAAC,CAAC,CAA0D;AACjE,CAAC,GAAG;AAEJ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CAAC;UACpD,IAAInB,SAAS,EAAEiB,SAAS,CAAEG,IAAI,CAACpB,SAAS,CAAC;QAC3C,CAAC,CAAC;MACJ;MAEA,MAAMqB,aAAa,GAAGJ,SAAS,CAACK,IAAI,CAACtB,SAAS,IAAIA,SAAS,CAACuB,UAAU,CAAC,QAAQ,CAAC,CAAC;MAEjFN,SAAS,CAACG,IAAI,CAAC;QACb;QACA,OAAO,EAAE,CAACC,aAAa,IAAI,CAACxC,KAAK,CAAC2B,IAAI;QACtC,CAAE,SAAQ3B,KAAK,CAAC2B,IAAK,EAAC,GAAG3B,KAAK,CAAC2B,IAAI;QACnC,CAAE,UAAS3B,KAAK,CAACe,MAAO,EAAC,GAAGf,KAAK,CAACe,MAAM;QACxC,CAAE,SAAQf,KAAK,CAACgB,KAAM,EAAC,GAAGhB,KAAK,CAACgB,KAAK;QACrC,CAAE,cAAahB,KAAK,CAAC4B,SAAU,EAAC,GAAG5B,KAAK,CAAC4B;MAC3C,CAAC,CAAC;MAEF,OAAOQ,SAAS;IAClB,CAAC,CAAC;IAEF,OAAO,MAAMxC,CAAC,CAACI,KAAK,CAAC2C,GAAG,EAAE;MACxBC,KAAK,EAAE,CACLT,OAAO,CAACG,KAAK,EACbtC,KAAK,CAAC4C,KAAK,CACZ;MACDC,KAAK,EAAE7C,KAAK,CAAC6C;IACf,CAAC,EAAEX,KAAK,CAAC5B,OAAO,IAAI,CAAC;EACvB;AACF,CAAC,CAAC"}
|
@@ -3,6 +3,7 @@ import { createVNode as _createVNode, resolveDirective as _resolveDirective } fr
|
|
3
3
|
import "./VGrid.css";
|
4
4
|
|
5
5
|
// Composables
|
6
|
+
import { makeComponentProps } from "../../composables/component.mjs";
|
6
7
|
import { makeTagProps } from "../../composables/tag.mjs"; // Utilities
|
7
8
|
import { genericComponent, useRender } from "../../util/index.mjs";
|
8
9
|
export const VContainer = genericComponent()({
|
@@ -12,6 +13,7 @@ export const VContainer = genericComponent()({
|
|
12
13
|
type: Boolean,
|
13
14
|
default: false
|
14
15
|
},
|
16
|
+
...makeComponentProps(),
|
15
17
|
...makeTagProps()
|
16
18
|
},
|
17
19
|
setup(props, _ref) {
|
@@ -21,7 +23,8 @@ export const VContainer = genericComponent()({
|
|
21
23
|
useRender(() => _createVNode(props.tag, {
|
22
24
|
"class": ['v-container', {
|
23
25
|
'v-container--fluid': props.fluid
|
24
|
-
}]
|
26
|
+
}, props.class],
|
27
|
+
"style": props.style
|
25
28
|
}, slots));
|
26
29
|
return {};
|
27
30
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VContainer.mjs","names":["makeTagProps","genericComponent","useRender","VContainer","name","props","fluid","type","Boolean","default","setup","_ref","slots","_createVNode","tag"],"sources":["../../../src/components/VGrid/VContainer.tsx"],"sourcesContent":["// Styles\nimport './VGrid.sass'\n\n// Composables\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { genericComponent, useRender } from '@/util'\n\nexport const VContainer = genericComponent()({\n name: 'VContainer',\n\n props: {\n fluid: {\n type: Boolean,\n default: false,\n },\n\n ...makeTagProps(),\n },\n\n setup (props, { slots }) {\n useRender(() => (\n <props.tag\n class={[\n 'v-container',\n { 'v-container--fluid': props.fluid },\n ]}\n v-slots={ slots }\n />\n ))\n\n return {}\n },\n})\n\nexport type VContainer = InstanceType<typeof VContainer>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,YAAY,qCAErB;AAAA,SACSC,gBAAgB,EAAEC,SAAS;AAEpC,OAAO,MAAMC,UAAU,GAAGF,gBAAgB,EAAE,CAAC;EAC3CG,IAAI,EAAE,YAAY;EAElBC,KAAK,EAAE;IACLC,KAAK,EAAE;MACLC,IAAI,EAAEC,OAAO;MACbC,OAAO,EAAE;IACX,CAAC;IAED,
|
1
|
+
{"version":3,"file":"VContainer.mjs","names":["makeComponentProps","makeTagProps","genericComponent","useRender","VContainer","name","props","fluid","type","Boolean","default","setup","_ref","slots","_createVNode","tag","class","style"],"sources":["../../../src/components/VGrid/VContainer.tsx"],"sourcesContent":["// Styles\nimport './VGrid.sass'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { genericComponent, useRender } from '@/util'\n\nexport const VContainer = genericComponent()({\n name: 'VContainer',\n\n props: {\n fluid: {\n type: Boolean,\n default: false,\n },\n\n ...makeComponentProps(),\n ...makeTagProps(),\n },\n\n setup (props, { slots }) {\n useRender(() => (\n <props.tag\n class={[\n 'v-container',\n { 'v-container--fluid': props.fluid },\n props.class,\n ]}\n style={ props.style }\n v-slots={ slots }\n />\n ))\n\n return {}\n },\n})\n\nexport type VContainer = InstanceType<typeof VContainer>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB;AAAA,SAClBC,YAAY,qCAErB;AAAA,SACSC,gBAAgB,EAAEC,SAAS;AAEpC,OAAO,MAAMC,UAAU,GAAGF,gBAAgB,EAAE,CAAC;EAC3CG,IAAI,EAAE,YAAY;EAElBC,KAAK,EAAE;IACLC,KAAK,EAAE;MACLC,IAAI,EAAEC,OAAO;MACbC,OAAO,EAAE;IACX,CAAC;IAED,GAAGV,kBAAkB,EAAE;IACvB,GAAGC,YAAY;EACjB,CAAC;EAEDU,KAAKA,CAAEL,KAAK,EAAAM,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrBT,SAAS,CAAC,MAAAW,YAAA,CAAAR,KAAA,CAAAS,GAAA;MAAA,SAEC,CACL,aAAa,EACb;QAAE,oBAAoB,EAAET,KAAK,CAACC;MAAM,CAAC,EACrCD,KAAK,CAACU,KAAK,CACZ;MAAA,SACOV,KAAK,CAACW;IAAK,GACTJ,KAAK,CAElB,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
@@ -3,6 +3,7 @@ import "./VGrid.css";
|
|
3
3
|
|
4
4
|
// Composables
|
5
5
|
import { breakpoints } from "../../composables/display.mjs";
|
6
|
+
import { makeComponentProps } from "../../composables/component.mjs";
|
6
7
|
import { makeTagProps } from "../../composables/tag.mjs"; // Utilities
|
7
8
|
import { capitalize, computed, h } from 'vue';
|
8
9
|
import { genericComponent } from "../../util/index.mjs"; // Types
|
@@ -83,6 +84,7 @@ export const VRow = genericComponent()({
|
|
83
84
|
validator: alignContentValidator
|
84
85
|
},
|
85
86
|
...alignContentProps,
|
87
|
+
...makeComponentProps(),
|
86
88
|
...makeTagProps()
|
87
89
|
},
|
88
90
|
setup(props, _ref) {
|
@@ -111,7 +113,8 @@ export const VRow = genericComponent()({
|
|
111
113
|
return classList;
|
112
114
|
});
|
113
115
|
return () => h(props.tag, {
|
114
|
-
class: ['v-row', classes.value]
|
116
|
+
class: ['v-row', classes.value, props.class],
|
117
|
+
style: props.style
|
115
118
|
}, slots.default?.());
|
116
119
|
}
|
117
120
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VRow.mjs","names":["breakpoints","makeTagProps","capitalize","computed","h","genericComponent","ALIGNMENT","SPACE","makeRowProps","prefix","def","reduce","props","val","prefixKey","ALIGN_VALUES","alignValidator","str","includes","alignProps","type","String","default","validator","JUSTIFY_VALUES","justifyValidator","justifyProps","ALIGN_CONTENT_VALUES","alignContentValidator","alignContentProps","propMap","align","Object","keys","justify","alignContent","classMap","breakpointClass","prop","className","undefined","breakpoint","replace","toLowerCase","VRow","name","dense","Boolean","noGutters","setup","_ref","slots","classes","classList","forEach","value","push","tag","class"],"sources":["../../../src/components/VGrid/VRow.ts"],"sourcesContent":["// Styles\nimport './VGrid.sass'\n\n// Composables\nimport { breakpoints } from '@/composables/display'\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { capitalize, computed, h } from 'vue'\nimport { genericComponent } from '@/util'\n\n// Types\nimport type { Breakpoint } from '@/composables/display'\nimport type { Prop, PropType } from 'vue'\n\nconst ALIGNMENT = ['start', 'end', 'center'] as const\n\ntype BreakpointAlign = `align${Capitalize<Breakpoint>}`\ntype BreakpointJustify = `justify${Capitalize<Breakpoint>}`\ntype BreakpointAlignContent = `alignContent${Capitalize<Breakpoint>}`\n\nconst SPACE = ['space-between', 'space-around', 'space-evenly'] as const\n\nfunction makeRowProps <\n Name extends BreakpointAlign | BreakpointJustify | BreakpointAlignContent,\n Type,\n> (prefix: string, def: () => Prop<Type, null>) {\n return breakpoints.reduce((props, val) => {\n const prefixKey = prefix + capitalize(val) as Name\n props[prefixKey] = def()\n return props\n }, {} as Record<Name, Prop<Type, null>>)\n}\n\nconst ALIGN_VALUES = [...ALIGNMENT, 'baseline', 'stretch'] as const\ntype AlignValue = typeof ALIGN_VALUES[number]\nconst alignValidator = (str: any) => ALIGN_VALUES.includes(str)\nconst alignProps = makeRowProps<BreakpointAlign, AlignValue>('align', () => ({\n type: String as PropType<AlignValue>,\n default: null,\n validator: alignValidator,\n}))\n\nconst JUSTIFY_VALUES = [...ALIGNMENT, ...SPACE] as const\ntype JustifyValue = typeof JUSTIFY_VALUES[number]\nconst justifyValidator = (str: any) => JUSTIFY_VALUES.includes(str)\nconst justifyProps = makeRowProps<BreakpointJustify, JustifyValue>('justify', () => ({\n type: String as PropType<JustifyValue>,\n default: null,\n validator: justifyValidator,\n}))\n\nconst ALIGN_CONTENT_VALUES = [...ALIGNMENT, ...SPACE, 'stretch'] as const\ntype AlignContentValue = typeof ALIGN_CONTENT_VALUES[number]\nconst alignContentValidator = (str: any) => ALIGN_CONTENT_VALUES.includes(str)\nconst alignContentProps = makeRowProps<BreakpointAlignContent, AlignContentValue>('alignContent', () => ({\n type: String as PropType<AlignContentValue>,\n default: null,\n validator: alignContentValidator,\n}))\n\nconst propMap = {\n align: Object.keys(alignProps),\n justify: Object.keys(justifyProps),\n alignContent: Object.keys(alignContentProps),\n}\n\nconst classMap = {\n align: 'align',\n justify: 'justify',\n alignContent: 'align-content',\n}\n\nfunction breakpointClass (type: keyof typeof propMap, prop: string, val: string) {\n let className = classMap[type]\n if (val == null) {\n return undefined\n }\n if (prop) {\n // alignSm -> Sm\n const breakpoint = prop.replace(type, '')\n className += `-${breakpoint}`\n }\n // .align-items-sm-center\n className += `-${val}`\n return className.toLowerCase()\n}\n\nexport const VRow = genericComponent()({\n name: 'VRow',\n\n props: {\n dense: Boolean,\n noGutters: Boolean,\n align: {\n type: String as PropType<typeof ALIGN_VALUES[number]>,\n default: null,\n validator: alignValidator,\n },\n ...alignProps,\n justify: {\n type: String as PropType<typeof ALIGN_CONTENT_VALUES[number]>,\n default: null,\n validator: justifyValidator,\n },\n ...justifyProps,\n alignContent: {\n type: String as PropType<typeof ALIGN_CONTENT_VALUES[number]>,\n default: null,\n validator: alignContentValidator,\n },\n\n ...alignContentProps,\n ...makeTagProps(),\n },\n\n setup (props, { slots }) {\n const classes = computed(() => {\n const classList: any[] = []\n\n // Loop through `align`, `justify`, `alignContent` breakpoint props\n let type: keyof typeof propMap\n for (type in propMap) {\n propMap[type].forEach(prop => {\n const value: string = (props as any)[prop]\n const className = breakpointClass(type, prop, value)\n if (className) classList!.push(className)\n })\n }\n\n classList.push({\n 'v-row--no-gutters': props.noGutters,\n 'v-row--dense': props.dense,\n [`align-${props.align}`]: props.align,\n [`justify-${props.justify}`]: props.justify,\n [`align-content-${props.alignContent}`]: props.alignContent,\n })\n\n return classList\n })\n\n return () => h(props.tag, {\n class: ['v-row'
|
1
|
+
{"version":3,"file":"VRow.mjs","names":["breakpoints","makeComponentProps","makeTagProps","capitalize","computed","h","genericComponent","ALIGNMENT","SPACE","makeRowProps","prefix","def","reduce","props","val","prefixKey","ALIGN_VALUES","alignValidator","str","includes","alignProps","type","String","default","validator","JUSTIFY_VALUES","justifyValidator","justifyProps","ALIGN_CONTENT_VALUES","alignContentValidator","alignContentProps","propMap","align","Object","keys","justify","alignContent","classMap","breakpointClass","prop","className","undefined","breakpoint","replace","toLowerCase","VRow","name","dense","Boolean","noGutters","setup","_ref","slots","classes","classList","forEach","value","push","tag","class","style"],"sources":["../../../src/components/VGrid/VRow.ts"],"sourcesContent":["// Styles\nimport './VGrid.sass'\n\n// Composables\nimport { breakpoints } from '@/composables/display'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { capitalize, computed, h } from 'vue'\nimport { genericComponent } from '@/util'\n\n// Types\nimport type { Breakpoint } from '@/composables/display'\nimport type { Prop, PropType } from 'vue'\n\nconst ALIGNMENT = ['start', 'end', 'center'] as const\n\ntype BreakpointAlign = `align${Capitalize<Breakpoint>}`\ntype BreakpointJustify = `justify${Capitalize<Breakpoint>}`\ntype BreakpointAlignContent = `alignContent${Capitalize<Breakpoint>}`\n\nconst SPACE = ['space-between', 'space-around', 'space-evenly'] as const\n\nfunction makeRowProps <\n Name extends BreakpointAlign | BreakpointJustify | BreakpointAlignContent,\n Type,\n> (prefix: string, def: () => Prop<Type, null>) {\n return breakpoints.reduce((props, val) => {\n const prefixKey = prefix + capitalize(val) as Name\n props[prefixKey] = def()\n return props\n }, {} as Record<Name, Prop<Type, null>>)\n}\n\nconst ALIGN_VALUES = [...ALIGNMENT, 'baseline', 'stretch'] as const\ntype AlignValue = typeof ALIGN_VALUES[number]\nconst alignValidator = (str: any) => ALIGN_VALUES.includes(str)\nconst alignProps = makeRowProps<BreakpointAlign, AlignValue>('align', () => ({\n type: String as PropType<AlignValue>,\n default: null,\n validator: alignValidator,\n}))\n\nconst JUSTIFY_VALUES = [...ALIGNMENT, ...SPACE] as const\ntype JustifyValue = typeof JUSTIFY_VALUES[number]\nconst justifyValidator = (str: any) => JUSTIFY_VALUES.includes(str)\nconst justifyProps = makeRowProps<BreakpointJustify, JustifyValue>('justify', () => ({\n type: String as PropType<JustifyValue>,\n default: null,\n validator: justifyValidator,\n}))\n\nconst ALIGN_CONTENT_VALUES = [...ALIGNMENT, ...SPACE, 'stretch'] as const\ntype AlignContentValue = typeof ALIGN_CONTENT_VALUES[number]\nconst alignContentValidator = (str: any) => ALIGN_CONTENT_VALUES.includes(str)\nconst alignContentProps = makeRowProps<BreakpointAlignContent, AlignContentValue>('alignContent', () => ({\n type: String as PropType<AlignContentValue>,\n default: null,\n validator: alignContentValidator,\n}))\n\nconst propMap = {\n align: Object.keys(alignProps),\n justify: Object.keys(justifyProps),\n alignContent: Object.keys(alignContentProps),\n}\n\nconst classMap = {\n align: 'align',\n justify: 'justify',\n alignContent: 'align-content',\n}\n\nfunction breakpointClass (type: keyof typeof propMap, prop: string, val: string) {\n let className = classMap[type]\n if (val == null) {\n return undefined\n }\n if (prop) {\n // alignSm -> Sm\n const breakpoint = prop.replace(type, '')\n className += `-${breakpoint}`\n }\n // .align-items-sm-center\n className += `-${val}`\n return className.toLowerCase()\n}\n\nexport const VRow = genericComponent()({\n name: 'VRow',\n\n props: {\n dense: Boolean,\n noGutters: Boolean,\n align: {\n type: String as PropType<typeof ALIGN_VALUES[number]>,\n default: null,\n validator: alignValidator,\n },\n ...alignProps,\n justify: {\n type: String as PropType<typeof ALIGN_CONTENT_VALUES[number]>,\n default: null,\n validator: justifyValidator,\n },\n ...justifyProps,\n alignContent: {\n type: String as PropType<typeof ALIGN_CONTENT_VALUES[number]>,\n default: null,\n validator: alignContentValidator,\n },\n\n ...alignContentProps,\n ...makeComponentProps(),\n ...makeTagProps(),\n },\n\n setup (props, { slots }) {\n const classes = computed(() => {\n const classList: any[] = []\n\n // Loop through `align`, `justify`, `alignContent` breakpoint props\n let type: keyof typeof propMap\n for (type in propMap) {\n propMap[type].forEach(prop => {\n const value: string = (props as any)[prop]\n const className = breakpointClass(type, prop, value)\n if (className) classList!.push(className)\n })\n }\n\n classList.push({\n 'v-row--no-gutters': props.noGutters,\n 'v-row--dense': props.dense,\n [`align-${props.align}`]: props.align,\n [`justify-${props.justify}`]: props.justify,\n [`align-content-${props.alignContent}`]: props.alignContent,\n })\n\n return classList\n })\n\n return () => h(props.tag, {\n class: [\n 'v-row',\n classes.value,\n props.class,\n ],\n style: props.style,\n }, slots.default?.())\n },\n})\n\nexport type VRow = InstanceType<typeof VRow>\n"],"mappings":"AAAA;AACA;;AAEA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