maz-ui 3.27.2 → 3.27.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazAvatar.d.ts +9 -0
- package/components/MazAvatar.mjs +1 -1
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCarousel.mjs +1 -1
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazSelect.mjs +1 -1
- package/components/MazTabsBar.mjs +9 -9
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazAvatar.css +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/chunks/MazAvatar-R8NMQtnF.mjs +127 -0
- package/components/chunks/{MazBottomSheet-xBiP2XHS.mjs → MazBottomSheet-lN1FCdEJ.mjs} +1 -1
- package/components/chunks/{MazBtn-LExLZ_5E.mjs → MazBtn-1HG8e-TR.mjs} +3 -3
- package/components/chunks/{MazBtn-SmJwJsv2.mjs → MazBtn-1wfj_m47.mjs} +2 -2
- package/components/chunks/{MazBtn-0YAZPugZ.mjs → MazBtn-75uMWztZ.mjs} +3 -3
- package/components/chunks/MazBtn-Ho_JsY-3.mjs +152 -0
- package/components/chunks/{MazBtn-8RfdQqKD.mjs → MazBtn-aeOcptVQ.mjs} +3 -3
- package/components/chunks/{MazBtn--_QbzFEn.mjs → MazBtn-e7VeHVh0.mjs} +3 -3
- package/components/chunks/{MazBtn-0I3mOlOJ.mjs → MazBtn-hDvvJ5wM.mjs} +3 -3
- package/components/chunks/{MazBtn-MFxzrbrk.mjs → MazBtn-hVmJi-uK.mjs} +3 -3
- package/components/chunks/MazBtn-ihybeYfj.mjs +152 -0
- package/components/chunks/{MazBtn-oAmpwHES.mjs → MazBtn-l5heH9BB.mjs} +3 -3
- package/components/chunks/MazBtn-q_j1isrL.mjs +152 -0
- package/components/chunks/MazBtn-sUd8NHwp.mjs +152 -0
- package/components/chunks/{MazBtn-y1-B6bAs.mjs → MazBtn-tjMMZdlj.mjs} +1 -1
- package/components/chunks/{MazBtn-qSZOL-5_.mjs → MazBtn-xF3JhNDM.mjs} +2 -2
- package/components/chunks/{MazCard-W8HKEJ8d.mjs → MazCard-cwUZUG7s.mjs} +1 -1
- package/components/chunks/{MazCarousel--9EpK5a7.mjs → MazCarousel-TalH9tUI.mjs} +1 -1
- package/components/chunks/{MazCheckbox-C5TE5LKf.mjs → MazCheckbox-UsaGBQwX.mjs} +1 -1
- package/components/chunks/{MazCheckbox-SfV0UBCp.mjs → MazCheckbox-bIUpH7sU.mjs} +1 -1
- package/components/chunks/{MazDialog-VkT6NGk2.mjs → MazDialog-4hwbB9Pu.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-l3UFldnD.mjs → MazDialogPromise-S5KZWzcc.mjs} +2 -2
- package/components/chunks/{MazDrawer-3F4gXWn3.mjs → MazDrawer-_GgnPn3R.mjs} +1 -1
- package/components/chunks/{MazGallery-xTmpaIFo.mjs → MazGallery-Y-ol1_h4.mjs} +1 -1
- package/components/chunks/{MazInput-6Q9hJNva.mjs → MazInput-h4Rs2XYn.mjs} +9 -9
- package/components/chunks/{MazInput-sZWYXVcu.mjs → MazInput-yHHDCRaH.mjs} +2 -2
- package/components/chunks/{MazInput-JBsukk0T.mjs → MazInput-ygxp70-3.mjs} +14 -14
- package/components/chunks/{MazInputPrice-A7UEFWHD.mjs → MazInputPrice-ZGeD_WE9.mjs} +2 -2
- package/components/chunks/{MazInputTags-3yh4LQ9s.mjs → MazInputTags-c_GGD8Rk.mjs} +3 -3
- package/components/chunks/{MazLazyImg-Fca-bx9H.mjs → MazLazyImg-ZOc12h_Y.mjs} +2 -2
- package/components/chunks/{MazPhoneNumberInput-v9rbDA6q.mjs → MazPhoneNumberInput-RJZxI6Ov.mjs} +3 -3
- package/components/chunks/{MazPicker-mJ6cn2Bn.mjs → MazPicker--SpH1ACw.mjs} +2 -2
- package/components/chunks/{MazPickerCalendar-F6_w9LqU.mjs → MazPickerCalendar-dq57Doac.mjs} +3 -3
- package/components/chunks/{MazPickerHeader-VgRynRUP.mjs → MazPickerHeader-vADXyCp_.mjs} +1 -1
- package/components/chunks/{MazPickerMonthSwitcher-4pKbCK04.mjs → MazPickerMonthSwitcher-aeRVlsoy.mjs} +2 -2
- package/components/chunks/{MazPickerShortcuts-N6Uci35g.mjs → MazPickerShortcuts-2IhArlZ9.mjs} +2 -2
- package/components/chunks/{MazPickerTime-CHrTTUTu.mjs → MazPickerTime-ImYGbQI8.mjs} +2 -2
- package/components/chunks/{MazPickerYearSwitcher-gtNIVerE.mjs → MazPickerYearSwitcher-pXTsByr2.mjs} +3 -3
- package/components/chunks/{MazSelect-J-Ww10JN.mjs → MazSelect-uJKJJNB9.mjs} +63 -63
- package/components/chunks/MazSpinner-EmXW48S8.mjs +38 -0
- package/components/chunks/{MazSpinner-E1f0p5Od.mjs → MazSpinner-PAKaV_kV.mjs} +1 -1
- package/components/chunks/{MazSpinner-HxbToZa8.mjs → MazSpinner-QH5vPuqi.mjs} +1 -1
- package/components/chunks/MazSpinner-RhkqC4sZ.mjs +38 -0
- package/components/chunks/{MazSpinner-EKy-ECIw.mjs → MazSpinner-WyW51HfP.mjs} +1 -1
- package/components/chunks/MazSpinner-_b04NIxo.mjs +38 -0
- package/components/chunks/MazSpinner-aqN2yL-8.mjs +38 -0
- package/components/chunks/MazSpinner-n6W-1Z6P.mjs +38 -0
- package/components/chunks/MazSpinner-o8W7u7BZ.mjs +38 -0
- package/components/chunks/{MazSpinner-Gtge6X2k.mjs → MazSpinner-pzC3nmKA.mjs} +1 -1
- package/components/chunks/MazSpinner-qBW8Wt2P.mjs +38 -0
- package/components/chunks/{MazSpinner-jtNGqgdh.mjs → MazSpinner-qwEk1DME.mjs} +1 -1
- package/components/chunks/MazSpinner-rJ9z86Wt.mjs +38 -0
- package/components/chunks/{MazSpinner-T09dmF-u.mjs → MazSpinner-tcjX1fe3.mjs} +1 -1
- package/components/chunks/{MazSpinner-dusYVMdB.mjs → MazSpinner-wkIScBpQ.mjs} +1 -1
- package/components/chunks/{MazTransitionExpand-sx0zlvrd.mjs → MazTransitionExpand-wUHMfp4T.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/chunks/{MazBtn-DUWSBfcR.cjs → MazBtn-BjjqJeyy.cjs} +1 -1
- package/modules/chunks/{MazBtn-7K12yZ6I.mjs → MazBtn-i7A6854I.mjs} +3 -3
- package/modules/chunks/{MazIcon-jV2j5-vQ.mjs → MazIcon-_zmW6Z2N.mjs} +1 -1
- package/modules/chunks/{MazIcon-Oj1DZi0J.cjs → MazIcon-mZNgyUkv.cjs} +1 -1
- package/modules/chunks/{MazSpinner-FvaDeIHB.cjs → MazSpinner-mn9MhxbV.cjs} +1 -1
- package/modules/chunks/{MazSpinner-JIi1LXux.mjs → MazSpinner-zUQyynC3.mjs} +1 -1
- package/modules/chunks/{index-2ztHYBiq.cjs → index-DCZgntsf.cjs} +1 -1
- package/modules/chunks/{index-wZ3oEJrJ.mjs → index-ezXyG63J.mjs} +2 -2
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazAvatar.vue.d.ts +9 -0
- package/components/chunks/MazAvatar-RHmR_HKk.mjs +0 -126
- package/components/chunks/MazBtn-NKLCh3K0.mjs +0 -152
- package/components/chunks/MazBtn-R9twVXzi.mjs +0 -152
- package/components/chunks/MazBtn-V4TdQPvz.mjs +0 -152
- package/components/chunks/MazBtn-VJ6PjVgq.mjs +0 -152
- package/components/chunks/MazSpinner-VNu4q7AS.mjs +0 -38
- package/components/chunks/MazSpinner-_iylCUmE.mjs +0 -38
- package/components/chunks/MazSpinner-hl5p2Ja0.mjs +0 -38
- package/components/chunks/MazSpinner-iL3UOtWy.mjs +0 -38
- package/components/chunks/MazSpinner-jit3i4WQ.mjs +0 -38
- package/components/chunks/MazSpinner-osfOp0qm.mjs +0 -38
- package/components/chunks/MazSpinner-q4I09Hr8.mjs +0 -38
- package/components/chunks/MazSpinner-riqwp9Ow.mjs +0 -38
|
@@ -67,6 +67,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
67
67
|
type: BooleanConstructor;
|
|
68
68
|
default: boolean;
|
|
69
69
|
};
|
|
70
|
+
letterCount: {
|
|
71
|
+
type: NumberConstructor;
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
70
74
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
71
75
|
click: (...args: any[]) => void;
|
|
72
76
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -135,6 +139,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
135
139
|
type: BooleanConstructor;
|
|
136
140
|
default: boolean;
|
|
137
141
|
};
|
|
142
|
+
letterCount: {
|
|
143
|
+
type: NumberConstructor;
|
|
144
|
+
default: undefined;
|
|
145
|
+
};
|
|
138
146
|
}>> & {
|
|
139
147
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
140
148
|
}, {
|
|
@@ -154,6 +162,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
154
162
|
showCaption: boolean;
|
|
155
163
|
buttonColor: Color;
|
|
156
164
|
noClickableIcon: boolean;
|
|
165
|
+
letterCount: number;
|
|
157
166
|
}, {}>, {
|
|
158
167
|
"round-text"?(_: {}): any;
|
|
159
168
|
icon?(_: {}): any;
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import "../assets/MazAvatar.css";
|
|
2
|
-
import { defineComponent as z, defineAsyncComponent as f, computed as m, openBlock as c, createBlock as v, resolveDynamicComponent as B, normalizeStyle as y, normalizeClass as k, withCtx as S, createElementVNode as b, unref as g, createCommentVNode as l, renderSlot as d, toDisplayString as h, createElementBlock as C, createVNode as $ } from "vue";
|
|
3
|
-
const w = ["tabindex"], I = { class: "m-avatar__initial" }, L = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "m-avatar__caption"
|
|
6
|
-
}, x = /* @__PURE__ */ z({
|
|
7
|
-
__name: "MazAvatar",
|
|
8
|
-
props: {
|
|
9
|
-
src: {
|
|
10
|
-
type: String,
|
|
11
|
-
default: void 0
|
|
12
|
-
},
|
|
13
|
-
caption: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: void 0
|
|
16
|
-
},
|
|
17
|
-
href: { type: String, default: void 0 },
|
|
18
|
-
to: { type: Object, default: void 0 },
|
|
19
|
-
alt: { type: String, default: "avatar image" },
|
|
20
|
-
target: { type: String, default: "_self" },
|
|
21
|
-
size: { type: String, default: void 0 },
|
|
22
|
-
bordered: { type: Boolean, default: !1 },
|
|
23
|
-
clickable: { type: Boolean, default: !1 },
|
|
24
|
-
square: { type: Boolean, default: !1 },
|
|
25
|
-
noElevation: { type: Boolean, default: !1 },
|
|
26
|
-
showCaption: { type: Boolean, default: !1 },
|
|
27
|
-
imageHeightFull: { type: Boolean, default: !1 },
|
|
28
|
-
noLoader: { type: Boolean, default: !1 },
|
|
29
|
-
buttonColor: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "info"
|
|
32
|
-
},
|
|
33
|
-
/** Remove the icon on hover when component is clickable */
|
|
34
|
-
noClickableIcon: { type: Boolean, default: !1 }
|
|
35
|
-
},
|
|
36
|
-
emits: ["click"],
|
|
37
|
-
setup(e) {
|
|
38
|
-
const r = f(() => import("./MazLazyImg-Fca-bx9H.mjs")), n = f(() => import("./pencil-laNW5qNQ.mjs")), t = e, s = m(() => t.to ? "RouterLink" : t.href ? "a" : "div"), u = m(() => !!t.to || !!t.href);
|
|
39
|
-
return (o, i) => (c(), v(B(s.value), {
|
|
40
|
-
style: y({ fontSize: e.size }),
|
|
41
|
-
class: k(["m-avatar", [
|
|
42
|
-
{
|
|
43
|
-
"--has-link": u.value
|
|
44
|
-
}
|
|
45
|
-
]]),
|
|
46
|
-
href: e.href,
|
|
47
|
-
to: e.to,
|
|
48
|
-
target: u.value ? e.target : void 0
|
|
49
|
-
}, {
|
|
50
|
-
default: S(() => [
|
|
51
|
-
b("div", {
|
|
52
|
-
class: k(["m-avatar__wrapper", {
|
|
53
|
-
"--has-shadow": !e.noElevation,
|
|
54
|
-
"--bordered": e.bordered,
|
|
55
|
-
"--clickable": e.clickable,
|
|
56
|
-
"--square": e.square,
|
|
57
|
-
"--has-initial": !e.src && e.caption
|
|
58
|
-
}]),
|
|
59
|
-
tabindex: e.clickable ? 0 : -1
|
|
60
|
-
}, [
|
|
61
|
-
e.src ? (c(), v(g(r), {
|
|
62
|
-
key: 0,
|
|
63
|
-
class: "m-avatar__picture maz-max-w-full",
|
|
64
|
-
image: e.src,
|
|
65
|
-
alt: e.alt,
|
|
66
|
-
"image-height-full": "",
|
|
67
|
-
"no-loader": e.noLoader,
|
|
68
|
-
onClick: i[0] || (i[0] = (a) => e.clickable ? o.$emit("click", a) : null)
|
|
69
|
-
}, null, 8, ["image", "alt", "no-loader"])) : l("v-if", !0),
|
|
70
|
-
e.caption && !e.src ? d(o.$slots, "round-text", { key: 1 }, () => {
|
|
71
|
-
var a;
|
|
72
|
-
return [
|
|
73
|
-
b(
|
|
74
|
-
"span",
|
|
75
|
-
I,
|
|
76
|
-
h((a = e.caption) == null ? void 0 : a.charAt(0)),
|
|
77
|
-
1
|
|
78
|
-
/* TEXT */
|
|
79
|
-
)
|
|
80
|
-
];
|
|
81
|
-
}, !0) : l("v-if", !0),
|
|
82
|
-
e.clickable ? (c(), C(
|
|
83
|
-
"button",
|
|
84
|
-
{
|
|
85
|
-
key: 2,
|
|
86
|
-
type: "button",
|
|
87
|
-
tabindex: "-1",
|
|
88
|
-
class: "m-avatar__button",
|
|
89
|
-
style: y({
|
|
90
|
-
backgroundColor: e.src ? `var(--maz-color-${e.buttonColor}-alpha)` : `var(--maz-color-${e.buttonColor})`
|
|
91
|
-
}),
|
|
92
|
-
onClick: i[1] || (i[1] = (a) => o.$emit("click", a))
|
|
93
|
-
},
|
|
94
|
-
[
|
|
95
|
-
e.noClickableIcon ? l("v-if", !0) : d(o.$slots, "icon", { key: 0 }, () => [
|
|
96
|
-
$(g(n), { class: "m-avatar__button__icon" })
|
|
97
|
-
], !0)
|
|
98
|
-
],
|
|
99
|
-
4
|
|
100
|
-
/* STYLE */
|
|
101
|
-
)) : l("v-if", !0)
|
|
102
|
-
], 10, w),
|
|
103
|
-
d(o.$slots, "caption", {}, () => [
|
|
104
|
-
e.showCaption && e.caption ? (c(), C(
|
|
105
|
-
"p",
|
|
106
|
-
L,
|
|
107
|
-
h(e.caption),
|
|
108
|
-
1
|
|
109
|
-
/* TEXT */
|
|
110
|
-
)) : l("v-if", !0)
|
|
111
|
-
], !0)
|
|
112
|
-
]),
|
|
113
|
-
_: 3
|
|
114
|
-
/* FORWARDED */
|
|
115
|
-
}, 8, ["style", "class", "href", "to", "target"]));
|
|
116
|
-
}
|
|
117
|
-
}), A = (e, r) => {
|
|
118
|
-
const n = e.__vccOpts || e;
|
|
119
|
-
for (const [t, s] of r)
|
|
120
|
-
n[t] = s;
|
|
121
|
-
return n;
|
|
122
|
-
}, q = /* @__PURE__ */ A(x, [["__scopeId", "data-v-ce526c7e"]]);
|
|
123
|
-
export {
|
|
124
|
-
q as M,
|
|
125
|
-
A as _
|
|
126
|
-
};
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import "../assets/MazBtn.css";
|
|
2
|
-
import { defineComponent as M, defineAsyncComponent as z, useAttrs as E, useSlots as L, onBeforeMount as R, computed as t, openBlock as o, createBlock as i, resolveDynamicComponent as w, normalizeClass as u, withCtx as A, createElementBlock as v, renderSlot as r, unref as d, createCommentVNode as a, createElementVNode as D } from "vue";
|
|
3
|
-
import { _ as N } from "./MazDrawer-3F4gXWn3.mjs";
|
|
4
|
-
const P = /* @__PURE__ */ M({
|
|
5
|
-
__name: "MazBtn",
|
|
6
|
-
props: {
|
|
7
|
-
variant: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: "button",
|
|
10
|
-
validator: (e) => ["button", "link"].includes(e)
|
|
11
|
-
},
|
|
12
|
-
size: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: "md",
|
|
15
|
-
validator: (e) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(e)
|
|
16
|
-
},
|
|
17
|
-
color: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: "primary"
|
|
20
|
-
},
|
|
21
|
-
type: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: "button",
|
|
24
|
-
validator: (e) => ["button", "submit", "reset"].includes(e)
|
|
25
|
-
},
|
|
26
|
-
rounded: { type: Boolean, default: !1 },
|
|
27
|
-
noRounded: { type: Boolean, default: !1 },
|
|
28
|
-
outline: { type: Boolean, default: !1 },
|
|
29
|
-
pastel: { type: Boolean, default: !1 },
|
|
30
|
-
block: { type: Boolean, default: !1 },
|
|
31
|
-
noUnderline: { type: Boolean, default: !1 },
|
|
32
|
-
noLeading: { type: Boolean, default: !1 },
|
|
33
|
-
loading: { type: Boolean, default: !1 },
|
|
34
|
-
disabled: { type: Boolean, default: !1 },
|
|
35
|
-
fab: { type: Boolean, default: !1 },
|
|
36
|
-
icon: { type: String, default: void 0 },
|
|
37
|
-
leftIcon: { type: String, default: void 0 },
|
|
38
|
-
rightIcon: { type: String, default: void 0 },
|
|
39
|
-
noPadding: { type: Boolean, default: !1 },
|
|
40
|
-
noElevation: { type: Boolean, default: !1 }
|
|
41
|
-
},
|
|
42
|
-
setup(e) {
|
|
43
|
-
const p = z(() => import("./MazSpinner-_iylCUmE.mjs")), c = z(() => import("./MazIcon-RrJDzX3V.mjs")), { href: B, to: h } = E(), b = L(), n = e;
|
|
44
|
-
R(() => {
|
|
45
|
-
n.icon && !n.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
|
|
46
|
-
});
|
|
47
|
-
const f = t(() => B ? "a" : h ? "router-link" : "button"), k = t(
|
|
48
|
-
() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`
|
|
49
|
-
), m = t(
|
|
50
|
-
() => (n.loading || n.disabled) && f.value === "button"
|
|
51
|
-
), I = t(() => m.value ? "--cursor-default" : "--cursor-pointer"), x = t(() => `--is-${n.variant}`), l = t(() => n.loading && n.variant === "button"), y = t(() => !!b["left-icon"] || n.leftIcon), g = t(() => !!b["right-icon"] || n.rightIcon), C = t(() => y.value || g.value), S = t(() => n.fab && n.icon), $ = t(() => f.value === "button" ? n.type : void 0);
|
|
52
|
-
return (s, U) => (o(), i(w(f.value), {
|
|
53
|
-
disabled: m.value,
|
|
54
|
-
class: u(["m-btn", [
|
|
55
|
-
`--${e.size}`,
|
|
56
|
-
k.value,
|
|
57
|
-
I.value,
|
|
58
|
-
x.value,
|
|
59
|
-
{
|
|
60
|
-
"--block": e.block,
|
|
61
|
-
"--no-underline": e.noUnderline,
|
|
62
|
-
"--no-leading": e.noLeading,
|
|
63
|
-
"--fab": e.fab,
|
|
64
|
-
"--loading": e.loading,
|
|
65
|
-
"--disabled": m.value,
|
|
66
|
-
"--icon": C.value,
|
|
67
|
-
"--rounded": e.rounded,
|
|
68
|
-
"--no-rounded": e.noRounded,
|
|
69
|
-
"--no-padding": e.noPadding,
|
|
70
|
-
"--no-elevation": e.noElevation
|
|
71
|
-
}
|
|
72
|
-
]]),
|
|
73
|
-
type: $.value
|
|
74
|
-
}, {
|
|
75
|
-
default: A(() => [
|
|
76
|
-
y.value ? (o(), v(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
key: 0,
|
|
80
|
-
class: u(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
81
|
-
},
|
|
82
|
-
[
|
|
83
|
-
r(s.$slots, "left-icon", {}, () => [
|
|
84
|
-
e.leftIcon ? (o(), i(d(c), {
|
|
85
|
-
key: 0,
|
|
86
|
-
name: e.leftIcon
|
|
87
|
-
}, null, 8, ["name"])) : a("v-if", !0)
|
|
88
|
-
], !0)
|
|
89
|
-
],
|
|
90
|
-
2
|
|
91
|
-
/* CLASS */
|
|
92
|
-
)) : a("v-if", !0),
|
|
93
|
-
S.value ? (o(), v(
|
|
94
|
-
"div",
|
|
95
|
-
{
|
|
96
|
-
key: 1,
|
|
97
|
-
class: u(["m-btn__icon maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
98
|
-
},
|
|
99
|
-
[
|
|
100
|
-
r(s.$slots, "icon", {}, () => [
|
|
101
|
-
e.icon ? (o(), i(d(c), {
|
|
102
|
-
key: 0,
|
|
103
|
-
name: e.icon
|
|
104
|
-
}, null, 8, ["name"])) : a("v-if", !0)
|
|
105
|
-
], !0)
|
|
106
|
-
],
|
|
107
|
-
2
|
|
108
|
-
/* CLASS */
|
|
109
|
-
)) : a("v-if", !0),
|
|
110
|
-
D(
|
|
111
|
-
"span",
|
|
112
|
-
{
|
|
113
|
-
class: u(["maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
114
|
-
},
|
|
115
|
-
[
|
|
116
|
-
r(s.$slots, "default", {}, void 0, !0)
|
|
117
|
-
],
|
|
118
|
-
2
|
|
119
|
-
/* CLASS */
|
|
120
|
-
),
|
|
121
|
-
g.value ? (o(), v(
|
|
122
|
-
"div",
|
|
123
|
-
{
|
|
124
|
-
key: 2,
|
|
125
|
-
class: u(["m-btn__icon-right maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
126
|
-
},
|
|
127
|
-
[
|
|
128
|
-
r(s.$slots, "right-icon", {}, () => [
|
|
129
|
-
e.rightIcon ? (o(), i(d(c), {
|
|
130
|
-
key: 0,
|
|
131
|
-
name: e.rightIcon
|
|
132
|
-
}, null, 8, ["name"])) : a("v-if", !0)
|
|
133
|
-
], !0)
|
|
134
|
-
],
|
|
135
|
-
2
|
|
136
|
-
/* CLASS */
|
|
137
|
-
)) : a("v-if", !0),
|
|
138
|
-
l.value ? (o(), i(d(p), {
|
|
139
|
-
key: 3,
|
|
140
|
-
size: "2em",
|
|
141
|
-
color: e.color,
|
|
142
|
-
class: "maz-absolute"
|
|
143
|
-
}, null, 8, ["color"])) : a("v-if", !0)
|
|
144
|
-
]),
|
|
145
|
-
_: 3
|
|
146
|
-
/* FORWARDED */
|
|
147
|
-
}, 8, ["disabled", "class", "type"]));
|
|
148
|
-
}
|
|
149
|
-
}), j = /* @__PURE__ */ N(P, [["__scopeId", "data-v-78782cb0"]]);
|
|
150
|
-
export {
|
|
151
|
-
j as default
|
|
152
|
-
};
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import "../assets/MazBtn.css";
|
|
2
|
-
import { defineComponent as M, defineAsyncComponent as z, useAttrs as E, useSlots as L, onBeforeMount as R, computed as t, openBlock as o, createBlock as i, resolveDynamicComponent as w, normalizeClass as u, withCtx as A, createElementBlock as v, renderSlot as r, unref as d, createCommentVNode as a, createElementVNode as D } from "vue";
|
|
3
|
-
import { _ as N } from "./MazInputPrice-A7UEFWHD.mjs";
|
|
4
|
-
const P = /* @__PURE__ */ M({
|
|
5
|
-
__name: "MazBtn",
|
|
6
|
-
props: {
|
|
7
|
-
variant: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: "button",
|
|
10
|
-
validator: (e) => ["button", "link"].includes(e)
|
|
11
|
-
},
|
|
12
|
-
size: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: "md",
|
|
15
|
-
validator: (e) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(e)
|
|
16
|
-
},
|
|
17
|
-
color: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: "primary"
|
|
20
|
-
},
|
|
21
|
-
type: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: "button",
|
|
24
|
-
validator: (e) => ["button", "submit", "reset"].includes(e)
|
|
25
|
-
},
|
|
26
|
-
rounded: { type: Boolean, default: !1 },
|
|
27
|
-
noRounded: { type: Boolean, default: !1 },
|
|
28
|
-
outline: { type: Boolean, default: !1 },
|
|
29
|
-
pastel: { type: Boolean, default: !1 },
|
|
30
|
-
block: { type: Boolean, default: !1 },
|
|
31
|
-
noUnderline: { type: Boolean, default: !1 },
|
|
32
|
-
noLeading: { type: Boolean, default: !1 },
|
|
33
|
-
loading: { type: Boolean, default: !1 },
|
|
34
|
-
disabled: { type: Boolean, default: !1 },
|
|
35
|
-
fab: { type: Boolean, default: !1 },
|
|
36
|
-
icon: { type: String, default: void 0 },
|
|
37
|
-
leftIcon: { type: String, default: void 0 },
|
|
38
|
-
rightIcon: { type: String, default: void 0 },
|
|
39
|
-
noPadding: { type: Boolean, default: !1 },
|
|
40
|
-
noElevation: { type: Boolean, default: !1 }
|
|
41
|
-
},
|
|
42
|
-
setup(e) {
|
|
43
|
-
const p = z(() => import("./MazSpinner-hl5p2Ja0.mjs")), c = z(() => import("./MazIcon-RrJDzX3V.mjs")), { href: B, to: h } = E(), b = L(), n = e;
|
|
44
|
-
R(() => {
|
|
45
|
-
n.icon && !n.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
|
|
46
|
-
});
|
|
47
|
-
const f = t(() => B ? "a" : h ? "router-link" : "button"), k = t(
|
|
48
|
-
() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`
|
|
49
|
-
), m = t(
|
|
50
|
-
() => (n.loading || n.disabled) && f.value === "button"
|
|
51
|
-
), I = t(() => m.value ? "--cursor-default" : "--cursor-pointer"), x = t(() => `--is-${n.variant}`), l = t(() => n.loading && n.variant === "button"), y = t(() => !!b["left-icon"] || n.leftIcon), g = t(() => !!b["right-icon"] || n.rightIcon), C = t(() => y.value || g.value), S = t(() => n.fab && n.icon), $ = t(() => f.value === "button" ? n.type : void 0);
|
|
52
|
-
return (s, U) => (o(), i(w(f.value), {
|
|
53
|
-
disabled: m.value,
|
|
54
|
-
class: u(["m-btn", [
|
|
55
|
-
`--${e.size}`,
|
|
56
|
-
k.value,
|
|
57
|
-
I.value,
|
|
58
|
-
x.value,
|
|
59
|
-
{
|
|
60
|
-
"--block": e.block,
|
|
61
|
-
"--no-underline": e.noUnderline,
|
|
62
|
-
"--no-leading": e.noLeading,
|
|
63
|
-
"--fab": e.fab,
|
|
64
|
-
"--loading": e.loading,
|
|
65
|
-
"--disabled": m.value,
|
|
66
|
-
"--icon": C.value,
|
|
67
|
-
"--rounded": e.rounded,
|
|
68
|
-
"--no-rounded": e.noRounded,
|
|
69
|
-
"--no-padding": e.noPadding,
|
|
70
|
-
"--no-elevation": e.noElevation
|
|
71
|
-
}
|
|
72
|
-
]]),
|
|
73
|
-
type: $.value
|
|
74
|
-
}, {
|
|
75
|
-
default: A(() => [
|
|
76
|
-
y.value ? (o(), v(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
key: 0,
|
|
80
|
-
class: u(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
81
|
-
},
|
|
82
|
-
[
|
|
83
|
-
r(s.$slots, "left-icon", {}, () => [
|
|
84
|
-
e.leftIcon ? (o(), i(d(c), {
|
|
85
|
-
key: 0,
|
|
86
|
-
name: e.leftIcon
|
|
87
|
-
}, null, 8, ["name"])) : a("v-if", !0)
|
|
88
|
-
], !0)
|
|
89
|
-
],
|
|
90
|
-
2
|
|
91
|
-
/* CLASS */
|
|
92
|
-
)) : a("v-if", !0),
|
|
93
|
-
S.value ? (o(), v(
|
|
94
|
-
"div",
|
|
95
|
-
{
|
|
96
|
-
key: 1,
|
|
97
|
-
class: u(["m-btn__icon maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
98
|
-
},
|
|
99
|
-
[
|
|
100
|
-
r(s.$slots, "icon", {}, () => [
|
|
101
|
-
e.icon ? (o(), i(d(c), {
|
|
102
|
-
key: 0,
|
|
103
|
-
name: e.icon
|
|
104
|
-
}, null, 8, ["name"])) : a("v-if", !0)
|
|
105
|
-
], !0)
|
|
106
|
-
],
|
|
107
|
-
2
|
|
108
|
-
/* CLASS */
|
|
109
|
-
)) : a("v-if", !0),
|
|
110
|
-
D(
|
|
111
|
-
"span",
|
|
112
|
-
{
|
|
113
|
-
class: u(["maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
114
|
-
},
|
|
115
|
-
[
|
|
116
|
-
r(s.$slots, "default", {}, void 0, !0)
|
|
117
|
-
],
|
|
118
|
-
2
|
|
119
|
-
/* CLASS */
|
|
120
|
-
),
|
|
121
|
-
g.value ? (o(), v(
|
|
122
|
-
"div",
|
|
123
|
-
{
|
|
124
|
-
key: 2,
|
|
125
|
-
class: u(["m-btn__icon-right maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
126
|
-
},
|
|
127
|
-
[
|
|
128
|
-
r(s.$slots, "right-icon", {}, () => [
|
|
129
|
-
e.rightIcon ? (o(), i(d(c), {
|
|
130
|
-
key: 0,
|
|
131
|
-
name: e.rightIcon
|
|
132
|
-
}, null, 8, ["name"])) : a("v-if", !0)
|
|
133
|
-
], !0)
|
|
134
|
-
],
|
|
135
|
-
2
|
|
136
|
-
/* CLASS */
|
|
137
|
-
)) : a("v-if", !0),
|
|
138
|
-
l.value ? (o(), i(d(p), {
|
|
139
|
-
key: 3,
|
|
140
|
-
size: "2em",
|
|
141
|
-
color: e.color,
|
|
142
|
-
class: "maz-absolute"
|
|
143
|
-
}, null, 8, ["color"])) : a("v-if", !0)
|
|
144
|
-
]),
|
|
145
|
-
_: 3
|
|
146
|
-
/* FORWARDED */
|
|
147
|
-
}, 8, ["disabled", "class", "type"]));
|
|
148
|
-
}
|
|
149
|
-
}), j = /* @__PURE__ */ N(P, [["__scopeId", "data-v-78782cb0"]]);
|
|
150
|
-
export {
|
|
151
|
-
j as default
|
|
152
|
-
};
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import "../assets/MazBtn.css";
|
|
2
|
-
import { defineComponent as M, defineAsyncComponent as z, useAttrs as E, useSlots as L, onBeforeMount as R, computed as t, openBlock as o, createBlock as i, resolveDynamicComponent as w, normalizeClass as u, withCtx as A, createElementBlock as v, renderSlot as r, unref as d, createCommentVNode as a, createElementVNode as D } from "vue";
|
|
3
|
-
import { _ as N } from "./MazBottomSheet-xBiP2XHS.mjs";
|
|
4
|
-
const P = /* @__PURE__ */ M({
|
|
5
|
-
__name: "MazBtn",
|
|
6
|
-
props: {
|
|
7
|
-
variant: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: "button",
|
|
10
|
-
validator: (e) => ["button", "link"].includes(e)
|
|
11
|
-
},
|
|
12
|
-
size: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: "md",
|
|
15
|
-
validator: (e) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(e)
|
|
16
|
-
},
|
|
17
|
-
color: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: "primary"
|
|
20
|
-
},
|
|
21
|
-
type: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: "button",
|
|
24
|
-
validator: (e) => ["button", "submit", "reset"].includes(e)
|
|
25
|
-
},
|
|
26
|
-
rounded: { type: Boolean, default: !1 },
|
|
27
|
-
noRounded: { type: Boolean, default: !1 },
|
|
28
|
-
outline: { type: Boolean, default: !1 },
|
|
29
|
-
pastel: { type: Boolean, default: !1 },
|
|
30
|
-
block: { type: Boolean, default: !1 },
|
|
31
|
-
noUnderline: { type: Boolean, default: !1 },
|
|
32
|
-
noLeading: { type: Boolean, default: !1 },
|
|
33
|
-
loading: { type: Boolean, default: !1 },
|
|
34
|
-
disabled: { type: Boolean, default: !1 },
|
|
35
|
-
fab: { type: Boolean, default: !1 },
|
|
36
|
-
icon: { type: String, default: void 0 },
|
|
37
|
-
leftIcon: { type: String, default: void 0 },
|
|
38
|
-
rightIcon: { type: String, default: void 0 },
|
|
39
|
-
noPadding: { type: Boolean, default: !1 },
|
|
40
|
-
noElevation: { type: Boolean, default: !1 }
|
|
41
|
-
},
|
|
42
|
-
setup(e) {
|
|
43
|
-
const p = z(() => import("./MazSpinner-q4I09Hr8.mjs")), c = z(() => import("./MazIcon-RrJDzX3V.mjs")), { href: B, to: h } = E(), b = L(), n = e;
|
|
44
|
-
R(() => {
|
|
45
|
-
n.icon && !n.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
|
|
46
|
-
});
|
|
47
|
-
const f = t(() => B ? "a" : h ? "router-link" : "button"), k = t(
|
|
48
|
-
() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`
|
|
49
|
-
), m = t(
|
|
50
|
-
() => (n.loading || n.disabled) && f.value === "button"
|
|
51
|
-
), I = t(() => m.value ? "--cursor-default" : "--cursor-pointer"), x = t(() => `--is-${n.variant}`), l = t(() => n.loading && n.variant === "button"), y = t(() => !!b["left-icon"] || n.leftIcon), g = t(() => !!b["right-icon"] || n.rightIcon), C = t(() => y.value || g.value), S = t(() => n.fab && n.icon), $ = t(() => f.value === "button" ? n.type : void 0);
|
|
52
|
-
return (s, U) => (o(), i(w(f.value), {
|
|
53
|
-
disabled: m.value,
|
|
54
|
-
class: u(["m-btn", [
|
|
55
|
-
`--${e.size}`,
|
|
56
|
-
k.value,
|
|
57
|
-
I.value,
|
|
58
|
-
x.value,
|
|
59
|
-
{
|
|
60
|
-
"--block": e.block,
|
|
61
|
-
"--no-underline": e.noUnderline,
|
|
62
|
-
"--no-leading": e.noLeading,
|
|
63
|
-
"--fab": e.fab,
|
|
64
|
-
"--loading": e.loading,
|
|
65
|
-
"--disabled": m.value,
|
|
66
|
-
"--icon": C.value,
|
|
67
|
-
"--rounded": e.rounded,
|
|
68
|
-
"--no-rounded": e.noRounded,
|
|
69
|
-
"--no-padding": e.noPadding,
|
|
70
|
-
"--no-elevation": e.noElevation
|
|
71
|
-
}
|
|
72
|
-
]]),
|
|
73
|
-
type: $.value
|
|
74
|
-
}, {
|
|
75
|
-
default: A(() => [
|
|
76
|
-
y.value ? (o(), v(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
key: 0,
|
|
80
|
-
class: u(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
81
|
-
},
|
|
82
|
-
[
|
|
83
|
-
r(s.$slots, "left-icon", {}, () => [
|
|
84
|
-
e.leftIcon ? (o(), i(d(c), {
|
|
85
|
-
key: 0,
|
|
86
|
-
name: e.leftIcon
|
|
87
|
-
}, null, 8, ["name"])) : a("v-if", !0)
|
|
88
|
-
], !0)
|
|
89
|
-
],
|
|
90
|
-
2
|
|
91
|
-
/* CLASS */
|
|
92
|
-
)) : a("v-if", !0),
|
|
93
|
-
S.value ? (o(), v(
|
|
94
|
-
"div",
|
|
95
|
-
{
|
|
96
|
-
key: 1,
|
|
97
|
-
class: u(["m-btn__icon maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
98
|
-
},
|
|
99
|
-
[
|
|
100
|
-
r(s.$slots, "icon", {}, () => [
|
|
101
|
-
e.icon ? (o(), i(d(c), {
|
|
102
|
-
key: 0,
|
|
103
|
-
name: e.icon
|
|
104
|
-
}, null, 8, ["name"])) : a("v-if", !0)
|
|
105
|
-
], !0)
|
|
106
|
-
],
|
|
107
|
-
2
|
|
108
|
-
/* CLASS */
|
|
109
|
-
)) : a("v-if", !0),
|
|
110
|
-
D(
|
|
111
|
-
"span",
|
|
112
|
-
{
|
|
113
|
-
class: u(["maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
114
|
-
},
|
|
115
|
-
[
|
|
116
|
-
r(s.$slots, "default", {}, void 0, !0)
|
|
117
|
-
],
|
|
118
|
-
2
|
|
119
|
-
/* CLASS */
|
|
120
|
-
),
|
|
121
|
-
g.value ? (o(), v(
|
|
122
|
-
"div",
|
|
123
|
-
{
|
|
124
|
-
key: 2,
|
|
125
|
-
class: u(["m-btn__icon-right maz-flex maz-flex-center", { "maz-invisible": l.value }])
|
|
126
|
-
},
|
|
127
|
-
[
|
|
128
|
-
r(s.$slots, "right-icon", {}, () => [
|
|
129
|
-
e.rightIcon ? (o(), i(d(c), {
|
|
130
|
-
key: 0,
|
|
131
|
-
name: e.rightIcon
|
|
132
|
-
}, null, 8, ["name"])) : a("v-if", !0)
|
|
133
|
-
], !0)
|
|
134
|
-
],
|
|
135
|
-
2
|
|
136
|
-
/* CLASS */
|
|
137
|
-
)) : a("v-if", !0),
|
|
138
|
-
l.value ? (o(), i(d(p), {
|
|
139
|
-
key: 3,
|
|
140
|
-
size: "2em",
|
|
141
|
-
color: e.color,
|
|
142
|
-
class: "maz-absolute"
|
|
143
|
-
}, null, 8, ["color"])) : a("v-if", !0)
|
|
144
|
-
]),
|
|
145
|
-
_: 3
|
|
146
|
-
/* FORWARDED */
|
|
147
|
-
}, 8, ["disabled", "class", "type"]));
|
|
148
|
-
}
|
|
149
|
-
}), j = /* @__PURE__ */ N(P, [["__scopeId", "data-v-78782cb0"]]);
|
|
150
|
-
export {
|
|
151
|
-
j as default
|
|
152
|
-
};
|