vuetify 3.8.5 → 3.8.7
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 +2718 -2718
- package/dist/json/importMap-labs.json +12 -12
- package/dist/json/importMap.json +182 -182
- package/dist/json/web-types.json +4939 -4939
- package/dist/vuetify-labs.cjs +1014 -932
- package/dist/vuetify-labs.css +5501 -5490
- package/dist/vuetify-labs.d.ts +609 -606
- package/dist/vuetify-labs.esm.js +1015 -933
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +1014 -932
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +901 -819
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3585 -3574
- package/dist/vuetify.d.ts +521 -518
- package/dist/vuetify.esm.js +902 -820
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +901 -819
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1064 -1053
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/VAlert.js +11 -11
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VApp/VApp.js +5 -5
- package/lib/components/VApp/VApp.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.d.ts +84 -84
- package/lib/components/VAutocomplete/VAutocomplete.js +9 -9
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VAvatar/VAvatar.js +4 -4
- package/lib/components/VAvatar/VAvatar.js.map +1 -1
- package/lib/components/VBadge/VBadge.js +3 -3
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VBanner/VBanner.js +6 -6
- package/lib/components/VBanner/VBanner.js.map +1 -1
- package/lib/components/VBanner/VBannerActions.js +4 -4
- package/lib/components/VBanner/VBannerActions.js.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.js +6 -6
- package/lib/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js +5 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.js +4 -4
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.js.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.js +5 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.js.map +1 -1
- package/lib/components/VBtn/VBtn.js +7 -7
- package/lib/components/VBtn/VBtn.js.map +1 -1
- package/lib/components/VBtnGroup/VBtnGroup.js +4 -4
- package/lib/components/VBtnGroup/VBtnGroup.js.map +1 -1
- package/lib/components/VCard/VCard.js +5 -5
- package/lib/components/VCard/VCard.js.map +1 -1
- package/lib/components/VCard/VCardActions.js +4 -4
- package/lib/components/VCard/VCardActions.js.map +1 -1
- package/lib/components/VCard/VCardItem.js +9 -9
- package/lib/components/VCard/VCardItem.js.map +1 -1
- package/lib/components/VCard/VCardSubtitle.js +4 -4
- package/lib/components/VCard/VCardSubtitle.js.map +1 -1
- package/lib/components/VCard/VCardText.js +4 -4
- package/lib/components/VCard/VCardText.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.js +4 -4
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.d.ts +12 -12
- package/lib/components/VChip/VChip.js +11 -11
- package/lib/components/VChip/VChip.js.map +1 -1
- package/lib/components/VColorPicker/VColorPicker.js +3 -3
- package/lib/components/VColorPicker/VColorPicker.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.js +9 -9
- package/lib/components/VColorPicker/VColorPickerCanvas.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.js +6 -6
- package/lib/components/VColorPicker/VColorPickerEdit.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.js +11 -11
- package/lib/components/VColorPicker/VColorPickerPreview.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.js +10 -10
- package/lib/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
- package/lib/components/VCombobox/VCombobox.d.ts +84 -84
- package/lib/components/VCombobox/VCombobox.js +9 -9
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VConfirmEdit/VConfirmEdit.js +3 -3
- package/lib/components/VConfirmEdit/VConfirmEdit.js.map +1 -1
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.js +3 -3
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.js.map +1 -1
- package/lib/components/VCounter/VCounter.js +5 -5
- package/lib/components/VCounter/VCounter.js.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.js +5 -5
- package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.js +4 -4
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/VDataTableColumn.js +5 -5
- package/lib/components/VDataTable/VDataTableColumn.js.map +1 -1
- package/lib/components/VDataTable/VDataTableFooter.js +6 -6
- package/lib/components/VDataTable/VDataTableFooter.js.map +1 -1
- package/lib/components/VDataTable/VDataTableGroupHeaderRow.js +7 -7
- package/lib/components/VDataTable/VDataTableGroupHeaderRow.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.js +11 -11
- package/lib/components/VDataTable/VDataTableHeaders.js.map +1 -1
- package/lib/components/VDataTable/VDataTableRow.js +6 -6
- package/lib/components/VDataTable/VDataTableRow.js.map +1 -1
- package/lib/components/VDataTable/VDataTableRows.js +7 -7
- package/lib/components/VDataTable/VDataTableRows.js.map +1 -1
- package/lib/components/VDataTable/VDataTableServer.js +4 -4
- package/lib/components/VDataTable/VDataTableServer.js.map +1 -1
- package/lib/components/VDataTable/VDataTableVirtual.js +14 -14
- package/lib/components/VDataTable/VDataTableVirtual.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +3 -3
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerControls.js +5 -5
- package/lib/components/VDatePicker/VDatePickerControls.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js +8 -8
- package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.js +10 -10
- package/lib/components/VDatePicker/VDatePickerMonth.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonths.js +5 -5
- package/lib/components/VDatePicker/VDatePickerMonths.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.js +5 -5
- package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/lib/components/VDialog/__test__/VDialog.spec.browser.js +5 -5
- package/lib/components/VDialog/__test__/VDialog.spec.browser.js.map +1 -1
- package/lib/components/VDivider/VDivider.js +10 -10
- package/lib/components/VDivider/VDivider.js.map +1 -1
- package/lib/components/VEmptyState/VEmptyState.js +14 -14
- package/lib/components/VEmptyState/VEmptyState.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.js +6 -6
- package/lib/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelText.js +5 -5
- package/lib/components/VExpansionPanel/VExpansionPanelText.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.js +10 -10
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanels.js +4 -4
- package/lib/components/VExpansionPanel/VExpansionPanels.js.map +1 -1
- package/lib/components/VFab/VFab.js +7 -7
- package/lib/components/VFab/VFab.js.map +1 -1
- package/lib/components/VField/VField.js +20 -18
- package/lib/components/VField/VField.js.map +1 -1
- package/lib/components/VField/VFieldLabel.js +4 -4
- package/lib/components/VField/VFieldLabel.js.map +1 -1
- package/lib/components/VFileInput/VFileInput.d.ts +30 -30
- package/lib/components/VFileInput/VFileInput.js +5 -5
- package/lib/components/VFileInput/VFileInput.js.map +1 -1
- package/lib/components/VFooter/VFooter.js +4 -4
- package/lib/components/VFooter/VFooter.js.map +1 -1
- package/lib/components/VForm/VForm.js +4 -4
- package/lib/components/VForm/VForm.js.map +1 -1
- package/lib/components/VGrid/VContainer.js +4 -4
- package/lib/components/VGrid/VContainer.js.map +1 -1
- package/lib/components/VIcon/VIcon.js +5 -5
- package/lib/components/VIcon/VIcon.js.map +1 -1
- package/lib/components/VImg/VImg.js +19 -19
- package/lib/components/VImg/VImg.js.map +1 -1
- package/lib/components/VInfiniteScroll/VInfiniteScroll.js +10 -10
- package/lib/components/VInfiniteScroll/VInfiniteScroll.js.map +1 -1
- package/lib/components/VInput/InputIcon.d.ts +1 -1
- package/lib/components/VInput/InputIcon.js +5 -4
- package/lib/components/VInput/InputIcon.js.map +1 -1
- package/lib/components/VInput/VInput.d.ts +12 -12
- package/lib/components/VInput/VInput.js +9 -9
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.js +3 -3
- package/lib/components/VItemGroup/VItemGroup.js.map +1 -1
- package/lib/components/VLabel/VLabel.js +5 -5
- package/lib/components/VLabel/VLabel.js.map +1 -1
- package/lib/components/VLayout/VLayout.js +4 -4
- package/lib/components/VLayout/VLayout.js.map +1 -1
- package/lib/components/VLayout/VLayoutItem.js +4 -4
- package/lib/components/VLayout/VLayoutItem.js.map +1 -1
- package/lib/components/VLazy/VLazy.js +6 -6
- package/lib/components/VLazy/VLazy.js.map +1 -1
- package/lib/components/VList/VList.d.ts +3 -3
- package/lib/components/VList/VList.js +4 -4
- package/lib/components/VList/VList.js.map +1 -1
- package/lib/components/VList/VListGroup.js +5 -5
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.js +11 -11
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VList/VListItemAction.js +4 -4
- package/lib/components/VList/VListItemAction.js.map +1 -1
- package/lib/components/VList/VListItemMedia.js +4 -4
- package/lib/components/VList/VListItemMedia.js.map +1 -1
- package/lib/components/VList/VListItemSubtitle.js +4 -4
- package/lib/components/VList/VListItemSubtitle.js.map +1 -1
- package/lib/components/VList/VListSubheader.js +6 -6
- package/lib/components/VList/VListSubheader.js.map +1 -1
- package/lib/components/VLocaleProvider/VLocaleProvider.js +4 -4
- package/lib/components/VLocaleProvider/VLocaleProvider.js.map +1 -1
- package/lib/components/VMain/VMain.js +5 -5
- package/lib/components/VMain/VMain.js.map +1 -1
- package/lib/components/VMessages/VMessages.js +4 -4
- package/lib/components/VMessages/VMessages.js.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js +7 -7
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/lib/components/VNavigationDrawer/touch.js +2 -4
- package/lib/components/VNavigationDrawer/touch.js.map +1 -1
- package/lib/components/VNumberInput/VNumberInput.css +15 -4
- package/lib/components/VNumberInput/VNumberInput.d.ts +80 -80
- package/lib/components/VNumberInput/VNumberInput.js +38 -22
- package/lib/components/VNumberInput/VNumberInput.js.map +1 -1
- package/lib/components/VNumberInput/VNumberInput.sass +18 -6
- package/lib/components/VOtpInput/VOtpInput.js +7 -7
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VOverlay/VOverlay.js +8 -8
- package/lib/components/VOverlay/VOverlay.js.map +1 -1
- package/lib/components/VOverlay/locationStrategies.js +16 -8
- package/lib/components/VOverlay/locationStrategies.js.map +1 -1
- package/lib/components/VPagination/VPagination.js +11 -11
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VParallax/VParallax.js +4 -4
- package/lib/components/VParallax/VParallax.js.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.js +14 -14
- package/lib/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.js +26 -26
- package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.d.ts +12 -12
- package/lib/components/VRadioGroup/VRadioGroup.js +2 -2
- package/lib/components/VRadioGroup/VRadioGroup.js.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.d.ts +12 -12
- package/lib/components/VRangeSlider/VRangeSlider.js +5 -5
- package/lib/components/VRangeSlider/VRangeSlider.js.map +1 -1
- package/lib/components/VRating/VRating.js +14 -14
- package/lib/components/VRating/VRating.js.map +1 -1
- package/lib/components/VResponsive/VResponsive.js +9 -9
- package/lib/components/VResponsive/VResponsive.js.map +1 -1
- package/lib/components/VSelect/VSelect.d.ts +84 -84
- package/lib/components/VSelect/VSelect.js +44 -13
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelectionControl/VSelectionControl.js +11 -11
- package/lib/components/VSelectionControl/VSelectionControl.js.map +1 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.js +5 -5
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.js.map +1 -1
- package/lib/components/VSheet/VSheet.js +3 -3
- package/lib/components/VSheet/VSheet.js.map +1 -1
- package/lib/components/VSkeletonLoader/VSkeletonLoader.js +4 -4
- package/lib/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +12 -12
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VSlider/VSlider.d.ts +12 -12
- package/lib/components/VSlider/VSlider.js +4 -4
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/components/VSlider/VSliderThumb.js +19 -19
- package/lib/components/VSlider/VSliderThumb.js.map +1 -1
- package/lib/components/VSlider/VSliderTrack.js +23 -23
- package/lib/components/VSlider/VSliderTrack.js.map +1 -1
- package/lib/components/VSlider/slider.js +1 -1
- package/lib/components/VSlider/slider.js.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.js +4 -4
- package/lib/components/VSnackbar/VSnackbar.js.map +1 -1
- package/lib/components/VSnackbarQueue/VSnackbarQueue.js +3 -3
- package/lib/components/VSnackbarQueue/VSnackbarQueue.js.map +1 -1
- package/lib/components/VSparkline/VBarline.js +12 -12
- package/lib/components/VSparkline/VBarline.js.map +1 -1
- package/lib/components/VSparkline/VTrendline.js +8 -8
- package/lib/components/VSparkline/VTrendline.js.map +1 -1
- package/lib/components/VStepper/VStepper.js +2 -2
- package/lib/components/VStepper/VStepper.js.map +1 -1
- package/lib/components/VStepper/VStepperActions.js +2 -2
- package/lib/components/VStepper/VStepperActions.js.map +1 -1
- package/lib/components/VStepper/VStepperItem.js +10 -10
- package/lib/components/VStepper/VStepperItem.js.map +1 -1
- package/lib/components/VSwitch/VSwitch.d.ts +12 -12
- package/lib/components/VSwitch/VSwitch.js +10 -10
- package/lib/components/VSwitch/VSwitch.js.map +1 -1
- package/lib/components/VSystemBar/VSystemBar.js +4 -4
- package/lib/components/VSystemBar/VSystemBar.js.map +1 -1
- package/lib/components/VTable/VTable.js +8 -8
- package/lib/components/VTable/VTable.js.map +1 -1
- package/lib/components/VTabs/VTab.js +4 -4
- package/lib/components/VTabs/VTab.js.map +1 -1
- package/lib/components/VTabs/VTabs.js +2 -2
- package/lib/components/VTabs/VTabs.js.map +1 -1
- package/lib/components/VTextField/VTextField.d.ts +30 -30
- package/lib/components/VTextField/VTextField.js +12 -12
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTextarea/VTextarea.d.ts +30 -30
- package/lib/components/VTextarea/VTextarea.js +10 -10
- package/lib/components/VTextarea/VTextarea.js.map +1 -1
- package/lib/components/VThemeProvider/VThemeProvider.js +3 -3
- package/lib/components/VThemeProvider/VThemeProvider.js.map +1 -1
- package/lib/components/VTimeline/VTimeline.js +5 -5
- package/lib/components/VTimeline/VTimeline.js.map +1 -1
- package/lib/components/VTimeline/VTimelineDivider.js +17 -17
- package/lib/components/VTimeline/VTimelineDivider.js.map +1 -1
- package/lib/components/VTimeline/VTimelineItem.js +9 -9
- package/lib/components/VTimeline/VTimelineItem.js.map +1 -1
- package/lib/components/VToolbar/VToolbar.js +13 -13
- package/lib/components/VToolbar/VToolbar.js.map +1 -1
- package/lib/components/VToolbar/VToolbarItems.js +4 -4
- package/lib/components/VToolbar/VToolbarItems.js.map +1 -1
- package/lib/components/VToolbar/VToolbarTitle.js +4 -4
- package/lib/components/VToolbar/VToolbarTitle.js.map +1 -1
- package/lib/components/VValidation/VValidation.d.ts +8 -8
- package/lib/components/VVirtualScroll/VVirtualScroll.js +13 -13
- package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScrollItem.js +3 -3
- package/lib/components/VVirtualScroll/VVirtualScrollItem.js.map +1 -1
- package/lib/components/VWindow/VWindow.js +13 -13
- package/lib/components/VWindow/VWindow.js.map +1 -1
- package/lib/components/VWindow/VWindowItem.js +6 -6
- package/lib/components/VWindow/VWindowItem.js.map +1 -1
- package/lib/composables/filter.js +8 -8
- package/lib/composables/filter.js.map +1 -1
- package/lib/composables/goto.js +1 -1
- package/lib/composables/goto.js.map +1 -1
- package/lib/composables/icons.js +6 -6
- package/lib/composables/icons.js.map +1 -1
- package/lib/composables/loader.js +3 -3
- package/lib/composables/loader.js.map +1 -1
- package/lib/composables/validation.d.ts +6 -5
- package/lib/composables/validation.js +4 -29
- package/lib/composables/validation.js.map +1 -1
- package/lib/composables/variant.js +5 -5
- package/lib/composables/variant.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +60 -60
- package/lib/framework.js +1 -1
- package/lib/labs/VCalendar/VCalendar.js +15 -15
- package/lib/labs/VCalendar/VCalendar.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarDay.js +4 -4
- package/lib/labs/VCalendar/VCalendarDay.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarHeader.js +4 -4
- package/lib/labs/VCalendar/VCalendarHeader.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarInterval.js +10 -10
- package/lib/labs/VCalendar/VCalendarInterval.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarIntervalEvent.js +2 -2
- package/lib/labs/VCalendar/VCalendarIntervalEvent.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarMonthDay.js +6 -6
- package/lib/labs/VCalendar/VCalendarMonthDay.js.map +1 -1
- package/lib/labs/VColorInput/VColorInput.d.ts +12 -12
- package/lib/labs/VColorInput/VColorInput.js +3 -3
- package/lib/labs/VColorInput/VColorInput.js.map +1 -1
- package/lib/labs/VDateInput/VDateInput.d.ts +84 -84
- package/lib/labs/VDateInput/VDateInput.js +2 -2
- package/lib/labs/VDateInput/VDateInput.js.map +1 -1
- package/lib/labs/VFileUpload/VFileUpload.js +9 -9
- package/lib/labs/VFileUpload/VFileUpload.js.map +1 -1
- package/lib/labs/VFileUpload/VFileUploadItem.js +3 -3
- package/lib/labs/VFileUpload/VFileUploadItem.js.map +1 -1
- package/lib/labs/VIconBtn/VIconBtn.js +7 -7
- package/lib/labs/VIconBtn/VIconBtn.js.map +1 -1
- package/lib/labs/VPicker/VPicker.js +7 -7
- package/lib/labs/VPicker/VPicker.js.map +1 -1
- package/lib/labs/VPullToRefresh/VPullToRefresh.js +13 -13
- package/lib/labs/VPullToRefresh/VPullToRefresh.js.map +1 -1
- package/lib/labs/VStepperVertical/VStepperVertical.js +2 -2
- package/lib/labs/VStepperVertical/VStepperVertical.js.map +1 -1
- package/lib/labs/VStepperVertical/VStepperVerticalItem.js +5 -5
- package/lib/labs/VStepperVertical/VStepperVerticalItem.js.map +1 -1
- package/lib/labs/VTimePicker/VTimePicker.js +2 -2
- package/lib/labs/VTimePicker/VTimePicker.js.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerClock.js +15 -15
- package/lib/labs/VTimePicker/VTimePickerClock.js.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerControls.js +24 -24
- package/lib/labs/VTimePicker/VTimePickerControls.js.map +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.js +2 -2
- package/lib/labs/VTreeview/VTreeviewChildren.js.map +1 -1
- package/lib/labs/VTreeview/VTreeviewGroup.js +2 -2
- package/lib/labs/VTreeview/VTreeviewGroup.js.map +1 -1
- package/lib/labs/VTreeview/VTreeviewItem.js +3 -3
- package/lib/labs/VTreeview/VTreeviewItem.js.map +1 -1
- package/lib/labs/rules/rules.d.ts +9 -5
- package/lib/labs/rules/rules.js +73 -51
- package/lib/labs/rules/rules.js.map +1 -1
- package/lib/util/box.d.ts +1 -0
- package/lib/util/box.js +27 -0
- package/lib/util/box.js.map +1 -1
- package/lib/util/helpers.d.ts +1 -0
- package/lib/util/helpers.js +16 -1
- package/lib/util/helpers.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVNode as _createVNode } from "vue";
|
|
1
|
+
import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, createVNode as _createVNode } from "vue";
|
|
2
2
|
// Styles
|
|
3
3
|
import "./VProgressCircular.css";
|
|
4
4
|
|
|
@@ -11,7 +11,7 @@ import { makeSizeProps, useSize } from "../../composables/size.js";
|
|
|
11
11
|
import { makeTagProps } from "../../composables/tag.js";
|
|
12
12
|
import { makeThemeProps, provideTheme } from "../../composables/theme.js"; // Utilities
|
|
13
13
|
import { ref, toRef, watchEffect } from 'vue';
|
|
14
|
-
import { convertToUnit, genericComponent, propsFactory, useRender } from "../../util/index.js"; // Types
|
|
14
|
+
import { clamp, convertToUnit, genericComponent, propsFactory, useRender } from "../../util/index.js"; // Types
|
|
15
15
|
export const makeVProgressCircularProps = propsFactory({
|
|
16
16
|
bgColor: String,
|
|
17
17
|
color: String,
|
|
@@ -68,7 +68,7 @@ export const VProgressCircular = genericComponent()({
|
|
|
68
68
|
resizeRef,
|
|
69
69
|
contentRect
|
|
70
70
|
} = useResizeObserver();
|
|
71
|
-
const normalizedValue = toRef(() =>
|
|
71
|
+
const normalizedValue = toRef(() => clamp(parseFloat(props.modelValue), 0, 100));
|
|
72
72
|
const width = toRef(() => Number(props.width));
|
|
73
73
|
const size = toRef(() => {
|
|
74
74
|
// Get size from element if size prop value is small, large etc
|
|
@@ -83,26 +83,26 @@ export const VProgressCircular = genericComponent()({
|
|
|
83
83
|
});
|
|
84
84
|
useRender(() => _createVNode(props.tag, {
|
|
85
85
|
"ref": root,
|
|
86
|
-
"class": ['v-progress-circular', {
|
|
86
|
+
"class": _normalizeClass(['v-progress-circular', {
|
|
87
87
|
'v-progress-circular--indeterminate': !!props.indeterminate,
|
|
88
88
|
'v-progress-circular--visible': isIntersecting.value,
|
|
89
89
|
'v-progress-circular--disable-shrink': props.indeterminate === 'disable-shrink'
|
|
90
|
-
}, themeClasses.value, sizeClasses.value, textColorClasses.value, props.class],
|
|
91
|
-
"style": [sizeStyles.value, textColorStyles.value, props.style],
|
|
90
|
+
}, themeClasses.value, sizeClasses.value, textColorClasses.value, props.class]),
|
|
91
|
+
"style": _normalizeStyle([sizeStyles.value, textColorStyles.value, props.style]),
|
|
92
92
|
"role": "progressbar",
|
|
93
93
|
"aria-valuemin": "0",
|
|
94
94
|
"aria-valuemax": "100",
|
|
95
95
|
"aria-valuenow": props.indeterminate ? undefined : normalizedValue.value
|
|
96
96
|
}, {
|
|
97
|
-
default: () => [
|
|
98
|
-
"style": {
|
|
97
|
+
default: () => [_createElementVNode("svg", {
|
|
98
|
+
"style": _normalizeStyle({
|
|
99
99
|
transform: `rotate(calc(-90deg + ${Number(props.rotate)}deg))`
|
|
100
|
-
},
|
|
100
|
+
}),
|
|
101
101
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
102
102
|
"viewBox": `0 0 ${diameter.value} ${diameter.value}`
|
|
103
|
-
}, [
|
|
104
|
-
"class": ['v-progress-circular__underlay', underlayColorClasses.value],
|
|
105
|
-
"style": underlayColorStyles.value,
|
|
103
|
+
}, [_createElementVNode("circle", {
|
|
104
|
+
"class": _normalizeClass(['v-progress-circular__underlay', underlayColorClasses.value]),
|
|
105
|
+
"style": _normalizeStyle(underlayColorStyles.value),
|
|
106
106
|
"fill": "transparent",
|
|
107
107
|
"cx": "50%",
|
|
108
108
|
"cy": "50%",
|
|
@@ -110,7 +110,7 @@ export const VProgressCircular = genericComponent()({
|
|
|
110
110
|
"stroke-width": strokeWidth.value,
|
|
111
111
|
"stroke-dasharray": CIRCUMFERENCE,
|
|
112
112
|
"stroke-dashoffset": 0
|
|
113
|
-
}, null),
|
|
113
|
+
}, null), _createElementVNode("circle", {
|
|
114
114
|
"class": "v-progress-circular__overlay",
|
|
115
115
|
"fill": "transparent",
|
|
116
116
|
"cx": "50%",
|
|
@@ -119,7 +119,7 @@ export const VProgressCircular = genericComponent()({
|
|
|
119
119
|
"stroke-width": strokeWidth.value,
|
|
120
120
|
"stroke-dasharray": CIRCUMFERENCE,
|
|
121
121
|
"stroke-dashoffset": strokeDashOffset.value
|
|
122
|
-
}, null)]), slots.default &&
|
|
122
|
+
}, null)]), slots.default && _createElementVNode("div", {
|
|
123
123
|
"class": "v-progress-circular__content"
|
|
124
124
|
}, [slots.default({
|
|
125
125
|
value: normalizedValue.value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VProgressCircular.js","names":["useTextColor","makeComponentProps","useIntersectionObserver","useResizeObserver","makeSizeProps","useSize","makeTagProps","makeThemeProps","provideTheme","ref","toRef","watchEffect","convertToUnit","genericComponent","propsFactory","useRender","makeVProgressCircularProps","bgColor","String","color","indeterminate","Boolean","modelValue","type","Number","default","rotate","width","tag","VProgressCircular","name","props","setup","_ref","slots","MAGIC_RADIUS_CONSTANT","CIRCUMFERENCE","Math","PI","root","themeClasses","sizeClasses","sizeStyles","textColorClasses","textColorStyles","underlayColorClasses","underlayColorStyles","intersectionRef","isIntersecting","resizeRef","contentRect","normalizedValue","
|
|
1
|
+
{"version":3,"file":"VProgressCircular.js","names":["useTextColor","makeComponentProps","useIntersectionObserver","useResizeObserver","makeSizeProps","useSize","makeTagProps","makeThemeProps","provideTheme","ref","toRef","watchEffect","clamp","convertToUnit","genericComponent","propsFactory","useRender","makeVProgressCircularProps","bgColor","String","color","indeterminate","Boolean","modelValue","type","Number","default","rotate","width","tag","VProgressCircular","name","props","setup","_ref","slots","MAGIC_RADIUS_CONSTANT","CIRCUMFERENCE","Math","PI","root","themeClasses","sizeClasses","sizeStyles","textColorClasses","textColorStyles","underlayColorClasses","underlayColorStyles","intersectionRef","isIntersecting","resizeRef","contentRect","normalizedValue","parseFloat","size","value","max","diameter","strokeWidth","strokeDashOffset","_createVNode","_normalizeClass","class","_normalizeStyle","style","undefined","_createElementVNode","transform"],"sources":["../../../src/components/VProgressCircular/VProgressCircular.tsx"],"sourcesContent":["// Styles\nimport './VProgressCircular.sass'\n\n// Composables\nimport { useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { useIntersectionObserver } from '@/composables/intersectionObserver'\nimport { useResizeObserver } from '@/composables/resizeObserver'\nimport { makeSizeProps, useSize } from '@/composables/size'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { ref, toRef, watchEffect } from 'vue'\nimport { clamp, convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nexport const makeVProgressCircularProps = propsFactory({\n bgColor: String,\n color: String,\n indeterminate: [Boolean, String] as PropType<boolean | 'disable-shrink'>,\n modelValue: {\n type: [Number, String],\n default: 0,\n },\n rotate: {\n type: [Number, String],\n default: 0,\n },\n width: {\n type: [Number, String],\n default: 4,\n },\n\n ...makeComponentProps(),\n ...makeSizeProps(),\n ...makeTagProps({ tag: 'div' }),\n ...makeThemeProps(),\n}, 'VProgressCircular')\n\ntype VProgressCircularSlots = {\n default: { value: number }\n}\n\nexport const VProgressCircular = genericComponent<VProgressCircularSlots>()({\n name: 'VProgressCircular',\n\n props: makeVProgressCircularProps(),\n\n setup (props, { slots }) {\n const MAGIC_RADIUS_CONSTANT = 20\n const CIRCUMFERENCE = 2 * Math.PI * MAGIC_RADIUS_CONSTANT\n\n const root = ref<HTMLElement>()\n\n const { themeClasses } = provideTheme(props)\n const { sizeClasses, sizeStyles } = useSize(props)\n const { textColorClasses, textColorStyles } = useTextColor(() => props.color)\n const { textColorClasses: underlayColorClasses, textColorStyles: underlayColorStyles } = useTextColor(() => props.bgColor)\n const { intersectionRef, isIntersecting } = useIntersectionObserver()\n const { resizeRef, contentRect } = useResizeObserver()\n\n const normalizedValue = toRef(() => clamp(parseFloat(props.modelValue), 0, 100))\n const width = toRef(() => Number(props.width))\n const size = toRef(() => {\n // Get size from element if size prop value is small, large etc\n return sizeStyles.value\n ? Number(props.size)\n : contentRect.value\n ? contentRect.value.width\n : Math.max(width.value, 32)\n })\n const diameter = toRef(() => (MAGIC_RADIUS_CONSTANT / (1 - width.value / size.value)) * 2)\n const strokeWidth = toRef(() => width.value / size.value * diameter.value)\n const strokeDashOffset = toRef(() => convertToUnit(((100 - normalizedValue.value) / 100) * CIRCUMFERENCE))\n\n watchEffect(() => {\n intersectionRef.value = root.value\n resizeRef.value = root.value\n })\n\n useRender(() => (\n <props.tag\n ref={ root }\n class={[\n 'v-progress-circular',\n {\n 'v-progress-circular--indeterminate': !!props.indeterminate,\n 'v-progress-circular--visible': isIntersecting.value,\n 'v-progress-circular--disable-shrink': props.indeterminate === 'disable-shrink',\n },\n themeClasses.value,\n sizeClasses.value,\n textColorClasses.value,\n props.class,\n ]}\n style={[\n sizeStyles.value,\n textColorStyles.value,\n props.style,\n ]}\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow={ props.indeterminate ? undefined : normalizedValue.value }\n >\n <svg\n style={{\n transform: `rotate(calc(-90deg + ${Number(props.rotate)}deg))`,\n }}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox={ `0 0 ${diameter.value} ${diameter.value}` }\n >\n <circle\n class={[\n 'v-progress-circular__underlay',\n underlayColorClasses.value,\n ]}\n style={ underlayColorStyles.value }\n fill=\"transparent\"\n cx=\"50%\"\n cy=\"50%\"\n r={ MAGIC_RADIUS_CONSTANT }\n stroke-width={ strokeWidth.value }\n stroke-dasharray={ CIRCUMFERENCE }\n stroke-dashoffset={ 0 }\n />\n\n <circle\n class=\"v-progress-circular__overlay\"\n fill=\"transparent\"\n cx=\"50%\"\n cy=\"50%\"\n r={ MAGIC_RADIUS_CONSTANT }\n stroke-width={ strokeWidth.value }\n stroke-dasharray={ CIRCUMFERENCE }\n stroke-dashoffset={ strokeDashOffset.value }\n />\n </svg>\n\n { slots.default && (\n <div class=\"v-progress-circular__content\">\n { slots.default({ value: normalizedValue.value }) }\n </div>\n )}\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VProgressCircular = InstanceType<typeof VProgressCircular>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,YAAY;AAAA,SACZC,kBAAkB;AAAA,SAClBC,uBAAuB;AAAA,SACvBC,iBAAiB;AAAA,SACjBC,aAAa,EAAEC,OAAO;AAAA,SACtBC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY,sCAErC;AACA,SAASC,GAAG,EAAEC,KAAK,EAAEC,WAAW,QAAQ,KAAK;AAAA,SACpCC,KAAK,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,+BAExE;AAGA,OAAO,MAAMC,0BAA0B,GAAGF,YAAY,CAAC;EACrDG,OAAO,EAAEC,MAAM;EACfC,KAAK,EAAED,MAAM;EACbE,aAAa,EAAE,CAACC,OAAO,EAAEH,MAAM,CAAyC;EACxEI,UAAU,EAAE;IACVC,IAAI,EAAE,CAACC,MAAM,EAAEN,MAAM,CAAC;IACtBO,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAE;IACNH,IAAI,EAAE,CAACC,MAAM,EAAEN,MAAM,CAAC;IACtBO,OAAO,EAAE;EACX,CAAC;EACDE,KAAK,EAAE;IACLJ,IAAI,EAAE,CAACC,MAAM,EAAEN,MAAM,CAAC;IACtBO,OAAO,EAAE;EACX,CAAC;EAED,GAAGzB,kBAAkB,CAAC,CAAC;EACvB,GAA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ACjBX,gBAAgB,CAACW,KAAK,EACtBvB,KAAK,CAAC8B,KAAK,CACZ;MAAA,SAAAC,eAAA,CACM,CACLpB,UAAU,CAACY,KAAK,EAChBV,eAAe,CAACU,KAAK,EACrBvB,KAAK,CAACgC,KAAK,CACZ;MAAA;MAAA;MAAA;MAAA,iBAIehC,KAAK,CAACX,aAAa,GAAG4C,SAAS,GAAGb,eAAe,CAACG;IAAK;MAAA7B,OAAA,EAAAA,CAAA,MAAAwC,mBAAA;QAAA,SAAAH,eAAA,CAG9D;UACLI,SAAS,EAAE,wBAAwB1C,MAAM,CAACO,KAAK,CAACL,MAAM,CAAC;QACzD,CAAC;QAAA;QAAA,WAES,OAAO8B,QAAQ,CAACF,KAAK,IAAIE,QAAQ,CAACF,KAAK;MAAE,IAAAW,mBAAA;QAAA,SAAAL,eAAA,CAG1C,CACL,+BAA+B,EAC/Bf,oBAAoB,CAACS,KAAK,CAC3B;QAAA,SAAAQ,eAAA,CACOhB,mBAAmB,CAACQ,KAAK;QAAA;QAAA;QAAA;QAAA,KAI7BnB,qBAAqB;QAAA,gBACVsB,WAAW,CAACH,KAAK;QAAA,oBACblB,aAAa;QAAA,qBACZ;MAAC,UAAA6B,mBAAA;QAAA;QAAA;QAAA;QAAA;QAAA,KAQjB9B,qBAAqB;QAAA,gBACVsB,WAAW,CAACH,KAAK;QAAA,oBACblB,aAAa;QAAA,qBACZsB,gBAAgB,CAACJ;MAAK,YAI5CpB,KAAK,CAACT,OAAO,IAAAwC,mBAAA;QAAA;MAAA,IAET/B,KAAK,CAACT,OAAO,CAAC;QAAE6B,KAAK,EAAEH,eAAe,CAACG;MAAM,CAAC,CAAC,EAEpD;IAAA,EAEJ,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVNode as _createVNode } from "vue";
|
|
1
|
+
import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, createVNode as _createVNode } from "vue";
|
|
2
2
|
// Styles
|
|
3
3
|
import "./VProgressLinear.css";
|
|
4
4
|
|
|
@@ -119,21 +119,21 @@ export const VProgressLinear = genericComponent()({
|
|
|
119
119
|
}
|
|
120
120
|
useRender(() => _createVNode(props.tag, {
|
|
121
121
|
"ref": intersectionRef,
|
|
122
|
-
"class": ['v-progress-linear', {
|
|
122
|
+
"class": _normalizeClass(['v-progress-linear', {
|
|
123
123
|
'v-progress-linear--absolute': props.absolute,
|
|
124
124
|
'v-progress-linear--active': props.active && isIntersecting.value,
|
|
125
125
|
'v-progress-linear--reverse': isReversed.value,
|
|
126
126
|
'v-progress-linear--rounded': props.rounded,
|
|
127
127
|
'v-progress-linear--rounded-bar': props.roundedBar,
|
|
128
128
|
'v-progress-linear--striped': props.striped
|
|
129
|
-
}, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class],
|
|
130
|
-
"style": [{
|
|
129
|
+
}, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class]),
|
|
130
|
+
"style": _normalizeStyle([{
|
|
131
131
|
bottom: props.location === 'bottom' ? 0 : undefined,
|
|
132
132
|
top: props.location === 'top' ? 0 : undefined,
|
|
133
133
|
height: props.active ? convertToUnit(height.value) : 0,
|
|
134
134
|
'--v-progress-linear-height': convertToUnit(height.value),
|
|
135
135
|
...(props.absolute ? locationStyles.value : {})
|
|
136
|
-
}, props.style],
|
|
136
|
+
}, props.style]),
|
|
137
137
|
"role": "progressbar",
|
|
138
138
|
"aria-hidden": props.active ? 'false' : 'true',
|
|
139
139
|
"aria-valuemin": "0",
|
|
@@ -141,10 +141,10 @@ export const VProgressLinear = genericComponent()({
|
|
|
141
141
|
"aria-valuenow": props.indeterminate ? undefined : Math.min(parseFloat(progress.value), max.value),
|
|
142
142
|
"onClick": props.clickable && handleClick
|
|
143
143
|
}, {
|
|
144
|
-
default: () => [props.stream &&
|
|
144
|
+
default: () => [props.stream && _createElementVNode("div", {
|
|
145
145
|
"key": "stream",
|
|
146
|
-
"class": ['v-progress-linear__stream', textColorClasses.value],
|
|
147
|
-
"style": {
|
|
146
|
+
"class": _normalizeClass(['v-progress-linear__stream', textColorClasses.value]),
|
|
147
|
+
"style": _normalizeStyle({
|
|
148
148
|
...textColorStyles.value,
|
|
149
149
|
[isReversed.value ? 'left' : 'right']: convertToUnit(-height.value),
|
|
150
150
|
borderTop: `${convertToUnit(height.value / 2)} dotted`,
|
|
@@ -152,35 +152,35 @@ export const VProgressLinear = genericComponent()({
|
|
|
152
152
|
top: `calc(50% - ${convertToUnit(height.value / 4)})`,
|
|
153
153
|
width: convertToUnit(100 - normalizedBuffer.value, '%'),
|
|
154
154
|
'--v-progress-linear-stream-to': convertToUnit(height.value * (isReversed.value ? 1 : -1))
|
|
155
|
-
}
|
|
156
|
-
}, null),
|
|
157
|
-
"class": ['v-progress-linear__background', !isForcedColorsModeActive ? backgroundColorClasses.value : undefined],
|
|
158
|
-
"style": [backgroundColorStyles.value, {
|
|
155
|
+
})
|
|
156
|
+
}, null), _createElementVNode("div", {
|
|
157
|
+
"class": _normalizeClass(['v-progress-linear__background', !isForcedColorsModeActive ? backgroundColorClasses.value : undefined]),
|
|
158
|
+
"style": _normalizeStyle([backgroundColorStyles.value, {
|
|
159
159
|
opacity: parseFloat(props.bgOpacity),
|
|
160
160
|
width: props.stream ? 0 : undefined
|
|
161
|
-
}]
|
|
162
|
-
}, null),
|
|
163
|
-
"class": ['v-progress-linear__buffer', !isForcedColorsModeActive ? bufferColorClasses.value : undefined],
|
|
164
|
-
"style": [bufferColorStyles.value, {
|
|
161
|
+
}])
|
|
162
|
+
}, null), _createElementVNode("div", {
|
|
163
|
+
"class": _normalizeClass(['v-progress-linear__buffer', !isForcedColorsModeActive ? bufferColorClasses.value : undefined]),
|
|
164
|
+
"style": _normalizeStyle([bufferColorStyles.value, {
|
|
165
165
|
opacity: parseFloat(props.bufferOpacity),
|
|
166
166
|
width: convertToUnit(normalizedBuffer.value, '%')
|
|
167
|
-
}]
|
|
167
|
+
}])
|
|
168
168
|
}, null), _createVNode(Transition, {
|
|
169
169
|
"name": transition.value
|
|
170
170
|
}, {
|
|
171
|
-
default: () => [!props.indeterminate ?
|
|
172
|
-
"class": ['v-progress-linear__determinate', !isForcedColorsModeActive ? barColorClasses.value : undefined],
|
|
173
|
-
"style": [barColorStyles.value, {
|
|
171
|
+
default: () => [!props.indeterminate ? _createElementVNode("div", {
|
|
172
|
+
"class": _normalizeClass(['v-progress-linear__determinate', !isForcedColorsModeActive ? barColorClasses.value : undefined]),
|
|
173
|
+
"style": _normalizeStyle([barColorStyles.value, {
|
|
174
174
|
width: convertToUnit(normalizedValue.value, '%')
|
|
175
|
-
}]
|
|
176
|
-
}, null) :
|
|
175
|
+
}])
|
|
176
|
+
}, null) : _createElementVNode("div", {
|
|
177
177
|
"class": "v-progress-linear__indeterminate"
|
|
178
|
-
}, [['long', 'short'].map(bar =>
|
|
178
|
+
}, [['long', 'short'].map(bar => _createElementVNode("div", {
|
|
179
179
|
"key": bar,
|
|
180
|
-
"class": ['v-progress-linear__indeterminate', bar, !isForcedColorsModeActive ? barColorClasses.value : undefined],
|
|
181
|
-
"style": barColorStyles.value
|
|
180
|
+
"class": _normalizeClass(['v-progress-linear__indeterminate', bar, !isForcedColorsModeActive ? barColorClasses.value : undefined]),
|
|
181
|
+
"style": _normalizeStyle(barColorStyles.value)
|
|
182
182
|
}, null))])]
|
|
183
|
-
}), slots.default &&
|
|
183
|
+
}), slots.default && _createElementVNode("div", {
|
|
184
184
|
"class": "v-progress-linear__content"
|
|
185
185
|
}, [slots.default({
|
|
186
186
|
value: normalizedValue.value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VProgressLinear.js","names":["useBackgroundColor","useTextColor","makeComponentProps","useIntersectionObserver","useRtl","makeLocationProps","useLocation","useProxiedModel","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","computed","Transition","clamp","convertToUnit","genericComponent","IN_BROWSER","propsFactory","useRender","makeVProgressLinearProps","absolute","Boolean","active","type","default","bgColor","String","bgOpacity","Number","bufferValue","bufferColor","bufferOpacity","clickable","color","height","indeterminate","max","modelValue","opacity","reverse","stream","striped","roundedBar","location","VProgressLinear","name","props","emits","value","setup","_ref","slots","progress","isRtl","rtlClasses","themeClasses","locationStyles","textColorClasses","textColorStyles","backgroundColorClasses","backgroundColorStyles","bufferColorClasses","bufferColorStyles","barColorClasses","barColorStyles","roundedClasses","intersectionRef","isIntersecting","parseFloat","normalizedBuffer","normalizedValue","isReversed","transition","isForcedColorsModeActive","window","matchMedia","matches","handleClick","e","left","right","width","getBoundingClientRect","clientX","Math","round","_createVNode","tag","rounded","class","bottom","undefined","top","style","min","borderTop","map","bar","buffer"],"sources":["../../../src/components/VProgressLinear/VProgressLinear.tsx"],"sourcesContent":["// Styles\nimport './VProgressLinear.sass'\n\n// Composables\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { useIntersectionObserver } from '@/composables/intersectionObserver'\nimport { useRtl } from '@/composables/locale'\nimport { makeLocationProps, useLocation } from '@/composables/location'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, Transition } from 'vue'\nimport { clamp, convertToUnit, genericComponent, IN_BROWSER, propsFactory, useRender } from '@/util'\n\ntype VProgressLinearSlots = {\n default: { value: number, buffer: number }\n}\n\nexport const makeVProgressLinearProps = propsFactory({\n absolute: Boolean,\n active: {\n type: Boolean,\n default: true,\n },\n bgColor: String,\n bgOpacity: [Number, String],\n bufferValue: {\n type: [Number, String],\n default: 0,\n },\n bufferColor: String,\n bufferOpacity: [Number, String],\n clickable: Boolean,\n color: String,\n height: {\n type: [Number, String],\n default: 4,\n },\n indeterminate: Boolean,\n max: {\n type: [Number, String],\n default: 100,\n },\n modelValue: {\n type: [Number, String],\n default: 0,\n },\n opacity: [Number, String],\n reverse: Boolean,\n stream: Boolean,\n striped: Boolean,\n roundedBar: Boolean,\n\n ...makeComponentProps(),\n ...makeLocationProps({ location: 'top' } as const),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n}, 'VProgressLinear')\n\nexport const VProgressLinear = genericComponent<VProgressLinearSlots>()({\n name: 'VProgressLinear',\n\n props: makeVProgressLinearProps(),\n\n emits: {\n 'update:modelValue': (value: number) => true,\n },\n\n setup (props, { slots }) {\n const progress = useProxiedModel(props, 'modelValue')\n const { isRtl, rtlClasses } = useRtl()\n const { themeClasses } = provideTheme(props)\n const { locationStyles } = useLocation(props)\n const { textColorClasses, textColorStyles } = useTextColor(() => props.color)\n const {\n backgroundColorClasses,\n backgroundColorStyles,\n } = useBackgroundColor(() => props.bgColor || props.color)\n const {\n backgroundColorClasses: bufferColorClasses,\n backgroundColorStyles: bufferColorStyles,\n } = useBackgroundColor(() => props.bufferColor || props.bgColor || props.color)\n const {\n backgroundColorClasses: barColorClasses,\n backgroundColorStyles: barColorStyles,\n } = useBackgroundColor(() => props.color)\n const { roundedClasses } = useRounded(props)\n const { intersectionRef, isIntersecting } = useIntersectionObserver()\n\n const max = computed(() => parseFloat(props.max))\n const height = computed(() => parseFloat(props.height))\n const normalizedBuffer = computed(() => clamp(parseFloat(props.bufferValue) / max.value * 100, 0, 100))\n const normalizedValue = computed(() => clamp(parseFloat(progress.value) / max.value * 100, 0, 100))\n const isReversed = computed(() => isRtl.value !== props.reverse)\n const transition = computed(() => props.indeterminate ? 'fade-transition' : 'slide-x-transition')\n const isForcedColorsModeActive = IN_BROWSER && window.matchMedia?.('(forced-colors: active)').matches\n\n function handleClick (e: MouseEvent) {\n if (!intersectionRef.value) return\n\n const { left, right, width } = intersectionRef.value.getBoundingClientRect()\n const value = isReversed.value ? (width - e.clientX) + (right - width) : e.clientX - left\n\n progress.value = Math.round(value / width * max.value)\n }\n\n useRender(() => (\n <props.tag\n ref={ intersectionRef }\n class={[\n 'v-progress-linear',\n {\n 'v-progress-linear--absolute': props.absolute,\n 'v-progress-linear--active': props.active && isIntersecting.value,\n 'v-progress-linear--reverse': isReversed.value,\n 'v-progress-linear--rounded': props.rounded,\n 'v-progress-linear--rounded-bar': props.roundedBar,\n 'v-progress-linear--striped': props.striped,\n },\n roundedClasses.value,\n themeClasses.value,\n rtlClasses.value,\n props.class,\n ]}\n style={[\n {\n bottom: props.location === 'bottom' ? 0 : undefined,\n top: props.location === 'top' ? 0 : undefined,\n height: props.active ? convertToUnit(height.value) : 0,\n '--v-progress-linear-height': convertToUnit(height.value),\n ...(props.absolute ? locationStyles.value : {}),\n },\n props.style,\n ]}\n role=\"progressbar\"\n aria-hidden={ props.active ? 'false' : 'true' }\n aria-valuemin=\"0\"\n aria-valuemax={ props.max }\n aria-valuenow={ props.indeterminate ? undefined : Math.min(parseFloat(progress.value), max.value) }\n onClick={ props.clickable && handleClick }\n >\n { props.stream && (\n <div\n key=\"stream\"\n class={[\n 'v-progress-linear__stream',\n textColorClasses.value,\n ]}\n style={{\n ...textColorStyles.value,\n [isReversed.value ? 'left' : 'right']: convertToUnit(-height.value),\n borderTop: `${convertToUnit(height.value / 2)} dotted`,\n opacity: parseFloat(props.bufferOpacity!),\n top: `calc(50% - ${convertToUnit(height.value / 4)})`,\n width: convertToUnit(100 - normalizedBuffer.value, '%'),\n '--v-progress-linear-stream-to': convertToUnit(height.value * (isReversed.value ? 1 : -1)),\n }}\n />\n )}\n\n <div\n class={[\n 'v-progress-linear__background',\n !isForcedColorsModeActive ? backgroundColorClasses.value : undefined,\n ]}\n style={[\n backgroundColorStyles.value,\n {\n opacity: parseFloat(props.bgOpacity!),\n width: props.stream ? 0 : undefined,\n },\n ]}\n />\n\n <div\n class={[\n 'v-progress-linear__buffer',\n !isForcedColorsModeActive ? bufferColorClasses.value : undefined,\n ]}\n style={[\n bufferColorStyles.value,\n {\n opacity: parseFloat(props.bufferOpacity!),\n width: convertToUnit(normalizedBuffer.value, '%'),\n },\n ]}\n />\n\n <Transition name={ transition.value }>\n { !props.indeterminate ? (\n <div\n class={[\n 'v-progress-linear__determinate',\n !isForcedColorsModeActive ? barColorClasses.value : undefined,\n ]}\n style={[\n barColorStyles.value,\n { width: convertToUnit(normalizedValue.value, '%') },\n ]}\n />\n ) : (\n <div class=\"v-progress-linear__indeterminate\">\n {['long', 'short'].map(bar => (\n <div\n key={ bar }\n class={[\n 'v-progress-linear__indeterminate',\n bar,\n !isForcedColorsModeActive ? barColorClasses.value : undefined,\n ]}\n style={ barColorStyles.value }\n />\n ))}\n </div>\n )}\n </Transition>\n\n { slots.default && (\n <div class=\"v-progress-linear__content\">\n { slots.default({ value: normalizedValue.value, buffer: normalizedBuffer.value }) }\n </div>\n )}\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VProgressLinear = InstanceType<typeof VProgressLinear>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB;AAAA,SAClBC,uBAAuB;AAAA,SACvBC,MAAM;AAAA,SACNC,iBAAiB,EAAEC,WAAW;AAAA,SAC9BC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY,sCAErC;AACA,SAASC,QAAQ,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACjCC,KAAK,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,YAAY,EAAEC,SAAS;AAMpF,OAAO,MAAMC,wBAAwB,GAAGF,YAAY,CAAC;EACnDG,QAAQ,EAAEC,OAAO;EACjBC,MAAM,EAAE;IACNC,IAAI,EAAEF,OAAO;IACbG,OAAO,EAAE;EACX,CAAC;EACDC,OAAO,EAAEC,MAAM;EACfC,SAAS,EAAE,CAACC,MAAM,EAAEF,MAAM,CAAC;EAC3BG,WAAW,EAAE;IACXN,IAAI,EAAE,CAACK,MAA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AA,CAAA,MAC/B,CAACsB,KAAK,CAACX,aAAa,GAAAmD,YAAA;UAAA,SAEX,CACL,gCAAgC,EAChC,CAACb,wBAAwB,GAAGV,eAAe,CAACf,KAAK,GAAG2C,SAAS,CAC9D;UAAA,SACM,CACL3B,cAAc,CAAChB,KAAK,EACpB;YAAEiC,KAAK,EAAEnE,aAAa,CAACwD,eAAe,CAACtB,KAAK,EAAE,GAAG;UAAE,CAAC;QACrD,WAAAsC,YAAA;UAAA;QAAA,IAIA,CAAC,MAAM,EAAE,OAAO,CAAC,CAACU,GAAG,CAACC,GAAG,IAAAX,YAAA;UAAA,OAEhBW,GAAG;UAAA,SACF,CACL,kCAAkC,EAClCA,GAAG,EACH,CAACxB,wBAAwB,GAAGV,eAAe,CAACf,KAAK,GAAG2C,SAAS,CAC9D;UAAA,SACO3B,cAAc,CAAChB;QAAK,QAE/B,CAAC,EAEL;MAAA,IAGDG,KAAK,CAAC3B,OAAO,IAAA8D,YAAA;QAAA;MAAA,IAETnC,KAAK,CAAC3B,OAAO,CAAC;QAAEwB,KAAK,EAAEsB,eAAe,CAACtB,KAAK;QAAEkD,MAAM,EAAE7B,gBAAgB,CAACrB;MAAM,CAAC,CAAC,EAEpF;IAAA,EAEJ,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"VProgressLinear.js","names":["useBackgroundColor","useTextColor","makeComponentProps","useIntersectionObserver","useRtl","makeLocationProps","useLocation","useProxiedModel","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","computed","Transition","clamp","convertToUnit","genericComponent","IN_BROWSER","propsFactory","useRender","makeVProgressLinearProps","absolute","Boolean","active","type","default","bgColor","String","bgOpacity","Number","bufferValue","bufferColor","bufferOpacity","clickable","color","height","indeterminate","max","modelValue","opacity","reverse","stream","striped","roundedBar","location","VProgressLinear","name","props","emits","value","setup","_ref","slots","progress","isRtl","rtlClasses","themeClasses","locationStyles","textColorClasses","textColorStyles","backgroundColorClasses","backgroundColorStyles","bufferColorClasses","bufferColorStyles","barColorClasses","barColorStyles","roundedClasses","intersectionRef","isIntersecting","parseFloat","normalizedBuffer","normalizedValue","isReversed","transition","isForcedColorsModeActive","window","matchMedia","matches","handleClick","e","left","right","width","getBoundingClientRect","clientX","Math","round","_createVNode","tag","_normalizeClass","rounded","class","_normalizeStyle","bottom","undefined","top","style","min","_createElementVNode","borderTop","map","bar","buffer"],"sources":["../../../src/components/VProgressLinear/VProgressLinear.tsx"],"sourcesContent":["// Styles\nimport './VProgressLinear.sass'\n\n// Composables\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { useIntersectionObserver } from '@/composables/intersectionObserver'\nimport { useRtl } from '@/composables/locale'\nimport { makeLocationProps, useLocation } from '@/composables/location'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, Transition } from 'vue'\nimport { clamp, convertToUnit, genericComponent, IN_BROWSER, propsFactory, useRender } from '@/util'\n\ntype VProgressLinearSlots = {\n default: { value: number, buffer: number }\n}\n\nexport const makeVProgressLinearProps = propsFactory({\n absolute: Boolean,\n active: {\n type: Boolean,\n default: true,\n },\n bgColor: String,\n bgOpacity: [Number, String],\n bufferValue: {\n type: [Number, String],\n default: 0,\n },\n bufferColor: String,\n bufferOpacity: [Number, String],\n clickable: Boolean,\n color: String,\n height: {\n type: [Number, String],\n default: 4,\n },\n indeterminate: Boolean,\n max: {\n type: [Number, String],\n default: 100,\n },\n modelValue: {\n type: [Number, String],\n default: 0,\n },\n opacity: [Number, String],\n reverse: Boolean,\n stream: Boolean,\n striped: Boolean,\n roundedBar: Boolean,\n\n ...makeComponentProps(),\n ...makeLocationProps({ location: 'top' } as const),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n}, 'VProgressLinear')\n\nexport const VProgressLinear = genericComponent<VProgressLinearSlots>()({\n name: 'VProgressLinear',\n\n props: makeVProgressLinearProps(),\n\n emits: {\n 'update:modelValue': (value: number) => true,\n },\n\n setup (props, { slots }) {\n const progress = useProxiedModel(props, 'modelValue')\n const { isRtl, rtlClasses } = useRtl()\n const { themeClasses } = provideTheme(props)\n const { locationStyles } = useLocation(props)\n const { textColorClasses, textColorStyles } = useTextColor(() => props.color)\n const {\n backgroundColorClasses,\n backgroundColorStyles,\n } = useBackgroundColor(() => props.bgColor || props.color)\n const {\n backgroundColorClasses: bufferColorClasses,\n backgroundColorStyles: bufferColorStyles,\n } = useBackgroundColor(() => props.bufferColor || props.bgColor || props.color)\n const {\n backgroundColorClasses: barColorClasses,\n backgroundColorStyles: barColorStyles,\n } = useBackgroundColor(() => props.color)\n const { roundedClasses } = useRounded(props)\n const { intersectionRef, isIntersecting } = useIntersectionObserver()\n\n const max = computed(() => parseFloat(props.max))\n const height = computed(() => parseFloat(props.height))\n const normalizedBuffer = computed(() => clamp(parseFloat(props.bufferValue) / max.value * 100, 0, 100))\n const normalizedValue = computed(() => clamp(parseFloat(progress.value) / max.value * 100, 0, 100))\n const isReversed = computed(() => isRtl.value !== props.reverse)\n const transition = computed(() => props.indeterminate ? 'fade-transition' : 'slide-x-transition')\n const isForcedColorsModeActive = IN_BROWSER && window.matchMedia?.('(forced-colors: active)').matches\n\n function handleClick (e: MouseEvent) {\n if (!intersectionRef.value) return\n\n const { left, right, width } = intersectionRef.value.getBoundingClientRect()\n const value = isReversed.value ? (width - e.clientX) + (right - width) : e.clientX - left\n\n progress.value = Math.round(value / width * max.value)\n }\n\n useRender(() => (\n <props.tag\n ref={ intersectionRef }\n class={[\n 'v-progress-linear',\n {\n 'v-progress-linear--absolute': props.absolute,\n 'v-progress-linear--active': props.active && isIntersecting.value,\n 'v-progress-linear--reverse': isReversed.value,\n 'v-progress-linear--rounded': props.rounded,\n 'v-progress-linear--rounded-bar': props.roundedBar,\n 'v-progress-linear--striped': props.striped,\n },\n roundedClasses.value,\n themeClasses.value,\n rtlClasses.value,\n props.class,\n ]}\n style={[\n {\n bottom: props.location === 'bottom' ? 0 : undefined,\n top: props.location === 'top' ? 0 : undefined,\n height: props.active ? convertToUnit(height.value) : 0,\n '--v-progress-linear-height': convertToUnit(height.value),\n ...(props.absolute ? locationStyles.value : {}),\n },\n props.style,\n ]}\n role=\"progressbar\"\n aria-hidden={ props.active ? 'false' : 'true' }\n aria-valuemin=\"0\"\n aria-valuemax={ props.max }\n aria-valuenow={ props.indeterminate ? undefined : Math.min(parseFloat(progress.value), max.value) }\n onClick={ props.clickable && handleClick }\n >\n { props.stream && (\n <div\n key=\"stream\"\n class={[\n 'v-progress-linear__stream',\n textColorClasses.value,\n ]}\n style={{\n ...textColorStyles.value,\n [isReversed.value ? 'left' : 'right']: convertToUnit(-height.value),\n borderTop: `${convertToUnit(height.value / 2)} dotted`,\n opacity: parseFloat(props.bufferOpacity!),\n top: `calc(50% - ${convertToUnit(height.value / 4)})`,\n width: convertToUnit(100 - normalizedBuffer.value, '%'),\n '--v-progress-linear-stream-to': convertToUnit(height.value * (isReversed.value ? 1 : -1)),\n }}\n />\n )}\n\n <div\n class={[\n 'v-progress-linear__background',\n !isForcedColorsModeActive ? backgroundColorClasses.value : undefined,\n ]}\n style={[\n backgroundColorStyles.value,\n {\n opacity: parseFloat(props.bgOpacity!),\n width: props.stream ? 0 : undefined,\n },\n ]}\n />\n\n <div\n class={[\n 'v-progress-linear__buffer',\n !isForcedColorsModeActive ? bufferColorClasses.value : undefined,\n ]}\n style={[\n bufferColorStyles.value,\n {\n opacity: parseFloat(props.bufferOpacity!),\n width: convertToUnit(normalizedBuffer.value, '%'),\n },\n ]}\n />\n\n <Transition name={ transition.value }>\n { !props.indeterminate ? (\n <div\n class={[\n 'v-progress-linear__determinate',\n !isForcedColorsModeActive ? barColorClasses.value : undefined,\n ]}\n style={[\n barColorStyles.value,\n { width: convertToUnit(normalizedValue.value, '%') },\n ]}\n />\n ) : (\n <div class=\"v-progress-linear__indeterminate\">\n {['long', 'short'].map(bar => (\n <div\n key={ bar }\n class={[\n 'v-progress-linear__indeterminate',\n bar,\n !isForcedColorsModeActive ? barColorClasses.value : undefined,\n ]}\n style={ barColorStyles.value }\n />\n ))}\n </div>\n )}\n </Transition>\n\n { slots.default && (\n <div class=\"v-progress-linear__content\">\n { slots.default({ value: normalizedValue.value, buffer: normalizedBuffer.value }) }\n </div>\n )}\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VProgressLinear = InstanceType<typeof VProgressLinear>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB;AAAA,SAClBC,uBAAuB;AAAA,SACvBC,MAAM;AAAA,SACNC,iBAAiB,EAAEC,WAAW;AAAA,SAC9BC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY,sCAErC;AACA,SAASC,QAAQ,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACjCC,KAAK,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,YAAY,EAAEC,SAAS;AAMpF,OAAO,MAAMC,wBAAwB,GAAGF,YAAY,CAAC;EACnDG,QAAQ,EAAEC,OAAO;EACjBC,MAAM,EAAE;IACNC,IAAI,EAAEF,OAAO;IACbG,OAAO,EAAE;EACX,CAAC;EACDC,OAAO,EAAEC,MAAM;EACfC,SAAS,EAAE,CAACC,MAAM,EAAEF,MAAM,CAAC;EAC3BG,WAAW,EAAE;IACXN,IAAI,EAAE,CAACK,MAAM,EAAEF,MAAM,CAAC;IACtBF,OAAO,EAAE;EACX,CAAC;EACDM,WAAW,EAAEJ,MAAM;EACnBK,aAAa,EAAE,CAACH,MAAM,EAAEF,MAAM,CAAC;EAC/BM,SAAS,EAAEX,OAAO;EAClBY,KAAK,EA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AA8D,mBAAA;UAAA,SAAAT,eAAA,CAEX,CACL,gCAAgC,EAChC,CAACf,wBAAwB,GAAGV,eAAe,CAACf,KAAK,GAAG6C,SAAS,CAC9D;UAAA,SAAAF,eAAA,CACM,CACL3B,cAAc,CAAChB,KAAK,EACpB;YAAEiC,KAAK,EAAEnE,aAAa,CAACwD,eAAe,CAACtB,KAAK,EAAE,GAAG;UAAE,CAAC,CACrD;QAAA,WAAAiD,mBAAA;UAAA;QAAA,IAIA,CAAC,MAAM,EAAE,OAAO,CAAC,CAACE,GAAG,CAACC,GAAG,IAAAH,mBAAA;UAAA,OAEhBG,GAAG;UAAA,SAAAZ,eAAA,CACF,CACL,kCAAkC,EAClCY,GAAG,EACH,CAAC3B,wBAAwB,GAAGV,eAAe,CAACf,KAAK,GAAG6C,SAAS,CAC9D;UAAA,SAAAF,eAAA,CACO3B,cAAc,CAAChB,KAAK;QAAA,QAE/B,CAAC,EAEL;MAAA,IAGDG,KAAK,CAAC3B,OAAO,IAAAyE,mBAAA;QAAA;MAAA,IAET9C,KAAK,CAAC3B,OAAO,CAAC;QAAEwB,KAAK,EAAEsB,eAAe,CAACtB,KAAK;QAAEqD,MAAM,EAAEhC,gBAAgB,CAACrB;MAAM,CAAC,CAAC,EAEpF;IAAA,EAEJ,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -223,14 +223,14 @@ export declare const makeVRadioGroupProps: <Defaults extends {
|
|
|
223
223
|
default: unknown extends Defaults["label"] ? string : string | Defaults["label"];
|
|
224
224
|
};
|
|
225
225
|
rules: unknown extends Defaults["rules"] ? {
|
|
226
|
-
type: import("vue").PropType<readonly import("../../types.js").ValidationRule[]>;
|
|
226
|
+
type: import("vue").PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
|
227
227
|
default: () => never[];
|
|
228
228
|
} : Omit<{
|
|
229
|
-
type: import("vue").PropType<readonly import("../../types.js").ValidationRule[]>;
|
|
229
|
+
type: import("vue").PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
|
230
230
|
default: () => never[];
|
|
231
231
|
}, "type" | "default"> & {
|
|
232
|
-
type: import("vue").PropType<unknown extends Defaults["rules"] ? readonly import("../../
|
|
233
|
-
default: unknown extends Defaults["rules"] ? readonly import("../../
|
|
232
|
+
type: import("vue").PropType<unknown extends Defaults["rules"] ? readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] : readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] | Defaults["rules"]>;
|
|
233
|
+
default: unknown extends Defaults["rules"] ? readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] : readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] | Defaults["rules"];
|
|
234
234
|
};
|
|
235
235
|
validateOn: unknown extends Defaults["validateOn"] ? import("vue").PropType<("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined> : {
|
|
236
236
|
type: import("vue").PropType<unknown extends Defaults["validateOn"] ? ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined : ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | Defaults["validateOn"] | undefined>;
|
|
@@ -350,7 +350,7 @@ export declare const VRadioGroup: {
|
|
|
350
350
|
disabled: boolean | null;
|
|
351
351
|
readonly: boolean | null;
|
|
352
352
|
messages: string | readonly string[];
|
|
353
|
-
rules: readonly import("../../
|
|
353
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
354
354
|
focused: boolean;
|
|
355
355
|
errorMessages: string | readonly string[] | null;
|
|
356
356
|
maxErrors: string | number;
|
|
@@ -399,7 +399,7 @@ export declare const VRadioGroup: {
|
|
|
399
399
|
disabled: boolean | null;
|
|
400
400
|
readonly: boolean | null;
|
|
401
401
|
messages: string | readonly string[];
|
|
402
|
-
rules: readonly import("../../
|
|
402
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
403
403
|
focused: boolean;
|
|
404
404
|
errorMessages: string | readonly string[] | null;
|
|
405
405
|
maxErrors: string | number;
|
|
@@ -441,7 +441,7 @@ export declare const VRadioGroup: {
|
|
|
441
441
|
disabled: boolean | null;
|
|
442
442
|
readonly: boolean | null;
|
|
443
443
|
messages: string | readonly string[];
|
|
444
|
-
rules: readonly import("../../
|
|
444
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
445
445
|
focused: boolean;
|
|
446
446
|
errorMessages: string | readonly string[] | null;
|
|
447
447
|
maxErrors: string | number;
|
|
@@ -488,7 +488,7 @@ export declare const VRadioGroup: {
|
|
|
488
488
|
disabled: boolean | null;
|
|
489
489
|
readonly: boolean | null;
|
|
490
490
|
messages: string | readonly string[];
|
|
491
|
-
rules: readonly import("../../
|
|
491
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
492
492
|
focused: boolean;
|
|
493
493
|
errorMessages: string | readonly string[] | null;
|
|
494
494
|
maxErrors: string | number;
|
|
@@ -517,7 +517,7 @@ export declare const VRadioGroup: {
|
|
|
517
517
|
disabled: boolean | null;
|
|
518
518
|
readonly: boolean | null;
|
|
519
519
|
messages: string | readonly string[];
|
|
520
|
-
rules: readonly import("../../
|
|
520
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
521
521
|
focused: boolean;
|
|
522
522
|
errorMessages: string | readonly string[] | null;
|
|
523
523
|
maxErrors: string | number;
|
|
@@ -566,7 +566,7 @@ export declare const VRadioGroup: {
|
|
|
566
566
|
disabled: boolean | null;
|
|
567
567
|
readonly: boolean | null;
|
|
568
568
|
messages: string | readonly string[];
|
|
569
|
-
rules: readonly import("../../
|
|
569
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
570
570
|
focused: boolean;
|
|
571
571
|
errorMessages: string | readonly string[] | null;
|
|
572
572
|
maxErrors: string | number;
|
|
@@ -653,7 +653,7 @@ export declare const VRadioGroup: {
|
|
|
653
653
|
};
|
|
654
654
|
label: StringConstructor;
|
|
655
655
|
rules: {
|
|
656
|
-
type: import("vue").PropType<readonly import("../../types.js").ValidationRule[]>;
|
|
656
|
+
type: import("vue").PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
|
657
657
|
default: () => never[];
|
|
658
658
|
};
|
|
659
659
|
validateOn: import("vue").PropType<import("../../composables/validation.js").ValidationProps["validateOn"]>;
|
|
@@ -748,7 +748,7 @@ export declare const VRadioGroup: {
|
|
|
748
748
|
};
|
|
749
749
|
label: StringConstructor;
|
|
750
750
|
rules: {
|
|
751
|
-
type: import("vue").PropType<readonly import("../../types.js").ValidationRule[]>;
|
|
751
|
+
type: import("vue").PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
|
752
752
|
default: () => never[];
|
|
753
753
|
};
|
|
754
754
|
validateOn: import("vue").PropType<import("../../composables/validation.js").ValidationProps["validateOn"]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment as _Fragment, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
|
1
|
+
import { Fragment as _Fragment, createVNode as _createVNode, mergeProps as _mergeProps, createElementVNode as _createElementVNode } from "vue";
|
|
2
2
|
// Styles
|
|
3
3
|
import "./VRadioGroup.css";
|
|
4
4
|
|
|
@@ -72,7 +72,7 @@ export const VRadioGroup = genericComponent()({
|
|
|
72
72
|
isDisabled,
|
|
73
73
|
isReadonly
|
|
74
74
|
} = _ref2;
|
|
75
|
-
return
|
|
75
|
+
return _createElementVNode(_Fragment, null, [label && _createVNode(VLabel, {
|
|
76
76
|
"id": id.value
|
|
77
77
|
}, {
|
|
78
78
|
default: () => [label]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VRadioGroup.js","names":["makeVInputProps","VInput","VLabel","VSelectionControl","makeSelectionControlGroupProps","VSelectionControlGroup","IconValue","useProxiedModel","computed","useId","filterInputAttrs","genericComponent","omit","propsFactory","useRender","makeVRadioGroupProps","height","type","Number","String","default","trueIcon","falseIcon","VRadioGroup","name","inheritAttrs","props","emits","value","setup","_ref","attrs","slots","uid","id","model","rootAttrs","controlAttrs","inputProps","filterProps","controlProps","label","for","_createVNode","_mergeProps","class","style","$event","_ref2","messagesId","isDisabled","isReadonly","_Fragment","undefined"],"sources":["../../../src/components/VRadioGroup/VRadioGroup.tsx"],"sourcesContent":["// Styles\nimport './VRadioGroup.sass'\n\n// Components\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VLabel } from '@/components/VLabel'\nimport { VSelectionControl } from '@/components/VSelectionControl'\nimport { makeSelectionControlGroupProps, VSelectionControlGroup } from '@/components/VSelectionControlGroup/VSelectionControlGroup'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, useId } from 'vue'\nimport { filterInputAttrs, genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { GenericProps } from '@/util'\n\nexport type VRadioGroupSlots = Omit<VInputSlots, 'default'> & {\n default: never\n label: {\n label: string | undefined\n props: Record<string, any>\n }\n}\n\nexport const makeVRadioGroupProps = propsFactory({\n height: {\n type: [Number, String],\n default: 'auto',\n },\n\n ...makeVInputProps(),\n ...omit(makeSelectionControlGroupProps(), ['multiple']),\n\n trueIcon: {\n type: IconValue,\n default: '$radioOn',\n },\n falseIcon: {\n type: IconValue,\n default: '$radioOff',\n },\n type: {\n type: String,\n default: 'radio',\n },\n}, 'VRadioGroup')\n\nexport const VRadioGroup = genericComponent<new <T>(\n props: {\n modelValue?: T | null\n 'onUpdate:modelValue'?: (value: T | null) => void\n },\n slots: VRadioGroupSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VRadioGroup',\n\n inheritAttrs: false,\n\n props: makeVRadioGroupProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { attrs, slots }) {\n const uid = useId()\n const id = computed(() => props.id || `radio-group-${uid}`)\n const model = useProxiedModel(props, 'modelValue')\n\n useRender(() => {\n const [rootAttrs, controlAttrs] = filterInputAttrs(attrs)\n const inputProps = VInput.filterProps(props)\n const controlProps = VSelectionControl.filterProps(props)\n const label = slots.label\n ? slots.label({\n label: props.label,\n props: { for: id.value },\n })\n : props.label\n\n return (\n <VInput\n class={[\n 'v-radio-group',\n props.class,\n ]}\n style={ props.style }\n { ...rootAttrs }\n { ...inputProps }\n v-model={ model.value }\n id={ id.value }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n }) => (\n <>\n { label && (\n <VLabel id={ id.value }>\n { label }\n </VLabel>\n )}\n\n <VSelectionControlGroup\n { ...controlProps }\n id={ id.value }\n aria-describedby={ messagesId.value }\n defaultsTarget=\"VRadio\"\n trueIcon={ props.trueIcon }\n falseIcon={ props.falseIcon }\n type={ props.type }\n disabled={ isDisabled.value }\n readonly={ isReadonly.value }\n aria-labelledby={ label ? id.value : undefined }\n multiple={ false }\n { ...controlAttrs }\n v-model={ model.value }\n v-slots={ slots }\n />\n </>\n ),\n }}\n </VInput>\n )\n })\n\n return {}\n },\n})\n\nexport type VRadioGroup = InstanceType<typeof VRadioGroup>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,MAAM;AAAA,SACvBC,MAAM;AAAA,SACNC,iBAAiB;AAAA,SACjBC,8BAA8B,EAAEC,sBAAsB,+DAE/D;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AAC,MAAM;MACd,MAAM,CAACsB,SAAS,EAAEC,YAAY,CAAC,GAAG3B,gBAAgB,CAACqB,KAAK,CAAC;MACzD,MAAMO,UAAU,GAAGrC,MAAM,CAACsC,WAAW,CAACb,KAAK,CAAC;MAC5C,MAAMc,YAAY,GAAGrC,iBAAiB,CAACoC,WAAW,CAACb,KAAK,CAAC;MACzD,MAAMe,KAAK,GAAGT,KAAK,CAACS,KAAK,GACrBT,KAAK,CAACS,KAAK,CAAC;QACZA,KAAK,EAAEf,KAAK,CAACe,KAAK;QAClBf,KAAK,EAAE;UAAEgB,GAAG,EAAER,EAAE,CAACN;QAAM;MACzB,CAAC,CAAC,GACAF,KAAK,CAACe,KAAK;MAEf,OAAAE,YAAA,CAAA1C,MAAA,EAAA2C,WAAA;QAAA,SAEW,CACL,eAAe,EACflB,KAAK,CAACmB,KAAK,CACZ;QAAA,SACOnB,KAAK,CAACoB;MAAK,GACdV,SAAS,EACTE,UAAU;QAAA,cACLH,KAAK,CAACP,KAAK;QAAA,uBAAAmB,MAAA,IAAXZ,KAAK,CAACP,KAAK,GAAAmB,MAAA;QAAA,MAChBb,EAAE,CAACN;MAAK;QAGX,GAAGI,KAAK;QACRZ,OAAO,EAAE4B,KAAA;UAAA,IAAC;YACRd,EAAE;YACFe,UAAU;YACVC,UAAU;YACVC;UACF,CAAC,GAAAH,KAAA;UAAA,
|
|
1
|
+
{"version":3,"file":"VRadioGroup.js","names":["makeVInputProps","VInput","VLabel","VSelectionControl","makeSelectionControlGroupProps","VSelectionControlGroup","IconValue","useProxiedModel","computed","useId","filterInputAttrs","genericComponent","omit","propsFactory","useRender","makeVRadioGroupProps","height","type","Number","String","default","trueIcon","falseIcon","VRadioGroup","name","inheritAttrs","props","emits","value","setup","_ref","attrs","slots","uid","id","model","rootAttrs","controlAttrs","inputProps","filterProps","controlProps","label","for","_createVNode","_mergeProps","class","style","$event","_ref2","messagesId","isDisabled","isReadonly","_createElementVNode","_Fragment","undefined"],"sources":["../../../src/components/VRadioGroup/VRadioGroup.tsx"],"sourcesContent":["// Styles\nimport './VRadioGroup.sass'\n\n// Components\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VLabel } from '@/components/VLabel'\nimport { VSelectionControl } from '@/components/VSelectionControl'\nimport { makeSelectionControlGroupProps, VSelectionControlGroup } from '@/components/VSelectionControlGroup/VSelectionControlGroup'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, useId } from 'vue'\nimport { filterInputAttrs, genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { GenericProps } from '@/util'\n\nexport type VRadioGroupSlots = Omit<VInputSlots, 'default'> & {\n default: never\n label: {\n label: string | undefined\n props: Record<string, any>\n }\n}\n\nexport const makeVRadioGroupProps = propsFactory({\n height: {\n type: [Number, String],\n default: 'auto',\n },\n\n ...makeVInputProps(),\n ...omit(makeSelectionControlGroupProps(), ['multiple']),\n\n trueIcon: {\n type: IconValue,\n default: '$radioOn',\n },\n falseIcon: {\n type: IconValue,\n default: '$radioOff',\n },\n type: {\n type: String,\n default: 'radio',\n },\n}, 'VRadioGroup')\n\nexport const VRadioGroup = genericComponent<new <T>(\n props: {\n modelValue?: T | null\n 'onUpdate:modelValue'?: (value: T | null) => void\n },\n slots: VRadioGroupSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VRadioGroup',\n\n inheritAttrs: false,\n\n props: makeVRadioGroupProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { attrs, slots }) {\n const uid = useId()\n const id = computed(() => props.id || `radio-group-${uid}`)\n const model = useProxiedModel(props, 'modelValue')\n\n useRender(() => {\n const [rootAttrs, controlAttrs] = filterInputAttrs(attrs)\n const inputProps = VInput.filterProps(props)\n const controlProps = VSelectionControl.filterProps(props)\n const label = slots.label\n ? slots.label({\n label: props.label,\n props: { for: id.value },\n })\n : props.label\n\n return (\n <VInput\n class={[\n 'v-radio-group',\n props.class,\n ]}\n style={ props.style }\n { ...rootAttrs }\n { ...inputProps }\n v-model={ model.value }\n id={ id.value }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n }) => (\n <>\n { label && (\n <VLabel id={ id.value }>\n { label }\n </VLabel>\n )}\n\n <VSelectionControlGroup\n { ...controlProps }\n id={ id.value }\n aria-describedby={ messagesId.value }\n defaultsTarget=\"VRadio\"\n trueIcon={ props.trueIcon }\n falseIcon={ props.falseIcon }\n type={ props.type }\n disabled={ isDisabled.value }\n readonly={ isReadonly.value }\n aria-labelledby={ label ? id.value : undefined }\n multiple={ false }\n { ...controlAttrs }\n v-model={ model.value }\n v-slots={ slots }\n />\n </>\n ),\n }}\n </VInput>\n )\n })\n\n return {}\n },\n})\n\nexport type VRadioGroup = InstanceType<typeof VRadioGroup>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,MAAM;AAAA,SACvBC,MAAM;AAAA,SACNC,iBAAiB;AAAA,SACjBC,8BAA8B,EAAEC,sBAAsB,+DAE/D;AAAA,SACSC,SAAS;AAAA,SACTC,eAAe,6CAExB;AACA,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,gBAAgB,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,+BAE1E;AAYA,OAAO,MAAMC,oBAAoB,GAAGF,YAAY,CAAC;EAC/CG,MAAM,EAAE;IACNC,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;IACtBC,OAAO,EAAE;EACX,CAAC;EAED,GAAGpB,eAAe,CAAC,CAAC;EACpB,GAAGY,IAAI,CAACR,8BAA8B,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC;EAEvDiB,QAAQ,EAAE;IACRJ,IAAI,EAAEX,SAAS;IACfc,OAAO,EAAE;EACX,CAAC;EACDE,SA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AAK,CAACmB,KAAK,CACZ;QAAA,SACOnB,KAAK,CAACoB;MAAK,GACdV,SAAS,EACTE,UAAU;QAAA,cACLH,KAAK,CAACP,KAAK;QAAA,uBAAAmB,MAAA,IAAXZ,KAAK,CAACP,KAAK,GAAAmB,MAAA;QAAA,MAChBb,EAAE,CAACN;MAAK;QAGX,GAAGI,KAAK;QACRZ,OAAO,EAAE4B,KAAA;UAAA,IAAC;YACRd,EAAE;YACFe,UAAU;YACVC,UAAU;YACVC;UACF,CAAC,GAAAH,KAAA;UAAA,OAAAI,mBAAA,CAAAC,SAAA,SAEKZ,KAAK,IAAAE,YAAA,CAAAzC,MAAA;YAAA,MACQgC,EAAE,CAACN;UAAK;YAAAR,OAAA,EAAAA,CAAA,MACjBqB,KAAK;UAAA,EAEV,EAAAE,YAAA,CAAAtC,sBAAA,EAAAuC,WAAA,CAGMJ,YAAY;YAAA,MACZN,EAAE,CAACN,KAAK;YAAA,oBACMqB,UAAU,CAACrB,KAAK;YAAA;YAAA,YAExBF,KAAK,CAACL,QAAQ;YAAA,aACbK,KAAK,CAACJ,SAAS;YAAA,QACpBI,KAAK,CAACT,IAAI;YAAA,YACNiC,UAAU,CAACtB,KAAK;YAAA,YAChBuB,UAAU,CAACvB,KAAK;YAAA,mBACTa,KAAK,GAAGP,EAAE,CAACN,KAAK,GAAG0B,SAAS;YAAA,YACnC;UAAK,GACXjB,YAAY;YAAA,cACPF,KAAK,CAACP,KAAK;YAAA,uBAAAmB,MAAA,IAAXZ,KAAK,CAACP,KAAK,GAAAmB;UAAA,IACXf,KAAK;QAAA;MAGpB;IAIT,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -294,14 +294,14 @@ export declare const makeVRangeSliderProps: <Defaults extends {
|
|
|
294
294
|
default: unknown extends Defaults["label"] ? string : string | Defaults["label"];
|
|
295
295
|
};
|
|
296
296
|
rules: unknown extends Defaults["rules"] ? {
|
|
297
|
-
type: PropType<readonly import("../../types.js").ValidationRule[]>;
|
|
297
|
+
type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
|
298
298
|
default: () => never[];
|
|
299
299
|
} : Omit<{
|
|
300
|
-
type: PropType<readonly import("../../types.js").ValidationRule[]>;
|
|
300
|
+
type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
|
301
301
|
default: () => never[];
|
|
302
302
|
}, "type" | "default"> & {
|
|
303
|
-
type: PropType<unknown extends Defaults["rules"] ? readonly import("../../
|
|
304
|
-
default: unknown extends Defaults["rules"] ? readonly import("../../
|
|
303
|
+
type: PropType<unknown extends Defaults["rules"] ? readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] : readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] | Defaults["rules"]>;
|
|
304
|
+
default: unknown extends Defaults["rules"] ? readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] : readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] | Defaults["rules"];
|
|
305
305
|
};
|
|
306
306
|
validateOn: unknown extends Defaults["validateOn"] ? PropType<("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined> : {
|
|
307
307
|
type: PropType<unknown extends Defaults["validateOn"] ? ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined : ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | Defaults["validateOn"] | undefined>;
|
|
@@ -436,7 +436,7 @@ export declare const VRangeSlider: {
|
|
|
436
436
|
step: string | number;
|
|
437
437
|
elevation: string | number;
|
|
438
438
|
messages: string | readonly string[];
|
|
439
|
-
rules: readonly import("../../
|
|
439
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
440
440
|
focused: boolean;
|
|
441
441
|
errorMessages: string | readonly string[] | null;
|
|
442
442
|
maxErrors: string | number;
|
|
@@ -547,7 +547,7 @@ export declare const VRangeSlider: {
|
|
|
547
547
|
step: string | number;
|
|
548
548
|
elevation: string | number;
|
|
549
549
|
messages: string | readonly string[];
|
|
550
|
-
rules: readonly import("../../
|
|
550
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
551
551
|
focused: boolean;
|
|
552
552
|
errorMessages: string | readonly string[] | null;
|
|
553
553
|
maxErrors: string | number;
|
|
@@ -599,7 +599,7 @@ export declare const VRangeSlider: {
|
|
|
599
599
|
step: string | number;
|
|
600
600
|
elevation: string | number;
|
|
601
601
|
messages: string | readonly string[];
|
|
602
|
-
rules: readonly import("../../
|
|
602
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
603
603
|
focused: boolean;
|
|
604
604
|
errorMessages: string | readonly string[] | null;
|
|
605
605
|
maxErrors: string | number;
|
|
@@ -705,7 +705,7 @@ export declare const VRangeSlider: {
|
|
|
705
705
|
step: string | number;
|
|
706
706
|
elevation: string | number;
|
|
707
707
|
messages: string | readonly string[];
|
|
708
|
-
rules: readonly import("../../
|
|
708
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
709
709
|
focused: boolean;
|
|
710
710
|
errorMessages: string | readonly string[] | null;
|
|
711
711
|
maxErrors: string | number;
|
|
@@ -740,7 +740,7 @@ export declare const VRangeSlider: {
|
|
|
740
740
|
step: string | number;
|
|
741
741
|
elevation: string | number;
|
|
742
742
|
messages: string | readonly string[];
|
|
743
|
-
rules: readonly import("../../
|
|
743
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
744
744
|
focused: boolean;
|
|
745
745
|
errorMessages: string | readonly string[] | null;
|
|
746
746
|
maxErrors: string | number;
|
|
@@ -851,7 +851,7 @@ export declare const VRangeSlider: {
|
|
|
851
851
|
step: string | number;
|
|
852
852
|
elevation: string | number;
|
|
853
853
|
messages: string | readonly string[];
|
|
854
|
-
rules: readonly import("../../
|
|
854
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
|
855
855
|
focused: boolean;
|
|
856
856
|
errorMessages: string | readonly string[] | null;
|
|
857
857
|
maxErrors: string | number;
|
|
@@ -974,7 +974,7 @@ export declare const VRangeSlider: {
|
|
|
974
974
|
name: StringConstructor;
|
|
975
975
|
label: StringConstructor;
|
|
976
976
|
rules: {
|
|
977
|
-
type: PropType<readonly import("../../types.js").ValidationRule[]>;
|
|
977
|
+
type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
|
978
978
|
default: () => never[];
|
|
979
979
|
};
|
|
980
980
|
validateOn: PropType<import("../../composables/validation.js").ValidationProps["validateOn"]>;
|
|
@@ -1104,7 +1104,7 @@ export declare const VRangeSlider: {
|
|
|
1104
1104
|
name: StringConstructor;
|
|
1105
1105
|
label: StringConstructor;
|
|
1106
1106
|
rules: {
|
|
1107
|
-
type: PropType<readonly import("../../types.js").ValidationRule[]>;
|
|
1107
|
+
type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
|
1108
1108
|
default: () => never[];
|
|
1109
1109
|
};
|
|
1110
1110
|
validateOn: PropType<import("../../composables/validation.js").ValidationProps["validateOn"]>;
|