stone-kit 0.0.1032 → 0.0.1034
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-D-8xnCui.js +94 -0
- package/dist/Router.js +1 -1
- package/dist/chunk-4WY6JWTD-BeveLKf_.js +1582 -0
- package/dist/components/Button/ui/Button.js +1 -1
- package/dist/components/CheckBoxNew/CheckBoxNew.js +1 -1
- package/dist/components/CheckboxSelect/ui/CheckboxSelect.d.ts +4 -0
- package/dist/components/CheckboxSelect/ui/CheckboxSelect.js +20 -19
- package/dist/components/CommercialLotCard/CommercialLotCard.d.ts +1 -1
- package/dist/components/CommercialLotCard/CommercialLotCard.js +62 -41
- package/dist/components/CommercialLotCard/components/Price/Price.js +1 -1
- package/dist/components/CommercialLotCard/components/Snippets/Snippets.js +1 -1
- package/dist/components/CommercialLotCard/types/CommercialLotCard.types.d.ts +2 -0
- package/dist/components/DestinationTab/ui/DestinationTab.js +1 -1
- package/dist/components/FieldInput/ui/FieldInput.d.ts +1 -1
- package/dist/components/FieldInput/ui/FieldInput.js +21 -12
- package/dist/components/FieldInput/ui/FieldInput.types.d.ts +1 -0
- package/dist/components/FilterWithSave/hooks/useFilterWithSave.d.ts +1 -1
- package/dist/components/FilterWithSave/ui/FilterWithSave.js +2 -7
- package/dist/components/Flex/ui/Flex.js +1 -1
- package/dist/components/FormModal/ui/ModalForm.d.ts +10 -1
- package/dist/components/FormModal/ui/ModalForm.js +803 -719
- package/dist/components/GroupedInput/ui/GroupedInputs.js +1 -1
- package/dist/components/Input/ui/Input.js +1 -22
- package/dist/components/Logo/ui/Logo.js +1 -1
- package/dist/components/LotCard/hooks/useLotCard.js +2 -2
- package/dist/components/LotCard/ui/LotCard.d.ts +1 -1
- package/dist/components/LotCard/ui/LotCard.js +108 -88
- package/dist/components/LotCard/ui/LotCard.types.d.ts +2 -0
- package/dist/components/LotCardSkeleton/ui/LotCardSkeleton.js +1 -1
- package/dist/components/MetroLabel/ui/MetroLabel.js +1 -1
- package/dist/components/MetroTag/ui/MetroTag.js +1 -1
- package/dist/components/NewIcon/ui/NewIcon.js +119 -114
- package/dist/components/RoundButton/ui/RoundButton.js +1 -1
- package/dist/components/RoundButton/ui/RoundButton.types.d.ts +1 -0
- package/dist/components/Select/ui/Category.js +2 -2
- package/dist/components/Select/ui/Option.d.ts +2 -1
- package/dist/components/Select/ui/Option.js +2 -2
- package/dist/components/Select/ui/Select.d.ts +1 -1
- package/dist/components/Select/ui/Select.js +88 -82
- package/dist/components/Select/ui/Select.types.d.ts +5 -0
- package/dist/components/SliderNavigation/ui/SliderNavigation.js +1 -1
- package/dist/components/SortSelect/hooks/useSortSelect.js +2 -2
- package/dist/components/SortSelect/ui/SortSelect.js +2 -2
- package/dist/components/SummarySelect/ui/SummarySelect.d.ts +1 -0
- package/dist/components/SummarySelect/ui/SummarySelect.js +60 -57
- package/dist/components/Switcher/ui/Switcher.js +1 -1
- package/dist/components/TabSelect/ui/TabSelect.js +1 -1
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +91 -90
- package/dist/components/TabSwitcher/ui/TabSwitcher.types.d.ts +1 -0
- package/dist/components/Tag/ui/Tag.js +1 -1
- package/dist/components/Text/ui/Text.js +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/mobileButton/ui/MobileButton.js +1 -1
- package/dist/{index-3E04UaC2.js → index-BJwl9stn.js} +785 -784
- package/dist/{index-B2JRaoNz.js → index-YnD2EP-S.js} +0 -5
- package/dist/layout/components/Header/Header.js +1 -1
- package/dist/layout/components/Menu.js +107 -4
- package/dist/pages/FormsPage/FormsPage.js +1 -0
- package/dist/pages/TabsPage/TabsPage.js +56 -42
- package/dist/stone-kit.css +1 -1
- package/dist/stories/entities/CommercialLotCard/CommercialLotCard.stories.js +1 -1
- package/dist/stories/shared/ui/Button/Button.stories.js +1 -1
- 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 +1 -1
- package/dist/stories/shared/ui/FormModal/FormModal.stories.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/stories/shared/ui/ZoomControls/ZoomControls.stories.js +1 -1
- package/dist/useLotCard-I7_rgnqj.js +187 -0
- package/dist/{useSortSelect-B8HOGdOt.js → useSortSelect-IeonkD5d.js} +1 -1
- package/package.json +5 -5
- package/dist/Menu-CdJTzN7T.js +0 -494
- package/dist/Option-rFBMQAPk.js +0 -87
- package/dist/index-CBdtKu-u.js +0 -891
- package/dist/useLotCard-DG9doKCX.js +0 -186
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n, Fragment as k } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f, useEffect as S } from "react";
|
|
3
|
-
import { c as y } from "../../../index-
|
|
3
|
+
import { c as y } from "../../../index-YnD2EP-S.js";
|
|
4
4
|
import { sizeMap as i } from "./RoundButton.types.js";
|
|
5
5
|
import { NewIcon as p } from "../../NewIcon/ui/NewIcon.js";
|
|
6
6
|
const g = "_btnRound_z7oq7_1", F = "_whiteStroke_z7oq7_43", R = "_whiteFilled_z7oq7_48", $ = "_whiteTransparent_z7oq7_53", v = "_blackFill_z7oq7_58", x = "_blackStroke_z7oq7_63", E = "_fullGray_z7oq7_71", G = "_blue_z7oq7_79", e = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as u, Fragment as I, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { s as n, O as J } from "../../../Option-
|
|
3
|
-
import { c as O } from "../../../index-
|
|
2
|
+
import { s as n, O as J } from "../../../Option-D-8xnCui.js";
|
|
3
|
+
import { c as O } from "../../../index-YnD2EP-S.js";
|
|
4
4
|
import { useState as U } from "react";
|
|
5
5
|
import { NewIcon as N } from "../../NewIcon/ui/NewIcon.js";
|
|
6
6
|
const j = O.bind(n), z = ({
|
|
@@ -2,6 +2,7 @@ import { TOption } from './Select.types.ts';
|
|
|
2
2
|
export interface IOption {
|
|
3
3
|
option: TOption;
|
|
4
4
|
isOptionCategory?: boolean;
|
|
5
|
+
isPositionLeftCheckbox?: boolean;
|
|
5
6
|
disabledOptions: TOption[];
|
|
6
7
|
selectedOptions: TOption[];
|
|
7
8
|
clickableOptions?: (string | undefined)[];
|
|
@@ -11,4 +12,4 @@ export interface IOption {
|
|
|
11
12
|
dataTestId?: string;
|
|
12
13
|
isDisabledNotClickable?: boolean;
|
|
13
14
|
}
|
|
14
|
-
export declare const Option: ({ option, selectedOptions, disabledOptions, clickableOptions, handleOptionClick, isOptionCategory, sizeIcon, dataTestId, isDisabledNotClickable, addClassName, }: IOption) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const Option: ({ option, selectedOptions, disabledOptions, clickableOptions, handleOptionClick, isOptionCategory, isPositionLeftCheckbox, sizeIcon, dataTestId, isDisabledNotClickable, addClassName, }: IOption) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { O as m } from "../../../Option-
|
|
3
|
-
import "../../../index-
|
|
2
|
+
import { O as m } from "../../../Option-D-8xnCui.js";
|
|
3
|
+
import "../../../index-YnD2EP-S.js";
|
|
4
4
|
import "../../NewIcon/ui/NewIcon.js";
|
|
5
5
|
export {
|
|
6
6
|
m as Option
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MultiSelectProps } from './Select.types';
|
|
2
|
-
export declare const Select: ({ options, customPlaceholder, placeholder, error, disabled, disabledOptions, additionalClass, additionalClassOption, additionalClassBtn, onChange, onBlur, selectedValues, isBtn, btnName, clickableOptions, isListRight, sizeIcon, mode, onClickItem, onCLickSelect, size_s, size_m, size_l, isDisabledNotClickable, isLast, selectAll, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Select: ({ options, customPlaceholder, placeholder, error, disabled, disabledOptions, additionalClass, additionalClassOption, additionalClassBtn, onChange, onBlur, selectedValues, isBtn, btnName, clickableOptions, isListRight, sizeIcon, mode, onClickItem, onCLickSelect, size_s, size_m, size_l, betweenSize, isDisabledNotClickable, isLast, isPositionLeftCheckbox, selectAll, scrollVersion, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,55 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { c as
|
|
4
|
-
import { s as e, O as
|
|
5
|
-
import { Category as
|
|
6
|
-
import { handleClickModeOption as
|
|
1
|
+
import { jsxs as p, jsx as n, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { useState as z, useRef as B, useEffect as F } from "react";
|
|
3
|
+
import { c as V } from "../../../index-YnD2EP-S.js";
|
|
4
|
+
import { s as e, O as M } from "../../../Option-D-8xnCui.js";
|
|
5
|
+
import { Category as ee } from "./Category.js";
|
|
6
|
+
import { handleClickModeOption as te, handleClickModeCategory as re } from "../model/selectMode.js";
|
|
7
7
|
import { NewIcon as D } from "../../NewIcon/ui/NewIcon.js";
|
|
8
|
-
const
|
|
8
|
+
const c = V.bind(e), me = ({
|
|
9
9
|
options: s,
|
|
10
10
|
customPlaceholder: O,
|
|
11
11
|
placeholder: T = "Выберите опции",
|
|
12
|
-
error:
|
|
12
|
+
error: q,
|
|
13
13
|
disabled: y,
|
|
14
14
|
disabledOptions: d = [],
|
|
15
|
-
additionalClass:
|
|
16
|
-
additionalClassOption:
|
|
17
|
-
additionalClassBtn:
|
|
18
|
-
onChange:
|
|
19
|
-
onBlur:
|
|
15
|
+
additionalClass: G = "",
|
|
16
|
+
additionalClassOption: H,
|
|
17
|
+
additionalClassBtn: J,
|
|
18
|
+
onChange: K,
|
|
19
|
+
onBlur: S,
|
|
20
20
|
selectedValues: i = [],
|
|
21
|
-
isBtn:
|
|
22
|
-
btnName:
|
|
21
|
+
isBtn: A = !1,
|
|
22
|
+
btnName: $,
|
|
23
23
|
clickableOptions: f,
|
|
24
|
-
isListRight:
|
|
25
|
-
sizeIcon:
|
|
26
|
-
mode:
|
|
27
|
-
onClickItem:
|
|
28
|
-
onCLickSelect:
|
|
29
|
-
size_s:
|
|
30
|
-
size_m:
|
|
31
|
-
size_l:
|
|
24
|
+
isListRight: Q = !1,
|
|
25
|
+
sizeIcon: m,
|
|
26
|
+
mode: a = "options",
|
|
27
|
+
onClickItem: C,
|
|
28
|
+
onCLickSelect: N,
|
|
29
|
+
size_s: w = "large",
|
|
30
|
+
size_m: x,
|
|
31
|
+
size_l: E,
|
|
32
|
+
betweenSize: U = "small",
|
|
32
33
|
isDisabledNotClickable: u,
|
|
33
|
-
isLast:
|
|
34
|
-
|
|
34
|
+
isLast: X,
|
|
35
|
+
isPositionLeftCheckbox: R,
|
|
36
|
+
selectAll: L,
|
|
37
|
+
scrollVersion: Y = "compact"
|
|
35
38
|
}) => {
|
|
36
|
-
const
|
|
37
|
-
s = Array.isArray(s) ?
|
|
38
|
-
const [l,
|
|
39
|
-
|
|
39
|
+
const Z = { value: "selectAll", label: L?.label ?? "Выбрать все" }, P = () => L?.enabled ? [Z, .../* @__PURE__ */ new Set([...s])] : [.../* @__PURE__ */ new Set([...s])];
|
|
40
|
+
s = Array.isArray(s) ? P() : [];
|
|
41
|
+
const [l, W] = z(i), [o, g] = z(!1), h = B(null), b = l.filter((t) => t.value !== "selectAll").length, v = (t) => {
|
|
42
|
+
C && C(t);
|
|
40
43
|
const r = {
|
|
41
44
|
option: t,
|
|
42
45
|
selectedOptions: l,
|
|
43
46
|
disabledOptions: d,
|
|
44
|
-
setSelectedOptions:
|
|
45
|
-
onChange:
|
|
46
|
-
mode:
|
|
47
|
+
setSelectedOptions: W,
|
|
48
|
+
onChange: K,
|
|
49
|
+
mode: a,
|
|
47
50
|
optionsParentArr: s
|
|
48
51
|
};
|
|
49
|
-
Array.isArray(t) ?
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
},
|
|
52
|
+
Array.isArray(t) ? re(r) : te(r);
|
|
53
|
+
}, I = () => {
|
|
54
|
+
S && S(l);
|
|
55
|
+
}, _ = (t) => {
|
|
53
56
|
const r = t.target;
|
|
54
57
|
if (h.current && !h.current.contains(t.target)) {
|
|
55
58
|
if (r.closest("svg"))
|
|
@@ -57,121 +60,124 @@ const o = Z.bind(e), ce = ({
|
|
|
57
60
|
g(!1);
|
|
58
61
|
}
|
|
59
62
|
};
|
|
60
|
-
|
|
61
|
-
document.removeEventListener("click",
|
|
62
|
-
}), [
|
|
63
|
-
const
|
|
64
|
-
return
|
|
65
|
-
i.length !==
|
|
66
|
-
}, [i]), /* @__PURE__ */
|
|
63
|
+
F(() => (document.addEventListener("click", _), () => {
|
|
64
|
+
document.removeEventListener("click", _);
|
|
65
|
+
}), [o]);
|
|
66
|
+
const j = B(i);
|
|
67
|
+
return F(() => {
|
|
68
|
+
i.length !== j.current.length && (W(i), j.current = i);
|
|
69
|
+
}, [i]), /* @__PURE__ */ p(
|
|
67
70
|
"div",
|
|
68
71
|
{
|
|
69
72
|
ref: h,
|
|
70
|
-
className:
|
|
73
|
+
className: c(e.multiSelectWrapper, { [e.multiSelectWrapperError]: q }, G),
|
|
71
74
|
tabIndex: 0,
|
|
72
|
-
onBlur:
|
|
75
|
+
onBlur: I,
|
|
73
76
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
!
|
|
77
|
+
/* @__PURE__ */ p("div", { className: c(e.inputWrapper), children: [
|
|
78
|
+
!A && /* @__PURE__ */ p(k, { children: [
|
|
76
79
|
/* @__PURE__ */ n(
|
|
77
80
|
"div",
|
|
78
81
|
{
|
|
79
|
-
className:
|
|
82
|
+
className: c(
|
|
80
83
|
e.selectedOptions,
|
|
81
|
-
e[`${
|
|
82
|
-
e[`${
|
|
83
|
-
e[`${
|
|
84
|
+
e[`${w}-size`],
|
|
85
|
+
e[`${x}-size_m`],
|
|
86
|
+
e[`${E}-size)_l`],
|
|
84
87
|
{ [e.selectedOptionsNotEmpty]: l.length > 0 },
|
|
85
88
|
{ [e.selectOptionsDisabled]: y }
|
|
86
89
|
),
|
|
87
|
-
onClick: () => g(!
|
|
88
|
-
children: /* @__PURE__ */ n("div", { className: e.selectedText, children: O || (l.length === 0 ? T : "Выбрано " +
|
|
90
|
+
onClick: () => g(!o),
|
|
91
|
+
children: /* @__PURE__ */ n("div", { className: e.selectedText, children: O || (l.length === 0 ? T : "Выбрано " + b) })
|
|
89
92
|
}
|
|
90
93
|
),
|
|
91
94
|
/* @__PURE__ */ n(
|
|
92
95
|
D,
|
|
93
96
|
{
|
|
94
97
|
name: "arrowShort",
|
|
95
|
-
deg:
|
|
96
|
-
size:
|
|
98
|
+
deg: o ? "180" : "0",
|
|
99
|
+
size: m ?? "24",
|
|
97
100
|
additionalClass: e.icon
|
|
98
101
|
}
|
|
99
102
|
)
|
|
100
103
|
] }),
|
|
101
|
-
|
|
104
|
+
A && /* @__PURE__ */ p(k, { children: [
|
|
102
105
|
/* @__PURE__ */ n(
|
|
103
106
|
"button",
|
|
104
107
|
{
|
|
105
|
-
className:
|
|
108
|
+
className: c(
|
|
106
109
|
e.selectedOptions,
|
|
107
|
-
e[`${
|
|
108
|
-
e[`${
|
|
109
|
-
e[`${
|
|
110
|
+
e[`${w}-size`],
|
|
111
|
+
e[`${x}-size_m`],
|
|
112
|
+
e[`${E}-size_l`],
|
|
110
113
|
e.selectedOptionsBtn,
|
|
111
114
|
{ [e.selectOptionsDisabled]: y },
|
|
112
|
-
|
|
115
|
+
J
|
|
113
116
|
),
|
|
114
117
|
onClick: () => {
|
|
115
|
-
|
|
118
|
+
N && N(), g(!o);
|
|
116
119
|
},
|
|
117
|
-
children:
|
|
120
|
+
children: $
|
|
118
121
|
}
|
|
119
122
|
),
|
|
120
123
|
/* @__PURE__ */ n(
|
|
121
124
|
D,
|
|
122
125
|
{
|
|
123
126
|
name: "filter",
|
|
124
|
-
deg:
|
|
125
|
-
size:
|
|
126
|
-
additionalClass:
|
|
127
|
+
deg: o ? "180" : "0",
|
|
128
|
+
size: m ?? "24",
|
|
129
|
+
additionalClass: c(e.icon, { [e.iconBtn]: !$ })
|
|
127
130
|
}
|
|
128
131
|
)
|
|
129
132
|
] })
|
|
130
133
|
] }),
|
|
131
|
-
|
|
134
|
+
o && /* @__PURE__ */ n("div", { className: c(
|
|
132
135
|
e.optionsOuterContainer,
|
|
133
|
-
{
|
|
134
|
-
{ [e.
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
e[`betweenSize_${U}`],
|
|
137
|
+
{ [e.listRight]: Q },
|
|
138
|
+
{ [e.lastList]: X },
|
|
139
|
+
H
|
|
140
|
+
), children: /* @__PURE__ */ p(
|
|
137
141
|
"div",
|
|
138
142
|
{
|
|
139
|
-
className: e.optionsList,
|
|
143
|
+
className: c(e.optionsList, e[`scroll_${Y}`]),
|
|
140
144
|
children: [
|
|
141
|
-
(
|
|
142
|
-
|
|
145
|
+
(a === "options" || a === "single") && s?.map((t, r) => /* @__PURE__ */ n(
|
|
146
|
+
M,
|
|
143
147
|
{
|
|
144
148
|
disabledOptions: d,
|
|
145
149
|
clickableOptions: f,
|
|
146
150
|
selectedOptions: l,
|
|
147
|
-
sizeIcon:
|
|
151
|
+
sizeIcon: m,
|
|
148
152
|
option: t,
|
|
153
|
+
isPositionLeftCheckbox: R,
|
|
149
154
|
handleOptionClick: v,
|
|
150
155
|
isDisabledNotClickable: u
|
|
151
156
|
},
|
|
152
157
|
r
|
|
153
158
|
)),
|
|
154
|
-
(
|
|
155
|
-
|
|
159
|
+
(a === "category" || a === "double") && s?.map((t, r) => "options" in t ? /* @__PURE__ */ n(
|
|
160
|
+
ee,
|
|
156
161
|
{
|
|
157
162
|
disabledOptions: d,
|
|
158
163
|
clickableOptions: f,
|
|
159
164
|
selectedOptions: l,
|
|
160
|
-
sizeIcon:
|
|
165
|
+
sizeIcon: m,
|
|
161
166
|
category: t,
|
|
162
|
-
mode:
|
|
167
|
+
mode: a,
|
|
163
168
|
selectedValues: i,
|
|
164
169
|
handleOptionClick: v,
|
|
165
170
|
isDisabledNotClickable: u
|
|
166
171
|
},
|
|
167
172
|
r
|
|
168
173
|
) : t.value === "selectAll" ? /* @__PURE__ */ n(
|
|
169
|
-
|
|
174
|
+
M,
|
|
170
175
|
{
|
|
171
176
|
disabledOptions: d,
|
|
172
177
|
clickableOptions: f,
|
|
173
178
|
selectedOptions: l,
|
|
174
|
-
|
|
179
|
+
isPositionLeftCheckbox: R,
|
|
180
|
+
sizeIcon: m,
|
|
175
181
|
option: t,
|
|
176
182
|
handleOptionClick: v,
|
|
177
183
|
isDisabledNotClickable: u
|
|
@@ -186,5 +192,5 @@ const o = Z.bind(e), ce = ({
|
|
|
186
192
|
);
|
|
187
193
|
};
|
|
188
194
|
export {
|
|
189
|
-
|
|
195
|
+
me as Select
|
|
190
196
|
};
|
|
@@ -11,12 +11,15 @@ export type TCategory = {
|
|
|
11
11
|
};
|
|
12
12
|
export type TModeSelect = 'options' | 'category' | 'double' | 'single';
|
|
13
13
|
type SelectSizes = 'medium' | 'small' | 'large';
|
|
14
|
+
type BetweenSize = 'small' | 'medium';
|
|
15
|
+
type ScrollVersion = 'standard' | 'compact';
|
|
14
16
|
export interface MultiSelectProps {
|
|
15
17
|
options: TOption[] | TCategory[];
|
|
16
18
|
category?: TCategory[];
|
|
17
19
|
placeholder?: string;
|
|
18
20
|
error?: boolean;
|
|
19
21
|
disabled?: boolean;
|
|
22
|
+
betweenSize?: BetweenSize;
|
|
20
23
|
size_s?: SelectSizes;
|
|
21
24
|
size_m?: SelectSizes;
|
|
22
25
|
size_l?: SelectSizes;
|
|
@@ -40,6 +43,7 @@ export interface MultiSelectProps {
|
|
|
40
43
|
widthBtn?: string;
|
|
41
44
|
widthOptionList?: string;
|
|
42
45
|
isListRight?: boolean;
|
|
46
|
+
isPositionLeftCheckbox?: boolean;
|
|
43
47
|
isLast?: boolean;
|
|
44
48
|
/**
|
|
45
49
|
* Список опций которые будут задизейблены по умолчанию
|
|
@@ -59,5 +63,6 @@ export interface MultiSelectProps {
|
|
|
59
63
|
enabled: boolean;
|
|
60
64
|
label?: string;
|
|
61
65
|
};
|
|
66
|
+
scrollVersion?: ScrollVersion;
|
|
62
67
|
}
|
|
63
68
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useClientWidth as C } from "../../../shared/useClientWidth.js";
|
|
3
|
-
import { c as T } from "../../../index-
|
|
3
|
+
import { c as T } from "../../../index-YnD2EP-S.js";
|
|
4
4
|
import { RoundButton as d } from "../../RoundButton/ui/RoundButton.js";
|
|
5
5
|
import { Tag as N } from "../../Tag/ui/Tag.js";
|
|
6
6
|
const k = "_sliderTag_1rvl9_1", l = {
|
|
@@ -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
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as M, useRef as W, useEffect as E } from "react";
|
|
3
|
-
import { c as L } from "../../../index-
|
|
4
|
-
import { s as e, u as j } from "../../../useSortSelect-
|
|
3
|
+
import { c as L } from "../../../index-YnD2EP-S.js";
|
|
4
|
+
import { s as e, u as j } from "../../../useSortSelect-IeonkD5d.js";
|
|
5
5
|
import { useClientWidth as w } from "../../../shared/useClientWidth.js";
|
|
6
6
|
import { NewIcon as O } from "../../NewIcon/ui/NewIcon.js";
|
|
7
7
|
import { Modal as T } from "../../Modal/ui/Modal.js";
|
|
@@ -1,64 +1,67 @@
|
|
|
1
|
-
import { jsxs as o, jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as O } from "../../../index-YnD2EP-S.js";
|
|
3
|
+
import { Select as N } from "../../Select/ui/Select.js";
|
|
3
4
|
import { NewIcon as m } from "../../NewIcon/ui/NewIcon.js";
|
|
4
|
-
const
|
|
5
|
-
root:
|
|
6
|
-
nameWrapper:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
const p = "_root_50nmy_1", f = "_nameWrapper_50nmy_8", z = "_size_large_50nmy_18", V = "_clearBtn_50nmy_25", S = "_summaryList_50nmy_40", B = "_summaryOption_50nmy_47", L = "_categoryOption_50nmy_69", b = "_summaryCategory_50nmy_78", k = "_headerCategory_50nmy_88", T = "_categoryTitle_50nmy_94", W = "_categoryOptions_50nmy_102", a = {
|
|
6
|
+
root: p,
|
|
7
|
+
nameWrapper: f,
|
|
8
|
+
size_large: z,
|
|
9
|
+
clearBtn: V,
|
|
10
|
+
summaryList: S,
|
|
11
|
+
summaryOption: B,
|
|
12
|
+
categoryOption: L,
|
|
13
|
+
summaryCategory: b,
|
|
14
|
+
headerCategory: k,
|
|
15
|
+
categoryTitle: T,
|
|
16
|
+
categoryOptions: W
|
|
17
|
+
}, I = ({
|
|
18
|
+
label: u = "",
|
|
17
19
|
isShowReset: _,
|
|
18
|
-
isShowCategoryDelete:
|
|
19
|
-
|
|
20
|
+
isShowCategoryDelete: y = !1,
|
|
21
|
+
labelSize: g = "medium",
|
|
22
|
+
...t
|
|
20
23
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
const l =
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
(l) => !e.options.some((
|
|
24
|
+
const r = (e) => {
|
|
25
|
+
t.onChange && t.onChange(e);
|
|
26
|
+
}, d = (e) => {
|
|
27
|
+
const l = t.selectedValues?.filter((s) => s.value !== e) || [];
|
|
28
|
+
r(l);
|
|
29
|
+
}, h = () => {
|
|
30
|
+
r([]);
|
|
31
|
+
}, v = (e) => {
|
|
32
|
+
r(
|
|
33
|
+
t.selectedValues?.filter((l) => l.value !== e.value).filter(
|
|
34
|
+
(l) => !e.options.some((s) => s.value === l.value)
|
|
32
35
|
) ?? []
|
|
33
36
|
);
|
|
34
|
-
},
|
|
35
|
-
return /* @__PURE__ */ o("div", { className:
|
|
36
|
-
/* @__PURE__ */ o("div", { className:
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
_ && /* @__PURE__ */
|
|
37
|
+
}, C = t.selectedValues?.filter((e) => "options" in e);
|
|
38
|
+
return /* @__PURE__ */ o("div", { className: a.root, children: [
|
|
39
|
+
/* @__PURE__ */ o("div", { className: O(a.nameWrapper, a[`size_${g}`]), children: [
|
|
40
|
+
/* @__PURE__ */ n("div", { children: u }),
|
|
41
|
+
_ && /* @__PURE__ */ n(
|
|
39
42
|
"div",
|
|
40
43
|
{
|
|
41
|
-
className:
|
|
42
|
-
onClick:
|
|
44
|
+
className: a.clearBtn,
|
|
45
|
+
onClick: h,
|
|
43
46
|
children: "Очистить"
|
|
44
47
|
}
|
|
45
48
|
)
|
|
46
49
|
] }),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
50
|
+
/* @__PURE__ */ n(
|
|
51
|
+
N,
|
|
49
52
|
{
|
|
50
|
-
...
|
|
51
|
-
onChange:
|
|
53
|
+
...t,
|
|
54
|
+
onChange: r
|
|
52
55
|
}
|
|
53
56
|
),
|
|
54
|
-
!
|
|
57
|
+
!y && t.mode === "options" && t.selectedValues && t.selectedValues.length > 0 && /* @__PURE__ */ n("div", { className: a.summaryList, children: t.selectedValues.map((e) => /* @__PURE__ */ o(
|
|
55
58
|
"div",
|
|
56
59
|
{
|
|
57
|
-
onClick: () =>
|
|
58
|
-
className:
|
|
60
|
+
onClick: () => d(e.value.toString()),
|
|
61
|
+
className: a.summaryOption,
|
|
59
62
|
children: [
|
|
60
63
|
e.label,
|
|
61
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ n(
|
|
62
65
|
m,
|
|
63
66
|
{
|
|
64
67
|
name: "close",
|
|
@@ -69,21 +72,21 @@ const O = "_root_156r8_1", N = "_nameWrapper_156r8_8", p = "_clearBtn_156r8_18",
|
|
|
69
72
|
},
|
|
70
73
|
e.value
|
|
71
74
|
)) }),
|
|
72
|
-
!
|
|
73
|
-
const
|
|
75
|
+
!y && t.mode === "double" && C?.map((e, l) => {
|
|
76
|
+
const s = e;
|
|
74
77
|
return /* @__PURE__ */ o(
|
|
75
78
|
"div",
|
|
76
79
|
{
|
|
77
|
-
className:
|
|
80
|
+
className: a.summaryCategory,
|
|
78
81
|
children: [
|
|
79
|
-
/* @__PURE__ */ o("div", { className:
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ o("div", { className: a.headerCategory, children: [
|
|
83
|
+
/* @__PURE__ */ n("div", { className: a.categoryTitle, children: s.label }),
|
|
84
|
+
/* @__PURE__ */ n(
|
|
82
85
|
"div",
|
|
83
86
|
{
|
|
84
|
-
onClick: () =>
|
|
85
|
-
className:
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
+
onClick: () => v(e),
|
|
88
|
+
className: a.clearBtn,
|
|
89
|
+
children: /* @__PURE__ */ n(
|
|
87
90
|
m,
|
|
88
91
|
{
|
|
89
92
|
name: "close",
|
|
@@ -93,14 +96,14 @@ const O = "_root_156r8_1", N = "_nameWrapper_156r8_8", p = "_clearBtn_156r8_18",
|
|
|
93
96
|
}
|
|
94
97
|
)
|
|
95
98
|
] }),
|
|
96
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ n("div", { className: a.categoryOptions, children: s.options.filter((c) => t.selectedValues?.some((i) => c.value === i.value)).map((c, i) => /* @__PURE__ */ o(
|
|
97
100
|
"div",
|
|
98
101
|
{
|
|
99
|
-
onClick: () =>
|
|
100
|
-
className: `${
|
|
102
|
+
onClick: () => d(c.value.toString()),
|
|
103
|
+
className: `${a.summaryOption} ${a.categoryOption}`,
|
|
101
104
|
children: [
|
|
102
105
|
c.label,
|
|
103
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ n(
|
|
104
107
|
m,
|
|
105
108
|
{
|
|
106
109
|
name: "close",
|
|
@@ -119,5 +122,5 @@ const O = "_root_156r8_1", N = "_nameWrapper_156r8_8", p = "_clearBtn_156r8_18",
|
|
|
119
122
|
] });
|
|
120
123
|
};
|
|
121
124
|
export {
|
|
122
|
-
|
|
125
|
+
I as SummarySelect
|
|
123
126
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as o, jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as _, useEffect as d } from "react";
|
|
3
|
-
import { c as v } from "../../../index-
|
|
3
|
+
import { c as v } from "../../../index-YnD2EP-S.js";
|
|
4
4
|
const h = "_switcherWrapper_1b1pd_29", b = "_switcherWrapperReverse_1b1pd_40", W = "_switcherWrapperBetween_1b1pd_44", l = "_swiper_1b1pd_48", m = "_swiperBackward_1b1pd_1", f = "_swiperActive_1b1pd_63", u = "_swiperForward_1b1pd_1", I = "_swiperInactive_1b1pd_68", P = "_swiperInitialize_1b1pd_73", B = "_swiperPoint_1b1pd_77", A = "_swiperPointActive_1b1pd_89", e = {
|
|
5
5
|
switcherWrapper: h,
|
|
6
6
|
switcherWrapperReverse: b,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as N } from "react/jsx-runtime";
|
|
2
|
-
import { c as T } from "../../../index-
|
|
2
|
+
import { c as T } from "../../../index-YnD2EP-S.js";
|
|
3
3
|
import { useClientWidth as k } from "../../../shared/useClientWidth.js";
|
|
4
4
|
import { Text as y } from "../../Text/ui/Text.js";
|
|
5
5
|
const z = "_root_pbslz_1", W = "_whiteFill_pbslz_29", D = "_text_pbslz_34", F = "_fullWhite_pbslz_48", P = "_whiteStroke_pbslz_67", C = "_withPadding_pbslz_105", I = "_grayDesign_pbslz_109", t = {
|