maz-ui 3.37.3 → 3.37.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/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.d.ts +2 -2
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.d.ts +2 -0
- package/components/MazCard.mjs +1 -1
- package/components/MazCarousel.mjs +1 -1
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.d.ts +4 -4
- package/components/MazInputTags.mjs +1 -1
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +8 -4
- package/components/MazPhoneNumberInput/use-maz-phone-number-input.d.ts +2 -2
- package/components/MazPhoneNumberInput.d.ts +21 -8
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.d.ts +89 -92
- package/components/MazRadio.mjs +67 -73
- package/components/MazRadioButtons.d.ts +84 -62
- package/components/MazRadioButtons.mjs +112 -60
- package/components/MazSelect.d.ts +12 -7
- package/components/MazSelect.mjs +1 -1
- package/components/MazSwitch.d.ts +61 -67
- package/components/MazSwitch.mjs +41 -48
- package/components/MazTable.mjs +1 -1
- package/components/MazTextarea.d.ts +23 -8
- package/components/MazTextarea.mjs +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazCard.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazPagination.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazRadio.css +1 -1
- package/components/assets/MazRadioButtons.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazSwitch.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTextarea.css +1 -1
- package/components/chunks/{MazBottomSheet-DZ1n4bGL.mjs → MazBottomSheet-B9OYmgyx.mjs} +1 -1
- package/components/chunks/{MazBtn-CnZU5zlG.mjs → MazBtn-4stpYG-V.mjs} +8 -8
- package/components/chunks/{MazBtn-BJs3rzUf.mjs → MazBtn-BQZOiUux.mjs} +8 -8
- package/components/chunks/{MazBtn-DLYgzr9e.mjs → MazBtn-Bgt41rUb.mjs} +11 -11
- package/components/chunks/MazBtn-CNyFbl9Y.mjs +151 -0
- package/components/chunks/{MazBtn-BTHDxDz7.mjs → MazBtn-CrNEwd_M.mjs} +8 -8
- package/components/chunks/MazBtn-CyXtFeAh.mjs +151 -0
- package/components/chunks/{MazBtn-CnkBOGKK.mjs → MazBtn-DOtOjQOl.mjs} +11 -11
- package/components/chunks/{MazBtn-IH6bjzah.mjs → MazBtn-DXC8jXNK.mjs} +8 -8
- package/components/chunks/{MazBtn-Dbe098kd.mjs → MazBtn-De3ZeaJJ.mjs} +8 -8
- package/components/chunks/{MazBtn-CDQAW3fg.mjs → MazBtn-g6VJMuer.mjs} +8 -8
- package/components/chunks/MazBtn-v1mwE1O3.mjs +151 -0
- package/components/chunks/{MazBtn-pLRsSxug.mjs → MazBtn-z9IFp0ZS.mjs} +8 -8
- package/components/chunks/{MazCard-CNE9c3L5.mjs → MazCard-E9Eg2VRn.mjs} +10 -8
- package/components/chunks/{MazCarousel-CMJgMJf1.mjs → MazCarousel-CtSpgIm6.mjs} +1 -1
- package/components/chunks/{MazCheckbox-DJBo7Ejt.mjs → MazCheckbox-BE7eLIkK.mjs} +1 -1
- package/components/chunks/{MazCheckbox-CM7mucQa.mjs → MazCheckbox-eSSrvpn9.mjs} +1 -1
- package/components/chunks/{MazDialog-BVqOTysP.mjs → MazDialog-CjsC6fGo.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-BjciKAwR.mjs → MazDialogPromise-Blv60XZR.mjs} +2 -2
- package/components/chunks/{MazGallery-BUUq89aM.mjs → MazGallery-DRgvR7K0.mjs} +2 -2
- package/components/chunks/{MazIcon-BKfQ_rkt.mjs → MazIcon-C_IIdjqr.mjs} +1 -1
- package/components/chunks/{MazInput-Caas-0Nk.mjs → MazInput-Dn4JzYhe.mjs} +1 -1
- package/components/chunks/{MazInputNumber-CnoCQQzg.mjs → MazInputNumber-Df31nPnc.mjs} +2 -2
- package/components/chunks/{MazInputPrice---5nCUKm.mjs → MazInputPrice-DATyEiwP.mjs} +1 -1
- package/components/chunks/{MazInputTags-CipoVBP2.mjs → MazInputTags-DBzwE87F.mjs} +3 -3
- package/components/chunks/{MazPagination-CXw3yqbu.mjs → MazPagination-BU6fSHr2.mjs} +2 -2
- package/components/chunks/MazPhoneNumberInput-D8hP4ZzW.mjs +1419 -0
- package/components/chunks/{MazPicker-CfhI75aw.mjs → MazPicker-D71j9m8h.mjs} +2 -2
- package/components/chunks/{MazPickerCalendar-DnkNE-Am.mjs → MazPickerCalendar-psuBcTR7.mjs} +3 -3
- package/components/chunks/{MazPickerHeader-Vt86yzXS.mjs → MazPickerHeader-BmqHJE0a.mjs} +1 -1
- package/components/chunks/{MazPickerMonthSwitcher-zfKhsjW1.mjs → MazPickerMonthSwitcher-DgU0pLkF.mjs} +2 -2
- package/components/chunks/{MazPickerShortcuts-DUIKfOO8.mjs → MazPickerShortcuts-D9YXi3Ns.mjs} +2 -2
- package/components/chunks/{MazPickerTime-B2znRxr2.mjs → MazPickerTime-8ZqSEb_N.mjs} +2 -2
- package/components/chunks/{MazPickerYearSwitcher-CB339kof.mjs → MazPickerYearSwitcher-D-zu0tMs.mjs} +3 -3
- package/components/chunks/MazSelect-Cc8JAFML.mjs +731 -0
- package/components/chunks/{MazSpinner-DFseK3o_.mjs → MazSpinner-2-OAJWTi.mjs} +1 -1
- package/components/chunks/MazSpinner-B0xEVmcj.mjs +38 -0
- package/components/chunks/{MazSpinner-2fDI3i5h.mjs → MazSpinner-B3Gt0AEt.mjs} +1 -1
- package/components/chunks/MazSpinner-B6Z6X_KC.mjs +38 -0
- package/components/chunks/{MazSpinner-CORsBFCP.mjs → MazSpinner-BVaJBGw5.mjs} +1 -1
- package/components/chunks/{MazSpinner-CVBVegaS.mjs → MazSpinner-BVflp3wp.mjs} +1 -1
- package/components/chunks/MazSpinner-BmqyUsTZ.mjs +38 -0
- package/components/chunks/{MazSpinner-XMLkiLTL.mjs → MazSpinner-Btk7fYzq.mjs} +1 -1
- package/components/chunks/{MazSpinner-BtFWH26r.mjs → MazSpinner-CAQqdZfW.mjs} +1 -1
- package/components/chunks/MazSpinner-COqX5baD.mjs +38 -0
- package/components/chunks/{MazSpinner-Bky73siD.mjs → MazSpinner-CV3h3CKR.mjs} +1 -1
- package/components/chunks/MazSpinner-Cm5GeVV-.mjs +38 -0
- package/components/chunks/{MazSpinner-CkHAaRhk.mjs → MazSpinner-D9uDPRkX.mjs} +1 -1
- package/components/chunks/MazSpinner-DO1id61e.mjs +38 -0
- package/components/chunks/MazSpinner-K26cuR_A.mjs +38 -0
- package/components/chunks/MazSpinner-LCpiZGMP.mjs +38 -0
- package/components/chunks/MazTable-vcm_SC7e.mjs +1846 -0
- package/components/chunks/{MazTransitionExpand-BWsQP7UF.mjs → MazTransitionExpand-DXKtquVe.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/chunks/{MazBtn-BxYYeNGe.mjs → MazBtn-CNsgLyRm.mjs} +8 -8
- package/modules/chunks/{MazBtn-CHUwa3fu.cjs → MazBtn-DmXrGuUE.cjs} +2 -2
- package/modules/chunks/{MazIcon-CnOCvJTw.mjs → MazIcon-DwRWkhhR.mjs} +1 -1
- package/modules/chunks/{MazIcon-DcbutTbM.cjs → MazIcon-rh9PwwaQ.cjs} +1 -1
- package/modules/chunks/{MazSpinner-TL9_4BOs.cjs → MazSpinner-BzucVZXm.cjs} +1 -1
- package/modules/chunks/{MazSpinner-ClFhZyF_.mjs → MazSpinner-mCJd14Kq.mjs} +1 -1
- package/modules/chunks/{index-DksGhf51.cjs → index-DHsybBwE.cjs} +1 -1
- package/modules/chunks/{index-_xAQ9uTd.mjs → index-DrSSNP9y.mjs} +2 -2
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/nuxt/index.mjs +5 -5
- package/package.json +6 -6
- package/types/components/MazBtn.vue.d.ts +2 -2
- package/types/components/MazCard.vue.d.ts +2 -0
- package/types/components/MazInputTags.vue.d.ts +4 -4
- package/types/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +8 -4
- package/types/components/MazPhoneNumberInput/use-maz-phone-number-input.d.ts +2 -2
- package/types/components/MazPhoneNumberInput.vue.d.ts +21 -8
- package/types/components/MazRadio.vue.d.ts +89 -92
- package/types/components/MazRadioButtons.vue.d.ts +84 -62
- package/types/components/MazSelect.vue.d.ts +12 -7
- package/types/components/MazSwitch.vue.d.ts +61 -67
- package/types/components/MazTextarea.vue.d.ts +23 -8
- package/components/chunks/MazBtn-Cpnby6Lb.mjs +0 -151
- package/components/chunks/MazBtn-D5q0p_mK.mjs +0 -151
- package/components/chunks/MazBtn-Koayc6g_.mjs +0 -151
- package/components/chunks/MazPhoneNumberInput-BDiyO_6j.mjs +0 -1423
- package/components/chunks/MazSelect-Cr1xT89o.mjs +0 -767
- package/components/chunks/MazSpinner-CdKm_Lcp.mjs +0 -38
- package/components/chunks/MazSpinner-CkdjTE0y.mjs +0 -38
- package/components/chunks/MazSpinner-CtMh7fIX.mjs +0 -38
- package/components/chunks/MazSpinner-DECa8Pby.mjs +0 -38
- package/components/chunks/MazSpinner-DMBy6mx3.mjs +0 -38
- package/components/chunks/MazSpinner-DPmNDRtT.mjs +0 -38
- package/components/chunks/MazSpinner-Dq4o-_GM.mjs +0 -38
- package/components/chunks/MazSpinner-DyE_USVF.mjs +0 -38
- package/components/chunks/MazTable-CIlP0a61.mjs +0 -1882
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type HTMLAttributes } from 'vue';
|
|
2
2
|
import type { Color, ModelValueSimple, Position, Size } from './types';
|
|
3
3
|
export type NormalizedOption = Record<string, ModelValueSimple>;
|
|
4
4
|
export type MazSelectOptionWithOptGroup = {
|
|
@@ -8,10 +8,10 @@ export type MazSelectOptionWithOptGroup = {
|
|
|
8
8
|
export type MazSelectOption = NormalizedOption | string | number | boolean | MazSelectOptionWithOptGroup;
|
|
9
9
|
export type { Color, Size, ModelValueSimple, Position };
|
|
10
10
|
export type Props = {
|
|
11
|
-
/**
|
|
12
|
-
style?:
|
|
13
|
-
/**
|
|
14
|
-
class?:
|
|
11
|
+
/** Style attribut of the component root element */
|
|
12
|
+
style?: HTMLAttributes['style'];
|
|
13
|
+
/** Class attribut of the component root element */
|
|
14
|
+
class?: HTMLAttributes['class'];
|
|
15
15
|
/** The id of the select */
|
|
16
16
|
id?: string;
|
|
17
17
|
/** The value of the select */
|
|
@@ -51,6 +51,8 @@ export type Props = {
|
|
|
51
51
|
/** The input will be displayed in full width */
|
|
52
52
|
block?: boolean;
|
|
53
53
|
};
|
|
54
|
+
declare function closeList(event?: Event): Promise<void>;
|
|
55
|
+
declare function openList(event?: Event): Promise<void>;
|
|
54
56
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
55
57
|
id: undefined;
|
|
56
58
|
class: undefined;
|
|
@@ -67,7 +69,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
67
69
|
color: string;
|
|
68
70
|
searchPlaceholder: string;
|
|
69
71
|
options: undefined;
|
|
70
|
-
}>, {
|
|
72
|
+
}>, {
|
|
73
|
+
openList: typeof openList;
|
|
74
|
+
closeList: typeof closeList;
|
|
75
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
71
76
|
close: (value?: Event | undefined) => void;
|
|
72
77
|
open: (value?: boolean | undefined) => void;
|
|
73
78
|
blur: (value?: Event | undefined) => void;
|
|
@@ -101,7 +106,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
101
106
|
"onSelected-option"?: ((option: MazSelectOption) => any) | undefined;
|
|
102
107
|
}, {
|
|
103
108
|
size: Size;
|
|
104
|
-
style: string | false | import("vue").CSSProperties | StyleValue[] | null;
|
|
109
|
+
style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
|
|
105
110
|
id: string;
|
|
106
111
|
options: MazSelectOption[];
|
|
107
112
|
color: Color;
|
|
@@ -1,83 +1,77 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type HTMLAttributes } from 'vue';
|
|
2
2
|
import type { Color } from './types';
|
|
3
3
|
export type { Color };
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
type: PropType<any>;
|
|
43
|
-
default: undefined;
|
|
44
|
-
};
|
|
45
|
-
modelValue: {
|
|
46
|
-
type: BooleanConstructor;
|
|
47
|
-
required: true;
|
|
48
|
-
};
|
|
49
|
-
id: {
|
|
50
|
-
type: StringConstructor;
|
|
51
|
-
default: undefined;
|
|
52
|
-
};
|
|
53
|
-
disabled: {
|
|
54
|
-
type: BooleanConstructor;
|
|
55
|
-
default: boolean;
|
|
56
|
-
};
|
|
57
|
-
name: {
|
|
58
|
-
type: StringConstructor;
|
|
59
|
-
default: undefined;
|
|
60
|
-
};
|
|
61
|
-
color: {
|
|
62
|
-
type: PropType<Color>;
|
|
63
|
-
default: string;
|
|
64
|
-
};
|
|
65
|
-
}>> & {
|
|
66
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
67
|
-
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
|
|
4
|
+
export type Props = {
|
|
5
|
+
/** Style attribut of the component root element */
|
|
6
|
+
style?: HTMLAttributes['style'];
|
|
7
|
+
/** Class attribut of the component root element */
|
|
8
|
+
class?: HTMLAttributes['class'];
|
|
9
|
+
/** The model value of the switch */
|
|
10
|
+
modelValue?: boolean;
|
|
11
|
+
/** The id of the switch */
|
|
12
|
+
id?: string;
|
|
13
|
+
/** If the switch is disabled */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** The name of the switch */
|
|
16
|
+
name?: string;
|
|
17
|
+
/** The color of the switch */
|
|
18
|
+
color?: Color;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
21
|
+
style: undefined;
|
|
22
|
+
class: undefined;
|
|
23
|
+
modelValue: boolean;
|
|
24
|
+
id: undefined;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
name: undefined;
|
|
27
|
+
color: string;
|
|
28
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
+
"update:model-value": (value: boolean) => void;
|
|
30
|
+
change: (value: boolean) => void;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
32
|
+
style: undefined;
|
|
33
|
+
class: undefined;
|
|
34
|
+
modelValue: boolean;
|
|
35
|
+
id: undefined;
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
name: undefined;
|
|
38
|
+
color: string;
|
|
39
|
+
}>>> & {
|
|
40
|
+
onChange?: ((value: boolean) => any) | undefined;
|
|
41
|
+
"onUpdate:model-value"?: ((value: boolean) => any) | undefined;
|
|
68
42
|
}, {
|
|
69
|
-
style: import("vue").StyleValue;
|
|
43
|
+
style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
|
|
70
44
|
name: string;
|
|
71
45
|
id: string;
|
|
72
46
|
disabled: boolean;
|
|
73
47
|
color: Color;
|
|
74
48
|
class: any;
|
|
49
|
+
modelValue: boolean;
|
|
75
50
|
}, {}>, {
|
|
76
|
-
default?(_: {
|
|
51
|
+
default?(_: {
|
|
52
|
+
value: boolean;
|
|
53
|
+
}): any;
|
|
77
54
|
}>;
|
|
78
55
|
export default _default;
|
|
56
|
+
type __VLS_WithDefaults<P, D> = {
|
|
57
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
58
|
+
default: D[K];
|
|
59
|
+
}> : P[K];
|
|
60
|
+
};
|
|
61
|
+
type __VLS_Prettify<T> = {
|
|
62
|
+
[K in keyof T]: T[K];
|
|
63
|
+
} & {};
|
|
79
64
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
80
65
|
new (): {
|
|
81
66
|
$slots: S;
|
|
82
67
|
};
|
|
83
68
|
};
|
|
69
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
70
|
+
type __VLS_TypePropsToOption<T> = {
|
|
71
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
72
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
73
|
+
} : {
|
|
74
|
+
type: import('vue').PropType<T[K]>;
|
|
75
|
+
required: true;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
@@ -2,20 +2,35 @@ import { type HTMLAttributes } from 'vue';
|
|
|
2
2
|
import type { Color } from './types';
|
|
3
3
|
export type { Color };
|
|
4
4
|
export type Props = {
|
|
5
|
+
/** Style attribut of the component root element */
|
|
5
6
|
style?: HTMLAttributes['style'];
|
|
7
|
+
/** Class attribut of the component root element */
|
|
6
8
|
class?: HTMLAttributes['class'];
|
|
9
|
+
/** @model The value of the textarea */
|
|
7
10
|
modelValue?: string;
|
|
11
|
+
/** The id of the textarea */
|
|
8
12
|
id?: string;
|
|
13
|
+
/** The name of the textarea */
|
|
9
14
|
name?: string;
|
|
15
|
+
/** The label of the textarea */
|
|
10
16
|
label?: string;
|
|
17
|
+
/** The placeholder of the textarea */
|
|
11
18
|
placeholder?: string;
|
|
19
|
+
/** If the textarea is required */
|
|
12
20
|
required?: boolean;
|
|
21
|
+
/** If the textarea is disabled */
|
|
13
22
|
disabled?: boolean;
|
|
23
|
+
/** If the textarea is readonly */
|
|
14
24
|
readonly?: boolean;
|
|
25
|
+
/** If the textarea has an error */
|
|
15
26
|
error?: boolean;
|
|
27
|
+
/** If the textarea has a success */
|
|
16
28
|
success?: boolean;
|
|
29
|
+
/** If the textarea has a warning */
|
|
17
30
|
warning?: boolean;
|
|
31
|
+
/** The hint of the textarea */
|
|
18
32
|
hint?: string;
|
|
33
|
+
/** The color of the textarea */
|
|
19
34
|
color?: Color;
|
|
20
35
|
};
|
|
21
36
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
@@ -35,10 +50,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
35
50
|
hint: undefined;
|
|
36
51
|
color: string;
|
|
37
52
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
|
-
input: (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
input: (value?: string | undefined) => void;
|
|
54
|
+
focus: (value: Event) => void;
|
|
55
|
+
blur: (value: Event) => void;
|
|
56
|
+
change: (value: Event) => void;
|
|
42
57
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
43
58
|
style: undefined;
|
|
44
59
|
class: undefined;
|
|
@@ -56,10 +71,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
56
71
|
hint: undefined;
|
|
57
72
|
color: string;
|
|
58
73
|
}>>> & {
|
|
59
|
-
onFocus?: ((
|
|
60
|
-
onBlur?: ((
|
|
61
|
-
onChange?: ((
|
|
62
|
-
onInput?: ((
|
|
74
|
+
onFocus?: ((value: Event) => any) | undefined;
|
|
75
|
+
onBlur?: ((value: Event) => any) | undefined;
|
|
76
|
+
onChange?: ((value: Event) => any) | undefined;
|
|
77
|
+
onInput?: ((value?: string | undefined) => any) | undefined;
|
|
63
78
|
}, {
|
|
64
79
|
label: string;
|
|
65
80
|
style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import '../assets/MazBtn.css';
|
|
2
|
-
import { defineComponent as E, defineAsyncComponent as h, useAttrs as R, useSlots as S, onBeforeMount as w, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as A, createElementBlock as u, createCommentVNode as t, renderSlot as d, unref as c } from "vue";
|
|
3
|
-
import { _ as D } from "./MazDialogPromise-BjciKAwR.mjs";
|
|
4
|
-
const P = /* @__PURE__ */ E({
|
|
5
|
-
__name: "MazBtn",
|
|
6
|
-
props: {
|
|
7
|
-
variant: { default: "button" },
|
|
8
|
-
size: { default: "md" },
|
|
9
|
-
color: { default: "primary" },
|
|
10
|
-
type: { default: "button" },
|
|
11
|
-
rounded: { type: Boolean },
|
|
12
|
-
noRounded: { type: Boolean },
|
|
13
|
-
outline: { type: Boolean },
|
|
14
|
-
pastel: { type: Boolean },
|
|
15
|
-
block: { type: Boolean },
|
|
16
|
-
noUnderline: { type: Boolean },
|
|
17
|
-
noLeading: { type: Boolean },
|
|
18
|
-
loading: { type: Boolean },
|
|
19
|
-
disabled: { type: Boolean },
|
|
20
|
-
fab: { type: Boolean },
|
|
21
|
-
icon: { default: void 0 },
|
|
22
|
-
leftIcon: { default: void 0 },
|
|
23
|
-
rightIcon: { default: void 0 },
|
|
24
|
-
noPadding: { type: Boolean },
|
|
25
|
-
noElevation: { type: Boolean },
|
|
26
|
-
contentClass: { default: void 0 }
|
|
27
|
-
},
|
|
28
|
-
setup(g) {
|
|
29
|
-
const B = h(() => import("./MazSpinner-CdKm_Lcp.mjs")), f = h(() => import("./MazIcon-Cxrv3_OK.mjs")), { href: k, to: I } = R(), p = S(), e = g;
|
|
30
|
-
w(() => {
|
|
31
|
-
e.icon && !e.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
|
|
32
|
-
});
|
|
33
|
-
const v = l(() => k ? "a" : I ? "router-link" : "button"), z = l(
|
|
34
|
-
() => e.pastel ? `--${e.color}-pastel` : e.outline ? `--${e.color}-outline` : `--${e.color}`
|
|
35
|
-
), m = l(
|
|
36
|
-
() => (e.loading || e.disabled) && v.value === "button"
|
|
37
|
-
), C = l(() => m.value ? "--cursor-default" : "--cursor-pointer"), $ = l(() => `--is-${e.variant}`), i = l(() => e.loading && e.variant === "button"), b = l(() => !!p["left-icon"] || e.leftIcon), y = l(() => !!p["right-icon"] || e.rightIcon), M = l(() => b.value || y.value), T = l(() => e.fab && (e.icon || !!p.icon)), L = l(() => v.value === "button" ? e.type : void 0);
|
|
38
|
-
return (o, U) => (n(), a(r(v.value), {
|
|
39
|
-
disabled: m.value,
|
|
40
|
-
class: s(["m-btn", [
|
|
41
|
-
`--${o.size}`,
|
|
42
|
-
z.value,
|
|
43
|
-
C.value,
|
|
44
|
-
$.value,
|
|
45
|
-
{
|
|
46
|
-
"--block": o.block,
|
|
47
|
-
"--no-underline": o.noUnderline,
|
|
48
|
-
"--no-leading": o.noLeading,
|
|
49
|
-
"--fab": o.fab,
|
|
50
|
-
"--loading": o.loading,
|
|
51
|
-
"--disabled": m.value,
|
|
52
|
-
"--icon": M.value,
|
|
53
|
-
"--rounded": o.rounded,
|
|
54
|
-
"--no-rounded": o.noRounded,
|
|
55
|
-
"--no-padding": o.noPadding,
|
|
56
|
-
"--no-elevation": o.noElevation
|
|
57
|
-
}
|
|
58
|
-
]]),
|
|
59
|
-
type: L.value
|
|
60
|
-
}, {
|
|
61
|
-
default: A(() => [
|
|
62
|
-
b.value ? (n(), u(
|
|
63
|
-
"div",
|
|
64
|
-
{
|
|
65
|
-
key: 0,
|
|
66
|
-
class: s(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": i.value }])
|
|
67
|
-
},
|
|
68
|
-
[
|
|
69
|
-
t(`
|
|
70
|
-
@slot left-icon - The icon to display on the left of the button
|
|
71
|
-
`),
|
|
72
|
-
d(o.$slots, "left-icon", {}, () => [
|
|
73
|
-
typeof o.leftIcon == "string" ? (n(), a(c(f), {
|
|
74
|
-
key: 0,
|
|
75
|
-
name: o.leftIcon
|
|
76
|
-
}, null, 8, ["name"])) : o.leftIcon ? (n(), a(r(o.leftIcon), { key: 1 })) : t("v-if", !0)
|
|
77
|
-
], !0)
|
|
78
|
-
],
|
|
79
|
-
2
|
|
80
|
-
/* CLASS */
|
|
81
|
-
)) : t("v-if", !0),
|
|
82
|
-
T.value ? (n(), u(
|
|
83
|
-
"div",
|
|
84
|
-
{
|
|
85
|
-
key: 1,
|
|
86
|
-
class: s(["m-btn__icon", { "maz-invisible": i.value }])
|
|
87
|
-
},
|
|
88
|
-
[
|
|
89
|
-
t(`
|
|
90
|
-
@slot icon - The icon to display on the fab button
|
|
91
|
-
`),
|
|
92
|
-
d(o.$slots, "icon", {}, () => [
|
|
93
|
-
typeof o.icon == "string" ? (n(), a(c(f), {
|
|
94
|
-
key: 0,
|
|
95
|
-
name: o.icon
|
|
96
|
-
}, null, 8, ["name"])) : o.icon ? (n(), a(r(o.icon), { key: 1 })) : t("v-if", !0)
|
|
97
|
-
], !0)
|
|
98
|
-
],
|
|
99
|
-
2
|
|
100
|
-
/* CLASS */
|
|
101
|
-
)) : t("v-if", !0),
|
|
102
|
-
o.$slots.default ? (n(), u(
|
|
103
|
-
"span",
|
|
104
|
-
{
|
|
105
|
-
key: 2,
|
|
106
|
-
class: s([{ "maz-invisible": i.value }, o.contentClass])
|
|
107
|
-
},
|
|
108
|
-
[
|
|
109
|
-
t(`
|
|
110
|
-
@slot default - The content of the button
|
|
111
|
-
`),
|
|
112
|
-
d(o.$slots, "default", {}, void 0, !0)
|
|
113
|
-
],
|
|
114
|
-
2
|
|
115
|
-
/* CLASS */
|
|
116
|
-
)) : t("v-if", !0),
|
|
117
|
-
y.value ? (n(), u(
|
|
118
|
-
"div",
|
|
119
|
-
{
|
|
120
|
-
key: 3,
|
|
121
|
-
class: s(["m-btn__icon-right", { "maz-invisible": i.value }])
|
|
122
|
-
},
|
|
123
|
-
[
|
|
124
|
-
t(`
|
|
125
|
-
@slot right-icon - The icon to display on the right of the button
|
|
126
|
-
`),
|
|
127
|
-
d(o.$slots, "right-icon", {}, () => [
|
|
128
|
-
typeof o.rightIcon == "string" ? (n(), a(c(f), {
|
|
129
|
-
key: 0,
|
|
130
|
-
name: o.rightIcon
|
|
131
|
-
}, null, 8, ["name"])) : o.rightIcon ? (n(), a(r(o.rightIcon), { key: 1 })) : t("v-if", !0)
|
|
132
|
-
], !0)
|
|
133
|
-
],
|
|
134
|
-
2
|
|
135
|
-
/* CLASS */
|
|
136
|
-
)) : t("v-if", !0),
|
|
137
|
-
i.value ? (n(), a(c(B), {
|
|
138
|
-
key: 4,
|
|
139
|
-
class: "m-btn-loader",
|
|
140
|
-
size: "2em",
|
|
141
|
-
color: o.color
|
|
142
|
-
}, null, 8, ["color"])) : t("v-if", !0)
|
|
143
|
-
]),
|
|
144
|
-
_: 3
|
|
145
|
-
/* FORWARDED */
|
|
146
|
-
}, 8, ["disabled", "class", "type"]));
|
|
147
|
-
}
|
|
148
|
-
}), V = /* @__PURE__ */ D(P, [["__scopeId", "data-v-395e94fc"]]);
|
|
149
|
-
export {
|
|
150
|
-
V as default
|
|
151
|
-
};
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import '../assets/MazBtn.css';
|
|
2
|
-
import { defineComponent as E, defineAsyncComponent as h, useAttrs as R, useSlots as S, onBeforeMount as w, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as A, createElementBlock as u, createCommentVNode as t, renderSlot as d, unref as c } from "vue";
|
|
3
|
-
import { _ as D } from "./MazPhoneNumberInput-BDiyO_6j.mjs";
|
|
4
|
-
const P = /* @__PURE__ */ E({
|
|
5
|
-
__name: "MazBtn",
|
|
6
|
-
props: {
|
|
7
|
-
variant: { default: "button" },
|
|
8
|
-
size: { default: "md" },
|
|
9
|
-
color: { default: "primary" },
|
|
10
|
-
type: { default: "button" },
|
|
11
|
-
rounded: { type: Boolean },
|
|
12
|
-
noRounded: { type: Boolean },
|
|
13
|
-
outline: { type: Boolean },
|
|
14
|
-
pastel: { type: Boolean },
|
|
15
|
-
block: { type: Boolean },
|
|
16
|
-
noUnderline: { type: Boolean },
|
|
17
|
-
noLeading: { type: Boolean },
|
|
18
|
-
loading: { type: Boolean },
|
|
19
|
-
disabled: { type: Boolean },
|
|
20
|
-
fab: { type: Boolean },
|
|
21
|
-
icon: { default: void 0 },
|
|
22
|
-
leftIcon: { default: void 0 },
|
|
23
|
-
rightIcon: { default: void 0 },
|
|
24
|
-
noPadding: { type: Boolean },
|
|
25
|
-
noElevation: { type: Boolean },
|
|
26
|
-
contentClass: { default: void 0 }
|
|
27
|
-
},
|
|
28
|
-
setup(g) {
|
|
29
|
-
const B = h(() => import("./MazSpinner-DPmNDRtT.mjs")), f = h(() => import("./MazIcon-Cxrv3_OK.mjs")), { href: k, to: I } = R(), p = S(), e = g;
|
|
30
|
-
w(() => {
|
|
31
|
-
e.icon && !e.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
|
|
32
|
-
});
|
|
33
|
-
const v = l(() => k ? "a" : I ? "router-link" : "button"), z = l(
|
|
34
|
-
() => e.pastel ? `--${e.color}-pastel` : e.outline ? `--${e.color}-outline` : `--${e.color}`
|
|
35
|
-
), m = l(
|
|
36
|
-
() => (e.loading || e.disabled) && v.value === "button"
|
|
37
|
-
), C = l(() => m.value ? "--cursor-default" : "--cursor-pointer"), $ = l(() => `--is-${e.variant}`), i = l(() => e.loading && e.variant === "button"), b = l(() => !!p["left-icon"] || e.leftIcon), y = l(() => !!p["right-icon"] || e.rightIcon), M = l(() => b.value || y.value), T = l(() => e.fab && (e.icon || !!p.icon)), L = l(() => v.value === "button" ? e.type : void 0);
|
|
38
|
-
return (o, U) => (n(), a(r(v.value), {
|
|
39
|
-
disabled: m.value,
|
|
40
|
-
class: s(["m-btn", [
|
|
41
|
-
`--${o.size}`,
|
|
42
|
-
z.value,
|
|
43
|
-
C.value,
|
|
44
|
-
$.value,
|
|
45
|
-
{
|
|
46
|
-
"--block": o.block,
|
|
47
|
-
"--no-underline": o.noUnderline,
|
|
48
|
-
"--no-leading": o.noLeading,
|
|
49
|
-
"--fab": o.fab,
|
|
50
|
-
"--loading": o.loading,
|
|
51
|
-
"--disabled": m.value,
|
|
52
|
-
"--icon": M.value,
|
|
53
|
-
"--rounded": o.rounded,
|
|
54
|
-
"--no-rounded": o.noRounded,
|
|
55
|
-
"--no-padding": o.noPadding,
|
|
56
|
-
"--no-elevation": o.noElevation
|
|
57
|
-
}
|
|
58
|
-
]]),
|
|
59
|
-
type: L.value
|
|
60
|
-
}, {
|
|
61
|
-
default: A(() => [
|
|
62
|
-
b.value ? (n(), u(
|
|
63
|
-
"div",
|
|
64
|
-
{
|
|
65
|
-
key: 0,
|
|
66
|
-
class: s(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": i.value }])
|
|
67
|
-
},
|
|
68
|
-
[
|
|
69
|
-
t(`
|
|
70
|
-
@slot left-icon - The icon to display on the left of the button
|
|
71
|
-
`),
|
|
72
|
-
d(o.$slots, "left-icon", {}, () => [
|
|
73
|
-
typeof o.leftIcon == "string" ? (n(), a(c(f), {
|
|
74
|
-
key: 0,
|
|
75
|
-
name: o.leftIcon
|
|
76
|
-
}, null, 8, ["name"])) : o.leftIcon ? (n(), a(r(o.leftIcon), { key: 1 })) : t("v-if", !0)
|
|
77
|
-
], !0)
|
|
78
|
-
],
|
|
79
|
-
2
|
|
80
|
-
/* CLASS */
|
|
81
|
-
)) : t("v-if", !0),
|
|
82
|
-
T.value ? (n(), u(
|
|
83
|
-
"div",
|
|
84
|
-
{
|
|
85
|
-
key: 1,
|
|
86
|
-
class: s(["m-btn__icon", { "maz-invisible": i.value }])
|
|
87
|
-
},
|
|
88
|
-
[
|
|
89
|
-
t(`
|
|
90
|
-
@slot icon - The icon to display on the fab button
|
|
91
|
-
`),
|
|
92
|
-
d(o.$slots, "icon", {}, () => [
|
|
93
|
-
typeof o.icon == "string" ? (n(), a(c(f), {
|
|
94
|
-
key: 0,
|
|
95
|
-
name: o.icon
|
|
96
|
-
}, null, 8, ["name"])) : o.icon ? (n(), a(r(o.icon), { key: 1 })) : t("v-if", !0)
|
|
97
|
-
], !0)
|
|
98
|
-
],
|
|
99
|
-
2
|
|
100
|
-
/* CLASS */
|
|
101
|
-
)) : t("v-if", !0),
|
|
102
|
-
o.$slots.default ? (n(), u(
|
|
103
|
-
"span",
|
|
104
|
-
{
|
|
105
|
-
key: 2,
|
|
106
|
-
class: s([{ "maz-invisible": i.value }, o.contentClass])
|
|
107
|
-
},
|
|
108
|
-
[
|
|
109
|
-
t(`
|
|
110
|
-
@slot default - The content of the button
|
|
111
|
-
`),
|
|
112
|
-
d(o.$slots, "default", {}, void 0, !0)
|
|
113
|
-
],
|
|
114
|
-
2
|
|
115
|
-
/* CLASS */
|
|
116
|
-
)) : t("v-if", !0),
|
|
117
|
-
y.value ? (n(), u(
|
|
118
|
-
"div",
|
|
119
|
-
{
|
|
120
|
-
key: 3,
|
|
121
|
-
class: s(["m-btn__icon-right", { "maz-invisible": i.value }])
|
|
122
|
-
},
|
|
123
|
-
[
|
|
124
|
-
t(`
|
|
125
|
-
@slot right-icon - The icon to display on the right of the button
|
|
126
|
-
`),
|
|
127
|
-
d(o.$slots, "right-icon", {}, () => [
|
|
128
|
-
typeof o.rightIcon == "string" ? (n(), a(c(f), {
|
|
129
|
-
key: 0,
|
|
130
|
-
name: o.rightIcon
|
|
131
|
-
}, null, 8, ["name"])) : o.rightIcon ? (n(), a(r(o.rightIcon), { key: 1 })) : t("v-if", !0)
|
|
132
|
-
], !0)
|
|
133
|
-
],
|
|
134
|
-
2
|
|
135
|
-
/* CLASS */
|
|
136
|
-
)) : t("v-if", !0),
|
|
137
|
-
i.value ? (n(), a(c(B), {
|
|
138
|
-
key: 4,
|
|
139
|
-
class: "m-btn-loader",
|
|
140
|
-
size: "2em",
|
|
141
|
-
color: o.color
|
|
142
|
-
}, null, 8, ["color"])) : t("v-if", !0)
|
|
143
|
-
]),
|
|
144
|
-
_: 3
|
|
145
|
-
/* FORWARDED */
|
|
146
|
-
}, 8, ["disabled", "class", "type"]));
|
|
147
|
-
}
|
|
148
|
-
}), V = /* @__PURE__ */ D(P, [["__scopeId", "data-v-395e94fc"]]);
|
|
149
|
-
export {
|
|
150
|
-
V as default
|
|
151
|
-
};
|