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.
Files changed (137) hide show
  1. package/components/MazBottomSheet.mjs +1 -1
  2. package/components/MazBtn.d.ts +2 -2
  3. package/components/MazBtn.mjs +1 -1
  4. package/components/MazCard.d.ts +2 -0
  5. package/components/MazCard.mjs +1 -1
  6. package/components/MazCarousel.mjs +1 -1
  7. package/components/MazDialog.mjs +1 -1
  8. package/components/MazDialogPromise.mjs +1 -1
  9. package/components/MazDrawer.mjs +1 -1
  10. package/components/MazDropdown.mjs +1 -1
  11. package/components/MazInput.mjs +1 -1
  12. package/components/MazInputNumber.mjs +1 -1
  13. package/components/MazInputPrice.mjs +1 -1
  14. package/components/MazInputTags.d.ts +4 -4
  15. package/components/MazInputTags.mjs +1 -1
  16. package/components/MazPagination.mjs +1 -1
  17. package/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +8 -4
  18. package/components/MazPhoneNumberInput/use-maz-phone-number-input.d.ts +2 -2
  19. package/components/MazPhoneNumberInput.d.ts +21 -8
  20. package/components/MazPhoneNumberInput.mjs +1 -1
  21. package/components/MazPicker.mjs +1 -1
  22. package/components/MazRadio.d.ts +89 -92
  23. package/components/MazRadio.mjs +67 -73
  24. package/components/MazRadioButtons.d.ts +84 -62
  25. package/components/MazRadioButtons.mjs +112 -60
  26. package/components/MazSelect.d.ts +12 -7
  27. package/components/MazSelect.mjs +1 -1
  28. package/components/MazSwitch.d.ts +61 -67
  29. package/components/MazSwitch.mjs +41 -48
  30. package/components/MazTable.mjs +1 -1
  31. package/components/MazTextarea.d.ts +23 -8
  32. package/components/MazTextarea.mjs +1 -1
  33. package/components/assets/MazBtn.css +1 -1
  34. package/components/assets/MazCard.css +1 -1
  35. package/components/assets/MazInputNumber.css +1 -1
  36. package/components/assets/MazInputTags.css +1 -1
  37. package/components/assets/MazPagination.css +1 -1
  38. package/components/assets/MazPhoneNumberInput.css +1 -1
  39. package/components/assets/MazRadio.css +1 -1
  40. package/components/assets/MazRadioButtons.css +1 -1
  41. package/components/assets/MazSelect.css +1 -1
  42. package/components/assets/MazSwitch.css +1 -1
  43. package/components/assets/MazTable.css +1 -1
  44. package/components/assets/MazTextarea.css +1 -1
  45. package/components/chunks/{MazBottomSheet-DZ1n4bGL.mjs → MazBottomSheet-B9OYmgyx.mjs} +1 -1
  46. package/components/chunks/{MazBtn-CnZU5zlG.mjs → MazBtn-4stpYG-V.mjs} +8 -8
  47. package/components/chunks/{MazBtn-BJs3rzUf.mjs → MazBtn-BQZOiUux.mjs} +8 -8
  48. package/components/chunks/{MazBtn-DLYgzr9e.mjs → MazBtn-Bgt41rUb.mjs} +11 -11
  49. package/components/chunks/MazBtn-CNyFbl9Y.mjs +151 -0
  50. package/components/chunks/{MazBtn-BTHDxDz7.mjs → MazBtn-CrNEwd_M.mjs} +8 -8
  51. package/components/chunks/MazBtn-CyXtFeAh.mjs +151 -0
  52. package/components/chunks/{MazBtn-CnkBOGKK.mjs → MazBtn-DOtOjQOl.mjs} +11 -11
  53. package/components/chunks/{MazBtn-IH6bjzah.mjs → MazBtn-DXC8jXNK.mjs} +8 -8
  54. package/components/chunks/{MazBtn-Dbe098kd.mjs → MazBtn-De3ZeaJJ.mjs} +8 -8
  55. package/components/chunks/{MazBtn-CDQAW3fg.mjs → MazBtn-g6VJMuer.mjs} +8 -8
  56. package/components/chunks/MazBtn-v1mwE1O3.mjs +151 -0
  57. package/components/chunks/{MazBtn-pLRsSxug.mjs → MazBtn-z9IFp0ZS.mjs} +8 -8
  58. package/components/chunks/{MazCard-CNE9c3L5.mjs → MazCard-E9Eg2VRn.mjs} +10 -8
  59. package/components/chunks/{MazCarousel-CMJgMJf1.mjs → MazCarousel-CtSpgIm6.mjs} +1 -1
  60. package/components/chunks/{MazCheckbox-DJBo7Ejt.mjs → MazCheckbox-BE7eLIkK.mjs} +1 -1
  61. package/components/chunks/{MazCheckbox-CM7mucQa.mjs → MazCheckbox-eSSrvpn9.mjs} +1 -1
  62. package/components/chunks/{MazDialog-BVqOTysP.mjs → MazDialog-CjsC6fGo.mjs} +1 -1
  63. package/components/chunks/{MazDialogPromise-BjciKAwR.mjs → MazDialogPromise-Blv60XZR.mjs} +2 -2
  64. package/components/chunks/{MazGallery-BUUq89aM.mjs → MazGallery-DRgvR7K0.mjs} +2 -2
  65. package/components/chunks/{MazIcon-BKfQ_rkt.mjs → MazIcon-C_IIdjqr.mjs} +1 -1
  66. package/components/chunks/{MazInput-Caas-0Nk.mjs → MazInput-Dn4JzYhe.mjs} +1 -1
  67. package/components/chunks/{MazInputNumber-CnoCQQzg.mjs → MazInputNumber-Df31nPnc.mjs} +2 -2
  68. package/components/chunks/{MazInputPrice---5nCUKm.mjs → MazInputPrice-DATyEiwP.mjs} +1 -1
  69. package/components/chunks/{MazInputTags-CipoVBP2.mjs → MazInputTags-DBzwE87F.mjs} +3 -3
  70. package/components/chunks/{MazPagination-CXw3yqbu.mjs → MazPagination-BU6fSHr2.mjs} +2 -2
  71. package/components/chunks/MazPhoneNumberInput-D8hP4ZzW.mjs +1419 -0
  72. package/components/chunks/{MazPicker-CfhI75aw.mjs → MazPicker-D71j9m8h.mjs} +2 -2
  73. package/components/chunks/{MazPickerCalendar-DnkNE-Am.mjs → MazPickerCalendar-psuBcTR7.mjs} +3 -3
  74. package/components/chunks/{MazPickerHeader-Vt86yzXS.mjs → MazPickerHeader-BmqHJE0a.mjs} +1 -1
  75. package/components/chunks/{MazPickerMonthSwitcher-zfKhsjW1.mjs → MazPickerMonthSwitcher-DgU0pLkF.mjs} +2 -2
  76. package/components/chunks/{MazPickerShortcuts-DUIKfOO8.mjs → MazPickerShortcuts-D9YXi3Ns.mjs} +2 -2
  77. package/components/chunks/{MazPickerTime-B2znRxr2.mjs → MazPickerTime-8ZqSEb_N.mjs} +2 -2
  78. package/components/chunks/{MazPickerYearSwitcher-CB339kof.mjs → MazPickerYearSwitcher-D-zu0tMs.mjs} +3 -3
  79. package/components/chunks/MazSelect-Cc8JAFML.mjs +731 -0
  80. package/components/chunks/{MazSpinner-DFseK3o_.mjs → MazSpinner-2-OAJWTi.mjs} +1 -1
  81. package/components/chunks/MazSpinner-B0xEVmcj.mjs +38 -0
  82. package/components/chunks/{MazSpinner-2fDI3i5h.mjs → MazSpinner-B3Gt0AEt.mjs} +1 -1
  83. package/components/chunks/MazSpinner-B6Z6X_KC.mjs +38 -0
  84. package/components/chunks/{MazSpinner-CORsBFCP.mjs → MazSpinner-BVaJBGw5.mjs} +1 -1
  85. package/components/chunks/{MazSpinner-CVBVegaS.mjs → MazSpinner-BVflp3wp.mjs} +1 -1
  86. package/components/chunks/MazSpinner-BmqyUsTZ.mjs +38 -0
  87. package/components/chunks/{MazSpinner-XMLkiLTL.mjs → MazSpinner-Btk7fYzq.mjs} +1 -1
  88. package/components/chunks/{MazSpinner-BtFWH26r.mjs → MazSpinner-CAQqdZfW.mjs} +1 -1
  89. package/components/chunks/MazSpinner-COqX5baD.mjs +38 -0
  90. package/components/chunks/{MazSpinner-Bky73siD.mjs → MazSpinner-CV3h3CKR.mjs} +1 -1
  91. package/components/chunks/MazSpinner-Cm5GeVV-.mjs +38 -0
  92. package/components/chunks/{MazSpinner-CkHAaRhk.mjs → MazSpinner-D9uDPRkX.mjs} +1 -1
  93. package/components/chunks/MazSpinner-DO1id61e.mjs +38 -0
  94. package/components/chunks/MazSpinner-K26cuR_A.mjs +38 -0
  95. package/components/chunks/MazSpinner-LCpiZGMP.mjs +38 -0
  96. package/components/chunks/MazTable-vcm_SC7e.mjs +1846 -0
  97. package/components/chunks/{MazTransitionExpand-BWsQP7UF.mjs → MazTransitionExpand-DXKtquVe.mjs} +1 -1
  98. package/css/main.css +1 -1
  99. package/modules/assets/MazBtn.css +1 -1
  100. package/modules/chunks/{MazBtn-BxYYeNGe.mjs → MazBtn-CNsgLyRm.mjs} +8 -8
  101. package/modules/chunks/{MazBtn-CHUwa3fu.cjs → MazBtn-DmXrGuUE.cjs} +2 -2
  102. package/modules/chunks/{MazIcon-CnOCvJTw.mjs → MazIcon-DwRWkhhR.mjs} +1 -1
  103. package/modules/chunks/{MazIcon-DcbutTbM.cjs → MazIcon-rh9PwwaQ.cjs} +1 -1
  104. package/modules/chunks/{MazSpinner-TL9_4BOs.cjs → MazSpinner-BzucVZXm.cjs} +1 -1
  105. package/modules/chunks/{MazSpinner-ClFhZyF_.mjs → MazSpinner-mCJd14Kq.mjs} +1 -1
  106. package/modules/chunks/{index-DksGhf51.cjs → index-DHsybBwE.cjs} +1 -1
  107. package/modules/chunks/{index-_xAQ9uTd.mjs → index-DrSSNP9y.mjs} +2 -2
  108. package/modules/index.cjs +1 -1
  109. package/modules/index.mjs +1 -1
  110. package/nuxt/index.json +1 -1
  111. package/nuxt/index.mjs +5 -5
  112. package/package.json +6 -6
  113. package/types/components/MazBtn.vue.d.ts +2 -2
  114. package/types/components/MazCard.vue.d.ts +2 -0
  115. package/types/components/MazInputTags.vue.d.ts +4 -4
  116. package/types/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +8 -4
  117. package/types/components/MazPhoneNumberInput/use-maz-phone-number-input.d.ts +2 -2
  118. package/types/components/MazPhoneNumberInput.vue.d.ts +21 -8
  119. package/types/components/MazRadio.vue.d.ts +89 -92
  120. package/types/components/MazRadioButtons.vue.d.ts +84 -62
  121. package/types/components/MazSelect.vue.d.ts +12 -7
  122. package/types/components/MazSwitch.vue.d.ts +61 -67
  123. package/types/components/MazTextarea.vue.d.ts +23 -8
  124. package/components/chunks/MazBtn-Cpnby6Lb.mjs +0 -151
  125. package/components/chunks/MazBtn-D5q0p_mK.mjs +0 -151
  126. package/components/chunks/MazBtn-Koayc6g_.mjs +0 -151
  127. package/components/chunks/MazPhoneNumberInput-BDiyO_6j.mjs +0 -1423
  128. package/components/chunks/MazSelect-Cr1xT89o.mjs +0 -767
  129. package/components/chunks/MazSpinner-CdKm_Lcp.mjs +0 -38
  130. package/components/chunks/MazSpinner-CkdjTE0y.mjs +0 -38
  131. package/components/chunks/MazSpinner-CtMh7fIX.mjs +0 -38
  132. package/components/chunks/MazSpinner-DECa8Pby.mjs +0 -38
  133. package/components/chunks/MazSpinner-DMBy6mx3.mjs +0 -38
  134. package/components/chunks/MazSpinner-DPmNDRtT.mjs +0 -38
  135. package/components/chunks/MazSpinner-Dq4o-_GM.mjs +0 -38
  136. package/components/chunks/MazSpinner-DyE_USVF.mjs +0 -38
  137. package/components/chunks/MazTable-CIlP0a61.mjs +0 -1882
@@ -1,4 +1,4 @@
1
- import { type StyleValue } from 'vue';
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
- /** The style of the select */
12
- style?: StyleValue;
13
- /** The class of the select */
14
- class?: any;
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
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
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 PropType } from 'vue';
1
+ import { type HTMLAttributes } from 'vue';
2
2
  import type { Color } from './types';
3
3
  export type { Color };
4
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
5
- style: {
6
- type: PropType<import("vue").StyleValue>;
7
- default: undefined;
8
- };
9
- class: {
10
- type: PropType<any>;
11
- default: undefined;
12
- };
13
- modelValue: {
14
- type: BooleanConstructor;
15
- required: true;
16
- };
17
- id: {
18
- type: StringConstructor;
19
- default: undefined;
20
- };
21
- disabled: {
22
- type: BooleanConstructor;
23
- default: boolean;
24
- };
25
- name: {
26
- type: StringConstructor;
27
- default: undefined;
28
- };
29
- color: {
30
- type: PropType<Color>;
31
- default: string;
32
- };
33
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
34
- change: (...args: any[]) => void;
35
- "update:model-value": (...args: any[]) => void;
36
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
37
- style: {
38
- type: PropType<import("vue").StyleValue>;
39
- default: undefined;
40
- };
41
- class: {
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?(_: {}): any;
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: (...args: any[]) => void;
39
- blur: (...args: any[]) => void;
40
- change: (...args: any[]) => void;
41
- focus: (...args: any[]) => void;
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?: ((...args: any[]) => any) | undefined;
60
- onBlur?: ((...args: any[]) => any) | undefined;
61
- onChange?: ((...args: any[]) => any) | undefined;
62
- onInput?: ((...args: any[]) => any) | undefined;
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
- };