maz-ui 4.0.0-beta.3 → 4.0.0-beta.4
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/MazCheckbox.BFo5eYS6.css +1 -0
- package/dist/assets/MazInputPhoneNumber.C-Nw3080.css +1 -0
- package/dist/assets/MazLazyImg.NlPRN3Nk.css +1 -0
- package/dist/assets/{MazPopover.Bth9NWia.css → MazPopover.COR-tym7.css} +1 -1
- package/dist/assets/{MazSelectCountry.D2Qudf0K.css → MazSelectCountry.9RTcDxtM.css} +1 -1
- package/dist/chunks/{MazDropdown.vue_vue_type_style_index_0_lang.abk1IbMX.js → MazDropdown.vue_vue_type_style_index_0_lang.De5b1GG8.js} +6 -13
- package/dist/chunks/{MazInputPhoneNumber.Uwhn1Q9j.js → MazInputPhoneNumber.B7mxCHgU.js} +3 -3
- package/dist/chunks/{MazSwitch.vue_vue_type_style_index_0_lang.DnCjlD6D.js → MazSwitch.vue_vue_type_style_index_0_lang.DQE0vFhe.js} +1 -1
- package/dist/chunks/{PhoneInput.CPjyZ8Sq.js → PhoneInput.tDA-TWr5.js} +1 -1
- package/dist/chunks/{en.BzBlrE0C.js → en.Q_4-KljL.js} +12 -0
- package/dist/components/MazCheckbox.js +2 -2
- package/dist/components/MazDropdown.js +1 -1
- package/dist/components/MazInputPhoneNumber.js +1 -1
- package/dist/components/MazLazyImg.js +8 -8
- package/dist/components/MazPopover.js +13 -12
- package/dist/components/MazSelectCountry.js +2 -2
- package/dist/components/MazSwitch.js +1 -1
- package/dist/components/index.js +3 -3
- package/dist/composables/useAos.js +1 -1
- package/dist/composables/useDialog.js +1 -1
- package/dist/composables/useInjectStrict.js +2 -2
- package/dist/composables/useToast.js +1 -1
- package/dist/composables/useWait.js +1 -1
- package/dist/directives/vTooltip.js +1 -1
- package/dist/plugins/maz-ui.js +3 -64
- package/dist/types/components/MazDatePicker.vue.d.ts +11 -11
- package/dist/types/components/MazDialogPromise/useMazDialogPromise.d.ts +7 -7
- package/dist/types/components/MazDropdown.vue.d.ts +11 -11
- package/dist/types/components/MazInputPhoneNumber/useLibphonenumber.d.ts +2 -2
- package/dist/types/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +6 -2
- package/dist/types/components/MazInputPhoneNumber.vue.d.ts +28 -13
- package/dist/types/components/MazLazyImg.vue.d.ts +8 -8
- package/dist/types/components/MazPopover.vue.d.ts +10 -10
- package/dist/types/components/MazSelectCountry.vue.d.ts +2 -2
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/composables/useInjectStrict.d.ts +1 -1
- package/dist/types/directives/vClickOutside.d.ts +11 -18
- package/dist/types/directives/vFullscreenImg/fullscreen-img.directive.d.ts +3 -5
- package/dist/types/directives/vFullscreenImg.d.ts +9 -4
- package/dist/types/directives/vLazyImg/lazy-img.directive.d.ts +3 -5
- package/dist/types/directives/vLazyImg.d.ts +11 -6
- package/dist/types/directives/vTooltip.d.ts +12 -12
- package/dist/types/directives/vZoomImg/zoom-img.directive.d.ts +2 -0
- package/dist/types/directives/vZoomImg.d.ts +9 -5
- package/dist/types/plugins/aos.d.ts +30 -4
- package/dist/types/plugins/dialog.d.ts +2 -4
- package/dist/types/plugins/maz-ui.d.ts +2 -63
- package/dist/types/plugins/toast.d.ts +2 -4
- package/dist/types/plugins/wait.d.ts +2 -3
- package/package.json +8 -8
- package/dist/assets/MazCheckbox.C_qIngLy.css +0 -1
- package/dist/assets/MazInputPhoneNumber.vpA2mrZn.css +0 -1
- package/dist/assets/MazLazyImg.BNaVtpfX.css +0 -1
- package/dist/types/components/MazInputPhoneNumber/types.d.ts +0 -22
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { MazBtnProps } from '../MazBtn.vue';
|
|
3
|
-
export interface
|
|
3
|
+
export interface MazDialogPromiseState {
|
|
4
4
|
id: string;
|
|
5
5
|
isActive: boolean;
|
|
6
6
|
accept: (value: unknown) => void;
|
|
7
7
|
reject?: (reason?: unknown) => void;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface MazDialogPromiseButtonAction extends Omit<MazBtnProps, 'type'> {
|
|
10
10
|
text: string;
|
|
11
11
|
onClick: () => unknown;
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface MazDialogButtonPromise extends Omit<MazBtnProps, 'type'> {
|
|
14
14
|
text: string;
|
|
15
15
|
type: 'accept' | 'reject';
|
|
16
16
|
response?: unknown;
|
|
17
17
|
}
|
|
18
|
-
export type MazDialogPromiseButton =
|
|
18
|
+
export type MazDialogPromiseButton = MazDialogButtonPromise | MazDialogPromiseButtonAction;
|
|
19
19
|
export interface MazDialogPromiseData {
|
|
20
20
|
/**
|
|
21
21
|
* Dialog title
|
|
@@ -46,9 +46,9 @@ export declare const defaultData: {
|
|
|
46
46
|
declare function showDialogAndWaitChoice(identifier: string, callback?: () => unknown): Promise<unknown>;
|
|
47
47
|
export declare function useMazDialogPromise(): {
|
|
48
48
|
data: Ref<MazDialogPromiseData, MazDialogPromiseData>;
|
|
49
|
-
dialogState: Ref<
|
|
49
|
+
dialogState: Ref<MazDialogPromiseState[], MazDialogPromiseState[]>;
|
|
50
50
|
showDialogAndWaitChoice: typeof showDialogAndWaitChoice;
|
|
51
|
-
reject: (currentDialog:
|
|
52
|
-
accept: (currentDialog:
|
|
51
|
+
reject: (currentDialog: MazDialogPromiseState, response?: unknown, onClick?: () => unknown) => Promise<unknown>;
|
|
52
|
+
accept: (currentDialog: MazDialogPromiseState, response?: unknown, onClick?: () => unknown) => Promise<unknown>;
|
|
53
53
|
};
|
|
54
54
|
export {};
|
|
@@ -5,22 +5,22 @@ import { MazLinkProps } from './MazLink.vue';
|
|
|
5
5
|
import { MazColor, MazSize } from './types';
|
|
6
6
|
import { MazPopoverProps } from './MazPopover.vue';
|
|
7
7
|
type __VLS_Props = MazDropdownProps;
|
|
8
|
-
type
|
|
8
|
+
type MazDropdownItemBase = Record<string, unknown> & {
|
|
9
9
|
label: string;
|
|
10
10
|
class?: unknown;
|
|
11
11
|
color?: MazColor;
|
|
12
12
|
};
|
|
13
|
-
type
|
|
13
|
+
type MazDropdownLinkItem = MazDropdownItemBase & MazLinkProps & {
|
|
14
14
|
target?: string;
|
|
15
15
|
href?: string;
|
|
16
16
|
to?: RouteLocationRaw;
|
|
17
17
|
};
|
|
18
|
-
type
|
|
18
|
+
type MazDropdownActionItem = MazDropdownItemBase & {
|
|
19
19
|
onClick?: () => unknown;
|
|
20
20
|
};
|
|
21
|
-
export type
|
|
21
|
+
export type MazDropdownMenuItem = (MazDropdownLinkItem & {
|
|
22
22
|
action?: never;
|
|
23
|
-
}) | (
|
|
23
|
+
}) | (MazDropdownActionItem & {
|
|
24
24
|
href?: never;
|
|
25
25
|
to?: never;
|
|
26
26
|
target?: never;
|
|
@@ -46,7 +46,7 @@ export interface MazDropdownProps extends Omit<MazPopoverProps, 'modelValue'> {
|
|
|
46
46
|
/**
|
|
47
47
|
* Menu items to display in the dropdown
|
|
48
48
|
* Each item can be either a link (with href/to properties) or an action (with onClick function)
|
|
49
|
-
* @type {
|
|
49
|
+
* @type {MazDropdownMenuItem[]}
|
|
50
50
|
* @default []
|
|
51
51
|
* @example
|
|
52
52
|
* [
|
|
@@ -54,7 +54,7 @@ export interface MazDropdownProps extends Omit<MazPopoverProps, 'modelValue'> {
|
|
|
54
54
|
* { label: 'Settings', onClick: () => console.log('Settings clicked') }
|
|
55
55
|
* ]
|
|
56
56
|
*/
|
|
57
|
-
items?:
|
|
57
|
+
items?: MazDropdownMenuItem[];
|
|
58
58
|
/**
|
|
59
59
|
* Unique identifier for the dropdown component
|
|
60
60
|
* @type {string}
|
|
@@ -63,8 +63,8 @@ export interface MazDropdownProps extends Omit<MazPopoverProps, 'modelValue'> {
|
|
|
63
63
|
/**
|
|
64
64
|
* Determines how the dropdown should be triggered
|
|
65
65
|
* @type {MazPopoverProps['trigger']}
|
|
66
|
-
* @values click, hover, manual
|
|
67
|
-
* @default '
|
|
66
|
+
* @values click, hover, manual, adaptive
|
|
67
|
+
* @default 'adaptive'
|
|
68
68
|
*/
|
|
69
69
|
trigger?: MazPopoverProps['trigger'];
|
|
70
70
|
/**
|
|
@@ -172,14 +172,14 @@ declare function __VLS_template(): {
|
|
|
172
172
|
open: () => void;
|
|
173
173
|
}): any;
|
|
174
174
|
dropdown?(_: {
|
|
175
|
-
items:
|
|
175
|
+
items: MazDropdownMenuItem[];
|
|
176
176
|
open: () => void;
|
|
177
177
|
close: () => void;
|
|
178
178
|
isOpen: true;
|
|
179
179
|
toggle: () => void;
|
|
180
180
|
}): any;
|
|
181
181
|
menuitem?(_: {
|
|
182
|
-
item:
|
|
182
|
+
item: MazDropdownMenuItem;
|
|
183
183
|
open: () => void;
|
|
184
184
|
close: () => void;
|
|
185
185
|
isOpen: true;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CountryCode, Examples, getCountries, getCountryCallingCode } from 'libphonenumber-js';
|
|
2
|
-
import {
|
|
2
|
+
import { MazInputPhoneNumberData } from '../MazInputPhoneNumber.vue';
|
|
3
3
|
declare function isCountryAvailable(locale: string): boolean;
|
|
4
4
|
declare function getPhoneNumberResults({ phoneNumber, countryCode, checkCountryCode, }: {
|
|
5
5
|
phoneNumber?: string | undefined | null;
|
|
6
6
|
countryCode?: CountryCode | undefined | null;
|
|
7
7
|
checkCountryCode?: boolean;
|
|
8
|
-
}):
|
|
8
|
+
}): MazInputPhoneNumberData;
|
|
9
9
|
declare function getPhoneNumberExamplesFile(): Promise<Examples>;
|
|
10
10
|
declare function getPhoneNumberExample(countryCode?: CountryCode | undefined | null): string | undefined;
|
|
11
11
|
declare function getAsYouTypeFormat(countryCode?: CountryCode | undefined | null, phoneNumber?: string | undefined | null): string | undefined;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { CountryCode } from 'libphonenumber-js';
|
|
2
|
-
|
|
2
|
+
export interface CountryOption {
|
|
3
|
+
code: CountryCode;
|
|
4
|
+
dialCode: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
3
7
|
declare function getBrowserLocale(): {
|
|
4
8
|
locale: string;
|
|
5
9
|
browserLocale: string;
|
|
6
10
|
} | undefined;
|
|
7
|
-
declare function getCountryList(locale?: string, customCountriesNameListByIsoCode?: Record<CountryCode, string>):
|
|
11
|
+
declare function getCountryList(locale?: string, customCountriesNameListByIsoCode?: Record<CountryCode, string>): CountryOption[] | undefined;
|
|
8
12
|
declare function fetchCountryCode(): Promise<{
|
|
9
13
|
data: CountryCode;
|
|
10
14
|
error: undefined;
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import { MazTranslationsNestedSchema } from '@maz-ui/translations/src/types.js';
|
|
2
|
-
import { CountryCode } from 'libphonenumber-js';
|
|
2
|
+
import { CountryCallingCode, CountryCode, NationalNumber, NumberType } from 'libphonenumber-js';
|
|
3
3
|
import { HTMLAttributes } from 'vue';
|
|
4
|
-
import { Results } from './MazInputPhoneNumber/types';
|
|
5
4
|
import { MazPopoverProps } from './MazPopover.vue';
|
|
6
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
|
+
}
|
|
7
22
|
export interface MazInputPhoneNumberProps {
|
|
8
23
|
/**
|
|
9
24
|
* Style attribut of the component root element
|
|
@@ -223,9 +238,9 @@ declare const results: import('vue').Ref<{
|
|
|
223
238
|
isPossible?: boolean | undefined;
|
|
224
239
|
countryCode?: CountryCode | null | undefined;
|
|
225
240
|
parsedCountryCode?: CountryCode | null | undefined;
|
|
226
|
-
countryCallingCode?:
|
|
227
|
-
nationalNumber?:
|
|
228
|
-
type?:
|
|
241
|
+
countryCallingCode?: CountryCallingCode | undefined;
|
|
242
|
+
nationalNumber?: NationalNumber | undefined;
|
|
243
|
+
type?: NumberType;
|
|
229
244
|
formatInternational?: string | undefined;
|
|
230
245
|
formatNational?: string | undefined;
|
|
231
246
|
uri?: string | undefined;
|
|
@@ -233,14 +248,14 @@ declare const results: import('vue').Ref<{
|
|
|
233
248
|
rfc3966?: string | undefined;
|
|
234
249
|
possibleCountries?: CountryCode[] | undefined;
|
|
235
250
|
phoneNumber?: string | undefined | null | undefined;
|
|
236
|
-
},
|
|
251
|
+
}, MazInputPhoneNumberData | {
|
|
237
252
|
isValid: boolean;
|
|
238
253
|
isPossible?: boolean | undefined;
|
|
239
254
|
countryCode?: CountryCode | null | undefined;
|
|
240
255
|
parsedCountryCode?: CountryCode | null | undefined;
|
|
241
|
-
countryCallingCode?:
|
|
242
|
-
nationalNumber?:
|
|
243
|
-
type?:
|
|
256
|
+
countryCallingCode?: CountryCallingCode | undefined;
|
|
257
|
+
nationalNumber?: NationalNumber | undefined;
|
|
258
|
+
type?: NumberType;
|
|
244
259
|
formatInternational?: string | undefined;
|
|
245
260
|
formatNational?: string | undefined;
|
|
246
261
|
uri?: string | undefined;
|
|
@@ -264,7 +279,7 @@ declare function __VLS_template(): {
|
|
|
264
279
|
}): any;
|
|
265
280
|
'country-list-flag'?(_: {
|
|
266
281
|
countryCode: CountryCode;
|
|
267
|
-
option: import('./MazInputPhoneNumber/
|
|
282
|
+
option: import('./MazInputPhoneNumber/useMazInputPhoneNumber').CountryOption;
|
|
268
283
|
isSelected: boolean;
|
|
269
284
|
}): any;
|
|
270
285
|
};
|
|
@@ -316,12 +331,12 @@ declare function __VLS_template(): {
|
|
|
316
331
|
};
|
|
317
332
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
318
333
|
declare const __VLS_component: import('vue').DefineComponent<MazInputPhoneNumberProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
319
|
-
data: (results:
|
|
334
|
+
data: (results: MazInputPhoneNumberData) => any;
|
|
320
335
|
"update:model-value": (value: string | null | undefined) => any;
|
|
321
336
|
"country-code": (countryCode?: CountryCode | null | undefined) => any;
|
|
322
337
|
"update:country-code": (countryCode?: CountryCode | null | undefined) => any;
|
|
323
338
|
}, string, import('vue').PublicProps, Readonly<MazInputPhoneNumberProps> & Readonly<{
|
|
324
|
-
onData?: ((results:
|
|
339
|
+
onData?: ((results: MazInputPhoneNumberData) => any) | undefined;
|
|
325
340
|
"onUpdate:model-value"?: ((value: string | null | undefined) => any) | undefined;
|
|
326
341
|
"onCountry-code"?: ((countryCode?: CountryCode | null | undefined) => any) | undefined;
|
|
327
342
|
"onUpdate:country-code"?: ((countryCode?: CountryCode | null | undefined) => any) | undefined;
|
|
@@ -333,7 +348,7 @@ declare const __VLS_component: import('vue').DefineComponent<MazInputPhoneNumber
|
|
|
333
348
|
orientation: "row" | "col" | "responsive";
|
|
334
349
|
example: boolean;
|
|
335
350
|
useBrowserLocale: boolean;
|
|
336
|
-
listPosition: import('./MazPopover.vue').
|
|
351
|
+
listPosition: import('./MazPopover.vue').MazPopoverPosition;
|
|
337
352
|
searchThreshold: number;
|
|
338
353
|
hideFlags: boolean;
|
|
339
354
|
showCodeInList: boolean;
|
|
@@ -47,15 +47,15 @@ declare function __VLS_template(): {
|
|
|
47
47
|
};
|
|
48
48
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
49
49
|
declare const __VLS_component: import('vue').DefineComponent<MazLazyImgProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
50
|
-
error: (el:
|
|
51
|
-
loaded: (el:
|
|
52
|
-
loading: (el:
|
|
53
|
-
intersecting: (el:
|
|
50
|
+
error: (el: Element) => any;
|
|
51
|
+
loaded: (el: Element) => any;
|
|
52
|
+
loading: (el: Element) => any;
|
|
53
|
+
intersecting: (el: Element) => any;
|
|
54
54
|
}, string, import('vue').PublicProps, Readonly<MazLazyImgProps> & Readonly<{
|
|
55
|
-
onError?: ((el:
|
|
56
|
-
onLoaded?: ((el:
|
|
57
|
-
onLoading?: ((el:
|
|
58
|
-
onIntersecting?: ((el:
|
|
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
59
|
}>, {
|
|
60
60
|
src: MazImage | null;
|
|
61
61
|
style: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'vue';
|
|
2
2
|
import { MazColor } from './types';
|
|
3
3
|
type __VLS_Props = MazPopoverProps;
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
4
|
+
export type MazPopoverPosition = 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
5
|
+
export type MazPopoverTrigger = 'click' | 'hover' | 'manual' | 'adaptive';
|
|
6
|
+
export type MazPopoverRole = 'dialog' | 'tooltip' | 'menu';
|
|
7
7
|
export interface MazPopoverProps {
|
|
8
8
|
/**
|
|
9
9
|
* Controls the popover open state
|
|
@@ -18,35 +18,35 @@ export interface MazPopoverProps {
|
|
|
18
18
|
* @default auto
|
|
19
19
|
* @description Position of the popover relative to trigger
|
|
20
20
|
*/
|
|
21
|
-
position?:
|
|
21
|
+
position?: MazPopoverPosition;
|
|
22
22
|
/**
|
|
23
23
|
* Preferred position of the popover relative to trigger when auto position is used
|
|
24
24
|
* @values auto, top, bottom, left, right, top-start, top-end, bottom-start, bottom-end, left-start, left-end, right-start, right-end
|
|
25
25
|
* @default 'bottom-start'
|
|
26
26
|
* @description Preferred position of the popover relative to trigger
|
|
27
27
|
*/
|
|
28
|
-
preferPosition?:
|
|
28
|
+
preferPosition?: MazPopoverPosition;
|
|
29
29
|
/**
|
|
30
30
|
* Fallback position of the popover relative to trigger when prefer position is not visible
|
|
31
31
|
* @values auto, top, bottom, left, right, top-start, top-end, bottom-start, bottom-end, left-start, left-end, right-start, right-end
|
|
32
32
|
* @default auto
|
|
33
33
|
* @description Fallback position of the popover relative to trigger
|
|
34
34
|
*/
|
|
35
|
-
fallbackPosition?:
|
|
35
|
+
fallbackPosition?: MazPopoverPosition;
|
|
36
36
|
/**
|
|
37
37
|
* How the popover is triggered
|
|
38
|
-
* @values click, hover, manual
|
|
38
|
+
* @values click, hover, manual, adaptive
|
|
39
39
|
* @default click
|
|
40
|
-
* @description How the popover is triggered
|
|
40
|
+
* @description How the popover is triggered. 'adaptive' uses hover on desktop and click on mobile
|
|
41
41
|
*/
|
|
42
|
-
trigger?:
|
|
42
|
+
trigger?: MazPopoverTrigger;
|
|
43
43
|
/**
|
|
44
44
|
* ARIA role for accessibility
|
|
45
45
|
* @values dialog, tooltip
|
|
46
46
|
* @default dialog
|
|
47
47
|
* @description ARIA role for accessibility
|
|
48
48
|
*/
|
|
49
|
-
role?:
|
|
49
|
+
role?: MazPopoverRole;
|
|
50
50
|
/**
|
|
51
51
|
* ARIA label for the popover
|
|
52
52
|
* @default undefined
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MazTranslationsNestedSchema } from '@maz-ui/translations/src/types.js';
|
|
2
2
|
import { HTMLAttributes } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { MazPopoverPosition } from './MazPopover.vue';
|
|
4
4
|
import { MazColor, MazSize } from './types';
|
|
5
5
|
import { CodesType, DisplayNameCode, DisplayNamesOptions } from '../composables/useDisplayNames';
|
|
6
6
|
import { MazSelectProps } from './MazSelect.vue';
|
|
@@ -54,7 +54,7 @@ export interface MazSelectCountryProps<Option extends {
|
|
|
54
54
|
* @type {PopoverPosition}
|
|
55
55
|
* @default bottom-start
|
|
56
56
|
*/
|
|
57
|
-
listPosition?:
|
|
57
|
+
listPosition?: MazPopoverPosition;
|
|
58
58
|
/**
|
|
59
59
|
* Hide flags
|
|
60
60
|
*/
|
|
@@ -71,7 +71,7 @@ export type { MazLoadingBarProps } from './MazLoadingBar.vue';
|
|
|
71
71
|
export { default as MazPagination } from './MazPagination.vue';
|
|
72
72
|
export type { MazPaginationProps } from './MazPagination.vue';
|
|
73
73
|
export { default as MazPopover } from './MazPopover.vue';
|
|
74
|
-
export type {
|
|
74
|
+
export type { MazPopoverPosition, MazPopoverProps, MazPopoverRole, MazPopoverTrigger } from './MazPopover.vue';
|
|
75
75
|
export { default as MazPullToRefresh } from './MazPullToRefresh.vue';
|
|
76
76
|
export type { MazPullToRefreshProps } from './MazPullToRefresh.vue';
|
|
77
77
|
export { default as MazRadio } from './MazRadio.vue';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { InjectionKey } from 'vue';
|
|
2
|
-
export declare function useInjectStrict<T>(key: string | InjectionKey<T> | symbol, fallback?: T): NonNullable<T>;
|
|
2
|
+
export declare function useInjectStrict<T>(key: string | InjectionKey<T> | symbol, fallback?: T, errorMessage?: string): NonNullable<T>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ObjectDirective, Plugin } from 'vue';
|
|
2
2
|
interface VClickOutsideOptions {
|
|
3
3
|
/**
|
|
4
4
|
* The callback function to be called when the element is clicked outside.
|
|
@@ -24,20 +24,13 @@ interface VClickOutsideOptions {
|
|
|
24
24
|
/**
|
|
25
25
|
* The value of the v-click-outside directive.
|
|
26
26
|
*/
|
|
27
|
-
type
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
type
|
|
32
|
-
declare
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
updated: typeof onUpdated;
|
|
38
|
-
unmounted: typeof onUnmounted;
|
|
39
|
-
};
|
|
40
|
-
declare const plugin: {
|
|
41
|
-
install: (app: import('vue').App<any>) => void;
|
|
42
|
-
};
|
|
43
|
-
export { directive as vClickOutside, type vClickOutsideBindingValue, plugin as vClickOutsideInstall, type VClickOutsideOptions, };
|
|
27
|
+
type VClickOutsideBindingValue = ((...args: any[]) => any) | VClickOutsideOptions;
|
|
28
|
+
export type VClickOutsideDirective = ObjectDirective<HTMLElement, VClickOutsideBindingValue>;
|
|
29
|
+
declare const directive: VClickOutsideDirective;
|
|
30
|
+
declare const plugin: Plugin;
|
|
31
|
+
export { directive as vClickOutside, type VClickOutsideBindingValue, plugin as vClickOutsideInstall, type VClickOutsideOptions, };
|
|
32
|
+
declare module 'vue' {
|
|
33
|
+
interface GlobalDirectives {
|
|
34
|
+
vClickOutside: VClickOutsideDirective;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
+
import { ObjectDirective } from 'vue';
|
|
1
2
|
import { VFullscreenImgBindingValue } from './fullscreen-img.handler';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
updated(el: HTMLElement, binding: import('vue').DirectiveBinding<VFullscreenImgBindingValue, string, string>): void;
|
|
5
|
-
unmounted(el: HTMLElement): void;
|
|
6
|
-
};
|
|
3
|
+
export type VFullscreenImgDirective = ObjectDirective<HTMLElement, VFullscreenImgBindingValue>;
|
|
4
|
+
declare const directive: VFullscreenImgDirective;
|
|
7
5
|
export { directive as vFullscreenImg };
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
import { VFullscreenImgDirective } from './vFullscreenImg/fullscreen-img.directive';
|
|
3
|
+
declare const plugin: Plugin;
|
|
4
4
|
export { plugin as vFullscreenImgInstall };
|
|
5
|
-
export { vFullscreenImg } from './vFullscreenImg/fullscreen-img.directive';
|
|
5
|
+
export { vFullscreenImg, type VFullscreenImgDirective } from './vFullscreenImg/fullscreen-img.directive';
|
|
6
6
|
export type { VFullscreenImgBindingValue, VFullscreenImgOptions } from './vFullscreenImg/fullscreen-img.handler';
|
|
7
|
+
declare module 'vue' {
|
|
8
|
+
interface GlobalDirectives {
|
|
9
|
+
vFullscreenImg: VFullscreenImgDirective;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
+
import { ObjectDirective } from 'vue';
|
|
1
2
|
import { VLazyImgBindingValue } from './lazy-img.handler';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
updated(el: HTMLElement, binding: import('vue').DirectiveBinding<VLazyImgBindingValue, string, string>): void;
|
|
5
|
-
unmounted(el: HTMLElement, binding: import('vue').DirectiveBinding<VLazyImgBindingValue, string, string>): void;
|
|
6
|
-
};
|
|
3
|
+
export type VLazyImgDirective = ObjectDirective<HTMLElement, VLazyImgBindingValue>;
|
|
4
|
+
declare const directive: VLazyImgDirective;
|
|
7
5
|
export { directive as vLazyImg };
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { vLazyImg } from './vLazyImg/lazy-img.directive';
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
import { VLazyImgDirective } from './vLazyImg/lazy-img.directive';
|
|
3
|
+
import { VLazyImgOptions } from './vLazyImg/types';
|
|
4
|
+
declare const plugin: Plugin<[VLazyImgOptions?]>;
|
|
5
|
+
export { vLazyImg, type VLazyImgDirective } from './vLazyImg/lazy-img.directive';
|
|
6
6
|
export { plugin as vLazyImgInstall };
|
|
7
|
-
export type { VLazyImgBindingValue, VLazyImgOptions };
|
|
7
|
+
export type { VLazyImgBindingValue, VLazyImgOptions } from './vLazyImg/types';
|
|
8
|
+
declare module 'vue' {
|
|
9
|
+
interface GlobalDirectives {
|
|
10
|
+
vLazyImg: VLazyImgDirective;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DirectiveBinding } from 'vue';
|
|
2
|
-
import {
|
|
1
|
+
import { DirectiveBinding, ObjectDirective, Plugin } from 'vue';
|
|
2
|
+
import { MazPopoverPosition, MazPopoverProps, MazPopoverTrigger } from '../components/MazPopover.vue';
|
|
3
3
|
interface VTooltipOptions extends Partial<Omit<MazPopoverProps, 'modelValue'>> {
|
|
4
4
|
/**
|
|
5
5
|
* Text to display in the tooltip
|
|
@@ -19,12 +19,12 @@ interface VTooltipOptions extends Partial<Omit<MazPopoverProps, 'modelValue'>> {
|
|
|
19
19
|
* The preferred position is set to 'top' if no position is provided
|
|
20
20
|
* @default undefined
|
|
21
21
|
*/
|
|
22
|
-
position?:
|
|
22
|
+
position?: MazPopoverPosition;
|
|
23
23
|
/**
|
|
24
24
|
* Trigger of the tooltip
|
|
25
25
|
* @default hover
|
|
26
26
|
*/
|
|
27
|
-
trigger?:
|
|
27
|
+
trigger?: MazPopoverTrigger;
|
|
28
28
|
/**
|
|
29
29
|
* Close on click outside
|
|
30
30
|
* @default false
|
|
@@ -43,12 +43,12 @@ interface VTooltipOptions extends Partial<Omit<MazPopoverProps, 'modelValue'>> {
|
|
|
43
43
|
}
|
|
44
44
|
type VTooltipBindingValue = string | VTooltipOptions;
|
|
45
45
|
export type TooltipBinding = DirectiveBinding<VTooltipBindingValue, NonNullable<MazPopoverProps['position']>>;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
unmounted(el: HTMLElement): void;
|
|
50
|
-
};
|
|
51
|
-
declare const plugin: {
|
|
52
|
-
install: (app: import('vue').App<any>, options?: Partial<VTooltipOptions>) => void;
|
|
53
|
-
};
|
|
46
|
+
export type VTooltipDirective = ObjectDirective<HTMLElement, VTooltipBindingValue, NonNullable<MazPopoverProps['position']>>;
|
|
47
|
+
declare const directive: VTooltipDirective;
|
|
48
|
+
declare const plugin: Plugin<[Partial<VTooltipOptions>?]>;
|
|
54
49
|
export { directive as vTooltip, type VTooltipBindingValue, plugin as vTooltipInstall, type VTooltipOptions, };
|
|
50
|
+
declare module 'vue' {
|
|
51
|
+
interface GlobalDirectives {
|
|
52
|
+
vTooltip: VTooltipDirective;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { ObjectDirective } from 'vue';
|
|
1
2
|
import { VZoomImgBindingValue } from './zoom-img.handler';
|
|
3
|
+
export type VZoomImgDirective = ObjectDirective<HTMLElement, VZoomImgBindingValue>;
|
|
2
4
|
export declare const vZoomImg: {
|
|
3
5
|
created(el: HTMLElement, binding: import('vue').DirectiveBinding<VZoomImgBindingValue, string, string>): void;
|
|
4
6
|
updated(_el: HTMLElement, binding: import('vue').DirectiveBinding<VZoomImgBindingValue, string, string>): void;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export { vZoomImg, plugin as vZoomImgInstall };
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
import { vZoomImg, VZoomImgDirective } from './vZoomImg/zoom-img.directive';
|
|
3
|
+
declare const plugin: Plugin;
|
|
4
|
+
export { vZoomImg, type VZoomImgDirective, plugin as vZoomImgInstall };
|
|
6
5
|
export type { VZoomImgBindingValue } from './vZoomImg/zoom-img.handler';
|
|
6
|
+
declare module 'vue' {
|
|
7
|
+
interface GlobalDirectives {
|
|
8
|
+
vZoomImg: VZoomImgDirective;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,13 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
2
|
import { Router } from 'vue-router';
|
|
3
3
|
export interface AosOptions {
|
|
4
4
|
animation?: {
|
|
5
|
+
/**
|
|
6
|
+
* The delay of the animation
|
|
7
|
+
* @default 0
|
|
8
|
+
*/
|
|
5
9
|
delay?: number;
|
|
10
|
+
/**
|
|
11
|
+
* The duration of the animation
|
|
12
|
+
* @default 300
|
|
13
|
+
*/
|
|
6
14
|
duration?: number;
|
|
15
|
+
/**
|
|
16
|
+
* If true, the animation will be triggered only once
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
7
19
|
once?: boolean;
|
|
8
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* The delay before the animation starts
|
|
23
|
+
* @default 100
|
|
24
|
+
*/
|
|
9
25
|
delay?: number;
|
|
26
|
+
/**
|
|
27
|
+
* The observer options
|
|
28
|
+
* @default {
|
|
29
|
+
* root: undefined,
|
|
30
|
+
* rootMargin: '0px',
|
|
31
|
+
* threshold: 0.2,
|
|
32
|
+
* }
|
|
33
|
+
*/
|
|
10
34
|
observer?: IntersectionObserverInit;
|
|
35
|
+
/**
|
|
36
|
+
* The router instance to trigger the animation on route change
|
|
37
|
+
* @default undefined
|
|
38
|
+
*/
|
|
11
39
|
router?: Router;
|
|
12
40
|
}
|
|
13
41
|
interface ClassOptions extends Omit<AosOptions, 'router'> {
|
|
@@ -29,9 +57,7 @@ export declare class AosHandler {
|
|
|
29
57
|
private handleObserver;
|
|
30
58
|
runAnimations(): Promise<void> | undefined;
|
|
31
59
|
}
|
|
32
|
-
export declare const AosPlugin:
|
|
33
|
-
install: (app: App, options?: AosOptions) => void;
|
|
34
|
-
};
|
|
60
|
+
export declare const AosPlugin: Plugin<[AosOptions?]>;
|
|
35
61
|
declare module '@vue/runtime-core' {
|
|
36
62
|
interface ComponentCustomProperties {
|
|
37
63
|
/**
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
2
|
import { DialogOptions, DialogHandler } from './dialog/DialogHandler';
|
|
3
|
-
export declare const DialogPlugin:
|
|
4
|
-
install(app: App, options?: DialogOptions): void;
|
|
5
|
-
};
|
|
3
|
+
export declare const DialogPlugin: Plugin<[DialogOptions?]>;
|
|
6
4
|
declare module '@vue/runtime-core' {
|
|
7
5
|
interface ComponentCustomProperties {
|
|
8
6
|
/**
|