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