@dotss/tictoccroc 0.0.2 → 0.0.3

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