stone-kit 0.0.1080 → 0.0.1085

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.
Files changed (51) hide show
  1. package/README.md +88 -88
  2. package/dist/components/CheckBoxNew/CheckBoxNew.js +5 -5
  3. package/dist/components/CommercialLotCard/CommercialLotCard.js +91 -10
  4. package/dist/components/CommercialLotCard/components/PaymentLink/PaymentLink.js +4 -4
  5. package/dist/components/CommercialLotCard/components/Snippets/Snippets.js +98 -27
  6. package/dist/components/CommercialLotCard/components/Tags/Tags.js +1 -1
  7. package/dist/components/FilterWithSave/hooks/useFilterWithSave.js +54 -26
  8. package/dist/components/FilterWithSave/ui/FilterWithSave.js +323 -7
  9. package/dist/components/FormModal/ui/ModalForm.js +1516 -29
  10. package/dist/components/Logo/ui/Logo.js +6 -6
  11. package/dist/components/LotCard/hooks/useLotCard.js +6 -24
  12. package/dist/components/LotCard/index.js +2 -2
  13. package/dist/components/LotCard/ui/LotCard.js +252 -12
  14. package/dist/components/Modal/ui/Modal.js +22 -22
  15. package/dist/components/ModalSuccess/ModalSuccess.js +1 -1
  16. package/dist/components/RoundButton/ui/RoundButton.js +1 -1
  17. package/dist/components/Select/ui/Category.js +2 -2
  18. package/dist/components/Select/ui/Option.js +2 -2
  19. package/dist/components/Select/ui/Select.js +2 -2
  20. package/dist/components/SliderNavigation/ui/SliderNavigation.js +6 -6
  21. package/dist/components/SortSelect/index.js +1 -1
  22. package/dist/components/SortSelect/ui/SortSelect.js +108 -26
  23. package/dist/components/SummarySelect/ui/SummarySelect.js +1 -1
  24. package/dist/components/TabSelect/ui/TabSelect.js +4 -4
  25. package/dist/components/TabSwitcher/index.js +2 -2
  26. package/dist/components/TabSwitcher/ui/TabSwitcher.js +121 -26
  27. package/dist/layout/components/Header/Header.js +44 -65
  28. package/dist/layout/components/Menu.js +15 -37
  29. package/dist/main.js +70 -65
  30. package/dist/pages/ButtonsPage/Buttons.js +44 -61
  31. package/dist/pages/FormsPage/FormsPage.js +22 -42
  32. package/dist/pages/IconsPage/IconsPage.js +9 -31
  33. package/dist/pages/InputPage/InputPage.js +10 -32
  34. package/dist/pages/LogoPage/LogoPage.js +13 -36
  35. package/dist/pages/LotsPage/LotsPage.js +25 -24
  36. package/dist/pages/ModalsPage/ModalPage.js +46 -66
  37. package/dist/pages/SelectPage/SelectPage.js +41 -40
  38. package/dist/pages/TabsPage/TabsPage.js +1 -1
  39. package/dist/pages/TagsPage/TagsPage.js +23 -44
  40. package/dist/stone-kit.css +1 -1
  41. package/dist/stories/entities/CommercialLotCard/CommercialLotCard.stories.js +1 -1
  42. package/dist/stories/shared/ui/Button/Button.stories.js +4 -4
  43. package/dist/stories/shared/ui/FilterWithSave/FilterWithSave.stories.js +1 -1
  44. package/dist/stories/shared/ui/FormModal/FormModal.stories.js +7 -7
  45. package/dist/stories/shared/ui/SortSelect/SortSelect.stories.js +1 -1
  46. package/dist/stories/shared/ui/TabSwitcher/TabSwitcher.stories.js +1 -1
  47. package/dist/stories/shared/ui/Tag/Tag.stories.js +4 -4
  48. package/dist/useLotCard-BAA8s2eo.js +189 -0
  49. package/package.json +1 -1
  50. package/dist/FilterWithSave-B-Qb2OD5.js +0 -2718
  51. package/dist/{Option-DdjBe9yb.js → Option-DmDx_xOt.js} +1 -1
@@ -0,0 +1,189 @@
1
+ import { jsxs as _, jsx as t, Fragment as J } from "react/jsx-runtime";
2
+ import { useState as K } from "react";
3
+ import { getTagsFeatures as Q } from "./components/LotCard/utils/getTagsFeatures.js";
4
+ import { c as U } from "./index-YnD2EP-S.js";
5
+ import { checkBedroomsCount as X } from "./components/LotCard/utils/checkBedroomsCount.js";
6
+ import { formatPayment as Y } from "./components/LotCard/utils/monthlyPayment.js";
7
+ import { useClientWidth as Z } from "./shared/useClientWidth.js";
8
+ import { Text as tt } from "./components/Text/ui/Text.js";
9
+ import { NewIcon as et } from "./components/NewIcon/ui/NewIcon.js";
10
+ const ot = "_root_wlmz3_1", rt = "_lotBtn_wlmz3_12", nt = "_rootDisable_wlmz3_26", st = "_lotImageWrapper_wlmz3_26", it = "_lotInfoWrapper_wlmz3_27", lt = "_infoHeader_wlmz3_48", pt = "_monthlyWrapper_wlmz3_57", ct = "_price_wlmz3_67", at = "_monthlyPayment_wlmz3_74", _t = "_decor_wlmz3_80", mt = "_lotPropertyListMobile_wlmz3_87", dt = "_lotPropertyItem_wlmz3_95", wt = "_lotPropertyListDesktop_wlmz3_112", ut = "_lotPriceWrapper_wlmz3_116", ht = "_discountWrapper_wlmz3_122", ft = "_discountPrice_wlmz3_133", zt = "_priceWrap_wlmz3_145", Pt = "_snippetLast_wlmz3_157", gt = "_snippet_wlmz3_157", St = "_tagsMobile_wlmz3_172", Wt = "_discountTag_wlmz3_187", bt = "_lotPricePerMetr_wlmz3_191", yt = "_btnWrapper_wlmz3_196", Lt = "_title_wlmz3_203", vt = "_snippets_wlmz3_207", Tt = "_retailSnippets_wlmz3_212", It = "_shownSnippets_wlmz3_217", kt = "_addSnippets_wlmz3_242", Bt = "_addSnippetsActive_wlmz3_258", Mt = "_addSnippetsList_wlmz3_263", Nt = "_closeSnippetBtn_wlmz3_307", xt = "_rootRow_wlmz3_319", Ct = "_rowTablet_wlmz3_330", Rt = "_rootRightSide_wlmz3_371", Dt = "_topWrapper_wlmz3_390", Ft = "_botWrapper_wlmz3_396", jt = "_lotPriceWrapperRow_wlmz3_427", Ht = "_fullscreenBtn_wlmz3_437", At = "_projectLotPricePerMetr_wlmz3_456", Vt = "_paymentClass_wlmz3_496", $t = "_priceBlock_wlmz3_505", Et = "_dkpbn_wlmz3_512", Ot = "_dkpbnText_wlmz3_518", e = {
11
+ root: ot,
12
+ lotBtn: rt,
13
+ rootDisable: nt,
14
+ lotImageWrapper: st,
15
+ lotInfoWrapper: it,
16
+ infoHeader: lt,
17
+ monthlyWrapper: pt,
18
+ price: ct,
19
+ monthlyPayment: at,
20
+ decor: _t,
21
+ lotPropertyListMobile: mt,
22
+ lotPropertyItem: dt,
23
+ lotPropertyListDesktop: wt,
24
+ lotPriceWrapper: ut,
25
+ discountWrapper: ht,
26
+ discountPrice: ft,
27
+ priceWrap: zt,
28
+ snippetLast: Pt,
29
+ snippet: gt,
30
+ tagsMobile: St,
31
+ discountTag: Wt,
32
+ lotPricePerMetr: bt,
33
+ btnWrapper: yt,
34
+ title: Lt,
35
+ snippets: vt,
36
+ retailSnippets: Tt,
37
+ shownSnippets: It,
38
+ addSnippets: kt,
39
+ addSnippetsActive: Bt,
40
+ addSnippetsList: Mt,
41
+ closeSnippetBtn: Nt,
42
+ rootRow: xt,
43
+ rowTablet: Ct,
44
+ rootRightSide: Rt,
45
+ topWrapper: Dt,
46
+ botWrapper: Ft,
47
+ lotPriceWrapperRow: jt,
48
+ fullscreenBtn: Ht,
49
+ projectLotPricePerMetr: At,
50
+ paymentClass: Vt,
51
+ priceBlock: $t,
52
+ dkpbn: Et,
53
+ dkpbnText: Ot
54
+ }, m = U.bind(e), ee = ({ lot: y, rowConditions: L }) => {
55
+ const {
56
+ status: C,
57
+ direction: R,
58
+ area: v,
59
+ floor: w,
60
+ endFloor: S,
61
+ floorsNumber: p,
62
+ type: W,
63
+ isCorner: D,
64
+ windowViews: u,
65
+ subTypeName: T,
66
+ number: I,
67
+ bedroomsCount: F,
68
+ mortgageMonthlyPayment: k
69
+ } = y, [b, h] = K(!1), j = C === 2, H = R === 1, f = W === 11, A = v ? v + " м²" : "", d = w && p ? (S && S !== w ? w + "-" + S : w) + " из " + p : "", z = Q({ ...y }), { isTablet: B, isDesktop: c, isMobile: M, currentClientWidth: V } = Z(), $ = typeof L < "u" ? L : c || B, E = () => f ? p ? "Кол-во этажей: " + p : "" : d ? "Этаж: " + d : "", O = () => f ? p ? /* @__PURE__ */ _("li", { className: m(e.lotPropertyItem), children: [
70
+ /* @__PURE__ */ t("div", { children: "Количество этажей" }),
71
+ /* @__PURE__ */ t("div", { children: p })
72
+ ] }) : null : d ? /* @__PURE__ */ _("li", { className: m(e.lotPropertyItem), children: [
73
+ /* @__PURE__ */ t("div", { children: "Этаж" }),
74
+ /* @__PURE__ */ t("div", { children: d })
75
+ ] }) : null, q = () => {
76
+ if (W === 3) {
77
+ if (M && (!u || u.length === 0))
78
+ return null;
79
+ let n = 0;
80
+ const r = c ? 36 : 28, i = [], P = [];
81
+ if (D) {
82
+ const o = "Угловая";
83
+ if (n + o.length <= r)
84
+ i.push(o), n += o.length;
85
+ else
86
+ return i;
87
+ }
88
+ if (u) {
89
+ const o = u.filter((l) => l && l.trim() !== "");
90
+ let s = 0, a = n;
91
+ for (let l = 0; l < o.length; l++) {
92
+ const g = o[l], N = s > 0 ? " " + g : g;
93
+ if (a + N.length <= r)
94
+ i.push(g), a += N.length, s++;
95
+ else {
96
+ if (s === 0) {
97
+ const x = r - a;
98
+ if (x > 3) {
99
+ const G = g.substring(0, x - 3) + "...";
100
+ i.push(G), a = r;
101
+ } else
102
+ i.push("..."), a += 3;
103
+ }
104
+ P.push(...o.slice(l));
105
+ break;
106
+ }
107
+ }
108
+ n = a;
109
+ }
110
+ return /* @__PURE__ */ _("div", { className: e.retailSnippets, children: [
111
+ /* @__PURE__ */ t("ul", { className: e.shownSnippets, children: i?.map((o, s) => /* @__PURE__ */ t("li", { children: o }, s)) }),
112
+ P?.length > 0 && /* @__PURE__ */ _(
113
+ "div",
114
+ {
115
+ className: m(e.addSnippets, { [e.addSnippetsActive]: b }),
116
+ onClick: (o) => {
117
+ c || (o.stopPropagation(), o.preventDefault(), h((s) => !s));
118
+ },
119
+ onMouseEnter: () => {
120
+ c && h(!0);
121
+ },
122
+ onMouseLeave: () => {
123
+ c && h(!1);
124
+ },
125
+ children: [
126
+ "+" + P?.length,
127
+ b && /* @__PURE__ */ _("ul", { className: e.addSnippetsList, children: [
128
+ P.map((o, s) => /* @__PURE__ */ t("li", { children: o }, s)),
129
+ /* @__PURE__ */ t("div", { className: e.closeSnippetBtn, children: /* @__PURE__ */ t(
130
+ et,
131
+ {
132
+ name: "close",
133
+ size: "16",
134
+ color: "#ffffff"
135
+ }
136
+ ) })
137
+ ] })
138
+ ]
139
+ }
140
+ )
141
+ ] });
142
+ }
143
+ return z.length ? /* @__PURE__ */ t("div", { className: e.snippets, children: z.map((n, r) => {
144
+ const i = r === z.length - 1;
145
+ return /* @__PURE__ */ t(
146
+ "div",
147
+ {
148
+ className: m(e.snippet, i ? "" : e.snippetLast),
149
+ children: n.text
150
+ },
151
+ r
152
+ );
153
+ }) }) : null;
154
+ };
155
+ return {
156
+ currentClientWidth: V,
157
+ isBuilding: f,
158
+ LotCardInfo: () => {
159
+ const n = H && W && T ? T : X(F), r = f ? n : `${n}${I ? `, ${I}` : ""}`;
160
+ return /* @__PURE__ */ t(J, { children: /* @__PURE__ */ _("div", { className: m(e.monthlyWrapper), children: [
161
+ r && /* @__PURE__ */ t(
162
+ tt,
163
+ {
164
+ className: m(e.infoHeader),
165
+ html: r
166
+ }
167
+ ),
168
+ k && /* @__PURE__ */ t("div", { className: e.monthlyPayment, children: Y(k) }),
169
+ /* @__PURE__ */ t(q, {})
170
+ ] }) });
171
+ },
172
+ tagFeatures: z,
173
+ FloorByType: O,
174
+ isTablet: B,
175
+ isDesktop: c,
176
+ getFloorStr: E,
177
+ isReserved: j,
178
+ isMobile: M,
179
+ areaStr: A,
180
+ floorStr: d,
181
+ isShowSnippet: b,
182
+ setIsShowSnippet: h,
183
+ rowConditionsVar: $
184
+ };
185
+ };
186
+ export {
187
+ e as s,
188
+ ee as u
189
+ };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "stone-kit",
3
3
  "description": "uikit for redesign",
4
4
  "private": false,
5
- "version": "0.0.1080",
5
+ "version": "0.0.1085",
6
6
  "author": "Mollycodd1e",
7
7
  "license": "ISC",
8
8
  "type": "module",