stone-kit 0.0.1038 → 0.0.1048
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/dist/Option-DmDx_xOt.js +99 -0
- package/dist/components/CommercialLotCard/CommercialLotCard.d.ts +1 -1
- package/dist/components/CommercialLotCard/CommercialLotCard.js +64 -55
- package/dist/components/CommercialLotCard/components/PaymentLink/PaymentLink.d.ts +7 -0
- package/dist/components/CommercialLotCard/components/PaymentLink/PaymentLink.js +21 -0
- package/dist/components/CommercialLotCard/components/Price/Price.d.ts +2 -1
- package/dist/components/CommercialLotCard/components/Price/Price.js +21 -33
- package/dist/components/CommercialLotCard/components/Tags/Tags.d.ts +2 -1
- package/dist/components/CommercialLotCard/components/Tags/Tags.js +8 -7
- package/dist/components/CommercialLotCard/types/CommercialLotCard.types.d.ts +1 -0
- package/dist/components/FavoriteIcon/FavoriteIcon.d.ts +7 -0
- package/dist/components/FavoriteIcon/FavoriteIcon.js +66 -0
- package/dist/components/FavoriteIcon/Heart.d.ts +3 -0
- package/dist/components/FavoriteIcon/Heart.js +24 -0
- package/dist/components/FavoriteIcon/HeartFilled.d.ts +5 -0
- package/dist/components/FavoriteIcon/HeartFilled.js +27 -0
- package/dist/components/FilterWithSave/ui/FilterWithSave.js +1 -1
- package/dist/components/LotCard/hooks/useLotCard.js +1 -1
- package/dist/components/LotCard/ui/LotCard.js +33 -45
- package/dist/components/Select/model/selectMode.d.ts +4 -2
- package/dist/components/Select/model/selectMode.js +53 -30
- package/dist/components/Select/ui/Category.js +43 -40
- package/dist/components/Select/ui/Option.js +1 -1
- package/dist/components/Select/ui/Select.js +98 -96
- package/dist/components/SummarySelect/ui/SummarySelect.d.ts +2 -0
- package/dist/components/SummarySelect/ui/SummarySelect.js +97 -91
- package/dist/pages/LotsPage/LotsPage.js +22 -16
- package/dist/stone-kit.css +1 -1
- package/dist/useLotCard-D-gK4J_o.js +186 -0
- package/package.json +1 -1
- package/dist/Option-DI87iJMM.js +0 -98
- package/dist/useLotCard-DPqIlj09.js +0 -187
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsxs as S, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { c as g } from "./index-YnD2EP-S.js";
|
|
3
|
+
import { NewIcon as p } from "./components/NewIcon/ui/NewIcon.js";
|
|
4
|
+
const f = "_multiSelectWrapper_1n881_1", h = "_loaderWrapper_1n881_8", w = "_emptyStateWrapper_1n881_15", L = "_loader_1n881_8", W = "_rotate_1n881_1", y = "_selectedOptions_1n881_37", k = "_selectedText_1n881_55", v = "_selectedOptionsBtn_1n881_63", x = "_selectedOptionsOpened_1n881_89", D = "_selectedOptionsNotEmpty_1n881_93", N = "_selectOptionsDisabled_1n881_98", B = "_optionsOuterContainer_1n881_105", A = "_optionLabel_1n881_118", E = "_betweenSize_small_1n881_124", R = "_betweenSize_medium_1n881_128", T = "_optionsList_1n881_132", j = "_scroll_standard_1n881_161", H = "_scroll_compact_1n881_165", P = "_lastList_1n881_170", U = "_listRight_1n881_175", $ = "_inputWrapper_1n881_179", q = "_option_1n881_105", F = "_category_1n881_201", G = "_leftSide_1n881_207", I = "_optionCategory_1n881_212", J = "_isPositionLeftCheckbox_1n881_218", K = "_optionDisabled_1n881_223", M = "_optionClickable_1n881_227", Q = "_icon_1n881_231", V = "_iconArrow_1n881_237", X = "_iconBtn_1n881_243", t = {
|
|
5
|
+
multiSelectWrapper: f,
|
|
6
|
+
loaderWrapper: h,
|
|
7
|
+
emptyStateWrapper: w,
|
|
8
|
+
loader: L,
|
|
9
|
+
rotate: W,
|
|
10
|
+
selectedOptions: y,
|
|
11
|
+
selectedText: k,
|
|
12
|
+
selectedOptionsBtn: v,
|
|
13
|
+
"small-size": "_small-size_1n881_68",
|
|
14
|
+
"medium-size": "_medium-size_1n881_75",
|
|
15
|
+
"large-size": "_large-size_1n881_82",
|
|
16
|
+
selectedOptionsOpened: x,
|
|
17
|
+
selectedOptionsNotEmpty: D,
|
|
18
|
+
selectOptionsDisabled: N,
|
|
19
|
+
optionsOuterContainer: B,
|
|
20
|
+
optionLabel: A,
|
|
21
|
+
betweenSize_small: E,
|
|
22
|
+
betweenSize_medium: R,
|
|
23
|
+
optionsList: T,
|
|
24
|
+
scroll_standard: j,
|
|
25
|
+
scroll_compact: H,
|
|
26
|
+
lastList: P,
|
|
27
|
+
listRight: U,
|
|
28
|
+
inputWrapper: $,
|
|
29
|
+
option: q,
|
|
30
|
+
category: F,
|
|
31
|
+
leftSide: G,
|
|
32
|
+
optionCategory: I,
|
|
33
|
+
isPositionLeftCheckbox: J,
|
|
34
|
+
optionDisabled: K,
|
|
35
|
+
optionClickable: M,
|
|
36
|
+
icon: Q,
|
|
37
|
+
iconArrow: V,
|
|
38
|
+
iconBtn: X,
|
|
39
|
+
"small-size_m": "_small-size_m_1n881_256",
|
|
40
|
+
"medium-size_m": "_medium-size_m_1n881_262",
|
|
41
|
+
"large-size_m": "_large-size_m_1n881_268",
|
|
42
|
+
"small-size_l": "_small-size_l_1n881_283",
|
|
43
|
+
"medium-size_l": "_medium-size_l_1n881_289",
|
|
44
|
+
"large-size_l": "_large-size_l_1n881_295"
|
|
45
|
+
}, Y = g.bind(t), ne = ({
|
|
46
|
+
option: e,
|
|
47
|
+
selectedOptions: d,
|
|
48
|
+
disabledOptions: m,
|
|
49
|
+
clickableOptions: n,
|
|
50
|
+
handleOptionClick: u,
|
|
51
|
+
isOptionCategory: s,
|
|
52
|
+
isPositionLeftCheckbox: o = !1,
|
|
53
|
+
sizeIcon: c,
|
|
54
|
+
dataTestId: z,
|
|
55
|
+
isDisabledNotClickable: b,
|
|
56
|
+
addClassName: O = ""
|
|
57
|
+
}) => {
|
|
58
|
+
const C = n ? n.includes(`${e.value}`) : !0, a = e.value === "selectAll", _ = d.some((i) => i.value === e.value), r = () => a ? !1 : b && n ? !n.includes(`${e.value}`) : m.some((i) => i.value === e.value);
|
|
59
|
+
return /* @__PURE__ */ S(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: Y(
|
|
63
|
+
t.option,
|
|
64
|
+
{
|
|
65
|
+
[t.optionDisabled]: r(),
|
|
66
|
+
[t.optionCategory]: s,
|
|
67
|
+
[t.isPositionLeftCheckbox]: o,
|
|
68
|
+
[t.optionClickable]: C || a
|
|
69
|
+
},
|
|
70
|
+
O
|
|
71
|
+
),
|
|
72
|
+
"data-testid": z,
|
|
73
|
+
onClick: () => {
|
|
74
|
+
r() && !_ || u(e);
|
|
75
|
+
},
|
|
76
|
+
children: [
|
|
77
|
+
(s || o) && /* @__PURE__ */ l(
|
|
78
|
+
p,
|
|
79
|
+
{
|
|
80
|
+
size: c ?? "20",
|
|
81
|
+
name: _ ? "selectChecked" : "selectUncheckedHollow"
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ l("div", { className: t.optionLabel, children: e.label }),
|
|
85
|
+
!s && !o && /* @__PURE__ */ l(
|
|
86
|
+
p,
|
|
87
|
+
{
|
|
88
|
+
size: c ?? "20",
|
|
89
|
+
name: _ ? "selectChecked" : "selectUncheckedHollow"
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
ne as O,
|
|
98
|
+
t as s
|
|
99
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ICommercialLotCard } from './types/CommercialLotCard.types';
|
|
2
|
-
export declare const CommercialLotCard: ({ lot, imgNode, onPriceClickHandler, addClassname, isVertical, isFavorite, favoriteClickHandler, }: ICommercialLotCard) => import("react/jsx-runtime").JSX.Element | null;
|
|
2
|
+
export declare const CommercialLotCard: ({ lot, imgNode, onPriceClickHandler, addClassname, isVertical, isFavorite, favoriteClickHandler, isMoreDetails }: ICommercialLotCard) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,73 +1,82 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { fmtNumber as
|
|
4
|
-
import { Price as
|
|
5
|
-
import { Snippets as
|
|
6
|
-
import { Tags as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as W } from "../../index-YnD2EP-S.js";
|
|
3
|
+
import { fmtNumber as b } from "../../shared/fmtNumber.js";
|
|
4
|
+
import { Price as v } from "./components/Price/Price.js";
|
|
5
|
+
import { Snippets as y } from "./components/Snippets/Snippets.js";
|
|
6
|
+
import { Tags as m } from "./components/Tags/Tags.js";
|
|
7
|
+
import { FavoriteIcon as I } from "../FavoriteIcon/FavoriteIcon.js";
|
|
8
|
+
import { PaymentLink as P } from "./components/PaymentLink/PaymentLink.js";
|
|
9
|
+
const L = "_root_uzpph_1", w = "_lotImageWrapper_uzpph_17", C = "_lotNameContent_uzpph_24", k = "_lotNameWrapper_uzpph_30", x = "_lotName_uzpph_24", R = "_lotNumber_uzpph_45", S = "_content_uzpph_54", j = "_featuresWrapper_uzpph_60", F = "_tags_uzpph_65", T = "_rootRow_uzpph_70", D = "_price_uzpph_105", q = "_paymentLink_uzpph_108", e = {
|
|
10
|
+
root: L,
|
|
11
|
+
lotImageWrapper: w,
|
|
12
|
+
lotNameContent: C,
|
|
13
|
+
lotNameWrapper: k,
|
|
14
|
+
lotName: x,
|
|
15
|
+
lotNumber: R,
|
|
16
|
+
content: S,
|
|
17
|
+
featuresWrapper: j,
|
|
18
|
+
tags: F,
|
|
19
|
+
rootRow: T,
|
|
20
|
+
price: D,
|
|
21
|
+
paymentLink: q
|
|
22
|
+
}, A = W.bind(e), U = ({
|
|
23
|
+
lot: o,
|
|
19
24
|
imgNode: s,
|
|
20
|
-
onPriceClickHandler:
|
|
21
|
-
addClassname:
|
|
22
|
-
isVertical:
|
|
23
|
-
isFavorite:
|
|
24
|
-
favoriteClickHandler:
|
|
25
|
+
onPriceClickHandler: c,
|
|
26
|
+
addClassname: i,
|
|
27
|
+
isVertical: p = !1,
|
|
28
|
+
isFavorite: l,
|
|
29
|
+
favoriteClickHandler: r,
|
|
30
|
+
isMoreDetails: _
|
|
25
31
|
}) => {
|
|
26
|
-
const { interiorPlanImg:
|
|
27
|
-
return
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
s || /* @__PURE__ */
|
|
32
|
+
const { interiorPlanImg: u, floorPlanImg: N, area: h, subTypeName: g, number: d } = o || {}, f = g + ", " + b(h) + "м²", z = u ?? N ?? "";
|
|
33
|
+
return o ? /* @__PURE__ */ a("div", { className: A(e.root, i, { [e.rootRow]: !p }), children: [
|
|
34
|
+
/* @__PURE__ */ a("div", { className: e.lotImageWrapper, children: [
|
|
35
|
+
s || /* @__PURE__ */ t(
|
|
30
36
|
"img",
|
|
31
37
|
{
|
|
32
38
|
loading: "lazy",
|
|
33
|
-
src:
|
|
39
|
+
src: z,
|
|
34
40
|
width: 295,
|
|
35
41
|
height: 213,
|
|
36
42
|
alt: "logo_image"
|
|
37
43
|
}
|
|
38
44
|
),
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
r && /* @__PURE__ */ t(
|
|
46
|
+
I,
|
|
41
47
|
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
variant: "fullGray",
|
|
47
|
-
color: "#015FF9",
|
|
48
|
-
additionalClass: r.favoriteBtn,
|
|
49
|
-
onClick: (i) => {
|
|
50
|
-
a && a(e), i.preventDefault(), i.stopPropagation();
|
|
51
|
-
}
|
|
48
|
+
handleClickFavorite: (n) => {
|
|
49
|
+
r && r(o), n.preventDefault(), n.stopPropagation();
|
|
50
|
+
},
|
|
51
|
+
isFavorite: l
|
|
52
52
|
}
|
|
53
53
|
)
|
|
54
54
|
] }),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
/* @__PURE__ */ a("div", { className: e.content, children: [
|
|
56
|
+
/* @__PURE__ */ a("div", { className: e.lotNameWrapper, children: [
|
|
57
|
+
/* @__PURE__ */ a("div", { className: e.lotNameContent, children: [
|
|
58
|
+
/* @__PURE__ */ t("p", { className: e.lotName, children: f }),
|
|
59
|
+
/* @__PURE__ */ t("p", { className: e.lotNumber, children: d }),
|
|
60
|
+
/* @__PURE__ */ t(y, { lot: o }),
|
|
61
|
+
/* @__PURE__ */ t(m, { lot: o, classname: e.tags })
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ t(
|
|
64
|
+
v,
|
|
65
|
+
{
|
|
66
|
+
lot: o,
|
|
67
|
+
isVertical: p,
|
|
68
|
+
onPriceClickHandler: c,
|
|
69
|
+
classname: e.price
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ a("div", { className: e.featuresWrapper, children: [
|
|
74
|
+
/* @__PURE__ */ t(m, { lot: o, classname: e.tags }),
|
|
75
|
+
/* @__PURE__ */ t(P, { specialProgram: o.specialProgram, classname: e.paymentLink, isMoreDetails: _ })
|
|
76
|
+
] })
|
|
77
|
+
] })
|
|
69
78
|
] }) : null;
|
|
70
79
|
};
|
|
71
80
|
export {
|
|
72
|
-
|
|
81
|
+
U as CommercialLotCard
|
|
73
82
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as o } from "../../../../index-YnD2EP-S.js";
|
|
3
|
+
import { NewIcon as t } from "../../../NewIcon/ui/NewIcon.js";
|
|
4
|
+
const m = "_paymentWrapper_1ywol_1", c = {
|
|
5
|
+
paymentWrapper: m
|
|
6
|
+
}, f = ({ specialProgram: e, classname: a, isMoreDetails: n }) => {
|
|
7
|
+
const p = !!e;
|
|
8
|
+
return /* @__PURE__ */ s("div", { className: o(c.paymentWrapper, a), children: [
|
|
9
|
+
/* @__PURE__ */ r("span", { children: p || n ? "Узнать подробности" : "Доступно несколько способов оплаты" }),
|
|
10
|
+
/* @__PURE__ */ r(
|
|
11
|
+
t,
|
|
12
|
+
{
|
|
13
|
+
name: "arrowRight",
|
|
14
|
+
size: "20"
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
] });
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
f as PaymentLink
|
|
21
|
+
};
|
|
@@ -3,6 +3,7 @@ interface IPrice {
|
|
|
3
3
|
lot: ILot;
|
|
4
4
|
isVertical?: boolean;
|
|
5
5
|
onPriceClickHandler?: () => void;
|
|
6
|
+
classname?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare const Price: ({ lot, onPriceClickHandler, isVertical }: IPrice) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Price: ({ lot, onPriceClickHandler, isVertical, classname }: IPrice) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,51 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as e, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { formatPrice as y } from "../../utils/formatPrice.js";
|
|
2
3
|
import { c as d } from "../../../../index-YnD2EP-S.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
paymentWrapper: b,
|
|
9
|
-
rootVertical: x
|
|
10
|
-
}, V = d.bind(r), S = ({ lot: s, onPriceClickHandler: i, isVertical: n }) => {
|
|
4
|
+
const N = "_root_1yqa7_1", w = "_price_1yqa7_7", V = "_rootVertical_1yqa7_25", r = {
|
|
5
|
+
root: N,
|
|
6
|
+
price: w,
|
|
7
|
+
rootVertical: V
|
|
8
|
+
}, x = ({ lot: c, onPriceClickHandler: s, isVertical: a, classname: n }) => {
|
|
11
9
|
const {
|
|
12
10
|
project: l,
|
|
13
|
-
sellingPriceBeforeDiscount:
|
|
14
|
-
showPriceFlg:
|
|
11
|
+
sellingPriceBeforeDiscount: p,
|
|
12
|
+
showPriceFlg: m,
|
|
15
13
|
direction: f,
|
|
16
|
-
specialProgram:
|
|
17
|
-
sellingPrice:
|
|
18
|
-
} =
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
14
|
+
specialProgram: P,
|
|
15
|
+
sellingPrice: _
|
|
16
|
+
} = c || {}, h = !!l?.showPriceSubType?.some((o) => Number(o.filter) === c.subType), g = !!P, i = p ?? _, t = i && m && !g && h;
|
|
17
|
+
return /* @__PURE__ */ e("div", { className: d(r.root, { [r.rootVertical]: a }, n), children: [
|
|
18
|
+
t && /* @__PURE__ */ e("p", { className: r.price, children: [
|
|
21
19
|
" ",
|
|
22
|
-
|
|
20
|
+
y(i, !1, f)
|
|
23
21
|
] }),
|
|
24
|
-
!
|
|
22
|
+
!t && /* @__PURE__ */ e(
|
|
25
23
|
"p",
|
|
26
24
|
{
|
|
27
25
|
className: r.price,
|
|
28
|
-
onClick: (
|
|
29
|
-
|
|
26
|
+
onClick: (o) => {
|
|
27
|
+
o.preventDefault(), o.stopPropagation(), s && s();
|
|
30
28
|
},
|
|
31
29
|
children: [
|
|
32
30
|
"Цена ",
|
|
33
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ u("span", { children: "по запросу" })
|
|
34
32
|
]
|
|
35
33
|
}
|
|
36
|
-
)
|
|
37
|
-
/* @__PURE__ */ o("div", { className: r.paymentWrapper, children: [
|
|
38
|
-
/* @__PURE__ */ c("span", { children: t ? "Узнать подробности" : "Доступно несколько способов оплаты" }),
|
|
39
|
-
/* @__PURE__ */ c(
|
|
40
|
-
g,
|
|
41
|
-
{
|
|
42
|
-
name: "arrowRight",
|
|
43
|
-
size: "20"
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
] })
|
|
34
|
+
)
|
|
47
35
|
] });
|
|
48
36
|
};
|
|
49
37
|
export {
|
|
50
|
-
|
|
38
|
+
x as Price
|
|
51
39
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ILot } from '../../types/LotCard';
|
|
2
2
|
interface ITags {
|
|
3
3
|
lot: ILot;
|
|
4
|
+
classname?: string;
|
|
4
5
|
}
|
|
5
|
-
export declare const Tags: ({ lot }: ITags) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const Tags: ({ lot, classname }: ITags) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { c as u } from "../../../../index-YnD2EP-S.js";
|
|
2
3
|
import { Tag as n } from "../../../Tag/ui/Tag.js";
|
|
3
|
-
const
|
|
4
|
-
root:
|
|
5
|
-
},
|
|
6
|
-
const { housing: s, floor: r, endFloor: t, floorsNumber: o, type:
|
|
7
|
-
return /* @__PURE__ */
|
|
4
|
+
const f = "_root_xiuq1_1", x = {
|
|
5
|
+
root: f
|
|
6
|
+
}, b = ({ lot: g, classname: d }) => {
|
|
7
|
+
const { housing: s, floor: r, endFloor: t, floorsNumber: o, type: m, project: e } = g || {}, a = m === 11, c = r && o ? (t && t !== r ? r + "-" + t : r) + " этаж из " + o : "", l = () => a ? o ? "Кол-во этажей: " + o : "" : c || "";
|
|
8
|
+
return /* @__PURE__ */ p("div", { className: u(x.root, d), children: [
|
|
8
9
|
e?.buildingYear && /* @__PURE__ */ i(
|
|
9
10
|
n,
|
|
10
11
|
{
|
|
@@ -32,5 +33,5 @@ const p = "_root_xiuq1_1", x = {
|
|
|
32
33
|
] });
|
|
33
34
|
};
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
+
b as Tags
|
|
36
37
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface IFavoriteIcon {
|
|
2
|
+
handleClickFavorite: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
3
|
+
isFavorite?: boolean;
|
|
4
|
+
uniqueId?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const FavoriteIcon: ({ handleClickFavorite, isFavorite, uniqueId }: IFavoriteIcon) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsxs as a, Fragment as _, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useRef as d, useEffect as h } from "react";
|
|
3
|
+
import { createPortal as T } from "react-dom";
|
|
4
|
+
import x from "./Heart.js";
|
|
5
|
+
import y from "./HeartFilled.js";
|
|
6
|
+
const C = "_root_vcwe4_1", R = "_popup_vcwe4_28", g = {
|
|
7
|
+
root: C,
|
|
8
|
+
popup: R
|
|
9
|
+
}, b = ({ handleClickFavorite: l, isFavorite: t, uniqueId: w }) => {
|
|
10
|
+
const [P, i] = u(!1), [s, n] = u(!1), [f, S] = u({ top: 0, left: 0 }), o = d(null), p = d(null), e = `favorite_popup_${w}`, I = (r) => {
|
|
11
|
+
r.stopPropagation(), r.preventDefault(), t && sessionStorage.setItem(e, "true"), i(!0), setTimeout(() => {
|
|
12
|
+
i(!1), l && l(r);
|
|
13
|
+
}, 200);
|
|
14
|
+
};
|
|
15
|
+
return h(() => {
|
|
16
|
+
if (sessionStorage.getItem(e) === "true" && !t && p.current) {
|
|
17
|
+
o.current && clearTimeout(o.current);
|
|
18
|
+
const m = p.current.getBoundingClientRect();
|
|
19
|
+
S({
|
|
20
|
+
top: m.top + window.scrollY - 60,
|
|
21
|
+
left: m.right + window.scrollX - 200
|
|
22
|
+
}), n(!0), sessionStorage.removeItem(e), o.current = setTimeout(() => {
|
|
23
|
+
n(!1);
|
|
24
|
+
}, 2e3);
|
|
25
|
+
}
|
|
26
|
+
return t && sessionStorage.removeItem(e), () => {
|
|
27
|
+
o.current && clearTimeout(o.current);
|
|
28
|
+
};
|
|
29
|
+
}, [t, e]), h(() => {
|
|
30
|
+
t && s && (n(!1), o.current && (clearTimeout(o.current), o.current = null));
|
|
31
|
+
}, [t, s]), /* @__PURE__ */ a(_, { children: [
|
|
32
|
+
/* @__PURE__ */ a(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
ref: p,
|
|
36
|
+
className: g.root,
|
|
37
|
+
onClick: I,
|
|
38
|
+
style: {
|
|
39
|
+
transform: P ? "scale(0.9)" : "scale(1)",
|
|
40
|
+
transition: "transform 0.1s ease-in-out"
|
|
41
|
+
},
|
|
42
|
+
children: [
|
|
43
|
+
!t && /* @__PURE__ */ c(x, { width: 24, height: 24, color: "#353945" }),
|
|
44
|
+
t && /* @__PURE__ */ c(y, { width: 24, height: 24, color: "#015FF9" })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
s && T(
|
|
49
|
+
/* @__PURE__ */ c(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
className: g.popup,
|
|
53
|
+
style: {
|
|
54
|
+
top: `${f.top}px`,
|
|
55
|
+
left: `${f.left}px`
|
|
56
|
+
},
|
|
57
|
+
children: "Удалено из избранного"
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
document.body
|
|
61
|
+
)
|
|
62
|
+
] });
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
b as FavoriteIcon
|
|
66
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
const t = (o) => /* @__PURE__ */ e(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 24,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...o,
|
|
10
|
+
children: /* @__PURE__ */ e(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
strokeLinecap: "round",
|
|
15
|
+
strokeLinejoin: "round",
|
|
16
|
+
d: "M11.995 7.437c-1.4-1.573-3.733-1.996-5.487-.556-1.753 1.44-2 3.849-.623 5.552 1.145 1.416 4.61 4.403 5.745 5.37.127.108.191.162.265.183a.368.368 0 0 0 .2 0c.074-.021.138-.075.265-.183 1.136-.967 4.6-3.954 5.745-5.37 1.378-1.703 1.16-4.127-.623-5.552-1.784-1.425-4.087-1.017-5.487.556Z",
|
|
17
|
+
clipRule: "evenodd"
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
export {
|
|
23
|
+
t as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
const r = (e) => /* @__PURE__ */ o(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 24,
|
|
8
|
+
fill: "none",
|
|
9
|
+
style: { transform: e.deg ? `rotate(${e.deg}deg)` : void 0 },
|
|
10
|
+
...e,
|
|
11
|
+
children: /* @__PURE__ */ o(
|
|
12
|
+
"path",
|
|
13
|
+
{
|
|
14
|
+
fill: "currentColor",
|
|
15
|
+
fillRule: "evenodd",
|
|
16
|
+
stroke: "currentColor",
|
|
17
|
+
strokeLinecap: "round",
|
|
18
|
+
strokeLinejoin: "round",
|
|
19
|
+
d: "M11.995 7.437c-1.4-1.573-3.733-1.996-5.487-.556-1.753 1.44-2 3.849-.623 5.552 1.145 1.416 4.61 4.403 5.745 5.37.127.108.191.162.265.183a.368.368 0 0 0 .2 0c.074-.021.138-.075.265-.183 1.136-.967 4.6-3.954 5.745-5.37 1.378-1.703 1.16-4.127-.623-5.552-1.784-1.425-4.087-1.017-5.487.556Z",
|
|
20
|
+
clipRule: "evenodd"
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
export {
|
|
26
|
+
r as default
|
|
27
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as d, Fragment as I, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { O as M } from "../../../Option-
|
|
2
|
+
import { O as M } from "../../../Option-DmDx_xOt.js";
|
|
3
3
|
import { g as D } from "../../../index-YnD2EP-S.js";
|
|
4
4
|
import { useFilterWithSave as P } from "../hooks/useFilterWithSave.js";
|
|
5
5
|
import { NewIcon as S } from "../../NewIcon/ui/NewIcon.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { u as f } from "../../../useLotCard-
|
|
3
|
+
import { u as f } from "../../../useLotCard-D-gK4J_o.js";
|
|
4
4
|
import "../utils/getTagsFeatures.js";
|
|
5
5
|
import "../../../index-YnD2EP-S.js";
|
|
6
6
|
import "../utils/checkBedroomsCount.js";
|