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