vuetify 3.2.2 → 3.2.3
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 +538 -242
- package/dist/json/importMap.json +8 -8
- package/dist/json/tags.json +77 -2
- package/dist/json/web-types.json +1284 -558
- package/dist/vuetify-labs.css +123 -119
- package/dist/vuetify-labs.d.ts +2222 -11380
- package/dist/vuetify-labs.esm.js +2230 -2144
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +2230 -2144
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +39 -35
- package/dist/vuetify.d.ts +1225 -11178
- package/dist/vuetify.esm.js +1691 -1591
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +1691 -1591
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +597 -597
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.ts +1 -3
- package/lib/blueprints/md1.d.ts +1 -3
- package/lib/blueprints/md2.d.ts +1 -3
- package/lib/blueprints/md3.d.ts +1 -3
- package/lib/components/VAlert/VAlert.mjs +47 -46
- package/lib/components/VAlert/VAlert.mjs.map +1 -1
- package/lib/components/VAlert/index.d.ts +2 -2
- package/lib/components/VApp/VApp.mjs +9 -8
- package/lib/components/VApp/VApp.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBar.mjs +21 -20
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.mjs +8 -5
- package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.ts +4 -4
- package/lib/components/VAutocomplete/VAutocomplete.css +0 -4
- package/lib/components/VAutocomplete/VAutocomplete.mjs +28 -33
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +0 -5
- package/lib/components/VAutocomplete/index.d.ts +67 -1174
- package/lib/components/VBadge/VBadge.mjs +33 -32
- package/lib/components/VBadge/VBadge.mjs.map +1 -1
- package/lib/components/VBanner/VBanner.mjs +21 -20
- package/lib/components/VBanner/VBanner.mjs.map +1 -1
- package/lib/components/VBanner/VBannerActions.mjs +7 -6
- package/lib/components/VBanner/VBannerActions.mjs.map +1 -1
- package/lib/components/VBanner/index.d.ts +2 -2
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs +35 -34
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +24 -23
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs +6 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +15 -14
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.ts +1 -0
- package/lib/components/VBtnToggle/VBtnToggle.mjs +6 -5
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VCard/VCard.mjs +38 -37
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/VCardItem.mjs +12 -11
- package/lib/components/VCard/VCardItem.mjs.map +1 -1
- package/lib/components/VCard/index.d.ts +4 -4
- package/lib/components/VCarousel/VCarousel.mjs +28 -27
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/VCarouselItem.mjs +18 -16
- package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.ts +170 -20
- package/lib/components/VCheckbox/VCheckbox.mjs +6 -5
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.ts +24 -12
- package/lib/components/VChip/VChip.css +8 -0
- package/lib/components/VChip/VChip.mjs +60 -57
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/VChip.sass +10 -0
- package/lib/components/VChip/index.d.ts +8 -8
- package/lib/components/VChipGroup/VChipGroup.mjs +19 -18
- package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPicker.mjs +44 -39
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs +21 -20
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.mjs +17 -16
- package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.mjs +10 -9
- package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs +12 -11
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
- package/lib/components/VColorPicker/index.d.ts +4 -4
- package/lib/components/VColorPicker/util/index.mjs +2 -2
- package/lib/components/VColorPicker/util/index.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +32 -36
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.ts +67 -1171
- package/lib/components/VCounter/VCounter.mjs +16 -15
- package/lib/components/VCounter/VCounter.mjs.map +1 -1
- package/lib/components/VCounter/index.d.ts +25 -1774
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +9 -8
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.mjs +18 -17
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/index.d.ts +130 -1120
- package/lib/components/VDivider/VDivider.mjs +11 -10
- package/lib/components/VDivider/VDivider.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs +15 -15
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs +6 -5
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +3 -5
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs +15 -14
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.d.ts +15 -15
- package/lib/components/VField/VField.mjs +6 -2
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VFieldLabel.mjs +6 -5
- package/lib/components/VField/VFieldLabel.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.mjs +35 -34
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.ts +3 -3
- package/lib/components/VFooter/VFooter.mjs +19 -18
- package/lib/components/VFooter/VFooter.mjs.map +1 -1
- package/lib/components/VForm/VForm.mjs +6 -5
- package/lib/components/VForm/VForm.mjs.map +1 -1
- package/lib/components/VForm/index.d.ts +3 -3
- package/lib/components/VGrid/VCol.mjs +26 -25
- package/lib/components/VGrid/VCol.mjs.map +1 -1
- package/lib/components/VGrid/VContainer.mjs +16 -11
- package/lib/components/VGrid/VContainer.mjs.map +1 -1
- package/lib/components/VGrid/VRow.mjs +26 -25
- package/lib/components/VGrid/VRow.mjs.map +1 -1
- package/lib/components/VHover/VHover.mjs +10 -9
- package/lib/components/VHover/VHover.mjs.map +1 -1
- package/lib/components/VImg/VImg.mjs +29 -28
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.mjs +10 -9
- package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
- package/lib/components/VLabel/VLabel.mjs +8 -7
- package/lib/components/VLabel/VLabel.mjs.map +1 -1
- package/lib/components/VLayout/VLayout.mjs +6 -5
- package/lib/components/VLayout/VLayout.mjs.map +1 -1
- package/lib/components/VLayout/VLayoutItem.mjs +15 -14
- package/lib/components/VLayout/VLayoutItem.mjs.map +1 -1
- package/lib/components/VLazy/VLazy.mjs +21 -20
- package/lib/components/VLazy/VLazy.mjs.map +1 -1
- package/lib/components/VList/VList.mjs +33 -32
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListChildren.mjs +5 -4
- package/lib/components/VList/VListChildren.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +2 -4
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +42 -41
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListItemAction.mjs +8 -7
- package/lib/components/VList/VListItemAction.mjs.map +1 -1
- package/lib/components/VList/VListItemMedia.mjs +8 -7
- package/lib/components/VList/VListItemMedia.mjs.map +1 -1
- package/lib/components/VList/VListSubheader.mjs +10 -9
- package/lib/components/VList/VListSubheader.mjs.map +1 -1
- package/lib/components/VList/index.d.ts +30 -30
- package/lib/components/VLocaleProvider/VLocaleProvider.mjs +12 -11
- package/lib/components/VLocaleProvider/VLocaleProvider.mjs.map +1 -1
- package/lib/components/VMain/VMain.mjs +9 -8
- package/lib/components/VMain/VMain.mjs.map +1 -1
- package/lib/components/VMenu/VMenu.mjs +18 -17
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.ts +40 -1030
- package/lib/components/VMessages/VMessages.mjs +18 -17
- package/lib/components/VMessages/VMessages.mjs.map +1 -1
- package/lib/components/VMessages/index.d.ts +25 -1774
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +48 -47
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/sticky.mjs +9 -3
- package/lib/components/VNavigationDrawer/sticky.mjs.map +1 -1
- package/lib/components/VOverlay/locationStrategies.mjs +5 -3
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.mjs +82 -81
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VPagination/index.d.ts +8 -8
- package/lib/components/VParallax/VParallax.mjs +9 -8
- package/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.mjs +25 -24
- package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.mjs +44 -42
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/index.d.ts +8 -8
- package/lib/components/VRadio/VRadio.mjs +8 -7
- package/lib/components/VRadio/VRadio.mjs.map +1 -1
- package/lib/components/VRadio/index.d.ts +18 -12
- package/lib/components/VRadioGroup/VRadioGroup.mjs +22 -21
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +16 -10
- package/lib/components/VRangeSlider/VRangeSlider.mjs +18 -13
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRating/VRating.mjs +44 -43
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VRating/index.d.ts +8 -8
- package/lib/components/VResponsive/VResponsive.mjs +8 -7
- package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.mjs +20 -19
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +64 -2506
- package/lib/components/VSelectionControl/index.d.ts +42 -36
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +10 -10
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/index.d.ts +28 -28
- package/lib/components/VSheet/VSheet.mjs +1 -3
- package/lib/components/VSheet/VSheet.mjs.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroupItem.mjs +1 -3
- package/lib/components/VSlideGroup/VSlideGroupItem.mjs.map +1 -1
- package/lib/components/VSlider/VSlider.mjs +18 -13
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/VSliderThumb.mjs +26 -25
- package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
- package/lib/components/VSlider/VSliderTrack.mjs +13 -12
- package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.mjs +20 -19
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSwitch/VSwitch.mjs +13 -12
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +18 -12
- package/lib/components/VSystemBar/VSystemBar.mjs +13 -12
- package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
- package/lib/components/VTable/VTable.mjs +12 -11
- package/lib/components/VTable/VTable.mjs.map +1 -1
- package/lib/components/VTabs/VTab.mjs +15 -14
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.mjs +28 -27
- package/lib/components/VTabs/VTabs.mjs.map +1 -1
- package/lib/components/VTabs/index.d.ts +12 -12
- package/lib/components/VTextField/index.d.ts +3 -3
- package/lib/components/VTextarea/VTextarea.mjs +26 -25
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +3 -3
- package/lib/components/VThemeProvider/VThemeProvider.mjs +8 -7
- package/lib/components/VThemeProvider/VThemeProvider.mjs.map +1 -1
- package/lib/components/VTimeline/VTimeline.mjs +46 -41
- package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
- package/lib/components/VTimeline/VTimelineDivider.mjs +14 -13
- package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
- package/lib/components/VTimeline/VTimelineItem.mjs +21 -20
- package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbar.mjs +6 -2
- package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbarItems.mjs +8 -7
- package/lib/components/VToolbar/VToolbarItems.mjs.map +1 -1
- package/lib/components/VToolbar/index.d.ts +11 -11
- package/lib/components/VTooltip/VTooltip.mjs +20 -19
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VValidation/VValidation.mjs +1 -3
- package/lib/components/VValidation/VValidation.mjs.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs +11 -10
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScrollItem.mjs +6 -5
- package/lib/components/VVirtualScroll/VVirtualScrollItem.mjs.map +1 -1
- package/lib/components/VWindow/VWindow.mjs.map +1 -1
- package/lib/components/VWindow/VWindowItem.mjs +15 -14
- package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
- package/lib/components/VWindow/index.d.ts +9 -9
- package/lib/components/index.d.ts +1301 -11252
- package/lib/components/transitions/createTransition.mjs +16 -15
- package/lib/components/transitions/createTransition.mjs.map +1 -1
- package/lib/components/transitions/dialog-transition.mjs +5 -4
- package/lib/components/transitions/dialog-transition.mjs.map +1 -1
- package/lib/components/transitions/index.d.ts +143 -143
- package/lib/composables/forwardRefs.mjs.map +1 -1
- package/lib/composables/theme.mjs +3 -3
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/directives/click-outside/index.mjs +1 -1
- package/lib/directives/click-outside/index.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.ts +3 -5
- package/lib/labs/VDataTable/VDataTable.mjs +53 -59
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableFooter.mjs +64 -63
- package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableGroupHeaderRow.mjs +8 -7
- package/lib/labs/VDataTable/VDataTableGroupHeaderRow.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableHeaders.mjs +16 -15
- package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRow.mjs +7 -6
- package/lib/labs/VDataTable/VDataTableRow.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +20 -19
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +53 -64
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +65 -72
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.ts +991 -206
- package/lib/labs/VInfiniteScroll/VInfiniteScroll.mjs +54 -48
- package/lib/labs/VInfiniteScroll/VInfiniteScroll.mjs.map +1 -1
- package/lib/labs/VInfiniteScroll/index.d.ts +16 -1
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs +18 -17
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
- package/lib/labs/VSkeletonLoader/index.d.ts +9 -9
- package/lib/labs/components.d.ts +1011 -211
- package/lib/labs/date/date.mjs +7 -7
- package/lib/labs/date/date.mjs.map +1 -1
- package/lib/labs/date/index.d.ts +1 -3
- package/package.json +2 -2
|
@@ -13,43 +13,44 @@ import { useFocus } from "../../composables/focus.mjs";
|
|
|
13
13
|
import { useLocale } from "../../composables/locale.mjs";
|
|
14
14
|
import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Utilities
|
|
15
15
|
import { computed, nextTick, ref, watch } from 'vue';
|
|
16
|
-
import { callEvent, filterInputAttrs, genericComponent, humanReadableFileSize, useRender, wrapInArray } from "../../util/index.mjs"; // Types
|
|
16
|
+
import { callEvent, filterInputAttrs, genericComponent, humanReadableFileSize, propsFactory, useRender, wrapInArray } from "../../util/index.mjs"; // Types
|
|
17
|
+
export const makeVFileInputProps = propsFactory({
|
|
18
|
+
chips: Boolean,
|
|
19
|
+
counter: Boolean,
|
|
20
|
+
counterSizeString: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: '$vuetify.fileInput.counterSize'
|
|
23
|
+
},
|
|
24
|
+
counterString: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: '$vuetify.fileInput.counter'
|
|
27
|
+
},
|
|
28
|
+
multiple: Boolean,
|
|
29
|
+
showSize: {
|
|
30
|
+
type: [Boolean, Number],
|
|
31
|
+
default: false,
|
|
32
|
+
validator: v => {
|
|
33
|
+
return typeof v === 'boolean' || [1000, 1024].includes(v);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
...makeVInputProps({
|
|
37
|
+
prependIcon: '$file'
|
|
38
|
+
}),
|
|
39
|
+
modelValue: {
|
|
40
|
+
type: Array,
|
|
41
|
+
default: () => [],
|
|
42
|
+
validator: val => {
|
|
43
|
+
return wrapInArray(val).every(v => v != null && typeof v === 'object');
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
...makeVFieldProps({
|
|
47
|
+
clearable: true
|
|
48
|
+
})
|
|
49
|
+
}, 'v-file-input');
|
|
17
50
|
export const VFileInput = genericComponent()({
|
|
18
51
|
name: 'VFileInput',
|
|
19
52
|
inheritAttrs: false,
|
|
20
|
-
props:
|
|
21
|
-
chips: Boolean,
|
|
22
|
-
counter: Boolean,
|
|
23
|
-
counterSizeString: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: '$vuetify.fileInput.counterSize'
|
|
26
|
-
},
|
|
27
|
-
counterString: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: '$vuetify.fileInput.counter'
|
|
30
|
-
},
|
|
31
|
-
multiple: Boolean,
|
|
32
|
-
showSize: {
|
|
33
|
-
type: [Boolean, Number],
|
|
34
|
-
default: false,
|
|
35
|
-
validator: v => {
|
|
36
|
-
return typeof v === 'boolean' || [1000, 1024].includes(v);
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
...makeVInputProps({
|
|
40
|
-
prependIcon: '$file'
|
|
41
|
-
}),
|
|
42
|
-
modelValue: {
|
|
43
|
-
type: Array,
|
|
44
|
-
default: () => [],
|
|
45
|
-
validator: val => {
|
|
46
|
-
return wrapInArray(val).every(v => v != null && typeof v === 'object');
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
...makeVFieldProps({
|
|
50
|
-
clearable: true
|
|
51
|
-
})
|
|
52
|
-
},
|
|
53
|
+
props: makeVFileInputProps(),
|
|
53
54
|
emits: {
|
|
54
55
|
'click:control': e => true,
|
|
55
56
|
'mousedown:control': e => true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VFileInput.mjs","names":["filterFieldProps","makeVFieldProps","makeVInputProps","VInput","VChip","VCounter","VField","forwardRefs","useFocus","useLocale","useProxiedModel","computed","nextTick","ref","watch","callEvent","filterInputAttrs","genericComponent","humanReadableFileSize","useRender","wrapInArray","VFileInput","name","inheritAttrs","props","chips","Boolean","counter","counterSizeString","type","String","default","counterString","multiple","showSize","Number","validator","v","includes","prependIcon","modelValue","Array","val","every","clearable","emits","e","focused","files","setup","_ref","attrs","emit","slots","t","model","isFocused","focus","blur","base","undefined","totalBytes","value","reduce","bytes","_ref2","size","totalBytesReadable","fileNames","map","file","counterValue","fileCount","length","vInputRef","vFieldRef","inputRef","isActive","active","onFocus","document","activeElement","onClickPrepend","onControlClick","onControlMousedown","click","onClear","stopPropagation","newValue","hasModelReset","isArray","hasCounter","hasDetails","details","rootAttrs","inputAttrs","_","inputProps","filterProps","fieldProps","_createVNode","_mergeProps","$event","class","style","_ref3","id","isDisabled","isDirty","isReadonly","isValid","_ref4","fieldClass","slotProps","_Fragment","target","selection","text","color","join"],"sources":["../../../src/components/VFileInput/VFileInput.tsx"],"sourcesContent":["// Styles\nimport './VFileInput.sass'\n\n// Components\nimport { filterFieldProps, makeVFieldProps } from '@/components/VField/VField'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VChip } from '@/components/VChip'\nimport { VCounter } from '@/components/VCounter'\nimport { VField } from '@/components/VField'\n\n// Composables\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useFocus } from '@/composables/focus'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, ref, watch } from 'vue'\nimport {\n callEvent,\n filterInputAttrs,\n genericComponent,\n humanReadableFileSize,\n useRender,\n wrapInArray,\n} from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nexport type VFileInputSlots = VInputSlots & VFieldSlots & {\n counter: []\n}\n\nexport const VFileInput = genericComponent<VFileInputSlots>()({\n name: 'VFileInput',\n\n inheritAttrs: false,\n\n props: {\n chips: Boolean,\n counter: Boolean,\n counterSizeString: {\n type: String,\n default: '$vuetify.fileInput.counterSize',\n },\n counterString: {\n type: String,\n default: '$vuetify.fileInput.counter',\n },\n multiple: Boolean,\n showSize: {\n type: [Boolean, Number] as PropType<boolean | 1000 | 1024>,\n default: false,\n validator: (v: boolean | number) => {\n return (\n typeof v === 'boolean' ||\n [1000, 1024].includes(v)\n )\n },\n },\n\n ...makeVInputProps({ prependIcon: '$file' }),\n\n modelValue: {\n type: Array as PropType<File[]>,\n default: () => ([]),\n validator: (val: any) => {\n return wrapInArray(val).every(v => v != null && typeof v === 'object')\n },\n },\n\n ...makeVFieldProps({ clearable: true }),\n },\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:control': (e: MouseEvent) => true,\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (files: File[]) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { t } = useLocale()\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined)\n const totalBytes = computed(() => (model.value ?? []).reduce((bytes, { size = 0 }) => bytes + size, 0))\n const totalBytesReadable = computed(() => humanReadableFileSize(totalBytes.value, base.value))\n\n const fileNames = computed(() => (model.value ?? []).map(file => {\n const { name = '', size = 0 } = file\n\n return !props.showSize\n ? name\n : `${name} (${humanReadableFileSize(size, base.value)})`\n }))\n\n const counterValue = computed(() => {\n const fileCount = model.value?.length ?? 0\n if (props.showSize) return t(props.counterSizeString, fileCount, totalBytesReadable.value)\n else return t(props.counterString, fileCount)\n })\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VInput>()\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n isFocused.value ||\n props.active\n ))\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) focus()\n }\n function onClickPrepend (e: MouseEvent) {\n onControlClick(e)\n }\n function onControlMousedown (e: MouseEvent) {\n emit('mousedown:control', e)\n }\n function onControlClick (e: MouseEvent) {\n inputRef.value?.click()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = []\n\n callEvent(props['onClick:clear'], e)\n })\n }\n\n watch(model, newValue => {\n const hasModelReset = !Array.isArray(newValue) || !newValue.length\n\n if (hasModelReset && inputRef.value) {\n inputRef.value.value = ''\n }\n })\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter)\n const hasDetails = !!(hasCounter || slots.details)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const [{ modelValue: _, ...inputProps }] = VInput.filterProps(props)\n const [fieldProps] = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-file-input',\n props.class,\n ]}\n style={ props.style }\n onClick:prepend={ onClickPrepend }\n { ...rootAttrs }\n { ...inputProps }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n id,\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n prepend-icon={ props.prependIcon }\n onMousedown={ onControlMousedown }\n onClick={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ props['onClick:prependInner'] }\n onClick:appendInner={ props['onClick:appendInner'] }\n { ...fieldProps }\n id={ id.value }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value }\n disabled={ isDisabled.value }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => (\n <>\n <input\n ref={ inputRef }\n type=\"file\"\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n multiple={ props.multiple }\n name={ props.name }\n onClick={ e => {\n e.stopPropagation()\n\n onFocus()\n }}\n onChange={ e => {\n if (!e.target) return\n\n const target = e.target as HTMLInputElement\n model.value = [...target.files ?? []]\n }}\n onFocus={ onFocus }\n onBlur={ blur }\n { ...slotProps }\n { ...inputAttrs }\n />\n\n <div class={ fieldClass }>\n { !!model.value?.length && (\n slots.selection ? slots.selection({\n fileNames: fileNames.value,\n totalBytes: totalBytes.value,\n totalBytesReadable: totalBytesReadable.value,\n })\n : props.chips ? fileNames.value.map(text => (\n <VChip\n key={ text }\n size=\"small\"\n color={ props.color }\n >{ text }</VChip>\n ))\n : fileNames.value.join(', ')\n )}\n </div>\n </>\n ),\n }}\n </VField>\n ),\n details: hasDetails ? slotProps => (\n <>\n { slots.details?.(slotProps) }\n\n { hasCounter && (\n <>\n <span />\n\n <VCounter\n active={ !!model.value?.length }\n value={ counterValue.value }\n v-slots:default={ slots.counter }\n />\n </>\n )}\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return forwardRefs({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VFileInput = InstanceType<typeof VFileInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,gBAAgB,EAAEC,eAAe;AAAA,SACjCC,eAAe,EAAEC,MAAM;AAAA,SACvBC,KAAK;AAAA,SACLC,QAAQ;AAAA,SACRC,MAAM,+BAEf;AAAA,SACSC,WAAW;AA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,EAEJ,GAAGiC;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOrD,WAAW,CAAC,CAAC,CAAC,EAAEmE,SAAS,EAAEC,SAAS,EAAEC,QAAQ,CAAC;EACxD;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"VFileInput.mjs","names":["filterFieldProps","makeVFieldProps","makeVInputProps","VInput","VChip","VCounter","VField","forwardRefs","useFocus","useLocale","useProxiedModel","computed","nextTick","ref","watch","callEvent","filterInputAttrs","genericComponent","humanReadableFileSize","propsFactory","useRender","wrapInArray","makeVFileInputProps","chips","Boolean","counter","counterSizeString","type","String","default","counterString","multiple","showSize","Number","validator","v","includes","prependIcon","modelValue","Array","val","every","clearable","VFileInput","name","inheritAttrs","props","emits","e","focused","files","setup","_ref","attrs","emit","slots","t","model","isFocused","focus","blur","base","undefined","totalBytes","value","reduce","bytes","_ref2","size","totalBytesReadable","fileNames","map","file","counterValue","fileCount","length","vInputRef","vFieldRef","inputRef","isActive","active","onFocus","document","activeElement","onClickPrepend","onControlClick","onControlMousedown","click","onClear","stopPropagation","newValue","hasModelReset","isArray","hasCounter","hasDetails","details","rootAttrs","inputAttrs","_","inputProps","filterProps","fieldProps","_createVNode","_mergeProps","$event","class","style","_ref3","id","isDisabled","isDirty","isReadonly","isValid","_ref4","fieldClass","slotProps","_Fragment","target","selection","text","color","join"],"sources":["../../../src/components/VFileInput/VFileInput.tsx"],"sourcesContent":["// Styles\nimport './VFileInput.sass'\n\n// Components\nimport { filterFieldProps, makeVFieldProps } from '@/components/VField/VField'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VChip } from '@/components/VChip'\nimport { VCounter } from '@/components/VCounter'\nimport { VField } from '@/components/VField'\n\n// Composables\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useFocus } from '@/composables/focus'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, ref, watch } from 'vue'\nimport {\n callEvent,\n filterInputAttrs,\n genericComponent,\n humanReadableFileSize,\n propsFactory,\n useRender,\n wrapInArray,\n} from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nexport type VFileInputSlots = VInputSlots & VFieldSlots & {\n counter: []\n}\n\nexport const makeVFileInputProps = propsFactory({\n chips: Boolean,\n counter: Boolean,\n counterSizeString: {\n type: String,\n default: '$vuetify.fileInput.counterSize',\n },\n counterString: {\n type: String,\n default: '$vuetify.fileInput.counter',\n },\n multiple: Boolean,\n showSize: {\n type: [Boolean, Number] as PropType<boolean | 1000 | 1024>,\n default: false,\n validator: (v: boolean | number) => {\n return (\n typeof v === 'boolean' ||\n [1000, 1024].includes(v)\n )\n },\n },\n\n ...makeVInputProps({ prependIcon: '$file' }),\n\n modelValue: {\n type: Array as PropType<File[]>,\n default: () => ([]),\n validator: (val: any) => {\n return wrapInArray(val).every(v => v != null && typeof v === 'object')\n },\n },\n\n ...makeVFieldProps({ clearable: true }),\n}, 'v-file-input')\n\nexport const VFileInput = genericComponent<VFileInputSlots>()({\n name: 'VFileInput',\n\n inheritAttrs: false,\n\n props: makeVFileInputProps(),\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:control': (e: MouseEvent) => true,\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (files: File[]) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { t } = useLocale()\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined)\n const totalBytes = computed(() => (model.value ?? []).reduce((bytes, { size = 0 }) => bytes + size, 0))\n const totalBytesReadable = computed(() => humanReadableFileSize(totalBytes.value, base.value))\n\n const fileNames = computed(() => (model.value ?? []).map(file => {\n const { name = '', size = 0 } = file\n\n return !props.showSize\n ? name\n : `${name} (${humanReadableFileSize(size, base.value)})`\n }))\n\n const counterValue = computed(() => {\n const fileCount = model.value?.length ?? 0\n if (props.showSize) return t(props.counterSizeString, fileCount, totalBytesReadable.value)\n else return t(props.counterString, fileCount)\n })\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VInput>()\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n isFocused.value ||\n props.active\n ))\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) focus()\n }\n function onClickPrepend (e: MouseEvent) {\n onControlClick(e)\n }\n function onControlMousedown (e: MouseEvent) {\n emit('mousedown:control', e)\n }\n function onControlClick (e: MouseEvent) {\n inputRef.value?.click()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = []\n\n callEvent(props['onClick:clear'], e)\n })\n }\n\n watch(model, newValue => {\n const hasModelReset = !Array.isArray(newValue) || !newValue.length\n\n if (hasModelReset && inputRef.value) {\n inputRef.value.value = ''\n }\n })\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter)\n const hasDetails = !!(hasCounter || slots.details)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const [{ modelValue: _, ...inputProps }] = VInput.filterProps(props)\n const [fieldProps] = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-file-input',\n props.class,\n ]}\n style={ props.style }\n onClick:prepend={ onClickPrepend }\n { ...rootAttrs }\n { ...inputProps }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n id,\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n prepend-icon={ props.prependIcon }\n onMousedown={ onControlMousedown }\n onClick={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ props['onClick:prependInner'] }\n onClick:appendInner={ props['onClick:appendInner'] }\n { ...fieldProps }\n id={ id.value }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value }\n disabled={ isDisabled.value }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => (\n <>\n <input\n ref={ inputRef }\n type=\"file\"\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n multiple={ props.multiple }\n name={ props.name }\n onClick={ e => {\n e.stopPropagation()\n\n onFocus()\n }}\n onChange={ e => {\n if (!e.target) return\n\n const target = e.target as HTMLInputElement\n model.value = [...target.files ?? []]\n }}\n onFocus={ onFocus }\n onBlur={ blur }\n { ...slotProps }\n { ...inputAttrs }\n />\n\n <div class={ fieldClass }>\n { !!model.value?.length && (\n slots.selection ? slots.selection({\n fileNames: fileNames.value,\n totalBytes: totalBytes.value,\n totalBytesReadable: totalBytesReadable.value,\n })\n : props.chips ? fileNames.value.map(text => (\n <VChip\n key={ text }\n size=\"small\"\n color={ props.color }\n >{ text }</VChip>\n ))\n : fileNames.value.join(', ')\n )}\n </div>\n </>\n ),\n }}\n </VField>\n ),\n details: hasDetails ? slotProps => (\n <>\n { slots.details?.(slotProps) }\n\n { hasCounter && (\n <>\n <span />\n\n <VCounter\n active={ !!model.value?.length }\n value={ counterValue.value }\n v-slots:default={ slots.counter }\n />\n </>\n )}\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return forwardRefs({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VFileInput = InstanceType<typeof VFileInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,gBAAgB,EAAEC,eAAe;AAAA,SACjCC,eAAe,EAAEC,MAAM;AAAA,SACvBC,KAAK;AAAA,SACLC,QAAQ;AAAA,SACRC,MAAM,+BAEf;AAAA,SACSC,WAAW;AAAA,SACXC,QAAQ;AAAA,SACRC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AA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;IAEF,OAAOvD,WAAW,CAAC,CAAC,CAAC,EAAEqE,SAAS,EAAEC,SAAS,EAAEC,QAAQ,CAAC;EACxD;AACF,CAAC,CAAC"}
|
|
@@ -285,7 +285,7 @@ declare const VFileInput: {
|
|
|
285
285
|
"onUpdate:focused"?: ((focused: boolean) => any) | undefined;
|
|
286
286
|
"onClick:control"?: ((e: MouseEvent) => any) | undefined;
|
|
287
287
|
"onMousedown:control"?: ((e: MouseEvent) => any) | undefined;
|
|
288
|
-
}, Omit<Omit<{
|
|
288
|
+
}, HTMLInputElement & Omit<Omit<{
|
|
289
289
|
$: vue.ComponentInternalInstance;
|
|
290
290
|
$data: {};
|
|
291
291
|
$props: Partial<{
|
|
@@ -653,7 +653,7 @@ declare const VFileInput: {
|
|
|
653
653
|
"onUpdate:focused"?: ((focused: boolean) => any) | undefined;
|
|
654
654
|
"onClick:control"?: ((e: MouseEvent) => any) | undefined;
|
|
655
655
|
"onMousedown:control"?: ((e: MouseEvent) => any) | undefined;
|
|
656
|
-
} & vue.ShallowUnwrapRef<Omit<Omit<{
|
|
656
|
+
} & vue.ShallowUnwrapRef<HTMLInputElement & Omit<Omit<{
|
|
657
657
|
$: vue.ComponentInternalInstance;
|
|
658
658
|
$data: {};
|
|
659
659
|
$props: Partial<{
|
|
@@ -969,7 +969,7 @@ declare const VFileInput: {
|
|
|
969
969
|
"onUpdate:focused"?: ((focused: boolean) => any) | undefined;
|
|
970
970
|
"onClick:control"?: ((e: MouseEvent) => any) | undefined;
|
|
971
971
|
"onMousedown:control"?: ((e: MouseEvent) => any) | undefined;
|
|
972
|
-
}, Omit<Omit<{
|
|
972
|
+
}, HTMLInputElement & Omit<Omit<{
|
|
973
973
|
$: vue.ComponentInternalInstance;
|
|
974
974
|
$data: {};
|
|
975
975
|
$props: Partial<{
|
|
@@ -13,26 +13,27 @@ import { makeThemeProps, provideTheme } from "../../composables/theme.mjs";
|
|
|
13
13
|
import { useBackgroundColor } from "../../composables/color.mjs";
|
|
14
14
|
import { useResizeObserver } from "../../composables/resizeObserver.mjs"; // Utilities
|
|
15
15
|
import { computed, ref, toRef } from 'vue';
|
|
16
|
-
import { genericComponent, useRender } from "../../util/index.mjs";
|
|
16
|
+
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
|
|
17
|
+
export const makeVFooterProps = propsFactory({
|
|
18
|
+
app: Boolean,
|
|
19
|
+
color: String,
|
|
20
|
+
height: {
|
|
21
|
+
type: [Number, String],
|
|
22
|
+
default: 'auto'
|
|
23
|
+
},
|
|
24
|
+
...makeBorderProps(),
|
|
25
|
+
...makeComponentProps(),
|
|
26
|
+
...makeElevationProps(),
|
|
27
|
+
...makeLayoutItemProps(),
|
|
28
|
+
...makeRoundedProps(),
|
|
29
|
+
...makeTagProps({
|
|
30
|
+
tag: 'footer'
|
|
31
|
+
}),
|
|
32
|
+
...makeThemeProps()
|
|
33
|
+
}, 'v-footer');
|
|
17
34
|
export const VFooter = genericComponent()({
|
|
18
35
|
name: 'VFooter',
|
|
19
|
-
props:
|
|
20
|
-
app: Boolean,
|
|
21
|
-
color: String,
|
|
22
|
-
height: {
|
|
23
|
-
type: [Number, String],
|
|
24
|
-
default: 'auto'
|
|
25
|
-
},
|
|
26
|
-
...makeBorderProps(),
|
|
27
|
-
...makeComponentProps(),
|
|
28
|
-
...makeElevationProps(),
|
|
29
|
-
...makeLayoutItemProps(),
|
|
30
|
-
...makeRoundedProps(),
|
|
31
|
-
...makeTagProps({
|
|
32
|
-
tag: 'footer'
|
|
33
|
-
}),
|
|
34
|
-
...makeThemeProps()
|
|
35
|
-
},
|
|
36
|
+
props: makeVFooterProps(),
|
|
36
37
|
setup(props, _ref) {
|
|
37
38
|
let {
|
|
38
39
|
slots
|
|
@@ -1 +1 @@
|
|
|
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","
|
|
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","propsFactory","useRender","makeVFooterProps","app","Boolean","color","String","height","type","Number","default","tag","VFooter","name","props","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, propsFactory, useRender } from '@/util'\n\nexport const makeVFooterProps = propsFactory({\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}, 'v-footer')\n\nexport const VFooter = genericComponent()({\n name: 'VFooter',\n\n props: makeVFooterProps(),\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,YAAY,EAAEC,SAAS;AAElD,OAAO,MAAMC,gBAAgB,GAAGF,YAAY,CAAC;EAC3CG,GAAG,EAAEC,OAAO;EACZC,KAAK,EAAEC,MAAM;EACbC,MAAM,EAAE;IACNC,IAAI,EAAE,CAACC,MAAM,EAAEH,MAAM,CAAC;IACtBI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AAGG,QAAQ,CAACjB,KAAK,CAACP,MAAM,EAAE,EAAE,CAAC,CAAC;IACtG,MAAM;MAAEyB;IAAiB,CAAC,GAAG5C,aAAa,CAAC;MACzC6C,EAAE,EAAEnB,KAAK,CAACD,IAAI;MACdqB,KAAK,EAAEtC,QAAQ,CAAC,MAAMmC,QAAQ,CAACjB,KAAK,CAACoB,KAAK,EAAE,EAAE,CAAC,CAAC;MAChDC,QAAQ,EAAEvC,QAAQ,CAAC,MAAM,QAAQ,CAAC;MAClCwC,UAAU,EAAE7B,MAAM;MAClB8B,WAAW,EAAEzC,QAAQ,CAAC,MAAMkB,KAAK,CAACP,MAAM,KAAK,MAAM,GAAG+B,SAAS,GAAG/B,MAAM,CAACqB,KAAK,CAAC;MAC/EW,MAAM,EAAE3C,QAAQ,CAAC,MAAMkB,KAAK,CAACX,GAAG,CAAC;MACjCqC,QAAQ,EAAE1C,KAAK,CAACgB,KAAK,EAAE,UAAU;IACnC,CAAC,CAAC;IAEFb,SAAS,CAAC,MAAAwC,YAAA,CAAA3B,KAAA,CAAAH,GAAA;MAAA,OAEAc,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,EACpBd,KAAK,CAAC4B,KAAK,CACZ;MAAA,SACM,CACLtB,qBAAqB,CAACQ,KAAK,EAC3Bd,KAAK,CAACX,GAAG,GAAG6B,gBAAgB,CAACJ,KAAK,GAAGU,SAAS,EAC9CxB,KAAK,CAAC6B,KAAK;IACZ,GACS1B,KAAK,CAElB,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
@@ -4,13 +4,14 @@ import { createForm, makeFormProps } from "../../composables/form.mjs";
|
|
|
4
4
|
import { forwardRefs } from "../../composables/forwardRefs.mjs";
|
|
5
5
|
import { makeComponentProps } from "../../composables/component.mjs"; // Utilities
|
|
6
6
|
import { ref } from 'vue';
|
|
7
|
-
import { genericComponent, useRender } from "../../util/index.mjs"; // Types
|
|
7
|
+
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
|
|
8
|
+
export const makeVFormProps = propsFactory({
|
|
9
|
+
...makeComponentProps(),
|
|
10
|
+
...makeFormProps()
|
|
11
|
+
}, 'v-form');
|
|
8
12
|
export const VForm = genericComponent()({
|
|
9
13
|
name: 'VForm',
|
|
10
|
-
props:
|
|
11
|
-
...makeComponentProps(),
|
|
12
|
-
...makeFormProps()
|
|
13
|
-
},
|
|
14
|
+
props: makeVFormProps(),
|
|
14
15
|
emits: {
|
|
15
16
|
'update:modelValue': val => true,
|
|
16
17
|
submit: e => true
|
|
@@ -1 +1 @@
|
|
|
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:
|
|
1
|
+
{"version":3,"file":"VForm.mjs","names":["createForm","makeFormProps","forwardRefs","makeComponentProps","ref","genericComponent","propsFactory","useRender","makeVFormProps","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, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { SubmitEventPromise } from '@/composables/form'\n\nexport const makeVFormProps = propsFactory({\n ...makeComponentProps(),\n ...makeFormProps(),\n}, 'v-form')\n\nexport const VForm = genericComponent()({\n name: 'VForm',\n\n props: makeVFormProps(),\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 forwardRefs(form, formRef)\n },\n})\n\nexport type VForm = InstanceType<typeof VForm>\n"],"mappings":";AAAA;AAAA,SACSA,UAAU,EAAEC,aAAa;AAAA,SACzBC,WAAW;AAAA,SACXC,kBAAkB,2CAE3B;AACA,SAASC,GAAG,QAAQ,KAAK;AAAA,SAChBC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAElD;AAGA,OAAO,MAAMC,cAAc,GAAGF,YAAY,CAAC;EACzC,GAAGH,kBAAkB,EAAE;EACvB,GAAGF,aAAa;AAClB,CAAC,EAAE,QAAQ,CAAC;AAEZ,OAA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S,CAAC,MAAA8B,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,OAAOlB,WAAW,CAACkB,IAAI,EAAEC,OAAO,CAAC;EACnC;AACF,CAAC,CAAC"}
|
|
@@ -108,7 +108,7 @@ declare const VForm: {
|
|
|
108
108
|
}>;
|
|
109
109
|
reset: () => void;
|
|
110
110
|
resetValidation: () => void;
|
|
111
|
-
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
111
|
+
} & HTMLFormElement, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
112
112
|
'update:modelValue': (val: boolean | null) => true;
|
|
113
113
|
submit: (e: SubmitEventPromise) => true;
|
|
114
114
|
}, string, {
|
|
@@ -184,7 +184,7 @@ declare const VForm: {
|
|
|
184
184
|
}>;
|
|
185
185
|
reset: () => void;
|
|
186
186
|
resetValidation: () => void;
|
|
187
|
-
}> & {} & vue.ComponentCustomProperties & {};
|
|
187
|
+
} & HTMLFormElement> & {} & vue.ComponentCustomProperties & {};
|
|
188
188
|
__isFragment?: undefined;
|
|
189
189
|
__isTeleport?: undefined;
|
|
190
190
|
__isSuspense?: undefined;
|
|
@@ -234,7 +234,7 @@ declare const VForm: {
|
|
|
234
234
|
}>;
|
|
235
235
|
reset: () => void;
|
|
236
236
|
resetValidation: () => void;
|
|
237
|
-
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
237
|
+
} & HTMLFormElement, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
238
238
|
'update:modelValue': (val: boolean | null) => true;
|
|
239
239
|
submit: (e: SubmitEventPromise) => true;
|
|
240
240
|
}, string, {
|
|
@@ -6,7 +6,7 @@ import { breakpoints } from "../../composables/display.mjs";
|
|
|
6
6
|
import { makeComponentProps } from "../../composables/component.mjs";
|
|
7
7
|
import { makeTagProps } from "../../composables/tag.mjs"; // Utilities
|
|
8
8
|
import { capitalize, computed, h } from 'vue';
|
|
9
|
-
import { genericComponent } from "../../util/index.mjs"; // Types
|
|
9
|
+
import { genericComponent, propsFactory } from "../../util/index.mjs"; // Types
|
|
10
10
|
const breakpointProps = (() => {
|
|
11
11
|
return breakpoints.reduce((props, val) => {
|
|
12
12
|
props[val] = {
|
|
@@ -65,32 +65,33 @@ function breakpointClass(type, prop, val) {
|
|
|
65
65
|
return className.toLowerCase();
|
|
66
66
|
}
|
|
67
67
|
const ALIGN_SELF_VALUES = ['auto', 'start', 'end', 'center', 'baseline', 'stretch'];
|
|
68
|
+
export const makeVColProps = propsFactory({
|
|
69
|
+
cols: {
|
|
70
|
+
type: [Boolean, String, Number],
|
|
71
|
+
default: false
|
|
72
|
+
},
|
|
73
|
+
...breakpointProps,
|
|
74
|
+
offset: {
|
|
75
|
+
type: [String, Number],
|
|
76
|
+
default: null
|
|
77
|
+
},
|
|
78
|
+
...offsetProps,
|
|
79
|
+
order: {
|
|
80
|
+
type: [String, Number],
|
|
81
|
+
default: null
|
|
82
|
+
},
|
|
83
|
+
...orderProps,
|
|
84
|
+
alignSelf: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: null,
|
|
87
|
+
validator: str => ALIGN_SELF_VALUES.includes(str)
|
|
88
|
+
},
|
|
89
|
+
...makeComponentProps(),
|
|
90
|
+
...makeTagProps()
|
|
91
|
+
}, 'v-col');
|
|
68
92
|
export const VCol = genericComponent()({
|
|
69
93
|
name: 'VCol',
|
|
70
|
-
props:
|
|
71
|
-
cols: {
|
|
72
|
-
type: [Boolean, String, Number],
|
|
73
|
-
default: false
|
|
74
|
-
},
|
|
75
|
-
...breakpointProps,
|
|
76
|
-
offset: {
|
|
77
|
-
type: [String, Number],
|
|
78
|
-
default: null
|
|
79
|
-
},
|
|
80
|
-
...offsetProps,
|
|
81
|
-
order: {
|
|
82
|
-
type: [String, Number],
|
|
83
|
-
default: null
|
|
84
|
-
},
|
|
85
|
-
...orderProps,
|
|
86
|
-
alignSelf: {
|
|
87
|
-
type: String,
|
|
88
|
-
default: null,
|
|
89
|
-
validator: str => ALIGN_SELF_VALUES.includes(str)
|
|
90
|
-
},
|
|
91
|
-
...makeComponentProps(),
|
|
92
|
-
...makeTagProps()
|
|
93
|
-
},
|
|
94
|
+
props: makeVColProps(),
|
|
94
95
|
setup(props, _ref) {
|
|
95
96
|
let {
|
|
96
97
|
slots
|
|
@@ -1 +1 @@
|
|
|
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","
|
|
1
|
+
{"version":3,"file":"VCol.mjs","names":["breakpoints","makeComponentProps","makeTagProps","capitalize","computed","h","genericComponent","propsFactory","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","makeVColProps","cols","alignSelf","validator","str","includes","VCol","name","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, propsFactory } 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 makeVColProps = propsFactory({\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}, 'v-col')\n\nexport const VCol = genericComponent()({\n name: 'VCol',\n\n props: makeVColProps(),\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,EAAEC,YAAY,gCAEvC;AAOA,MAAMC,eAAe,GAAG,CAAC,MAAM;EAC7B,OAAOR,WAAW,CAACS,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,MA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DC,KAAK,EAAE9C,KAAK,CAAC8C;IACf,CAAC,EAAEX,KAAK,CAAC7B,OAAO,IAAI,CAAC;EACvB;AACF,CAAC,CAAC"}
|
|
@@ -4,26 +4,31 @@ import "./VGrid.css";
|
|
|
4
4
|
|
|
5
5
|
// Composables
|
|
6
6
|
import { makeComponentProps } from "../../composables/component.mjs";
|
|
7
|
-
import { makeTagProps } from "../../composables/tag.mjs";
|
|
8
|
-
import {
|
|
7
|
+
import { makeTagProps } from "../../composables/tag.mjs";
|
|
8
|
+
import { useRtl } from "../../composables/locale.mjs"; // Utilities
|
|
9
|
+
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
|
|
10
|
+
export const makeVContainerProps = propsFactory({
|
|
11
|
+
fluid: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
},
|
|
15
|
+
...makeComponentProps(),
|
|
16
|
+
...makeTagProps()
|
|
17
|
+
}, 'v-container');
|
|
9
18
|
export const VContainer = genericComponent()({
|
|
10
19
|
name: 'VContainer',
|
|
11
|
-
props:
|
|
12
|
-
fluid: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
},
|
|
16
|
-
...makeComponentProps(),
|
|
17
|
-
...makeTagProps()
|
|
18
|
-
},
|
|
20
|
+
props: makeVContainerProps(),
|
|
19
21
|
setup(props, _ref) {
|
|
20
22
|
let {
|
|
21
23
|
slots
|
|
22
24
|
} = _ref;
|
|
25
|
+
const {
|
|
26
|
+
rtlClasses
|
|
27
|
+
} = useRtl();
|
|
23
28
|
useRender(() => _createVNode(props.tag, {
|
|
24
29
|
"class": ['v-container', {
|
|
25
30
|
'v-container--fluid': props.fluid
|
|
26
|
-
}, props.class],
|
|
31
|
+
}, rtlClasses.value, props.class],
|
|
27
32
|
"style": props.style
|
|
28
33
|
}, slots));
|
|
29
34
|
return {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VContainer.mjs","names":["makeComponentProps","makeTagProps","
|
|
1
|
+
{"version":3,"file":"VContainer.mjs","names":["makeComponentProps","makeTagProps","useRtl","genericComponent","propsFactory","useRender","makeVContainerProps","fluid","type","Boolean","default","VContainer","name","props","setup","_ref","slots","rtlClasses","_createVNode","tag","value","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'\nimport { useRtl } from '@/composables/locale'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVContainerProps = propsFactory({\n fluid: {\n type: Boolean,\n default: false,\n },\n\n ...makeComponentProps(),\n ...makeTagProps(),\n}, 'v-container')\n\nexport const VContainer = genericComponent()({\n name: 'VContainer',\n\n props: makeVContainerProps(),\n\n setup (props, { slots }) {\n const { rtlClasses } = useRtl()\n\n useRender(() => (\n <props.tag\n class={[\n 'v-container',\n { 'v-container--fluid': props.fluid },\n rtlClasses.value,\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;AAAA,SACZC,MAAM,wCAEf;AAAA,SACSC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAElD,OAAO,MAAMC,mBAAmB,GAAGF,YAAY,CAAC;EAC9CG,KAAK,EAAE;IACLC,IAAI,EAAEC,OAAO;IACbC,OAAO,EAAE;EACX,CAAC;EAED,GAAGV,kBAAkB,EAAE;EACvB,GAAGC,YAAY;AACjB,CAAC,EAAE,aAAa,CAAC;AAEjB,OAAO,MAAMU,UAAU,GAAGR,gBAAgB,EAAE,CAAC;EAC3CS,IAAI,EAAE,YAAY;EAElBC,KAAK,EAAEP,mBAAmB,EAAE;EAE5BQ,KAAKA,CAAED,KAAK,EAAAE,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrB,MAAM;MAAEE;IAAW,CAAC,GAAGf,MAAM,EAAE;IAE/BG,SAAS,CAAC,MAAAa,YAAA,CAAAL,KAAA,CAAAM,GAAA;MAAA,SAEC,CACL,aAAa,EACb;QAAE,oBAAoB,EAAEN,KAAK,CAACN;MAAM,CAAC,EACrCU,UAAU,CAACG,KAAK,EAChBP,KAAK,CAACQ,KAAK,CACZ;MAAA,SACOR,KAAK,CAACS;IAAK,GACTN,KAAK,CAElB,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { breakpoints } from "../../composables/display.mjs";
|
|
|
6
6
|
import { makeComponentProps } from "../../composables/component.mjs";
|
|
7
7
|
import { makeTagProps } from "../../composables/tag.mjs"; // Utilities
|
|
8
8
|
import { capitalize, computed, h } from 'vue';
|
|
9
|
-
import { genericComponent } from "../../util/index.mjs"; // Types
|
|
9
|
+
import { genericComponent, propsFactory } from "../../util/index.mjs"; // Types
|
|
10
10
|
const ALIGNMENT = ['start', 'end', 'center'];
|
|
11
11
|
const SPACE = ['space-between', 'space-around', 'space-evenly'];
|
|
12
12
|
function makeRowProps(prefix, def) {
|
|
@@ -61,32 +61,33 @@ function breakpointClass(type, prop, val) {
|
|
|
61
61
|
className += `-${val}`;
|
|
62
62
|
return className.toLowerCase();
|
|
63
63
|
}
|
|
64
|
+
export const makeVRowProps = propsFactory({
|
|
65
|
+
dense: Boolean,
|
|
66
|
+
noGutters: Boolean,
|
|
67
|
+
align: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: null,
|
|
70
|
+
validator: alignValidator
|
|
71
|
+
},
|
|
72
|
+
...alignProps,
|
|
73
|
+
justify: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: null,
|
|
76
|
+
validator: justifyValidator
|
|
77
|
+
},
|
|
78
|
+
...justifyProps,
|
|
79
|
+
alignContent: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: null,
|
|
82
|
+
validator: alignContentValidator
|
|
83
|
+
},
|
|
84
|
+
...alignContentProps,
|
|
85
|
+
...makeComponentProps(),
|
|
86
|
+
...makeTagProps()
|
|
87
|
+
}, 'v-row');
|
|
64
88
|
export const VRow = genericComponent()({
|
|
65
89
|
name: 'VRow',
|
|
66
|
-
props:
|
|
67
|
-
dense: Boolean,
|
|
68
|
-
noGutters: Boolean,
|
|
69
|
-
align: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: null,
|
|
72
|
-
validator: alignValidator
|
|
73
|
-
},
|
|
74
|
-
...alignProps,
|
|
75
|
-
justify: {
|
|
76
|
-
type: String,
|
|
77
|
-
default: null,
|
|
78
|
-
validator: justifyValidator
|
|
79
|
-
},
|
|
80
|
-
...justifyProps,
|
|
81
|
-
alignContent: {
|
|
82
|
-
type: String,
|
|
83
|
-
default: null,
|
|
84
|
-
validator: alignContentValidator
|
|
85
|
-
},
|
|
86
|
-
...alignContentProps,
|
|
87
|
-
...makeComponentProps(),
|
|
88
|
-
...makeTagProps()
|
|
89
|
-
},
|
|
90
|
+
props: makeVRowProps(),
|
|
90
91
|
setup(props, _ref) {
|
|
91
92
|
let {
|
|
92
93
|
slots
|