stone-kit 0.0.1027 → 0.0.1029
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 +4 -4
- package/dist/{Option-DU8cvBnA.js → Option-CtwUzW8a.js} +1 -1
- package/dist/Router.js +1 -1
- package/dist/chunk-4WY6JWTD-BeveLKf_.js +1582 -0
- 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 -2
- 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 +1 -2
- 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 +323 -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 +1445 -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 -325
- 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 +43 -33
- 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 +1 -2
- 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 +12 -8
- package/dist/components/TabSelect/ui/TabSelect.js +42 -37
- package/dist/components/TabSwitcher/index.js +2 -2
- package/dist/components/TabSwitcher/ui/TabSwitcher.d.ts +4 -4
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +120 -26
- package/dist/components/TabSwitcher/ui/TabSwitcher.types.d.ts +1 -2
- 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 +8 -0
- package/dist/components/TextArea/TextArea.js +18 -12
- 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-BJwl9stn.js} +9596 -9695
- package/dist/index-YnD2EP-S.js +43 -0
- package/dist/layout/Layout.d.ts +0 -1
- package/dist/layout/components/Header/Header.js +48 -71
- package/dist/layout/components/Menu.js +107 -26
- package/dist/main.js +70 -65
- package/dist/pages/ButtonsPage/Buttons.js +49 -77
- 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-CYcRSogE.js +186 -0
- package/dist/useSortSelect-Cy3od4ig.js +80 -0
- package/package.json +22 -31
- package/dist/ButtonState.module-DtW3aevR.js +0 -8
- package/dist/FilterWithSave-DkVYQ7W8.js +0 -2473
- package/dist/Menu-DKuZheFD.js +0 -513
- package/dist/components/TextArea/TextArea.types.d.ts +0 -11
- package/dist/components/TextArea/TextArea.types.js +0 -1
- package/dist/index-DmANy9jd.js +0 -890
- package/dist/index-rKuIKazb.js +0 -45
- package/dist/pages/ButtonsPage/ButtonState/ButtonState.d.ts +0 -7
- package/dist/pages/ButtonsPage/ButtonState/ButtonState.js +0 -121
- package/dist/style.css +0 -1
- package/dist/useSortSelect-CjZXLFOG.js +0 -80
|
@@ -1,183 +1,183 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { c as Z } from "../../../index-
|
|
4
|
-
import { s as e, O as
|
|
5
|
-
import { NewIcon as T } from "../../NewIcon/ui/NewIcon.js";
|
|
1
|
+
import { jsxs as m, jsx as n, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import { useState as B, useRef as F, useEffect as M } from "react";
|
|
3
|
+
import { c as Z } from "../../../index-YnD2EP-S.js";
|
|
4
|
+
import { s as e, O as z } from "../../../Option-CtwUzW8a.js";
|
|
6
5
|
import { Category as b } from "./Category.js";
|
|
7
6
|
import { handleClickModeOption as I, handleClickModeCategory as V } from "../model/selectMode.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
import { NewIcon as D } from "../../NewIcon/ui/NewIcon.js";
|
|
8
|
+
const o = Z.bind(e), ce = ({
|
|
9
|
+
options: s,
|
|
10
|
+
customPlaceholder: O,
|
|
11
|
+
placeholder: T = "Выберите опции",
|
|
12
|
+
error: _,
|
|
13
|
+
disabled: y,
|
|
14
|
+
disabledOptions: d = [],
|
|
15
|
+
additionalClass: q = "",
|
|
16
16
|
additionalClassOption: G,
|
|
17
17
|
additionalClassBtn: H,
|
|
18
18
|
onChange: J,
|
|
19
|
-
onBlur:
|
|
20
|
-
selectedValues:
|
|
21
|
-
isBtn:
|
|
22
|
-
btnName:
|
|
23
|
-
clickableOptions:
|
|
19
|
+
onBlur: A,
|
|
20
|
+
selectedValues: i = [],
|
|
21
|
+
isBtn: C = !1,
|
|
22
|
+
btnName: S,
|
|
23
|
+
clickableOptions: f,
|
|
24
24
|
isListRight: K = !1,
|
|
25
|
-
sizeIcon:
|
|
25
|
+
sizeIcon: p,
|
|
26
26
|
mode: c = "options",
|
|
27
|
-
onClickItem:
|
|
28
|
-
onCLickSelect:
|
|
29
|
-
size_s:
|
|
30
|
-
size_m:
|
|
31
|
-
size_l:
|
|
32
|
-
isDisabledNotClickable:
|
|
27
|
+
onClickItem: N,
|
|
28
|
+
onCLickSelect: x,
|
|
29
|
+
size_s: $ = "large",
|
|
30
|
+
size_m: E,
|
|
31
|
+
size_l: w,
|
|
32
|
+
isDisabledNotClickable: u,
|
|
33
33
|
isLast: P,
|
|
34
|
-
selectAll:
|
|
34
|
+
selectAll: L
|
|
35
35
|
}) => {
|
|
36
|
-
const Q = { value: "selectAll", label:
|
|
37
|
-
|
|
38
|
-
const [
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
option:
|
|
42
|
-
selectedOptions:
|
|
43
|
-
disabledOptions:
|
|
44
|
-
setSelectedOptions:
|
|
36
|
+
const Q = { value: "selectAll", label: L?.label ?? "Выбрать все" }, U = () => L?.enabled ? [Q, .../* @__PURE__ */ new Set([...s])] : [.../* @__PURE__ */ new Set([...s])];
|
|
37
|
+
s = Array.isArray(s) ? U() : [];
|
|
38
|
+
const [l, R] = B(i), [a, g] = B(!1), h = F(null), X = l.filter((t) => t.value !== "selectAll").length, v = (t) => {
|
|
39
|
+
N && N(t);
|
|
40
|
+
const r = {
|
|
41
|
+
option: t,
|
|
42
|
+
selectedOptions: l,
|
|
43
|
+
disabledOptions: d,
|
|
44
|
+
setSelectedOptions: R,
|
|
45
45
|
onChange: J,
|
|
46
46
|
mode: c,
|
|
47
|
-
optionsParentArr:
|
|
47
|
+
optionsParentArr: s
|
|
48
48
|
};
|
|
49
|
-
Array.isArray(
|
|
49
|
+
Array.isArray(t) ? V(r) : I(r);
|
|
50
50
|
}, Y = () => {
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
if (
|
|
51
|
+
A && A(l);
|
|
52
|
+
}, k = (t) => {
|
|
53
|
+
const r = t.target;
|
|
54
|
+
if (h.current && !h.current.contains(t.target)) {
|
|
55
|
+
if (r.closest("svg"))
|
|
56
56
|
return;
|
|
57
|
-
|
|
57
|
+
g(!1);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
|
|
61
|
-
document.removeEventListener("click",
|
|
62
|
-
}), [
|
|
63
|
-
const
|
|
64
|
-
return
|
|
65
|
-
|
|
66
|
-
}, [
|
|
60
|
+
M(() => (document.addEventListener("click", k), () => {
|
|
61
|
+
document.removeEventListener("click", k);
|
|
62
|
+
}), [a]);
|
|
63
|
+
const W = F(i);
|
|
64
|
+
return M(() => {
|
|
65
|
+
i.length !== W.current.length && (R(i), W.current = i);
|
|
66
|
+
}, [i]), /* @__PURE__ */ m(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
|
-
ref:
|
|
70
|
-
className:
|
|
69
|
+
ref: h,
|
|
70
|
+
className: o(e.multiSelectWrapper, { [e.multiSelectWrapperError]: _ }, q),
|
|
71
71
|
tabIndex: 0,
|
|
72
72
|
onBlur: Y,
|
|
73
73
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
!
|
|
76
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ m("div", { className: o(e.inputWrapper), children: [
|
|
75
|
+
!C && /* @__PURE__ */ m(j, { children: [
|
|
76
|
+
/* @__PURE__ */ n(
|
|
77
77
|
"div",
|
|
78
78
|
{
|
|
79
|
-
className:
|
|
79
|
+
className: o(
|
|
80
80
|
e.selectedOptions,
|
|
81
|
-
e[`${
|
|
82
|
-
e[`${
|
|
83
|
-
e[`${
|
|
84
|
-
{ [e.selectedOptionsNotEmpty]:
|
|
85
|
-
{ [e.selectOptionsDisabled]:
|
|
81
|
+
e[`${$}-size`],
|
|
82
|
+
e[`${E}-size_m`],
|
|
83
|
+
e[`${w}-size)_l`],
|
|
84
|
+
{ [e.selectedOptionsNotEmpty]: l.length > 0 },
|
|
85
|
+
{ [e.selectOptionsDisabled]: y }
|
|
86
86
|
),
|
|
87
|
-
onClick: () =>
|
|
88
|
-
children: /* @__PURE__ */
|
|
87
|
+
onClick: () => g(!a),
|
|
88
|
+
children: /* @__PURE__ */ n("div", { className: e.selectedText, children: O || (l.length === 0 ? T : "Выбрано " + X) })
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
91
|
+
/* @__PURE__ */ n(
|
|
92
|
+
D,
|
|
93
93
|
{
|
|
94
94
|
name: "arrowShort",
|
|
95
|
-
deg:
|
|
96
|
-
size:
|
|
95
|
+
deg: a ? "180" : "0",
|
|
96
|
+
size: p ?? "24",
|
|
97
97
|
additionalClass: e.icon
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
100
|
] }),
|
|
101
|
-
|
|
102
|
-
/* @__PURE__ */
|
|
101
|
+
C && /* @__PURE__ */ m(j, { children: [
|
|
102
|
+
/* @__PURE__ */ n(
|
|
103
103
|
"button",
|
|
104
104
|
{
|
|
105
|
-
className:
|
|
105
|
+
className: o(
|
|
106
106
|
e.selectedOptions,
|
|
107
|
-
e[`${
|
|
108
|
-
e[`${
|
|
109
|
-
e[`${
|
|
107
|
+
e[`${$}-size`],
|
|
108
|
+
e[`${E}-size_m`],
|
|
109
|
+
e[`${w}-size_l`],
|
|
110
110
|
e.selectedOptionsBtn,
|
|
111
|
-
{ [e.selectOptionsDisabled]:
|
|
111
|
+
{ [e.selectOptionsDisabled]: y },
|
|
112
112
|
H
|
|
113
113
|
),
|
|
114
114
|
onClick: () => {
|
|
115
|
-
|
|
115
|
+
x && x(), g(!a);
|
|
116
116
|
},
|
|
117
|
-
children:
|
|
117
|
+
children: S
|
|
118
118
|
}
|
|
119
119
|
),
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
|
|
120
|
+
/* @__PURE__ */ n(
|
|
121
|
+
D,
|
|
122
122
|
{
|
|
123
123
|
name: "filter",
|
|
124
|
-
deg:
|
|
125
|
-
size:
|
|
126
|
-
additionalClass:
|
|
124
|
+
deg: a ? "180" : "0",
|
|
125
|
+
size: p ?? "24",
|
|
126
|
+
additionalClass: o(e.icon, { [e.iconBtn]: !S })
|
|
127
127
|
}
|
|
128
128
|
)
|
|
129
129
|
] })
|
|
130
130
|
] }),
|
|
131
|
-
|
|
131
|
+
a && /* @__PURE__ */ n("div", { className: o(
|
|
132
132
|
e.optionsOuterContainer,
|
|
133
133
|
{ [e.listRight]: K },
|
|
134
134
|
{ [e.lastList]: P },
|
|
135
135
|
G
|
|
136
|
-
), children: /* @__PURE__ */
|
|
136
|
+
), children: /* @__PURE__ */ m(
|
|
137
137
|
"div",
|
|
138
138
|
{
|
|
139
139
|
className: e.optionsList,
|
|
140
140
|
children: [
|
|
141
|
-
(c === "options" || c === "single") &&
|
|
142
|
-
|
|
141
|
+
(c === "options" || c === "single") && s?.map((t, r) => /* @__PURE__ */ n(
|
|
142
|
+
z,
|
|
143
143
|
{
|
|
144
|
-
disabledOptions:
|
|
145
|
-
clickableOptions:
|
|
146
|
-
selectedOptions:
|
|
147
|
-
sizeIcon:
|
|
148
|
-
option:
|
|
149
|
-
handleOptionClick:
|
|
150
|
-
isDisabledNotClickable:
|
|
144
|
+
disabledOptions: d,
|
|
145
|
+
clickableOptions: f,
|
|
146
|
+
selectedOptions: l,
|
|
147
|
+
sizeIcon: p,
|
|
148
|
+
option: t,
|
|
149
|
+
handleOptionClick: v,
|
|
150
|
+
isDisabledNotClickable: u
|
|
151
151
|
},
|
|
152
|
-
|
|
153
|
-
))
|
|
154
|
-
(c === "category" || c === "double") &&
|
|
152
|
+
r
|
|
153
|
+
)),
|
|
154
|
+
(c === "category" || c === "double") && s?.map((t, r) => "options" in t ? /* @__PURE__ */ n(
|
|
155
155
|
b,
|
|
156
156
|
{
|
|
157
|
-
disabledOptions:
|
|
158
|
-
clickableOptions:
|
|
159
|
-
selectedOptions:
|
|
160
|
-
sizeIcon:
|
|
161
|
-
category:
|
|
157
|
+
disabledOptions: d,
|
|
158
|
+
clickableOptions: f,
|
|
159
|
+
selectedOptions: l,
|
|
160
|
+
sizeIcon: p,
|
|
161
|
+
category: t,
|
|
162
162
|
mode: c,
|
|
163
|
-
selectedValues:
|
|
164
|
-
handleOptionClick:
|
|
165
|
-
isDisabledNotClickable:
|
|
163
|
+
selectedValues: i,
|
|
164
|
+
handleOptionClick: v,
|
|
165
|
+
isDisabledNotClickable: u
|
|
166
166
|
},
|
|
167
|
-
|
|
168
|
-
) :
|
|
169
|
-
|
|
167
|
+
r
|
|
168
|
+
) : t.value === "selectAll" ? /* @__PURE__ */ n(
|
|
169
|
+
z,
|
|
170
170
|
{
|
|
171
|
-
disabledOptions:
|
|
172
|
-
clickableOptions:
|
|
173
|
-
selectedOptions:
|
|
174
|
-
sizeIcon:
|
|
175
|
-
option:
|
|
176
|
-
handleOptionClick:
|
|
177
|
-
isDisabledNotClickable:
|
|
171
|
+
disabledOptions: d,
|
|
172
|
+
clickableOptions: f,
|
|
173
|
+
selectedOptions: l,
|
|
174
|
+
sizeIcon: p,
|
|
175
|
+
option: t,
|
|
176
|
+
handleOptionClick: v,
|
|
177
|
+
isDisabledNotClickable: u
|
|
178
178
|
},
|
|
179
|
-
|
|
180
|
-
) : null)
|
|
179
|
+
r
|
|
180
|
+
) : null)
|
|
181
181
|
]
|
|
182
182
|
}
|
|
183
183
|
) })
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { ISliderNavigation } from './SliderNavigation.types.ts';
|
|
2
|
-
|
|
3
2
|
export declare const SliderNavigation: ({ indexSlide, isDisabledOff, goPrev, goNext, arr, isNeedTag, additionalClassTag, navigationClassName, additionalClassNavButton, size, size_m, size_l, }: ISliderNavigation) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useClientWidth as C } from "../../../shared/useClientWidth.js";
|
|
3
|
+
import { c as T } from "../../../index-YnD2EP-S.js";
|
|
2
4
|
import { RoundButton as d } from "../../RoundButton/ui/RoundButton.js";
|
|
3
|
-
import { Tag as
|
|
4
|
-
import { useClientWidth as T } from "../../../shared/useClientWidth.js";
|
|
5
|
-
import { c as N } from "../../../index-rKuIKazb.js";
|
|
5
|
+
import { Tag as N } from "../../Tag/ui/Tag.js";
|
|
6
6
|
const k = "_sliderTag_1rvl9_1", l = {
|
|
7
7
|
sliderTag: k
|
|
8
|
-
}, v =
|
|
8
|
+
}, v = T.bind(l), $ = ({
|
|
9
9
|
indexSlide: o,
|
|
10
10
|
isDisabledOff: s,
|
|
11
11
|
goPrev: m,
|
|
@@ -19,7 +19,7 @@ const k = "_sliderTag_1rvl9_1", l = {
|
|
|
19
19
|
size_m: i = "medium",
|
|
20
20
|
size_l: a = "large"
|
|
21
21
|
}) => {
|
|
22
|
-
const { isDesktop: h } =
|
|
22
|
+
const { isDesktop: h } = C();
|
|
23
23
|
return /* @__PURE__ */ f("div", { className: u, children: [
|
|
24
24
|
/* @__PURE__ */ r(
|
|
25
25
|
d,
|
|
@@ -35,7 +35,7 @@ const k = "_sliderTag_1rvl9_1", l = {
|
|
|
35
35
|
}
|
|
36
36
|
),
|
|
37
37
|
g && /* @__PURE__ */ r(
|
|
38
|
-
|
|
38
|
+
N,
|
|
39
39
|
{
|
|
40
40
|
additionalClass: v(l.sliderTag, p),
|
|
41
41
|
variant: "shade",
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
2
|
import { Option } from '../ui/SortSelect.types';
|
|
3
3
|
import { TOption } from '../../Select/ui/Select.types.ts';
|
|
4
|
-
|
|
5
4
|
interface IUseSortSelect {
|
|
6
5
|
selectedOption: Option | null;
|
|
7
6
|
setSelectedOption?: (event: Option | null) => void;
|
|
8
7
|
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
8
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
10
9
|
isOpen: boolean;
|
|
11
10
|
isMobile: boolean;
|
|
12
11
|
placeholder: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { u as m } from "../../../useSortSelect-
|
|
3
|
-
import "../../../index-
|
|
2
|
+
import { u as m } from "../../../useSortSelect-Cy3od4ig.js";
|
|
3
|
+
import "../../../index-YnD2EP-S.js";
|
|
4
4
|
export {
|
|
5
5
|
m as useSortSelect
|
|
6
6
|
};
|
|
@@ -1,29 +1,111 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "../../../index-
|
|
4
|
-
import "../../../useSortSelect-
|
|
5
|
-
import "
|
|
6
|
-
import "../../
|
|
7
|
-
import "../../
|
|
8
|
-
import "../../
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as M, useRef as W, useEffect as E } from "react";
|
|
3
|
+
import { c as L } from "../../../index-YnD2EP-S.js";
|
|
4
|
+
import { s as e, u as j } from "../../../useSortSelect-Cy3od4ig.js";
|
|
5
|
+
import { useClientWidth as w } from "../../../shared/useClientWidth.js";
|
|
6
|
+
import { NewIcon as O } from "../../NewIcon/ui/NewIcon.js";
|
|
7
|
+
import { Modal as T } from "../../Modal/ui/Modal.js";
|
|
8
|
+
import { Text as z } from "../../Text/ui/Text.js";
|
|
9
|
+
const r = L.bind(e), A = ({
|
|
10
|
+
options: n,
|
|
11
|
+
selectedOption: h,
|
|
12
|
+
placeholder: v = "",
|
|
13
|
+
error: N,
|
|
14
|
+
disabled: b,
|
|
15
|
+
additionalClass: x = "",
|
|
16
|
+
onChange: c,
|
|
17
|
+
onBlur: y,
|
|
18
|
+
mini: k,
|
|
19
|
+
openOnTop: d = !1,
|
|
20
|
+
onClickItem: C,
|
|
21
|
+
onCLickSelect: m,
|
|
22
|
+
onOpenClick: p
|
|
23
|
+
}) => {
|
|
24
|
+
const [o, i] = M(!1), u = W(null), { isMobile: l } = w(), { handleBlur: B, getInputValue: I, getOption: f, handleDocumentClick: S } = j({
|
|
25
|
+
selectedOption: h,
|
|
26
|
+
onClickOption: C,
|
|
27
|
+
setSelectedOption: c,
|
|
28
|
+
setIsOpen: i,
|
|
29
|
+
containerRef: u,
|
|
30
|
+
isMobile: l,
|
|
31
|
+
placeholder: v,
|
|
32
|
+
onChange: c,
|
|
33
|
+
onBlur: y
|
|
34
|
+
});
|
|
35
|
+
return E(() => (document.addEventListener("click", S), () => {
|
|
36
|
+
document.removeEventListener("click", S);
|
|
37
|
+
}), []), /* @__PURE__ */ s(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
ref: u,
|
|
41
|
+
className: r(
|
|
42
|
+
e.sortSelectWrapper,
|
|
43
|
+
{ [e.sortSelectWrapperError]: N },
|
|
44
|
+
{ [e.sortSelectWrapperTop]: d },
|
|
45
|
+
x
|
|
46
|
+
),
|
|
47
|
+
tabIndex: 0,
|
|
48
|
+
onBlur: B,
|
|
49
|
+
onClick: () => {
|
|
50
|
+
m && m();
|
|
51
|
+
},
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ s("div", { className: r(e.inputWrapper), children: [
|
|
54
|
+
/* @__PURE__ */ t(
|
|
55
|
+
"input",
|
|
56
|
+
{
|
|
57
|
+
type: "text",
|
|
58
|
+
readOnly: !0,
|
|
59
|
+
value: I(),
|
|
60
|
+
className: r(
|
|
61
|
+
e.selectedOptions,
|
|
62
|
+
{ [e.selectOptionsDisabled]: b },
|
|
63
|
+
{ [e.selectionOptionMini]: k }
|
|
64
|
+
),
|
|
65
|
+
onClick: () => {
|
|
66
|
+
o || p && p(), i(!o);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ t(
|
|
71
|
+
O,
|
|
72
|
+
{
|
|
73
|
+
name: "twoArrows",
|
|
74
|
+
size: "24",
|
|
75
|
+
additionalClass: e.icon
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
] }),
|
|
79
|
+
o && l && /* @__PURE__ */ s(
|
|
80
|
+
T,
|
|
81
|
+
{
|
|
82
|
+
isOpen: o,
|
|
83
|
+
emitIsOpen: i,
|
|
84
|
+
additionalClassModalBody: e.modalAddBody,
|
|
85
|
+
additionalClass: e.selectModal,
|
|
86
|
+
createPortalObj: { domNode: document.querySelector("body") },
|
|
87
|
+
isTransparentBack: !0,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ s("div", { className: e.mobileSortHeader, children: [
|
|
90
|
+
/* @__PURE__ */ t(z, { children: "Сортировка" }),
|
|
91
|
+
/* @__PURE__ */ t("div", { onClick: () => i(!1), children: /* @__PURE__ */ t(
|
|
92
|
+
O,
|
|
93
|
+
{
|
|
94
|
+
name: "close",
|
|
95
|
+
size: "20"
|
|
96
|
+
}
|
|
97
|
+
) })
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ t("div", { className: e.mobileOptionList, children: n?.map((a) => f(a)) })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
o && !l && /* @__PURE__ */ t("div", { className: r(e.optionsList, { [e.optionListOnTop]: d }), children: n?.map((a) => f(a)) })
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
A.displayName = "SortSelect";
|
|
27
109
|
export {
|
|
28
110
|
A as SortSelect
|
|
29
111
|
};
|