stone-kit 0.0.1085 → 0.0.1086

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 (56) hide show
  1. package/README.md +88 -88
  2. package/dist/FilterWithSave-D4iIFzmS.js +2701 -0
  3. package/dist/components/CheckBoxNew/CheckBoxNew.js +5 -5
  4. package/dist/components/CommercialLotCard/CommercialLotCard.d.ts +1 -1
  5. package/dist/components/CommercialLotCard/CommercialLotCard.js +9 -91
  6. package/dist/components/CommercialLotCard/components/PaymentLink/PaymentLink.js +4 -4
  7. package/dist/components/CommercialLotCard/components/Snippets/Snippets.js +27 -98
  8. package/dist/components/CommercialLotCard/components/Tags/Tags.js +1 -1
  9. package/dist/components/CommercialLotCard/types/CommercialLotCard.types.d.ts +0 -2
  10. package/dist/components/FilterWithSave/hooks/useFilterWithSave.js +26 -54
  11. package/dist/components/FilterWithSave/ui/FilterWithSave.js +7 -323
  12. package/dist/components/FormModal/ui/ModalForm.js +29 -1516
  13. package/dist/components/Logo/ui/Logo.js +6 -6
  14. package/dist/components/LotCard/hooks/useLotCard.js +24 -6
  15. package/dist/components/LotCard/index.js +2 -2
  16. package/dist/components/LotCard/ui/LotCard.d.ts +1 -1
  17. package/dist/components/LotCard/ui/LotCard.js +11 -252
  18. package/dist/components/LotCard/ui/LotCard.types.d.ts +0 -2
  19. package/dist/components/ModalSuccess/ModalSuccess.js +1 -1
  20. package/dist/components/RoundButton/ui/RoundButton.js +1 -1
  21. package/dist/components/Select/ui/Category.js +2 -2
  22. package/dist/components/Select/ui/Option.js +2 -2
  23. package/dist/components/Select/ui/Select.js +2 -2
  24. package/dist/components/SliderNavigation/ui/SliderNavigation.js +6 -6
  25. package/dist/components/SortSelect/index.js +1 -1
  26. package/dist/components/SortSelect/ui/SortSelect.js +26 -108
  27. package/dist/components/SummarySelect/ui/SummarySelect.js +1 -1
  28. package/dist/components/TabSelect/ui/TabSelect.js +4 -4
  29. package/dist/components/TabSwitcher/index.js +2 -2
  30. package/dist/components/TabSwitcher/ui/TabSwitcher.js +26 -121
  31. package/dist/layout/components/Header/Header.js +65 -44
  32. package/dist/layout/components/Menu.js +37 -15
  33. package/dist/main.js +65 -70
  34. package/dist/pages/ButtonsPage/Buttons.js +61 -44
  35. package/dist/pages/FormsPage/FormsPage.js +42 -22
  36. package/dist/pages/IconsPage/IconsPage.js +31 -9
  37. package/dist/pages/InputPage/InputPage.js +32 -10
  38. package/dist/pages/LogoPage/LogoPage.js +36 -13
  39. package/dist/pages/LotsPage/LotsPage.js +24 -26
  40. package/dist/pages/ModalsPage/ModalPage.js +66 -46
  41. package/dist/pages/SelectPage/SelectPage.js +40 -41
  42. package/dist/pages/TabsPage/TabsPage.js +1 -1
  43. package/dist/pages/TagsPage/TagsPage.js +44 -23
  44. package/dist/stone-kit.css +1 -1
  45. package/dist/stories/entities/CommercialLotCard/CommercialLotCard.stories.js +1 -1
  46. package/dist/stories/shared/ui/Button/Button.stories.js +4 -4
  47. package/dist/stories/shared/ui/FilterWithSave/FilterWithSave.stories.js +1 -1
  48. package/dist/stories/shared/ui/FormModal/FormModal.stories.js +7 -7
  49. package/dist/stories/shared/ui/SortSelect/SortSelect.stories.js +1 -1
  50. package/dist/stories/shared/ui/TabSwitcher/TabSwitcher.stories.js +1 -1
  51. package/dist/stories/shared/ui/Tag/Tag.stories.js +4 -4
  52. package/package.json +1 -1
  53. package/dist/components/Tooltip/Tooltip.d.ts +0 -11
  54. package/dist/components/Tooltip/Tooltip.js +0 -2005
  55. package/dist/useLotCard-BAA8s2eo.js +0 -189
  56. package/dist/{Option-DmDx_xOt.js → Option-DdjBe9yb.js} +1 -1
@@ -1,7 +1,7 @@
1
1
  import { jsxs as _, jsx as o } from "react/jsx-runtime";
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";
2
+ import { Input as m } from "../Input/ui/Input.js";
3
+ import { c as h } from "../../index-YnD2EP-S.js";
4
+ import { forwardRef as p } from "react";
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 = m.bind(e), w = h(
12
+ }, t = h.bind(e), w = p(
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
- p,
15
+ m,
16
16
  {
17
17
  type: "checkbox",
18
18
  ...b,
@@ -1,2 +1,2 @@
1
1
  import { ICommercialLotCard } from './types/CommercialLotCard.types';
2
- export declare const CommercialLotCard: ({ lot, hidFinParam, isDkpbn, imgNode, onPriceClickHandler, addClassname, isVertical, isFavorite, favoriteClickHandler, isMoreDetails }: ICommercialLotCard) => import("react/jsx-runtime").JSX.Element | null;
2
+ export declare const CommercialLotCard: ({ lot, hidFinParam, imgNode, onPriceClickHandler, addClassname, isVertical, isFavorite, favoriteClickHandler, isMoreDetails }: ICommercialLotCard) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,93 +1,11 @@
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 v } from "../../shared/fmtNumber.js";
4
- import { Tooltip as x } from "../Tooltip/Tooltip.js";
5
- import { Price as y } from "./components/Price/Price.js";
6
- import { Snippets as I } from "./components/Snippets/Snippets.js";
7
- import { Tags as s } from "./components/Tags/Tags.js";
8
- import { FavoriteIcon as T } from "../FavoriteIcon/FavoriteIcon.js";
9
- import { PaymentLink as L } from "./components/PaymentLink/PaymentLink.js";
10
- const P = "_root_iczi0_1", w = "_lotImageWrapper_iczi0_17", C = "_lotNameContent_iczi0_24", B = "_lotNameWrapper_iczi0_30", R = "_lotName_iczi0_24", S = "_lotNumber_iczi0_45", j = "_content_iczi0_54", D = "_featuresWrapper_iczi0_60", F = "_tags_iczi0_65", q = "_dkpbn_iczi0_69", A = "_dkpbnText_iczi0_75", E = "_rootRow_iczi0_83", G = "_priceBlock_iczi0_118", J = "_paymentLink_iczi0_125", e = {
11
- root: P,
12
- lotImageWrapper: w,
13
- lotNameContent: C,
14
- lotNameWrapper: B,
15
- lotName: R,
16
- lotNumber: S,
17
- content: j,
18
- featuresWrapper: D,
19
- tags: F,
20
- dkpbn: q,
21
- dkpbnText: A,
22
- rootRow: E,
23
- priceBlock: G,
24
- paymentLink: J
25
- }, K = W.bind(e), H = ({
26
- lot: o,
27
- hidFinParam: n = !1,
28
- isDkpbn: m = !1,
29
- imgNode: p,
30
- onPriceClickHandler: l,
31
- addClassname: _,
32
- isVertical: c = !1,
33
- isFavorite: N,
34
- favoriteClickHandler: r,
35
- isMoreDetails: d
36
- }) => {
37
- const { interiorPlanImg: g, floorPlanImg: f, area: b, subTypeName: k, number: u } = o || {}, z = k + ", " + v(b) + "м²", h = g ?? f ?? "";
38
- return o ? /* @__PURE__ */ a("div", { className: K(e.root, _, { [e.rootRow]: !c }), children: [
39
- /* @__PURE__ */ a("div", { className: e.lotImageWrapper, children: [
40
- p || /* @__PURE__ */ t(
41
- "img",
42
- {
43
- loading: "lazy",
44
- src: h,
45
- width: 295,
46
- height: 213,
47
- alt: "logo_image"
48
- }
49
- ),
50
- r && /* @__PURE__ */ t(
51
- T,
52
- {
53
- handleClickFavorite: (i) => {
54
- r && r(o), i.preventDefault(), i.stopPropagation();
55
- },
56
- isFavorite: N
57
- }
58
- )
59
- ] }),
60
- /* @__PURE__ */ a("div", { className: e.content, children: [
61
- /* @__PURE__ */ a("div", { className: e.lotNameWrapper, children: [
62
- /* @__PURE__ */ a("div", { className: e.lotNameContent, children: [
63
- /* @__PURE__ */ t("p", { className: e.lotName, children: z }),
64
- /* @__PURE__ */ t("p", { className: e.lotNumber, children: u }),
65
- /* @__PURE__ */ t(I, { lot: o }),
66
- /* @__PURE__ */ t(s, { lot: o, classname: e.tags })
67
- ] }),
68
- !n && /* @__PURE__ */ a("div", { className: e.priceBlock, children: [
69
- /* @__PURE__ */ t(
70
- y,
71
- {
72
- lot: o,
73
- isVertical: c,
74
- onPriceClickHandler: l,
75
- classname: e.price
76
- }
77
- ),
78
- m && /* @__PURE__ */ a("div", { className: e.dkpbn, children: [
79
- /* @__PURE__ */ t("span", { className: e.dkpbnText, children: "Доступен возврат НДС" }),
80
- /* @__PURE__ */ t(x, { text: "Заключение договора купли-продажи будущей недвижимости (ДКПБН) дает право на возврат НДС" })
81
- ] })
82
- ] })
83
- ] }),
84
- /* @__PURE__ */ a("div", { className: e.featuresWrapper, children: [
85
- /* @__PURE__ */ t(s, { lot: o, classname: e.tags }),
86
- /* @__PURE__ */ t(L, { specialProgram: o.specialProgram, classname: e.paymentLink, isMoreDetails: d, hidFinParam: n })
87
- ] })
88
- ] })
89
- ] }) : null;
90
- };
1
+ import "react/jsx-runtime";
2
+ import "../../index-YnD2EP-S.js";
3
+ import "../../shared/fmtNumber.js";
4
+ import "./components/Price/Price.js";
5
+ import { C as c } from "../../FilterWithSave-D4iIFzmS.js";
6
+ import "./components/Tags/Tags.js";
7
+ import "../FavoriteIcon/FavoriteIcon.js";
8
+ import "./components/PaymentLink/PaymentLink.js";
91
9
  export {
92
- H as CommercialLotCard
10
+ c as CommercialLotCard
93
11
  };
@@ -1,14 +1,14 @@
1
1
  import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
- import { c as m } from "../../../../index-YnD2EP-S.js";
3
- import { NewIcon as i } from "../../../NewIcon/ui/NewIcon.js";
2
+ import { NewIcon as m } from "../../../NewIcon/ui/NewIcon.js";
3
+ import { c as i } from "../../../../index-YnD2EP-S.js";
4
4
  const c = "_paymentWrapper_1ywol_1", f = {
5
5
  paymentWrapper: c
6
6
  }, x = ({ specialProgram: e, classname: n, isMoreDetails: t, hidFinParam: a }) => {
7
7
  const s = !!e, o = () => a ? "Подробнее" : s || t ? "Узнать подробности" : "Доступно несколько способов оплаты";
8
- return /* @__PURE__ */ p("div", { className: m(f.paymentWrapper, n), children: [
8
+ return /* @__PURE__ */ p("div", { className: i(f.paymentWrapper, n), children: [
9
9
  /* @__PURE__ */ r("span", { children: o() }),
10
10
  /* @__PURE__ */ r(
11
- i,
11
+ m,
12
12
  {
13
13
  name: "arrowRight",
14
14
  size: "20"
@@ -1,100 +1,29 @@
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
- };
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "../../../Button/ui/Button.js";
4
+ import "../../../mobileButton/ui/MobileButton.js";
5
+ import "../../../NewIcon/ui/NewIcon.js";
6
+ import "../../../DestinationTab/ui/DestinationTab.js";
7
+ import "../../../RoundButton/ui/RoundButton.js";
8
+ import "../../../Tag/ui/Tag.js";
9
+ import "../../../Switcher/ui/Switcher.js";
10
+ import "../../../Text/ui/Text.js";
11
+ import "../../../Flex/ui/Flex.js";
12
+ import "../../../Input/ui/Input.js";
13
+ import "react-dom";
14
+ import "../../../../index-YnD2EP-S.js";
15
+ import { a as A } from "../../../../FilterWithSave-D4iIFzmS.js";
16
+ import "../../../GroupedInput/ui/GroupedInputs.js";
17
+ import "../../../MetroTag/ui/MetroTag.js";
18
+ import "../../../Select/ui/Select.js";
19
+ import "../../../../shared/useClientWidth.js";
20
+ import "../../../SliderNavigation/ui/SliderNavigation.js";
21
+ import "../../../LotCardSkeleton/ui/LotCardSkeleton.js";
22
+ import "../../../TabSelect/ui/TabSelect.js";
23
+ import "../../../CheckBox/CheckBox.js";
24
+ import "../../../CheckBoxNew/CheckBoxNew.js";
25
+ import "../../../CheckboxSelect/ui/CheckboxSelect.js";
26
+ import "../../utils/getTagsFeatures.js";
98
27
  export {
99
- K as Snippets
28
+ A as Snippets
100
29
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as p, jsx as i } from "react/jsx-runtime";
2
- import { c as u } from "../../../../index-YnD2EP-S.js";
3
2
  import { Tag as n } from "../../../Tag/ui/Tag.js";
3
+ import { c as u } from "../../../../index-YnD2EP-S.js";
4
4
  const f = "_root_xiuq1_1", x = {
5
5
  root: f
6
6
  }, b = ({ lot: g, classname: d }) => {
@@ -3,8 +3,6 @@ export interface ICommercialLotCard {
3
3
  lot: ILot;
4
4
  /** Скрывать финансовые параметры */
5
5
  hidFinParam?: boolean;
6
- /** Доступен возврат НДС (ДКПБН) */
7
- isDkpbn?: boolean;
8
6
  imgNode?: React.ReactNode;
9
7
  addClassname?: string;
10
8
  isVertical?: boolean;
@@ -1,56 +1,28 @@
1
- import { useState as c, useRef as w, useEffect as p } from "react";
2
- import { useClientWidth as x } from "../../../shared/useClientWidth.js";
3
- const I = ({
4
- selectedTabs: n = [],
5
- selectedValues: v = [],
6
- onClickItem: m,
7
- disabledOptions: h = [],
8
- tabs: a = [],
9
- onChange: s,
10
- setSelectedTabs: S,
11
- onSaveClick: C,
12
- onClearClick: E
13
- }) => {
14
- const { isMobile: L } = x(), [i, u] = c(!1), f = w(null), [M, g] = c(n), [R] = c(v), [O, r] = c(M), [l, o] = c(R), y = (e) => {
15
- if (m && m(e), h.some((t) => t.value === e.value))
16
- return;
17
- const d = l.some((t) => t.value === e.value) ? l.filter((t) => t.value !== e.value) : [...l, e];
18
- o(d);
19
- }, J = () => {
20
- g(a), r(a), o([]), E(), s && (s([]), S?.(a));
21
- }, N = () => {
22
- o(v), r(n);
23
- }, k = () => {
24
- N(), u(!1);
25
- }, W = (e) => {
26
- e.stopPropagation(), C(), s && (S?.(O), s(l)), u(!1);
27
- };
28
- return p(() => {
29
- i || r((e) => JSON.stringify(e) !== JSON.stringify(n) ? n : e);
30
- }, [i, n]), p(() => {
31
- const e = (d) => {
32
- if (!f.current) return;
33
- const t = d.target;
34
- f.current.contains(t) || t.closest("svg") || k();
35
- };
36
- return i ? document.addEventListener("click", e) : document.removeEventListener("click", e), () => {
37
- document.removeEventListener("click", e);
38
- };
39
- }, [i]), {
40
- isMobile: L,
41
- handleClearClick: J,
42
- handleCloseModal: k,
43
- handleOptionClick: y,
44
- handleSaveClick: W,
45
- localSelectedTabs: O,
46
- selectedOptions: l,
47
- setSelectedOptions: o,
48
- isModalOpen: i,
49
- setIsModalOpen: u,
50
- setLocalSelectedTabs: r,
51
- containerRef: f
52
- };
53
- };
1
+ import "react";
2
+ import "../../Button/ui/Button.js";
3
+ import "../../mobileButton/ui/MobileButton.js";
4
+ import "../../NewIcon/ui/NewIcon.js";
5
+ import "../../DestinationTab/ui/DestinationTab.js";
6
+ import "../../RoundButton/ui/RoundButton.js";
7
+ import "../../Tag/ui/Tag.js";
8
+ import "../../Switcher/ui/Switcher.js";
9
+ import "../../Text/ui/Text.js";
10
+ import "../../Flex/ui/Flex.js";
11
+ import "../../Input/ui/Input.js";
12
+ import "react/jsx-runtime";
13
+ import "react-dom";
14
+ import "../../../index-YnD2EP-S.js";
15
+ import { b as w } from "../../../FilterWithSave-D4iIFzmS.js";
16
+ import "../../GroupedInput/ui/GroupedInputs.js";
17
+ import "../../MetroTag/ui/MetroTag.js";
18
+ import "../../Select/ui/Select.js";
19
+ import "../../../shared/useClientWidth.js";
20
+ import "../../SliderNavigation/ui/SliderNavigation.js";
21
+ import "../../LotCardSkeleton/ui/LotCardSkeleton.js";
22
+ import "../../TabSelect/ui/TabSelect.js";
23
+ import "../../CheckBox/CheckBox.js";
24
+ import "../../CheckBoxNew/CheckBoxNew.js";
25
+ import "../../CheckboxSelect/ui/CheckboxSelect.js";
54
26
  export {
55
- I as useFilterWithSave
27
+ w as useFilterWithSave
56
28
  };