stone-kit 0.0.1030 → 0.0.1032

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 (172) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/{Menu-CeBSiTyP.js → Menu-CdJTzN7T.js} +157 -176
  3. package/dist/{Option-DU8cvBnA.js → Option-rFBMQAPk.js} +1 -1
  4. package/dist/Router.js +1 -1
  5. package/dist/components/Button/ui/Button.d.ts +0 -1
  6. package/dist/components/Button/ui/Button.js +1 -1
  7. package/dist/components/Button/ui/Button.types.d.ts +0 -1
  8. package/dist/components/CheckBox/CheckBox.d.ts +0 -1
  9. package/dist/components/CheckBox/CheckBox.js +1 -1
  10. package/dist/components/CheckBox/CheckBox.types.d.ts +0 -1
  11. package/dist/components/CheckBoxNew/CheckBox.types.d.ts +0 -1
  12. package/dist/components/CheckBoxNew/CheckBoxNew.d.ts +0 -1
  13. package/dist/components/CheckBoxNew/CheckBoxNew.js +17 -17
  14. package/dist/components/CheckboxSelect/ui/CheckboxSelect.d.ts +0 -1
  15. package/dist/components/CheckboxSelect/ui/CheckboxSelect.js +34 -34
  16. package/dist/components/CommercialLotCard/CommercialLotCard.d.ts +0 -1
  17. package/dist/components/CommercialLotCard/CommercialLotCard.js +50 -7
  18. package/dist/components/CommercialLotCard/components/Price/Price.d.ts +0 -1
  19. package/dist/components/CommercialLotCard/components/Price/Price.js +25 -26
  20. package/dist/components/CommercialLotCard/components/Snippets/Snippets.d.ts +0 -1
  21. package/dist/components/CommercialLotCard/components/Snippets/Snippets.js +98 -27
  22. package/dist/components/CommercialLotCard/components/Tags/Tags.d.ts +0 -1
  23. package/dist/components/CommercialLotCard/components/Tags/Tags.js +17 -17
  24. package/dist/components/CommercialLotCard/types/CommercialLotCard.types.d.ts +0 -1
  25. package/dist/components/CommercialLotCard/types/LotCard.d.ts +0 -1
  26. package/dist/components/CommercialLotCard/utils/formatPrice.js +1 -2
  27. package/dist/components/CommercialLotCard/utils/getTagsFeatures.d.ts +1 -2
  28. package/dist/components/DestinationTab/ui/DestinationTab.d.ts +0 -1
  29. package/dist/components/DestinationTab/ui/DestinationTab.js +41 -41
  30. package/dist/components/DestinationTab/ui/DestinationTab.types.d.ts +0 -1
  31. package/dist/components/FieldInput/ui/FieldInput.d.ts +0 -1
  32. package/dist/components/FieldInput/ui/FieldInput.types.d.ts +0 -1
  33. package/dist/components/FilterWithSave/hooks/useFilterWithSave.d.ts +0 -1
  34. package/dist/components/FilterWithSave/hooks/useFilterWithSave.js +54 -26
  35. package/dist/components/FilterWithSave/ui/FilterWithSave.d.ts +0 -1
  36. package/dist/components/FilterWithSave/ui/FilterWithSave.js +328 -7
  37. package/dist/components/Flex/ui/Flex.d.ts +0 -1
  38. package/dist/components/Flex/ui/Flex.js +1 -1
  39. package/dist/components/Flex/ui/Flex.types.d.ts +0 -1
  40. package/dist/components/FormModal/ui/ModalForm.js +1430 -28
  41. package/dist/components/GroupedInput/ui/GroupedInputs.d.ts +0 -1
  42. package/dist/components/GroupedInput/ui/GroupedInputs.js +1 -1
  43. package/dist/components/GroupedInput/ui/GroupedInputs.types.d.ts +0 -1
  44. package/dist/components/Input/ui/Input.d.ts +1 -2
  45. package/dist/components/Input/ui/Input.js +234 -304
  46. package/dist/components/Logo/ui/Logo.d.ts +0 -1
  47. package/dist/components/Logo/ui/Logo.js +6 -6
  48. package/dist/components/LotCard/hooks/useLotCard.d.ts +0 -1
  49. package/dist/components/LotCard/hooks/useLotCard.js +6 -24
  50. package/dist/components/LotCard/index.js +2 -2
  51. package/dist/components/LotCard/ui/LotCard.d.ts +0 -1
  52. package/dist/components/LotCard/ui/LotCard.js +213 -10
  53. package/dist/components/LotCard/ui/LotCard.types.d.ts +0 -1
  54. package/dist/components/LotCard/utils/formatPrice.js +1 -2
  55. package/dist/components/LotCard/utils/getTagsFeatures.d.ts +1 -2
  56. package/dist/components/LotCardSkeleton/ui/LotCardSkeleton.js +1 -1
  57. package/dist/components/MetroLabel/ui/MetroLabel.d.ts +0 -1
  58. package/dist/components/MetroLabel/ui/MetroLabel.js +16 -16
  59. package/dist/components/MetroLabel/ui/MetroLabel.types.d.ts +0 -1
  60. package/dist/components/MetroTag/ui/MetroTag.d.ts +0 -1
  61. package/dist/components/MetroTag/ui/MetroTag.js +74 -74
  62. package/dist/components/MetroTag/ui/MetroTag.types.d.ts +0 -1
  63. package/dist/components/Modal/ui/Modal.d.ts +0 -1
  64. package/dist/components/Modal/ui/Modal.js +34 -37
  65. package/dist/components/Modal/ui/Modal.types.d.ts +0 -1
  66. package/dist/components/ModalSuccess/ModalSuccess.d.ts +0 -1
  67. package/dist/components/ModalSuccess/ModalSuccess.js +18 -19
  68. package/dist/components/ModalSuccess/ModalSuccess.types.d.ts +0 -1
  69. package/dist/components/NewIcon/icons/PinTrans.d.ts +0 -1
  70. package/dist/components/NewIcon/icons/SmallFilter.d.ts +0 -1
  71. package/dist/components/NewIcon/ui/NewIcon.d.ts +0 -1
  72. package/dist/components/NewIcon/ui/NewIcon.js +1 -1
  73. package/dist/components/NewIcon/ui/NewIcon.types.d.ts +0 -1
  74. package/dist/components/NewIcon/ui/iconTypes.d.ts +0 -1
  75. package/dist/components/ProjectCardSkeleton/ui/ProjectCardSkeleton.js +9 -11
  76. package/dist/components/RoundButton/ui/RoundButton.d.ts +0 -1
  77. package/dist/components/RoundButton/ui/RoundButton.js +2 -2
  78. package/dist/components/RoundButton/ui/RoundButton.types.d.ts +0 -1
  79. package/dist/components/Select/model/selectMode.d.ts +0 -1
  80. package/dist/components/Select/model/selectMode.js +30 -30
  81. package/dist/components/Select/ui/Category.d.ts +0 -1
  82. package/dist/components/Select/ui/Category.js +3 -3
  83. package/dist/components/Select/ui/Option.d.ts +0 -1
  84. package/dist/components/Select/ui/Option.js +2 -2
  85. package/dist/components/Select/ui/Select.d.ts +0 -1
  86. package/dist/components/Select/ui/Select.js +115 -115
  87. package/dist/components/SliderNavigation/index.d.ts +0 -1
  88. package/dist/components/SliderNavigation/ui/SliderNavigation.d.ts +0 -1
  89. package/dist/components/SliderNavigation/ui/SliderNavigation.js +6 -6
  90. package/dist/components/SortSelect/hooks/useSortSelect.d.ts +0 -1
  91. package/dist/components/SortSelect/hooks/useSortSelect.js +2 -2
  92. package/dist/components/SortSelect/index.js +1 -1
  93. package/dist/components/SortSelect/ui/SortSelect.d.ts +0 -1
  94. package/dist/components/SortSelect/ui/SortSelect.js +108 -26
  95. package/dist/components/SortSelect/ui/SortSelect.types.d.ts +0 -1
  96. package/dist/components/SummarySelect/ui/SummarySelect.d.ts +0 -1
  97. package/dist/components/SummarySelect/ui/SummarySelect.js +59 -65
  98. package/dist/components/Switcher/ui/Switcher.d.ts +0 -1
  99. package/dist/components/Switcher/ui/Switcher.js +1 -1
  100. package/dist/components/Switcher/ui/Switcher.types.d.ts +0 -1
  101. package/dist/components/TabSelect/ui/TabSelect.d.ts +0 -1
  102. package/dist/components/TabSelect/ui/TabSelect.js +5 -5
  103. package/dist/components/TabSwitcher/index.js +2 -2
  104. package/dist/components/TabSwitcher/ui/TabSwitcher.d.ts +0 -1
  105. package/dist/components/TabSwitcher/ui/TabSwitcher.js +120 -26
  106. package/dist/components/TabSwitcher/ui/TabSwitcher.types.d.ts +0 -1
  107. package/dist/components/Tag/ui/Tag.d.ts +0 -1
  108. package/dist/components/Tag/ui/Tag.js +91 -91
  109. package/dist/components/Tag/ui/Tag.types.d.ts +0 -1
  110. package/dist/components/Text/ui/Text.d.ts +0 -1
  111. package/dist/components/Text/ui/Text.js +1 -1
  112. package/dist/components/Text/ui/Text.types.d.ts +0 -1
  113. package/dist/components/TextArea/TextArea.d.ts +0 -1
  114. package/dist/components/TextArea/TextArea.js +1 -1
  115. package/dist/components/ZoomControls/ui/ZoomControls.d.ts +0 -1
  116. package/dist/components/ZoomControls/ui/ZoomControls.types.d.ts +0 -1
  117. package/dist/components/mobileButton/ui/MobileButton.d.ts +0 -1
  118. package/dist/components/mobileButton/ui/MobileButton.js +1 -1
  119. package/dist/components/mobileButton/ui/MobileButton.types.d.ts +0 -1
  120. package/dist/{index-DvCs2JPX.js → index-3E04UaC2.js} +9529 -9629
  121. package/dist/index-B2JRaoNz.js +48 -0
  122. package/dist/{index-DmANy9jd.js → index-CBdtKu-u.js} +272 -271
  123. package/dist/layout/Layout.d.ts +0 -1
  124. package/dist/layout/components/Header/Header.js +48 -71
  125. package/dist/layout/components/Menu.js +2 -24
  126. package/dist/main.js +70 -65
  127. package/dist/pages/ButtonsPage/Buttons.js +44 -61
  128. package/dist/pages/FormsPage/FormsPage.js +26 -50
  129. package/dist/pages/IconsPage/IconsPage.js +9 -31
  130. package/dist/pages/InputPage/InputPage.js +10 -32
  131. package/dist/pages/LogoPage/LogoPage.js +13 -35
  132. package/dist/pages/LotsPage/LotsPage.js +18 -17
  133. package/dist/pages/LotsPage/const.d.ts +0 -1
  134. package/dist/pages/ModalsPage/ModalPage.js +46 -66
  135. package/dist/pages/SelectPage/SelectPage.js +58 -58
  136. package/dist/pages/TabsPage/TabsPage.js +19 -20
  137. package/dist/pages/TagsPage/TagsPage.js +23 -44
  138. package/dist/shared/checkLargeOffice.d.ts +0 -1
  139. package/dist/shared/checkLargeOffice.js +1 -1
  140. package/dist/shared/mlnRound.js +1 -2
  141. package/dist/stone-kit.css +1 -0
  142. package/dist/stories/entities/CommercialLotCard/CommercialLotCard.stories.js +2 -2
  143. package/dist/stories/shared/ui/Button/Button.stories.js +5 -5
  144. package/dist/stories/shared/ui/CheckBox/CheckBox.stories.js +1 -1
  145. package/dist/stories/shared/ui/CheckBox/CheckBoxNew.stories.js +1 -1
  146. package/dist/stories/shared/ui/CheckboxSelect/CheckboxSelect.stories.js +1 -1
  147. package/dist/stories/shared/ui/DestinationTab/DestinationTab.stories.js +1 -1
  148. package/dist/stories/shared/ui/FieldInput/FieldInput.stories.js +1 -1
  149. package/dist/stories/shared/ui/FilterWithSave/FilterWithSave.stories.js +2 -2
  150. package/dist/stories/shared/ui/FormModal/FormModal.stories.js +8 -8
  151. package/dist/stories/shared/ui/GroupedInput/GroupedInput.stories.js +1 -1
  152. package/dist/stories/shared/ui/Logo/Logo.stories.js +1 -1
  153. package/dist/stories/shared/ui/MobileButton/MobileButton.stories.js +1 -1
  154. package/dist/stories/shared/ui/Modal/Modal.stories.js +1 -1
  155. package/dist/stories/shared/ui/ModalSuccess/ModalSuccess.stories.js +1 -1
  156. package/dist/stories/shared/ui/RoundButton/RoundButton.stories.js +1 -1
  157. package/dist/stories/shared/ui/Select/Select.stories.js +1 -1
  158. package/dist/stories/shared/ui/SliderNavigation/SliderNavigation.stories.js +1 -1
  159. package/dist/stories/shared/ui/SortSelect/SortSelect.stories.js +2 -2
  160. package/dist/stories/shared/ui/SummarySelect/SummarySelect.stories.js +1 -1
  161. package/dist/stories/shared/ui/Switcher/Switcher.stories.js +1 -1
  162. package/dist/stories/shared/ui/TabSelect/TabSelect.stories.js +1 -1
  163. package/dist/stories/shared/ui/TabSwitcher/TabSwitcher.stories.js +2 -2
  164. package/dist/stories/shared/ui/Tag/Tag.stories.js +4 -4
  165. package/dist/stories/shared/ui/ZoomControls/ZoomControls.stories.js +1 -1
  166. package/dist/useLotCard-DG9doKCX.js +186 -0
  167. package/dist/useSortSelect-B8HOGdOt.js +79 -0
  168. package/package.json +1 -1
  169. package/dist/FilterWithSave-BWA01WwU.js +0 -2476
  170. package/dist/index-rKuIKazb.js +0 -45
  171. package/dist/style.css +0 -1
  172. package/dist/useSortSelect-BTCEVMVn.js +0 -80
@@ -1,11 +1,11 @@
1
- import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
- import { c as N } from "../../../index-rKuIKazb.js";
3
- const x = "_destination_1c7de_1", n = "_destinationName_1c7de_40", w = "_routeText_1c7de_45", g = "_whiteStroke_1c7de_65", k = "_routeWrapper_1c7de_78", _ = {
4
- destination: x,
1
+ import { jsxs as s, jsx as i } from "react/jsx-runtime";
2
+ import { c as z } from "../../../index-B2JRaoNz.js";
3
+ const N = "_destination_1c7de_1", x = "_destinationName_1c7de_40", w = "_routeText_1c7de_45", g = "_whiteStroke_1c7de_65", k = "_routeWrapper_1c7de_78", e = {
4
+ destination: N,
5
5
  "auto-width": "_auto-width_1c7de_29",
6
6
  "full-width": "_full-width_1c7de_33",
7
7
  "medium-size": "_medium-size_1c7de_37",
8
- destinationName: n,
8
+ destinationName: x,
9
9
  routeText: w,
10
10
  "large-size": "_large-size_1c7de_51",
11
11
  whiteStroke: g,
@@ -14,58 +14,58 @@ const x = "_destination_1c7de_1", n = "_destinationName_1c7de_40", w = "_routeTe
14
14
  "large-size_m": "_large-size_m_1c7de_122",
15
15
  "medium-size_l": "_medium-size_l_1c7de_137",
16
16
  "large-size_l": "_large-size_l_1c7de_150"
17
- }, b = N.bind(_), f = ({
18
- size: m = "medium",
19
- size_m: c,
20
- size_l: a,
21
- destination: e = { destName: "", color: "" },
22
- variant: d = "whiteStroke",
23
- width: i = "auto",
24
- routes: l = [],
25
- checked: o,
26
- onChange: u,
27
- additionalClass: p = "",
28
- ...h
29
- }) => /* @__PURE__ */ t(
17
+ }, b = z.bind(e), f = ({
18
+ size: a = "medium",
19
+ size_m: d,
20
+ size_l: r,
21
+ destination: t = { destName: "", color: "" },
22
+ variant: m = "whiteStroke",
23
+ width: o = "auto",
24
+ routes: c = [],
25
+ checked: l,
26
+ onChange: n,
27
+ additionalClass: u = "",
28
+ ...p
29
+ }) => /* @__PURE__ */ s(
30
30
  "label",
31
31
  {
32
32
  className: b(
33
- _.destination,
34
- _[`${m}-size`],
35
- _[`${c}-size_m`],
36
- _[`${a}-size_l`],
37
- _[`${d}`],
38
- _[`${i}-width`],
39
- p
33
+ e.destination,
34
+ e[`${a}-size`],
35
+ e[`${d}-size_m`],
36
+ e[`${r}-size_l`],
37
+ e[`${m}`],
38
+ e[`${o}-width`],
39
+ u
40
40
  ),
41
- ...h,
42
- htmlFor: e.destName,
41
+ ...p,
42
+ htmlFor: t.destName,
43
43
  children: [
44
- /* @__PURE__ */ r(
44
+ /* @__PURE__ */ i(
45
45
  "input",
46
46
  {
47
- id: e.destName,
48
- checked: o,
49
- onChange: u,
47
+ id: t.destName,
48
+ checked: l,
49
+ onChange: n,
50
50
  type: "checkbox",
51
- name: e.destName,
52
- value: e.destName
51
+ name: t.destName,
52
+ value: t.destName
53
53
  }
54
54
  ),
55
- /* @__PURE__ */ t("div", { className: _.destination, children: [
56
- (e == null ? void 0 : e.color) && /* @__PURE__ */ r("span", { style: { background: (e == null ? void 0 : e.color) ?? "" } }),
57
- e.destName
55
+ /* @__PURE__ */ s("div", { className: e.destination, children: [
56
+ t?.color && /* @__PURE__ */ i("span", { style: { background: t?.color ?? "" } }),
57
+ t.destName
58
58
  ] }),
59
- l.map((s, z) => /* @__PURE__ */ t(
59
+ c.map((_, h) => /* @__PURE__ */ s(
60
60
  "div",
61
61
  {
62
- className: _.routeWrapper,
62
+ className: e.routeWrapper,
63
63
  children: [
64
- s.type,
65
- /* @__PURE__ */ r("div", { className: _.routeText, children: s.text })
64
+ _.type,
65
+ /* @__PURE__ */ i("div", { className: e.routeText, children: _.text })
66
66
  ]
67
67
  },
68
- z
68
+ h
69
69
  ))
70
70
  ]
71
71
  }
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from 'react';
2
-
3
2
  type destinationSizesWidth = 'auto' | 'full';
4
3
  export declare const DESTINATIONS_VARIANTS: {
5
4
  whiteStroke: string;
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { ComponentProps } from './FieldInput.types';
3
-
4
3
  export declare const FieldInput: ({ label, handleClear, isShowClear, children }: React.PropsWithChildren<ComponentProps>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { default as React, ReactNode } from 'react';
2
-
3
2
  interface InputProps {
4
3
  label: string;
5
4
  handleClear?: () => void;
@@ -1,5 +1,4 @@
1
1
  import { TOption } from '../../Select/ui/Select.types';
2
-
3
2
  interface IuseFilterWithSave {
4
3
  selectOptions?: TOption[];
5
4
  disabledOptions?: TOption[];
@@ -1,28 +1,56 @@
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 { b as w } from "../../../FilterWithSave-BWA01WwU.js";
15
- import "../../GroupedInput/ui/GroupedInputs.js";
16
- import "../../../index-rKuIKazb.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";
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
+ };
26
54
  export {
27
- w as useFilterWithSave
55
+ I as useFilterWithSave
28
56
  };
@@ -1,5 +1,4 @@
1
1
  import { TOption } from '../../Select/ui/Select.types';
2
-
3
2
  interface IFilterWithSave {
4
3
  selectOptions?: TOption[];
5
4
  disabledOptions?: TOption[];
@@ -1,9 +1,330 @@
1
- import "react/jsx-runtime";
2
- import "../../NewIcon/ui/NewIcon.js";
3
- import { F as a } from "../../../FilterWithSave-BWA01WwU.js";
4
- import "../../Modal/ui/Modal.js";
5
- import "../../../Option-DU8cvBnA.js";
6
- import "../../Button/ui/Button.js";
1
+ import { jsxs as d, Fragment as I, jsx as t } from "react/jsx-runtime";
2
+ import { O as M } from "../../../Option-rFBMQAPk.js";
3
+ import { g as D } from "../../../index-B2JRaoNz.js";
4
+ import { useFilterWithSave as P } from "../hooks/useFilterWithSave.js";
5
+ import { NewIcon as S } from "../../NewIcon/ui/NewIcon.js";
6
+ import { TabSwitcher as _ } from "../../TabSwitcher/ui/TabSwitcher.js";
7
+ import { Button as f } from "../../Button/ui/Button.js";
8
+ import { Modal as V } from "../../Modal/ui/Modal.js";
9
+ const G = "_root_1v1y9_1", H = "_filterWithSaveModal_1v1y9_15", J = "_modalAddBody_1v1y9_20", K = "_closeBtn_1v1y9_29", Q = "_btnName_1v1y9_35", U = "_modalTitle_1v1y9_39", X = "_tabSWitcherWrapper_1v1y9_48", Y = "_switcherTitle_1v1y9_77", Z = "_switcherScroll_1v1y9_84", ee = "_tabs_1v1y9_93", te = "_selectWrapper_1v1y9_98", ae = "_filterOption_1v1y9_102", re = "_btnWrapper_1v1y9_110", ie = "_resetBtn_1v1y9_116", se = "_saveBtn_1v1y9_117", ne = "_desktopWrapper_1v1y9_121", le = "_desktopWrapperOpen_1v1y9_144", e = {
10
+ root: G,
11
+ filterWithSaveModal: H,
12
+ modalAddBody: J,
13
+ closeBtn: K,
14
+ btnName: Q,
15
+ modalTitle: U,
16
+ tabSWitcherWrapper: X,
17
+ switcherTitle: Y,
18
+ switcherScroll: Z,
19
+ tabs: ee,
20
+ selectWrapper: te,
21
+ filterOption: ae,
22
+ btnWrapper: re,
23
+ resetBtn: ie,
24
+ saveBtn: se,
25
+ desktopWrapper: ne,
26
+ desktopWrapperOpen: le
27
+ };
28
+ var N = { exports: {} };
29
+ /*!
30
+ Copyright (c) 2018 Jed Watson.
31
+ Licensed under the MIT License (MIT), see
32
+ http://jedwatson.github.io/classnames
33
+ */
34
+ var A;
35
+ function oe() {
36
+ return A || (A = 1, (function(v) {
37
+ (function() {
38
+ var p = {}.hasOwnProperty;
39
+ function s() {
40
+ for (var a = "", i = 0; i < arguments.length; i++) {
41
+ var l = arguments[i];
42
+ l && (a = h(a, u.call(this, l)));
43
+ }
44
+ return a;
45
+ }
46
+ function u(a) {
47
+ if (typeof a == "string" || typeof a == "number")
48
+ return this && this[a] || a;
49
+ if (typeof a != "object")
50
+ return "";
51
+ if (Array.isArray(a))
52
+ return s.apply(this, a);
53
+ if (a.toString !== Object.prototype.toString && !a.toString.toString().includes("[native code]"))
54
+ return a.toString();
55
+ var i = "";
56
+ for (var l in a)
57
+ p.call(a, l) && a[l] && (i = h(i, this && this[l] || l));
58
+ return i;
59
+ }
60
+ function h(a, i) {
61
+ return i ? a ? a + " " + i : a + i : a;
62
+ }
63
+ v.exports ? (s.default = s, v.exports = s) : window.classNames = s;
64
+ })();
65
+ })(N)), N.exports;
66
+ }
67
+ var ce = oe();
68
+ const de = /* @__PURE__ */ D(ce), pe = de.bind(e), ye = ({
69
+ disabledOptions: v,
70
+ tabs: p = [],
71
+ selectOptions: s = [],
72
+ onChange: u,
73
+ onClick: h = () => null,
74
+ selectedValues: a,
75
+ setSelectedTabs: i,
76
+ selectedTabs: l,
77
+ onClickItem: z,
78
+ onCLickSelect: B,
79
+ dataTestId: j,
80
+ onSaveClick: F = () => null,
81
+ onClearClick: R = () => null,
82
+ onTabClick: q = () => null,
83
+ btnName: E = "Фильтр"
84
+ }) => {
85
+ const {
86
+ handleCloseModal: C,
87
+ localSelectedTabs: O,
88
+ selectedOptions: k,
89
+ isMobile: b,
90
+ handleOptionClick: w,
91
+ handleClearClick: T,
92
+ handleSaveClick: x,
93
+ isModalOpen: W,
94
+ setLocalSelectedTabs: g,
95
+ setIsModalOpen: y,
96
+ containerRef: L
97
+ } = P({
98
+ selectedTabs: l,
99
+ onClickItem: z,
100
+ setSelectedTabs: i,
101
+ tabs: p,
102
+ onChange: u,
103
+ disabledOptions: v,
104
+ selectedValues: a,
105
+ onSaveClick: F,
106
+ onClearClick: R
107
+ }), $ = () => /* @__PURE__ */ d(I, { children: [
108
+ /* @__PURE__ */ t(
109
+ "div",
110
+ {
111
+ className: e.closeBtn,
112
+ onClick: () => {
113
+ C();
114
+ },
115
+ children: /* @__PURE__ */ t(
116
+ S,
117
+ {
118
+ name: "close",
119
+ size: "24"
120
+ }
121
+ )
122
+ }
123
+ ),
124
+ /* @__PURE__ */ t("div", { className: e.modalTitle, children: "Фильтры" }),
125
+ /* @__PURE__ */ d("div", { className: e.tabSWitcherWrapper, children: [
126
+ /* @__PURE__ */ t("div", { className: e.switcherTitle, children: "Готовность" }),
127
+ /* @__PURE__ */ t("div", { className: e.switcherScroll, children: /* @__PURE__ */ t(
128
+ _,
129
+ {
130
+ variant: "grayRow",
131
+ addClassName: e.tabs,
132
+ isApart: !0,
133
+ children: p?.map((o, n) => {
134
+ const r = o.value;
135
+ return /* @__PURE__ */ t(
136
+ _.Item,
137
+ {
138
+ itemsLength: p?.length,
139
+ mini: !0,
140
+ size_s: "small",
141
+ value: r,
142
+ onClick: () => {
143
+ },
144
+ checked: O?.find((m) => m.value === r)?.state ?? !1,
145
+ onChange: () => {
146
+ g?.(
147
+ (m) => m.map((c) => c.value === r ? { ...c, state: !c.state } : c)
148
+ );
149
+ },
150
+ index: n,
151
+ children: r
152
+ },
153
+ n
154
+ );
155
+ })
156
+ }
157
+ ) })
158
+ ] }),
159
+ /* @__PURE__ */ t("div", { className: e.selectWrapper, children: s?.map((o, n) => /* @__PURE__ */ t(
160
+ M,
161
+ {
162
+ sizeIcon: "24",
163
+ addClassName: e.filterOption,
164
+ disabledOptions: [],
165
+ clickableOptions: s?.map((r) => r.value.toString()),
166
+ selectedOptions: k,
167
+ option: o,
168
+ handleOptionClick: w
169
+ },
170
+ n
171
+ )) }),
172
+ /* @__PURE__ */ d("div", { className: e.btnWrapper, children: [
173
+ /* @__PURE__ */ t(
174
+ f,
175
+ {
176
+ as: "button",
177
+ variant: "gray",
178
+ additionalClass: e.resetBtn,
179
+ onClick: T,
180
+ children: "Сбросить"
181
+ }
182
+ ),
183
+ /* @__PURE__ */ t(
184
+ f,
185
+ {
186
+ as: "button",
187
+ additionalClass: e.saveBtn,
188
+ onClick: x,
189
+ children: "Сохранить"
190
+ }
191
+ )
192
+ ] })
193
+ ] });
194
+ return /* @__PURE__ */ d(I, { children: [
195
+ /* @__PURE__ */ d("div", { style: { position: "relative" }, children: [
196
+ /* @__PURE__ */ d(
197
+ "div",
198
+ {
199
+ className: e.root,
200
+ "data-testid": j,
201
+ onClick: () => {
202
+ B && B(), h && h(), b ? y((o) => !o) : W || y(!0);
203
+ },
204
+ children: [
205
+ /* @__PURE__ */ t("div", { className: e.btnName, children: E }),
206
+ /* @__PURE__ */ t(
207
+ S,
208
+ {
209
+ name: "filter",
210
+ size: "16"
211
+ }
212
+ )
213
+ ]
214
+ }
215
+ ),
216
+ !b && /* @__PURE__ */ d(
217
+ "div",
218
+ {
219
+ ref: L,
220
+ className: pe(e.desktopWrapper, { [e.desktopWrapperOpen]: W }),
221
+ children: [
222
+ /* @__PURE__ */ t(
223
+ "div",
224
+ {
225
+ className: e.closeBtn,
226
+ onClick: () => {
227
+ C();
228
+ },
229
+ children: /* @__PURE__ */ t(
230
+ S,
231
+ {
232
+ name: "close",
233
+ size: "24"
234
+ }
235
+ )
236
+ }
237
+ ),
238
+ /* @__PURE__ */ t("div", { className: e.modalTitle, children: "Фильтры" }),
239
+ /* @__PURE__ */ d("div", { className: e.tabSWitcherWrapper, children: [
240
+ /* @__PURE__ */ t("div", { className: e.switcherTitle, children: "Готовность" }),
241
+ /* @__PURE__ */ t("div", { className: e.switcherScroll, children: /* @__PURE__ */ t(
242
+ _,
243
+ {
244
+ variant: "grayRow",
245
+ addClassName: e.tabs,
246
+ isApart: !0,
247
+ children: p?.map((o, n) => {
248
+ const r = o.value;
249
+ return /* @__PURE__ */ t(
250
+ _.Item,
251
+ {
252
+ itemsLength: p?.length,
253
+ dataTestId: `filterWithSave_year_${r}_tab`,
254
+ size_s: "small",
255
+ mini: !0,
256
+ value: r,
257
+ onClick: () => q(),
258
+ checked: O?.find((m) => m.value === r)?.state ?? !1,
259
+ onChange: () => {
260
+ g?.(
261
+ (m) => m.map((c) => c.value === r ? { ...c, state: !c.state } : c)
262
+ );
263
+ },
264
+ index: n,
265
+ addItemClassName: e.tabSwitcher,
266
+ children: r
267
+ },
268
+ n
269
+ );
270
+ })
271
+ }
272
+ ) })
273
+ ] }),
274
+ /* @__PURE__ */ t("div", { className: e.selectWrapper, children: s?.map((o, n) => /* @__PURE__ */ t(
275
+ M,
276
+ {
277
+ sizeIcon: "24",
278
+ dataTestId: `filterWIthSave_${n}_select`,
279
+ addClassName: e.filterOption,
280
+ disabledOptions: [],
281
+ clickableOptions: s?.map((r) => r.value.toString()),
282
+ selectedOptions: k,
283
+ option: o,
284
+ handleOptionClick: w
285
+ },
286
+ n
287
+ )) }),
288
+ /* @__PURE__ */ d("div", { className: e.btnWrapper, children: [
289
+ /* @__PURE__ */ t(
290
+ f,
291
+ {
292
+ "data-testid": "filterWithSave_clear_btn",
293
+ as: "button",
294
+ variant: "gray",
295
+ additionalClass: e.resetBtn,
296
+ onClick: T,
297
+ children: "Сбросить"
298
+ }
299
+ ),
300
+ /* @__PURE__ */ t(
301
+ f,
302
+ {
303
+ "data-testid": "filterWithSave_save_btn",
304
+ as: "button",
305
+ additionalClass: e.saveBtn,
306
+ onClick: x,
307
+ children: "Сохранить"
308
+ }
309
+ )
310
+ ] })
311
+ ]
312
+ }
313
+ )
314
+ ] }),
315
+ b && /* @__PURE__ */ t(
316
+ V,
317
+ {
318
+ isOpen: W,
319
+ emitIsOpen: y,
320
+ isTransparentBack: !0,
321
+ additionalClassModalBody: e.modalAddBody,
322
+ additionalClass: e.filterWithSaveModal,
323
+ children: /* @__PURE__ */ t($, {})
324
+ }
325
+ )
326
+ ] });
327
+ };
7
328
  export {
8
- a as FilterWithSave
329
+ ye as FilterWithSave
9
330
  };
@@ -1,3 +1,2 @@
1
1
  import { IFlexProps } from './Flex.types';
2
-
3
2
  export declare const Flex: ({ className, children, jc, ai, gap, fd, w, additionalClass, ...rest }: IFlexProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { c as t } from "../../../index-rKuIKazb.js";
2
+ import { c as t } from "../../../index-B2JRaoNz.js";
3
3
  const o = "_root_fi64k_1", _ = {
4
4
  root: o,
5
5
  "gap-1": "_gap-1_fi64k_5",
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type IFlex = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16';
3
2
  type IJustifyContent = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
4
3
  type IAlignItems = 'start' | 'end' | 'center' | 'stretch';