maz-ui 4.1.8-beta.1 → 4.1.8-beta.2
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/components/MazAccordion.vue.d.ts +36 -0
- package/dist/components/MazAnimatedCounter.vue.d.ts +59 -0
- package/dist/components/MazAnimatedElement.vue.d.ts +44 -0
- package/dist/components/MazAnimatedText.vue.d.ts +57 -0
- package/dist/components/MazAvatar.vue.d.ts +99 -0
- package/dist/components/MazBackdrop.vue.d.ts +91 -0
- package/dist/components/MazBadge.vue.d.ts +61 -0
- package/dist/components/MazBottomSheet.vue.d.ts +35 -0
- package/dist/components/MazBtn.vue.d.ts +105 -0
- package/dist/components/MazCard.vue.d.ts +81 -0
- package/dist/components/MazCardSpotlight.vue.d.ts +57 -0
- package/dist/components/MazCarousel.vue.d.ts +48 -0
- package/dist/components/MazChart.vue.d.ts +53 -0
- package/dist/components/MazCheckbox.vue.d.ts +55 -0
- package/dist/components/MazChecklist.vue.d.ts +87 -0
- package/dist/components/MazCircularProgressBar.vue.d.ts +106 -0
- package/dist/components/MazDatePicker/MazPickerCalendar.vue.d.ts +28 -0
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +20 -0
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +133 -0
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +142 -0
- package/dist/components/MazDatePicker/MazPickerCalendarSwitcher.vue.d.ts +42 -0
- package/dist/components/MazDatePicker/MazPickerContainer.vue.d.ts +38 -0
- package/dist/components/MazDatePicker/MazPickerHeader.vue.d.ts +15 -0
- package/dist/components/MazDatePicker/MazPickerMonthSwitcher.vue.d.ts +44 -0
- package/dist/components/MazDatePicker/MazPickerShortcuts.vue.d.ts +16 -0
- package/dist/components/MazDatePicker/MazPickerTime.vue.d.ts +107 -0
- package/dist/components/MazDatePicker/MazPickerYearSwitcher.vue.d.ts +36 -0
- package/dist/components/MazDatePicker/types.d.ts +14 -0
- package/dist/components/MazDatePicker/utils.d.ts +61 -0
- package/dist/components/MazDatePicker.vue.d.ts +567 -0
- package/dist/components/MazDialog.vue.d.ts +247 -0
- package/dist/components/MazDialogConfirm/useMazDialogConfirm.d.ts +47 -0
- package/dist/components/MazDialogConfirm.vue.d.ts +270 -0
- package/dist/components/MazDrawer.vue.d.ts +52 -0
- package/dist/components/MazDropdown.vue.d.ts +246 -0
- package/dist/components/MazDropzone.vue.d.ts +294 -0
- package/dist/components/MazExpandAnimation.vue.d.ts +44 -0
- package/dist/components/MazFullscreenLoader.vue.d.ts +26 -0
- package/dist/components/MazGallery.vue.d.ts +85 -0
- package/dist/components/MazIcon.vue.d.ts +33 -0
- package/dist/components/MazInput.vue.d.ts +225 -0
- package/dist/components/MazInputCode.vue.d.ts +49 -0
- package/dist/components/MazInputNumber.vue.d.ts +125 -0
- package/dist/components/MazInputPhoneNumber/PhoneInput.vue.d.ts +29 -0
- package/dist/components/MazInputPhoneNumber/useLibphonenumber.d.ts +26 -0
- package/dist/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +26 -0
- package/dist/components/MazInputPhoneNumber.vue.d.ts +421 -0
- package/dist/components/MazInputPrice.vue.d.ts +48 -0
- package/dist/components/MazInputTags.vue.d.ts +51 -0
- package/dist/components/MazLazyImg.vue.d.ts +78 -0
- package/dist/components/MazLink.vue.d.ts +116 -0
- package/dist/components/MazLoadingBar.vue.d.ts +12 -0
- package/dist/components/MazPagination.vue.d.ts +83 -0
- package/dist/components/MazPopover.vue.d.ts +258 -0
- package/dist/components/MazPullToRefresh.vue.d.ts +52 -0
- package/dist/components/MazRadio.vue.d.ts +55 -0
- package/dist/components/MazRadioButtons.vue.d.ts +74 -0
- package/dist/components/MazReadingProgressBar.vue.d.ts +55 -0
- package/dist/components/MazSelect.vue.d.ts +209 -0
- package/dist/components/MazSelectCountry.vue.d.ts +171 -0
- package/dist/components/MazSlider/utils.d.ts +15 -0
- package/dist/components/MazSlider.vue.d.ts +31 -0
- package/dist/components/MazSpinner.vue.d.ts +15 -0
- package/dist/components/MazStepper.vue.d.ts +60 -0
- package/dist/components/MazSwitch.vue.d.ts +69 -0
- package/dist/components/MazTable.vue.d.ts +324 -0
- package/dist/components/MazTableCell.vue.d.ts +17 -0
- package/dist/components/MazTableRow.vue.d.ts +23 -0
- package/dist/components/MazTableTitle.vue.d.ts +17 -0
- package/dist/components/MazTabs.vue.d.ts +30 -0
- package/dist/components/MazTabsBar.vue.d.ts +96 -0
- package/dist/components/MazTabsContent.vue.d.ts +17 -0
- package/dist/components/MazTabsContentItem.vue.d.ts +31 -0
- package/dist/components/MazTextarea.vue.d.ts +88 -0
- package/dist/components/constantes.d.ts +2 -0
- package/dist/components/index.d.ts +109 -0
- package/dist/components/types.d.ts +4 -0
- package/dist/composables/index.d.ts +22 -0
- package/dist/composables/useAos.d.ts +2 -0
- package/dist/composables/useBreakpoints.d.ts +38 -0
- package/dist/composables/useDialog.d.ts +2 -0
- package/dist/composables/useDisplayNames.d.ts +101 -0
- package/dist/composables/useDropzone.d.ts +27 -0
- package/dist/composables/useFormField.d.ts +16 -0
- package/dist/composables/useFormValidator/config.d.ts +7 -0
- package/dist/composables/useFormValidator/dom-events.d.ts +19 -0
- package/dist/composables/useFormValidator/state-management.d.ts +72 -0
- package/dist/composables/useFormValidator/types.d.ts +98 -0
- package/dist/composables/useFormValidator/validation.d.ts +37 -0
- package/dist/composables/useFormValidator.d.ts +23 -0
- package/dist/composables/useFreezeValue.d.ts +5 -0
- package/dist/composables/useIdleTimeout.d.ts +5 -0
- package/dist/composables/useInjectStrict.d.ts +2 -0
- package/dist/composables/useInstanceUniqId.d.ts +4 -0
- package/dist/composables/useMountComponent.d.ts +14 -0
- package/dist/composables/useMutationObserver.d.ts +13 -0
- package/dist/composables/useReadingTime.d.ts +25 -0
- package/dist/composables/useStringMatching.d.ts +5 -0
- package/dist/composables/useSwipe.d.ts +14 -0
- package/dist/composables/useTimer.d.ts +30 -0
- package/dist/composables/useToast.d.ts +22 -0
- package/dist/composables/useUserVisibility.d.ts +5 -0
- package/dist/composables/useWait.d.ts +2 -0
- package/dist/composables/useWindowSize.d.ts +32 -0
- package/dist/directives/index.d.ts +5 -0
- package/dist/directives/vClickOutside.d.ts +36 -0
- package/dist/directives/vFullscreenImg/MazFullscreenImg.vue.d.ts +50 -0
- package/dist/directives/vFullscreenImg/fullscreen-img.directive.d.ts +5 -0
- package/dist/directives/vFullscreenImg/fullscreen-img.handler.d.ts +36 -0
- package/dist/directives/vFullscreenImg.d.ts +11 -0
- package/dist/directives/vLazyImg/lazy-img.directive.d.ts +5 -0
- package/dist/directives/vLazyImg/lazy-img.handler.d.ts +38 -0
- package/dist/directives/vLazyImg/types.d.ts +29 -0
- package/dist/directives/vLazyImg.d.ts +12 -0
- package/dist/directives/vTooltip.d.ts +54 -0
- package/dist/directives/vZoomImg/style.d.ts +1 -0
- package/dist/directives/vZoomImg/svgs.d.ts +3 -0
- package/dist/directives/vZoomImg/zoom-img.directive.d.ts +8 -0
- package/dist/directives/vZoomImg/zoom-img.handler.d.ts +46 -0
- package/dist/directives/vZoomImg.d.ts +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/plugins/aos.d.ts +81 -0
- package/dist/plugins/dialog/DialogHandler.d.ts +16 -0
- package/dist/plugins/dialog.d.ts +26 -0
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/maz-ui.d.ts +43 -0
- package/dist/plugins/toast/MazToast.vue.d.ts +34 -0
- package/dist/plugins/toast/ToastHandler.d.ts +29 -0
- package/dist/plugins/toast/types.d.ts +104 -0
- package/dist/plugins/toast.d.ts +25 -0
- package/dist/plugins/wait.d.ts +33 -0
- package/dist/resolvers/MazComponentsResolver.d.ts +10 -0
- package/dist/resolvers/MazDirectivesResolver.d.ts +11 -0
- package/dist/resolvers/MazModulesResolver.d.ts +11 -0
- package/dist/resolvers/index.d.ts +3 -0
- package/dist/tailwindcss/index.d.ts +6 -0
- package/dist/tailwindcss/tailwind.config.d.ts +89 -0
- package/dist/tailwindcss/utils/colors.d.ts +7 -0
- package/dist/tailwindcss/variables/breakpoints.d.ts +15 -0
- package/dist/tailwindcss/variables/colors.d.ts +21 -0
- package/dist/tailwindcss/variables/design-tokens.d.ts +35 -0
- package/dist/tailwindcss/variables/utilities.d.ts +17 -0
- package/dist/tailwindcss/variables/z-indexes.d.ts +14 -0
- package/package.json +2 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IconComponent } from '@maz-ui/icons';
|
|
2
|
+
declare const predefinedSizes: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
3
|
+
type SizeUnit = `${number}px` | `${number}em` | `${number}rem` | `${number}%` | `${number}vw` | `${number}vh` | `${number}cm` | `${number}mm` | `${number}in` | `${number}pt` | `${number}pc` | `${number}ex`;
|
|
4
|
+
type PredefinedSize = typeof predefinedSizes[number];
|
|
5
|
+
type MazIconSize = SizeUnit | PredefinedSize;
|
|
6
|
+
export interface MazIconProps {
|
|
7
|
+
/** The icon component to render - e.g: `import { MazStar } from '@maz-ui/icons'` */
|
|
8
|
+
icon?: IconComponent;
|
|
9
|
+
/** The source path of the SVG file - e.g: `/icons/home.svg` */
|
|
10
|
+
src?: string;
|
|
11
|
+
/** The path of the folder where the SVG files are stored - e.g: `/icons` */
|
|
12
|
+
path?: string;
|
|
13
|
+
/** The name of the SVG file - e.g: `home` */
|
|
14
|
+
name?: string;
|
|
15
|
+
/** The size of the SVG file - e.g: `1em` or can be a predefined size: `'xs' | 'sm' | 'md' | 'lg' | 'xl'` */
|
|
16
|
+
size?: MazIconSize;
|
|
17
|
+
/** The title of the SVG file - e.g: `Home` */
|
|
18
|
+
title?: string;
|
|
19
|
+
/** The function to transform the source of the SVG file - e.g: `(svg) => svg` */
|
|
20
|
+
transformSource?: (svg: SVGElement) => SVGElement;
|
|
21
|
+
}
|
|
22
|
+
declare const _default: import('vue').DefineComponent<MazIconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
23
|
+
error: (error: Error) => any;
|
|
24
|
+
loaded: (svg: SVGElement | undefined) => any;
|
|
25
|
+
unloaded: () => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<MazIconProps> & Readonly<{
|
|
27
|
+
onError?: ((error: Error) => any) | undefined;
|
|
28
|
+
onLoaded?: ((svg: SVGElement | undefined) => any) | undefined;
|
|
29
|
+
onUnloaded?: (() => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
31
|
+
svgElem: SVGSVGElement;
|
|
32
|
+
}, any>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { IconComponent } from '@maz-ui/icons';
|
|
2
|
+
import { HTMLAttributes, InputHTMLAttributes } from 'vue';
|
|
3
|
+
import { MazColor, MazSize } from './types';
|
|
4
|
+
export type MazInputValue = string | number | null | undefined | boolean;
|
|
5
|
+
export interface MazInputProps<T = MazInputValue> {
|
|
6
|
+
/**
|
|
7
|
+
* Inline styles to apply to the component root element
|
|
8
|
+
* @type {HTMLAttributes['style']}
|
|
9
|
+
*/
|
|
10
|
+
style?: HTMLAttributes['style'];
|
|
11
|
+
/**
|
|
12
|
+
* CSS classes to apply to the component root element
|
|
13
|
+
* @type {HTMLAttributes['class']}
|
|
14
|
+
*/
|
|
15
|
+
class?: HTMLAttributes['class'];
|
|
16
|
+
/**
|
|
17
|
+
* The current value of the input field. This prop is used for two-way data binding with v-model
|
|
18
|
+
* @model
|
|
19
|
+
* @type {T}
|
|
20
|
+
* @example <MazInput v-model="inputValue" />
|
|
21
|
+
*/
|
|
22
|
+
modelValue?: T | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Text displayed when the input is empty to guide the user
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @example "Enter your email address"
|
|
27
|
+
*/
|
|
28
|
+
placeholder?: InputHTMLAttributes['placeholder'];
|
|
29
|
+
/**
|
|
30
|
+
* Floating label that appears inside the input and moves up when focused or filled.
|
|
31
|
+
* Provides better UX than traditional placeholders
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @example "Email Address"
|
|
34
|
+
*/
|
|
35
|
+
label?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Static label displayed above the input field. Unlike the floating label, this remains fixed
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @example "User Information"
|
|
40
|
+
*/
|
|
41
|
+
topLabel?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Helper text displayed below the input to provide additional context or validation feedback
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @example "Must contain at least 8 characters"
|
|
46
|
+
*/
|
|
47
|
+
assistiveText?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Theme color that affects the border and focus states of the input
|
|
50
|
+
* @values primary, secondary, accent, info, success, warning, destructive, contrast
|
|
51
|
+
* @type {MazColor}
|
|
52
|
+
* @example "primary"
|
|
53
|
+
*/
|
|
54
|
+
color?: MazColor;
|
|
55
|
+
/**
|
|
56
|
+
* HTML input type attribute that determines the input behavior and validation
|
|
57
|
+
* @type {InputHTMLAttributes['type']}
|
|
58
|
+
* @values text, password, email, number, tel, url, search, date, time, datetime-local, month, week
|
|
59
|
+
* @example "email"
|
|
60
|
+
*/
|
|
61
|
+
type?: InputHTMLAttributes['type'];
|
|
62
|
+
/**
|
|
63
|
+
* Makes the input field mandatory for form submission
|
|
64
|
+
* @type {boolean}
|
|
65
|
+
* @example true
|
|
66
|
+
*/
|
|
67
|
+
required?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Disables the input field, preventing user interaction and form submission
|
|
70
|
+
* @type {boolean}
|
|
71
|
+
* @example false
|
|
72
|
+
*/
|
|
73
|
+
disabled?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Makes the input field read-only, allowing selection but preventing modification
|
|
76
|
+
* @type {boolean}
|
|
77
|
+
* @example false
|
|
78
|
+
*/
|
|
79
|
+
readonly?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Unique identifier for the input element, used for form labels and accessibility
|
|
82
|
+
* @type {string}
|
|
83
|
+
* @example "user-email"
|
|
84
|
+
*/
|
|
85
|
+
id?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Applies error styling (red border and text) to indicate validation failure
|
|
88
|
+
* @type {boolean}
|
|
89
|
+
* @example true
|
|
90
|
+
*/
|
|
91
|
+
error?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Applies success styling (green border and text) to indicate successful validation
|
|
94
|
+
* @type {boolean}
|
|
95
|
+
* @example true
|
|
96
|
+
*/
|
|
97
|
+
success?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Applies warning styling (orange border and text) to indicate potential issues
|
|
100
|
+
* @type {boolean}
|
|
101
|
+
* @example true
|
|
102
|
+
*/
|
|
103
|
+
warning?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Alternative text that replaces the label when provided. Useful for contextual hints
|
|
106
|
+
* @type {string}
|
|
107
|
+
* @example "Optional field"
|
|
108
|
+
*/
|
|
109
|
+
hint?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Additional CSS classes to apply specifically to the input wrapper element
|
|
112
|
+
* @type {string}
|
|
113
|
+
* @example "custom-input-wrapper"
|
|
114
|
+
*/
|
|
115
|
+
inputClasses?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Controls whether the input has a visible border. Set to false for borderless inputs
|
|
118
|
+
* @type {boolean}
|
|
119
|
+
* @example true
|
|
120
|
+
*/
|
|
121
|
+
border?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* HTML inputmode attribute that provides hints for virtual keyboards on mobile devices
|
|
124
|
+
* @type {InputHTMLAttributes['inputmode']}
|
|
125
|
+
* @values text, numeric, decimal, tel, search, email, url
|
|
126
|
+
* @example "numeric"
|
|
127
|
+
*/
|
|
128
|
+
inputmode?: InputHTMLAttributes['inputmode'];
|
|
129
|
+
/**
|
|
130
|
+
* Controls the height and text size of the input component
|
|
131
|
+
* @values xs, sm, md, lg, xl, mini
|
|
132
|
+
* @type {MazSize}
|
|
133
|
+
* @example "md"
|
|
134
|
+
*/
|
|
135
|
+
size?: MazSize;
|
|
136
|
+
/**
|
|
137
|
+
* Enables input debouncing to limit the frequency of value updates.
|
|
138
|
+
* When true, uses 500ms delay. When a number, uses that value as delay in milliseconds
|
|
139
|
+
* @type {boolean | number}
|
|
140
|
+
* @example true
|
|
141
|
+
* @example 300
|
|
142
|
+
*/
|
|
143
|
+
debounce?: boolean | number;
|
|
144
|
+
/**
|
|
145
|
+
* Automatically focuses the input when the component mounts
|
|
146
|
+
* @type {boolean}
|
|
147
|
+
* @example false
|
|
148
|
+
*/
|
|
149
|
+
autoFocus?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* When true, shows the colored border immediately instead of only on focus
|
|
152
|
+
* @type {boolean}
|
|
153
|
+
* @example false
|
|
154
|
+
*/
|
|
155
|
+
borderActive?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Icon displayed on the left side of the input. Can be an icon name string or icon component
|
|
158
|
+
* @type {string | IconComponent}
|
|
159
|
+
* @example "user"
|
|
160
|
+
* @example UserIcon
|
|
161
|
+
*/
|
|
162
|
+
leftIcon?: string | IconComponent;
|
|
163
|
+
/**
|
|
164
|
+
* Icon displayed on the right side of the input. Can be an icon name string or icon component
|
|
165
|
+
* @type {string | IconComponent}
|
|
166
|
+
* @example "search"
|
|
167
|
+
* @example SearchIcon
|
|
168
|
+
*/
|
|
169
|
+
rightIcon?: string | IconComponent;
|
|
170
|
+
/**
|
|
171
|
+
* Controls the border radius of the input component
|
|
172
|
+
* @values none, sm, md, lg, xl, full
|
|
173
|
+
* @type {'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full'}
|
|
174
|
+
* @example "lg"
|
|
175
|
+
*/
|
|
176
|
+
roundedSize?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
177
|
+
/**
|
|
178
|
+
* Makes the input expand to the full width of its container
|
|
179
|
+
* @type {boolean}
|
|
180
|
+
* @example false
|
|
181
|
+
*/
|
|
182
|
+
block?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* The name of the input field. Used for form submission and validation
|
|
185
|
+
* @type {string}
|
|
186
|
+
* @example "email"
|
|
187
|
+
*/
|
|
188
|
+
name?: string;
|
|
189
|
+
/**
|
|
190
|
+
* The autocomplete attribute for the input field. Used for form submission and validation
|
|
191
|
+
* @type {string}
|
|
192
|
+
* @example "email"
|
|
193
|
+
*/
|
|
194
|
+
autocomplete?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Loading state for the input field. Used to show a loading spinner
|
|
197
|
+
* @note Spinner can be replace with the `loader` slot
|
|
198
|
+
* @default false
|
|
199
|
+
*/
|
|
200
|
+
loading?: boolean;
|
|
201
|
+
}
|
|
202
|
+
declare const _default: <T extends MazInputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
203
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
204
|
+
readonly onBlur?: ((event: Event) => any) | undefined;
|
|
205
|
+
readonly onChange?: ((event: Event) => any) | undefined;
|
|
206
|
+
readonly onClick?: ((event: Event) => any) | undefined;
|
|
207
|
+
readonly onFocus?: ((event: Event) => any) | undefined;
|
|
208
|
+
readonly onInput?: ((event: Event) => any) | undefined;
|
|
209
|
+
readonly "onUpdate:model-value"?: ((value?: T | undefined) => any) | undefined;
|
|
210
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onInput" | "onClick" | "onUpdate:model-value"> & MazInputProps<T> & Partial<{}>> & import('vue').PublicProps;
|
|
211
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
212
|
+
attrs: any;
|
|
213
|
+
slots: {
|
|
214
|
+
'left-icon'?(_: {}): any;
|
|
215
|
+
'right-icon'?(_: {}): any;
|
|
216
|
+
loader?(_: {}): any;
|
|
217
|
+
};
|
|
218
|
+
emit: ((evt: "blur", event: Event) => void) & ((evt: "change", event: Event) => void) & ((evt: "click", event: Event) => void) & ((evt: "focus", event: Event) => void) & ((evt: "input", event: Event) => void) & ((evt: "update:model-value", value?: T | undefined) => void);
|
|
219
|
+
}>) => import('vue').VNode & {
|
|
220
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
221
|
+
};
|
|
222
|
+
export default _default;
|
|
223
|
+
type __VLS_PrettifyLocal<T> = {
|
|
224
|
+
[K in keyof T]: T[K];
|
|
225
|
+
} & {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { MazColor } from './types';
|
|
3
|
+
export type MazInputCodeSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export interface MazInputCodeProps<T = string | number> {
|
|
5
|
+
/** The style of the component. */
|
|
6
|
+
style?: HTMLAttributes['style'];
|
|
7
|
+
/** The class of the component. */
|
|
8
|
+
class?: HTMLAttributes['class'];
|
|
9
|
+
/** The value of the component (v-model). */
|
|
10
|
+
modelValue?: T;
|
|
11
|
+
/** The length of the code. */
|
|
12
|
+
codeLength?: number;
|
|
13
|
+
/** The type of the input field. */
|
|
14
|
+
type?: 'text' | 'number';
|
|
15
|
+
/** Whether to accept alpha characters. */
|
|
16
|
+
acceptAlpha?: boolean;
|
|
17
|
+
/** Whether the input is required. */
|
|
18
|
+
required?: boolean;
|
|
19
|
+
/** Whether the input is disabled. */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Whether there is an error with the input. */
|
|
22
|
+
error?: boolean;
|
|
23
|
+
/** Whether the input is successful. */
|
|
24
|
+
success?: boolean;
|
|
25
|
+
/** Whether there is a warning with the input. */
|
|
26
|
+
warning?: boolean;
|
|
27
|
+
/** The size of the component. */
|
|
28
|
+
size?: MazInputCodeSize;
|
|
29
|
+
/** The color of the component. */
|
|
30
|
+
color?: MazColor;
|
|
31
|
+
/** The hint text to display below the input. */
|
|
32
|
+
hint?: string;
|
|
33
|
+
}
|
|
34
|
+
declare const _default: <T extends string | number>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
35
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
36
|
+
readonly "onUpdate:model-value"?: ((value?: T | undefined) => any) | undefined;
|
|
37
|
+
readonly onCompleted?: ((value?: void | undefined) => any) | undefined;
|
|
38
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:model-value" | "onCompleted"> & MazInputCodeProps<T> & Partial<{}>> & import('vue').PublicProps;
|
|
39
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
40
|
+
attrs: any;
|
|
41
|
+
slots: {};
|
|
42
|
+
emit: ((evt: "update:model-value", value?: T | undefined) => void) & ((evt: "completed", value: void) => void);
|
|
43
|
+
}>) => import('vue').VNode & {
|
|
44
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
45
|
+
};
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_PrettifyLocal<T> = {
|
|
48
|
+
[K in keyof T]: T[K];
|
|
49
|
+
} & {};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { MazInputProps } from './MazInput.vue';
|
|
3
|
+
import { MazSize } from './types';
|
|
4
|
+
export interface MazInputNumberProps {
|
|
5
|
+
/**
|
|
6
|
+
* The inline style object for the component.
|
|
7
|
+
* @type {HTMLAttributes['style']}
|
|
8
|
+
*/
|
|
9
|
+
style?: HTMLAttributes['style'];
|
|
10
|
+
/**
|
|
11
|
+
* The CSS class name for the component.
|
|
12
|
+
* @type {HTMLAttributes['class']}
|
|
13
|
+
*/
|
|
14
|
+
class?: HTMLAttributes['class'];
|
|
15
|
+
/**
|
|
16
|
+
* The value of the component (v-model).
|
|
17
|
+
* @model
|
|
18
|
+
* @type {number}
|
|
19
|
+
*/
|
|
20
|
+
modelValue?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the input number is disabled or not.
|
|
23
|
+
* @type {boolean}
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The maximum value allowed for the input number.
|
|
28
|
+
* @type {number}
|
|
29
|
+
* @default Number.POSITIVE_INFINITY
|
|
30
|
+
*/
|
|
31
|
+
max?: number;
|
|
32
|
+
/**
|
|
33
|
+
* The minimum value allowed for the input number.
|
|
34
|
+
* @type {number}
|
|
35
|
+
* @default Number.NEGATIVE_INFINITY
|
|
36
|
+
*/
|
|
37
|
+
min?: number;
|
|
38
|
+
/**
|
|
39
|
+
* The step value for incrementing or decrementing the input number.
|
|
40
|
+
* @type {number}
|
|
41
|
+
* @default 1
|
|
42
|
+
*/
|
|
43
|
+
step?: number;
|
|
44
|
+
/**
|
|
45
|
+
* The size of the input number component.
|
|
46
|
+
* @type {MazSize}
|
|
47
|
+
* @default 'md'
|
|
48
|
+
*/
|
|
49
|
+
size?: MazSize;
|
|
50
|
+
/**
|
|
51
|
+
* Whether to hide the increment and decrement buttons or not.
|
|
52
|
+
* @type {boolean}
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
hideButtons?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether to center the text inside the input or not.
|
|
58
|
+
* @type {boolean}
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
textCenter?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* The inputmode attribute for the input.
|
|
64
|
+
* @type {HTMLAttributes['inputmode']}
|
|
65
|
+
*/
|
|
66
|
+
inputmode?: HTMLAttributes['inputmode'];
|
|
67
|
+
/**
|
|
68
|
+
* The input will be displayed in full width
|
|
69
|
+
* @type {boolean}
|
|
70
|
+
*/
|
|
71
|
+
block?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Will display the input in error state.
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
error?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* The hint text to display below the input.
|
|
80
|
+
* @type {string}
|
|
81
|
+
*/
|
|
82
|
+
hint?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Will display the input in success state.
|
|
85
|
+
* @type {boolean}
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
88
|
+
success?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Will display the input in warning state.
|
|
91
|
+
* @type {boolean}
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
warning?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* The props for the input component.
|
|
97
|
+
* @type {MazInputProps}
|
|
98
|
+
*/
|
|
99
|
+
inputProps?: MazInputProps;
|
|
100
|
+
}
|
|
101
|
+
declare const _default: import('vue').DefineComponent<MazInputNumberProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
102
|
+
blur: (value: Event) => any;
|
|
103
|
+
change: (value: Event) => any;
|
|
104
|
+
click: (value: Event) => any;
|
|
105
|
+
focus: (value: Event) => any;
|
|
106
|
+
"update:model-value": (value?: number | undefined) => any;
|
|
107
|
+
}, string, import('vue').PublicProps, Readonly<MazInputNumberProps> & Readonly<{
|
|
108
|
+
onBlur?: ((value: Event) => any) | undefined;
|
|
109
|
+
onChange?: ((value: Event) => any) | undefined;
|
|
110
|
+
onClick?: ((value: Event) => any) | undefined;
|
|
111
|
+
onFocus?: ((value: Event) => any) | undefined;
|
|
112
|
+
"onUpdate:model-value"?: ((value?: number | undefined) => any) | undefined;
|
|
113
|
+
}>, {
|
|
114
|
+
size: MazSize;
|
|
115
|
+
style: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
116
|
+
class: HTMLAttributes["class"];
|
|
117
|
+
disabled: boolean;
|
|
118
|
+
max: number;
|
|
119
|
+
min: number;
|
|
120
|
+
modelValue: number;
|
|
121
|
+
step: number;
|
|
122
|
+
inputmode: "search" | "text" | "none" | "decimal" | "email" | "url" | "tel" | "numeric";
|
|
123
|
+
textCenter: boolean;
|
|
124
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
125
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MazInputProps } from '../MazInput.vue';
|
|
2
|
+
type PhoneInputProps = Omit<MazInputProps, 'modelValue'> & {
|
|
3
|
+
id: string;
|
|
4
|
+
locales: {
|
|
5
|
+
placeholder: string;
|
|
6
|
+
example: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
example: boolean;
|
|
9
|
+
hasRadius: boolean;
|
|
10
|
+
autoFormat: 'blur' | 'typing' | 'disabled' | false;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_Props = PhoneInputProps;
|
|
13
|
+
type __VLS_PublicProps = {
|
|
14
|
+
modelValue?: string | undefined | null;
|
|
15
|
+
} & __VLS_Props;
|
|
16
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
17
|
+
/**
|
|
18
|
+
* Focus the input
|
|
19
|
+
* @description This is used to focus the input
|
|
20
|
+
*/
|
|
21
|
+
focus: () => void;
|
|
22
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
+
"update:modelValue": (value: string | null | undefined) => any;
|
|
24
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
25
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
27
|
+
input: import('vue').ShallowUnwrapRef<{}> | null;
|
|
28
|
+
}, any>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CountryCode, Examples, getCountries, getCountryCallingCode } from 'libphonenumber-js';
|
|
2
|
+
import { MazInputPhoneNumberData } from '../MazInputPhoneNumber.vue';
|
|
3
|
+
declare function isCountryAvailable(locale: string): boolean;
|
|
4
|
+
declare function getPhoneNumberResults({ phoneNumber, countryCode, checkCountryCode, }: {
|
|
5
|
+
phoneNumber?: string | undefined | null;
|
|
6
|
+
countryCode?: CountryCode | undefined | null;
|
|
7
|
+
checkCountryCode?: boolean;
|
|
8
|
+
}): MazInputPhoneNumberData;
|
|
9
|
+
declare function getPhoneNumberExamplesFile(): Promise<Examples>;
|
|
10
|
+
declare function getPhoneNumberExample(countryCode?: CountryCode | undefined | null): string | undefined;
|
|
11
|
+
declare function getAsYouTypeFormat(countryCode?: CountryCode | undefined | null, phoneNumber?: string | undefined | null): string | undefined | null;
|
|
12
|
+
declare function isSameCountryCallingCode(countryCode: CountryCode, countryCode2: CountryCode): boolean;
|
|
13
|
+
declare function loadExamples(): Promise<void>;
|
|
14
|
+
export declare function useLibphonenumber(): {
|
|
15
|
+
examples: import('vue').Ref<Examples | undefined, Examples | undefined>;
|
|
16
|
+
getAsYouTypeFormat: typeof getAsYouTypeFormat;
|
|
17
|
+
getPhoneNumberResults: typeof getPhoneNumberResults;
|
|
18
|
+
getPhoneNumberExamplesFile: typeof getPhoneNumberExamplesFile;
|
|
19
|
+
getPhoneNumberExample: typeof getPhoneNumberExample;
|
|
20
|
+
isSameCountryCallingCode: typeof isSameCountryCallingCode;
|
|
21
|
+
isCountryAvailable: typeof isCountryAvailable;
|
|
22
|
+
getCountries: typeof getCountries;
|
|
23
|
+
getCountryCallingCode: typeof getCountryCallingCode;
|
|
24
|
+
loadExamples: typeof loadExamples;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CountryCode } from 'libphonenumber-js';
|
|
2
|
+
export interface CountryOption {
|
|
3
|
+
code: CountryCode;
|
|
4
|
+
dialCode: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
declare function getBrowserLocale(): {
|
|
8
|
+
locale: string;
|
|
9
|
+
browserLocale: string;
|
|
10
|
+
} | undefined;
|
|
11
|
+
declare function getCountryList(locale?: string, customCountriesNameListByIsoCode?: Record<CountryCode, string>): CountryOption[] | undefined;
|
|
12
|
+
declare function fetchCountryCode(): Promise<{
|
|
13
|
+
data: CountryCode;
|
|
14
|
+
error: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
data: undefined;
|
|
17
|
+
error: Error;
|
|
18
|
+
}>;
|
|
19
|
+
declare function sanitizePhoneNumber(input?: string | undefined | null): string;
|
|
20
|
+
export declare function useMazInputPhoneNumber(): {
|
|
21
|
+
fetchCountryCode: typeof fetchCountryCode;
|
|
22
|
+
getBrowserLocale: typeof getBrowserLocale;
|
|
23
|
+
getCountryList: typeof getCountryList;
|
|
24
|
+
sanitizePhoneNumber: typeof sanitizePhoneNumber;
|
|
25
|
+
};
|
|
26
|
+
export {};
|