@solostylist/ui-kit 1.0.126 → 1.0.128
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-image-modal/s-image-modal.d.ts +1 -1
- package/dist/s-image-modal/s-image-modal.js +28 -28
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +7 -7
- package/dist/theme/components/alert.d.ts +104 -104
- package/dist/theme/components/button.d.ts +158 -158
- package/dist/theme/components/chip.d.ts +2 -2
- package/dist/theme/theme-primitives.js +16 -16
- package/package.json +1 -1
|
@@ -50,7 +50,7 @@ export declare const DefaultMediaItem: React.FC<{
|
|
|
50
50
|
item: MediaItemType;
|
|
51
51
|
onClick?: () => void;
|
|
52
52
|
style?: React.CSSProperties;
|
|
53
|
-
objectFit?:
|
|
53
|
+
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
54
54
|
disableVideoControls?: boolean;
|
|
55
55
|
}>;
|
|
56
56
|
/**
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
2
|
import { useState as k, useEffect as w } from "react";
|
|
3
|
-
import { Modal as
|
|
3
|
+
import { Modal as L, Box as c, Paper as b, Typography as z, IconButton as m, Stack as A } from "@mui/material";
|
|
4
4
|
import { motion as f, AnimatePresence as T } from "framer-motion";
|
|
5
|
-
import
|
|
6
|
-
import { C as
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import F from "../s-lazy-image/s-lazy-image.js";
|
|
6
|
+
import { C as $ } from "../Close-DlTC3goO.js";
|
|
7
|
+
import { C as B, a as H } from "../ChevronRight-DQD188LX.js";
|
|
8
|
+
const I = ({ item: s, onClick: l, style: x = {}, objectFit: e = "contain", disableVideoControls: r = !1 }) => s.type === "video" ? /* @__PURE__ */ o.jsx(
|
|
9
|
+
c,
|
|
9
10
|
{
|
|
10
11
|
component: "video",
|
|
11
|
-
onClick:
|
|
12
|
+
onClick: l,
|
|
12
13
|
controls: !r,
|
|
13
14
|
sx: {
|
|
14
15
|
width: "100%",
|
|
@@ -20,23 +21,22 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
20
21
|
children: /* @__PURE__ */ o.jsx("source", { src: s.url, type: "video/mp4" })
|
|
21
22
|
}
|
|
22
23
|
) : /* @__PURE__ */ o.jsx(
|
|
23
|
-
|
|
24
|
+
F,
|
|
24
25
|
{
|
|
25
|
-
component: "img",
|
|
26
26
|
src: s.url,
|
|
27
27
|
alt: s.title || "",
|
|
28
|
-
onClick:
|
|
29
|
-
|
|
28
|
+
onClick: l,
|
|
29
|
+
style: {
|
|
30
30
|
width: "100%",
|
|
31
31
|
height: "100%",
|
|
32
32
|
objectFit: e,
|
|
33
|
-
|
|
33
|
+
backgroundColor: "background.paper",
|
|
34
34
|
...x
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
),
|
|
37
|
+
), X = ({
|
|
38
38
|
selectedItem: s,
|
|
39
|
-
isOpen:
|
|
39
|
+
isOpen: l,
|
|
40
40
|
onClose: x,
|
|
41
41
|
onItemChange: e,
|
|
42
42
|
mediaItems: r = [],
|
|
@@ -63,7 +63,7 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
63
63
|
};
|
|
64
64
|
return w(() => {
|
|
65
65
|
const t = (d) => {
|
|
66
|
-
if (
|
|
66
|
+
if (l)
|
|
67
67
|
switch (d.key) {
|
|
68
68
|
case "ArrowLeft":
|
|
69
69
|
v();
|
|
@@ -77,10 +77,10 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
80
|
-
}, [
|
|
81
|
-
|
|
80
|
+
}, [l, a, g, p]), !l || !i ? null : /* @__PURE__ */ o.jsx(
|
|
81
|
+
L,
|
|
82
82
|
{
|
|
83
|
-
open:
|
|
83
|
+
open: l,
|
|
84
84
|
onClose: x,
|
|
85
85
|
sx: {
|
|
86
86
|
zIndex: (t) => t.zIndex.modal + 100,
|
|
@@ -94,7 +94,7 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
|
-
children: /* @__PURE__ */ o.jsxs(
|
|
97
|
+
children: /* @__PURE__ */ o.jsxs(c, { children: [
|
|
98
98
|
/* @__PURE__ */ o.jsx(
|
|
99
99
|
f.div,
|
|
100
100
|
{
|
|
@@ -116,7 +116,7 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
116
116
|
},
|
|
117
117
|
children: [
|
|
118
118
|
/* @__PURE__ */ o.jsx(
|
|
119
|
-
|
|
119
|
+
c,
|
|
120
120
|
{
|
|
121
121
|
sx: {
|
|
122
122
|
height: "100%",
|
|
@@ -124,7 +124,7 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
124
124
|
flexDirection: "column"
|
|
125
125
|
},
|
|
126
126
|
children: /* @__PURE__ */ o.jsx(
|
|
127
|
-
|
|
127
|
+
c,
|
|
128
128
|
{
|
|
129
129
|
sx: {
|
|
130
130
|
flex: 1,
|
|
@@ -161,7 +161,7 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
161
161
|
children: [
|
|
162
162
|
h ? h(i) : /* @__PURE__ */ o.jsx(I, { item: i }),
|
|
163
163
|
(i.title || i.desc) && /* @__PURE__ */ o.jsxs(
|
|
164
|
-
|
|
164
|
+
c,
|
|
165
165
|
{
|
|
166
166
|
sx: {
|
|
167
167
|
position: "absolute",
|
|
@@ -200,11 +200,11 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
200
200
|
right: { xs: 8, sm: 10, md: 12 },
|
|
201
201
|
zIndex: (t) => t.zIndex.modal + 102
|
|
202
202
|
},
|
|
203
|
-
children: /* @__PURE__ */ o.jsx(
|
|
203
|
+
children: /* @__PURE__ */ o.jsx($, {})
|
|
204
204
|
}
|
|
205
205
|
),
|
|
206
206
|
S && p && /* @__PURE__ */ o.jsxs(
|
|
207
|
-
|
|
207
|
+
c,
|
|
208
208
|
{
|
|
209
209
|
sx: {
|
|
210
210
|
position: "absolute",
|
|
@@ -242,7 +242,7 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
242
242
|
opacity: 0.5
|
|
243
243
|
}
|
|
244
244
|
},
|
|
245
|
-
children: /* @__PURE__ */ o.jsx(
|
|
245
|
+
children: /* @__PURE__ */ o.jsx(B, {})
|
|
246
246
|
}
|
|
247
247
|
),
|
|
248
248
|
/* @__PURE__ */ o.jsx(
|
|
@@ -263,7 +263,7 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
263
263
|
opacity: 0.5
|
|
264
264
|
}
|
|
265
265
|
},
|
|
266
|
-
children: /* @__PURE__ */ o.jsx(
|
|
266
|
+
children: /* @__PURE__ */ o.jsx(H, {})
|
|
267
267
|
}
|
|
268
268
|
)
|
|
269
269
|
] })
|
|
@@ -306,7 +306,7 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
306
306
|
px: 1.5,
|
|
307
307
|
py: 1
|
|
308
308
|
},
|
|
309
|
-
children: /* @__PURE__ */ o.jsx(
|
|
309
|
+
children: /* @__PURE__ */ o.jsx(A, { direction: "row", alignItems: "center", spacing: -1.5, children: r.map((t, d) => /* @__PURE__ */ o.jsxs(
|
|
310
310
|
f.div,
|
|
311
311
|
{
|
|
312
312
|
onClick: (n) => {
|
|
@@ -354,7 +354,7 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
354
354
|
}
|
|
355
355
|
),
|
|
356
356
|
/* @__PURE__ */ o.jsx(
|
|
357
|
-
|
|
357
|
+
c,
|
|
358
358
|
{
|
|
359
359
|
sx: {
|
|
360
360
|
position: "absolute",
|
|
@@ -393,5 +393,5 @@ const I = ({ item: s, onClick: c, style: x = {}, objectFit: e = "contain", disab
|
|
|
393
393
|
};
|
|
394
394
|
export {
|
|
395
395
|
I as DefaultMediaItem,
|
|
396
|
-
|
|
396
|
+
X as default
|
|
397
397
|
};
|
|
@@ -50,7 +50,7 @@ const b = h`
|
|
|
50
50
|
a.id = e, a.textContent = `
|
|
51
51
|
.s-radial-pulse-particle {
|
|
52
52
|
position: absolute;
|
|
53
|
-
background: var(--s-palette-
|
|
53
|
+
background: var(--s-palette-text-primary);
|
|
54
54
|
border-radius: 50%;
|
|
55
55
|
animation: s-radial-pulse-float 4s ease-in-out infinite;
|
|
56
56
|
}
|
|
@@ -81,23 +81,23 @@ const b = h`
|
|
|
81
81
|
height: a = 300,
|
|
82
82
|
className: c,
|
|
83
83
|
text: u = "Generating...",
|
|
84
|
-
particleSize:
|
|
84
|
+
particleSize: i = { min: 2, max: 6 }
|
|
85
85
|
}) => {
|
|
86
86
|
const o = x(null);
|
|
87
87
|
return y(() => {
|
|
88
88
|
R();
|
|
89
89
|
const p = () => {
|
|
90
90
|
if (!o.current) return;
|
|
91
|
-
const
|
|
91
|
+
const r = o.current, t = document.createElement("div");
|
|
92
92
|
t.className = "s-radial-pulse-particle";
|
|
93
|
-
const m = Math.random() * (
|
|
94
|
-
t.style.width = `${m}px`, t.style.height = `${m}px`, t.style.left = `${Math.random() * e}px`, t.style.top = `${Math.random() * a}px`, t.style.animationDelay = `${Math.random() * 4}s`, t.style.animationDuration = `${Math.random() * 3 + 2}s`,
|
|
93
|
+
const m = Math.random() * (i.max - i.min) + i.min;
|
|
94
|
+
t.style.width = `${m}px`, t.style.height = `${m}px`, t.style.left = `${Math.random() * e}px`, t.style.top = `${Math.random() * a}px`, t.style.animationDelay = `${Math.random() * 4}s`, t.style.animationDuration = `${Math.random() * 3 + 2}s`, r.appendChild(t), setTimeout(() => {
|
|
95
95
|
t.parentNode && t.parentNode.removeChild(t);
|
|
96
96
|
}, 6e3);
|
|
97
97
|
}, f = setInterval(p, 500);
|
|
98
|
-
for (let
|
|
98
|
+
for (let r = 0; r < 4; r++) setTimeout(p, r * 100);
|
|
99
99
|
return () => clearInterval(f);
|
|
100
|
-
}, [e, a,
|
|
100
|
+
}, [e, a, i]), /* @__PURE__ */ n.jsxs(
|
|
101
101
|
j,
|
|
102
102
|
{
|
|
103
103
|
ref: o,
|