stone-kit 0.0.419 → 0.0.421

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/README.md CHANGED
@@ -1,59 +1,59 @@
1
- # Stone-kit
2
-
3
- Uikit for stone redesign 2.0
4
-
5
- ## Installation
6
-
7
- Package installation:
8
-
9
- ```bash
10
- npm i stone-kit@latest
11
- ```
12
-
13
- ## Usage
14
-
15
- For Next.js page router in App.tsx:
16
-
17
- ```bash
18
- import 'stone-kit/dist/style.css'
19
- ```
20
-
21
- and then:
22
-
23
- ```bash
24
- import {Button} from 'stone-kit'
25
- ```
26
-
27
- For other projects u can immediately:
28
-
29
- ```bash
30
- import {Button} from 'stone-kit'
31
- ```
32
-
33
- ## Docs
34
-
35
- ### ButtonProps
36
-
37
- size: optional, size of button. types : 'large' | 'medium' | 'small' | 'tiny'
38
-
39
- pre: optional, insert icon/text before button text. type: ReactNode
40
-
41
- post: optional, insert icon/text after button text. type: ReactNode
42
-
43
- variant: optional, color variants of button. type:
44
- 'blue',
45
- 'gray',
46
- 'whiteStroke',
47
- 'sokolniki',
48
- 'black',
49
- 'whiteFilled'
50
-
51
- width: optional, width of button. type: 'auto' | 'full'
52
-
53
- additionalClass: optional, add your custom class to button. type: 'string'
54
-
55
- as: optional, u can convert button to link. type: 'button' | 'link'. 'button' by default.
56
-
57
- ### MobileButtonProps
58
-
59
- ### Tag
1
+ # Stone-kit
2
+
3
+ Uikit for stone redesign 2.0
4
+
5
+ ## Installation
6
+
7
+ Package installation:
8
+
9
+ ```bash
10
+ npm i stone-kit@latest
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ For Next.js page router in App.tsx:
16
+
17
+ ```bash
18
+ import 'stone-kit/dist/style.css'
19
+ ```
20
+
21
+ and then:
22
+
23
+ ```bash
24
+ import {Button} from 'stone-kit'
25
+ ```
26
+
27
+ For other projects u can immediately:
28
+
29
+ ```bash
30
+ import {Button} from 'stone-kit'
31
+ ```
32
+
33
+ ## Docs
34
+
35
+ ### ButtonProps
36
+
37
+ size: optional, size of button. types : 'large' | 'medium' | 'small' | 'tiny'
38
+
39
+ pre: optional, insert icon/text before button text. type: ReactNode
40
+
41
+ post: optional, insert icon/text after button text. type: ReactNode
42
+
43
+ variant: optional, color variants of button. type:
44
+ 'blue',
45
+ 'gray',
46
+ 'whiteStroke',
47
+ 'sokolniki',
48
+ 'black',
49
+ 'whiteFilled'
50
+
51
+ width: optional, width of button. type: 'auto' | 'full'
52
+
53
+ additionalClass: optional, add your custom class to button. type: 'string'
54
+
55
+ as: optional, u can convert button to link. type: 'button' | 'link'. 'button' by default.
56
+
57
+ ### MobileButtonProps
58
+
59
+ ### Tag
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { ComponentProps } from './Button.types';
3
3
 
4
- export declare const Button: ({ size, size_m, size_l, pre, children, post, variant, width, additionalClass, isLoading, ...props }: React.PropsWithChildren<ComponentProps>) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const Button: ({ size, size_m, size_l, onCLick, pre, children, post, variant, width, additionalClass, isLoading, ...props }: React.PropsWithChildren<ComponentProps>) => import("react/jsx-runtime").JSX.Element;
@@ -1,27 +1,27 @@
1
- import { jsx as e, jsxs as c, Fragment as o } from "react/jsx-runtime";
2
- import { c as k } from "../../../index-rKuIKazb.js";
3
- import { NewIcon as y } from "../../NewIcon/ui/NewIcon.js";
4
- const w = "_btnCommon_acr66_1", f = "_btnLoading_acr66_20", C = "_isHidden_acr66_24", N = "_blue_acr66_68", H = "_sokolniki_acr66_82", L = "_black_acr66_96", S = "_gray_acr66_110", p = "_whiteStroke_acr66_124", $ = "_whiteFilled_acr66_136", x = "_shade_acr66_150", F = "_transparent_acr66_156", v = "_volodiyaLight_acr66_177", j = "_loader_acr66_183", B = "_LoaderSpin_acr66_1", _ = {
5
- btnCommon: w,
6
- btnLoading: f,
7
- isHidden: C,
1
+ import { jsx as e, jsxs as o, Fragment as m } from "react/jsx-runtime";
2
+ import { c as y } from "../../../index-rKuIKazb.js";
3
+ import { NewIcon as w } from "../../NewIcon/ui/NewIcon.js";
4
+ const f = "_btnCommon_acr66_1", C = "_btnLoading_acr66_20", N = "_isHidden_acr66_24", H = "_blue_acr66_68", S = "_sokolniki_acr66_82", p = "_black_acr66_96", L = "_gray_acr66_110", $ = "_whiteStroke_acr66_124", x = "_whiteFilled_acr66_136", F = "_shade_acr66_150", v = "_transparent_acr66_156", j = "_volodiyaLight_acr66_177", B = "_loader_acr66_183", I = "_LoaderSpin_acr66_1", _ = {
5
+ btnCommon: f,
6
+ btnLoading: C,
7
+ isHidden: N,
8
8
  "auto-width": "_auto-width_acr66_28",
9
9
  "full-width": "_full-width_acr66_32",
10
10
  "tiny-size": "_tiny-size_acr66_36",
11
11
  "small-size": "_small-size_acr66_44",
12
12
  "medium-size": "_medium-size_acr66_52",
13
13
  "large-size": "_large-size_acr66_60",
14
- blue: N,
15
- sokolniki: H,
16
- black: L,
17
- gray: S,
18
- whiteStroke: p,
19
- whiteFilled: $,
20
- shade: x,
21
- transparent: F,
22
- volodiyaLight: v,
23
- loader: j,
24
- LoaderSpin: B,
14
+ blue: H,
15
+ sokolniki: S,
16
+ black: p,
17
+ gray: L,
18
+ whiteStroke: $,
19
+ whiteFilled: x,
20
+ shade: F,
21
+ transparent: v,
22
+ volodiyaLight: j,
23
+ loader: B,
24
+ LoaderSpin: I,
25
25
  "tiny-size_m": "_tiny-size_m_acr66_189",
26
26
  "small-size_m": "_small-size_m_acr66_196",
27
27
  "medium-size_m": "_medium-size_m_acr66_203",
@@ -30,32 +30,33 @@ const w = "_btnCommon_acr66_1", f = "_btnLoading_acr66_20", C = "_isHidden_acr66
30
30
  "small-size_l": "_small-size_l_acr66_226",
31
31
  "medium-size_l": "_medium-size_l_acr66_233",
32
32
  "large-size_l": "_large-size_l_acr66_240"
33
- }, i = k.bind(_), D = ({
34
- size: m = "medium",
35
- size_m: d,
36
- size_l: z,
33
+ }, i = y.bind(_), E = ({
34
+ size: d = "medium",
35
+ size_m: z,
36
+ size_l: h,
37
+ onCLick: r,
37
38
  pre: s = !1,
38
- children: h = "",
39
+ children: u = "",
39
40
  post: n = !1,
40
- variant: u = "blue",
41
- width: b = "auto",
41
+ variant: b = "blue",
42
+ width: k = "auto",
42
43
  additionalClass: g = "",
43
44
  isLoading: a = !1,
44
45
  ...l
45
46
  }) => {
46
- const r = i(
47
+ const t = i(
47
48
  _.btnCommon,
48
- _[`${m}-size`],
49
- _[`${d}-size_m`],
50
- _[`${z}-size_l`],
51
- _[`${u}`],
49
+ _[`${d}-size`],
50
+ _[`${z}-size_m`],
51
+ _[`${h}-size_l`],
52
+ _[`${b}`],
52
53
  { [_.btnLoading]: a },
53
54
  { [_.btnCommonInline]: s || n },
54
- _[`${b}-width`],
55
+ _[`${k}-width`],
55
56
  g
56
- ), t = () => /* @__PURE__ */ c(o, { children: [
57
+ ), c = () => /* @__PURE__ */ o(m, { children: [
57
58
  a && /* @__PURE__ */ e(
58
- y,
59
+ w,
59
60
  {
60
61
  name: "loader",
61
62
  size: "24",
@@ -63,28 +64,30 @@ const w = "_btnCommon_acr66_1", f = "_btnLoading_acr66_20", C = "_isHidden_acr66
63
64
  additionalClass: _.loader
64
65
  }
65
66
  ),
66
- /* @__PURE__ */ c(o, { children: [
67
+ /* @__PURE__ */ o(m, { children: [
67
68
  s && /* @__PURE__ */ e("span", { className: i({ [_.isHidden]: a }), children: s }),
68
- /* @__PURE__ */ e("span", { className: i({ [_.isHidden]: a }), children: h }),
69
+ /* @__PURE__ */ e("span", { className: i({ [_.isHidden]: a }), children: u }),
69
70
  n && /* @__PURE__ */ e("span", { className: i({ [_.isHidden]: a }), children: n })
70
71
  ] })
71
72
  ] });
72
73
  return l.as === "link" ? /* @__PURE__ */ e(
73
74
  "a",
74
75
  {
75
- className: r,
76
+ className: t,
77
+ onClick: r,
76
78
  ...l,
77
- children: t()
79
+ children: c()
78
80
  }
79
81
  ) : /* @__PURE__ */ e(
80
82
  "button",
81
83
  {
82
- className: r,
84
+ className: t,
85
+ onClick: r,
83
86
  ...l,
84
- children: t()
87
+ children: c()
85
88
  }
86
89
  );
87
90
  };
88
91
  export {
89
- D as Button
92
+ E as Button
90
93
  };
@@ -26,6 +26,7 @@ interface ButtonProps {
26
26
  additionalClass?: string;
27
27
  isLoading?: boolean;
28
28
  as: 'button' | 'link';
29
+ onCLick?: () => {};
29
30
  }
30
31
  export type ComponentProps = ButtonProps & ((React.ButtonHTMLAttributes<HTMLButtonElement> & {
31
32
  as: 'button';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "stone-kit",
3
3
  "description": "uikit for redesign",
4
4
  "private": false,
5
- "version": "0.0.419",
5
+ "version": "0.0.421",
6
6
  "author": "Mollycodd1e",
7
7
  "license": "ISC",
8
8
  "type": "module",