stone-kit 0.0.769 → 0.0.771
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,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n, jsxs as m, Fragment as r } from "react/jsx-runtime";
|
|
2
2
|
import { c as g } from "../../../index-rKuIKazb.js";
|
|
3
3
|
import { NewIcon as k } from "../../NewIcon/ui/NewIcon.js";
|
|
4
|
-
const w = "_btnCommon_ty9np_1", f = "_btnLoading_ty9np_20", C = "_isHidden_ty9np_24", N = "_blue_ty9np_68", v = "_lightBlue_ty9np_82", H = "_sokolniki_ty9np_97", S = "_black_ty9np_111", B = "_gray_ty9np_125", L = "_whiteStroke_ty9np_139", $ = "_whiteFilled_ty9np_151", x = "_shade_ty9np_165", F = "_transparent_ty9np_171", j = "_volodiyaLight_ty9np_192", I = "_loader_ty9np_198", q = "_LoaderSpin_ty9np_1",
|
|
4
|
+
const w = "_btnCommon_ty9np_1", f = "_btnLoading_ty9np_20", C = "_isHidden_ty9np_24", N = "_blue_ty9np_68", v = "_lightBlue_ty9np_82", H = "_sokolniki_ty9np_97", S = "_black_ty9np_111", B = "_gray_ty9np_125", L = "_whiteStroke_ty9np_139", $ = "_whiteFilled_ty9np_151", x = "_shade_ty9np_165", F = "_transparent_ty9np_171", j = "_volodiyaLight_ty9np_192", I = "_loader_ty9np_198", q = "_LoaderSpin_ty9np_1", e = {
|
|
5
5
|
btnCommon: w,
|
|
6
6
|
btnLoading: f,
|
|
7
7
|
isHidden: C,
|
|
@@ -31,63 +31,63 @@ const w = "_btnCommon_ty9np_1", f = "_btnLoading_ty9np_20", C = "_isHidden_ty9np
|
|
|
31
31
|
"small-size_l": "_small-size_l_ty9np_241",
|
|
32
32
|
"medium-size_l": "_medium-size_l_ty9np_248",
|
|
33
33
|
"large-size_l": "_large-size_l_ty9np_255"
|
|
34
|
-
},
|
|
34
|
+
}, i = g.bind(e), G = ({
|
|
35
35
|
size: y = "medium",
|
|
36
36
|
size_m: c,
|
|
37
|
-
size_l:
|
|
38
|
-
onCLick:
|
|
39
|
-
pre:
|
|
40
|
-
children:
|
|
37
|
+
size_l: z,
|
|
38
|
+
onCLick: a,
|
|
39
|
+
pre: l = !1,
|
|
40
|
+
children: p = "",
|
|
41
41
|
post: s = !1,
|
|
42
42
|
variant: h = "blue",
|
|
43
43
|
width: u = "auto",
|
|
44
44
|
additionalClass: b = "",
|
|
45
|
-
isLoading:
|
|
46
|
-
...
|
|
45
|
+
isLoading: t = !1,
|
|
46
|
+
..._
|
|
47
47
|
}) => {
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
{ [
|
|
55
|
-
{ [
|
|
56
|
-
|
|
48
|
+
const o = i(
|
|
49
|
+
e.btnCommon,
|
|
50
|
+
e[`${y}-size`],
|
|
51
|
+
e[`${c}-size_m`],
|
|
52
|
+
e[`${z}-size_l`],
|
|
53
|
+
e[`${h}`],
|
|
54
|
+
{ [e.btnLoading]: t },
|
|
55
|
+
{ [e.btnCommonInline]: l || s },
|
|
56
|
+
e[`${u}-width`],
|
|
57
57
|
b
|
|
58
58
|
), d = () => /* @__PURE__ */ m(r, { children: [
|
|
59
|
-
|
|
59
|
+
t && /* @__PURE__ */ n(
|
|
60
60
|
k,
|
|
61
61
|
{
|
|
62
62
|
name: "loader",
|
|
63
63
|
size: "24",
|
|
64
64
|
color: "currentColor",
|
|
65
|
-
additionalClass:
|
|
65
|
+
additionalClass: e.loader
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
68
|
/* @__PURE__ */ m(r, { children: [
|
|
69
|
-
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
s && /* @__PURE__ */
|
|
69
|
+
l && /* @__PURE__ */ n("div", { className: i({ [e.isHidden]: t }), children: l }),
|
|
70
|
+
/* @__PURE__ */ n("div", { className: i({ [e.isHidden]: t }), children: p }),
|
|
71
|
+
s && /* @__PURE__ */ n("div", { className: i({ [e.isHidden]: t }), children: s })
|
|
72
72
|
] })
|
|
73
73
|
] });
|
|
74
|
-
return
|
|
74
|
+
return _.as === "link" ? (delete _.as, /* @__PURE__ */ n(
|
|
75
75
|
"a",
|
|
76
76
|
{
|
|
77
|
-
className:
|
|
78
|
-
onClick:
|
|
79
|
-
...
|
|
77
|
+
className: o,
|
|
78
|
+
onClick: a,
|
|
79
|
+
..._,
|
|
80
80
|
children: d()
|
|
81
81
|
}
|
|
82
|
-
) : /* @__PURE__ */
|
|
82
|
+
)) : (delete _.as, /* @__PURE__ */ n(
|
|
83
83
|
"button",
|
|
84
84
|
{
|
|
85
|
-
className:
|
|
86
|
-
onClick:
|
|
87
|
-
...
|
|
85
|
+
className: o,
|
|
86
|
+
onClick: a,
|
|
87
|
+
..._,
|
|
88
88
|
children: d()
|
|
89
89
|
}
|
|
90
|
-
);
|
|
90
|
+
));
|
|
91
91
|
};
|
|
92
92
|
export {
|
|
93
93
|
G as Button
|
|
@@ -26,12 +26,12 @@ interface ButtonProps {
|
|
|
26
26
|
width?: btnWidth;
|
|
27
27
|
additionalClass?: string;
|
|
28
28
|
isLoading?: boolean;
|
|
29
|
-
as
|
|
30
|
-
onCLick?: () =>
|
|
29
|
+
as?: 'button' | 'link';
|
|
30
|
+
onCLick?: () => any;
|
|
31
31
|
}
|
|
32
32
|
export type ComponentProps = ButtonProps & ((React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
33
|
-
as
|
|
33
|
+
as?: 'button';
|
|
34
34
|
}) | (React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
35
|
-
as
|
|
35
|
+
as?: 'link';
|
|
36
36
|
} & Required<Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>>));
|
|
37
37
|
export {};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsxs as $, jsx as
|
|
1
|
+
import { jsxs as $, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as N } from "react";
|
|
3
|
-
import { createPortal as
|
|
4
|
-
const
|
|
5
|
-
root:
|
|
3
|
+
import { createPortal as C } from "react-dom";
|
|
4
|
+
const w = "_root_1k6wm_1", L = "_modalBody_1k6wm_15", x = "_modalOverlay_1k6wm_19", T = "_isTransparentBack_1k6wm_31", s = {
|
|
5
|
+
root: w,
|
|
6
6
|
modalBody: L,
|
|
7
|
-
modalOverlay:
|
|
8
|
-
isTransparentBack:
|
|
7
|
+
modalOverlay: x,
|
|
8
|
+
isTransparentBack: T
|
|
9
9
|
}, h = ({
|
|
10
|
-
isOpen:
|
|
11
|
-
emitIsOpen:
|
|
12
|
-
isTransparentBack:
|
|
13
|
-
isClickOutside:
|
|
10
|
+
isOpen: d,
|
|
11
|
+
emitIsOpen: r,
|
|
12
|
+
isTransparentBack: l = !1,
|
|
13
|
+
isClickOutside: t = !0,
|
|
14
14
|
leaveDisableScroll: i = !1,
|
|
15
15
|
createPortalObj: o,
|
|
16
16
|
additionalClass: m,
|
|
17
17
|
additionalClassOverlay: c,
|
|
18
18
|
additionalClassModalBody: f,
|
|
19
19
|
opacity: u = 0.7,
|
|
20
|
-
colorOverlay:
|
|
20
|
+
colorOverlay: e,
|
|
21
21
|
notDisableScroll: y = !1,
|
|
22
22
|
children: _,
|
|
23
23
|
modalBodyRef: k,
|
|
24
24
|
additionalStylesModalBody: v
|
|
25
25
|
}) => {
|
|
26
26
|
const p = () => {
|
|
27
|
-
|
|
27
|
+
t && r(!1);
|
|
28
28
|
};
|
|
29
29
|
N(() => {
|
|
30
30
|
if (!y) {
|
|
31
|
-
if (
|
|
31
|
+
if (d) {
|
|
32
32
|
if (document.body.classList.contains("disable-scroll"))
|
|
33
33
|
return;
|
|
34
34
|
document.body.classList.add("disable-scroll");
|
|
@@ -39,25 +39,25 @@ const C = "_root_1k6wm_1", L = "_modalBody_1k6wm_15", b = "_modalOverlay_1k6wm_1
|
|
|
39
39
|
}
|
|
40
40
|
return () => document.body.classList.remove("disable-scroll");
|
|
41
41
|
}
|
|
42
|
-
}, [
|
|
43
|
-
const
|
|
42
|
+
}, [d]);
|
|
43
|
+
const a = /* @__PURE__ */ $(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
46
|
className: `${s.root} ${m}`,
|
|
47
47
|
onClick: (B) => B.stopPropagation(),
|
|
48
48
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ n(
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
52
|
onClick: p,
|
|
53
|
-
className: `${s.modalOverlay} ${c} ${
|
|
53
|
+
className: `${s.modalOverlay} ${c} ${l ? s.isTransparentBack : ""}`,
|
|
54
54
|
style: {
|
|
55
|
-
opacity:
|
|
56
|
-
backgroundColor:
|
|
55
|
+
opacity: l ? u : void 0,
|
|
56
|
+
backgroundColor: e || void 0
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ n(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
className: `${s.modalBody} ${f}`,
|
|
@@ -69,7 +69,7 @@ const C = "_root_1k6wm_1", L = "_modalBody_1k6wm_15", b = "_modalOverlay_1k6wm_1
|
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
);
|
|
72
|
-
return
|
|
72
|
+
return d ? o != null && o.domNode && o.domNode.isConnected ? C(a, o.domNode, o.key) : a : null;
|
|
73
73
|
};
|
|
74
74
|
export {
|
|
75
75
|
h as Modal
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const deepEqual: (obj1: Record<string, unknown>, obj2: Record<string, unknown>) => boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const f = (e, t) => {
|
|
2
|
+
if (e === t)
|
|
3
|
+
return !0;
|
|
4
|
+
if (e == null || typeof e != "object" || t == null || typeof t != "object")
|
|
5
|
+
return !1;
|
|
6
|
+
const r = Object.keys(e), s = Object.keys(t);
|
|
7
|
+
if (r.length !== s.length)
|
|
8
|
+
return !1;
|
|
9
|
+
for (const n of r)
|
|
10
|
+
if (!s.includes(n) || !f(e[n], t[n]))
|
|
11
|
+
return !1;
|
|
12
|
+
return !0;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
f as deepEqual
|
|
16
|
+
};
|