@solostylist/ui-kit 1.0.75 → 1.0.77
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 +4 -0
- package/dist/main.js +55 -49
- package/dist/s-interactive-gallery/index.d.ts +2 -0
- package/dist/s-interactive-gallery/index.js +6 -0
- package/dist/s-interactive-gallery/package.json +5 -0
- package/dist/s-interactive-gallery/s-interactive-gallery.d.ts +29 -0
- package/dist/s-interactive-gallery/s-interactive-gallery.js +549 -0
- package/dist/s-lazy-image/index.d.ts +2 -0
- package/dist/s-lazy-image/index.js +4 -0
- package/dist/s-lazy-image/package.json +5 -0
- package/dist/s-lazy-image/s-lazy-image.d.ts +15 -0
- package/dist/s-lazy-image/s-lazy-image.js +53 -0
- package/dist/theme/customizations/inputs.js +4 -4
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -70,5 +70,9 @@ export { default as SMovingBorder } from './s-moving-border/index';
|
|
|
70
70
|
export type { SMovingBorderProps } from './s-moving-border/index';
|
|
71
71
|
export { default as SCopyableText } from './s-copyable-text/index';
|
|
72
72
|
export type { SCopyableTextProps } from './s-copyable-text/index';
|
|
73
|
+
export { default as SInteractiveGallery, MediaItem, GalleryModal } from './s-interactive-gallery/index';
|
|
74
|
+
export type { MediaItemType, SInteractiveGalleryProps, MediaItemProps, GalleryModalProps, } from './s-interactive-gallery/index';
|
|
75
|
+
export { default as SLazyImage } from './s-lazy-image/index';
|
|
76
|
+
export type { SLazyImageProps } from './s-lazy-image/index';
|
|
73
77
|
export * from './hooks';
|
|
74
78
|
export * from './utils';
|
package/dist/main.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { default as r } from "./s-autocomplete/s-autocomplete.js";
|
|
2
2
|
import { default as a } from "./s-button-link/s-button-link.js";
|
|
3
3
|
import { default as l } from "./s-text-editor/s-text-editor.js";
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
4
|
+
import { default as m } from "./s-checkbox/s-checkbox.js";
|
|
5
|
+
import { default as d } from "./s-chips/s-chips.js";
|
|
6
|
+
import { default as x } from "./s-data-table/s-data-table.js";
|
|
7
7
|
import { DialogConfirmProvider as i, default as g, useDialogConfirm as n } from "./s-dialog-confirm/s-dialog-confirm.js";
|
|
8
8
|
import { DialogMessageProvider as D, default as P, useDialogMessage as T } from "./s-dialog-message/s-dialog-message.js";
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
9
|
+
import { default as M } from "./s-error/s-error.js";
|
|
10
|
+
import { default as C } from "./s-empty/s-empty.js";
|
|
11
|
+
import { default as y } from "./s-dialog/s-dialog.js";
|
|
12
|
+
import { default as I } from "./s-file-dropzone/s-file-dropzone.js";
|
|
13
|
+
import { default as z } from "./s-file-icon/s-file-icon.js";
|
|
14
|
+
import { default as E } from "./s-i18n-provider/s-i18n-provider.js";
|
|
15
|
+
import { default as h } from "./s-icon-button/s-icon-button.js";
|
|
16
16
|
import { default as j } from "./s-label/s-label.js";
|
|
17
17
|
import { default as A } from "./s-multi-select/s-multi-select.js";
|
|
18
18
|
import { default as V } from "./s-no-ssr/s-no-ssr.js";
|
|
@@ -25,51 +25,57 @@ import { default as _ } from "./s-text-truncation/s-text-truncation.js";
|
|
|
25
25
|
import { default as ee, SnackbarMessageProvider as oe, useSnackbarMessage as re } from "./s-snackbar-message/s-snackbar-message.js";
|
|
26
26
|
import { default as ae } from "./s-form/s-form.js";
|
|
27
27
|
import { SSmartTextField as le } from "./s-smart-text-field/s-smart-text-field.js";
|
|
28
|
-
import { SCopilotKitProvider as
|
|
29
|
-
import { SStripeCVC as
|
|
28
|
+
import { SCopilotKitProvider as me } from "./s-copilot-kit-provider/s-copilot-kit-provider.js";
|
|
29
|
+
import { SStripeCVC as de, SStripeExpiry as Se, SStripeNumber as xe, StripeTextField as ue } from "./s-stripe/s-stripe.js";
|
|
30
30
|
import { default as ge } from "./s-theme-provider/s-theme-provider.js";
|
|
31
31
|
import { default as ce } from "./s-datetime-picker/s-datetime-picker.js";
|
|
32
32
|
import { default as Pe } from "./s-date-picker/s-date-picker.js";
|
|
33
33
|
import { default as ve } from "./s-localization-provider/s-localization-provider.js";
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
34
|
+
import { default as be } from "./s-gradient-icon/s-gradient-icon.js";
|
|
35
|
+
import { default as ke } from "./s-glow-button/s-glow-button.js";
|
|
36
|
+
import { default as Le } from "./s-moving-border/s-moving-border.js";
|
|
37
|
+
import { default as Fe } from "./s-copyable-text/s-copyable-text.js";
|
|
38
|
+
import { GalleryModal as Be, MediaItem as Ee, default as Ge } from "./s-interactive-gallery/s-interactive-gallery.js";
|
|
39
|
+
import { default as Ne } from "./s-lazy-image/s-lazy-image.js";
|
|
40
|
+
import { useDialog as we } from "./hooks/use-dialog.js";
|
|
41
|
+
import { usePopover as Ke } from "./hooks/use-popover.js";
|
|
42
|
+
import { formatDatePosted as qe } from "./utils/dayjs.js";
|
|
43
|
+
import { bytesToSize as Je } from "./utils/bytes-to-size.js";
|
|
44
|
+
import { LogLevel as Qe, Logger as Re, createLogger as Ue, logger as We } from "./utils/logger.js";
|
|
45
|
+
import { default as Ye } from "dayjs";
|
|
44
46
|
export {
|
|
45
47
|
i as DialogConfirmProvider,
|
|
46
48
|
D as DialogMessageProvider,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
Be as GalleryModal,
|
|
50
|
+
Qe as LogLevel,
|
|
51
|
+
Re as Logger,
|
|
52
|
+
Ee as MediaItem,
|
|
49
53
|
r as SAutocomplete,
|
|
50
54
|
a as SButtonLink,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
m as SCheckbox,
|
|
56
|
+
d as SChips,
|
|
57
|
+
me as SCopilotKitProvider,
|
|
58
|
+
Fe as SCopyableText,
|
|
59
|
+
x as SDataTable,
|
|
56
60
|
Pe as SDatePicker,
|
|
57
61
|
ce as SDateTimePicker,
|
|
58
|
-
|
|
62
|
+
y as SDialog,
|
|
59
63
|
g as SDialogConfirm,
|
|
60
64
|
P as SDialogMessage,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
C as SEmpty,
|
|
66
|
+
M as SError,
|
|
67
|
+
I as SFileDropzone,
|
|
68
|
+
z as SFileIcon,
|
|
65
69
|
ae as SForm,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
ke as SGlowButton,
|
|
71
|
+
be as SGradientIcon,
|
|
72
|
+
E as SI18nProvider,
|
|
73
|
+
h as SIconButton,
|
|
74
|
+
Ge as SInteractiveGallery,
|
|
70
75
|
j as SLabel,
|
|
76
|
+
Ne as SLazyImage,
|
|
71
77
|
ve as SLocalizationProvider,
|
|
72
|
-
|
|
78
|
+
Le as SMovingBorder,
|
|
73
79
|
A as SMultiSelect,
|
|
74
80
|
V as SNoSsr,
|
|
75
81
|
O as SPagination,
|
|
@@ -77,9 +83,9 @@ export {
|
|
|
77
83
|
W as SSkeleton,
|
|
78
84
|
le as SSmartTextField,
|
|
79
85
|
ee as SSnackbarMessage,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
de as SStripeCVC,
|
|
87
|
+
Se as SStripeExpiry,
|
|
88
|
+
xe as SStripeNumber,
|
|
83
89
|
l as STextEditor,
|
|
84
90
|
H as STextField,
|
|
85
91
|
_ as STextTruncation,
|
|
@@ -87,14 +93,14 @@ export {
|
|
|
87
93
|
Y as STip,
|
|
88
94
|
oe as SnackbarMessageProvider,
|
|
89
95
|
ue as StripeTextField,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
Je as bytesToSize,
|
|
97
|
+
Ue as createLogger,
|
|
98
|
+
Ye as dayjs,
|
|
99
|
+
qe as formatDatePosted,
|
|
100
|
+
We as logger,
|
|
101
|
+
we as useDialog,
|
|
96
102
|
n as useDialogConfirm,
|
|
97
103
|
T as useDialogMessage,
|
|
98
|
-
|
|
104
|
+
Ke as usePopover,
|
|
99
105
|
re as useSnackbarMessage
|
|
100
106
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
export interface MediaItemType {
|
|
4
|
+
id: string;
|
|
5
|
+
type: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
desc?: string;
|
|
8
|
+
url: string;
|
|
9
|
+
span: string;
|
|
10
|
+
}
|
|
11
|
+
export type MediaItemProps = {
|
|
12
|
+
item: MediaItemType;
|
|
13
|
+
sx?: SxProps<Theme>;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const MediaItem: React.FC<MediaItemProps>;
|
|
17
|
+
export interface GalleryModalProps {
|
|
18
|
+
selectedItem: MediaItemType;
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
setSelectedItem: (item: MediaItemType | null) => void;
|
|
22
|
+
mediaItems: MediaItemType[];
|
|
23
|
+
}
|
|
24
|
+
export declare const GalleryModal: React.FC<GalleryModalProps>;
|
|
25
|
+
export interface SInteractiveGalleryProps {
|
|
26
|
+
mediaItems: MediaItemType[];
|
|
27
|
+
}
|
|
28
|
+
declare const SInteractiveGallery: React.FC<SInteractiveGalleryProps>;
|
|
29
|
+
export default SInteractiveGallery;
|
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
import { j as i } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
+
import { useState as u, useEffect as v, useRef as C } from "react";
|
|
3
|
+
import { Box as l, Paper as y, Typography as b, Modal as I, IconButton as z, Stack as R } from "@mui/material";
|
|
4
|
+
import { AnimatePresence as j, motion as p } from "framer-motion";
|
|
5
|
+
import P from "../s-lazy-image/s-lazy-image.js";
|
|
6
|
+
import { C as S } from "../Close-CVFQMMUW.js";
|
|
7
|
+
const m = ({ item: r, sx: s, onClick: a }) => {
|
|
8
|
+
const e = C(null), [d, x] = u(!1), [h, t] = u(!0);
|
|
9
|
+
return v(() => {
|
|
10
|
+
const o = { root: null, rootMargin: "50px", threshold: 0.1 }, n = new IntersectionObserver((c) => {
|
|
11
|
+
c.forEach((f) => x(f.isIntersecting));
|
|
12
|
+
}, o);
|
|
13
|
+
return e.current && n.observe(e.current), () => {
|
|
14
|
+
e.current && n.unobserve(e.current);
|
|
15
|
+
};
|
|
16
|
+
}, []), v(() => {
|
|
17
|
+
let o = !0;
|
|
18
|
+
return d ? (async () => {
|
|
19
|
+
if (!(!e.current || !d || !o))
|
|
20
|
+
try {
|
|
21
|
+
e.current.readyState >= 3 ? (t(!1), await e.current.play()) : (t(!0), await new Promise((c) => {
|
|
22
|
+
e.current && (e.current.oncanplay = () => c());
|
|
23
|
+
}), o && (t(!1), await e.current.play()));
|
|
24
|
+
} catch (c) {
|
|
25
|
+
console.warn("Video playback failed:", c);
|
|
26
|
+
}
|
|
27
|
+
})() : e.current && e.current.pause(), () => {
|
|
28
|
+
o = !1, e.current && (e.current.pause(), e.current.removeAttribute("src"), e.current.load());
|
|
29
|
+
};
|
|
30
|
+
}, [d]), r.type === "video" ? /* @__PURE__ */ i.jsxs(
|
|
31
|
+
l,
|
|
32
|
+
{
|
|
33
|
+
sx: {
|
|
34
|
+
position: "relative",
|
|
35
|
+
overflow: "hidden",
|
|
36
|
+
width: "100%",
|
|
37
|
+
height: "100%",
|
|
38
|
+
...s
|
|
39
|
+
},
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ i.jsx(
|
|
42
|
+
l,
|
|
43
|
+
{
|
|
44
|
+
component: "video",
|
|
45
|
+
ref: e,
|
|
46
|
+
onClick: a,
|
|
47
|
+
playsInline: !0,
|
|
48
|
+
muted: !0,
|
|
49
|
+
loop: !0,
|
|
50
|
+
preload: "auto",
|
|
51
|
+
sx: {
|
|
52
|
+
width: "100%",
|
|
53
|
+
height: "100%",
|
|
54
|
+
objectFit: "cover",
|
|
55
|
+
opacity: h ? 0.8 : 1,
|
|
56
|
+
transition: "opacity 0.2s",
|
|
57
|
+
transform: "translateZ(0)",
|
|
58
|
+
willChange: "transform",
|
|
59
|
+
display: "block"
|
|
60
|
+
},
|
|
61
|
+
children: /* @__PURE__ */ i.jsx("source", { src: r.url, type: "video/mp4" })
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
h && /* @__PURE__ */ i.jsx(
|
|
65
|
+
l,
|
|
66
|
+
{
|
|
67
|
+
sx: {
|
|
68
|
+
position: "absolute",
|
|
69
|
+
inset: 0,
|
|
70
|
+
display: "flex",
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
justifyContent: "center",
|
|
73
|
+
bgcolor: "action.disabled"
|
|
74
|
+
},
|
|
75
|
+
children: /* @__PURE__ */ i.jsx(
|
|
76
|
+
l,
|
|
77
|
+
{
|
|
78
|
+
sx: {
|
|
79
|
+
width: 24,
|
|
80
|
+
height: 24,
|
|
81
|
+
borderRadius: "50%",
|
|
82
|
+
border: "2px solid",
|
|
83
|
+
borderColor: "divider",
|
|
84
|
+
borderTopColor: "primary.main",
|
|
85
|
+
animation: "spin 0.8s linear infinite",
|
|
86
|
+
"@keyframes spin": {
|
|
87
|
+
to: { transform: "rotate(360deg)" }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
) : /* @__PURE__ */ i.jsx(l, { onClick: a, sx: { width: "100%", height: "100%", ...s }, children: /* @__PURE__ */ i.jsx(
|
|
97
|
+
P,
|
|
98
|
+
{
|
|
99
|
+
src: r.url,
|
|
100
|
+
alt: r.title || "",
|
|
101
|
+
width: "100%",
|
|
102
|
+
height: "100%",
|
|
103
|
+
style: {
|
|
104
|
+
objectFit: s != null && s.objectFit ? s.objectFit : "cover",
|
|
105
|
+
cursor: a ? "pointer" : "default",
|
|
106
|
+
display: "block",
|
|
107
|
+
width: "100%",
|
|
108
|
+
height: "100%"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
) });
|
|
112
|
+
}, D = ({
|
|
113
|
+
selectedItem: r,
|
|
114
|
+
isOpen: s,
|
|
115
|
+
onClose: a,
|
|
116
|
+
setSelectedItem: e,
|
|
117
|
+
mediaItems: d
|
|
118
|
+
}) => {
|
|
119
|
+
const [x, h] = u({ x: 0, y: 0 });
|
|
120
|
+
return s ? /* @__PURE__ */ i.jsx(
|
|
121
|
+
I,
|
|
122
|
+
{
|
|
123
|
+
open: s,
|
|
124
|
+
onClose: a,
|
|
125
|
+
sx: {
|
|
126
|
+
zIndex: (t) => t.zIndex.modal + 100
|
|
127
|
+
// Increased z-index
|
|
128
|
+
},
|
|
129
|
+
slotProps: {
|
|
130
|
+
backdrop: {
|
|
131
|
+
sx: {
|
|
132
|
+
backdropFilter: "blur(8px)",
|
|
133
|
+
zIndex: (t) => t.zIndex.modal + 99
|
|
134
|
+
// Ensure backdrop is below modal
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
children: /* @__PURE__ */ i.jsxs(l, { children: [
|
|
139
|
+
/* @__PURE__ */ i.jsx(
|
|
140
|
+
p.div,
|
|
141
|
+
{
|
|
142
|
+
initial: { scale: 0.98 },
|
|
143
|
+
animate: { scale: 1 },
|
|
144
|
+
exit: { scale: 0.98 },
|
|
145
|
+
transition: { type: "spring", stiffness: 400, damping: 30 },
|
|
146
|
+
children: /* @__PURE__ */ i.jsxs(
|
|
147
|
+
y,
|
|
148
|
+
{
|
|
149
|
+
elevation: 3,
|
|
150
|
+
sx: {
|
|
151
|
+
position: "fixed",
|
|
152
|
+
inset: 0,
|
|
153
|
+
width: "100%",
|
|
154
|
+
minHeight: "100vh",
|
|
155
|
+
borderRadius: 0,
|
|
156
|
+
overflow: "hidden",
|
|
157
|
+
zIndex: (t) => t.zIndex.modal + 101
|
|
158
|
+
// Higher than backdrop
|
|
159
|
+
},
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ i.jsx(
|
|
162
|
+
l,
|
|
163
|
+
{
|
|
164
|
+
sx: {
|
|
165
|
+
height: "100%",
|
|
166
|
+
display: "flex",
|
|
167
|
+
flexDirection: "column"
|
|
168
|
+
},
|
|
169
|
+
children: /* @__PURE__ */ i.jsx(
|
|
170
|
+
l,
|
|
171
|
+
{
|
|
172
|
+
sx: {
|
|
173
|
+
flex: 1,
|
|
174
|
+
p: { xs: 1, sm: 2, md: 3 },
|
|
175
|
+
display: "flex",
|
|
176
|
+
alignItems: "center",
|
|
177
|
+
justifyContent: "center",
|
|
178
|
+
bgcolor: "background.default"
|
|
179
|
+
},
|
|
180
|
+
children: /* @__PURE__ */ i.jsx(j, { mode: "wait", children: /* @__PURE__ */ i.jsx(
|
|
181
|
+
p.div,
|
|
182
|
+
{
|
|
183
|
+
style: { position: "relative" },
|
|
184
|
+
initial: { y: 20, scale: 0.97 },
|
|
185
|
+
animate: {
|
|
186
|
+
y: 0,
|
|
187
|
+
scale: 1,
|
|
188
|
+
transition: { type: "spring", stiffness: 500, damping: 30, mass: 0.5 }
|
|
189
|
+
},
|
|
190
|
+
exit: { y: 20, scale: 0.97, transition: { duration: 0.15 } },
|
|
191
|
+
onClick: a,
|
|
192
|
+
children: /* @__PURE__ */ i.jsxs(
|
|
193
|
+
y,
|
|
194
|
+
{
|
|
195
|
+
elevation: 6,
|
|
196
|
+
sx: {
|
|
197
|
+
position: "relative",
|
|
198
|
+
width: "100%",
|
|
199
|
+
aspectRatio: "16 / 9",
|
|
200
|
+
maxWidth: { xs: "95%", sm: "85%", md: 960 },
|
|
201
|
+
maxHeight: "70vh",
|
|
202
|
+
borderRadius: 2,
|
|
203
|
+
overflow: "hidden"
|
|
204
|
+
},
|
|
205
|
+
children: [
|
|
206
|
+
/* @__PURE__ */ i.jsx(
|
|
207
|
+
m,
|
|
208
|
+
{
|
|
209
|
+
item: r,
|
|
210
|
+
sx: { width: "100%", height: "100%", objectFit: "contain", bgcolor: "background.paper" },
|
|
211
|
+
onClick: a
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
/* @__PURE__ */ i.jsxs(
|
|
215
|
+
l,
|
|
216
|
+
{
|
|
217
|
+
sx: {
|
|
218
|
+
position: "absolute",
|
|
219
|
+
left: 0,
|
|
220
|
+
right: 0,
|
|
221
|
+
bottom: 0,
|
|
222
|
+
p: { xs: 1.5, sm: 2, md: 3 },
|
|
223
|
+
background: (t) => `linear-gradient(to top, ${t.palette.grey[900]}CC, transparent)`,
|
|
224
|
+
color: "primary.contrastText"
|
|
225
|
+
},
|
|
226
|
+
onClick: (t) => t.stopPropagation(),
|
|
227
|
+
children: [
|
|
228
|
+
r.title && /* @__PURE__ */ i.jsx(b, { variant: "h6", sx: { fontWeight: 600, fontSize: { xs: 14, sm: 18, md: 20 } }, children: r.title }),
|
|
229
|
+
r.desc && /* @__PURE__ */ i.jsx(b, { variant: "body2", sx: { opacity: 0.8, mt: 0.5 }, children: r.desc })
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
)
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
)
|
|
236
|
+
},
|
|
237
|
+
r.id
|
|
238
|
+
) })
|
|
239
|
+
}
|
|
240
|
+
)
|
|
241
|
+
}
|
|
242
|
+
),
|
|
243
|
+
/* @__PURE__ */ i.jsx(
|
|
244
|
+
z,
|
|
245
|
+
{
|
|
246
|
+
"aria-label": "Close",
|
|
247
|
+
onClick: a,
|
|
248
|
+
sx: {
|
|
249
|
+
position: "absolute",
|
|
250
|
+
top: { xs: 8, sm: 10, md: 12 },
|
|
251
|
+
right: { xs: 8, sm: 10, md: 12 },
|
|
252
|
+
zIndex: (t) => t.zIndex.modal + 102
|
|
253
|
+
// Ensure it's above everything
|
|
254
|
+
},
|
|
255
|
+
children: /* @__PURE__ */ i.jsx(S, { fontSize: "small" })
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
)
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
/* @__PURE__ */ i.jsx(
|
|
264
|
+
p.div,
|
|
265
|
+
{
|
|
266
|
+
drag: !0,
|
|
267
|
+
dragMomentum: !1,
|
|
268
|
+
dragElastic: 0.1,
|
|
269
|
+
initial: !1,
|
|
270
|
+
animate: { x: x.x, y: x.y },
|
|
271
|
+
onDragEnd: (t, o) => {
|
|
272
|
+
h((n) => ({ x: n.x + o.offset.x, y: n.y + o.offset.y }));
|
|
273
|
+
},
|
|
274
|
+
style: {
|
|
275
|
+
position: "fixed",
|
|
276
|
+
zIndex: 1502,
|
|
277
|
+
// Higher than modal content
|
|
278
|
+
left: "50%",
|
|
279
|
+
bottom: 16,
|
|
280
|
+
transform: "translateX(-50%)",
|
|
281
|
+
touchAction: "none"
|
|
282
|
+
},
|
|
283
|
+
children: /* @__PURE__ */ i.jsx(
|
|
284
|
+
y,
|
|
285
|
+
{
|
|
286
|
+
elevation: 8,
|
|
287
|
+
sx: {
|
|
288
|
+
position: "relative",
|
|
289
|
+
borderRadius: 3,
|
|
290
|
+
bgcolor: "background.paper",
|
|
291
|
+
border: "1px solid",
|
|
292
|
+
borderColor: "divider",
|
|
293
|
+
backdropFilter: "blur(12px)",
|
|
294
|
+
cursor: "grab",
|
|
295
|
+
"&:active": { cursor: "grabbing" },
|
|
296
|
+
px: 1.5,
|
|
297
|
+
py: 1
|
|
298
|
+
},
|
|
299
|
+
children: /* @__PURE__ */ i.jsx(R, { direction: "row", alignItems: "center", spacing: -1.5, children: d.map((t, o) => /* @__PURE__ */ i.jsxs(
|
|
300
|
+
p.div,
|
|
301
|
+
{
|
|
302
|
+
onClick: (n) => {
|
|
303
|
+
n.stopPropagation(), e(t);
|
|
304
|
+
},
|
|
305
|
+
style: {
|
|
306
|
+
position: "relative",
|
|
307
|
+
width: 40,
|
|
308
|
+
height: 40,
|
|
309
|
+
borderRadius: 10,
|
|
310
|
+
overflow: "hidden",
|
|
311
|
+
flexShrink: 0,
|
|
312
|
+
zIndex: r.id === t.id ? 30 : d.length - o,
|
|
313
|
+
border: r.id === t.id ? "2px solid" : void 0,
|
|
314
|
+
borderColor: r.id === t.id ? "divider" : void 0,
|
|
315
|
+
cursor: "pointer"
|
|
316
|
+
},
|
|
317
|
+
initial: { rotate: o % 2 === 0 ? -15 : 15 },
|
|
318
|
+
animate: {
|
|
319
|
+
scale: r.id === t.id ? 1.2 : 1,
|
|
320
|
+
rotate: r.id === t.id ? 0 : o % 2 === 0 ? -15 : 15,
|
|
321
|
+
y: r.id === t.id ? -8 : 0
|
|
322
|
+
},
|
|
323
|
+
whileHover: {
|
|
324
|
+
scale: 1.3,
|
|
325
|
+
rotate: 0,
|
|
326
|
+
y: -10,
|
|
327
|
+
transition: { type: "spring", stiffness: 400, damping: 25 }
|
|
328
|
+
},
|
|
329
|
+
children: [
|
|
330
|
+
/* @__PURE__ */ i.jsx(m, { item: t, sx: { width: "100%", height: "100%" }, onClick: () => e(t) }),
|
|
331
|
+
/* @__PURE__ */ i.jsx(
|
|
332
|
+
l,
|
|
333
|
+
{
|
|
334
|
+
sx: {
|
|
335
|
+
position: "absolute",
|
|
336
|
+
inset: 0,
|
|
337
|
+
background: (n) => `linear-gradient(to bottom, transparent, ${n.palette.action.hover}, ${n.palette.action.selected})`,
|
|
338
|
+
pointerEvents: "none"
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
),
|
|
342
|
+
r.id === t.id && /* @__PURE__ */ i.jsx(
|
|
343
|
+
p.div,
|
|
344
|
+
{
|
|
345
|
+
layoutId: "activeGlow",
|
|
346
|
+
style: {
|
|
347
|
+
position: "absolute",
|
|
348
|
+
inset: -8,
|
|
349
|
+
background: "primary.main",
|
|
350
|
+
filter: "blur(16px)"
|
|
351
|
+
},
|
|
352
|
+
initial: { opacity: 0 },
|
|
353
|
+
animate: { opacity: 1 },
|
|
354
|
+
transition: { duration: 0.2 }
|
|
355
|
+
}
|
|
356
|
+
)
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
t.id
|
|
360
|
+
)) })
|
|
361
|
+
}
|
|
362
|
+
)
|
|
363
|
+
}
|
|
364
|
+
)
|
|
365
|
+
] })
|
|
366
|
+
}
|
|
367
|
+
) : null;
|
|
368
|
+
}, T = ({ mediaItems: r }) => {
|
|
369
|
+
const [s, a] = u(null), [e, d] = u(r), [x, h] = u(!1);
|
|
370
|
+
return v(() => {
|
|
371
|
+
d(r);
|
|
372
|
+
}, [r]), /* @__PURE__ */ i.jsxs(l, { sx: { width: "100%", position: "relative", zIndex: 1 }, children: [
|
|
373
|
+
" ",
|
|
374
|
+
s && /* @__PURE__ */ i.jsx(
|
|
375
|
+
D,
|
|
376
|
+
{
|
|
377
|
+
selectedItem: s,
|
|
378
|
+
isOpen: !0,
|
|
379
|
+
onClose: () => a(null),
|
|
380
|
+
setSelectedItem: a,
|
|
381
|
+
mediaItems: e
|
|
382
|
+
}
|
|
383
|
+
),
|
|
384
|
+
/* @__PURE__ */ i.jsx(j, { mode: "wait", children: !s && /* @__PURE__ */ i.jsx(
|
|
385
|
+
p.div,
|
|
386
|
+
{
|
|
387
|
+
initial: "hidden",
|
|
388
|
+
animate: "visible",
|
|
389
|
+
exit: "hidden",
|
|
390
|
+
variants: {
|
|
391
|
+
hidden: { opacity: 0 },
|
|
392
|
+
visible: {
|
|
393
|
+
opacity: 1,
|
|
394
|
+
transition: { staggerChildren: 0.1 }
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
children: /* @__PURE__ */ i.jsx(
|
|
398
|
+
l,
|
|
399
|
+
{
|
|
400
|
+
sx: {
|
|
401
|
+
display: "grid",
|
|
402
|
+
gridTemplateColumns: {
|
|
403
|
+
xs: "1fr",
|
|
404
|
+
sm: "repeat(3, 1fr)",
|
|
405
|
+
md: "repeat(4, 1fr)"
|
|
406
|
+
},
|
|
407
|
+
gap: 1.5,
|
|
408
|
+
gridAutoRows: "60px",
|
|
409
|
+
position: "relative"
|
|
410
|
+
// Ensure proper stacking context
|
|
411
|
+
},
|
|
412
|
+
children: e.map((t, o) => /* @__PURE__ */ i.jsx(
|
|
413
|
+
p.div,
|
|
414
|
+
{
|
|
415
|
+
layoutId: `media-${t.id}`,
|
|
416
|
+
onClick: () => !x && a(t),
|
|
417
|
+
variants: {
|
|
418
|
+
hidden: { y: 50, scale: 0.9, opacity: 0 },
|
|
419
|
+
visible: {
|
|
420
|
+
y: 0,
|
|
421
|
+
scale: 1,
|
|
422
|
+
opacity: 1,
|
|
423
|
+
transition: {
|
|
424
|
+
type: "spring",
|
|
425
|
+
stiffness: 350,
|
|
426
|
+
damping: 25,
|
|
427
|
+
delay: o * 0.05
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
whileHover: { filter: "brightness(1.1)", zIndex: 10 },
|
|
432
|
+
drag: !0,
|
|
433
|
+
dragConstraints: { left: 0, right: 0, top: 0, bottom: 0 },
|
|
434
|
+
dragElastic: 1,
|
|
435
|
+
onDragStart: () => h(!0),
|
|
436
|
+
onDragEnd: (n, c) => {
|
|
437
|
+
h(!1);
|
|
438
|
+
const f = c.offset.x + c.offset.y;
|
|
439
|
+
if (Math.abs(f) > 50) {
|
|
440
|
+
const g = [...e], w = g[o], k = f > 0 ? Math.min(o + 1, e.length - 1) : Math.max(o - 1, 0);
|
|
441
|
+
g.splice(o, 1), g.splice(k, 0, w), d(g);
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
style: {
|
|
445
|
+
position: "relative",
|
|
446
|
+
gridRow: `span ${parseInt(t.span) || 2}`
|
|
447
|
+
// Use span properly for grid
|
|
448
|
+
},
|
|
449
|
+
children: /* @__PURE__ */ i.jsxs(
|
|
450
|
+
y,
|
|
451
|
+
{
|
|
452
|
+
elevation: 4,
|
|
453
|
+
sx: {
|
|
454
|
+
position: "relative",
|
|
455
|
+
overflow: "hidden",
|
|
456
|
+
borderRadius: 2,
|
|
457
|
+
width: "100%",
|
|
458
|
+
height: "100%",
|
|
459
|
+
minHeight: 120,
|
|
460
|
+
cursor: "grab",
|
|
461
|
+
"&:active": { cursor: "grabbing" }
|
|
462
|
+
},
|
|
463
|
+
children: [
|
|
464
|
+
/* @__PURE__ */ i.jsx(
|
|
465
|
+
m,
|
|
466
|
+
{
|
|
467
|
+
item: t,
|
|
468
|
+
sx: { position: "absolute", inset: 0, width: "100%", height: "100%" },
|
|
469
|
+
onClick: () => !x && a(t)
|
|
470
|
+
}
|
|
471
|
+
),
|
|
472
|
+
/* @__PURE__ */ i.jsxs(
|
|
473
|
+
p.div,
|
|
474
|
+
{
|
|
475
|
+
style: {
|
|
476
|
+
position: "absolute",
|
|
477
|
+
inset: 0,
|
|
478
|
+
display: "flex",
|
|
479
|
+
flexDirection: "column",
|
|
480
|
+
justifyContent: "flex-end",
|
|
481
|
+
padding: 12,
|
|
482
|
+
pointerEvents: "none"
|
|
483
|
+
// Prevent blocking clicks
|
|
484
|
+
},
|
|
485
|
+
initial: { opacity: 0 },
|
|
486
|
+
whileHover: { opacity: 1 },
|
|
487
|
+
transition: { duration: 0.2 },
|
|
488
|
+
children: [
|
|
489
|
+
/* @__PURE__ */ i.jsx(
|
|
490
|
+
l,
|
|
491
|
+
{
|
|
492
|
+
sx: {
|
|
493
|
+
position: "absolute",
|
|
494
|
+
inset: 0,
|
|
495
|
+
background: (n) => `linear-gradient(to top, ${n.palette.grey[900]}CC, ${n.palette.grey[900]}66, transparent)`
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
),
|
|
499
|
+
/* @__PURE__ */ i.jsx(
|
|
500
|
+
b,
|
|
501
|
+
{
|
|
502
|
+
variant: "subtitle2",
|
|
503
|
+
sx: {
|
|
504
|
+
position: "relative",
|
|
505
|
+
color: "primary.contrastText",
|
|
506
|
+
fontWeight: 600,
|
|
507
|
+
whiteSpace: "nowrap",
|
|
508
|
+
overflow: "hidden",
|
|
509
|
+
textOverflow: "ellipsis"
|
|
510
|
+
},
|
|
511
|
+
children: t.title
|
|
512
|
+
}
|
|
513
|
+
),
|
|
514
|
+
/* @__PURE__ */ i.jsx(
|
|
515
|
+
b,
|
|
516
|
+
{
|
|
517
|
+
variant: "caption",
|
|
518
|
+
sx: {
|
|
519
|
+
position: "relative",
|
|
520
|
+
color: "text.secondary",
|
|
521
|
+
mt: 0.5,
|
|
522
|
+
display: "-webkit-box",
|
|
523
|
+
WebkitLineClamp: 2,
|
|
524
|
+
WebkitBoxOrient: "vertical",
|
|
525
|
+
overflow: "hidden"
|
|
526
|
+
},
|
|
527
|
+
children: t.desc
|
|
528
|
+
}
|
|
529
|
+
)
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
)
|
|
533
|
+
]
|
|
534
|
+
}
|
|
535
|
+
)
|
|
536
|
+
},
|
|
537
|
+
t.id
|
|
538
|
+
))
|
|
539
|
+
}
|
|
540
|
+
)
|
|
541
|
+
}
|
|
542
|
+
) })
|
|
543
|
+
] });
|
|
544
|
+
};
|
|
545
|
+
export {
|
|
546
|
+
D as GalleryModal,
|
|
547
|
+
m as MediaItem,
|
|
548
|
+
T as default
|
|
549
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SkeletonProps } from '@mui/material';
|
|
3
|
+
export interface SLazyImageProps {
|
|
4
|
+
src: string;
|
|
5
|
+
alt: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
variant?: SkeletonProps['variant'];
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
height?: number | string;
|
|
10
|
+
width?: number | string;
|
|
11
|
+
minWidth?: number | string;
|
|
12
|
+
minHeight?: number | string;
|
|
13
|
+
}
|
|
14
|
+
declare const SLazyImage: ({ src, variant, alt, height, width, className, style, minWidth, minHeight, }: SLazyImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default SLazyImage;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { j as e } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
+
import { useId as c, useState as d } from "react";
|
|
3
|
+
import { Box as f, Skeleton as p } from "@mui/material";
|
|
4
|
+
const y = ({
|
|
5
|
+
src: a,
|
|
6
|
+
variant: n = "rounded",
|
|
7
|
+
alt: m,
|
|
8
|
+
height: i,
|
|
9
|
+
width: o,
|
|
10
|
+
className: g,
|
|
11
|
+
style: h,
|
|
12
|
+
minWidth: r = "auto",
|
|
13
|
+
minHeight: u = "auto"
|
|
14
|
+
}) => {
|
|
15
|
+
const w = c(), [t, l] = d({
|
|
16
|
+
width: o || "100%",
|
|
17
|
+
height: i || "auto"
|
|
18
|
+
}), [s, x] = d(!1);
|
|
19
|
+
return /* @__PURE__ */ e.jsxs(f, { height: t.height, width: t.width, children: [
|
|
20
|
+
!s && /* @__PURE__ */ e.jsx(
|
|
21
|
+
p,
|
|
22
|
+
{
|
|
23
|
+
variant: n,
|
|
24
|
+
id: `image-skeleton-${w}`,
|
|
25
|
+
animation: "wave",
|
|
26
|
+
style: { height: t.height, width: t.width, minWidth: r, minHeight: u, ...h }
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ e.jsx(
|
|
30
|
+
"img",
|
|
31
|
+
{
|
|
32
|
+
src: a,
|
|
33
|
+
alt: m,
|
|
34
|
+
style: {
|
|
35
|
+
height: t.height,
|
|
36
|
+
width: t.width,
|
|
37
|
+
display: s ? "block" : "none",
|
|
38
|
+
...h
|
|
39
|
+
},
|
|
40
|
+
className: g,
|
|
41
|
+
onLoad: () => {
|
|
42
|
+
(!i || !o) && l({
|
|
43
|
+
width: t.width,
|
|
44
|
+
height: t.height
|
|
45
|
+
}), x(!0);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] });
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
y as default
|
|
53
|
+
};
|
|
@@ -10,7 +10,7 @@ const c = i(/* @__PURE__ */ a.jsx("path", {
|
|
|
10
10
|
d: "M9 16.17 5.53 12.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41a.996.996 0 0 0-1.41 0z"
|
|
11
11
|
}), "CheckRounded"), b = i(/* @__PURE__ */ a.jsx("path", {
|
|
12
12
|
d: "M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1"
|
|
13
|
-
}), "RemoveRounded"), g = n("MuiToggleButton", ["root", "disabled", "selected", "standard", "primary", "secondary", "sizeSmall", "sizeMedium", "sizeLarge", "fullWidth"]), d = n("MuiToggleButtonGroup", ["root", "selected", "horizontal", "vertical", "disabled", "grouped", "groupedHorizontal", "groupedVertical", "fullWidth", "firstButton", "lastButton", "middleButton"]),
|
|
13
|
+
}), "RemoveRounded"), g = n("MuiToggleButton", ["root", "disabled", "selected", "standard", "primary", "secondary", "sizeSmall", "sizeMedium", "sizeLarge", "fullWidth"]), d = n("MuiToggleButtonGroup", ["root", "selected", "horizontal", "vertical", "disabled", "grouped", "groupedHorizontal", "groupedVertical", "fullWidth", "firstButton", "lastButton", "middleButton"]), f = {
|
|
14
14
|
MuiButtonBase: {
|
|
15
15
|
defaultProps: {
|
|
16
16
|
disableTouchRipple: !0,
|
|
@@ -246,7 +246,7 @@ const c = i(/* @__PURE__ */ a.jsx("path", {
|
|
|
246
246
|
borderColor: e[300]
|
|
247
247
|
},
|
|
248
248
|
"&:active": {
|
|
249
|
-
backgroundColor:
|
|
249
|
+
backgroundColor: (o.vars || o).palette.action.selected
|
|
250
250
|
},
|
|
251
251
|
...o.applyStyles("dark", {
|
|
252
252
|
// backgroundColor: gray[800],
|
|
@@ -256,7 +256,7 @@ const c = i(/* @__PURE__ */ a.jsx("path", {
|
|
|
256
256
|
borderColor: e[600]
|
|
257
257
|
},
|
|
258
258
|
"&:active": {
|
|
259
|
-
backgroundColor:
|
|
259
|
+
backgroundColor: (o.vars || o).palette.action.selected
|
|
260
260
|
}
|
|
261
261
|
}),
|
|
262
262
|
variants: [
|
|
@@ -491,5 +491,5 @@ const c = i(/* @__PURE__ */ a.jsx("path", {
|
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
493
|
export {
|
|
494
|
-
|
|
494
|
+
f as inputsCustomizations
|
|
495
495
|
};
|