stone-kit 0.0.521 → 0.0.523
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.
|
@@ -8,7 +8,15 @@ interface IFilterWithSave {
|
|
|
8
8
|
value: string;
|
|
9
9
|
state: boolean;
|
|
10
10
|
}[];
|
|
11
|
+
selectedTabs?: {
|
|
12
|
+
value: string;
|
|
13
|
+
state: boolean;
|
|
14
|
+
}[];
|
|
15
|
+
setSelectedTabs?: React.Dispatch<React.SetStateAction<{
|
|
16
|
+
value: string;
|
|
17
|
+
state: boolean;
|
|
18
|
+
}[]>>;
|
|
11
19
|
onChange?: (selectedOptions: TOption[]) => unknown;
|
|
12
20
|
}
|
|
13
|
-
export declare const FilterWithSave: ({ disabledOptions, tabs, selectOptions, onChange, selectedValues, }: IFilterWithSave) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const FilterWithSave: ({ disabledOptions, tabs, selectOptions, onChange, selectedValues, setSelectedTabs, selectedTabs, }: IFilterWithSave) => import("react/jsx-runtime").JSX.Element;
|
|
14
22
|
export {};
|
|
@@ -1,53 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { NewIcon as
|
|
4
|
-
import { M as
|
|
5
|
-
import { S as
|
|
6
|
-
import { O as
|
|
7
|
-
import { Button as
|
|
8
|
-
const
|
|
9
|
-
root:
|
|
10
|
-
filterWithSaveModal:
|
|
11
|
-
modalAddBody:
|
|
12
|
-
closeBtn:
|
|
13
|
-
modalTitle:
|
|
14
|
-
tabSWitcherWrapper:
|
|
15
|
-
switcherTitle:
|
|
16
|
-
switcherScroll:
|
|
17
|
-
tabs:
|
|
18
|
-
selectWrapper:
|
|
19
|
-
filterOption:
|
|
20
|
-
btnWrapper:
|
|
21
|
-
resetBtn:
|
|
22
|
-
saveBtn:
|
|
23
|
-
},
|
|
24
|
-
disabledOptions:
|
|
25
|
-
tabs:
|
|
26
|
-
selectOptions:
|
|
27
|
-
onChange:
|
|
28
|
-
selectedValues:
|
|
1
|
+
import { jsxs as h, Fragment as I, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f } from "react";
|
|
3
|
+
import { NewIcon as B } from "../../NewIcon/ui/NewIcon.js";
|
|
4
|
+
import { M as x } from "../../../Modal-BZv6nlLe.js";
|
|
5
|
+
import { S as C } from "../../../SortSelect-Chp89Mue.js";
|
|
6
|
+
import { O as j } from "../../../Option-CyYM1iBJ.js";
|
|
7
|
+
import { Button as S } from "../../Button/ui/Button.js";
|
|
8
|
+
const z = "_root_1fkwh_1", F = "_filterWithSaveModal_1fkwh_15", R = "_modalAddBody_1fkwh_20", T = "_closeBtn_1fkwh_29", b = "_modalTitle_1fkwh_35", q = "_tabSWitcherWrapper_1fkwh_44", D = "_switcherTitle_1fkwh_52", E = "_switcherScroll_1fkwh_59", G = "_tabs_1fkwh_63", H = "_selectWrapper_1fkwh_68", J = "_filterOption_1fkwh_72", K = "_btnWrapper_1fkwh_79", L = "_resetBtn_1fkwh_85", P = "_saveBtn_1fkwh_86", e = {
|
|
9
|
+
root: z,
|
|
10
|
+
filterWithSaveModal: F,
|
|
11
|
+
modalAddBody: R,
|
|
12
|
+
closeBtn: T,
|
|
13
|
+
modalTitle: b,
|
|
14
|
+
tabSWitcherWrapper: q,
|
|
15
|
+
switcherTitle: D,
|
|
16
|
+
switcherScroll: E,
|
|
17
|
+
tabs: G,
|
|
18
|
+
selectWrapper: H,
|
|
19
|
+
filterOption: J,
|
|
20
|
+
btnWrapper: K,
|
|
21
|
+
resetBtn: L,
|
|
22
|
+
saveBtn: P
|
|
23
|
+
}, ee = ({
|
|
24
|
+
disabledOptions: N = [],
|
|
25
|
+
tabs: l = [],
|
|
26
|
+
selectOptions: m = [],
|
|
27
|
+
onChange: v,
|
|
28
|
+
selectedValues: O = [],
|
|
29
|
+
setSelectedTabs: p,
|
|
30
|
+
selectedTabs: w = []
|
|
29
31
|
}) => {
|
|
30
|
-
const [
|
|
31
|
-
if (
|
|
32
|
+
const [M, o] = f(!1), [s, c] = f(w), [n, k] = f(O), y = (a) => {
|
|
33
|
+
if (N.some((r) => r.value === a.value))
|
|
32
34
|
return;
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
},
|
|
35
|
+
const i = n.some((r) => r.value === a.value) ? n.filter((r) => r.value !== a.value) : [...n, a];
|
|
36
|
+
k(i);
|
|
37
|
+
}, W = () => {
|
|
38
|
+
c(w), k([]);
|
|
39
|
+
}, g = () => {
|
|
40
|
+
W(), o(!1);
|
|
41
|
+
}, A = () => {
|
|
42
|
+
v && (p == null || p(s), v(n)), o(!1);
|
|
40
43
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ h(I, { children: [
|
|
42
45
|
/* @__PURE__ */ t(
|
|
43
46
|
"div",
|
|
44
47
|
{
|
|
45
48
|
className: e.root,
|
|
46
49
|
onClick: () => {
|
|
47
|
-
|
|
50
|
+
o((a) => !a);
|
|
48
51
|
},
|
|
49
52
|
children: /* @__PURE__ */ t(
|
|
50
|
-
|
|
53
|
+
B,
|
|
51
54
|
{
|
|
52
55
|
name: "filter",
|
|
53
56
|
size: "16"
|
|
@@ -55,11 +58,11 @@ const y = "_root_1fkwh_1", A = "_filterWithSaveModal_1fkwh_15", I = "_modalAddBo
|
|
|
55
58
|
)
|
|
56
59
|
}
|
|
57
60
|
),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
61
|
+
/* @__PURE__ */ h(
|
|
62
|
+
x,
|
|
60
63
|
{
|
|
61
|
-
isOpen:
|
|
62
|
-
emitIsOpen:
|
|
64
|
+
isOpen: M,
|
|
65
|
+
emitIsOpen: o,
|
|
63
66
|
isTransparentBack: !0,
|
|
64
67
|
additionalClassModalBody: e.modalAddBody,
|
|
65
68
|
additionalClass: e.filterWithSaveModal,
|
|
@@ -68,9 +71,9 @@ const y = "_root_1fkwh_1", A = "_filterWithSaveModal_1fkwh_15", I = "_modalAddBo
|
|
|
68
71
|
"div",
|
|
69
72
|
{
|
|
70
73
|
className: e.closeBtn,
|
|
71
|
-
onClick:
|
|
74
|
+
onClick: g,
|
|
72
75
|
children: /* @__PURE__ */ t(
|
|
73
|
-
|
|
76
|
+
B,
|
|
74
77
|
{
|
|
75
78
|
name: "close",
|
|
76
79
|
size: "24"
|
|
@@ -79,66 +82,70 @@ const y = "_root_1fkwh_1", A = "_filterWithSaveModal_1fkwh_15", I = "_modalAddBo
|
|
|
79
82
|
}
|
|
80
83
|
),
|
|
81
84
|
/* @__PURE__ */ t("div", { className: e.modalTitle, children: "Фильтры" }),
|
|
82
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ h("div", { className: e.tabSWitcherWrapper, children: [
|
|
83
86
|
/* @__PURE__ */ t("div", { className: e.switcherTitle, children: "Готовность" }),
|
|
84
87
|
/* @__PURE__ */ t("div", { className: e.switcherScroll, children: /* @__PURE__ */ t(
|
|
85
|
-
|
|
88
|
+
C,
|
|
86
89
|
{
|
|
87
90
|
variant: "grayRow",
|
|
88
91
|
addClassName: e.tabs,
|
|
89
92
|
isApart: !0,
|
|
90
|
-
children:
|
|
91
|
-
var
|
|
92
|
-
const
|
|
93
|
+
children: l == null ? void 0 : l.map((a, i) => {
|
|
94
|
+
var u;
|
|
95
|
+
const r = a.value;
|
|
93
96
|
return /* @__PURE__ */ t(
|
|
94
|
-
|
|
97
|
+
C.Item,
|
|
95
98
|
{
|
|
96
|
-
itemsLength:
|
|
99
|
+
itemsLength: l == null ? void 0 : l.length,
|
|
97
100
|
mini: !0,
|
|
98
|
-
value:
|
|
101
|
+
value: r,
|
|
99
102
|
onClick: () => {
|
|
100
103
|
},
|
|
101
|
-
checked: ((
|
|
102
|
-
onChange: () =>
|
|
103
|
-
|
|
104
|
+
checked: ((u = s == null ? void 0 : s.find((_) => _.value === r)) == null ? void 0 : u.state) ?? !1,
|
|
105
|
+
onChange: () => {
|
|
106
|
+
c == null || c(
|
|
107
|
+
(_) => _.map((d) => d.value === r ? { ...d, state: !d.state } : d)
|
|
108
|
+
);
|
|
109
|
+
},
|
|
110
|
+
index: i,
|
|
104
111
|
addItemClassName: e.tabSwitcher,
|
|
105
|
-
children:
|
|
112
|
+
children: r
|
|
106
113
|
},
|
|
107
|
-
|
|
114
|
+
i
|
|
108
115
|
);
|
|
109
116
|
})
|
|
110
117
|
}
|
|
111
118
|
) })
|
|
112
119
|
] }),
|
|
113
|
-
/* @__PURE__ */ t("div", { className: e.selectWrapper, children:
|
|
114
|
-
|
|
120
|
+
/* @__PURE__ */ t("div", { className: e.selectWrapper, children: m == null ? void 0 : m.map((a, i) => /* @__PURE__ */ t(
|
|
121
|
+
j,
|
|
115
122
|
{
|
|
116
123
|
addClassName: e.filterOption,
|
|
117
124
|
disabledOptions: [],
|
|
118
125
|
clickableOptions: [],
|
|
119
|
-
selectedOptions:
|
|
126
|
+
selectedOptions: n,
|
|
120
127
|
option: a,
|
|
121
|
-
handleOptionClick:
|
|
128
|
+
handleOptionClick: y
|
|
122
129
|
},
|
|
123
|
-
|
|
130
|
+
i
|
|
124
131
|
)) }),
|
|
125
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ h("div", { className: e.btnWrapper, children: [
|
|
126
133
|
/* @__PURE__ */ t(
|
|
127
|
-
|
|
134
|
+
S,
|
|
128
135
|
{
|
|
129
136
|
as: "button",
|
|
130
137
|
variant: "gray",
|
|
131
138
|
additionalClass: e.resetBtn,
|
|
132
|
-
onClick:
|
|
139
|
+
onClick: W,
|
|
133
140
|
children: "Сбросить"
|
|
134
141
|
}
|
|
135
142
|
),
|
|
136
143
|
/* @__PURE__ */ t(
|
|
137
|
-
|
|
144
|
+
S,
|
|
138
145
|
{
|
|
139
146
|
as: "button",
|
|
140
147
|
additionalClass: e.saveBtn,
|
|
141
|
-
onClick:
|
|
148
|
+
onClick: A,
|
|
142
149
|
children: "Сохранить"
|
|
143
150
|
}
|
|
144
151
|
)
|
|
@@ -149,5 +156,5 @@ const y = "_root_1fkwh_1", A = "_filterWithSaveModal_1fkwh_15", I = "_modalAddBo
|
|
|
149
156
|
] });
|
|
150
157
|
};
|
|
151
158
|
export {
|
|
152
|
-
|
|
159
|
+
ee as FilterWithSave
|
|
153
160
|
};
|