stone-kit 0.0.93 → 0.0.103
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 +59 -59
- package/dist/components/Button/ui/Button.js +13 -13
- package/dist/components/MetroLabel/ui/MetroLabel.d.ts +3 -0
- package/dist/components/MetroLabel/ui/MetroLabel.js +44 -0
- package/dist/components/MetroLabel/ui/MetroLabel.types.d.ts +18 -0
- package/dist/components/MetroLabel/ui/MetroLabel.types.js +1 -0
- package/dist/components/MetroTag/ui/MetroTag.js +21 -21
- package/dist/components/Modal/ui/Modal.js +3474 -3487
- package/dist/components/NewIcon/ui/NewIcon.d.ts +1 -1
- package/dist/components/NewIcon/ui/NewIcon.js +2 -1
- package/dist/components/Select/ui/Select.d.ts +1 -1
- package/dist/components/Select/ui/Select.js +75 -65
- package/dist/components/Select/ui/Select.types.d.ts +1 -0
- package/dist/components/SliderNavigation/index.d.ts +3 -0
- package/dist/components/SliderNavigation/index.js +4 -0
- package/dist/components/SliderNavigation/ui/SliderNavigation.d.ts +3 -0
- package/dist/components/SliderNavigation/ui/SliderNavigation.js +52 -0
- package/dist/components/SliderNavigation/ui/SliderNavigation.types.d.ts +9 -0
- package/dist/components/SliderNavigation/ui/SliderNavigation.types.js +1 -0
- package/dist/components/Tag/ui/Tag.js +40 -39
- package/dist/components/Tag/ui/Tag.types.d.ts +1 -0
- package/dist/components/Tag/ui/Tag.types.js +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +18 -16
- package/dist/style.css +1 -1
- package/package.json +1 -1
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,17 +1,17 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as z } from "react/jsx-runtime";
|
|
2
2
|
import { c as g } from "../../../index-DIxK0V-G.js";
|
|
3
3
|
import { NewIcon as k } from "../../NewIcon/ui/NewIcon.js";
|
|
4
|
-
const y = "_btnCommon_1cazw_1", f = "_btnLoading_1cazw_19",
|
|
4
|
+
const y = "_btnCommon_1cazw_1", f = "_btnLoading_1cazw_19", C = "_isHidden_1cazw_23", N = "_blue_1cazw_67", H = "_sokolniki_1cazw_81", L = "_black_1cazw_95", S = "_gray_1cazw_109", $ = "_whiteStroke_1cazw_123", x = "_whiteFilled_1cazw_135", F = "_shade_1cazw_149", v = "_volodiyaLight_1cazw_163", j = "_loader_1cazw_169", p = "_LoaderSpin_1cazw_1", _ = {
|
|
5
5
|
btnCommon: y,
|
|
6
6
|
btnLoading: f,
|
|
7
|
-
isHidden:
|
|
7
|
+
isHidden: C,
|
|
8
8
|
"auto-width": "_auto-width_1cazw_27",
|
|
9
9
|
"full-width": "_full-width_1cazw_31",
|
|
10
10
|
"tiny-size": "_tiny-size_1cazw_35",
|
|
11
11
|
"small-size": "_small-size_1cazw_43",
|
|
12
12
|
"medium-size": "_medium-size_1cazw_51",
|
|
13
13
|
"large-size": "_large-size_1cazw_59",
|
|
14
|
-
blue:
|
|
14
|
+
blue: N,
|
|
15
15
|
sokolniki: H,
|
|
16
16
|
black: L,
|
|
17
17
|
gray: S,
|
|
@@ -32,9 +32,9 @@ const y = "_btnCommon_1cazw_1", f = "_btnLoading_1cazw_19", N = "_isHidden_1cazw
|
|
|
32
32
|
}, a = g.bind(_), A = ({
|
|
33
33
|
size: m = "medium",
|
|
34
34
|
size_m: d,
|
|
35
|
-
size_l:
|
|
35
|
+
size_l: r,
|
|
36
36
|
pre: s = !1,
|
|
37
|
-
children:
|
|
37
|
+
children: w = "",
|
|
38
38
|
post: l = !1,
|
|
39
39
|
variant: h = "blue",
|
|
40
40
|
width: u = "auto",
|
|
@@ -46,25 +46,25 @@ const y = "_btnCommon_1cazw_1", f = "_btnLoading_1cazw_19", N = "_isHidden_1cazw
|
|
|
46
46
|
_.btnCommon,
|
|
47
47
|
_[`${m}-size`],
|
|
48
48
|
_[`${d}-size_m`],
|
|
49
|
-
_[`${
|
|
49
|
+
_[`${r}-size_l`],
|
|
50
50
|
_[`${h}`],
|
|
51
51
|
{ [_.btnLoading]: i },
|
|
52
52
|
{ [_.btnCommonInline]: s || l },
|
|
53
53
|
_[`${u}-width`],
|
|
54
54
|
b
|
|
55
|
-
),
|
|
55
|
+
), o = () => /* @__PURE__ */ c(z, { children: [
|
|
56
56
|
i && /* @__PURE__ */ e(
|
|
57
57
|
k,
|
|
58
58
|
{
|
|
59
59
|
name: "loader",
|
|
60
60
|
size: "24",
|
|
61
|
-
color: "
|
|
61
|
+
color: "currentColor",
|
|
62
62
|
additionalClass: _.loader
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ c(z, { children: [
|
|
66
66
|
s && /* @__PURE__ */ e("span", { className: a({ [_.isHidden]: i }), children: s }),
|
|
67
|
-
/* @__PURE__ */ e("span", { className: a({ [_.isHidden]: i }), children:
|
|
67
|
+
/* @__PURE__ */ e("span", { className: a({ [_.isHidden]: i }), children: w }),
|
|
68
68
|
l && /* @__PURE__ */ e("span", { className: a({ [_.isHidden]: i }), children: l })
|
|
69
69
|
] })
|
|
70
70
|
] });
|
|
@@ -73,14 +73,14 @@ const y = "_btnCommon_1cazw_1", f = "_btnLoading_1cazw_19", N = "_isHidden_1cazw
|
|
|
73
73
|
{
|
|
74
74
|
className: t,
|
|
75
75
|
...n,
|
|
76
|
-
children:
|
|
76
|
+
children: o()
|
|
77
77
|
}
|
|
78
78
|
) : /* @__PURE__ */ e(
|
|
79
79
|
"button",
|
|
80
80
|
{
|
|
81
81
|
className: t,
|
|
82
82
|
...n,
|
|
83
|
-
children:
|
|
83
|
+
children: o()
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
86
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as s, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as _ } from "../../../index-DIxK0V-G.js";
|
|
3
|
+
import { NewIcon as m } from "../../NewIcon/ui/NewIcon.js";
|
|
4
|
+
const f = "_root_1ml5t_1", d = "_metroColor_1ml5t_15", N = "_route_1ml5t_25", p = "_auto_1ml5t_35", x = "_full_1ml5t_39", l = {
|
|
5
|
+
root: f,
|
|
6
|
+
metroColor: d,
|
|
7
|
+
route: N,
|
|
8
|
+
auto: p,
|
|
9
|
+
full: x
|
|
10
|
+
}, C = _.bind(l), v = ({ addClassName: r, metro: o, width: n = "full", justifyContent: a = "flex-start", colorIcon: e = "#777E90", ...u }) => (console.log(o), /* @__PURE__ */ s(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
style: { justifyContent: `${a}` },
|
|
14
|
+
className: C(l.root, r, l[n]),
|
|
15
|
+
...u,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ s("div", { className: l.metroColor, children: [
|
|
18
|
+
(o == null ? void 0 : o.color) && /* @__PURE__ */ c("span", { style: { background: (o == null ? void 0 : o.color) ?? "" } }),
|
|
19
|
+
o.name
|
|
20
|
+
] }),
|
|
21
|
+
o.routes && o.routes.map((t, i) => /* @__PURE__ */ s(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: l.route,
|
|
25
|
+
children: [
|
|
26
|
+
t.iconName && /* @__PURE__ */ c(
|
|
27
|
+
m,
|
|
28
|
+
{
|
|
29
|
+
size: "20",
|
|
30
|
+
name: t.iconName,
|
|
31
|
+
color: e
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
t.timeTo + " мин"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
i
|
|
38
|
+
))
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
));
|
|
42
|
+
export {
|
|
43
|
+
v as MetroLabel
|
|
44
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type TagWidth = 'full' | 'auto';
|
|
3
|
+
type JustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
4
|
+
export interface IMetroLabelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
metro: {
|
|
6
|
+
name?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
routes?: {
|
|
9
|
+
timeTo?: string;
|
|
10
|
+
iconName?: string;
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
justifyContent?: JustifyContent;
|
|
14
|
+
colorIcon?: string;
|
|
15
|
+
addClassName?: string;
|
|
16
|
+
width?: TagWidth;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { NewIcon as
|
|
4
|
-
const
|
|
5
|
-
root:
|
|
6
|
-
metroColor:
|
|
7
|
-
route:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
const
|
|
12
|
-
return console.log(o), /* @__PURE__ */
|
|
1
|
+
import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as u } from "../../../index-DIxK0V-G.js";
|
|
3
|
+
import { NewIcon as _ } from "../../NewIcon/ui/NewIcon.js";
|
|
4
|
+
const x = "_root_1x0xv_1", d = "_metroColor_1x0xv_15", v = "_route_1x0xv_25", N = "_auto_1x0xv_35", p = "_full_1x0xv_39", s = {
|
|
5
|
+
root: x,
|
|
6
|
+
metroColor: d,
|
|
7
|
+
route: v,
|
|
8
|
+
auto: N,
|
|
9
|
+
full: p
|
|
10
|
+
}, f = u.bind(s), g = ({ addClassName: r, metro: o, width: a = "auto", ...t }) => {
|
|
11
|
+
const e = ["car", "walk"];
|
|
12
|
+
return console.log(o), /* @__PURE__ */ l(
|
|
13
13
|
"div",
|
|
14
14
|
{
|
|
15
|
-
className:
|
|
16
|
-
...
|
|
15
|
+
className: f(s.root, r, s[a]),
|
|
16
|
+
...t,
|
|
17
17
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
(o == null ? void 0 : o.color) && /* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ l("div", { className: s.metroColor, children: [
|
|
19
|
+
(o == null ? void 0 : o.color) && /* @__PURE__ */ n("span", { style: { background: (o == null ? void 0 : o.color) ?? "" } }),
|
|
20
20
|
o.name
|
|
21
21
|
] }),
|
|
22
|
-
o.routes && o.routes.map((c,
|
|
22
|
+
o.routes && o.routes.map((c, i) => /* @__PURE__ */ l(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
25
|
className: s.route,
|
|
26
26
|
children: [
|
|
27
|
-
c.iconName &&
|
|
28
|
-
|
|
27
|
+
c.iconName && e.includes(c.iconName) && /* @__PURE__ */ n(
|
|
28
|
+
_,
|
|
29
29
|
{
|
|
30
30
|
size: "20",
|
|
31
31
|
name: c.iconName,
|
|
@@ -35,12 +35,12 @@ const _ = "_root_129gd_1", g = "_metroColor_129gd_15", N = "_route_129gd_25", s
|
|
|
35
35
|
c.timeTo + " мин"
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
|
-
|
|
38
|
+
i
|
|
39
39
|
))
|
|
40
40
|
]
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
};
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
g as MetroTag
|
|
46
46
|
};
|