stone-kit 0.0.1030 → 0.0.1031
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/App.js +1 -1
- package/dist/{Menu-CeBSiTyP.js → Menu-CdJTzN7T.js} +157 -176
- package/dist/{Option-DU8cvBnA.js → Option-rFBMQAPk.js} +1 -1
- package/dist/Router.js +1 -1
- package/dist/components/Button/ui/Button.d.ts +0 -1
- package/dist/components/Button/ui/Button.js +1 -1
- package/dist/components/Button/ui/Button.types.d.ts +0 -1
- package/dist/components/CheckBox/CheckBox.d.ts +0 -1
- package/dist/components/CheckBox/CheckBox.js +1 -1
- package/dist/components/CheckBox/CheckBox.types.d.ts +0 -1
- package/dist/components/CheckBoxNew/CheckBox.types.d.ts +0 -1
- package/dist/components/CheckBoxNew/CheckBoxNew.d.ts +0 -1
- package/dist/components/CheckBoxNew/CheckBoxNew.js +17 -17
- package/dist/components/CheckboxSelect/ui/CheckboxSelect.d.ts +0 -1
- package/dist/components/CheckboxSelect/ui/CheckboxSelect.js +34 -34
- package/dist/components/CommercialLotCard/CommercialLotCard.d.ts +0 -1
- package/dist/components/CommercialLotCard/CommercialLotCard.js +50 -7
- package/dist/components/CommercialLotCard/components/Price/Price.d.ts +0 -1
- package/dist/components/CommercialLotCard/components/Price/Price.js +25 -26
- package/dist/components/CommercialLotCard/components/Snippets/Snippets.d.ts +0 -1
- package/dist/components/CommercialLotCard/components/Snippets/Snippets.js +98 -27
- package/dist/components/CommercialLotCard/components/Tags/Tags.d.ts +0 -1
- package/dist/components/CommercialLotCard/components/Tags/Tags.js +17 -17
- package/dist/components/CommercialLotCard/types/CommercialLotCard.types.d.ts +0 -1
- package/dist/components/CommercialLotCard/types/LotCard.d.ts +0 -1
- package/dist/components/CommercialLotCard/utils/formatPrice.js +1 -2
- package/dist/components/CommercialLotCard/utils/getTagsFeatures.d.ts +1 -2
- package/dist/components/DestinationTab/ui/DestinationTab.d.ts +0 -1
- package/dist/components/DestinationTab/ui/DestinationTab.js +41 -41
- package/dist/components/DestinationTab/ui/DestinationTab.types.d.ts +0 -1
- package/dist/components/FieldInput/ui/FieldInput.d.ts +0 -1
- package/dist/components/FieldInput/ui/FieldInput.types.d.ts +0 -1
- package/dist/components/FilterWithSave/hooks/useFilterWithSave.d.ts +0 -1
- package/dist/components/FilterWithSave/hooks/useFilterWithSave.js +54 -26
- package/dist/components/FilterWithSave/ui/FilterWithSave.d.ts +0 -1
- package/dist/components/FilterWithSave/ui/FilterWithSave.js +328 -7
- package/dist/components/Flex/ui/Flex.d.ts +0 -1
- package/dist/components/Flex/ui/Flex.js +1 -1
- package/dist/components/Flex/ui/Flex.types.d.ts +0 -1
- package/dist/components/FormModal/ui/ModalForm.js +1430 -28
- package/dist/components/GroupedInput/ui/GroupedInputs.d.ts +0 -1
- package/dist/components/GroupedInput/ui/GroupedInputs.js +1 -1
- package/dist/components/GroupedInput/ui/GroupedInputs.types.d.ts +0 -1
- package/dist/components/Input/ui/Input.d.ts +1 -2
- package/dist/components/Input/ui/Input.js +234 -304
- package/dist/components/Logo/ui/Logo.d.ts +0 -1
- package/dist/components/Logo/ui/Logo.js +6 -6
- package/dist/components/LotCard/hooks/useLotCard.d.ts +0 -1
- package/dist/components/LotCard/hooks/useLotCard.js +6 -24
- package/dist/components/LotCard/index.js +2 -2
- package/dist/components/LotCard/ui/LotCard.d.ts +0 -1
- package/dist/components/LotCard/ui/LotCard.js +213 -10
- package/dist/components/LotCard/ui/LotCard.types.d.ts +0 -1
- package/dist/components/LotCard/utils/formatPrice.js +1 -2
- package/dist/components/LotCard/utils/getTagsFeatures.d.ts +1 -2
- package/dist/components/LotCardSkeleton/ui/LotCardSkeleton.js +1 -1
- package/dist/components/MetroLabel/ui/MetroLabel.d.ts +0 -1
- package/dist/components/MetroLabel/ui/MetroLabel.js +16 -16
- package/dist/components/MetroLabel/ui/MetroLabel.types.d.ts +0 -1
- package/dist/components/MetroTag/ui/MetroTag.d.ts +0 -1
- package/dist/components/MetroTag/ui/MetroTag.js +74 -74
- package/dist/components/MetroTag/ui/MetroTag.types.d.ts +0 -1
- package/dist/components/Modal/ui/Modal.d.ts +0 -1
- package/dist/components/Modal/ui/Modal.js +34 -37
- package/dist/components/Modal/ui/Modal.types.d.ts +0 -1
- package/dist/components/ModalSuccess/ModalSuccess.d.ts +0 -1
- package/dist/components/ModalSuccess/ModalSuccess.js +18 -19
- package/dist/components/ModalSuccess/ModalSuccess.types.d.ts +0 -1
- package/dist/components/NewIcon/icons/PinTrans.d.ts +0 -1
- package/dist/components/NewIcon/icons/SmallFilter.d.ts +0 -1
- package/dist/components/NewIcon/ui/NewIcon.d.ts +0 -1
- package/dist/components/NewIcon/ui/NewIcon.js +1 -1
- package/dist/components/NewIcon/ui/NewIcon.types.d.ts +0 -1
- package/dist/components/NewIcon/ui/iconTypes.d.ts +0 -1
- package/dist/components/ProjectCardSkeleton/ui/ProjectCardSkeleton.js +9 -11
- package/dist/components/RoundButton/ui/RoundButton.d.ts +0 -1
- package/dist/components/RoundButton/ui/RoundButton.js +2 -2
- package/dist/components/RoundButton/ui/RoundButton.types.d.ts +0 -1
- package/dist/components/Select/model/selectMode.d.ts +0 -1
- package/dist/components/Select/model/selectMode.js +30 -30
- package/dist/components/Select/ui/Category.d.ts +0 -1
- package/dist/components/Select/ui/Category.js +3 -3
- package/dist/components/Select/ui/Option.d.ts +0 -1
- package/dist/components/Select/ui/Option.js +2 -2
- package/dist/components/Select/ui/Select.d.ts +0 -1
- package/dist/components/Select/ui/Select.js +115 -115
- package/dist/components/SliderNavigation/index.d.ts +0 -1
- package/dist/components/SliderNavigation/ui/SliderNavigation.d.ts +0 -1
- package/dist/components/SliderNavigation/ui/SliderNavigation.js +6 -6
- package/dist/components/SortSelect/hooks/useSortSelect.d.ts +0 -1
- package/dist/components/SortSelect/hooks/useSortSelect.js +2 -2
- package/dist/components/SortSelect/index.js +1 -1
- package/dist/components/SortSelect/ui/SortSelect.d.ts +0 -1
- package/dist/components/SortSelect/ui/SortSelect.js +108 -26
- package/dist/components/SortSelect/ui/SortSelect.types.d.ts +0 -1
- package/dist/components/SummarySelect/ui/SummarySelect.d.ts +0 -1
- package/dist/components/SummarySelect/ui/SummarySelect.js +59 -65
- package/dist/components/Switcher/ui/Switcher.d.ts +0 -1
- package/dist/components/Switcher/ui/Switcher.js +1 -1
- package/dist/components/Switcher/ui/Switcher.types.d.ts +0 -1
- package/dist/components/TabSelect/ui/TabSelect.d.ts +0 -1
- package/dist/components/TabSelect/ui/TabSelect.js +5 -5
- package/dist/components/TabSwitcher/index.js +2 -2
- package/dist/components/TabSwitcher/ui/TabSwitcher.d.ts +0 -1
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +120 -26
- package/dist/components/TabSwitcher/ui/TabSwitcher.types.d.ts +0 -1
- package/dist/components/Tag/ui/Tag.d.ts +0 -1
- package/dist/components/Tag/ui/Tag.js +91 -91
- package/dist/components/Tag/ui/Tag.types.d.ts +0 -1
- package/dist/components/Text/ui/Text.d.ts +0 -1
- package/dist/components/Text/ui/Text.js +1 -1
- package/dist/components/Text/ui/Text.types.d.ts +0 -1
- package/dist/components/TextArea/TextArea.d.ts +0 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/ZoomControls/ui/ZoomControls.d.ts +0 -1
- package/dist/components/ZoomControls/ui/ZoomControls.types.d.ts +0 -1
- package/dist/components/mobileButton/ui/MobileButton.d.ts +0 -1
- package/dist/components/mobileButton/ui/MobileButton.js +1 -1
- package/dist/components/mobileButton/ui/MobileButton.types.d.ts +0 -1
- package/dist/{index-DvCs2JPX.js → index-3E04UaC2.js} +9529 -9629
- package/dist/index-B2JRaoNz.js +48 -0
- package/dist/{index-DmANy9jd.js → index-CBdtKu-u.js} +272 -271
- package/dist/layout/Layout.d.ts +0 -1
- package/dist/layout/components/Header/Header.js +48 -71
- package/dist/layout/components/Menu.js +2 -24
- package/dist/main.js +70 -65
- package/dist/pages/ButtonsPage/Buttons.js +44 -61
- package/dist/pages/FormsPage/FormsPage.js +26 -50
- package/dist/pages/IconsPage/IconsPage.js +9 -31
- package/dist/pages/InputPage/InputPage.js +10 -32
- package/dist/pages/LogoPage/LogoPage.js +13 -35
- package/dist/pages/LotsPage/LotsPage.js +18 -17
- package/dist/pages/LotsPage/const.d.ts +0 -1
- package/dist/pages/ModalsPage/ModalPage.js +46 -66
- package/dist/pages/SelectPage/SelectPage.js +58 -58
- package/dist/pages/TabsPage/TabsPage.js +19 -20
- package/dist/pages/TagsPage/TagsPage.js +23 -44
- package/dist/shared/checkLargeOffice.d.ts +0 -1
- package/dist/shared/checkLargeOffice.js +1 -1
- package/dist/shared/mlnRound.js +1 -2
- package/dist/stone-kit.css +1 -0
- package/dist/stories/entities/CommercialLotCard/CommercialLotCard.stories.js +2 -2
- package/dist/stories/shared/ui/Button/Button.stories.js +5 -5
- package/dist/stories/shared/ui/CheckBox/CheckBox.stories.js +1 -1
- package/dist/stories/shared/ui/CheckBox/CheckBoxNew.stories.js +1 -1
- package/dist/stories/shared/ui/CheckboxSelect/CheckboxSelect.stories.js +1 -1
- package/dist/stories/shared/ui/DestinationTab/DestinationTab.stories.js +1 -1
- package/dist/stories/shared/ui/FieldInput/FieldInput.stories.js +1 -1
- package/dist/stories/shared/ui/FilterWithSave/FilterWithSave.stories.js +2 -2
- package/dist/stories/shared/ui/FormModal/FormModal.stories.js +8 -8
- package/dist/stories/shared/ui/GroupedInput/GroupedInput.stories.js +1 -1
- package/dist/stories/shared/ui/Logo/Logo.stories.js +1 -1
- package/dist/stories/shared/ui/MobileButton/MobileButton.stories.js +1 -1
- package/dist/stories/shared/ui/Modal/Modal.stories.js +1 -1
- package/dist/stories/shared/ui/ModalSuccess/ModalSuccess.stories.js +1 -1
- package/dist/stories/shared/ui/RoundButton/RoundButton.stories.js +1 -1
- package/dist/stories/shared/ui/Select/Select.stories.js +1 -1
- package/dist/stories/shared/ui/SliderNavigation/SliderNavigation.stories.js +1 -1
- package/dist/stories/shared/ui/SortSelect/SortSelect.stories.js +2 -2
- package/dist/stories/shared/ui/SummarySelect/SummarySelect.stories.js +1 -1
- package/dist/stories/shared/ui/Switcher/Switcher.stories.js +1 -1
- package/dist/stories/shared/ui/TabSelect/TabSelect.stories.js +1 -1
- package/dist/stories/shared/ui/TabSwitcher/TabSwitcher.stories.js +2 -2
- package/dist/stories/shared/ui/Tag/Tag.stories.js +4 -4
- package/dist/stories/shared/ui/ZoomControls/ZoomControls.stories.js +1 -1
- package/dist/useLotCard-DG9doKCX.js +186 -0
- package/dist/useSortSelect-B8HOGdOt.js +79 -0
- package/package.json +1 -1
- package/dist/FilterWithSave-BWA01WwU.js +0 -2476
- package/dist/index-rKuIKazb.js +0 -45
- package/dist/style.css +0 -1
- package/dist/useSortSelect-BTCEVMVn.js +0 -80
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
const
|
|
4
|
-
destination:
|
|
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:
|
|
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 =
|
|
18
|
-
size:
|
|
19
|
-
size_m:
|
|
20
|
-
size_l:
|
|
21
|
-
destination:
|
|
22
|
-
variant:
|
|
23
|
-
width:
|
|
24
|
-
routes:
|
|
25
|
-
checked:
|
|
26
|
-
onChange:
|
|
27
|
-
additionalClass:
|
|
28
|
-
...
|
|
29
|
-
}) => /* @__PURE__ */
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
...
|
|
42
|
-
htmlFor:
|
|
41
|
+
...p,
|
|
42
|
+
htmlFor: t.destName,
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ i(
|
|
45
45
|
"input",
|
|
46
46
|
{
|
|
47
|
-
id:
|
|
48
|
-
checked:
|
|
49
|
-
onChange:
|
|
47
|
+
id: t.destName,
|
|
48
|
+
checked: l,
|
|
49
|
+
onChange: n,
|
|
50
50
|
type: "checkbox",
|
|
51
|
-
name:
|
|
52
|
-
value:
|
|
51
|
+
name: t.destName,
|
|
52
|
+
value: t.destName
|
|
53
53
|
}
|
|
54
54
|
),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
/* @__PURE__ */ s("div", { className: e.destination, children: [
|
|
56
|
+
t?.color && /* @__PURE__ */ i("span", { style: { background: t?.color ?? "" } }),
|
|
57
|
+
t.destName
|
|
58
58
|
] }),
|
|
59
|
-
|
|
59
|
+
c.map((_, h) => /* @__PURE__ */ s(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
|
-
className:
|
|
62
|
+
className: e.routeWrapper,
|
|
63
63
|
children: [
|
|
64
|
-
|
|
65
|
-
/* @__PURE__ */
|
|
64
|
+
_.type,
|
|
65
|
+
/* @__PURE__ */ i("div", { className: e.routeText, children: _.text })
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
|
-
|
|
68
|
+
h
|
|
69
69
|
))
|
|
70
70
|
]
|
|
71
71
|
}
|
|
@@ -1,28 +1,56 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
55
|
+
I as useFilterWithSave
|
|
28
56
|
};
|
|
@@ -1,9 +1,330 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "../../
|
|
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
|
-
|
|
329
|
+
ye as FilterWithSave
|
|
9
330
|
};
|
|
@@ -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';
|