@solostylist/ui-kit 1.0.198 → 1.0.200
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/entries/core.d.ts +2 -2
- package/dist/entries/core.js +28 -30
- package/dist/main.js +92 -94
- package/dist/s-blur-text/s-blur-text.js +25 -24
- package/dist/s-chat-message/s-chat-message.js +1 -1
- package/dist/s-comment-message/s-comment-message.js +1 -1
- package/dist/s-countdown/s-count-box.js +40 -37
- package/dist/s-countdown/s-count-down.js +73 -101
- package/dist/s-dialog-confirm/index.d.ts +1 -1
- package/dist/s-dialog-confirm/s-dialog-confirm.d.ts +1 -1
- package/dist/s-dialog-message/index.d.ts +1 -1
- package/dist/s-dialog-message/s-dialog-message.d.ts +1 -1
- package/dist/s-file-dropzone/s-file-dropzone.js +13 -13
- package/dist/s-pixel-reveal/s-pixel-reveal.js +28 -28
- package/dist/s-review/s-review.js +1 -1
- package/dist/s-snackbar-message/s-snackbar-message.js +18 -18
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +7 -9
- package/dist/{utils-CHdpkEZx.js → utils-D1UMIV0b.js} +13 -6
- package/package.json +10 -5
- package/dist/s-accordion/package.json +0 -5
- package/dist/s-action-overlay/package.json +0 -5
- package/dist/s-ai-tool-bar/package.json +0 -5
- package/dist/s-autocomplete/package.json +0 -5
- package/dist/s-avatar/package.json +0 -5
- package/dist/s-blur-text/package.json +0 -5
- package/dist/s-breadcrumbs/package.json +0 -5
- package/dist/s-button/package.json +0 -5
- package/dist/s-button-link/package.json +0 -5
- package/dist/s-carousel/package.json +0 -5
- package/dist/s-category-card/package.json +0 -5
- package/dist/s-chat-input/package.json +0 -5
- package/dist/s-chat-message/package.json +0 -5
- package/dist/s-checkbox/package.json +0 -5
- package/dist/s-chip/package.json +0 -5
- package/dist/s-chips/package.json +0 -5
- package/dist/s-code-block/package.json +0 -5
- package/dist/s-comment-message/package.json +0 -5
- package/dist/s-copyable-text/package.json +0 -5
- package/dist/s-countdown/package.json +0 -5
- package/dist/s-data-table/package.json +0 -5
- package/dist/s-date-picker/package.json +0 -5
- package/dist/s-datetime-picker/package.json +0 -5
- package/dist/s-dialog/package.json +0 -5
- package/dist/s-dialog-confirm/package.json +0 -5
- package/dist/s-dialog-message/package.json +0 -5
- package/dist/s-empty/package.json +0 -5
- package/dist/s-error/package.json +0 -5
- package/dist/s-error-layout/package.json +0 -5
- package/dist/s-file-dropzone/package.json +0 -5
- package/dist/s-file-icon/package.json +0 -5
- package/dist/s-flex-box/package.json +0 -5
- package/dist/s-form/package.json +0 -5
- package/dist/s-gallery/package.json +0 -5
- package/dist/s-glow-button/package.json +0 -5
- package/dist/s-gradient-icon/package.json +0 -5
- package/dist/s-i18n-provider/package.json +0 -5
- package/dist/s-icon-button/package.json +0 -5
- package/dist/s-image-comparison/package.json +0 -5
- package/dist/s-image-modal/package.json +0 -5
- package/dist/s-item-not-found/package.json +0 -5
- package/dist/s-label/package.json +0 -5
- package/dist/s-language-switcher/package.json +0 -5
- package/dist/s-lazy-image/package.json +0 -5
- package/dist/s-localization-provider/package.json +0 -5
- package/dist/s-moving-border/package.json +0 -5
- package/dist/s-multi-select/package.json +0 -5
- package/dist/s-no-ssr/package.json +0 -5
- package/dist/s-overlay-scrollbar/package.json +0 -5
- package/dist/s-pagination/package.json +0 -5
- package/dist/s-pixel-reveal/package.json +0 -5
- package/dist/s-radial-pulse-animate/package.json +0 -5
- package/dist/s-rating/package.json +0 -5
- package/dist/s-review/package.json +0 -5
- package/dist/s-scroll-reveal/package.json +0 -6
- package/dist/s-scroll-to-top/package.json +0 -5
- package/dist/s-scroll-velocity/package.json +0 -5
- package/dist/s-select/package.json +0 -5
- package/dist/s-select-list/package.json +0 -5
- package/dist/s-skeleton/package.json +0 -5
- package/dist/s-snackbar-message/package.json +0 -5
- package/dist/s-spotlight-cursor/package.json +0 -5
- package/dist/s-stripe/package.json +0 -5
- package/dist/s-tabs/package.json +0 -4
- package/dist/s-text-editor/package.json +0 -5
- package/dist/s-text-field/package.json +0 -5
- package/dist/s-text-shimmer/package.json +0 -5
- package/dist/s-text-truncation/package.json +0 -5
- package/dist/s-theme-demo/package.json +0 -5
- package/dist/s-theme-provider/package.json +0 -5
- package/dist/s-theme-switch/package.json +0 -5
- package/dist/s-tip/package.json +0 -5
- package/dist/s-two-pane-layout/package.json +0 -5
- package/dist/s-typewriter-text/package.json +0 -6
- package/dist/s-zoom-image/package.json +0 -5
- package/dist/utils/bytes-to-size.d.ts +0 -1
- package/dist/utils/bytes-to-size.js +0 -9
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { j as t } from "../jsx-runtime-tc70JA_2.js";
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { SFlexBox as
|
|
4
|
-
const
|
|
5
|
-
digit:
|
|
6
|
-
title:
|
|
7
|
-
size:
|
|
8
|
-
color:
|
|
9
|
-
animation:
|
|
2
|
+
import { Typography as l, Fade as v, Slide as B } from "@mui/material";
|
|
3
|
+
import { SFlexBox as d } from "../s-flex-box/s-flex-box.js";
|
|
4
|
+
const C = ({
|
|
5
|
+
digit: m = 0,
|
|
6
|
+
title: x = "",
|
|
7
|
+
size: f = "medium",
|
|
8
|
+
color: o = "inherit",
|
|
9
|
+
animation: s = "none",
|
|
10
10
|
sx: g,
|
|
11
|
-
digitSx:
|
|
12
|
-
titleSx:
|
|
13
|
-
showSeparator:
|
|
14
|
-
separator:
|
|
15
|
-
digitFormat:
|
|
16
|
-
hidden:
|
|
11
|
+
digitSx: p,
|
|
12
|
+
titleSx: h,
|
|
13
|
+
showSeparator: u = !1,
|
|
14
|
+
separator: S = ":",
|
|
15
|
+
digitFormat: j = "default",
|
|
16
|
+
hidden: y = !1
|
|
17
17
|
}) => {
|
|
18
|
-
if (
|
|
19
|
-
const
|
|
20
|
-
switch (
|
|
18
|
+
if (y) return null;
|
|
19
|
+
const z = (c) => j === "padded" ? c.toString().padStart(2, "0") : c.toString(), e = (() => {
|
|
20
|
+
switch (f) {
|
|
21
21
|
case "small":
|
|
22
22
|
return {
|
|
23
23
|
digit: { fontSize: "1.5rem", lineHeight: 1.2 },
|
|
@@ -34,22 +34,22 @@ const B = ({
|
|
|
34
34
|
title: { fontSize: "0.875rem", letterSpacing: "0.08em" }
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
})(), i =
|
|
38
|
-
|
|
37
|
+
})(), i = z(m), n = /* @__PURE__ */ t.jsx(
|
|
38
|
+
l,
|
|
39
39
|
{
|
|
40
40
|
variant: "h3",
|
|
41
41
|
component: "span",
|
|
42
42
|
sx: {
|
|
43
43
|
fontWeight: 700,
|
|
44
|
-
color:
|
|
44
|
+
color: o === "inherit" ? "text.primary" : `${o}.main`,
|
|
45
45
|
width: "70px",
|
|
46
46
|
...e.digit,
|
|
47
|
-
...
|
|
47
|
+
...p
|
|
48
48
|
},
|
|
49
49
|
children: i
|
|
50
50
|
}
|
|
51
|
-
),
|
|
52
|
-
|
|
51
|
+
), H = /* @__PURE__ */ t.jsx(
|
|
52
|
+
l,
|
|
53
53
|
{
|
|
54
54
|
component: "span",
|
|
55
55
|
sx: {
|
|
@@ -59,12 +59,15 @@ const B = ({
|
|
|
59
59
|
display: "block",
|
|
60
60
|
mt: 0.5,
|
|
61
61
|
...e.title,
|
|
62
|
-
...
|
|
62
|
+
...h
|
|
63
63
|
},
|
|
64
|
-
children:
|
|
64
|
+
children: x
|
|
65
65
|
}
|
|
66
|
-
)
|
|
67
|
-
|
|
66
|
+
);
|
|
67
|
+
let r = n;
|
|
68
|
+
s === "fade" ? r = /* @__PURE__ */ t.jsx(v, { in: !0, timeout: 300, children: /* @__PURE__ */ t.jsx("div", { children: n }) }, i) : s === "slide" && (r = /* @__PURE__ */ t.jsx(B, { in: !0, direction: "up", timeout: 300, children: /* @__PURE__ */ t.jsx("div", { children: n }) }, i));
|
|
69
|
+
const a = /* @__PURE__ */ t.jsxs(
|
|
70
|
+
d,
|
|
68
71
|
{
|
|
69
72
|
flexDirection: "column",
|
|
70
73
|
alignItems: "center",
|
|
@@ -74,15 +77,15 @@ const B = ({
|
|
|
74
77
|
...g
|
|
75
78
|
},
|
|
76
79
|
children: [
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
r,
|
|
81
|
+
H
|
|
79
82
|
]
|
|
80
83
|
}
|
|
81
84
|
);
|
|
82
|
-
return
|
|
83
|
-
|
|
85
|
+
return u ? /* @__PURE__ */ t.jsxs(d, { alignItems: "center", children: [
|
|
86
|
+
a,
|
|
84
87
|
/* @__PURE__ */ t.jsx(
|
|
85
|
-
|
|
88
|
+
l,
|
|
86
89
|
{
|
|
87
90
|
variant: "h3",
|
|
88
91
|
sx: {
|
|
@@ -92,13 +95,13 @@ const B = ({
|
|
|
92
95
|
alignSelf: "flex-start",
|
|
93
96
|
mt: 0.5
|
|
94
97
|
},
|
|
95
|
-
children:
|
|
98
|
+
children: S
|
|
96
99
|
}
|
|
97
100
|
)
|
|
98
|
-
] }) :
|
|
101
|
+
] }) : a;
|
|
99
102
|
};
|
|
100
|
-
|
|
103
|
+
C.displayName = "SCountBox";
|
|
101
104
|
export {
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
C as SCountBox,
|
|
106
|
+
C as default
|
|
104
107
|
};
|
|
@@ -1,138 +1,110 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Typography as
|
|
3
|
-
import
|
|
4
|
-
import { SFlexBox as
|
|
5
|
-
import { SCountBox as
|
|
6
|
-
const
|
|
1
|
+
import { j as l } from "../jsx-runtime-tc70JA_2.js";
|
|
2
|
+
import { useTheme as N, useMediaQuery as m, Typography as R } from "@mui/material";
|
|
3
|
+
import W from "../hooks/use-count-down.js";
|
|
4
|
+
import { SFlexBox as p } from "../s-flex-box/s-flex-box.js";
|
|
5
|
+
import { SCountBox as F } from "./s-count-box.js";
|
|
6
|
+
const H = ({
|
|
7
7
|
expireDate: x,
|
|
8
|
-
size:
|
|
9
|
-
color:
|
|
10
|
-
layout:
|
|
11
|
-
animation:
|
|
12
|
-
showSeparators:
|
|
13
|
-
separator:
|
|
14
|
-
units:
|
|
8
|
+
size: n = "medium",
|
|
9
|
+
color: u = "inherit",
|
|
10
|
+
layout: c = "horizontal",
|
|
11
|
+
animation: S = "none",
|
|
12
|
+
showSeparators: y = !1,
|
|
13
|
+
separator: k = ":",
|
|
14
|
+
units: b = {
|
|
15
15
|
days: !0,
|
|
16
16
|
hours: !0,
|
|
17
17
|
minutes: !0,
|
|
18
18
|
seconds: !0
|
|
19
19
|
},
|
|
20
|
-
labels:
|
|
20
|
+
labels: r = {
|
|
21
21
|
days: "DAYS",
|
|
22
22
|
hours: "HOURS",
|
|
23
23
|
minutes: "MINS",
|
|
24
24
|
seconds: "SECS"
|
|
25
25
|
},
|
|
26
|
-
digitFormat:
|
|
27
|
-
onComplete:
|
|
28
|
-
onTick:
|
|
29
|
-
onStart:
|
|
30
|
-
completedText:
|
|
31
|
-
autoHideZeroUnits:
|
|
32
|
-
sx:
|
|
33
|
-
"aria-label":
|
|
34
|
-
paused:
|
|
35
|
-
responsive:
|
|
26
|
+
digitFormat: j = "default",
|
|
27
|
+
onComplete: C,
|
|
28
|
+
onTick: $,
|
|
29
|
+
onStart: w,
|
|
30
|
+
completedText: i = "Time is up!",
|
|
31
|
+
autoHideZeroUnits: v = !1,
|
|
32
|
+
sx: o,
|
|
33
|
+
"aria-label": f = "Countdown timer",
|
|
34
|
+
paused: I = !1,
|
|
35
|
+
responsive: s
|
|
36
36
|
}) => {
|
|
37
|
-
const { timeLeft:
|
|
37
|
+
const { timeLeft: e, isExpired: A } = W({
|
|
38
38
|
expireDate: x,
|
|
39
|
-
onComplete:
|
|
40
|
-
onTick:
|
|
41
|
-
onStart:
|
|
42
|
-
paused:
|
|
43
|
-
});
|
|
44
|
-
if (
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
39
|
+
onComplete: C,
|
|
40
|
+
onTick: $,
|
|
41
|
+
onStart: w,
|
|
42
|
+
paused: I
|
|
43
|
+
}), a = N(), D = m(a.breakpoints.only("xs")), U = m(a.breakpoints.only("sm")), B = m(a.breakpoints.only("md")), E = m(a.breakpoints.only("lg")), d = s ? D ? s.xs ?? n : U ? s.sm ?? n : B ? s.md ?? n : E ? s.lg ?? n : s.xl ?? n : n;
|
|
44
|
+
if (A && i)
|
|
45
|
+
return /* @__PURE__ */ l.jsx(
|
|
46
|
+
p,
|
|
47
47
|
{
|
|
48
48
|
justifyContent: "center",
|
|
49
49
|
alignItems: "center",
|
|
50
|
-
sx: { textAlign: "center", ...
|
|
50
|
+
sx: { textAlign: "center", ...o },
|
|
51
51
|
role: "timer",
|
|
52
|
-
"aria-label": `${
|
|
53
|
-
children: typeof
|
|
54
|
-
|
|
52
|
+
"aria-label": `${f} - completed`,
|
|
53
|
+
children: typeof i == "string" ? /* @__PURE__ */ l.jsx(
|
|
54
|
+
R,
|
|
55
55
|
{
|
|
56
|
-
variant:
|
|
57
|
-
color:
|
|
56
|
+
variant: d === "large" ? "h4" : d === "small" ? "h6" : "h5",
|
|
57
|
+
color: u === "inherit" ? "text.primary" : `${u}.main`,
|
|
58
58
|
sx: { fontWeight: 600 },
|
|
59
|
-
children:
|
|
59
|
+
children: i
|
|
60
60
|
}
|
|
61
|
-
) :
|
|
61
|
+
) : i
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
|
-
const
|
|
65
|
-
{ key: "days", value:
|
|
66
|
-
{ key: "hours", value:
|
|
67
|
-
{ key: "minutes", value:
|
|
68
|
-
{ key: "seconds", value:
|
|
69
|
-
]
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
r.key
|
|
86
|
-
)
|
|
87
|
-
);
|
|
88
|
-
});
|
|
89
|
-
const E = () => u === "vertical" ? { flexDirection: "column", gap: 2, alignItems: "center" } : u === "grid" ? {
|
|
64
|
+
const h = [
|
|
65
|
+
{ key: "days", value: e.days, label: r.days },
|
|
66
|
+
{ key: "hours", value: e.hours, label: r.hours },
|
|
67
|
+
{ key: "minutes", value: e.minutes, label: r.minutes },
|
|
68
|
+
{ key: "seconds", value: e.seconds, label: r.seconds }
|
|
69
|
+
].filter(
|
|
70
|
+
(t) => b[t.key] && (!v || t.value > 0 || t.key === "seconds")
|
|
71
|
+
), g = h.map((t, L) => /* @__PURE__ */ l.jsx(
|
|
72
|
+
F,
|
|
73
|
+
{
|
|
74
|
+
digit: t.value,
|
|
75
|
+
title: t.label ?? "",
|
|
76
|
+
size: d,
|
|
77
|
+
color: u,
|
|
78
|
+
animation: S,
|
|
79
|
+
digitFormat: j,
|
|
80
|
+
showSeparator: y && L < h.length - 1,
|
|
81
|
+
separator: k
|
|
82
|
+
},
|
|
83
|
+
t.key
|
|
84
|
+
)), M = () => c === "vertical" ? { flexDirection: "column", gap: 2, alignItems: "center" } : c === "grid" ? {
|
|
90
85
|
display: "grid",
|
|
91
|
-
gridTemplateColumns: `repeat(${
|
|
86
|
+
gridTemplateColumns: `repeat(${g.length}, 1fr)`,
|
|
92
87
|
gap: 2,
|
|
93
88
|
justifyItems: "center"
|
|
94
89
|
} : {
|
|
95
90
|
flexDirection: "row",
|
|
96
|
-
gap:
|
|
91
|
+
gap: y ? 0 : 2,
|
|
97
92
|
alignItems: "center",
|
|
98
93
|
justifyContent: "center",
|
|
99
94
|
flexWrap: "wrap"
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
md: n.md ?? e,
|
|
104
|
-
lg: n.lg ?? e,
|
|
105
|
-
xl: n.xl ?? e
|
|
106
|
-
} : void 0;
|
|
107
|
-
return /* @__PURE__ */ a.jsx(
|
|
108
|
-
y,
|
|
95
|
+
};
|
|
96
|
+
return /* @__PURE__ */ l.jsx(
|
|
97
|
+
p,
|
|
109
98
|
{
|
|
110
|
-
sx: {
|
|
111
|
-
width: "fit-content",
|
|
112
|
-
...E(),
|
|
113
|
-
...h,
|
|
114
|
-
...s && {
|
|
115
|
-
// Apply responsive sizing if provided
|
|
116
|
-
"@media (max-width: 600px)": {
|
|
117
|
-
"& .MuiTypography-h3": {
|
|
118
|
-
fontSize: s.xs === "small" ? "1.5rem" : s.xs === "large" ? "3.5rem" : "2.5rem"
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"@media (min-width: 600px) and (max-width: 960px)": {
|
|
122
|
-
"& .MuiTypography-h3": {
|
|
123
|
-
fontSize: s.sm === "small" ? "1.5rem" : s.sm === "large" ? "3.5rem" : "2.5rem"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
},
|
|
99
|
+
sx: [{ width: "fit-content" }, M() ?? {}, ...Array.isArray(o) ? o : [o]],
|
|
128
100
|
role: "timer",
|
|
129
|
-
"aria-label": `${
|
|
130
|
-
children:
|
|
101
|
+
"aria-label": `${f} - ${e.days} days, ${e.hours} hours, ${e.minutes} minutes, ${e.seconds} seconds remaining`,
|
|
102
|
+
children: g
|
|
131
103
|
}
|
|
132
104
|
);
|
|
133
105
|
};
|
|
134
|
-
|
|
106
|
+
H.displayName = "SCountdown";
|
|
135
107
|
export {
|
|
136
|
-
|
|
137
|
-
|
|
108
|
+
H as SCountdown,
|
|
109
|
+
H as default
|
|
138
110
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default, DialogConfirmProvider, useDialogConfirm } from './s-dialog-confirm';
|
|
2
|
-
export type { DialogConfirmContextProps, DialogConfirmOpenOptions } from './s-dialog-confirm';
|
|
2
|
+
export type { DialogConfirmContextProps, DialogConfirmOpenOptions, SDialogConfirmProps } from './s-dialog-confirm';
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
/**
|
|
4
4
|
* Props interface for SDialogConfirm component
|
|
5
5
|
*/
|
|
6
|
-
interface SDialogConfirmProps {
|
|
6
|
+
export interface SDialogConfirmProps {
|
|
7
7
|
/** Dialog title - can be string or React element */
|
|
8
8
|
title?: string | React.ReactNode;
|
|
9
9
|
/** Dialog content - can be string (auto-wrapped in Typography) or React element */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default, DialogMessageProvider, useDialogMessage } from './s-dialog-message';
|
|
2
|
-
export type { DialogMessageOpenOptions, DialogMessageContextProps } from './s-dialog-message';
|
|
2
|
+
export type { DialogMessageOpenOptions, DialogMessageContextProps, SDialogMessageProps } from './s-dialog-message';
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
/**
|
|
4
4
|
* Props interface for SDialogMessage component
|
|
5
5
|
*/
|
|
6
|
-
interface SDialogMessageProps {
|
|
6
|
+
export interface SDialogMessageProps {
|
|
7
7
|
/** Dialog title - can be string or React element */
|
|
8
8
|
title?: string | React.ReactNode;
|
|
9
9
|
/** Dialog content - can be string (auto-wrapped in Typography) or React element */
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-tc70JA_2.js";
|
|
2
2
|
import * as g from "react";
|
|
3
3
|
import { c as l } from "../createSvgIcon-BkbeLOhM.js";
|
|
4
|
-
import { Avatar as
|
|
4
|
+
import { Avatar as b, Tooltip as v, IconButton as y, Button as C } from "@mui/material";
|
|
5
5
|
import { useDropzone as I } from "react-dropzone";
|
|
6
6
|
import { SFileIcon as S } from "../s-file-icon/s-file-icon.js";
|
|
7
7
|
import { SForm as z } from "../s-form/s-form.js";
|
|
8
|
-
import {
|
|
9
|
-
import { B as s } from "../Box-BkXoTbe8.js";
|
|
8
|
+
import { B as i } from "../Box-BkXoTbe8.js";
|
|
10
9
|
import { S as e } from "../Stack-Dfjnuorw.js";
|
|
11
10
|
import { T as t } from "../Typography-PcmlIqm1.js";
|
|
11
|
+
import { b as R } from "../utils-D1UMIV0b.js";
|
|
12
12
|
const k = l(/* @__PURE__ */ o.jsx("path", {
|
|
13
13
|
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
14
14
|
}), "CloseOutlined"), D = l(/* @__PURE__ */ o.jsx("path", {
|
|
15
15
|
d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"
|
|
16
16
|
}), "CloudUploadOutlined"), F = ({
|
|
17
|
-
hint:
|
|
18
|
-
label:
|
|
17
|
+
hint: a,
|
|
18
|
+
label: c = "",
|
|
19
19
|
error: d,
|
|
20
20
|
onRemoveAll: p,
|
|
21
21
|
onRemove: x,
|
|
@@ -23,10 +23,10 @@ const k = l(/* @__PURE__ */ o.jsx("path", {
|
|
|
23
23
|
isShowBtnRemoveAll: h = !1,
|
|
24
24
|
...n
|
|
25
25
|
}) => {
|
|
26
|
-
const { getRootProps: u, getInputProps: j, isDragActive:
|
|
26
|
+
const { getRootProps: u, getInputProps: j, isDragActive: s } = I(n);
|
|
27
27
|
return /* @__PURE__ */ o.jsxs(g.Fragment, { children: [
|
|
28
|
-
/* @__PURE__ */ o.jsx(z, { error: d, label:
|
|
29
|
-
|
|
28
|
+
/* @__PURE__ */ o.jsx(z, { error: d, label: c, required: m, hint: a, children: /* @__PURE__ */ o.jsxs(
|
|
29
|
+
i,
|
|
30
30
|
{
|
|
31
31
|
sx: {
|
|
32
32
|
alignItems: "center",
|
|
@@ -40,13 +40,13 @@ const k = l(/* @__PURE__ */ o.jsx("path", {
|
|
|
40
40
|
outline: "none",
|
|
41
41
|
p: 4,
|
|
42
42
|
// Visual feedback when files are being dragged over
|
|
43
|
-
...
|
|
43
|
+
...s && {
|
|
44
44
|
bgcolor: "action.selected",
|
|
45
45
|
opacity: 0.5
|
|
46
46
|
},
|
|
47
47
|
// Hover effect when not actively dragging
|
|
48
48
|
"&:hover": {
|
|
49
|
-
...!
|
|
49
|
+
...!s && {
|
|
50
50
|
bgcolor: "action.hover"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -56,7 +56,7 @@ const k = l(/* @__PURE__ */ o.jsx("path", {
|
|
|
56
56
|
/* @__PURE__ */ o.jsx("input", { ...j() }),
|
|
57
57
|
/* @__PURE__ */ o.jsxs(e, { direction: "row", spacing: 1, sx: { alignItems: "center" }, children: [
|
|
58
58
|
/* @__PURE__ */ o.jsx(
|
|
59
|
-
|
|
59
|
+
b,
|
|
60
60
|
{
|
|
61
61
|
sx: {
|
|
62
62
|
border: "1px dashed",
|
|
@@ -95,11 +95,11 @@ const k = l(/* @__PURE__ */ o.jsx("path", {
|
|
|
95
95
|
},
|
|
96
96
|
children: [
|
|
97
97
|
/* @__PURE__ */ o.jsx(S, { extension: f }),
|
|
98
|
-
/* @__PURE__ */ o.jsxs(
|
|
98
|
+
/* @__PURE__ */ o.jsxs(i, { sx: { flex: "1 1 auto" }, children: [
|
|
99
99
|
/* @__PURE__ */ o.jsx(t, { variant: "subtitle2", children: r.name }),
|
|
100
100
|
/* @__PURE__ */ o.jsx(t, { color: "text.secondary", variant: "body2", children: R(r.size) })
|
|
101
101
|
] }),
|
|
102
|
-
/* @__PURE__ */ o.jsx(
|
|
102
|
+
/* @__PURE__ */ o.jsx(v, { title: "Remove", children: /* @__PURE__ */ o.jsx(
|
|
103
103
|
y,
|
|
104
104
|
{
|
|
105
105
|
onClick: () => {
|
|
@@ -15,23 +15,23 @@ class U {
|
|
|
15
15
|
counterStep;
|
|
16
16
|
isReverse;
|
|
17
17
|
isShimmer;
|
|
18
|
-
constructor(
|
|
19
|
-
this.x =
|
|
18
|
+
constructor(a, f, h, d, M, b, g) {
|
|
19
|
+
this.x = a, this.y = f, this.color = h, this.speed = (Math.random() * 0.8 + 0.1) * d, this.size = 0, this.sizeStep = Math.random() * 0.4, this.minSize = 0.5, this.maxSize = g, this.delay = M, this.counter = 0, this.counterStep = b, this.isReverse = !1, this.isShimmer = !1;
|
|
20
20
|
}
|
|
21
|
-
update(
|
|
22
|
-
return
|
|
21
|
+
update(a) {
|
|
22
|
+
return a ? this.counter < this.delay ? (this.counter += this.counterStep, !0) : (this.isShimmer ? this.isReverse ? (this.size -= this.speed, this.size <= this.minSize && (this.size = this.minSize, this.isReverse = !1)) : (this.size += this.speed, this.size >= this.maxSize && (this.size = this.maxSize, this.isReverse = !0)) : this.size < this.maxSize ? this.size += this.sizeStep : this.isShimmer = !0, !0) : (this.isShimmer = !1, this.counter = 0, this.size > 0 ? (this.size -= 0.1, !0) : !1);
|
|
23
23
|
}
|
|
24
|
-
draw(
|
|
25
|
-
const
|
|
26
|
-
|
|
24
|
+
draw(a, f) {
|
|
25
|
+
const h = (f - this.size) * 0.5;
|
|
26
|
+
a.fillRect(this.x + h, this.y + h, this.size, this.size);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
const Z = Q(
|
|
30
30
|
({
|
|
31
31
|
gap: n = 5,
|
|
32
|
-
speed:
|
|
32
|
+
speed: a = 100,
|
|
33
33
|
colors: f = [E[400], E[500], E[600]],
|
|
34
|
-
loading:
|
|
34
|
+
loading: h = !0,
|
|
35
35
|
src: d,
|
|
36
36
|
alt: M = "",
|
|
37
37
|
style: b,
|
|
@@ -43,32 +43,32 @@ const Z = Q(
|
|
|
43
43
|
N(() => {
|
|
44
44
|
j.current = typeof window < "u" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1;
|
|
45
45
|
}, []);
|
|
46
|
-
const O = y((e,
|
|
47
|
-
const t = e -
|
|
46
|
+
const O = y((e, r, c, s) => {
|
|
47
|
+
const t = e - c, i = r - s;
|
|
48
48
|
return t * t + i * i;
|
|
49
49
|
}, []), V = y(
|
|
50
|
-
(e,
|
|
50
|
+
(e, r, c) => {
|
|
51
51
|
l.current && cancelAnimationFrame(l.current), P.current = performance.now();
|
|
52
52
|
const s = () => {
|
|
53
53
|
l.current = requestAnimationFrame(s);
|
|
54
54
|
const t = performance.now(), i = t - P.current;
|
|
55
55
|
if (i < I.current) return;
|
|
56
|
-
P.current = t - i % I.current, e.clearRect(0, 0,
|
|
57
|
-
let
|
|
56
|
+
P.current = t - i % I.current, e.clearRect(0, 0, r, c);
|
|
57
|
+
let o = !1;
|
|
58
58
|
m.current.forEach((x, F) => {
|
|
59
59
|
e.fillStyle = F;
|
|
60
60
|
for (const S of x)
|
|
61
|
-
S.update(
|
|
62
|
-
}), !
|
|
61
|
+
S.update(h) && (S.draw(e, n), o = !0);
|
|
62
|
+
}), !h && !o && l.current && (cancelAnimationFrame(l.current), l.current = null);
|
|
63
63
|
};
|
|
64
64
|
s();
|
|
65
65
|
},
|
|
66
|
-
[
|
|
66
|
+
[h, n]
|
|
67
67
|
), X = y(() => {
|
|
68
|
-
const e = C.current,
|
|
69
|
-
if (!e || !
|
|
68
|
+
const e = C.current, r = e?.getContext("2d");
|
|
69
|
+
if (!e || !r) return;
|
|
70
70
|
m.current = /* @__PURE__ */ new Map();
|
|
71
|
-
const
|
|
71
|
+
const c = j.current ? 0 : Math.max(0, Math.min(100, a)) * 1e-3, s = window.devicePixelRatio ?? 1, t = e.width / s, i = e.height / s, o = 2, x = 0.5, F = (t + i) * 0.01, S = t % n / 2, Y = i % n / 2;
|
|
72
72
|
for (let w = S; w < t; w += n)
|
|
73
73
|
for (let v = Y; v < i; v += n) {
|
|
74
74
|
const R = f[Math.floor(Math.random() * f.length)];
|
|
@@ -77,17 +77,17 @@ const Z = Q(
|
|
|
77
77
|
const W = w + n / 2, G = v + n / 2, J = t / 2, K = i / 2;
|
|
78
78
|
B = Math.sqrt(O(W, G, J, K));
|
|
79
79
|
}
|
|
80
|
-
const H = Math.random() * 4 + F, L = Math.random() * (
|
|
80
|
+
const H = Math.random() * 4 + F, L = Math.random() * (o - x) + x, T = new U(w, v, R, c, B, H, L);
|
|
81
81
|
m.current.has(R) || m.current.set(R, []), m.current.get(R).push(T);
|
|
82
82
|
}
|
|
83
|
-
V(
|
|
84
|
-
}, [n,
|
|
85
|
-
const e = C.current,
|
|
86
|
-
if (!e || !
|
|
87
|
-
const s =
|
|
83
|
+
V(r, t, i);
|
|
84
|
+
}, [n, a, f, k, O, V]), A = y(() => {
|
|
85
|
+
const e = C.current, r = z.current, c = e?.getContext("2d");
|
|
86
|
+
if (!e || !r || !c) return;
|
|
87
|
+
const s = r.getBoundingClientRect();
|
|
88
88
|
if (s.width === 0 || s.height === 0) return;
|
|
89
|
-
const t = Math.floor(s.width), i = Math.floor(s.height),
|
|
90
|
-
e.width = t *
|
|
89
|
+
const t = Math.floor(s.width), i = Math.floor(s.height), o = window.devicePixelRatio ?? 1;
|
|
90
|
+
e.width = t * o, e.height = i * o, e.style.width = `${t}px`, e.style.height = `${i}px`, c.setTransform(1, 0, 0, 1, 0, 0), c.scale(o, o), X();
|
|
91
91
|
}, [X]);
|
|
92
92
|
return N(() => {
|
|
93
93
|
A();
|
|
@@ -7,7 +7,7 @@ import Z from "../s-lazy-image/s-lazy-image.js";
|
|
|
7
7
|
import { SRating as _ } from "../s-rating/s-rating.js";
|
|
8
8
|
import { SSkeleton as n } from "../s-skeleton/s-skeleton.js";
|
|
9
9
|
import { c as T } from "../createSvgIcon-BkbeLOhM.js";
|
|
10
|
-
import { g as ee } from "../utils-
|
|
10
|
+
import { g as ee } from "../utils-D1UMIV0b.js";
|
|
11
11
|
const te = T(/* @__PURE__ */ e.jsx("path", {
|
|
12
12
|
d: "M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2m4 0v12h4V3z"
|
|
13
13
|
}), "ThumbDown"), se = T(/* @__PURE__ */ e.jsx("path", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as r } from "../jsx-runtime-tc70JA_2.js";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import { Snackbar as
|
|
3
|
+
import { Snackbar as k, Alert as h } from "@mui/material";
|
|
4
4
|
import { useDialog as x } from "../hooks/use-dialog.js";
|
|
5
5
|
const c = ({
|
|
6
6
|
message: s,
|
|
@@ -10,7 +10,7 @@ const c = ({
|
|
|
10
10
|
snackbarProps: t,
|
|
11
11
|
alertProps: o
|
|
12
12
|
}) => /* @__PURE__ */ r.jsx(
|
|
13
|
-
|
|
13
|
+
k,
|
|
14
14
|
{
|
|
15
15
|
open: n,
|
|
16
16
|
autoHideDuration: 1e4,
|
|
@@ -21,21 +21,21 @@ const c = ({
|
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
c.displayName = "SSnackbarMessage";
|
|
24
|
-
const
|
|
24
|
+
const i = a.createContext(null), j = ({ children: s }) => {
|
|
25
25
|
const e = x(), [n, t] = a.useState({
|
|
26
26
|
message: ""
|
|
27
|
-
}), [o,
|
|
28
|
-
|
|
29
|
-
({ snackbarMessageOptions: d, snackbarProps:
|
|
30
|
-
const { message:
|
|
31
|
-
t({ message:
|
|
27
|
+
}), [o, l] = a.useState({}), [p, u] = a.useState({}), g = a.useMemo(
|
|
28
|
+
() => ({
|
|
29
|
+
handleOpen: ({ snackbarMessageOptions: d, snackbarProps: m = {}, alertProps: b = {} }) => {
|
|
30
|
+
const { message: S } = d || { message: "" };
|
|
31
|
+
t({ message: S }), l(m), u(b), e.handleOpen();
|
|
32
32
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return /* @__PURE__ */ r.jsxs(
|
|
33
|
+
handleClose: e.handleClose,
|
|
34
|
+
open: e.open
|
|
35
|
+
}),
|
|
36
|
+
[e]
|
|
37
|
+
);
|
|
38
|
+
return /* @__PURE__ */ r.jsxs(i.Provider, { value: g, children: [
|
|
39
39
|
/* @__PURE__ */ r.jsx(
|
|
40
40
|
c,
|
|
41
41
|
{
|
|
@@ -48,15 +48,15 @@ const l = a.createContext(null), C = ({ children: s }) => {
|
|
|
48
48
|
),
|
|
49
49
|
s
|
|
50
50
|
] });
|
|
51
|
-
},
|
|
52
|
-
const s = a.useContext(
|
|
51
|
+
}, v = () => {
|
|
52
|
+
const s = a.useContext(i);
|
|
53
53
|
if (!s)
|
|
54
54
|
throw new Error("useSnackbarMessage must be used within a SnackbarMessageProvider");
|
|
55
55
|
return s;
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
58
58
|
c as SSnackbarMessage,
|
|
59
|
-
|
|
59
|
+
j as SnackbarMessageProvider,
|
|
60
60
|
c as default,
|
|
61
|
-
|
|
61
|
+
v as useSnackbarMessage
|
|
62
62
|
};
|
package/dist/utils/index.d.ts
CHANGED