maz-ui 3.29.0 → 3.29.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.
- package/components/MazAvatar.d.ts +11 -0
- package/components/MazAvatar.mjs +1 -1
- package/components/MazBadge.d.ts +3 -3
- package/components/MazBadge.mjs +1 -1
- package/components/MazDropdown.mjs +59 -55
- package/components/MazFullscreenLoader.mjs +19 -10
- package/components/MazPullToRefresh.d.ts +88 -0
- package/components/MazPullToRefresh.mjs +4 -0
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazAvatar.css +1 -1
- package/components/assets/MazBadge.css +1 -1
- package/components/assets/MazFullscreenLoader.css +1 -0
- package/components/assets/MazPullToRefresh.css +1 -0
- package/components/chunks/MazAvatar-0JzIvOc4.mjs +134 -0
- package/components/chunks/{MazLazyImg-65QIsZ1B.mjs → MazLazyImg-evGMN9Pe.mjs} +2 -2
- package/components/chunks/MazPullToRefresh-l6zWVzfv.mjs +183 -0
- package/components/chunks/{MazSpinner-W3TVtT8l.mjs → MazSpinner-J65FS2NQ.mjs} +1 -1
- package/components/chunks/MazSpinner-f5zcetJO.mjs +38 -0
- package/components/index.d.ts +1 -0
- package/components/index.mjs +1 -0
- package/modules/chunks/{MazBtn-OU9ti0GG.mjs → MazBtn-23G6MO1u.mjs} +2 -2
- package/modules/chunks/{MazBtn-5jYVOHi5.cjs → MazBtn-BVge7L6B.cjs} +1 -1
- package/modules/chunks/{MazIcon-mIVA-wm3.mjs → MazIcon-3ecUGYyh.mjs} +1 -1
- package/modules/chunks/{MazIcon-O-Sd2-b9.cjs → MazIcon-tK6rWxmD.cjs} +1 -1
- package/modules/chunks/{MazSpinner-Me_ta933.mjs → MazSpinner-CKpey7-9.mjs} +1 -1
- package/modules/chunks/{MazSpinner-ElCcZG5D.cjs → MazSpinner-Yp72xl7m.cjs} +1 -1
- package/modules/chunks/index-t7LFFnFX.cjs +124 -0
- package/modules/chunks/{index-AC4Cl2MH.mjs → index-w7bAz52b.mjs} +395 -347
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +24 -22
- package/nuxt/index.d.mts +10 -0
- package/nuxt/index.d.ts +10 -0
- package/nuxt/index.json +1 -1
- package/nuxt/index.mjs +14 -0
- package/package.json +1 -1
- package/tailwindcss/tailwind.config.ts +3 -1
- package/tailwindcss/utils/colors.ts +2 -1
- package/tailwindcss/variables/breakpoints.ts +14 -0
- package/tailwindcss/variables/utilities.ts +3 -1
- package/tailwindcss/variables/z-indexes.ts +2 -1
- package/types/components/MazAvatar.vue.d.ts +11 -0
- package/types/components/MazBadge.vue.d.ts +3 -3
- package/types/components/MazPullToRefresh.vue.d.ts +88 -0
- package/types/components/index.d.ts +1 -0
- package/types/modules/composables/index.d.ts +2 -0
- package/types/modules/composables/use-breakpoints.d.ts +38 -0
- package/types/modules/composables/use-window-size.d.ts +32 -0
- package/types/modules/helpers/is-standalone-mode.d.ts +1 -0
- package/types/tailwindcss/tailwind.config.d.ts +2 -0
- package/types/tailwindcss/variables/breakpoints.d.ts +1 -0
- package/components/chunks/MazAvatar-HJMP2asX.mjs +0 -127
- package/modules/chunks/index-f0w7PwtX.cjs +0 -124
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import "../assets/MazAvatar.css";
|
|
2
|
+
import { defineComponent as B, defineAsyncComponent as f, computed as m, openBlock as r, createBlock as v, resolveDynamicComponent as w, normalizeStyle as y, normalizeClass as k, withCtx as $, createElementVNode as b, unref as g, createCommentVNode as o, renderSlot as d, toDisplayString as C, createElementBlock as h, createVNode as I } from "vue";
|
|
3
|
+
const x = ["tabindex"], L = { class: "m-avatar__initial" }, E = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "m-avatar__caption"
|
|
6
|
+
}, M = /* @__PURE__ */ B({
|
|
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
|
+
letterCount: { type: Number, default: void 0 },
|
|
36
|
+
roundedSize: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "full",
|
|
39
|
+
validator: (e) => ["none", "sm", "md", "lg", "xl", "full"].includes(e)
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
emits: ["click"],
|
|
43
|
+
setup(e) {
|
|
44
|
+
const c = f(() => import("./MazLazyImg-evGMN9Pe.mjs")), n = f(() => import("./pencil-laNW5qNQ.mjs")), t = e, s = m(() => t.to ? "RouterLink" : t.href ? "a" : "div"), u = m(() => !!t.to || !!t.href);
|
|
45
|
+
function z(a, l = t.letterCount) {
|
|
46
|
+
return a.split(" ").map((S) => S[0]).join("").slice(0, l);
|
|
47
|
+
}
|
|
48
|
+
return (a, l) => (r(), v(w(s.value), {
|
|
49
|
+
style: y({ fontSize: e.size }),
|
|
50
|
+
class: k(["m-avatar", [
|
|
51
|
+
{
|
|
52
|
+
"--has-link": u.value
|
|
53
|
+
}
|
|
54
|
+
]]),
|
|
55
|
+
href: e.href,
|
|
56
|
+
to: e.to,
|
|
57
|
+
target: u.value ? e.target : void 0
|
|
58
|
+
}, {
|
|
59
|
+
default: $(() => [
|
|
60
|
+
b("div", {
|
|
61
|
+
class: k(["m-avatar__wrapper", [
|
|
62
|
+
{
|
|
63
|
+
"--has-shadow": !e.noElevation,
|
|
64
|
+
"--bordered": e.bordered,
|
|
65
|
+
"--clickable": e.clickable,
|
|
66
|
+
"--has-initial": !e.src && e.caption
|
|
67
|
+
},
|
|
68
|
+
`--rounded-${e.square ? "none" : e.roundedSize}`
|
|
69
|
+
]]),
|
|
70
|
+
tabindex: e.clickable ? 0 : -1
|
|
71
|
+
}, [
|
|
72
|
+
e.src ? (r(), v(g(c), {
|
|
73
|
+
key: 0,
|
|
74
|
+
class: "m-avatar__picture maz-max-w-full",
|
|
75
|
+
image: e.src,
|
|
76
|
+
alt: e.alt,
|
|
77
|
+
"image-height-full": "",
|
|
78
|
+
"no-loader": e.noLoader,
|
|
79
|
+
onClick: l[0] || (l[0] = (i) => e.clickable ? a.$emit("click", i) : null)
|
|
80
|
+
}, null, 8, ["image", "alt", "no-loader"])) : o("v-if", !0),
|
|
81
|
+
e.caption && !e.src ? d(a.$slots, "round-text", { key: 1 }, () => [
|
|
82
|
+
b(
|
|
83
|
+
"span",
|
|
84
|
+
L,
|
|
85
|
+
C(z(e.caption)),
|
|
86
|
+
1
|
|
87
|
+
/* TEXT */
|
|
88
|
+
)
|
|
89
|
+
], !0) : o("v-if", !0),
|
|
90
|
+
e.clickable ? (r(), h(
|
|
91
|
+
"button",
|
|
92
|
+
{
|
|
93
|
+
key: 2,
|
|
94
|
+
type: "button",
|
|
95
|
+
tabindex: "-1",
|
|
96
|
+
class: "m-avatar__button",
|
|
97
|
+
style: y({
|
|
98
|
+
backgroundColor: e.src ? `var(--maz-color-${e.buttonColor}-alpha)` : `var(--maz-color-${e.buttonColor})`
|
|
99
|
+
}),
|
|
100
|
+
onClick: l[1] || (l[1] = (i) => a.$emit("click", i))
|
|
101
|
+
},
|
|
102
|
+
[
|
|
103
|
+
e.noClickableIcon ? o("v-if", !0) : d(a.$slots, "icon", { key: 0 }, () => [
|
|
104
|
+
I(g(n), { class: "m-avatar__button__icon" })
|
|
105
|
+
], !0)
|
|
106
|
+
],
|
|
107
|
+
4
|
|
108
|
+
/* STYLE */
|
|
109
|
+
)) : o("v-if", !0)
|
|
110
|
+
], 10, x),
|
|
111
|
+
d(a.$slots, "caption", {}, () => [
|
|
112
|
+
e.showCaption && e.caption ? (r(), h(
|
|
113
|
+
"p",
|
|
114
|
+
E,
|
|
115
|
+
C(e.caption),
|
|
116
|
+
1
|
|
117
|
+
/* TEXT */
|
|
118
|
+
)) : o("v-if", !0)
|
|
119
|
+
], !0)
|
|
120
|
+
]),
|
|
121
|
+
_: 3
|
|
122
|
+
/* FORWARDED */
|
|
123
|
+
}, 8, ["style", "class", "href", "to", "target"]));
|
|
124
|
+
}
|
|
125
|
+
}), N = (e, c) => {
|
|
126
|
+
const n = e.__vccOpts || e;
|
|
127
|
+
for (const [t, s] of c)
|
|
128
|
+
n[t] = s;
|
|
129
|
+
return n;
|
|
130
|
+
}, q = /* @__PURE__ */ N(M, [["__scopeId", "data-v-1cb092ea"]]);
|
|
131
|
+
export {
|
|
132
|
+
q as M,
|
|
133
|
+
N as _
|
|
134
|
+
};
|
|
@@ -3,7 +3,7 @@ var f = (a, e, t) => e in a ? u(a, e, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var i = (a, e, t) => (f(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import "../assets/MazLazyImg.css";
|
|
5
5
|
import { defineComponent as v, defineAsyncComponent as A, computed as p, withDirectives as y, openBlock as d, createElementBlock as c, normalizeClass as I, normalizeStyle as b, Fragment as C, renderList as E, createElementVNode as O, mergeProps as L, createVNode as z, unref as h, createCommentVNode as P, renderSlot as S } from "vue";
|
|
6
|
-
import { _ as w } from "./MazAvatar-
|
|
6
|
+
import { _ as w } from "./MazAvatar-0JzIvOc4.mjs";
|
|
7
7
|
const B = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", H = {
|
|
8
8
|
baseClass: "m-lazy-img",
|
|
9
9
|
loadedClass: "m-lazy-loaded",
|
|
@@ -213,7 +213,7 @@ const k = {
|
|
|
213
213
|
},
|
|
214
214
|
emits: ["intersecting", "loading", "loaded", "error"],
|
|
215
215
|
setup(a) {
|
|
216
|
-
const e = A(() => import("./MazSpinner-
|
|
216
|
+
const e = A(() => import("./MazSpinner-J65FS2NQ.mjs")), t = a, s = p(() => {
|
|
217
217
|
var o;
|
|
218
218
|
return typeof t.image == "string" ? [{ srcset: t.image }] : (o = t.image) == null ? void 0 : o.sources;
|
|
219
219
|
});
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import "../assets/MazPullToRefresh.css";
|
|
2
|
+
import { defineComponent as R, defineAsyncComponent as x, computed as y, ref as _, watch as V, onUnmounted as Y, openBlock as d, createElementBlock as c, normalizeClass as L, normalizeStyle as $, renderSlot as m, createCommentVNode as b, createElementVNode as g, createVNode as A, unref as N, pushScopeId as H, popScopeId as q } from "vue";
|
|
3
|
+
function k() {
|
|
4
|
+
return typeof document < "u";
|
|
5
|
+
}
|
|
6
|
+
function D() {
|
|
7
|
+
if (!k())
|
|
8
|
+
return !1;
|
|
9
|
+
const o = navigator, u = window.matchMedia("(display-mode: standalone)").matches;
|
|
10
|
+
return o.standalone || u;
|
|
11
|
+
}
|
|
12
|
+
const T = (o) => (H("data-v-452adfb2"), o = o(), q(), o), F = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "header-text"
|
|
15
|
+
}, O = /* @__PURE__ */ T(() => /* @__PURE__ */ g(
|
|
16
|
+
"span",
|
|
17
|
+
null,
|
|
18
|
+
"Pull to refresh",
|
|
19
|
+
-1
|
|
20
|
+
/* HOISTED */
|
|
21
|
+
)), U = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "header-text"
|
|
24
|
+
}, j = /* @__PURE__ */ T(() => /* @__PURE__ */ g(
|
|
25
|
+
"span",
|
|
26
|
+
null,
|
|
27
|
+
" Release to refresh ",
|
|
28
|
+
-1
|
|
29
|
+
/* HOISTED */
|
|
30
|
+
)), G = {
|
|
31
|
+
key: 2,
|
|
32
|
+
class: "header-text"
|
|
33
|
+
}, J = { class: "maz-flex maz-flex-col maz-flex-center" }, K = /* @__PURE__ */ R({
|
|
34
|
+
__name: "MazPullToRefresh",
|
|
35
|
+
props: {
|
|
36
|
+
distance: { default: 100 },
|
|
37
|
+
offset: { default: 0 },
|
|
38
|
+
action: { type: Function, default: void 0 },
|
|
39
|
+
containerSelector: { default: void 0 },
|
|
40
|
+
headerClass: { default: void 0 },
|
|
41
|
+
spinnerColor: { default: "theme" },
|
|
42
|
+
disabled: { type: Boolean, default: !1 },
|
|
43
|
+
standaloneMode: { type: Boolean, default: !1 }
|
|
44
|
+
},
|
|
45
|
+
emits: ["loaded", "start", "error", "finish", "response"],
|
|
46
|
+
setup(o, { emit: u }) {
|
|
47
|
+
const v = x(() => import("./MazSpinner-f5zcetJO.mjs")), a = o, r = u, s = y(
|
|
48
|
+
() => a.disabled || a.action === void 0 || a.standaloneMode && k() && !D()
|
|
49
|
+
), h = _({
|
|
50
|
+
top: 0,
|
|
51
|
+
bottom: 0
|
|
52
|
+
}), t = _({
|
|
53
|
+
from: -1,
|
|
54
|
+
to: -1,
|
|
55
|
+
distance: 0,
|
|
56
|
+
available: !1,
|
|
57
|
+
state: "end"
|
|
58
|
+
}), i = _(!1), l = y(() => {
|
|
59
|
+
if (typeof document > "u" || s.value)
|
|
60
|
+
return;
|
|
61
|
+
const e = a.containerSelector ? document.querySelector(a.containerSelector) : document.body;
|
|
62
|
+
if (!e)
|
|
63
|
+
throw new Error("MazPullToRefresh - container not found");
|
|
64
|
+
return e;
|
|
65
|
+
}), p = y(() => t.value.state !== "move" && t.value.state !== "end" || s.value ? 0 : t.value.distance > a.distance ? a.distance : t.value.distance);
|
|
66
|
+
function B(e) {
|
|
67
|
+
const { top: n, height: f } = e.getBoundingClientRect();
|
|
68
|
+
h.value = {
|
|
69
|
+
top: n,
|
|
70
|
+
bottom: window.innerHeight - (f + n + a.offset)
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function w(e) {
|
|
74
|
+
i.value = e;
|
|
75
|
+
}
|
|
76
|
+
function S(e) {
|
|
77
|
+
if (i.value || h.value.top < 0 && h.value.bottom < 0 || s.value)
|
|
78
|
+
return;
|
|
79
|
+
const n = e.touches.item(0);
|
|
80
|
+
n && (t.value.state = "start", t.value.from = n.pageY);
|
|
81
|
+
}
|
|
82
|
+
function E(e) {
|
|
83
|
+
if (i.value || t.value.from < 0 || window.scrollY > 0 || s.value)
|
|
84
|
+
return;
|
|
85
|
+
const n = e.touches.item(0);
|
|
86
|
+
if (!n)
|
|
87
|
+
return;
|
|
88
|
+
t.value.to = n.pageY;
|
|
89
|
+
const f = t.value.to - t.value.from;
|
|
90
|
+
t.value.distance = f > 0 ? f : 0, t.value.available = t.value.distance >= a.distance, t.value.state = "move";
|
|
91
|
+
}
|
|
92
|
+
function C() {
|
|
93
|
+
i.value || s.value || (p.value === a.distance && t.value.state === "move" && window.scrollY <= 0 ? I() : z());
|
|
94
|
+
}
|
|
95
|
+
function z() {
|
|
96
|
+
t.value = {
|
|
97
|
+
from: -1,
|
|
98
|
+
to: -1,
|
|
99
|
+
distance: 0,
|
|
100
|
+
available: !1,
|
|
101
|
+
state: "end"
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
async function I() {
|
|
105
|
+
var e;
|
|
106
|
+
try {
|
|
107
|
+
w(!0), r("start");
|
|
108
|
+
const n = await ((e = a.action) == null ? void 0 : e.call(a));
|
|
109
|
+
r("loaded"), r("response", n);
|
|
110
|
+
} catch (n) {
|
|
111
|
+
throw r("error", n), n;
|
|
112
|
+
} finally {
|
|
113
|
+
z(), w(!1), r("finish");
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
V(
|
|
117
|
+
() => s.value,
|
|
118
|
+
(e) => {
|
|
119
|
+
e === !0 ? M() : P();
|
|
120
|
+
},
|
|
121
|
+
{ immediate: !0 }
|
|
122
|
+
);
|
|
123
|
+
function P() {
|
|
124
|
+
!l.value || s.value || document === void 0 || (l.value.addEventListener("touchstart", S), l.value.addEventListener("touchmove", E), l.value.addEventListener("touchend", C), B(l.value));
|
|
125
|
+
}
|
|
126
|
+
function M() {
|
|
127
|
+
!l.value || document === void 0 || (l.value.removeEventListener("touchstart", S), l.value.removeEventListener("touchmove", E), l.value.removeEventListener("touchend", C));
|
|
128
|
+
}
|
|
129
|
+
return Y(() => {
|
|
130
|
+
M();
|
|
131
|
+
}), (e, n) => (d(), c(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
class: L(["m-pull-to-refresh", { "--available": t.value.available || p.value > 10 }])
|
|
135
|
+
},
|
|
136
|
+
[
|
|
137
|
+
s.value ? b("v-if", !0) : (d(), c(
|
|
138
|
+
"div",
|
|
139
|
+
{
|
|
140
|
+
key: 0,
|
|
141
|
+
class: L(["loading-header", e.headerClass]),
|
|
142
|
+
style: $({ height: p.value + "px" })
|
|
143
|
+
},
|
|
144
|
+
[
|
|
145
|
+
t.value.available ? t.value.available && !i.value ? (d(), c("div", U, [
|
|
146
|
+
m(e.$slots, "pull-ready", {}, () => [
|
|
147
|
+
j
|
|
148
|
+
], !0)
|
|
149
|
+
])) : b("v-if", !0) : (d(), c("div", F, [
|
|
150
|
+
m(e.$slots, "pull-before", {}, () => [
|
|
151
|
+
O
|
|
152
|
+
], !0)
|
|
153
|
+
])),
|
|
154
|
+
i.value ? (d(), c("div", G, [
|
|
155
|
+
m(e.$slots, "pull-loading", {}, () => [
|
|
156
|
+
g("div", J, [
|
|
157
|
+
A(N(v), {
|
|
158
|
+
color: e.spinnerColor,
|
|
159
|
+
size: "2.5em"
|
|
160
|
+
}, null, 8, ["color"])
|
|
161
|
+
])
|
|
162
|
+
], !0)
|
|
163
|
+
])) : b("v-if", !0)
|
|
164
|
+
],
|
|
165
|
+
6
|
|
166
|
+
/* CLASS, STYLE */
|
|
167
|
+
)),
|
|
168
|
+
m(e.$slots, "default", {}, void 0, !0)
|
|
169
|
+
],
|
|
170
|
+
2
|
|
171
|
+
/* CLASS */
|
|
172
|
+
));
|
|
173
|
+
}
|
|
174
|
+
}), Q = (o, u) => {
|
|
175
|
+
const v = o.__vccOpts || o;
|
|
176
|
+
for (const [a, r] of u)
|
|
177
|
+
v[a] = r;
|
|
178
|
+
return v;
|
|
179
|
+
}, Z = /* @__PURE__ */ Q(K, [["__scopeId", "data-v-452adfb2"]]);
|
|
180
|
+
export {
|
|
181
|
+
Z as M,
|
|
182
|
+
Q as _
|
|
183
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../assets/MazSpinner.css";
|
|
2
2
|
import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as r, createElementVNode as i } from "vue";
|
|
3
|
-
import { _ as p } from "./MazAvatar-
|
|
3
|
+
import { _ as p } from "./MazAvatar-0JzIvOc4.mjs";
|
|
4
4
|
const a = (e) => (s("data-v-c67298ec"), e = e(), r(), e), d = ["width", "height"], l = /* @__PURE__ */ a(() => /* @__PURE__ */ i(
|
|
5
5
|
"path",
|
|
6
6
|
{ 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" },
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "../assets/MazSpinner.css";
|
|
2
|
+
import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as r, createElementVNode as i } from "vue";
|
|
3
|
+
import { _ as p } from "./MazPullToRefresh-l6zWVzfv.mjs";
|
|
4
|
+
const a = (e) => (s("data-v-c67298ec"), e = e(), r(), e), d = ["width", "height"], l = /* @__PURE__ */ a(() => /* @__PURE__ */ i(
|
|
5
|
+
"path",
|
|
6
|
+
{ 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" },
|
|
7
|
+
null,
|
|
8
|
+
-1
|
|
9
|
+
/* HOISTED */
|
|
10
|
+
)), m = [
|
|
11
|
+
l
|
|
12
|
+
], h = /* @__PURE__ */ t({
|
|
13
|
+
__name: "MazSpinner",
|
|
14
|
+
props: {
|
|
15
|
+
size: { type: String, default: "2em" },
|
|
16
|
+
color: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "primary"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(e) {
|
|
22
|
+
return (_, u) => (o(), c("svg", {
|
|
23
|
+
width: e.size,
|
|
24
|
+
height: e.size,
|
|
25
|
+
version: "1.1",
|
|
26
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
27
|
+
x: "0px",
|
|
28
|
+
y: "0px",
|
|
29
|
+
viewBox: "0 0 50 50",
|
|
30
|
+
"xml:space": "preserve",
|
|
31
|
+
class: n(["m-spinner", `m-spinner--${e.color}`]),
|
|
32
|
+
style: { "enable-background": "new 0 0 50 50" }
|
|
33
|
+
}, m, 10, d));
|
|
34
|
+
}
|
|
35
|
+
}), g = /* @__PURE__ */ p(h, [["__scopeId", "data-v-c67298ec"]]);
|
|
36
|
+
export {
|
|
37
|
+
g as default
|
|
38
|
+
};
|
package/components/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export { default as MazInputTags } from './MazInputTags.js';
|
|
|
25
25
|
export { default as MazLazyImg } from './MazLazyImg.js';
|
|
26
26
|
export { default as MazPhoneNumberInput } from './MazPhoneNumberInput.js';
|
|
27
27
|
export { default as MazPicker } from './MazPicker.js';
|
|
28
|
+
export { default as MazPullToRefresh } from './MazPullToRefresh.js';
|
|
28
29
|
export { default as MazRadio } from './MazRadio.js';
|
|
29
30
|
export { default as MazRadioButtons } from './MazRadioButtons.js';
|
|
30
31
|
export { default as MazSelect } from './MazSelect.js';
|
package/components/index.mjs
CHANGED
|
@@ -27,6 +27,7 @@ export { default as MazInputTags } from './MazInputTags.mjs'
|
|
|
27
27
|
export { default as MazLazyImg } from './MazLazyImg.mjs'
|
|
28
28
|
export { default as MazPhoneNumberInput } from './MazPhoneNumberInput.mjs'
|
|
29
29
|
export { default as MazPicker } from './MazPicker.mjs'
|
|
30
|
+
export { default as MazPullToRefresh } from './MazPullToRefresh.mjs'
|
|
30
31
|
export { default as MazRadio } from './MazRadio.mjs'
|
|
31
32
|
export { default as MazRadioButtons } from './MazRadioButtons.mjs'
|
|
32
33
|
export { default as MazSelect } from './MazSelect.mjs'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../assets/MazBtn.css";
|
|
2
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 "./index-
|
|
3
|
+
import { _ as N } from "./index-w7bAz52b.mjs";
|
|
4
4
|
const P = /* @__PURE__ */ M({
|
|
5
5
|
__name: "MazBtn",
|
|
6
6
|
props: {
|
|
@@ -40,7 +40,7 @@ const P = /* @__PURE__ */ M({
|
|
|
40
40
|
noElevation: { type: Boolean, default: !1 }
|
|
41
41
|
},
|
|
42
42
|
setup(e) {
|
|
43
|
-
const p = z(() => import("./MazSpinner-
|
|
43
|
+
const p = z(() => import("./MazSpinner-CKpey7-9.mjs")), c = z(() => import("./MazIcon-3ecUGYyh.mjs")), { href: B, to: h } = E(), b = L(), n = e;
|
|
44
44
|
R(() => {
|
|
45
45
|
n.icon && !n.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
|
|
46
46
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var S=require("../assets/MazBtn.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("./index-
|
|
1
|
+
var S=require("../assets/MazBtn.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("./index-t7LFFnFX.cjs"),z=e.defineComponent({__name:"MazBtn",props:{variant:{type:String,default:"button",validator:t=>["button","link"].includes(t)},size:{type:String,default:"md",validator:t=>["mini","xs","sm","md","lg","xl"].includes(t)},color:{type:String,default:"primary"},type:{type:String,default:"button",validator:t=>["button","submit","reset"].includes(t)},rounded:{type:Boolean,default:!1},noRounded:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},pastel:{type:Boolean,default:!1},block:{type:Boolean,default:!1},noUnderline:{type:Boolean,default:!1},noLeading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fab:{type:Boolean,default:!1},icon:{type:String,default:void 0},leftIcon:{type:String,default:void 0},rightIcon:{type:String,default:void 0},noPadding:{type:Boolean,default:!1},noElevation:{type:Boolean,default:!1}},setup(t){const d=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazSpinner-Yp72xl7m.cjs"))),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazIcon-tK6rWxmD.cjs"))),{href:f,to:m}=e.useAttrs(),r=e.useSlots(),o=t;e.onBeforeMount(()=>{o.icon&&!o.fab&&console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props')});const i=e.computed(()=>f?"a":m?"router-link":"button"),v=e.computed(()=>o.pastel?`--${o.color}-pastel`:o.outline?`--${o.color}-outline`:`--${o.color}`),c=e.computed(()=>(o.loading||o.disabled)&&i.value==="button"),b=e.computed(()=>c.value?"--cursor-default":"--cursor-pointer"),y=e.computed(()=>`--is-${o.variant}`),n=e.computed(()=>o.loading&&o.variant==="button"),u=e.computed(()=>!!r["left-icon"]||o.leftIcon),s=e.computed(()=>!!r["right-icon"]||o.rightIcon),p=e.computed(()=>u.value||s.value),B=e.computed(()=>o.fab&&o.icon),g=e.computed(()=>i.value==="button"?o.type:void 0);return(l,h)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{disabled:c.value,class:e.normalizeClass(["m-btn",[`--${t.size}`,v.value,b.value,y.value,{"--block":t.block,"--no-underline":t.noUnderline,"--no-leading":t.noLeading,"--fab":t.fab,"--loading":t.loading,"--disabled":c.value,"--icon":p.value,"--rounded":t.rounded,"--no-rounded":t.noRounded,"--no-padding":t.noPadding,"--no-elevation":t.noElevation}]]),type:g.value},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["m-btn__icon-left maz-flex maz-flex-center",{"maz-invisible":n.value}])},[e.renderSlot(l.$slots,"left-icon",{},()=>[t.leftIcon?(e.openBlock(),e.createBlock(e.unref(a),{key:0,name:t.leftIcon},null,8,["name"])):e.createCommentVNode("v-if",!0)],!0)],2)):e.createCommentVNode("v-if",!0),B.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["m-btn__icon maz-flex maz-flex-center",{"maz-invisible":n.value}])},[e.renderSlot(l.$slots,"icon",{},()=>[t.icon?(e.openBlock(),e.createBlock(e.unref(a),{key:0,name:t.icon},null,8,["name"])):e.createCommentVNode("v-if",!0)],!0)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("span",{class:e.normalizeClass(["maz-flex maz-flex-center",{"maz-invisible":n.value}])},[e.renderSlot(l.$slots,"default",{},void 0,!0)],2),s.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["m-btn__icon-right maz-flex maz-flex-center",{"maz-invisible":n.value}])},[e.renderSlot(l.$slots,"right-icon",{},()=>[t.rightIcon?(e.openBlock(),e.createBlock(e.unref(a),{key:0,name:t.rightIcon},null,8,["name"])):e.createCommentVNode("v-if",!0)],!0)],2)):e.createCommentVNode("v-if",!0),n.value?(e.openBlock(),e.createBlock(e.unref(d),{key:3,size:"2em",color:t.color,class:"maz-absolute"},null,8,["color"])):e.createCommentVNode("v-if",!0)]),_:3},8,["disabled","class","type"]))}}),C=k._export_sfc(z,[["__scopeId","data-v-3f2db58e"]]);exports.default=C;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as b, ref as f, computed as g, onMounted as P, watchEffect as _, openBlock as p, createElementBlock as h, Fragment as A, createCommentVNode as s, mergeProps as C, nextTick as $ } from "vue";
|
|
2
|
-
import { i as q } from "./index-
|
|
2
|
+
import { i as q } from "./index-w7bAz52b.mjs";
|
|
3
3
|
const H = ["innerHTML"], G = /* @__PURE__ */ b({
|
|
4
4
|
__name: "MazIcon",
|
|
5
5
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),C=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),C=require("./index-t7LFFnFX.cjs"),T=["innerHTML"],b=t.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:a=>a}},emits:["loaded","unloaded","error"],setup(a,{emit:f}){const i={},s=t.ref(),d=t.ref(),g=()=>{try{return C.injectStrict("mazIconPath")}catch{return}},l=a,u=f,m=t.computed(()=>l.path??g()),p=t.computed(()=>l.src?l.src:m.value?`${m.value}/${l.name}.svg`:`/${l.name}.svg`);t.onMounted(()=>{!l.name&&!l.src&&console.error('[maz-ui](MazIcon) you should provide "name" or "src" as prop')});const h=(e,r)=>{const n=e.querySelectorAll("title");if(n.length>0)n[0].textContent=r;else{const o=document.createElementNS("http://www.w3.org/2000/svg","title");o.textContent=r,e.append(o)}},S=e=>Object.keys(e).reduce((r,n)=>(e[n]!==!1&&e[n]!==null&&e[n]!==void 0&&(r[n]=e[n]),r),{}),y=e=>{const r={},n=e.attributes;if(!n)return r;for(let o=n.length-1;o>=0;o--)r[n[o].name]=n[o].value;return r},w=e=>{let r=e.cloneNode(!0);return r=l.transformSource(e),l.title&&h(r,l.title),e.innerHTML},E=async e=>{i[e]||(i[e]=M(e));try{s.value=await i[e],await t.nextTick(),u("loaded",d.value)}catch(r){s.value&&(s.value=void 0,u("unloaded")),delete i[e],u("error",r)}},M=e=>new Promise((r,n)=>{const o=new XMLHttpRequest;o.open("GET",e,!0),o.addEventListener("load",()=>{if(o.status>=200&&o.status<400)try{let c=new DOMParser().parseFromString(o.responseText,"text/xml").querySelectorAll("svg")[0];c?(c=l.transformSource(c),r(c)):n(new Error('Loaded file is not valid SVG"'))}catch(v){n(v)}else n(new Error("Error loading SVG"))}),o.addEventListener("error",()=>n()),o.send()});return t.watchEffect(()=>E(p.value)),(e,r)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createCommentVNode(" eslint-disable vue/no-v-html "),t.createCommentVNode(" eslint-disable vue/html-self-closing "),s.value?(t.openBlock(),t.createElementBlock("svg",t.mergeProps({key:0,ref_key:"svgElem",ref:d,width:"1em",height:"1em"},{...y(s.value),...S(e.$attrs)},{style:`font-size: ${a.size}`,innerHTML:w(s.value)}),null,16,T)):t.createCommentVNode("v-if",!0),t.createCommentVNode(" eslint-enable vue/no-v-html "),t.createCommentVNode(" eslint-enable vue/html-self-closing ")],2112))}});exports.default=b;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../assets/MazSpinner.css";
|
|
2
2
|
import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as r, createElementVNode as i } from "vue";
|
|
3
|
-
import { _ as p } from "./index-
|
|
3
|
+
import { _ as p } from "./index-w7bAz52b.mjs";
|
|
4
4
|
const a = (e) => (s("data-v-c67298ec"), e = e(), r(), e), d = ["width", "height"], l = /* @__PURE__ */ a(() => /* @__PURE__ */ i(
|
|
5
5
|
"path",
|
|
6
6
|
{ 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" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var l=require("../assets/MazSpinner.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-
|
|
1
|
+
var l=require("../assets/MazSpinner.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-t7LFFnFX.cjs"),n=e=>(t.pushScopeId("data-v-c67298ec"),e=e(),t.popScopeId(),e),o=["width","height"],s=n(()=>t.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)),r=[s],i=t.defineComponent({__name:"MazSpinner",props:{size:{type:String,default:"2em"},color:{type:String,default:"primary"}},setup(e){return(p,d)=>(t.openBlock(),t.createElementBlock("svg",{width:e.size,height:e.size,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50","xml:space":"preserve",class:t.normalizeClass(["m-spinner",`m-spinner--${e.color}`]),style:{"enable-background":"new 0 0 50 50"}},r,10,o))}}),a=c._export_sfc(i,[["__scopeId","data-v-c67298ec"]]);exports.default=a;
|