maz-ui 3.47.1 → 3.47.2-beta.0
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/MazCard.mjs +1 -1
- package/components/MazChart.d.ts +1 -1
- package/components/MazChecklist.mjs +1 -1
- package/components/MazGallery.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/MazTable.d.ts +29 -52
- package/components/MazTable.mjs +1 -1
- package/components/MazTabsBar.mjs +1 -1
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputNumber.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/MazPicker.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/chunks/{MazBadge-CNSfzYq-.mjs → MazBadge-CvIiiTdM.mjs} +1 -1
- package/components/chunks/{MazBtn-D6Jxw9Nr.mjs → MazBtn-BO3G90L3.mjs} +2 -2
- package/components/chunks/{MazBtn-BRnLMzhy.mjs → MazBtn-C87UEsVs.mjs} +2 -2
- package/components/chunks/{MazBtn-DlD5m7T4.mjs → MazBtn-C_l3xuAh.mjs} +2 -2
- package/components/chunks/{MazBtn-CnqRnXh_.mjs → MazBtn-DJOUeES7.mjs} +2 -2
- package/components/chunks/{MazBtn-TkePGm5o.mjs → MazBtn-DVkwISlp.mjs} +2 -2
- package/components/chunks/MazBtn-DadFupkY.mjs +118 -0
- package/components/chunks/{MazBtn-Dt8lr0GH.mjs → MazBtn-GGcGrIH4.mjs} +2 -2
- package/components/chunks/{MazCard-CfkvpcGL.mjs → MazCard-FSXmHyhj.mjs} +1 -1
- package/components/chunks/{MazCheckbox-BKCo6EzO.mjs → MazCheckbox-2G4VkxDz.mjs} +1 -1
- package/components/chunks/{MazCheckbox-Byqz8JJB.mjs → MazCheckbox-BmnqBHaY.mjs} +1 -1
- package/components/chunks/{MazCheckbox-CI8ml-P8.mjs → MazCheckbox-Cq9gpTEw.mjs} +1 -1
- package/components/chunks/{MazChecklist-BLxsNHMP.mjs → MazChecklist-CY1Cv70T.mjs} +1 -1
- package/components/chunks/{MazGallery-BMFwld84.mjs → MazGallery-BknvUeo1.mjs} +272 -229
- package/components/chunks/{MazGallery-BKL7gfrz.mjs → MazGallery-CZOokGAt.mjs} +248 -205
- package/components/chunks/{MazIcon-D8V8ixhf.mjs → MazIcon-z-jTiuyI.mjs} +1 -1
- package/components/chunks/{MazInput-CBiCdd0F.mjs → MazInput-BQoQSRyL.mjs} +2 -2
- package/components/chunks/{MazInput-Dx2cCzFS.mjs → MazInput-CJQB68c-.mjs} +22 -22
- package/components/chunks/{MazInput-O6Q41Fm0.mjs → MazInput-oOA7gdLO.mjs} +23 -23
- package/components/chunks/{MazInputNumber-DYPVUz4k.mjs → MazInputNumber-B4mQJcVB.mjs} +2 -2
- package/components/chunks/{MazInputPrice-DZD7ZZpm.mjs → MazInputPrice-BrxE5WVf.mjs} +2 -2
- package/components/chunks/{MazInputTags-CxXBsTdM.mjs → MazInputTags-BVCej_gW.mjs} +233 -232
- package/components/chunks/{MazLoadingBar-Di2OIrPD.mjs → MazLoadingBar-Dwf55oHy.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-C4TX1tGw.mjs → MazPhoneNumberInput-Cd25AzXc.mjs} +10 -10
- package/components/chunks/{MazPicker-BcQ_-AJH.mjs → MazPicker-C78yxilJ.mjs} +3 -3
- package/components/chunks/{MazPickerMonthSwitcher-hCAkEd5r.mjs → MazPickerMonthSwitcher-CyHYx8TT.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-vpLyw1de.mjs → MazPickerShortcuts-Bsi8cnox.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DvC79vrt.mjs → MazPickerYearSwitcher-DLUSMAtz.mjs} +1 -1
- package/components/chunks/{MazSelect-BXzgSKmL.mjs → MazSelect-CQDoUpgp.mjs} +15 -14
- package/components/chunks/{MazSelect-Baj2BQH7.mjs → MazSelect-uCJPMXF-.mjs} +3 -3
- package/components/chunks/{MazSpinner-DwSGm0-X.mjs → MazSpinner-2D0ZmAQz.mjs} +1 -1
- package/components/chunks/MazSpinner-B9OwpEP_.mjs +34 -0
- package/components/chunks/{MazSpinner-C1SiKhfK.mjs → MazSpinner-BT_717pD.mjs} +1 -1
- package/components/chunks/{MazSpinner-Cg26sBU2.mjs → MazSpinner-C1Ip-Dwh.mjs} +1 -1
- package/components/chunks/MazSpinner-C23CZ_Za.mjs +34 -0
- package/components/chunks/{MazSpinner-B5lezvu4.mjs → MazSpinner-CViChjTw.mjs} +1 -1
- package/components/chunks/MazSpinner-CZMBhCOJ.mjs +34 -0
- package/components/chunks/{MazSpinner-DlMKBtyt.mjs → MazSpinner-D4C84xZe.mjs} +1 -1
- package/components/chunks/{MazSpinner-B8akphXs.mjs → MazSpinner-EFo8dM46.mjs} +1 -1
- package/components/chunks/MazSpinner-u8WQTgUR.mjs +34 -0
- package/components/chunks/{MazSpinner-M4r0cykl.mjs → MazSpinner-w-S5uCxg.mjs} +1 -1
- package/components/chunks/{MazTable-CulBGLaj.mjs → MazTable-Cuz5QI08.mjs} +4 -4
- package/components/chunks/{MazTableCell-BXDbkEJq.mjs → MazTableCell-D_OTOJiy.mjs} +1 -1
- package/components/chunks/{MazTableRow-Ds3CDEit.mjs → MazTableRow-BTcVAyOy.mjs} +1 -1
- package/components/chunks/{MazTableTitle-uirsgvk_.mjs → MazTableTitle-BDA9G6Zw.mjs} +1 -1
- package/components/chunks/{MazTabsBar-MZYefBb8.mjs → MazTabsBar-JkRzMDM6.mjs} +9 -10
- package/components/chunks/{MazTransitionExpand-4Ll_5LDO.mjs → MazTransitionExpand-C-FHhOGB.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/{MazBtn-CTqI4qhg.mjs → MazBtn-BSnVxud6.mjs} +2 -2
- package/modules/chunks/{MazBtn-D_CpNgpD.cjs → MazBtn-Bf9Cq5M7.cjs} +1 -1
- package/modules/chunks/{MazIcon-BB0DMfOc.mjs → MazIcon-DllGg8tw.mjs} +1 -1
- package/modules/chunks/{MazIcon-BtomZnkQ.cjs → MazIcon-dhyR9Q8a.cjs} +1 -1
- package/modules/chunks/{MazSpinner-BASKjaLe.cjs → MazSpinner-CiIyZ8gs.cjs} +1 -1
- package/modules/chunks/{MazSpinner-CDJhmIRl.mjs → MazSpinner-bdGjxsu6.mjs} +1 -1
- package/modules/chunks/index-BPqjUr5e.cjs +149 -0
- package/modules/chunks/{index-C2yAjM0P.mjs → index-x2F1l5sr.mjs} +944 -915
- 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/MazChart.vue.d.ts +1 -1
- package/types/components/MazTable.vue.d.ts +29 -52
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +5 -5
- package/types/modules/helpers/check-availability.d.ts +1 -0
- package/components/chunks/MazBtn-igor8wRn.mjs +0 -118
- package/components/chunks/MazSpinner-CvT-9sC7.mjs +0 -34
- package/components/chunks/MazSpinner-DH6C15pU.mjs +0 -34
- package/components/chunks/MazSpinner-cqcpf_FX.mjs +0 -34
- package/components/chunks/MazSpinner-yPkPj7Q8.mjs +0 -34
- package/modules/chunks/index-BIX1NMzX.cjs +0 -149
|
@@ -1,20 +1,33 @@
|
|
|
1
|
-
import '../assets/MazGallery.css';var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { createVNode as
|
|
5
|
-
function
|
|
1
|
+
import '../assets/MazGallery.css';var Ae = Object.defineProperty;
|
|
2
|
+
var Ie = (o, e, t) => e in o ? Ae(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var g = (o, e, t) => Ie(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { createVNode as z, render as M, defineComponent as re, defineAsyncComponent as N, ref as p, reactive as Ee, computed as C, watch as we, onMounted as Ce, onBeforeUnmount as Le, openBlock as b, createElementBlock as A, withModifiers as S, withKeys as xe, unref as w, createCommentVNode as k, createElementVNode as P, normalizeClass as R, withDirectives as T, vShow as ze, useCssVars as ke, onBeforeMount as Pe, normalizeStyle as se, Fragment as ne, renderList as oe, toDisplayString as Oe } from "vue";
|
|
5
|
+
function Se(o, e) {
|
|
6
6
|
let t = e == null ? void 0 : e.element;
|
|
7
7
|
function s() {
|
|
8
|
-
t &&
|
|
8
|
+
t && M(null, t);
|
|
9
9
|
}
|
|
10
|
-
const r = { ...e == null ? void 0 : e.props, destroy: s }, l =
|
|
11
|
-
|
|
10
|
+
const r = { ...e == null ? void 0 : e.props, destroy: s }, l = z(
|
|
11
|
+
o,
|
|
12
12
|
r,
|
|
13
13
|
e == null ? void 0 : e.children
|
|
14
14
|
);
|
|
15
|
-
return e != null && e.app ? (l.appContext = e.app._context, t ?
|
|
15
|
+
return e != null && e.app ? (l.appContext = e.app._context, t ? M(l, t) : typeof document < "u" && (t = document.createElement("div"), M(l, t))) : (t = t ?? document.body, M(l, t)), { vNode: l, destroy: s, el: t };
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
function He(o, e, t) {
|
|
18
|
+
const s = {
|
|
19
|
+
maxAttempts: 20,
|
|
20
|
+
interval: 100,
|
|
21
|
+
...t
|
|
22
|
+
};
|
|
23
|
+
let r = 0;
|
|
24
|
+
function l() {
|
|
25
|
+
const u = o();
|
|
26
|
+
u != null ? s.expectedValue !== void 0 && u !== s.expectedValue ? r < s.maxAttempts ? (r++, setTimeout(l, s.interval)) : console.warn(s.errorMessage || `[maz-ui](checkAvailability) Nothing found after ${s.maxAttempts} attempts for ref ${u}`) : e(u) : r < s.maxAttempts ? (r++, setTimeout(l, s.interval)) : console.warn(s.errorMessage || `[maz-ui](checkAvailability) Nothing found or expected value after ${s.maxAttempts} attempts for ref ${u}`);
|
|
27
|
+
}
|
|
28
|
+
l();
|
|
29
|
+
}
|
|
30
|
+
const $e = ["onKeypress"], Be = { class: "m-fullscreen-img-scroller" }, Me = ["src", "alt"], _e = /* @__PURE__ */ re({
|
|
18
31
|
__name: "MazFullscreenImg",
|
|
19
32
|
props: {
|
|
20
33
|
src: {},
|
|
@@ -31,206 +44,236 @@ const ke = ["onKeypress"], Pe = { class: "m-fullscreen-img-scroller" }, Se = ["s
|
|
|
31
44
|
zoom: { type: Boolean, default: !0 }
|
|
32
45
|
},
|
|
33
46
|
emits: ["close", "previous", "next", "before-close"],
|
|
34
|
-
setup(
|
|
35
|
-
const t =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
setup(o, { emit: e }) {
|
|
48
|
+
const t = o, s = e, r = N(() => import("./MazSpinner-D4C84xZe.mjs")), l = N(() => import("./x-mark-CnZwVvA7.mjs")), u = N(() => import("./chevron-left-BqVOLRdC.mjs")), y = p(!1), x = p(!1), L = p(!1), h = p(!1), m = p(!1), c = Ee({
|
|
49
|
+
running: !1,
|
|
50
|
+
ended: !1
|
|
51
|
+
}), d = p(t.clickedElement), le = C(() => t.clickedElement.getBoundingClientRect()), H = p(), D = p(t.src), j = p(t.alt), q = p(), v = p(), $ = p(!0), ce = C(() => ({
|
|
52
|
+
"--is-zoomed": m.value,
|
|
53
|
+
"--invisible": $.value,
|
|
54
|
+
"--absolute": !m.value
|
|
55
|
+
}));
|
|
56
|
+
function ue() {
|
|
57
|
+
var n, a;
|
|
58
|
+
v.value && (H.value = ((n = v.value) == null ? void 0 : n.naturalWidth) > ((a = v.value) == null ? void 0 : a.naturalHeight)), y.value = !0, x.value = !1, L.value = !0;
|
|
40
59
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
(
|
|
44
|
-
|
|
45
|
-
}
|
|
60
|
+
we(
|
|
61
|
+
L,
|
|
62
|
+
async (n) => {
|
|
63
|
+
n && ge();
|
|
64
|
+
},
|
|
65
|
+
{ immediate: !0 }
|
|
46
66
|
);
|
|
47
|
-
function
|
|
48
|
-
s("before-close"),
|
|
67
|
+
function B() {
|
|
68
|
+
s("before-close"), pe();
|
|
49
69
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
70
|
+
function G(n) {
|
|
71
|
+
n.key === "Escape" && (n.preventDefault(), B()), (n.key === "ArrowLeft" || n.key === "ArrowRight") && (n.preventDefault(), U(n.key === "ArrowRight" ? "next" : "previous"));
|
|
52
72
|
}
|
|
53
|
-
function
|
|
73
|
+
function me() {
|
|
54
74
|
document.documentElement.classList.add("--m-fullscreen-open");
|
|
55
75
|
}
|
|
56
|
-
function
|
|
76
|
+
function de() {
|
|
57
77
|
document.documentElement.classList.remove("--m-fullscreen-open");
|
|
58
78
|
}
|
|
59
|
-
function
|
|
79
|
+
function Y() {
|
|
60
80
|
return [...document.querySelectorAll(".m-fullscreen-img-instance")];
|
|
61
81
|
}
|
|
62
|
-
function
|
|
63
|
-
return a < 0 ?
|
|
82
|
+
function he(n, a) {
|
|
83
|
+
return a < 0 ? n.length - 1 : a >= n.length ? 0 : a;
|
|
64
84
|
}
|
|
65
|
-
async function
|
|
66
|
-
|
|
67
|
-
const i = a.getAttribute("data-src"),
|
|
68
|
-
|
|
85
|
+
async function fe(n, a) {
|
|
86
|
+
n.classList.remove(t.openInstanceClass), a.classList.add(t.openInstanceClass);
|
|
87
|
+
const i = a.getAttribute("data-src"), f = a.getAttribute("data-alt");
|
|
88
|
+
j.value = f, D.value = i ?? D.value;
|
|
69
89
|
}
|
|
70
|
-
function
|
|
90
|
+
function U(n) {
|
|
91
|
+
$.value = !0;
|
|
71
92
|
const a = document.querySelector(
|
|
72
93
|
`.m-fullscreen-img-instance.${t.openInstanceClass}`
|
|
73
94
|
);
|
|
74
95
|
if (a) {
|
|
75
|
-
const i =
|
|
76
|
-
|
|
96
|
+
const i = Y(), f = i.indexOf(a), I = n === "next" ? f + 1 : f - 1, E = i[he(i, I)];
|
|
97
|
+
d.value = E, E && fe(a, E), s(n), y.value = !1, x.value = !0, He(() => y.value === !0, () => {
|
|
98
|
+
$.value = !1, m.value ? K() : O();
|
|
99
|
+
}, {
|
|
100
|
+
expectedValue: !0,
|
|
101
|
+
interval: 100,
|
|
102
|
+
maxAttempts: 50
|
|
103
|
+
});
|
|
77
104
|
}
|
|
78
105
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
106
|
+
function K() {
|
|
107
|
+
const n = v.value;
|
|
108
|
+
if (!n) {
|
|
109
|
+
console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
n.style.removeProperty("max-width"), n.style.removeProperty("max-height"), n == null || n.style.removeProperty("top"), n == null || n.style.removeProperty("left"), H.value ? (n.style.height = "100vh", n.style.removeProperty("width")) : (n.style.width = "100vw", n.style.removeProperty("height"));
|
|
81
113
|
}
|
|
82
|
-
async function
|
|
83
|
-
|
|
84
|
-
d.value ? (d.value = !d.value, H()) : (d.value = !d.value, Y(o));
|
|
114
|
+
async function ve() {
|
|
115
|
+
m.value ? (m.value = !m.value, O()) : (m.value = !m.value, K());
|
|
85
116
|
}
|
|
86
|
-
function
|
|
87
|
-
var
|
|
88
|
-
|
|
117
|
+
function X(n) {
|
|
118
|
+
var i;
|
|
119
|
+
c.running = !0, $.value = !1;
|
|
120
|
+
const a = (i = v.value) == null ? void 0 : i.animate(n, {
|
|
89
121
|
duration: t.animation.duration,
|
|
90
|
-
// Durée de l'animation en millisecondes
|
|
91
122
|
easing: t.animation.easing
|
|
92
|
-
// Fonction d'interpolation pour l'animation inverse
|
|
93
123
|
});
|
|
124
|
+
if (!a) {
|
|
125
|
+
console.error("[maz-ui](vFullscreenImg) animation is not defined"), c.running = !1, c.ended = !0;
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
return a;
|
|
94
129
|
}
|
|
95
|
-
function
|
|
96
|
-
const a =
|
|
97
|
-
(
|
|
98
|
-
(I - 2 *
|
|
99
|
-
),
|
|
130
|
+
function Q(n = t.offset ?? 0) {
|
|
131
|
+
const a = d.value.clientWidth || 1, i = d.value.clientHeight || 1, f = window.innerWidth, I = window.innerHeight, E = Math.min(
|
|
132
|
+
(f - 2 * n) / a,
|
|
133
|
+
(I - 2 * n) / i
|
|
134
|
+
), W = (f - a * E) / 2, V = (I - i * E) / 2;
|
|
100
135
|
return {
|
|
101
|
-
centerX:
|
|
102
|
-
centerY:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
scale:
|
|
136
|
+
centerX: W,
|
|
137
|
+
centerY: V,
|
|
138
|
+
width: a,
|
|
139
|
+
height: i,
|
|
140
|
+
scale: E
|
|
106
141
|
};
|
|
107
142
|
}
|
|
108
|
-
function
|
|
109
|
-
const {
|
|
143
|
+
function J({ trigger: n }) {
|
|
144
|
+
const { width: a, height: i, scale: f, centerX: I, centerY: E } = Q(), { top: W, left: V, width: ye, height: be } = le.value, te = [
|
|
110
145
|
{
|
|
111
|
-
top: `${
|
|
112
|
-
left: `${
|
|
113
|
-
width: `${
|
|
114
|
-
height: `${
|
|
146
|
+
top: `${W}px`,
|
|
147
|
+
left: `${V}px`,
|
|
148
|
+
width: `${ye}px`,
|
|
149
|
+
height: `${be}px`,
|
|
115
150
|
opacity: 0
|
|
116
151
|
},
|
|
117
152
|
{
|
|
118
|
-
top: `${
|
|
153
|
+
top: `${E}px`,
|
|
119
154
|
left: `${I}px`,
|
|
120
|
-
width: `${a *
|
|
121
|
-
height: `${i *
|
|
155
|
+
width: `${a * f}px`,
|
|
156
|
+
height: `${i * f}px`,
|
|
122
157
|
opacity: 1
|
|
123
158
|
}
|
|
124
159
|
];
|
|
125
160
|
return {
|
|
126
|
-
frames:
|
|
161
|
+
frames: n === "open" ? te : te.reverse()
|
|
127
162
|
};
|
|
128
163
|
}
|
|
129
|
-
function
|
|
130
|
-
const {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
height: `${
|
|
164
|
+
function O() {
|
|
165
|
+
const { height: n, width: a, scale: i } = Q(), f = H.value ? {
|
|
166
|
+
width: `${a * i}px`,
|
|
167
|
+
maxHeight: `${n * i}px`
|
|
168
|
+
} : {
|
|
169
|
+
height: `${n * i}px`,
|
|
170
|
+
maxWidth: `${a * i}px`
|
|
135
171
|
};
|
|
136
|
-
if (!
|
|
137
|
-
|
|
138
|
-
|
|
172
|
+
if (!v.value) {
|
|
173
|
+
console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
H.value ? (v.value.style.removeProperty("height"), v.value.style.removeProperty("maxHeight")) : (v.value.style.removeProperty("width"), v.value.style.removeProperty("maxWidth")), Object.assign(v.value.style, f);
|
|
139
177
|
}
|
|
140
|
-
function
|
|
141
|
-
const { frames:
|
|
178
|
+
function ge() {
|
|
179
|
+
const { frames: n } = J({
|
|
142
180
|
trigger: "open"
|
|
143
|
-
}), a =
|
|
144
|
-
if (!a)
|
|
145
|
-
|
|
181
|
+
}), a = X(n);
|
|
182
|
+
if (!a) {
|
|
183
|
+
console.error("[maz-ui](vFullscreenImg) open animation is not defined"), O();
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
146
186
|
a.onfinish = () => {
|
|
147
|
-
|
|
187
|
+
O(), c.running = !1, c.ended = !0;
|
|
148
188
|
};
|
|
149
189
|
}
|
|
150
|
-
function
|
|
151
|
-
const { frames:
|
|
190
|
+
function pe() {
|
|
191
|
+
const { frames: n } = J({
|
|
152
192
|
trigger: "close"
|
|
153
|
-
}), a =
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
193
|
+
}), a = X(n);
|
|
194
|
+
function i() {
|
|
195
|
+
var f, I;
|
|
196
|
+
s("close"), (f = q.value) == null || f.remove(), (I = t.destroy) == null || I.call(t), c.running = !1, c.ended = !0;
|
|
197
|
+
}
|
|
198
|
+
if (!a) {
|
|
199
|
+
console.error("[maz-ui](vFullscreenImg) close animation is not defined"), i();
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
a.onfinish = i;
|
|
160
203
|
}
|
|
161
|
-
function
|
|
162
|
-
|
|
204
|
+
function ee() {
|
|
205
|
+
m.value || O();
|
|
163
206
|
}
|
|
164
|
-
return
|
|
165
|
-
|
|
166
|
-
}),
|
|
167
|
-
document.removeEventListener("keydown",
|
|
168
|
-
}), (
|
|
207
|
+
return Ce(() => {
|
|
208
|
+
x.value = !0, document.addEventListener("keydown", G), window.addEventListener("resize", ee), me(), h.value = Y().length > 1;
|
|
209
|
+
}), Le(() => {
|
|
210
|
+
document.removeEventListener("keydown", G), window.removeEventListener("resize", ee), de();
|
|
211
|
+
}), (n, a) => (b(), A("div", {
|
|
169
212
|
ref_key: "FullscreenImgElement",
|
|
170
|
-
ref:
|
|
213
|
+
ref: q,
|
|
171
214
|
role: "button",
|
|
172
215
|
class: "m-fullscreen-img",
|
|
173
216
|
tabindex: "0",
|
|
174
|
-
onClick:
|
|
175
|
-
onKeypress:
|
|
217
|
+
onClick: S(B, ["stop"]),
|
|
218
|
+
onKeypress: xe(S(B, ["prevent"]), ["esc"])
|
|
176
219
|
}, [
|
|
177
|
-
|
|
178
|
-
L(r),
|
|
179
|
-
{ class: "m-fullscreen-img-loader maz-h-16" },
|
|
180
|
-
null,
|
|
181
|
-
512
|
|
182
|
-
/* NEED_PATCH */
|
|
183
|
-
), [
|
|
184
|
-
[we, C.value]
|
|
185
|
-
]),
|
|
186
|
-
w.value && m.value ? (b(), A("button", {
|
|
220
|
+
L.value && h.value ? (b(), A("button", {
|
|
187
221
|
key: 0,
|
|
188
222
|
type: "button",
|
|
189
223
|
class: "m-fullscreen-btn --next",
|
|
190
|
-
onClick: a[0] || (a[0] =
|
|
224
|
+
onClick: a[0] || (a[0] = S((i) => U("next"), ["stop"]))
|
|
191
225
|
}, [
|
|
192
|
-
|
|
193
|
-
])) :
|
|
194
|
-
|
|
226
|
+
z(w(u), { class: "maz-rotate-180" })
|
|
227
|
+
])) : k("v-if", !0),
|
|
228
|
+
L.value && h.value ? (b(), A("button", {
|
|
195
229
|
key: 1,
|
|
196
230
|
type: "button",
|
|
197
231
|
class: "m-fullscreen-btn --previous",
|
|
198
|
-
onClick: a[1] || (a[1] =
|
|
232
|
+
onClick: a[1] || (a[1] = S((i) => U("previous"), ["stop"]))
|
|
199
233
|
}, [
|
|
200
|
-
|
|
201
|
-
])) :
|
|
202
|
-
|
|
234
|
+
z(w(u))
|
|
235
|
+
])) : k("v-if", !0),
|
|
236
|
+
P("button", {
|
|
203
237
|
type: "button",
|
|
204
238
|
class: "m-fullscreen-btn --close",
|
|
205
|
-
onClick:
|
|
239
|
+
onClick: B
|
|
206
240
|
}, [
|
|
207
|
-
|
|
241
|
+
z(w(l))
|
|
208
242
|
]),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
243
|
+
P("div", Be, [
|
|
244
|
+
k(" eslint-disable-next-line vuejs-accessibility/no-static-element-interactions, vuejs-accessibility/click-events-have-key-events "),
|
|
245
|
+
P("img", {
|
|
212
246
|
ref_key: "ImgElement",
|
|
213
|
-
ref:
|
|
214
|
-
src:
|
|
215
|
-
alt:
|
|
247
|
+
ref: v,
|
|
248
|
+
src: D.value,
|
|
249
|
+
alt: j.value ?? void 0,
|
|
216
250
|
tabindex: "0",
|
|
217
|
-
class:
|
|
218
|
-
onLoad:
|
|
219
|
-
onClick: a[2] || (a[2] =
|
|
220
|
-
}, null, 42,
|
|
251
|
+
class: R([ce.value]),
|
|
252
|
+
onLoad: ue,
|
|
253
|
+
onClick: a[2] || (a[2] = S((i) => n.zoom && ve(), ["stop"]))
|
|
254
|
+
}, null, 42, Me),
|
|
255
|
+
T(z(
|
|
256
|
+
w(r),
|
|
257
|
+
{ class: "m-fullscreen-img-loader" },
|
|
258
|
+
null,
|
|
259
|
+
512
|
|
260
|
+
/* NEED_PATCH */
|
|
261
|
+
), [
|
|
262
|
+
[ze, x.value]
|
|
263
|
+
])
|
|
221
264
|
])
|
|
222
|
-
], 40,
|
|
265
|
+
], 40, $e));
|
|
223
266
|
}
|
|
224
|
-
}),
|
|
225
|
-
const t =
|
|
267
|
+
}), ie = (o, e) => {
|
|
268
|
+
const t = o.__vccOpts || o;
|
|
226
269
|
for (const [s, r] of e)
|
|
227
270
|
t[s] = r;
|
|
228
271
|
return t;
|
|
229
|
-
},
|
|
230
|
-
class
|
|
272
|
+
}, Fe = /* @__PURE__ */ ie(_e, [["__scopeId", "data-v-b6e5fc28"]]), ae = "m-fullscreen-is-open";
|
|
273
|
+
class Ne {
|
|
231
274
|
constructor() {
|
|
232
|
-
|
|
233
|
-
|
|
275
|
+
g(this, "options");
|
|
276
|
+
g(this, "defaultOptions", {
|
|
234
277
|
scaleOnHover: !1,
|
|
235
278
|
blurOnHover: !1,
|
|
236
279
|
disabled: !1,
|
|
@@ -241,9 +284,9 @@ class $e {
|
|
|
241
284
|
easing: "ease-in-out"
|
|
242
285
|
}
|
|
243
286
|
});
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
287
|
+
g(this, "mouseEnterListener");
|
|
288
|
+
g(this, "mouseLeaveListener");
|
|
289
|
+
g(this, "renderPreviewListener");
|
|
247
290
|
}
|
|
248
291
|
buildOptions(e, t) {
|
|
249
292
|
const s = typeof t.value == "object" ? t.value : { src: t.value, alt: void 0 }, r = (s == null ? void 0 : s.src) ?? this.getImgSrc(e), l = (s == null ? void 0 : s.alt) ?? this.getImgAlt(e);
|
|
@@ -284,10 +327,10 @@ class $e {
|
|
|
284
327
|
e.removeEventListener("mouseenter", this.mouseEnterListener), e.removeEventListener("mouseleave", this.mouseLeaveListener), e.removeEventListener("click", this.renderPreviewListener), e.classList.remove("m-fullscreen-img-instance"), e.style.cursor = "";
|
|
285
328
|
}
|
|
286
329
|
renderPreview(e) {
|
|
287
|
-
return e.classList.add(
|
|
330
|
+
return e.classList.add(ae), Se(Fe, {
|
|
288
331
|
props: {
|
|
289
332
|
...this.options,
|
|
290
|
-
openInstanceClass:
|
|
333
|
+
openInstanceClass: ae,
|
|
291
334
|
clickedElement: e,
|
|
292
335
|
clickedElementBounds: e.getBoundingClientRect()
|
|
293
336
|
},
|
|
@@ -301,18 +344,18 @@ class $e {
|
|
|
301
344
|
e.style.zIndex = "1", this.options.scaleOnHover && (e.style.transform = "scale(1.04)"), this.options.blurOnHover && (e.style.filter = "blur(3px)");
|
|
302
345
|
}
|
|
303
346
|
}
|
|
304
|
-
let
|
|
305
|
-
const
|
|
306
|
-
mounted(
|
|
307
|
-
return
|
|
347
|
+
let _;
|
|
348
|
+
const Z = {
|
|
349
|
+
mounted(o, e) {
|
|
350
|
+
return _ = new Ne(), _.create(o, e);
|
|
308
351
|
},
|
|
309
|
-
updated(
|
|
310
|
-
return
|
|
352
|
+
updated(o, e) {
|
|
353
|
+
return _.update(o, e);
|
|
311
354
|
},
|
|
312
|
-
unmounted(
|
|
313
|
-
return
|
|
355
|
+
unmounted(o) {
|
|
356
|
+
return _.remove(o);
|
|
314
357
|
}
|
|
315
|
-
},
|
|
358
|
+
}, Re = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", Te = {
|
|
316
359
|
baseClass: "m-lazy-img",
|
|
317
360
|
loadedClass: "m-lazy-loaded",
|
|
318
361
|
loadingClass: "m-lazy-loading",
|
|
@@ -326,14 +369,14 @@ const U = {
|
|
|
326
369
|
threshold: 0.1
|
|
327
370
|
}
|
|
328
371
|
};
|
|
329
|
-
class
|
|
372
|
+
class De {
|
|
330
373
|
constructor(e = {}) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
374
|
+
g(this, "observers", []);
|
|
375
|
+
g(this, "defaultOptions", Te);
|
|
376
|
+
g(this, "options");
|
|
377
|
+
g(this, "onImgLoadedCallback");
|
|
378
|
+
g(this, "onImgErrorCallback");
|
|
379
|
+
g(this, "hasImgLoaded", !1);
|
|
337
380
|
this.options = this.buildOptions(e), this.onImgLoadedCallback = this.imageIsLoaded.bind(this), this.onImgErrorCallback = this.imageHasError.bind(this);
|
|
338
381
|
}
|
|
339
382
|
async loadErrorPhoto() {
|
|
@@ -439,18 +482,18 @@ class Re {
|
|
|
439
482
|
s.src = t;
|
|
440
483
|
}
|
|
441
484
|
handleIntersectionObserver(e, t, s, r) {
|
|
442
|
-
var l,
|
|
485
|
+
var l, u;
|
|
443
486
|
this.observers.push(r);
|
|
444
|
-
for (const
|
|
445
|
-
if (
|
|
446
|
-
if ((
|
|
487
|
+
for (const y of s)
|
|
488
|
+
if (y.isIntersecting) {
|
|
489
|
+
if ((u = (l = this.options).onIntersecting) == null || u.call(l, y.target), this.options.observerOnce && r.unobserve(e), this.options.loadOnce && this.hasImgLoaded)
|
|
447
490
|
return;
|
|
448
491
|
this.loadImage(e, t);
|
|
449
492
|
}
|
|
450
493
|
}
|
|
451
494
|
createObserver(e, t) {
|
|
452
|
-
const s = (
|
|
453
|
-
this.handleIntersectionObserver(e, t,
|
|
495
|
+
const s = (u, y) => {
|
|
496
|
+
this.handleIntersectionObserver(e, t, u, y);
|
|
454
497
|
}, r = this.options.observerOptions;
|
|
455
498
|
new IntersectionObserver(s, r).observe(e);
|
|
456
499
|
}
|
|
@@ -467,7 +510,7 @@ class Re {
|
|
|
467
510
|
async add(e, t) {
|
|
468
511
|
if (this.hasBgImgMode(t) && this.isPictureElement(e))
|
|
469
512
|
throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);
|
|
470
|
-
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e,
|
|
513
|
+
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e, Re), await this.bindUpdateHandler(e, t, "bind");
|
|
471
514
|
}
|
|
472
515
|
async update(e, t) {
|
|
473
516
|
t.value !== t.oldValue && (this.hasImgLoaded = !1, this.removeAllStateClasses(e), await this.bindUpdateHandler(e, t, "update"));
|
|
@@ -479,22 +522,22 @@ class Re {
|
|
|
479
522
|
this.observers = [];
|
|
480
523
|
}
|
|
481
524
|
}
|
|
482
|
-
let
|
|
483
|
-
const
|
|
484
|
-
created(
|
|
525
|
+
let F;
|
|
526
|
+
const Ue = {
|
|
527
|
+
created(o, e) {
|
|
485
528
|
const t = typeof e.value == "object" ? e.value : {};
|
|
486
|
-
|
|
529
|
+
F = new De(t), F.add(o, e);
|
|
487
530
|
},
|
|
488
|
-
updated(
|
|
489
|
-
|
|
531
|
+
updated(o, e) {
|
|
532
|
+
F.update(o, e);
|
|
490
533
|
},
|
|
491
|
-
unmounted(
|
|
492
|
-
|
|
534
|
+
unmounted(o, e) {
|
|
535
|
+
F.remove(o, e);
|
|
493
536
|
}
|
|
494
|
-
},
|
|
537
|
+
}, We = { class: "m-gallery__wrapper maz-flex maz-flex-1" }, Ve = ["alt"], Ze = {
|
|
495
538
|
key: 0,
|
|
496
539
|
class: "m-gallery__remaining-layer maz-flex maz-bg-overlay maz-flex-center"
|
|
497
|
-
},
|
|
540
|
+
}, je = { class: "maz-text-2xl maz-text-white" }, qe = /* @__PURE__ */ re({
|
|
498
541
|
__name: "MazGallery",
|
|
499
542
|
props: {
|
|
500
543
|
/**
|
|
@@ -531,83 +574,83 @@ const Fe = {
|
|
|
531
574
|
/** Choose color of borders between images - Should be a CSS color or CSS variable - Ex: `#000` or `var(--maz-color-bg-light)` */
|
|
532
575
|
separatorColor: { type: String, default: "transparent" }
|
|
533
576
|
},
|
|
534
|
-
setup(
|
|
535
|
-
|
|
536
|
-
"37b3f3e3":
|
|
577
|
+
setup(o) {
|
|
578
|
+
ke((h) => ({
|
|
579
|
+
"37b3f3e3": o.separatorColor
|
|
537
580
|
}));
|
|
538
|
-
const e =
|
|
539
|
-
|
|
581
|
+
const e = o, t = N(() => import("./no-photography-PGT8fxs_.mjs"));
|
|
582
|
+
Pe(() => {
|
|
540
583
|
e.imagesShownCount > 5 && console.warn('[MazUI](m-gallery) The maximum of "images-shown-count" is 5');
|
|
541
584
|
});
|
|
542
|
-
const s =
|
|
543
|
-
const
|
|
585
|
+
const s = C(() => {
|
|
586
|
+
const h = e.noWidth, m = e.width, c = e.noHeight, d = e.height;
|
|
544
587
|
return {
|
|
545
|
-
...
|
|
546
|
-
flex: `0 0 ${typeof
|
|
547
|
-
width: typeof
|
|
588
|
+
...h ? {} : {
|
|
589
|
+
flex: `0 0 ${typeof m}` == "number" ? `${m}px` : m,
|
|
590
|
+
width: typeof m == "number" ? `${m}px` : m
|
|
548
591
|
},
|
|
549
592
|
...c ? {} : {
|
|
550
|
-
height: typeof
|
|
551
|
-
minHeight: typeof
|
|
593
|
+
height: typeof d == "number" ? `${d}px` : `${d}`,
|
|
594
|
+
minHeight: typeof d == "number" ? `${d}px` : `${d}`
|
|
552
595
|
}
|
|
553
596
|
};
|
|
554
|
-
}), r =
|
|
555
|
-
(
|
|
556
|
-
)),
|
|
557
|
-
function
|
|
558
|
-
return e.noRemaining ? !1 : (l.value &&
|
|
597
|
+
}), r = C(() => e.imagesShownCount <= 5 ? e.imagesShownCount : 5), l = C(() => e.images.length - (e.images.length < r.value ? e.images.length : r.value)), u = C(() => e.images.map(
|
|
598
|
+
(h) => typeof h == "object" ? { ...h, thumbnail: h.thumbnail ?? h.src } : { src: h, thumbnail: h, alt: void 0 }
|
|
599
|
+
)), y = C(() => u.value.slice(0, r.value)), x = C(() => u.value.slice(r.value, e.images.length));
|
|
600
|
+
function L(h) {
|
|
601
|
+
return e.noRemaining ? !1 : (l.value && h + 1) === y.value.length;
|
|
559
602
|
}
|
|
560
|
-
return (
|
|
603
|
+
return (h, m) => o.images.length > 0 || o.hasEmptyLayer ? (b(), A(
|
|
561
604
|
"div",
|
|
562
605
|
{
|
|
563
606
|
key: 0,
|
|
564
|
-
class:
|
|
565
|
-
style:
|
|
607
|
+
class: R(["m-gallery maz-flex", { "maz-rounded": !o.noRadius }]),
|
|
608
|
+
style: se([s.value])
|
|
566
609
|
},
|
|
567
610
|
[
|
|
568
|
-
|
|
611
|
+
P("section", We, [
|
|
569
612
|
(b(!0), A(
|
|
570
|
-
|
|
613
|
+
ne,
|
|
571
614
|
null,
|
|
572
|
-
|
|
615
|
+
oe(y.value, (c, d) => (b(), A(
|
|
573
616
|
"figure",
|
|
574
617
|
{
|
|
575
|
-
key:
|
|
576
|
-
class:
|
|
618
|
+
key: d,
|
|
619
|
+
class: R(["m-gallery__item !maz-my-0 maz-flex maz-flex-center", [`m-gallery__item--${d + 1}`]])
|
|
577
620
|
},
|
|
578
621
|
[
|
|
579
|
-
|
|
622
|
+
T(P("img", {
|
|
580
623
|
class: "m-gallery__item__image maz-flex-1",
|
|
581
624
|
src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
|
582
625
|
alt: c.alt,
|
|
583
626
|
loading: "lazy"
|
|
584
|
-
}, null, 8,
|
|
585
|
-
[
|
|
586
|
-
[
|
|
627
|
+
}, null, 8, Ve), [
|
|
628
|
+
[w(Ue), { src: c.thumbnail, disabled: !o.lazy }, "bg-image"],
|
|
629
|
+
[w(Z), {
|
|
587
630
|
src: c.src,
|
|
588
631
|
alt: c.alt,
|
|
589
|
-
disabled:
|
|
590
|
-
blurOnHover:
|
|
591
|
-
scaleOnHover:
|
|
632
|
+
disabled: o.noZoom || L(d),
|
|
633
|
+
blurOnHover: o.blur,
|
|
634
|
+
scaleOnHover: o.scale
|
|
592
635
|
}]
|
|
593
636
|
]),
|
|
594
|
-
|
|
595
|
-
|
|
637
|
+
L(d) ? T((b(), A("div", Ze, [
|
|
638
|
+
P(
|
|
596
639
|
"span",
|
|
597
|
-
|
|
598
|
-
"+" +
|
|
640
|
+
je,
|
|
641
|
+
"+" + Oe(l.value),
|
|
599
642
|
1
|
|
600
643
|
/* TEXT */
|
|
601
644
|
)
|
|
602
645
|
])), [
|
|
603
|
-
[
|
|
646
|
+
[w(Z), {
|
|
604
647
|
src: c.src,
|
|
605
648
|
alt: c.alt,
|
|
606
|
-
disabled:
|
|
649
|
+
disabled: o.noZoom,
|
|
607
650
|
blurOnHover: !1,
|
|
608
|
-
scaleOnHover:
|
|
651
|
+
scaleOnHover: o.scale
|
|
609
652
|
}]
|
|
610
|
-
]) :
|
|
653
|
+
]) : k("v-if", !0)
|
|
611
654
|
],
|
|
612
655
|
2
|
|
613
656
|
/* CLASS */
|
|
@@ -615,28 +658,28 @@ const Fe = {
|
|
|
615
658
|
128
|
|
616
659
|
/* KEYED_FRAGMENT */
|
|
617
660
|
)),
|
|
618
|
-
|
|
661
|
+
o.hasEmptyLayer && o.images.length === 0 ? (b(), A(
|
|
619
662
|
"div",
|
|
620
663
|
{
|
|
621
664
|
key: 0,
|
|
622
|
-
class:
|
|
623
|
-
style:
|
|
665
|
+
class: R(["empty-layer maz-flex maz-w-full maz-bg-color-light maz-text-normal maz-flex-center", { "maz-rounded-xl": !o.noRadius }]),
|
|
666
|
+
style: se([s.value])
|
|
624
667
|
},
|
|
625
668
|
[
|
|
626
|
-
|
|
669
|
+
z(w(t), { class: "maz-h-8 maz-w-8" })
|
|
627
670
|
],
|
|
628
671
|
6
|
|
629
672
|
/* CLASS, STYLE */
|
|
630
|
-
)) :
|
|
673
|
+
)) : k("v-if", !0)
|
|
631
674
|
]),
|
|
632
675
|
(b(!0), A(
|
|
633
|
-
|
|
676
|
+
ne,
|
|
634
677
|
null,
|
|
635
|
-
|
|
636
|
-
key:
|
|
678
|
+
oe(x.value, (c, d) => T((b(), A("div", {
|
|
679
|
+
key: d,
|
|
637
680
|
class: "m-gallery__hidden"
|
|
638
681
|
})), [
|
|
639
|
-
[
|
|
682
|
+
[w(Z), { src: c.src, disabled: o.noZoom }]
|
|
640
683
|
])),
|
|
641
684
|
128
|
|
642
685
|
/* KEYED_FRAGMENT */
|
|
@@ -644,10 +687,10 @@ const Fe = {
|
|
|
644
687
|
],
|
|
645
688
|
6
|
|
646
689
|
/* CLASS, STYLE */
|
|
647
|
-
)) :
|
|
690
|
+
)) : k("v-if", !0);
|
|
648
691
|
}
|
|
649
|
-
}),
|
|
692
|
+
}), Ke = /* @__PURE__ */ ie(qe, [["__scopeId", "data-v-d7c3127b"]]);
|
|
650
693
|
export {
|
|
651
|
-
|
|
652
|
-
|
|
694
|
+
Ke as M,
|
|
695
|
+
ie as _
|
|
653
696
|
};
|