stone-kit 0.0.461 → 0.0.463
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/{SortSelect-f8wlE1wn.js → SortSelect-CFvzLylX.js} +49 -51
- package/dist/components/FormModal/ui/ModalForm.d.ts +2 -1
- package/dist/components/FormModal/ui/ModalForm.js +2346 -793
- package/dist/components/SortSelect/index.js +1 -1
- package/dist/components/SortSelect/ui/SortSelect.js +3 -5
- package/dist/components/TabSwitcher/index.js +1 -1
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +3 -5
- package/dist/components/ZoomControls/ui/ZoomControls.js +4 -6
- package/dist/main.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-D4uptQ6W.js +0 -1559
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,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as h, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as R, useState as k, useRef as D, useEffect as T } from "react";
|
|
3
3
|
import { c as O } from "./index-rKuIKazb.js";
|
|
4
4
|
import { s as t, u as M } from "./useSortSelect-D7K1wk0E.js";
|
|
5
|
-
import { NewIcon as
|
|
5
|
+
import { NewIcon as y } from "./components/NewIcon/ui/NewIcon.js";
|
|
6
6
|
import "./components/Button/ui/Button.js";
|
|
7
7
|
import "./components/mobileButton/ui/MobileButton.js";
|
|
8
8
|
import "./components/DestinationTab/ui/DestinationTab.js";
|
|
@@ -21,10 +21,8 @@ import { useClientWidth as L } from "./shared/useClientWidth.js";
|
|
|
21
21
|
import "./components/SliderNavigation/ui/SliderNavigation.js";
|
|
22
22
|
import "./components/LotCardSkeleton/ui/LotCardSkeleton.js";
|
|
23
23
|
import "./components/TabSelect/ui/TabSelect.js";
|
|
24
|
-
import "./
|
|
25
|
-
|
|
26
|
-
import "./components/TextArea/TextArea.js";
|
|
27
|
-
const j = "_root_cgepa_1", E = "_text_cgepa_18", A = "_rootCol_cgepa_26", z = "_item_cgepa_32", $ = "_whiteRow_cgepa_51", q = "_firstItem_cgepa_62", H = "_lastItem_cgepa_66", P = "_apart_cgepa_97", V = "_isLong_cgepa_97", F = "_autoWidth_cgepa_122", G = "_isDisabled_cgepa_129", J = "_grayRow_cgepa_153", e = {
|
|
24
|
+
import "./components/FormModal/ui/ModalForm.js";
|
|
25
|
+
const j = "_root_hv830_1", E = "_text_hv830_18", A = "_rootCol_hv830_26", z = "_item_hv830_32", $ = "_whiteRow_hv830_51", q = "_firstItem_hv830_62", H = "_lastItem_hv830_66", P = "_apart_hv830_97", V = "_isLong_hv830_97", F = "_autoWidth_hv830_122", G = "_isDisabled_hv830_129", J = "_grayRow_hv830_153", e = {
|
|
28
26
|
root: j,
|
|
29
27
|
text: E,
|
|
30
28
|
rootCol: A,
|
|
@@ -39,30 +37,30 @@ const j = "_root_cgepa_1", E = "_text_cgepa_18", A = "_rootCol_cgepa_26", z = "_
|
|
|
39
37
|
grayRow: J
|
|
40
38
|
}, S = O.bind(e), K = ({
|
|
41
39
|
children: o,
|
|
42
|
-
variant:
|
|
40
|
+
variant: c = "whiteRow",
|
|
43
41
|
isApart: m = !1,
|
|
44
42
|
addClassName: d = "",
|
|
45
|
-
col:
|
|
46
|
-
}) => /* @__PURE__ */ s("div", { className: S(e.root, e[
|
|
43
|
+
col: l = !1
|
|
44
|
+
}) => /* @__PURE__ */ s("div", { className: S(e.root, e[c], d, { [e.rootCol]: l, [e.apart]: m }), children: o }), W = R((o, c) => {
|
|
47
45
|
const { isTablet: m, isDesktop: d } = L(), {
|
|
48
|
-
index:
|
|
46
|
+
index: l,
|
|
49
47
|
children: i,
|
|
50
|
-
addItemClassName:
|
|
51
|
-
disabled:
|
|
48
|
+
addItemClassName: _,
|
|
49
|
+
disabled: u = !1,
|
|
52
50
|
itemsLength: I = 0,
|
|
53
51
|
width: p,
|
|
54
|
-
width_m:
|
|
55
|
-
width_l:
|
|
52
|
+
width_m: r,
|
|
53
|
+
width_l: a,
|
|
56
54
|
...f
|
|
57
|
-
} = o,
|
|
58
|
-
return /* @__PURE__ */
|
|
55
|
+
} = o, n = i != null && i.toString().length ? (i == null ? void 0 : i.toString().length) > 2 : !1, N = (v, w) => v && r ? r : w && a ? a : p, g = !p && !r && !a && n;
|
|
56
|
+
return /* @__PURE__ */ h("label", { className: S({ [e.isLong]: n }), children: [
|
|
59
57
|
/* @__PURE__ */ s(
|
|
60
58
|
"input",
|
|
61
59
|
{
|
|
62
|
-
ref:
|
|
60
|
+
ref: c,
|
|
63
61
|
type: "checkbox",
|
|
64
62
|
...f,
|
|
65
|
-
disabled:
|
|
63
|
+
disabled: u
|
|
66
64
|
}
|
|
67
65
|
),
|
|
68
66
|
/* @__PURE__ */ s(
|
|
@@ -71,43 +69,43 @@ const j = "_root_cgepa_1", E = "_text_cgepa_18", A = "_rootCol_cgepa_26", z = "_
|
|
|
71
69
|
style: { width: N(m, d) },
|
|
72
70
|
className: S(S(
|
|
73
71
|
e.item,
|
|
74
|
-
{ [e.firstItem]:
|
|
75
|
-
{ [e.lastItem]:
|
|
76
|
-
{ [e.isDisabled]:
|
|
77
|
-
{ [e.autoWidth]:
|
|
78
|
-
),
|
|
72
|
+
{ [e.firstItem]: l === 0 },
|
|
73
|
+
{ [e.lastItem]: l === I - 1 },
|
|
74
|
+
{ [e.isDisabled]: u },
|
|
75
|
+
{ [e.autoWidth]: g }
|
|
76
|
+
), _),
|
|
79
77
|
children: /* @__PURE__ */ s(C, { className: e.text, children: i })
|
|
80
78
|
}
|
|
81
79
|
)
|
|
82
80
|
] });
|
|
83
81
|
});
|
|
84
82
|
W.displayName = "TabSwitcherItem";
|
|
85
|
-
const
|
|
83
|
+
const St = Object.assign(K, { Item: W }), b = O.bind(t), Q = ({
|
|
86
84
|
options: o,
|
|
87
|
-
selectedOption:
|
|
85
|
+
selectedOption: c,
|
|
88
86
|
placeholder: m = "",
|
|
89
87
|
error: d,
|
|
90
|
-
disabled:
|
|
88
|
+
disabled: l,
|
|
91
89
|
additionalClass: i = "",
|
|
92
|
-
onChange:
|
|
93
|
-
onBlur:
|
|
90
|
+
onChange: _,
|
|
91
|
+
onBlur: u,
|
|
94
92
|
mini: I,
|
|
95
93
|
openOnTop: p = !1
|
|
96
94
|
}) => {
|
|
97
|
-
const [
|
|
98
|
-
selectedOption:
|
|
99
|
-
setSelectedOption:
|
|
100
|
-
setIsOpen:
|
|
95
|
+
const [r, a] = k(!1), f = D(null), { isMobile: n } = L(), { handleBlur: N, getInputValue: g, getOption: v, handleDocumentClick: w } = M({
|
|
96
|
+
selectedOption: c,
|
|
97
|
+
setSelectedOption: _,
|
|
98
|
+
setIsOpen: a,
|
|
101
99
|
containerRef: f,
|
|
102
|
-
isOpen:
|
|
103
|
-
isMobile:
|
|
100
|
+
isOpen: r,
|
|
101
|
+
isMobile: n,
|
|
104
102
|
placeholder: m,
|
|
105
|
-
onChange:
|
|
106
|
-
onBlur:
|
|
103
|
+
onChange: _,
|
|
104
|
+
onBlur: u
|
|
107
105
|
});
|
|
108
106
|
return T(() => (document.addEventListener("click", w), () => {
|
|
109
107
|
document.removeEventListener("click", w);
|
|
110
|
-
}), []), /* @__PURE__ */
|
|
108
|
+
}), []), /* @__PURE__ */ h(
|
|
111
109
|
"div",
|
|
112
110
|
{
|
|
113
111
|
ref: f,
|
|
@@ -120,23 +118,23 @@ const Nt = Object.assign(K, { Item: W }), b = O.bind(t), Q = ({
|
|
|
120
118
|
tabIndex: 0,
|
|
121
119
|
onBlur: N,
|
|
122
120
|
children: [
|
|
123
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ h("div", { className: b(t.inputWrapper), children: [
|
|
124
122
|
/* @__PURE__ */ s(
|
|
125
123
|
"input",
|
|
126
124
|
{
|
|
127
125
|
type: "text",
|
|
128
126
|
readOnly: !0,
|
|
129
|
-
value:
|
|
127
|
+
value: g(),
|
|
130
128
|
className: b(
|
|
131
129
|
t.selectedOptions,
|
|
132
|
-
{ [t.selectOptionsDisabled]:
|
|
130
|
+
{ [t.selectOptionsDisabled]: l },
|
|
133
131
|
{ [t.selectionOptionMini]: I }
|
|
134
132
|
),
|
|
135
|
-
onClick: () =>
|
|
133
|
+
onClick: () => a(!r)
|
|
136
134
|
}
|
|
137
135
|
),
|
|
138
136
|
/* @__PURE__ */ s(
|
|
139
|
-
|
|
137
|
+
y,
|
|
140
138
|
{
|
|
141
139
|
name: "twoArrows",
|
|
142
140
|
size: "24",
|
|
@@ -144,37 +142,37 @@ const Nt = Object.assign(K, { Item: W }), b = O.bind(t), Q = ({
|
|
|
144
142
|
}
|
|
145
143
|
)
|
|
146
144
|
] }),
|
|
147
|
-
|
|
145
|
+
r && n && /* @__PURE__ */ h(
|
|
148
146
|
B,
|
|
149
147
|
{
|
|
150
|
-
isOpen:
|
|
151
|
-
emitIsOpen:
|
|
148
|
+
isOpen: r,
|
|
149
|
+
emitIsOpen: a,
|
|
152
150
|
additionalClassModalBody: t.modalAddBody,
|
|
153
151
|
additionalClass: t.selectModal,
|
|
154
152
|
createPortalObj: { domNode: document.querySelector("body") },
|
|
155
153
|
isTransparentBack: !0,
|
|
156
154
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ h("div", { className: t.mobileSortHeader, children: [
|
|
158
156
|
/* @__PURE__ */ s(C, { children: "Сортировка" }),
|
|
159
|
-
/* @__PURE__ */ s("div", { onClick: () =>
|
|
160
|
-
|
|
157
|
+
/* @__PURE__ */ s("div", { onClick: () => a(!1), children: /* @__PURE__ */ s(
|
|
158
|
+
y,
|
|
161
159
|
{
|
|
162
160
|
name: "close",
|
|
163
161
|
size: "20"
|
|
164
162
|
}
|
|
165
163
|
) })
|
|
166
164
|
] }),
|
|
167
|
-
/* @__PURE__ */ s("div", { className: t.mobileOptionList, children: o == null ? void 0 : o.map((
|
|
165
|
+
/* @__PURE__ */ s("div", { className: t.mobileOptionList, children: o == null ? void 0 : o.map((x) => v(x)) })
|
|
168
166
|
]
|
|
169
167
|
}
|
|
170
168
|
),
|
|
171
|
-
|
|
169
|
+
r && !n && /* @__PURE__ */ s("div", { className: b(t.optionsList, { [t.optionListOnTop]: p }), children: o == null ? void 0 : o.map((x) => v(x)) })
|
|
172
170
|
]
|
|
173
171
|
}
|
|
174
172
|
);
|
|
175
173
|
};
|
|
176
174
|
Q.displayName = "SortSelect";
|
|
177
175
|
export {
|
|
178
|
-
|
|
176
|
+
St as S,
|
|
179
177
|
Q as a
|
|
180
178
|
};
|
|
@@ -20,6 +20,7 @@ interface IModalFormProps {
|
|
|
20
20
|
isRequiredEmail?: boolean;
|
|
21
21
|
isRequiredPhoneOrEmail?: boolean;
|
|
22
22
|
isAdvCheckBox?: boolean;
|
|
23
|
+
addTitleClassName?: string;
|
|
23
24
|
}
|
|
24
25
|
type IFormPageInputs = {
|
|
25
26
|
phone: string;
|
|
@@ -29,5 +30,5 @@ type IFormPageInputs = {
|
|
|
29
30
|
advCheckBox?: boolean;
|
|
30
31
|
textarea?: string;
|
|
31
32
|
};
|
|
32
|
-
export declare const ModalForm: ({ isFormOpen, setIsFormOpen, isNews, title, isEmail, isPhone, isTextArea, telegramLink, isRequiredPhone, isRequiredEmail, isRequiredPhoneOrEmail, textAreaPlaceholder, subTitle, submitHandler, modalWidth, rowsTextArea, advCheckBox, isAdvCheckBox, }: IModalFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
+
export declare const ModalForm: ({ isFormOpen, setIsFormOpen, isNews, title, isEmail, isPhone, isTextArea, telegramLink, isRequiredPhone, isRequiredEmail, isRequiredPhoneOrEmail, textAreaPlaceholder, subTitle, submitHandler, modalWidth, rowsTextArea, advCheckBox, isAdvCheckBox, addTitleClassName }: IModalFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
33
34
|
export {};
|