@solostylist/ui-kit 1.0.220 → 1.0.222
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/s-avatar/s-avatar.js +1 -5
- package/dist/s-breadcrumbs/s-breadcrumbs.js +45 -40
- package/dist/s-carousel/index.js +1 -1
- package/dist/s-carousel/s-carousel.js +1 -1
- package/dist/{s-carousel-DhUo-3W-.js → s-carousel-BUJYCigy.js} +15 -31
- package/dist/s-category-card/s-category-card.js +2 -2
- package/dist/s-chat-input/index.js +1 -1
- package/dist/s-chat-input/s-chat-input.js +1 -1
- package/dist/{s-chat-input-DlEMhm6X.js → s-chat-input-B0gdPa1c.js} +106 -101
- package/dist/s-chat-message/index.js +1 -1
- package/dist/s-chat-message/s-chat-message.js +1 -1
- package/dist/{s-chat-message-DeP8O6TO.js → s-chat-message-DVfbqSAQ.js} +27 -28
- package/dist/s-checkbox/s-checkbox.js +2 -1
- package/dist/s-code-block/index.js +1 -1
- package/dist/s-code-block/s-code-block.js +1 -1
- package/dist/{s-code-block-DTzppazr.js → s-code-block-CHIgPLsL.js} +31 -22
- package/dist/s-comment-message/index.js +1 -1
- package/dist/s-comment-message/s-comment-message.js +1 -1
- package/dist/{s-comment-message-C-7IZOqA.js → s-comment-message-DuJPcZFR.js} +2 -6
- package/dist/s-date-picker/index.js +1 -1
- package/dist/s-date-picker/s-date-picker.js +1 -1
- package/dist/{s-date-picker-CKSRNJ_A.js → s-date-picker-Mynq297P.js} +1 -1
- package/dist/s-datetime-picker/index.js +1 -1
- package/dist/s-datetime-picker/s-datetime-picker.js +1 -1
- package/dist/{s-datetime-picker-BlStwMie.js → s-datetime-picker-D78dPyAo.js} +1 -1
- package/dist/s-gallery/s-gallery.js +25 -18
- package/dist/s-image-comparison/s-image-comparison.js +76 -108
- package/dist/s-image-modal/index.js +2 -2
- package/dist/s-image-modal/s-image-modal.js +2 -399
- package/dist/s-image-modal-DxwMFMNS.js +397 -0
- package/dist/s-language-switcher/index.js +1 -1
- package/dist/s-language-switcher/s-language-switcher.js +1 -1
- package/dist/{s-language-switcher-Cg3Gh8_i.js → s-language-switcher-vievp2VS.js} +8 -8
- package/dist/s-link/s-link.js +5 -1
- package/dist/s-nav-item/s-nav-item.js +70 -61
- package/dist/s-nav-item/s-nav-items.js +6 -6
- package/dist/s-review/index.js +1 -1
- package/dist/s-review/s-review.js +1 -1
- package/dist/{s-review-D5_TicCf.js → s-review-Ca6JUgGr.js} +18 -22
- package/dist/s-scroll-to-top/s-scroll-to-top.js +10 -20
- package/dist/s-switch/s-switch.js +2 -1
- package/dist/s-text-editor/s-text-editor.js +34 -26
- package/dist/s-tool-bar/index.js +1 -1
- package/dist/s-tool-bar/s-tool-bar.js +1 -1
- package/dist/s-tool-bar-Du66wRC2.js +455 -0
- package/dist/s-tool-item/s-tool-item.js +8 -5
- package/dist/s-zoom-image/s-zoom-image.js +1 -1
- package/dist/theme/components/chip.js +10 -10
- package/dist/theme/components/components.js +86 -82
- package/dist/theme/components/day-calendar.d.ts +12 -0
- package/dist/theme/components/day-calendar.js +4 -0
- package/dist/theme/components/outlined-input.d.ts +1 -0
- package/dist/theme/components/outlined-input.js +1 -0
- package/dist/theme/components/picker-day.d.ts +12 -0
- package/dist/theme/components/picker-day.js +4 -0
- package/dist/theme/components/select.d.ts +4 -0
- package/dist/theme/components/select.js +4 -0
- package/dist/theme/components/tooltip.d.ts +3 -0
- package/package.json +1 -1
- package/dist/ChevronLeft-rgSvkrT_.js +0 -6
- package/dist/s-tool-bar-DOcT-lNr.js +0 -448
|
@@ -1,35 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
5
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
-
import { Box as o, IconButton as s } from "@mui/material";
|
|
1
|
+
import e from "../s-lazy-image/s-lazy-image.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Box as i } from "@mui/material";
|
|
7
5
|
//#region lib/s-image-comparison/s-image-comparison.tsx
|
|
8
|
-
var
|
|
9
|
-
let
|
|
10
|
-
if (!
|
|
11
|
-
let t =
|
|
12
|
-
n = Math.max(0, Math.min(100, n)),
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
}, [
|
|
16
|
-
|
|
17
|
-
}, [
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
6
|
+
var a = t.forwardRef(({ sx: a, leftImage: o, rightImage: s, altLeft: c = "Left image", altRight: l = "Right image", initialPosition: u = 50, ...d }, f) => {
|
|
7
|
+
let p = Array.isArray(o) ? o : [o], m = Array.isArray(c) ? c : [c], [h, g] = t.useState(0), [_, v] = t.useState(u), [y, b] = t.useState(!1), x = t.useRef(null), S = p.length > 1, C = (e) => {
|
|
8
|
+
if (!x.current) return;
|
|
9
|
+
let t = x.current.getBoundingClientRect(), n = (e - t.left) / t.width * 100;
|
|
10
|
+
n = Math.max(0, Math.min(100, n)), v(n);
|
|
11
|
+
}, w = t.useCallback((e) => {
|
|
12
|
+
y && C(e.clientX);
|
|
13
|
+
}, [y]), T = t.useCallback((e) => {
|
|
14
|
+
y && C(e.touches[0].clientX);
|
|
15
|
+
}, [y]), E = () => {
|
|
16
|
+
b(!0);
|
|
17
|
+
}, D = () => {
|
|
18
|
+
b(!1);
|
|
19
|
+
}, O = (e) => {
|
|
20
|
+
v(Number(e.target.value));
|
|
23
21
|
};
|
|
24
|
-
return
|
|
25
|
-
document.removeEventListener("mousemove",
|
|
22
|
+
return t.useEffect(() => (y ? (document.addEventListener("mousemove", w), document.addEventListener("touchmove", T), document.addEventListener("mouseup", D), document.addEventListener("touchend", D), document.body.style.cursor = "ew-resize") : document.body.style.cursor = "", () => {
|
|
23
|
+
document.removeEventListener("mousemove", w), document.removeEventListener("touchmove", T), document.removeEventListener("mouseup", D), document.removeEventListener("touchend", D), document.body.style.cursor = "";
|
|
26
24
|
}), [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
]), /* @__PURE__ */
|
|
25
|
+
y,
|
|
26
|
+
w,
|
|
27
|
+
T
|
|
28
|
+
]), /* @__PURE__ */ r(i, {
|
|
31
29
|
ref: (e) => {
|
|
32
|
-
|
|
30
|
+
x.current = e, typeof f == "function" ? f(e) : f && (f.current = e);
|
|
33
31
|
},
|
|
34
32
|
sx: {
|
|
35
33
|
position: "relative",
|
|
@@ -37,15 +35,15 @@ var c = r.forwardRef(({ sx: c, leftImage: l, rightImage: u, altLeft: d = "Left i
|
|
|
37
35
|
height: "100%",
|
|
38
36
|
overflow: "hidden",
|
|
39
37
|
userSelect: "none",
|
|
40
|
-
...
|
|
38
|
+
...a
|
|
41
39
|
},
|
|
42
|
-
onMouseDown:
|
|
43
|
-
onTouchStart:
|
|
44
|
-
...
|
|
40
|
+
onMouseDown: E,
|
|
41
|
+
onTouchStart: E,
|
|
42
|
+
...d,
|
|
45
43
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
src:
|
|
48
|
-
alt:
|
|
44
|
+
/* @__PURE__ */ n(e, {
|
|
45
|
+
src: s,
|
|
46
|
+
alt: l,
|
|
49
47
|
style: {
|
|
50
48
|
position: "absolute",
|
|
51
49
|
inset: 0,
|
|
@@ -56,7 +54,7 @@ var c = r.forwardRef(({ sx: c, leftImage: l, rightImage: u, altLeft: d = "Left i
|
|
|
56
54
|
},
|
|
57
55
|
draggable: !1
|
|
58
56
|
}),
|
|
59
|
-
/* @__PURE__ */ i
|
|
57
|
+
/* @__PURE__ */ n(i, {
|
|
60
58
|
sx: {
|
|
61
59
|
position: "absolute",
|
|
62
60
|
inset: 0,
|
|
@@ -64,11 +62,11 @@ var c = r.forwardRef(({ sx: c, leftImage: l, rightImage: u, altLeft: d = "Left i
|
|
|
64
62
|
height: "100%",
|
|
65
63
|
overflow: "hidden",
|
|
66
64
|
pointerEvents: "none",
|
|
67
|
-
clipPath: `polygon(0 0, ${
|
|
65
|
+
clipPath: `polygon(0 0, ${_}% 0, ${_}% 100%, 0 100%)`
|
|
68
66
|
},
|
|
69
|
-
children: /* @__PURE__ */
|
|
70
|
-
src:
|
|
71
|
-
alt:
|
|
67
|
+
children: /* @__PURE__ */ n(e, {
|
|
68
|
+
src: p[h],
|
|
69
|
+
alt: m[h] ?? m[0],
|
|
72
70
|
style: {
|
|
73
71
|
width: "100%",
|
|
74
72
|
height: "100%",
|
|
@@ -77,7 +75,7 @@ var c = r.forwardRef(({ sx: c, leftImage: l, rightImage: u, altLeft: d = "Left i
|
|
|
77
75
|
draggable: !1
|
|
78
76
|
})
|
|
79
77
|
}),
|
|
80
|
-
|
|
78
|
+
S && /* @__PURE__ */ n(i, {
|
|
81
79
|
sx: {
|
|
82
80
|
position: "absolute",
|
|
83
81
|
left: 16,
|
|
@@ -85,102 +83,72 @@ var c = r.forwardRef(({ sx: c, leftImage: l, rightImage: u, altLeft: d = "Left i
|
|
|
85
83
|
display: "flex",
|
|
86
84
|
gap: 1,
|
|
87
85
|
zIndex: 1,
|
|
88
|
-
pointerEvents:
|
|
89
|
-
opacity: +(
|
|
86
|
+
pointerEvents: y ? "none" : "auto",
|
|
87
|
+
opacity: +(_ > 10),
|
|
90
88
|
transition: "opacity 0.2s"
|
|
91
89
|
},
|
|
92
90
|
onClick: (e) => e.stopPropagation(),
|
|
93
91
|
onMouseDown: (e) => e.stopPropagation(),
|
|
94
|
-
children:
|
|
92
|
+
children: p.map((e, t) => /* @__PURE__ */ n(i, {
|
|
95
93
|
onClick: (e) => {
|
|
96
|
-
e.stopPropagation(),
|
|
94
|
+
e.stopPropagation(), g(t);
|
|
97
95
|
},
|
|
98
96
|
sx: {
|
|
99
97
|
width: 8,
|
|
100
98
|
height: 8,
|
|
101
99
|
borderRadius: "50%",
|
|
102
|
-
bgcolor:
|
|
100
|
+
bgcolor: h === t ? "primary.main" : "whiteAlpha.medium",
|
|
103
101
|
cursor: "pointer",
|
|
104
102
|
boxShadow: 1,
|
|
105
103
|
backdropFilter: "blur(4px)",
|
|
106
104
|
transition: "all 0.2s",
|
|
107
105
|
"&:hover": {
|
|
108
106
|
transform: "scale(1.2)",
|
|
109
|
-
bgcolor:
|
|
107
|
+
bgcolor: h === t ? "primary.main" : "whiteAlpha.dark"
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
110
|
}, e))
|
|
113
111
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ r(i, {
|
|
115
113
|
sx: {
|
|
116
114
|
position: "absolute",
|
|
117
115
|
top: 0,
|
|
118
116
|
height: "100%",
|
|
119
|
-
width:
|
|
117
|
+
width: 6,
|
|
120
118
|
cursor: "ew-resize",
|
|
121
|
-
left: `calc(${
|
|
119
|
+
left: `calc(${_}% - 3px)`
|
|
122
120
|
},
|
|
123
|
-
children: [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
sx: {
|
|
133
|
-
position: "absolute",
|
|
134
|
-
inset: 0,
|
|
135
|
-
opacity: 0,
|
|
136
|
-
width: "100%",
|
|
137
|
-
height: "100%",
|
|
138
|
-
cursor: "ew-resize",
|
|
139
|
-
zIndex: 2
|
|
140
|
-
}
|
|
141
|
-
}),
|
|
142
|
-
/* @__PURE__ */ i(o, { sx: {
|
|
121
|
+
children: [/* @__PURE__ */ n(i, {
|
|
122
|
+
component: "input",
|
|
123
|
+
type: "range",
|
|
124
|
+
min: 0,
|
|
125
|
+
max: 100,
|
|
126
|
+
value: _,
|
|
127
|
+
onChange: O,
|
|
128
|
+
"aria-label": "Image comparison slider",
|
|
129
|
+
sx: {
|
|
143
130
|
position: "absolute",
|
|
144
|
-
inset:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
boxShadow: "0px 0px 0px 1px rgba(0,0,0,0.1)",
|
|
162
|
-
color: "text.primary"
|
|
163
|
-
} : {},
|
|
164
|
-
transition: "all 0.3s ease-in-out",
|
|
165
|
-
"&:hover": { bgcolor: j ? "rgba(255,255,255,0.4)" : "transparent" }
|
|
166
|
-
},
|
|
167
|
-
tabIndex: -1,
|
|
168
|
-
onClick: (e) => {
|
|
169
|
-
e.preventDefault(), e.stopPropagation();
|
|
170
|
-
},
|
|
171
|
-
children: j && /* @__PURE__ */ a(o, {
|
|
172
|
-
sx: {
|
|
173
|
-
display: "flex",
|
|
174
|
-
alignItems: "center"
|
|
175
|
-
},
|
|
176
|
-
children: [/* @__PURE__ */ i(e, {}), /* @__PURE__ */ i(t, {})]
|
|
177
|
-
})
|
|
178
|
-
})
|
|
179
|
-
]
|
|
131
|
+
inset: 0,
|
|
132
|
+
opacity: 0,
|
|
133
|
+
width: "100%",
|
|
134
|
+
height: "100%",
|
|
135
|
+
cursor: "ew-resize",
|
|
136
|
+
zIndex: 2,
|
|
137
|
+
pointerEvents: "none"
|
|
138
|
+
}
|
|
139
|
+
}), /* @__PURE__ */ n(i, { sx: {
|
|
140
|
+
position: "absolute",
|
|
141
|
+
top: 0,
|
|
142
|
+
bottom: 0,
|
|
143
|
+
left: 0,
|
|
144
|
+
width: 6,
|
|
145
|
+
bgcolor: "divider",
|
|
146
|
+
backdropFilter: "blur(4px)"
|
|
147
|
+
} })]
|
|
180
148
|
})
|
|
181
149
|
]
|
|
182
150
|
});
|
|
183
151
|
});
|
|
184
|
-
|
|
152
|
+
a.displayName = "SImageComparison";
|
|
185
153
|
//#endregion
|
|
186
|
-
export {
|
|
154
|
+
export { a as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { n as e, t } from "../s-image-modal-DxwMFMNS.js";
|
|
2
|
+
export { t as DefaultMediaItem, e as SImageModal, e as default };
|
|
@@ -1,399 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { t as n } from "../Close-oXeOGTZb.js";
|
|
4
|
-
import r from "../s-lazy-image/s-lazy-image.js";
|
|
5
|
-
import i, { useEffect as a, useState as o } from "react";
|
|
6
|
-
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
-
import { Box as u, IconButton as d, Modal as f, Paper as p, Stack as m, Typography as h } from "@mui/material";
|
|
8
|
-
import { AnimatePresence as g, motion as _ } from "framer-motion";
|
|
9
|
-
//#region lib/s-image-modal/s-image-modal.tsx
|
|
10
|
-
var v = ({ item: e, onClick: t, style: n = {}, objectFit: i = "contain", disableVideoControls: a = !1 }) => e.type === "video" ? /* @__PURE__ */ c(u, {
|
|
11
|
-
component: "video",
|
|
12
|
-
onClick: t,
|
|
13
|
-
controls: !a,
|
|
14
|
-
sx: {
|
|
15
|
-
width: "100%",
|
|
16
|
-
height: "100%",
|
|
17
|
-
objectFit: i,
|
|
18
|
-
bgcolor: "background.paper",
|
|
19
|
-
...n
|
|
20
|
-
},
|
|
21
|
-
children: /* @__PURE__ */ c("source", {
|
|
22
|
-
src: e.url,
|
|
23
|
-
type: "video/mp4"
|
|
24
|
-
})
|
|
25
|
-
}) : /* @__PURE__ */ c(r, {
|
|
26
|
-
src: e.url,
|
|
27
|
-
alt: e.title ?? "",
|
|
28
|
-
onClick: t,
|
|
29
|
-
style: {
|
|
30
|
-
width: "100%",
|
|
31
|
-
height: "100%",
|
|
32
|
-
objectFit: i,
|
|
33
|
-
backgroundColor: "background.paper",
|
|
34
|
-
...n
|
|
35
|
-
}
|
|
36
|
-
}), y = ({ selectedItem: r, isOpen: y, onClose: b, onItemChange: x, mediaItems: S = [], renderMediaItem: C, showNavigation: w = !0, showThumbnailDock: T = !0, showCounter: E = !0, modalSx: D = {} }) => {
|
|
37
|
-
let [O, k] = o(r ?? null), A = r ?? O;
|
|
38
|
-
a(() => {
|
|
39
|
-
r && k(r);
|
|
40
|
-
}, [r]);
|
|
41
|
-
let j = w && S.length > 1 && A, M = A ? S.findIndex((e) => e.id === A.id) : -1, N = S.length, P = i.useCallback(() => {
|
|
42
|
-
if (j && M > 0) {
|
|
43
|
-
let e = S[M - 1];
|
|
44
|
-
x ? x(e) : k(e);
|
|
45
|
-
}
|
|
46
|
-
}, [
|
|
47
|
-
j,
|
|
48
|
-
M,
|
|
49
|
-
S,
|
|
50
|
-
x
|
|
51
|
-
]), F = i.useCallback(() => {
|
|
52
|
-
if (j && M < N - 1) {
|
|
53
|
-
let e = S[M + 1];
|
|
54
|
-
x ? x(e) : k(e);
|
|
55
|
-
}
|
|
56
|
-
}, [
|
|
57
|
-
j,
|
|
58
|
-
M,
|
|
59
|
-
N,
|
|
60
|
-
S,
|
|
61
|
-
x
|
|
62
|
-
]);
|
|
63
|
-
return a(() => {
|
|
64
|
-
let e = (e) => {
|
|
65
|
-
if (y) switch (e.key) {
|
|
66
|
-
case "ArrowLeft":
|
|
67
|
-
P();
|
|
68
|
-
break;
|
|
69
|
-
case "ArrowRight":
|
|
70
|
-
F();
|
|
71
|
-
break;
|
|
72
|
-
case "Escape":
|
|
73
|
-
b();
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
78
|
-
}, [
|
|
79
|
-
y,
|
|
80
|
-
M,
|
|
81
|
-
N,
|
|
82
|
-
j,
|
|
83
|
-
P,
|
|
84
|
-
F,
|
|
85
|
-
b
|
|
86
|
-
]), !y || !A ? null : /* @__PURE__ */ c(f, {
|
|
87
|
-
open: y,
|
|
88
|
-
onClose: b,
|
|
89
|
-
sx: {
|
|
90
|
-
zIndex: (e) => e.zIndex.modal + 100,
|
|
91
|
-
...D
|
|
92
|
-
},
|
|
93
|
-
slotProps: { backdrop: { sx: {
|
|
94
|
-
backdropFilter: "blur(8px)",
|
|
95
|
-
zIndex: (e) => e.zIndex.modal + 99
|
|
96
|
-
} } },
|
|
97
|
-
children: /* @__PURE__ */ l(u, { children: [/* @__PURE__ */ c(_.div, {
|
|
98
|
-
initial: { scale: .98 },
|
|
99
|
-
animate: { scale: 1 },
|
|
100
|
-
exit: { scale: .98 },
|
|
101
|
-
transition: {
|
|
102
|
-
type: "spring",
|
|
103
|
-
stiffness: 400,
|
|
104
|
-
damping: 30
|
|
105
|
-
},
|
|
106
|
-
children: /* @__PURE__ */ l(p, {
|
|
107
|
-
sx: {
|
|
108
|
-
position: "fixed",
|
|
109
|
-
inset: 0,
|
|
110
|
-
width: "100%",
|
|
111
|
-
minHeight: "100vh",
|
|
112
|
-
borderRadius: 0,
|
|
113
|
-
overflow: "hidden",
|
|
114
|
-
zIndex: (e) => e.zIndex.modal + 101
|
|
115
|
-
},
|
|
116
|
-
children: [
|
|
117
|
-
/* @__PURE__ */ c(u, {
|
|
118
|
-
sx: {
|
|
119
|
-
height: "100%",
|
|
120
|
-
display: "flex",
|
|
121
|
-
flexDirection: "column"
|
|
122
|
-
},
|
|
123
|
-
children: /* @__PURE__ */ c(u, {
|
|
124
|
-
sx: {
|
|
125
|
-
flex: 1,
|
|
126
|
-
p: {
|
|
127
|
-
xs: 1,
|
|
128
|
-
sm: 2,
|
|
129
|
-
md: 3
|
|
130
|
-
},
|
|
131
|
-
display: "flex",
|
|
132
|
-
alignItems: "center",
|
|
133
|
-
justifyContent: "center",
|
|
134
|
-
bgcolor: "background.default"
|
|
135
|
-
},
|
|
136
|
-
children: /* @__PURE__ */ c(g, {
|
|
137
|
-
mode: "wait",
|
|
138
|
-
children: /* @__PURE__ */ c(_.div, {
|
|
139
|
-
style: { position: "relative" },
|
|
140
|
-
initial: {
|
|
141
|
-
y: 20,
|
|
142
|
-
scale: .97
|
|
143
|
-
},
|
|
144
|
-
animate: {
|
|
145
|
-
y: 0,
|
|
146
|
-
scale: 1,
|
|
147
|
-
transition: {
|
|
148
|
-
type: "spring",
|
|
149
|
-
stiffness: 500,
|
|
150
|
-
damping: 30,
|
|
151
|
-
mass: .5
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
exit: {
|
|
155
|
-
y: 20,
|
|
156
|
-
scale: .97,
|
|
157
|
-
transition: { duration: .15 }
|
|
158
|
-
},
|
|
159
|
-
children: /* @__PURE__ */ l(p, {
|
|
160
|
-
onClick: (e) => e.stopPropagation(),
|
|
161
|
-
sx: {
|
|
162
|
-
position: "relative",
|
|
163
|
-
width: "100%",
|
|
164
|
-
aspectRatio: "16 / 9",
|
|
165
|
-
maxWidth: {
|
|
166
|
-
xs: "95%",
|
|
167
|
-
sm: "85%",
|
|
168
|
-
md: 960
|
|
169
|
-
},
|
|
170
|
-
height: "70vh",
|
|
171
|
-
borderRadius: 2,
|
|
172
|
-
overflow: "hidden"
|
|
173
|
-
},
|
|
174
|
-
children: [C ? C(A) : /* @__PURE__ */ c(v, { item: A }), (A.title || A.desc) && /* @__PURE__ */ l(u, {
|
|
175
|
-
sx: {
|
|
176
|
-
position: "absolute",
|
|
177
|
-
left: 0,
|
|
178
|
-
right: 0,
|
|
179
|
-
bottom: 0,
|
|
180
|
-
p: {
|
|
181
|
-
xs: 1.5,
|
|
182
|
-
sm: 2,
|
|
183
|
-
md: 3
|
|
184
|
-
},
|
|
185
|
-
background: (e) => `linear-gradient(to top, ${(e.vars ?? e).palette.background.paper}, transparent)`
|
|
186
|
-
},
|
|
187
|
-
onClick: (e) => e.stopPropagation(),
|
|
188
|
-
children: [A.title && /* @__PURE__ */ c(h, {
|
|
189
|
-
variant: "h6",
|
|
190
|
-
sx: {
|
|
191
|
-
fontWeight: 600,
|
|
192
|
-
fontSize: {
|
|
193
|
-
xs: 14,
|
|
194
|
-
sm: 18,
|
|
195
|
-
md: 20
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
children: A.title
|
|
199
|
-
}), A.desc && /* @__PURE__ */ c(h, {
|
|
200
|
-
variant: "body2",
|
|
201
|
-
sx: {
|
|
202
|
-
opacity: .8,
|
|
203
|
-
mt: .5
|
|
204
|
-
},
|
|
205
|
-
children: A.desc
|
|
206
|
-
})]
|
|
207
|
-
})]
|
|
208
|
-
})
|
|
209
|
-
}, A.id)
|
|
210
|
-
})
|
|
211
|
-
})
|
|
212
|
-
}),
|
|
213
|
-
/* @__PURE__ */ c(d, {
|
|
214
|
-
"aria-label": "Close",
|
|
215
|
-
onClick: b,
|
|
216
|
-
sx: {
|
|
217
|
-
position: "absolute",
|
|
218
|
-
top: {
|
|
219
|
-
xs: 8,
|
|
220
|
-
sm: 10,
|
|
221
|
-
md: 12
|
|
222
|
-
},
|
|
223
|
-
right: {
|
|
224
|
-
xs: 8,
|
|
225
|
-
sm: 10,
|
|
226
|
-
md: 12
|
|
227
|
-
},
|
|
228
|
-
zIndex: (e) => e.zIndex.modal + 102
|
|
229
|
-
},
|
|
230
|
-
children: /* @__PURE__ */ c(n, {})
|
|
231
|
-
}),
|
|
232
|
-
E && j && /* @__PURE__ */ l(u, {
|
|
233
|
-
sx: {
|
|
234
|
-
position: "absolute",
|
|
235
|
-
top: {
|
|
236
|
-
xs: 8,
|
|
237
|
-
sm: 10,
|
|
238
|
-
md: 12
|
|
239
|
-
},
|
|
240
|
-
left: {
|
|
241
|
-
xs: 8,
|
|
242
|
-
sm: 10,
|
|
243
|
-
md: 12
|
|
244
|
-
},
|
|
245
|
-
zIndex: (e) => e.zIndex.modal + 102,
|
|
246
|
-
padding: 1,
|
|
247
|
-
px: 2,
|
|
248
|
-
fontSize: {
|
|
249
|
-
xs: 14,
|
|
250
|
-
sm: 16
|
|
251
|
-
},
|
|
252
|
-
color: "text.primary"
|
|
253
|
-
},
|
|
254
|
-
children: [
|
|
255
|
-
M + 1,
|
|
256
|
-
" / ",
|
|
257
|
-
N
|
|
258
|
-
]
|
|
259
|
-
}),
|
|
260
|
-
j && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(d, {
|
|
261
|
-
"aria-label": "Previous image",
|
|
262
|
-
onClick: (e) => {
|
|
263
|
-
e.stopPropagation(), P();
|
|
264
|
-
},
|
|
265
|
-
disabled: M === 0,
|
|
266
|
-
sx: {
|
|
267
|
-
position: "absolute",
|
|
268
|
-
left: {
|
|
269
|
-
xs: 8,
|
|
270
|
-
sm: 10,
|
|
271
|
-
md: 12
|
|
272
|
-
},
|
|
273
|
-
top: "50%",
|
|
274
|
-
transform: "translateY(-50%)",
|
|
275
|
-
zIndex: (e) => e.zIndex.modal + 102,
|
|
276
|
-
"&:disabled": { opacity: .5 }
|
|
277
|
-
},
|
|
278
|
-
children: /* @__PURE__ */ c(e, {})
|
|
279
|
-
}), /* @__PURE__ */ c(d, {
|
|
280
|
-
"aria-label": "Next image",
|
|
281
|
-
onClick: (e) => {
|
|
282
|
-
e.stopPropagation(), F();
|
|
283
|
-
},
|
|
284
|
-
disabled: M === N - 1,
|
|
285
|
-
sx: {
|
|
286
|
-
position: "absolute",
|
|
287
|
-
right: {
|
|
288
|
-
xs: 8,
|
|
289
|
-
sm: 10,
|
|
290
|
-
md: 12
|
|
291
|
-
},
|
|
292
|
-
top: "50%",
|
|
293
|
-
transform: "translateY(-50%)",
|
|
294
|
-
zIndex: (e) => e.zIndex.modal + 102,
|
|
295
|
-
"&:disabled": { opacity: .5 }
|
|
296
|
-
},
|
|
297
|
-
children: /* @__PURE__ */ c(t, {})
|
|
298
|
-
})] })
|
|
299
|
-
]
|
|
300
|
-
})
|
|
301
|
-
}), T && j && S.length > 1 && /* @__PURE__ */ c(u, {
|
|
302
|
-
sx: {
|
|
303
|
-
position: "fixed",
|
|
304
|
-
zIndex: 1502,
|
|
305
|
-
left: "50%",
|
|
306
|
-
bottom: 16,
|
|
307
|
-
transform: "translateX(-50%)"
|
|
308
|
-
},
|
|
309
|
-
children: /* @__PURE__ */ c(p, {
|
|
310
|
-
sx: {
|
|
311
|
-
position: "relative",
|
|
312
|
-
borderRadius: 3,
|
|
313
|
-
bgcolor: "background.paper",
|
|
314
|
-
border: "1px solid",
|
|
315
|
-
borderColor: "divider",
|
|
316
|
-
backdropFilter: "blur(12px)",
|
|
317
|
-
px: 1.5,
|
|
318
|
-
py: 1
|
|
319
|
-
},
|
|
320
|
-
children: /* @__PURE__ */ c(m, {
|
|
321
|
-
direction: "row",
|
|
322
|
-
spacing: -1.5,
|
|
323
|
-
sx: { alignItems: "center" },
|
|
324
|
-
children: S.map((e, t) => {
|
|
325
|
-
let n = A.id === e.id, r = t % 2 == 0 ? -15 : 15, i = () => {
|
|
326
|
-
x ? x(e) : k(e);
|
|
327
|
-
};
|
|
328
|
-
return /* @__PURE__ */ l(_.div, {
|
|
329
|
-
onClick: (e) => {
|
|
330
|
-
e.stopPropagation(), i();
|
|
331
|
-
},
|
|
332
|
-
style: {
|
|
333
|
-
position: "relative",
|
|
334
|
-
width: 40,
|
|
335
|
-
height: 40,
|
|
336
|
-
borderRadius: 10,
|
|
337
|
-
overflow: "hidden",
|
|
338
|
-
flexShrink: 0,
|
|
339
|
-
zIndex: n ? 30 : S.length - t,
|
|
340
|
-
border: n ? "1px solid" : void 0,
|
|
341
|
-
borderColor: n ? "divider" : void 0,
|
|
342
|
-
cursor: "pointer"
|
|
343
|
-
},
|
|
344
|
-
initial: { rotate: r },
|
|
345
|
-
animate: {
|
|
346
|
-
scale: n ? 1.2 : 1,
|
|
347
|
-
rotate: n ? 0 : r,
|
|
348
|
-
y: n ? -8 : 0
|
|
349
|
-
},
|
|
350
|
-
whileHover: {
|
|
351
|
-
scale: 1.3,
|
|
352
|
-
rotate: 0,
|
|
353
|
-
y: -10,
|
|
354
|
-
transition: {
|
|
355
|
-
type: "spring",
|
|
356
|
-
stiffness: 400,
|
|
357
|
-
damping: 25
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
children: [
|
|
361
|
-
C ? C(e, i) : /* @__PURE__ */ c(v, {
|
|
362
|
-
item: e,
|
|
363
|
-
objectFit: "cover",
|
|
364
|
-
style: {
|
|
365
|
-
width: "100%",
|
|
366
|
-
height: "100%",
|
|
367
|
-
pointerEvents: e.type === "video" ? "none" : "auto"
|
|
368
|
-
},
|
|
369
|
-
disableVideoControls: !0
|
|
370
|
-
}),
|
|
371
|
-
/* @__PURE__ */ c(u, { sx: {
|
|
372
|
-
position: "absolute",
|
|
373
|
-
inset: 0,
|
|
374
|
-
background: (e) => `linear-gradient(to bottom, transparent, ${(e.vars ?? e).palette.action.hover}, ${(e.vars ?? e).palette.action.selected})`,
|
|
375
|
-
pointerEvents: "none"
|
|
376
|
-
} }),
|
|
377
|
-
n && /* @__PURE__ */ c(_.div, {
|
|
378
|
-
layoutId: "activeGlow",
|
|
379
|
-
style: {
|
|
380
|
-
position: "absolute",
|
|
381
|
-
inset: -8,
|
|
382
|
-
background: "primary.main",
|
|
383
|
-
filter: "blur(16px)"
|
|
384
|
-
},
|
|
385
|
-
initial: { opacity: 0 },
|
|
386
|
-
animate: { opacity: 1 },
|
|
387
|
-
transition: { duration: .2 }
|
|
388
|
-
})
|
|
389
|
-
]
|
|
390
|
-
}, e.id);
|
|
391
|
-
})
|
|
392
|
-
})
|
|
393
|
-
})
|
|
394
|
-
})] })
|
|
395
|
-
});
|
|
396
|
-
};
|
|
397
|
-
y.displayName = "SImageModal";
|
|
398
|
-
//#endregion
|
|
399
|
-
export { v as DefaultMediaItem, y as SImageModal, y as default };
|
|
1
|
+
import { n as e, t } from "../s-image-modal-DxwMFMNS.js";
|
|
2
|
+
export { t as DefaultMediaItem, e as SImageModal, e as default };
|