@solostylist/ui-kit 1.0.18 → 1.0.19
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.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
}
|
|
2
|
+
import { default as ImageGallery } from 'react-image-gallery';
|
|
3
|
+
export type SImageGalleryProps = React.ComponentProps<typeof ImageGallery>;
|
|
5
4
|
declare const SImageGallery: ({ ...props }: SImageGalleryProps) => React.JSX.Element;
|
|
6
5
|
export default SImageGallery;
|
|
@@ -13,7 +13,7 @@ export interface SnackbarMessageOpenOptions {
|
|
|
13
13
|
message: string;
|
|
14
14
|
}
|
|
15
15
|
export interface SnackbarMessageContextProps {
|
|
16
|
-
handleOpen: (snackbarMessageOptions: SnackbarMessageOpenOptions) => void;
|
|
16
|
+
handleOpen: (snackbarMessageOptions: SnackbarMessageOpenOptions, snackbarProps?: SnackbarProps, alertProps?: AlertProps) => void;
|
|
17
17
|
handleClose: () => void;
|
|
18
18
|
open: boolean;
|
|
19
19
|
}
|
|
@@ -1,50 +1,59 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import * as
|
|
3
|
-
import { Snackbar as
|
|
4
|
-
import { useDialog as
|
|
5
|
-
const
|
|
1
|
+
import { j as t } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { Snackbar as S, Alert as b } from "@mui/material";
|
|
4
|
+
import { useDialog as x } from "../hooks/use-dialog.js";
|
|
5
|
+
const k = ({
|
|
6
6
|
message: s,
|
|
7
7
|
onClose: e = () => {
|
|
8
8
|
},
|
|
9
|
-
open:
|
|
10
|
-
snackbarProps:
|
|
9
|
+
open: r = !1,
|
|
10
|
+
snackbarProps: n,
|
|
11
11
|
alertProps: o
|
|
12
|
-
}) => /* @__PURE__ */
|
|
13
|
-
|
|
12
|
+
}) => /* @__PURE__ */ t.jsx(
|
|
13
|
+
S,
|
|
14
14
|
{
|
|
15
|
-
open:
|
|
15
|
+
open: r,
|
|
16
16
|
autoHideDuration: 1e4,
|
|
17
17
|
onClose: e,
|
|
18
18
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
19
|
-
...
|
|
20
|
-
children: /* @__PURE__ */
|
|
19
|
+
...n,
|
|
20
|
+
children: /* @__PURE__ */ t.jsx(b, { onClose: e, severity: "error", sx: { width: "100%" }, ...o, children: s })
|
|
21
21
|
}
|
|
22
|
-
), c =
|
|
23
|
-
const e =
|
|
22
|
+
), c = a.createContext(null), P = ({ children: s }) => {
|
|
23
|
+
const e = x(), [r, n] = a.useState({
|
|
24
24
|
message: ""
|
|
25
|
-
}), o = {
|
|
26
|
-
handleOpen:
|
|
27
|
-
(
|
|
28
|
-
const { message:
|
|
29
|
-
|
|
25
|
+
}), [o, l] = a.useState({}), [i, u] = a.useState({}), p = {
|
|
26
|
+
handleOpen: a.useCallback(
|
|
27
|
+
(d, g = {}, m = {}) => {
|
|
28
|
+
const { message: h } = d;
|
|
29
|
+
n({ message: h }), l(g), u(m), e.handleOpen();
|
|
30
30
|
},
|
|
31
31
|
[e]
|
|
32
32
|
),
|
|
33
33
|
handleClose: e.handleClose,
|
|
34
34
|
open: e.open
|
|
35
35
|
};
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ t.jsxs(c.Provider, { value: p, children: [
|
|
37
|
+
/* @__PURE__ */ t.jsx(
|
|
38
|
+
k,
|
|
39
|
+
{
|
|
40
|
+
open: e.open,
|
|
41
|
+
message: r == null ? void 0 : r.message,
|
|
42
|
+
onClose: e.handleClose,
|
|
43
|
+
snackbarProps: o,
|
|
44
|
+
alertProps: i
|
|
45
|
+
}
|
|
46
|
+
),
|
|
38
47
|
s
|
|
39
48
|
] });
|
|
40
|
-
},
|
|
41
|
-
const s =
|
|
49
|
+
}, j = () => {
|
|
50
|
+
const s = a.useContext(c);
|
|
42
51
|
if (!s)
|
|
43
52
|
throw new Error("useSnackbarMessage must be used within a SnackbarMessageProvider");
|
|
44
53
|
return s;
|
|
45
54
|
};
|
|
46
55
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
56
|
+
P as SnackbarMessageProvider,
|
|
57
|
+
k as default,
|
|
58
|
+
j as useSnackbarMessage
|
|
50
59
|
};
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import { TextField as x } from "@mui/material";
|
|
1
|
+
import { j as r } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { TextField as m } from "@mui/material";
|
|
4
3
|
import d from "../s-form/s-form.js";
|
|
5
|
-
const
|
|
6
|
-
label:
|
|
7
|
-
required:
|
|
4
|
+
const u = ({
|
|
5
|
+
label: i = "",
|
|
6
|
+
required: o = !1,
|
|
8
7
|
error: t,
|
|
9
|
-
type:
|
|
10
|
-
htmlFor:
|
|
11
|
-
...
|
|
12
|
-
}) => {
|
|
13
|
-
const [f, m] = o(e.value ?? "");
|
|
14
|
-
return s(() => {
|
|
15
|
-
m(e.value ?? "");
|
|
16
|
-
}, [e.value]), /* @__PURE__ */ l.jsx(d, { label: a, error: t, required: r, htmlFor: u, children: /* @__PURE__ */ l.jsx(x, { fullWidth: !0, type: i, id: u, error: !!t, ...e, value: f ?? "" }) });
|
|
17
|
-
};
|
|
8
|
+
type: s = "text",
|
|
9
|
+
htmlFor: e,
|
|
10
|
+
...x
|
|
11
|
+
}) => /* @__PURE__ */ r.jsx(d, { label: i, error: t, required: o, htmlFor: e, children: /* @__PURE__ */ r.jsx(m, { fullWidth: !0, type: s, id: e, error: !!t, ...x }) });
|
|
18
12
|
export {
|
|
19
|
-
|
|
13
|
+
u as default
|
|
20
14
|
};
|