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,21 +1,34 @@
1
- import '../assets/MazGallery.css';var ye = Object.defineProperty;
2
- var be = (o, e, t) => e in o ? ye(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var f = (o, e, t) => be(o, 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 S, withKeys as Le, withDirectives as R, unref as L, vShow as we, createCommentVNode as O, createElementVNode as P, normalizeClass as F, useCssVars as Ce, onBeforeMount as ze, normalizeStyle as ee, Fragment as te, renderList as se, toDisplayString as xe } from "vue";
5
- import { _ as ae } from "./MazCard-CfkvpcGL.mjs";
6
- function Oe(o, 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
+ 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 && B(null, t);
9
+ t && M(null, t);
10
10
  }
11
- const r = { ...e == null ? void 0 : e.props, destroy: s }, l = x(
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 ? 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 };
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
- const Pe = ["onKeypress"], Se = { class: "m-fullscreen-img-scroller" }, ke = ["src", "alt"], He = /* @__PURE__ */ oe({
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 = _(() => import("./MazSpinner-DwSGm0-X.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(
37
- () => u.value.height < u.value.width
38
- ), 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");
39
- function le() {
40
- g.value = !0, C.value = !1, w.value = !0;
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
- Ae(
43
- () => w.value,
44
- (n) => {
45
- n && fe();
46
- }
61
+ we(
62
+ L,
63
+ async (n) => {
64
+ n && ge();
65
+ },
66
+ { immediate: !0 }
47
67
  );
48
- function k() {
49
- s("before-close"), ge();
68
+ function B() {
69
+ s("before-close"), pe();
50
70
  }
51
- function q(n) {
52
- n.key === "Escape" && (n.preventDefault(), k()), (n.key === "ArrowLeft" || n.key === "ArrowRight") && (n.preventDefault(), N(n.key === "ArrowRight" ? "next" : "previous"));
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 ce() {
74
+ function me() {
55
75
  document.documentElement.classList.add("--m-fullscreen-open");
56
76
  }
57
- function ue() {
77
+ function de() {
58
78
  document.documentElement.classList.remove("--m-fullscreen-open");
59
79
  }
60
- function V() {
80
+ function Y() {
61
81
  return [...document.querySelectorAll(".m-fullscreen-img-instance")];
62
82
  }
63
- function me(n, a) {
83
+ function he(n, a) {
64
84
  return a < 0 ? n.length - 1 : a >= n.length ? 0 : a;
65
85
  }
66
- async function de(n, a) {
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"), h = a.getAttribute("data-alt");
69
- Z.value = h, i && (W.value = i), g.value = !1, g.value || (C.value = !0);
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 N(n) {
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 = V(), h = i.indexOf(a), I = n === "next" ? h + 1 : h - 1, v = i[me(i, I)];
77
- c.value = v, v && de(a, v), s(n), d.value ? Y(z.value) : H();
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 Y(n) {
81
- re.value ? (n.style.width = `${window.innerWidth}px`, n.style.removeProperty("height")) : (n.style.height = `${window.innerHeight}px`, n.style.removeProperty("width")), n.style.removeProperty("top"), n.style.removeProperty("left");
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 he() {
84
- const n = z.value;
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 G(n) {
88
- var a;
89
- return (a = z.value) == null ? void 0 : a.animate(n, {
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 X(n = t.offset ?? 0) {
97
- 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(
98
- (h - 2 * n) / a,
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
- ), T = (h - a * v) / 2, D = (I - i * v) / 2;
135
+ ), W = (f - a * E) / 2, V = (I - i * E) / 2;
101
136
  return {
102
- centerX: T,
103
- centerY: D,
104
- originalWidth: a,
105
- originalHeight: i,
106
- scale: v
137
+ centerX: W,
138
+ centerY: V,
139
+ width: a,
140
+ height: i,
141
+ scale: E
107
142
  };
108
143
  }
109
- function K({ trigger: n }) {
110
- const { originalWidth: a, originalHeight: i, scale: h, centerX: I, centerY: v } = X(), { top: T, left: D, width: ve, height: pe } = u.value, J = [
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: `${T}px`,
113
- left: `${D}px`,
114
- width: `${ve}px`,
115
- height: `${pe}px`,
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: `${v}px`,
154
+ top: `${E}px`,
120
155
  left: `${I}px`,
121
- width: `${a * h}px`,
122
- height: `${i * h}px`,
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" ? J : J.reverse()
162
+ frames: n === "open" ? te : te.reverse()
128
163
  };
129
164
  }
130
- function H() {
131
- const { centerX: n, centerY: a, originalHeight: i, originalWidth: h, scale: I } = X(), v = {
132
- top: `${a}px`,
133
- left: `${n}px`,
134
- width: `${h * I}px`,
135
- height: `${i * I}px`
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 (!z.value)
138
- throw console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
139
- Object.assign(z.value.style, v);
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 fe() {
142
- const { frames: n } = K({
179
+ function ge() {
180
+ const { frames: n } = J({
143
181
  trigger: "open"
144
- }), a = G(n);
145
- if (!a)
146
- throw console.error("[maz-ui](vFullscreenImg) open animation is not defined");
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
- H();
188
+ O(), c.running = !1, c.ended = !0;
149
189
  };
150
190
  }
151
- function ge() {
152
- const { frames: n } = K({
191
+ function pe() {
192
+ const { frames: n } = J({
153
193
  trigger: "close"
154
- }), a = G(n);
155
- if (!a)
156
- throw console.error("[maz-ui](vFullscreenImg) close animation is not defined");
157
- a.onfinish = () => {
158
- var i, h;
159
- s("close"), (i = j.value) == null || i.remove(), (h = t.destroy) == null || h.call(t);
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 Q() {
163
- d.value || H();
205
+ function ee() {
206
+ m.value || O();
164
207
  }
165
- return Ie(() => {
166
- C.value = !0, document.addEventListener("keydown", q), window.addEventListener("resize", Q), ce(), m.value = V().length > 1;
167
- }), Ee(() => {
168
- document.removeEventListener("keydown", q), window.removeEventListener("resize", Q), ue();
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: j,
214
+ ref: q,
172
215
  role: "button",
173
216
  class: "m-fullscreen-img",
174
217
  tabindex: "0",
175
- onClick: S(k, ["stop"]),
176
- onKeypress: Le(S(k, ["prevent"]), ["esc"])
218
+ onClick: S(B, ["stop"]),
219
+ onKeypress: xe(S(B, ["prevent"]), ["esc"])
177
220
  }, [
178
- R(x(
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) => N("next"), ["stop"]))
225
+ onClick: a[0] || (a[0] = S((i) => U("next"), ["stop"]))
192
226
  }, [
193
- x(L(p), { class: "maz-rotate-180 maz-text-3xl" })
194
- ])) : O("v-if", !0),
195
- w.value && m.value ? (b(), A("button", {
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) => N("previous"), ["stop"]))
233
+ onClick: a[1] || (a[1] = S((i) => U("previous"), ["stop"]))
200
234
  }, [
201
- x(L(p), { class: "maz-text-3xl" })
202
- ])) : O("v-if", !0),
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: k
240
+ onClick: B
207
241
  }, [
208
- x(L(l), { class: "maz-text-3xl" })
242
+ z(w(l))
209
243
  ]),
210
- P("div", Se, [
211
- O(" eslint-disable-next-line vuejs-accessibility/no-static-element-interactions, vuejs-accessibility/click-events-have-key-events "),
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: z,
215
- src: W.value,
216
- alt: Z.value ?? void 0,
248
+ ref: v,
249
+ src: D.value,
250
+ alt: j.value ?? void 0,
217
251
  tabindex: "0",
218
- class: F([ie.value]),
219
- onLoad: le,
220
- onClick: a[2] || (a[2] = S((i) => n.zoom ? he() : void 0, ["stop"]))
221
- }, null, 42, ke)
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, Pe));
266
+ ], 40, $e));
224
267
  }
225
- }), Be = /* @__PURE__ */ ae(He, [["__scopeId", "data-v-42226ee7"]]), ne = "m-fullscreen-is-open";
226
- class $e {
268
+ }), Fe = /* @__PURE__ */ ie(_e, [["__scopeId", "data-v-b6e5fc28"]]), ae = "m-fullscreen-is-open";
269
+ class Ne {
227
270
  constructor() {
228
- f(this, "options");
229
- f(this, "defaultOptions", {
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
- f(this, "mouseEnterListener");
241
- f(this, "mouseLeaveListener");
242
- f(this, "renderPreviewListener");
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(ne), Oe(Be, {
326
+ return e.classList.add(ae), Se(Fe, {
284
327
  props: {
285
328
  ...this.options,
286
- openInstanceClass: ne,
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 U = {
343
+ let _;
344
+ const Z = {
302
345
  mounted(o, e) {
303
- return $ = new $e(), $.create(o, e);
346
+ return _ = new Ne(), _.create(o, e);
304
347
  },
305
348
  updated(o, e) {
306
- return $.update(o, e);
349
+ return _.update(o, e);
307
350
  },
308
351
  unmounted(o) {
309
- return $.remove(o);
352
+ return _.remove(o);
310
353
  }
311
- }, Me = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", _e = {
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 Re {
368
+ class De {
326
369
  constructor(e = {}) {
327
- f(this, "observers", []);
328
- f(this, "defaultOptions", _e);
329
- f(this, "options");
330
- f(this, "onImgLoadedCallback");
331
- f(this, "onImgErrorCallback");
332
- f(this, "hasImgLoaded", !1);
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, p;
481
+ var l, u;
439
482
  this.observers.push(r);
440
- for (const g of s)
441
- if (g.isIntersecting) {
442
- if ((p = (l = this.options).onIntersecting) == null || p.call(l, g.target), this.options.observerOnce && r.unobserve(e), this.options.loadOnce && this.hasImgLoaded)
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 = (p, g) => {
449
- this.handleIntersectionObserver(e, t, p, g);
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, Me), await this.bindUpdateHandler(e, t, "bind");
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 M;
479
- const Fe = {
521
+ let F;
522
+ const Ue = {
480
523
  created(o, e) {
481
524
  const t = typeof e.value == "object" ? e.value : {};
482
- M = new Re(t), M.add(o, e);
525
+ F = new De(t), F.add(o, e);
483
526
  },
484
527
  updated(o, e) {
485
- M.update(o, e);
528
+ F.update(o, e);
486
529
  },
487
530
  unmounted(o, e) {
488
- M.remove(o, e);
531
+ F.remove(o, e);
489
532
  }
490
- }, Ne = { class: "m-gallery__wrapper maz-flex maz-flex-1" }, Te = ["alt"], De = {
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
- }, Ue = { class: "maz-text-2xl maz-text-white" }, We = /* @__PURE__ */ oe({
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
- Ce((m) => ({
574
+ ke((h) => ({
532
575
  "37b3f3e3": o.separatorColor
533
576
  }));
534
- const e = o, t = _(() => import("./no-photography-PGT8fxs_.mjs"));
535
- ze(() => {
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 = E(() => {
539
- const m = e.noWidth, d = e.width, c = e.noHeight, u = e.height;
581
+ const s = C(() => {
582
+ const h = e.noWidth, m = e.width, c = e.noHeight, d = e.height;
540
583
  return {
541
- ...m ? {} : {
542
- flex: `0 0 ${typeof d}` == "number" ? `${d}px` : d,
543
- width: typeof d == "number" ? `${d}px` : d
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 u == "number" ? `${u}px` : `${u}`,
547
- minHeight: typeof u == "number" ? `${u}px` : `${u}`
589
+ height: typeof d == "number" ? `${d}px` : `${d}`,
590
+ minHeight: typeof d == "number" ? `${d}px` : `${d}`
548
591
  }
549
592
  };
550
- }), 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(
551
- (m) => typeof m == "object" ? { ...m, thumbnail: m.thumbnail ?? m.src } : { src: m, thumbnail: m, alt: void 0 }
552
- )), g = E(() => p.value.slice(0, r.value)), C = E(() => p.value.slice(r.value, e.images.length));
553
- function w(m) {
554
- return e.noRemaining ? !1 : (l.value && m + 1) === g.value.length;
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 (m, d) => o.images.length > 0 || o.hasEmptyLayer ? (b(), A(
599
+ return (h, m) => o.images.length > 0 || o.hasEmptyLayer ? (b(), A(
557
600
  "div",
558
601
  {
559
602
  key: 0,
560
- class: F(["m-gallery maz-flex", { "maz-rounded": !o.noRadius }]),
561
- style: ee([s.value])
603
+ class: R(["m-gallery maz-flex", { "maz-rounded": !o.noRadius }]),
604
+ style: se([s.value])
562
605
  },
563
606
  [
564
- P("section", Ne, [
607
+ P("section", We, [
565
608
  (b(!0), A(
566
- te,
609
+ ne,
567
610
  null,
568
- se(g.value, (c, u) => (b(), A(
611
+ oe(y.value, (c, d) => (b(), A(
569
612
  "figure",
570
613
  {
571
- key: u,
572
- class: F(["m-gallery__item !maz-my-0 maz-flex maz-flex-center", [`m-gallery__item--${u + 1}`]])
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
- R(P("img", {
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, Te), [
581
- [L(Fe), { src: c.thumbnail, disabled: !o.lazy }, "bg-image"],
582
- [L(U), {
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 || w(u),
628
+ disabled: o.noZoom || L(d),
586
629
  blurOnHover: o.blur,
587
630
  scaleOnHover: o.scale
588
631
  }]
589
632
  ]),
590
- w(u) ? R((b(), A("div", De, [
633
+ L(d) ? T((b(), A("div", Ze, [
591
634
  P(
592
635
  "span",
593
- Ue,
594
- "+" + xe(l.value),
636
+ je,
637
+ "+" + Oe(l.value),
595
638
  1
596
639
  /* TEXT */
597
640
  )
598
641
  ])), [
599
- [L(U), {
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
- ]) : O("v-if", !0)
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: F(["empty-layer maz-flex maz-w-full maz-bg-color-light maz-text-normal maz-flex-center", { "maz-rounded-xl": !o.noRadius }]),
619
- style: ee([s.value])
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
- x(L(t), { class: "maz-h-8 maz-w-8" })
665
+ z(w(t), { class: "maz-h-8 maz-w-8" })
623
666
  ],
624
667
  6
625
668
  /* CLASS, STYLE */
626
- )) : O("v-if", !0)
669
+ )) : k("v-if", !0)
627
670
  ]),
628
671
  (b(!0), A(
629
- te,
672
+ ne,
630
673
  null,
631
- se(C.value, (c, u) => R((b(), A("div", {
632
- key: u,
674
+ oe(x.value, (c, d) => T((b(), A("div", {
675
+ key: d,
633
676
  class: "m-gallery__hidden"
634
677
  })), [
635
- [L(U), { src: c.src, disabled: o.noZoom }]
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
- )) : O("v-if", !0);
686
+ )) : k("v-if", !0);
644
687
  }
645
- }), Ve = /* @__PURE__ */ ae(We, [["__scopeId", "data-v-d7c3127b"]]);
688
+ }), Xe = /* @__PURE__ */ ie(qe, [["__scopeId", "data-v-d7c3127b"]]);
646
689
  export {
647
- Ve as default
690
+ Xe as default
648
691
  };