@arthurzakharov/ui-kit 1.0.60 → 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}
@@ -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.60",
4
+ "version": "1.0.61",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",