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