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