@arthurzakharov/ui-kit 1.6.0 → 1.6.1
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Button_loflo_1{position:relative;box-sizing:border-box;border:none;display:flex;flex-direction:column;align-items:center;justify-content:center;transition:border-color var(--rm-ui-amimation-speed-primary) var(--rm-ui-amimation-cubic-primary),background-color var(--rm-ui-amimation-speed-primary) var(--rm-ui-amimation-cubic-primary)}._SM_loflo_14{border-radius:var(--rm-ui-border-radius-sm);padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm)}._LG_loflo_19._Tertiary_loflo_19{padding:calc(var(--rm-ui-padding-xs) - 1px) calc(var(--rm-ui-padding-sm) - 1px)}._SM_loflo_14 ._Text_loflo_23{font-weight:var(--rm-ui-font-weight-regular);font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._MD_loflo_29{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-sm) var(--rm-ui-padding-lg)}._MD_loflo_29._Tertiary_loflo_19{padding:calc(var(--rm-ui-padding-sm) - 1px) calc(var(--rm-ui-padding-lg) - 1px)}._LG_loflo_19{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-sm) var(--rm-ui-padding-lg)}._LG_loflo_19._Tertiary_loflo_19{padding:calc(var(--rm-ui-padding-sm) - 1px) calc(var(--rm-ui-padding-lg) - 1px)}._MD_loflo_29 ._Text_loflo_23{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._LG_loflo_19 ._Text_loflo_23{font-size:var(--rm-ui-font-size-body-large);line-height:var(--rm-ui-line-height-body-large)}._Primary_loflo_57{background-color:var(--rm-ui-next-btn-bg)}._Primary_loflo_57:hover{background-color:var(--rm-ui-next-btn-bg-hover)}._Primary_loflo_57 ._Text_loflo_23,._Primary_loflo_57 ._Info_loflo_66{color:#fff}._Secondary_loflo_70{border:1px solid transparent;background-color:transparent}._Secondary_loflo_70:hover{border-color:var(--rm-ui-grey-400)}._Secondary_loflo_70:hover ._Text_loflo_23{color:var(--rm-ui-grey-400);border-color:var(--rm-ui-grey-400)}._Secondary_loflo_70 ._Text_loflo_23,._Secondary_loflo_70 ._Info_loflo_66{color:var(--rm-ui-color-text-secondary)}._Tertiary_loflo_19{border:1px solid var(--rm-ui-grey-300);background-color:transparent}._Tertiary_loflo_19:hover{border-color:var(--rm-ui-grey-200)}._Tertiary_loflo_19:hover ._Text_loflo_23{color:var(--rm-ui-grey-700)}._Tertiary_loflo_19 ._Text_loflo_23,._Tertiary_loflo_19 ._Info_loflo_66{color:var(--rm-ui-color-text-primary)}._Button_loflo_1:not(._Loading_loflo_106):not(:disabled):hover{cursor:pointer}._Button_loflo_1:focus{outline-color:var(--rm-ui-color-focus)}._FullWidth_loflo_114{width:100%}._Content_loflo_118{display:flex;flex-direction:column}._Info_loflo_66{flex-basis:100%;font-weight:var(--rm-ui-font-weight-regular);font-size:var(--rm-ui-font-size-body-small);line-height:calc(var(--rm-ui-line-height-body-small) - 2px)}._Text_loflo_23{font-weight:var(--rm-ui-font-weight-medium);transition:color var(--rm-ui-amimation-speed-primary) var(--rm-ui-amimation-cubic-primary)}._Loader_loflo_135{position:absolute;display:flex}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { FadeScale as
|
|
4
|
-
import { Loader as
|
|
5
|
-
import { Content as
|
|
6
|
-
import { withControl as
|
|
7
|
-
import '../../../assets/button-
|
|
8
|
-
Button:
|
|
9
|
-
SM:
|
|
10
|
-
LG:
|
|
11
|
-
Tertiary:
|
|
12
|
-
Text:
|
|
13
|
-
MD:
|
|
14
|
-
Primary:
|
|
15
|
-
Info:
|
|
16
|
-
Secondary:
|
|
17
|
-
Loading:
|
|
18
|
-
FullWidth:
|
|
19
|
-
Content:
|
|
20
|
-
Loader:
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import x from "clsx";
|
|
3
|
+
import { FadeScale as s } from "../../../animations/fade-scale/fade-scale.component.js";
|
|
4
|
+
import { Loader as M } from "../../../components/loader/loader.component.js";
|
|
5
|
+
import { Content as S } from "../../../utils/content/content.component.js";
|
|
6
|
+
import { withControl as C, baseProps as c } from "../../../utils/functions/functions.util.js";
|
|
7
|
+
import '../../../assets/button-u01No9xq.css';const T = "_Button_loflo_1", B = "_SM_loflo_14", F = "_LG_loflo_19", N = "_Tertiary_loflo_19", b = "_Text_loflo_23", P = "_MD_loflo_29", D = "_Primary_loflo_57", G = "_Info_loflo_66", I = "_Secondary_loflo_70", W = "_Loading_loflo_106", w = "_FullWidth_loflo_114", $ = "_Content_loflo_118", g = "_Loader_loflo_135", o = {
|
|
8
|
+
Button: T,
|
|
9
|
+
SM: B,
|
|
10
|
+
LG: F,
|
|
11
|
+
Tertiary: N,
|
|
12
|
+
Text: b,
|
|
13
|
+
MD: P,
|
|
14
|
+
Primary: D,
|
|
15
|
+
Info: G,
|
|
16
|
+
Secondary: I,
|
|
17
|
+
Loading: W,
|
|
18
|
+
FullWidth: w,
|
|
19
|
+
Content: $,
|
|
20
|
+
Loader: g
|
|
21
21
|
}, H = ({
|
|
22
|
-
text:
|
|
23
|
-
color:
|
|
22
|
+
text: i,
|
|
23
|
+
color: t = "primary",
|
|
24
24
|
size: e = "md",
|
|
25
|
-
type:
|
|
26
|
-
disabled:
|
|
27
|
-
info:
|
|
28
|
-
fullWidth:
|
|
29
|
-
loading:
|
|
30
|
-
preventDefault:
|
|
31
|
-
blurAfterClick:
|
|
25
|
+
type: _ = "button",
|
|
26
|
+
disabled: d = !1,
|
|
27
|
+
info: m = "",
|
|
28
|
+
fullWidth: f = !1,
|
|
29
|
+
loading: n = !1,
|
|
30
|
+
preventDefault: y = !1,
|
|
31
|
+
blurAfterClick: u = !1,
|
|
32
32
|
onClick: p = () => {
|
|
33
33
|
},
|
|
34
34
|
onFocus: L,
|
|
35
|
-
onBlur:
|
|
35
|
+
onBlur: h,
|
|
36
36
|
...a
|
|
37
|
-
}) => /* @__PURE__ */
|
|
37
|
+
}) => /* @__PURE__ */ l(
|
|
38
38
|
"button",
|
|
39
39
|
{
|
|
40
40
|
"data-testid": c(a, "data-testid", "button"),
|
|
41
|
-
type:
|
|
42
|
-
disabled:
|
|
43
|
-
className:
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
41
|
+
type: _,
|
|
42
|
+
disabled: d || n,
|
|
43
|
+
className: x(o.Button, c(a, "className"), {
|
|
44
|
+
[o.SM]: e === "sm",
|
|
45
|
+
[o.MD]: e === "md",
|
|
46
|
+
[o.LG]: e === "lg",
|
|
47
|
+
[o.Primary]: t === "primary",
|
|
48
|
+
[o.Secondary]: t === "secondary",
|
|
49
|
+
[o.Tertiary]: t === "tertiary",
|
|
50
|
+
[o.FullWidth]: f,
|
|
51
|
+
[o.Loading]: n
|
|
52
52
|
}),
|
|
53
|
-
onClick:
|
|
53
|
+
onClick: C(p, { prevent: y, blur: u }),
|
|
54
54
|
onFocus: () => L?.(),
|
|
55
|
-
onBlur: () =>
|
|
55
|
+
onBlur: () => h?.(),
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */ r(
|
|
58
|
-
|
|
57
|
+
/* @__PURE__ */ r(s, { name: "loader", condition: n, className: o.Loader, children: /* @__PURE__ */ r(
|
|
58
|
+
M,
|
|
59
59
|
{
|
|
60
60
|
size: "xs",
|
|
61
61
|
color: (() => {
|
|
62
|
-
switch (
|
|
62
|
+
switch (t) {
|
|
63
63
|
case "primary":
|
|
64
64
|
return "white";
|
|
65
65
|
case "secondary":
|
|
@@ -70,9 +70,9 @@ import '../../../assets/button-BEelW-t0.css';const C = "_Button_1l8qm_1", T = "_
|
|
|
70
70
|
})()
|
|
71
71
|
}
|
|
72
72
|
) }),
|
|
73
|
-
/* @__PURE__ */ s
|
|
74
|
-
/* @__PURE__ */ r("span", { className:
|
|
75
|
-
/* @__PURE__ */ r(
|
|
73
|
+
/* @__PURE__ */ l(s, { name: "content", keepMount: !0, condition: !n, className: o.Content, children: [
|
|
74
|
+
/* @__PURE__ */ r("span", { className: o.Text, children: i }),
|
|
75
|
+
/* @__PURE__ */ r(S, { className: o.Info, children: m })
|
|
76
76
|
] })
|
|
77
77
|
]
|
|
78
78
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._Button_1l8qm_1{position:relative;box-sizing:border-box;border:none;display:flex;flex-direction:column;align-items:center;justify-content:center;transform:border-color ease-in-out var(--rm-ui-amimation-speed-primary),background-color ease-in-out var(--rm-ui-amimation-speed-primary)}._SM_1l8qm_14{border-radius:var(--rm-ui-border-radius-sm);padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm)}._LG_1l8qm_19._Tertiary_1l8qm_19{padding:calc(var(--rm-ui-padding-xs) - 1px) calc(var(--rm-ui-padding-sm) - 1px)}._SM_1l8qm_14 ._Text_1l8qm_23{font-weight:var(--rm-ui-font-weight-regular);font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._MD_1l8qm_29{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-sm) var(--rm-ui-padding-lg)}._MD_1l8qm_29._Tertiary_1l8qm_19{padding:calc(var(--rm-ui-padding-sm) - 1px) calc(var(--rm-ui-padding-lg) - 1px)}._LG_1l8qm_19{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-sm) var(--rm-ui-padding-lg)}._LG_1l8qm_19._Tertiary_1l8qm_19{padding:calc(var(--rm-ui-padding-sm) - 1px) calc(var(--rm-ui-padding-lg) - 1px)}._MD_1l8qm_29 ._Text_1l8qm_23{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._LG_1l8qm_19 ._Text_1l8qm_23{font-size:var(--rm-ui-font-size-body-large);line-height:var(--rm-ui-line-height-body-large)}._Primary_1l8qm_57{background-color:var(--rm-ui-next-btn-bg)}._Primary_1l8qm_57:hover{background-color:var(--rm-ui-next-btn-bg-hover)}._Primary_1l8qm_57 ._Text_1l8qm_23,._Primary_1l8qm_57 ._Info_1l8qm_66{color:#fff}._Secondary_1l8qm_70{border:1px solid transparent;background-color:transparent}._Secondary_1l8qm_70:hover{border-color:var(--rm-ui-grey-400)}._Secondary_1l8qm_70:hover ._Text_1l8qm_23{color:var(--rm-ui-grey-400);border-color:var(--rm-ui-grey-400)}._Secondary_1l8qm_70 ._Text_1l8qm_23,._Secondary_1l8qm_70 ._Info_1l8qm_66{color:var(--rm-ui-color-text-secondary)}._Tertiary_1l8qm_19{border:1px solid var(--rm-ui-grey-300);background-color:transparent}._Tertiary_1l8qm_19:hover{border-color:var(--rm-ui-grey-200)}._Tertiary_1l8qm_19:hover ._Text_1l8qm_23{color:var(--rm-ui-grey-700)}._Tertiary_1l8qm_19 ._Text_1l8qm_23,._Tertiary_1l8qm_19 ._Info_1l8qm_66{color:var(--rm-ui-color-text-primary)}._Button_1l8qm_1:not(._Loading_1l8qm_106):not(:disabled):hover{cursor:pointer}._Button_1l8qm_1:focus{outline-color:var(--rm-ui-color-focus)}._FullWidth_1l8qm_114{width:100%}._Content_1l8qm_118{display:flex;flex-direction:column}._Info_1l8qm_66{flex-basis:100%;font-weight:var(--rm-ui-font-weight-regular);font-size:var(--rm-ui-font-size-body-small);line-height:calc(var(--rm-ui-line-height-body-small) - 2px)}._Text_1l8qm_23{font-weight:var(--rm-ui-font-weight-medium);transform:color ease-in-out var(--rm-ui-amimation-speed-primary)}._Loader_1l8qm_135{position:absolute;display:flex}
|