@arthurzakharov/ui-kit 1.0.59 → 1.0.61
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/assets/button-text-B5BDeF9b.css +1 -0
- package/dist/assets/fade-scale-B23oZuuD.css +1 -0
- package/dist/components/animation/fade-scale/fade-scale.component.d.ts +1 -0
- package/dist/components/animation/fade-scale/fade-scale.component.js +22 -16
- package/dist/components/animation/fade-slide/fade-slide.component.d.ts +1 -0
- package/dist/components/animation/fade-slide/fade-slide.component.js +18 -12
- package/dist/components/control/components/button/button.component.js +5 -5
- package/dist/components/control/components/button-text/button-text.component.d.ts +13 -0
- package/dist/components/control/components/button-text/button-text.component.js +50 -0
- package/dist/components/control/control.component.d.ts +1 -0
- package/dist/components/control/control.component.js +28 -26
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._ButtonText_1g53u_1{display:inline-flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center;gap:var(--rm-ui-padding-xs);border-radius:var(--rm-ui-border-radius-sm);padding:var(--rm-ui-padding-xxs);color:var(--rm-ui-color-text-primary)}._ButtonTextSizeSm_1g53u_13 ._ButtonTextIcon_1g53u_13{width:20px;height:20px}._ButtonTextSizeMd_1g53u_18 ._ButtonTextIcon_1g53u_13,._ButtonTextSizeLg_1g53u_19 ._ButtonTextIcon_1g53u_13{width:24px;height:24px}._ButtonTextSizeSm_1g53u_13 ._ButtonTextContent_1g53u_24{font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._ButtonTextSizeMd_1g53u_18 ._ButtonTextContent_1g53u_24{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._ButtonTextSizeLg_1g53u_19 ._ButtonTextContent_1g53u_24{font-size:var(--rm-ui-font-size-hl4);line-height:var(--rm-ui-line-height-hl4)}._ButtonTextContent_1g53u_24{font-weight:var(--rm-ui-font-weight-medium);text-decoration:underline}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Flex_1t96l_1{display:flex}
|
|
@@ -1,34 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p, useEffect as x } from "react";
|
|
3
|
+
import F from "clsx";
|
|
3
4
|
import { m as y } from "../../../proxy-BfgGIllg.js";
|
|
4
|
-
const
|
|
5
|
+
import '../../../assets/fade-scale-B23oZuuD.css';const _ = "_Flex_1t96l_1", h = {
|
|
6
|
+
Flex: _
|
|
7
|
+
}, j = (t) => {
|
|
5
8
|
const {
|
|
6
9
|
children: a,
|
|
7
10
|
name: n,
|
|
8
|
-
condition:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
condition: s,
|
|
12
|
+
flex: o = !1,
|
|
13
|
+
ease: r = "easeInOut",
|
|
14
|
+
type: c = "tween",
|
|
15
|
+
className: i = "",
|
|
16
|
+
duration: l = 0.125,
|
|
13
17
|
delay: m = 0,
|
|
14
|
-
animateOnStart:
|
|
15
|
-
} = t, e =
|
|
16
|
-
if (
|
|
18
|
+
animateOnStart: f = !1
|
|
19
|
+
} = t, e = p(f);
|
|
20
|
+
if (x(() => {
|
|
17
21
|
e.current = !0;
|
|
18
|
-
}, []), !
|
|
22
|
+
}, []), !s) return null;
|
|
19
23
|
const u = e.current ? { opacity: 0, scale: 0.95 } : !1;
|
|
20
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ d(
|
|
21
25
|
y.div,
|
|
22
26
|
{
|
|
23
27
|
initial: u,
|
|
24
28
|
animate: { opacity: 1, scale: 1 },
|
|
25
|
-
transition: { ease:
|
|
26
|
-
className:
|
|
29
|
+
transition: { ease: r, duration: l, delay: m, type: c },
|
|
30
|
+
className: F(i, {
|
|
31
|
+
[h.Flex]: o
|
|
32
|
+
}),
|
|
27
33
|
children: a
|
|
28
34
|
},
|
|
29
35
|
n
|
|
30
36
|
);
|
|
31
37
|
};
|
|
32
38
|
export {
|
|
33
|
-
|
|
39
|
+
j as FadeScale
|
|
34
40
|
};
|
|
@@ -1,35 +1,41 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as p, useEffect as y } from "react";
|
|
3
|
+
import F from "clsx";
|
|
3
4
|
import { m as h } from "../../../proxy-BfgGIllg.js";
|
|
4
|
-
const
|
|
5
|
+
import '../../../assets/fade-scale-B23oZuuD.css';const v = "_Flex_1t96l_1", _ = {
|
|
6
|
+
Flex: v
|
|
7
|
+
}, S = (n) => {
|
|
5
8
|
const {
|
|
6
9
|
children: r,
|
|
7
10
|
name: i,
|
|
8
11
|
condition: o,
|
|
9
|
-
|
|
12
|
+
flex: a = !1,
|
|
13
|
+
direction: l = "ltr",
|
|
10
14
|
ease: s = "easeInOut",
|
|
11
15
|
type: c = "tween",
|
|
12
|
-
className:
|
|
13
|
-
duration:
|
|
14
|
-
delay:
|
|
15
|
-
animateOnStart:
|
|
16
|
-
} = n, e = p(
|
|
16
|
+
className: m = "",
|
|
17
|
+
duration: d = 0.125,
|
|
18
|
+
delay: f = 0,
|
|
19
|
+
animateOnStart: u = !1
|
|
20
|
+
} = n, e = p(u);
|
|
17
21
|
if (y(() => {
|
|
18
22
|
e.current = !0;
|
|
19
23
|
}, []), !o) return null;
|
|
20
|
-
const
|
|
24
|
+
const x = e.current ? { x: l === "ltr" ? "-100%" : "100%", opacity: 0 } : !1;
|
|
21
25
|
return /* @__PURE__ */ t("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ t(
|
|
22
26
|
h.div,
|
|
23
27
|
{
|
|
24
|
-
initial:
|
|
28
|
+
initial: x,
|
|
25
29
|
animate: { x: 0, opacity: 1 },
|
|
26
|
-
transition: { ease: s, duration:
|
|
27
|
-
className:
|
|
30
|
+
transition: { ease: s, duration: d, delay: f, type: c },
|
|
31
|
+
className: F(m, {
|
|
32
|
+
[_.Flex]: a
|
|
33
|
+
}),
|
|
28
34
|
children: r
|
|
29
35
|
},
|
|
30
36
|
i
|
|
31
37
|
) });
|
|
32
38
|
};
|
|
33
39
|
export {
|
|
34
|
-
|
|
40
|
+
S as FadeSlide
|
|
35
41
|
};
|
|
@@ -3,16 +3,16 @@ import i from "clsx";
|
|
|
3
3
|
import { Animation as S } from "../../../animation/animation.component.js";
|
|
4
4
|
import { Loader as p } from "../../../loader/loader.component.js";
|
|
5
5
|
import { containsHtml as y } from "../../utils/utils.js";
|
|
6
|
-
import '../../../../assets/button-4MJZ7yPE.css';const g = "_Button_1utzs_1", h = "_ButtonSizeSm_1utzs_11", W = "_ButtonSizeLg_1utzs_16", I = "_ButtonColorTertiary_1utzs_16", T = "_ButtonText_1utzs_20", x = "_ButtonSizeMd_1utzs_26",
|
|
6
|
+
import '../../../../assets/button-4MJZ7yPE.css';const g = "_Button_1utzs_1", h = "_ButtonSizeSm_1utzs_11", W = "_ButtonSizeLg_1utzs_16", I = "_ButtonColorTertiary_1utzs_16", T = "_ButtonText_1utzs_20", x = "_ButtonSizeMd_1utzs_26", b = "_ButtonColorPrimary_1utzs_54", F = "_ButtonColorSecondary_1utzs_62", N = "_ButtonLoading_1utzs_79", A = "_ButtonFullWidth_1utzs_87", M = "_ButtonInfo_1utzs_95", v = "_ButtonContent_1utzs_102", P = "_ButtonContentLoading_1utzs_106", k = "_ButtonContentIdle_1utzs_110", j = "_ButtonLoaderWrap_1utzs_114", D = "_ButtonLoaderAnimationWrap_1utzs_121", t = {
|
|
7
7
|
Button: g,
|
|
8
8
|
ButtonSizeSm: h,
|
|
9
9
|
ButtonSizeLg: W,
|
|
10
10
|
ButtonColorTertiary: I,
|
|
11
11
|
ButtonText: T,
|
|
12
12
|
ButtonSizeMd: x,
|
|
13
|
-
ButtonColorPrimary:
|
|
14
|
-
ButtonColorSecondary:
|
|
15
|
-
ButtonLoading:
|
|
13
|
+
ButtonColorPrimary: b,
|
|
14
|
+
ButtonColorSecondary: F,
|
|
15
|
+
ButtonLoading: N,
|
|
16
16
|
ButtonFullWidth: A,
|
|
17
17
|
ButtonInfo: M,
|
|
18
18
|
ButtonContent: v,
|
|
@@ -25,7 +25,7 @@ import '../../../../assets/button-4MJZ7yPE.css';const g = "_Button_1utzs_1", h =
|
|
|
25
25
|
children: B,
|
|
26
26
|
color: e,
|
|
27
27
|
size: r,
|
|
28
|
-
type: d,
|
|
28
|
+
type: d = "button",
|
|
29
29
|
disabled: c = !1,
|
|
30
30
|
info: n = "",
|
|
31
31
|
fullWidth: _ = !1,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
+
export interface ButtonTextProps extends PropsWithChildren {
|
|
3
|
+
size: 'sm' | 'md' | 'lg';
|
|
4
|
+
type: 'submit' | 'reset' | 'button';
|
|
5
|
+
icon?: ReactElement<SVGElement>;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
preventDefault?: boolean;
|
|
8
|
+
blurAfterCLick?: boolean;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
onFocus?: () => void;
|
|
11
|
+
onBlur?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const ButtonText: (props: ButtonTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs as a, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import _ from "clsx";
|
|
3
|
+
import { cloneElement as S, isValidElement as z } from "react";
|
|
4
|
+
import '../../../../assets/button-text-B5BDeF9b.css';const g = "_ButtonText_1g53u_1", d = "_ButtonTextSizeSm_1g53u_13", f = "_ButtonTextIcon_1g53u_13", p = "_ButtonTextSizeMd_1g53u_18", C = "_ButtonTextSizeLg_1g53u_19", b = "_ButtonTextContent_1g53u_24", t = {
|
|
5
|
+
ButtonText: g,
|
|
6
|
+
ButtonTextSizeSm: d,
|
|
7
|
+
ButtonTextIcon: f,
|
|
8
|
+
ButtonTextSizeMd: p,
|
|
9
|
+
ButtonTextSizeLg: C,
|
|
10
|
+
ButtonTextContent: b
|
|
11
|
+
}, k = (u) => {
|
|
12
|
+
const {
|
|
13
|
+
children: l,
|
|
14
|
+
size: n = "md",
|
|
15
|
+
type: c = "button",
|
|
16
|
+
icon: e = null,
|
|
17
|
+
disabled: s = !1,
|
|
18
|
+
preventDefault: x = !1,
|
|
19
|
+
blurAfterCLick: i = !1,
|
|
20
|
+
onClick: B,
|
|
21
|
+
onFocus: T,
|
|
22
|
+
onBlur: r
|
|
23
|
+
} = u;
|
|
24
|
+
return /* @__PURE__ */ a(
|
|
25
|
+
"button",
|
|
26
|
+
{
|
|
27
|
+
type: c,
|
|
28
|
+
disabled: s,
|
|
29
|
+
className: _(t.ButtonText, {
|
|
30
|
+
[t.ButtonTextSizeSm]: n === "sm",
|
|
31
|
+
[t.ButtonTextSizeMd]: n === "md",
|
|
32
|
+
[t.ButtonTextSizeLg]: n === "lg"
|
|
33
|
+
}),
|
|
34
|
+
onClick: (o) => {
|
|
35
|
+
x && o.preventDefault(), i && o.currentTarget.blur(), B?.call(null);
|
|
36
|
+
},
|
|
37
|
+
onFocus: () => T?.call(null),
|
|
38
|
+
onBlur: () => r?.call(null),
|
|
39
|
+
children: [
|
|
40
|
+
z(e) ? S(e, {
|
|
41
|
+
className: t.ButtonTextIcon
|
|
42
|
+
}) : e,
|
|
43
|
+
/* @__PURE__ */ m("span", { className: t.ButtonTextContent, children: l })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
k as ButtonText
|
|
50
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const Control: {
|
|
2
2
|
Box: import('react').ForwardRefExoticComponent<import('./components/box/box.component').BoxProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
3
3
|
Button: (props: import('./components/button/button.component').ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
ButtonText: (props: import('./components/button-text/button-text.component').ButtonTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
CardImage: (props: import('./components/card-image/card-image.component').CardImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
CardText: (props: import('./components/card-text/card-text.component').CardTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
Checkbox: (props: import('./components/checkbox/checkbox.component').CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
import { Box as o } from "./components/box/box.component.js";
|
|
2
2
|
import { Button as r } from "./components/button/button.component.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
3
|
+
import { ButtonText as m } from "./components/button-text/button-text.component.js";
|
|
4
|
+
import { CardImage as t } from "./components/card-image/card-image.component.js";
|
|
5
|
+
import { CardText as i } from "./components/card-text/card-text.component.js";
|
|
6
|
+
import { Checkbox as p } from "./components/checkbox/checkbox.component.js";
|
|
7
|
+
import { Choice as f } from "./components/choice/choice.component.js";
|
|
8
|
+
import { Dropdown as e } from "./components/dropdown/dropdown.component.js";
|
|
9
|
+
import { HiddenInput as a } from "./components/hidden-input/hidden-input.component.js";
|
|
10
|
+
import { Input as d } from "./components/input/input.component.js";
|
|
11
|
+
import { Label as n } from "./components/label/label.component.js";
|
|
12
|
+
import { Radio as x } from "./components/radio/radio.component.js";
|
|
13
|
+
import { RadioLabel as C } from "./components/radio-label/radio-label.component.js";
|
|
14
|
+
import { RadioText as T } from "./components/radio-text/radio-text.component.js";
|
|
15
|
+
import { Text as u } from "./components/text/text.component.js";
|
|
15
16
|
import { Textarea as b } from "./components/textarea/textarea.component.js";
|
|
16
|
-
const
|
|
17
|
+
const y = {
|
|
17
18
|
Box: o,
|
|
18
19
|
Button: r,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
ButtonText: m,
|
|
21
|
+
CardImage: t,
|
|
22
|
+
CardText: i,
|
|
23
|
+
Checkbox: p,
|
|
24
|
+
Choice: f,
|
|
25
|
+
Dropdown: e,
|
|
26
|
+
HiddenInput: a,
|
|
27
|
+
Input: d,
|
|
28
|
+
Label: n,
|
|
29
|
+
Radio: x,
|
|
30
|
+
RadioLabel: C,
|
|
31
|
+
RadioText: T,
|
|
32
|
+
Text: u,
|
|
31
33
|
Textarea: b
|
|
32
34
|
};
|
|
33
35
|
export {
|
|
34
|
-
|
|
36
|
+
y as Control
|
|
35
37
|
};
|