stone-kit 0.0.439 → 0.0.441
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,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ComponentProps } from './RoundButton.types';
|
|
3
3
|
|
|
4
|
-
export declare const RoundButton: ({ size, size_m, size_l, children, iconName, variant, additionalClass, deg, ...props }: React.PropsWithChildren<ComponentProps>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const RoundButton: ({ size, size_m, size_l, children, iconName, variant, additionalClass, additionalClassIcon, deg, ...props }: React.PropsWithChildren<ComponentProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as m, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { c as
|
|
4
|
-
import { NewIcon as
|
|
1
|
+
import { jsx as m, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { useState as k, useEffect as S } from "react";
|
|
3
|
+
import { c as y } from "../../../index-rKuIKazb.js";
|
|
4
|
+
import { NewIcon as R } from "../../NewIcon/ui/NewIcon.js";
|
|
5
5
|
import { sizeMap as s } from "./RoundButton.types.js";
|
|
6
|
-
const
|
|
7
|
-
btnRound:
|
|
6
|
+
const p = "_btnRound_1sthe_1", F = "_whiteStroke_1sthe_42", $ = "_blackFill_1sthe_50", e = {
|
|
7
|
+
btnRound: p,
|
|
8
8
|
"tiny-size": "_tiny-size_1sthe_19",
|
|
9
9
|
"small-size": "_small-size_1sthe_25",
|
|
10
10
|
"medium-size": "_medium-size_1sthe_30",
|
|
11
11
|
"large-size": "_large-size_1sthe_36",
|
|
12
|
-
whiteStroke:
|
|
13
|
-
blackFill:
|
|
12
|
+
whiteStroke: F,
|
|
13
|
+
blackFill: $,
|
|
14
14
|
"tiny-size_m": "_tiny-size_m_1sthe_59",
|
|
15
15
|
"small-size_m": "_small-size_m_1sthe_64",
|
|
16
16
|
"medium-size_m": "_medium-size_m_1sthe_68",
|
|
@@ -19,50 +19,52 @@ const R = "_btnRound_1sthe_1", p = "_whiteStroke_1sthe_42", F = "_blackFill_1sth
|
|
|
19
19
|
"small-size_l": "_small-size_l_1sthe_99",
|
|
20
20
|
"medium-size_l": "_medium-size_l_1sthe_103",
|
|
21
21
|
"large-size_l": "_large-size_l_1sthe_108"
|
|
22
|
-
},
|
|
22
|
+
}, v = y.bind(e), j = ({
|
|
23
23
|
size: _ = "small",
|
|
24
24
|
size_m: t,
|
|
25
25
|
size_l: i,
|
|
26
26
|
children: a = "",
|
|
27
27
|
iconName: o = "",
|
|
28
28
|
variant: z = "whiteStroke",
|
|
29
|
-
additionalClass:
|
|
29
|
+
additionalClass: d = "",
|
|
30
|
+
additionalClassIcon: h = "",
|
|
30
31
|
deg: c,
|
|
31
32
|
...r
|
|
32
33
|
}) => {
|
|
33
|
-
const [
|
|
34
|
-
return
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
34
|
+
const [u, w] = k(s.small), { color: b = "#141416" } = r;
|
|
35
|
+
return S(() => {
|
|
36
|
+
const l = () => {
|
|
37
|
+
const n = window.innerWidth, f = n > 1440 && i ? s[i] : n >= 1024 && n <= 1440 && t ? s[t] : s[_] || s.small;
|
|
38
|
+
w(f);
|
|
38
39
|
};
|
|
39
|
-
return window.addEventListener("resize",
|
|
40
|
-
window.removeEventListener("resize",
|
|
40
|
+
return window.addEventListener("resize", l), l(), () => {
|
|
41
|
+
window.removeEventListener("resize", l);
|
|
41
42
|
};
|
|
42
43
|
}, [_, t, i]), /* @__PURE__ */ m(
|
|
43
44
|
"button",
|
|
44
45
|
{
|
|
45
|
-
className:
|
|
46
|
+
className: v(
|
|
46
47
|
e.btnRound,
|
|
47
48
|
e[`${_}-size`],
|
|
48
49
|
e[`${t}-size_m`],
|
|
49
50
|
e[`${i}-size_l`],
|
|
50
51
|
e[`${z}`],
|
|
51
|
-
|
|
52
|
+
d
|
|
52
53
|
),
|
|
53
54
|
...r,
|
|
54
|
-
children: /* @__PURE__ */ m(
|
|
55
|
-
|
|
55
|
+
children: /* @__PURE__ */ m(g, { children: o ? /* @__PURE__ */ m(
|
|
56
|
+
R,
|
|
56
57
|
{
|
|
58
|
+
additionalClass: h,
|
|
57
59
|
name: o,
|
|
58
|
-
size:
|
|
60
|
+
size: u,
|
|
59
61
|
deg: c,
|
|
60
|
-
color:
|
|
62
|
+
color: b
|
|
61
63
|
}
|
|
62
64
|
) : a })
|
|
63
65
|
}
|
|
64
66
|
);
|
|
65
67
|
};
|
|
66
68
|
export {
|
|
67
|
-
|
|
69
|
+
j as RoundButton
|
|
68
70
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
2
3
|
declare const TAB_SWITCHER_VARIANTS: {
|
|
3
4
|
whiteRow: string;
|
|
4
5
|
grayRow: string;
|
|
@@ -12,6 +13,7 @@ export interface ITabSwitcherItem extends BaseInputProps {
|
|
|
12
13
|
width?: string;
|
|
13
14
|
width_m?: string;
|
|
14
15
|
width_l?: string;
|
|
16
|
+
children?: ReactNode;
|
|
15
17
|
}
|
|
16
18
|
export interface TabSwitcherProps {
|
|
17
19
|
variant?: TABS_VARIANTS;
|