@solostylist/ui-kit 1.0.82 → 1.0.84
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-chips/s-chips.js +5 -3
- package/dist/s-copyable-text/s-copyable-text.js +13 -19
- package/dist/s-dialog-confirm/s-dialog-confirm.js +18 -18
- package/dist/s-file-dropzone/s-file-dropzone.d.ts +5 -5
- package/dist/s-file-dropzone/s-file-dropzone.js +44 -45
- package/dist/s-interactive-gallery/s-interactive-gallery.js +96 -94
- package/dist/s-lazy-image/s-lazy-image.js +42 -36
- package/dist/s-snackbar-message/s-snackbar-message.d.ts +2 -2
- package/dist/s-snackbar-message/s-snackbar-message.js +2 -2
- package/dist/s-text-editor/s-text-editor-toolbar.js +19 -19
- package/dist/s-text-truncation/s-text-truncation.js +7 -7
- package/dist/theme/components/alert.d.ts +56 -0
- package/dist/theme/components/alert.js +53 -0
- package/dist/theme/components/button.d.ts +3 -0
- package/dist/theme/components/button.js +24 -21
- package/dist/theme/components/components.d.ts +73 -0
- package/dist/theme/components/components.js +26 -22
- package/dist/theme/components/tooltip.d.ts +14 -0
- package/dist/theme/components/tooltip.js +17 -0
- package/dist/theme/customizations/feedback.js +12 -30
- package/dist/theme/customizations/inputs.js +21 -15
- package/dist/theme/customizations/navigation.js +5 -6
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as i } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { AnimatePresence as k, motion as
|
|
2
|
+
import { useState as y, useEffect as v, useRef as z } from "react";
|
|
3
|
+
import { Box as a, Paper as b, Typography as m, Modal as R, IconButton as j, Stack as P } from "@mui/material";
|
|
4
|
+
import { AnimatePresence as k, motion as f } from "framer-motion";
|
|
5
5
|
import S from "../s-lazy-image/s-lazy-image.js";
|
|
6
6
|
import { C as E } from "../Close-C1lLcTQu.js";
|
|
7
7
|
import { c as C } from "../createSvgIcon-9XY7lJan.js";
|
|
@@ -9,8 +9,8 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
9
9
|
d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"
|
|
10
10
|
}), "ChevronLeft"), M = C(/* @__PURE__ */ i.jsx("path", {
|
|
11
11
|
d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
12
|
-
}), "ChevronRight"), w = ({ item: r, sx: s, onClick:
|
|
13
|
-
const
|
|
12
|
+
}), "ChevronRight"), w = ({ item: r, sx: s, onClick: l }) => {
|
|
13
|
+
const o = z(null), [d, u] = y(!1), [g, e] = y(!0);
|
|
14
14
|
return v(() => {
|
|
15
15
|
const n = {
|
|
16
16
|
root: null,
|
|
@@ -19,27 +19,27 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
19
19
|
threshold: 0.1
|
|
20
20
|
// Trigger when 10% of video is visible
|
|
21
21
|
}, x = new IntersectionObserver((p) => {
|
|
22
|
-
p.forEach((t) =>
|
|
22
|
+
p.forEach((t) => u(t.isIntersecting));
|
|
23
23
|
}, n);
|
|
24
|
-
return
|
|
25
|
-
|
|
24
|
+
return o.current && x.observe(o.current), () => {
|
|
25
|
+
o.current && x.unobserve(o.current);
|
|
26
26
|
};
|
|
27
27
|
}, []), v(() => {
|
|
28
28
|
let n = !0;
|
|
29
29
|
return d ? (async () => {
|
|
30
|
-
if (!(!
|
|
30
|
+
if (!(!o.current || !d || !n))
|
|
31
31
|
try {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}), n && (
|
|
32
|
+
o.current.readyState >= 3 ? (e(!1), await o.current.play()) : (e(!0), await new Promise((p) => {
|
|
33
|
+
o.current && (o.current.oncanplay = () => p());
|
|
34
|
+
}), n && (e(!1), await o.current.play()));
|
|
35
35
|
} catch (p) {
|
|
36
36
|
console.warn("Video playback failed:", p);
|
|
37
37
|
}
|
|
38
|
-
})() :
|
|
39
|
-
n = !1,
|
|
38
|
+
})() : o.current && o.current.pause(), () => {
|
|
39
|
+
n = !1, o.current && (o.current.pause(), o.current.removeAttribute("src"), o.current.load());
|
|
40
40
|
};
|
|
41
41
|
}, [d]), r.type === "video" ? /* @__PURE__ */ i.jsxs(
|
|
42
|
-
|
|
42
|
+
a,
|
|
43
43
|
{
|
|
44
44
|
sx: {
|
|
45
45
|
position: "relative",
|
|
@@ -50,11 +50,11 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
50
50
|
},
|
|
51
51
|
children: [
|
|
52
52
|
/* @__PURE__ */ i.jsx(
|
|
53
|
-
|
|
53
|
+
a,
|
|
54
54
|
{
|
|
55
55
|
component: "video",
|
|
56
|
-
ref:
|
|
57
|
-
onClick:
|
|
56
|
+
ref: o,
|
|
57
|
+
onClick: l,
|
|
58
58
|
playsInline: !0,
|
|
59
59
|
muted: !0,
|
|
60
60
|
loop: !0,
|
|
@@ -63,7 +63,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
63
63
|
width: "100%",
|
|
64
64
|
height: "100%",
|
|
65
65
|
objectFit: "cover",
|
|
66
|
-
opacity:
|
|
66
|
+
opacity: g ? 0.8 : 1,
|
|
67
67
|
transition: "opacity 0.2s",
|
|
68
68
|
transform: "translateZ(0)",
|
|
69
69
|
willChange: "transform",
|
|
@@ -72,8 +72,8 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
72
72
|
children: /* @__PURE__ */ i.jsx("source", { src: r.url, type: "video/mp4" })
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
g && /* @__PURE__ */ i.jsx(
|
|
76
|
+
a,
|
|
77
77
|
{
|
|
78
78
|
sx: {
|
|
79
79
|
position: "absolute",
|
|
@@ -84,7 +84,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
84
84
|
bgcolor: "action.disabled"
|
|
85
85
|
},
|
|
86
86
|
children: /* @__PURE__ */ i.jsx(
|
|
87
|
-
|
|
87
|
+
a,
|
|
88
88
|
{
|
|
89
89
|
sx: {
|
|
90
90
|
width: 24,
|
|
@@ -104,7 +104,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
104
104
|
)
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
|
-
) : /* @__PURE__ */ i.jsx(
|
|
107
|
+
) : /* @__PURE__ */ i.jsx(a, { onClick: l, sx: { width: "100%", height: "100%", ...s }, children: /* @__PURE__ */ i.jsx(
|
|
108
108
|
S,
|
|
109
109
|
{
|
|
110
110
|
src: r.url,
|
|
@@ -113,7 +113,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
113
113
|
height: "100%",
|
|
114
114
|
style: {
|
|
115
115
|
objectFit: s != null && s.objectFit ? s.objectFit : "cover",
|
|
116
|
-
cursor:
|
|
116
|
+
cursor: l ? "pointer" : "default",
|
|
117
117
|
display: "block",
|
|
118
118
|
width: "100%",
|
|
119
119
|
height: "100%"
|
|
@@ -123,14 +123,14 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
123
123
|
}, L = ({
|
|
124
124
|
selectedItem: r,
|
|
125
125
|
isOpen: s,
|
|
126
|
-
onClose:
|
|
127
|
-
setSelectedItem:
|
|
126
|
+
onClose: l,
|
|
127
|
+
setSelectedItem: o,
|
|
128
128
|
mediaItems: d
|
|
129
129
|
}) => {
|
|
130
|
-
const [
|
|
131
|
-
|
|
130
|
+
const [u, g] = y({ x: 0, y: 0 }), e = d.findIndex((t) => t.id === r.id), n = d.length, x = () => {
|
|
131
|
+
e > 0 && o(d[e - 1]);
|
|
132
132
|
}, p = () => {
|
|
133
|
-
|
|
133
|
+
e < n - 1 && o(d[e + 1]);
|
|
134
134
|
};
|
|
135
135
|
return v(() => {
|
|
136
136
|
const t = (c) => {
|
|
@@ -143,16 +143,16 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
143
143
|
p();
|
|
144
144
|
break;
|
|
145
145
|
case "Escape":
|
|
146
|
-
|
|
146
|
+
l();
|
|
147
147
|
break;
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
151
|
-
}, [s,
|
|
151
|
+
}, [s, e, n]), s ? /* @__PURE__ */ i.jsx(
|
|
152
152
|
R,
|
|
153
153
|
{
|
|
154
154
|
open: s,
|
|
155
|
-
onClose:
|
|
155
|
+
onClose: l,
|
|
156
156
|
sx: {
|
|
157
157
|
zIndex: (t) => t.zIndex.modal + 100
|
|
158
158
|
// Increased z-index
|
|
@@ -166,16 +166,16 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
},
|
|
169
|
-
children: /* @__PURE__ */ i.jsxs(
|
|
169
|
+
children: /* @__PURE__ */ i.jsxs(a, { children: [
|
|
170
170
|
/* @__PURE__ */ i.jsx(
|
|
171
|
-
|
|
171
|
+
f.div,
|
|
172
172
|
{
|
|
173
173
|
initial: { scale: 0.98 },
|
|
174
174
|
animate: { scale: 1 },
|
|
175
175
|
exit: { scale: 0.98 },
|
|
176
176
|
transition: { type: "spring", stiffness: 400, damping: 30 },
|
|
177
177
|
children: /* @__PURE__ */ i.jsxs(
|
|
178
|
-
|
|
178
|
+
b,
|
|
179
179
|
{
|
|
180
180
|
elevation: 3,
|
|
181
181
|
sx: {
|
|
@@ -190,7 +190,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
190
190
|
},
|
|
191
191
|
children: [
|
|
192
192
|
/* @__PURE__ */ i.jsx(
|
|
193
|
-
|
|
193
|
+
a,
|
|
194
194
|
{
|
|
195
195
|
sx: {
|
|
196
196
|
height: "100%",
|
|
@@ -198,7 +198,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
198
198
|
flexDirection: "column"
|
|
199
199
|
},
|
|
200
200
|
children: /* @__PURE__ */ i.jsx(
|
|
201
|
-
|
|
201
|
+
a,
|
|
202
202
|
{
|
|
203
203
|
sx: {
|
|
204
204
|
flex: 1,
|
|
@@ -209,7 +209,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
209
209
|
bgcolor: "background.default"
|
|
210
210
|
},
|
|
211
211
|
children: /* @__PURE__ */ i.jsx(k, { mode: "wait", children: /* @__PURE__ */ i.jsx(
|
|
212
|
-
|
|
212
|
+
f.div,
|
|
213
213
|
{
|
|
214
214
|
style: { position: "relative" },
|
|
215
215
|
initial: { y: 20, scale: 0.97 },
|
|
@@ -219,9 +219,9 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
219
219
|
transition: { type: "spring", stiffness: 500, damping: 30, mass: 0.5 }
|
|
220
220
|
},
|
|
221
221
|
exit: { y: 20, scale: 0.97, transition: { duration: 0.15 } },
|
|
222
|
-
onClick:
|
|
222
|
+
onClick: l,
|
|
223
223
|
children: /* @__PURE__ */ i.jsxs(
|
|
224
|
-
|
|
224
|
+
b,
|
|
225
225
|
{
|
|
226
226
|
elevation: 6,
|
|
227
227
|
sx: {
|
|
@@ -239,11 +239,11 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
239
239
|
{
|
|
240
240
|
item: r,
|
|
241
241
|
sx: { width: "100%", height: "100%", objectFit: "contain", bgcolor: "background.paper" },
|
|
242
|
-
onClick:
|
|
242
|
+
onClick: l
|
|
243
243
|
}
|
|
244
244
|
),
|
|
245
245
|
/* @__PURE__ */ i.jsxs(
|
|
246
|
-
|
|
246
|
+
a,
|
|
247
247
|
{
|
|
248
248
|
sx: {
|
|
249
249
|
position: "absolute",
|
|
@@ -275,7 +275,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
275
275
|
j,
|
|
276
276
|
{
|
|
277
277
|
"aria-label": "Close",
|
|
278
|
-
onClick:
|
|
278
|
+
onClick: l,
|
|
279
279
|
sx: {
|
|
280
280
|
position: "absolute",
|
|
281
281
|
top: { xs: 8, sm: 10, md: 12 },
|
|
@@ -287,7 +287,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
287
287
|
}
|
|
288
288
|
),
|
|
289
289
|
/* @__PURE__ */ i.jsxs(
|
|
290
|
-
|
|
290
|
+
a,
|
|
291
291
|
{
|
|
292
292
|
sx: {
|
|
293
293
|
position: "absolute",
|
|
@@ -300,7 +300,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
300
300
|
color: "text.primary"
|
|
301
301
|
},
|
|
302
302
|
children: [
|
|
303
|
-
|
|
303
|
+
e + 1,
|
|
304
304
|
" / ",
|
|
305
305
|
n
|
|
306
306
|
]
|
|
@@ -313,7 +313,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
313
313
|
onClick: (t) => {
|
|
314
314
|
t.stopPropagation(), x();
|
|
315
315
|
},
|
|
316
|
-
disabled:
|
|
316
|
+
disabled: e === 0,
|
|
317
317
|
sx: {
|
|
318
318
|
position: "absolute",
|
|
319
319
|
left: { xs: 8, sm: 10, md: 12 },
|
|
@@ -334,7 +334,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
334
334
|
onClick: (t) => {
|
|
335
335
|
t.stopPropagation(), p();
|
|
336
336
|
},
|
|
337
|
-
disabled:
|
|
337
|
+
disabled: e === n - 1,
|
|
338
338
|
sx: {
|
|
339
339
|
position: "absolute",
|
|
340
340
|
right: { xs: 8, sm: 10, md: 12 },
|
|
@@ -354,15 +354,15 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
354
354
|
}
|
|
355
355
|
),
|
|
356
356
|
/* @__PURE__ */ i.jsx(
|
|
357
|
-
|
|
357
|
+
f.div,
|
|
358
358
|
{
|
|
359
359
|
drag: !0,
|
|
360
360
|
dragMomentum: !1,
|
|
361
361
|
dragElastic: 0.1,
|
|
362
362
|
initial: !1,
|
|
363
|
-
animate: { x:
|
|
363
|
+
animate: { x: u.x, y: u.y },
|
|
364
364
|
onDragEnd: (t, c) => {
|
|
365
|
-
|
|
365
|
+
g((h) => ({ x: h.x + c.offset.x, y: h.y + c.offset.y }));
|
|
366
366
|
},
|
|
367
367
|
style: {
|
|
368
368
|
position: "fixed",
|
|
@@ -374,7 +374,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
374
374
|
touchAction: "none"
|
|
375
375
|
},
|
|
376
376
|
children: /* @__PURE__ */ i.jsx(
|
|
377
|
-
|
|
377
|
+
b,
|
|
378
378
|
{
|
|
379
379
|
elevation: 8,
|
|
380
380
|
sx: {
|
|
@@ -390,10 +390,10 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
390
390
|
py: 1
|
|
391
391
|
},
|
|
392
392
|
children: /* @__PURE__ */ i.jsx(P, { direction: "row", alignItems: "center", spacing: -1.5, children: d.map((t, c) => /* @__PURE__ */ i.jsxs(
|
|
393
|
-
|
|
393
|
+
f.div,
|
|
394
394
|
{
|
|
395
395
|
onClick: (h) => {
|
|
396
|
-
h.stopPropagation(),
|
|
396
|
+
h.stopPropagation(), o(t);
|
|
397
397
|
},
|
|
398
398
|
style: {
|
|
399
399
|
position: "relative",
|
|
@@ -420,9 +420,9 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
420
420
|
transition: { type: "spring", stiffness: 400, damping: 25 }
|
|
421
421
|
},
|
|
422
422
|
children: [
|
|
423
|
-
/* @__PURE__ */ i.jsx(w, { item: t, sx: { width: "100%", height: "100%" }, onClick: () =>
|
|
423
|
+
/* @__PURE__ */ i.jsx(w, { item: t, sx: { width: "100%", height: "100%" }, onClick: () => o(t) }),
|
|
424
424
|
/* @__PURE__ */ i.jsx(
|
|
425
|
-
|
|
425
|
+
a,
|
|
426
426
|
{
|
|
427
427
|
sx: {
|
|
428
428
|
position: "absolute",
|
|
@@ -433,7 +433,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
433
433
|
}
|
|
434
434
|
),
|
|
435
435
|
r.id === t.id && /* @__PURE__ */ i.jsx(
|
|
436
|
-
|
|
436
|
+
f.div,
|
|
437
437
|
{
|
|
438
438
|
layoutId: "activeGlow",
|
|
439
439
|
style: {
|
|
@@ -458,23 +458,23 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
458
458
|
] })
|
|
459
459
|
}
|
|
460
460
|
) : null;
|
|
461
|
-
},
|
|
462
|
-
const [s,
|
|
461
|
+
}, H = ({ mediaItems: r }) => {
|
|
462
|
+
const [s, l] = y(null), [o, d] = y(r), [u, g] = y(!1);
|
|
463
463
|
return v(() => {
|
|
464
464
|
d(r);
|
|
465
|
-
}, [r]), /* @__PURE__ */ i.jsxs(
|
|
465
|
+
}, [r]), /* @__PURE__ */ i.jsxs(a, { sx: { width: "100%", position: "relative", zIndex: 1 }, children: [
|
|
466
466
|
s && /* @__PURE__ */ i.jsx(
|
|
467
467
|
L,
|
|
468
468
|
{
|
|
469
469
|
selectedItem: s,
|
|
470
470
|
isOpen: !0,
|
|
471
|
-
onClose: () =>
|
|
472
|
-
setSelectedItem:
|
|
473
|
-
mediaItems:
|
|
471
|
+
onClose: () => l(null),
|
|
472
|
+
setSelectedItem: l,
|
|
473
|
+
mediaItems: o
|
|
474
474
|
}
|
|
475
475
|
),
|
|
476
476
|
/* @__PURE__ */ i.jsx(k, { mode: "wait", children: !s && /* @__PURE__ */ i.jsx(
|
|
477
|
-
|
|
477
|
+
f.div,
|
|
478
478
|
{
|
|
479
479
|
initial: "hidden",
|
|
480
480
|
animate: "visible",
|
|
@@ -488,7 +488,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
488
488
|
}
|
|
489
489
|
},
|
|
490
490
|
children: /* @__PURE__ */ i.jsx(
|
|
491
|
-
|
|
491
|
+
a,
|
|
492
492
|
{
|
|
493
493
|
sx: {
|
|
494
494
|
display: "grid",
|
|
@@ -502,11 +502,11 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
502
502
|
position: "relative"
|
|
503
503
|
// Ensure proper stacking context
|
|
504
504
|
},
|
|
505
|
-
children:
|
|
506
|
-
|
|
505
|
+
children: o.map((e, n) => /* @__PURE__ */ i.jsx(
|
|
506
|
+
f.div,
|
|
507
507
|
{
|
|
508
|
-
layoutId: `media-${
|
|
509
|
-
onClick: () => !
|
|
508
|
+
layoutId: `media-${e.id}`,
|
|
509
|
+
onClick: () => !u && l(e),
|
|
510
510
|
variants: {
|
|
511
511
|
hidden: { y: 50, scale: 0.9, opacity: 0 },
|
|
512
512
|
visible: {
|
|
@@ -525,22 +525,22 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
525
525
|
drag: !0,
|
|
526
526
|
dragConstraints: { left: 0, right: 0, top: 0, bottom: 0 },
|
|
527
527
|
dragElastic: 1,
|
|
528
|
-
onDragStart: () =>
|
|
528
|
+
onDragStart: () => g(!0),
|
|
529
529
|
onDragEnd: (x, p) => {
|
|
530
|
-
|
|
530
|
+
g(!1);
|
|
531
531
|
const t = p.offset.x + p.offset.y;
|
|
532
532
|
if (Math.abs(t) > 50) {
|
|
533
|
-
const c = [...
|
|
533
|
+
const c = [...o], h = c[n], I = t > 0 ? Math.min(n + 1, o.length - 1) : Math.max(n - 1, 0);
|
|
534
534
|
c.splice(n, 1), c.splice(I, 0, h), d(c);
|
|
535
535
|
}
|
|
536
536
|
},
|
|
537
537
|
style: {
|
|
538
538
|
position: "relative",
|
|
539
|
-
gridRow:
|
|
540
|
-
gridColumn:
|
|
539
|
+
gridRow: e.rowSpan ? `span ${e.rowSpan}` : "span 2",
|
|
540
|
+
gridColumn: e.colSpan ? `span ${e.colSpan}` : "span 1"
|
|
541
541
|
},
|
|
542
542
|
children: /* @__PURE__ */ i.jsxs(
|
|
543
|
-
|
|
543
|
+
b,
|
|
544
544
|
{
|
|
545
545
|
elevation: 4,
|
|
546
546
|
sx: {
|
|
@@ -549,38 +549,40 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
549
549
|
borderRadius: 2,
|
|
550
550
|
width: "100%",
|
|
551
551
|
height: "100%",
|
|
552
|
-
minHeight: 120,
|
|
553
552
|
cursor: "grab",
|
|
554
|
-
"&:active": { cursor: "grabbing" }
|
|
553
|
+
"&:active": { cursor: "grabbing" },
|
|
554
|
+
"&:hover .hover-overlay": {
|
|
555
|
+
opacity: 1
|
|
556
|
+
}
|
|
555
557
|
},
|
|
556
558
|
children: [
|
|
557
559
|
/* @__PURE__ */ i.jsx(
|
|
558
560
|
w,
|
|
559
561
|
{
|
|
560
|
-
item:
|
|
562
|
+
item: e,
|
|
561
563
|
sx: { position: "absolute", inset: 0, width: "100%", height: "100%" },
|
|
562
|
-
onClick: () => !
|
|
564
|
+
onClick: () => !u && l(e)
|
|
563
565
|
}
|
|
564
566
|
),
|
|
565
|
-
/* @__PURE__ */ i.jsxs(
|
|
566
|
-
|
|
567
|
+
(e.title || e.desc) && /* @__PURE__ */ i.jsxs(
|
|
568
|
+
a,
|
|
567
569
|
{
|
|
568
|
-
|
|
570
|
+
className: "hover-overlay",
|
|
571
|
+
sx: {
|
|
569
572
|
position: "absolute",
|
|
570
573
|
inset: 0,
|
|
571
574
|
display: "flex",
|
|
572
575
|
flexDirection: "column",
|
|
573
576
|
justifyContent: "flex-end",
|
|
574
|
-
padding:
|
|
575
|
-
pointerEvents: "none"
|
|
577
|
+
padding: 1.5,
|
|
578
|
+
pointerEvents: "none",
|
|
576
579
|
// Prevent blocking clicks
|
|
580
|
+
opacity: 0,
|
|
581
|
+
transition: "opacity 0.2s ease-in-out"
|
|
577
582
|
},
|
|
578
|
-
initial: { opacity: 0 },
|
|
579
|
-
whileHover: { opacity: 1 },
|
|
580
|
-
transition: { duration: 0.2 },
|
|
581
583
|
children: [
|
|
582
584
|
/* @__PURE__ */ i.jsx(
|
|
583
|
-
|
|
585
|
+
a,
|
|
584
586
|
{
|
|
585
587
|
sx: {
|
|
586
588
|
position: "absolute",
|
|
@@ -589,7 +591,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
589
591
|
}
|
|
590
592
|
}
|
|
591
593
|
),
|
|
592
|
-
/* @__PURE__ */ i.jsx(
|
|
594
|
+
e.title && /* @__PURE__ */ i.jsx(
|
|
593
595
|
m,
|
|
594
596
|
{
|
|
595
597
|
variant: "subtitle2",
|
|
@@ -601,23 +603,23 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
601
603
|
overflow: "hidden",
|
|
602
604
|
textOverflow: "ellipsis"
|
|
603
605
|
},
|
|
604
|
-
children:
|
|
606
|
+
children: e.title
|
|
605
607
|
}
|
|
606
608
|
),
|
|
607
|
-
/* @__PURE__ */ i.jsx(
|
|
609
|
+
e.desc && /* @__PURE__ */ i.jsx(
|
|
608
610
|
m,
|
|
609
611
|
{
|
|
610
612
|
variant: "caption",
|
|
611
613
|
sx: {
|
|
612
614
|
position: "relative",
|
|
613
615
|
color: "text.secondary",
|
|
614
|
-
mt: 0.5,
|
|
616
|
+
mt: e.title ? 0.5 : 0,
|
|
615
617
|
display: "-webkit-box",
|
|
616
618
|
WebkitLineClamp: 2,
|
|
617
619
|
WebkitBoxOrient: "vertical",
|
|
618
620
|
overflow: "hidden"
|
|
619
621
|
},
|
|
620
|
-
children:
|
|
622
|
+
children: e.desc
|
|
621
623
|
}
|
|
622
624
|
)
|
|
623
625
|
]
|
|
@@ -627,7 +629,7 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
627
629
|
}
|
|
628
630
|
)
|
|
629
631
|
},
|
|
630
|
-
|
|
632
|
+
e.id
|
|
631
633
|
))
|
|
632
634
|
}
|
|
633
635
|
)
|
|
@@ -638,5 +640,5 @@ const D = C(/* @__PURE__ */ i.jsx("path", {
|
|
|
638
640
|
export {
|
|
639
641
|
L as GalleryModal,
|
|
640
642
|
w as MediaItem,
|
|
641
|
-
|
|
643
|
+
H as default
|
|
642
644
|
};
|
|
@@ -1,53 +1,59 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { Box as
|
|
4
|
-
const
|
|
5
|
-
src:
|
|
6
|
-
variant:
|
|
7
|
-
alt:
|
|
8
|
-
height:
|
|
9
|
-
width:
|
|
10
|
-
className:
|
|
11
|
-
style:
|
|
12
|
-
minWidth:
|
|
13
|
-
minHeight:
|
|
1
|
+
import { j as s } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
+
import { useId as w, useState as n, useEffect as x } from "react";
|
|
3
|
+
import { useTheme as j, Box as L, Skeleton as b } from "@mui/material";
|
|
4
|
+
const R = ({
|
|
5
|
+
src: u,
|
|
6
|
+
variant: o = "rounded",
|
|
7
|
+
alt: r,
|
|
8
|
+
height: t,
|
|
9
|
+
width: i,
|
|
10
|
+
className: m,
|
|
11
|
+
style: d,
|
|
12
|
+
minWidth: g = "auto",
|
|
13
|
+
minHeight: c = "auto"
|
|
14
14
|
}) => {
|
|
15
|
-
const w =
|
|
16
|
-
width:
|
|
17
|
-
height:
|
|
18
|
-
}), [
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
const l = w(), f = j(), [e, h] = n({
|
|
16
|
+
width: i || "100%",
|
|
17
|
+
height: t || "auto"
|
|
18
|
+
}), [a, p] = n(!1);
|
|
19
|
+
return x(() => {
|
|
20
|
+
h({
|
|
21
|
+
width: i || "100%",
|
|
22
|
+
height: t || "auto"
|
|
23
|
+
});
|
|
24
|
+
}, [i, t]), /* @__PURE__ */ s.jsxs(L, { height: e.height, width: e.width, children: [
|
|
25
|
+
!a && /* @__PURE__ */ s.jsx(
|
|
26
|
+
b,
|
|
22
27
|
{
|
|
23
|
-
variant:
|
|
24
|
-
id: `image-skeleton-${
|
|
28
|
+
variant: o,
|
|
29
|
+
id: `image-skeleton-${l}`,
|
|
25
30
|
animation: "wave",
|
|
26
|
-
style: { height:
|
|
31
|
+
style: { height: e.height, width: e.width, minWidth: g, minHeight: c, ...d }
|
|
27
32
|
}
|
|
28
33
|
),
|
|
29
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ s.jsx(
|
|
30
35
|
"img",
|
|
31
36
|
{
|
|
32
|
-
src:
|
|
33
|
-
alt:
|
|
37
|
+
src: u,
|
|
38
|
+
alt: r,
|
|
34
39
|
style: {
|
|
35
|
-
height:
|
|
36
|
-
width:
|
|
37
|
-
display:
|
|
38
|
-
|
|
40
|
+
height: e.height,
|
|
41
|
+
width: e.width,
|
|
42
|
+
display: a ? "block" : "none",
|
|
43
|
+
borderRadius: o === "circular" ? "50%" : o === "rounded" ? f.shape.borderRadius : "0px",
|
|
44
|
+
...d
|
|
39
45
|
},
|
|
40
|
-
className:
|
|
46
|
+
className: m,
|
|
41
47
|
onLoad: () => {
|
|
42
|
-
(!
|
|
43
|
-
width:
|
|
44
|
-
height:
|
|
45
|
-
}),
|
|
48
|
+
(!t || !i) && h({
|
|
49
|
+
width: e.width,
|
|
50
|
+
height: e.height
|
|
51
|
+
}), p(!0);
|
|
46
52
|
}
|
|
47
53
|
}
|
|
48
54
|
)
|
|
49
55
|
] });
|
|
50
56
|
};
|
|
51
57
|
export {
|
|
52
|
-
|
|
58
|
+
R as default
|
|
53
59
|
};
|
|
@@ -37,14 +37,14 @@ export default SSnackbarMessage;
|
|
|
37
37
|
*/
|
|
38
38
|
export interface SnackbarMessageOpenOptions {
|
|
39
39
|
/** The message to display */
|
|
40
|
-
message: string;
|
|
40
|
+
message: string | React.ReactNode;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Parameters for the handleOpen function
|
|
44
44
|
*/
|
|
45
45
|
export interface handleOpenParams {
|
|
46
46
|
/** Message configuration */
|
|
47
|
-
snackbarMessageOptions
|
|
47
|
+
snackbarMessageOptions?: SnackbarMessageOpenOptions;
|
|
48
48
|
/** Optional Snackbar props for customization */
|
|
49
49
|
snackbarProps?: SnackbarProps;
|
|
50
50
|
/** Optional Alert props for customization */
|
|
@@ -17,7 +17,7 @@ const x = ({
|
|
|
17
17
|
onClose: e,
|
|
18
18
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
19
19
|
...n,
|
|
20
|
-
children: /* @__PURE__ */ t.jsx(S, { onClose: e, severity: "
|
|
20
|
+
children: /* @__PURE__ */ t.jsx(S, { onClose: e, severity: "info", sx: { width: "100%" }, ...o, children: s })
|
|
21
21
|
}
|
|
22
22
|
), c = a.createContext(null), M = ({ children: s }) => {
|
|
23
23
|
const e = k(), [r, n] = a.useState({
|
|
@@ -25,7 +25,7 @@ const x = ({
|
|
|
25
25
|
}), [o, l] = a.useState({}), [i, u] = a.useState({}), p = {
|
|
26
26
|
handleOpen: a.useCallback(
|
|
27
27
|
({ snackbarMessageOptions: d, snackbarProps: g = {}, alertProps: m = {} }) => {
|
|
28
|
-
const { message: b } = d;
|
|
28
|
+
const { message: b } = d || { message: "" };
|
|
29
29
|
n({ message: b }), l(g), u(m), e.handleOpen();
|
|
30
30
|
},
|
|
31
31
|
[e]
|