maz-ui 4.1.7-beta.8 → 4.1.8-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/MazBackdrop.CO7YPR-g.css +1 -0
- package/dist/assets/{MazDropzone.B5e-z_Ba.css → MazDropzone.Ch5EPpDi.css} +1 -1
- package/dist/assets/MazInputPhoneNumber.BGz17BIE.css +1 -0
- package/dist/assets/MazSelect.Dx9yL9AD.css +1 -0
- package/dist/chunks/{MazInputPhoneNumber.CbNnLvU_.js → MazInputPhoneNumber.BxMymgj-.js} +7 -6
- package/dist/chunks/{PhoneInput.DQZjDqMK.js → PhoneInput.BUiv9fYr.js} +1 -1
- package/dist/components/MazBackdrop.js +2 -2
- package/dist/components/MazDropzone.js +23 -29
- package/dist/components/MazInputPhoneNumber.js +1 -1
- package/dist/components/MazSelect.js +13 -11
- package/dist/components/index.js +1 -1
- package/dist/types/components/MazDropzone.vue.d.ts +0 -5
- package/package.json +11 -11
- package/dist/assets/MazBackdrop.09bziTPM.css +0 -1
- package/dist/assets/MazInputPhoneNumber.Baeyskod.css +0 -1
- package/dist/assets/MazSelect.CvoR958a.css +0 -1
- package/dist/components/MazAccordion.vue.d.ts +0 -36
- package/dist/components/MazAnimatedCounter.vue.d.ts +0 -59
- package/dist/components/MazAnimatedElement.vue.d.ts +0 -44
- package/dist/components/MazAnimatedText.vue.d.ts +0 -57
- package/dist/components/MazAvatar.vue.d.ts +0 -99
- package/dist/components/MazBackdrop.vue.d.ts +0 -91
- package/dist/components/MazBadge.vue.d.ts +0 -61
- package/dist/components/MazBottomSheet.vue.d.ts +0 -35
- package/dist/components/MazBtn.vue.d.ts +0 -105
- package/dist/components/MazCard.vue.d.ts +0 -81
- package/dist/components/MazCardSpotlight.vue.d.ts +0 -57
- package/dist/components/MazCarousel.vue.d.ts +0 -48
- package/dist/components/MazChart.vue.d.ts +0 -53
- package/dist/components/MazCheckbox.vue.d.ts +0 -55
- package/dist/components/MazChecklist.vue.d.ts +0 -87
- package/dist/components/MazCircularProgressBar.vue.d.ts +0 -106
- package/dist/components/MazDatePicker/MazPickerCalendar.vue.d.ts +0 -28
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +0 -20
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +0 -133
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +0 -142
- package/dist/components/MazDatePicker/MazPickerCalendarSwitcher.vue.d.ts +0 -42
- package/dist/components/MazDatePicker/MazPickerContainer.vue.d.ts +0 -38
- package/dist/components/MazDatePicker/MazPickerHeader.vue.d.ts +0 -15
- package/dist/components/MazDatePicker/MazPickerMonthSwitcher.vue.d.ts +0 -44
- package/dist/components/MazDatePicker/MazPickerShortcuts.vue.d.ts +0 -16
- package/dist/components/MazDatePicker/MazPickerTime.vue.d.ts +0 -107
- package/dist/components/MazDatePicker/MazPickerYearSwitcher.vue.d.ts +0 -36
- package/dist/components/MazDatePicker/types.d.ts +0 -14
- package/dist/components/MazDatePicker/utils.d.ts +0 -61
- package/dist/components/MazDatePicker.vue.d.ts +0 -567
- package/dist/components/MazDialog.vue.d.ts +0 -247
- package/dist/components/MazDialogConfirm/useMazDialogConfirm.d.ts +0 -47
- package/dist/components/MazDialogConfirm.vue.d.ts +0 -270
- package/dist/components/MazDrawer.vue.d.ts +0 -52
- package/dist/components/MazDropdown.vue.d.ts +0 -246
- package/dist/components/MazDropzone.vue.d.ts +0 -299
- package/dist/components/MazExpandAnimation.vue.d.ts +0 -44
- package/dist/components/MazFullscreenLoader.vue.d.ts +0 -26
- package/dist/components/MazGallery.vue.d.ts +0 -85
- package/dist/components/MazIcon.vue.d.ts +0 -33
- package/dist/components/MazInput.vue.d.ts +0 -225
- package/dist/components/MazInputCode.vue.d.ts +0 -49
- package/dist/components/MazInputNumber.vue.d.ts +0 -125
- package/dist/components/MazInputPhoneNumber/PhoneInput.vue.d.ts +0 -29
- package/dist/components/MazInputPhoneNumber/useLibphonenumber.d.ts +0 -26
- package/dist/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +0 -26
- package/dist/components/MazInputPhoneNumber.vue.d.ts +0 -421
- package/dist/components/MazInputPrice.vue.d.ts +0 -48
- package/dist/components/MazInputTags.vue.d.ts +0 -51
- package/dist/components/MazLazyImg.vue.d.ts +0 -78
- package/dist/components/MazLink.vue.d.ts +0 -116
- package/dist/components/MazLoadingBar.vue.d.ts +0 -12
- package/dist/components/MazPagination.vue.d.ts +0 -83
- package/dist/components/MazPopover.vue.d.ts +0 -258
- package/dist/components/MazPullToRefresh.vue.d.ts +0 -52
- package/dist/components/MazRadio.vue.d.ts +0 -55
- package/dist/components/MazRadioButtons.vue.d.ts +0 -74
- package/dist/components/MazReadingProgressBar.vue.d.ts +0 -55
- package/dist/components/MazSelect.vue.d.ts +0 -209
- package/dist/components/MazSelectCountry.vue.d.ts +0 -171
- package/dist/components/MazSlider/utils.d.ts +0 -15
- package/dist/components/MazSlider.vue.d.ts +0 -31
- package/dist/components/MazSpinner.vue.d.ts +0 -15
- package/dist/components/MazStepper.vue.d.ts +0 -60
- package/dist/components/MazSwitch.vue.d.ts +0 -69
- package/dist/components/MazTable.vue.d.ts +0 -324
- package/dist/components/MazTableCell.vue.d.ts +0 -17
- package/dist/components/MazTableRow.vue.d.ts +0 -23
- package/dist/components/MazTableTitle.vue.d.ts +0 -17
- package/dist/components/MazTabs.vue.d.ts +0 -30
- package/dist/components/MazTabsBar.vue.d.ts +0 -96
- package/dist/components/MazTabsContent.vue.d.ts +0 -17
- package/dist/components/MazTabsContentItem.vue.d.ts +0 -31
- package/dist/components/MazTextarea.vue.d.ts +0 -88
- package/dist/components/constantes.d.ts +0 -2
- package/dist/components/index.d.ts +0 -109
- package/dist/components/types.d.ts +0 -4
- package/dist/composables/index.d.ts +0 -22
- package/dist/composables/useAos.d.ts +0 -2
- package/dist/composables/useBreakpoints.d.ts +0 -38
- package/dist/composables/useDialog.d.ts +0 -2
- package/dist/composables/useDisplayNames.d.ts +0 -101
- package/dist/composables/useDropzone.d.ts +0 -27
- package/dist/composables/useFormField.d.ts +0 -16
- package/dist/composables/useFormValidator/config.d.ts +0 -7
- package/dist/composables/useFormValidator/dom-events.d.ts +0 -19
- package/dist/composables/useFormValidator/state-management.d.ts +0 -72
- package/dist/composables/useFormValidator/types.d.ts +0 -98
- package/dist/composables/useFormValidator/validation.d.ts +0 -37
- package/dist/composables/useFormValidator.d.ts +0 -23
- package/dist/composables/useFreezeValue.d.ts +0 -5
- package/dist/composables/useIdleTimeout.d.ts +0 -5
- package/dist/composables/useInjectStrict.d.ts +0 -2
- package/dist/composables/useInstanceUniqId.d.ts +0 -4
- package/dist/composables/useMountComponent.d.ts +0 -14
- package/dist/composables/useMutationObserver.d.ts +0 -13
- package/dist/composables/useReadingTime.d.ts +0 -25
- package/dist/composables/useStringMatching.d.ts +0 -5
- package/dist/composables/useSwipe.d.ts +0 -14
- package/dist/composables/useTimer.d.ts +0 -30
- package/dist/composables/useToast.d.ts +0 -22
- package/dist/composables/useUserVisibility.d.ts +0 -5
- package/dist/composables/useWait.d.ts +0 -2
- package/dist/composables/useWindowSize.d.ts +0 -32
- package/dist/directives/index.d.ts +0 -5
- package/dist/directives/vClickOutside.d.ts +0 -36
- package/dist/directives/vFullscreenImg/MazFullscreenImg.vue.d.ts +0 -50
- package/dist/directives/vFullscreenImg/fullscreen-img.directive.d.ts +0 -5
- package/dist/directives/vFullscreenImg/fullscreen-img.handler.d.ts +0 -36
- package/dist/directives/vFullscreenImg.d.ts +0 -11
- package/dist/directives/vLazyImg/lazy-img.directive.d.ts +0 -5
- package/dist/directives/vLazyImg/lazy-img.handler.d.ts +0 -38
- package/dist/directives/vLazyImg/types.d.ts +0 -29
- package/dist/directives/vLazyImg.d.ts +0 -12
- package/dist/directives/vTooltip.d.ts +0 -54
- package/dist/directives/vZoomImg/style.d.ts +0 -1
- package/dist/directives/vZoomImg/svgs.d.ts +0 -3
- package/dist/directives/vZoomImg/zoom-img.directive.d.ts +0 -8
- package/dist/directives/vZoomImg/zoom-img.handler.d.ts +0 -46
- package/dist/directives/vZoomImg.d.ts +0 -10
- package/dist/index.d.ts +0 -1
- package/dist/plugins/aos.d.ts +0 -81
- package/dist/plugins/dialog/DialogHandler.d.ts +0 -16
- package/dist/plugins/dialog.d.ts +0 -26
- package/dist/plugins/index.d.ts +0 -5
- package/dist/plugins/maz-ui.d.ts +0 -43
- package/dist/plugins/toast/MazToast.vue.d.ts +0 -34
- package/dist/plugins/toast/ToastHandler.d.ts +0 -29
- package/dist/plugins/toast/types.d.ts +0 -104
- package/dist/plugins/toast.d.ts +0 -25
- package/dist/plugins/wait.d.ts +0 -33
- package/dist/resolvers/MazComponentsResolver.d.ts +0 -10
- package/dist/resolvers/MazDirectivesResolver.d.ts +0 -11
- package/dist/resolvers/MazModulesResolver.d.ts +0 -11
- package/dist/resolvers/index.d.ts +0 -3
- package/dist/tailwindcss/index.d.ts +0 -6
- package/dist/tailwindcss/tailwind.config.d.ts +0 -89
- package/dist/tailwindcss/utils/colors.d.ts +0 -7
- package/dist/tailwindcss/variables/breakpoints.d.ts +0 -15
- package/dist/tailwindcss/variables/colors.d.ts +0 -21
- package/dist/tailwindcss/variables/design-tokens.d.ts +0 -35
- package/dist/tailwindcss/variables/utilities.d.ts +0 -17
- package/dist/tailwindcss/variables/z-indexes.d.ts +0 -14
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
export { default as MazAccordion } from './MazAccordion.vue';
|
|
2
|
-
export type { MazAccordionProps } from './MazAccordion.vue';
|
|
3
|
-
export { default as MazAnimatedCounter } from './MazAnimatedCounter.vue';
|
|
4
|
-
export type { MazAnimatedCounterProps } from './MazAnimatedCounter.vue';
|
|
5
|
-
export { default as MazAnimatedElement } from './MazAnimatedElement.vue';
|
|
6
|
-
export type { MazAnimatedElementProps } from './MazAnimatedElement.vue';
|
|
7
|
-
export { default as MazAnimatedText } from './MazAnimatedText.vue';
|
|
8
|
-
export type { MazAnimatedTextProps } from './MazAnimatedText.vue';
|
|
9
|
-
export { default as MazAvatar } from './MazAvatar.vue';
|
|
10
|
-
export type { MazAvatarProps } from './MazAvatar.vue';
|
|
11
|
-
export { default as MazBackdrop } from './MazBackdrop.vue';
|
|
12
|
-
export type { MazBackdropProps } from './MazBackdrop.vue';
|
|
13
|
-
export { default as MazBadge } from './MazBadge.vue';
|
|
14
|
-
export type { MazBadgeColor, MazBadgeProps, MazBadgeRoundedSize } from './MazBadge.vue';
|
|
15
|
-
export { default as MazBottomSheet } from './MazBottomSheet.vue';
|
|
16
|
-
export type { MazBottomSheetProps } from './MazBottomSheet.vue';
|
|
17
|
-
export { default as MazBtn } from './MazBtn.vue';
|
|
18
|
-
export type { MazBtnProps } from './MazBtn.vue';
|
|
19
|
-
export { default as MazCard } from './MazCard.vue';
|
|
20
|
-
export type { MazCardProps } from './MazCard.vue';
|
|
21
|
-
export { default as MazCardSpotlight } from './MazCardSpotlight.vue';
|
|
22
|
-
export type { MazCardSpotlightProps } from './MazCardSpotlight.vue';
|
|
23
|
-
export { default as MazCarousel } from './MazCarousel.vue';
|
|
24
|
-
export type { MazCarouselProps } from './MazCarousel.vue';
|
|
25
|
-
export { default as MazChart } from './MazChart.vue';
|
|
26
|
-
export type { MazChartData, MazChartDefaultDataPoint, MazChartPlugin, MazChartProps, MazChartType, MazChartUpdateMode } from './MazChart.vue';
|
|
27
|
-
export { default as MazCheckbox } from './MazCheckbox.vue';
|
|
28
|
-
export type { MazCheckboxProps, MazCheckboxValue } from './MazCheckbox.vue';
|
|
29
|
-
export { default as MazChecklist } from './MazChecklist.vue';
|
|
30
|
-
export type { MazChecklistItemOption, MazChecklistProps } from './MazChecklist.vue';
|
|
31
|
-
export { default as MazCircularProgressBar } from './MazCircularProgressBar.vue';
|
|
32
|
-
export type { MazCircularProgressBarProps } from './MazCircularProgressBar.vue';
|
|
33
|
-
export { default as MazDatePicker } from './MazDatePicker.vue';
|
|
34
|
-
export type { MazDatePickerPartialRangeValue, MazDatePickerProps, MazDatePickerRangeValue, MazDatePickerShortcut, MazDatePickerValue } from './MazDatePicker.vue';
|
|
35
|
-
export { default as MazDialog } from './MazDialog.vue';
|
|
36
|
-
export type { MazDialogProps } from './MazDialog.vue';
|
|
37
|
-
export { default as MazDialogConfirm, useMazDialogConfirm } from './MazDialogConfirm.vue';
|
|
38
|
-
export type { MazDialogConfirmButton, MazDialogConfirmData, MazDialogConfirmProps } from './MazDialogConfirm.vue';
|
|
39
|
-
export { default as MazDrawer } from './MazDrawer.vue';
|
|
40
|
-
export type { MazDrawerProps } from './MazDrawer.vue';
|
|
41
|
-
export { default as MazDropdown } from './MazDropdown.vue';
|
|
42
|
-
export type { MazDropdownMenuItem, MazDropdownProps } from './MazDropdown.vue';
|
|
43
|
-
export { default as MazDropzone } from './MazDropzone.vue';
|
|
44
|
-
export type { MazDropzoneErrorCode, MazDropzoneFileData, MazDropzoneProps } from './MazDropzone.vue';
|
|
45
|
-
export { default as MazExpandAnimation } from './MazExpandAnimation.vue';
|
|
46
|
-
export type { MazExpandAnimationProps } from './MazExpandAnimation.vue';
|
|
47
|
-
export { default as MazFullscreenLoader } from './MazFullscreenLoader.vue';
|
|
48
|
-
export type { MazFullscreenLoaderProps } from './MazFullscreenLoader.vue';
|
|
49
|
-
export { default as MazGallery } from './MazGallery.vue';
|
|
50
|
-
export type { MazGalleryImage, MazGalleryProps } from './MazGallery.vue';
|
|
51
|
-
export { default as MazIcon } from './MazIcon.vue';
|
|
52
|
-
export type { MazIconProps } from './MazIcon.vue';
|
|
53
|
-
export { default as MazInput } from './MazInput.vue';
|
|
54
|
-
export type { MazInputProps } from './MazInput.vue';
|
|
55
|
-
export { default as MazInputCode } from './MazInputCode.vue';
|
|
56
|
-
export type { MazInputCodeProps, MazInputCodeSize } from './MazInputCode.vue';
|
|
57
|
-
export { default as MazInputNumber } from './MazInputNumber.vue';
|
|
58
|
-
export type { MazInputNumberProps } from './MazInputNumber.vue';
|
|
59
|
-
export { default as MazInputPhoneNumber } from './MazInputPhoneNumber.vue';
|
|
60
|
-
export type { MazInputPhoneNumberProps } from './MazInputPhoneNumber.vue';
|
|
61
|
-
export { default as MazInputPrice } from './MazInputPrice.vue';
|
|
62
|
-
export type { MazInputPriceProps } from './MazInputPrice.vue';
|
|
63
|
-
export { default as MazInputTags } from './MazInputTags.vue';
|
|
64
|
-
export type { MazInputTagsProps } from './MazInputTags.vue';
|
|
65
|
-
export { default as MazLazyImg } from './MazLazyImg.vue';
|
|
66
|
-
export type { MazLazyImgProps } from './MazLazyImg.vue';
|
|
67
|
-
export { default as MazLink } from './MazLink.vue';
|
|
68
|
-
export type { MazLinkProps } from './MazLink.vue';
|
|
69
|
-
export { default as MazLoadingBar } from './MazLoadingBar.vue';
|
|
70
|
-
export type { MazLoadingBarProps } from './MazLoadingBar.vue';
|
|
71
|
-
export { default as MazPagination } from './MazPagination.vue';
|
|
72
|
-
export type { MazPaginationProps } from './MazPagination.vue';
|
|
73
|
-
export { default as MazPopover } from './MazPopover.vue';
|
|
74
|
-
export type { MazPopoverPosition, MazPopoverProps, MazPopoverRole, MazPopoverTrigger } from './MazPopover.vue';
|
|
75
|
-
export { default as MazPullToRefresh } from './MazPullToRefresh.vue';
|
|
76
|
-
export type { MazPullToRefreshProps } from './MazPullToRefresh.vue';
|
|
77
|
-
export { default as MazRadio } from './MazRadio.vue';
|
|
78
|
-
export type { MazRadioProps } from './MazRadio.vue';
|
|
79
|
-
export { default as MazRadioButtons } from './MazRadioButtons.vue';
|
|
80
|
-
export type { MazRadioButtonsOption, MazRadioButtonsProps } from './MazRadioButtons.vue';
|
|
81
|
-
export { default as MazReadingProgressBar } from './MazReadingProgressBar.vue';
|
|
82
|
-
export type { MazReadingProgressBarProps } from './MazReadingProgressBar.vue';
|
|
83
|
-
export { default as MazSelect } from './MazSelect.vue';
|
|
84
|
-
export type { MazSelectOption, MazSelectOptionWithOptGroup, MazSelectProps } from './MazSelect.vue';
|
|
85
|
-
export { default as MazSelectCountry } from './MazSelectCountry.vue';
|
|
86
|
-
export type { MazSelectCountryProps } from './MazSelectCountry.vue';
|
|
87
|
-
export { default as MazSlider } from './MazSlider.vue';
|
|
88
|
-
export type { MazSliderProps } from './MazSlider.vue';
|
|
89
|
-
export { default as MazSpinner } from './MazSpinner.vue';
|
|
90
|
-
export type { MazSpinnerProps } from './MazSpinner.vue';
|
|
91
|
-
export { default as MazStepper } from './MazStepper.vue';
|
|
92
|
-
export type { MazStepperProps, MazStepperStep } from './MazStepper.vue';
|
|
93
|
-
export { default as MazSwitch } from './MazSwitch.vue';
|
|
94
|
-
export type { MazSwitchProps } from './MazSwitch.vue';
|
|
95
|
-
export { default as MazTable } from './MazTable.vue';
|
|
96
|
-
export type { MazTableHeader, MazTableHeadersEnriched, MazTableProps, MazTableRow as MazTableTableRow } from './MazTable.vue';
|
|
97
|
-
export { default as MazTableCell } from './MazTableCell.vue';
|
|
98
|
-
export { default as MazTableRow } from './MazTableRow.vue';
|
|
99
|
-
export type { MazTableRowProps } from './MazTableRow.vue';
|
|
100
|
-
export { default as MazTableTitle } from './MazTableTitle.vue';
|
|
101
|
-
export { default as MazTabs } from './MazTabs.vue';
|
|
102
|
-
export type { MazTabsProps } from './MazTabs.vue';
|
|
103
|
-
export { default as MazTabsBar } from './MazTabsBar.vue';
|
|
104
|
-
export type { MazTabsBarItem, MazTabsBarProps } from './MazTabsBar.vue';
|
|
105
|
-
export { default as MazTabsContent } from './MazTabsContent.vue';
|
|
106
|
-
export { default as MazTabsContentItem } from './MazTabsContentItem.vue';
|
|
107
|
-
export { default as MazTextarea } from './MazTextarea.vue';
|
|
108
|
-
export type { MazTextareaProps } from './MazTextarea.vue';
|
|
109
|
-
export type { MazColor, MazSize } from './types';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { colors } from './constantes';
|
|
2
|
-
export type MazColor = (typeof colors)[number];
|
|
3
|
-
export type MazSize = 'mini' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
-
export declare function getColor(color: MazColor | 'background' | 'muted'): "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "destructive" | "contrast" | "transparent" | "muted" | "surface";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export * from './useAos';
|
|
2
|
-
export * from './useBreakpoints';
|
|
3
|
-
export * from './useDialog';
|
|
4
|
-
export * from './useDisplayNames';
|
|
5
|
-
export * from './useDropzone';
|
|
6
|
-
export * from './useFormField';
|
|
7
|
-
export * from './useFormValidator';
|
|
8
|
-
export type { FieldsStates, FieldState, FormFieldOptions, FormSchema, FormValidatorOptions, InferOutputSchemaFormValidator, InferSchemaFormValidator } from './useFormValidator/types';
|
|
9
|
-
export * from './useFreezeValue';
|
|
10
|
-
export * from './useIdleTimeout';
|
|
11
|
-
export * from './useInjectStrict';
|
|
12
|
-
export * from './useInstanceUniqId';
|
|
13
|
-
export * from './useMountComponent';
|
|
14
|
-
export * from './useMutationObserver';
|
|
15
|
-
export * from './useReadingTime';
|
|
16
|
-
export * from './useStringMatching';
|
|
17
|
-
export * from './useSwipe';
|
|
18
|
-
export * from './useTimer';
|
|
19
|
-
export * from './useToast';
|
|
20
|
-
export * from './useUserVisibility';
|
|
21
|
-
export * from './useWait';
|
|
22
|
-
export * from './useWindowSize';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { UseWindowSizeOptions } from './useWindowSize';
|
|
2
|
-
export interface UseBreakpointsOptions extends UseWindowSizeOptions {
|
|
3
|
-
initialWidth?: number;
|
|
4
|
-
initialHeight?: number;
|
|
5
|
-
/**
|
|
6
|
-
* Listen to window `orientationchange` event
|
|
7
|
-
*
|
|
8
|
-
* @default true
|
|
9
|
-
*/
|
|
10
|
-
listenOrientation?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Whether the scrollbar should be included in the width and height
|
|
13
|
-
* @default true
|
|
14
|
-
*/
|
|
15
|
-
includeScrollbar?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* List of breakpoints in format `{ [key: string]: string }` (e.g. `{ 'sm': '640px', 'md': '768px' }`)
|
|
18
|
-
*/
|
|
19
|
-
breakpoints: Record<string, string> | Record<string, number>;
|
|
20
|
-
/**
|
|
21
|
-
* Is the breakpoint when the screen is considered not medium (tablet - e.g. `md`)
|
|
22
|
-
* @default 'md'
|
|
23
|
-
*/
|
|
24
|
-
mediumBreakPoint?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Is the breakpoint when the screen is considered not medium (laptop - e.g. `lg`)
|
|
27
|
-
* @default 'lg'
|
|
28
|
-
*/
|
|
29
|
-
largeBreakPoint?: string;
|
|
30
|
-
}
|
|
31
|
-
export declare function useBreakpoints({ initialWidth, initialHeight, includeScrollbar, internalWindow, listenOrientation, breakpoints, mediumBreakPoint, largeBreakPoint, }: UseBreakpointsOptions): {
|
|
32
|
-
width: import('vue').Ref<number, number>;
|
|
33
|
-
numericBreakpoints: Record<string, number>;
|
|
34
|
-
isSmallScreen: import('vue').ComputedRef<boolean>;
|
|
35
|
-
isLargeScreen: import('vue').ComputedRef<boolean>;
|
|
36
|
-
isMediumScreen: import('vue').ComputedRef<boolean>;
|
|
37
|
-
breakpoints: Record<string, string> | Record<string, number>;
|
|
38
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
-
declare const bcp47Codes: readonly ["af-ZA", "sq-AL", "ar-DZ", "ar-BH", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-OM", "ar-QA", "ar-SA", "ar-SY", "ar-TN", "ar-AE", "ar-YE", "hy-AM", "Cy-az-AZ", "Lt-az-AZ", "eu-ES", "be-BY", "bg-BG", "ca-ES", "zh-CN", "zh-HK", "zh-MO", "zh-SG", "zh-TW", "zh-CHS", "zh-CHT", "hr-HR", "cs-CZ", "da-DK", "div-MV", "nl-BE", "nl-NL", "en-AU", "en-BZ", "en-CA", "en-CB", "en-IE", "en-JM", "en-NZ", "en-PH", "en-ZA", "en-TT", "en-GB", "en-US", "en-ZW", "et-EE", "fo-FO", "fa-IR", "fi-FI", "fr-BE", "fr-CA", "fr-FR", "fr-LU", "fr-MC", "fr-CH", "gl-ES", "ka-GE", "de-AT", "de-DE", "de-LI", "de-LU", "de-CH", "el-GR", "gu-IN", "he-IL", "hi-IN", "hu-HU", "is-IS", "id-ID", "it-IT", "it-CH", "ja-JP", "kn-IN", "kk-KZ", "kok-IN", "ko-KR", "ky-KZ", "lv-LV", "lt-LT", "mk-MK", "ms-BN", "ms-MY", "mr-IN", "mn-MN", "nb-NO", "nn-NO", "pl-PL", "pt-BR", "pt-PT", "pa-IN", "ro-RO", "ru-RU", "sa-IN", "Cy-sr-SP", "Lt-sr-SP", "sk-SK", "sl-SI", "es-AR", "es-BO", "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-SV", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PY", "es-PE", "es-PR", "es-ES", "es-UY", "es-VE", "sw-KE", "sv-FI", "sv-SE", "syr-SY", "ta-IN", "tt-RU", "te-IN", "th-TH", "tr-TR", "uk-UA", "ur-PK", "Cy-uz-UZ", "Lt-uz-UZ", "vi-VN"];
|
|
3
|
-
declare const iso6391Codes: readonly ["aa", "ab", "ae", "af", "ak", "am", "an", "ar", "as", "av", "ay", "az", "ba", "be", "bg", "bh", "bi", "bm", "bn", "bo", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cu", "cv", "cy", "da", "de", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "gv", "ha", "he", "hi", "ho", "hr", "ht", "hu", "hy", "hz", "ia", "id", "ie", "ig", "ii", "ik", "io", "is", "it", "iu", "ja", "jv", "ka", "kg", "ki", "kj", "kk", "kl", "km", "kn", "ko", "kr", "ks", "ku", "kv", "kw", "ky", "la", "lb", "lg", "li", "ln", "lo", "lt", "lu", "lv", "mg", "mh", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "na", "nb", "nd", "ne", "ng", "nl", "nn", "no", "nr", "nv", "ny", "oc", "oj", "om", "or", "os", "pa", "pi", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sc", "sd", "se", "sg", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ty", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "wo", "xh", "yi", "yo", "za", "zh", "zu"];
|
|
4
|
-
declare const countryCodes: readonly ["AA", "AC", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GT", "GU", "GW", "GY", "HK", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TA", "TC", "TD", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW"];
|
|
5
|
-
declare const displayNamesCodes: ("sm" | "lg" | "br" | "hr" | "li" | "th" | "tr" | "to" | "mi" | "mn" | "ms" | "tt" | "id" | "cy" | "fy" | "el" | "is" | "af-ZA" | "sq-AL" | "ar-DZ" | "ar-BH" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-OM" | "ar-QA" | "ar-SA" | "ar-SY" | "ar-TN" | "ar-AE" | "ar-YE" | "hy-AM" | "Cy-az-AZ" | "Lt-az-AZ" | "eu-ES" | "be-BY" | "bg-BG" | "ca-ES" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-SG" | "zh-TW" | "zh-CHS" | "zh-CHT" | "hr-HR" | "cs-CZ" | "da-DK" | "div-MV" | "nl-BE" | "nl-NL" | "en-AU" | "en-BZ" | "en-CA" | "en-CB" | "en-IE" | "en-JM" | "en-NZ" | "en-PH" | "en-ZA" | "en-TT" | "en-GB" | "en-US" | "en-ZW" | "et-EE" | "fo-FO" | "fa-IR" | "fi-FI" | "fr-BE" | "fr-CA" | "fr-FR" | "fr-LU" | "fr-MC" | "fr-CH" | "gl-ES" | "ka-GE" | "de-AT" | "de-DE" | "de-LI" | "de-LU" | "de-CH" | "el-GR" | "gu-IN" | "he-IL" | "hi-IN" | "hu-HU" | "is-IS" | "id-ID" | "it-IT" | "it-CH" | "ja-JP" | "kn-IN" | "kk-KZ" | "kok-IN" | "ko-KR" | "ky-KZ" | "lv-LV" | "lt-LT" | "mk-MK" | "ms-BN" | "ms-MY" | "mr-IN" | "mn-MN" | "nb-NO" | "nn-NO" | "pl-PL" | "pt-BR" | "pt-PT" | "pa-IN" | "ro-RO" | "ru-RU" | "sa-IN" | "Cy-sr-SP" | "Lt-sr-SP" | "sk-SK" | "sl-SI" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-DO" | "es-EC" | "es-SV" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PY" | "es-PE" | "es-PR" | "es-ES" | "es-UY" | "es-VE" | "sw-KE" | "sv-FI" | "sv-SE" | "syr-SY" | "ta-IN" | "tt-RU" | "te-IN" | "th-TH" | "tr-TR" | "uk-UA" | "ur-PK" | "Cy-uz-UZ" | "Lt-uz-UZ" | "vi-VN" | "aa" | "ab" | "ae" | "af" | "ak" | "am" | "an" | "ar" | "as" | "av" | "ay" | "az" | "ba" | "be" | "bg" | "bh" | "bi" | "bm" | "bn" | "bo" | "bs" | "ca" | "ce" | "ch" | "co" | "cr" | "cs" | "cu" | "cv" | "da" | "de" | "dv" | "dz" | "ee" | "en" | "eo" | "es" | "et" | "eu" | "fa" | "ff" | "fi" | "fj" | "fo" | "fr" | "ga" | "gd" | "gl" | "gn" | "gu" | "gv" | "ha" | "he" | "hi" | "ho" | "ht" | "hu" | "hy" | "hz" | "ia" | "ie" | "ig" | "ii" | "ik" | "io" | "it" | "iu" | "ja" | "jv" | "ka" | "kg" | "ki" | "kj" | "kk" | "kl" | "km" | "kn" | "ko" | "kr" | "ks" | "ku" | "kv" | "kw" | "ky" | "la" | "lb" | "ln" | "lo" | "lt" | "lu" | "lv" | "mg" | "mh" | "mk" | "ml" | "mr" | "mt" | "my" | "na" | "nb" | "nd" | "ne" | "ng" | "nl" | "nn" | "no" | "nr" | "nv" | "ny" | "oc" | "oj" | "om" | "or" | "os" | "pa" | "pi" | "pl" | "ps" | "pt" | "qu" | "rm" | "rn" | "ro" | "ru" | "rw" | "sa" | "sc" | "sd" | "se" | "sg" | "si" | "sk" | "sl" | "sn" | "so" | "sq" | "sr" | "ss" | "st" | "su" | "sv" | "sw" | "ta" | "te" | "tg" | "ti" | "tk" | "tl" | "tn" | "ts" | "tw" | "ty" | "ug" | "uk" | "ur" | "uz" | "ve" | "vi" | "vo" | "wa" | "wo" | "xh" | "yi" | "yo" | "za" | "zh" | "zu" | "AA" | "AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TA" | "TC" | "TD" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW")[];
|
|
6
|
-
export type Bcp47Code = (typeof bcp47Codes)[number];
|
|
7
|
-
export type Iso6391Code = (typeof iso6391Codes)[number];
|
|
8
|
-
export type CountryCode = (typeof countryCodes)[number];
|
|
9
|
-
export type DisplayNameCode = (typeof displayNamesCodes)[number];
|
|
10
|
-
export type DisplayNamesOptions = Omit<Intl.DisplayNamesOptions, 'type'> & {
|
|
11
|
-
type?: 'region' | 'language';
|
|
12
|
-
};
|
|
13
|
-
interface DynamicDisplayNamesOptions {
|
|
14
|
-
/**
|
|
15
|
-
* The type of display names to use.
|
|
16
|
-
* @property 'region' | 'language'
|
|
17
|
-
* @default 'region'
|
|
18
|
-
*/
|
|
19
|
-
type?: MaybeRefOrGetter<DisplayNamesOptions['type']>;
|
|
20
|
-
/**
|
|
21
|
-
* The language display to use.
|
|
22
|
-
* @property 'standard' | 'narrow' | 'short'
|
|
23
|
-
* @default 'standard'
|
|
24
|
-
*/
|
|
25
|
-
languageDisplay?: MaybeRefOrGetter<DisplayNamesOptions['languageDisplay']>;
|
|
26
|
-
/**
|
|
27
|
-
* The fallback to use.
|
|
28
|
-
* @property 'code' | 'none'
|
|
29
|
-
* @default 'code'
|
|
30
|
-
*/
|
|
31
|
-
fallback?: MaybeRefOrGetter<DisplayNamesOptions['fallback']>;
|
|
32
|
-
/**
|
|
33
|
-
* The style to use.
|
|
34
|
-
* @property 'long' | 'short' | 'narrow'
|
|
35
|
-
* @default 'long'
|
|
36
|
-
*/
|
|
37
|
-
style?: MaybeRefOrGetter<DisplayNamesOptions['style']>;
|
|
38
|
-
/**
|
|
39
|
-
* The locale matcher to use.
|
|
40
|
-
* @property 'lookup' | 'best fit'
|
|
41
|
-
* @default 'lookup'
|
|
42
|
-
*/
|
|
43
|
-
localeMatcher?: MaybeRefOrGetter<DisplayNamesOptions['localeMatcher']>;
|
|
44
|
-
}
|
|
45
|
-
type GetDisplayNameOptions = MaybeRefOrGetter<{
|
|
46
|
-
locale?: MaybeRefOrGetter<DisplayNameCode | string>;
|
|
47
|
-
} & DynamicDisplayNamesOptions>;
|
|
48
|
-
export type CodesType = 'iso' | 'bcp' | 'country' | 'all';
|
|
49
|
-
declare function getDisplayName(code: MaybeRefOrGetter<DisplayNameCode | string>, options?: GetDisplayNameOptions): import('vue').ComputedRef<string | undefined>;
|
|
50
|
-
type GetAllDisplayNamesOptions<T extends CodesType> = MaybeRefOrGetter<{
|
|
51
|
-
/**
|
|
52
|
-
* The locale to use.
|
|
53
|
-
* @property string | DisplayNameCode
|
|
54
|
-
* @default undefined
|
|
55
|
-
*/
|
|
56
|
-
locale?: MaybeRefOrGetter<DisplayNameCode | string>;
|
|
57
|
-
/**
|
|
58
|
-
* The codes to include.
|
|
59
|
-
* @property string[] | undefined
|
|
60
|
-
* @default undefined
|
|
61
|
-
*/
|
|
62
|
-
onlyCodes?: MaybeRefOrGetter<DisplayNameCode[] | string[] | undefined>;
|
|
63
|
-
/**
|
|
64
|
-
* The codes to exclude.
|
|
65
|
-
* @property string[] | undefined
|
|
66
|
-
* @default undefined
|
|
67
|
-
*/
|
|
68
|
-
excludedCodes?: MaybeRefOrGetter<DisplayNameCode[] | string[] | undefined>;
|
|
69
|
-
/**
|
|
70
|
-
* The codes to prefer.
|
|
71
|
-
* @property string[] | undefined
|
|
72
|
-
* @default undefined
|
|
73
|
-
*/
|
|
74
|
-
preferredCodes?: MaybeRefOrGetter<DisplayNameCode[] | string[] | undefined>;
|
|
75
|
-
/**
|
|
76
|
-
* The type of codes to use.
|
|
77
|
-
* @property 'iso' | 'bcp' | 'country' | 'all'
|
|
78
|
-
* @default 'all'
|
|
79
|
-
*/
|
|
80
|
-
codesType?: MaybeRefOrGetter<T>;
|
|
81
|
-
/**
|
|
82
|
-
* Remove duplicates from the result.
|
|
83
|
-
* @property 'name' | 'code' | false
|
|
84
|
-
* @default 'name'
|
|
85
|
-
*/
|
|
86
|
-
removeDuplicates?: MaybeRefOrGetter<'name' | 'code' | false>;
|
|
87
|
-
/**
|
|
88
|
-
* Remove unmatched codes from the result.
|
|
89
|
-
* @default true
|
|
90
|
-
*/
|
|
91
|
-
removeUnmatched?: MaybeRefOrGetter<boolean>;
|
|
92
|
-
} & DynamicDisplayNamesOptions>;
|
|
93
|
-
type CodeResult<T extends CodesType> = T extends 'iso' ? Iso6391Code : T extends 'bcp' ? Bcp47Code : T extends 'country' ? CountryCode : DisplayNameCode | string;
|
|
94
|
-
export declare function useDisplayNames(mainLocale?: MaybeRefOrGetter<string | DisplayNameCode>): {
|
|
95
|
-
getDisplayName: (code: Parameters<typeof getDisplayName>[0], options?: GetDisplayNameOptions) => import('vue').ComputedRef<string | undefined>;
|
|
96
|
-
getAllDisplayNames: <T extends CodesType>(options?: GetAllDisplayNamesOptions<T>) => import('vue').ComputedRef<{
|
|
97
|
-
name: string;
|
|
98
|
-
code: CodeResult<T>;
|
|
99
|
-
}[] | undefined>;
|
|
100
|
-
};
|
|
101
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { MaybeRef, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
-
export interface UseDropzoneReturn {
|
|
3
|
-
files: Ref<File[] | null>;
|
|
4
|
-
isOverDropZone: Ref<boolean>;
|
|
5
|
-
isOverError: Ref<boolean>;
|
|
6
|
-
}
|
|
7
|
-
export interface UseDropzoneOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Allowed data types, if not set, all data types are allowed.
|
|
10
|
-
* Also can be a function to check the data types.
|
|
11
|
-
*/
|
|
12
|
-
dataTypes?: MaybeRef<string[]> | ((types: readonly string[]) => boolean);
|
|
13
|
-
onDrop?: (files: File[] | null, event: DragEvent) => unknown;
|
|
14
|
-
onEnter?: (files: File[] | null, event: DragEvent) => unknown;
|
|
15
|
-
onLeave?: (files: File[] | null, event: DragEvent) => unknown;
|
|
16
|
-
onOver?: (files: File[] | null, event: DragEvent) => unknown;
|
|
17
|
-
onError?: (files: File[] | null, event: DragEvent) => unknown;
|
|
18
|
-
/**
|
|
19
|
-
* Allow multiple files to be dropped. Defaults to true.
|
|
20
|
-
*/
|
|
21
|
-
multiple?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Prevent default behavior for unhandled events. Defaults to false.
|
|
24
|
-
*/
|
|
25
|
-
preventDefaultForUnhandled?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export declare function useDropzone(target: MaybeRefOrGetter<HTMLElement | null | undefined>, options?: UseDropzoneOptions | UseDropzoneOptions['onDrop']): UseDropzoneReturn;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseFormPayload, ExtractModelKey, FormFieldOptions, FormSchema } from './useFormValidator/types';
|
|
2
|
-
export declare function useFormField<FieldType, Model extends BaseFormPayload = BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>(name: ModelKey, options?: FormFieldOptions<Model, ModelKey, FieldType>): {
|
|
3
|
-
hasError: import('vue').ComputedRef<boolean>;
|
|
4
|
-
errors: import('vue').ComputedRef<import('./useFormValidator/types').ValidationIssues>;
|
|
5
|
-
errorMessage: import('vue').ComputedRef<Record<ModelKey, string | undefined>[ModelKey]>;
|
|
6
|
-
isValid: import('vue').ComputedRef<boolean>;
|
|
7
|
-
isDirty: import('vue').ComputedRef<boolean>;
|
|
8
|
-
isBlurred: import('vue').ComputedRef<boolean>;
|
|
9
|
-
isValidated: import('vue').ComputedRef<boolean>;
|
|
10
|
-
isValidating: import('vue').ComputedRef<boolean>;
|
|
11
|
-
mode: import('vue').ComputedRef<"blur" | "eager" | "lazy" | "aggressive" | "progressive" | undefined>;
|
|
12
|
-
value: import('vue').WritableComputedRef<FieldType, FieldType>;
|
|
13
|
-
validationEvents: import('vue').ComputedRef<{
|
|
14
|
-
onBlur: () => void;
|
|
15
|
-
} | undefined>;
|
|
16
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BaseFormPayload, ExtractModelKey, FormSchema, StrictOptions } from './types';
|
|
2
|
-
export declare const CONFIG: {
|
|
3
|
-
mode: StrictOptions<BaseFormPayload, ExtractModelKey<FormSchema<BaseFormPayload>>>['mode'];
|
|
4
|
-
scrollToErrorSelector: string;
|
|
5
|
-
debounceTime: number;
|
|
6
|
-
throttleTime: number;
|
|
7
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { BaseFormPayload, ExtractModelKey, FieldState, FormSchema, StrictOptions } from './types';
|
|
2
|
-
export declare function scrollToError(selector?: string): void;
|
|
3
|
-
export declare function findInteractiveElements(el: HTMLElement): HTMLElement[];
|
|
4
|
-
export declare function addEventToInteractiveElements({ interactiveElements, onBlur, mode, }: {
|
|
5
|
-
interactiveElements: HTMLElement[];
|
|
6
|
-
onBlur: () => void;
|
|
7
|
-
mode: StrictOptions<BaseFormPayload, ExtractModelKey<FormSchema<BaseFormPayload>>>['mode'];
|
|
8
|
-
}): void;
|
|
9
|
-
export declare function removeEventFromInteractiveElements({ interactiveElements, onBlur, }: {
|
|
10
|
-
interactiveElements: HTMLElement[];
|
|
11
|
-
onBlur: () => void;
|
|
12
|
-
}): void;
|
|
13
|
-
export declare function getValidationEvents<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>>, F extends FieldState<Model, ModelKey, Model[ModelKey]>>({ hasRef, fieldState, onBlur, }: {
|
|
14
|
-
hasRef?: boolean;
|
|
15
|
-
fieldState: F;
|
|
16
|
-
onBlur: () => void;
|
|
17
|
-
}): {
|
|
18
|
-
onBlur: () => void;
|
|
19
|
-
} | undefined;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { InjectionKey } from 'vue';
|
|
2
|
-
import { BaseFormPayload, CustomInstance, ExtractModelKey, FieldsStates, FieldState, FormContext, FormFieldOptions, FormSchema, StrictOptions } from './types';
|
|
3
|
-
export declare function getFieldState<Model extends BaseFormPayload = BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>, FieldType = Model[ModelKey]>({ name, schema, initialValue, fieldState, options, }: {
|
|
4
|
-
name: ModelKey;
|
|
5
|
-
schema?: FormSchema<Model>;
|
|
6
|
-
initialValue?: FieldType;
|
|
7
|
-
fieldState: FieldState<Model, ModelKey, FieldType>;
|
|
8
|
-
options?: Pick<StrictOptions<Model, ModelKey>, 'debouncedFields' | 'throttledFields' | 'mode'>;
|
|
9
|
-
}): FieldState<Model, ModelKey, FieldType>;
|
|
10
|
-
export declare function fieldHasValidation<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>>>(field: ModelKey, schema: FormSchema<Model>): boolean;
|
|
11
|
-
export declare function getFieldsStates<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ schema, payload, options, }: {
|
|
12
|
-
schema: FormSchema<Model>;
|
|
13
|
-
payload: Partial<Model>;
|
|
14
|
-
options: StrictOptions<Model, ModelKey>;
|
|
15
|
-
}): FieldsStates<Model, ModelKey>;
|
|
16
|
-
export declare function updateFieldsStates<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ fieldsStates, payload, schema, options, updateMode, }: {
|
|
17
|
-
fieldsStates: FieldsStates<Model, ModelKey>;
|
|
18
|
-
payload: Model;
|
|
19
|
-
schema: FormSchema<Model>;
|
|
20
|
-
options: StrictOptions<Model, ModelKey>;
|
|
21
|
-
updateMode?: boolean;
|
|
22
|
-
}): void;
|
|
23
|
-
export declare function updateFieldState<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>, FieldType = Model[ModelKey]>({ name, fieldState, payload, schema, options, updateMode, }: {
|
|
24
|
-
name: ModelKey;
|
|
25
|
-
fieldState: FieldState<Model, ModelKey, FieldType>;
|
|
26
|
-
payload: Model;
|
|
27
|
-
schema: FormSchema<Model>;
|
|
28
|
-
options: FormFieldOptions<Model, ModelKey, FieldType> & StrictOptions<Model, ModelKey>;
|
|
29
|
-
updateMode?: boolean;
|
|
30
|
-
}): {
|
|
31
|
-
blurred: boolean;
|
|
32
|
-
dirty: boolean;
|
|
33
|
-
error: boolean;
|
|
34
|
-
errors: import('./types').ValidationIssues;
|
|
35
|
-
valid: boolean;
|
|
36
|
-
validating: boolean;
|
|
37
|
-
validated: boolean;
|
|
38
|
-
validateFunction: ((args_0: {
|
|
39
|
-
name: ModelKey;
|
|
40
|
-
fieldState: FieldState<Model, ModelKey, Model[ModelKey]>;
|
|
41
|
-
schema: FormSchema<Model>;
|
|
42
|
-
payload: Model;
|
|
43
|
-
setError?: boolean;
|
|
44
|
-
setErrorIfInvalidAndNotEmpty?: boolean;
|
|
45
|
-
}) => Promise<void>) | undefined;
|
|
46
|
-
initialValue: Readonly<FieldType> | undefined;
|
|
47
|
-
mode: "blur" | "eager" | "lazy" | "aggressive" | "progressive" | undefined;
|
|
48
|
-
};
|
|
49
|
-
export declare function canExecuteValidation<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>, FieldType = Model[ModelKey]>({ eventName, fieldState, isSubmitted, }: {
|
|
50
|
-
eventName: 'blur' | 'input';
|
|
51
|
-
fieldState: FieldState<Model, ModelKey, FieldType>;
|
|
52
|
-
isSubmitted: boolean;
|
|
53
|
-
}): boolean;
|
|
54
|
-
export declare function handleFieldBlur<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>, FieldType = Model[ModelKey]>({ name, force, payload, fieldState, schema, isSubmitted, }: {
|
|
55
|
-
name: ModelKey;
|
|
56
|
-
payload: Model;
|
|
57
|
-
fieldState: FieldState<Model, ModelKey, FieldType>;
|
|
58
|
-
schema: FormSchema<Model>;
|
|
59
|
-
isSubmitted: boolean;
|
|
60
|
-
force?: boolean;
|
|
61
|
-
}): Promise<void> | undefined;
|
|
62
|
-
export declare function handleFieldInput<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>, FieldType = Model[ModelKey]>({ name, payload, fieldState, schema, isSubmitted, forceValidation, }: {
|
|
63
|
-
name: ModelKey;
|
|
64
|
-
payload: Model;
|
|
65
|
-
fieldState: FieldState<Model, ModelKey, FieldType>;
|
|
66
|
-
schema: FormSchema<Model>;
|
|
67
|
-
isSubmitted: boolean;
|
|
68
|
-
forceValidation?: boolean;
|
|
69
|
-
}): Promise<void> | undefined;
|
|
70
|
-
export declare function hasModeIncludes<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>(modes: StrictOptions<Model, ModelKey>['mode'][], value?: StrictOptions<Model, ModelKey>['mode']): value is StrictOptions<Model, ModelKey>['mode'];
|
|
71
|
-
export declare function getInstance<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>(composableName: string): CustomInstance<Model, ModelKey>;
|
|
72
|
-
export declare function getContext<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>(identifier: string | symbol | InjectionKey<FormContext<Model, ModelKey>>, composableName: string): FormContext<Model, ModelKey>;
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { BaseIssue, BaseSchema, BaseSchemaAsync, InferInput, InferIssue, InferOutput, objectAsync } from 'valibot';
|
|
2
|
-
import { ComponentInternalInstance, InjectionKey, Ref, TemplateRef } from 'vue';
|
|
3
|
-
import { getValidateFunction } from './validation';
|
|
4
|
-
export type Validation = BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>;
|
|
5
|
-
export type ValidationIssues = InferIssue<Validation>[];
|
|
6
|
-
export type ExtractModelKey<T> = Extract<keyof T, string>;
|
|
7
|
-
export type FormSchema<Model extends BaseFormPayload> = {
|
|
8
|
-
[K in Extract<keyof Model, string> as Model[K] extends Required<Model>[K] ? K : never]: Validation;
|
|
9
|
-
} & {
|
|
10
|
-
[K in Extract<keyof Model, string> as Model[K] extends Required<Model>[K] ? never : K]?: Validation;
|
|
11
|
-
};
|
|
12
|
-
export type CustomInstance<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>>> = ComponentInternalInstance & {
|
|
13
|
-
formContexts?: Map<string | symbol | InjectionKey<FormContext<Model, ModelKey>>, FormContext<Model, ModelKey>>;
|
|
14
|
-
};
|
|
15
|
-
export interface FormValidatorOptions<Model extends BaseFormPayload = BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>> {
|
|
16
|
-
/**
|
|
17
|
-
* Validation mode
|
|
18
|
-
* - lazy: validate on input value change
|
|
19
|
-
* - aggressive: validate all fields immediately on form creation and on input value change
|
|
20
|
-
* - blur: validate on blur
|
|
21
|
-
* - eager: validate on blur at first (only if the field is not empty) and then on input value change
|
|
22
|
-
* - progressive: field becomes valid after the first validation and then validate on input value change. If invalid validate on blur.
|
|
23
|
-
* @default 'lazy'
|
|
24
|
-
*/
|
|
25
|
-
mode?: 'eager' | 'lazy' | 'aggressive' | 'blur' | 'progressive';
|
|
26
|
-
/**
|
|
27
|
-
* Fields to validate with throttling
|
|
28
|
-
* Useful for fields that require a network request to avoid spamming the server
|
|
29
|
-
* @example { name: 1000 } or { name: true } for the default throttle time (1000ms)
|
|
30
|
-
*/
|
|
31
|
-
throttledFields?: Partial<Record<ModelKey, number | true>> | null;
|
|
32
|
-
/**
|
|
33
|
-
* Fields to validate with debouncing
|
|
34
|
-
* Useful to wait for the user to finish typing before validating
|
|
35
|
-
* Useful for fields that require a network request to avoid spamming the server
|
|
36
|
-
* @example { name: 300 } or { name: true } for the default debounce time (300ms)
|
|
37
|
-
*/
|
|
38
|
-
debouncedFields?: Partial<Record<ModelKey, number | true>> | null;
|
|
39
|
-
/**
|
|
40
|
-
* Scroll to the first error found
|
|
41
|
-
* @default '.has-field-error'
|
|
42
|
-
*/
|
|
43
|
-
scrollToError?: string | false;
|
|
44
|
-
/**
|
|
45
|
-
* Identifier to use for the form
|
|
46
|
-
* Useful to have multiple forms on the same page
|
|
47
|
-
* @default `main-form-validator`
|
|
48
|
-
*/
|
|
49
|
-
identifier?: string | symbol;
|
|
50
|
-
}
|
|
51
|
-
export type StrictOptions<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>>> = Required<FormValidatorOptions<Model, ModelKey>>;
|
|
52
|
-
export interface FormContext<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>>> {
|
|
53
|
-
fieldsStates: Ref<FieldsStates<Model, ModelKey>>;
|
|
54
|
-
options: StrictOptions<Model, ModelKey>;
|
|
55
|
-
internalSchema: Ref<FormSchema<Model>>;
|
|
56
|
-
payload: Ref<Model>;
|
|
57
|
-
errorMessages: Ref<Record<ModelKey, string | undefined>>;
|
|
58
|
-
isSubmitted: Ref<boolean>;
|
|
59
|
-
}
|
|
60
|
-
export interface FieldState<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>>, FieldType = Model[ModelKey]> {
|
|
61
|
-
blurred: boolean;
|
|
62
|
-
dirty: boolean;
|
|
63
|
-
error: boolean;
|
|
64
|
-
errors: ValidationIssues;
|
|
65
|
-
valid: boolean;
|
|
66
|
-
initialValue?: Readonly<FieldType>;
|
|
67
|
-
validating: boolean;
|
|
68
|
-
validated: boolean;
|
|
69
|
-
validateFunction: ReturnType<typeof getValidateFunction<Model, ModelKey>>;
|
|
70
|
-
mode?: StrictOptions<Model, ModelKey>['mode'];
|
|
71
|
-
}
|
|
72
|
-
export type FieldsStates<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>>> = Record<ModelKey, FieldState<Model, ModelKey, Model[ModelKey]>>;
|
|
73
|
-
export type BaseFormPayload = Record<string, any>;
|
|
74
|
-
export interface FormFieldOptions<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>>, FieldType> {
|
|
75
|
-
/**
|
|
76
|
-
* Default value of the field
|
|
77
|
-
* @default undefined
|
|
78
|
-
*/
|
|
79
|
-
defaultValue?: FieldType;
|
|
80
|
-
/**
|
|
81
|
-
* Validation mode
|
|
82
|
-
* To override the form validation mode
|
|
83
|
-
*/
|
|
84
|
-
mode?: StrictOptions<Model, ModelKey>['mode'];
|
|
85
|
-
/**
|
|
86
|
-
* Reference to the component or HTML element to associate and trigger validation events
|
|
87
|
-
* Necessary for 'eager', 'progressive' and 'blur' validation modes
|
|
88
|
-
*/
|
|
89
|
-
ref?: Ref | TemplateRef;
|
|
90
|
-
/**
|
|
91
|
-
* Identifier for the form
|
|
92
|
-
* Useful when you have multiple forms on the same component
|
|
93
|
-
* Should be the same as the one used in `useFormValidator`
|
|
94
|
-
*/
|
|
95
|
-
formIdentifier?: string | symbol;
|
|
96
|
-
}
|
|
97
|
-
export type InferSchemaFormValidator<T> = T extends Ref<infer U> ? U extends FormSchema<BaseFormPayload> ? Partial<InferInput<ReturnType<typeof objectAsync<U>>>> : never : T extends (...args: any[]) => FormSchema<BaseFormPayload> ? Partial<InferInput<ReturnType<typeof objectAsync<ReturnType<T>>>>> : T extends FormSchema<BaseFormPayload> ? Partial<InferInput<ReturnType<typeof objectAsync<T>>>> : never;
|
|
98
|
-
export type InferOutputSchemaFormValidator<T> = T extends Ref<infer U> ? U extends FormSchema<BaseFormPayload> ? InferOutput<ReturnType<typeof objectAsync<U>>> : never : T extends (...args: any[]) => FormSchema<BaseFormPayload> ? InferOutput<ReturnType<typeof objectAsync<ReturnType<T>>>> : T extends FormSchema<BaseFormPayload> ? InferOutput<ReturnType<typeof objectAsync<T>>> : never;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { BaseFormPayload, ExtractModelKey, FieldsStates, FieldState, FormSchema, StrictOptions, ValidationIssues } from './types';
|
|
2
|
-
export declare function isEmptyValue(value: unknown): value is null | undefined | '';
|
|
3
|
-
export declare function getValibotValidationMethod<MethodName extends keyof typeof import('valibot')>(methodName: MethodName): Promise<(typeof import('valibot'))[MethodName]>;
|
|
4
|
-
export declare function getValidationSchema<Model extends BaseFormPayload>(formSchema: FormSchema<Model>): Promise<import('valibot').ObjectSchemaAsync<FormSchema<Model>, undefined>>;
|
|
5
|
-
export declare function getFieldValidationResult<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>>>(name: ModelKey, schema: FormSchema<Model>, value: Model[ModelKey]): Promise<{
|
|
6
|
-
result: import('valibot').SafeParseResult<FormSchema<Model>[ModelKey]>;
|
|
7
|
-
isValid: boolean;
|
|
8
|
-
}>;
|
|
9
|
-
export declare function setFieldValidationState<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>>>({ name, fieldState, schema, payload, setError, setErrorIfInvalidAndNotEmpty, }: {
|
|
10
|
-
name: ModelKey;
|
|
11
|
-
fieldState: FieldState<Model, ModelKey, Model[ModelKey]>;
|
|
12
|
-
schema: FormSchema<Model>;
|
|
13
|
-
payload: Model;
|
|
14
|
-
setError?: boolean;
|
|
15
|
-
setErrorIfInvalidAndNotEmpty?: boolean;
|
|
16
|
-
}): Promise<void>;
|
|
17
|
-
export declare function validateForm<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ fieldsStates, payload, setErrors, schema, }: {
|
|
18
|
-
fieldsStates: FieldsStates<Model, ExtractModelKey<FormSchema<Model>>>;
|
|
19
|
-
setErrors?: boolean;
|
|
20
|
-
payload: Model;
|
|
21
|
-
schema: FormSchema<Model>;
|
|
22
|
-
}): Promise<void[]>;
|
|
23
|
-
export declare function getErrorMessages<Model extends BaseFormPayload = BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>(errors: Record<ModelKey, ValidationIssues>, fieldsStates: FieldsStates<Model, ExtractModelKey<FormSchema<Model>>>): Record<ModelKey, string | undefined>;
|
|
24
|
-
export declare function getFieldsErrors<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>(fieldsStates: FieldsStates<Model, ExtractModelKey<FormSchema<Model>>>): Record<ModelKey, ValidationIssues>;
|
|
25
|
-
export declare function getValidateFunction<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ name, hasValidation, debouncedFields, throttledFields, }: {
|
|
26
|
-
name: ModelKey;
|
|
27
|
-
hasValidation: boolean;
|
|
28
|
-
debouncedFields?: StrictOptions<Model, ModelKey>['debouncedFields'];
|
|
29
|
-
throttledFields?: StrictOptions<Model, ModelKey>['throttledFields'];
|
|
30
|
-
}): ((args_0: {
|
|
31
|
-
name: ModelKey;
|
|
32
|
-
fieldState: FieldState<Model, ModelKey, Model[ModelKey]>;
|
|
33
|
-
schema: FormSchema<Model>;
|
|
34
|
-
payload: Model;
|
|
35
|
-
setError?: boolean;
|
|
36
|
-
setErrorIfInvalidAndNotEmpty?: boolean;
|
|
37
|
-
}) => Promise<void>) | undefined;
|