@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.
@@ -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}
@@ -3,6 +3,7 @@ import { PropsWithChildren } from 'react';
3
3
  export interface FadeScaleProps extends PropsWithChildren {
4
4
  name: string;
5
5
  condition: boolean;
6
+ flex?: boolean;
6
7
  className?: string;
7
8
  type?: AnimationGeneratorType;
8
9
  ease?: Easing | Easing[];
@@ -1,34 +1,40 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { useRef as d, useEffect as p } from "react";
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 R = (t) => {
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: r,
9
- ease: i = "easeInOut",
10
- type: o = "tween",
11
- className: s = "",
12
- duration: c = 0.125,
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: l = !1
15
- } = t, e = d(l);
16
- if (p(() => {
18
+ animateOnStart: f = !1
19
+ } = t, e = p(f);
20
+ if (x(() => {
17
21
  e.current = !0;
18
- }, []), !r) return null;
22
+ }, []), !s) return null;
19
23
  const u = e.current ? { opacity: 0, scale: 0.95 } : !1;
20
- return /* @__PURE__ */ f(
24
+ return /* @__PURE__ */ d(
21
25
  y.div,
22
26
  {
23
27
  initial: u,
24
28
  animate: { opacity: 1, scale: 1 },
25
- transition: { ease: i, duration: c, delay: m, type: o },
26
- className: s,
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
- R as FadeScale
39
+ j as FadeScale
34
40
  };
@@ -3,6 +3,7 @@ import { PropsWithChildren } from 'react';
3
3
  export interface FadeSlideProps extends PropsWithChildren {
4
4
  name: string;
5
5
  condition: boolean;
6
+ flex?: boolean;
6
7
  direction?: 'ltr' | 'rtl';
7
8
  className?: string;
8
9
  type?: AnimationGeneratorType;
@@ -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 O = (n) => {
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
- direction: a = "ltr",
12
+ flex: a = !1,
13
+ direction: l = "ltr",
10
14
  ease: s = "easeInOut",
11
15
  type: c = "tween",
12
- className: d = "",
13
- duration: l = 0.125,
14
- delay: m = 0,
15
- animateOnStart: f = !1
16
- } = n, e = p(f);
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 u = e.current ? { x: a === "ltr" ? "-100%" : "100%", opacity: 0 } : !1;
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: u,
28
+ initial: x,
25
29
  animate: { x: 0, opacity: 1 },
26
- transition: { ease: s, duration: l, delay: m, type: c },
27
- className: d,
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
- O as FadeSlide
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", F = "_ButtonColorPrimary_1utzs_54", N = "_ButtonColorSecondary_1utzs_62", b = "_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 = {
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: F,
14
- ButtonColorSecondary: N,
15
- ButtonLoading: b,
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 { CardImage as m } from "./components/card-image/card-image.component.js";
4
- import { CardText as t } from "./components/card-text/card-text.component.js";
5
- import { Checkbox as i } from "./components/checkbox/checkbox.component.js";
6
- import { Choice as p } from "./components/choice/choice.component.js";
7
- import { Dropdown as f } from "./components/dropdown/dropdown.component.js";
8
- import { HiddenInput as e } from "./components/hidden-input/hidden-input.component.js";
9
- import { Input as a } from "./components/input/input.component.js";
10
- import { Label as d } from "./components/label/label.component.js";
11
- import { Radio as n } from "./components/radio/radio.component.js";
12
- import { RadioLabel as x } from "./components/radio-label/radio-label.component.js";
13
- import { RadioText as C } from "./components/radio-text/radio-text.component.js";
14
- import { Text as T } from "./components/text/text.component.js";
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 q = {
17
+ const y = {
17
18
  Box: o,
18
19
  Button: r,
19
- CardImage: m,
20
- CardText: t,
21
- Checkbox: i,
22
- Choice: p,
23
- Dropdown: f,
24
- HiddenInput: e,
25
- Input: a,
26
- Label: d,
27
- Radio: n,
28
- RadioLabel: x,
29
- RadioText: C,
30
- Text: T,
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
- q as Control
36
+ y as Control
35
37
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "1.0.59",
4
+ "version": "1.0.61",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",