stone-kit 0.0.476 → 0.0.477
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-Bo5gHKrX.js → SortSelect-CQHzI2M-.js} +57 -56
- package/dist/components/SortSelect/index.js +1 -1
- package/dist/components/SortSelect/ui/SortSelect.js +1 -1
- package/dist/components/TabSwitcher/index.js +1 -1
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +1 -1
- package/dist/components/TabSwitcher/ui/TabSwitcher.types.d.ts +1 -0
- package/dist/components/ZoomControls/ui/ZoomControls.js +1 -1
- package/dist/main.js +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,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as u, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as R, useState as k, useRef as D, useEffect as T } from "react";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as v } 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 O } 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";
|
|
9
9
|
import "./components/RoundButton/ui/RoundButton.js";
|
|
10
10
|
import "./components/Tag/ui/Tag.js";
|
|
11
11
|
import "./components/Switcher/ui/Switcher.js";
|
|
12
|
-
import { Text as
|
|
12
|
+
import { Text as L } from "./components/Text/ui/Text.js";
|
|
13
13
|
import "./components/Flex/ui/Flex.js";
|
|
14
14
|
import "./components/Input/ui/Input.js";
|
|
15
15
|
import { M as B } from "./Modal-C48pfGFo.js";
|
|
@@ -17,7 +17,7 @@ import "./components/GroupedInput/ui/GroupedInputs.js";
|
|
|
17
17
|
import "./components/MetroTag/ui/MetroTag.js";
|
|
18
18
|
import "./components/LotCard/ui/LotCard.js";
|
|
19
19
|
import "./components/Select/ui/Select.js";
|
|
20
|
-
import { useClientWidth as
|
|
20
|
+
import { useClientWidth as C } 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";
|
|
@@ -35,106 +35,107 @@ const j = "_root_1ol37_1", E = "_text_1ol37_18", A = "_rootCol_1ol37_26", z = "_
|
|
|
35
35
|
autoWidth: F,
|
|
36
36
|
isDisabled: G,
|
|
37
37
|
grayRow: J
|
|
38
|
-
},
|
|
38
|
+
}, N = v.bind(e), K = ({
|
|
39
39
|
children: s,
|
|
40
40
|
variant: c = "whiteRow",
|
|
41
41
|
isApart: m = !1,
|
|
42
42
|
addClassName: d = "",
|
|
43
43
|
col: l = !1
|
|
44
|
-
}) => /* @__PURE__ */ o("div", { className:
|
|
45
|
-
const { isTablet: m, isDesktop: d } =
|
|
44
|
+
}) => /* @__PURE__ */ o("div", { className: N(e.root, e[c], d, { [e.rootCol]: l, [e.apart]: m }), children: s }), W = R((s, c) => {
|
|
45
|
+
const { isTablet: m, isDesktop: d } = C(), {
|
|
46
46
|
index: l,
|
|
47
47
|
children: i,
|
|
48
|
-
addItemClassName:
|
|
49
|
-
disabled:
|
|
50
|
-
itemsLength:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
addItemClassName: h,
|
|
49
|
+
disabled: f = !1,
|
|
50
|
+
itemsLength: x = 0,
|
|
51
|
+
isLongOn: w = !0,
|
|
52
|
+
width: r,
|
|
53
|
+
width_m: a,
|
|
54
|
+
width_l: n,
|
|
55
|
+
...p
|
|
56
|
+
} = s, b = (i != null && i.toString().length ? (i == null ? void 0 : i.toString().length) > 2 : !1) && w, y = (g, _) => g && a ? a : _ && n ? n : r, S = !r && !a && !n && b;
|
|
57
|
+
return /* @__PURE__ */ u("label", { className: N({ [e.isLong]: b }), children: [
|
|
57
58
|
/* @__PURE__ */ o(
|
|
58
59
|
"input",
|
|
59
60
|
{
|
|
60
61
|
ref: c,
|
|
61
62
|
type: "checkbox",
|
|
62
|
-
...
|
|
63
|
-
disabled:
|
|
63
|
+
...p,
|
|
64
|
+
disabled: f
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
67
|
/* @__PURE__ */ o(
|
|
67
68
|
"div",
|
|
68
69
|
{
|
|
69
|
-
style: { width:
|
|
70
|
-
className:
|
|
70
|
+
style: { width: y(m, d) },
|
|
71
|
+
className: N(N(
|
|
71
72
|
e.item,
|
|
72
73
|
{ [e.firstItem]: l === 0 },
|
|
73
|
-
{ [e.lastItem]: l ===
|
|
74
|
-
{ [e.isDisabled]:
|
|
75
|
-
{ [e.autoWidth]:
|
|
76
|
-
),
|
|
77
|
-
children: /* @__PURE__ */ o(
|
|
74
|
+
{ [e.lastItem]: l === x - 1 },
|
|
75
|
+
{ [e.isDisabled]: f },
|
|
76
|
+
{ [e.autoWidth]: S }
|
|
77
|
+
), h),
|
|
78
|
+
children: /* @__PURE__ */ o(L, { className: e.text, children: i })
|
|
78
79
|
}
|
|
79
80
|
)
|
|
80
81
|
] });
|
|
81
82
|
});
|
|
82
83
|
W.displayName = "TabSwitcherItem";
|
|
83
|
-
const
|
|
84
|
+
const gt = Object.assign(K, { Item: W }), I = v.bind(t), Q = ({
|
|
84
85
|
options: s,
|
|
85
86
|
selectedOption: c,
|
|
86
87
|
placeholder: m = "",
|
|
87
88
|
error: d,
|
|
88
89
|
disabled: l,
|
|
89
90
|
additionalClass: i = "",
|
|
90
|
-
onChange:
|
|
91
|
-
onBlur:
|
|
92
|
-
mini:
|
|
93
|
-
openOnTop:
|
|
91
|
+
onChange: h,
|
|
92
|
+
onBlur: f,
|
|
93
|
+
mini: x,
|
|
94
|
+
openOnTop: w = !1
|
|
94
95
|
}) => {
|
|
95
|
-
const [r, a] = k(!1),
|
|
96
|
+
const [r, a] = k(!1), n = D(null), { isMobile: p } = C(), { handleBlur: b, getInputValue: y, getOption: S, handleDocumentClick: g } = M({
|
|
96
97
|
selectedOption: c,
|
|
97
|
-
setSelectedOption:
|
|
98
|
+
setSelectedOption: h,
|
|
98
99
|
setIsOpen: a,
|
|
99
|
-
containerRef:
|
|
100
|
+
containerRef: n,
|
|
100
101
|
isOpen: r,
|
|
101
|
-
isMobile:
|
|
102
|
+
isMobile: p,
|
|
102
103
|
placeholder: m,
|
|
103
|
-
onChange:
|
|
104
|
-
onBlur:
|
|
104
|
+
onChange: h,
|
|
105
|
+
onBlur: f
|
|
105
106
|
});
|
|
106
|
-
return T(() => (document.addEventListener("click",
|
|
107
|
-
document.removeEventListener("click",
|
|
108
|
-
}), []), /* @__PURE__ */
|
|
107
|
+
return T(() => (document.addEventListener("click", g), () => {
|
|
108
|
+
document.removeEventListener("click", g);
|
|
109
|
+
}), []), /* @__PURE__ */ u(
|
|
109
110
|
"div",
|
|
110
111
|
{
|
|
111
|
-
ref:
|
|
112
|
-
className:
|
|
112
|
+
ref: n,
|
|
113
|
+
className: I(
|
|
113
114
|
t.sortSelectWrapper,
|
|
114
115
|
{ [t.sortSelectWrapperError]: d },
|
|
115
|
-
{ [t.sortSelectWrapperTop]:
|
|
116
|
+
{ [t.sortSelectWrapperTop]: w },
|
|
116
117
|
i
|
|
117
118
|
),
|
|
118
119
|
tabIndex: 0,
|
|
119
|
-
onBlur:
|
|
120
|
+
onBlur: b,
|
|
120
121
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ u("div", { className: I(t.inputWrapper), children: [
|
|
122
123
|
/* @__PURE__ */ o(
|
|
123
124
|
"input",
|
|
124
125
|
{
|
|
125
126
|
type: "text",
|
|
126
127
|
readOnly: !0,
|
|
127
|
-
value:
|
|
128
|
-
className:
|
|
128
|
+
value: y(),
|
|
129
|
+
className: I(
|
|
129
130
|
t.selectedOptions,
|
|
130
131
|
{ [t.selectOptionsDisabled]: l },
|
|
131
|
-
{ [t.selectionOptionMini]:
|
|
132
|
+
{ [t.selectionOptionMini]: x }
|
|
132
133
|
),
|
|
133
134
|
onClick: () => a(!r)
|
|
134
135
|
}
|
|
135
136
|
),
|
|
136
137
|
/* @__PURE__ */ o(
|
|
137
|
-
|
|
138
|
+
O,
|
|
138
139
|
{
|
|
139
140
|
name: "twoArrows",
|
|
140
141
|
size: "24",
|
|
@@ -142,7 +143,7 @@ const It = Object.assign(K, { Item: W }), S = O.bind(t), Q = ({
|
|
|
142
143
|
}
|
|
143
144
|
)
|
|
144
145
|
] }),
|
|
145
|
-
r &&
|
|
146
|
+
r && p && /* @__PURE__ */ u(
|
|
146
147
|
B,
|
|
147
148
|
{
|
|
148
149
|
isOpen: r,
|
|
@@ -152,27 +153,27 @@ const It = Object.assign(K, { Item: W }), S = O.bind(t), Q = ({
|
|
|
152
153
|
createPortalObj: { domNode: document.querySelector("body") },
|
|
153
154
|
isTransparentBack: !0,
|
|
154
155
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */ o(
|
|
156
|
+
/* @__PURE__ */ u("div", { className: t.mobileSortHeader, children: [
|
|
157
|
+
/* @__PURE__ */ o(L, { children: "Сортировка" }),
|
|
157
158
|
/* @__PURE__ */ o("div", { onClick: () => a(!1), children: /* @__PURE__ */ o(
|
|
158
|
-
|
|
159
|
+
O,
|
|
159
160
|
{
|
|
160
161
|
name: "close",
|
|
161
162
|
size: "20"
|
|
162
163
|
}
|
|
163
164
|
) })
|
|
164
165
|
] }),
|
|
165
|
-
/* @__PURE__ */ o("div", { className: t.mobileOptionList, children: s == null ? void 0 : s.map((
|
|
166
|
+
/* @__PURE__ */ o("div", { className: t.mobileOptionList, children: s == null ? void 0 : s.map((_) => S(_)) })
|
|
166
167
|
]
|
|
167
168
|
}
|
|
168
169
|
),
|
|
169
|
-
r && !
|
|
170
|
+
r && !p && /* @__PURE__ */ o("div", { className: I(t.optionsList, { [t.optionListOnTop]: w }), children: s == null ? void 0 : s.map((_) => S(_)) })
|
|
170
171
|
]
|
|
171
172
|
}
|
|
172
173
|
);
|
|
173
174
|
};
|
|
174
175
|
Q.displayName = "SortSelect";
|
|
175
176
|
export {
|
|
176
|
-
|
|
177
|
+
gt as S,
|
|
177
178
|
Q as a
|
|
178
179
|
};
|
|
@@ -13,7 +13,7 @@ import "../../Text/ui/Text.js";
|
|
|
13
13
|
import "../../Flex/ui/Flex.js";
|
|
14
14
|
import "../../Input/ui/Input.js";
|
|
15
15
|
import "../../../Modal-C48pfGFo.js";
|
|
16
|
-
import { a as z } from "../../../SortSelect-
|
|
16
|
+
import { a as z } from "../../../SortSelect-CQHzI2M-.js";
|
|
17
17
|
import "../../GroupedInput/ui/GroupedInputs.js";
|
|
18
18
|
import "../../MetroTag/ui/MetroTag.js";
|
|
19
19
|
import "../../LotCard/ui/LotCard.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { S as v } from "../../../SortSelect-
|
|
3
|
+
import { S as v } from "../../../SortSelect-CQHzI2M-.js";
|
|
4
4
|
import "../../Text/ui/Text.js";
|
|
5
5
|
import "../../../index-rKuIKazb.js";
|
|
6
6
|
import "../../Button/ui/Button.js";
|
|
@@ -11,7 +11,7 @@ import "../../Flex/ui/Flex.js";
|
|
|
11
11
|
import "../../Input/ui/Input.js";
|
|
12
12
|
import "react";
|
|
13
13
|
import "../../../Modal-C48pfGFo.js";
|
|
14
|
-
import "../../../SortSelect-
|
|
14
|
+
import "../../../SortSelect-CQHzI2M-.js";
|
|
15
15
|
import "../../GroupedInput/ui/GroupedInputs.js";
|
|
16
16
|
import "../../../index-rKuIKazb.js";
|
|
17
17
|
import "../../MetroTag/ui/MetroTag.js";
|
package/dist/main.js
CHANGED
|
@@ -10,7 +10,7 @@ import { Flex as T } from "./components/Flex/ui/Flex.js";
|
|
|
10
10
|
import { Input as b } from "./components/Input/ui/Input.js";
|
|
11
11
|
import { M as I } from "./Modal-C48pfGFo.js";
|
|
12
12
|
import { FieldInput as w } from "./components/FieldInput/ui/FieldInput.js";
|
|
13
|
-
import { a as F, S as L } from "./SortSelect-
|
|
13
|
+
import { a as F, S as L } from "./SortSelect-CQHzI2M-.js";
|
|
14
14
|
import { GroupedInputs as N } from "./components/GroupedInput/ui/GroupedInputs.js";
|
|
15
15
|
import { Logo as v } from "./components/Logo/ui/Logo.js";
|
|
16
16
|
import { MetroTag as D } from "./components/MetroTag/ui/MetroTag.js";
|