@nmorph/nmorph-ui-kit 2.2.55 → 2.2.56
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/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +141 -119
- package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.css +1 -1
- package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.vue.js +280 -327
- package/dist/index.umd.js +17 -17
- package/dist/package.json.js +1 -1
- package/dist/src/components/data/nmorph-media-gallery/NmorphMediaGallery.vue.d.ts +3 -0
- package/dist/src/components/data/nmorph-media-gallery/types.d.ts +3 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,48 +1,47 @@
|
|
|
1
1
|
import './NmorphMediaGallery.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { createCssSizeVariables as
|
|
5
|
-
import
|
|
2
|
+
import { defineComponent as Xe, ref as k, computed as s, watch as z, onBeforeUnmount as Ye, openBlock as i, createElementBlock as u, Fragment as ve, normalizeStyle as me, normalizeClass as fe, renderList as Ge, createElementVNode as b, createBlock as A, unref as n, createVNode as r, withCtx as c, createCommentVNode as v, toDisplayString as M, withModifiers as P } from "vue";
|
|
3
|
+
import { useModifiers as ge } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { createCssSizeVariables as Ue } from "../../../utils/common.js";
|
|
5
|
+
import Ze from "../nmorph-preview-portal/NmorphPreviewPortal.vue.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import
|
|
7
|
+
import pe from "../nmorph-image/NmorphImage.vue.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import
|
|
9
|
+
import f from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
10
10
|
/* empty css */
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
11
|
+
import We from "../../../assets/icons/eye.svg.js";
|
|
12
|
+
import he from "../../../assets/icons/full-screen.svg.js";
|
|
13
|
+
import H from "../../basic/nmorph-button/NmorphButton.vue.js";
|
|
14
14
|
/* empty css */
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
|
|
24
|
-
const sa = ["aria-label", "onClick"], ua = ["src", "poster", "title"], da = {
|
|
15
|
+
import je from "../../../assets/icons/play.svg.js";
|
|
16
|
+
import _e from "../../../assets/icons/download.svg.js";
|
|
17
|
+
import Je from "../../../assets/icons/rotate-right.svg.js";
|
|
18
|
+
import Qe from "../../../assets/icons/rotate-left.svg.js";
|
|
19
|
+
import eo from "../../../assets/icons/zoom-in.svg.js";
|
|
20
|
+
import oo from "../../../assets/icons/zoom-out.svg.js";
|
|
21
|
+
import to from "../../../assets/icons/enlarge.svg.js";
|
|
22
|
+
import ao from "../../../assets/icons/shrink.svg.js";
|
|
23
|
+
const lo = ["aria-label", "onClick"], no = ["src", "poster", "title"], ro = {
|
|
25
24
|
key: 2,
|
|
26
25
|
class: "nmorph-media-gallery__trigger-play"
|
|
27
|
-
},
|
|
26
|
+
}, io = {
|
|
28
27
|
key: 3,
|
|
29
28
|
class: "nmorph-media-gallery__trigger-name"
|
|
30
|
-
},
|
|
29
|
+
}, so = {
|
|
31
30
|
key: 4,
|
|
32
31
|
class: "nmorph-media-gallery__trigger-size"
|
|
33
|
-
},
|
|
32
|
+
}, uo = {
|
|
34
33
|
key: 0,
|
|
35
34
|
class: "nmorph-media-gallery__trigger-actions"
|
|
36
|
-
},
|
|
37
|
-
key:
|
|
35
|
+
}, co = ["aria-label", "onClick"], vo = ["aria-label", "onClick"], mo = ["href", "download", "aria-label", "onClick"], fo = { class: "nmorph-media-gallery__stage" }, go = ["src", "poster", "controls", "muted", "playsinline", "preload", "title"], po = {
|
|
36
|
+
key: 2,
|
|
38
37
|
class: "nmorph-media-gallery__file-name"
|
|
39
|
-
},
|
|
40
|
-
key:
|
|
38
|
+
}, ho = {
|
|
39
|
+
key: 3,
|
|
41
40
|
class: "nmorph-media-gallery__file-actions"
|
|
42
|
-
},
|
|
43
|
-
key:
|
|
41
|
+
}, _o = ["aria-label"], yo = ["href", "download", "aria-label"], wo = {
|
|
42
|
+
key: 4,
|
|
44
43
|
class: "nmorph-media-gallery__file-size"
|
|
45
|
-
},
|
|
44
|
+
}, ko = { class: "nmorph-media-gallery__action-element" }, Io = { class: "nmorph-media-gallery__action-element" }, bo = { class: "nmorph-media-gallery__action-element" }, Fo = { class: "nmorph-media-gallery__action-element" }, No = { class: "nmorph-media-gallery__action-element" }, Bo = 45, Uo = /* @__PURE__ */ Xe({
|
|
46
45
|
__name: "NmorphMediaGallery",
|
|
47
46
|
props: {
|
|
48
47
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -55,6 +54,9 @@ const sa = ["aria-label", "onClick"], ua = ["src", "poster", "title"], da = {
|
|
|
55
54
|
showTriggerName: { type: Boolean, default: !0 },
|
|
56
55
|
showTriggerSize: { type: Boolean, default: !0 },
|
|
57
56
|
showTriggerActions: { type: Boolean, default: !0 },
|
|
57
|
+
showTriggerPreviewAction: { type: Boolean, default: !0 },
|
|
58
|
+
showTriggerFullscreenAction: { type: Boolean, default: !0 },
|
|
59
|
+
showTriggerDownloadAction: { type: Boolean, default: !0 },
|
|
58
60
|
showTriggerPlayButton: { type: Boolean, default: !0 },
|
|
59
61
|
showNavigationButtons: { type: Boolean, default: !0 },
|
|
60
62
|
showActionBar: { type: Boolean, default: !0 },
|
|
@@ -66,120 +68,106 @@ const sa = ["aria-label", "onClick"], ua = ["src", "poster", "title"], da = {
|
|
|
66
68
|
videoFit: { default: "contain" }
|
|
67
69
|
},
|
|
68
70
|
emits: ["update:model-value", "update:active-index", "close", "change", "download", "fullscreen"],
|
|
69
|
-
setup(
|
|
70
|
-
const
|
|
71
|
-
const t =
|
|
71
|
+
setup(ye, { emit: we }) {
|
|
72
|
+
const l = ye, g = we, _ = k(l.modelValue), F = k(0), N = k(null), K = k({}), C = k(null), p = k(!1), y = k(1), h = k(0), B = k(null), m = s(() => l.items || []), q = s(() => m.value.length > 1), O = s(() => l.showNavigationButtons && q.value), x = (e) => {
|
|
73
|
+
const t = m.value.length - 1;
|
|
72
74
|
return t < 0 || !Number.isFinite(e) || e < 0 ? 0 : e > t ? t : e;
|
|
73
|
-
},
|
|
74
|
-
() =>
|
|
75
|
-
),
|
|
76
|
-
() =>
|
|
77
|
-
),
|
|
78
|
-
() =>
|
|
75
|
+
}, w = s(() => x(F.value)), a = s(() => m.value[w.value]), X = s(() => a.value?.kind === "image"), V = s(() => a.value?.kind === "video"), Y = s(
|
|
76
|
+
() => a.value?.kind === "video" ? a.value.controls !== !1 : !1
|
|
77
|
+
), ke = s(() => a.value?.kind === "video" ? a.value.muted === !0 : !1), Ie = s(
|
|
78
|
+
() => a.value?.kind === "video" ? a.value.playsinline !== !1 : !0
|
|
79
|
+
), be = s(
|
|
80
|
+
() => a.value?.kind === "video" && a.value.preload || "metadata"
|
|
81
|
+
), Fe = s(
|
|
82
|
+
() => a.value?.kind === "video" && a.value.name || "video"
|
|
83
|
+
), D = s(() => a.value?.name || ""), G = s(() => l.showFileName ? D.value : ""), L = s(() => a.value?.downloadHref || ""), U = s(() => l.showFileActions && V.value && !Y.value), Ne = s(
|
|
84
|
+
() => l.showFileActions && (U.value || !!L.value)
|
|
79
85
|
), Be = s(
|
|
80
|
-
() =>
|
|
81
|
-
), R = s(
|
|
82
|
-
() => o.value?.kind === "video" && o.value.name || "video"
|
|
83
|
-
), A = s(() => o.value?.name || ""), J = s(() => n.showFileName ? A.value : ""), K = s(() => o.value?.downloadHref || ""), Fe = s(() => n.showPlaybackButton && z.value && b.value), Q = s(() => n.showFileActions && z.value && !W.value), Ce = s(
|
|
84
|
-
() => n.showFileActions && (Q.value || !!K.value)
|
|
85
|
-
), Pe = s(
|
|
86
|
-
() => he({
|
|
86
|
+
() => ge({
|
|
87
87
|
"nmorph-media-gallery": [
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
_.value && "opened",
|
|
89
|
+
X.value && "image",
|
|
90
|
+
V.value && "video",
|
|
91
|
+
p.value && V.value && "video-playing",
|
|
92
|
+
l.imageFit === "cover" && X.value && "image-cover",
|
|
93
|
+
l.videoFit === "cover" && V.value && "video-cover"
|
|
94
94
|
]
|
|
95
95
|
})
|
|
96
|
-
),
|
|
97
|
-
() =>
|
|
98
|
-
"--nmorph-media-gallery-trigger-height":
|
|
96
|
+
), xe = s(() => `rotate(${h.value}deg) scale(${y.value})`), Ce = s(
|
|
97
|
+
() => Ue({
|
|
98
|
+
"--nmorph-media-gallery-trigger-height": l.height
|
|
99
99
|
})
|
|
100
|
-
),
|
|
101
|
-
() =>
|
|
102
|
-
"nmorph-media-gallery__trigger": [
|
|
100
|
+
), Te = s(
|
|
101
|
+
() => ge({
|
|
102
|
+
"nmorph-media-gallery__trigger": [l.height !== void 0 && "fixed-height"]
|
|
103
103
|
})
|
|
104
|
-
),
|
|
104
|
+
), Z = (e) => {
|
|
105
105
|
if (e === void 0 || Number.isNaN(e) || e < 0) return "";
|
|
106
106
|
if (e === 0) return "0 B";
|
|
107
|
-
const t = ["B", "KB", "MB", "GB", "TB"],
|
|
108
|
-
return `${
|
|
109
|
-
},
|
|
110
|
-
|
|
107
|
+
const t = ["B", "KB", "MB", "GB", "TB"], o = Math.min(Math.floor(Math.log(e) / Math.log(1024)), t.length - 1), d = e / 1024 ** o, I = d >= 10 || o === 0 || Number.isInteger(d) ? 0 : 1;
|
|
108
|
+
return `${d.toFixed(I)} ${t[o]}`;
|
|
109
|
+
}, W = s(() => l.showFileSize ? Z(a.value?.size) : ""), T = (e) => e.name || "", $ = (e, t) => e.name || `${e.kind === "video" ? "Video" : "Image"} ${t + 1}`, j = (e) => Z(e.size), J = (e) => e.downloadHref || "", Q = (e) => l.showTriggerPreviewAction && e.kind === "video", ee = (e) => l.showTriggerFullscreenAction && e.kind === "video", oe = (e) => l.showTriggerDownloadAction && !!J(e), $e = (e) => l.showTriggerActions && (Q(e) || ee(e) || oe(e)), ze = (e, t) => {
|
|
110
|
+
K.value[e] = t instanceof HTMLVideoElement ? t : null;
|
|
111
111
|
};
|
|
112
|
-
|
|
113
|
-
() =>
|
|
112
|
+
z(
|
|
113
|
+
() => l.modelValue,
|
|
114
114
|
(e) => {
|
|
115
|
-
|
|
115
|
+
_.value = e;
|
|
116
116
|
}
|
|
117
|
-
),
|
|
118
|
-
() =>
|
|
117
|
+
), z(
|
|
118
|
+
() => l.activeIndex,
|
|
119
119
|
(e) => {
|
|
120
|
-
typeof e == "number" && (F.value =
|
|
120
|
+
typeof e == "number" && (F.value = x(e));
|
|
121
121
|
},
|
|
122
122
|
{ immediate: !0 }
|
|
123
|
-
),
|
|
124
|
-
() => [
|
|
123
|
+
), z(
|
|
124
|
+
() => [l.initialIndex, m.value.length],
|
|
125
125
|
() => {
|
|
126
|
-
typeof
|
|
126
|
+
typeof l.activeIndex != "number" && (F.value = x(l.initialIndex));
|
|
127
127
|
},
|
|
128
128
|
{ immediate: !0 }
|
|
129
|
-
),
|
|
130
|
-
() => [
|
|
129
|
+
), z(
|
|
130
|
+
() => [a.value?.kind, a.value?.src, w.value],
|
|
131
131
|
() => {
|
|
132
|
-
|
|
132
|
+
p.value = !1, C.value = null;
|
|
133
133
|
}
|
|
134
134
|
);
|
|
135
|
-
const
|
|
136
|
-
!
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
},
|
|
140
|
-
if (!
|
|
141
|
-
const t =
|
|
142
|
-
if (t ===
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
const e =
|
|
148
|
-
e &&
|
|
149
|
-
},
|
|
150
|
-
const e =
|
|
151
|
-
e &&
|
|
152
|
-
},
|
|
153
|
-
if (!
|
|
154
|
-
const t =
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
},
|
|
159
|
-
|
|
135
|
+
const S = () => {
|
|
136
|
+
!N.value || N.value === C.value || (N.value.pause(), p.value = !1, C.value = N.value);
|
|
137
|
+
}, te = () => {
|
|
138
|
+
y.value = 1, h.value = 0;
|
|
139
|
+
}, ae = (e) => {
|
|
140
|
+
if (!m.value.length) return;
|
|
141
|
+
const t = x(e);
|
|
142
|
+
if (t === w.value) return;
|
|
143
|
+
S(), p.value = !1, F.value = t, te(), g("update:active-index", t);
|
|
144
|
+
const o = m.value[t];
|
|
145
|
+
o && g("change", o, t);
|
|
146
|
+
}, E = () => {
|
|
147
|
+
const e = m.value.length;
|
|
148
|
+
e && ae(w.value === 0 ? e - 1 : w.value - 1);
|
|
149
|
+
}, R = () => {
|
|
150
|
+
const e = m.value.length;
|
|
151
|
+
e && ae(w.value === e - 1 ? 0 : w.value + 1);
|
|
152
|
+
}, le = (e) => {
|
|
153
|
+
if (!m.value.length) return;
|
|
154
|
+
const t = x(e);
|
|
155
|
+
S(), p.value = !1, F.value = t, te(), _.value = !0, g("update:model-value", !0), g("update:active-index", t);
|
|
156
|
+
const o = m.value[t];
|
|
157
|
+
o && g("change", o, t);
|
|
158
|
+
}, ne = () => {
|
|
159
|
+
_.value && (S(), _.value = !1, g("update:model-value", !1), g("close"));
|
|
160
|
+
}, Ae = () => {
|
|
161
|
+
h.value = h.value + 90, h.value >= 360 && (h.value = 0);
|
|
162
|
+
}, Pe = () => {
|
|
163
|
+
h.value = h.value - 90, h.value <= -360 && (h.value = 0);
|
|
164
|
+
}, He = () => {
|
|
165
|
+
y.value = parseFloat(Math.min(y.value + 0.2, 4).toFixed(3));
|
|
166
|
+
}, Ve = () => {
|
|
167
|
+
y.value = parseFloat(Math.max(y.value - 0.2, 0.2).toFixed(3));
|
|
160
168
|
}, Se = () => {
|
|
161
|
-
y.value =
|
|
162
|
-
},
|
|
163
|
-
y.value = y.value - 90, y.value <= -360 && (y.value = 0);
|
|
164
|
-
}, Ee = () => {
|
|
165
|
-
I.value = parseFloat(Math.min(I.value + 0.2, 4).toFixed(3));
|
|
166
|
-
}, Me = () => {
|
|
167
|
-
I.value = parseFloat(Math.max(I.value - 0.2, 0.2).toFixed(3));
|
|
168
|
-
}, Te = () => {
|
|
169
|
-
I.value = 1;
|
|
170
|
-
}, De = async () => {
|
|
171
|
-
if (!(!h.value || !b.value)) {
|
|
172
|
-
if (m.value) {
|
|
173
|
-
h.value.pause();
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
try {
|
|
177
|
-
await h.value.play();
|
|
178
|
-
} catch {
|
|
179
|
-
m.value = !1;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}, ie = async (e) => {
|
|
169
|
+
y.value = 1;
|
|
170
|
+
}, re = async (e) => {
|
|
183
171
|
if (e)
|
|
184
172
|
try {
|
|
185
173
|
const t = e.requestFullscreen?.() || e.webkitRequestFullscreen?.();
|
|
@@ -190,194 +178,181 @@ const sa = ["aria-label", "onClick"], ua = ["src", "poster", "title"], da = {
|
|
|
190
178
|
e.webkitEnterFullscreen?.();
|
|
191
179
|
} catch {
|
|
192
180
|
}
|
|
193
|
-
},
|
|
194
|
-
!
|
|
195
|
-
},
|
|
196
|
-
e.kind === "video" && (
|
|
197
|
-
},
|
|
198
|
-
|
|
181
|
+
}, Me = async () => {
|
|
182
|
+
!a.value || a.value.kind !== "video" || (g("fullscreen", a.value, w.value), await re(N.value));
|
|
183
|
+
}, De = async (e, t) => {
|
|
184
|
+
e.kind === "video" && (g("fullscreen", e, t), await re(K.value[t]));
|
|
185
|
+
}, ie = (e, t) => {
|
|
186
|
+
g("download", e, t);
|
|
187
|
+
}, Le = () => {
|
|
188
|
+
a.value && ie(a.value, w.value);
|
|
189
|
+
}, Ee = () => {
|
|
190
|
+
p.value = !0, C.value = null;
|
|
191
|
+
}, Re = () => {
|
|
192
|
+
p.value = !1;
|
|
199
193
|
}, Ke = () => {
|
|
200
|
-
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
if (!Number.isFinite(t) || t <= 0) return !1;
|
|
206
|
-
const a = e.buffered, c = Math.max(0, t - we);
|
|
207
|
-
for (let f = 0; f < a.length; f += 1)
|
|
208
|
-
try {
|
|
209
|
-
if (a.start(f) <= we && a.end(f) >= c) return !0;
|
|
210
|
-
} catch {
|
|
211
|
-
return !1;
|
|
212
|
-
}
|
|
213
|
-
return !1;
|
|
214
|
-
}, L = () => {
|
|
215
|
-
b.value = h.value ? qe(h.value) : !1;
|
|
216
|
-
}, Ue = () => {
|
|
217
|
-
m.value = !1;
|
|
218
|
-
}, Xe = () => {
|
|
219
|
-
m.value = !1;
|
|
220
|
-
}, Ye = () => {
|
|
221
|
-
m.value = !1, b.value = !1;
|
|
222
|
-
}, ue = (e) => {
|
|
223
|
-
if (w.value && !(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) {
|
|
194
|
+
p.value = !1;
|
|
195
|
+
}, qe = () => {
|
|
196
|
+
p.value = !1;
|
|
197
|
+
}, se = (e) => {
|
|
198
|
+
if (_.value && !(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) {
|
|
224
199
|
if (e.key === "Escape") {
|
|
225
|
-
e.preventDefault(),
|
|
200
|
+
e.preventDefault(), ne();
|
|
226
201
|
return;
|
|
227
202
|
}
|
|
228
|
-
|
|
203
|
+
q.value && (e.key === "ArrowLeft" && (e.preventDefault(), E()), e.key === "ArrowRight" && (e.preventDefault(), R()));
|
|
229
204
|
}
|
|
230
|
-
},
|
|
231
|
-
typeof document > "u" || document.addEventListener("keydown",
|
|
232
|
-
},
|
|
233
|
-
typeof document > "u" || document.removeEventListener("keydown",
|
|
205
|
+
}, Oe = () => {
|
|
206
|
+
typeof document > "u" || document.addEventListener("keydown", se);
|
|
207
|
+
}, ue = () => {
|
|
208
|
+
typeof document > "u" || document.removeEventListener("keydown", se);
|
|
234
209
|
};
|
|
235
|
-
|
|
236
|
-
|
|
210
|
+
z(
|
|
211
|
+
_,
|
|
237
212
|
(e) => {
|
|
238
|
-
e ? (
|
|
239
|
-
typeof
|
|
240
|
-
)) : (
|
|
213
|
+
e ? (Oe(), C.value = null, F.value = x(
|
|
214
|
+
typeof l.activeIndex == "number" ? l.activeIndex : l.initialIndex
|
|
215
|
+
)) : (S(), p.value = !1, ue());
|
|
241
216
|
},
|
|
242
217
|
{ immediate: !0 }
|
|
243
|
-
),
|
|
218
|
+
), Ye(ue);
|
|
244
219
|
const ce = (e) => {
|
|
245
|
-
|
|
246
|
-
},
|
|
247
|
-
if (!
|
|
248
|
-
|
|
220
|
+
B.value = { x: e.clientX, y: e.clientY };
|
|
221
|
+
}, de = (e) => {
|
|
222
|
+
if (!B.value || !O.value) {
|
|
223
|
+
B.value = null;
|
|
249
224
|
return;
|
|
250
225
|
}
|
|
251
|
-
const t = e.clientX -
|
|
252
|
-
|
|
226
|
+
const t = e.clientX - B.value.x, o = e.clientY - B.value.y;
|
|
227
|
+
B.value = null, !(Math.abs(t) < Bo || Math.abs(t) < Math.abs(o) * 1.2) && (t > 0 ? E() : R());
|
|
253
228
|
};
|
|
254
|
-
return (e, t) => (i(), u(
|
|
255
|
-
|
|
229
|
+
return (e, t) => (i(), u(ve, null, [
|
|
230
|
+
l.showTrigger ? (i(), u("div", {
|
|
256
231
|
key: 0,
|
|
257
|
-
class:
|
|
258
|
-
style:
|
|
232
|
+
class: fe(Te.value),
|
|
233
|
+
style: me(Ce.value)
|
|
259
234
|
}, [
|
|
260
|
-
(i(!0), u(
|
|
261
|
-
key: `${
|
|
262
|
-
class:
|
|
235
|
+
(i(!0), u(ve, null, Ge(m.value, (o, d) => (i(), u("div", {
|
|
236
|
+
key: `${o.kind}-${o.src}-${d}`,
|
|
237
|
+
class: fe(["nmorph-media-gallery__trigger-item", `nmorph-media-gallery__trigger-item--${o.kind}`])
|
|
263
238
|
}, [
|
|
264
|
-
|
|
239
|
+
b("button", {
|
|
265
240
|
type: "button",
|
|
266
241
|
class: "nmorph-media-gallery__trigger-open",
|
|
267
|
-
"aria-label": `Open ${
|
|
268
|
-
onClick: (
|
|
242
|
+
"aria-label": `Open ${$(o, d)}`,
|
|
243
|
+
onClick: (I) => le(d)
|
|
269
244
|
}, [
|
|
270
|
-
|
|
245
|
+
o.kind === "image" ? (i(), A(n(pe), {
|
|
271
246
|
key: 0,
|
|
272
|
-
src:
|
|
273
|
-
alt:
|
|
274
|
-
title:
|
|
247
|
+
src: o.src,
|
|
248
|
+
alt: o.alt || $(o, d),
|
|
249
|
+
title: T(o),
|
|
275
250
|
fit: "cover",
|
|
276
251
|
"frame-border": 0
|
|
277
252
|
}, null, 8, ["src", "alt", "title"])) : (i(), u("video", {
|
|
278
253
|
key: 1,
|
|
279
254
|
ref_for: !0,
|
|
280
|
-
ref: (
|
|
255
|
+
ref: (I) => ze(d, I),
|
|
281
256
|
class: "nmorph-media-gallery__trigger-video",
|
|
282
|
-
src:
|
|
283
|
-
poster:
|
|
257
|
+
src: o.src,
|
|
258
|
+
poster: o.poster || void 0,
|
|
284
259
|
muted: "",
|
|
285
260
|
playsinline: "",
|
|
286
261
|
preload: "metadata",
|
|
287
|
-
title:
|
|
288
|
-
}, null, 8,
|
|
289
|
-
|
|
290
|
-
r(
|
|
262
|
+
title: T(o)
|
|
263
|
+
}, null, 8, no)),
|
|
264
|
+
l.showTriggerPlayButton && o.kind === "video" ? (i(), u("span", ro, [
|
|
265
|
+
r(n(f), {
|
|
291
266
|
size: "medium",
|
|
292
267
|
color: "var(--nmorph-contrast-text-color)"
|
|
293
268
|
}, {
|
|
294
|
-
default:
|
|
295
|
-
r(
|
|
269
|
+
default: c(() => [
|
|
270
|
+
r(n(je))
|
|
296
271
|
]),
|
|
297
272
|
_: 1
|
|
298
273
|
})
|
|
299
274
|
])) : v("", !0),
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
], 8,
|
|
303
|
-
|
|
304
|
-
|
|
275
|
+
l.showTriggerName && T(o) ? (i(), u("span", io, M(T(o)), 1)) : v("", !0),
|
|
276
|
+
l.showTriggerSize && j(o) ? (i(), u("span", so, M(j(o)), 1)) : v("", !0)
|
|
277
|
+
], 8, lo),
|
|
278
|
+
$e(o) ? (i(), u("div", uo, [
|
|
279
|
+
Q(o) ? (i(), u("button", {
|
|
305
280
|
key: 0,
|
|
306
281
|
type: "button",
|
|
307
282
|
class: "nmorph-media-gallery__trigger-action",
|
|
308
|
-
"aria-label": `Preview ${
|
|
309
|
-
onClick:
|
|
283
|
+
"aria-label": `Preview ${$(o, d)}`,
|
|
284
|
+
onClick: P((I) => le(d), ["stop"])
|
|
310
285
|
}, [
|
|
311
|
-
r(
|
|
286
|
+
r(n(f), {
|
|
312
287
|
size: "small",
|
|
313
288
|
color: "var(--nmorph-contrast-text-color)"
|
|
314
289
|
}, {
|
|
315
|
-
default:
|
|
316
|
-
r(
|
|
290
|
+
default: c(() => [
|
|
291
|
+
r(n(We))
|
|
317
292
|
]),
|
|
318
293
|
_: 1
|
|
319
294
|
})
|
|
320
|
-
], 8,
|
|
321
|
-
|
|
295
|
+
], 8, co)) : v("", !0),
|
|
296
|
+
ee(o) ? (i(), u("button", {
|
|
322
297
|
key: 1,
|
|
323
298
|
type: "button",
|
|
324
299
|
class: "nmorph-media-gallery__trigger-action",
|
|
325
|
-
"aria-label": `Fullscreen ${
|
|
326
|
-
onClick:
|
|
300
|
+
"aria-label": `Fullscreen ${$(o, d)}`,
|
|
301
|
+
onClick: P((I) => De(o, d), ["stop"])
|
|
327
302
|
}, [
|
|
328
|
-
r(
|
|
303
|
+
r(n(f), {
|
|
329
304
|
size: "small",
|
|
330
305
|
color: "var(--nmorph-contrast-text-color)"
|
|
331
306
|
}, {
|
|
332
|
-
default:
|
|
333
|
-
r(
|
|
307
|
+
default: c(() => [
|
|
308
|
+
r(n(he))
|
|
334
309
|
]),
|
|
335
310
|
_: 1
|
|
336
311
|
})
|
|
337
|
-
], 8,
|
|
338
|
-
|
|
312
|
+
], 8, vo)) : v("", !0),
|
|
313
|
+
oe(o) ? (i(), u("a", {
|
|
339
314
|
key: 2,
|
|
340
|
-
href:
|
|
341
|
-
download:
|
|
315
|
+
href: J(o),
|
|
316
|
+
download: T(o) || void 0,
|
|
342
317
|
class: "nmorph-media-gallery__trigger-action",
|
|
343
|
-
"aria-label": `Download ${
|
|
344
|
-
onClick:
|
|
318
|
+
"aria-label": `Download ${$(o, d)}`,
|
|
319
|
+
onClick: P((I) => ie(o, d), ["stop"])
|
|
345
320
|
}, [
|
|
346
|
-
r(
|
|
321
|
+
r(n(f), {
|
|
347
322
|
size: "small",
|
|
348
323
|
color: "var(--nmorph-contrast-text-color)"
|
|
349
324
|
}, {
|
|
350
|
-
default:
|
|
351
|
-
r(
|
|
325
|
+
default: c(() => [
|
|
326
|
+
r(n(_e))
|
|
352
327
|
]),
|
|
353
328
|
_: 1
|
|
354
329
|
})
|
|
355
|
-
], 8,
|
|
330
|
+
], 8, mo)) : v("", !0)
|
|
356
331
|
])) : v("", !0)
|
|
357
332
|
], 2))), 128))
|
|
358
333
|
], 6)) : v("", !0),
|
|
359
|
-
|
|
334
|
+
_.value ? (i(), A(Ze, {
|
|
360
335
|
key: 1,
|
|
361
|
-
show:
|
|
362
|
-
"z-index":
|
|
363
|
-
"state-class":
|
|
336
|
+
show: _.value,
|
|
337
|
+
"z-index": l.zIndex,
|
|
338
|
+
"state-class": Be.value,
|
|
364
339
|
"content-class": "nmorph-media-gallery__content",
|
|
365
340
|
"left-class": "nmorph-media-gallery__left",
|
|
366
341
|
"right-class": "nmorph-media-gallery__right",
|
|
367
342
|
"actions-class": "nmorph-media-gallery__actions",
|
|
368
|
-
"show-navigation":
|
|
369
|
-
"show-action-bar":
|
|
370
|
-
onClose:
|
|
371
|
-
onPrevious:
|
|
372
|
-
onNext:
|
|
343
|
+
"show-navigation": O.value,
|
|
344
|
+
"show-action-bar": l.showActionBar && a.value?.kind === "image",
|
|
345
|
+
onClose: ne,
|
|
346
|
+
onPrevious: E,
|
|
347
|
+
onNext: R
|
|
373
348
|
}, {
|
|
374
|
-
actions:
|
|
375
|
-
|
|
376
|
-
r(
|
|
377
|
-
default:
|
|
378
|
-
r(
|
|
379
|
-
default:
|
|
380
|
-
r(
|
|
349
|
+
actions: c(() => [
|
|
350
|
+
b("div", ko, [
|
|
351
|
+
r(n(H), { onClick: Ae }, {
|
|
352
|
+
default: c(() => [
|
|
353
|
+
r(n(f), null, {
|
|
354
|
+
default: c(() => [
|
|
355
|
+
r(n(Je))
|
|
381
356
|
]),
|
|
382
357
|
_: 1
|
|
383
358
|
})
|
|
@@ -385,12 +360,12 @@ const sa = ["aria-label", "onClick"], ua = ["src", "poster", "title"], da = {
|
|
|
385
360
|
_: 1
|
|
386
361
|
})
|
|
387
362
|
]),
|
|
388
|
-
|
|
389
|
-
r(
|
|
390
|
-
default:
|
|
391
|
-
r(
|
|
392
|
-
default:
|
|
393
|
-
r(
|
|
363
|
+
b("div", Io, [
|
|
364
|
+
r(n(H), { onClick: Pe }, {
|
|
365
|
+
default: c(() => [
|
|
366
|
+
r(n(f), null, {
|
|
367
|
+
default: c(() => [
|
|
368
|
+
r(n(Qe))
|
|
394
369
|
]),
|
|
395
370
|
_: 1
|
|
396
371
|
})
|
|
@@ -398,12 +373,12 @@ const sa = ["aria-label", "onClick"], ua = ["src", "poster", "title"], da = {
|
|
|
398
373
|
_: 1
|
|
399
374
|
})
|
|
400
375
|
]),
|
|
401
|
-
|
|
402
|
-
r(
|
|
403
|
-
default:
|
|
404
|
-
r(
|
|
405
|
-
default:
|
|
406
|
-
r(
|
|
376
|
+
b("div", bo, [
|
|
377
|
+
r(n(H), { onClick: He }, {
|
|
378
|
+
default: c(() => [
|
|
379
|
+
r(n(f), null, {
|
|
380
|
+
default: c(() => [
|
|
381
|
+
r(n(eo))
|
|
407
382
|
]),
|
|
408
383
|
_: 1
|
|
409
384
|
})
|
|
@@ -411,12 +386,12 @@ const sa = ["aria-label", "onClick"], ua = ["src", "poster", "title"], da = {
|
|
|
411
386
|
_: 1
|
|
412
387
|
})
|
|
413
388
|
]),
|
|
414
|
-
|
|
415
|
-
r(
|
|
416
|
-
default:
|
|
417
|
-
r(
|
|
418
|
-
default:
|
|
419
|
-
r(
|
|
389
|
+
b("div", Fo, [
|
|
390
|
+
r(n(H), { onClick: Ve }, {
|
|
391
|
+
default: c(() => [
|
|
392
|
+
r(n(f), null, {
|
|
393
|
+
default: c(() => [
|
|
394
|
+
r(n(oo))
|
|
420
395
|
]),
|
|
421
396
|
_: 1
|
|
422
397
|
})
|
|
@@ -424,15 +399,15 @@ const sa = ["aria-label", "onClick"], ua = ["src", "poster", "title"], da = {
|
|
|
424
399
|
_: 1
|
|
425
400
|
})
|
|
426
401
|
]),
|
|
427
|
-
|
|
428
|
-
r(
|
|
429
|
-
disabled:
|
|
430
|
-
onClick:
|
|
402
|
+
b("div", No, [
|
|
403
|
+
r(n(H), {
|
|
404
|
+
disabled: y.value === 1,
|
|
405
|
+
onClick: Se
|
|
431
406
|
}, {
|
|
432
|
-
default:
|
|
433
|
-
r(
|
|
434
|
-
default:
|
|
435
|
-
|
|
407
|
+
default: c(() => [
|
|
408
|
+
r(n(f), null, {
|
|
409
|
+
default: c(() => [
|
|
410
|
+
y.value < 1 ? (i(), A(n(to), { key: 0 })) : (i(), A(n(ao), { key: 1 }))
|
|
436
411
|
]),
|
|
437
412
|
_: 1
|
|
438
413
|
})
|
|
@@ -441,98 +416,76 @@ const sa = ["aria-label", "onClick"], ua = ["src", "poster", "title"], da = {
|
|
|
441
416
|
}, 8, ["disabled"])
|
|
442
417
|
])
|
|
443
418
|
]),
|
|
444
|
-
default:
|
|
445
|
-
|
|
446
|
-
|
|
419
|
+
default: c(() => [
|
|
420
|
+
b("div", fo, [
|
|
421
|
+
a.value?.kind === "image" ? (i(), A(n(pe), {
|
|
447
422
|
key: 0,
|
|
448
|
-
src:
|
|
449
|
-
alt:
|
|
450
|
-
title:
|
|
451
|
-
fit:
|
|
423
|
+
src: a.value.src,
|
|
424
|
+
alt: a.value.alt || a.value.name || "",
|
|
425
|
+
title: a.value.name,
|
|
426
|
+
fit: l.imageFit,
|
|
452
427
|
"frame-border": 0,
|
|
453
|
-
style:
|
|
428
|
+
style: me({ transform: xe.value }),
|
|
454
429
|
onPointerdown: ce,
|
|
455
|
-
onPointerup:
|
|
456
|
-
}, null, 8, ["src", "alt", "title", "fit", "style"])) :
|
|
430
|
+
onPointerup: de
|
|
431
|
+
}, null, 8, ["src", "alt", "title", "fit", "style"])) : a.value?.kind === "video" ? (i(), u("video", {
|
|
457
432
|
key: 1,
|
|
458
433
|
ref_key: "currentVideoRef",
|
|
459
|
-
ref:
|
|
434
|
+
ref: N,
|
|
460
435
|
class: "nmorph-media-gallery__video",
|
|
461
|
-
src:
|
|
462
|
-
poster:
|
|
463
|
-
controls:
|
|
464
|
-
muted:
|
|
465
|
-
playsinline:
|
|
466
|
-
preload:
|
|
467
|
-
title:
|
|
436
|
+
src: a.value.src,
|
|
437
|
+
poster: a.value.poster || void 0,
|
|
438
|
+
controls: Y.value,
|
|
439
|
+
muted: ke.value,
|
|
440
|
+
playsinline: Ie.value,
|
|
441
|
+
preload: be.value,
|
|
442
|
+
title: a.value.name,
|
|
468
443
|
onPointerdown: ce,
|
|
469
|
-
onPointerup:
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
onError: Ye
|
|
479
|
-
}, null, 40, _a)) : v("", !0),
|
|
480
|
-
Fe.value ? (i(), u("button", {
|
|
481
|
-
key: 2,
|
|
482
|
-
class: "nmorph-media-gallery__play",
|
|
483
|
-
type: "button",
|
|
484
|
-
"aria-label": m.value ? `Pause ${R.value}` : `Play ${R.value}`,
|
|
485
|
-
onClick: $(De, ["stop"])
|
|
486
|
-
}, [
|
|
487
|
-
r(l(p), {
|
|
488
|
-
size: "medium",
|
|
489
|
-
color: "var(--nmorph-contrast-text-color)"
|
|
490
|
-
}, {
|
|
491
|
-
default: d(() => [
|
|
492
|
-
m.value ? (i(), B(l(aa), { key: 0 })) : (i(), B(l(ye), { key: 1 }))
|
|
493
|
-
]),
|
|
494
|
-
_: 1
|
|
495
|
-
})
|
|
496
|
-
], 8, ya)) : v("", !0),
|
|
497
|
-
J.value ? (i(), u("span", ka, D(J.value), 1)) : v("", !0),
|
|
498
|
-
Ce.value ? (i(), u("div", wa, [
|
|
499
|
-
Q.value ? (i(), u("button", {
|
|
444
|
+
onPointerup: de,
|
|
445
|
+
onPlay: Ee,
|
|
446
|
+
onPause: Re,
|
|
447
|
+
onEnded: Ke,
|
|
448
|
+
onError: qe
|
|
449
|
+
}, null, 40, go)) : v("", !0),
|
|
450
|
+
G.value ? (i(), u("span", po, M(G.value), 1)) : v("", !0),
|
|
451
|
+
Ne.value ? (i(), u("div", ho, [
|
|
452
|
+
U.value ? (i(), u("button", {
|
|
500
453
|
key: 0,
|
|
501
454
|
type: "button",
|
|
502
455
|
class: "nmorph-media-gallery__file-action",
|
|
503
|
-
"aria-label": `Fullscreen ${
|
|
504
|
-
onClick:
|
|
456
|
+
"aria-label": `Fullscreen ${Fe.value}`,
|
|
457
|
+
onClick: P(Me, ["stop"])
|
|
505
458
|
}, [
|
|
506
|
-
r(
|
|
459
|
+
r(n(f), {
|
|
507
460
|
size: "small",
|
|
508
461
|
color: "var(--nmorph-contrast-text-color)"
|
|
509
462
|
}, {
|
|
510
|
-
default:
|
|
511
|
-
r(
|
|
463
|
+
default: c(() => [
|
|
464
|
+
r(n(he))
|
|
512
465
|
]),
|
|
513
466
|
_: 1
|
|
514
467
|
})
|
|
515
|
-
], 8,
|
|
516
|
-
|
|
468
|
+
], 8, _o)) : v("", !0),
|
|
469
|
+
L.value ? (i(), u("a", {
|
|
517
470
|
key: 1,
|
|
518
|
-
href:
|
|
519
|
-
download:
|
|
471
|
+
href: L.value,
|
|
472
|
+
download: D.value || void 0,
|
|
520
473
|
class: "nmorph-media-gallery__file-action",
|
|
521
|
-
"aria-label": `Download ${
|
|
522
|
-
onClick:
|
|
474
|
+
"aria-label": `Download ${D.value || "media"}`,
|
|
475
|
+
onClick: P(Le, ["stop"])
|
|
523
476
|
}, [
|
|
524
|
-
r(
|
|
477
|
+
r(n(f), {
|
|
525
478
|
size: "small",
|
|
526
479
|
color: "var(--nmorph-contrast-text-color)"
|
|
527
480
|
}, {
|
|
528
|
-
default:
|
|
529
|
-
r(
|
|
481
|
+
default: c(() => [
|
|
482
|
+
r(n(_e))
|
|
530
483
|
]),
|
|
531
484
|
_: 1
|
|
532
485
|
})
|
|
533
|
-
], 8,
|
|
486
|
+
], 8, yo)) : v("", !0)
|
|
534
487
|
])) : v("", !0),
|
|
535
|
-
|
|
488
|
+
W.value ? (i(), u("span", wo, M(W.value), 1)) : v("", !0)
|
|
536
489
|
])
|
|
537
490
|
]),
|
|
538
491
|
_: 1
|
|
@@ -541,5 +494,5 @@ const sa = ["aria-label", "onClick"], ua = ["src", "poster", "title"], da = {
|
|
|
541
494
|
}
|
|
542
495
|
});
|
|
543
496
|
export {
|
|
544
|
-
|
|
497
|
+
Uo as default
|
|
545
498
|
};
|