stone-kit 0.0.1061 → 0.0.1065
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 +88 -88
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/ui/Button.js +46 -38
- package/dist/components/Button/ui/Button.types.d.ts +5 -3
- package/dist/components/CheckBoxNew/CheckBoxNew.js +5 -5
- package/dist/components/CommercialLotCard/CommercialLotCard.js +81 -9
- package/dist/components/CommercialLotCard/components/PaymentLink/PaymentLink.js +4 -4
- package/dist/components/CommercialLotCard/components/Snippets/Snippets.js +98 -27
- package/dist/components/CommercialLotCard/components/Tags/Tags.js +1 -1
- package/dist/components/FilterWithSave/hooks/useFilterWithSave.js +54 -26
- package/dist/components/FilterWithSave/ui/FilterWithSave.js +323 -7
- package/dist/components/FormModal/ui/ModalForm.js +1516 -29
- package/dist/components/Logo/ui/Logo.js +6 -6
- package/dist/components/LotCard/hooks/useLotCard.js +6 -24
- package/dist/components/LotCard/index.js +2 -2
- package/dist/components/LotCard/ui/LotCard.js +222 -11
- package/dist/components/ModalSuccess/ModalSuccess.js +1 -1
- package/dist/components/RoundButton/ui/RoundButton.js +1 -1
- package/dist/components/Select/ui/Category.js +2 -2
- package/dist/components/Select/ui/Option.js +2 -2
- package/dist/components/Select/ui/Select.js +2 -2
- package/dist/components/SliderNavigation/ui/SliderNavigation.js +6 -6
- package/dist/components/SortSelect/index.js +1 -1
- package/dist/components/SortSelect/ui/SortSelect.js +108 -26
- package/dist/components/SummarySelect/ui/SummarySelect.js +1 -1
- package/dist/components/TabSelect/ui/TabSelect.js +4 -4
- package/dist/components/TabSwitcher/index.js +2 -2
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +121 -26
- package/dist/layout/components/Header/Header.js +44 -65
- package/dist/layout/components/Menu.js +15 -37
- package/dist/main.js +70 -65
- package/dist/pages/ButtonsPage/Buttons.js +44 -61
- package/dist/pages/FormsPage/FormsPage.js +22 -42
- package/dist/pages/IconsPage/IconsPage.js +9 -31
- package/dist/pages/InputPage/InputPage.js +10 -32
- package/dist/pages/LogoPage/LogoPage.js +13 -36
- package/dist/pages/LotsPage/LotsPage.js +23 -22
- package/dist/pages/ModalsPage/ModalPage.js +46 -66
- package/dist/pages/SelectPage/SelectPage.js +41 -40
- package/dist/pages/TabsPage/TabsPage.js +1 -1
- package/dist/pages/TagsPage/TagsPage.js +23 -44
- package/dist/stone-kit.css +1 -1
- package/dist/stories/entities/CommercialLotCard/CommercialLotCard.stories.js +1 -1
- package/dist/stories/shared/ui/Button/Button.stories.js +4 -4
- package/dist/stories/shared/ui/FilterWithSave/FilterWithSave.stories.js +1 -1
- package/dist/stories/shared/ui/FormModal/FormModal.stories.js +7 -7
- package/dist/stories/shared/ui/SortSelect/SortSelect.stories.js +1 -1
- package/dist/stories/shared/ui/TabSwitcher/TabSwitcher.stories.js +1 -1
- package/dist/stories/shared/ui/Tag/Tag.stories.js +4 -4
- package/dist/useLotCard-D-gK4J_o.js +186 -0
- package/package.json +1 -1
- package/dist/FilterWithSave-BxGKzdKt.js +0 -2676
- package/dist/{Option-DdjBe9yb.js → Option-DmDx_xOt.js} +1 -1
package/README.md
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
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
|
|
60
|
-
|
|
61
|
-
## Storybook в Docker
|
|
62
|
-
|
|
63
|
-
### Запуск production-сборки
|
|
64
|
-
|
|
65
|
-
Чтобы запустить готовую статическую сборку Storybook с помощью Docker и Nginx:
|
|
66
|
-
|
|
67
|
-
1. Убедитесь, что в корне проекта есть файлы `Dockerfile.prod` и `docker-compose.prod.yml`.
|
|
68
|
-
2. Выполните команду:docker system prune
|
|
69
|
-
```sh
|
|
70
|
-
docker compose -f docker-compose.prod.yml up -d --force-recreate
|
|
71
|
-
```
|
|
72
|
-
3. После завершения сборки и запуска, Storybook будет доступен по адресу `http://localhost:8080`.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
openssl req -x509 -nodes -days 365 \
|
|
77
|
-
-newkey rsa:2048 \
|
|
78
|
-
-keyout certs/privkey.key \
|
|
79
|
-
-out certs/fullchain.crt \
|
|
80
|
-
-subj "/CN=storybook.stone.ru"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
openssl req -x509 -nodes -newkey rsa:2048 \
|
|
85
|
-
-days 365 -subj "/CN=storybook.stone.ru" \
|
|
86
|
-
-keyout certs/privkey.key \
|
|
87
|
-
-out certs/fullchain.crt
|
|
88
|
-
|
|
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
|
|
60
|
+
|
|
61
|
+
## Storybook в Docker
|
|
62
|
+
|
|
63
|
+
### Запуск production-сборки
|
|
64
|
+
|
|
65
|
+
Чтобы запустить готовую статическую сборку Storybook с помощью Docker и Nginx:
|
|
66
|
+
|
|
67
|
+
1. Убедитесь, что в корне проекта есть файлы `Dockerfile.prod` и `docker-compose.prod.yml`.
|
|
68
|
+
2. Выполните команду:docker system prune
|
|
69
|
+
```sh
|
|
70
|
+
docker compose -f docker-compose.prod.yml up -d --force-recreate
|
|
71
|
+
```
|
|
72
|
+
3. После завершения сборки и запуска, Storybook будет доступен по адресу `http://localhost:8080`.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
openssl req -x509 -nodes -days 365 \
|
|
77
|
+
-newkey rsa:2048 \
|
|
78
|
+
-keyout certs/privkey.key \
|
|
79
|
+
-out certs/fullchain.crt \
|
|
80
|
+
-subj "/CN=storybook.stone.ru"
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
openssl req -x509 -nodes -newkey rsa:2048 \
|
|
85
|
+
-days 365 -subj "/CN=storybook.stone.ru" \
|
|
86
|
+
-keyout certs/privkey.key \
|
|
87
|
+
-out certs/fullchain.crt
|
|
88
|
+
|
|
89
89
|
```
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as _, jsxs as m, Fragment as c } from "react/jsx-runtime";
|
|
2
2
|
import { c as w } from "../../../index-YnD2EP-S.js";
|
|
3
3
|
import { NewIcon as f } from "../../NewIcon/ui/NewIcon.js";
|
|
4
|
-
const C = "_btnCommon_1le83_1", N = "_btnLoading_1le83_20",
|
|
4
|
+
const C = "_btnCommon_1le83_1", N = "_btnLoading_1le83_20", v = "_pre_1le83_24", S = "_post_1le83_25", H = "_isHidden_1le83_29", x = "_blue_1le83_73", B = "_lightBlue_1le83_87", $ = "_sokolniki_1le83_102", F = "_black_1le83_116", L = "_gray_1le83_130", j = "_whiteStroke_1le83_144", I = "_whiteFilled_1le83_156", p = "_shade_1le83_170", q = "_transparent_1le83_176", A = "_volodiyaLight_1le83_197", D = "_loader_1le83_203", E = "_LoaderSpin_1le83_1", G = "_loader_stroke_1le83_207", e = {
|
|
5
5
|
btnCommon: C,
|
|
6
6
|
btnLoading: N,
|
|
7
|
-
pre:
|
|
8
|
-
post:
|
|
9
|
-
isHidden:
|
|
7
|
+
pre: v,
|
|
8
|
+
post: S,
|
|
9
|
+
isHidden: H,
|
|
10
10
|
"auto-width": "_auto-width_1le83_33",
|
|
11
11
|
"full-width": "_full-width_1le83_37",
|
|
12
12
|
"tiny-size": "_tiny-size_1le83_41",
|
|
13
13
|
"small-size": "_small-size_1le83_49",
|
|
14
14
|
"medium-size": "_medium-size_1le83_57",
|
|
15
15
|
"large-size": "_large-size_1le83_65",
|
|
16
|
-
blue:
|
|
16
|
+
blue: x,
|
|
17
17
|
lightBlue: B,
|
|
18
|
-
sokolniki:
|
|
19
|
-
black:
|
|
20
|
-
gray:
|
|
21
|
-
whiteStroke:
|
|
22
|
-
whiteFilled:
|
|
23
|
-
shade:
|
|
18
|
+
sokolniki: $,
|
|
19
|
+
black: F,
|
|
20
|
+
gray: L,
|
|
21
|
+
whiteStroke: j,
|
|
22
|
+
whiteFilled: I,
|
|
23
|
+
shade: p,
|
|
24
24
|
transparent: q,
|
|
25
25
|
volodiyaLight: A,
|
|
26
26
|
loader: D,
|
|
@@ -38,58 +38,66 @@ const C = "_btnCommon_1le83_1", N = "_btnLoading_1le83_20", S = "_pre_1le83_24",
|
|
|
38
38
|
size: z = "medium",
|
|
39
39
|
size_m: h,
|
|
40
40
|
size_l: u,
|
|
41
|
-
onCLick:
|
|
42
|
-
pre:
|
|
41
|
+
onCLick: t,
|
|
42
|
+
pre: n = !1,
|
|
43
43
|
children: b = "",
|
|
44
|
-
post:
|
|
44
|
+
post: o = !1,
|
|
45
45
|
variant: k = "blue",
|
|
46
46
|
width: g = "auto",
|
|
47
47
|
additionalClass: y = "",
|
|
48
|
-
isLoading:
|
|
49
|
-
loaderIconName:
|
|
50
|
-
...
|
|
48
|
+
isLoading: i = !1,
|
|
49
|
+
loaderIconName: r = "loader",
|
|
50
|
+
...l
|
|
51
51
|
}) => {
|
|
52
|
-
const
|
|
52
|
+
const a = s(
|
|
53
53
|
e.btnCommon,
|
|
54
54
|
e[`${z}-size`],
|
|
55
55
|
e[`${h}-size_m`],
|
|
56
56
|
e[`${u}-size_l`],
|
|
57
57
|
e[`${k}`],
|
|
58
|
-
{ [e.btnLoading]:
|
|
59
|
-
{ [e.btnCommonInline]:
|
|
58
|
+
{ [e.btnLoading]: i },
|
|
59
|
+
{ [e.btnCommonInline]: n || o },
|
|
60
60
|
e[`${g}-width`],
|
|
61
61
|
y
|
|
62
|
-
),
|
|
63
|
-
|
|
62
|
+
), d = () => /* @__PURE__ */ m(c, { children: [
|
|
63
|
+
i && /* @__PURE__ */ _(
|
|
64
64
|
f,
|
|
65
65
|
{
|
|
66
|
-
name:
|
|
66
|
+
name: r,
|
|
67
67
|
size: "24",
|
|
68
68
|
color: "currentColor",
|
|
69
|
-
additionalClass: s(e.loader,
|
|
69
|
+
additionalClass: s(e.loader, r === "loaderStroke" && e.loader_stroke)
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
72
|
/* @__PURE__ */ m(c, { children: [
|
|
73
|
-
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
73
|
+
n && /* @__PURE__ */ _("div", { className: s(e.pre, { [e.isHidden]: i }), children: n }),
|
|
74
|
+
/* @__PURE__ */ _("div", { className: s({ [e.isHidden]: i }), children: b }),
|
|
75
|
+
o && /* @__PURE__ */ _("div", { className: s(e.post, { [e.isHidden]: i }), children: o })
|
|
76
76
|
] })
|
|
77
77
|
] });
|
|
78
|
-
return
|
|
78
|
+
return l.as === "box" ? (delete l.as, /* @__PURE__ */ _(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
className: a,
|
|
82
|
+
onClick: t,
|
|
83
|
+
...l,
|
|
84
|
+
children: d()
|
|
85
|
+
}
|
|
86
|
+
)) : l.as === "link" ? (delete l.as, /* @__PURE__ */ _(
|
|
79
87
|
"a",
|
|
80
88
|
{
|
|
81
|
-
className:
|
|
82
|
-
onClick:
|
|
83
|
-
...
|
|
84
|
-
children:
|
|
89
|
+
className: a,
|
|
90
|
+
onClick: t,
|
|
91
|
+
...l,
|
|
92
|
+
children: d()
|
|
85
93
|
}
|
|
86
|
-
)) : (delete
|
|
94
|
+
)) : (delete l.as, /* @__PURE__ */ _(
|
|
87
95
|
"button",
|
|
88
96
|
{
|
|
89
|
-
className:
|
|
90
|
-
onClick:
|
|
91
|
-
...
|
|
92
|
-
children:
|
|
97
|
+
className: a,
|
|
98
|
+
onClick: t,
|
|
99
|
+
...l,
|
|
100
|
+
children: d()
|
|
93
101
|
}
|
|
94
102
|
));
|
|
95
103
|
};
|
|
@@ -15,7 +15,7 @@ export declare const BUTTON_VARIANTS: {
|
|
|
15
15
|
export type btnVariant = keyof typeof BUTTON_VARIANTS;
|
|
16
16
|
type btnSizes = 'large' | 'medium' | 'small' | 'tiny';
|
|
17
17
|
type TLoaderIconName = 'loader' | 'loaderStroke';
|
|
18
|
-
interface ButtonProps {
|
|
18
|
+
export interface ButtonProps {
|
|
19
19
|
size?: btnSizes;
|
|
20
20
|
size_m?: btnSizes;
|
|
21
21
|
size_l?: btnSizes;
|
|
@@ -27,12 +27,14 @@ interface ButtonProps {
|
|
|
27
27
|
additionalClass?: string;
|
|
28
28
|
isLoading?: boolean;
|
|
29
29
|
loaderIconName?: TLoaderIconName;
|
|
30
|
-
as?: 'button' | 'link';
|
|
30
|
+
as?: 'button' | 'link' | 'box';
|
|
31
31
|
onCLick?: () => any;
|
|
32
32
|
}
|
|
33
33
|
export type ComponentProps = ButtonProps & ((React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
34
34
|
as?: 'button';
|
|
35
35
|
}) | (React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
36
36
|
as?: 'link';
|
|
37
|
-
} & Required<Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>>)
|
|
37
|
+
} & Required<Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>>) | (React.HTMLAttributes<HTMLDivElement> & {
|
|
38
|
+
as?: 'box';
|
|
39
|
+
}));
|
|
38
40
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as _, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { c as m } from "../../index-YnD2EP-S.js";
|
|
3
|
+
import { forwardRef as h } from "react";
|
|
4
|
+
import { Input as p } from "../Input/ui/Input.js";
|
|
5
5
|
import { NewIcon as d } from "../NewIcon/ui/NewIcon.js";
|
|
6
6
|
const i = "_checkboxLabel_14vcp_1", k = "_labelText_14vcp_36", T = "_labelTextModal_14vcp_44", f = "_error_14vcp_49", v = "_checkIcon_14vcp_58", e = {
|
|
7
7
|
checkboxLabel: i,
|
|
@@ -9,10 +9,10 @@ const i = "_checkboxLabel_14vcp_1", k = "_labelText_14vcp_36", T = "_labelTextMo
|
|
|
9
9
|
labelTextModal: T,
|
|
10
10
|
error: f,
|
|
11
11
|
checkIcon: v
|
|
12
|
-
}, t =
|
|
12
|
+
}, t = m.bind(e), w = h(
|
|
13
13
|
({ text: c, isChecked: l, error: r, children: n, emitIsChecked: a, modalFontSize: s, ...b }, x) => /* @__PURE__ */ _("label", { className: t(e.checkboxLabel, { [e.error]: r }), children: [
|
|
14
14
|
/* @__PURE__ */ o(
|
|
15
|
-
|
|
15
|
+
p,
|
|
16
16
|
{
|
|
17
17
|
type: "checkbox",
|
|
18
18
|
...b,
|
|
@@ -1,11 +1,83 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "../../index-YnD2EP-S.js";
|
|
3
|
-
import "../../shared/fmtNumber.js";
|
|
4
|
-
import "./components/Price/Price.js";
|
|
5
|
-
import {
|
|
6
|
-
import "./components/Tags/Tags.js";
|
|
7
|
-
import "../FavoriteIcon/FavoriteIcon.js";
|
|
8
|
-
import "./components/PaymentLink/PaymentLink.js";
|
|
1
|
+
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as b } from "../../index-YnD2EP-S.js";
|
|
3
|
+
import { fmtNumber as v } from "../../shared/fmtNumber.js";
|
|
4
|
+
import { Price as y } from "./components/Price/Price.js";
|
|
5
|
+
import { Snippets as I } from "./components/Snippets/Snippets.js";
|
|
6
|
+
import { Tags as m } from "./components/Tags/Tags.js";
|
|
7
|
+
import { FavoriteIcon as P } from "../FavoriteIcon/FavoriteIcon.js";
|
|
8
|
+
import { PaymentLink as L } from "./components/PaymentLink/PaymentLink.js";
|
|
9
|
+
const w = "_root_uzpph_1", C = "_lotImageWrapper_uzpph_17", k = "_lotNameContent_uzpph_24", x = "_lotNameWrapper_uzpph_30", R = "_lotName_uzpph_24", S = "_lotNumber_uzpph_45", j = "_content_uzpph_54", F = "_featuresWrapper_uzpph_60", T = "_tags_uzpph_65", D = "_rootRow_uzpph_70", q = "_price_uzpph_105", A = "_paymentLink_uzpph_108", e = {
|
|
10
|
+
root: w,
|
|
11
|
+
lotImageWrapper: C,
|
|
12
|
+
lotNameContent: k,
|
|
13
|
+
lotNameWrapper: x,
|
|
14
|
+
lotName: R,
|
|
15
|
+
lotNumber: S,
|
|
16
|
+
content: j,
|
|
17
|
+
featuresWrapper: F,
|
|
18
|
+
tags: T,
|
|
19
|
+
rootRow: D,
|
|
20
|
+
price: q,
|
|
21
|
+
paymentLink: A
|
|
22
|
+
}, B = b.bind(e), X = ({
|
|
23
|
+
lot: a,
|
|
24
|
+
hidFinParam: s = !1,
|
|
25
|
+
imgNode: c,
|
|
26
|
+
onPriceClickHandler: l,
|
|
27
|
+
addClassname: i,
|
|
28
|
+
isVertical: p = !1,
|
|
29
|
+
isFavorite: _,
|
|
30
|
+
favoriteClickHandler: r,
|
|
31
|
+
isMoreDetails: u
|
|
32
|
+
}) => {
|
|
33
|
+
const { interiorPlanImg: N, floorPlanImg: h, area: g, subTypeName: d, number: f } = a || {}, z = d + ", " + v(g) + "м²", W = N ?? h ?? "";
|
|
34
|
+
return a ? /* @__PURE__ */ o("div", { className: B(e.root, i, { [e.rootRow]: !p }), children: [
|
|
35
|
+
/* @__PURE__ */ o("div", { className: e.lotImageWrapper, children: [
|
|
36
|
+
c || /* @__PURE__ */ t(
|
|
37
|
+
"img",
|
|
38
|
+
{
|
|
39
|
+
loading: "lazy",
|
|
40
|
+
src: W,
|
|
41
|
+
width: 295,
|
|
42
|
+
height: 213,
|
|
43
|
+
alt: "logo_image"
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
r && /* @__PURE__ */ t(
|
|
47
|
+
P,
|
|
48
|
+
{
|
|
49
|
+
handleClickFavorite: (n) => {
|
|
50
|
+
r && r(a), n.preventDefault(), n.stopPropagation();
|
|
51
|
+
},
|
|
52
|
+
isFavorite: _
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ o("div", { className: e.content, children: [
|
|
57
|
+
/* @__PURE__ */ o("div", { className: e.lotNameWrapper, children: [
|
|
58
|
+
/* @__PURE__ */ o("div", { className: e.lotNameContent, children: [
|
|
59
|
+
/* @__PURE__ */ t("p", { className: e.lotName, children: z }),
|
|
60
|
+
/* @__PURE__ */ t("p", { className: e.lotNumber, children: f }),
|
|
61
|
+
/* @__PURE__ */ t(I, { lot: a }),
|
|
62
|
+
/* @__PURE__ */ t(m, { lot: a, classname: e.tags })
|
|
63
|
+
] }),
|
|
64
|
+
!s && /* @__PURE__ */ t(
|
|
65
|
+
y,
|
|
66
|
+
{
|
|
67
|
+
lot: a,
|
|
68
|
+
isVertical: p,
|
|
69
|
+
onPriceClickHandler: l,
|
|
70
|
+
classname: e.price
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ o("div", { className: e.featuresWrapper, children: [
|
|
75
|
+
/* @__PURE__ */ t(m, { lot: a, classname: e.tags }),
|
|
76
|
+
/* @__PURE__ */ t(L, { specialProgram: a.specialProgram, classname: e.paymentLink, isMoreDetails: u })
|
|
77
|
+
] })
|
|
78
|
+
] })
|
|
79
|
+
] }) : null;
|
|
80
|
+
};
|
|
9
81
|
export {
|
|
10
|
-
|
|
82
|
+
X as CommercialLotCard
|
|
11
83
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { c as o } from "../../../../index-YnD2EP-S.js";
|
|
3
|
+
import { NewIcon as t } from "../../../NewIcon/ui/NewIcon.js";
|
|
4
4
|
const m = "_paymentWrapper_1ywol_1", c = {
|
|
5
5
|
paymentWrapper: m
|
|
6
6
|
}, f = ({ specialProgram: e, classname: a, isMoreDetails: n }) => {
|
|
7
7
|
const p = !!e;
|
|
8
|
-
return /* @__PURE__ */ s("div", { className:
|
|
8
|
+
return /* @__PURE__ */ s("div", { className: o(c.paymentWrapper, a), children: [
|
|
9
9
|
/* @__PURE__ */ r("span", { children: p || n ? "Узнать подробности" : "Доступно несколько способов оплаты" }),
|
|
10
10
|
/* @__PURE__ */ r(
|
|
11
|
-
|
|
11
|
+
t,
|
|
12
12
|
{
|
|
13
13
|
name: "arrowRight",
|
|
14
14
|
size: "20"
|
|
@@ -1,29 +1,100 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "../../../
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { jsxs as f, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as A } from "react";
|
|
3
|
+
import { getTagsFeatures as B } from "../../utils/getTagsFeatures.js";
|
|
4
|
+
import { c as I } from "../../../../index-YnD2EP-S.js";
|
|
5
|
+
import { useClientWidth as k } from "../../../../shared/useClientWidth.js";
|
|
6
|
+
import { NewIcon as C } from "../../../NewIcon/ui/NewIcon.js";
|
|
7
|
+
const M = "_snippet_1vgdm_1", W = "_snippetLast_1vgdm_9", j = "_snippets_1vgdm_25", D = "_retailSnippets_1vgdm_30", E = "_shownSnippets_1vgdm_35", F = "_addSnippets_1vgdm_64", T = "_addSnippetsActive_1vgdm_80", V = "_addSnippetsList_1vgdm_85", y = "_closeSnippetBtn_1vgdm_129", t = {
|
|
8
|
+
snippet: M,
|
|
9
|
+
snippetLast: W,
|
|
10
|
+
snippets: j,
|
|
11
|
+
retailSnippets: D,
|
|
12
|
+
shownSnippets: E,
|
|
13
|
+
addSnippets: F,
|
|
14
|
+
addSnippetsActive: T,
|
|
15
|
+
addSnippetsList: V,
|
|
16
|
+
closeSnippetBtn: y
|
|
17
|
+
}, L = I.bind(t), K = ({ lot: g }) => {
|
|
18
|
+
const { type: w, windowViews: c, isCorner: N } = g || {}, [u, h] = A(!1), S = B({ ...g }), { isDesktop: r, isMobile: x } = k();
|
|
19
|
+
if (w === 3) {
|
|
20
|
+
if (x && (!c || c.length === 0))
|
|
21
|
+
return null;
|
|
22
|
+
let l = 0;
|
|
23
|
+
const i = r ? 36 : 28, n = [], d = [];
|
|
24
|
+
if (N) {
|
|
25
|
+
const e = "Угловая";
|
|
26
|
+
if (l + e.length <= i)
|
|
27
|
+
n.push(e), l += e.length;
|
|
28
|
+
else
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
if (c) {
|
|
32
|
+
const e = c.filter((p) => p && p.trim() !== "");
|
|
33
|
+
let s = 0, a = l;
|
|
34
|
+
for (let p = 0; p < e.length; p++) {
|
|
35
|
+
const m = e[p], _ = s > 0 ? " " + m : m;
|
|
36
|
+
if (a + _.length <= i)
|
|
37
|
+
n.push(m), a += _.length, s++;
|
|
38
|
+
else {
|
|
39
|
+
if (s === 0) {
|
|
40
|
+
const v = i - a;
|
|
41
|
+
if (v > 3) {
|
|
42
|
+
const b = m.substring(0, v - 3) + "...";
|
|
43
|
+
n.push(b), a = i;
|
|
44
|
+
} else
|
|
45
|
+
n.push("..."), a += 3;
|
|
46
|
+
}
|
|
47
|
+
d.push(...e.slice(p));
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
l = a;
|
|
52
|
+
}
|
|
53
|
+
return /* @__PURE__ */ f("div", { className: t.retailSnippets, children: [
|
|
54
|
+
/* @__PURE__ */ o("ul", { className: t.shownSnippets, children: n?.map((e, s) => /* @__PURE__ */ o("li", { className: t.snippets, children: e }, s)) }),
|
|
55
|
+
d?.length > 0 && /* @__PURE__ */ f(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: L(t.addSnippets, { [t.addSnippetsActive]: u }),
|
|
59
|
+
onClick: (e) => {
|
|
60
|
+
r || (e.stopPropagation(), e.preventDefault(), h((s) => !s));
|
|
61
|
+
},
|
|
62
|
+
onMouseEnter: () => {
|
|
63
|
+
r && h(!0);
|
|
64
|
+
},
|
|
65
|
+
onMouseLeave: () => {
|
|
66
|
+
r && h(!1);
|
|
67
|
+
},
|
|
68
|
+
children: [
|
|
69
|
+
"+" + d?.length,
|
|
70
|
+
u && /* @__PURE__ */ f("ul", { className: t.addSnippetsList, children: [
|
|
71
|
+
d.map((e, s) => /* @__PURE__ */ o("li", { children: e }, s)),
|
|
72
|
+
/* @__PURE__ */ o("div", { className: t.closeSnippetBtn, children: /* @__PURE__ */ o(
|
|
73
|
+
C,
|
|
74
|
+
{
|
|
75
|
+
name: "close",
|
|
76
|
+
size: "16",
|
|
77
|
+
color: "#ffffff"
|
|
78
|
+
}
|
|
79
|
+
) })
|
|
80
|
+
] })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
] });
|
|
85
|
+
}
|
|
86
|
+
return S.length ? /* @__PURE__ */ o("div", { className: t.snippets, children: S.map((l, i) => {
|
|
87
|
+
const n = i === S.length - 1;
|
|
88
|
+
return /* @__PURE__ */ o(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
className: L(t.snippet, n ? "" : t.snippetLast),
|
|
92
|
+
children: l.text
|
|
93
|
+
},
|
|
94
|
+
i
|
|
95
|
+
);
|
|
96
|
+
}) }) : null;
|
|
97
|
+
};
|
|
27
98
|
export {
|
|
28
|
-
|
|
99
|
+
K as Snippets
|
|
29
100
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Tag as n } from "../../../Tag/ui/Tag.js";
|
|
3
2
|
import { c as u } from "../../../../index-YnD2EP-S.js";
|
|
3
|
+
import { Tag as n } from "../../../Tag/ui/Tag.js";
|
|
4
4
|
const f = "_root_xiuq1_1", x = {
|
|
5
5
|
root: f
|
|
6
6
|
}, b = ({ lot: g, classname: d }) => {
|