maz-ui 3.49.1 → 3.49.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.
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import './assets/MazAnimatedCounter.css';
|
|
1
|
+
import { defineComponent as A, ref as x, watch as g, openBlock as q, createElementBlock as C, createElementVNode as M, renderSlot as u, createTextVNode as o, toDisplayString as r } from "vue";
|
|
2
|
+
import './assets/MazAnimatedCounter.css';function T() {
|
|
3
|
+
return typeof document < "u";
|
|
4
|
+
}
|
|
5
|
+
const V = { class: "m-animated-counter m-reset-css" }, $ = { class: "maz-sr-only" }, k = /* @__PURE__ */ A({
|
|
3
6
|
__name: "MazAnimatedCounter",
|
|
4
7
|
props: {
|
|
5
8
|
count: {},
|
|
@@ -8,44 +11,52 @@ import './assets/MazAnimatedCounter.css';const g = { class: "m-animated-counter
|
|
|
8
11
|
suffix: { default: void 0 },
|
|
9
12
|
delay: { default: 100 }
|
|
10
13
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
function i(
|
|
14
|
+
setup(a) {
|
|
15
|
+
const s = a, t = x(0);
|
|
16
|
+
function i() {
|
|
17
|
+
return typeof window > "u" || !window.requestAnimationFrame ? (e) => (setTimeout(e, 1e3 / 60), 0) : window.requestAnimationFrame.bind(window);
|
|
18
|
+
}
|
|
19
|
+
function f(e, n, d, w) {
|
|
20
|
+
const c = i();
|
|
21
|
+
if (!T()) {
|
|
22
|
+
t.value = n;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
14
25
|
t.value = e, setTimeout(() => {
|
|
15
|
-
const
|
|
16
|
-
const _ =
|
|
26
|
+
const v = performance.now(), m = (y = performance.now()) => {
|
|
27
|
+
const _ = y - v, l = Math.min(_ / d, 1), h = (p) => p * (2 - p);
|
|
17
28
|
t.value = Math.round(
|
|
18
|
-
e + (
|
|
19
|
-
),
|
|
29
|
+
e + (n - e) * h(l)
|
|
30
|
+
), l < 1 && c(m);
|
|
20
31
|
};
|
|
21
|
-
|
|
22
|
-
},
|
|
32
|
+
c(m);
|
|
33
|
+
}, w);
|
|
23
34
|
}
|
|
24
|
-
return
|
|
25
|
-
() =>
|
|
26
|
-
(e,
|
|
27
|
-
if (e ===
|
|
35
|
+
return g(
|
|
36
|
+
() => s.count,
|
|
37
|
+
(e, n) => {
|
|
38
|
+
if (e === n)
|
|
28
39
|
return;
|
|
29
|
-
|
|
40
|
+
f(n ?? 0, e, s.duration, s.delay);
|
|
30
41
|
},
|
|
31
42
|
{ immediate: !0 }
|
|
32
|
-
), (e,
|
|
33
|
-
|
|
43
|
+
), (e, n) => (q(), C("span", V, [
|
|
44
|
+
M("span", $, [
|
|
34
45
|
u(e.$slots, "prefix", {}, () => [
|
|
35
46
|
o(
|
|
36
|
-
|
|
47
|
+
r(e.prefix),
|
|
37
48
|
1
|
|
38
49
|
/* TEXT */
|
|
39
50
|
)
|
|
40
51
|
], !0),
|
|
41
52
|
o(
|
|
42
|
-
|
|
53
|
+
r(e.count),
|
|
43
54
|
1
|
|
44
55
|
/* TEXT */
|
|
45
56
|
),
|
|
46
57
|
u(e.$slots, "suffix", {}, () => [
|
|
47
58
|
o(
|
|
48
|
-
|
|
59
|
+
r(e.suffix),
|
|
49
60
|
1
|
|
50
61
|
/* TEXT */
|
|
51
62
|
)
|
|
@@ -53,31 +64,31 @@ import './assets/MazAnimatedCounter.css';const g = { class: "m-animated-counter
|
|
|
53
64
|
]),
|
|
54
65
|
u(e.$slots, "prefix", {}, () => [
|
|
55
66
|
o(
|
|
56
|
-
|
|
67
|
+
r(e.prefix),
|
|
57
68
|
1
|
|
58
69
|
/* TEXT */
|
|
59
70
|
)
|
|
60
71
|
], !0),
|
|
61
72
|
o(
|
|
62
|
-
|
|
73
|
+
r(t.value),
|
|
63
74
|
1
|
|
64
75
|
/* TEXT */
|
|
65
76
|
),
|
|
66
77
|
u(e.$slots, "suffix", {}, () => [
|
|
67
78
|
o(
|
|
68
|
-
|
|
79
|
+
r(e.suffix),
|
|
69
80
|
1
|
|
70
81
|
/* TEXT */
|
|
71
82
|
)
|
|
72
83
|
], !0)
|
|
73
84
|
]));
|
|
74
85
|
}
|
|
75
|
-
}),
|
|
76
|
-
const t =
|
|
77
|
-
for (const [i,
|
|
78
|
-
t[i] =
|
|
86
|
+
}), z = (a, s) => {
|
|
87
|
+
const t = a.__vccOpts || a;
|
|
88
|
+
for (const [i, f] of s)
|
|
89
|
+
t[i] = f;
|
|
79
90
|
return t;
|
|
80
|
-
},
|
|
91
|
+
}, B = /* @__PURE__ */ z(k, [["__scopeId", "data-v-793ffe65"]]);
|
|
81
92
|
export {
|
|
82
|
-
|
|
93
|
+
B as default
|
|
83
94
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import './assets/MazCircularProgressBar.css';function
|
|
3
|
-
componentName:
|
|
4
|
-
providedId:
|
|
1
|
+
import { computed as c, useId as M, defineComponent as z, ref as S, watch as A, openBlock as m, createElementBlock as g, createElementVNode as a, renderSlot as f, createTextVNode as i, toDisplayString as u, useSlots as q, normalizeStyle as I, unref as w, createBlock as T, createSlots as V, withCtx as x } from "vue";
|
|
2
|
+
import './assets/MazCircularProgressBar.css';function F({
|
|
3
|
+
componentName: n,
|
|
4
|
+
providedId: o
|
|
5
5
|
}) {
|
|
6
|
-
return
|
|
6
|
+
return c(() => o ?? `${n}-${M().replace(/:/g, "")}`);
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
function N() {
|
|
9
|
+
return typeof document < "u";
|
|
10
|
+
}
|
|
11
|
+
const b = { class: "m-animated-counter m-reset-css" }, D = { class: "maz-sr-only" }, E = /* @__PURE__ */ z({
|
|
9
12
|
__name: "MazAnimatedCounter",
|
|
10
13
|
props: {
|
|
11
14
|
count: {},
|
|
@@ -14,30 +17,38 @@ const q = { class: "m-animated-counter m-reset-css" }, N = { class: "maz-sr-only
|
|
|
14
17
|
suffix: { default: void 0 },
|
|
15
18
|
delay: { default: 100 }
|
|
16
19
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
function
|
|
20
|
+
setup(n) {
|
|
21
|
+
const o = n, r = S(0);
|
|
22
|
+
function l() {
|
|
23
|
+
return typeof window > "u" || !window.requestAnimationFrame ? (e) => (setTimeout(e, 1e3 / 60), 0) : window.requestAnimationFrame.bind(window);
|
|
24
|
+
}
|
|
25
|
+
function p(e, s, d, h) {
|
|
26
|
+
const v = l();
|
|
27
|
+
if (!N()) {
|
|
28
|
+
r.value = s;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
20
31
|
r.value = e, setTimeout(() => {
|
|
21
|
-
const
|
|
22
|
-
const
|
|
32
|
+
const k = performance.now(), t = (y = performance.now()) => {
|
|
33
|
+
const P = y - k, _ = Math.min(P / d, 1), B = ($) => $ * (2 - $);
|
|
23
34
|
r.value = Math.round(
|
|
24
|
-
e + (
|
|
25
|
-
), _ < 1 &&
|
|
35
|
+
e + (s - e) * B(_)
|
|
36
|
+
), _ < 1 && v(t);
|
|
26
37
|
};
|
|
27
|
-
|
|
28
|
-
},
|
|
38
|
+
v(t);
|
|
39
|
+
}, h);
|
|
29
40
|
}
|
|
30
|
-
return
|
|
31
|
-
() =>
|
|
32
|
-
(e,
|
|
33
|
-
if (e ===
|
|
41
|
+
return A(
|
|
42
|
+
() => o.count,
|
|
43
|
+
(e, s) => {
|
|
44
|
+
if (e === s)
|
|
34
45
|
return;
|
|
35
|
-
|
|
46
|
+
p(s ?? 0, e, o.duration, o.delay);
|
|
36
47
|
},
|
|
37
48
|
{ immediate: !0 }
|
|
38
|
-
), (e,
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
), (e, s) => (m(), g("span", b, [
|
|
50
|
+
a("span", D, [
|
|
51
|
+
f(e.$slots, "prefix", {}, () => [
|
|
41
52
|
i(
|
|
42
53
|
u(e.prefix),
|
|
43
54
|
1
|
|
@@ -49,7 +60,7 @@ const q = { class: "m-animated-counter m-reset-css" }, N = { class: "maz-sr-only
|
|
|
49
60
|
1
|
|
50
61
|
/* TEXT */
|
|
51
62
|
),
|
|
52
|
-
|
|
63
|
+
f(e.$slots, "suffix", {}, () => [
|
|
53
64
|
i(
|
|
54
65
|
u(e.suffix),
|
|
55
66
|
1
|
|
@@ -57,7 +68,7 @@ const q = { class: "m-animated-counter m-reset-css" }, N = { class: "maz-sr-only
|
|
|
57
68
|
)
|
|
58
69
|
], !0)
|
|
59
70
|
]),
|
|
60
|
-
|
|
71
|
+
f(e.$slots, "prefix", {}, () => [
|
|
61
72
|
i(
|
|
62
73
|
u(e.prefix),
|
|
63
74
|
1
|
|
@@ -69,7 +80,7 @@ const q = { class: "m-animated-counter m-reset-css" }, N = { class: "maz-sr-only
|
|
|
69
80
|
1
|
|
70
81
|
/* TEXT */
|
|
71
82
|
),
|
|
72
|
-
|
|
83
|
+
f(e.$slots, "suffix", {}, () => [
|
|
73
84
|
i(
|
|
74
85
|
u(e.suffix),
|
|
75
86
|
1
|
|
@@ -78,17 +89,17 @@ const q = { class: "m-animated-counter m-reset-css" }, N = { class: "maz-sr-only
|
|
|
78
89
|
], !0)
|
|
79
90
|
]));
|
|
80
91
|
}
|
|
81
|
-
}),
|
|
82
|
-
const r =
|
|
83
|
-
for (const [
|
|
84
|
-
r[
|
|
92
|
+
}), C = (n, o) => {
|
|
93
|
+
const r = n.__vccOpts || n;
|
|
94
|
+
for (const [l, p] of o)
|
|
95
|
+
r[l] = p;
|
|
85
96
|
return r;
|
|
86
|
-
},
|
|
97
|
+
}, L = /* @__PURE__ */ C(E, [["__scopeId", "data-v-793ffe65"]]), O = { class: "outer" }, W = { class: "inner" }, j = { key: 0 }, G = {
|
|
87
98
|
xmlns: "http://www.w3.org/2000/svg",
|
|
88
99
|
height: "1em",
|
|
89
100
|
width: "1em",
|
|
90
101
|
viewBox: "0 0 100 100"
|
|
91
|
-
},
|
|
102
|
+
}, Q = ["id"], R = ["stop-color"], U = ["stop-color"], H = ["stroke-width", "stroke", "stroke-linecap"], J = /* @__PURE__ */ z({
|
|
92
103
|
__name: "MazCircularProgressBar",
|
|
93
104
|
props: {
|
|
94
105
|
percentage: { default: 0 },
|
|
@@ -105,17 +116,17 @@ const q = { class: "m-animated-counter m-reset-css" }, N = { class: "maz-sr-only
|
|
|
105
116
|
warningPercentage: { default: 75 },
|
|
106
117
|
dangerPercentage: { default: 50 }
|
|
107
118
|
},
|
|
108
|
-
setup(
|
|
109
|
-
const
|
|
119
|
+
setup(n) {
|
|
120
|
+
const o = n, r = q(), l = c(() => !!o.prefix || !!r.prefix), p = c(() => !!o.suffix || !!r.suffix), e = F({
|
|
110
121
|
componentName: "MazCircularProgressBar"
|
|
111
|
-
}),
|
|
112
|
-
() =>
|
|
122
|
+
}), s = c(() => o.percentage > 100 ? 100 : o.percentage <= 0 ? 0.5 : o.percentage), d = c(
|
|
123
|
+
() => o.autoColor ? h(s.value) : o.color
|
|
113
124
|
);
|
|
114
|
-
function h(
|
|
115
|
-
return
|
|
125
|
+
function h(t) {
|
|
126
|
+
return t < o.dangerPercentage || t > 100 ? "danger" : t < o.warningPercentage ? "warning" : t >= o.successPercentage ? "success" : "primary";
|
|
116
127
|
}
|
|
117
|
-
const v =
|
|
118
|
-
return (
|
|
128
|
+
const v = c(() => `${o.duration}ms`), k = c(() => Math.round(290 - 290 * (s.value / 100)));
|
|
129
|
+
return (t, y) => (m(), g(
|
|
119
130
|
"div",
|
|
120
131
|
{
|
|
121
132
|
class: "m-circular-progress-bar m-reset-css",
|
|
@@ -125,29 +136,29 @@ const q = { class: "m-animated-counter m-reset-css" }, N = { class: "maz-sr-only
|
|
|
125
136
|
"--dashoffset": k.value
|
|
126
137
|
},
|
|
127
138
|
{
|
|
128
|
-
fontSize:
|
|
139
|
+
fontSize: t.size
|
|
129
140
|
}
|
|
130
141
|
])
|
|
131
142
|
},
|
|
132
143
|
[
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
])) : (m(),
|
|
144
|
+
a("div", O, [
|
|
145
|
+
a("div", W, [
|
|
146
|
+
w(r).default ? (m(), g("span", j, [
|
|
147
|
+
f(t.$slots, "default", {}, void 0, !0)
|
|
148
|
+
])) : (m(), T(L, {
|
|
138
149
|
key: 1,
|
|
139
|
-
count:
|
|
140
|
-
duration:
|
|
150
|
+
count: t.percentage,
|
|
151
|
+
duration: t.duration
|
|
141
152
|
}, V({
|
|
142
153
|
_: 2
|
|
143
154
|
/* DYNAMIC */
|
|
144
155
|
}, [
|
|
145
|
-
|
|
156
|
+
l.value ? {
|
|
146
157
|
name: "prefix",
|
|
147
158
|
fn: x(() => [
|
|
148
|
-
|
|
159
|
+
f(t.$slots, "prefix", {}, () => [
|
|
149
160
|
i(
|
|
150
|
-
u(
|
|
161
|
+
u(t.prefix),
|
|
151
162
|
1
|
|
152
163
|
/* TEXT */
|
|
153
164
|
)
|
|
@@ -155,12 +166,12 @@ const q = { class: "m-animated-counter m-reset-css" }, N = { class: "maz-sr-only
|
|
|
155
166
|
]),
|
|
156
167
|
key: "0"
|
|
157
168
|
} : void 0,
|
|
158
|
-
|
|
169
|
+
p.value ? {
|
|
159
170
|
name: "suffix",
|
|
160
171
|
fn: x(() => [
|
|
161
|
-
|
|
172
|
+
f(t.$slots, "suffix", {}, () => [
|
|
162
173
|
i(
|
|
163
|
-
u(
|
|
174
|
+
u(t.suffix),
|
|
164
175
|
1
|
|
165
176
|
/* TEXT */
|
|
166
177
|
)
|
|
@@ -171,43 +182,43 @@ const q = { class: "m-animated-counter m-reset-css" }, N = { class: "maz-sr-only
|
|
|
171
182
|
]), 1032, ["count", "duration"]))
|
|
172
183
|
])
|
|
173
184
|
]),
|
|
174
|
-
(m(), g("svg",
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
id: `${
|
|
185
|
+
(m(), g("svg", G, [
|
|
186
|
+
a("defs", null, [
|
|
187
|
+
a("linearGradient", {
|
|
188
|
+
id: `${w(e)}-gradient`,
|
|
178
189
|
x1: "0",
|
|
179
190
|
x2: "0",
|
|
180
191
|
y1: "1",
|
|
181
192
|
y2: "0"
|
|
182
193
|
}, [
|
|
183
|
-
|
|
194
|
+
a("stop", {
|
|
184
195
|
offset: "0%",
|
|
185
|
-
"stop-color":
|
|
186
|
-
}, null, 8,
|
|
187
|
-
|
|
196
|
+
"stop-color": d.value ? `var(--maz-color-${d.value}-400)` : "var(--maz-color-primary)"
|
|
197
|
+
}, null, 8, R),
|
|
198
|
+
a("stop", {
|
|
188
199
|
offset: "100%",
|
|
189
|
-
"stop-color":
|
|
190
|
-
}, null, 8,
|
|
191
|
-
], 8,
|
|
200
|
+
"stop-color": d.value ? `var(--maz-color-${d.value}-700)` : "var(--maz-color-secondary)"
|
|
201
|
+
}, null, 8, U)
|
|
202
|
+
], 8, Q)
|
|
192
203
|
]),
|
|
193
|
-
|
|
204
|
+
a("circle", {
|
|
194
205
|
cx: "50",
|
|
195
206
|
cy: "50",
|
|
196
207
|
r: "46",
|
|
197
|
-
"stroke-width":
|
|
208
|
+
"stroke-width": t.strokeWidth,
|
|
198
209
|
"stroke-dasharray": "290",
|
|
199
210
|
"stroke-dashoffset": "290",
|
|
200
|
-
stroke:
|
|
211
|
+
stroke: t.stroke ? t.stroke : `url(#${w(e)}-gradient)`,
|
|
201
212
|
fill: "none",
|
|
202
|
-
"stroke-linecap":
|
|
203
|
-
}, null, 8,
|
|
213
|
+
"stroke-linecap": t.strokeLinecap
|
|
214
|
+
}, null, 8, H)
|
|
204
215
|
]))
|
|
205
216
|
],
|
|
206
217
|
4
|
|
207
218
|
/* STYLE */
|
|
208
219
|
));
|
|
209
220
|
}
|
|
210
|
-
}),
|
|
221
|
+
}), X = /* @__PURE__ */ C(J, [["__scopeId", "data-v-73fe8da6"]]);
|
|
211
222
|
export {
|
|
212
|
-
|
|
223
|
+
X as default
|
|
213
224
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.m-animated-counter[data-v-
|
|
1
|
+
.m-animated-counter[data-v-793ffe65]{white-space:nowrap;--maz-tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--maz-tw-ordinal) var(--maz-tw-slashed-zero) var(--maz-tw-numeric-figure) var(--maz-tw-numeric-spacing) var(--maz-tw-numeric-fraction)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.m-animated-counter[data-v-
|
|
1
|
+
.m-animated-counter[data-v-793ffe65]{white-space:nowrap;--maz-tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--maz-tw-ordinal) var(--maz-tw-slashed-zero) var(--maz-tw-numeric-figure) var(--maz-tw-numeric-spacing) var(--maz-tw-numeric-fraction)}.m-circular-progress-bar[data-v-73fe8da6]{position:relative;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:1em;width:1em;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.m-circular-progress-bar .outer[data-v-73fe8da6]{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;width:100%;border-radius:9999px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.m-circular-progress-bar .inner[data-v-73fe8da6]{display:-webkit-box;display:-ms-flexbox;display:flex;height:.85em;width:.85em;border-radius:9999px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.m-circular-progress-bar .inner[data-v-73fe8da6]>*{font-size:.25em}.m-circular-progress-bar svg[data-v-73fe8da6]{position:absolute;--maz-tw-rotate: -90deg;-webkit-transform:translate(var(--maz-tw-translate-x),var(--maz-tw-translate-y)) rotate(var(--maz-tw-rotate)) skewX(var(--maz-tw-skew-x)) skewY(var(--maz-tw-skew-y)) scaleX(var(--maz-tw-scale-x)) scaleY(var(--maz-tw-scale-y));transform:translate(var(--maz-tw-translate-x),var(--maz-tw-translate-y)) rotate(var(--maz-tw-rotate)) skew(var(--maz-tw-skew-x)) skewY(var(--maz-tw-skew-y)) scaleX(var(--maz-tw-scale-x)) scaleY(var(--maz-tw-scale-y))}.m-circular-progress-bar svg circle[data-v-73fe8da6]{-webkit-animation:animate-73fe8da6 linear forwards var(--animation-duration);animation:animate-73fe8da6 linear forwards var(--animation-duration)}@-webkit-keyframes animate-73fe8da6{to{stroke-dashoffset:var(--dashoffset)}}@keyframes animate-73fe8da6{to{stroke-dashoffset:var(--dashoffset)}}
|
package/nuxt/index.json
CHANGED