@dotss/tictoccroc 0.0.3 → 0.0.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/shared/components/Masonry/Masonry.mjs +111 -103
- package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.d.ts +1 -1
- package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +103 -86
- package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +1 -1
- package/dist/shared/components/MediaDialog/MediaDialog.mjs +121 -118
- package/dist/shared/components/MediaDialog/MediaDialogFooter/MediaDialogFooter.mjs +1 -1
- package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +1 -1
- package/dist/shared/components/Swiper/Swiper.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as p, useRef as i, Children as
|
|
3
|
-
import { Box as
|
|
4
|
-
import
|
|
5
|
-
import { findImageInChildren as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
function
|
|
9
|
-
children:
|
|
10
|
-
columnCount:
|
|
11
|
-
rowCount:
|
|
12
|
-
spacing:
|
|
1
|
+
import { jsx as z } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useRef as i, Children as S, isValidElement as j, useEffect as g, cloneElement as q } from "react";
|
|
3
|
+
import { Box as V, Flexbox as ct } from "@dotss/ui";
|
|
4
|
+
import lt from "@dotss/ui/core/useTheme";
|
|
5
|
+
import { findImageInChildren as x, getHorizontalLayoutRows as ft, getNextIndexHorizontalFromRows as pt, findNextFocusableElement as y } from "./Masonry.utils.mjs";
|
|
6
|
+
import $ from "./MasonryBlock/MasonryBlock.mjs";
|
|
7
|
+
import J from "../../../teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs";
|
|
8
|
+
function kt({
|
|
9
|
+
children: A,
|
|
10
|
+
columnCount: F = 2,
|
|
11
|
+
rowCount: B = 2,
|
|
12
|
+
spacing: s = 2,
|
|
13
13
|
edgeSpacing: d = 0,
|
|
14
|
-
direction:
|
|
15
|
-
defaultContainerWidth:
|
|
16
|
-
defaultContainerHeight:
|
|
14
|
+
direction: b = "vertical",
|
|
15
|
+
defaultContainerWidth: Q = 360,
|
|
16
|
+
defaultContainerHeight: Y = 0,
|
|
17
17
|
...a
|
|
18
18
|
}) {
|
|
19
|
-
const { spacing:
|
|
20
|
-
|
|
21
|
-
), [
|
|
19
|
+
const { spacing: E } = lt(), [Z, _] = p(Q), [K, O] = p(Y), [H, tt] = p(0), k = 4 / 3, l = (Z - s) / F, f = b === "horizontal" ? (K - s) / B : l * k, o = i(null), u = i([]), R = i([]), T = i(!1), M = i(!0), W = i(0), C = i(0), m = i(0), [h, et] = p(
|
|
20
|
+
S.toArray(A).filter(j).filter((e) => e.type === $ || e.type === J)
|
|
21
|
+
), [N, rt] = p(
|
|
22
22
|
h.map((e) => {
|
|
23
23
|
var t;
|
|
24
|
-
return ((t =
|
|
24
|
+
return ((t = x(e.props.children)) == null ? void 0 : t.props.src) ?? "";
|
|
25
25
|
})
|
|
26
|
-
), [
|
|
26
|
+
), [D, nt] = p(
|
|
27
27
|
h.map((e) => {
|
|
28
28
|
var t;
|
|
29
29
|
return {
|
|
30
|
-
src: ((t =
|
|
30
|
+
src: ((t = x(e.props.children)) == null ? void 0 : t.props.src) ?? "",
|
|
31
31
|
width: e.props.width ?? l,
|
|
32
32
|
height: e.props.height ?? f
|
|
33
33
|
};
|
|
34
34
|
})
|
|
35
|
-
),
|
|
35
|
+
), P = h.length, U = (e) => {
|
|
36
36
|
var t, r;
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
},
|
|
37
|
+
T.current = !0, W.current = e.clientX - (((t = o.current) == null ? void 0 : t.offsetLeft) || 0), C.current = ((r = o.current) == null ? void 0 : r.scrollLeft) || 0;
|
|
38
|
+
}, X = (e) => {
|
|
39
|
+
T.current && (e.currentTarget.style.cursor = "grabbing", o.current && (o.current.scrollLeft = C.current - (e.clientX - o.current.offsetLeft - W.current)));
|
|
40
|
+
}, L = (e) => {
|
|
41
41
|
var r;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
})) :
|
|
45
|
-
},
|
|
42
|
+
T.current = !1, C.current !== ((r = o.current) == null ? void 0 : r.scrollLeft) ? (e.currentTarget.style.cursor = "grab", M.current = !1, m.current && cancelAnimationFrame(m.current), m.current = requestAnimationFrame(() => {
|
|
43
|
+
M.current = !0;
|
|
44
|
+
})) : M.current = !0;
|
|
45
|
+
}, ot = (e) => (t) => {
|
|
46
46
|
t.stopPropagation();
|
|
47
47
|
let r = null;
|
|
48
48
|
switch (t.key) {
|
|
49
49
|
case "ArrowRight":
|
|
50
|
-
t.preventDefault(), r =
|
|
50
|
+
t.preventDefault(), r = y(t.currentTarget, "right", u.current);
|
|
51
51
|
break;
|
|
52
52
|
case "ArrowLeft":
|
|
53
|
-
t.preventDefault(), r =
|
|
53
|
+
t.preventDefault(), r = y(t.currentTarget, "left", u.current);
|
|
54
54
|
break;
|
|
55
55
|
case "ArrowDown":
|
|
56
|
-
t.preventDefault(), r =
|
|
56
|
+
t.preventDefault(), r = y(t.currentTarget, "down", u.current);
|
|
57
57
|
break;
|
|
58
58
|
case "ArrowUp":
|
|
59
|
-
t.preventDefault(), r =
|
|
59
|
+
t.preventDefault(), r = y(t.currentTarget, "up", u.current);
|
|
60
60
|
break;
|
|
61
61
|
case "Enter":
|
|
62
62
|
case " ": {
|
|
@@ -67,7 +67,7 @@ function bt({
|
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
r == null || r.focus(), e == null || e(t);
|
|
70
|
-
},
|
|
70
|
+
}, st = (e) => (t) => {
|
|
71
71
|
if (t.stopPropagation(), t.key === "Enter" || t.key === " ") {
|
|
72
72
|
t.preventDefault(), t.currentTarget.click();
|
|
73
73
|
return;
|
|
@@ -78,22 +78,22 @@ function bt({
|
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
t.preventDefault();
|
|
81
|
-
const
|
|
82
|
-
|
|
81
|
+
const v = pt(
|
|
82
|
+
R.current,
|
|
83
83
|
r,
|
|
84
84
|
n
|
|
85
|
-
),
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
|
|
85
|
+
), w = u.current[v ?? -1];
|
|
86
|
+
w == null || w.focus(), e == null || e(t);
|
|
87
|
+
}, at = (e) => (t) => {
|
|
88
|
+
u.current[e] = t;
|
|
89
|
+
}, it = (e, t, r) => (n) => {
|
|
90
|
+
R.current[t] || (R.current[t] = []), u.current[e] = n, R.current[t][r] = n;
|
|
91
|
+
}, G = (e) => (t) => {
|
|
92
|
+
tt(Number(t.currentTarget.getAttribute("aria-posinset")) - 1), e == null || e(t);
|
|
93
93
|
};
|
|
94
94
|
if (g(() => {
|
|
95
95
|
const e = o.current, t = (r) => {
|
|
96
|
-
|
|
96
|
+
M.current || r.stopPropagation();
|
|
97
97
|
};
|
|
98
98
|
return e == null || e.addEventListener("click", t), () => {
|
|
99
99
|
e == null || e.removeEventListener("click", t);
|
|
@@ -106,53 +106,53 @@ function bt({
|
|
|
106
106
|
e == null || e.removeEventListener("touchmove", t);
|
|
107
107
|
};
|
|
108
108
|
}, []), g(() => {
|
|
109
|
-
const e =
|
|
109
|
+
const e = S.toArray(A).filter(j).filter((r) => r.type === $ || r.type === J), t = e.map((r) => {
|
|
110
110
|
var n;
|
|
111
|
-
return ((n =
|
|
111
|
+
return ((n = x(r.props.children)) == null ? void 0 : n.props.src) ?? "";
|
|
112
112
|
}).filter(Boolean);
|
|
113
|
-
|
|
114
|
-
}, [
|
|
115
|
-
f <= 0 ||
|
|
113
|
+
et(e), rt(t);
|
|
114
|
+
}, [A]), g(() => {
|
|
115
|
+
f <= 0 || N.forEach((e) => {
|
|
116
116
|
const t = new window.Image();
|
|
117
117
|
t.src = e, t.onload = () => {
|
|
118
|
-
|
|
118
|
+
nt(
|
|
119
119
|
(r) => r.map((n) => (n.src === e && (n.width = t.width / t.height * (n.height ?? f), n.height = n.height ?? f), n))
|
|
120
120
|
), t.onload = null;
|
|
121
121
|
}, t.onerror = () => {
|
|
122
122
|
t.onload = null;
|
|
123
123
|
};
|
|
124
124
|
});
|
|
125
|
-
}, [
|
|
125
|
+
}, [N, f]), g(() => {
|
|
126
126
|
const e = () => {
|
|
127
127
|
var t, r, n;
|
|
128
|
-
|
|
128
|
+
_(((r = (t = o.current) == null ? void 0 : t.parentElement) == null ? void 0 : r.offsetWidth) ?? 0), O(((n = o.current) == null ? void 0 : n.offsetHeight) ?? 0);
|
|
129
129
|
};
|
|
130
130
|
return e(), window.addEventListener("resize", e), () => {
|
|
131
131
|
window.removeEventListener("resize", e);
|
|
132
132
|
};
|
|
133
133
|
}, []), g(() => () => {
|
|
134
134
|
m.current && cancelAnimationFrame(m.current);
|
|
135
|
-
}, []),
|
|
136
|
-
const e =
|
|
137
|
-
|
|
135
|
+
}, []), b === "horizontal") {
|
|
136
|
+
const e = ft(
|
|
137
|
+
D,
|
|
138
138
|
h,
|
|
139
|
-
|
|
140
|
-
l *
|
|
139
|
+
B,
|
|
140
|
+
l * k / 2
|
|
141
141
|
);
|
|
142
|
-
let t = l *
|
|
142
|
+
let t = l * k / 2;
|
|
143
143
|
t = t <= 0 ? 120 : t;
|
|
144
144
|
let r = 0;
|
|
145
|
-
return /* @__PURE__ */
|
|
146
|
-
|
|
145
|
+
return /* @__PURE__ */ z(
|
|
146
|
+
V,
|
|
147
147
|
{
|
|
148
148
|
ref: o,
|
|
149
149
|
role: "list",
|
|
150
150
|
"aria-label": "콘텐츠",
|
|
151
151
|
"aria-orientation": "horizontal",
|
|
152
|
-
onMouseDown:
|
|
153
|
-
onMouseMove:
|
|
154
|
-
onMouseUp:
|
|
155
|
-
onMouseLeave:
|
|
152
|
+
onMouseDown: U,
|
|
153
|
+
onMouseMove: X,
|
|
154
|
+
onMouseUp: L,
|
|
155
|
+
onMouseLeave: L,
|
|
156
156
|
pl: d,
|
|
157
157
|
pr: d,
|
|
158
158
|
...a,
|
|
@@ -170,63 +170,71 @@ function bt({
|
|
|
170
170
|
},
|
|
171
171
|
...a == null ? void 0 : a.inlineCSS
|
|
172
172
|
},
|
|
173
|
-
children: e.map((n,
|
|
174
|
-
const
|
|
175
|
-
return
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
173
|
+
children: e.map((n, v) => {
|
|
174
|
+
const w = v === e.length - 1;
|
|
175
|
+
return /* @__PURE__ */ z(ct, { gap: s, children: n.map((c, ut) => {
|
|
176
|
+
const I = r++;
|
|
177
|
+
return q(c, {
|
|
178
|
+
setInnerRef: it(I, v, ut),
|
|
179
|
+
tabIndex: I === H ? 0 : -1,
|
|
180
|
+
role: "listitem",
|
|
181
|
+
"aria-posinset": I + 1,
|
|
182
|
+
"aria-setsize": P,
|
|
183
|
+
width: c.props.width ?? t,
|
|
184
|
+
height: c.props.height ?? f,
|
|
185
|
+
direction: b,
|
|
186
|
+
spacing: s,
|
|
187
|
+
sourceMetadata: D,
|
|
188
|
+
onKeyDown: st(c.props.onKeyDown),
|
|
189
|
+
onFocus: G(c.props.onFocus),
|
|
190
|
+
style: {
|
|
191
|
+
marginBottom: w ? 0 : E.content(s),
|
|
192
|
+
...c.props.style
|
|
193
|
+
},
|
|
194
|
+
...c.props
|
|
195
|
+
});
|
|
196
|
+
}) }, `masonry-row-${v}`);
|
|
197
|
+
})
|
|
191
198
|
}
|
|
192
199
|
);
|
|
193
200
|
}
|
|
194
|
-
return /* @__PURE__ */
|
|
195
|
-
|
|
201
|
+
return /* @__PURE__ */ z(
|
|
202
|
+
V,
|
|
196
203
|
{
|
|
197
204
|
ref: o,
|
|
198
205
|
role: "list",
|
|
199
206
|
"aria-label": "콘텐츠",
|
|
200
207
|
"aria-orientation": "vertical",
|
|
201
|
-
onMouseDown:
|
|
202
|
-
onMouseMove:
|
|
203
|
-
onMouseUp:
|
|
204
|
-
onMouseLeave:
|
|
208
|
+
onMouseDown: U,
|
|
209
|
+
onMouseMove: X,
|
|
210
|
+
onMouseUp: L,
|
|
211
|
+
onMouseLeave: L,
|
|
205
212
|
pt: d,
|
|
206
213
|
pb: d,
|
|
207
214
|
...a,
|
|
208
215
|
inlineCSS: {
|
|
209
216
|
width: "100%",
|
|
210
217
|
position: "relative",
|
|
211
|
-
columnCount:
|
|
212
|
-
columnGap:
|
|
218
|
+
columnCount: F,
|
|
219
|
+
columnGap: E.content(s),
|
|
220
|
+
marginTop: -E.content(s),
|
|
213
221
|
...a == null ? void 0 : a.inlineCSS
|
|
214
222
|
},
|
|
215
|
-
children:
|
|
223
|
+
children: S.map(
|
|
216
224
|
h,
|
|
217
|
-
(e, t) =>
|
|
218
|
-
setInnerRef:
|
|
225
|
+
(e, t) => q(e, {
|
|
226
|
+
setInnerRef: at(t),
|
|
219
227
|
role: "listitem",
|
|
220
228
|
tabIndex: t === H ? 0 : -1,
|
|
221
229
|
"aria-posinset": t + 1,
|
|
222
|
-
"aria-setsize":
|
|
230
|
+
"aria-setsize": P,
|
|
223
231
|
width: e.props.width ?? l,
|
|
224
|
-
height: e.props.height ?? l *
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
sourceMetadata:
|
|
228
|
-
onKeyDown:
|
|
229
|
-
onFocus:
|
|
232
|
+
height: e.props.height ?? l * k / 2,
|
|
233
|
+
direction: b,
|
|
234
|
+
spacing: s,
|
|
235
|
+
sourceMetadata: D,
|
|
236
|
+
onKeyDown: ot(e.props.onKeyDown),
|
|
237
|
+
onFocus: G(e.props.onFocus),
|
|
230
238
|
...e.props
|
|
231
239
|
})
|
|
232
240
|
)
|
|
@@ -234,5 +242,5 @@ function bt({
|
|
|
234
242
|
);
|
|
235
243
|
}
|
|
236
244
|
export {
|
|
237
|
-
|
|
245
|
+
kt as default
|
|
238
246
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
|
|
2
2
|
export interface MasonryBlockProps extends FlexboxProps {
|
|
3
|
-
spacing?: number;
|
|
4
3
|
width?: number;
|
|
5
4
|
height?: number;
|
|
5
|
+
spacing?: number;
|
|
6
6
|
borderRadius?: number | string;
|
|
7
7
|
direction?: 'horizontal' | 'vertical';
|
|
8
8
|
sourceMetadata?: {
|
|
@@ -1,104 +1,121 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Flexbox as
|
|
1
|
+
import { jsxs as k, jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as a, useState as u, useRef as A, useImperativeHandle as B, useEffect as p, Children as W, isValidElement as z, cloneElement as F } from "react";
|
|
3
|
+
import { Flexbox as t, Skeleton as D } from "@dotss/ui";
|
|
4
|
+
import L from "@dotss/ui/core/useTheme";
|
|
4
5
|
import V from "../../Image/Image.mjs";
|
|
5
6
|
import { findImageInChildren as $ } from "../Masonry.utils.mjs";
|
|
6
|
-
const
|
|
7
|
+
const P = a(
|
|
7
8
|
({
|
|
8
|
-
children:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
borderRadius:
|
|
13
|
-
direction:
|
|
14
|
-
setInnerRef:
|
|
15
|
-
sourceMetadata:
|
|
16
|
-
...
|
|
17
|
-
},
|
|
18
|
-
var
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
}, [
|
|
23
|
-
const
|
|
24
|
-
|
|
9
|
+
children: m,
|
|
10
|
+
width: r = 0,
|
|
11
|
+
height: s = 0,
|
|
12
|
+
spacing: x = 2,
|
|
13
|
+
borderRadius: S,
|
|
14
|
+
direction: v = "vertical",
|
|
15
|
+
setInnerRef: o,
|
|
16
|
+
sourceMetadata: l,
|
|
17
|
+
...e
|
|
18
|
+
}, T) => {
|
|
19
|
+
var C;
|
|
20
|
+
const { spacing: E } = L(), c = $(m), b = (C = c == null ? void 0 : c.props) == null ? void 0 : C.src, i = l == null ? void 0 : l.find((n) => n.src === b), [d, j] = u((i == null ? void 0 : i.width) ?? r ?? 0), [f, H] = u((i == null ? void 0 : i.height) ?? s ?? 0), [y, w] = u(!b), h = A(null), I = () => w(!0);
|
|
21
|
+
return B(T, () => h.current), p(() => {
|
|
22
|
+
j((i == null ? void 0 : i.width) ?? r ?? 0), H((i == null ? void 0 : i.height) ?? s ?? 0);
|
|
23
|
+
}, [r, s, i == null ? void 0 : i.width, i == null ? void 0 : i.height]), p(() => {
|
|
24
|
+
const n = setTimeout(() => {
|
|
25
|
+
w(!0);
|
|
25
26
|
}, 300);
|
|
26
27
|
return () => {
|
|
27
|
-
clearTimeout(
|
|
28
|
+
clearTimeout(n);
|
|
28
29
|
};
|
|
29
|
-
}, []),
|
|
30
|
-
|
|
31
|
-
}, [
|
|
32
|
-
|
|
30
|
+
}, []), p(() => {
|
|
31
|
+
o == null || o(h.current);
|
|
32
|
+
}, [o]), /* @__PURE__ */ k(
|
|
33
|
+
t,
|
|
33
34
|
{
|
|
34
|
-
ref:
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
ref: h,
|
|
36
|
+
flexDirection: "column",
|
|
37
|
+
...e,
|
|
37
38
|
inlineCSS: {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
scrollbarWidth: "none",
|
|
41
|
-
transform: "translate3d(0, 0, 0)",
|
|
42
|
-
"&::-webkit-scrollbar": {
|
|
43
|
-
display: "none"
|
|
44
|
-
},
|
|
45
|
-
...t == null ? void 0 : t.inlineCSS
|
|
46
|
-
},
|
|
47
|
-
style: x === "vertical" ? {
|
|
48
|
-
...t.style,
|
|
49
|
-
marginBottom: u,
|
|
50
|
-
borderRadius: m,
|
|
51
|
-
paddingTop: `calc(${c / d} * 100%)`,
|
|
52
|
-
transition: "transform 0.3s 0.1s, padding-top 0.3s 0.1s"
|
|
53
|
-
} : {
|
|
54
|
-
...t.style,
|
|
55
|
-
marginBottom: u,
|
|
56
|
-
borderRadius: m,
|
|
57
|
-
paddingLeft: d,
|
|
58
|
-
paddingTop: c,
|
|
59
|
-
transition: "transform 0.3s 0.1s, padding-top 0.3s 0.1s, padding-left 0.3s 0.1s"
|
|
39
|
+
breakInside: "avoid",
|
|
40
|
+
...e == null ? void 0 : e.inlineCSS
|
|
60
41
|
},
|
|
61
42
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
|
|
43
|
+
v === "vertical" && /* @__PURE__ */ g(
|
|
44
|
+
t,
|
|
64
45
|
{
|
|
65
46
|
inlineCSS: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
left: 0,
|
|
69
|
-
width: "100%",
|
|
70
|
-
height: "100%",
|
|
71
|
-
overflow: "hidden",
|
|
72
|
-
zIndex: 1
|
|
73
|
-
},
|
|
74
|
-
children: W.toArray(g).filter(z).map((o) => o.type === V || o.type === "img" ? F(o, {
|
|
75
|
-
width: d,
|
|
76
|
-
height: c,
|
|
77
|
-
draggable: !1,
|
|
78
|
-
style: {
|
|
79
|
-
overflow: "hidden",
|
|
80
|
-
objectFit: "cover",
|
|
81
|
-
...o.props.style
|
|
82
|
-
},
|
|
83
|
-
...o.props
|
|
84
|
-
}) : o)
|
|
47
|
+
minHeight: E.content(x)
|
|
48
|
+
}
|
|
85
49
|
}
|
|
86
50
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
|
|
51
|
+
/* @__PURE__ */ k(
|
|
52
|
+
t,
|
|
89
53
|
{
|
|
90
|
-
|
|
54
|
+
onTransitionEnd: I,
|
|
91
55
|
inlineCSS: {
|
|
92
|
-
position: "
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
56
|
+
position: "relative",
|
|
57
|
+
overflow: "hidden",
|
|
58
|
+
scrollbarWidth: "none",
|
|
59
|
+
transform: "translate3d(0, 0, 0)",
|
|
60
|
+
"&::-webkit-scrollbar": {
|
|
61
|
+
display: "none"
|
|
62
|
+
},
|
|
63
|
+
...e == null ? void 0 : e.inlineCSS
|
|
64
|
+
},
|
|
65
|
+
style: v === "vertical" ? {
|
|
66
|
+
borderRadius: S,
|
|
67
|
+
paddingTop: `calc(${f / d} * 100%)`,
|
|
68
|
+
transition: "transform 0.3s 0.1s, padding-top 0.3s 0.1s"
|
|
69
|
+
} : {
|
|
70
|
+
borderRadius: S,
|
|
71
|
+
paddingLeft: d,
|
|
72
|
+
paddingTop: f,
|
|
73
|
+
transition: "transform 0.3s 0.1s, padding-top 0.3s 0.1s, padding-left 0.3s 0.1s"
|
|
74
|
+
},
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ g(
|
|
77
|
+
t,
|
|
78
|
+
{
|
|
79
|
+
inlineCSS: {
|
|
80
|
+
position: "absolute",
|
|
81
|
+
top: 0,
|
|
82
|
+
left: 0,
|
|
83
|
+
width: "100%",
|
|
84
|
+
height: "100%",
|
|
85
|
+
overflow: "hidden",
|
|
86
|
+
zIndex: 1
|
|
87
|
+
},
|
|
88
|
+
children: W.toArray(m).filter(z).map((n) => n.type === V || n.type === "img" ? F(n, {
|
|
89
|
+
width: d,
|
|
90
|
+
height: f,
|
|
91
|
+
draggable: !1,
|
|
92
|
+
style: {
|
|
93
|
+
overflow: "hidden",
|
|
94
|
+
objectFit: "cover",
|
|
95
|
+
...n.props.style
|
|
96
|
+
},
|
|
97
|
+
...n.props
|
|
98
|
+
}) : n)
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ g(
|
|
102
|
+
D,
|
|
103
|
+
{
|
|
104
|
+
borderRadius: 0,
|
|
105
|
+
inlineCSS: {
|
|
106
|
+
position: "absolute",
|
|
107
|
+
top: 0,
|
|
108
|
+
left: 0,
|
|
109
|
+
width: "100%",
|
|
110
|
+
height: "100%",
|
|
111
|
+
zIndex: 2,
|
|
112
|
+
opacity: y ? 0 : 1,
|
|
113
|
+
transition: "opacity 0.3s 0.1s",
|
|
114
|
+
pointerEvents: y ? "none" : void 0
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
]
|
|
102
119
|
}
|
|
103
120
|
)
|
|
104
121
|
]
|
|
@@ -107,5 +124,5 @@ const N = A(
|
|
|
107
124
|
}
|
|
108
125
|
);
|
|
109
126
|
export {
|
|
110
|
-
|
|
127
|
+
P as default
|
|
111
128
|
};
|
|
@@ -10,6 +10,7 @@ function j({ children: i, fallback: l, imageProps: t, ...n }) {
|
|
|
10
10
|
{
|
|
11
11
|
...n,
|
|
12
12
|
inlineCSS: {
|
|
13
|
+
marginTop: "calc(var(--status-bar-height, 0px) * -1)",
|
|
13
14
|
"& > div:nth-of-type(1)": {
|
|
14
15
|
zIndex: 1
|
|
15
16
|
},
|
|
@@ -38,7 +39,6 @@ function j({ children: i, fallback: l, imageProps: t, ...n }) {
|
|
|
38
39
|
maxWidth: "100%",
|
|
39
40
|
objectFit: "contain",
|
|
40
41
|
transform: "translate3d(0, 0, 0) scale(1)",
|
|
41
|
-
marginTop: "calc(var(--status-bar-height, 0px) * -1)",
|
|
42
42
|
zIndex: 1,
|
|
43
43
|
...t == null ? void 0 : t.style,
|
|
44
44
|
...e.props.style
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Flexbox as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsxs as O, jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { useState as P, useRef as i, Children as et, isValidElement as nt, useEffect as N, cloneElement as Yt } from "react";
|
|
3
|
+
import { Flexbox as Y, Typography as ct, IconButton as $t } from "@dotss/ui";
|
|
4
|
+
import wt from "@dotss/ui/core/useTheme";
|
|
5
|
+
import Xt from "@dotss/ui/Dialog";
|
|
6
6
|
import at from "./MediaBlock/MediaBlock.mjs";
|
|
7
|
-
import
|
|
8
|
-
function
|
|
9
|
-
children:
|
|
10
|
-
open:
|
|
11
|
-
onClose:
|
|
12
|
-
onSwipe:
|
|
13
|
-
initialPage:
|
|
14
|
-
title:
|
|
7
|
+
import Rt from "../Swiper/Swiper.mjs";
|
|
8
|
+
function Dt({
|
|
9
|
+
children: B,
|
|
10
|
+
open: $ = !1,
|
|
11
|
+
onClose: V,
|
|
12
|
+
onSwipe: q,
|
|
13
|
+
initialPage: Z = 0,
|
|
14
|
+
title: J,
|
|
15
15
|
loop: st = !1,
|
|
16
16
|
fallback: ut,
|
|
17
|
-
...
|
|
17
|
+
...v
|
|
18
18
|
}) {
|
|
19
19
|
const {
|
|
20
|
-
palette: { grey:
|
|
21
|
-
} =
|
|
22
|
-
l.current && t.stopPropagation(),
|
|
23
|
-
},
|
|
24
|
-
if (!
|
|
25
|
-
n.current = t.clientX -
|
|
26
|
-
const u = t.currentTarget, { width: s, height: a } = u.getBoundingClientRect(), d = s / e.current,
|
|
20
|
+
palette: { grey: it, etc: K }
|
|
21
|
+
} = wt(), [ot, Q] = P(!1), [lt, ft] = P(Z), [ht, mt] = P("100vh"), [_, S] = P(1), [gt, b] = P(!1), o = i(null), e = i(1), U = i(1), k = i(3), y = i(0), M = i(0), E = i(0), W = i(0), n = i(0), c = i(0), l = i(!1), h = i(!1), A = i(null), w = i(0), C = i(0), dt = et.toArray(B).filter((r) => nt(r)).filter((r) => r.type === at), pt = et.toArray(B).filter((r) => nt(r)).filter((r) => r.type !== at), xt = (r) => (t) => {
|
|
22
|
+
l.current && t.stopPropagation(), E.current = t.clientX - n.current, W.current = t.clientY - c.current, h.current = e.current > 1, r == null || r(t);
|
|
23
|
+
}, yt = (r) => (t) => {
|
|
24
|
+
if (!h.current) return;
|
|
25
|
+
n.current = t.clientX - E.current, c.current = t.clientY - W.current;
|
|
26
|
+
const u = t.currentTarget, { width: s, height: a } = u.getBoundingClientRect(), d = s / e.current, m = a / e.current, f = Math.max(
|
|
27
27
|
0,
|
|
28
|
-
(d * e.current -
|
|
28
|
+
(d * e.current - o.current.offsetWidth) / 2
|
|
29
29
|
), g = Math.max(
|
|
30
30
|
0,
|
|
31
|
-
(
|
|
31
|
+
(m * e.current - o.current.offsetHeight) / 2
|
|
32
32
|
);
|
|
33
33
|
n.current = Math.min(
|
|
34
34
|
Math.max(n.current, -f),
|
|
@@ -38,45 +38,46 @@ function Wt({
|
|
|
38
38
|
g
|
|
39
39
|
), t.currentTarget.style.cursor = "grabbing", t.currentTarget.style.transition = "none", t.currentTarget.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`, r == null || r(t);
|
|
40
40
|
}, tt = (r) => (t) => {
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
if (
|
|
41
|
+
h.current && (t.currentTarget.style.cursor = "grab"), h.current = !1, r == null || r(t);
|
|
42
|
+
}, Mt = (r) => (t) => {
|
|
43
|
+
if (E.current = t.touches[0].clientX - n.current, W.current = t.touches[0].clientY - c.current, l.current = t.touches.length === 2, h.current = t.touches.length === 1 && e.current > 1, l.current) {
|
|
44
|
+
b(!0);
|
|
44
45
|
const u = t.touches[1].clientX - t.touches[0].clientX, s = t.touches[1].clientY - t.touches[0].clientY;
|
|
45
46
|
y.current = Math.hypot(u, s);
|
|
46
47
|
}
|
|
47
48
|
r == null || r(t);
|
|
48
|
-
},
|
|
49
|
+
}, Ct = (r) => (t) => {
|
|
49
50
|
const u = t.touches.length === 2, s = t.touches.length === 1;
|
|
50
51
|
if (l.current && u) {
|
|
51
52
|
const a = t.touches[1].clientX - t.touches[0].clientX, d = t.touches[1].clientY - t.touches[0].clientY;
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
Math.max(
|
|
55
|
-
|
|
56
|
-
), g = (t.touches[0].clientX + t.touches[1].clientX) / 2, p = (t.touches[0].clientY + t.touches[1].clientY) / 2, { left:
|
|
57
|
-
n.current -=
|
|
53
|
+
M.current = Math.hypot(a, d);
|
|
54
|
+
const m = M.current / y.current, f = Math.min(
|
|
55
|
+
Math.max(U.current, e.current * m),
|
|
56
|
+
k.current
|
|
57
|
+
), g = (t.touches[0].clientX + t.touches[1].clientX) / 2, p = (t.touches[0].clientY + t.touches[1].clientY) / 2, { left: D, top: F, width: X, height: I } = t.currentTarget.getBoundingClientRect(), G = X / e.current, z = I / e.current, L = g - D - X / 2, j = p - F - I / 2, R = f / e.current;
|
|
58
|
+
n.current -= L * (R - 1), c.current -= j * (R - 1), e.current = f, S(f), b(!0);
|
|
58
59
|
const T = Math.max(
|
|
59
60
|
0,
|
|
60
|
-
(
|
|
61
|
-
),
|
|
61
|
+
(G * e.current - o.current.offsetWidth) / 2
|
|
62
|
+
), H = Math.max(
|
|
62
63
|
0,
|
|
63
|
-
(
|
|
64
|
+
(z * e.current - o.current.offsetHeight) / 2
|
|
64
65
|
);
|
|
65
66
|
n.current = Math.min(
|
|
66
67
|
Math.max(n.current, -T),
|
|
67
68
|
T
|
|
68
69
|
), c.current = Math.min(
|
|
69
|
-
Math.max(c.current, -
|
|
70
|
-
|
|
71
|
-
), y.current =
|
|
72
|
-
} else if (
|
|
73
|
-
n.current = t.touches[0].clientX -
|
|
74
|
-
const { width: a, height: d } = t.currentTarget.getBoundingClientRect(),
|
|
70
|
+
Math.max(c.current, -H),
|
|
71
|
+
H
|
|
72
|
+
), y.current = M.current, t.currentTarget.style.transition = "none", t.currentTarget.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`;
|
|
73
|
+
} else if (h.current && s) {
|
|
74
|
+
n.current = t.touches[0].clientX - E.current, c.current = t.touches[0].clientY - W.current;
|
|
75
|
+
const { width: a, height: d } = t.currentTarget.getBoundingClientRect(), m = a / e.current, f = d / e.current, g = Math.max(
|
|
75
76
|
0,
|
|
76
|
-
(
|
|
77
|
+
(m * e.current - o.current.offsetWidth) / 2
|
|
77
78
|
), p = Math.max(
|
|
78
79
|
0,
|
|
79
|
-
(f * e.current -
|
|
80
|
+
(f * e.current - o.current.offsetHeight) / 2
|
|
80
81
|
);
|
|
81
82
|
n.current = Math.min(
|
|
82
83
|
Math.max(n.current, -g),
|
|
@@ -91,9 +92,9 @@ function Wt({
|
|
|
91
92
|
const u = e.current;
|
|
92
93
|
if (l.current && u > 1.2) {
|
|
93
94
|
const s = Math.abs(
|
|
94
|
-
(t.currentTarget.offsetWidth * e.current -
|
|
95
|
+
(t.currentTarget.offsetWidth * e.current - o.current.offsetWidth) / 2
|
|
95
96
|
), a = Math.abs(
|
|
96
|
-
(t.currentTarget.offsetHeight * e.current -
|
|
97
|
+
(t.currentTarget.offsetHeight * e.current - o.current.offsetHeight) / 2
|
|
97
98
|
);
|
|
98
99
|
n.current = Math.min(
|
|
99
100
|
Math.max(n.current, -s),
|
|
@@ -102,94 +103,94 @@ function Wt({
|
|
|
102
103
|
Math.max(c.current, -a),
|
|
103
104
|
a
|
|
104
105
|
), t.currentTarget.style.transition = "transform 0.3s", t.currentTarget.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`;
|
|
105
|
-
} else l.current && u <= 1.2 && (n.current = 0, c.current = 0, y.current = 0,
|
|
106
|
-
|
|
107
|
-
},
|
|
106
|
+
} else l.current && u <= 1.2 && (n.current = 0, c.current = 0, y.current = 0, M.current = 0, e.current = 1, l.current = !1, h.current = !1, S(1), b(!1), t.currentTarget.style.transition = "transform 0.3s", t.currentTarget.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`);
|
|
107
|
+
h.current = !1, r == null || r(t);
|
|
108
|
+
}, St = ({ currentPage: r }) => {
|
|
108
109
|
var u;
|
|
109
|
-
r !==
|
|
110
|
+
r !== lt ? (n.current = 0, c.current = 0, y.current = 0, e.current = 1, M.current = 0, l.current = !1, h.current = !1, S(1), Array.from(((u = A.current) == null ? void 0 : u.getElementsByTagName("img")) || []).forEach((a) => {
|
|
110
111
|
a.style.cursor = "default", a.style.transition = "transform 0.1s 0.1s", a.style.transform = "translate3d(0, 0, 0) scale(1)";
|
|
111
|
-
})) : e.current > 1.2 && (l.current = !0),
|
|
112
|
-
},
|
|
113
|
-
|
|
112
|
+
})) : e.current > 1.2 && (l.current = !0), q == null || q(r), ft(r);
|
|
113
|
+
}, bt = () => {
|
|
114
|
+
h.current = !1;
|
|
114
115
|
};
|
|
115
|
-
return
|
|
116
|
+
return N(() => {
|
|
116
117
|
var u;
|
|
117
|
-
const r = Array.from(((u =
|
|
118
|
-
s.preventDefault(), l.current = !0;
|
|
119
|
-
const a = s.currentTarget, d = s.deltaY > 0 ? -0.1 : 0.1,
|
|
120
|
-
Math.max(
|
|
121
|
-
|
|
122
|
-
), { left: f, top: g, width: p, height:
|
|
123
|
-
n.current -=
|
|
124
|
-
const
|
|
118
|
+
const r = Array.from(((u = A.current) == null ? void 0 : u.getElementsByTagName("img")) || []), t = (s) => {
|
|
119
|
+
s.preventDefault(), l.current = !0, b(!0);
|
|
120
|
+
const a = s.currentTarget, d = s.deltaY > 0 ? -0.1 : 0.1, m = Math.min(
|
|
121
|
+
Math.max(U.current, e.current + d),
|
|
122
|
+
k.current
|
|
123
|
+
), { left: f, top: g, width: p, height: D } = a.getBoundingClientRect(), F = p / e.current, X = D / e.current, I = s.clientX - f - p / 2, G = s.clientY - g - D / 2, z = m / e.current;
|
|
124
|
+
n.current -= I * (z - 1), c.current -= G * (z - 1), e.current = m, S(m);
|
|
125
|
+
const L = Math.max(
|
|
125
126
|
0,
|
|
126
|
-
(
|
|
127
|
-
),
|
|
127
|
+
(F * e.current - o.current.offsetWidth) / 2
|
|
128
|
+
), j = Math.max(
|
|
128
129
|
0,
|
|
129
|
-
(X * e.current -
|
|
130
|
+
(X * e.current - o.current.offsetHeight) / 2
|
|
130
131
|
);
|
|
131
132
|
n.current = Math.min(
|
|
132
|
-
Math.max(n.current, -
|
|
133
|
-
|
|
133
|
+
Math.max(n.current, -L),
|
|
134
|
+
L
|
|
134
135
|
), c.current = Math.min(
|
|
135
|
-
Math.max(c.current, -
|
|
136
|
-
|
|
137
|
-
), l.current = !0, a.style.cursor = "grab", a.style.transition = "none", a.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`,
|
|
136
|
+
Math.max(c.current, -j),
|
|
137
|
+
j
|
|
138
|
+
), l.current = !0, a.style.cursor = "grab", a.style.transition = "none", a.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`, C.current && cancelAnimationFrame(C.current), C.current = requestAnimationFrame(() => {
|
|
138
139
|
const R = e.current;
|
|
139
140
|
if (R > 1) {
|
|
140
141
|
const T = Math.max(
|
|
141
142
|
0,
|
|
142
|
-
(
|
|
143
|
-
),
|
|
143
|
+
(F * e.current - o.current.offsetWidth) / 2
|
|
144
|
+
), H = Math.max(
|
|
144
145
|
0,
|
|
145
|
-
(X * e.current -
|
|
146
|
+
(X * e.current - o.current.offsetHeight) / 2
|
|
146
147
|
);
|
|
147
148
|
n.current = Math.min(
|
|
148
149
|
Math.max(n.current, -T),
|
|
149
150
|
T
|
|
150
151
|
), c.current = Math.min(
|
|
151
|
-
Math.max(c.current, -
|
|
152
|
-
|
|
152
|
+
Math.max(c.current, -H),
|
|
153
|
+
H
|
|
153
154
|
), a.style.cursor = "default", a.style.transition = "transform 0.3s", a.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`;
|
|
154
|
-
} else R <= 1.2 && (n.current = 0, c.current = 0, y.current = 0,
|
|
155
|
+
} else R <= 1.2 && (n.current = 0, c.current = 0, y.current = 0, M.current = 0, e.current = 1, l.current = !1, h.current = !1, S(1), b(!1), a.style.cursor = "default", a.style.transition = "transform 0.3s", a.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`);
|
|
155
156
|
});
|
|
156
157
|
};
|
|
157
158
|
return r.forEach((s) => {
|
|
158
159
|
s.addEventListener("wheel", t);
|
|
159
160
|
}), () => {
|
|
160
|
-
|
|
161
|
+
C.current && cancelAnimationFrame(C.current), r.forEach((s) => {
|
|
161
162
|
s.removeEventListener("wheel", t);
|
|
162
163
|
});
|
|
163
164
|
};
|
|
164
|
-
}, [ot]),
|
|
165
|
+
}, [ot]), N(() => {
|
|
165
166
|
const r = () => {
|
|
166
167
|
var u;
|
|
167
|
-
const t = (u =
|
|
168
|
+
const t = (u = A.current) == null ? void 0 : u.offsetHeight;
|
|
168
169
|
t && mt(`${t}px`);
|
|
169
170
|
};
|
|
170
171
|
return r(), window.addEventListener("resize", r), () => {
|
|
171
172
|
window.removeEventListener("resize", r);
|
|
172
173
|
};
|
|
173
|
-
}, []),
|
|
174
|
+
}, []), N(() => ($ ? w.current = requestAnimationFrame(() => {
|
|
174
175
|
Q(!0);
|
|
175
176
|
}) : Q(!1), () => {
|
|
176
|
-
|
|
177
|
-
}), [
|
|
178
|
-
|
|
179
|
-
}), [
|
|
180
|
-
|
|
177
|
+
w.current && cancelAnimationFrame(w.current);
|
|
178
|
+
}), [$]), N(() => ($ && (e.current = 1, S(1), b(!1), n.current = 0, c.current = 0, y.current = 0, M.current = 0, l.current = !1, h.current = !1), () => {
|
|
179
|
+
C.current && cancelAnimationFrame(C.current), w.current && cancelAnimationFrame(w.current);
|
|
180
|
+
}), [$]), /* @__PURE__ */ O(
|
|
181
|
+
Xt,
|
|
181
182
|
{
|
|
182
|
-
ref:
|
|
183
|
-
open:
|
|
184
|
-
onClose:
|
|
183
|
+
ref: o,
|
|
184
|
+
open: $,
|
|
185
|
+
onClose: V,
|
|
185
186
|
fullScreen: !0,
|
|
186
|
-
|
|
187
|
+
hideStatusBar: !0,
|
|
187
188
|
hideSystemNavigationBar: !0,
|
|
188
189
|
"aria-modal": !0,
|
|
189
|
-
"aria-labelledby":
|
|
190
|
-
...
|
|
190
|
+
"aria-labelledby": J ? "media-dialog-title" : void 0,
|
|
191
|
+
...v,
|
|
191
192
|
inlineCSS: {
|
|
192
|
-
backgroundColor:
|
|
193
|
+
backgroundColor: it.black,
|
|
193
194
|
scrollbarWidth: "none",
|
|
194
195
|
"&::-webkit-scrollbar": {
|
|
195
196
|
display: "none"
|
|
@@ -200,11 +201,11 @@ function Wt({
|
|
|
200
201
|
display: "none"
|
|
201
202
|
}
|
|
202
203
|
},
|
|
203
|
-
...
|
|
204
|
+
...v == null ? void 0 : v.inlineCSS
|
|
204
205
|
},
|
|
205
206
|
children: [
|
|
206
207
|
/* @__PURE__ */ x(
|
|
207
|
-
|
|
208
|
+
Y,
|
|
208
209
|
{
|
|
209
210
|
"aria-hidden": !0,
|
|
210
211
|
inlineCSS: {
|
|
@@ -219,7 +220,7 @@ function Wt({
|
|
|
219
220
|
}
|
|
220
221
|
),
|
|
221
222
|
/* @__PURE__ */ x(
|
|
222
|
-
|
|
223
|
+
Y,
|
|
223
224
|
{
|
|
224
225
|
tag: "header",
|
|
225
226
|
inlineCSS: {
|
|
@@ -230,8 +231,8 @@ function Wt({
|
|
|
230
231
|
backgroundColor: K.dimmed01,
|
|
231
232
|
zIndex: 2
|
|
232
233
|
},
|
|
233
|
-
children: /* @__PURE__ */
|
|
234
|
-
|
|
234
|
+
children: /* @__PURE__ */ O(
|
|
235
|
+
Y,
|
|
235
236
|
{
|
|
236
237
|
alignItems: "center",
|
|
237
238
|
p: 2,
|
|
@@ -244,7 +245,7 @@ function Wt({
|
|
|
244
245
|
maxHeight: 56
|
|
245
246
|
},
|
|
246
247
|
children: [
|
|
247
|
-
/* @__PURE__ */ x(
|
|
248
|
+
/* @__PURE__ */ x(Y, {}),
|
|
248
249
|
/* @__PURE__ */ x(
|
|
249
250
|
ct,
|
|
250
251
|
{
|
|
@@ -257,52 +258,54 @@ function Wt({
|
|
|
257
258
|
inlineCSS: {
|
|
258
259
|
flexGrow: 1
|
|
259
260
|
},
|
|
260
|
-
children:
|
|
261
|
+
children: J
|
|
261
262
|
}
|
|
262
263
|
),
|
|
263
|
-
/* @__PURE__ */ x(
|
|
264
|
+
/* @__PURE__ */ x(Y, { justifyContent: "flex-end", children: /* @__PURE__ */ x($t, { name: "CloseLine", color: "tertiary", onClick: V, "aria-label": "창 닫기" }) })
|
|
264
265
|
]
|
|
265
266
|
}
|
|
266
267
|
)
|
|
267
268
|
}
|
|
268
269
|
),
|
|
269
270
|
/* @__PURE__ */ x(
|
|
270
|
-
|
|
271
|
+
Y,
|
|
271
272
|
{
|
|
272
|
-
ref:
|
|
273
|
+
ref: A,
|
|
273
274
|
alignItems: "center",
|
|
274
275
|
justifyContent: "center",
|
|
275
276
|
inlineCSS: {
|
|
276
277
|
position: "relative",
|
|
277
278
|
width: "100%",
|
|
278
279
|
height: "100%",
|
|
279
|
-
touchAction: "none"
|
|
280
|
+
touchAction: "none",
|
|
281
|
+
overflow: "hidden"
|
|
280
282
|
},
|
|
281
283
|
children: /* @__PURE__ */ x(
|
|
282
|
-
|
|
284
|
+
Rt,
|
|
283
285
|
{
|
|
284
|
-
onSwipe:
|
|
285
|
-
onSwiping:
|
|
286
|
-
initialPage:
|
|
286
|
+
onSwipe: St,
|
|
287
|
+
onSwiping: bt,
|
|
288
|
+
initialPage: Z,
|
|
287
289
|
loop: st,
|
|
288
|
-
|
|
290
|
+
disableSwipe: gt,
|
|
291
|
+
children: dt.map(
|
|
289
292
|
(r) => {
|
|
290
|
-
var t, u, s, a, d,
|
|
291
|
-
return
|
|
293
|
+
var t, u, s, a, d, m, f, g, p;
|
|
294
|
+
return Yt(r, {
|
|
292
295
|
fallback: ut,
|
|
293
296
|
...r.props,
|
|
294
297
|
imageProps: {
|
|
295
298
|
...r.props.imageProps,
|
|
296
|
-
onMouseDown:
|
|
297
|
-
onMouseMove:
|
|
299
|
+
onMouseDown: xt((t = r.props.imageProps) == null ? void 0 : t.onMouseDown),
|
|
300
|
+
onMouseMove: yt((u = r.props.imageProps) == null ? void 0 : u.onMouseMove),
|
|
298
301
|
onMouseUp: tt((s = r.props.imageProps) == null ? void 0 : s.onMouseUp),
|
|
299
302
|
onMouseOut: tt((a = r.props.imageProps) == null ? void 0 : a.onMouseOut),
|
|
300
|
-
onTouchStart:
|
|
301
|
-
onTouchMove:
|
|
303
|
+
onTouchStart: Mt((d = r.props.imageProps) == null ? void 0 : d.onTouchStart),
|
|
304
|
+
onTouchMove: Ct((m = r.props.imageProps) == null ? void 0 : m.onTouchMove),
|
|
302
305
|
onTouchEnd: rt((f = r.props.imageProps) == null ? void 0 : f.onTouchEnd),
|
|
303
306
|
onTouchCancel: rt((g = r.props.imageProps) == null ? void 0 : g.onTouchCancel),
|
|
304
307
|
style: {
|
|
305
|
-
maxHeight:
|
|
308
|
+
maxHeight: ht,
|
|
306
309
|
...(p = r.props.imageProps) == null ? void 0 : p.style
|
|
307
310
|
}
|
|
308
311
|
}
|
|
@@ -313,8 +316,8 @@ function Wt({
|
|
|
313
316
|
)
|
|
314
317
|
}
|
|
315
318
|
),
|
|
316
|
-
|
|
317
|
-
/* @__PURE__ */
|
|
319
|
+
pt,
|
|
320
|
+
/* @__PURE__ */ O(ct, { role: "status", visuallyHidden: !0, children: [
|
|
318
321
|
_ > 1 && "이미지가 확대되었어요.",
|
|
319
322
|
_ <= 1 && "이미지가 원래 크기로 복원되었어요."
|
|
320
323
|
] })
|
|
@@ -323,5 +326,5 @@ function Wt({
|
|
|
323
326
|
);
|
|
324
327
|
}
|
|
325
328
|
export {
|
|
326
|
-
|
|
329
|
+
Dt as default
|
|
327
330
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Flexbox as i } from "@dotss/ui";
|
|
2
|
+
import { Flexbox as i } from "/Users/x/WebstormProjects/dotss/node_modules/.pnpm/@dotss+ui@0.0.10_@emotion+react@11.14.0_@types+react@19.1.6_react@18.3.1__@emotion+styl_fdc48194e396bad48e1a88da53a8b49d/node_modules/@dotss/ui/index.es.js";
|
|
3
3
|
import r from "@dotss/ui/core/useTheme";
|
|
4
4
|
function l({ children: o }) {
|
|
5
5
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Flexbox as l, Typography as n } from "
|
|
2
|
+
import { Flexbox as l, Typography as n } from "@dotss/ui";
|
|
3
3
|
import p from "@dotss/ui/core/useTheme";
|
|
4
4
|
function s({ children: r, style: t, startDate: f, endDate: i, ...o }) {
|
|
5
5
|
const {
|
|
@@ -176,7 +176,7 @@ function hr({
|
|
|
176
176
|
}, []), k(() => {
|
|
177
177
|
rr(E);
|
|
178
178
|
}, [E]), k(() => {
|
|
179
|
-
t.current && !H.current && (H.current = !0, t.current.style.transform = `translate3d(calc(-100% * ${E < p + 1 ? E : p + 1}), 0, 0)`);
|
|
179
|
+
t.current && !H.current && (H.current = !0, t.current.style.transition = "none", t.current.style.transform = `translate3d(calc(-100% * ${E < p + 1 ? E : p + 1}), 0, 0)`);
|
|
180
180
|
}, [p, E]), /* @__PURE__ */ Z(
|
|
181
181
|
K,
|
|
182
182
|
{
|
package/package.json
CHANGED