stone-kit 0.0.1028 → 0.0.1030

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 (177) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/FilterWithSave-BWA01WwU.js +2476 -0
  3. package/dist/{Menu-CdJTzN7T.js → Menu-CeBSiTyP.js} +176 -157
  4. package/dist/{Option-rFBMQAPk.js → Option-DU8cvBnA.js} +1 -1
  5. package/dist/Router.js +1 -1
  6. package/dist/components/Button/ui/Button.d.ts +1 -0
  7. package/dist/components/Button/ui/Button.js +1 -1
  8. package/dist/components/Button/ui/Button.types.d.ts +1 -0
  9. package/dist/components/CheckBox/CheckBox.d.ts +1 -0
  10. package/dist/components/CheckBox/CheckBox.js +1 -1
  11. package/dist/components/CheckBox/CheckBox.types.d.ts +1 -0
  12. package/dist/components/CheckBoxNew/CheckBox.types.d.ts +1 -0
  13. package/dist/components/CheckBoxNew/CheckBoxNew.d.ts +1 -0
  14. package/dist/components/CheckBoxNew/CheckBoxNew.js +17 -17
  15. package/dist/components/CheckboxSelect/ui/CheckboxSelect.d.ts +1 -0
  16. package/dist/components/CheckboxSelect/ui/CheckboxSelect.js +34 -34
  17. package/dist/components/CommercialLotCard/CommercialLotCard.d.ts +1 -0
  18. package/dist/components/CommercialLotCard/CommercialLotCard.js +7 -50
  19. package/dist/components/CommercialLotCard/components/Price/Price.d.ts +1 -0
  20. package/dist/components/CommercialLotCard/components/Price/Price.js +24 -23
  21. package/dist/components/CommercialLotCard/components/Snippets/Snippets.d.ts +1 -0
  22. package/dist/components/CommercialLotCard/components/Snippets/Snippets.js +27 -98
  23. package/dist/components/CommercialLotCard/components/Tags/Tags.d.ts +1 -0
  24. package/dist/components/CommercialLotCard/components/Tags/Tags.js +17 -17
  25. package/dist/components/CommercialLotCard/types/CommercialLotCard.types.d.ts +1 -0
  26. package/dist/components/CommercialLotCard/types/LotCard.d.ts +1 -0
  27. package/dist/components/CommercialLotCard/utils/formatPrice.js +2 -1
  28. package/dist/components/CommercialLotCard/utils/getTagsFeatures.d.ts +2 -1
  29. package/dist/components/DestinationTab/ui/DestinationTab.d.ts +1 -0
  30. package/dist/components/DestinationTab/ui/DestinationTab.js +41 -41
  31. package/dist/components/DestinationTab/ui/DestinationTab.types.d.ts +1 -0
  32. package/dist/components/FieldInput/ui/FieldInput.d.ts +1 -0
  33. package/dist/components/FieldInput/ui/FieldInput.types.d.ts +1 -0
  34. package/dist/components/FilterWithSave/hooks/useFilterWithSave.d.ts +1 -0
  35. package/dist/components/FilterWithSave/hooks/useFilterWithSave.js +26 -54
  36. package/dist/components/FilterWithSave/ui/FilterWithSave.d.ts +1 -0
  37. package/dist/components/FilterWithSave/ui/FilterWithSave.js +7 -328
  38. package/dist/components/Flex/ui/Flex.d.ts +1 -0
  39. package/dist/components/Flex/ui/Flex.js +1 -1
  40. package/dist/components/Flex/ui/Flex.types.d.ts +1 -0
  41. package/dist/components/FormModal/ui/ModalForm.js +28 -1430
  42. package/dist/components/GroupedInput/ui/GroupedInputs.d.ts +1 -0
  43. package/dist/components/GroupedInput/ui/GroupedInputs.js +1 -1
  44. package/dist/components/GroupedInput/ui/GroupedInputs.types.d.ts +1 -0
  45. package/dist/components/Input/ui/Input.d.ts +2 -1
  46. package/dist/components/Input/ui/Input.js +304 -234
  47. package/dist/components/Logo/ui/Logo.d.ts +1 -0
  48. package/dist/components/Logo/ui/Logo.js +6 -6
  49. package/dist/components/LotCard/hooks/useLotCard.d.ts +1 -0
  50. package/dist/components/LotCard/hooks/useLotCard.js +24 -6
  51. package/dist/components/LotCard/index.js +2 -2
  52. package/dist/components/LotCard/ui/LotCard.d.ts +1 -0
  53. package/dist/components/LotCard/ui/LotCard.js +10 -213
  54. package/dist/components/LotCard/ui/LotCard.types.d.ts +1 -0
  55. package/dist/components/LotCard/utils/formatPrice.js +2 -1
  56. package/dist/components/LotCard/utils/getTagsFeatures.d.ts +2 -1
  57. package/dist/components/LotCardSkeleton/ui/LotCardSkeleton.js +1 -1
  58. package/dist/components/MetroLabel/ui/MetroLabel.d.ts +1 -0
  59. package/dist/components/MetroLabel/ui/MetroLabel.js +16 -16
  60. package/dist/components/MetroLabel/ui/MetroLabel.types.d.ts +1 -0
  61. package/dist/components/MetroTag/ui/MetroTag.d.ts +1 -0
  62. package/dist/components/MetroTag/ui/MetroTag.js +74 -74
  63. package/dist/components/MetroTag/ui/MetroTag.types.d.ts +1 -0
  64. package/dist/components/Modal/ui/Modal.d.ts +1 -0
  65. package/dist/components/Modal/ui/Modal.js +37 -34
  66. package/dist/components/Modal/ui/Modal.types.d.ts +1 -0
  67. package/dist/components/ModalSuccess/ModalSuccess.d.ts +1 -0
  68. package/dist/components/ModalSuccess/ModalSuccess.js +19 -18
  69. package/dist/components/ModalSuccess/ModalSuccess.types.d.ts +1 -0
  70. package/dist/components/NewIcon/icons/PinTrans.d.ts +1 -0
  71. package/dist/components/NewIcon/icons/SmallFilter.d.ts +1 -0
  72. package/dist/components/NewIcon/ui/NewIcon.d.ts +1 -0
  73. package/dist/components/NewIcon/ui/NewIcon.js +3 -3
  74. package/dist/components/NewIcon/ui/NewIcon.types.d.ts +1 -0
  75. package/dist/components/NewIcon/ui/iconTypes.d.ts +1 -0
  76. package/dist/components/ProjectCardSkeleton/ui/ProjectCardSkeleton.js +11 -9
  77. package/dist/components/RoundButton/ui/RoundButton.d.ts +1 -0
  78. package/dist/components/RoundButton/ui/RoundButton.js +2 -2
  79. package/dist/components/RoundButton/ui/RoundButton.types.d.ts +1 -0
  80. package/dist/components/Select/model/selectMode.d.ts +1 -0
  81. package/dist/components/Select/model/selectMode.js +30 -30
  82. package/dist/components/Select/ui/Category.d.ts +1 -0
  83. package/dist/components/Select/ui/Category.js +3 -3
  84. package/dist/components/Select/ui/Option.d.ts +1 -0
  85. package/dist/components/Select/ui/Option.js +2 -2
  86. package/dist/components/Select/ui/Select.d.ts +1 -0
  87. package/dist/components/Select/ui/Select.js +115 -115
  88. package/dist/components/SliderNavigation/index.d.ts +1 -0
  89. package/dist/components/SliderNavigation/ui/SliderNavigation.d.ts +1 -0
  90. package/dist/components/SliderNavigation/ui/SliderNavigation.js +6 -6
  91. package/dist/components/SortSelect/hooks/useSortSelect.d.ts +2 -1
  92. package/dist/components/SortSelect/hooks/useSortSelect.js +2 -2
  93. package/dist/components/SortSelect/index.js +1 -1
  94. package/dist/components/SortSelect/ui/SortSelect.d.ts +1 -0
  95. package/dist/components/SortSelect/ui/SortSelect.js +26 -108
  96. package/dist/components/SortSelect/ui/SortSelect.types.d.ts +1 -0
  97. package/dist/components/SummarySelect/ui/SummarySelect.d.ts +1 -0
  98. package/dist/components/SummarySelect/ui/SummarySelect.js +65 -59
  99. package/dist/components/Switcher/ui/Switcher.d.ts +1 -0
  100. package/dist/components/Switcher/ui/Switcher.js +1 -1
  101. package/dist/components/Switcher/ui/Switcher.types.d.ts +1 -0
  102. package/dist/components/TabSelect/ui/TabSelect.d.ts +13 -7
  103. package/dist/components/TabSelect/ui/TabSelect.js +42 -37
  104. package/dist/components/TabSwitcher/index.js +2 -2
  105. package/dist/components/TabSwitcher/ui/TabSwitcher.d.ts +5 -3
  106. package/dist/components/TabSwitcher/ui/TabSwitcher.js +26 -118
  107. package/dist/components/TabSwitcher/ui/TabSwitcher.types.d.ts +2 -1
  108. package/dist/components/Tag/ui/Tag.d.ts +1 -0
  109. package/dist/components/Tag/ui/Tag.js +91 -91
  110. package/dist/components/Tag/ui/Tag.types.d.ts +1 -0
  111. package/dist/components/Text/ui/Text.d.ts +1 -0
  112. package/dist/components/Text/ui/Text.js +1 -1
  113. package/dist/components/Text/ui/Text.types.d.ts +1 -0
  114. package/dist/components/TextArea/TextArea.d.ts +9 -0
  115. package/dist/components/TextArea/TextArea.js +18 -12
  116. package/dist/components/ZoomControls/ui/ZoomControls.d.ts +1 -0
  117. package/dist/components/ZoomControls/ui/ZoomControls.types.d.ts +1 -0
  118. package/dist/components/mobileButton/ui/MobileButton.d.ts +1 -0
  119. package/dist/components/mobileButton/ui/MobileButton.js +1 -1
  120. package/dist/components/mobileButton/ui/MobileButton.types.d.ts +1 -0
  121. package/dist/{index-CBdtKu-u.js → index-DmANy9jd.js} +271 -272
  122. package/dist/{index-3E04UaC2.js → index-DvCs2JPX.js} +9629 -9529
  123. package/dist/index-rKuIKazb.js +45 -0
  124. package/dist/layout/Layout.d.ts +1 -0
  125. package/dist/layout/components/Header/Header.js +71 -48
  126. package/dist/layout/components/Menu.js +24 -2
  127. package/dist/main.js +65 -70
  128. package/dist/pages/ButtonsPage/Buttons.js +63 -57
  129. package/dist/pages/FormsPage/FormsPage.js +50 -26
  130. package/dist/pages/IconsPage/IconsPage.js +31 -9
  131. package/dist/pages/InputPage/InputPage.js +32 -10
  132. package/dist/pages/LogoPage/LogoPage.js +35 -13
  133. package/dist/pages/LotsPage/LotsPage.js +17 -18
  134. package/dist/pages/LotsPage/const.d.ts +1 -0
  135. package/dist/pages/ModalsPage/ModalPage.js +66 -46
  136. package/dist/pages/SelectPage/SelectPage.js +58 -58
  137. package/dist/pages/TabsPage/TabsPage.js +20 -19
  138. package/dist/pages/TagsPage/TagsPage.js +44 -23
  139. package/dist/shared/checkLargeOffice.d.ts +1 -0
  140. package/dist/shared/checkLargeOffice.js +1 -1
  141. package/dist/shared/mlnRound.js +2 -1
  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/style.css +1 -0
  167. package/dist/useSortSelect-BTCEVMVn.js +80 -0
  168. package/package.json +22 -31
  169. package/dist/ButtonState.module-DtW3aevR.js +0 -8
  170. package/dist/components/TextArea/TextArea.types.d.ts +0 -10
  171. package/dist/components/TextArea/TextArea.types.js +0 -1
  172. package/dist/index-B2JRaoNz.js +0 -48
  173. package/dist/pages/ButtonsPage/ButtonState/ButtonState.d.ts +0 -6
  174. package/dist/pages/ButtonsPage/ButtonState/ButtonState.js +0 -121
  175. package/dist/stone-kit.css +0 -1
  176. package/dist/useLotCard-DG9doKCX.js +0 -186
  177. package/dist/useSortSelect-C72ddcYI.js +0 -80
@@ -1,11 +1,11 @@
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,
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,
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: x,
8
+ destinationName: n,
9
9
  routeText: w,
10
10
  "large-size": "_large-size_1c7de_51",
11
11
  whiteStroke: g,
@@ -14,58 +14,58 @@ const N = "_destination_1c7de_1", x = "_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 = 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(
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(
30
30
  "label",
31
31
  {
32
32
  className: b(
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
33
+ _.destination,
34
+ _[`${m}-size`],
35
+ _[`${c}-size_m`],
36
+ _[`${a}-size_l`],
37
+ _[`${d}`],
38
+ _[`${i}-width`],
39
+ p
40
40
  ),
41
- ...p,
42
- htmlFor: t.destName,
41
+ ...h,
42
+ htmlFor: e.destName,
43
43
  children: [
44
- /* @__PURE__ */ i(
44
+ /* @__PURE__ */ r(
45
45
  "input",
46
46
  {
47
- id: t.destName,
48
- checked: l,
49
- onChange: n,
47
+ id: e.destName,
48
+ checked: o,
49
+ onChange: u,
50
50
  type: "checkbox",
51
- name: t.destName,
52
- value: t.destName
51
+ name: e.destName,
52
+ value: e.destName
53
53
  }
54
54
  ),
55
- /* @__PURE__ */ s("div", { className: e.destination, children: [
56
- t?.color && /* @__PURE__ */ i("span", { style: { background: t?.color ?? "" } }),
57
- t.destName
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
58
58
  ] }),
59
- c.map((_, h) => /* @__PURE__ */ s(
59
+ l.map((s, z) => /* @__PURE__ */ t(
60
60
  "div",
61
61
  {
62
- className: e.routeWrapper,
62
+ className: _.routeWrapper,
63
63
  children: [
64
- _.type,
65
- /* @__PURE__ */ i("div", { className: e.routeText, children: _.text })
64
+ s.type,
65
+ /* @__PURE__ */ r("div", { className: _.routeText, children: s.text })
66
66
  ]
67
67
  },
68
- h
68
+ z
69
69
  ))
70
70
  ]
71
71
  }
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+
2
3
  type destinationSizesWidth = 'auto' | 'full';
3
4
  export declare const DESTINATIONS_VARIANTS: {
4
5
  whiteStroke: string;
@@ -1,3 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { ComponentProps } from './FieldInput.types';
3
+
3
4
  export declare const FieldInput: ({ label, handleClear, isShowClear, children }: React.PropsWithChildren<ComponentProps>) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { default as React, ReactNode } from 'react';
2
+
2
3
  interface InputProps {
3
4
  label: string;
4
5
  handleClear?: () => void;
@@ -1,4 +1,5 @@
1
1
  import { TOption } from '../../Select/ui/Select.types';
2
+
2
3
  interface IuseFilterWithSave {
3
4
  selectOptions?: TOption[];
4
5
  disabledOptions?: TOption[];
@@ -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 { 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";
54
26
  export {
55
- I as useFilterWithSave
27
+ w as useFilterWithSave
56
28
  };
@@ -1,4 +1,5 @@
1
1
  import { TOption } from '../../Select/ui/Select.types';
2
+
2
3
  interface IFilterWithSave {
3
4
  selectOptions?: TOption[];
4
5
  disabledOptions?: TOption[];
@@ -1,330 +1,9 @@
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: W,
90
- handleOptionClick: w,
91
- handleClearClick: T,
92
- handleSaveClick: x,
93
- isModalOpen: b,
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(), W ? y((o) => !o) : b || 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
- !W && /* @__PURE__ */ d(
217
- "div",
218
- {
219
- ref: L,
220
- className: pe(e.desktopWrapper, { [e.desktopWrapperOpen]: b }),
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
- W && /* @__PURE__ */ t(
316
- V,
317
- {
318
- isOpen: b,
319
- emitIsOpen: y,
320
- isTransparentBack: !0,
321
- additionalClassModalBody: e.modalAddBody,
322
- additionalClass: e.filterWithSaveModal,
323
- children: /* @__PURE__ */ t($, {})
324
- }
325
- )
326
- ] });
327
- };
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";
328
7
  export {
329
- ye as FilterWithSave
8
+ a as FilterWithSave
330
9
  };
@@ -1,2 +1,3 @@
1
1
  import { IFlexProps } from './Flex.types';
2
+
2
3
  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-B2JRaoNz.js";
2
+ import { c as t } from "../../../index-rKuIKazb.js";
3
3
  const o = "_root_fi64k_1", _ = {
4
4
  root: o,
5
5
  "gap-1": "_gap-1_fi64k_5",
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type IFlex = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16';
2
3
  type IJustifyContent = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
3
4
  type IAlignItems = 'start' | 'end' | 'center' | 'stretch';