maz-ui 3.44.0 → 3.44.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/components/MazAccordion.mjs +25 -25
  2. package/components/MazAvatar.mjs +1 -1
  3. package/components/MazBottomSheet.mjs +1 -1
  4. package/components/MazBtn.mjs +1 -1
  5. package/components/MazCard.mjs +1 -1
  6. package/components/MazCardSpotlight.mjs +9 -9
  7. package/components/MazCarousel.mjs +1 -1
  8. package/components/MazDialog.mjs +1 -1
  9. package/components/MazDialogPromise.mjs +1 -1
  10. package/components/MazDrawer.mjs +1 -1
  11. package/components/MazDropdown.mjs +1 -1
  12. package/components/MazDropzone.mjs +1 -1
  13. package/components/MazGallery.mjs +1 -1
  14. package/components/MazInput.mjs +1 -1
  15. package/components/MazInputNumber.mjs +1 -1
  16. package/components/MazInputPrice.mjs +1 -1
  17. package/components/MazInputTags.mjs +1 -1
  18. package/components/MazLazyImg.mjs +1 -1
  19. package/components/MazLink.mjs +22 -22
  20. package/components/MazPagination.mjs +1 -1
  21. package/components/MazPhoneNumberInput.mjs +1 -1
  22. package/components/MazPicker.mjs +1 -1
  23. package/components/MazReadingProgressBar.mjs +1 -2
  24. package/components/MazSelect.mjs +1 -1
  25. package/components/MazTable.mjs +1 -1
  26. package/components/MazTextarea.mjs +1 -1
  27. package/components/assets/MazPhoneNumberInput.css +1 -1
  28. package/components/assets/MazSelect.css +1 -1
  29. package/components/assets/MazTable.css +1 -1
  30. package/components/assets/MazTabsBar.css +1 -1
  31. package/components/chunks/{MazAvatar-BU1nJFcV.mjs → MazAvatar-CoT6WIl0.mjs} +1 -1
  32. package/components/chunks/{MazBottomSheet-DUOIusEi.mjs → MazBottomSheet-DpI8wFgc.mjs} +1 -1
  33. package/components/chunks/MazBtn-BIVlttu0.mjs +150 -0
  34. package/components/chunks/MazBtn-BQ7aH6Qe.mjs +158 -0
  35. package/components/chunks/{MazBtn-5BSKOcqG.mjs → MazBtn-BXDpaXn1.mjs} +44 -44
  36. package/components/chunks/MazBtn-C7RDTnn-.mjs +150 -0
  37. package/components/chunks/{MazBtn-BY8WCtM7.mjs → MazBtn-CPkNymJj.mjs} +44 -44
  38. package/components/chunks/{MazBtn-C5G78zLg.mjs → MazBtn-CQSo596y.mjs} +44 -44
  39. package/components/chunks/MazBtn-D2tIsob2.mjs +150 -0
  40. package/components/chunks/MazBtn-DRTBFUgW.mjs +150 -0
  41. package/components/chunks/{MazBtn-f1mBXJeU.mjs → MazBtn-Dfz-5FeI.mjs} +23 -26
  42. package/components/chunks/{MazBtn-CeVwyYR5.mjs → MazBtn-Vas62hFD.mjs} +44 -44
  43. package/components/chunks/MazBtn-gE-drZkE.mjs +150 -0
  44. package/components/chunks/{MazCard-BWxV_Z-i.mjs → MazCard-BBwohtCJ.mjs} +1 -1
  45. package/components/chunks/{MazCarousel-D5EmW7Sa.mjs → MazCarousel-DJ_nQfy4.mjs} +1 -1
  46. package/components/chunks/{MazCheckbox-D3PXkt75.mjs → MazCheckbox-BK1MX0uq.mjs} +1 -1
  47. package/components/chunks/{MazCheckbox-BWiMbecz.mjs → MazCheckbox-D3Fm-BFu.mjs} +1 -1
  48. package/components/chunks/{MazDialog-CLWKCphI.mjs → MazDialog-DXaeCp-b.mjs} +1 -1
  49. package/components/chunks/{MazDialogPromise-DVOJwdVp.mjs → MazDialogPromise-Bgxjg9ss.mjs} +2 -2
  50. package/components/chunks/{MazDropzone-Dm2IirHm.mjs → MazDropzone-D0W0dlgY.mjs} +2 -3
  51. package/components/chunks/{MazGallery-Bn9p1gNb.mjs → MazGallery-CBE4wD7D.mjs} +3 -4
  52. package/components/chunks/{MazGallery-BlfPe8WG.mjs → MazGallery-Din0Z37d.mjs} +4 -5
  53. package/components/chunks/{MazIcon-D3umgnku.mjs → MazIcon-CTjWIkTp.mjs} +1 -1
  54. package/components/chunks/{MazIcon-B8A0hQAH.mjs → MazIcon-CUOwXGOK.mjs} +1 -1
  55. package/components/chunks/{MazInput-BpsE-mdg.mjs → MazInput-D177bUMh.mjs} +44 -44
  56. package/components/chunks/{MazInputNumber-DGBYbDSX.mjs → MazInputNumber-CstQGS8u.mjs} +121 -121
  57. package/components/chunks/{MazInputPrice-j2BNMeFp.mjs → MazInputPrice-Bp7ie9jm.mjs} +48 -48
  58. package/components/chunks/{MazInputTags-CJofVaj5.mjs → MazInputTags-C7nZucYu.mjs} +63 -63
  59. package/components/chunks/{MazLazyImg-Dboc6Xfz.mjs → MazLazyImg-DADMg49z.mjs} +3 -4
  60. package/components/chunks/{MazLazyImg-BFG6FIJZ.mjs → MazLazyImg-xLPMdfif.mjs} +4 -5
  61. package/components/chunks/{MazPagination-C6ZehQSZ.mjs → MazPagination-NbHR41CQ.mjs} +44 -44
  62. package/components/chunks/{MazPhoneNumberInput-DpWoNQfx.mjs → MazPhoneNumberInput-BGo-vcnD.mjs} +61 -61
  63. package/components/chunks/{MazPicker-ia2BEmm5.mjs → MazPicker-CJBezF2t.mjs} +173 -198
  64. package/components/chunks/{MazPickerMonthSwitcher-CKtfZ_m-.mjs → MazPickerMonthSwitcher-DZPHWTJt.mjs} +1 -1
  65. package/components/chunks/{MazPickerShortcuts-Cc9VoqBw.mjs → MazPickerShortcuts-CBEmYjPG.mjs} +1 -1
  66. package/components/chunks/{MazPickerYearSwitcher-0b5Wrem9.mjs → MazPickerYearSwitcher-Ynp2qf3F.mjs} +1 -1
  67. package/components/chunks/{MazSelect-COJoKXbV.mjs → MazSelect-D4TuCHwj.mjs} +29 -29
  68. package/components/chunks/{MazSpinner-BaAMq7LI.mjs → MazSpinner--h9DYpGx.mjs} +1 -1
  69. package/components/chunks/{MazSpinner-BZOjTZBN.mjs → MazSpinner-6pxbKImG.mjs} +1 -1
  70. package/components/chunks/{MazSpinner-RvDGcBng.mjs → MazSpinner-BVd7-OTu.mjs} +1 -1
  71. package/components/chunks/MazSpinner-C6T_enKo.mjs +37 -0
  72. package/components/chunks/{MazSpinner-DkXequnp.mjs → MazSpinner-C8x7LsHq.mjs} +1 -1
  73. package/components/chunks/{MazSpinner-V-bFi71W.mjs → MazSpinner-CLz4ccD0.mjs} +1 -1
  74. package/components/chunks/MazSpinner-CmJlBqgH.mjs +37 -0
  75. package/components/chunks/MazSpinner-D4gpZ7vL.mjs +37 -0
  76. package/components/chunks/{MazSpinner-CNIlbDfg.mjs → MazSpinner-D8k_MENa.mjs} +1 -1
  77. package/components/chunks/MazSpinner-DGxqly6h.mjs +37 -0
  78. package/components/chunks/{MazSpinner-9Jue6cel.mjs → MazSpinner-DVkxyBoy.mjs} +1 -1
  79. package/components/chunks/{MazSpinner-BGPOws6a.mjs → MazSpinner-DjR5FVqo.mjs} +1 -1
  80. package/components/chunks/MazSpinner-DnVHWljy.mjs +37 -0
  81. package/components/chunks/{MazSpinner-C41VyUup.mjs → MazSpinner-DneKNmrs.mjs} +1 -1
  82. package/components/chunks/MazSpinner-Q02SOFkL.mjs +37 -0
  83. package/components/chunks/{MazSpinner-EA5ejB8F.mjs → MazSpinner-T1t1bpbm.mjs} +1 -1
  84. package/components/chunks/{MazSpinner-BWYdqSMP.mjs → MazSpinner-dFnsq52G.mjs} +1 -1
  85. package/components/chunks/MazSpinner-iA4Rz7K5.mjs +37 -0
  86. package/components/chunks/{MazSpinner-DHQH6Bhz.mjs → MazSpinner-rAqBu92m.mjs} +1 -1
  87. package/components/chunks/MazSpinner-va5G9enA.mjs +37 -0
  88. package/components/chunks/{MazTable-DRUj_PZp.mjs → MazTable-BPMuTZbS.mjs} +305 -305
  89. package/components/chunks/{MazTransitionExpand-B08cSrmL.mjs → MazTransitionExpand-CYyEf_hd.mjs} +1 -1
  90. package/css/main.css +2 -1
  91. package/modules/assets/index.css +1 -1
  92. package/modules/chunks/MazBtn-1g7UvzQ_.mjs +150 -0
  93. package/modules/chunks/{MazBtn-BbCGGxkK.cjs → MazBtn-BKk3IsoH.cjs} +2 -2
  94. package/modules/chunks/{MazIcon-BDSXZYZ8.cjs → MazIcon-BEnQqDG6.cjs} +1 -1
  95. package/modules/chunks/{MazIcon-C2ch3jUS.mjs → MazIcon-BdDO3aVl.mjs} +1 -1
  96. package/modules/chunks/{MazSpinner-C9_xSbZZ.mjs → MazSpinner--BVvGFIO.mjs} +1 -1
  97. package/modules/chunks/{MazSpinner-BiyFRA4w.cjs → MazSpinner-PMlxvkWb.cjs} +1 -1
  98. package/modules/chunks/index-D5F2dSFa.cjs +124 -0
  99. package/modules/chunks/{index-Cwbjspv3.mjs → index-D7R1dvsf.mjs} +347 -347
  100. package/modules/index.cjs +1 -1
  101. package/modules/index.mjs +1 -1
  102. package/nuxt/index.json +3 -3
  103. package/nuxt/index.mjs +1 -1
  104. package/nuxt/types.d.mts +6 -12
  105. package/nuxt/types.d.ts +6 -12
  106. package/package.json +10 -10
  107. package/types/modules/composables/use-timer.d.ts +6 -1
  108. package/types/modules/plugins/toaster/MazToast.vue.d.ts +2 -2
  109. package/components/chunks/MazBtn-B1-sTc7F.mjs +0 -155
  110. package/components/chunks/MazBtn-ColLVUca.mjs +0 -150
  111. package/components/chunks/MazBtn-DJhQqzja.mjs +0 -150
  112. package/components/chunks/MazBtn-DuY28-0U.mjs +0 -150
  113. package/components/chunks/MazBtn-h3WmmaEO.mjs +0 -150
  114. package/components/chunks/MazBtn-zyRLUViT.mjs +0 -150
  115. package/components/chunks/MazSpinner-Bad2n-0k.mjs +0 -37
  116. package/components/chunks/MazSpinner-C6StE-Mb.mjs +0 -37
  117. package/components/chunks/MazSpinner-Cz2DHV6g.mjs +0 -37
  118. package/components/chunks/MazSpinner-D4CdHpP2.mjs +0 -37
  119. package/components/chunks/MazSpinner-DRj2VpGA.mjs +0 -37
  120. package/components/chunks/MazSpinner-aPFlrc5E.mjs +0 -37
  121. package/components/chunks/MazSpinner-nOD-7_sU.mjs +0 -37
  122. package/components/chunks/MazSpinner-yZGK-AQe.mjs +0 -37
  123. package/modules/chunks/MazBtn-UBHTKqaN.mjs +0 -150
  124. package/modules/chunks/index-tnjajVkX.cjs +0 -124
@@ -0,0 +1,158 @@
1
+ import { defineComponent as T, defineAsyncComponent as k, useAttrs as j, useSlots as F, onBeforeMount as E, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as c, normalizeClass as r, withCtx as P, createElementBlock as f, createCommentVNode as t, renderSlot as p, unref as v } from "vue";
2
+ import '../assets/MazBtn.css';const R = /* @__PURE__ */ T({
3
+ __name: "MazBtn",
4
+ props: {
5
+ variant: { default: "button" },
6
+ size: { default: "md" },
7
+ color: { default: "primary" },
8
+ type: { default: "button" },
9
+ rounded: { type: Boolean },
10
+ roundedSize: { default: "lg" },
11
+ noRounded: { type: Boolean },
12
+ outline: { type: Boolean },
13
+ pastel: { type: Boolean },
14
+ block: { type: Boolean },
15
+ noUnderline: { type: Boolean },
16
+ loading: { type: Boolean },
17
+ disabled: { type: Boolean },
18
+ fab: { type: Boolean },
19
+ icon: { type: [String, Function, Object], default: void 0 },
20
+ leftIcon: { type: [String, Function, Object], default: void 0 },
21
+ rightIcon: { type: [String, Function, Object], default: void 0 },
22
+ noPadding: { type: Boolean },
23
+ noElevation: { type: Boolean },
24
+ contentClass: { default: void 0 }
25
+ },
26
+ setup(u) {
27
+ const o = u, d = k(() => import("./MazSpinner-CLz4ccD0.mjs")), i = k(() => import("./MazIcon-BDGxCy9M.mjs")), { href: b, to: B } = j(), y = F();
28
+ E(() => {
29
+ o.icon && !o.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
30
+ });
31
+ const m = l(() => b ? "a" : B ? "router-link" : "button"), I = l(
32
+ () => o.pastel ? `--${o.color}-pastel` : o.outline ? `--${o.color}-outline` : `--${o.color}`
33
+ ), h = l(
34
+ () => (o.loading || o.disabled) && m.value === "button"
35
+ ), C = l(() => h.value ? "--cursor-default" : "--cursor-pointer"), $ = l(() => `--is-${o.variant}`), s = l(() => o.loading && o.variant === "button"), g = l(() => !!y["left-icon"] || o.leftIcon), z = l(() => !!y["right-icon"] || o.rightIcon), S = l(() => g.value || z.value), M = l(() => o.fab && (o.icon || !!y.icon)), O = l(() => m.value === "button" ? o.type : void 0);
36
+ return (e, D) => (n(), a(c(m.value), {
37
+ disabled: h.value || void 0,
38
+ class: r(["m-btn", [
39
+ `--${e.size}`,
40
+ !e.fab && e.roundedSize && `--rounded-${e.roundedSize}`,
41
+ I.value,
42
+ C.value,
43
+ $.value,
44
+ {
45
+ "--block": e.block,
46
+ "--no-underline": e.noUnderline,
47
+ "--fab": e.fab,
48
+ "--loading": e.loading,
49
+ "--disabled": h.value,
50
+ "--icon": S.value,
51
+ "--rounded": e.rounded,
52
+ "--no-rounded": e.noRounded,
53
+ "--no-padding": e.noPadding,
54
+ "--no-elevation": e.noElevation
55
+ }
56
+ ]]),
57
+ type: O.value
58
+ }, {
59
+ default: P(() => [
60
+ g.value ? (n(), f(
61
+ "div",
62
+ {
63
+ key: 0,
64
+ class: r(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": s.value }])
65
+ },
66
+ [
67
+ t(`
68
+ @slot left-icon - The icon to display on the left of the button
69
+ `),
70
+ p(e.$slots, "left-icon", {}, () => [
71
+ typeof e.leftIcon == "string" ? (n(), a(v(i), {
72
+ key: 0,
73
+ name: e.leftIcon
74
+ }, null, 8, ["name"])) : e.leftIcon ? (n(), a(c(e.leftIcon), { key: 1 })) : t("v-if", !0)
75
+ ], !0)
76
+ ],
77
+ 2
78
+ /* CLASS */
79
+ )) : t("v-if", !0),
80
+ M.value ? (n(), f(
81
+ "div",
82
+ {
83
+ key: 1,
84
+ class: r(["m-btn__icon", { "maz-invisible": s.value }])
85
+ },
86
+ [
87
+ t(`
88
+ @slot icon - The icon to display on the fab button
89
+ `),
90
+ p(e.$slots, "icon", {}, () => [
91
+ typeof e.icon == "string" ? (n(), a(v(i), {
92
+ key: 0,
93
+ name: e.icon
94
+ }, null, 8, ["name"])) : e.icon ? (n(), a(c(e.icon), { key: 1 })) : t("v-if", !0)
95
+ ], !0)
96
+ ],
97
+ 2
98
+ /* CLASS */
99
+ )) : t("v-if", !0),
100
+ e.$slots.default ? (n(), f(
101
+ "span",
102
+ {
103
+ key: 2,
104
+ class: r([{ "maz-invisible": s.value }, e.contentClass])
105
+ },
106
+ [
107
+ t(`
108
+ @slot default - The content of the button
109
+ `),
110
+ p(e.$slots, "default", {}, void 0, !0)
111
+ ],
112
+ 2
113
+ /* CLASS */
114
+ )) : t("v-if", !0),
115
+ z.value ? (n(), f(
116
+ "div",
117
+ {
118
+ key: 3,
119
+ class: r(["m-btn__icon-right", { "maz-invisible": s.value }])
120
+ },
121
+ [
122
+ t(`
123
+ @slot right-icon - The icon to display on the right of the button
124
+ `),
125
+ p(e.$slots, "right-icon", {}, () => [
126
+ typeof e.rightIcon == "string" ? (n(), a(v(i), {
127
+ key: 0,
128
+ name: e.rightIcon
129
+ }, null, 8, ["name"])) : e.rightIcon ? (n(), a(c(e.rightIcon), { key: 1 })) : t("v-if", !0)
130
+ ], !0)
131
+ ],
132
+ 2
133
+ /* CLASS */
134
+ )) : t("v-if", !0),
135
+ s.value ? (n(), a(v(d), {
136
+ key: 4,
137
+ class: "m-btn-loader",
138
+ size: "2em",
139
+ color: e.color
140
+ }, null, 8, ["color"])) : t("v-if", !0)
141
+ ]),
142
+ _: 3
143
+ /* FORWARDED */
144
+ }, 8, ["disabled", "class", "type"]));
145
+ }
146
+ }), w = (u, o) => {
147
+ const d = u.__vccOpts || u;
148
+ for (const [i, b] of o)
149
+ d[i] = b;
150
+ return d;
151
+ }, A = /* @__PURE__ */ w(R, [["__scopeId", "data-v-48f14785"]]), U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
152
+ __proto__: null,
153
+ default: A
154
+ }, Symbol.toStringTag, { value: "Module" }));
155
+ export {
156
+ U as M,
157
+ w as _
158
+ };
@@ -1,6 +1,6 @@
1
- import { defineComponent as E, defineAsyncComponent as h, useAttrs as R, useSlots as w, onBeforeMount as A, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as D, createElementBlock as u, createCommentVNode as t, renderSlot as d, unref as c } from "vue";
2
- import { _ as L } from "./MazSelect-COJoKXbV.mjs";
3
- import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
1
+ import { defineComponent as F, defineAsyncComponent as h, useAttrs as j, useSlots as E, onBeforeMount as O, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as R, createElementBlock as u, createCommentVNode as t, renderSlot as d, unref as c } from "vue";
2
+ import { _ as w } from "./MazSelect-D4TuCHwj.mjs";
3
+ import '../assets/MazBtn.css';const A = /* @__PURE__ */ F({
4
4
  __name: "MazBtn",
5
5
  props: {
6
6
  variant: { default: "button" },
@@ -17,47 +17,47 @@ import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
17
17
  loading: { type: Boolean },
18
18
  disabled: { type: Boolean },
19
19
  fab: { type: Boolean },
20
- icon: { default: void 0 },
21
- leftIcon: { default: void 0 },
22
- rightIcon: { default: void 0 },
20
+ icon: { type: [String, Function, Object], default: void 0 },
21
+ leftIcon: { type: [String, Function, Object], default: void 0 },
22
+ rightIcon: { type: [String, Function, Object], default: void 0 },
23
23
  noPadding: { type: Boolean },
24
24
  noElevation: { type: Boolean },
25
25
  contentClass: { default: void 0 }
26
26
  },
27
27
  setup(g) {
28
- const e = g, z = h(() => import("./MazSpinner-nOD-7_sU.mjs")), f = h(() => import("./MazIcon-BDGxCy9M.mjs")), { href: k, to: B } = R(), p = w();
29
- A(() => {
30
- e.icon && !e.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
28
+ const o = g, z = h(() => import("./MazSpinner-va5G9enA.mjs")), f = h(() => import("./MazIcon-BDGxCy9M.mjs")), { href: k, to: B } = j(), p = E();
29
+ O(() => {
30
+ o.icon && !o.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
31
31
  });
32
32
  const v = l(() => k ? "a" : B ? "router-link" : "button"), I = l(
33
- () => e.pastel ? `--${e.color}-pastel` : e.outline ? `--${e.color}-outline` : `--${e.color}`
33
+ () => o.pastel ? `--${o.color}-pastel` : o.outline ? `--${o.color}-outline` : `--${o.color}`
34
34
  ), b = l(
35
- () => (e.loading || e.disabled) && v.value === "button"
36
- ), C = l(() => b.value ? "--cursor-default" : "--cursor-pointer"), $ = l(() => `--is-${e.variant}`), i = l(() => e.loading && e.variant === "button"), m = l(() => !!p["left-icon"] || e.leftIcon), y = l(() => !!p["right-icon"] || e.rightIcon), M = l(() => m.value || y.value), S = l(() => e.fab && (e.icon || !!p.icon)), T = l(() => v.value === "button" ? e.type : void 0);
37
- return (o, U) => (n(), a(r(v.value), {
35
+ () => (o.loading || o.disabled) && v.value === "button"
36
+ ), C = l(() => b.value ? "--cursor-default" : "--cursor-pointer"), $ = l(() => `--is-${o.variant}`), i = l(() => o.loading && o.variant === "button"), m = l(() => !!p["left-icon"] || o.leftIcon), y = l(() => !!p["right-icon"] || o.rightIcon), S = l(() => m.value || y.value), M = l(() => o.fab && (o.icon || !!p.icon)), T = l(() => v.value === "button" ? o.type : void 0);
37
+ return (e, D) => (n(), a(r(v.value), {
38
38
  disabled: b.value || void 0,
39
39
  class: s(["m-btn", [
40
- `--${o.size}`,
41
- !o.fab && o.roundedSize && `--rounded-${o.roundedSize}`,
40
+ `--${e.size}`,
41
+ !e.fab && e.roundedSize && `--rounded-${e.roundedSize}`,
42
42
  I.value,
43
43
  C.value,
44
44
  $.value,
45
45
  {
46
- "--block": o.block,
47
- "--no-underline": o.noUnderline,
48
- "--fab": o.fab,
49
- "--loading": o.loading,
46
+ "--block": e.block,
47
+ "--no-underline": e.noUnderline,
48
+ "--fab": e.fab,
49
+ "--loading": e.loading,
50
50
  "--disabled": b.value,
51
- "--icon": M.value,
52
- "--rounded": o.rounded,
53
- "--no-rounded": o.noRounded,
54
- "--no-padding": o.noPadding,
55
- "--no-elevation": o.noElevation
51
+ "--icon": S.value,
52
+ "--rounded": e.rounded,
53
+ "--no-rounded": e.noRounded,
54
+ "--no-padding": e.noPadding,
55
+ "--no-elevation": e.noElevation
56
56
  }
57
57
  ]]),
58
58
  type: T.value
59
59
  }, {
60
- default: D(() => [
60
+ default: R(() => [
61
61
  m.value ? (n(), u(
62
62
  "div",
63
63
  {
@@ -68,17 +68,17 @@ import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
68
68
  t(`
69
69
  @slot left-icon - The icon to display on the left of the button
70
70
  `),
71
- d(o.$slots, "left-icon", {}, () => [
72
- typeof o.leftIcon == "string" ? (n(), a(c(f), {
71
+ d(e.$slots, "left-icon", {}, () => [
72
+ typeof e.leftIcon == "string" ? (n(), a(c(f), {
73
73
  key: 0,
74
- name: o.leftIcon
75
- }, null, 8, ["name"])) : o.leftIcon ? (n(), a(r(o.leftIcon), { key: 1 })) : t("v-if", !0)
74
+ name: e.leftIcon
75
+ }, null, 8, ["name"])) : e.leftIcon ? (n(), a(r(e.leftIcon), { key: 1 })) : t("v-if", !0)
76
76
  ], !0)
77
77
  ],
78
78
  2
79
79
  /* CLASS */
80
80
  )) : t("v-if", !0),
81
- S.value ? (n(), u(
81
+ M.value ? (n(), u(
82
82
  "div",
83
83
  {
84
84
  key: 1,
@@ -88,27 +88,27 @@ import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
88
88
  t(`
89
89
  @slot icon - The icon to display on the fab button
90
90
  `),
91
- d(o.$slots, "icon", {}, () => [
92
- typeof o.icon == "string" ? (n(), a(c(f), {
91
+ d(e.$slots, "icon", {}, () => [
92
+ typeof e.icon == "string" ? (n(), a(c(f), {
93
93
  key: 0,
94
- name: o.icon
95
- }, null, 8, ["name"])) : o.icon ? (n(), a(r(o.icon), { key: 1 })) : t("v-if", !0)
94
+ name: e.icon
95
+ }, null, 8, ["name"])) : e.icon ? (n(), a(r(e.icon), { key: 1 })) : t("v-if", !0)
96
96
  ], !0)
97
97
  ],
98
98
  2
99
99
  /* CLASS */
100
100
  )) : t("v-if", !0),
101
- o.$slots.default ? (n(), u(
101
+ e.$slots.default ? (n(), u(
102
102
  "span",
103
103
  {
104
104
  key: 2,
105
- class: s([{ "maz-invisible": i.value }, o.contentClass])
105
+ class: s([{ "maz-invisible": i.value }, e.contentClass])
106
106
  },
107
107
  [
108
108
  t(`
109
109
  @slot default - The content of the button
110
110
  `),
111
- d(o.$slots, "default", {}, void 0, !0)
111
+ d(e.$slots, "default", {}, void 0, !0)
112
112
  ],
113
113
  2
114
114
  /* CLASS */
@@ -123,11 +123,11 @@ import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
123
123
  t(`
124
124
  @slot right-icon - The icon to display on the right of the button
125
125
  `),
126
- d(o.$slots, "right-icon", {}, () => [
127
- typeof o.rightIcon == "string" ? (n(), a(c(f), {
126
+ d(e.$slots, "right-icon", {}, () => [
127
+ typeof e.rightIcon == "string" ? (n(), a(c(f), {
128
128
  key: 0,
129
- name: o.rightIcon
130
- }, null, 8, ["name"])) : o.rightIcon ? (n(), a(r(o.rightIcon), { key: 1 })) : t("v-if", !0)
129
+ name: e.rightIcon
130
+ }, null, 8, ["name"])) : e.rightIcon ? (n(), a(r(e.rightIcon), { key: 1 })) : t("v-if", !0)
131
131
  ], !0)
132
132
  ],
133
133
  2
@@ -137,14 +137,14 @@ import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
137
137
  key: 4,
138
138
  class: "m-btn-loader",
139
139
  size: "2em",
140
- color: o.color
140
+ color: e.color
141
141
  }, null, 8, ["color"])) : t("v-if", !0)
142
142
  ]),
143
143
  _: 3
144
144
  /* FORWARDED */
145
145
  }, 8, ["disabled", "class", "type"]));
146
146
  }
147
- }), V = /* @__PURE__ */ L(P, [["__scopeId", "data-v-48f14785"]]);
147
+ }), U = /* @__PURE__ */ w(A, [["__scopeId", "data-v-48f14785"]]);
148
148
  export {
149
- V as default
149
+ U as default
150
150
  };
@@ -0,0 +1,150 @@
1
+ import { defineComponent as F, defineAsyncComponent as h, useAttrs as j, useSlots as E, onBeforeMount as O, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as R, createElementBlock as u, createCommentVNode as t, renderSlot as d, unref as c } from "vue";
2
+ import { _ as w } from "./MazDialogPromise-Bgxjg9ss.mjs";
3
+ import '../assets/MazBtn.css';const A = /* @__PURE__ */ F({
4
+ __name: "MazBtn",
5
+ props: {
6
+ variant: { default: "button" },
7
+ size: { default: "md" },
8
+ color: { default: "primary" },
9
+ type: { default: "button" },
10
+ rounded: { type: Boolean },
11
+ roundedSize: { default: "lg" },
12
+ noRounded: { type: Boolean },
13
+ outline: { type: Boolean },
14
+ pastel: { type: Boolean },
15
+ block: { type: Boolean },
16
+ noUnderline: { type: Boolean },
17
+ loading: { type: Boolean },
18
+ disabled: { type: Boolean },
19
+ fab: { type: Boolean },
20
+ icon: { type: [String, Function, Object], default: void 0 },
21
+ leftIcon: { type: [String, Function, Object], default: void 0 },
22
+ rightIcon: { type: [String, Function, Object], default: void 0 },
23
+ noPadding: { type: Boolean },
24
+ noElevation: { type: Boolean },
25
+ contentClass: { default: void 0 }
26
+ },
27
+ setup(g) {
28
+ const o = g, z = h(() => import("./MazSpinner-CmJlBqgH.mjs")), f = h(() => import("./MazIcon-BDGxCy9M.mjs")), { href: k, to: B } = j(), p = E();
29
+ O(() => {
30
+ o.icon && !o.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
31
+ });
32
+ const v = l(() => k ? "a" : B ? "router-link" : "button"), I = l(
33
+ () => o.pastel ? `--${o.color}-pastel` : o.outline ? `--${o.color}-outline` : `--${o.color}`
34
+ ), b = l(
35
+ () => (o.loading || o.disabled) && v.value === "button"
36
+ ), C = l(() => b.value ? "--cursor-default" : "--cursor-pointer"), $ = l(() => `--is-${o.variant}`), i = l(() => o.loading && o.variant === "button"), m = l(() => !!p["left-icon"] || o.leftIcon), y = l(() => !!p["right-icon"] || o.rightIcon), S = l(() => m.value || y.value), M = l(() => o.fab && (o.icon || !!p.icon)), T = l(() => v.value === "button" ? o.type : void 0);
37
+ return (e, D) => (n(), a(r(v.value), {
38
+ disabled: b.value || void 0,
39
+ class: s(["m-btn", [
40
+ `--${e.size}`,
41
+ !e.fab && e.roundedSize && `--rounded-${e.roundedSize}`,
42
+ I.value,
43
+ C.value,
44
+ $.value,
45
+ {
46
+ "--block": e.block,
47
+ "--no-underline": e.noUnderline,
48
+ "--fab": e.fab,
49
+ "--loading": e.loading,
50
+ "--disabled": b.value,
51
+ "--icon": S.value,
52
+ "--rounded": e.rounded,
53
+ "--no-rounded": e.noRounded,
54
+ "--no-padding": e.noPadding,
55
+ "--no-elevation": e.noElevation
56
+ }
57
+ ]]),
58
+ type: T.value
59
+ }, {
60
+ default: R(() => [
61
+ m.value ? (n(), u(
62
+ "div",
63
+ {
64
+ key: 0,
65
+ class: s(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": i.value }])
66
+ },
67
+ [
68
+ t(`
69
+ @slot left-icon - The icon to display on the left of the button
70
+ `),
71
+ d(e.$slots, "left-icon", {}, () => [
72
+ typeof e.leftIcon == "string" ? (n(), a(c(f), {
73
+ key: 0,
74
+ name: e.leftIcon
75
+ }, null, 8, ["name"])) : e.leftIcon ? (n(), a(r(e.leftIcon), { key: 1 })) : t("v-if", !0)
76
+ ], !0)
77
+ ],
78
+ 2
79
+ /* CLASS */
80
+ )) : t("v-if", !0),
81
+ M.value ? (n(), u(
82
+ "div",
83
+ {
84
+ key: 1,
85
+ class: s(["m-btn__icon", { "maz-invisible": i.value }])
86
+ },
87
+ [
88
+ t(`
89
+ @slot icon - The icon to display on the fab button
90
+ `),
91
+ d(e.$slots, "icon", {}, () => [
92
+ typeof e.icon == "string" ? (n(), a(c(f), {
93
+ key: 0,
94
+ name: e.icon
95
+ }, null, 8, ["name"])) : e.icon ? (n(), a(r(e.icon), { key: 1 })) : t("v-if", !0)
96
+ ], !0)
97
+ ],
98
+ 2
99
+ /* CLASS */
100
+ )) : t("v-if", !0),
101
+ e.$slots.default ? (n(), u(
102
+ "span",
103
+ {
104
+ key: 2,
105
+ class: s([{ "maz-invisible": i.value }, e.contentClass])
106
+ },
107
+ [
108
+ t(`
109
+ @slot default - The content of the button
110
+ `),
111
+ d(e.$slots, "default", {}, void 0, !0)
112
+ ],
113
+ 2
114
+ /* CLASS */
115
+ )) : t("v-if", !0),
116
+ y.value ? (n(), u(
117
+ "div",
118
+ {
119
+ key: 3,
120
+ class: s(["m-btn__icon-right", { "maz-invisible": i.value }])
121
+ },
122
+ [
123
+ t(`
124
+ @slot right-icon - The icon to display on the right of the button
125
+ `),
126
+ d(e.$slots, "right-icon", {}, () => [
127
+ typeof e.rightIcon == "string" ? (n(), a(c(f), {
128
+ key: 0,
129
+ name: e.rightIcon
130
+ }, null, 8, ["name"])) : e.rightIcon ? (n(), a(r(e.rightIcon), { key: 1 })) : t("v-if", !0)
131
+ ], !0)
132
+ ],
133
+ 2
134
+ /* CLASS */
135
+ )) : t("v-if", !0),
136
+ i.value ? (n(), a(c(z), {
137
+ key: 4,
138
+ class: "m-btn-loader",
139
+ size: "2em",
140
+ color: e.color
141
+ }, null, 8, ["color"])) : t("v-if", !0)
142
+ ]),
143
+ _: 3
144
+ /* FORWARDED */
145
+ }, 8, ["disabled", "class", "type"]));
146
+ }
147
+ }), U = /* @__PURE__ */ w(A, [["__scopeId", "data-v-48f14785"]]);
148
+ export {
149
+ U as default
150
+ };
@@ -1,6 +1,6 @@
1
- import { defineComponent as E, defineAsyncComponent as h, useAttrs as R, useSlots as w, onBeforeMount as A, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as D, createElementBlock as u, createCommentVNode as t, renderSlot as d, unref as c } from "vue";
2
- import { _ as L } from "./MazInputPrice-j2BNMeFp.mjs";
3
- import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
1
+ import { defineComponent as F, defineAsyncComponent as h, useAttrs as j, useSlots as E, onBeforeMount as O, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as R, createElementBlock as u, createCommentVNode as t, renderSlot as d, unref as c } from "vue";
2
+ import { _ as w } from "./MazInput-D177bUMh.mjs";
3
+ import '../assets/MazBtn.css';const A = /* @__PURE__ */ F({
4
4
  __name: "MazBtn",
5
5
  props: {
6
6
  variant: { default: "button" },
@@ -17,47 +17,47 @@ import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
17
17
  loading: { type: Boolean },
18
18
  disabled: { type: Boolean },
19
19
  fab: { type: Boolean },
20
- icon: { default: void 0 },
21
- leftIcon: { default: void 0 },
22
- rightIcon: { default: void 0 },
20
+ icon: { type: [String, Function, Object], default: void 0 },
21
+ leftIcon: { type: [String, Function, Object], default: void 0 },
22
+ rightIcon: { type: [String, Function, Object], default: void 0 },
23
23
  noPadding: { type: Boolean },
24
24
  noElevation: { type: Boolean },
25
25
  contentClass: { default: void 0 }
26
26
  },
27
27
  setup(g) {
28
- const e = g, z = h(() => import("./MazSpinner-C6StE-Mb.mjs")), f = h(() => import("./MazIcon-BDGxCy9M.mjs")), { href: k, to: B } = R(), p = w();
29
- A(() => {
30
- e.icon && !e.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
28
+ const o = g, z = h(() => import("./MazSpinner-T1t1bpbm.mjs")), f = h(() => import("./MazIcon-BDGxCy9M.mjs")), { href: k, to: B } = j(), p = E();
29
+ O(() => {
30
+ o.icon && !o.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
31
31
  });
32
32
  const v = l(() => k ? "a" : B ? "router-link" : "button"), I = l(
33
- () => e.pastel ? `--${e.color}-pastel` : e.outline ? `--${e.color}-outline` : `--${e.color}`
33
+ () => o.pastel ? `--${o.color}-pastel` : o.outline ? `--${o.color}-outline` : `--${o.color}`
34
34
  ), b = l(
35
- () => (e.loading || e.disabled) && v.value === "button"
36
- ), C = l(() => b.value ? "--cursor-default" : "--cursor-pointer"), $ = l(() => `--is-${e.variant}`), i = l(() => e.loading && e.variant === "button"), m = l(() => !!p["left-icon"] || e.leftIcon), y = l(() => !!p["right-icon"] || e.rightIcon), M = l(() => m.value || y.value), S = l(() => e.fab && (e.icon || !!p.icon)), T = l(() => v.value === "button" ? e.type : void 0);
37
- return (o, U) => (n(), a(r(v.value), {
35
+ () => (o.loading || o.disabled) && v.value === "button"
36
+ ), C = l(() => b.value ? "--cursor-default" : "--cursor-pointer"), $ = l(() => `--is-${o.variant}`), i = l(() => o.loading && o.variant === "button"), m = l(() => !!p["left-icon"] || o.leftIcon), y = l(() => !!p["right-icon"] || o.rightIcon), S = l(() => m.value || y.value), M = l(() => o.fab && (o.icon || !!p.icon)), T = l(() => v.value === "button" ? o.type : void 0);
37
+ return (e, D) => (n(), a(r(v.value), {
38
38
  disabled: b.value || void 0,
39
39
  class: s(["m-btn", [
40
- `--${o.size}`,
41
- !o.fab && o.roundedSize && `--rounded-${o.roundedSize}`,
40
+ `--${e.size}`,
41
+ !e.fab && e.roundedSize && `--rounded-${e.roundedSize}`,
42
42
  I.value,
43
43
  C.value,
44
44
  $.value,
45
45
  {
46
- "--block": o.block,
47
- "--no-underline": o.noUnderline,
48
- "--fab": o.fab,
49
- "--loading": o.loading,
46
+ "--block": e.block,
47
+ "--no-underline": e.noUnderline,
48
+ "--fab": e.fab,
49
+ "--loading": e.loading,
50
50
  "--disabled": b.value,
51
- "--icon": M.value,
52
- "--rounded": o.rounded,
53
- "--no-rounded": o.noRounded,
54
- "--no-padding": o.noPadding,
55
- "--no-elevation": o.noElevation
51
+ "--icon": S.value,
52
+ "--rounded": e.rounded,
53
+ "--no-rounded": e.noRounded,
54
+ "--no-padding": e.noPadding,
55
+ "--no-elevation": e.noElevation
56
56
  }
57
57
  ]]),
58
58
  type: T.value
59
59
  }, {
60
- default: D(() => [
60
+ default: R(() => [
61
61
  m.value ? (n(), u(
62
62
  "div",
63
63
  {
@@ -68,17 +68,17 @@ import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
68
68
  t(`
69
69
  @slot left-icon - The icon to display on the left of the button
70
70
  `),
71
- d(o.$slots, "left-icon", {}, () => [
72
- typeof o.leftIcon == "string" ? (n(), a(c(f), {
71
+ d(e.$slots, "left-icon", {}, () => [
72
+ typeof e.leftIcon == "string" ? (n(), a(c(f), {
73
73
  key: 0,
74
- name: o.leftIcon
75
- }, null, 8, ["name"])) : o.leftIcon ? (n(), a(r(o.leftIcon), { key: 1 })) : t("v-if", !0)
74
+ name: e.leftIcon
75
+ }, null, 8, ["name"])) : e.leftIcon ? (n(), a(r(e.leftIcon), { key: 1 })) : t("v-if", !0)
76
76
  ], !0)
77
77
  ],
78
78
  2
79
79
  /* CLASS */
80
80
  )) : t("v-if", !0),
81
- S.value ? (n(), u(
81
+ M.value ? (n(), u(
82
82
  "div",
83
83
  {
84
84
  key: 1,
@@ -88,27 +88,27 @@ import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
88
88
  t(`
89
89
  @slot icon - The icon to display on the fab button
90
90
  `),
91
- d(o.$slots, "icon", {}, () => [
92
- typeof o.icon == "string" ? (n(), a(c(f), {
91
+ d(e.$slots, "icon", {}, () => [
92
+ typeof e.icon == "string" ? (n(), a(c(f), {
93
93
  key: 0,
94
- name: o.icon
95
- }, null, 8, ["name"])) : o.icon ? (n(), a(r(o.icon), { key: 1 })) : t("v-if", !0)
94
+ name: e.icon
95
+ }, null, 8, ["name"])) : e.icon ? (n(), a(r(e.icon), { key: 1 })) : t("v-if", !0)
96
96
  ], !0)
97
97
  ],
98
98
  2
99
99
  /* CLASS */
100
100
  )) : t("v-if", !0),
101
- o.$slots.default ? (n(), u(
101
+ e.$slots.default ? (n(), u(
102
102
  "span",
103
103
  {
104
104
  key: 2,
105
- class: s([{ "maz-invisible": i.value }, o.contentClass])
105
+ class: s([{ "maz-invisible": i.value }, e.contentClass])
106
106
  },
107
107
  [
108
108
  t(`
109
109
  @slot default - The content of the button
110
110
  `),
111
- d(o.$slots, "default", {}, void 0, !0)
111
+ d(e.$slots, "default", {}, void 0, !0)
112
112
  ],
113
113
  2
114
114
  /* CLASS */
@@ -123,11 +123,11 @@ import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
123
123
  t(`
124
124
  @slot right-icon - The icon to display on the right of the button
125
125
  `),
126
- d(o.$slots, "right-icon", {}, () => [
127
- typeof o.rightIcon == "string" ? (n(), a(c(f), {
126
+ d(e.$slots, "right-icon", {}, () => [
127
+ typeof e.rightIcon == "string" ? (n(), a(c(f), {
128
128
  key: 0,
129
- name: o.rightIcon
130
- }, null, 8, ["name"])) : o.rightIcon ? (n(), a(r(o.rightIcon), { key: 1 })) : t("v-if", !0)
129
+ name: e.rightIcon
130
+ }, null, 8, ["name"])) : e.rightIcon ? (n(), a(r(e.rightIcon), { key: 1 })) : t("v-if", !0)
131
131
  ], !0)
132
132
  ],
133
133
  2
@@ -137,14 +137,14 @@ import '../assets/MazBtn.css';const P = /* @__PURE__ */ E({
137
137
  key: 4,
138
138
  class: "m-btn-loader",
139
139
  size: "2em",
140
- color: o.color
140
+ color: e.color
141
141
  }, null, 8, ["color"])) : t("v-if", !0)
142
142
  ]),
143
143
  _: 3
144
144
  /* FORWARDED */
145
145
  }, 8, ["disabled", "class", "type"]));
146
146
  }
147
- }), V = /* @__PURE__ */ L(P, [["__scopeId", "data-v-48f14785"]]);
147
+ }), U = /* @__PURE__ */ w(A, [["__scopeId", "data-v-48f14785"]]);
148
148
  export {
149
- V as default
149
+ U as default
150
150
  };