@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,7 +1,7 @@
|
|
|
1
1
|
import './NmorphScroll.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
const
|
|
2
|
+
import { defineComponent as Te, ref as c, computed as r, inject as Me, onUnmounted as We, onMounted as Ee, watch as A, openBlock as O, createElementBlock as _, normalizeStyle as h, normalizeClass as Oe, createElementVNode as k, renderSlot as _e, createCommentVNode as F, nextTick as ke } from "vue";
|
|
3
|
+
import { useModifiers as Le } from "../../../utils/create-modifiers.js";
|
|
4
|
+
const Ce = /* @__PURE__ */ Te({
|
|
5
5
|
__name: "NmorphScroll",
|
|
6
6
|
props: {
|
|
7
7
|
height: { default: "100%" },
|
|
@@ -21,20 +21,20 @@ const ke = /* @__PURE__ */ Pe({
|
|
|
21
21
|
yGapInPx: { default: 0 }
|
|
22
22
|
},
|
|
23
23
|
emits: ["on-scroll", "update:model-value", "on-scroll-end"],
|
|
24
|
-
setup(
|
|
25
|
-
const l =
|
|
24
|
+
setup(J, { expose: K, emit: Q }) {
|
|
25
|
+
const l = J, Z = c(null), a = c(null), ee = r(() => l.scrollYProp), te = r(() => l.scrollXProp), b = c(!1), y = c(!1), i = c({
|
|
26
26
|
clientWidth: 0,
|
|
27
27
|
clientHeight: 0,
|
|
28
28
|
scrollWidth: 0,
|
|
29
29
|
scrollHeight: 0,
|
|
30
30
|
scrollLeft: 0,
|
|
31
31
|
scrollTop: 0
|
|
32
|
-
}),
|
|
33
|
-
let
|
|
34
|
-
const m = () => {
|
|
35
|
-
const e =
|
|
32
|
+
}), S = c(!1);
|
|
33
|
+
let w, v, z, s, L = "";
|
|
34
|
+
const m = /* @__PURE__ */ new Set(), H = () => {
|
|
35
|
+
const e = a.value;
|
|
36
36
|
if (!e) {
|
|
37
|
-
|
|
37
|
+
b.value = !1, y.value = !1, i.value = {
|
|
38
38
|
clientWidth: 0,
|
|
39
39
|
clientHeight: 0,
|
|
40
40
|
scrollWidth: 0,
|
|
@@ -52,169 +52,191 @@ const ke = /* @__PURE__ */ Pe({
|
|
|
52
52
|
scrollLeft: e.scrollLeft,
|
|
53
53
|
scrollTop: e.scrollTop
|
|
54
54
|
};
|
|
55
|
-
i.value = t,
|
|
56
|
-
},
|
|
57
|
-
()
|
|
58
|
-
|
|
59
|
-
(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
i.value = t, b.value = t.scrollHeight > t.clientHeight, y.value = t.scrollWidth > t.clientWidth;
|
|
56
|
+
}, p = () => {
|
|
57
|
+
ke(H);
|
|
58
|
+
}, I = () => {
|
|
59
|
+
if (!v || !a.value) return;
|
|
60
|
+
const e = new Set(Array.from(a.value.children));
|
|
61
|
+
m.forEach((t) => {
|
|
62
|
+
e.has(t) || (v?.unobserve(t), m.delete(t));
|
|
63
|
+
}), e.forEach((t) => {
|
|
64
|
+
m.has(t) || (v?.observe(t), m.add(t));
|
|
65
|
+
});
|
|
66
|
+
}, oe = () => {
|
|
67
|
+
const e = a.value;
|
|
68
|
+
e && (typeof ResizeObserver < "u" && (v = new ResizeObserver(() => {
|
|
69
|
+
p();
|
|
70
|
+
}), I()), typeof MutationObserver < "u" && (z = new MutationObserver(() => {
|
|
71
|
+
I(), p();
|
|
72
|
+
}), z.observe(e, {
|
|
73
|
+
attributes: !0,
|
|
74
|
+
characterData: !0,
|
|
75
|
+
childList: !0,
|
|
76
|
+
subtree: !0
|
|
77
|
+
})));
|
|
78
|
+
}, le = r(() => l.yBarWidthInPx + l.yGapInPx), re = r(() => l.xBarWidthInPx + l.xGapInPx), ne = r(
|
|
79
|
+
() => l.scrollYProp === "hidden" || !b.value ? "0" : `${le.value}px`
|
|
80
|
+
), ae = r(
|
|
81
|
+
() => l.scrollXProp === "hidden" || !y.value ? "0" : `${re.value}px`
|
|
82
|
+
), R = r(() => `${l.yBarWidthInPx}px`), C = r(() => `${l.xBarWidthInPx}px`), se = r(() => E.value ? C.value : "0px"), ie = r(() => W.value ? R.value : "0px"), ce = Me("nmorph");
|
|
83
|
+
let f;
|
|
84
|
+
const B = Q, D = () => {
|
|
85
|
+
const e = a.value;
|
|
64
86
|
if (!e) return;
|
|
65
87
|
const t = Math.trunc(e.scrollLeft), o = Math.trunc(e.scrollTop);
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
l.updateOnlyOnScrollEnd &&
|
|
88
|
+
B("update:model-value", { x: t, y: o });
|
|
89
|
+
}, ue = () => {
|
|
90
|
+
B("on-scroll-end");
|
|
91
|
+
}, de = (e) => {
|
|
92
|
+
H(), B("on-scroll", e), a.value && (l.updateOnlyOnScrollEnd || D(), f !== void 0 && clearTimeout(f), f = setTimeout(() => {
|
|
93
|
+
l.updateOnlyOnScrollEnd && D(), ue();
|
|
72
94
|
}, l.scrollEndDelay));
|
|
73
95
|
};
|
|
74
|
-
|
|
75
|
-
|
|
96
|
+
We(() => {
|
|
97
|
+
f !== void 0 && clearTimeout(f), w?.disconnect(), v?.disconnect(), z?.disconnect(), m.clear(), U();
|
|
76
98
|
});
|
|
77
|
-
const
|
|
78
|
-
() =>
|
|
99
|
+
const T = c(!1), he = r(
|
|
100
|
+
() => Le({
|
|
79
101
|
"nmorph-scroll": {
|
|
80
|
-
"show-bars":
|
|
81
|
-
dragging:
|
|
102
|
+
"show-bars": T.value || S.value,
|
|
103
|
+
dragging: S.value
|
|
82
104
|
}
|
|
83
105
|
})
|
|
84
|
-
),
|
|
106
|
+
), M = (e) => {
|
|
85
107
|
const { x: t, y: o } = e;
|
|
86
|
-
|
|
108
|
+
a.value?.scrollTo({
|
|
87
109
|
left: t,
|
|
88
110
|
top: o,
|
|
89
111
|
behavior: "smooth"
|
|
90
112
|
});
|
|
91
113
|
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}),
|
|
96
|
-
}),
|
|
114
|
+
Ee(() => {
|
|
115
|
+
M(l.modelValue), oe(), p(), typeof ResizeObserver < "u" && a.value && (w = new ResizeObserver(() => {
|
|
116
|
+
p();
|
|
117
|
+
}), w.observe(a.value));
|
|
118
|
+
}), A(
|
|
97
119
|
() => l.modelValue,
|
|
98
120
|
(e) => {
|
|
99
|
-
|
|
121
|
+
M(e);
|
|
100
122
|
},
|
|
101
123
|
{ deep: !0, immediate: !0 }
|
|
102
|
-
),
|
|
103
|
-
() =>
|
|
124
|
+
), A(
|
|
125
|
+
() => ce?.browser.dimensions,
|
|
104
126
|
() => {
|
|
105
|
-
|
|
127
|
+
p();
|
|
106
128
|
},
|
|
107
129
|
{ deep: !0, immediate: !0 }
|
|
108
130
|
);
|
|
109
|
-
const
|
|
110
|
-
"--bar-width":
|
|
111
|
-
"--bar-height":
|
|
131
|
+
const ve = r(() => l.cssScrollBehavior), me = r(() => l.height), pe = r(() => l.maxHeight), fe = r(() => ({
|
|
132
|
+
"--bar-width": R.value,
|
|
133
|
+
"--bar-height": C.value,
|
|
112
134
|
boxSizing: "border-box",
|
|
113
135
|
minWidth: "0",
|
|
114
136
|
minHeight: "0",
|
|
115
|
-
height:
|
|
116
|
-
maxHeight:
|
|
117
|
-
})),
|
|
118
|
-
paddingRight:
|
|
119
|
-
paddingBottom:
|
|
120
|
-
overflowX:
|
|
121
|
-
overflowY:
|
|
122
|
-
scrollBehavior:
|
|
123
|
-
})),
|
|
124
|
-
() => Math.max(0, i.value.clientHeight - (
|
|
125
|
-
),
|
|
126
|
-
() => Math.max(0, i.value.clientWidth - (
|
|
127
|
-
),
|
|
128
|
-
const t =
|
|
129
|
-
return t <= 0 || o <=
|
|
130
|
-
},
|
|
131
|
-
const t =
|
|
132
|
-
return !t || !o ? 0 :
|
|
133
|
-
},
|
|
137
|
+
height: me.value,
|
|
138
|
+
maxHeight: pe.value
|
|
139
|
+
})), ge = r(() => ({
|
|
140
|
+
paddingRight: ne.value,
|
|
141
|
+
paddingBottom: ae.value,
|
|
142
|
+
overflowX: te.value,
|
|
143
|
+
overflowY: ee.value,
|
|
144
|
+
scrollBehavior: ve.value
|
|
145
|
+
})), W = r(() => l.scrollYProp !== "hidden" && b.value), E = r(() => l.scrollXProp !== "hidden" && y.value), be = r(
|
|
146
|
+
() => Math.max(0, i.value.clientHeight - (E.value ? l.xBarWidthInPx : 0))
|
|
147
|
+
), ye = r(
|
|
148
|
+
() => Math.max(0, i.value.clientWidth - (W.value ? l.yBarWidthInPx : 0))
|
|
149
|
+
), g = (e) => e === "y" ? be.value : ye.value, V = (e) => e === "y" ? i.value.clientHeight : i.value.clientWidth, X = (e) => e === "y" ? i.value.scrollHeight : i.value.scrollWidth, Y = (e) => e === "y" ? i.value.scrollTop : i.value.scrollLeft, Se = (e) => Math.min(g(e), Math.max(18, e === "y" ? l.yBarWidthInPx * 3 : l.xBarWidthInPx * 3)), x = (e) => Math.max(0, X(e) - V(e)), u = (e) => {
|
|
150
|
+
const t = g(e), o = X(e), n = V(e);
|
|
151
|
+
return t <= 0 || o <= n ? 0 : Math.min(t, Math.max(Se(e), n / o * t));
|
|
152
|
+
}, $ = (e) => {
|
|
153
|
+
const t = x(e), o = Math.max(0, g(e) - u(e));
|
|
154
|
+
return !t || !o ? 0 : Y(e) / t * o;
|
|
155
|
+
}, xe = r(() => ({
|
|
134
156
|
height: `${u("y")}px`,
|
|
135
|
-
transform: `translate3d(0, ${
|
|
136
|
-
})),
|
|
157
|
+
transform: `translate3d(0, ${$("y")}px, 0)`
|
|
158
|
+
})), Pe = r(() => ({
|
|
137
159
|
width: `${u("x")}px`,
|
|
138
|
-
transform: `translate3d(${
|
|
139
|
-
})),
|
|
140
|
-
const o =
|
|
160
|
+
transform: `translate3d(${$("x")}px, 0, 0)`
|
|
161
|
+
})), G = (e, t) => {
|
|
162
|
+
const o = a.value;
|
|
141
163
|
if (!o) return;
|
|
142
|
-
const
|
|
143
|
-
e === "y" ? o.scrollTop =
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
if (!
|
|
148
|
-
const o = (
|
|
149
|
-
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
},
|
|
164
|
+
const n = Math.max(0, Math.min(x(e), t));
|
|
165
|
+
e === "y" ? o.scrollTop = n : o.scrollLeft = n, H();
|
|
166
|
+
}, U = () => {
|
|
167
|
+
s && (window.removeEventListener("pointermove", N), window.removeEventListener("pointerup", P), window.removeEventListener("pointercancel", P), s = void 0, S.value = !1, document.body && (document.body.style.userSelect = L));
|
|
168
|
+
}, N = (e) => {
|
|
169
|
+
if (!s) return;
|
|
170
|
+
const o = (s.axis === "y" ? e.clientY : e.clientX) - s.pointerStart, n = Math.max(1, s.trackSize - s.thumbSize), d = o / n * s.maxScroll;
|
|
171
|
+
G(s.axis, s.scrollStart + d);
|
|
172
|
+
}, P = () => {
|
|
173
|
+
U();
|
|
174
|
+
}, j = (e, t) => {
|
|
153
175
|
t.preventDefault(), t.stopPropagation();
|
|
154
|
-
const o =
|
|
155
|
-
!o || !
|
|
176
|
+
const o = g(e), n = u(e), d = x(e);
|
|
177
|
+
!o || !n || !d || (s = {
|
|
156
178
|
axis: e,
|
|
157
179
|
pointerStart: e === "y" ? t.clientY : t.clientX,
|
|
158
|
-
scrollStart:
|
|
180
|
+
scrollStart: Y(e),
|
|
159
181
|
trackSize: o,
|
|
160
|
-
thumbSize:
|
|
182
|
+
thumbSize: n,
|
|
161
183
|
maxScroll: d
|
|
162
|
-
},
|
|
163
|
-
},
|
|
184
|
+
}, S.value = !0, L = document.body?.style.userSelect ?? "", document.body && (document.body.style.userSelect = "none"), window.addEventListener("pointermove", N), window.addEventListener("pointerup", P), window.addEventListener("pointercancel", P));
|
|
185
|
+
}, q = (e, t) => {
|
|
164
186
|
if (t.target.closest(".nmorph-scroll__thumb")) return;
|
|
165
|
-
const
|
|
166
|
-
|
|
187
|
+
const n = t.currentTarget.getBoundingClientRect(), d = e === "y" ? t.clientY - n.top : t.clientX - n.left, He = Math.max(1, g(e) - u(e)), Be = (d - u(e) / 2) / He * x(e);
|
|
188
|
+
G(e, Be);
|
|
167
189
|
};
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
},
|
|
172
|
-
|
|
190
|
+
K({ scrollDOMContainer: a, moveTo: M });
|
|
191
|
+
const we = () => {
|
|
192
|
+
T.value = !0;
|
|
193
|
+
}, ze = () => {
|
|
194
|
+
T.value = !1;
|
|
173
195
|
};
|
|
174
|
-
return (e, t) => (
|
|
196
|
+
return (e, t) => (O(), _("div", {
|
|
175
197
|
ref_key: "scrollRoot",
|
|
176
|
-
ref:
|
|
177
|
-
class:
|
|
178
|
-
style: h(
|
|
179
|
-
onMouseenter:
|
|
180
|
-
onMouseleave:
|
|
198
|
+
ref: Z,
|
|
199
|
+
class: Oe(he.value),
|
|
200
|
+
style: h(fe.value),
|
|
201
|
+
onMouseenter: we,
|
|
202
|
+
onMouseleave: ze
|
|
181
203
|
}, [
|
|
182
|
-
|
|
204
|
+
k("div", {
|
|
183
205
|
ref_key: "scrollDOMContainer",
|
|
184
|
-
ref:
|
|
206
|
+
ref: a,
|
|
185
207
|
class: "nmorph-scroll__viewport",
|
|
186
|
-
style: h(
|
|
187
|
-
onScroll:
|
|
208
|
+
style: h(ge.value),
|
|
209
|
+
onScroll: de
|
|
188
210
|
}, [
|
|
189
|
-
|
|
211
|
+
_e(e.$slots, "default")
|
|
190
212
|
], 36),
|
|
191
|
-
|
|
213
|
+
W.value ? (O(), _("div", {
|
|
192
214
|
key: 0,
|
|
193
215
|
class: "nmorph-scroll__bar nmorph-scroll__bar--vertical",
|
|
194
|
-
style: h({ bottom:
|
|
195
|
-
onPointerdown: t[1] || (t[1] = (o) =>
|
|
216
|
+
style: h({ bottom: se.value }),
|
|
217
|
+
onPointerdown: t[1] || (t[1] = (o) => q("y", o))
|
|
196
218
|
}, [
|
|
197
|
-
|
|
219
|
+
k("div", {
|
|
198
220
|
class: "nmorph-scroll__thumb nmorph-scroll__thumb--vertical",
|
|
199
|
-
style: h(
|
|
200
|
-
onPointerdown: t[0] || (t[0] = (o) =>
|
|
221
|
+
style: h(xe.value),
|
|
222
|
+
onPointerdown: t[0] || (t[0] = (o) => j("y", o))
|
|
201
223
|
}, null, 36)
|
|
202
|
-
], 36)) :
|
|
203
|
-
|
|
224
|
+
], 36)) : F("", !0),
|
|
225
|
+
E.value ? (O(), _("div", {
|
|
204
226
|
key: 1,
|
|
205
227
|
class: "nmorph-scroll__bar nmorph-scroll__bar--horizontal",
|
|
206
|
-
style: h({ right:
|
|
207
|
-
onPointerdown: t[3] || (t[3] = (o) =>
|
|
228
|
+
style: h({ right: ie.value }),
|
|
229
|
+
onPointerdown: t[3] || (t[3] = (o) => q("x", o))
|
|
208
230
|
}, [
|
|
209
|
-
|
|
231
|
+
k("div", {
|
|
210
232
|
class: "nmorph-scroll__thumb nmorph-scroll__thumb--horizontal",
|
|
211
|
-
style: h(
|
|
212
|
-
onPointerdown: t[2] || (t[2] = (o) =>
|
|
233
|
+
style: h(Pe.value),
|
|
234
|
+
onPointerdown: t[2] || (t[2] = (o) => j("x", o))
|
|
213
235
|
}, null, 36)
|
|
214
|
-
], 36)) :
|
|
236
|
+
], 36)) : F("", !0)
|
|
215
237
|
], 38));
|
|
216
238
|
}
|
|
217
239
|
});
|
|
218
240
|
export {
|
|
219
|
-
|
|
241
|
+
Ce as default
|
|
220
242
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-media-gallery__trigger{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:var(--indentation-03);width:100%}.nmorph-media-gallery__trigger--fixed-height{grid-auto-rows:var(--nmorph-media-gallery-trigger-height)}.nmorph-media-gallery__trigger-item{position:relative;min-width:0;overflow:hidden;background:color-mix(in srgb,var(--nmorph-accent-color) 6%,transparent);border-radius:var(--default-border-radius);aspect-ratio:16/9}.nmorph-media-gallery__trigger--fixed-height .nmorph-media-gallery__trigger-item{height:100%;aspect-ratio:auto}.nmorph-media-gallery__trigger-open{position:relative;display:block;width:100%;height:100%;padding:0;overflow:hidden;color:inherit;font:inherit;text-align:initial;background:transparent;border:0;cursor:pointer}.nmorph-media-gallery__trigger-open .nmorph-image,.nmorph-media-gallery__trigger-open .nmorph-media-gallery__trigger-video{display:block;width:100%;height:100%;transition:filter var(--transition-03) ease-in-out}.nmorph-media-gallery__trigger-open .nmorph-image img,.nmorph-media-gallery__trigger-open .nmorph-media-gallery__trigger-video{display:block;width:100%;height:100%;object-fit:cover}.nmorph-media-gallery__trigger-open:hover .nmorph-image,.nmorph-media-gallery__trigger-open:hover .nmorph-media-gallery__trigger-video{filter:brightness(.86)}.nmorph-media-gallery__trigger-name,.nmorph-media-gallery__trigger-size{position:absolute;z-index:2;display:block;box-sizing:border-box;min-width:0;min-height:22px;padding:0 6px;overflow:hidden;color:var(--nmorph-contrast-text-color);line-height:22px;white-space:nowrap;text-overflow:ellipsis;background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border-radius:var(--default-border-radius);pointer-events:none}.nmorph-media-gallery__trigger-name{top:var(--indentation-02);left:var(--indentation-02);max-width:calc(100% - 56px);font-weight:600;font-size:var(--font-size-small)}.nmorph-media-gallery__trigger-item--video .nmorph-media-gallery__trigger-name{max-width:calc(100% - 118px)}.nmorph-media-gallery__trigger-size{right:var(--indentation-02);bottom:var(--indentation-02);max-width:calc(100% - var(--indentation-04));font-size:var(--font-size-extra-small)}.nmorph-media-gallery__trigger-actions{position:absolute;top:var(--indentation-02);right:var(--indentation-02);z-index:3;display:flex;gap:var(--indentation-01)}.nmorph-media-gallery__trigger-action{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;width:22px;height:22px;padding:0;color:var(--nmorph-contrast-text-color);font:inherit;line-height:1;text-decoration:none;background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border:0;border-radius:var(--default-border-radius);cursor:pointer}.nmorph-media-gallery__trigger-action .nmorph-icon{flex:0 0 auto;--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-media-gallery__trigger-action:hover{color:var(--nmorph-contrast-text-color);background:color-mix(in srgb,var(--nmorph-black-color) 72%,transparent)}.nmorph-media-gallery__trigger-play{position:absolute;top:50%;left:50%;z-index:2;display:inline-flex;justify-content:center;align-items:center;width:54px;height:54px;color:var(--nmorph-contrast-text-color);background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border-radius:var(--border-radius-circular);transform:translate(-50%,-50%);pointer-events:none}.nmorph-media-gallery__trigger-play .nmorph-icon{--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-media-gallery{display:contents}.nmorph-media-gallery .nmorph-media-gallery__stage{position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:100%;overflow:hidden;pointer-events:none}.nmorph-media-gallery .nmorph-image{width:100%;height:100%;transition:transform var(--transition-03) ease-in-out;pointer-events:none}.nmorph-media-gallery .nmorph-image img{display:block;width:auto;max-width:100%;height:auto;max-height:100%;object-fit:contain;pointer-events:auto}.nmorph-media-gallery .nmorph-media-gallery__video{display:block;width:100%;max-width:100%;height:100%;max-height:100%;background:var(--nmorph-black-color);border-radius:var(--default-border-radius);object-fit:contain;pointer-events:auto}.nmorph-media-gallery .nmorph-media-
|
|
1
|
+
.nmorph-media-gallery__trigger{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:var(--indentation-03);width:100%}.nmorph-media-gallery__trigger--fixed-height{grid-auto-rows:var(--nmorph-media-gallery-trigger-height)}.nmorph-media-gallery__trigger-item{position:relative;min-width:0;overflow:hidden;background:color-mix(in srgb,var(--nmorph-accent-color) 6%,transparent);border-radius:var(--default-border-radius);aspect-ratio:16/9}.nmorph-media-gallery__trigger--fixed-height .nmorph-media-gallery__trigger-item{height:100%;aspect-ratio:auto}.nmorph-media-gallery__trigger-open{position:relative;display:block;width:100%;height:100%;padding:0;overflow:hidden;color:inherit;font:inherit;text-align:initial;background:transparent;border:0;cursor:pointer}.nmorph-media-gallery__trigger-open .nmorph-image,.nmorph-media-gallery__trigger-open .nmorph-media-gallery__trigger-video{display:block;width:100%;height:100%;transition:filter var(--transition-03) ease-in-out}.nmorph-media-gallery__trigger-open .nmorph-image img,.nmorph-media-gallery__trigger-open .nmorph-media-gallery__trigger-video{display:block;width:100%;height:100%;object-fit:cover}.nmorph-media-gallery__trigger-open:hover .nmorph-image,.nmorph-media-gallery__trigger-open:hover .nmorph-media-gallery__trigger-video{filter:brightness(.86)}.nmorph-media-gallery__trigger-name,.nmorph-media-gallery__trigger-size{position:absolute;z-index:2;display:block;box-sizing:border-box;min-width:0;min-height:22px;padding:0 6px;overflow:hidden;color:var(--nmorph-contrast-text-color);line-height:22px;white-space:nowrap;text-overflow:ellipsis;background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border-radius:var(--default-border-radius);pointer-events:none}.nmorph-media-gallery__trigger-name{top:var(--indentation-02);left:var(--indentation-02);max-width:calc(100% - 56px);font-weight:600;font-size:var(--font-size-small)}.nmorph-media-gallery__trigger-item--video .nmorph-media-gallery__trigger-name{max-width:calc(100% - 118px)}.nmorph-media-gallery__trigger-size{right:var(--indentation-02);bottom:var(--indentation-02);max-width:calc(100% - var(--indentation-04));font-size:var(--font-size-extra-small)}.nmorph-media-gallery__trigger-actions{position:absolute;top:var(--indentation-02);right:var(--indentation-02);z-index:3;display:flex;gap:var(--indentation-01)}.nmorph-media-gallery__trigger-action{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;width:22px;height:22px;padding:0;color:var(--nmorph-contrast-text-color);font:inherit;line-height:1;text-decoration:none;background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border:0;border-radius:var(--default-border-radius);cursor:pointer}.nmorph-media-gallery__trigger-action .nmorph-icon{flex:0 0 auto;--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-media-gallery__trigger-action:hover{color:var(--nmorph-contrast-text-color);background:color-mix(in srgb,var(--nmorph-black-color) 72%,transparent)}.nmorph-media-gallery__trigger-play{position:absolute;top:50%;left:50%;z-index:2;display:inline-flex;justify-content:center;align-items:center;width:54px;height:54px;color:var(--nmorph-contrast-text-color);background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border-radius:var(--border-radius-circular);transform:translate(-50%,-50%);pointer-events:none}.nmorph-media-gallery__trigger-play .nmorph-icon{--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-media-gallery{display:contents}.nmorph-media-gallery .nmorph-media-gallery__stage{position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:100%;overflow:hidden;pointer-events:none}.nmorph-media-gallery .nmorph-image{width:100%;height:100%;transition:transform var(--transition-03) ease-in-out;pointer-events:none}.nmorph-media-gallery .nmorph-image img{display:block;width:auto;max-width:100%;height:auto;max-height:100%;object-fit:contain;pointer-events:auto}.nmorph-media-gallery .nmorph-media-gallery__video{display:block;width:100%;max-width:100%;height:100%;max-height:100%;background:var(--nmorph-black-color);border-radius:var(--default-border-radius);object-fit:contain;pointer-events:auto}.nmorph-media-gallery .nmorph-media-gallery__file-name,.nmorph-media-gallery .nmorph-media-gallery__file-size{position:absolute;z-index:2;display:block;box-sizing:border-box;min-width:0;min-height:22px;padding:0 6px;overflow:hidden;color:var(--nmorph-contrast-text-color);line-height:22px;white-space:nowrap;text-overflow:ellipsis;background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border-radius:var(--default-border-radius);pointer-events:none}.nmorph-media-gallery .nmorph-media-gallery__file-name{top:var(--indentation-02);left:var(--indentation-02);max-width:calc(100% - 56px);font-weight:600;font-size:var(--font-size-small)}.nmorph-media-gallery.nmorph-media-gallery--video .nmorph-media-gallery__file-name{max-width:calc(100% - 92px)}.nmorph-media-gallery .nmorph-media-gallery__file-size{right:var(--indentation-02);bottom:var(--indentation-02);max-width:calc(100% - var(--indentation-04));font-size:var(--font-size-extra-small)}.nmorph-media-gallery .nmorph-media-gallery__file-actions{position:absolute;top:var(--indentation-02);right:var(--indentation-02);z-index:3;display:flex;gap:var(--indentation-01);pointer-events:auto}.nmorph-media-gallery .nmorph-media-gallery__file-action{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;width:22px;height:22px;padding:0;color:var(--nmorph-contrast-text-color);font:inherit;line-height:1;text-decoration:none;background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border:0;border-radius:var(--default-border-radius);cursor:pointer}.nmorph-media-gallery .nmorph-media-gallery__file-action .nmorph-icon{flex:0 0 auto;--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-media-gallery .nmorph-media-gallery__file-action:hover{background:color-mix(in srgb,var(--nmorph-black-color) 72%,transparent)}.nmorph-media-gallery .nmorph-media-gallery__action-element{margin-right:var(--indentation-03)}.nmorph-media-gallery.nmorph-media-gallery--image-cover .nmorph-image img{width:100%;height:100%;object-fit:cover}.nmorph-media-gallery.nmorph-media-gallery--video-cover .nmorph-media-gallery__video{object-fit:cover}
|