stone-kit 0.0.692 → 0.0.694
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
|
|
@@ -34,5 +34,5 @@ type IFormPageInputs = {
|
|
|
34
34
|
advCheckBox?: boolean;
|
|
35
35
|
textarea?: string;
|
|
36
36
|
};
|
|
37
|
-
export declare const ModalForm: ({ isFormOpen, setIsFormOpen, isNews, title, isEmail, isPhone, isTextArea, telegramLink, isRequiredPhone, isRequiredEmail, isRequiredPhoneOrEmail, textAreaPlaceholder, subTitle, submitHandler, modalWidth, rowsTextArea, advCheckBox, isAdvCheckBox, addTitleClassName, createPortalObj }: IModalFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
37
|
+
export declare const ModalForm: ({ isFormOpen, setIsFormOpen, isNews, title, isEmail, isPhone, isTextArea, telegramLink, isRequiredPhone, isRequiredEmail, isRequiredPhoneOrEmail, textAreaPlaceholder, subTitle, submitHandler, modalWidth, rowsTextArea, advCheckBox, isAdvCheckBox, addTitleClassName, createPortalObj, }: IModalFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
38
38
|
export {};
|
|
@@ -2554,6 +2554,7 @@ const bn = kr.bind(Se), En = "Я принимаю условия Политик
|
|
|
2554
2554
|
{
|
|
2555
2555
|
className: Se.root,
|
|
2556
2556
|
style: { width: U ? "100%" : re },
|
|
2557
|
+
"data-testid": "modal_window",
|
|
2557
2558
|
children: [
|
|
2558
2559
|
/* @__PURE__ */ ye(
|
|
2559
2560
|
"div",
|
|
@@ -2592,7 +2593,7 @@ const bn = kr.bind(Se), En = "Я принимаю условия Политик
|
|
|
2592
2593
|
st,
|
|
2593
2594
|
{
|
|
2594
2595
|
width: "full",
|
|
2595
|
-
size_s: "
|
|
2596
|
+
size_s: "large",
|
|
2596
2597
|
variant: "light",
|
|
2597
2598
|
placeholder: "Введите имя",
|
|
2598
2599
|
"data-testid": "modal_name",
|
|
@@ -2615,7 +2616,7 @@ const bn = kr.bind(Se), En = "Я принимаю условия Политик
|
|
|
2615
2616
|
width: "full",
|
|
2616
2617
|
"data-testid": "phone_modal",
|
|
2617
2618
|
type: "tel",
|
|
2618
|
-
size_s: "
|
|
2619
|
+
size_s: "large",
|
|
2619
2620
|
variant: "light",
|
|
2620
2621
|
...B,
|
|
2621
2622
|
...K("phone"),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as m, Fragment as k, jsx as
|
|
2
|
-
import { s, O as w } from "../../../Option-C4HGcCtY.js";
|
|
1
|
+
import { jsxs as m, Fragment as k, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { s as o, O as w } from "../../../Option-C4HGcCtY.js";
|
|
3
3
|
import { NewIcon as g } from "../../NewIcon/ui/NewIcon.js";
|
|
4
4
|
import { c as x } from "../../../index-rKuIKazb.js";
|
|
5
5
|
import { useState as O } from "react";
|
|
6
|
-
const b = x.bind(
|
|
7
|
-
category:
|
|
6
|
+
const b = x.bind(o), D = ({
|
|
7
|
+
category: t,
|
|
8
8
|
selectedOptions: n,
|
|
9
9
|
disabledOptions: u,
|
|
10
10
|
clickableOptions: i,
|
|
@@ -12,39 +12,39 @@ const b = x.bind(s), D = ({
|
|
|
12
12
|
sizeIcon: r,
|
|
13
13
|
mode: d
|
|
14
14
|
}) => {
|
|
15
|
-
const [l, f] = O(!1), C = n.map((e) => JSON.stringify(e)), a = d === "category", h = d === "double", S = a &&
|
|
15
|
+
const [l, f] = O(!1), C = n.map((e) => JSON.stringify(e)), a = d === "category", h = d === "double", S = a && t.options.every((e) => C.includes(JSON.stringify(e))), N = a ? S ? "selectChecked" : "selectUnchecked" : h && n.some((e) => e.value === t.value) ? "selectChecked" : "selectUnchecked", v = t.options.length > 1;
|
|
16
16
|
return /* @__PURE__ */ m(k, { children: [
|
|
17
17
|
/* @__PURE__ */ m(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
20
|
className: b(
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
o.option,
|
|
22
|
+
o.category,
|
|
23
23
|
{
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
(e) => e.value ===
|
|
24
|
+
[o.selected]: n.some((e) => e.value === t.value),
|
|
25
|
+
[o.optionDisabled]: u.some(
|
|
26
|
+
(e) => e.value === t.value
|
|
27
27
|
),
|
|
28
|
-
[
|
|
28
|
+
[o.optionClickable]: i ? i.includes(t.value.toString()) : !0
|
|
29
29
|
}
|
|
30
30
|
),
|
|
31
31
|
onClick: () => {
|
|
32
|
-
h && !l && f(!0), p(a ?
|
|
32
|
+
h && !l && f(!0), p(a ? t.options : t);
|
|
33
33
|
},
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */ m("div", { className:
|
|
36
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ m("div", { className: o.leftSide, children: [
|
|
36
|
+
/* @__PURE__ */ s(
|
|
37
37
|
g,
|
|
38
38
|
{
|
|
39
39
|
size: r ?? "20",
|
|
40
40
|
name: N
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ s("div", { children: t.label })
|
|
44
44
|
] }),
|
|
45
|
-
v && /* @__PURE__ */
|
|
45
|
+
v && /* @__PURE__ */ s("div", { className: o.iconArrow, onClick: (e) => {
|
|
46
46
|
e.stopPropagation(), f((c) => !c);
|
|
47
|
-
}, children: /* @__PURE__ */
|
|
47
|
+
}, children: /* @__PURE__ */ s(
|
|
48
48
|
g,
|
|
49
49
|
{
|
|
50
50
|
name: "arrowShort",
|
|
@@ -55,7 +55,7 @@ const b = x.bind(s), D = ({
|
|
|
55
55
|
]
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
|
-
l && v &&
|
|
58
|
+
l && v && t.options.map((e, c) => /* @__PURE__ */ s(
|
|
59
59
|
w,
|
|
60
60
|
{
|
|
61
61
|
option: e,
|