@cntrl-site/components 1.0.107-alpha.3 → 1.0.107-alpha.4
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/{ArchivePopup-VGeTHbYB.mjs → ArchivePopup-BxBwrctO.mjs} +215 -201
- package/dist/ArchivePopup-Dc2eKEqf.js +190 -0
- package/dist/{ArchivePopupComponent-CJz4GmEb.js → ArchivePopupComponent-BWLaTjap.js} +1 -1
- package/dist/{ArchivePopupComponent-Dwh1vyqt.mjs → ArchivePopupComponent-DA_D-g4H.mjs} +462 -461
- package/dist/Components/ArchivePopup/ArchivePopup.d.ts +4 -2
- package/dist/{components-Do0vh-Ly.js → components-D_zkX3D5.js} +1 -1
- package/dist/{components-CNE9For4.mjs → components-TTO7gMs8.mjs} +1 -1
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +1 -1
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +2 -2
- package/dist/sources.js +33 -14
- package/dist/sources.mjs +33 -14
- package/package.json +1 -1
- package/dist/ArchivePopup-CusTMh5M.js +0 -187
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { useRef as A, useState as
|
|
3
|
-
import { createPortal as
|
|
1
|
+
import { jsx as s, jsxs as x, Fragment as Be } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as A, useState as f, useMemo as Ne, useEffect as $, useCallback as Ct, useLayoutEffect as Te, Fragment as bt } from "react";
|
|
3
|
+
import { createPortal as xt } from "react-dom";
|
|
4
4
|
import C from "classnames";
|
|
5
|
-
import { s as
|
|
6
|
-
import { b as
|
|
7
|
-
import { u as
|
|
8
|
-
import { R as
|
|
5
|
+
import { s as Lt } from "./scalingValue-C9JH5L6O.mjs";
|
|
6
|
+
import { b as At } from "./buildColorVars-CLyWQm5K.mjs";
|
|
7
|
+
import { u as _t } from "./useScopedStyles-DhBG3557.mjs";
|
|
8
|
+
import { R as It } from "./RichTextRenderer-BptwNpbJ.mjs";
|
|
9
9
|
import { o as Oe, t as Fe } from "./textStylesToCss-05Mn6I_2.mjs";
|
|
10
|
-
import { u as
|
|
11
|
-
const
|
|
10
|
+
import { u as Rt } from "./useLightboxScrollLock-VQ07s7EJ.mjs";
|
|
11
|
+
const St = 1, De = 2, Et = 5, Mt = ["title2", "title3", "title4"], B = ["column1Width", "column2Width", "column3Width", "column4Width"], ee = {
|
|
12
12
|
center: { x: "50%", y: "50%" },
|
|
13
13
|
"left-top": { x: "0%", y: "0%" },
|
|
14
14
|
"top-center": { x: "50%", y: "0%" },
|
|
@@ -18,7 +18,7 @@ const Q = 2, Rt = 5, St = ["title2", "title3", "title4"], B = ["column1Width", "
|
|
|
18
18
|
"left-bottom": { x: "0%", y: "100%" },
|
|
19
19
|
"bottom-center": { x: "50%", y: "100%" },
|
|
20
20
|
"right-bottom": { x: "100%", y: "100%" }
|
|
21
|
-
},
|
|
21
|
+
}, no = Object.keys(ee), Nt = ["column1", "column2", "column3", "column4", "column5"], Tt = {
|
|
22
22
|
triggerColor: "trigger-color",
|
|
23
23
|
triggerHoverColor: "trigger-hover-color",
|
|
24
24
|
closeColor: "close-color",
|
|
@@ -27,38 +27,38 @@ const Q = 2, Rt = 5, St = ["title2", "title3", "title4"], B = ["column1Width", "
|
|
|
27
27
|
textColor: "text-color",
|
|
28
28
|
textHoverColor: "text-hover-color",
|
|
29
29
|
overlayColor: "overlay-color"
|
|
30
|
-
},
|
|
30
|
+
}, Ot = ["hover", "open"], F = 300, Ve = 4e-3, He = 4e-3, Ft = 20, We = 0.0139, ke = 0.3194, Ge = { top: 972e-5, right: 972e-5, bottom: 972e-5, left: 972e-5 }, je = 300, Ht = 1e3, Ut = [
|
|
31
31
|
"--cntrl-article-width",
|
|
32
32
|
"--cntrl-article-top",
|
|
33
33
|
"--cntrl-article-left",
|
|
34
34
|
"--cntrl-viewport-height"
|
|
35
35
|
];
|
|
36
36
|
function D(e) {
|
|
37
|
-
return Math.min(Math.max(Math.round(e ??
|
|
37
|
+
return Math.min(Math.max(Math.round(e ?? De), St), Et);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
const { panelWidth: o =
|
|
39
|
+
function Ke(e) {
|
|
40
|
+
const { panelWidth: o = ke, panelPadding: n = Ge, columnGap: i = We } = e, a = (D(e.columns) - 1) * i;
|
|
41
41
|
return Math.max(0, o - n.left - n.right - a);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
const o = D(e.columns), n =
|
|
43
|
+
function zt(e) {
|
|
44
|
+
const o = D(e.columns), n = Ke(e) / o;
|
|
45
45
|
return Object.fromEntries(B.slice(0, o - 1).map((i) => [i, n]));
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
const o = D(e.columns), n =
|
|
47
|
+
function Bt(e) {
|
|
48
|
+
const o = D(e.columns), n = Ke(e), i = B.slice(0, o - 1).map((p) => {
|
|
49
49
|
const d = e[p];
|
|
50
50
|
return typeof d == "number" ? Math.max(0, d) : n / o;
|
|
51
51
|
}), a = i.reduce((p, d) => p + d, 0), c = a > n ? n / a : 1;
|
|
52
52
|
return [...i.map((p) => p * c), Math.max(0, n - a * c)];
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
return typeof e.columns != "number" || e.columns === o.columns ? e : { ...e, ...
|
|
54
|
+
function ro(e, o) {
|
|
55
|
+
return typeof e.columns != "number" || e.columns === o.columns ? e : { ...e, ...zt({ ...o, ...e }) };
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Dt(e) {
|
|
58
58
|
const o = e.reduce((n, i) => n + i, 0);
|
|
59
59
|
return e.map((n) => `minmax(0, ${o > 0 ? n / o * 100 : 1}fr)`).join(" ");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Vt(e) {
|
|
62
62
|
const o = [];
|
|
63
63
|
return e.forEach((n, i) => {
|
|
64
64
|
var u;
|
|
@@ -74,10 +74,10 @@ function z(e) {
|
|
|
74
74
|
const { image: o } = e ?? {};
|
|
75
75
|
return (Array.isArray(o) ? o : o ? [o] : []).filter((n) => !!(n != null && n.assetId));
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function Xe(e) {
|
|
78
78
|
return e.type === "video" ? !0 : e.type === "image" ? !1 : /\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name ?? "") || /\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Wt(e) {
|
|
81
81
|
let o = e;
|
|
82
82
|
for (; o; ) {
|
|
83
83
|
if (getComputedStyle(o).getPropertyValue("--cntrl-article-width").trim())
|
|
@@ -86,17 +86,17 @@ function Ut(e) {
|
|
|
86
86
|
}
|
|
87
87
|
return e;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
const o = {}, n =
|
|
89
|
+
function Ue(e) {
|
|
90
|
+
const o = {}, n = Wt(e);
|
|
91
91
|
if (!n) return o;
|
|
92
92
|
const i = getComputedStyle(n);
|
|
93
|
-
for (const a of
|
|
93
|
+
for (const a of Ut) {
|
|
94
94
|
const c = i.getPropertyValue(a).trim();
|
|
95
95
|
c && (o[a] = c);
|
|
96
96
|
}
|
|
97
97
|
return o;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function ze(e, o, n) {
|
|
100
100
|
const i = e, a = (u) => i[`${o}${u}`] ?? (n ? i[`${n}${u}`] : void 0), c = a("FontSettings");
|
|
101
101
|
return {
|
|
102
102
|
fontSettings: {
|
|
@@ -113,7 +113,7 @@ function Be(e, o, n) {
|
|
|
113
113
|
color: "#000000"
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function kt(e) {
|
|
117
117
|
return `
|
|
118
118
|
.${e}-trigger,
|
|
119
119
|
.${e}-close {
|
|
@@ -131,7 +131,7 @@ function Vt(e) {
|
|
|
131
131
|
}
|
|
132
132
|
.${e}-trigger {
|
|
133
133
|
color: var(--${e}-trigger-color);
|
|
134
|
-
transition: color 150ms ease, opacity ${
|
|
134
|
+
transition: color 150ms ease, opacity ${F}ms ease;
|
|
135
135
|
}
|
|
136
136
|
.${e}-trigger-hidden {
|
|
137
137
|
opacity: 0;
|
|
@@ -166,7 +166,7 @@ function Vt(e) {
|
|
|
166
166
|
overscroll-behavior: none;
|
|
167
167
|
opacity: 0;
|
|
168
168
|
pointer-events: none;
|
|
169
|
-
transition: opacity ${
|
|
169
|
+
transition: opacity ${F}ms ease;
|
|
170
170
|
}
|
|
171
171
|
.${e}-inline-layer {
|
|
172
172
|
position: fixed;
|
|
@@ -206,7 +206,7 @@ function Vt(e) {
|
|
|
206
206
|
height: 100%;
|
|
207
207
|
object-fit: cover;
|
|
208
208
|
opacity: 0;
|
|
209
|
-
transition: opacity ${
|
|
209
|
+
transition: opacity ${je}ms cubic-bezier(0, 0, 0.58, 1);
|
|
210
210
|
}
|
|
211
211
|
.${e}-media-contain {
|
|
212
212
|
object-fit: contain;
|
|
@@ -231,7 +231,7 @@ function Vt(e) {
|
|
|
231
231
|
background-color: var(--${e}-panel-color);
|
|
232
232
|
color: var(--${e}-text-color);
|
|
233
233
|
overscroll-behavior: contain;
|
|
234
|
-
transition: transform ${
|
|
234
|
+
transition: transform ${F}ms cubic-bezier(0, 0, 0.58, 1);
|
|
235
235
|
}
|
|
236
236
|
.${e}-overlay-active .${e}-panel {
|
|
237
237
|
transform: translate(calc(-1 * var(--${e}-panel-x)), calc(-1 * var(--${e}-panel-y)));
|
|
@@ -276,6 +276,9 @@ function Vt(e) {
|
|
|
276
276
|
grid-template-columns: subgrid;
|
|
277
277
|
align-items: baseline;
|
|
278
278
|
}
|
|
279
|
+
.${e}-group-unlabeled .${e}-row {
|
|
280
|
+
grid-column: 1 / -1;
|
|
281
|
+
}
|
|
279
282
|
.${e}-group-label {
|
|
280
283
|
grid-column: 1;
|
|
281
284
|
align-self: start;
|
|
@@ -297,17 +300,17 @@ function Vt(e) {
|
|
|
297
300
|
}
|
|
298
301
|
.${e}-interactive .${e}-row:hover .${e}-title,
|
|
299
302
|
.${e}-row:focus-within .${e}-title,
|
|
300
|
-
.${e}-state-hover .${e}-
|
|
303
|
+
.${e}-state-hover .${e}-row:first-of-type .${e}-title {
|
|
301
304
|
color: var(--${e}-text-hover-color, var(--${e}-text-color));
|
|
302
305
|
}
|
|
303
306
|
`;
|
|
304
307
|
}
|
|
305
|
-
function
|
|
308
|
+
function Gt({
|
|
306
309
|
P: e,
|
|
307
310
|
media: o,
|
|
308
311
|
isVisible: n
|
|
309
312
|
}) {
|
|
310
|
-
const i = A(null), [a, c] =
|
|
313
|
+
const i = A(null), [a, c] = f(!1), u = Xe(o), p = C(
|
|
311
314
|
`${e}-media`,
|
|
312
315
|
o.objectFit === "contain" && `${e}-media-contain`,
|
|
313
316
|
n && a && `${e}-media-visible`
|
|
@@ -340,7 +343,7 @@ function Wt({
|
|
|
340
343
|
}
|
|
341
344
|
);
|
|
342
345
|
}
|
|
343
|
-
function
|
|
346
|
+
function jt(e, o, n, i, a) {
|
|
344
347
|
const c = o[o.length - 1];
|
|
345
348
|
let u = n;
|
|
346
349
|
return o.slice(0, -1).map((p, d) => {
|
|
@@ -351,7 +354,7 @@ function kt(e, o, n, i, a) {
|
|
|
351
354
|
"data-controls": B[d],
|
|
352
355
|
"data-controls-axis": "x",
|
|
353
356
|
"data-controls-variant": "column-width",
|
|
354
|
-
"data-controls-min": String(
|
|
357
|
+
"data-controls-min": String(Ft),
|
|
355
358
|
"data-controls-max-fraction": String(p + c),
|
|
356
359
|
className: `${e}-control-anchor`,
|
|
357
360
|
style: { top: 0, left: a(r - He / 2), width: a(He), height: "100%" }
|
|
@@ -360,9 +363,9 @@ function kt(e, o, n, i, a) {
|
|
|
360
363
|
);
|
|
361
364
|
});
|
|
362
365
|
}
|
|
363
|
-
function
|
|
364
|
-
const a = (c) => i(Math.max(c,
|
|
365
|
-
return /* @__PURE__ */
|
|
366
|
+
function Kt(e, o, n, i) {
|
|
367
|
+
const a = (c) => i(Math.max(c, Ve));
|
|
368
|
+
return /* @__PURE__ */ x(Be, { children: [
|
|
366
369
|
/* @__PURE__ */ s(
|
|
367
370
|
"div",
|
|
368
371
|
{
|
|
@@ -413,7 +416,7 @@ function Gt(e, o, n, i) {
|
|
|
413
416
|
)
|
|
414
417
|
] });
|
|
415
418
|
}
|
|
416
|
-
function
|
|
419
|
+
function ao({
|
|
417
420
|
settings: e,
|
|
418
421
|
content: o,
|
|
419
422
|
isEditor: n,
|
|
@@ -425,167 +428,167 @@ function no({
|
|
|
425
428
|
unavailableStates: d
|
|
426
429
|
}) {
|
|
427
430
|
var Ee;
|
|
428
|
-
const { prefix: r } =
|
|
429
|
-
type:
|
|
430
|
-
triggerLabel:
|
|
431
|
-
closeLabel:
|
|
432
|
-
columns:
|
|
433
|
-
columnGap:
|
|
434
|
-
hoverInterval:
|
|
435
|
-
panelPosition:
|
|
436
|
-
panelWidth:
|
|
437
|
-
panelPadding: _ =
|
|
438
|
-
panelRadius:
|
|
439
|
-
groupGap:
|
|
440
|
-
triggerColor:
|
|
441
|
-
triggerHoverColor:
|
|
442
|
-
closeColor:
|
|
443
|
-
closeHoverColor:
|
|
444
|
-
panelColor:
|
|
445
|
-
textColor:
|
|
446
|
-
textHoverColor:
|
|
447
|
-
overlayColor:
|
|
448
|
-
} = e,
|
|
449
|
-
|
|
450
|
-
N && !i &&
|
|
431
|
+
const { prefix: r } = _t(), {
|
|
432
|
+
type: Ye = "b",
|
|
433
|
+
triggerLabel: te = "Archive",
|
|
434
|
+
closeLabel: qe = "Close",
|
|
435
|
+
columns: Ze = De,
|
|
436
|
+
columnGap: oe = We,
|
|
437
|
+
hoverInterval: ne = Ht,
|
|
438
|
+
panelPosition: Je,
|
|
439
|
+
panelWidth: re = ke,
|
|
440
|
+
panelPadding: _ = Ge,
|
|
441
|
+
panelRadius: Qe = 0,
|
|
442
|
+
groupGap: ae = 0.0139,
|
|
443
|
+
triggerColor: Pe = "#000000",
|
|
444
|
+
triggerHoverColor: et = "#666666",
|
|
445
|
+
closeColor: tt = "#000000",
|
|
446
|
+
closeHoverColor: ot = "#666666",
|
|
447
|
+
panelColor: nt = "#FFFFFF",
|
|
448
|
+
textColor: rt = "#333132",
|
|
449
|
+
textHoverColor: at = "#BBBBBB",
|
|
450
|
+
overlayColor: lt = "#FFFFFFE6"
|
|
451
|
+
} = e, V = o ?? [], W = A(null), k = A(null), G = A(null), le = A(null), ie = A(null), ce = A(null), [it, H] = f(!1), [E, se] = f(!1), [M, ue] = f(!1), [de, pe] = f(!1), [h, I] = f(null), [ct, me] = f(0), [ge, st] = f(() => /* @__PURE__ */ new Set()), [L, ut] = f(null), [fe, he] = f({}), [R, j] = f(null), [dt, ve] = f(!1), N = !!(n && !a), y = !n || !!a, g = Ye === "a", pt = N && p === "open" && !(d != null && d.includes("open")), w = !g && (pt || (y || !!i) && it), v = (t) => Lt(t, n ?? !1), mt = Ne(() => kt(r), [r]), $e = ee[Je] ?? ee.center, K = D(Ze), ye = Bt(e), gt = ["title", ...Mt].slice(0, K - 1), T = K > 1, ft = Ne(() => T ? Vt(o ?? []) : [{ label: "", rows: (o ?? []).map((t, l) => ({ item: t, index: l })) }], [o, T]);
|
|
452
|
+
Rt(w && !N), $(() => {
|
|
453
|
+
N && !i && H(!1);
|
|
451
454
|
}, [N, i]), $(() => {
|
|
452
455
|
if (w) {
|
|
453
|
-
|
|
456
|
+
he(Ue(W.current)), se(!0);
|
|
454
457
|
return;
|
|
455
458
|
}
|
|
456
|
-
|
|
457
|
-
const t = window.setTimeout(() =>
|
|
459
|
+
ue(!1), I(null);
|
|
460
|
+
const t = window.setTimeout(() => se(!1), F);
|
|
458
461
|
return () => window.clearTimeout(t);
|
|
459
462
|
}, [w]), $(() => {
|
|
460
463
|
var l;
|
|
461
464
|
if (!w || !E) return;
|
|
462
|
-
(l =
|
|
463
|
-
const t = requestAnimationFrame(() =>
|
|
465
|
+
(l = G.current) == null || l.getBoundingClientRect();
|
|
466
|
+
const t = requestAnimationFrame(() => ue(!0));
|
|
464
467
|
return () => cancelAnimationFrame(t);
|
|
465
468
|
}, [w, E]), $(() => {
|
|
466
469
|
if (!M) {
|
|
467
|
-
|
|
470
|
+
pe(!1);
|
|
468
471
|
return;
|
|
469
472
|
}
|
|
470
|
-
const t = window.setTimeout(() =>
|
|
473
|
+
const t = window.setTimeout(() => pe(!0), F);
|
|
471
474
|
return () => window.clearTimeout(t);
|
|
472
475
|
}, [M]);
|
|
473
|
-
const
|
|
474
|
-
const t =
|
|
476
|
+
const U = Ct(() => {
|
|
477
|
+
const t = k.current, l = G.current;
|
|
475
478
|
if (!t || !l) return;
|
|
476
|
-
const m = t.getBoundingClientRect(),
|
|
477
|
-
|
|
479
|
+
const m = t.getBoundingClientRect(), b = l.getBoundingClientRect();
|
|
480
|
+
ut({ top: m.top - b.top, left: m.left - b.left });
|
|
478
481
|
}, []);
|
|
479
482
|
Te(() => {
|
|
480
483
|
if (E)
|
|
481
|
-
return
|
|
482
|
-
}, [E,
|
|
484
|
+
return U(), window.addEventListener("resize", U), () => window.removeEventListener("resize", U);
|
|
485
|
+
}, [E, U]), $(() => {
|
|
483
486
|
var l;
|
|
484
487
|
if (!w || !y) return;
|
|
485
|
-
(l =
|
|
488
|
+
(l = le.current) == null || l.focus({ preventScroll: !0 });
|
|
486
489
|
const t = (m) => {
|
|
487
|
-
m.key === "Escape" &&
|
|
490
|
+
m.key === "Escape" && H(!1);
|
|
488
491
|
};
|
|
489
492
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
490
493
|
}, [w, y]), Te(() => {
|
|
491
|
-
if (!
|
|
492
|
-
const t =
|
|
494
|
+
if (!g || h === null) return;
|
|
495
|
+
const t = ie.current, l = ce.current;
|
|
493
496
|
if (!t || !l) return;
|
|
494
|
-
const m = t.getBoundingClientRect(),
|
|
495
|
-
|
|
496
|
-
}, [
|
|
497
|
-
if (
|
|
498
|
-
const t = window.setTimeout(() =>
|
|
497
|
+
const m = t.getBoundingClientRect(), b = l.getBoundingClientRect();
|
|
498
|
+
j({ top: m.top - b.top, left: m.left - b.left, width: m.width });
|
|
499
|
+
}, [g, h]), $(() => {
|
|
500
|
+
if (h !== null) return;
|
|
501
|
+
const t = window.setTimeout(() => j(null), je);
|
|
499
502
|
return () => window.clearTimeout(t);
|
|
500
|
-
}, [
|
|
503
|
+
}, [h]);
|
|
501
504
|
const we = R !== null;
|
|
502
505
|
$(() => {
|
|
503
|
-
if (!
|
|
506
|
+
if (!g || !we) return;
|
|
504
507
|
const t = () => {
|
|
505
|
-
ve(!0), I(null),
|
|
508
|
+
ve(!0), I(null), j(null);
|
|
506
509
|
};
|
|
507
510
|
return document.addEventListener("scroll", t, { capture: !0, passive: !0 }), window.addEventListener("resize", t), () => {
|
|
508
511
|
document.removeEventListener("scroll", t, { capture: !0 }), window.removeEventListener("resize", t);
|
|
509
512
|
};
|
|
510
|
-
}, [
|
|
513
|
+
}, [g, we]);
|
|
511
514
|
const Ce = () => {
|
|
512
515
|
var t;
|
|
513
|
-
y && (
|
|
514
|
-
}, be = y && (
|
|
516
|
+
y && (H(!1), (t = k.current) == null || t.focus({ preventScroll: !0 }));
|
|
517
|
+
}, be = y && (g || w);
|
|
515
518
|
$(() => {
|
|
516
519
|
be && (o ?? []).forEach((t) => z(t).forEach((l) => {
|
|
517
|
-
|
|
520
|
+
Xe(l) || (new Image().src = l.assetId);
|
|
518
521
|
}));
|
|
519
522
|
}, [be, o]);
|
|
520
|
-
const
|
|
523
|
+
const X = h === null ? 0 : z(V[h]).length;
|
|
521
524
|
$(() => {
|
|
522
|
-
if (
|
|
525
|
+
if (X < 2) return;
|
|
523
526
|
const t = window.setInterval(() => {
|
|
524
|
-
|
|
525
|
-
}, Math.max(100,
|
|
527
|
+
me((l) => (l + 1) % X);
|
|
528
|
+
}, Math.max(100, ne));
|
|
526
529
|
return () => window.clearInterval(t);
|
|
527
|
-
}, [
|
|
530
|
+
}, [h, X, ne]);
|
|
528
531
|
const xe = (t) => {
|
|
529
|
-
if (!y || z(
|
|
532
|
+
if (!y || z(V[t]).length === 0) {
|
|
530
533
|
I(null);
|
|
531
534
|
return;
|
|
532
535
|
}
|
|
533
|
-
|
|
536
|
+
st((l) => l.has(t) ? l : new Set(l).add(t)), g && h === null && he(Ue(W.current)), h !== t && me(0), ve(!1), I(t);
|
|
534
537
|
}, Le = (t) => {
|
|
535
538
|
I((l) => l === t ? null : l);
|
|
536
|
-
},
|
|
539
|
+
}, ht = (t) => {
|
|
537
540
|
!y && t.target.closest("a") && t.preventDefault();
|
|
538
|
-
}, Ae = Oe(Fe(
|
|
539
|
-
triggerColor:
|
|
540
|
-
triggerHoverColor:
|
|
541
|
-
closeColor:
|
|
542
|
-
closeHoverColor:
|
|
543
|
-
panelColor:
|
|
544
|
-
textColor:
|
|
545
|
-
textHoverColor:
|
|
546
|
-
overlayColor:
|
|
547
|
-
},
|
|
548
|
-
|
|
541
|
+
}, Ae = Oe(Fe(ze(e, "trigger"), n)), O = Nt.slice(0, K).map((t) => Oe(Fe(ze(e, t, "list"), n))), _e = O[0].lineHeight, Ie = (Ee = O[1]) == null ? void 0 : Ee.lineHeight, vt = _e !== void 0 && Ie !== void 0 ? `calc((${Ie} - ${_e}) / 2)` : void 0, Y = At(r, {
|
|
542
|
+
triggerColor: Pe,
|
|
543
|
+
triggerHoverColor: et,
|
|
544
|
+
closeColor: tt,
|
|
545
|
+
closeHoverColor: ot,
|
|
546
|
+
panelColor: nt,
|
|
547
|
+
textColor: rt,
|
|
548
|
+
textHoverColor: at,
|
|
549
|
+
overlayColor: lt
|
|
550
|
+
}, Tt, Ot), q = c && c !== "default" ? `${r}-state-${c}` : "", Z = y ? `${r}-interactive` : "", Re = /* @__PURE__ */ s("div", { className: C(`${r}-media-layer`, dt && `${r}-media-layer-instant`), "aria-hidden": "true", children: [...ge].flatMap((t) => z(V[t]).map((l, m) => /* @__PURE__ */ s(
|
|
551
|
+
Gt,
|
|
549
552
|
{
|
|
550
553
|
P: r,
|
|
551
554
|
media: l,
|
|
552
|
-
isVisible:
|
|
555
|
+
isVisible: h === t && ct === m
|
|
553
556
|
},
|
|
554
557
|
`${t}-${m}-${l.assetId}`
|
|
555
|
-
))) }),
|
|
558
|
+
))) }), J = !!i && (g || de), Q = (t) => /* @__PURE__ */ x(
|
|
556
559
|
"div",
|
|
557
560
|
{
|
|
558
|
-
ref: t ? void 0 :
|
|
561
|
+
ref: t ? void 0 : ie,
|
|
559
562
|
className: C(
|
|
560
563
|
`${r}-panel`,
|
|
561
564
|
// Only the open and close slide; once open, a new position or size moves the panel straight there.
|
|
562
|
-
M &&
|
|
563
|
-
|
|
565
|
+
M && de && `${r}-panel-settled`,
|
|
566
|
+
g && `${r}-panel-inline`,
|
|
564
567
|
t && `${r}-panel-copy`
|
|
565
568
|
),
|
|
566
569
|
style: {
|
|
567
|
-
width:
|
|
568
|
-
paddingTop:
|
|
569
|
-
paddingRight:
|
|
570
|
-
paddingBottom:
|
|
571
|
-
paddingLeft:
|
|
572
|
-
borderRadius:
|
|
573
|
-
[`--${r}-group-gap`]:
|
|
574
|
-
[`--${r}-panel-x`]:
|
|
575
|
-
[`--${r}-panel-y`]:
|
|
576
|
-
[`--${r}-grid-columns`]:
|
|
577
|
-
[`--${r}-column-gap`]:
|
|
570
|
+
width: v(re),
|
|
571
|
+
paddingTop: v(_.top),
|
|
572
|
+
paddingRight: v(_.right),
|
|
573
|
+
paddingBottom: v(_.bottom),
|
|
574
|
+
paddingLeft: v(_.left),
|
|
575
|
+
borderRadius: v(Qe),
|
|
576
|
+
[`--${r}-group-gap`]: v(ae),
|
|
577
|
+
[`--${r}-panel-x`]: $e.x,
|
|
578
|
+
[`--${r}-panel-y`]: $e.y,
|
|
579
|
+
[`--${r}-grid-columns`]: Dt(ye),
|
|
580
|
+
[`--${r}-column-gap`]: v(oe),
|
|
578
581
|
...t && R ? { top: R.top, left: R.left, width: R.width } : {}
|
|
579
582
|
},
|
|
580
|
-
"data-lightbox-scrollable":
|
|
583
|
+
"data-lightbox-scrollable": g ? void 0 : "",
|
|
581
584
|
"aria-hidden": t || void 0,
|
|
582
585
|
onMouseLeave: t ? void 0 : () => I(null),
|
|
583
|
-
onClickCapture: t ? void 0 :
|
|
586
|
+
onClickCapture: t ? void 0 : ht,
|
|
584
587
|
children: [
|
|
585
|
-
!t &&
|
|
586
|
-
!t &&
|
|
587
|
-
|
|
588
|
-
!t &&
|
|
588
|
+
!t && J && Kt(r, re, _, v),
|
|
589
|
+
!t && J && jt(r, ye, _.left, oe, v),
|
|
590
|
+
ft.map((l, m) => /* @__PURE__ */ x(bt, { children: [
|
|
591
|
+
!t && J && m > 0 && // Left at its static top, the anchor sits right where the gap above this group starts.
|
|
589
592
|
/* @__PURE__ */ s(
|
|
590
593
|
"div",
|
|
591
594
|
{
|
|
@@ -595,55 +598,65 @@ function no({
|
|
|
595
598
|
"data-controls-reverse": "",
|
|
596
599
|
"data-controls-min": "0",
|
|
597
600
|
className: `${r}-control-anchor`,
|
|
598
|
-
style: { left: 0, width: "100%", height:
|
|
601
|
+
style: { left: 0, width: "100%", height: v(Math.max(ae, Ve)) }
|
|
599
602
|
}
|
|
600
603
|
),
|
|
601
|
-
/* @__PURE__ */
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
{
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
604
|
+
/* @__PURE__ */ x(
|
|
605
|
+
"div",
|
|
606
|
+
{
|
|
607
|
+
className: C(`${r}-group`, !T && `${r}-group-unlabeled`),
|
|
608
|
+
style: { gridTemplateRows: `repeat(${l.rows.length}, auto) 1fr` },
|
|
609
|
+
children: [
|
|
610
|
+
T && /* @__PURE__ */ s(
|
|
611
|
+
"span",
|
|
612
|
+
{
|
|
613
|
+
className: `${r}-group-label`,
|
|
614
|
+
style: { ...O[0], gridRow: `1 / span ${l.rows.length + 1}`, marginTop: vt },
|
|
615
|
+
children: l.label
|
|
616
|
+
}
|
|
617
|
+
),
|
|
618
|
+
l.rows.map(({ item: b, index: S }) => /* @__PURE__ */ x(
|
|
619
|
+
"div",
|
|
620
|
+
{
|
|
621
|
+
className: C(`${r}-row`, t && S === h && `${r}-row-active`),
|
|
622
|
+
...t ? {} : {
|
|
623
|
+
onMouseEnter: () => xe(S),
|
|
624
|
+
onMouseLeave: () => Le(S),
|
|
625
|
+
onFocus: () => xe(S),
|
|
626
|
+
onBlur: () => Le(S)
|
|
627
|
+
},
|
|
628
|
+
children: [
|
|
629
|
+
!T && /* @__PURE__ */ s("div", { className: `${r}-title`, style: O[0], children: b.group }),
|
|
630
|
+
gt.map((Me, wt) => {
|
|
631
|
+
const P = b[Me];
|
|
632
|
+
return /* @__PURE__ */ s("div", { className: `${r}-title`, style: O[wt + 1], children: Array.isArray(P) ? /* @__PURE__ */ s(It, { content: P }) : P }, Me);
|
|
633
|
+
})
|
|
634
|
+
]
|
|
635
|
+
},
|
|
636
|
+
S
|
|
637
|
+
))
|
|
638
|
+
]
|
|
639
|
+
}
|
|
640
|
+
)
|
|
628
641
|
] }, m))
|
|
629
642
|
]
|
|
630
643
|
}
|
|
631
|
-
),
|
|
644
|
+
), $t = E ? /* @__PURE__ */ x(
|
|
632
645
|
"div",
|
|
633
646
|
{
|
|
634
|
-
ref:
|
|
647
|
+
ref: G,
|
|
635
648
|
className: C(
|
|
636
649
|
`${r}-overlay`,
|
|
637
650
|
n && `${r}-overlay-editor`,
|
|
638
651
|
i && `${r}-overlay-edit-mode`,
|
|
639
652
|
M && `${r}-overlay-active`,
|
|
640
|
-
|
|
641
|
-
|
|
653
|
+
Z,
|
|
654
|
+
q
|
|
642
655
|
),
|
|
643
|
-
style: { ...
|
|
656
|
+
style: { ...Y, ...fe },
|
|
644
657
|
role: "dialog",
|
|
645
658
|
"aria-modal": "true",
|
|
646
|
-
"aria-label":
|
|
659
|
+
"aria-label": te,
|
|
647
660
|
"data-selection": "none",
|
|
648
661
|
children: [
|
|
649
662
|
/* @__PURE__ */ s("div", { className: `${r}-backdrop`, "aria-hidden": "true", onClick: Ce }),
|
|
@@ -651,82 +664,83 @@ function no({
|
|
|
651
664
|
/* @__PURE__ */ s(
|
|
652
665
|
"button",
|
|
653
666
|
{
|
|
654
|
-
ref:
|
|
667
|
+
ref: le,
|
|
655
668
|
type: "button",
|
|
656
669
|
className: `${r}-close`,
|
|
657
670
|
style: {
|
|
658
671
|
...Ae,
|
|
659
|
-
top: (
|
|
660
|
-
left: (
|
|
661
|
-
visibility:
|
|
672
|
+
top: (L == null ? void 0 : L.top) ?? 0,
|
|
673
|
+
left: (L == null ? void 0 : L.left) ?? 0,
|
|
674
|
+
visibility: L ? "visible" : "hidden"
|
|
662
675
|
},
|
|
663
676
|
onClick: Ce,
|
|
664
|
-
children:
|
|
677
|
+
children: qe
|
|
665
678
|
}
|
|
666
679
|
),
|
|
667
|
-
|
|
680
|
+
Q(!1)
|
|
668
681
|
]
|
|
669
682
|
}
|
|
670
|
-
) : null,
|
|
683
|
+
) : null, yt = g && ge.size > 0 ? /* @__PURE__ */ x(
|
|
671
684
|
"div",
|
|
672
685
|
{
|
|
673
|
-
ref:
|
|
674
|
-
className: C(`${r}-inline-layer`, n && `${r}-overlay-editor`,
|
|
675
|
-
style: { ...
|
|
686
|
+
ref: ce,
|
|
687
|
+
className: C(`${r}-inline-layer`, n && `${r}-overlay-editor`, Z, q),
|
|
688
|
+
style: { ...Y, ...fe },
|
|
676
689
|
"aria-hidden": "true",
|
|
677
690
|
"data-selection": "none",
|
|
678
691
|
children: [
|
|
679
692
|
Re,
|
|
680
|
-
R &&
|
|
693
|
+
R && Q(!0)
|
|
681
694
|
]
|
|
682
695
|
}
|
|
683
|
-
) : null, Se =
|
|
684
|
-
return /* @__PURE__ */
|
|
685
|
-
/* @__PURE__ */ s("style", { dangerouslySetInnerHTML: { __html:
|
|
696
|
+
) : null, Se = $t ?? yt;
|
|
697
|
+
return /* @__PURE__ */ x(Be, { children: [
|
|
698
|
+
/* @__PURE__ */ s("style", { dangerouslySetInnerHTML: { __html: mt } }),
|
|
686
699
|
/* @__PURE__ */ s(
|
|
687
700
|
"div",
|
|
688
701
|
{
|
|
689
|
-
ref:
|
|
690
|
-
className: C(N && `${r}-editor`,
|
|
691
|
-
style:
|
|
692
|
-
children:
|
|
702
|
+
ref: W,
|
|
703
|
+
className: C(N && `${r}-editor`, Z, q),
|
|
704
|
+
style: Y,
|
|
705
|
+
children: g ? Q(!1) : (
|
|
693
706
|
// The overlay lets the page show through, so the label fades out with it rather than sit under the close.
|
|
694
707
|
// Only faded, it keeps the component's size and can still take focus back on close.
|
|
695
708
|
/* @__PURE__ */ s(
|
|
696
709
|
"button",
|
|
697
710
|
{
|
|
698
|
-
ref:
|
|
711
|
+
ref: k,
|
|
699
712
|
type: "button",
|
|
700
713
|
className: C(`${r}-trigger`, M && `${r}-trigger-hidden`),
|
|
701
714
|
style: Ae,
|
|
702
715
|
"aria-haspopup": "dialog",
|
|
703
716
|
"aria-expanded": w,
|
|
704
717
|
onClick: () => {
|
|
705
|
-
y &&
|
|
718
|
+
y && H(!0);
|
|
706
719
|
},
|
|
707
|
-
children:
|
|
720
|
+
children: te
|
|
708
721
|
}
|
|
709
722
|
)
|
|
710
723
|
)
|
|
711
724
|
}
|
|
712
725
|
),
|
|
713
|
-
Se && typeof document < "u" &&
|
|
726
|
+
Se && typeof document < "u" && xt(
|
|
714
727
|
Se,
|
|
715
728
|
(u ? document.getElementById(u) : null) ?? document.body
|
|
716
729
|
)
|
|
717
730
|
] });
|
|
718
731
|
}
|
|
719
732
|
export {
|
|
720
|
-
|
|
733
|
+
Nt as ARCHIVE_POPUP_COLUMN_STYLE_PREFIXES,
|
|
721
734
|
B as ARCHIVE_POPUP_COLUMN_WIDTH_KEYS,
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
no as
|
|
727
|
-
|
|
728
|
-
|
|
735
|
+
De as ARCHIVE_POPUP_DEFAULT_COLUMNS,
|
|
736
|
+
Mt as ARCHIVE_POPUP_EXTRA_TITLE_KEYS,
|
|
737
|
+
Et as ARCHIVE_POPUP_MAX_COLUMNS,
|
|
738
|
+
St as ARCHIVE_POPUP_MIN_COLUMNS,
|
|
739
|
+
no as ARCHIVE_POPUP_PANEL_POSITIONS,
|
|
740
|
+
ao as ArchivePopup,
|
|
741
|
+
ro as applyArchivePopupColumnCountChange,
|
|
742
|
+
zt as getArchivePopupEqualColumnWidths,
|
|
729
743
|
z as getArchivePopupRowMedia,
|
|
730
|
-
|
|
731
|
-
|
|
744
|
+
Vt as groupArchiveRows,
|
|
745
|
+
Bt as resolveArchivePopupColumnWidths
|
|
732
746
|
};
|