@solostylist/ui-kit 1.0.85 → 1.0.86
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 +5 -2
- package/dist/main.js +35 -34
- package/dist/s-image-modal/index.d.ts +3 -0
- package/dist/s-image-modal/index.js +5 -0
- package/dist/s-image-modal/package.json +5 -0
- package/dist/s-image-modal/s-image-modal.d.ts +75 -0
- package/dist/s-image-modal/s-image-modal.js +404 -0
- package/dist/s-interactive-gallery/index.d.ts +2 -2
- package/dist/s-interactive-gallery/index.js +3 -4
- package/dist/s-interactive-gallery/s-interactive-gallery.d.ts +1 -52
- package/dist/s-interactive-gallery/s-interactive-gallery.js +93 -437
- package/dist/s-text-field/s-text-field.js +36 -12
- package/dist/theme/components/button.d.ts +158 -158
- package/dist/theme/components/chip.d.ts +2 -2
- package/dist/theme/components/components.d.ts +160 -160
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -74,8 +74,11 @@ export { default as SMovingBorder } from './s-moving-border/index';
|
|
|
74
74
|
export type { SMovingBorderProps } from './s-moving-border/index';
|
|
75
75
|
export { default as SCopyableText } from './s-copyable-text/index';
|
|
76
76
|
export type { SCopyableTextProps } from './s-copyable-text/index';
|
|
77
|
-
export { default as SInteractiveGallery, MediaItem
|
|
78
|
-
export type {
|
|
77
|
+
export { default as SInteractiveGallery, MediaItem } from './s-interactive-gallery/index';
|
|
78
|
+
export type { SInteractiveGalleryProps, MediaItemProps, } from './s-interactive-gallery/index';
|
|
79
|
+
export { default as SImageModal } from './s-image-modal/index';
|
|
80
|
+
export type { MediaItemType } from './s-image-modal/index';
|
|
81
|
+
export type { SImageModalProps } from './s-image-modal/index';
|
|
79
82
|
export { default as SLazyImage } from './s-lazy-image/index';
|
|
80
83
|
export type { SLazyImageProps } from './s-lazy-image/index';
|
|
81
84
|
export * from './hooks';
|
package/dist/main.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as t } from "./s-autocomplete/s-autocomplete.js";
|
|
2
2
|
import { default as f } from "./s-button/s-button.js";
|
|
3
|
-
import { default as
|
|
3
|
+
import { default as m } from "./s-button-link/s-button-link.js";
|
|
4
4
|
import { default as s } from "./s-text-editor/s-text-editor.js";
|
|
5
5
|
import "./s-text-editor/s-text-editor-toolbar.js";
|
|
6
6
|
import { default as S } from "./s-checkbox/s-checkbox.js";
|
|
7
7
|
import { default as u } from "./s-chip/s-chip.js";
|
|
8
|
-
import { default as
|
|
8
|
+
import { default as g } from "./s-chips/s-chips.js";
|
|
9
9
|
import { default as c } from "./s-data-table/s-data-table.js";
|
|
10
10
|
import { DialogConfirmProvider as P, default as T, useDialogConfirm as v } from "./s-dialog-confirm/s-dialog-confirm.js";
|
|
11
11
|
import { DialogMessageProvider as M, default as b, useDialogMessage as k } from "./s-dialog-message/s-dialog-message.js";
|
|
@@ -25,40 +25,40 @@ import { default as Z } from "./s-select/s-select.js";
|
|
|
25
25
|
import { default as $ } from "./s-skeleton/s-skeleton.js";
|
|
26
26
|
import { default as oe } from "./s-tip/s-tip.js";
|
|
27
27
|
import { default as te } from "./s-text-truncation/s-text-truncation.js";
|
|
28
|
-
import { default as fe, SnackbarMessageProvider as le, useSnackbarMessage as
|
|
28
|
+
import { default as fe, SnackbarMessageProvider as le, useSnackbarMessage as me } from "./s-snackbar-message/s-snackbar-message.js";
|
|
29
29
|
import { default as se } from "./s-form/s-form.js";
|
|
30
30
|
import { SSmartTextField as Se } from "./s-smart-text-field/s-smart-text-field.js";
|
|
31
31
|
import { SCopilotKitProvider as ue } from "./s-copilot-kit-provider/s-copilot-kit-provider.js";
|
|
32
|
-
import { SStripeCVC as
|
|
32
|
+
import { SStripeCVC as ge, SStripeExpiry as ne, SStripeNumber as ce, StripeTextField as De } from "./s-stripe/s-stripe.js";
|
|
33
33
|
import { default as Te } from "./s-theme-provider/s-theme-provider.js";
|
|
34
34
|
import { default as Ce } from "./s-datetime-picker/s-datetime-picker.js";
|
|
35
35
|
import { default as be } from "./s-date-picker/s-date-picker.js";
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
36
|
+
import { default as Ie } from "./s-localization-provider/s-localization-provider.js";
|
|
37
|
+
import { default as ye } from "./s-gradient-icon/s-gradient-icon.js";
|
|
38
38
|
import { default as Be } from "./s-glow-button/s-glow-button.js";
|
|
39
39
|
import { default as ze } from "./s-moving-border/s-moving-border.js";
|
|
40
40
|
import { default as Ge } from "./s-copyable-text/s-copyable-text.js";
|
|
41
|
-
import {
|
|
42
|
-
import { default as
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
41
|
+
import { MediaItem as je, default as we } from "./s-interactive-gallery/s-interactive-gallery.js";
|
|
42
|
+
import { default as Ke } from "./s-image-modal/s-image-modal.js";
|
|
43
|
+
import { default as qe } from "./s-lazy-image/s-lazy-image.js";
|
|
44
|
+
import { useDialog as Je } from "./hooks/use-dialog.js";
|
|
45
|
+
import { usePopover as Qe } from "./hooks/use-popover.js";
|
|
46
|
+
import { formatDatePosted as Ue } from "./utils/dayjs.js";
|
|
47
|
+
import { bytesToSize as Xe } from "./utils/bytes-to-size.js";
|
|
48
|
+
import { LogLevel as Ze, Logger as _e, createLogger as $e, logger as eo } from "./utils/logger.js";
|
|
49
|
+
import { default as ro } from "dayjs";
|
|
49
50
|
export {
|
|
50
51
|
P as DialogConfirmProvider,
|
|
51
52
|
M as DialogMessageProvider,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
we as MediaItem,
|
|
53
|
+
Ze as LogLevel,
|
|
54
|
+
_e as Logger,
|
|
55
|
+
je as MediaItem,
|
|
56
56
|
t as SAutocomplete,
|
|
57
57
|
f as SButton,
|
|
58
|
-
|
|
58
|
+
m as SButtonLink,
|
|
59
59
|
S as SCheckbox,
|
|
60
60
|
u as SChip,
|
|
61
|
-
|
|
61
|
+
g as SChips,
|
|
62
62
|
ue as SCopilotKitProvider,
|
|
63
63
|
Ge as SCopyableText,
|
|
64
64
|
c as SDataTable,
|
|
@@ -73,13 +73,14 @@ export {
|
|
|
73
73
|
N as SFileIcon,
|
|
74
74
|
se as SForm,
|
|
75
75
|
Be as SGlowButton,
|
|
76
|
-
|
|
76
|
+
ye as SGradientIcon,
|
|
77
77
|
w as SI18nProvider,
|
|
78
78
|
K as SIconButton,
|
|
79
|
-
|
|
79
|
+
Ke as SImageModal,
|
|
80
|
+
we as SInteractiveGallery,
|
|
80
81
|
q as SLabel,
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
qe as SLazyImage,
|
|
83
|
+
Ie as SLocalizationProvider,
|
|
83
84
|
ze as SMovingBorder,
|
|
84
85
|
J as SMultiSelect,
|
|
85
86
|
Q as SNoSsr,
|
|
@@ -88,8 +89,8 @@ export {
|
|
|
88
89
|
$ as SSkeleton,
|
|
89
90
|
Se as SSmartTextField,
|
|
90
91
|
fe as SSnackbarMessage,
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
ge as SStripeCVC,
|
|
93
|
+
ne as SStripeExpiry,
|
|
93
94
|
ce as SStripeNumber,
|
|
94
95
|
s as STextEditor,
|
|
95
96
|
U as STextField,
|
|
@@ -98,14 +99,14 @@ export {
|
|
|
98
99
|
oe as STip,
|
|
99
100
|
le as SnackbarMessageProvider,
|
|
100
101
|
De as StripeTextField,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
Xe as bytesToSize,
|
|
103
|
+
$e as createLogger,
|
|
104
|
+
ro as dayjs,
|
|
105
|
+
Ue as formatDatePosted,
|
|
106
|
+
eo as logger,
|
|
107
|
+
Je as useDialog,
|
|
107
108
|
v as useDialogConfirm,
|
|
108
109
|
k as useDialogMessage,
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
Qe as usePopover,
|
|
111
|
+
me as useSnackbarMessage
|
|
111
112
|
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for individual media items (images/videos) in the modal
|
|
4
|
+
*/
|
|
5
|
+
export interface MediaItemType {
|
|
6
|
+
/** Unique identifier for the media item */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Type of media ('image' or 'video') */
|
|
9
|
+
type: string;
|
|
10
|
+
/** Optional title displayed in overlays */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** Optional description displayed in overlays */
|
|
13
|
+
desc?: string;
|
|
14
|
+
/** URL source for the media */
|
|
15
|
+
url: string;
|
|
16
|
+
/** Grid column span for layout (defaults to 1) */
|
|
17
|
+
colSpan?: number;
|
|
18
|
+
/** Grid row span for layout (defaults to 2) */
|
|
19
|
+
rowSpan?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Props for SImageModal component
|
|
23
|
+
*/
|
|
24
|
+
export interface SImageModalProps {
|
|
25
|
+
/** Currently selected media item to display */
|
|
26
|
+
selectedItem?: MediaItemType | null;
|
|
27
|
+
/** Whether the modal is open */
|
|
28
|
+
isOpen: boolean;
|
|
29
|
+
/** Function to close the modal */
|
|
30
|
+
onClose: () => void;
|
|
31
|
+
/** Function to change the selected item (for navigation) */
|
|
32
|
+
onItemChange?: (item: MediaItemType) => void;
|
|
33
|
+
/** Array of all media items for navigation (optional - if provided, enables prev/next navigation) */
|
|
34
|
+
mediaItems?: MediaItemType[];
|
|
35
|
+
/** Custom component to render media items */
|
|
36
|
+
renderMediaItem?: (item: MediaItemType, onClick?: () => void) => React.ReactNode;
|
|
37
|
+
/** Whether to show navigation arrows */
|
|
38
|
+
showNavigation?: boolean;
|
|
39
|
+
/** Whether to show the thumbnail dock */
|
|
40
|
+
showThumbnailDock?: boolean;
|
|
41
|
+
/** Whether to show the item counter */
|
|
42
|
+
showCounter?: boolean;
|
|
43
|
+
/** Custom modal styling */
|
|
44
|
+
modalSx?: any;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Default MediaItem renderer for images and videos
|
|
48
|
+
*/
|
|
49
|
+
export declare const DefaultMediaItem: React.FC<{
|
|
50
|
+
item: MediaItemType;
|
|
51
|
+
onClick?: () => void;
|
|
52
|
+
style?: React.CSSProperties;
|
|
53
|
+
objectFit?: string;
|
|
54
|
+
disableVideoControls?: boolean;
|
|
55
|
+
}>;
|
|
56
|
+
/**
|
|
57
|
+
* SImageModal - A reusable full-screen modal for displaying media items with navigation features.
|
|
58
|
+
*
|
|
59
|
+
* Key features:
|
|
60
|
+
* - Full-screen modal with backdrop blur
|
|
61
|
+
* - Keyboard navigation (arrow keys, escape)
|
|
62
|
+
* - Previous/next navigation buttons (when mediaItems provided)
|
|
63
|
+
* - Draggable thumbnail dock with stacked layout (optional)
|
|
64
|
+
* - Animated transitions with Framer Motion
|
|
65
|
+
* - Item counter display (optional)
|
|
66
|
+
* - Responsive design for all screen sizes
|
|
67
|
+
* - Caption overlays with gradient backgrounds
|
|
68
|
+
* - Custom media item rendering support
|
|
69
|
+
* - Advanced z-index management for proper layering
|
|
70
|
+
*
|
|
71
|
+
* @param props - SImageModalProps with modal state and navigation handlers
|
|
72
|
+
* @returns JSX.Element - Full-screen image modal
|
|
73
|
+
*/
|
|
74
|
+
declare const SImageModal: React.FC<SImageModalProps>;
|
|
75
|
+
export default SImageModal;
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import { j as i } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
+
import { useState as k, useEffect as z } from "react";
|
|
3
|
+
import { Modal as A, Box as l, Paper as b, Typography as w, IconButton as m, Stack as T } from "@mui/material";
|
|
4
|
+
import { motion as u, AnimatePresence as F } from "framer-motion";
|
|
5
|
+
import { C as M } from "../Close-C1lLcTQu.js";
|
|
6
|
+
import { c as P } from "../createSvgIcon-9XY7lJan.js";
|
|
7
|
+
const $ = P(/* @__PURE__ */ i.jsx("path", {
|
|
8
|
+
d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"
|
|
9
|
+
}), "ChevronLeft"), B = P(/* @__PURE__ */ i.jsx("path", {
|
|
10
|
+
d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
11
|
+
}), "ChevronRight"), I = ({ item: s, onClick: c, style: r = {}, objectFit: e = "contain", disableVideoControls: n = !1 }) => s.type === "video" ? /* @__PURE__ */ i.jsx(
|
|
12
|
+
l,
|
|
13
|
+
{
|
|
14
|
+
component: "video",
|
|
15
|
+
onClick: c,
|
|
16
|
+
controls: !n,
|
|
17
|
+
sx: {
|
|
18
|
+
width: "100%",
|
|
19
|
+
height: "100%",
|
|
20
|
+
objectFit: e,
|
|
21
|
+
bgcolor: "background.paper",
|
|
22
|
+
...r
|
|
23
|
+
},
|
|
24
|
+
children: /* @__PURE__ */ i.jsx("source", { src: s.url, type: "video/mp4" })
|
|
25
|
+
}
|
|
26
|
+
) : /* @__PURE__ */ i.jsx(
|
|
27
|
+
l,
|
|
28
|
+
{
|
|
29
|
+
component: "img",
|
|
30
|
+
src: s.url,
|
|
31
|
+
alt: s.title || "",
|
|
32
|
+
onClick: c,
|
|
33
|
+
sx: {
|
|
34
|
+
width: "100%",
|
|
35
|
+
height: "100%",
|
|
36
|
+
objectFit: e,
|
|
37
|
+
bgcolor: "background.paper",
|
|
38
|
+
...r
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
), V = ({
|
|
42
|
+
selectedItem: s,
|
|
43
|
+
isOpen: c,
|
|
44
|
+
onClose: r,
|
|
45
|
+
onItemChange: e,
|
|
46
|
+
mediaItems: n = [],
|
|
47
|
+
renderMediaItem: f,
|
|
48
|
+
showNavigation: E = !0,
|
|
49
|
+
showThumbnailDock: S = !0,
|
|
50
|
+
showCounter: R = !0,
|
|
51
|
+
modalSx: C = {}
|
|
52
|
+
}) => {
|
|
53
|
+
const [v, L] = k({ x: 0, y: 0 }), [D, h] = k(s || null), o = s || D;
|
|
54
|
+
z(() => {
|
|
55
|
+
s && h(s);
|
|
56
|
+
}, [s]);
|
|
57
|
+
const p = E && n.length > 1 && o, a = o ? n.findIndex((t) => t.id === o.id) : -1, g = n.length, y = () => {
|
|
58
|
+
if (p && a > 0) {
|
|
59
|
+
const t = n[a - 1];
|
|
60
|
+
e ? e(t) : h(t);
|
|
61
|
+
}
|
|
62
|
+
}, j = () => {
|
|
63
|
+
if (p && a < g - 1) {
|
|
64
|
+
const t = n[a + 1];
|
|
65
|
+
e ? e(t) : h(t);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
return z(() => {
|
|
69
|
+
const t = (d) => {
|
|
70
|
+
if (c)
|
|
71
|
+
switch (d.key) {
|
|
72
|
+
case "ArrowLeft":
|
|
73
|
+
y();
|
|
74
|
+
break;
|
|
75
|
+
case "ArrowRight":
|
|
76
|
+
j();
|
|
77
|
+
break;
|
|
78
|
+
case "Escape":
|
|
79
|
+
r();
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
84
|
+
}, [c, a, g, p]), !c || !o ? null : /* @__PURE__ */ i.jsx(
|
|
85
|
+
A,
|
|
86
|
+
{
|
|
87
|
+
open: c,
|
|
88
|
+
onClose: r,
|
|
89
|
+
sx: {
|
|
90
|
+
zIndex: (t) => t.zIndex.modal + 100,
|
|
91
|
+
...C
|
|
92
|
+
},
|
|
93
|
+
slotProps: {
|
|
94
|
+
backdrop: {
|
|
95
|
+
sx: {
|
|
96
|
+
backdropFilter: "blur(8px)",
|
|
97
|
+
zIndex: (t) => t.zIndex.modal + 99
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
children: /* @__PURE__ */ i.jsxs(l, { children: [
|
|
102
|
+
/* @__PURE__ */ i.jsx(
|
|
103
|
+
u.div,
|
|
104
|
+
{
|
|
105
|
+
initial: { scale: 0.98 },
|
|
106
|
+
animate: { scale: 1 },
|
|
107
|
+
exit: { scale: 0.98 },
|
|
108
|
+
transition: { type: "spring", stiffness: 400, damping: 30 },
|
|
109
|
+
children: /* @__PURE__ */ i.jsxs(
|
|
110
|
+
b,
|
|
111
|
+
{
|
|
112
|
+
elevation: 3,
|
|
113
|
+
sx: {
|
|
114
|
+
position: "fixed",
|
|
115
|
+
inset: 0,
|
|
116
|
+
width: "100%",
|
|
117
|
+
minHeight: "100vh",
|
|
118
|
+
borderRadius: 0,
|
|
119
|
+
overflow: "hidden",
|
|
120
|
+
zIndex: (t) => t.zIndex.modal + 101
|
|
121
|
+
},
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ i.jsx(
|
|
124
|
+
l,
|
|
125
|
+
{
|
|
126
|
+
sx: {
|
|
127
|
+
height: "100%",
|
|
128
|
+
display: "flex",
|
|
129
|
+
flexDirection: "column"
|
|
130
|
+
},
|
|
131
|
+
children: /* @__PURE__ */ i.jsx(
|
|
132
|
+
l,
|
|
133
|
+
{
|
|
134
|
+
sx: {
|
|
135
|
+
flex: 1,
|
|
136
|
+
p: { xs: 1, sm: 2, md: 3 },
|
|
137
|
+
display: "flex",
|
|
138
|
+
alignItems: "center",
|
|
139
|
+
justifyContent: "center",
|
|
140
|
+
bgcolor: "background.default"
|
|
141
|
+
},
|
|
142
|
+
children: /* @__PURE__ */ i.jsx(F, { mode: "wait", children: /* @__PURE__ */ i.jsx(
|
|
143
|
+
u.div,
|
|
144
|
+
{
|
|
145
|
+
style: { position: "relative" },
|
|
146
|
+
initial: { y: 20, scale: 0.97 },
|
|
147
|
+
animate: {
|
|
148
|
+
y: 0,
|
|
149
|
+
scale: 1,
|
|
150
|
+
transition: { type: "spring", stiffness: 500, damping: 30, mass: 0.5 }
|
|
151
|
+
},
|
|
152
|
+
exit: { y: 20, scale: 0.97, transition: { duration: 0.15 } },
|
|
153
|
+
onClick: r,
|
|
154
|
+
children: /* @__PURE__ */ i.jsxs(
|
|
155
|
+
b,
|
|
156
|
+
{
|
|
157
|
+
elevation: 6,
|
|
158
|
+
sx: {
|
|
159
|
+
position: "relative",
|
|
160
|
+
width: "100%",
|
|
161
|
+
aspectRatio: "16 / 9",
|
|
162
|
+
maxWidth: { xs: "95%", sm: "85%", md: 960 },
|
|
163
|
+
height: "70vh",
|
|
164
|
+
borderRadius: 2,
|
|
165
|
+
overflow: "hidden"
|
|
166
|
+
},
|
|
167
|
+
children: [
|
|
168
|
+
f ? f(o, r) : /* @__PURE__ */ i.jsx(I, { item: o, onClick: r }),
|
|
169
|
+
(o.title || o.desc) && /* @__PURE__ */ i.jsxs(
|
|
170
|
+
l,
|
|
171
|
+
{
|
|
172
|
+
sx: {
|
|
173
|
+
position: "absolute",
|
|
174
|
+
left: 0,
|
|
175
|
+
right: 0,
|
|
176
|
+
bottom: 0,
|
|
177
|
+
p: { xs: 1.5, sm: 2, md: 3 },
|
|
178
|
+
background: (t) => `linear-gradient(to top, ${t.palette.grey[900]}CC, transparent)`,
|
|
179
|
+
color: "primary.contrastText"
|
|
180
|
+
},
|
|
181
|
+
onClick: (t) => t.stopPropagation(),
|
|
182
|
+
children: [
|
|
183
|
+
o.title && /* @__PURE__ */ i.jsx(w, { variant: "h6", sx: { fontWeight: 600, fontSize: { xs: 14, sm: 18, md: 20 } }, children: o.title }),
|
|
184
|
+
o.desc && /* @__PURE__ */ i.jsx(w, { variant: "body2", sx: { opacity: 0.8, mt: 0.5 }, children: o.desc })
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
},
|
|
192
|
+
o.id
|
|
193
|
+
) })
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
}
|
|
197
|
+
),
|
|
198
|
+
/* @__PURE__ */ i.jsx(
|
|
199
|
+
m,
|
|
200
|
+
{
|
|
201
|
+
"aria-label": "Close",
|
|
202
|
+
onClick: r,
|
|
203
|
+
sx: {
|
|
204
|
+
position: "absolute",
|
|
205
|
+
top: { xs: 8, sm: 10, md: 12 },
|
|
206
|
+
right: { xs: 8, sm: 10, md: 12 },
|
|
207
|
+
zIndex: (t) => t.zIndex.modal + 102
|
|
208
|
+
},
|
|
209
|
+
children: /* @__PURE__ */ i.jsx(M, {})
|
|
210
|
+
}
|
|
211
|
+
),
|
|
212
|
+
R && p && /* @__PURE__ */ i.jsxs(
|
|
213
|
+
l,
|
|
214
|
+
{
|
|
215
|
+
sx: {
|
|
216
|
+
position: "absolute",
|
|
217
|
+
top: { xs: 8, sm: 10, md: 12 },
|
|
218
|
+
left: { xs: 8, sm: 10, md: 12 },
|
|
219
|
+
zIndex: (t) => t.zIndex.modal + 102,
|
|
220
|
+
padding: 1,
|
|
221
|
+
px: 2,
|
|
222
|
+
fontSize: { xs: 14, sm: 16 },
|
|
223
|
+
color: "text.primary"
|
|
224
|
+
},
|
|
225
|
+
children: [
|
|
226
|
+
a + 1,
|
|
227
|
+
" / ",
|
|
228
|
+
g
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
),
|
|
232
|
+
p && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
233
|
+
/* @__PURE__ */ i.jsx(
|
|
234
|
+
m,
|
|
235
|
+
{
|
|
236
|
+
"aria-label": "Previous image",
|
|
237
|
+
onClick: (t) => {
|
|
238
|
+
t.stopPropagation(), y();
|
|
239
|
+
},
|
|
240
|
+
disabled: a === 0,
|
|
241
|
+
sx: {
|
|
242
|
+
position: "absolute",
|
|
243
|
+
left: { xs: 8, sm: 10, md: 12 },
|
|
244
|
+
top: "50%",
|
|
245
|
+
transform: "translateY(-50%)",
|
|
246
|
+
zIndex: (t) => t.zIndex.modal + 102,
|
|
247
|
+
"&:disabled": {
|
|
248
|
+
opacity: 0.5
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
children: /* @__PURE__ */ i.jsx($, {})
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
/* @__PURE__ */ i.jsx(
|
|
255
|
+
m,
|
|
256
|
+
{
|
|
257
|
+
"aria-label": "Next image",
|
|
258
|
+
onClick: (t) => {
|
|
259
|
+
t.stopPropagation(), j();
|
|
260
|
+
},
|
|
261
|
+
disabled: a === g - 1,
|
|
262
|
+
sx: {
|
|
263
|
+
position: "absolute",
|
|
264
|
+
right: { xs: 8, sm: 10, md: 12 },
|
|
265
|
+
top: "50%",
|
|
266
|
+
transform: "translateY(-50%)",
|
|
267
|
+
zIndex: (t) => t.zIndex.modal + 102,
|
|
268
|
+
"&:disabled": {
|
|
269
|
+
opacity: 0.5
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
children: /* @__PURE__ */ i.jsx(B, {})
|
|
273
|
+
}
|
|
274
|
+
)
|
|
275
|
+
] })
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
)
|
|
279
|
+
}
|
|
280
|
+
),
|
|
281
|
+
S && p && n.length > 1 && /* @__PURE__ */ i.jsx(
|
|
282
|
+
u.div,
|
|
283
|
+
{
|
|
284
|
+
drag: !0,
|
|
285
|
+
dragMomentum: !1,
|
|
286
|
+
dragElastic: 0.1,
|
|
287
|
+
initial: !1,
|
|
288
|
+
animate: { x: v.x, y: v.y },
|
|
289
|
+
onDragEnd: (t, d) => {
|
|
290
|
+
L((x) => ({ x: x.x + d.offset.x, y: x.y + d.offset.y }));
|
|
291
|
+
},
|
|
292
|
+
style: {
|
|
293
|
+
position: "fixed",
|
|
294
|
+
zIndex: 1502,
|
|
295
|
+
left: "50%",
|
|
296
|
+
bottom: 16,
|
|
297
|
+
transform: "translateX(-50%)",
|
|
298
|
+
touchAction: "none"
|
|
299
|
+
},
|
|
300
|
+
children: /* @__PURE__ */ i.jsx(
|
|
301
|
+
b,
|
|
302
|
+
{
|
|
303
|
+
elevation: 8,
|
|
304
|
+
sx: {
|
|
305
|
+
position: "relative",
|
|
306
|
+
borderRadius: 3,
|
|
307
|
+
bgcolor: "background.paper",
|
|
308
|
+
border: "1px solid",
|
|
309
|
+
borderColor: "divider",
|
|
310
|
+
backdropFilter: "blur(12px)",
|
|
311
|
+
cursor: "grab",
|
|
312
|
+
"&:active": { cursor: "grabbing" },
|
|
313
|
+
px: 1.5,
|
|
314
|
+
py: 1
|
|
315
|
+
},
|
|
316
|
+
children: /* @__PURE__ */ i.jsx(T, { direction: "row", alignItems: "center", spacing: -1.5, children: n.map((t, d) => /* @__PURE__ */ i.jsxs(
|
|
317
|
+
u.div,
|
|
318
|
+
{
|
|
319
|
+
onClick: (x) => {
|
|
320
|
+
x.stopPropagation(), e ? e(t) : h(t);
|
|
321
|
+
},
|
|
322
|
+
style: {
|
|
323
|
+
position: "relative",
|
|
324
|
+
width: 40,
|
|
325
|
+
height: 40,
|
|
326
|
+
borderRadius: 10,
|
|
327
|
+
overflow: "hidden",
|
|
328
|
+
flexShrink: 0,
|
|
329
|
+
zIndex: o.id === t.id ? 30 : n.length - d,
|
|
330
|
+
border: o.id === t.id ? "2px solid" : void 0,
|
|
331
|
+
borderColor: o.id === t.id ? "divider" : void 0,
|
|
332
|
+
cursor: "pointer"
|
|
333
|
+
},
|
|
334
|
+
initial: { rotate: d % 2 === 0 ? -15 : 15 },
|
|
335
|
+
animate: {
|
|
336
|
+
scale: o.id === t.id ? 1.2 : 1,
|
|
337
|
+
rotate: o.id === t.id ? 0 : d % 2 === 0 ? -15 : 15,
|
|
338
|
+
y: o.id === t.id ? -8 : 0
|
|
339
|
+
},
|
|
340
|
+
whileHover: {
|
|
341
|
+
scale: 1.3,
|
|
342
|
+
rotate: 0,
|
|
343
|
+
y: -10,
|
|
344
|
+
transition: { type: "spring", stiffness: 400, damping: 25 }
|
|
345
|
+
},
|
|
346
|
+
children: [
|
|
347
|
+
f ? f(t, () => {
|
|
348
|
+
e ? e(t) : h(t);
|
|
349
|
+
}) : /* @__PURE__ */ i.jsx(
|
|
350
|
+
I,
|
|
351
|
+
{
|
|
352
|
+
item: t,
|
|
353
|
+
objectFit: "cover",
|
|
354
|
+
style: {
|
|
355
|
+
width: "100%",
|
|
356
|
+
height: "100%",
|
|
357
|
+
// Disable pointer events for videos in thumbnails to ensure parent click handler works
|
|
358
|
+
pointerEvents: t.type === "video" ? "none" : "auto"
|
|
359
|
+
},
|
|
360
|
+
disableVideoControls: !0
|
|
361
|
+
}
|
|
362
|
+
),
|
|
363
|
+
/* @__PURE__ */ i.jsx(
|
|
364
|
+
l,
|
|
365
|
+
{
|
|
366
|
+
sx: {
|
|
367
|
+
position: "absolute",
|
|
368
|
+
inset: 0,
|
|
369
|
+
background: (x) => `linear-gradient(to bottom, transparent, ${x.palette.action.hover}, ${x.palette.action.selected})`,
|
|
370
|
+
pointerEvents: "none"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
),
|
|
374
|
+
o.id === t.id && /* @__PURE__ */ i.jsx(
|
|
375
|
+
u.div,
|
|
376
|
+
{
|
|
377
|
+
layoutId: "activeGlow",
|
|
378
|
+
style: {
|
|
379
|
+
position: "absolute",
|
|
380
|
+
inset: -8,
|
|
381
|
+
background: "primary.main",
|
|
382
|
+
filter: "blur(16px)"
|
|
383
|
+
},
|
|
384
|
+
initial: { opacity: 0 },
|
|
385
|
+
animate: { opacity: 1 },
|
|
386
|
+
transition: { duration: 0.2 }
|
|
387
|
+
}
|
|
388
|
+
)
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
t.id
|
|
392
|
+
)) })
|
|
393
|
+
}
|
|
394
|
+
)
|
|
395
|
+
}
|
|
396
|
+
)
|
|
397
|
+
] })
|
|
398
|
+
}
|
|
399
|
+
);
|
|
400
|
+
};
|
|
401
|
+
export {
|
|
402
|
+
I as DefaultMediaItem,
|
|
403
|
+
V as default
|
|
404
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default, MediaItem
|
|
2
|
-
export type {
|
|
1
|
+
export { default, MediaItem } from './s-interactive-gallery';
|
|
2
|
+
export type { SInteractiveGalleryProps, MediaItemProps } from './s-interactive-gallery';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MediaItem as a, default as d } from "./s-interactive-gallery.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
d as
|
|
5
|
-
o as default
|
|
3
|
+
a as MediaItem,
|
|
4
|
+
d as default
|
|
6
5
|
};
|