maz-ui 3.48.1 → 3.48.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +2 -2
- package/components/MazPhoneNumberInput.d.ts +246 -0
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/assets/MazDialog.css +1 -1
- package/components/assets/MazDialogPromise.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/chunks/{MazBtn-Bje1xDu3.mjs → MazBtn-B7cg2yO2.mjs} +2 -2
- package/components/chunks/{MazBtn-DtntHac1.mjs → MazBtn-CuIeT4TK.mjs} +2 -2
- package/components/chunks/{MazBtn-BLSmc1v4.mjs → MazBtn-CvB-Sf2r.mjs} +2 -2
- package/components/chunks/{MazCheckbox-DRltX8fl.mjs → MazCheckbox-DKM-G0Pw.mjs} +1 -1
- package/components/chunks/{MazDialog-BjQ3ivmv.mjs → MazDialog-DQXX2APp.mjs} +2 -2
- package/components/chunks/{MazDialogPromise-Bg3ZOsEI.mjs → MazDialogPromise-CD1d5ig-.mjs} +3 -3
- package/components/chunks/{MazIcon-Cgh-oISK.mjs → MazIcon-BIoDsehI.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-B_f7-FvQ.mjs → MazPhoneNumberInput-ovuoYxd9.mjs} +10 -10
- package/components/chunks/{MazSpinner-PVTrAf5V.mjs → MazSpinner-Bc-lfBcQ.mjs} +1 -1
- package/components/chunks/{MazSpinner-BhfC80rl.mjs → MazSpinner-BqgAfyh1.mjs} +1 -1
- package/components/chunks/{MazSpinner-C47dmUu7.mjs → MazSpinner-Da-bE-KC.mjs} +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/{MazBtn-BLdEX5rQ.cjs → MazBtn-BXg6oosO.cjs} +1 -1
- package/modules/chunks/{MazBtn-UGfo85SW.mjs → MazBtn-DoDAW5pU.mjs} +2 -2
- package/modules/chunks/{MazIcon-BtffTKMx.mjs → MazIcon-0i0FnfM4.mjs} +1 -1
- package/modules/chunks/{MazIcon-BsMEnmqG.cjs → MazIcon-DPvxTNIQ.cjs} +1 -1
- package/modules/chunks/{MazSpinner-B6NPqEic.mjs → MazSpinner-Bkl2lVff.mjs} +1 -1
- package/modules/chunks/{MazSpinner-NhS66fvh.cjs → MazSpinner-n0cEv2AX.cjs} +1 -1
- package/modules/chunks/{index-BfV9dJfR.mjs → index-Dx2ZhWwj.mjs} +5 -5
- package/modules/chunks/{index-D8y62b_9.cjs → index-pV6oqfJc.cjs} +2 -2
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +2 -2
- package/types/components/MazPhoneNumberInput.vue.d.ts +246 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import type { CountryCode } from 'libphonenumber-js';
|
|
2
|
+
import type { Results, Translations } from './MazPhoneNumberInput/types';
|
|
3
|
+
import type { Color, Position, Size } from './types';
|
|
4
|
+
import { type HTMLAttributes } from 'vue';
|
|
5
|
+
export type { Color, CountryCode, Position, Results as Result, Results, Size, Translations };
|
|
6
|
+
export interface Props {
|
|
7
|
+
/** Style attribut of the component root element */
|
|
8
|
+
style?: HTMLAttributes['style'];
|
|
9
|
+
/** Class attribut of the component root element */
|
|
10
|
+
class?: HTMLAttributes['class'];
|
|
11
|
+
/** @model Country calling code + telephone number in international format */
|
|
12
|
+
modelValue?: string | undefined | null;
|
|
13
|
+
/** @deprecated */
|
|
14
|
+
defaultPhoneNumber?: string | undefined | null;
|
|
15
|
+
/** @model Country code selected - Ex: "FR" */
|
|
16
|
+
countryCode?: CountryCode | undefined | null;
|
|
17
|
+
/** @deprecated - use country-code or v-model:country-code */
|
|
18
|
+
defaultCountryCode?: CountryCode | undefined | null;
|
|
19
|
+
/** Id of the component */
|
|
20
|
+
id?: string;
|
|
21
|
+
/** Placeholder of the input */
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
/** label of the input */
|
|
24
|
+
label?: string;
|
|
25
|
+
/** List of country codes to place first in the select list - Ex: ['FR', 'BE', 'GE'] */
|
|
26
|
+
preferredCountries?: CountryCode[];
|
|
27
|
+
/** List of country codes to be removed from the select list - Ex: ['FR', 'BE', 'GE'] */
|
|
28
|
+
ignoredCountries?: CountryCode[];
|
|
29
|
+
/** List of country codes to only have the countries selected in the select list - Ex: ['FR', 'BE', 'GE'] */
|
|
30
|
+
onlyCountries?: CountryCode[];
|
|
31
|
+
/** Locale strings of the component */
|
|
32
|
+
translations?: Partial<Translations>;
|
|
33
|
+
/** Position where the list of countries will be opened */
|
|
34
|
+
listPosition?: Position;
|
|
35
|
+
/** Component color applied - Ex: "secondary" */
|
|
36
|
+
color?: Color;
|
|
37
|
+
/** Component size applied - Ex: "sm" */
|
|
38
|
+
size?: Size;
|
|
39
|
+
/** Remove flags in country list */
|
|
40
|
+
noFlags?: boolean;
|
|
41
|
+
/** Disable input */
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
/** No show the phone number example */
|
|
44
|
+
noExample?: boolean;
|
|
45
|
+
/** Disable search input in country list */
|
|
46
|
+
noSearch?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Threshold of the search input in country list where 1 is a perfect match and 0 is a match with any character
|
|
49
|
+
* @default 0.75
|
|
50
|
+
*/
|
|
51
|
+
searchThreshold?: number;
|
|
52
|
+
/** By default the component use the browser locale to set the default country code if not country code is provided */
|
|
53
|
+
noUseBrowserLocale?: boolean;
|
|
54
|
+
/** 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 */
|
|
55
|
+
fetchCountry?: boolean;
|
|
56
|
+
/** No show the country selector */
|
|
57
|
+
noCountrySelector?: boolean;
|
|
58
|
+
/** Show country calling code in the country list */
|
|
59
|
+
showCodeOnList?: boolean;
|
|
60
|
+
/** Replace country names */
|
|
61
|
+
customCountriesList?: Record<CountryCode, string>;
|
|
62
|
+
/**
|
|
63
|
+
* Disabled auto-format when phone is valid
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
autoFormat?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Disabled auto-format as you type
|
|
69
|
+
* @default false
|
|
70
|
+
* @deprecated use autoFormat instead
|
|
71
|
+
*/
|
|
72
|
+
noFormattingAsYouType?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* locale of country list - Ex: "fr-FR"
|
|
75
|
+
* @default {string} browser locale
|
|
76
|
+
*/
|
|
77
|
+
countryLocale?: string;
|
|
78
|
+
/** Disable validation error UI */
|
|
79
|
+
noValidationError?: boolean;
|
|
80
|
+
/** Disable validation success UI */
|
|
81
|
+
noValidationSuccess?: boolean;
|
|
82
|
+
/** Add success UI */
|
|
83
|
+
success?: boolean;
|
|
84
|
+
/** Add error UI */
|
|
85
|
+
error?: boolean;
|
|
86
|
+
/** Will replace the calling code by the country name in the country selector */
|
|
87
|
+
countrySelectorDisplayName?: boolean;
|
|
88
|
+
/** Choose the width of the country selector */
|
|
89
|
+
countrySelectorWidth?: string;
|
|
90
|
+
/** The input will be displayed in full width */
|
|
91
|
+
block?: boolean;
|
|
92
|
+
/** Exclude selectors to close country selector list - usefull when you using custom flag */
|
|
93
|
+
excludeSelectors?: string[];
|
|
94
|
+
/**
|
|
95
|
+
* Orientation of the inputs in the component
|
|
96
|
+
* @default "responsive"
|
|
97
|
+
* @values "row" | "col" | "responsive"
|
|
98
|
+
*/
|
|
99
|
+
orientation?: 'row' | 'col' | 'responsive';
|
|
100
|
+
/**
|
|
101
|
+
* Meta attributes of the country input
|
|
102
|
+
* @default `{Record<string, unknown>}` `{ autocomplete: 'off', name: 'country' }`
|
|
103
|
+
*/
|
|
104
|
+
countrySelectAttributes?: Record<string, unknown>;
|
|
105
|
+
/**
|
|
106
|
+
* Meta attributes of the phone number input
|
|
107
|
+
* @default `{Record<string, unknown>}` `{ autocomplete: 'tel', name: 'phone', inputmode: 'tel' }`
|
|
108
|
+
*/
|
|
109
|
+
phoneInputAttributes?: Record<string, unknown>;
|
|
110
|
+
}
|
|
111
|
+
/** Models */
|
|
112
|
+
declare const phoneNumber: import("vue").Ref<string | null | undefined, string | null | undefined>;
|
|
113
|
+
declare const selectedCountry: import("vue").Ref<CountryCode | null | undefined, CountryCode | null | undefined>;
|
|
114
|
+
declare const results: import("vue").Ref<{
|
|
115
|
+
isValid: boolean;
|
|
116
|
+
isPossible?: boolean | undefined;
|
|
117
|
+
countryCode?: CountryCode | undefined | null;
|
|
118
|
+
parsedCountryCode?: CountryCode | undefined | null;
|
|
119
|
+
countryCallingCode?: import("libphonenumber-js").CountryCallingCode | undefined;
|
|
120
|
+
nationalNumber?: import("libphonenumber-js").NationalNumber | undefined;
|
|
121
|
+
type?: import("libphonenumber-js").NumberType;
|
|
122
|
+
formatInternational?: string | undefined;
|
|
123
|
+
formatNational?: string | undefined;
|
|
124
|
+
uri?: string | undefined;
|
|
125
|
+
e164?: string | undefined;
|
|
126
|
+
rfc3966?: string | undefined;
|
|
127
|
+
possibleCountries?: CountryCode[] | undefined;
|
|
128
|
+
phoneNumber?: string | undefined | null;
|
|
129
|
+
}, Results | {
|
|
130
|
+
isValid: boolean;
|
|
131
|
+
isPossible?: boolean | undefined;
|
|
132
|
+
countryCode?: CountryCode | undefined | null;
|
|
133
|
+
parsedCountryCode?: CountryCode | undefined | null;
|
|
134
|
+
countryCallingCode?: import("libphonenumber-js").CountryCallingCode | undefined;
|
|
135
|
+
nationalNumber?: import("libphonenumber-js").NationalNumber | undefined;
|
|
136
|
+
type?: import("libphonenumber-js").NumberType;
|
|
137
|
+
formatInternational?: string | undefined;
|
|
138
|
+
formatNational?: string | undefined;
|
|
139
|
+
uri?: string | undefined;
|
|
140
|
+
e164?: string | undefined;
|
|
141
|
+
rfc3966?: string | undefined;
|
|
142
|
+
possibleCountries?: CountryCode[] | undefined;
|
|
143
|
+
phoneNumber?: string | undefined | null;
|
|
144
|
+
}>;
|
|
145
|
+
/** Inject */
|
|
146
|
+
export interface InjectedData {
|
|
147
|
+
selectedCountry: typeof selectedCountry;
|
|
148
|
+
phoneNumber: typeof phoneNumber;
|
|
149
|
+
results: typeof results;
|
|
150
|
+
}
|
|
151
|
+
declare function __VLS_template(): {
|
|
152
|
+
attrs: Partial<{}>;
|
|
153
|
+
slots: {
|
|
154
|
+
"no-results"?(_: {}): any;
|
|
155
|
+
"selector-flag"?(_: {
|
|
156
|
+
countryCode: CountryCode;
|
|
157
|
+
}): any;
|
|
158
|
+
"country-list-flag"?(_: {
|
|
159
|
+
countryCode: import("./types").ModelValueSimple;
|
|
160
|
+
option: import("./MazSelect.vue").NormalizedOption;
|
|
161
|
+
isSelected: boolean;
|
|
162
|
+
}): any;
|
|
163
|
+
};
|
|
164
|
+
refs: {
|
|
165
|
+
PhoneInputRef: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
166
|
+
modelValue?: string | undefined | null;
|
|
167
|
+
} & Omit<import("./MazInput.vue").Props<import("./types").ModelValueSimple>, "modelValue"> & {
|
|
168
|
+
id: string;
|
|
169
|
+
locales: Translations;
|
|
170
|
+
noExample: boolean;
|
|
171
|
+
hasRadius: boolean;
|
|
172
|
+
autoFormat: boolean;
|
|
173
|
+
}> & Readonly<{
|
|
174
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
175
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
176
|
+
"update:modelValue": (value: string | null | undefined) => any;
|
|
177
|
+
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
178
|
+
P: {};
|
|
179
|
+
B: {};
|
|
180
|
+
D: {};
|
|
181
|
+
C: {};
|
|
182
|
+
M: {};
|
|
183
|
+
Defaults: {};
|
|
184
|
+
}, Readonly<{
|
|
185
|
+
modelValue?: string | undefined | null;
|
|
186
|
+
} & Omit<import("./MazInput.vue").Props<import("./types").ModelValueSimple>, "modelValue"> & {
|
|
187
|
+
id: string;
|
|
188
|
+
locales: Translations;
|
|
189
|
+
noExample: boolean;
|
|
190
|
+
hasRadius: boolean;
|
|
191
|
+
autoFormat: boolean;
|
|
192
|
+
}> & Readonly<{
|
|
193
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
194
|
+
}>, {}, {}, {}, {}, {}> | null;
|
|
195
|
+
};
|
|
196
|
+
rootEl: any;
|
|
197
|
+
};
|
|
198
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
199
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
200
|
+
data: (results: Results) => any;
|
|
201
|
+
"update:model-value": (value: string | null | undefined) => any;
|
|
202
|
+
update: (results: Results) => any;
|
|
203
|
+
"country-code": (countryCode?: CountryCode | null | undefined) => any;
|
|
204
|
+
"update:country-code": (countryCode?: CountryCode | null | undefined) => any;
|
|
205
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
206
|
+
onData?: ((results: Results) => any) | undefined;
|
|
207
|
+
"onUpdate:model-value"?: ((value: string | null | undefined) => any) | undefined;
|
|
208
|
+
onUpdate?: ((results: Results) => any) | undefined;
|
|
209
|
+
"onCountry-code"?: ((countryCode?: CountryCode | null | undefined) => any) | undefined;
|
|
210
|
+
"onUpdate:country-code"?: ((countryCode?: CountryCode | null | undefined) => any) | undefined;
|
|
211
|
+
}>, {
|
|
212
|
+
label: string;
|
|
213
|
+
style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
|
|
214
|
+
size: Size;
|
|
215
|
+
color: Color;
|
|
216
|
+
class: HTMLAttributes["class"];
|
|
217
|
+
id: string;
|
|
218
|
+
modelValue: string | null;
|
|
219
|
+
orientation: "row" | "col" | "responsive";
|
|
220
|
+
placeholder: string;
|
|
221
|
+
listPosition: Position;
|
|
222
|
+
searchThreshold: number;
|
|
223
|
+
excludeSelectors: string[];
|
|
224
|
+
preferredCountries: CountryCode[];
|
|
225
|
+
ignoredCountries: CountryCode[];
|
|
226
|
+
onlyCountries: CountryCode[];
|
|
227
|
+
customCountriesList: Record<CountryCode, string>;
|
|
228
|
+
countryLocale: string;
|
|
229
|
+
countryCode: CountryCode | null;
|
|
230
|
+
noExample: boolean;
|
|
231
|
+
autoFormat: boolean;
|
|
232
|
+
defaultPhoneNumber: string | null;
|
|
233
|
+
defaultCountryCode: CountryCode | null;
|
|
234
|
+
translations: Partial<Translations>;
|
|
235
|
+
noFormattingAsYouType: boolean;
|
|
236
|
+
countrySelectorWidth: string;
|
|
237
|
+
countrySelectAttributes: Record<string, unknown>;
|
|
238
|
+
phoneInputAttributes: Record<string, unknown>;
|
|
239
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
240
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
241
|
+
export default _default;
|
|
242
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
243
|
+
new (): {
|
|
244
|
+
$slots: S;
|
|
245
|
+
};
|
|
246
|
+
};
|