stone-kit 0.0.1105 → 0.0.1107
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/README.md +30 -0
- package/dist/App.d.ts +2 -0
- package/dist/App.js +10 -0
- package/dist/Option-DmDx_xOt.js +99 -0
- package/dist/PinTrans-D6OZq76b.js +10 -0
- package/dist/Router.d.ts +2 -0
- package/dist/Router.js +103 -0
- package/dist/SmallFilter-C-VKnbkP.js +10 -0
- package/dist/chunk-4WY6JWTD-BeveLKf_.js +1582 -0
- package/dist/components/Button/ui/Button.d.ts +1 -2
- package/dist/components/Button/ui/Button.js +74 -67
- package/dist/components/Button/ui/Button.types.d.ts +7 -5
- package/dist/components/Button/ui/Button.types.js +5 -3
- package/dist/components/CheckBox/CheckBox.d.ts +2 -0
- package/dist/components/CheckBox/CheckBox.js +84 -0
- package/dist/components/CheckBox/CheckBox.types.d.ts +17 -0
- package/dist/components/CheckBox/CheckBox.types.js +1 -0
- package/dist/components/CheckBox/index.d.ts +2 -0
- package/dist/components/CheckBox/index.js +4 -0
- package/dist/components/CheckBoxNew/CheckBox.types.d.ts +16 -0
- package/dist/components/CheckBoxNew/CheckBox.types.js +6 -0
- package/dist/components/CheckBoxNew/CheckBoxNew.d.ts +11 -0
- package/dist/components/CheckBoxNew/CheckBoxNew.js +45 -0
- package/dist/components/CheckboxSelect/index.d.ts +1 -0
- package/dist/components/CheckboxSelect/index.js +4 -0
- package/dist/components/CheckboxSelect/ui/CheckboxSelect.d.ts +18 -0
- package/dist/components/CheckboxSelect/ui/CheckboxSelect.js +57 -0
- package/dist/components/CommercialLotCard/CommercialLotCard.d.ts +2 -0
- package/dist/components/CommercialLotCard/CommercialLotCard.js +81 -0
- package/dist/components/CommercialLotCard/components/PaymentLink/PaymentLink.d.ts +6 -0
- package/dist/components/CommercialLotCard/components/PaymentLink/PaymentLink.js +21 -0
- package/dist/components/CommercialLotCard/components/Price/Price.d.ts +9 -0
- package/dist/components/CommercialLotCard/components/Price/Price.js +39 -0
- package/dist/components/CommercialLotCard/components/Snippets/Snippets.d.ts +6 -0
- package/dist/components/CommercialLotCard/components/Snippets/Snippets.js +100 -0
- package/dist/components/CommercialLotCard/components/Tags/Tags.d.ts +7 -0
- package/dist/components/CommercialLotCard/components/Tags/Tags.js +37 -0
- package/dist/components/CommercialLotCard/types/CommercialLotCard.types.d.ts +10 -0
- package/dist/components/CommercialLotCard/types/CommercialLotCard.types.js +1 -0
- package/dist/components/CommercialLotCard/types/LotCard.d.ts +386 -0
- package/dist/components/CommercialLotCard/types/LotCard.js +1 -0
- package/dist/components/CommercialLotCard/utils/formatPrice.d.ts +1 -0
- package/dist/components/CommercialLotCard/utils/formatPrice.js +8 -0
- package/dist/components/CommercialLotCard/utils/getTagsFeatures.d.ts +4 -0
- package/dist/components/CommercialLotCard/utils/getTagsFeatures.js +13 -0
- 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/FavoriteIcon/FavoriteIcon.d.ts +7 -0
- package/dist/components/FavoriteIcon/FavoriteIcon.js +66 -0
- package/dist/components/FavoriteIcon/Heart.d.ts +3 -0
- package/dist/components/FavoriteIcon/Heart.js +24 -0
- package/dist/components/FavoriteIcon/HeartFilled.d.ts +5 -0
- package/dist/components/FavoriteIcon/HeartFilled.js +27 -0
- package/dist/components/FieldInput/ui/FieldInput.d.ts +1 -2
- package/dist/components/FieldInput/ui/FieldInput.js +28 -7
- package/dist/components/FieldInput/ui/FieldInput.types.d.ts +3 -1
- package/dist/components/FilterWithSave/hooks/useFilterWithSave.d.ts +43 -0
- package/dist/components/FilterWithSave/hooks/useFilterWithSave.js +56 -0
- package/dist/components/FilterWithSave/ui/FilterWithSave.d.ts +29 -0
- package/dist/components/FilterWithSave/ui/FilterWithSave.js +325 -0
- 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.d.ts +60 -0
- package/dist/components/FormModal/ui/ModalForm.js +1518 -0
- package/dist/components/FormModal/utils/reg.d.ts +4 -0
- package/dist/components/FormModal/utils/reg.js +6 -0
- package/dist/components/GroupedInput/ui/GroupedInputs.d.ts +0 -1
- package/dist/components/GroupedInput/ui/GroupedInputs.js +5 -5
- package/dist/components/GroupedInput/ui/GroupedInputs.types.d.ts +0 -1
- package/dist/components/Input/ui/Input.d.ts +28 -0
- package/dist/components/Input/ui/Input.js +3247 -49
- package/dist/components/Input/ui/Input.types.d.ts +0 -23
- package/dist/components/Input/ui/Input.types.js +1 -7
- package/dist/components/Logo/ui/Logo.d.ts +1 -2
- package/dist/components/Logo/ui/Logo.js +58 -33
- package/dist/components/Logo/ui/Logo.types.d.ts +13 -1
- package/dist/components/Logo/ui/Logo.types.js +14 -1
- package/dist/components/LotCard/hooks/useLotCard.d.ts +25 -0
- package/dist/components/LotCard/hooks/useLotCard.js +13 -0
- package/dist/components/LotCard/ui/LotCard.d.ts +1 -2
- package/dist/components/LotCard/ui/LotCard.js +203 -104
- package/dist/components/LotCard/ui/LotCard.types.d.ts +234 -75
- package/dist/components/LotCard/utils/checkBedroomsCount.js +2 -2
- package/dist/components/LotCard/utils/const.d.ts +8 -0
- package/dist/components/LotCard/utils/const.js +11 -0
- package/dist/components/LotCard/utils/formatPrice.d.ts +1 -1
- package/dist/components/LotCard/utils/formatPrice.js +5 -6
- package/dist/components/LotCard/utils/getTagsFeatures.d.ts +4 -0
- package/dist/components/LotCard/utils/getTagsFeatures.js +13 -0
- package/dist/components/LotCard/utils/monthlyPayment.d.ts +1 -0
- package/dist/components/LotCard/utils/monthlyPayment.js +4 -0
- package/dist/components/LotCardSkeleton/index.d.ts +1 -0
- package/dist/components/LotCardSkeleton/index.js +4 -0
- package/dist/components/LotCardSkeleton/ui/LotCardSkeleton.d.ts +5 -0
- package/dist/components/LotCardSkeleton/ui/LotCardSkeleton.js +83 -0
- package/dist/components/MetroLabel/ui/MetroLabel.d.ts +0 -1
- package/dist/components/MetroLabel/ui/MetroLabel.js +19 -19
- package/dist/components/MetroLabel/ui/MetroLabel.types.d.ts +0 -1
- package/dist/components/MetroTag/ui/MetroTag.d.ts +1 -2
- package/dist/components/MetroTag/ui/MetroTag.js +121 -25
- package/dist/components/MetroTag/ui/MetroTag.types.d.ts +21 -6
- package/dist/components/Modal/ui/Modal.d.ts +2 -17
- package/dist/components/Modal/ui/Modal.js +63 -19594
- package/dist/components/Modal/ui/Modal.types.d.ts +21 -0
- package/dist/components/ModalSuccess/ModalSuccess.d.ts +2 -0
- package/dist/components/ModalSuccess/ModalSuccess.js +60 -0
- package/dist/components/ModalSuccess/ModalSuccess.types.d.ts +8 -0
- package/dist/components/ModalSuccess/ModalSuccess.types.js +1 -0
- package/dist/components/ModalSuccess/index.d.ts +1 -0
- package/dist/components/ModalSuccess/index.js +4 -0
- package/dist/components/NewIcon/icons/PinTrans.d.ts +3 -0
- package/dist/components/NewIcon/icons/PinTrans.js +6 -0
- package/dist/components/NewIcon/icons/SmallFilter.d.ts +3 -0
- package/dist/components/NewIcon/icons/SmallFilter.js +6 -0
- package/dist/components/NewIcon/index.d.ts +1 -1
- package/dist/components/NewIcon/index.js +3 -2
- package/dist/components/NewIcon/ui/NewIcon.d.ts +2 -2
- package/dist/components/NewIcon/ui/NewIcon.js +204 -99
- package/dist/components/NewIcon/ui/NewIcon.types.d.ts +0 -1
- package/dist/components/NewIcon/ui/iconTypes.d.ts +3 -0
- package/dist/components/NewIcon/ui/iconTypes.js +60 -0
- package/dist/components/ProjectCardSkeleton/index.d.ts +1 -0
- package/dist/components/ProjectCardSkeleton/index.js +4 -0
- package/dist/components/ProjectCardSkeleton/ui/ProjectCardSkeleton.d.ts +1 -0
- package/dist/components/ProjectCardSkeleton/ui/ProjectCardSkeleton.js +32 -0
- package/dist/components/RoundButton/ui/RoundButton.d.ts +1 -2
- package/dist/components/RoundButton/ui/RoundButton.js +56 -45
- package/dist/components/RoundButton/ui/RoundButton.types.d.ts +10 -2
- package/dist/components/RoundButton/ui/RoundButton.types.js +13 -6
- package/dist/components/Select/model/selectMode.d.ts +16 -0
- package/dist/components/Select/model/selectMode.js +64 -0
- package/dist/components/Select/ui/Category.d.ts +13 -0
- package/dist/components/Select/ui/Category.js +79 -0
- package/dist/components/Select/ui/Option.d.ts +15 -0
- package/dist/components/Select/ui/Option.js +7 -0
- package/dist/components/Select/ui/Select.d.ts +1 -3
- package/dist/components/Select/ui/Select.js +196 -79
- package/dist/components/Select/ui/Select.types.d.ts +62 -6
- package/dist/components/SliderNavigation/index.d.ts +0 -1
- package/dist/components/SliderNavigation/ui/SliderNavigation.d.ts +1 -2
- package/dist/components/SliderNavigation/ui/SliderNavigation.js +45 -32
- package/dist/components/SliderNavigation/ui/SliderNavigation.types.d.ts +7 -0
- package/dist/components/SortSelect/hooks/useSortSelect.d.ts +5 -4
- package/dist/components/SortSelect/hooks/useSortSelect.js +2 -2
- package/dist/components/SortSelect/ui/SortSelect.d.ts +0 -1
- package/dist/components/SortSelect/ui/SortSelect.js +67 -56
- package/dist/components/SortSelect/ui/SortSelect.types.d.ts +9 -2
- package/dist/components/SummarySelect/index.d.ts +1 -0
- package/dist/components/SummarySelect/index.js +4 -0
- package/dist/components/SummarySelect/ui/SummarySelect.d.ts +15 -0
- package/dist/components/SummarySelect/ui/SummarySelect.js +172 -0
- package/dist/components/Switcher/ui/Switcher.d.ts +1 -2
- package/dist/components/Switcher/ui/Switcher.js +45 -30
- package/dist/components/Switcher/ui/Switcher.types.d.ts +3 -1
- package/dist/components/TabSelect/index.d.ts +1 -0
- package/dist/components/TabSelect/index.js +4 -0
- package/dist/components/TabSelect/ui/TabSelect.d.ts +32 -0
- package/dist/components/TabSelect/ui/TabSelect.js +64 -0
- package/dist/components/TabSelect/ui/TabSelect.types.d.ts +0 -0
- package/dist/components/TabSelect/ui/TabSelect.types.js +1 -0
- package/dist/components/TabSwitcher/ui/TabSwitcher.d.ts +4 -4
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +114 -34
- package/dist/components/TabSwitcher/ui/TabSwitcher.types.d.ts +23 -4
- package/dist/components/Tag/ui/Tag.d.ts +1 -2
- package/dist/components/Tag/ui/Tag.js +96 -44
- package/dist/components/Tag/ui/Tag.types.d.ts +22 -2
- package/dist/components/Tag/ui/Tag.types.js +20 -3
- package/dist/components/Text/ui/Text.d.ts +1 -2
- package/dist/components/Text/ui/Text.js +20 -27
- 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 +25 -0
- package/dist/components/ZoomControls/index.d.ts +1 -0
- package/dist/components/ZoomControls/index.js +4 -0
- package/dist/components/ZoomControls/ui/ZoomControls.d.ts +2 -0
- package/dist/components/ZoomControls/ui/ZoomControls.js +33 -0
- package/dist/components/ZoomControls/ui/ZoomControls.types.d.ts +6 -0
- package/dist/components/ZoomControls/ui/ZoomControls.types.js +1 -0
- package/dist/components/mobileButton/ui/MobileButton.d.ts +0 -1
- package/dist/components/mobileButton/ui/MobileButton.js +38 -38
- package/dist/components/mobileButton/ui/MobileButton.types.d.ts +0 -1
- package/dist/index-BJwl9stn.js +33872 -0
- package/dist/index-YnD2EP-S.js +43 -0
- package/dist/layout/Layout.d.ts +5 -0
- package/dist/layout/Layout.js +11 -0
- package/dist/layout/components/Header/Header.d.ts +1 -0
- package/dist/layout/components/Header/Header.js +141 -0
- package/dist/layout/components/Menu.d.ts +1 -0
- package/dist/layout/components/Menu.js +109 -0
- package/dist/main.d.ts +14 -0
- package/dist/main.js +70 -42
- package/dist/pages/ButtonsPage/Buttons.d.ts +1 -0
- package/dist/pages/ButtonsPage/Buttons.js +106 -0
- package/dist/pages/CheckboxPage/CheckboxPage.d.ts +1 -0
- package/dist/pages/CheckboxPage/CheckboxPage.js +224 -0
- package/dist/pages/FormsPage/FormsPage.d.ts +2 -0
- package/dist/pages/FormsPage/FormsPage.js +58 -0
- package/dist/pages/HomePage/HomePage.d.ts +2 -0
- package/dist/pages/HomePage/HomePage.js +7 -0
- package/dist/pages/IconsPage/IconsPage.d.ts +1 -0
- package/dist/pages/IconsPage/IconsPage.js +19 -0
- package/dist/pages/InputPage/InputPage.d.ts +1 -0
- package/dist/pages/InputPage/InputPage.js +13 -0
- package/dist/pages/LogoPage/LogoPage.d.ts +1 -0
- package/dist/pages/LogoPage/LogoPage.js +16 -0
- package/dist/pages/LotsPage/LotsPage.d.ts +1 -0
- package/dist/pages/LotsPage/LotsPage.js +74 -0
- package/dist/pages/LotsPage/const.d.ts +4 -0
- package/dist/pages/LotsPage/const.js +678 -0
- package/dist/pages/ModalsPage/ModalPage.d.ts +2 -0
- package/dist/pages/ModalsPage/ModalPage.js +110 -0
- package/dist/pages/SelectPage/SelectPage.d.ts +1 -0
- package/dist/pages/SelectPage/SelectPage.js +211 -0
- package/dist/pages/SelectPage/const.d.ts +13 -0
- package/dist/pages/SelectPage/const.js +35 -0
- package/dist/pages/TabsPage/TabsPage.d.ts +2 -0
- package/dist/pages/TabsPage/TabsPage.js +168 -0
- package/dist/pages/TagsPage/TagsPage.d.ts +1 -0
- package/dist/pages/TagsPage/TagsPage.js +64 -0
- package/dist/shared/checkLargeOffice.d.ts +2 -0
- package/dist/shared/checkLargeOffice.js +4 -0
- package/dist/shared/deepEqual.d.ts +1 -0
- package/dist/shared/deepEqual.js +16 -0
- package/dist/shared/fmtNumber.d.ts +1 -0
- package/dist/shared/fmtNumber.js +4 -0
- package/dist/shared/mlnRound.d.ts +1 -0
- package/dist/shared/mlnRound.js +8 -0
- package/dist/shared/useClientWidth.d.ts +2 -0
- package/dist/shared/useClientWidth.js +6 -6
- package/dist/stone-kit.css +1 -0
- package/dist/stories/entities/CommercialLotCard/CommercialLotCard.stories.js +166 -0
- package/dist/stories/entities/index.js +4 -0
- package/dist/stories/shared/ui/Button/Button.stories.js +118 -0
- package/dist/stories/shared/ui/CheckBox/CheckBox.stories.js +71 -0
- package/dist/stories/shared/ui/CheckBox/CheckBoxNew.stories.js +45 -0
- package/dist/stories/shared/ui/CheckboxSelect/CheckboxSelect.stories.js +114 -0
- package/dist/stories/shared/ui/DestinationTab/DestinationTab.stories.js +89 -0
- package/dist/stories/shared/ui/FieldInput/FieldInput.stories.js +31 -0
- package/dist/stories/shared/ui/FilterWithSave/FilterWithSave.stories.js +44 -0
- package/dist/stories/shared/ui/Flex/Flex.stories.js +74 -0
- package/dist/stories/shared/ui/FormModal/FormModal.stories.js +65 -0
- package/dist/stories/shared/ui/GroupedInput/GroupedInput.stories.js +68 -0
- package/dist/stories/shared/ui/Input/Input.stories.js +82 -0
- package/dist/stories/shared/ui/Logo/Logo.stories.js +75 -0
- package/dist/stories/shared/ui/MetroLabel/MetroLabel.stories.js +91 -0
- package/dist/stories/shared/ui/MetroTag/MetroTag.stories.js +96 -0
- package/dist/stories/shared/ui/MobileButton/MobileButton.stories.js +77 -0
- package/dist/stories/shared/ui/Modal/Modal.stories.js +77 -0
- package/dist/stories/shared/ui/ModalSuccess/ModalSuccess.stories.js +34 -0
- package/dist/stories/shared/ui/NewIcon/NewIcon.stories.js +38 -0
- package/dist/stories/shared/ui/RoundButton/RoundButton.stories.js +83 -0
- package/dist/stories/shared/ui/Select/Select.stories.js +81 -0
- package/dist/stories/shared/ui/SliderNavigation/SliderNavigation.stories.js +82 -0
- package/dist/stories/shared/ui/SortSelect/SortSelect.stories.js +87 -0
- package/dist/stories/shared/ui/SummarySelect/SummarySelect.stories.js +85 -0
- package/dist/stories/shared/ui/Switcher/Switcher.stories.js +77 -0
- package/dist/stories/shared/ui/TabSelect/TabSelect.stories.js +76 -0
- package/dist/stories/shared/ui/TabSwitcher/TabSwitcher.stories.js +76 -0
- package/dist/stories/shared/ui/Tag/Tag.stories.js +51 -0
- package/dist/stories/shared/ui/Text/Text.stories.js +22 -0
- package/dist/stories/shared/ui/TextArea/TextArea.stories.js +37 -0
- package/dist/stories/shared/ui/ZoomControls/ZoomControls.stories.js +91 -0
- package/dist/stories/shared/ui/index.js +62 -0
- package/dist/useLotCard-D-gK4J_o.js +186 -0
- package/dist/useSortSelect-IeonkD5d.js +79 -0
- package/package.json +39 -30
- package/dist/index-DIxK0V-G.js +0 -44
- package/dist/style.css +0 -1
- package/dist/useSortSelect-A7A_pNcU.js +0 -76
|
@@ -1,95 +1,212 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { jsxs as d, jsx as t, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { useState as M, useRef as T, useEffect as k } from "react";
|
|
3
|
+
import { c as re } from "../../../index-YnD2EP-S.js";
|
|
4
|
+
import { s as e, O as q } from "../../../Option-DmDx_xOt.js";
|
|
5
|
+
import { Category as te } from "./Category.js";
|
|
6
|
+
import { handleClickModeOption as ne, handleClickModeCategory as le } from "../model/selectMode.js";
|
|
7
|
+
import { NewIcon as y } from "../../NewIcon/ui/NewIcon.js";
|
|
8
|
+
const c = re.bind(e), pe = ({
|
|
9
|
+
options: n,
|
|
10
|
+
customPlaceholder: S,
|
|
11
|
+
placeholder: D = "Выберите опции",
|
|
12
|
+
error: G,
|
|
13
|
+
disabled: $,
|
|
14
|
+
disabledOptions: p = [],
|
|
15
|
+
additionalClass: H = "",
|
|
16
|
+
additionalClassOption: J,
|
|
17
|
+
additionalClassBtn: K,
|
|
18
|
+
onChange: Q,
|
|
19
|
+
onBlur: A,
|
|
20
|
+
selectedValues: s = [],
|
|
21
|
+
isBtn: C = !1,
|
|
22
|
+
btnName: N,
|
|
23
|
+
clickableOptions: f,
|
|
24
|
+
isListRight: U = !1,
|
|
25
|
+
sizeIcon: m,
|
|
26
|
+
mode: o = "options",
|
|
27
|
+
onClickItem: x,
|
|
28
|
+
onCLickSelect: w,
|
|
29
|
+
size_s: E = "large",
|
|
30
|
+
size_m: W,
|
|
31
|
+
size_l: R,
|
|
32
|
+
betweenSize: X = "small",
|
|
33
|
+
isDisabledNotClickable: u,
|
|
34
|
+
isLast: Y,
|
|
35
|
+
isPositionLeftCheckbox: z,
|
|
36
|
+
selectAll: L,
|
|
37
|
+
scrollVersion: Z = "compact",
|
|
38
|
+
isLoading: I = !1,
|
|
39
|
+
selectPaddingBottom: h
|
|
23
40
|
}) => {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
const P = { value: "selectAll", label: L?.label ?? "Выбрать все" }, b = () => L?.enabled && n && n.length > 0 ? [P, .../* @__PURE__ */ new Set([...n])] : [.../* @__PURE__ */ new Set([...n])];
|
|
42
|
+
n = Array.isArray(n) ? b() : [];
|
|
43
|
+
const [a, _] = M(s), [i, g] = M(!1), v = T(null), V = a.filter((r) => r.value !== "selectAll").length, O = (r) => {
|
|
44
|
+
x && x(r);
|
|
45
|
+
const l = {
|
|
46
|
+
option: r,
|
|
47
|
+
selectedOptions: a,
|
|
48
|
+
disabledOptions: p,
|
|
49
|
+
setSelectedOptions: _,
|
|
50
|
+
onChange: Q,
|
|
51
|
+
mode: o,
|
|
52
|
+
optionsParentArr: n,
|
|
53
|
+
clickableOptions: f,
|
|
54
|
+
isDisabledNotClickable: u
|
|
55
|
+
};
|
|
56
|
+
Array.isArray(r) ? le(l) : ne(l);
|
|
57
|
+
}, ee = () => {
|
|
58
|
+
A && A(a);
|
|
59
|
+
}, j = (r) => {
|
|
60
|
+
const l = r.target;
|
|
61
|
+
if (v.current && !v.current.contains(r.target)) {
|
|
62
|
+
if (l.closest("svg"))
|
|
63
|
+
return;
|
|
64
|
+
g(!1);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
k(() => (document.addEventListener("click", j), () => {
|
|
68
|
+
document.removeEventListener("click", j);
|
|
69
|
+
}), [i]);
|
|
70
|
+
const B = T(s);
|
|
71
|
+
return k(() => {
|
|
72
|
+
s.length !== B.current.length && (_(s), B.current = s);
|
|
73
|
+
}, [s]), /* @__PURE__ */ d(
|
|
40
74
|
"div",
|
|
41
75
|
{
|
|
42
|
-
ref:
|
|
43
|
-
className: c(
|
|
76
|
+
ref: v,
|
|
77
|
+
className: c(e.multiSelectWrapper, { [e.multiSelectWrapperError]: G }, H),
|
|
78
|
+
style: h !== void 0 && i ? {
|
|
79
|
+
paddingBottom: `${h}px`,
|
|
80
|
+
marginBottom: `-${h}px`
|
|
81
|
+
} : void 0,
|
|
44
82
|
tabIndex: 0,
|
|
45
|
-
onBlur:
|
|
83
|
+
onBlur: ee,
|
|
46
84
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
85
|
+
/* @__PURE__ */ d("div", { className: c(e.inputWrapper), children: [
|
|
86
|
+
!C && /* @__PURE__ */ d(F, { children: [
|
|
87
|
+
/* @__PURE__ */ t(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
className: c(
|
|
91
|
+
e.selectedOptions,
|
|
92
|
+
e[`${E}-size`],
|
|
93
|
+
e[`${W}-size_m`],
|
|
94
|
+
e[`${R}-size)_l`],
|
|
95
|
+
{ [e.selectedOptionsNotEmpty]: a.length > 0 },
|
|
96
|
+
{ [e.selectOptionsDisabled]: $ }
|
|
97
|
+
),
|
|
98
|
+
onClick: () => g(!i),
|
|
99
|
+
children: /* @__PURE__ */ t("div", { className: e.selectedText, children: S || (a.length === 0 ? D : "Выбрано " + V) })
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
/* @__PURE__ */ t(
|
|
103
|
+
y,
|
|
104
|
+
{
|
|
105
|
+
name: "arrowShort",
|
|
106
|
+
deg: i ? "180" : "0",
|
|
107
|
+
size: m ?? "24",
|
|
108
|
+
additionalClass: e.icon
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] }),
|
|
112
|
+
C && /* @__PURE__ */ d(F, { children: [
|
|
113
|
+
/* @__PURE__ */ t(
|
|
114
|
+
"button",
|
|
115
|
+
{
|
|
116
|
+
className: c(
|
|
117
|
+
e.selectedOptions,
|
|
118
|
+
e[`${E}-size`],
|
|
119
|
+
e[`${W}-size_m`],
|
|
120
|
+
e[`${R}-size_l`],
|
|
121
|
+
e.selectedOptionsBtn,
|
|
122
|
+
{ [e.selectOptionsDisabled]: $ },
|
|
123
|
+
K
|
|
124
|
+
),
|
|
125
|
+
onClick: () => {
|
|
126
|
+
w && w(), g(!i);
|
|
127
|
+
},
|
|
128
|
+
children: N
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
/* @__PURE__ */ t(
|
|
132
|
+
y,
|
|
133
|
+
{
|
|
134
|
+
name: "filter",
|
|
135
|
+
deg: i ? "180" : "0",
|
|
136
|
+
size: m ?? "24",
|
|
137
|
+
additionalClass: c(e.icon, { [e.iconBtn]: !N })
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
] })
|
|
67
141
|
] }),
|
|
68
|
-
|
|
142
|
+
i && /* @__PURE__ */ t("div", { className: c(
|
|
143
|
+
e.optionsOuterContainer,
|
|
144
|
+
e[`betweenSize_${X}`],
|
|
145
|
+
{ [e.listRight]: U },
|
|
146
|
+
{ [e.lastList]: Y },
|
|
147
|
+
J
|
|
148
|
+
), children: I ? /* @__PURE__ */ t("div", { className: e.loaderWrapper, children: /* @__PURE__ */ t(
|
|
149
|
+
y,
|
|
150
|
+
{
|
|
151
|
+
name: "loader",
|
|
152
|
+
size: "24",
|
|
153
|
+
color: "currentColor",
|
|
154
|
+
additionalClass: e.loader
|
|
155
|
+
}
|
|
156
|
+
) }) : !n || n.length === 0 ? /* @__PURE__ */ t("div", { className: e.emptyStateWrapper, children: "Список пуст" }) : /* @__PURE__ */ d(
|
|
69
157
|
"div",
|
|
70
158
|
{
|
|
71
|
-
className: c(
|
|
72
|
-
[s.selected]: t.some((n) => n.value === e.value)
|
|
73
|
-
}),
|
|
74
|
-
onClick: C(e),
|
|
159
|
+
className: c(e.optionsList, e[`scroll_${Z}`]),
|
|
75
160
|
children: [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
161
|
+
(o === "options" || o === "single") && n?.map((r, l) => /* @__PURE__ */ t(
|
|
162
|
+
q,
|
|
163
|
+
{
|
|
164
|
+
disabledOptions: p,
|
|
165
|
+
clickableOptions: f,
|
|
166
|
+
selectedOptions: a,
|
|
167
|
+
sizeIcon: m,
|
|
168
|
+
option: r,
|
|
169
|
+
isPositionLeftCheckbox: z,
|
|
170
|
+
handleOptionClick: O,
|
|
171
|
+
isDisabledNotClickable: u
|
|
172
|
+
},
|
|
173
|
+
l
|
|
174
|
+
)),
|
|
175
|
+
(o === "category" || o === "double") && n?.map((r, l) => "options" in r ? /* @__PURE__ */ t(
|
|
176
|
+
te,
|
|
79
177
|
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
178
|
+
disabledOptions: p,
|
|
179
|
+
clickableOptions: f,
|
|
180
|
+
selectedOptions: a,
|
|
181
|
+
sizeIcon: m,
|
|
182
|
+
category: r,
|
|
183
|
+
mode: o,
|
|
184
|
+
selectedValues: s,
|
|
185
|
+
handleOptionClick: O,
|
|
186
|
+
isDisabledNotClickable: u
|
|
187
|
+
},
|
|
188
|
+
l
|
|
189
|
+
) : r.value === "selectAll" ? /* @__PURE__ */ t(
|
|
190
|
+
q,
|
|
191
|
+
{
|
|
192
|
+
disabledOptions: p,
|
|
193
|
+
clickableOptions: f,
|
|
194
|
+
selectedOptions: a,
|
|
195
|
+
isPositionLeftCheckbox: z,
|
|
196
|
+
sizeIcon: m,
|
|
197
|
+
option: r,
|
|
198
|
+
handleOptionClick: O,
|
|
199
|
+
isDisabledNotClickable: u
|
|
200
|
+
},
|
|
201
|
+
l
|
|
202
|
+
) : null)
|
|
84
203
|
]
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
)) })
|
|
204
|
+
}
|
|
205
|
+
) })
|
|
88
206
|
]
|
|
89
207
|
}
|
|
90
208
|
);
|
|
91
|
-
}
|
|
92
|
-
B.displayName = "Select";
|
|
209
|
+
};
|
|
93
210
|
export {
|
|
94
|
-
|
|
211
|
+
pe as Select
|
|
95
212
|
};
|
|
@@ -1,14 +1,70 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type TOption = {
|
|
2
2
|
value: string | number;
|
|
3
3
|
label: string;
|
|
4
|
-
|
|
4
|
+
parent?: string;
|
|
5
|
+
id?: number | string;
|
|
6
|
+
};
|
|
7
|
+
export type TCategory = {
|
|
8
|
+
value: string | number;
|
|
9
|
+
label: string;
|
|
10
|
+
options: TOption[];
|
|
11
|
+
};
|
|
12
|
+
export type TModeSelect = 'options' | 'category' | 'double' | 'single';
|
|
13
|
+
type SelectSizes = 'medium' | 'small' | 'large';
|
|
14
|
+
type BetweenSize = 'small' | 'medium';
|
|
15
|
+
type ScrollVersion = 'standard' | 'compact';
|
|
5
16
|
export interface MultiSelectProps {
|
|
6
|
-
options:
|
|
17
|
+
options: TOption[] | TCategory[];
|
|
18
|
+
category?: TCategory[];
|
|
7
19
|
placeholder?: string;
|
|
8
20
|
error?: boolean;
|
|
9
21
|
disabled?: boolean;
|
|
22
|
+
betweenSize?: BetweenSize;
|
|
23
|
+
size_s?: SelectSizes;
|
|
24
|
+
size_m?: SelectSizes;
|
|
25
|
+
size_l?: SelectSizes;
|
|
26
|
+
/**
|
|
27
|
+
* Доп стили для родителя-контейнера
|
|
28
|
+
*/
|
|
10
29
|
additionalClass?: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Доп стили для каждой опции
|
|
32
|
+
*/
|
|
33
|
+
additionalClassOption?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Доп стили для кнопки-контейнера
|
|
36
|
+
*/
|
|
37
|
+
additionalClassBtn?: string;
|
|
38
|
+
onChange?: (selectedOptions: TOption[]) => unknown;
|
|
39
|
+
onBlur?: (selectedOptions: TOption[]) => unknown;
|
|
40
|
+
selectedValues?: TOption[];
|
|
41
|
+
isBtn?: boolean;
|
|
42
|
+
btnName?: string;
|
|
43
|
+
widthBtn?: string;
|
|
44
|
+
widthOptionList?: string;
|
|
45
|
+
isListRight?: boolean;
|
|
46
|
+
isPositionLeftCheckbox?: boolean;
|
|
47
|
+
isLast?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Список опций которые будут задизейблены по умолчанию
|
|
50
|
+
*/
|
|
51
|
+
disabledOptions?: TOption[];
|
|
52
|
+
/**
|
|
53
|
+
* Список опций которые доступны для клика
|
|
54
|
+
*/
|
|
55
|
+
clickableOptions?: (string | undefined)[];
|
|
56
|
+
sizeIcon?: string;
|
|
57
|
+
mode?: TModeSelect;
|
|
58
|
+
onClickItem?: (option: TOption | TOption[]) => void;
|
|
59
|
+
onCLickSelect?: () => void;
|
|
60
|
+
isDisabledNotClickable?: boolean;
|
|
61
|
+
customPlaceholder?: string;
|
|
62
|
+
selectAll?: {
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
label?: string;
|
|
65
|
+
};
|
|
66
|
+
scrollVersion?: ScrollVersion;
|
|
67
|
+
isLoading?: boolean;
|
|
68
|
+
selectPaddingBottom?: number;
|
|
14
69
|
}
|
|
70
|
+
export {};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { ISliderNavigation } from './SliderNavigation.types.ts';
|
|
2
|
-
|
|
3
|
-
export declare const SliderNavigation: ({ indexSlide, goPrev, goNext, arr, additionalClassTag, navigationClassName, additionalClassNavButton }: ISliderNavigation) => import("react/jsx-runtime").JSX.Element;
|
|
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,52 +1,65 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
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";
|
|
4
|
+
import { RoundButton as d } from "../../RoundButton/ui/RoundButton.js";
|
|
5
|
+
import { Tag as N } from "../../Tag/ui/Tag.js";
|
|
6
|
+
const k = "_sliderTag_1rvl9_1", l = {
|
|
7
|
+
sliderTag: k
|
|
8
|
+
}, v = T.bind(l), $ = ({
|
|
6
9
|
indexSlide: o,
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
isDisabledOff: s,
|
|
11
|
+
goPrev: m,
|
|
12
|
+
goNext: c,
|
|
9
13
|
arr: e,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
isNeedTag: g = !0,
|
|
15
|
+
additionalClassTag: p = "",
|
|
16
|
+
navigationClassName: u = "",
|
|
17
|
+
additionalClassNavButton: t = "",
|
|
18
|
+
size: n = "medium",
|
|
19
|
+
size_m: i = "medium",
|
|
20
|
+
size_l: a = "large"
|
|
13
21
|
}) => {
|
|
14
|
-
const { isDesktop:
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
|
|
22
|
+
const { isDesktop: h } = C();
|
|
23
|
+
return /* @__PURE__ */ f("div", { className: u, children: [
|
|
24
|
+
/* @__PURE__ */ r(
|
|
25
|
+
d,
|
|
18
26
|
{
|
|
19
|
-
|
|
20
|
-
iconName: "arrowLong",
|
|
27
|
+
iconName: "directionDown",
|
|
21
28
|
deg: "90",
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
size: n,
|
|
30
|
+
size_m: i,
|
|
31
|
+
size_l: a,
|
|
32
|
+
disabled: s ? !1 : o === 0,
|
|
33
|
+
additionalClass: t,
|
|
34
|
+
onClick: m
|
|
25
35
|
}
|
|
26
36
|
),
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
37
|
+
g && /* @__PURE__ */ r(
|
|
38
|
+
N,
|
|
29
39
|
{
|
|
30
|
-
|
|
31
|
-
additionalClass: d,
|
|
40
|
+
additionalClass: v(l.sliderTag, p),
|
|
32
41
|
variant: "shade",
|
|
33
|
-
size: "medium",
|
|
42
|
+
size: h ? "large" : "medium",
|
|
43
|
+
size_m: i,
|
|
44
|
+
size_l: a,
|
|
34
45
|
children: `${o + 1} из ${e.length}`
|
|
35
46
|
}
|
|
36
47
|
),
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
48
|
+
/* @__PURE__ */ r(
|
|
49
|
+
d,
|
|
39
50
|
{
|
|
40
|
-
disabled: o === e.length - 1,
|
|
41
|
-
size:
|
|
42
|
-
|
|
51
|
+
disabled: s ? !1 : o === e.length - 1,
|
|
52
|
+
size: n,
|
|
53
|
+
size_m: i,
|
|
54
|
+
size_l: a,
|
|
55
|
+
iconName: "directionDown",
|
|
43
56
|
deg: "-90",
|
|
44
|
-
additionalClass:
|
|
45
|
-
onClick:
|
|
57
|
+
additionalClass: t,
|
|
58
|
+
onClick: c
|
|
46
59
|
}
|
|
47
60
|
)
|
|
48
61
|
] });
|
|
49
62
|
};
|
|
50
63
|
export {
|
|
51
|
-
|
|
64
|
+
$ as SliderNavigation
|
|
52
65
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
type Sizes = 'large' | 'medium' | 'small';
|
|
1
2
|
export interface ISliderNavigation {
|
|
2
3
|
indexSlide: number;
|
|
3
4
|
goPrev: () => void;
|
|
@@ -6,4 +7,10 @@ export interface ISliderNavigation {
|
|
|
6
7
|
additionalClassTag?: string;
|
|
7
8
|
additionalClassNavButton?: string;
|
|
8
9
|
navigationClassName?: string;
|
|
10
|
+
isNeedTag?: boolean;
|
|
11
|
+
isDisabledOff?: boolean;
|
|
12
|
+
size?: Sizes;
|
|
13
|
+
size_m?: Sizes;
|
|
14
|
+
size_l?: Sizes;
|
|
9
15
|
}
|
|
16
|
+
export {};
|
|
@@ -1,11 +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
4
|
interface IUseSortSelect {
|
|
5
5
|
selectedOption: Option | null;
|
|
6
|
-
setSelectedOption:
|
|
6
|
+
setSelectedOption?: (event: Option | null) => void;
|
|
7
7
|
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
8
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
9
9
|
isOpen: boolean;
|
|
10
10
|
isMobile: boolean;
|
|
11
11
|
placeholder: string;
|
|
@@ -13,12 +13,13 @@ interface IUseSortSelect {
|
|
|
13
13
|
label: string;
|
|
14
14
|
value: string;
|
|
15
15
|
}) => void;
|
|
16
|
+
onClickOption?: (option: TOption | TOption[]) => void;
|
|
16
17
|
onBlur?: (event: {
|
|
17
18
|
label: string;
|
|
18
19
|
value: string;
|
|
19
20
|
}) => void;
|
|
20
21
|
}
|
|
21
|
-
export declare const useSortSelect: ({ selectedOption, setSelectedOption, setIsOpen, containerRef, onBlur, onChange, isMobile, placeholder, }: IUseSortSelect) => {
|
|
22
|
+
export declare const useSortSelect: ({ selectedOption, setSelectedOption, setIsOpen, containerRef, onBlur, onChange, onClickOption, isMobile, placeholder, }: IUseSortSelect) => {
|
|
22
23
|
handleDocumentClick: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
23
24
|
handleBlur: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
24
25
|
getInputValue: () => 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-IeonkD5d.js";
|
|
3
|
+
import "../../../index-YnD2EP-S.js";
|
|
4
4
|
export {
|
|
5
5
|
m as useSortSelect
|
|
6
6
|
};
|