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,21 +1,34 @@
|
|
|
1
|
-
import '../assets/MazGallery.css';var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { createVNode as
|
|
5
|
-
import { _ as
|
|
6
|
-
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
|
+
import { _ as ie } from "./MazCard-FSXmHyhj.mjs";
|
|
6
|
+
function Se(o, e) {
|
|
7
7
|
let t = e == null ? void 0 : e.element;
|
|
8
8
|
function s() {
|
|
9
|
-
t &&
|
|
9
|
+
t && M(null, t);
|
|
10
10
|
}
|
|
11
|
-
const r = { ...e == null ? void 0 : e.props, destroy: s }, l =
|
|
11
|
+
const r = { ...e == null ? void 0 : e.props, destroy: s }, l = z(
|
|
12
12
|
o,
|
|
13
13
|
r,
|
|
14
14
|
e == null ? void 0 : e.children
|
|
15
15
|
);
|
|
16
|
-
return e != null && e.app ? (l.appContext = e.app._context, t ?
|
|
16
|
+
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 };
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
function He(o, e, t) {
|
|
19
|
+
const s = {
|
|
20
|
+
maxAttempts: 20,
|
|
21
|
+
interval: 100,
|
|
22
|
+
...t
|
|
23
|
+
};
|
|
24
|
+
let r = 0;
|
|
25
|
+
function l() {
|
|
26
|
+
const u = o();
|
|
27
|
+
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}`);
|
|
28
|
+
}
|
|
29
|
+
l();
|
|
30
|
+
}
|
|
31
|
+
const $e = ["onKeypress"], Be = { class: "m-fullscreen-img-scroller" }, Me = ["src", "alt"], _e = /* @__PURE__ */ re({
|
|
19
32
|
__name: "MazFullscreenImg",
|
|
20
33
|
props: {
|
|
21
34
|
src: {},
|
|
@@ -33,200 +46,230 @@ const Pe = ["onKeypress"], Se = { class: "m-fullscreen-img-scroller" }, ke = ["s
|
|
|
33
46
|
},
|
|
34
47
|
emits: ["close", "previous", "next", "before-close"],
|
|
35
48
|
setup(o, { emit: e }) {
|
|
36
|
-
const t = o, s = e, r =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
const t = o, s = e, r = N(() => import("./MazSpinner-2D0ZmAQz.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({
|
|
50
|
+
running: !1,
|
|
51
|
+
ended: !1
|
|
52
|
+
}), 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(() => ({
|
|
53
|
+
"--is-zoomed": m.value,
|
|
54
|
+
"--invisible": $.value,
|
|
55
|
+
"--absolute": !m.value
|
|
56
|
+
}));
|
|
57
|
+
function ue() {
|
|
58
|
+
var n, a;
|
|
59
|
+
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;
|
|
41
60
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
(n) => {
|
|
45
|
-
n &&
|
|
46
|
-
}
|
|
61
|
+
we(
|
|
62
|
+
L,
|
|
63
|
+
async (n) => {
|
|
64
|
+
n && ge();
|
|
65
|
+
},
|
|
66
|
+
{ immediate: !0 }
|
|
47
67
|
);
|
|
48
|
-
function
|
|
49
|
-
s("before-close"),
|
|
68
|
+
function B() {
|
|
69
|
+
s("before-close"), pe();
|
|
50
70
|
}
|
|
51
|
-
function
|
|
52
|
-
n.key === "Escape" && (n.preventDefault(),
|
|
71
|
+
function G(n) {
|
|
72
|
+
n.key === "Escape" && (n.preventDefault(), B()), (n.key === "ArrowLeft" || n.key === "ArrowRight") && (n.preventDefault(), U(n.key === "ArrowRight" ? "next" : "previous"));
|
|
53
73
|
}
|
|
54
|
-
function
|
|
74
|
+
function me() {
|
|
55
75
|
document.documentElement.classList.add("--m-fullscreen-open");
|
|
56
76
|
}
|
|
57
|
-
function
|
|
77
|
+
function de() {
|
|
58
78
|
document.documentElement.classList.remove("--m-fullscreen-open");
|
|
59
79
|
}
|
|
60
|
-
function
|
|
80
|
+
function Y() {
|
|
61
81
|
return [...document.querySelectorAll(".m-fullscreen-img-instance")];
|
|
62
82
|
}
|
|
63
|
-
function
|
|
83
|
+
function he(n, a) {
|
|
64
84
|
return a < 0 ? n.length - 1 : a >= n.length ? 0 : a;
|
|
65
85
|
}
|
|
66
|
-
async function
|
|
86
|
+
async function fe(n, a) {
|
|
67
87
|
n.classList.remove(t.openInstanceClass), a.classList.add(t.openInstanceClass);
|
|
68
|
-
const i = a.getAttribute("data-src"),
|
|
69
|
-
|
|
88
|
+
const i = a.getAttribute("data-src"), f = a.getAttribute("data-alt");
|
|
89
|
+
j.value = f, D.value = i ?? D.value;
|
|
70
90
|
}
|
|
71
|
-
function
|
|
91
|
+
function U(n) {
|
|
92
|
+
$.value = !0;
|
|
72
93
|
const a = document.querySelector(
|
|
73
94
|
`.m-fullscreen-img-instance.${t.openInstanceClass}`
|
|
74
95
|
);
|
|
75
96
|
if (a) {
|
|
76
|
-
const i =
|
|
77
|
-
|
|
97
|
+
const i = Y(), f = i.indexOf(a), I = n === "next" ? f + 1 : f - 1, E = i[he(i, I)];
|
|
98
|
+
d.value = E, E && fe(a, E), s(n), y.value = !1, x.value = !0, He(() => y.value === !0, () => {
|
|
99
|
+
$.value = !1, m.value ? K() : O();
|
|
100
|
+
}, {
|
|
101
|
+
expectedValue: !0,
|
|
102
|
+
interval: 100,
|
|
103
|
+
maxAttempts: 50
|
|
104
|
+
});
|
|
78
105
|
}
|
|
79
106
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
107
|
+
function K() {
|
|
108
|
+
const n = v.value;
|
|
109
|
+
if (!n) {
|
|
110
|
+
console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
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"));
|
|
82
114
|
}
|
|
83
|
-
async function
|
|
84
|
-
|
|
85
|
-
d.value ? (d.value = !d.value, H()) : (d.value = !d.value, Y(n));
|
|
115
|
+
async function ve() {
|
|
116
|
+
m.value ? (m.value = !m.value, O()) : (m.value = !m.value, K());
|
|
86
117
|
}
|
|
87
|
-
function
|
|
88
|
-
var
|
|
89
|
-
|
|
118
|
+
function X(n) {
|
|
119
|
+
var i;
|
|
120
|
+
c.running = !0, $.value = !1;
|
|
121
|
+
const a = (i = v.value) == null ? void 0 : i.animate(n, {
|
|
90
122
|
duration: t.animation.duration,
|
|
91
|
-
// Durée de l'animation en millisecondes
|
|
92
123
|
easing: t.animation.easing
|
|
93
|
-
// Fonction d'interpolation pour l'animation inverse
|
|
94
124
|
});
|
|
125
|
+
if (!a) {
|
|
126
|
+
console.error("[maz-ui](vFullscreenImg) animation is not defined"), c.running = !1, c.ended = !0;
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
return a;
|
|
95
130
|
}
|
|
96
|
-
function
|
|
97
|
-
const a =
|
|
98
|
-
(
|
|
131
|
+
function Q(n = t.offset ?? 0) {
|
|
132
|
+
const a = d.value.clientWidth || 1, i = d.value.clientHeight || 1, f = window.innerWidth, I = window.innerHeight, E = Math.min(
|
|
133
|
+
(f - 2 * n) / a,
|
|
99
134
|
(I - 2 * n) / i
|
|
100
|
-
),
|
|
135
|
+
), W = (f - a * E) / 2, V = (I - i * E) / 2;
|
|
101
136
|
return {
|
|
102
|
-
centerX:
|
|
103
|
-
centerY:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
scale:
|
|
137
|
+
centerX: W,
|
|
138
|
+
centerY: V,
|
|
139
|
+
width: a,
|
|
140
|
+
height: i,
|
|
141
|
+
scale: E
|
|
107
142
|
};
|
|
108
143
|
}
|
|
109
|
-
function
|
|
110
|
-
const {
|
|
144
|
+
function J({ trigger: n }) {
|
|
145
|
+
const { width: a, height: i, scale: f, centerX: I, centerY: E } = Q(), { top: W, left: V, width: ye, height: be } = le.value, te = [
|
|
111
146
|
{
|
|
112
|
-
top: `${
|
|
113
|
-
left: `${
|
|
114
|
-
width: `${
|
|
115
|
-
height: `${
|
|
147
|
+
top: `${W}px`,
|
|
148
|
+
left: `${V}px`,
|
|
149
|
+
width: `${ye}px`,
|
|
150
|
+
height: `${be}px`,
|
|
116
151
|
opacity: 0
|
|
117
152
|
},
|
|
118
153
|
{
|
|
119
|
-
top: `${
|
|
154
|
+
top: `${E}px`,
|
|
120
155
|
left: `${I}px`,
|
|
121
|
-
width: `${a *
|
|
122
|
-
height: `${i *
|
|
156
|
+
width: `${a * f}px`,
|
|
157
|
+
height: `${i * f}px`,
|
|
123
158
|
opacity: 1
|
|
124
159
|
}
|
|
125
160
|
];
|
|
126
161
|
return {
|
|
127
|
-
frames: n === "open" ?
|
|
162
|
+
frames: n === "open" ? te : te.reverse()
|
|
128
163
|
};
|
|
129
164
|
}
|
|
130
|
-
function
|
|
131
|
-
const {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
height: `${
|
|
165
|
+
function O() {
|
|
166
|
+
const { height: n, width: a, scale: i } = Q(), f = H.value ? {
|
|
167
|
+
width: `${a * i}px`,
|
|
168
|
+
maxHeight: `${n * i}px`
|
|
169
|
+
} : {
|
|
170
|
+
height: `${n * i}px`,
|
|
171
|
+
maxWidth: `${a * i}px`
|
|
136
172
|
};
|
|
137
|
-
if (!
|
|
138
|
-
|
|
139
|
-
|
|
173
|
+
if (!v.value) {
|
|
174
|
+
console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
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);
|
|
140
178
|
}
|
|
141
|
-
function
|
|
142
|
-
const { frames: n } =
|
|
179
|
+
function ge() {
|
|
180
|
+
const { frames: n } = J({
|
|
143
181
|
trigger: "open"
|
|
144
|
-
}), a =
|
|
145
|
-
if (!a)
|
|
146
|
-
|
|
182
|
+
}), a = X(n);
|
|
183
|
+
if (!a) {
|
|
184
|
+
console.error("[maz-ui](vFullscreenImg) open animation is not defined"), O();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
147
187
|
a.onfinish = () => {
|
|
148
|
-
|
|
188
|
+
O(), c.running = !1, c.ended = !0;
|
|
149
189
|
};
|
|
150
190
|
}
|
|
151
|
-
function
|
|
152
|
-
const { frames: n } =
|
|
191
|
+
function pe() {
|
|
192
|
+
const { frames: n } = J({
|
|
153
193
|
trigger: "close"
|
|
154
|
-
}), a =
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
194
|
+
}), a = X(n);
|
|
195
|
+
function i() {
|
|
196
|
+
var f, I;
|
|
197
|
+
s("close"), (f = q.value) == null || f.remove(), (I = t.destroy) == null || I.call(t), c.running = !1, c.ended = !0;
|
|
198
|
+
}
|
|
199
|
+
if (!a) {
|
|
200
|
+
console.error("[maz-ui](vFullscreenImg) close animation is not defined"), i();
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
a.onfinish = i;
|
|
161
204
|
}
|
|
162
|
-
function
|
|
163
|
-
|
|
205
|
+
function ee() {
|
|
206
|
+
m.value || O();
|
|
164
207
|
}
|
|
165
|
-
return
|
|
166
|
-
|
|
167
|
-
}),
|
|
168
|
-
document.removeEventListener("keydown",
|
|
208
|
+
return Ce(() => {
|
|
209
|
+
x.value = !0, document.addEventListener("keydown", G), window.addEventListener("resize", ee), me(), h.value = Y().length > 1;
|
|
210
|
+
}), Le(() => {
|
|
211
|
+
document.removeEventListener("keydown", G), window.removeEventListener("resize", ee), de();
|
|
169
212
|
}), (n, a) => (b(), A("div", {
|
|
170
213
|
ref_key: "FullscreenImgElement",
|
|
171
|
-
ref:
|
|
214
|
+
ref: q,
|
|
172
215
|
role: "button",
|
|
173
216
|
class: "m-fullscreen-img",
|
|
174
217
|
tabindex: "0",
|
|
175
|
-
onClick: S(
|
|
176
|
-
onKeypress:
|
|
218
|
+
onClick: S(B, ["stop"]),
|
|
219
|
+
onKeypress: xe(S(B, ["prevent"]), ["esc"])
|
|
177
220
|
}, [
|
|
178
|
-
|
|
179
|
-
L(r),
|
|
180
|
-
{ class: "m-fullscreen-img-loader maz-h-16" },
|
|
181
|
-
null,
|
|
182
|
-
512
|
|
183
|
-
/* NEED_PATCH */
|
|
184
|
-
), [
|
|
185
|
-
[we, C.value]
|
|
186
|
-
]),
|
|
187
|
-
w.value && m.value ? (b(), A("button", {
|
|
221
|
+
L.value && h.value ? (b(), A("button", {
|
|
188
222
|
key: 0,
|
|
189
223
|
type: "button",
|
|
190
224
|
class: "m-fullscreen-btn --next",
|
|
191
|
-
onClick: a[0] || (a[0] = S((i) =>
|
|
225
|
+
onClick: a[0] || (a[0] = S((i) => U("next"), ["stop"]))
|
|
192
226
|
}, [
|
|
193
|
-
|
|
194
|
-
])) :
|
|
195
|
-
|
|
227
|
+
z(w(u), { class: "maz-rotate-180" })
|
|
228
|
+
])) : k("v-if", !0),
|
|
229
|
+
L.value && h.value ? (b(), A("button", {
|
|
196
230
|
key: 1,
|
|
197
231
|
type: "button",
|
|
198
232
|
class: "m-fullscreen-btn --previous",
|
|
199
|
-
onClick: a[1] || (a[1] = S((i) =>
|
|
233
|
+
onClick: a[1] || (a[1] = S((i) => U("previous"), ["stop"]))
|
|
200
234
|
}, [
|
|
201
|
-
|
|
202
|
-
])) :
|
|
235
|
+
z(w(u))
|
|
236
|
+
])) : k("v-if", !0),
|
|
203
237
|
P("button", {
|
|
204
238
|
type: "button",
|
|
205
239
|
class: "m-fullscreen-btn --close",
|
|
206
|
-
onClick:
|
|
240
|
+
onClick: B
|
|
207
241
|
}, [
|
|
208
|
-
|
|
242
|
+
z(w(l))
|
|
209
243
|
]),
|
|
210
|
-
P("div",
|
|
211
|
-
|
|
244
|
+
P("div", Be, [
|
|
245
|
+
k(" eslint-disable-next-line vuejs-accessibility/no-static-element-interactions, vuejs-accessibility/click-events-have-key-events "),
|
|
212
246
|
P("img", {
|
|
213
247
|
ref_key: "ImgElement",
|
|
214
|
-
ref:
|
|
215
|
-
src:
|
|
216
|
-
alt:
|
|
248
|
+
ref: v,
|
|
249
|
+
src: D.value,
|
|
250
|
+
alt: j.value ?? void 0,
|
|
217
251
|
tabindex: "0",
|
|
218
|
-
class:
|
|
219
|
-
onLoad:
|
|
220
|
-
onClick: a[2] || (a[2] = S((i) => n.zoom
|
|
221
|
-
}, null, 42,
|
|
252
|
+
class: R([ce.value]),
|
|
253
|
+
onLoad: ue,
|
|
254
|
+
onClick: a[2] || (a[2] = S((i) => n.zoom && ve(), ["stop"]))
|
|
255
|
+
}, null, 42, Me),
|
|
256
|
+
T(z(
|
|
257
|
+
w(r),
|
|
258
|
+
{ class: "m-fullscreen-img-loader" },
|
|
259
|
+
null,
|
|
260
|
+
512
|
|
261
|
+
/* NEED_PATCH */
|
|
262
|
+
), [
|
|
263
|
+
[ze, x.value]
|
|
264
|
+
])
|
|
222
265
|
])
|
|
223
|
-
], 40,
|
|
266
|
+
], 40, $e));
|
|
224
267
|
}
|
|
225
|
-
}),
|
|
226
|
-
class
|
|
268
|
+
}), Fe = /* @__PURE__ */ ie(_e, [["__scopeId", "data-v-b6e5fc28"]]), ae = "m-fullscreen-is-open";
|
|
269
|
+
class Ne {
|
|
227
270
|
constructor() {
|
|
228
|
-
|
|
229
|
-
|
|
271
|
+
g(this, "options");
|
|
272
|
+
g(this, "defaultOptions", {
|
|
230
273
|
scaleOnHover: !1,
|
|
231
274
|
blurOnHover: !1,
|
|
232
275
|
disabled: !1,
|
|
@@ -237,9 +280,9 @@ class $e {
|
|
|
237
280
|
easing: "ease-in-out"
|
|
238
281
|
}
|
|
239
282
|
});
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
283
|
+
g(this, "mouseEnterListener");
|
|
284
|
+
g(this, "mouseLeaveListener");
|
|
285
|
+
g(this, "renderPreviewListener");
|
|
243
286
|
}
|
|
244
287
|
buildOptions(e, t) {
|
|
245
288
|
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);
|
|
@@ -280,10 +323,10 @@ class $e {
|
|
|
280
323
|
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 = "";
|
|
281
324
|
}
|
|
282
325
|
renderPreview(e) {
|
|
283
|
-
return e.classList.add(
|
|
326
|
+
return e.classList.add(ae), Se(Fe, {
|
|
284
327
|
props: {
|
|
285
328
|
...this.options,
|
|
286
|
-
openInstanceClass:
|
|
329
|
+
openInstanceClass: ae,
|
|
287
330
|
clickedElement: e,
|
|
288
331
|
clickedElementBounds: e.getBoundingClientRect()
|
|
289
332
|
},
|
|
@@ -297,18 +340,18 @@ class $e {
|
|
|
297
340
|
e.style.zIndex = "1", this.options.scaleOnHover && (e.style.transform = "scale(1.04)"), this.options.blurOnHover && (e.style.filter = "blur(3px)");
|
|
298
341
|
}
|
|
299
342
|
}
|
|
300
|
-
let
|
|
301
|
-
const
|
|
343
|
+
let _;
|
|
344
|
+
const Z = {
|
|
302
345
|
mounted(o, e) {
|
|
303
|
-
return
|
|
346
|
+
return _ = new Ne(), _.create(o, e);
|
|
304
347
|
},
|
|
305
348
|
updated(o, e) {
|
|
306
|
-
return
|
|
349
|
+
return _.update(o, e);
|
|
307
350
|
},
|
|
308
351
|
unmounted(o) {
|
|
309
|
-
return
|
|
352
|
+
return _.remove(o);
|
|
310
353
|
}
|
|
311
|
-
},
|
|
354
|
+
}, Re = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", Te = {
|
|
312
355
|
baseClass: "m-lazy-img",
|
|
313
356
|
loadedClass: "m-lazy-loaded",
|
|
314
357
|
loadingClass: "m-lazy-loading",
|
|
@@ -322,14 +365,14 @@ const U = {
|
|
|
322
365
|
threshold: 0.1
|
|
323
366
|
}
|
|
324
367
|
};
|
|
325
|
-
class
|
|
368
|
+
class De {
|
|
326
369
|
constructor(e = {}) {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
370
|
+
g(this, "observers", []);
|
|
371
|
+
g(this, "defaultOptions", Te);
|
|
372
|
+
g(this, "options");
|
|
373
|
+
g(this, "onImgLoadedCallback");
|
|
374
|
+
g(this, "onImgErrorCallback");
|
|
375
|
+
g(this, "hasImgLoaded", !1);
|
|
333
376
|
this.options = this.buildOptions(e), this.onImgLoadedCallback = this.imageIsLoaded.bind(this), this.onImgErrorCallback = this.imageHasError.bind(this);
|
|
334
377
|
}
|
|
335
378
|
async loadErrorPhoto() {
|
|
@@ -435,18 +478,18 @@ class Re {
|
|
|
435
478
|
s.src = t;
|
|
436
479
|
}
|
|
437
480
|
handleIntersectionObserver(e, t, s, r) {
|
|
438
|
-
var l,
|
|
481
|
+
var l, u;
|
|
439
482
|
this.observers.push(r);
|
|
440
|
-
for (const
|
|
441
|
-
if (
|
|
442
|
-
if ((
|
|
483
|
+
for (const y of s)
|
|
484
|
+
if (y.isIntersecting) {
|
|
485
|
+
if ((u = (l = this.options).onIntersecting) == null || u.call(l, y.target), this.options.observerOnce && r.unobserve(e), this.options.loadOnce && this.hasImgLoaded)
|
|
443
486
|
return;
|
|
444
487
|
this.loadImage(e, t);
|
|
445
488
|
}
|
|
446
489
|
}
|
|
447
490
|
createObserver(e, t) {
|
|
448
|
-
const s = (
|
|
449
|
-
this.handleIntersectionObserver(e, t,
|
|
491
|
+
const s = (u, y) => {
|
|
492
|
+
this.handleIntersectionObserver(e, t, u, y);
|
|
450
493
|
}, r = this.options.observerOptions;
|
|
451
494
|
new IntersectionObserver(s, r).observe(e);
|
|
452
495
|
}
|
|
@@ -463,7 +506,7 @@ class Re {
|
|
|
463
506
|
async add(e, t) {
|
|
464
507
|
if (this.hasBgImgMode(t) && this.isPictureElement(e))
|
|
465
508
|
throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);
|
|
466
|
-
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e,
|
|
509
|
+
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e, Re), await this.bindUpdateHandler(e, t, "bind");
|
|
467
510
|
}
|
|
468
511
|
async update(e, t) {
|
|
469
512
|
t.value !== t.oldValue && (this.hasImgLoaded = !1, this.removeAllStateClasses(e), await this.bindUpdateHandler(e, t, "update"));
|
|
@@ -475,22 +518,22 @@ class Re {
|
|
|
475
518
|
this.observers = [];
|
|
476
519
|
}
|
|
477
520
|
}
|
|
478
|
-
let
|
|
479
|
-
const
|
|
521
|
+
let F;
|
|
522
|
+
const Ue = {
|
|
480
523
|
created(o, e) {
|
|
481
524
|
const t = typeof e.value == "object" ? e.value : {};
|
|
482
|
-
|
|
525
|
+
F = new De(t), F.add(o, e);
|
|
483
526
|
},
|
|
484
527
|
updated(o, e) {
|
|
485
|
-
|
|
528
|
+
F.update(o, e);
|
|
486
529
|
},
|
|
487
530
|
unmounted(o, e) {
|
|
488
|
-
|
|
531
|
+
F.remove(o, e);
|
|
489
532
|
}
|
|
490
|
-
},
|
|
533
|
+
}, We = { class: "m-gallery__wrapper maz-flex maz-flex-1" }, Ve = ["alt"], Ze = {
|
|
491
534
|
key: 0,
|
|
492
535
|
class: "m-gallery__remaining-layer maz-flex maz-bg-overlay maz-flex-center"
|
|
493
|
-
},
|
|
536
|
+
}, je = { class: "maz-text-2xl maz-text-white" }, qe = /* @__PURE__ */ re({
|
|
494
537
|
__name: "MazGallery",
|
|
495
538
|
props: {
|
|
496
539
|
/**
|
|
@@ -528,82 +571,82 @@ const Fe = {
|
|
|
528
571
|
separatorColor: { type: String, default: "transparent" }
|
|
529
572
|
},
|
|
530
573
|
setup(o) {
|
|
531
|
-
|
|
574
|
+
ke((h) => ({
|
|
532
575
|
"37b3f3e3": o.separatorColor
|
|
533
576
|
}));
|
|
534
|
-
const e = o, t =
|
|
535
|
-
|
|
577
|
+
const e = o, t = N(() => import("./no-photography-PGT8fxs_.mjs"));
|
|
578
|
+
Pe(() => {
|
|
536
579
|
e.imagesShownCount > 5 && console.warn('[MazUI](m-gallery) The maximum of "images-shown-count" is 5');
|
|
537
580
|
});
|
|
538
|
-
const s =
|
|
539
|
-
const
|
|
581
|
+
const s = C(() => {
|
|
582
|
+
const h = e.noWidth, m = e.width, c = e.noHeight, d = e.height;
|
|
540
583
|
return {
|
|
541
|
-
...
|
|
542
|
-
flex: `0 0 ${typeof
|
|
543
|
-
width: typeof
|
|
584
|
+
...h ? {} : {
|
|
585
|
+
flex: `0 0 ${typeof m}` == "number" ? `${m}px` : m,
|
|
586
|
+
width: typeof m == "number" ? `${m}px` : m
|
|
544
587
|
},
|
|
545
588
|
...c ? {} : {
|
|
546
|
-
height: typeof
|
|
547
|
-
minHeight: typeof
|
|
589
|
+
height: typeof d == "number" ? `${d}px` : `${d}`,
|
|
590
|
+
minHeight: typeof d == "number" ? `${d}px` : `${d}`
|
|
548
591
|
}
|
|
549
592
|
};
|
|
550
|
-
}), r =
|
|
551
|
-
(
|
|
552
|
-
)),
|
|
553
|
-
function
|
|
554
|
-
return e.noRemaining ? !1 : (l.value &&
|
|
593
|
+
}), 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(
|
|
594
|
+
(h) => typeof h == "object" ? { ...h, thumbnail: h.thumbnail ?? h.src } : { src: h, thumbnail: h, alt: void 0 }
|
|
595
|
+
)), y = C(() => u.value.slice(0, r.value)), x = C(() => u.value.slice(r.value, e.images.length));
|
|
596
|
+
function L(h) {
|
|
597
|
+
return e.noRemaining ? !1 : (l.value && h + 1) === y.value.length;
|
|
555
598
|
}
|
|
556
|
-
return (
|
|
599
|
+
return (h, m) => o.images.length > 0 || o.hasEmptyLayer ? (b(), A(
|
|
557
600
|
"div",
|
|
558
601
|
{
|
|
559
602
|
key: 0,
|
|
560
|
-
class:
|
|
561
|
-
style:
|
|
603
|
+
class: R(["m-gallery maz-flex", { "maz-rounded": !o.noRadius }]),
|
|
604
|
+
style: se([s.value])
|
|
562
605
|
},
|
|
563
606
|
[
|
|
564
|
-
P("section",
|
|
607
|
+
P("section", We, [
|
|
565
608
|
(b(!0), A(
|
|
566
|
-
|
|
609
|
+
ne,
|
|
567
610
|
null,
|
|
568
|
-
|
|
611
|
+
oe(y.value, (c, d) => (b(), A(
|
|
569
612
|
"figure",
|
|
570
613
|
{
|
|
571
|
-
key:
|
|
572
|
-
class:
|
|
614
|
+
key: d,
|
|
615
|
+
class: R(["m-gallery__item !maz-my-0 maz-flex maz-flex-center", [`m-gallery__item--${d + 1}`]])
|
|
573
616
|
},
|
|
574
617
|
[
|
|
575
|
-
|
|
618
|
+
T(P("img", {
|
|
576
619
|
class: "m-gallery__item__image maz-flex-1",
|
|
577
620
|
src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
|
578
621
|
alt: c.alt,
|
|
579
622
|
loading: "lazy"
|
|
580
|
-
}, null, 8,
|
|
581
|
-
[
|
|
582
|
-
[
|
|
623
|
+
}, null, 8, Ve), [
|
|
624
|
+
[w(Ue), { src: c.thumbnail, disabled: !o.lazy }, "bg-image"],
|
|
625
|
+
[w(Z), {
|
|
583
626
|
src: c.src,
|
|
584
627
|
alt: c.alt,
|
|
585
|
-
disabled: o.noZoom ||
|
|
628
|
+
disabled: o.noZoom || L(d),
|
|
586
629
|
blurOnHover: o.blur,
|
|
587
630
|
scaleOnHover: o.scale
|
|
588
631
|
}]
|
|
589
632
|
]),
|
|
590
|
-
|
|
633
|
+
L(d) ? T((b(), A("div", Ze, [
|
|
591
634
|
P(
|
|
592
635
|
"span",
|
|
593
|
-
|
|
594
|
-
"+" +
|
|
636
|
+
je,
|
|
637
|
+
"+" + Oe(l.value),
|
|
595
638
|
1
|
|
596
639
|
/* TEXT */
|
|
597
640
|
)
|
|
598
641
|
])), [
|
|
599
|
-
[
|
|
642
|
+
[w(Z), {
|
|
600
643
|
src: c.src,
|
|
601
644
|
alt: c.alt,
|
|
602
645
|
disabled: o.noZoom,
|
|
603
646
|
blurOnHover: !1,
|
|
604
647
|
scaleOnHover: o.scale
|
|
605
648
|
}]
|
|
606
|
-
]) :
|
|
649
|
+
]) : k("v-if", !0)
|
|
607
650
|
],
|
|
608
651
|
2
|
|
609
652
|
/* CLASS */
|
|
@@ -615,24 +658,24 @@ const Fe = {
|
|
|
615
658
|
"div",
|
|
616
659
|
{
|
|
617
660
|
key: 0,
|
|
618
|
-
class:
|
|
619
|
-
style:
|
|
661
|
+
class: R(["empty-layer maz-flex maz-w-full maz-bg-color-light maz-text-normal maz-flex-center", { "maz-rounded-xl": !o.noRadius }]),
|
|
662
|
+
style: se([s.value])
|
|
620
663
|
},
|
|
621
664
|
[
|
|
622
|
-
|
|
665
|
+
z(w(t), { class: "maz-h-8 maz-w-8" })
|
|
623
666
|
],
|
|
624
667
|
6
|
|
625
668
|
/* CLASS, STYLE */
|
|
626
|
-
)) :
|
|
669
|
+
)) : k("v-if", !0)
|
|
627
670
|
]),
|
|
628
671
|
(b(!0), A(
|
|
629
|
-
|
|
672
|
+
ne,
|
|
630
673
|
null,
|
|
631
|
-
|
|
632
|
-
key:
|
|
674
|
+
oe(x.value, (c, d) => T((b(), A("div", {
|
|
675
|
+
key: d,
|
|
633
676
|
class: "m-gallery__hidden"
|
|
634
677
|
})), [
|
|
635
|
-
[
|
|
678
|
+
[w(Z), { src: c.src, disabled: o.noZoom }]
|
|
636
679
|
])),
|
|
637
680
|
128
|
|
638
681
|
/* KEYED_FRAGMENT */
|
|
@@ -640,9 +683,9 @@ const Fe = {
|
|
|
640
683
|
],
|
|
641
684
|
6
|
|
642
685
|
/* CLASS, STYLE */
|
|
643
|
-
)) :
|
|
686
|
+
)) : k("v-if", !0);
|
|
644
687
|
}
|
|
645
|
-
}),
|
|
688
|
+
}), Xe = /* @__PURE__ */ ie(qe, [["__scopeId", "data-v-d7c3127b"]]);
|
|
646
689
|
export {
|
|
647
|
-
|
|
690
|
+
Xe as default
|
|
648
691
|
};
|