@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.
@@ -1,7 +1,7 @@
1
1
  import './NmorphScroll.css';
2
- import { defineComponent as Pe, ref as c, computed as n, inject as we, onUnmounted as He, onMounted as ze, nextTick as G, watch as N, openBlock as T, createElementBlock as W, normalizeStyle as h, normalizeClass as Be, createElementVNode as M, renderSlot as Te, createCommentVNode as U } from "vue";
3
- import { useModifiers as We } from "../../../utils/create-modifiers.js";
4
- const ke = /* @__PURE__ */ Pe({
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(j, { expose: q, emit: A }) {
25
- const l = j, F = c(null), s = c(null), J = n(() => l.scrollYProp), K = n(() => l.scrollXProp), f = c(!1), g = c(!1), i = c({
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
- }), y = c(!1);
33
- let b, a, _ = "";
34
- const m = () => {
35
- const e = s.value;
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
- f.value = !1, g.value = !1, i.value = {
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, f.value = t.scrollHeight > t.clientHeight, g.value = t.scrollWidth > t.clientWidth;
56
- }, Q = n(() => l.yBarWidthInPx + l.yGapInPx), Z = n(() => l.xBarWidthInPx + l.xGapInPx), ee = n(
57
- () => l.scrollYProp === "hidden" || !f.value ? "0" : `${Q.value}px`
58
- ), te = n(
59
- () => l.scrollXProp === "hidden" || !g.value ? "0" : `${Z.value}px`
60
- ), k = n(() => `${l.yBarWidthInPx}px`), E = n(() => `${l.xBarWidthInPx}px`), oe = n(() => B.value ? E.value : "0px"), le = n(() => z.value ? k.value : "0px"), ne = we("nmorph");
61
- let v;
62
- const P = A, I = () => {
63
- const e = s.value;
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
- P("update:model-value", { x: t, y: o });
67
- }, re = () => {
68
- P("on-scroll-end");
69
- }, ae = (e) => {
70
- m(), P("on-scroll", e), s.value && (l.updateOnlyOnScrollEnd || I(), v !== void 0 && clearTimeout(v), v = setTimeout(() => {
71
- l.updateOnlyOnScrollEnd && I(), re();
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
- He(() => {
75
- v !== void 0 && clearTimeout(v), b?.disconnect(), V();
96
+ We(() => {
97
+ f !== void 0 && clearTimeout(f), w?.disconnect(), v?.disconnect(), z?.disconnect(), m.clear(), U();
76
98
  });
77
- const w = c(!1), ie = n(
78
- () => We({
99
+ const T = c(!1), he = r(
100
+ () => Le({
79
101
  "nmorph-scroll": {
80
- "show-bars": w.value || y.value,
81
- dragging: y.value
102
+ "show-bars": T.value || S.value,
103
+ dragging: S.value
82
104
  }
83
105
  })
84
- ), H = (e) => {
106
+ ), M = (e) => {
85
107
  const { x: t, y: o } = e;
86
- s.value?.scrollTo({
108
+ a.value?.scrollTo({
87
109
  left: t,
88
110
  top: o,
89
111
  behavior: "smooth"
90
112
  });
91
113
  };
92
- ze(() => {
93
- H(l.modelValue), G(m), typeof ResizeObserver < "u" && s.value && (b = new ResizeObserver(() => {
94
- m();
95
- }), b.observe(s.value));
96
- }), N(
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
- H(e);
121
+ M(e);
100
122
  },
101
123
  { deep: !0, immediate: !0 }
102
- ), N(
103
- () => ne?.browser.dimensions,
124
+ ), A(
125
+ () => ce?.browser.dimensions,
104
126
  () => {
105
- G(m);
127
+ p();
106
128
  },
107
129
  { deep: !0, immediate: !0 }
108
130
  );
109
- const se = n(() => l.cssScrollBehavior), ce = n(() => l.height), ue = n(() => l.maxHeight), de = n(() => ({
110
- "--bar-width": k.value,
111
- "--bar-height": E.value,
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: ce.value,
116
- maxHeight: ue.value
117
- })), he = n(() => ({
118
- paddingRight: ee.value,
119
- paddingBottom: te.value,
120
- overflowX: K.value,
121
- overflowY: J.value,
122
- scrollBehavior: se.value
123
- })), z = n(() => l.scrollYProp !== "hidden" && f.value), B = n(() => l.scrollXProp !== "hidden" && g.value), me = n(
124
- () => Math.max(0, i.value.clientHeight - (B.value ? l.xBarWidthInPx : 0))
125
- ), ve = n(
126
- () => Math.max(0, i.value.clientWidth - (z.value ? l.yBarWidthInPx : 0))
127
- ), p = (e) => e === "y" ? me.value : ve.value, L = (e) => e === "y" ? i.value.clientHeight : i.value.clientWidth, O = (e) => e === "y" ? i.value.scrollHeight : i.value.scrollWidth, D = (e) => e === "y" ? i.value.scrollTop : i.value.scrollLeft, pe = (e) => Math.min(p(e), Math.max(18, e === "y" ? l.yBarWidthInPx * 3 : l.xBarWidthInPx * 3)), S = (e) => Math.max(0, O(e) - L(e)), u = (e) => {
128
- const t = p(e), o = O(e), r = L(e);
129
- return t <= 0 || o <= r ? 0 : Math.min(t, Math.max(pe(e), r / o * t));
130
- }, C = (e) => {
131
- const t = S(e), o = Math.max(0, p(e) - u(e));
132
- return !t || !o ? 0 : D(e) / t * o;
133
- }, fe = n(() => ({
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, ${C("y")}px, 0)`
136
- })), ge = n(() => ({
157
+ transform: `translate3d(0, ${$("y")}px, 0)`
158
+ })), Pe = r(() => ({
137
159
  width: `${u("x")}px`,
138
- transform: `translate3d(${C("x")}px, 0, 0)`
139
- })), R = (e, t) => {
140
- const o = s.value;
160
+ transform: `translate3d(${$("x")}px, 0, 0)`
161
+ })), G = (e, t) => {
162
+ const o = a.value;
141
163
  if (!o) return;
142
- const r = Math.max(0, Math.min(S(e), t));
143
- e === "y" ? o.scrollTop = r : o.scrollLeft = r, m();
144
- }, V = () => {
145
- a && (window.removeEventListener("pointermove", X), window.removeEventListener("pointerup", x), window.removeEventListener("pointercancel", x), a = void 0, y.value = !1, document.body && (document.body.style.userSelect = _));
146
- }, X = (e) => {
147
- if (!a) return;
148
- const o = (a.axis === "y" ? e.clientY : e.clientX) - a.pointerStart, r = Math.max(1, a.trackSize - a.thumbSize), d = o / r * a.maxScroll;
149
- R(a.axis, a.scrollStart + d);
150
- }, x = () => {
151
- V();
152
- }, Y = (e, t) => {
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 = p(e), r = u(e), d = S(e);
155
- !o || !r || !d || (a = {
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: D(e),
180
+ scrollStart: Y(e),
159
181
  trackSize: o,
160
- thumbSize: r,
182
+ thumbSize: n,
161
183
  maxScroll: d
162
- }, y.value = !0, _ = document.body?.style.userSelect ?? "", document.body && (document.body.style.userSelect = "none"), window.addEventListener("pointermove", X), window.addEventListener("pointerup", x), window.addEventListener("pointercancel", x));
163
- }, $ = (e, t) => {
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 r = t.currentTarget.getBoundingClientRect(), d = e === "y" ? t.clientY - r.top : t.clientX - r.left, xe = Math.max(1, p(e) - u(e)), be = (d - u(e) / 2) / xe * S(e);
166
- R(e, be);
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
- q({ scrollDOMContainer: s, moveTo: H });
169
- const ye = () => {
170
- w.value = !0;
171
- }, Se = () => {
172
- w.value = !1;
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) => (T(), W("div", {
196
+ return (e, t) => (O(), _("div", {
175
197
  ref_key: "scrollRoot",
176
- ref: F,
177
- class: Be(ie.value),
178
- style: h(de.value),
179
- onMouseenter: ye,
180
- onMouseleave: Se
198
+ ref: Z,
199
+ class: Oe(he.value),
200
+ style: h(fe.value),
201
+ onMouseenter: we,
202
+ onMouseleave: ze
181
203
  }, [
182
- M("div", {
204
+ k("div", {
183
205
  ref_key: "scrollDOMContainer",
184
- ref: s,
206
+ ref: a,
185
207
  class: "nmorph-scroll__viewport",
186
- style: h(he.value),
187
- onScroll: ae
208
+ style: h(ge.value),
209
+ onScroll: de
188
210
  }, [
189
- Te(e.$slots, "default")
211
+ _e(e.$slots, "default")
190
212
  ], 36),
191
- z.value ? (T(), W("div", {
213
+ W.value ? (O(), _("div", {
192
214
  key: 0,
193
215
  class: "nmorph-scroll__bar nmorph-scroll__bar--vertical",
194
- style: h({ bottom: oe.value }),
195
- onPointerdown: t[1] || (t[1] = (o) => $("y", o))
216
+ style: h({ bottom: se.value }),
217
+ onPointerdown: t[1] || (t[1] = (o) => q("y", o))
196
218
  }, [
197
- M("div", {
219
+ k("div", {
198
220
  class: "nmorph-scroll__thumb nmorph-scroll__thumb--vertical",
199
- style: h(fe.value),
200
- onPointerdown: t[0] || (t[0] = (o) => Y("y", o))
221
+ style: h(xe.value),
222
+ onPointerdown: t[0] || (t[0] = (o) => j("y", o))
201
223
  }, null, 36)
202
- ], 36)) : U("", !0),
203
- B.value ? (T(), W("div", {
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: le.value }),
207
- onPointerdown: t[3] || (t[3] = (o) => $("x", o))
228
+ style: h({ right: ie.value }),
229
+ onPointerdown: t[3] || (t[3] = (o) => q("x", o))
208
230
  }, [
209
- M("div", {
231
+ k("div", {
210
232
  class: "nmorph-scroll__thumb nmorph-scroll__thumb--horizontal",
211
- style: h(ge.value),
212
- onPointerdown: t[2] || (t[2] = (o) => Y("x", o))
233
+ style: h(Pe.value),
234
+ onPointerdown: t[2] || (t[2] = (o) => j("x", o))
213
235
  }, null, 36)
214
- ], 36)) : U("", !0)
236
+ ], 36)) : F("", !0)
215
237
  ], 38));
216
238
  }
217
239
  });
218
240
  export {
219
- ke as default
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-gallery__play{position:absolute;top:50%;left:50%;z-index:1;display:inline-flex;justify-content:center;align-items:center;width:54px;height:54px;padding:0;color:var(--nmorph-contrast-text-color);background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border:0;border-radius:var(--border-radius-circular);transform:translate(-50%,-50%);cursor:pointer;pointer-events:auto}.nmorph-media-gallery .nmorph-media-gallery__play .nmorph-icon{--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-media-gallery .nmorph-media-gallery__play:hover{background:color-mix(in srgb,var(--nmorph-black-color) 72%,transparent)}.nmorph-media-gallery.nmorph-media-gallery--video-playing .nmorph-media-gallery__play{opacity:.72}.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}
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}