@solostylist/ui-kit 1.0.138 → 1.0.140
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/main.d.ts +2 -2
- package/dist/main.js +8 -8
- package/dist/s-gallery/index.d.ts +2 -0
- package/dist/s-gallery/index.js +5 -0
- package/dist/{s-interactive-gallery/s-interactive-gallery.d.ts → s-gallery/s-gallery.d.ts} +12 -8
- package/dist/{s-interactive-gallery/s-interactive-gallery.js → s-gallery/s-gallery.js} +132 -99
- package/package.json +1 -1
- package/dist/s-interactive-gallery/index.d.ts +0 -2
- package/dist/s-interactive-gallery/index.js +0 -5
- /package/dist/{s-interactive-gallery → s-gallery}/package.json +0 -0
package/dist/main.d.ts
CHANGED
|
@@ -98,8 +98,8 @@ export { default as SSpotlightCursor } from './s-spotlight-cursor/index';
|
|
|
98
98
|
export type { SSpotlightCursorProps, SpotlightConfig } from './s-spotlight-cursor/index';
|
|
99
99
|
export { default as SCopyableText } from './s-copyable-text/index';
|
|
100
100
|
export type { SCopyableTextProps } from './s-copyable-text/index';
|
|
101
|
-
export { default as
|
|
102
|
-
export type {
|
|
101
|
+
export { default as SGallery, MediaItem } from './s-gallery/index';
|
|
102
|
+
export type { SGalleryProps, MediaItemProps, GalleryLayoutVariant } from './s-gallery/index';
|
|
103
103
|
export { default as SImageModal } from './s-image-modal/index';
|
|
104
104
|
export type { MediaItemType } from './s-image-modal/index';
|
|
105
105
|
export type { SImageModalProps } from './s-image-modal/index';
|
package/dist/main.js
CHANGED
|
@@ -11,7 +11,7 @@ import { default as b } from "./s-comment-message/s-comment-message.js";
|
|
|
11
11
|
import { default as M } from "./s-text-editor/s-text-editor.js";
|
|
12
12
|
import "./s-text-editor/s-text-editor-toolbar.js";
|
|
13
13
|
import { default as y } from "./s-checkbox/s-checkbox.js";
|
|
14
|
-
import { default as
|
|
14
|
+
import { default as I } from "./s-chip/s-chip.js";
|
|
15
15
|
import { default as F } from "./s-chips/s-chips.js";
|
|
16
16
|
import { default as B } from "./s-data-table/s-data-table.js";
|
|
17
17
|
import { DialogConfirmProvider as z, default as E, useDialogConfirm as R } from "./s-dialog-confirm/s-dialog-confirm.js";
|
|
@@ -35,7 +35,7 @@ import { default as Te } from "./s-skeleton/s-skeleton.js";
|
|
|
35
35
|
import { default as ve } from "./s-tip/s-tip.js";
|
|
36
36
|
import { default as be } from "./s-text-truncation/s-text-truncation.js";
|
|
37
37
|
import { default as Me, SnackbarMessageProvider as he, useSnackbarMessage as ye } from "./s-snackbar-message/s-snackbar-message.js";
|
|
38
|
-
import { default as
|
|
38
|
+
import { default as Ie } from "./s-form/s-form.js";
|
|
39
39
|
import { SSmartTextField as Fe } from "./s-smart-text-field/s-smart-text-field.js";
|
|
40
40
|
import { SCopilotKitProvider as Be } from "./s-copilot-kit-provider/s-copilot-kit-provider.js";
|
|
41
41
|
import { SStripeCVC as ze, SStripeExpiry as Ee, SStripeNumber as Re, StripeTextField as Ge } from "./s-stripe/s-stripe.js";
|
|
@@ -50,7 +50,7 @@ import { default as $e } from "./s-moving-border/s-moving-border.js";
|
|
|
50
50
|
import { default as oo } from "./s-scroll-reveal/s-scroll-reveal.js";
|
|
51
51
|
import { default as ao } from "./s-spotlight-cursor/s-spotlight-cursor.js";
|
|
52
52
|
import { default as fo } from "./s-copyable-text/s-copyable-text.js";
|
|
53
|
-
import { MediaItem as mo, default as so } from "./s-
|
|
53
|
+
import { MediaItem as mo, default as so } from "./s-gallery/s-gallery.js";
|
|
54
54
|
import { default as So } from "./s-image-modal/s-image-modal.js";
|
|
55
55
|
import { default as xo } from "./s-lazy-image/s-lazy-image.js";
|
|
56
56
|
import { default as no } from "./s-image-comparison/s-image-comparison.js";
|
|
@@ -59,7 +59,7 @@ import { default as Co } from "./s-category-card/s-category-card.js";
|
|
|
59
59
|
import { default as Po } from "./s-radial-pulse-animate/s-radial-pulse-animate.js";
|
|
60
60
|
import { default as Do } from "./s-rating/s-rating.js";
|
|
61
61
|
import { default as ho } from "./s-review/s-review.js";
|
|
62
|
-
import { default as
|
|
62
|
+
import { default as Lo } from "./s-tabs/s-tabs.js";
|
|
63
63
|
import { default as ko } from "./s-tabs/s-tab.js";
|
|
64
64
|
import { default as Ao } from "./s-tabs/s-tab-panel.js";
|
|
65
65
|
import { default as wo } from "./s-text-shimmer/s-text-shimmer.js";
|
|
@@ -90,7 +90,7 @@ export {
|
|
|
90
90
|
T as SChatInput,
|
|
91
91
|
v as SChatMessage,
|
|
92
92
|
y as SCheckbox,
|
|
93
|
-
|
|
93
|
+
I as SChip,
|
|
94
94
|
F as SChips,
|
|
95
95
|
b as SCommentMessage,
|
|
96
96
|
Be as SCopilotKitProvider,
|
|
@@ -106,14 +106,14 @@ export {
|
|
|
106
106
|
Y as SFileDropzone,
|
|
107
107
|
_ as SFileIcon,
|
|
108
108
|
Q as SFlexBox,
|
|
109
|
-
|
|
109
|
+
Ie as SForm,
|
|
110
|
+
so as SGallery,
|
|
110
111
|
Ze as SGlowButton,
|
|
111
112
|
Xe as SGradientIcon,
|
|
112
113
|
ee as SI18nProvider,
|
|
113
114
|
re as SIconButton,
|
|
114
115
|
no as SImageComparison,
|
|
115
116
|
So as SImageModal,
|
|
116
|
-
so as SInteractiveGallery,
|
|
117
117
|
co as SItemNotFound,
|
|
118
118
|
te as SLabel,
|
|
119
119
|
Go as SLanguagePopover,
|
|
@@ -139,7 +139,7 @@ export {
|
|
|
139
139
|
Re as SStripeNumber,
|
|
140
140
|
ko as STab,
|
|
141
141
|
Ao as STabPanel,
|
|
142
|
-
|
|
142
|
+
Lo as STabs,
|
|
143
143
|
M as STextEditor,
|
|
144
144
|
de as STextField,
|
|
145
145
|
wo as STextShimmer,
|
|
@@ -32,24 +32,28 @@ export declare const MediaItem: React.FC<MediaItemProps>;
|
|
|
32
32
|
/**
|
|
33
33
|
* Built-in layout variants for the gallery
|
|
34
34
|
*/
|
|
35
|
-
export type GalleryLayoutVariant = 'masonry' | 'grid' | 'spotlight' | 'featured';
|
|
35
|
+
export type GalleryLayoutVariant = 'masonry' | 'grid' | 'spotlight' | 'featured' | 'custom';
|
|
36
36
|
/**
|
|
37
|
-
* Props interface for the main
|
|
37
|
+
* Props interface for the main SGallery component
|
|
38
38
|
*/
|
|
39
|
-
export interface
|
|
39
|
+
export interface SGalleryProps {
|
|
40
40
|
/** Array of media items to display in the gallery */
|
|
41
41
|
mediaItems: MediaItemType[];
|
|
42
42
|
/** Layout variant to use (default: 'masonry') */
|
|
43
43
|
variant?: GalleryLayoutVariant;
|
|
44
|
+
/** Loading state - shows skeleton placeholders matching the variant layout */
|
|
45
|
+
loading?: boolean;
|
|
46
|
+
/** Number of skeleton items to show when loading (default: 6) */
|
|
47
|
+
skeletonCount?: number;
|
|
44
48
|
}
|
|
45
49
|
/**
|
|
46
|
-
*
|
|
50
|
+
* SGallery - A sophisticated media gallery with drag-and-drop, modal viewing, and animations.
|
|
47
51
|
*
|
|
48
52
|
* This component provides a complete gallery solution with:
|
|
49
53
|
*
|
|
50
54
|
* Grid Layout Features:
|
|
51
55
|
* - Responsive grid with customizable spans per item
|
|
52
|
-
* - Built-in layout variants (masonry, grid, spotlight,
|
|
56
|
+
* - Built-in layout variants (masonry, grid, spotlight, featured, custom)
|
|
53
57
|
* - Drag-and-drop reordering of items
|
|
54
58
|
* - Hover overlays with title/description
|
|
55
59
|
* - Staggered entrance animations
|
|
@@ -75,8 +79,8 @@ export interface SInteractiveGalleryProps {
|
|
|
75
79
|
*
|
|
76
80
|
* Built with Framer Motion for smooth animations and Material-UI for theming.
|
|
77
81
|
*
|
|
78
|
-
* @param props -
|
|
82
|
+
* @param props - SGalleryProps with media items array and optional layout variant
|
|
79
83
|
* @returns JSX.Element - Complete interactive gallery system
|
|
80
84
|
*/
|
|
81
|
-
declare const
|
|
82
|
-
export default
|
|
85
|
+
declare const SGallery: React.FC<SGalleryProps>;
|
|
86
|
+
export default SGallery;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { AnimatePresence as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
const e =
|
|
9
|
-
return
|
|
10
|
-
const
|
|
1
|
+
import { j as t } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { useState as y, useId as R, useEffect as b, useRef as D } from "react";
|
|
3
|
+
import { Box as a, Paper as w, Skeleton as E, Typography as j } from "@mui/material";
|
|
4
|
+
import { AnimatePresence as M, motion as I } from "framer-motion";
|
|
5
|
+
import V from "../s-image-modal/s-image-modal.js";
|
|
6
|
+
import P from "../s-lazy-image/s-lazy-image.js";
|
|
7
|
+
const A = ({ item: i, sx: o, onClick: s }) => {
|
|
8
|
+
const e = D(null), [n, l] = y(!1), [u, f] = y(!0);
|
|
9
|
+
return b(() => {
|
|
10
|
+
const c = {
|
|
11
11
|
root: null,
|
|
12
12
|
rootMargin: "50px",
|
|
13
13
|
// Start loading 50px before entering viewport
|
|
14
14
|
threshold: 0.1
|
|
15
15
|
// Trigger when 10% of video is visible
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
return e.current &&
|
|
20
|
-
e.current &&
|
|
16
|
+
}, g = new IntersectionObserver((d) => {
|
|
17
|
+
d.forEach((r) => l(r.isIntersecting));
|
|
18
|
+
}, c);
|
|
19
|
+
return e.current && g.observe(e.current), () => {
|
|
20
|
+
e.current && g.unobserve(e.current);
|
|
21
21
|
};
|
|
22
|
-
}, []),
|
|
23
|
-
let
|
|
24
|
-
return
|
|
25
|
-
if (!(!e.current || !
|
|
22
|
+
}, []), b(() => {
|
|
23
|
+
let c = !0;
|
|
24
|
+
return n ? (async () => {
|
|
25
|
+
if (!(!e.current || !n || !c))
|
|
26
26
|
try {
|
|
27
|
-
e.current.readyState >= 3 ? (
|
|
28
|
-
e.current && (e.current.oncanplay = () =>
|
|
29
|
-
}),
|
|
30
|
-
} catch (
|
|
31
|
-
console.warn("Video playback failed:",
|
|
27
|
+
e.current.readyState >= 3 ? (f(!1), await e.current.play()) : (f(!0), await new Promise((d) => {
|
|
28
|
+
e.current && (e.current.oncanplay = () => d());
|
|
29
|
+
}), c && (f(!1), await e.current.play()));
|
|
30
|
+
} catch (d) {
|
|
31
|
+
console.warn("Video playback failed:", d);
|
|
32
32
|
}
|
|
33
33
|
})() : e.current && e.current.pause(), () => {
|
|
34
|
-
|
|
34
|
+
c = !1, e.current && (e.current.pause(), e.current.removeAttribute("src"), e.current.load());
|
|
35
35
|
};
|
|
36
|
-
}, [
|
|
37
|
-
|
|
36
|
+
}, [n]), i.type === "video" ? /* @__PURE__ */ t.jsxs(
|
|
37
|
+
a,
|
|
38
38
|
{
|
|
39
39
|
sx: {
|
|
40
40
|
position: "relative",
|
|
@@ -44,12 +44,12 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
44
44
|
...o
|
|
45
45
|
},
|
|
46
46
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
47
|
+
/* @__PURE__ */ t.jsx(
|
|
48
|
+
a,
|
|
49
49
|
{
|
|
50
50
|
component: "video",
|
|
51
51
|
ref: e,
|
|
52
|
-
onClick:
|
|
52
|
+
onClick: s,
|
|
53
53
|
playsInline: !0,
|
|
54
54
|
muted: !0,
|
|
55
55
|
loop: !0,
|
|
@@ -58,17 +58,17 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
58
58
|
width: "100%",
|
|
59
59
|
height: "100%",
|
|
60
60
|
objectFit: "cover",
|
|
61
|
-
opacity:
|
|
61
|
+
opacity: u ? 0.8 : 1,
|
|
62
62
|
transition: "opacity 0.2s",
|
|
63
63
|
transform: "translateZ(0)",
|
|
64
64
|
willChange: "transform",
|
|
65
65
|
display: "block"
|
|
66
66
|
},
|
|
67
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ t.jsx("source", { src: i.url, type: "video/mp4" })
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
u && /* @__PURE__ */ t.jsx(
|
|
71
|
+
a,
|
|
72
72
|
{
|
|
73
73
|
sx: {
|
|
74
74
|
position: "absolute",
|
|
@@ -78,8 +78,8 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
78
78
|
justifyContent: "center",
|
|
79
79
|
bgcolor: "action.disabled"
|
|
80
80
|
},
|
|
81
|
-
children: /* @__PURE__ */
|
|
82
|
-
|
|
81
|
+
children: /* @__PURE__ */ t.jsx(
|
|
82
|
+
a,
|
|
83
83
|
{
|
|
84
84
|
sx: {
|
|
85
85
|
width: 24,
|
|
@@ -99,56 +99,62 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
99
99
|
)
|
|
100
100
|
]
|
|
101
101
|
}
|
|
102
|
-
) : /* @__PURE__ */
|
|
103
|
-
|
|
102
|
+
) : /* @__PURE__ */ t.jsx(a, { onClick: s, sx: { width: "100%", height: "100%", ...o }, children: /* @__PURE__ */ t.jsx(
|
|
103
|
+
P,
|
|
104
104
|
{
|
|
105
|
-
src:
|
|
106
|
-
alt:
|
|
105
|
+
src: i.url,
|
|
106
|
+
alt: i.title || "",
|
|
107
107
|
width: "100%",
|
|
108
108
|
height: "100%",
|
|
109
109
|
style: {
|
|
110
110
|
objectFit: o != null && o.objectFit ? o.objectFit : "cover",
|
|
111
|
-
cursor:
|
|
111
|
+
cursor: s ? "pointer" : "default",
|
|
112
112
|
display: "block",
|
|
113
113
|
width: "100%",
|
|
114
114
|
height: "100%"
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
) });
|
|
118
|
-
},
|
|
119
|
-
let
|
|
118
|
+
}, C = (i, o) => {
|
|
119
|
+
let s = 1, e = 2;
|
|
120
120
|
switch (o) {
|
|
121
121
|
case "grid":
|
|
122
|
-
|
|
122
|
+
s = 1, e = 2;
|
|
123
123
|
break;
|
|
124
124
|
case "masonry":
|
|
125
|
-
|
|
125
|
+
s = 1, e = i % 3 === 0 ? 3 : i % 2 === 0 ? 2 : 4;
|
|
126
126
|
break;
|
|
127
127
|
case "spotlight":
|
|
128
|
-
|
|
128
|
+
i === 0 ? (s = 2, e = 4) : (s = 1, e = 2);
|
|
129
129
|
break;
|
|
130
130
|
case "featured":
|
|
131
|
-
|
|
131
|
+
i === 0 ? (s = 2, e = 6) : (s = 1, e = 2);
|
|
132
|
+
break;
|
|
133
|
+
case "custom":
|
|
134
|
+
s = 1, e = 2;
|
|
132
135
|
break;
|
|
133
136
|
}
|
|
134
|
-
return {
|
|
135
|
-
}
|
|
136
|
-
const
|
|
137
|
-
return
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
return { colSpan: s, rowSpan: e };
|
|
138
|
+
}, S = (i, o) => o === "custom" ? i : i.map((s, e) => {
|
|
139
|
+
const { colSpan: n, rowSpan: l } = C(e, o);
|
|
140
|
+
return { ...s, colSpan: n, rowSpan: l };
|
|
141
|
+
}), W = ({ mediaItems: i, variant: o = "masonry", loading: s = !1, skeletonCount: e = 6 }) => {
|
|
142
|
+
const [n, l] = y(null), [u, f] = y(() => S(i, o)), [c, g] = y(!1), d = R();
|
|
143
|
+
return b(() => {
|
|
144
|
+
f(S(i, o));
|
|
145
|
+
}, [i, o]), /* @__PURE__ */ t.jsxs(a, { sx: { width: "100%", position: "relative", zIndex: 1 }, children: [
|
|
146
|
+
/* @__PURE__ */ t.jsx(
|
|
147
|
+
V,
|
|
142
148
|
{
|
|
143
|
-
selectedItem:
|
|
144
|
-
isOpen: !!
|
|
145
|
-
onClose: () =>
|
|
146
|
-
onItemChange:
|
|
147
|
-
mediaItems:
|
|
149
|
+
selectedItem: n,
|
|
150
|
+
isOpen: !!n,
|
|
151
|
+
onClose: () => l(null),
|
|
152
|
+
onItemChange: l,
|
|
153
|
+
mediaItems: u
|
|
148
154
|
}
|
|
149
155
|
),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
|
|
156
|
+
/* @__PURE__ */ t.jsx(M, { mode: "wait", children: !n && /* @__PURE__ */ t.jsx(
|
|
157
|
+
I.div,
|
|
152
158
|
{
|
|
153
159
|
initial: "hidden",
|
|
154
160
|
animate: "visible",
|
|
@@ -161,8 +167,8 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
161
167
|
// Stagger child animations
|
|
162
168
|
}
|
|
163
169
|
},
|
|
164
|
-
children: /* @__PURE__ */
|
|
165
|
-
|
|
170
|
+
children: /* @__PURE__ */ t.jsx(
|
|
171
|
+
a,
|
|
166
172
|
{
|
|
167
173
|
sx: {
|
|
168
174
|
display: "grid",
|
|
@@ -176,11 +182,38 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
176
182
|
position: "relative"
|
|
177
183
|
// Ensure proper stacking context
|
|
178
184
|
},
|
|
179
|
-
children:
|
|
180
|
-
m
|
|
185
|
+
children: s ? Array.from({ length: e }).map((r, p) => {
|
|
186
|
+
const { colSpan: h, rowSpan: m } = C(p, o);
|
|
187
|
+
return /* @__PURE__ */ t.jsx(
|
|
188
|
+
w,
|
|
189
|
+
{
|
|
190
|
+
sx: {
|
|
191
|
+
position: "relative",
|
|
192
|
+
overflow: "hidden",
|
|
193
|
+
borderRadius: 2,
|
|
194
|
+
gridRow: `span ${m}`,
|
|
195
|
+
gridColumn: `span ${h}`
|
|
196
|
+
},
|
|
197
|
+
children: /* @__PURE__ */ t.jsx(
|
|
198
|
+
E,
|
|
199
|
+
{
|
|
200
|
+
variant: "rectangular",
|
|
201
|
+
animation: "wave",
|
|
202
|
+
sx: {
|
|
203
|
+
width: "100%",
|
|
204
|
+
height: "100%",
|
|
205
|
+
transform: "none"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
},
|
|
210
|
+
p
|
|
211
|
+
);
|
|
212
|
+
}) : u.map((r, p) => /* @__PURE__ */ t.jsx(
|
|
213
|
+
I.div,
|
|
181
214
|
{
|
|
182
|
-
layoutId: `media-${
|
|
183
|
-
onClick: () => !
|
|
215
|
+
layoutId: `media-${r.id}-${d}`,
|
|
216
|
+
onClick: () => !c && l(r),
|
|
184
217
|
variants: {
|
|
185
218
|
hidden: { y: 50, scale: 0.9, opacity: 0 },
|
|
186
219
|
visible: {
|
|
@@ -191,7 +224,7 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
191
224
|
type: "spring",
|
|
192
225
|
stiffness: 350,
|
|
193
226
|
damping: 25,
|
|
194
|
-
delay:
|
|
227
|
+
delay: p * 0.05
|
|
195
228
|
}
|
|
196
229
|
}
|
|
197
230
|
},
|
|
@@ -199,22 +232,22 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
199
232
|
drag: !0,
|
|
200
233
|
dragConstraints: { left: 0, right: 0, top: 0, bottom: 0 },
|
|
201
234
|
dragElastic: 1,
|
|
202
|
-
onDragStart: () =>
|
|
203
|
-
onDragEnd: (
|
|
204
|
-
|
|
205
|
-
const
|
|
206
|
-
if (Math.abs(
|
|
207
|
-
const
|
|
208
|
-
|
|
235
|
+
onDragStart: () => g(!0),
|
|
236
|
+
onDragEnd: (h, m) => {
|
|
237
|
+
g(!1);
|
|
238
|
+
const x = m.offset.x + m.offset.y;
|
|
239
|
+
if (Math.abs(x) > 50) {
|
|
240
|
+
const v = [...u], k = v[p], $ = x > 0 ? Math.min(p + 1, u.length - 1) : Math.max(p - 1, 0);
|
|
241
|
+
v.splice(p, 1), v.splice($, 0, k), f(v);
|
|
209
242
|
}
|
|
210
243
|
},
|
|
211
244
|
style: {
|
|
212
245
|
position: "relative",
|
|
213
|
-
gridRow:
|
|
214
|
-
gridColumn:
|
|
246
|
+
gridRow: r.rowSpan ? `span ${r.rowSpan}` : "span 2",
|
|
247
|
+
gridColumn: r.colSpan ? `span ${r.colSpan}` : "span 1"
|
|
215
248
|
},
|
|
216
|
-
children: /* @__PURE__ */
|
|
217
|
-
|
|
249
|
+
children: /* @__PURE__ */ t.jsxs(
|
|
250
|
+
w,
|
|
218
251
|
{
|
|
219
252
|
sx: {
|
|
220
253
|
position: "relative",
|
|
@@ -229,16 +262,16 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
229
262
|
}
|
|
230
263
|
},
|
|
231
264
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
|
|
265
|
+
/* @__PURE__ */ t.jsx(
|
|
266
|
+
A,
|
|
234
267
|
{
|
|
235
|
-
item:
|
|
268
|
+
item: r,
|
|
236
269
|
sx: { position: "absolute", inset: 0, width: "100%", height: "100%" },
|
|
237
|
-
onClick: () => !
|
|
270
|
+
onClick: () => !c && l(r)
|
|
238
271
|
}
|
|
239
272
|
),
|
|
240
|
-
(
|
|
241
|
-
|
|
273
|
+
(r.title || r.desc) && /* @__PURE__ */ t.jsxs(
|
|
274
|
+
a,
|
|
242
275
|
{
|
|
243
276
|
className: "hover-overlay",
|
|
244
277
|
sx: {
|
|
@@ -254,18 +287,18 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
254
287
|
transition: "opacity 0.2s ease-in-out"
|
|
255
288
|
},
|
|
256
289
|
children: [
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
|
|
290
|
+
/* @__PURE__ */ t.jsx(
|
|
291
|
+
a,
|
|
259
292
|
{
|
|
260
293
|
sx: {
|
|
261
294
|
position: "absolute",
|
|
262
295
|
inset: 0,
|
|
263
|
-
background: (
|
|
296
|
+
background: (h) => `linear-gradient(to top, ${(h.vars || h).palette.grey[900]}CC, ${(h.vars || h).palette.grey[900]}66, transparent)`
|
|
264
297
|
}
|
|
265
298
|
}
|
|
266
299
|
),
|
|
267
|
-
|
|
268
|
-
|
|
300
|
+
r.title && /* @__PURE__ */ t.jsx(
|
|
301
|
+
j,
|
|
269
302
|
{
|
|
270
303
|
variant: "subtitle2",
|
|
271
304
|
sx: {
|
|
@@ -276,23 +309,23 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
276
309
|
overflow: "hidden",
|
|
277
310
|
textOverflow: "ellipsis"
|
|
278
311
|
},
|
|
279
|
-
children:
|
|
312
|
+
children: r.title
|
|
280
313
|
}
|
|
281
314
|
),
|
|
282
|
-
|
|
283
|
-
|
|
315
|
+
r.desc && /* @__PURE__ */ t.jsx(
|
|
316
|
+
j,
|
|
284
317
|
{
|
|
285
318
|
variant: "caption",
|
|
286
319
|
sx: {
|
|
287
320
|
position: "relative",
|
|
288
321
|
color: "text.secondary",
|
|
289
|
-
mt:
|
|
322
|
+
mt: r.title ? 0.5 : 0,
|
|
290
323
|
display: "-webkit-box",
|
|
291
324
|
WebkitLineClamp: 2,
|
|
292
325
|
WebkitBoxOrient: "vertical",
|
|
293
326
|
overflow: "hidden"
|
|
294
327
|
},
|
|
295
|
-
children:
|
|
328
|
+
children: r.desc
|
|
296
329
|
}
|
|
297
330
|
)
|
|
298
331
|
]
|
|
@@ -302,7 +335,7 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
302
335
|
}
|
|
303
336
|
)
|
|
304
337
|
},
|
|
305
|
-
`${
|
|
338
|
+
`${r.id}-${d}`
|
|
306
339
|
))
|
|
307
340
|
}
|
|
308
341
|
)
|
|
@@ -311,6 +344,6 @@ const E = ({ item: a, sx: o, onClick: l }) => {
|
|
|
311
344
|
] });
|
|
312
345
|
};
|
|
313
346
|
export {
|
|
314
|
-
|
|
315
|
-
|
|
347
|
+
A as MediaItem,
|
|
348
|
+
W as default
|
|
316
349
|
};
|
package/package.json
CHANGED
|
File without changes
|