stone-kit 0.0.770 → 0.0.772
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/Modal/ui/Modal.js +21 -21
- package/dist/main.d.ts +1 -0
- package/dist/main.js +30 -28
- 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,34 +1,34 @@
|
|
|
1
|
-
import { jsxs as $, jsx as
|
|
1
|
+
import { jsxs as $, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as N } from "react";
|
|
3
|
-
import { createPortal as
|
|
4
|
-
const
|
|
5
|
-
root:
|
|
3
|
+
import { createPortal as C } from "react-dom";
|
|
4
|
+
const w = "_root_1k6wm_1", L = "_modalBody_1k6wm_15", x = "_modalOverlay_1k6wm_19", T = "_isTransparentBack_1k6wm_31", s = {
|
|
5
|
+
root: w,
|
|
6
6
|
modalBody: L,
|
|
7
|
-
modalOverlay:
|
|
8
|
-
isTransparentBack:
|
|
7
|
+
modalOverlay: x,
|
|
8
|
+
isTransparentBack: T
|
|
9
9
|
}, h = ({
|
|
10
|
-
isOpen:
|
|
11
|
-
emitIsOpen:
|
|
12
|
-
isTransparentBack:
|
|
13
|
-
isClickOutside:
|
|
10
|
+
isOpen: d,
|
|
11
|
+
emitIsOpen: r,
|
|
12
|
+
isTransparentBack: l = !1,
|
|
13
|
+
isClickOutside: t = !0,
|
|
14
14
|
leaveDisableScroll: i = !1,
|
|
15
15
|
createPortalObj: o,
|
|
16
16
|
additionalClass: m,
|
|
17
17
|
additionalClassOverlay: c,
|
|
18
18
|
additionalClassModalBody: f,
|
|
19
19
|
opacity: u = 0.7,
|
|
20
|
-
colorOverlay:
|
|
20
|
+
colorOverlay: e,
|
|
21
21
|
notDisableScroll: y = !1,
|
|
22
22
|
children: _,
|
|
23
23
|
modalBodyRef: k,
|
|
24
24
|
additionalStylesModalBody: v
|
|
25
25
|
}) => {
|
|
26
26
|
const p = () => {
|
|
27
|
-
|
|
27
|
+
t && r(!1);
|
|
28
28
|
};
|
|
29
29
|
N(() => {
|
|
30
30
|
if (!y) {
|
|
31
|
-
if (
|
|
31
|
+
if (d) {
|
|
32
32
|
if (document.body.classList.contains("disable-scroll"))
|
|
33
33
|
return;
|
|
34
34
|
document.body.classList.add("disable-scroll");
|
|
@@ -39,25 +39,25 @@ const C = "_root_1k6wm_1", L = "_modalBody_1k6wm_15", b = "_modalOverlay_1k6wm_1
|
|
|
39
39
|
}
|
|
40
40
|
return () => document.body.classList.remove("disable-scroll");
|
|
41
41
|
}
|
|
42
|
-
}, [
|
|
43
|
-
const
|
|
42
|
+
}, [d]);
|
|
43
|
+
const a = /* @__PURE__ */ $(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
46
|
className: `${s.root} ${m}`,
|
|
47
47
|
onClick: (B) => B.stopPropagation(),
|
|
48
48
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ n(
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
52
|
onClick: p,
|
|
53
|
-
className: `${s.modalOverlay} ${c} ${
|
|
53
|
+
className: `${s.modalOverlay} ${c} ${l ? s.isTransparentBack : ""}`,
|
|
54
54
|
style: {
|
|
55
|
-
opacity:
|
|
56
|
-
backgroundColor:
|
|
55
|
+
opacity: l ? u : void 0,
|
|
56
|
+
backgroundColor: e || void 0
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ n(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
className: `${s.modalBody} ${f}`,
|
|
@@ -69,7 +69,7 @@ const C = "_root_1k6wm_1", L = "_modalBody_1k6wm_15", b = "_modalOverlay_1k6wm_1
|
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
);
|
|
72
|
-
return
|
|
72
|
+
return d ? o != null && o.domNode && o.domNode.isConnected ? C(a, o.domNode, o.key) : a : null;
|
|
73
73
|
};
|
|
74
74
|
export {
|
|
75
75
|
h as Modal
|
package/dist/main.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { MetroTag } from './components/MetroTag';
|
|
|
17
17
|
export { LotCard } from './components/LotCard';
|
|
18
18
|
export { Select } from './components/Select';
|
|
19
19
|
export { useClientWidth } from './shared/useClientWidth';
|
|
20
|
+
export { deepEqual } from './shared/deepEqual.ts';
|
|
20
21
|
export { SortSelect } from './components/SortSelect';
|
|
21
22
|
export { SliderNavigation } from './components/SliderNavigation';
|
|
22
23
|
export { LotCardSkeleton } from './components/LotCardSkeleton';
|
package/dist/main.js
CHANGED
|
@@ -1,58 +1,60 @@
|
|
|
1
1
|
import { Button as e } from "./components/Button/ui/Button.js";
|
|
2
|
-
import { MobileButton as
|
|
2
|
+
import { MobileButton as p } from "./components/mobileButton/ui/MobileButton.js";
|
|
3
3
|
import { NewIcon as x } from "./components/NewIcon/ui/NewIcon.js";
|
|
4
4
|
import { DestinationTab as a } from "./components/DestinationTab/ui/DestinationTab.js";
|
|
5
5
|
import { RoundButton as n } from "./components/RoundButton/ui/RoundButton.js";
|
|
6
6
|
import { Tag as i } from "./components/Tag/ui/Tag.js";
|
|
7
7
|
import { Switcher as d } from "./components/Switcher/ui/Switcher.js";
|
|
8
|
-
import { Text as
|
|
8
|
+
import { Text as s } from "./components/Text/ui/Text.js";
|
|
9
9
|
import { Flex as M } from "./components/Flex/ui/Flex.js";
|
|
10
10
|
import { Input as b } from "./components/Input/ui/Input.js";
|
|
11
11
|
import { Modal as F } from "./components/Modal/ui/Modal.js";
|
|
12
12
|
import { FieldInput as I } from "./components/FieldInput/ui/FieldInput.js";
|
|
13
13
|
import { F as k, L as w, M as B, a as v, S as N } from "./FilterWithSave-DjgZREIK.js";
|
|
14
14
|
import { GroupedInputs as j } from "./components/GroupedInput/ui/GroupedInputs.js";
|
|
15
|
-
import { Logo as
|
|
16
|
-
import { MetroTag as
|
|
17
|
-
import { Select as
|
|
18
|
-
import { useClientWidth as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
15
|
+
import { Logo as y } from "./components/Logo/ui/Logo.js";
|
|
16
|
+
import { MetroTag as E } from "./components/MetroTag/ui/MetroTag.js";
|
|
17
|
+
import { Select as P } from "./components/Select/ui/Select.js";
|
|
18
|
+
import { useClientWidth as Z } from "./shared/useClientWidth.js";
|
|
19
|
+
import { deepEqual as A } from "./shared/deepEqual.js";
|
|
20
|
+
import { SliderNavigation as J } from "./components/SliderNavigation/ui/SliderNavigation.js";
|
|
21
|
+
import { LotCardSkeleton as O } from "./components/LotCardSkeleton/ui/LotCardSkeleton.js";
|
|
22
|
+
import { ProjectCardSkeleton as U } from "./components/ProjectCardSkeleton/ui/ProjectCardSkeleton.js";
|
|
23
|
+
import { TabSelect as X } from "./components/TabSelect/ui/TabSelect.js";
|
|
24
|
+
import { ZoomControls as _ } from "./components/ZoomControls/ui/ZoomControls.js";
|
|
25
|
+
import { ModalSuccess as oo } from "./components/ModalSuccess/ModalSuccess.js";
|
|
26
|
+
import { SummarySelect as eo } from "./components/SummarySelect/ui/SummarySelect.js";
|
|
27
|
+
import { CheckboxSelect as po } from "./components/CheckboxSelect/ui/CheckboxSelect.js";
|
|
27
28
|
export {
|
|
28
29
|
e as Button,
|
|
29
|
-
|
|
30
|
+
po as CheckboxSelect,
|
|
30
31
|
a as DestinationTab,
|
|
31
32
|
I as FieldInput,
|
|
32
33
|
k as FilterWithSave,
|
|
33
34
|
M as Flex,
|
|
34
35
|
j as GroupedInputs,
|
|
35
36
|
b as Input,
|
|
36
|
-
|
|
37
|
+
y as Logo,
|
|
37
38
|
w as LotCard,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
O as LotCardSkeleton,
|
|
40
|
+
E as MetroTag,
|
|
41
|
+
p as MobileButton,
|
|
41
42
|
F as Modal,
|
|
42
43
|
B as ModalForm,
|
|
43
|
-
|
|
44
|
+
oo as ModalSuccess,
|
|
44
45
|
x as NewIcon,
|
|
45
|
-
|
|
46
|
+
U as ProjectCardSkeleton,
|
|
46
47
|
n as RoundButton,
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
P as Select,
|
|
49
|
+
J as SliderNavigation,
|
|
49
50
|
v as SortSelect,
|
|
50
|
-
|
|
51
|
+
eo as SummarySelect,
|
|
51
52
|
d as Switcher,
|
|
52
|
-
|
|
53
|
+
X as TabSelect,
|
|
53
54
|
N as TabSwitcher,
|
|
54
55
|
i as Tag,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
s as Text,
|
|
57
|
+
_ as ZoomControls,
|
|
58
|
+
A as deepEqual,
|
|
59
|
+
Z as useClientWidth
|
|
58
60
|
};
|