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.
Files changed (96) hide show
  1. package/components/MazCard.mjs +1 -1
  2. package/components/MazChart.d.ts +1 -1
  3. package/components/MazChecklist.mjs +1 -1
  4. package/components/MazGallery.mjs +1 -1
  5. package/components/MazInput.mjs +1 -1
  6. package/components/MazInputNumber.mjs +1 -1
  7. package/components/MazInputPrice.mjs +1 -1
  8. package/components/MazInputTags.mjs +1 -1
  9. package/components/MazPhoneNumberInput.mjs +1 -1
  10. package/components/MazPicker.mjs +1 -1
  11. package/components/MazSelect.mjs +1 -1
  12. package/components/MazTable.d.ts +29 -52
  13. package/components/MazTable.mjs +1 -1
  14. package/components/MazTabsBar.mjs +1 -1
  15. package/components/assets/MazDropdown.css +1 -1
  16. package/components/assets/MazGallery.css +1 -1
  17. package/components/assets/MazInput.css +1 -1
  18. package/components/assets/MazInputNumber.css +1 -1
  19. package/components/assets/MazInputPrice.css +1 -1
  20. package/components/assets/MazInputTags.css +1 -1
  21. package/components/assets/MazPhoneNumberInput.css +1 -1
  22. package/components/assets/MazPicker.css +1 -1
  23. package/components/assets/MazSelect.css +1 -1
  24. package/components/assets/MazTable.css +1 -1
  25. package/components/assets/MazTabsBar.css +1 -1
  26. package/components/chunks/{MazBadge-CNSfzYq-.mjs → MazBadge-CvIiiTdM.mjs} +1 -1
  27. package/components/chunks/{MazBtn-D6Jxw9Nr.mjs → MazBtn-BO3G90L3.mjs} +2 -2
  28. package/components/chunks/{MazBtn-BRnLMzhy.mjs → MazBtn-C87UEsVs.mjs} +2 -2
  29. package/components/chunks/{MazBtn-DlD5m7T4.mjs → MazBtn-C_l3xuAh.mjs} +2 -2
  30. package/components/chunks/{MazBtn-CnqRnXh_.mjs → MazBtn-DJOUeES7.mjs} +2 -2
  31. package/components/chunks/{MazBtn-TkePGm5o.mjs → MazBtn-DVkwISlp.mjs} +2 -2
  32. package/components/chunks/MazBtn-DadFupkY.mjs +118 -0
  33. package/components/chunks/{MazBtn-Dt8lr0GH.mjs → MazBtn-GGcGrIH4.mjs} +2 -2
  34. package/components/chunks/{MazCard-CfkvpcGL.mjs → MazCard-FSXmHyhj.mjs} +1 -1
  35. package/components/chunks/{MazCheckbox-BKCo6EzO.mjs → MazCheckbox-2G4VkxDz.mjs} +1 -1
  36. package/components/chunks/{MazCheckbox-Byqz8JJB.mjs → MazCheckbox-BmnqBHaY.mjs} +1 -1
  37. package/components/chunks/{MazCheckbox-CI8ml-P8.mjs → MazCheckbox-Cq9gpTEw.mjs} +1 -1
  38. package/components/chunks/{MazChecklist-BLxsNHMP.mjs → MazChecklist-CY1Cv70T.mjs} +1 -1
  39. package/components/chunks/{MazGallery-BMFwld84.mjs → MazGallery-BknvUeo1.mjs} +272 -229
  40. package/components/chunks/{MazGallery-BKL7gfrz.mjs → MazGallery-CZOokGAt.mjs} +248 -205
  41. package/components/chunks/{MazIcon-D8V8ixhf.mjs → MazIcon-z-jTiuyI.mjs} +1 -1
  42. package/components/chunks/{MazInput-CBiCdd0F.mjs → MazInput-BQoQSRyL.mjs} +2 -2
  43. package/components/chunks/{MazInput-Dx2cCzFS.mjs → MazInput-CJQB68c-.mjs} +22 -22
  44. package/components/chunks/{MazInput-O6Q41Fm0.mjs → MazInput-oOA7gdLO.mjs} +23 -23
  45. package/components/chunks/{MazInputNumber-DYPVUz4k.mjs → MazInputNumber-B4mQJcVB.mjs} +2 -2
  46. package/components/chunks/{MazInputPrice-DZD7ZZpm.mjs → MazInputPrice-BrxE5WVf.mjs} +2 -2
  47. package/components/chunks/{MazInputTags-CxXBsTdM.mjs → MazInputTags-BVCej_gW.mjs} +233 -232
  48. package/components/chunks/{MazLoadingBar-Di2OIrPD.mjs → MazLoadingBar-Dwf55oHy.mjs} +1 -1
  49. package/components/chunks/{MazPhoneNumberInput-C4TX1tGw.mjs → MazPhoneNumberInput-Cd25AzXc.mjs} +10 -10
  50. package/components/chunks/{MazPicker-BcQ_-AJH.mjs → MazPicker-C78yxilJ.mjs} +3 -3
  51. package/components/chunks/{MazPickerMonthSwitcher-hCAkEd5r.mjs → MazPickerMonthSwitcher-CyHYx8TT.mjs} +1 -1
  52. package/components/chunks/{MazPickerShortcuts-vpLyw1de.mjs → MazPickerShortcuts-Bsi8cnox.mjs} +1 -1
  53. package/components/chunks/{MazPickerYearSwitcher-DvC79vrt.mjs → MazPickerYearSwitcher-DLUSMAtz.mjs} +1 -1
  54. package/components/chunks/{MazSelect-BXzgSKmL.mjs → MazSelect-CQDoUpgp.mjs} +15 -14
  55. package/components/chunks/{MazSelect-Baj2BQH7.mjs → MazSelect-uCJPMXF-.mjs} +3 -3
  56. package/components/chunks/{MazSpinner-DwSGm0-X.mjs → MazSpinner-2D0ZmAQz.mjs} +1 -1
  57. package/components/chunks/MazSpinner-B9OwpEP_.mjs +34 -0
  58. package/components/chunks/{MazSpinner-C1SiKhfK.mjs → MazSpinner-BT_717pD.mjs} +1 -1
  59. package/components/chunks/{MazSpinner-Cg26sBU2.mjs → MazSpinner-C1Ip-Dwh.mjs} +1 -1
  60. package/components/chunks/MazSpinner-C23CZ_Za.mjs +34 -0
  61. package/components/chunks/{MazSpinner-B5lezvu4.mjs → MazSpinner-CViChjTw.mjs} +1 -1
  62. package/components/chunks/MazSpinner-CZMBhCOJ.mjs +34 -0
  63. package/components/chunks/{MazSpinner-DlMKBtyt.mjs → MazSpinner-D4C84xZe.mjs} +1 -1
  64. package/components/chunks/{MazSpinner-B8akphXs.mjs → MazSpinner-EFo8dM46.mjs} +1 -1
  65. package/components/chunks/MazSpinner-u8WQTgUR.mjs +34 -0
  66. package/components/chunks/{MazSpinner-M4r0cykl.mjs → MazSpinner-w-S5uCxg.mjs} +1 -1
  67. package/components/chunks/{MazTable-CulBGLaj.mjs → MazTable-Cuz5QI08.mjs} +4 -4
  68. package/components/chunks/{MazTableCell-BXDbkEJq.mjs → MazTableCell-D_OTOJiy.mjs} +1 -1
  69. package/components/chunks/{MazTableRow-Ds3CDEit.mjs → MazTableRow-BTcVAyOy.mjs} +1 -1
  70. package/components/chunks/{MazTableTitle-uirsgvk_.mjs → MazTableTitle-BDA9G6Zw.mjs} +1 -1
  71. package/components/chunks/{MazTabsBar-MZYefBb8.mjs → MazTabsBar-JkRzMDM6.mjs} +9 -10
  72. package/components/chunks/{MazTransitionExpand-4Ll_5LDO.mjs → MazTransitionExpand-C-FHhOGB.mjs} +1 -1
  73. package/css/main.css +1 -1
  74. package/modules/assets/index.css +1 -1
  75. package/modules/chunks/{MazBtn-CTqI4qhg.mjs → MazBtn-BSnVxud6.mjs} +2 -2
  76. package/modules/chunks/{MazBtn-D_CpNgpD.cjs → MazBtn-Bf9Cq5M7.cjs} +1 -1
  77. package/modules/chunks/{MazIcon-BB0DMfOc.mjs → MazIcon-DllGg8tw.mjs} +1 -1
  78. package/modules/chunks/{MazIcon-BtomZnkQ.cjs → MazIcon-dhyR9Q8a.cjs} +1 -1
  79. package/modules/chunks/{MazSpinner-BASKjaLe.cjs → MazSpinner-CiIyZ8gs.cjs} +1 -1
  80. package/modules/chunks/{MazSpinner-CDJhmIRl.mjs → MazSpinner-bdGjxsu6.mjs} +1 -1
  81. package/modules/chunks/index-BPqjUr5e.cjs +149 -0
  82. package/modules/chunks/{index-C2yAjM0P.mjs → index-x2F1l5sr.mjs} +944 -915
  83. package/modules/index.cjs +1 -1
  84. package/modules/index.mjs +1 -1
  85. package/nuxt/index.json +1 -1
  86. package/package.json +1 -1
  87. package/types/components/MazChart.vue.d.ts +1 -1
  88. package/types/components/MazTable.vue.d.ts +29 -52
  89. package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +5 -5
  90. package/types/modules/helpers/check-availability.d.ts +1 -0
  91. package/components/chunks/MazBtn-igor8wRn.mjs +0 -118
  92. package/components/chunks/MazSpinner-CvT-9sC7.mjs +0 -34
  93. package/components/chunks/MazSpinner-DH6C15pU.mjs +0 -34
  94. package/components/chunks/MazSpinner-cqcpf_FX.mjs +0 -34
  95. package/components/chunks/MazSpinner-yPkPj7Q8.mjs +0 -34
  96. package/modules/chunks/index-BIX1NMzX.cjs +0 -149
@@ -1,20 +1,33 @@
1
- import '../assets/MazGallery.css';var ye = Object.defineProperty;
2
- var be = (n, e, t) => e in n ? ye(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var f = (n, e, t) => be(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { createVNode as x, render as B, defineComponent as oe, defineAsyncComponent as _, ref as y, computed as E, watch as Ae, onMounted as Ie, onBeforeUnmount as Ee, openBlock as b, createElementBlock as A, withModifiers as P, withKeys as Le, withDirectives as R, unref as L, vShow as we, createCommentVNode as O, createElementVNode as k, normalizeClass as F, useCssVars as Ce, onBeforeMount as ze, normalizeStyle as ee, Fragment as te, renderList as se, toDisplayString as xe } from "vue";
5
- function Oe(n, e) {
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 && B(null, t);
8
+ t && M(null, t);
9
9
  }
10
- const r = { ...e == null ? void 0 : e.props, destroy: s }, l = x(
11
- n,
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 ? B(l, t) : typeof document < "u" && (t = document.createElement("div"), B(l, t))) : (t = t ?? document.body, B(l, t)), { vNode: l, destroy: s, el: 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
- const ke = ["onKeypress"], Pe = { class: "m-fullscreen-img-scroller" }, Se = ["src", "alt"], He = /* @__PURE__ */ oe({
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(n, { emit: e }) {
35
- const t = n, s = e, r = _(() => import("./MazSpinner-DlMKBtyt.mjs")), l = _(() => import("./x-mark-CnZwVvA7.mjs")), p = _(() => import("./chevron-left-BqVOLRdC.mjs")), g = y(!1), C = y(!1), w = y(!1), m = y(!1), d = y(!1), c = y(t.clickedElement), u = E(() => t.clickedElement.getBoundingClientRect()), re = E(
36
- () => u.value.height < u.value.width
37
- ), W = y(t.src), Z = y(t.alt), j = y(), z = y(), ie = E(() => d.value ? "--is-zoomed maz-cursor-zoom-out" : "maz-cursor-zoom-in");
38
- function le() {
39
- g.value = !0, C.value = !1, w.value = !0;
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
- Ae(
42
- () => w.value,
43
- (o) => {
44
- o && fe();
45
- }
60
+ we(
61
+ L,
62
+ async (n) => {
63
+ n && ge();
64
+ },
65
+ { immediate: !0 }
46
66
  );
47
- function S() {
48
- s("before-close"), ge();
67
+ function B() {
68
+ s("before-close"), pe();
49
69
  }
50
- function q(o) {
51
- o.key === "Escape" && (o.preventDefault(), S()), (o.key === "ArrowLeft" || o.key === "ArrowRight") && (o.preventDefault(), N(o.key === "ArrowRight" ? "next" : "previous"));
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 ce() {
73
+ function me() {
54
74
  document.documentElement.classList.add("--m-fullscreen-open");
55
75
  }
56
- function ue() {
76
+ function de() {
57
77
  document.documentElement.classList.remove("--m-fullscreen-open");
58
78
  }
59
- function V() {
79
+ function Y() {
60
80
  return [...document.querySelectorAll(".m-fullscreen-img-instance")];
61
81
  }
62
- function me(o, a) {
63
- return a < 0 ? o.length - 1 : a >= o.length ? 0 : a;
82
+ function he(n, a) {
83
+ return a < 0 ? n.length - 1 : a >= n.length ? 0 : a;
64
84
  }
65
- async function de(o, a) {
66
- o.classList.remove(t.openInstanceClass), a.classList.add(t.openInstanceClass);
67
- const i = a.getAttribute("data-src"), h = a.getAttribute("data-alt");
68
- Z.value = h, i && (W.value = i), g.value = !1, g.value || (C.value = !0);
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 N(o) {
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 = V(), h = i.indexOf(a), I = o === "next" ? h + 1 : h - 1, v = i[me(i, I)];
76
- c.value = v, v && de(a, v), s(o), d.value ? Y(z.value) : H();
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 Y(o) {
80
- re.value ? (o.style.width = `${window.innerWidth}px`, o.style.removeProperty("height")) : (o.style.height = `${window.innerHeight}px`, o.style.removeProperty("width")), o.style.removeProperty("top"), o.style.removeProperty("left");
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 he() {
83
- const o = z.value;
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 G(o) {
87
- var a;
88
- return (a = z.value) == null ? void 0 : a.animate(o, {
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 X(o = t.offset ?? 0) {
96
- const a = (c.value instanceof HTMLImageElement ? c.value.naturalWidth : c.value.clientWidth) || 1, i = (c.value instanceof HTMLImageElement ? c.value.naturalHeight : c.value.clientHeight) || 1, h = window.innerWidth, I = window.innerHeight, v = Math.min(
97
- (h - 2 * o) / a,
98
- (I - 2 * o) / i
99
- ), T = (h - a * v) / 2, D = (I - i * v) / 2;
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: T,
102
- centerY: D,
103
- originalWidth: a,
104
- originalHeight: i,
105
- scale: v
136
+ centerX: W,
137
+ centerY: V,
138
+ width: a,
139
+ height: i,
140
+ scale: E
106
141
  };
107
142
  }
108
- function K({ trigger: o }) {
109
- const { originalWidth: a, originalHeight: i, scale: h, centerX: I, centerY: v } = X(), { top: T, left: D, width: ve, height: pe } = u.value, J = [
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: `${T}px`,
112
- left: `${D}px`,
113
- width: `${ve}px`,
114
- height: `${pe}px`,
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: `${v}px`,
153
+ top: `${E}px`,
119
154
  left: `${I}px`,
120
- width: `${a * h}px`,
121
- height: `${i * h}px`,
155
+ width: `${a * f}px`,
156
+ height: `${i * f}px`,
122
157
  opacity: 1
123
158
  }
124
159
  ];
125
160
  return {
126
- frames: o === "open" ? J : J.reverse()
161
+ frames: n === "open" ? te : te.reverse()
127
162
  };
128
163
  }
129
- function H() {
130
- const { centerX: o, centerY: a, originalHeight: i, originalWidth: h, scale: I } = X(), v = {
131
- top: `${a}px`,
132
- left: `${o}px`,
133
- width: `${h * I}px`,
134
- height: `${i * I}px`
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 (!z.value)
137
- throw console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
138
- Object.assign(z.value.style, v);
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 fe() {
141
- const { frames: o } = K({
178
+ function ge() {
179
+ const { frames: n } = J({
142
180
  trigger: "open"
143
- }), a = G(o);
144
- if (!a)
145
- throw console.error("[maz-ui](vFullscreenImg) open animation is not defined");
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
- H();
187
+ O(), c.running = !1, c.ended = !0;
148
188
  };
149
189
  }
150
- function ge() {
151
- const { frames: o } = K({
190
+ function pe() {
191
+ const { frames: n } = J({
152
192
  trigger: "close"
153
- }), a = G(o);
154
- if (!a)
155
- throw console.error("[maz-ui](vFullscreenImg) close animation is not defined");
156
- a.onfinish = () => {
157
- var i, h;
158
- s("close"), (i = j.value) == null || i.remove(), (h = t.destroy) == null || h.call(t);
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 Q() {
162
- d.value || H();
204
+ function ee() {
205
+ m.value || O();
163
206
  }
164
- return Ie(() => {
165
- C.value = !0, document.addEventListener("keydown", q), window.addEventListener("resize", Q), ce(), m.value = V().length > 1;
166
- }), Ee(() => {
167
- document.removeEventListener("keydown", q), window.removeEventListener("resize", Q), ue();
168
- }), (o, a) => (b(), A("div", {
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: j,
213
+ ref: q,
171
214
  role: "button",
172
215
  class: "m-fullscreen-img",
173
216
  tabindex: "0",
174
- onClick: P(S, ["stop"]),
175
- onKeypress: Le(P(S, ["prevent"]), ["esc"])
217
+ onClick: S(B, ["stop"]),
218
+ onKeypress: xe(S(B, ["prevent"]), ["esc"])
176
219
  }, [
177
- R(x(
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] = P((i) => N("next"), ["stop"]))
224
+ onClick: a[0] || (a[0] = S((i) => U("next"), ["stop"]))
191
225
  }, [
192
- x(L(p), { class: "maz-rotate-180 maz-text-3xl" })
193
- ])) : O("v-if", !0),
194
- w.value && m.value ? (b(), A("button", {
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] = P((i) => N("previous"), ["stop"]))
232
+ onClick: a[1] || (a[1] = S((i) => U("previous"), ["stop"]))
199
233
  }, [
200
- x(L(p), { class: "maz-text-3xl" })
201
- ])) : O("v-if", !0),
202
- k("button", {
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: S
239
+ onClick: B
206
240
  }, [
207
- x(L(l), { class: "maz-text-3xl" })
241
+ z(w(l))
208
242
  ]),
209
- k("div", Pe, [
210
- O(" eslint-disable-next-line vuejs-accessibility/no-static-element-interactions, vuejs-accessibility/click-events-have-key-events "),
211
- k("img", {
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: z,
214
- src: W.value,
215
- alt: Z.value ?? void 0,
247
+ ref: v,
248
+ src: D.value,
249
+ alt: j.value ?? void 0,
216
250
  tabindex: "0",
217
- class: F([ie.value]),
218
- onLoad: le,
219
- onClick: a[2] || (a[2] = P((i) => o.zoom ? he() : void 0, ["stop"]))
220
- }, null, 42, Se)
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, ke));
265
+ ], 40, $e));
223
266
  }
224
- }), ae = (n, e) => {
225
- const t = n.__vccOpts || n;
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
- }, Be = /* @__PURE__ */ ae(He, [["__scopeId", "data-v-42226ee7"]]), ne = "m-fullscreen-is-open";
230
- class $e {
272
+ }, Fe = /* @__PURE__ */ ie(_e, [["__scopeId", "data-v-b6e5fc28"]]), ae = "m-fullscreen-is-open";
273
+ class Ne {
231
274
  constructor() {
232
- f(this, "options");
233
- f(this, "defaultOptions", {
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
- f(this, "mouseEnterListener");
245
- f(this, "mouseLeaveListener");
246
- f(this, "renderPreviewListener");
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(ne), Oe(Be, {
330
+ return e.classList.add(ae), Se(Fe, {
288
331
  props: {
289
332
  ...this.options,
290
- openInstanceClass: ne,
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 U = {
306
- mounted(n, e) {
307
- return $ = new $e(), $.create(n, e);
347
+ let _;
348
+ const Z = {
349
+ mounted(o, e) {
350
+ return _ = new Ne(), _.create(o, e);
308
351
  },
309
- updated(n, e) {
310
- return $.update(n, e);
352
+ updated(o, e) {
353
+ return _.update(o, e);
311
354
  },
312
- unmounted(n) {
313
- return $.remove(n);
355
+ unmounted(o) {
356
+ return _.remove(o);
314
357
  }
315
- }, Me = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", _e = {
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 Re {
372
+ class De {
330
373
  constructor(e = {}) {
331
- f(this, "observers", []);
332
- f(this, "defaultOptions", _e);
333
- f(this, "options");
334
- f(this, "onImgLoadedCallback");
335
- f(this, "onImgErrorCallback");
336
- f(this, "hasImgLoaded", !1);
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, p;
485
+ var l, u;
443
486
  this.observers.push(r);
444
- for (const g of s)
445
- if (g.isIntersecting) {
446
- if ((p = (l = this.options).onIntersecting) == null || p.call(l, g.target), this.options.observerOnce && r.unobserve(e), this.options.loadOnce && this.hasImgLoaded)
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 = (p, g) => {
453
- this.handleIntersectionObserver(e, t, p, g);
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, Me), await this.bindUpdateHandler(e, t, "bind");
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 M;
483
- const Fe = {
484
- created(n, e) {
525
+ let F;
526
+ const Ue = {
527
+ created(o, e) {
485
528
  const t = typeof e.value == "object" ? e.value : {};
486
- M = new Re(t), M.add(n, e);
529
+ F = new De(t), F.add(o, e);
487
530
  },
488
- updated(n, e) {
489
- M.update(n, e);
531
+ updated(o, e) {
532
+ F.update(o, e);
490
533
  },
491
- unmounted(n, e) {
492
- M.remove(n, e);
534
+ unmounted(o, e) {
535
+ F.remove(o, e);
493
536
  }
494
- }, Ne = { class: "m-gallery__wrapper maz-flex maz-flex-1" }, Te = ["alt"], De = {
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
- }, Ue = { class: "maz-text-2xl maz-text-white" }, We = /* @__PURE__ */ oe({
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(n) {
535
- Ce((m) => ({
536
- "37b3f3e3": n.separatorColor
577
+ setup(o) {
578
+ ke((h) => ({
579
+ "37b3f3e3": o.separatorColor
537
580
  }));
538
- const e = n, t = _(() => import("./no-photography-PGT8fxs_.mjs"));
539
- ze(() => {
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 = E(() => {
543
- const m = e.noWidth, d = e.width, c = e.noHeight, u = e.height;
585
+ const s = C(() => {
586
+ const h = e.noWidth, m = e.width, c = e.noHeight, d = e.height;
544
587
  return {
545
- ...m ? {} : {
546
- flex: `0 0 ${typeof d}` == "number" ? `${d}px` : d,
547
- width: typeof d == "number" ? `${d}px` : d
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 u == "number" ? `${u}px` : `${u}`,
551
- minHeight: typeof u == "number" ? `${u}px` : `${u}`
593
+ height: typeof d == "number" ? `${d}px` : `${d}`,
594
+ minHeight: typeof d == "number" ? `${d}px` : `${d}`
552
595
  }
553
596
  };
554
- }), r = E(() => e.imagesShownCount <= 5 ? e.imagesShownCount : 5), l = E(() => e.images.length - (e.images.length < r.value ? e.images.length : r.value)), p = E(() => e.images.map(
555
- (m) => typeof m == "object" ? { ...m, thumbnail: m.thumbnail ?? m.src } : { src: m, thumbnail: m, alt: void 0 }
556
- )), g = E(() => p.value.slice(0, r.value)), C = E(() => p.value.slice(r.value, e.images.length));
557
- function w(m) {
558
- return e.noRemaining ? !1 : (l.value && m + 1) === g.value.length;
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 (m, d) => n.images.length > 0 || n.hasEmptyLayer ? (b(), A(
603
+ return (h, m) => o.images.length > 0 || o.hasEmptyLayer ? (b(), A(
561
604
  "div",
562
605
  {
563
606
  key: 0,
564
- class: F(["m-gallery maz-flex", { "maz-rounded": !n.noRadius }]),
565
- style: ee([s.value])
607
+ class: R(["m-gallery maz-flex", { "maz-rounded": !o.noRadius }]),
608
+ style: se([s.value])
566
609
  },
567
610
  [
568
- k("section", Ne, [
611
+ P("section", We, [
569
612
  (b(!0), A(
570
- te,
613
+ ne,
571
614
  null,
572
- se(g.value, (c, u) => (b(), A(
615
+ oe(y.value, (c, d) => (b(), A(
573
616
  "figure",
574
617
  {
575
- key: u,
576
- class: F(["m-gallery__item !maz-my-0 maz-flex maz-flex-center", [`m-gallery__item--${u + 1}`]])
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
- R(k("img", {
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, Te), [
585
- [L(Fe), { src: c.thumbnail, disabled: !n.lazy }, "bg-image"],
586
- [L(U), {
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: n.noZoom || w(u),
590
- blurOnHover: n.blur,
591
- scaleOnHover: n.scale
632
+ disabled: o.noZoom || L(d),
633
+ blurOnHover: o.blur,
634
+ scaleOnHover: o.scale
592
635
  }]
593
636
  ]),
594
- w(u) ? R((b(), A("div", De, [
595
- k(
637
+ L(d) ? T((b(), A("div", Ze, [
638
+ P(
596
639
  "span",
597
- Ue,
598
- "+" + xe(l.value),
640
+ je,
641
+ "+" + Oe(l.value),
599
642
  1
600
643
  /* TEXT */
601
644
  )
602
645
  ])), [
603
- [L(U), {
646
+ [w(Z), {
604
647
  src: c.src,
605
648
  alt: c.alt,
606
- disabled: n.noZoom,
649
+ disabled: o.noZoom,
607
650
  blurOnHover: !1,
608
- scaleOnHover: n.scale
651
+ scaleOnHover: o.scale
609
652
  }]
610
- ]) : O("v-if", !0)
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
- n.hasEmptyLayer && n.images.length === 0 ? (b(), A(
661
+ o.hasEmptyLayer && o.images.length === 0 ? (b(), A(
619
662
  "div",
620
663
  {
621
664
  key: 0,
622
- class: F(["empty-layer maz-flex maz-w-full maz-bg-color-light maz-text-normal maz-flex-center", { "maz-rounded-xl": !n.noRadius }]),
623
- style: ee([s.value])
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
- x(L(t), { class: "maz-h-8 maz-w-8" })
669
+ z(w(t), { class: "maz-h-8 maz-w-8" })
627
670
  ],
628
671
  6
629
672
  /* CLASS, STYLE */
630
- )) : O("v-if", !0)
673
+ )) : k("v-if", !0)
631
674
  ]),
632
675
  (b(!0), A(
633
- te,
676
+ ne,
634
677
  null,
635
- se(C.value, (c, u) => R((b(), A("div", {
636
- key: u,
678
+ oe(x.value, (c, d) => T((b(), A("div", {
679
+ key: d,
637
680
  class: "m-gallery__hidden"
638
681
  })), [
639
- [L(U), { src: c.src, disabled: n.noZoom }]
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
- )) : O("v-if", !0);
690
+ )) : k("v-if", !0);
648
691
  }
649
- }), qe = /* @__PURE__ */ ae(We, [["__scopeId", "data-v-d7c3127b"]]);
692
+ }), Ke = /* @__PURE__ */ ie(qe, [["__scopeId", "data-v-d7c3127b"]]);
650
693
  export {
651
- qe as M,
652
- ae as _
694
+ Ke as M,
695
+ ie as _
653
696
  };