maz-ui 3.47.2-beta.0 → 3.47.2-beta.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 (146) hide show
  1. package/components/MazAccordion.mjs +36 -37
  2. package/components/MazAnimatedCounter.mjs +14 -16
  3. package/components/MazBottomSheet.mjs +1 -1
  4. package/components/MazBtn.mjs +1 -1
  5. package/components/MazCard.mjs +1 -1
  6. package/components/MazCarousel.mjs +1 -1
  7. package/components/MazChart.mjs +23 -32
  8. package/components/MazChecklist.mjs +1 -1
  9. package/components/MazCircularProgressBar.mjs +66 -71
  10. package/components/MazDialog.mjs +1 -1
  11. package/components/MazDialogPromise.mjs +1 -1
  12. package/components/MazDrawer.mjs +1 -1
  13. package/components/MazDropdown.mjs +162 -185
  14. package/components/MazExpandAnimation.mjs +20 -21
  15. package/components/MazGallery.mjs +1 -1
  16. package/components/MazInput.mjs +1 -1
  17. package/components/MazInputCode.mjs +30 -31
  18. package/components/MazInputNumber.mjs +1 -1
  19. package/components/MazInputPrice.mjs +1 -1
  20. package/components/MazInputTags.mjs +1 -1
  21. package/components/MazLink.mjs +18 -30
  22. package/components/MazPagination.mjs +1 -1
  23. package/components/MazPhoneNumberInput.mjs +1 -1
  24. package/components/MazPicker.mjs +1 -1
  25. package/components/MazRadio.mjs +37 -42
  26. package/components/MazRadioButtons.mjs +61 -66
  27. package/components/MazSelect.mjs +1 -1
  28. package/components/MazSlider.mjs +107 -116
  29. package/components/MazStepper.mjs +1 -1
  30. package/components/MazSwitch.mjs +24 -28
  31. package/components/MazTable.d.ts +6 -6
  32. package/components/MazTable.mjs +1 -1
  33. package/components/MazTabsBar.mjs +1 -1
  34. package/components/MazTextarea.mjs +32 -34
  35. package/components/assets/MazLink.css +1 -1
  36. package/components/assets/MazTable.css +1 -1
  37. package/components/chunks/{MazBadge-CvIiiTdM.mjs → MazBadge-CqppWg2j.mjs} +1 -1
  38. package/components/chunks/{MazBottomSheet-DqK0EOsq.mjs → MazBottomSheet-CGRvZmGd.mjs} +28 -29
  39. package/{modules/chunks/MazBtn-BSnVxud6.mjs → components/chunks/MazBtn-2VKM1wZu.mjs} +37 -49
  40. package/components/chunks/{MazBtn-DVkwISlp.mjs → MazBtn-40lm8-AL.mjs} +37 -49
  41. package/components/chunks/{MazBtn-DzBXfedt.mjs → MazBtn-BB1FyYWv.mjs} +35 -44
  42. package/components/chunks/{MazBtn-BO3G90L3.mjs → MazBtn-BMYXMZuX.mjs} +37 -49
  43. package/components/chunks/{MazBtn-DJOUeES7.mjs → MazBtn-BijEMn4r.mjs} +37 -49
  44. package/components/chunks/MazBtn-BmrcK2af.mjs +106 -0
  45. package/components/chunks/MazBtn-C72_1uvu.mjs +106 -0
  46. package/components/chunks/MazBtn-CWloP6MI.mjs +111 -0
  47. package/components/chunks/MazBtn-CcyV4DCc.mjs +106 -0
  48. package/components/chunks/MazBtn-DENEMy-c.mjs +106 -0
  49. package/components/chunks/MazBtn-DfqRZvbB.mjs +106 -0
  50. package/components/chunks/MazBtn-UnZQuu6P.mjs +106 -0
  51. package/components/chunks/MazBtn-cDJlUVVY.mjs +106 -0
  52. package/components/chunks/MazBtn-hUslV7wO.mjs +106 -0
  53. package/components/chunks/{MazCard-FSXmHyhj.mjs → MazCard-BYB8y1_u.mjs} +18 -19
  54. package/components/chunks/{MazCarousel-BEl86YGW.mjs → MazCarousel-DccWVW8H.mjs} +20 -21
  55. package/components/chunks/{MazCheckbox-2G4VkxDz.mjs → MazCheckbox-B22OcHt8.mjs} +1 -1
  56. package/components/chunks/{MazCheckbox-Cq9gpTEw.mjs → MazCheckbox-DMogZVHl.mjs} +1 -1
  57. package/components/chunks/{MazCheckbox-BmnqBHaY.mjs → MazCheckbox-Db6sPUbV.mjs} +1 -1
  58. package/components/chunks/{MazChecklist-CY1Cv70T.mjs → MazChecklist-C95Y4Hb-.mjs} +112 -118
  59. package/components/chunks/{MazDialog-CPgFpAlq.mjs → MazDialog-khofH-7I.mjs} +66 -81
  60. package/components/chunks/MazDialogPromise-ZRA2ZrO4.mjs +488 -0
  61. package/components/chunks/{MazExpandAnimation-Bkw_wFTi.mjs → MazExpandAnimation-MDimlZGj.mjs} +7 -8
  62. package/components/chunks/{MazGallery-BknvUeo1.mjs → MazGallery-CXQiXWFr.mjs} +32 -33
  63. package/components/chunks/{MazGallery-CZOokGAt.mjs → MazGallery-VTZUhBKC.mjs} +33 -34
  64. package/components/chunks/{MazIcon-z-jTiuyI.mjs → MazIcon-BF5TFzse.mjs} +1 -1
  65. package/components/chunks/{MazInput-oOA7gdLO.mjs → MazInput-DC3S-CVu.mjs} +44 -53
  66. package/components/chunks/{MazInput-BQoQSRyL.mjs → MazInput-DzWkS-g8.mjs} +40 -49
  67. package/components/chunks/{MazInput-CJQB68c-.mjs → MazInput-NE6H-10w.mjs} +42 -51
  68. package/components/chunks/{MazInputNumber-B4mQJcVB.mjs → MazInputNumber-DRXQXHRv.mjs} +168 -189
  69. package/components/chunks/{MazInputPrice-BrxE5WVf.mjs → MazInputPrice-DoTnDDIN.mjs} +49 -58
  70. package/components/chunks/{MazInputTags-BVCej_gW.mjs → MazInputTags-Dj3sW-e5.mjs} +181 -202
  71. package/components/chunks/{MazLink-Dl9ePCGm.mjs → MazLink-C_3Wya94.mjs} +19 -31
  72. package/components/chunks/{MazLoadingBar-Dwf55oHy.mjs → MazLoadingBar-DdjHRC7g.mjs} +1 -1
  73. package/components/chunks/MazPagination-BkT4_LLW.mjs +330 -0
  74. package/components/chunks/{MazPhoneNumberInput-Cd25AzXc.mjs → MazPhoneNumberInput-BbssOUzo.mjs} +500 -544
  75. package/components/chunks/{MazPicker-C78yxilJ.mjs → MazPicker-DwWiIYAR.mjs} +243 -264
  76. package/components/chunks/{MazPickerMonthSwitcher-CyHYx8TT.mjs → MazPickerMonthSwitcher-CmFFQoPA.mjs} +1 -1
  77. package/components/chunks/{MazPickerShortcuts-Bsi8cnox.mjs → MazPickerShortcuts-DaELz7aq.mjs} +1 -1
  78. package/components/chunks/{MazPickerYearSwitcher-DLUSMAtz.mjs → MazPickerYearSwitcher-m1_KXnpA.mjs} +1 -1
  79. package/components/chunks/{MazSelect-CQDoUpgp.mjs → MazSelect-BJ07NVXQ.mjs} +149 -170
  80. package/components/chunks/{MazSelect-uCJPMXF-.mjs → MazSelect-CDV9Fx6m.mjs} +124 -136
  81. package/components/chunks/{MazSpinner-Bvb-lKER.mjs → MazSpinner-Bb3f2t6w.mjs} +1 -1
  82. package/components/chunks/{MazSpinner-Cqp-BMvL.mjs → MazSpinner-BcB0szZB.mjs} +1 -1
  83. package/components/chunks/{MazSpinner-BT_717pD.mjs → MazSpinner-BpkPcfCt.mjs} +1 -1
  84. package/components/chunks/{MazSpinner-CAbYLlEZ.mjs → MazSpinner-BsYJDmi9.mjs} +1 -1
  85. package/components/chunks/{MazSpinner-B9OwpEP_.mjs → MazSpinner-BymqEMBk.mjs} +1 -1
  86. package/components/chunks/MazSpinner-C-64WJje.mjs +34 -0
  87. package/components/chunks/MazSpinner-CEFbkZkM.mjs +34 -0
  88. package/components/chunks/{MazSpinner-EFo8dM46.mjs → MazSpinner-CfiIXW8y.mjs} +1 -1
  89. package/components/chunks/MazSpinner-CykRbNHD.mjs +34 -0
  90. package/components/chunks/{MazSpinner-C-z3-68w.mjs → MazSpinner-D3-pqOh3.mjs} +1 -1
  91. package/components/chunks/MazSpinner-DS58mtzm.mjs +34 -0
  92. package/components/chunks/{MazSpinner-2D0ZmAQz.mjs → MazSpinner-DmiLBQgR.mjs} +1 -1
  93. package/components/chunks/{MazSpinner-C1Ip-Dwh.mjs → MazSpinner-Dmkr_r9u.mjs} +1 -1
  94. package/components/chunks/MazSpinner-DoRGA1RI.mjs +34 -0
  95. package/components/chunks/MazSpinner-eC03bFP5.mjs +34 -0
  96. package/components/chunks/{MazSpinner-Cb3_S0zT.mjs → MazSpinner-edxn0ncQ.mjs} +1 -1
  97. package/components/chunks/MazSpinner-f2Mc2eRO.mjs +34 -0
  98. package/components/chunks/MazSpinner-n4Dp5ZsH.mjs +34 -0
  99. package/components/chunks/MazStepper-BREfkpUb.mjs +213 -0
  100. package/components/chunks/{MazTable-Cuz5QI08.mjs → MazTable-BJDPdIJB.mjs} +183 -227
  101. package/components/chunks/{MazTableCell-D_OTOJiy.mjs → MazTableCell-DILuUCTe.mjs} +1 -1
  102. package/components/chunks/{MazTableRow-BTcVAyOy.mjs → MazTableRow-D6H6-c8J.mjs} +1 -1
  103. package/components/chunks/{MazTableTitle-BDA9G6Zw.mjs → MazTableTitle-Ch-nyY1E.mjs} +1 -1
  104. package/components/chunks/MazTabsBar-CM-w7V97.mjs +193 -0
  105. package/components/chunks/{MazTransitionExpand-C-FHhOGB.mjs → MazTransitionExpand-PmUDa51_.mjs} +1 -1
  106. package/modules/chunks/MazBtn-B_Xlvgbg.cjs +1 -0
  107. package/modules/chunks/MazBtn-Dsr06Zgg.mjs +106 -0
  108. package/modules/chunks/{MazIcon-dhyR9Q8a.cjs → MazIcon-CkuzyufF.cjs} +1 -1
  109. package/modules/chunks/{MazIcon-DllGg8tw.mjs → MazIcon-DEgoQbMj.mjs} +1 -1
  110. package/modules/chunks/{MazSpinner-bdGjxsu6.mjs → MazSpinner-BurN-1pb.mjs} +1 -1
  111. package/modules/chunks/{MazSpinner-CiIyZ8gs.cjs → MazSpinner-jP4QsCNE.cjs} +1 -1
  112. package/modules/chunks/index-CUNN0eIB.cjs +124 -0
  113. package/modules/chunks/{index-x2F1l5sr.mjs → index-CxFUggmu.mjs} +257 -292
  114. package/modules/index.cjs +1 -1
  115. package/modules/index.mjs +1 -1
  116. package/nuxt/index.json +1 -1
  117. package/package.json +1 -1
  118. package/types/components/MazTable.vue.d.ts +6 -6
  119. package/types/modules/composables/useFormValidator/types.d.ts +5 -1
  120. package/types/modules/composables/useFormValidator/useFormField.d.ts +3 -3
  121. package/types/modules/composables/useFormValidator/useFormValidator.d.ts +2 -2
  122. package/types/modules/composables/useFormValidator/utils.d.ts +12 -12
  123. package/components/chunks/MazBtn-BRUaoP8j.mjs +0 -126
  124. package/components/chunks/MazBtn-BhnOApJu.mjs +0 -118
  125. package/components/chunks/MazBtn-C28vKP_v.mjs +0 -118
  126. package/components/chunks/MazBtn-C87UEsVs.mjs +0 -118
  127. package/components/chunks/MazBtn-C_l3xuAh.mjs +0 -118
  128. package/components/chunks/MazBtn-CweCwE_4.mjs +0 -118
  129. package/components/chunks/MazBtn-D7IKoL2c.mjs +0 -118
  130. package/components/chunks/MazBtn-DadFupkY.mjs +0 -118
  131. package/components/chunks/MazBtn-GGcGrIH4.mjs +0 -118
  132. package/components/chunks/MazBtn-Mu18egu5.mjs +0 -118
  133. package/components/chunks/MazDialogPromise-BCCdkrea.mjs +0 -522
  134. package/components/chunks/MazPagination-CHTMRRqE.mjs +0 -362
  135. package/components/chunks/MazSpinner-C23CZ_Za.mjs +0 -34
  136. package/components/chunks/MazSpinner-CViChjTw.mjs +0 -34
  137. package/components/chunks/MazSpinner-CZMBhCOJ.mjs +0 -34
  138. package/components/chunks/MazSpinner-D4C84xZe.mjs +0 -34
  139. package/components/chunks/MazSpinner-Dyf9yb51.mjs +0 -34
  140. package/components/chunks/MazSpinner-QHjOczon.mjs +0 -34
  141. package/components/chunks/MazSpinner-u8WQTgUR.mjs +0 -34
  142. package/components/chunks/MazSpinner-w-S5uCxg.mjs +0 -34
  143. package/components/chunks/MazStepper-DRWtYHZR.mjs +0 -232
  144. package/components/chunks/MazTabsBar-JkRzMDM6.mjs +0 -203
  145. package/modules/chunks/MazBtn-Bf9Cq5M7.cjs +0 -9
  146. package/modules/chunks/index-BPqjUr5e.cjs +0 -149
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as o, openBlock as a, createElementBlock as l, normalizeClass as r, unref as s, renderSlot as n } from "vue";
2
2
  import { i as c } from "./inject-strict-BmiaNiwC.mjs";
3
- import { _ as m } from "./MazTable-Cuz5QI08.mjs";
3
+ import { _ as m } from "./MazTable-BJDPdIJB.mjs";
4
4
  import '../assets/MazTableCell.css';const _ = /* @__PURE__ */ o({
5
5
  __name: "MazTableCell",
6
6
  setup(i) {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as n, openBlock as l, createElementBlock as c, normalizeClass as s, unref as e, renderSlot as d } from "vue";
2
2
  import { i as b } from "./inject-strict-BmiaNiwC.mjs";
3
- import { _ as p } from "./MazTable-Cuz5QI08.mjs";
3
+ import { _ as p } from "./MazTable-BJDPdIJB.mjs";
4
4
  import '../assets/MazTableRow.css';const m = /* @__PURE__ */ n({
5
5
  __name: "MazTableRow",
6
6
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as a, openBlock as o, createElementBlock as r, normalizeClass as s, unref as l, renderSlot as n } from "vue";
2
2
  import { i as c } from "./inject-strict-BmiaNiwC.mjs";
3
- import { _ as i } from "./MazTable-Cuz5QI08.mjs";
3
+ import { _ as i } from "./MazTable-BJDPdIJB.mjs";
4
4
  import '../assets/MazTableTitle.css';const m = /* @__PURE__ */ a({
5
5
  __name: "MazTableTitle",
6
6
  setup(_) {
@@ -0,0 +1,193 @@
1
+ import { inject as R, ref as l, defineComponent as N, defineAsyncComponent as I, computed as O, onBeforeMount as V, onMounted as w, watch as W, openBlock as f, createElementBlock as p, normalizeClass as m, createElementVNode as j, normalizeStyle as B, Fragment as q, renderList as H, renderSlot as S, createTextVNode as z, toDisplayString as C, createBlock as U, unref as x, withCtx as D, createCommentVNode as Q } from "vue";
2
+ import '../assets/MazTabsBar.css';function X(r, o) {
3
+ const c = R(r, o);
4
+ if (!c)
5
+ throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${r}`);
6
+ return c;
7
+ }
8
+ l("system");
9
+ l("system");
10
+ function F(r) {
11
+ return new Promise((o) => setTimeout(o, r));
12
+ }
13
+ const G = (r, o) => {
14
+ const c = r.__vccOpts || r;
15
+ for (const [n, i] of o)
16
+ c[n] = i;
17
+ return c;
18
+ }, J = {
19
+ cancelText: "Cancel",
20
+ confirmText: "Confirm",
21
+ cancelButton: {
22
+ text: "Cancel",
23
+ color: "danger"
24
+ },
25
+ confirmButton: {
26
+ text: "Confirm",
27
+ color: "success"
28
+ }
29
+ };
30
+ l(J);
31
+ l([]);
32
+ const K = ["disabled", "onClick"], Y = /* @__PURE__ */ N({
33
+ __name: "MazTabsBar",
34
+ props: {
35
+ items: {},
36
+ persistent: { type: Boolean },
37
+ queryParam: { default: "tab" },
38
+ block: { type: Boolean },
39
+ noElevation: { type: Boolean },
40
+ autoScroll: { type: Boolean, default: !0 }
41
+ },
42
+ setup(r) {
43
+ const o = r, c = I(() => import("./MazBadge-CqppWg2j.mjs")), { currentTab: n, updateCurrentTab: i } = X("maz-tabs");
44
+ function T(e) {
45
+ i(e + 1), o.persistent && $(e + 1);
46
+ }
47
+ const v = l(), g = l([]);
48
+ function y(e) {
49
+ return n.value === e + 1;
50
+ }
51
+ function k({
52
+ mazBtn: e,
53
+ index: t
54
+ }) {
55
+ g.value[t] = e && "$el" in e ? e.$el : e;
56
+ }
57
+ const u = O(
58
+ () => o.items.map((e) => ({
59
+ label: typeof e == "string" ? e : e.label,
60
+ disabled: typeof e == "string" ? !1 : e.disabled ?? !1,
61
+ badge: typeof e == "string" ? void 0 : e.badge
62
+ }))
63
+ ), h = l(), b = l(!1);
64
+ async function _() {
65
+ if (!o.autoScroll)
66
+ return;
67
+ await F(150);
68
+ const e = v.value, t = g.value[n.value - 1];
69
+ if (!e || !t)
70
+ return;
71
+ const a = 50;
72
+ if (t.offsetLeft - a < e.scrollLeft || t.offsetLeft + t.offsetWidth > e.scrollLeft + e.clientWidth) {
73
+ const A = window.getComputedStyle(e, "padding-left").paddingLeft, E = Number(A.slice(0, -2));
74
+ e.scrollTo({
75
+ left: t.offsetLeft - E - a,
76
+ behavior: b.value ? "smooth" : "instant"
77
+ });
78
+ }
79
+ if (typeof n.value != "number")
80
+ return;
81
+ const s = (t == null ? void 0 : t.offsetWidth) ?? 0, d = (t == null ? void 0 : t.offsetHeight) ?? 0, M = (t == null ? void 0 : t.offsetLeft) ?? 0;
82
+ h.value = {
83
+ transform: `translateX(${M}px)`,
84
+ width: `${s}px`,
85
+ height: `${d}px`
86
+ }, b.value = !0;
87
+ }
88
+ function L(e, t) {
89
+ return t ? {} : n.value === e + 1 ? "color: var(--maz-color-text)" : "color: var(--maz-color-muted)";
90
+ }
91
+ V(() => {
92
+ (n.value < 1 || n.value > u.value.length) && console.error(
93
+ `[maz-ui](MazTabsBar) The model-value should be between 1 and ${u.value.length}`
94
+ );
95
+ }), w(() => {
96
+ (o.persistent || n.value) && _();
97
+ }), W(
98
+ () => [n.value, u.value],
99
+ () => {
100
+ _();
101
+ }
102
+ );
103
+ function P() {
104
+ const e = new URL(window.location.href);
105
+ return Number(e.searchParams.get(o.queryParam));
106
+ }
107
+ function $(e) {
108
+ const t = new URL(window.location.href);
109
+ t.searchParams.set(o.queryParam, String(e)), window.history.replaceState({}, document.title, t.toString());
110
+ }
111
+ return w(async () => {
112
+ o.persistent && i(P() || n.value || 1);
113
+ }), (e, t) => (f(), p(
114
+ "div",
115
+ {
116
+ ref_key: "tabsBarRef",
117
+ ref: v,
118
+ class: m(["m-tabs-bar", {
119
+ "--block": e.block,
120
+ "--elevation": !e.noElevation
121
+ }])
122
+ },
123
+ [
124
+ j(
125
+ "div",
126
+ {
127
+ class: m(["m-tabs-bar__indicator", { "--animated": b.value }]),
128
+ style: B([h.value])
129
+ },
130
+ null,
131
+ 6
132
+ /* CLASS, STYLE */
133
+ ),
134
+ (f(!0), p(
135
+ q,
136
+ null,
137
+ H(u.value, (a, s) => (f(), p("button", {
138
+ key: s,
139
+ ref_for: !0,
140
+ ref: (d) => k({ mazBtn: d, index: s }),
141
+ class: m([{ "--active": y(s), "--disabled": a.disabled }, "m-tabs-bar__item"]),
142
+ disabled: a.disabled,
143
+ style: B(L(s, a.disabled)),
144
+ onClick: (d) => a.disabled ? void 0 : T(s)
145
+ }, [
146
+ S(e.$slots, "item", {
147
+ item: a,
148
+ active: y(s),
149
+ index: s
150
+ }, () => [
151
+ z(
152
+ C(a.label) + " ",
153
+ 1
154
+ /* TEXT */
155
+ ),
156
+ a.badge ? (f(), U(x(c), {
157
+ key: 0,
158
+ color: a.badge.color,
159
+ pastel: a.badge.pastel,
160
+ outline: a.badge.outline,
161
+ "rounded-size": a.badge.roundedSize,
162
+ size: a.badge.size ?? "0.7rem",
163
+ class: "m-tabs-bar__item__badge"
164
+ }, {
165
+ default: D(() => [
166
+ S(e.$slots, "badge-content", {
167
+ content: a.badge.content
168
+ }, () => [
169
+ z(
170
+ C(a.badge.content),
171
+ 1
172
+ /* TEXT */
173
+ )
174
+ ], !0)
175
+ ]),
176
+ _: 2
177
+ /* DYNAMIC */
178
+ }, 1032, ["color", "pastel", "outline", "rounded-size", "size"])) : Q("v-if", !0)
179
+ ], !0)
180
+ ], 14, K))),
181
+ 128
182
+ /* KEYED_FRAGMENT */
183
+ ))
184
+ ],
185
+ 2
186
+ /* CLASS */
187
+ ));
188
+ }
189
+ }), ee = /* @__PURE__ */ G(Y, [["__scopeId", "data-v-c3d56dd1"]]);
190
+ export {
191
+ ee as M,
192
+ G as _
193
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as r, useCssVars as p, openBlock as d, createBlock as h, TransitionGroup as u, withCtx as y, renderSlot as g, nextTick as s } from "vue";
2
- import { _ as l } from "./MazCard-FSXmHyhj.mjs";
2
+ import { _ as l } from "./MazCard-BYB8y1_u.mjs";
3
3
  import '../assets/MazTransitionExpand.css';const f = /* @__PURE__ */ r({
4
4
  __name: "MazTransitionExpand",
5
5
  props: {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../assets/MazBtn.css');const e=require("vue"),C=require("./index-CUNN0eIB.cjs"),h={key:2,class:"m-btn-loader-container"},j=e.defineComponent({__name:"MazBtn",props:{variant:{default:"button"},size:{default:"md"},color:{default:"primary"},type:{default:"button"},rounded:{type:Boolean},roundedSize:{default:"lg"},noRounded:{type:Boolean},outline:{type:Boolean},pastel:{type:Boolean},block:{type:Boolean},noUnderline:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},fab:{type:Boolean},icon:{type:[String,Function,Object],default:void 0},leftIcon:{type:[String,Function,Object],default:void 0},rightIcon:{type:[String,Function,Object],default:void 0},noPadding:{type:Boolean},noElevation:{type:Boolean},justify:{default:"center"}},setup(u){const n=u,c=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazSpinner-jP4QsCNE.cjs"))),l=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazIcon-CkuzyufF.cjs"))),{href:d,to:m}=e.useAttrs(),a=e.useSlots(),r=e.computed(()=>d?"a":m?"router-link":"button"),f=e.computed(()=>n.pastel?`--${n.color}-pastel`:n.outline?`--${n.color}-outline`:`--${n.color}`),s=e.computed(()=>(n.loading||n.disabled)&&r.value==="button"),p=e.computed(()=>s.value?"--cursor-default":"--cursor-pointer"),y=e.computed(()=>`--is-${n.variant}`),v=e.computed(()=>n.loading&&n.variant==="button"),z=e.computed(()=>!!a["left-icon"]||n.leftIcon),i=e.computed(()=>!!a["right-icon"]||n.rightIcon),b=e.computed(()=>z.value||i.value),k=e.computed(()=>n.icon||!!a.icon),B=e.computed(()=>r.value==="button"?n.type:void 0),t=e.computed(()=>n.size==="xl"?"maz-text-3xl":n.size==="lg"?"maz-text-2xl":n.size==="md"?"maz-text-xl":n.size==="sm"?"maz-text-lg":n.size==="xs"?"maz-text-base":n.size==="mini"?"maz-text-sm":"md"),g=e.computed(()=>n.justify==="start"?"maz-justify-start":n.justify==="end"?"maz-justify-end":n.justify==="center"?"maz-justify-center":n.justify==="between"?"maz-justify-between":n.justify==="around"?"maz-justify-around":n.justify==="evenly"?"maz-justify-evenly":"maz-justify-center");return(o,S)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{disabled:s.value||void 0,class:e.normalizeClass(["m-btn",[`--${o.size}`,!o.fab&&!o.rounded&&o.roundedSize&&`--rounded-${o.roundedSize}`,f.value,p.value,y.value,g.value,{"--block":o.block,"--no-underline":o.noUnderline,"--fab":o.fab,"--loading":o.loading,"--disabled":s.value,"--icon":b.value,"--rounded":o.rounded,"--no-rounded":o.noRounded,"--no-padding":o.noPadding,"--no-elevation":o.noElevation}]]),type:B.value},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"left-icon",{},()=>[typeof o.leftIcon=="string"?(e.openBlock(),e.createBlock(e.unref(l),{key:0,name:o.leftIcon,class:e.normalizeClass([t.value])},null,8,["name","class"])):o.leftIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.leftIcon),{key:1,class:e.normalizeClass([t.value])},null,8,["class"])):e.createCommentVNode("v-if",!0)],!0),k.value?e.renderSlot(o.$slots,"icon",{key:0},()=>[typeof o.icon=="string"?(e.openBlock(),e.createBlock(e.unref(l),{key:0,name:o.icon,class:e.normalizeClass([t.value])},null,8,["name","class"])):o.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon),{key:1,class:e.normalizeClass([t.value])},null,8,["class"])):e.createCommentVNode("v-if",!0)],!0):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"default",{},void 0,!0),i.value?e.renderSlot(o.$slots,"right-icon",{key:1},()=>[typeof o.rightIcon=="string"?(e.openBlock(),e.createBlock(e.unref(l),{key:0,name:o.rightIcon,class:e.normalizeClass([t.value])},null,8,["name","class"])):o.rightIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.rightIcon),{key:1,class:e.normalizeClass([t.value])},null,8,["class"])):e.createCommentVNode("v-if",!0)],!0):e.createCommentVNode("v-if",!0),v.value?(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(e.unref(c),{size:"2em",color:o.color},null,8,["color"])])):e.createCommentVNode("v-if",!0)]),_:3},8,["disabled","class","type"]))}}),I=C._export_sfc(j,[["__scopeId","data-v-d3a1ed01"]]);exports.default=I;
@@ -0,0 +1,106 @@
1
+ import { defineComponent as w, defineAsyncComponent as v, useAttrs as E, useSlots as O, computed as o, openBlock as t, createBlock as a, resolveDynamicComponent as r, normalizeClass as l, withCtx as R, renderSlot as u, unref as d, createCommentVNode as i, createElementBlock as A, createVNode as D } from "vue";
2
+ import { _ as L } from "./index-CxFUggmu.mjs";
3
+ import '../assets/MazBtn.css';const N = {
4
+ key: 2,
5
+ class: "m-btn-loader-container"
6
+ }, P = /* @__PURE__ */ w({
7
+ __name: "MazBtn",
8
+ props: {
9
+ variant: { default: "button" },
10
+ size: { default: "md" },
11
+ color: { default: "primary" },
12
+ type: { default: "button" },
13
+ rounded: { type: Boolean },
14
+ roundedSize: { default: "lg" },
15
+ noRounded: { type: Boolean },
16
+ outline: { type: Boolean },
17
+ pastel: { type: Boolean },
18
+ block: { type: Boolean },
19
+ noUnderline: { type: Boolean },
20
+ loading: { type: Boolean },
21
+ disabled: { type: Boolean },
22
+ fab: { type: Boolean },
23
+ icon: { type: [String, Function, Object], default: void 0 },
24
+ leftIcon: { type: [String, Function, Object], default: void 0 },
25
+ rightIcon: { type: [String, Function, Object], default: void 0 },
26
+ noPadding: { type: Boolean },
27
+ noElevation: { type: Boolean },
28
+ justify: { default: "center" }
29
+ },
30
+ setup(z) {
31
+ const n = z, b = v(() => import("./MazSpinner-BurN-1pb.mjs")), c = v(() => import("./MazIcon-DEgoQbMj.mjs")), { href: g, to: h } = E(), f = O(), y = o(() => g ? "a" : h ? "router-link" : "button"), j = o(
32
+ () => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`
33
+ ), m = o(
34
+ () => (n.loading || n.disabled) && y.value === "button"
35
+ ), I = o(() => m.value ? "--cursor-default" : "--cursor-pointer"), k = o(() => `--is-${n.variant}`), B = o(() => n.loading && n.variant === "button"), C = o(() => !!f["left-icon"] || n.leftIcon), p = o(() => !!f["right-icon"] || n.rightIcon), S = o(() => C.value || p.value), $ = o(() => n.icon || !!f.icon), F = o(() => y.value === "button" ? n.type : void 0), s = o(() => n.size === "xl" ? "maz-text-3xl" : n.size === "lg" ? "maz-text-2xl" : n.size === "md" ? "maz-text-xl" : n.size === "sm" ? "maz-text-lg" : n.size === "xs" ? "maz-text-base" : n.size === "mini" ? "maz-text-sm" : "md"), M = o(() => n.justify === "start" ? "maz-justify-start" : n.justify === "end" ? "maz-justify-end" : n.justify === "center" ? "maz-justify-center" : n.justify === "between" ? "maz-justify-between" : n.justify === "around" ? "maz-justify-around" : n.justify === "evenly" ? "maz-justify-evenly" : "maz-justify-center");
36
+ return (e, U) => (t(), a(r(y.value), {
37
+ disabled: m.value || void 0,
38
+ class: l(["m-btn", [
39
+ `--${e.size}`,
40
+ !e.fab && !e.rounded && e.roundedSize && `--rounded-${e.roundedSize}`,
41
+ j.value,
42
+ I.value,
43
+ k.value,
44
+ M.value,
45
+ {
46
+ "--block": e.block,
47
+ "--no-underline": e.noUnderline,
48
+ "--fab": e.fab,
49
+ "--loading": e.loading,
50
+ "--disabled": m.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: F.value
59
+ }, {
60
+ default: R(() => [
61
+ u(e.$slots, "left-icon", {}, () => [
62
+ typeof e.leftIcon == "string" ? (t(), a(d(c), {
63
+ key: 0,
64
+ name: e.leftIcon,
65
+ class: l([s.value])
66
+ }, null, 8, ["name", "class"])) : e.leftIcon ? (t(), a(r(e.leftIcon), {
67
+ key: 1,
68
+ class: l([s.value])
69
+ }, null, 8, ["class"])) : i("v-if", !0)
70
+ ], !0),
71
+ $.value ? u(e.$slots, "icon", { key: 0 }, () => [
72
+ typeof e.icon == "string" ? (t(), a(d(c), {
73
+ key: 0,
74
+ name: e.icon,
75
+ class: l([s.value])
76
+ }, null, 8, ["name", "class"])) : e.icon ? (t(), a(r(e.icon), {
77
+ key: 1,
78
+ class: l([s.value])
79
+ }, null, 8, ["class"])) : i("v-if", !0)
80
+ ], !0) : i("v-if", !0),
81
+ u(e.$slots, "default", {}, void 0, !0),
82
+ p.value ? u(e.$slots, "right-icon", { key: 1 }, () => [
83
+ typeof e.rightIcon == "string" ? (t(), a(d(c), {
84
+ key: 0,
85
+ name: e.rightIcon,
86
+ class: l([s.value])
87
+ }, null, 8, ["name", "class"])) : e.rightIcon ? (t(), a(r(e.rightIcon), {
88
+ key: 1,
89
+ class: l([s.value])
90
+ }, null, 8, ["class"])) : i("v-if", !0)
91
+ ], !0) : i("v-if", !0),
92
+ B.value ? (t(), A("div", N, [
93
+ D(d(b), {
94
+ size: "2em",
95
+ color: e.color
96
+ }, null, 8, ["color"])
97
+ ])) : i("v-if", !0)
98
+ ]),
99
+ _: 3
100
+ /* FORWARDED */
101
+ }, 8, ["disabled", "class", "type"]));
102
+ }
103
+ }), q = /* @__PURE__ */ L(P, [["__scopeId", "data-v-d3a1ed01"]]);
104
+ export {
105
+ q as default
106
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),T=require("./index-BPqjUr5e.cjs"),z=["innerHTML"],x=o.defineComponent({__name:"MazIcon",props:{src:{type:String,default:void 0},path:{type:String,default:void 0},name:{type:String,default:void 0},size:{type:String,default:void 0},title:{type:String,default:void 0},transformSource:{type:Function,default:s=>s}},emits:["loaded","unloaded","error"],setup(s,{emit:m}){const i=s,d=m,a={},l=o.ref(),f=o.ref();function g(){try{return T.injectStrict("mazIconPath")}catch{return}}const v=o.computed(()=>i.path??g()),p=o.computed(()=>i.src?i.src:v.value?`${v.value}/${i.name}.svg`:`/${i.name}.svg`);o.onMounted(()=>{!i.name&&!i.src&&console.error('[maz-ui](MazIcon) you should provide "name" or "src" as prop')});function S(e,r){const t=e.querySelectorAll("title");if(t.length>0)t[0].textContent=r;else{const n=document.createElementNS("http://www.w3.org/2000/svg","title");n.textContent=r,e.append(n)}}function h(e){return Object.keys(e).reduce((r,t)=>(e[t]!==!1&&e[t]!==null&&e[t]!==void 0&&(r[t]=e[t]),r),{})}function y(e){const r={},t=e.attributes;if(!t)return r;for(let n=t.length-1;n>=0;n--)r[t[n].name]=t[n].value;return r}function w(e){let r=e.cloneNode(!0);return r=i.transformSource(e),i.title&&S(r,i.title),e.innerHTML}async function E(e){a[e]||(a[e]=M(e));try{l.value=await a[e],await o.nextTick(),d("loaded",f.value)}catch(r){l.value&&(l.value=void 0,d("unloaded")),delete a[e],d("error",r)}}function M(e){return new Promise((r,t)=>{const n=new XMLHttpRequest;n.open("GET",e,!0),n.addEventListener("load",()=>{if(n.status>=200&&n.status<400)try{let c=new DOMParser().parseFromString(n.responseText,"text/xml").querySelectorAll("svg")[0];c?(c=i.transformSource(c),r(c)):t(new Error('Loaded file is not valid SVG"'))}catch(u){t(u)}else t(new Error("Error loading SVG"))}),n.addEventListener("error",u=>t(u)),n.send()})}return o.watchEffect(()=>E(p.value)),(e,r)=>l.value?(o.openBlock(),o.createElementBlock("svg",o.mergeProps({key:0,ref_key:"svgElem",ref:f,width:"1em",height:"1em"},{...y(l.value),...h(e.$attrs)},{style:`font-size: ${s.size}`,innerHTML:w(l.value)}),null,16,z)):o.createCommentVNode("v-if",!0)}});exports.default=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),T=require("./index-CUNN0eIB.cjs"),z=["innerHTML"],x=o.defineComponent({__name:"MazIcon",props:{src:{type:String,default:void 0},path:{type:String,default:void 0},name:{type:String,default:void 0},size:{type:String,default:void 0},title:{type:String,default:void 0},transformSource:{type:Function,default:s=>s}},emits:["loaded","unloaded","error"],setup(s,{emit:m}){const i=s,d=m,a={},l=o.ref(),f=o.ref();function g(){try{return T.injectStrict("mazIconPath")}catch{return}}const v=o.computed(()=>i.path??g()),p=o.computed(()=>i.src?i.src:v.value?`${v.value}/${i.name}.svg`:`/${i.name}.svg`);o.onMounted(()=>{!i.name&&!i.src&&console.error('[maz-ui](MazIcon) you should provide "name" or "src" as prop')});function S(e,r){const t=e.querySelectorAll("title");if(t.length>0)t[0].textContent=r;else{const n=document.createElementNS("http://www.w3.org/2000/svg","title");n.textContent=r,e.append(n)}}function h(e){return Object.keys(e).reduce((r,t)=>(e[t]!==!1&&e[t]!==null&&e[t]!==void 0&&(r[t]=e[t]),r),{})}function y(e){const r={},t=e.attributes;if(!t)return r;for(let n=t.length-1;n>=0;n--)r[t[n].name]=t[n].value;return r}function w(e){let r=e.cloneNode(!0);return r=i.transformSource(e),i.title&&S(r,i.title),e.innerHTML}async function E(e){a[e]||(a[e]=M(e));try{l.value=await a[e],await o.nextTick(),d("loaded",f.value)}catch(r){l.value&&(l.value=void 0,d("unloaded")),delete a[e],d("error",r)}}function M(e){return new Promise((r,t)=>{const n=new XMLHttpRequest;n.open("GET",e,!0),n.addEventListener("load",()=>{if(n.status>=200&&n.status<400)try{let c=new DOMParser().parseFromString(n.responseText,"text/xml").querySelectorAll("svg")[0];c?(c=i.transformSource(c),r(c)):t(new Error('Loaded file is not valid SVG"'))}catch(u){t(u)}else t(new Error("Error loading SVG"))}),n.addEventListener("error",u=>t(u)),n.send()})}return o.watchEffect(()=>E(p.value)),(e,r)=>l.value?(o.openBlock(),o.createElementBlock("svg",o.mergeProps({key:0,ref_key:"svgElem",ref:f,width:"1em",height:"1em"},{...y(l.value),...h(e.$attrs)},{style:`font-size: ${s.size}`,innerHTML:w(l.value)}),null,16,z)):o.createCommentVNode("v-if",!0)}});exports.default=x;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as T, ref as m, computed as v, onMounted as x, watchEffect as L, openBlock as P, createElementBlock as _, mergeProps as A, createCommentVNode as C, nextTick as $ } from "vue";
2
- import { i as q } from "./index-x2F1l5sr.mjs";
2
+ import { i as q } from "./index-CxFUggmu.mjs";
3
3
  const H = ["innerHTML"], V = /* @__PURE__ */ T({
4
4
  __name: "MazIcon",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as o, openBlock as s, createElementBlock as t, normalizeClass as r, createElementVNode as p } from "vue";
2
- import { _ as a } from "./index-x2F1l5sr.mjs";
2
+ import { _ as a } from "./index-CxFUggmu.mjs";
3
3
  import '../assets/MazSpinner.css';const i = ["width", "height"], l = /* @__PURE__ */ o({
4
4
  __name: "MazSpinner",
5
5
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../assets/MazSpinner.css');const e=require("vue"),s=require("./index-BPqjUr5e.cjs"),o=["width","height"],r=e.defineComponent({__name:"MazSpinner",props:{size:{default:"2em"},color:{default:"theme"}},setup(l){return(n,t)=>(e.openBlock(),e.createElementBlock("svg",{width:n.size,height:n.size,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50","xml:space":"preserve",class:e.normalizeClass(["m-spinner",`m-spinner--${n.color}`]),style:{"enable-background":"new 0 0 50 50"}},t[0]||(t[0]=[e.createElementVNode("path",{d:"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"},null,-1)]),10,o))}}),i=s._export_sfc(r,[["__scopeId","data-v-2868435d"]]);exports.default=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../assets/MazSpinner.css');const e=require("vue"),s=require("./index-CUNN0eIB.cjs"),o=["width","height"],r=e.defineComponent({__name:"MazSpinner",props:{size:{default:"2em"},color:{default:"theme"}},setup(l){return(n,t)=>(e.openBlock(),e.createElementBlock("svg",{width:n.size,height:n.size,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50","xml:space":"preserve",class:e.normalizeClass(["m-spinner",`m-spinner--${n.color}`]),style:{"enable-background":"new 0 0 50 50"}},t[0]||(t[0]=[e.createElementVNode("path",{d:"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"},null,-1)]),10,o))}}),i=s._export_sfc(r,[["__scopeId","data-v-2868435d"]]);exports.default=i;