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,421 @@
|
|
|
1
|
+
import { MazUiTranslationsNestedSchema } from '@maz-ui/translations';
|
|
2
|
+
import { CountryCallingCode, CountryCode, NationalNumber, NumberType } from 'libphonenumber-js';
|
|
3
|
+
import { HTMLAttributes } from 'vue';
|
|
4
|
+
import { MazPopoverProps } from './MazPopover.vue';
|
|
5
|
+
import { MazColor, MazSize } from './types';
|
|
6
|
+
export interface MazInputPhoneNumberData {
|
|
7
|
+
isValid: boolean;
|
|
8
|
+
isPossible?: boolean;
|
|
9
|
+
countryCode?: CountryCode | undefined | null;
|
|
10
|
+
parsedCountryCode?: CountryCode | undefined | null;
|
|
11
|
+
countryCallingCode?: CountryCallingCode;
|
|
12
|
+
nationalNumber?: NationalNumber;
|
|
13
|
+
type?: NumberType;
|
|
14
|
+
formatInternational?: string;
|
|
15
|
+
formatNational?: string;
|
|
16
|
+
uri?: string;
|
|
17
|
+
e164?: string;
|
|
18
|
+
rfc3966?: string;
|
|
19
|
+
possibleCountries?: CountryCode[];
|
|
20
|
+
phoneNumber?: string | undefined | null;
|
|
21
|
+
}
|
|
22
|
+
export interface MazInputPhoneNumberProps {
|
|
23
|
+
/**
|
|
24
|
+
* Style attribut of the component root element
|
|
25
|
+
* @type {HTMLAttributes['style']}
|
|
26
|
+
*/
|
|
27
|
+
style?: HTMLAttributes['style'];
|
|
28
|
+
/**
|
|
29
|
+
* Class attribut of the component root element
|
|
30
|
+
* @type {HTMLAttributes['class']}
|
|
31
|
+
*/
|
|
32
|
+
class?: HTMLAttributes['class'];
|
|
33
|
+
/**
|
|
34
|
+
* The current value of the input field in international format (e.g. +33612345678)
|
|
35
|
+
* @model
|
|
36
|
+
* @type {string | undefined | null}
|
|
37
|
+
* @example "+33612345678"
|
|
38
|
+
*/
|
|
39
|
+
modelValue?: string | undefined | null;
|
|
40
|
+
/**
|
|
41
|
+
* The selected country code (e.g. "FR")
|
|
42
|
+
* @model
|
|
43
|
+
* @type {CountryCode | undefined | null}
|
|
44
|
+
* @example "FR"
|
|
45
|
+
*/
|
|
46
|
+
countryCode?: CountryCode | undefined | null;
|
|
47
|
+
/**
|
|
48
|
+
* Unique identifier for the component
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @example "phone-input-1"
|
|
51
|
+
*/
|
|
52
|
+
id?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Text displayed when the input is empty
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @example "Enter your phone number"
|
|
57
|
+
*/
|
|
58
|
+
placeholder?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Label displayed above the input
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @example "Phone Number"
|
|
63
|
+
*/
|
|
64
|
+
label?: string;
|
|
65
|
+
/**
|
|
66
|
+
* List of country codes to place first in the select list
|
|
67
|
+
* @type {CountryCode[]}
|
|
68
|
+
* @example ["FR", "BE", "GE"]
|
|
69
|
+
*/
|
|
70
|
+
preferredCountries?: CountryCode[];
|
|
71
|
+
/**
|
|
72
|
+
* List of country codes to be removed from the select list
|
|
73
|
+
* @type {CountryCode[]}
|
|
74
|
+
* @example ["FR", "BE", "GE"]
|
|
75
|
+
*/
|
|
76
|
+
ignoredCountries?: CountryCode[];
|
|
77
|
+
/**
|
|
78
|
+
* List of country codes to only have the countries selected in the select list
|
|
79
|
+
* @type {CountryCode[]}
|
|
80
|
+
* @example ["FR", "BE", "GE"]
|
|
81
|
+
*/
|
|
82
|
+
onlyCountries?: CountryCode[];
|
|
83
|
+
/**
|
|
84
|
+
* Locale strings of the component
|
|
85
|
+
* The default values are the translations of the MazUiTranslations plugin
|
|
86
|
+
* @type {Partial<MazUiTranslationsNestedSchema['inputPhoneNumber']>}
|
|
87
|
+
* @default {
|
|
88
|
+
* countrySelect: {
|
|
89
|
+
* error: 'Choose country',
|
|
90
|
+
* placeholder: 'Country code',
|
|
91
|
+
* searchPlaceholder: 'Search the country',
|
|
92
|
+
* },
|
|
93
|
+
* phoneInput: {
|
|
94
|
+
* placeholder: 'Phone number',
|
|
95
|
+
* example: 'Example: {example}',
|
|
96
|
+
* },
|
|
97
|
+
* }
|
|
98
|
+
*/
|
|
99
|
+
translations?: Partial<MazUiTranslationsNestedSchema['inputPhoneNumber']>;
|
|
100
|
+
/**
|
|
101
|
+
* Position where the list of countries will be opened
|
|
102
|
+
* @type {MazPopoverProps['position']}
|
|
103
|
+
* @values top left, top right, bottom left, bottom right
|
|
104
|
+
* @default "bottom left"
|
|
105
|
+
*/
|
|
106
|
+
listPosition?: MazPopoverProps['position'];
|
|
107
|
+
/**
|
|
108
|
+
* Component color applied
|
|
109
|
+
* @type {MazColor}
|
|
110
|
+
* @values primary, secondary, accent, info, success, warning, destructive, contrast
|
|
111
|
+
* @default "primary"
|
|
112
|
+
*/
|
|
113
|
+
color?: MazColor;
|
|
114
|
+
/**
|
|
115
|
+
* Component size applied
|
|
116
|
+
* @type {MazSize}
|
|
117
|
+
* @values xs, sm, md, lg, xl, mini
|
|
118
|
+
* @default "md"
|
|
119
|
+
*/
|
|
120
|
+
size?: MazSize;
|
|
121
|
+
/**
|
|
122
|
+
* Remove flags in country list
|
|
123
|
+
* @default false
|
|
124
|
+
*/
|
|
125
|
+
hideFlags?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Disable input
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
disabled?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Show the phone number example
|
|
133
|
+
* @default true
|
|
134
|
+
*/
|
|
135
|
+
example?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Disable search input in country list
|
|
138
|
+
* @default true
|
|
139
|
+
*/
|
|
140
|
+
search?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Threshold of the search input in country list where 1 is a perfect match and 0 is a match with any character
|
|
143
|
+
* @type {number}
|
|
144
|
+
* @default 0.75
|
|
145
|
+
*/
|
|
146
|
+
searchThreshold?: number;
|
|
147
|
+
/**
|
|
148
|
+
* If true, the browser locale will be used
|
|
149
|
+
* @default true
|
|
150
|
+
*/
|
|
151
|
+
useBrowserLocale?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* The component will make a request (https://ipwho.is) to get the location of the user and use it to set the default country code
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
fetchCountry?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Hide the country selector
|
|
159
|
+
* @default false
|
|
160
|
+
*/
|
|
161
|
+
hideCountrySelect?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Show country calling code in the country list
|
|
164
|
+
* @default false
|
|
165
|
+
*/
|
|
166
|
+
showCodeInList?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Replace country names
|
|
169
|
+
* @type {Record<CountryCode, string>}
|
|
170
|
+
*/
|
|
171
|
+
customCountriesList?: Record<CountryCode, string>;
|
|
172
|
+
/**
|
|
173
|
+
* Disabled auto-format when phone is valid
|
|
174
|
+
* @default 'blur'
|
|
175
|
+
*/
|
|
176
|
+
autoFormat?: 'blur' | 'typing' | 'disabled' | false;
|
|
177
|
+
/**
|
|
178
|
+
* Locale of country list
|
|
179
|
+
* @example "fr-FR"
|
|
180
|
+
*/
|
|
181
|
+
countryLocale?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Disable validation error UI
|
|
184
|
+
* @default true
|
|
185
|
+
*/
|
|
186
|
+
validationError?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Disable validation success UI
|
|
189
|
+
* @default true
|
|
190
|
+
*/
|
|
191
|
+
validationSuccess?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Add success UI
|
|
194
|
+
* @default false
|
|
195
|
+
*/
|
|
196
|
+
success?: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Add error UI
|
|
199
|
+
* @default false
|
|
200
|
+
*/
|
|
201
|
+
error?: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Will replace the calling code by the country name in the country selector
|
|
204
|
+
* @default false
|
|
205
|
+
*/
|
|
206
|
+
displayCountryName?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* The input will be displayed in full width
|
|
209
|
+
* @default false
|
|
210
|
+
*/
|
|
211
|
+
block?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Orientation of the inputs in the component
|
|
214
|
+
* @type {'row' | 'col' | 'responsive'}
|
|
215
|
+
* @values row, col, responsive
|
|
216
|
+
* @default "responsive"
|
|
217
|
+
*/
|
|
218
|
+
orientation?: 'row' | 'col' | 'responsive';
|
|
219
|
+
/**
|
|
220
|
+
* Meta attributes of the country input
|
|
221
|
+
* @type {Record<string, unknown>}
|
|
222
|
+
* @default { autocomplete: 'off', name: 'country' }
|
|
223
|
+
*/
|
|
224
|
+
countrySelectAttributes?: Record<string, unknown>;
|
|
225
|
+
/**
|
|
226
|
+
* Meta attributes of the phone number input
|
|
227
|
+
* @type {Record<string, unknown>}
|
|
228
|
+
* @default { autocomplete: 'tel', name: 'phone', inputmode: 'tel' }
|
|
229
|
+
*/
|
|
230
|
+
phoneInputAttributes?: Record<string, unknown> & {
|
|
231
|
+
name: string;
|
|
232
|
+
inputmode: HTMLAttributes['inputmode'];
|
|
233
|
+
autocomplete: string;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
/** Models */
|
|
237
|
+
declare const phoneNumber: import('vue').Ref<string | null | undefined, string | null | undefined>;
|
|
238
|
+
declare const selectedCountry: import('vue').Ref<CountryCode | undefined, CountryCode | undefined>;
|
|
239
|
+
declare const results: import('vue').Ref<{
|
|
240
|
+
isValid: boolean;
|
|
241
|
+
isPossible?: boolean | undefined;
|
|
242
|
+
countryCode?: CountryCode | null | undefined;
|
|
243
|
+
parsedCountryCode?: CountryCode | null | undefined;
|
|
244
|
+
countryCallingCode?: CountryCallingCode | undefined;
|
|
245
|
+
nationalNumber?: NationalNumber | undefined;
|
|
246
|
+
type?: NumberType;
|
|
247
|
+
formatInternational?: string | undefined;
|
|
248
|
+
formatNational?: string | undefined;
|
|
249
|
+
uri?: string | undefined;
|
|
250
|
+
e164?: string | undefined;
|
|
251
|
+
rfc3966?: string | undefined;
|
|
252
|
+
possibleCountries?: CountryCode[] | undefined;
|
|
253
|
+
phoneNumber?: string | undefined | null | undefined;
|
|
254
|
+
}, MazInputPhoneNumberData | {
|
|
255
|
+
isValid: boolean;
|
|
256
|
+
isPossible?: boolean | undefined;
|
|
257
|
+
countryCode?: CountryCode | null | undefined;
|
|
258
|
+
parsedCountryCode?: CountryCode | null | undefined;
|
|
259
|
+
countryCallingCode?: CountryCallingCode | undefined;
|
|
260
|
+
nationalNumber?: NationalNumber | undefined;
|
|
261
|
+
type?: NumberType;
|
|
262
|
+
formatInternational?: string | undefined;
|
|
263
|
+
formatNational?: string | undefined;
|
|
264
|
+
uri?: string | undefined;
|
|
265
|
+
e164?: string | undefined;
|
|
266
|
+
rfc3966?: string | undefined;
|
|
267
|
+
possibleCountries?: CountryCode[] | undefined;
|
|
268
|
+
phoneNumber?: string | undefined | null | undefined;
|
|
269
|
+
}>;
|
|
270
|
+
/** Inject */
|
|
271
|
+
export interface MazInputPhoneNumberInjectedData {
|
|
272
|
+
selectedCountry: typeof selectedCountry;
|
|
273
|
+
phoneNumber: typeof phoneNumber;
|
|
274
|
+
results: typeof results;
|
|
275
|
+
}
|
|
276
|
+
declare function __VLS_template(): {
|
|
277
|
+
attrs: Partial<{}>;
|
|
278
|
+
slots: {
|
|
279
|
+
'no-results'?(_: {}): any;
|
|
280
|
+
'selector-flag'?(_: {
|
|
281
|
+
countryCode: CountryCode | undefined;
|
|
282
|
+
}): any;
|
|
283
|
+
'country-list-flag'?(_: {
|
|
284
|
+
countryCode: CountryCode;
|
|
285
|
+
option: import('./MazInputPhoneNumber/useMazInputPhoneNumber').CountryOption;
|
|
286
|
+
isSelected: boolean;
|
|
287
|
+
}): any;
|
|
288
|
+
};
|
|
289
|
+
refs: {
|
|
290
|
+
PhoneInputRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
291
|
+
modelValue?: string | undefined | null;
|
|
292
|
+
} & Omit<import('./MazInput.vue').MazInputProps<import('./MazInput.vue').MazInputValue>, "modelValue"> & {
|
|
293
|
+
id: string;
|
|
294
|
+
locales: {
|
|
295
|
+
placeholder: string;
|
|
296
|
+
example: string | undefined;
|
|
297
|
+
};
|
|
298
|
+
example: boolean;
|
|
299
|
+
hasRadius: boolean;
|
|
300
|
+
autoFormat: "blur" | "typing" | "disabled" | false;
|
|
301
|
+
}> & Readonly<{
|
|
302
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
303
|
+
}>, {
|
|
304
|
+
focus: () => void;
|
|
305
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
306
|
+
"update:modelValue": (value: string | null | undefined) => any;
|
|
307
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
308
|
+
input: import('vue').ShallowUnwrapRef<{}> | null;
|
|
309
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
310
|
+
P: {};
|
|
311
|
+
B: {};
|
|
312
|
+
D: {};
|
|
313
|
+
C: {};
|
|
314
|
+
M: {};
|
|
315
|
+
Defaults: {};
|
|
316
|
+
}, Readonly<{
|
|
317
|
+
modelValue?: string | undefined | null;
|
|
318
|
+
} & Omit<import('./MazInput.vue').MazInputProps<import('./MazInput.vue').MazInputValue>, "modelValue"> & {
|
|
319
|
+
id: string;
|
|
320
|
+
locales: {
|
|
321
|
+
placeholder: string;
|
|
322
|
+
example: string | undefined;
|
|
323
|
+
};
|
|
324
|
+
example: boolean;
|
|
325
|
+
hasRadius: boolean;
|
|
326
|
+
autoFormat: "blur" | "typing" | "disabled" | false;
|
|
327
|
+
}> & Readonly<{
|
|
328
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
329
|
+
}>, {
|
|
330
|
+
focus: () => void;
|
|
331
|
+
}, {}, {}, {}, {}> | null;
|
|
332
|
+
};
|
|
333
|
+
rootEl: any;
|
|
334
|
+
};
|
|
335
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
336
|
+
declare const __VLS_component: import('vue').DefineComponent<MazInputPhoneNumberProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
337
|
+
data: (results: MazInputPhoneNumberData) => any;
|
|
338
|
+
"update:model-value": (value: string | null | undefined) => any;
|
|
339
|
+
"country-code": (countryCode?: CountryCode | null | undefined) => any;
|
|
340
|
+
"update:country-code": (countryCode?: CountryCode | null | undefined) => any;
|
|
341
|
+
}, string, import('vue').PublicProps, Readonly<MazInputPhoneNumberProps> & Readonly<{
|
|
342
|
+
onData?: ((results: MazInputPhoneNumberData) => any) | undefined;
|
|
343
|
+
"onUpdate:model-value"?: ((value: string | null | undefined) => any) | undefined;
|
|
344
|
+
"onCountry-code"?: ((countryCode?: CountryCode | null | undefined) => any) | undefined;
|
|
345
|
+
"onUpdate:country-code"?: ((countryCode?: CountryCode | null | undefined) => any) | undefined;
|
|
346
|
+
}>, {
|
|
347
|
+
size: MazSize;
|
|
348
|
+
search: boolean;
|
|
349
|
+
color: MazColor;
|
|
350
|
+
disabled: boolean;
|
|
351
|
+
orientation: "row" | "col" | "responsive";
|
|
352
|
+
example: boolean;
|
|
353
|
+
useBrowserLocale: boolean;
|
|
354
|
+
listPosition: import('./MazPopover.vue').MazPopoverPosition;
|
|
355
|
+
searchThreshold: number;
|
|
356
|
+
hideFlags: boolean;
|
|
357
|
+
showCodeInList: boolean;
|
|
358
|
+
autoFormat: "blur" | "typing" | "disabled" | false;
|
|
359
|
+
hideCountrySelect: boolean;
|
|
360
|
+
customCountriesList: Record<CountryCode, string>;
|
|
361
|
+
countryLocale: string;
|
|
362
|
+
validationError: boolean;
|
|
363
|
+
validationSuccess: boolean;
|
|
364
|
+
displayCountryName: boolean;
|
|
365
|
+
countrySelectAttributes: Record<string, unknown>;
|
|
366
|
+
phoneInputAttributes: Record<string, unknown> & {
|
|
367
|
+
name: string;
|
|
368
|
+
inputmode: HTMLAttributes["inputmode"];
|
|
369
|
+
autocomplete: string;
|
|
370
|
+
};
|
|
371
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
372
|
+
PhoneInputRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
373
|
+
modelValue?: string | undefined | null;
|
|
374
|
+
} & Omit<import('./MazInput.vue').MazInputProps<import('./MazInput.vue').MazInputValue>, "modelValue"> & {
|
|
375
|
+
id: string;
|
|
376
|
+
locales: {
|
|
377
|
+
placeholder: string;
|
|
378
|
+
example: string | undefined;
|
|
379
|
+
};
|
|
380
|
+
example: boolean;
|
|
381
|
+
hasRadius: boolean;
|
|
382
|
+
autoFormat: "blur" | "typing" | "disabled" | false;
|
|
383
|
+
}> & Readonly<{
|
|
384
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
385
|
+
}>, {
|
|
386
|
+
focus: () => void;
|
|
387
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
388
|
+
"update:modelValue": (value: string | null | undefined) => any;
|
|
389
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
390
|
+
input: import('vue').ShallowUnwrapRef<{}> | null;
|
|
391
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
392
|
+
P: {};
|
|
393
|
+
B: {};
|
|
394
|
+
D: {};
|
|
395
|
+
C: {};
|
|
396
|
+
M: {};
|
|
397
|
+
Defaults: {};
|
|
398
|
+
}, Readonly<{
|
|
399
|
+
modelValue?: string | undefined | null;
|
|
400
|
+
} & Omit<import('./MazInput.vue').MazInputProps<import('./MazInput.vue').MazInputValue>, "modelValue"> & {
|
|
401
|
+
id: string;
|
|
402
|
+
locales: {
|
|
403
|
+
placeholder: string;
|
|
404
|
+
example: string | undefined;
|
|
405
|
+
};
|
|
406
|
+
example: boolean;
|
|
407
|
+
hasRadius: boolean;
|
|
408
|
+
autoFormat: "blur" | "typing" | "disabled" | false;
|
|
409
|
+
}> & Readonly<{
|
|
410
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
411
|
+
}>, {
|
|
412
|
+
focus: () => void;
|
|
413
|
+
}, {}, {}, {}, {}> | null;
|
|
414
|
+
}, any>;
|
|
415
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
416
|
+
export default _default;
|
|
417
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
418
|
+
new (): {
|
|
419
|
+
$slots: S;
|
|
420
|
+
};
|
|
421
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { FilterCurrencyOptions } from '@maz-ui/utils/helpers/formatCurrency';
|
|
2
|
+
export interface MazInputPriceProps {
|
|
3
|
+
/** @model The value of the input */
|
|
4
|
+
modelValue?: number;
|
|
5
|
+
/** The currency to use */
|
|
6
|
+
currency?: string;
|
|
7
|
+
/** The locale to use */
|
|
8
|
+
locale?: string;
|
|
9
|
+
/** The minimum value that the input can accept */
|
|
10
|
+
min?: number;
|
|
11
|
+
/** The maximum value that the input can accept */
|
|
12
|
+
max?: number;
|
|
13
|
+
/** The input will be displayed without icon */
|
|
14
|
+
noIcon?: boolean;
|
|
15
|
+
/** The input will be displayed in full width */
|
|
16
|
+
block?: boolean;
|
|
17
|
+
/** Will display the input in error state. */
|
|
18
|
+
error?: boolean;
|
|
19
|
+
/** The hint text to display below the input. */
|
|
20
|
+
hint?: string;
|
|
21
|
+
/** Will display the input in success state. */
|
|
22
|
+
success?: boolean;
|
|
23
|
+
/** Will display the input in warning state. */
|
|
24
|
+
warning?: boolean;
|
|
25
|
+
/** Options for the currency helper - [see](https://maz-ui.com/helpers/currency) */
|
|
26
|
+
currencyOptions?: Omit<FilterCurrencyOptions, 'currency'>;
|
|
27
|
+
}
|
|
28
|
+
declare const _default: import('vue').DefineComponent<MazInputPriceProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
+
blur: (value: Event) => any;
|
|
30
|
+
focus: (value: Event) => any;
|
|
31
|
+
input: (value: number | undefined) => any;
|
|
32
|
+
"update:model-value": (value: number | undefined) => any;
|
|
33
|
+
formatted: (value: string | undefined) => any;
|
|
34
|
+
}, string, import('vue').PublicProps, Readonly<MazInputPriceProps> & Readonly<{
|
|
35
|
+
onBlur?: ((value: Event) => any) | undefined;
|
|
36
|
+
onFocus?: ((value: Event) => any) | undefined;
|
|
37
|
+
onInput?: ((value: number | undefined) => any) | undefined;
|
|
38
|
+
"onUpdate:model-value"?: ((value: number | undefined) => any) | undefined;
|
|
39
|
+
onFormatted?: ((value: string | undefined) => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
max: number;
|
|
42
|
+
min: number;
|
|
43
|
+
currency: string;
|
|
44
|
+
locale: string;
|
|
45
|
+
modelValue: number;
|
|
46
|
+
noIcon: boolean;
|
|
47
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
48
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { MazColor, MazSize } from './types';
|
|
3
|
+
export interface MazInputTagsProps {
|
|
4
|
+
/** Style attribut of the component root element */
|
|
5
|
+
style?: HTMLAttributes['style'];
|
|
6
|
+
/** Class attribut of the component root element */
|
|
7
|
+
class?: HTMLAttributes['class'];
|
|
8
|
+
/** @model The modelValue of the input */
|
|
9
|
+
modelValue?: (string | number)[];
|
|
10
|
+
/** The placeholder of the input */
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** The label of the input */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Disable the input */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Display the input with error style */
|
|
17
|
+
error?: boolean;
|
|
18
|
+
/** Display the input with success style */
|
|
19
|
+
success?: boolean;
|
|
20
|
+
/** Display the input with warning style */
|
|
21
|
+
warning?: boolean;
|
|
22
|
+
/** The size of the input */
|
|
23
|
+
size?: MazSize;
|
|
24
|
+
/** The color of the input */
|
|
25
|
+
color?: MazColor;
|
|
26
|
+
/** The input will be displayed in full width */
|
|
27
|
+
block?: boolean;
|
|
28
|
+
/** Add tags on blur */
|
|
29
|
+
addTagsOnBlur?: boolean;
|
|
30
|
+
/** The hint text to display below the input. */
|
|
31
|
+
hint?: string;
|
|
32
|
+
}
|
|
33
|
+
declare const _default: import('vue').DefineComponent<MazInputTagsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
34
|
+
"update:model-value": (value?: (string | number)[] | undefined) => any;
|
|
35
|
+
}, string, import('vue').PublicProps, Readonly<MazInputTagsProps> & Readonly<{
|
|
36
|
+
"onUpdate:model-value"?: ((value?: (string | number)[] | undefined) => any) | undefined;
|
|
37
|
+
}>, {
|
|
38
|
+
error: boolean;
|
|
39
|
+
size: MazSize;
|
|
40
|
+
label: string;
|
|
41
|
+
style: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
42
|
+
class: HTMLAttributes["class"];
|
|
43
|
+
success: boolean;
|
|
44
|
+
warning: boolean;
|
|
45
|
+
color: MazColor;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
placeholder: string;
|
|
48
|
+
modelValue: (string | number)[];
|
|
49
|
+
addTagsOnBlur: boolean;
|
|
50
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
export default _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { VLazyImgOptions } from '../directives/vLazyImg';
|
|
3
|
+
interface Source {
|
|
4
|
+
srcset?: string;
|
|
5
|
+
media?: string;
|
|
6
|
+
}
|
|
7
|
+
interface DataImage {
|
|
8
|
+
sources?: Source[];
|
|
9
|
+
}
|
|
10
|
+
export type MazImage = DataImage | string;
|
|
11
|
+
export interface MazLazyImgProps {
|
|
12
|
+
/** The style of the component */
|
|
13
|
+
style?: HTMLAttributes['style'];
|
|
14
|
+
/** The class of the component */
|
|
15
|
+
class?: HTMLAttributes['class'];
|
|
16
|
+
/**
|
|
17
|
+
* The source of the image
|
|
18
|
+
* @type {string | Image | null}
|
|
19
|
+
*/
|
|
20
|
+
src?: MazImage | null;
|
|
21
|
+
/** The alt of the image */
|
|
22
|
+
alt?: string;
|
|
23
|
+
/** Remove the loader */
|
|
24
|
+
hideLoader?: boolean;
|
|
25
|
+
/** Remove the observer once the image is loaded */
|
|
26
|
+
observerOnce?: boolean;
|
|
27
|
+
/** Remove the observer once the image is loaded */
|
|
28
|
+
loadOnce?: boolean;
|
|
29
|
+
/** Make the image height full */
|
|
30
|
+
imageHeightFull?: boolean;
|
|
31
|
+
/** The options of the observer */
|
|
32
|
+
observerOptions?: VLazyImgOptions['observerOptions'];
|
|
33
|
+
/** The fallback src to replace the src on loading error */
|
|
34
|
+
fallbackSrc?: string;
|
|
35
|
+
/** The classes of the image element */
|
|
36
|
+
imgClass?: HTMLAttributes['class'];
|
|
37
|
+
/** The image will be displayed in full width */
|
|
38
|
+
block?: boolean;
|
|
39
|
+
}
|
|
40
|
+
declare function __VLS_template(): {
|
|
41
|
+
attrs: Partial<{}>;
|
|
42
|
+
slots: {
|
|
43
|
+
default?(_: {}): any;
|
|
44
|
+
};
|
|
45
|
+
refs: {};
|
|
46
|
+
rootEl: any;
|
|
47
|
+
};
|
|
48
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
49
|
+
declare const __VLS_component: import('vue').DefineComponent<MazLazyImgProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
50
|
+
error: (el: Element) => any;
|
|
51
|
+
loaded: (el: Element) => any;
|
|
52
|
+
loading: (el: Element) => any;
|
|
53
|
+
intersecting: (el: Element) => any;
|
|
54
|
+
}, string, import('vue').PublicProps, Readonly<MazLazyImgProps> & Readonly<{
|
|
55
|
+
onError?: ((el: Element) => any) | undefined;
|
|
56
|
+
onLoaded?: ((el: Element) => any) | undefined;
|
|
57
|
+
onLoading?: ((el: Element) => any) | undefined;
|
|
58
|
+
onIntersecting?: ((el: Element) => any) | undefined;
|
|
59
|
+
}>, {
|
|
60
|
+
src: MazImage | null;
|
|
61
|
+
style: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
62
|
+
class: HTMLAttributes["class"];
|
|
63
|
+
alt: string;
|
|
64
|
+
observerOnce: boolean;
|
|
65
|
+
observerOptions: {
|
|
66
|
+
root?: HTMLElement | null;
|
|
67
|
+
threshold: number;
|
|
68
|
+
rootMargin?: string;
|
|
69
|
+
};
|
|
70
|
+
fallbackSrc: string;
|
|
71
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
72
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
73
|
+
export default _default;
|
|
74
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
75
|
+
new (): {
|
|
76
|
+
$slots: S;
|
|
77
|
+
};
|
|
78
|
+
};
|