stone-kit 0.0.1026 → 0.0.1027
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,62 +1,63 @@
|
|
|
1
1
|
import { jsxs as s, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { NewIcon as d } from "../../NewIcon/ui/NewIcon.js";
|
|
3
|
-
import { Select as
|
|
4
|
-
const
|
|
5
|
-
root:
|
|
6
|
-
nameWrapper:
|
|
7
|
-
clearBtn:
|
|
3
|
+
import { Select as N } from "../../Select/ui/Select.js";
|
|
4
|
+
const p = "_root_156r8_1", f = "_nameWrapper_156r8_8", V = "_clearBtn_156r8_18", S = "_summaryList_156r8_33", B = "_summaryOption_156r8_40", b = "_categoryOption_156r8_62", k = "_summaryCategory_156r8_71", T = "_headerCategory_156r8_81", W = "_categoryTitle_156r8_87", x = "_categoryOptions_156r8_95", t = {
|
|
5
|
+
root: p,
|
|
6
|
+
nameWrapper: f,
|
|
7
|
+
clearBtn: V,
|
|
8
8
|
summaryList: S,
|
|
9
|
-
summaryOption:
|
|
10
|
-
categoryOption:
|
|
11
|
-
summaryCategory:
|
|
12
|
-
headerCategory:
|
|
13
|
-
categoryTitle:
|
|
14
|
-
categoryOptions:
|
|
15
|
-
},
|
|
16
|
-
label:
|
|
17
|
-
isShowReset:
|
|
9
|
+
summaryOption: B,
|
|
10
|
+
categoryOption: b,
|
|
11
|
+
summaryCategory: k,
|
|
12
|
+
headerCategory: T,
|
|
13
|
+
categoryTitle: W,
|
|
14
|
+
categoryOptions: x
|
|
15
|
+
}, $ = ({
|
|
16
|
+
label: g = "",
|
|
17
|
+
isShowReset: h,
|
|
18
|
+
isShowCategoryDelete: u = !1,
|
|
18
19
|
...a
|
|
19
20
|
}) => {
|
|
20
|
-
var
|
|
21
|
+
var _;
|
|
21
22
|
const c = (e) => {
|
|
22
23
|
a.onChange && a.onChange(e);
|
|
23
|
-
},
|
|
24
|
+
}, y = (e) => {
|
|
24
25
|
var r;
|
|
25
26
|
const o = ((r = a.selectedValues) == null ? void 0 : r.filter((n) => n.value !== e)) || [];
|
|
26
27
|
c(o);
|
|
27
|
-
},
|
|
28
|
+
}, v = () => {
|
|
28
29
|
c([]);
|
|
29
|
-
},
|
|
30
|
+
}, C = (e) => {
|
|
30
31
|
var o;
|
|
31
32
|
c(
|
|
32
33
|
((o = a.selectedValues) == null ? void 0 : o.filter((r) => r.value !== e.value).filter(
|
|
33
34
|
(r) => !e.options.some((n) => n.value === r.value)
|
|
34
35
|
)) ?? []
|
|
35
36
|
);
|
|
36
|
-
}, m = (
|
|
37
|
+
}, m = (_ = a.selectedValues) == null ? void 0 : _.filter((e) => "options" in e);
|
|
37
38
|
return /* @__PURE__ */ s("div", { className: t.root, children: [
|
|
38
39
|
/* @__PURE__ */ s("div", { className: t.nameWrapper, children: [
|
|
39
|
-
/* @__PURE__ */ l("div", { children:
|
|
40
|
-
|
|
40
|
+
/* @__PURE__ */ l("div", { children: g }),
|
|
41
|
+
h && /* @__PURE__ */ l(
|
|
41
42
|
"div",
|
|
42
43
|
{
|
|
43
44
|
className: t.clearBtn,
|
|
44
|
-
onClick:
|
|
45
|
+
onClick: v,
|
|
45
46
|
children: "Очистить"
|
|
46
47
|
}
|
|
47
48
|
)
|
|
48
49
|
] }),
|
|
49
50
|
/* @__PURE__ */ l(
|
|
50
|
-
|
|
51
|
+
N,
|
|
51
52
|
{
|
|
52
53
|
...a,
|
|
53
54
|
onChange: c
|
|
54
55
|
}
|
|
55
56
|
),
|
|
56
|
-
a.mode === "options" && a.selectedValues && a.selectedValues.length > 0 && /* @__PURE__ */ l("div", { className: t.summaryList, children: a.selectedValues.map((e) => /* @__PURE__ */ s(
|
|
57
|
+
!u && a.mode === "options" && a.selectedValues && a.selectedValues.length > 0 && /* @__PURE__ */ l("div", { className: t.summaryList, children: a.selectedValues.map((e) => /* @__PURE__ */ s(
|
|
57
58
|
"div",
|
|
58
59
|
{
|
|
59
|
-
onClick: () =>
|
|
60
|
+
onClick: () => y(e.value.toString()),
|
|
60
61
|
className: t.summaryOption,
|
|
61
62
|
children: [
|
|
62
63
|
e.label,
|
|
@@ -71,7 +72,7 @@ const N = "_root_156r8_1", p = "_nameWrapper_156r8_8", f = "_clearBtn_156r8_18",
|
|
|
71
72
|
},
|
|
72
73
|
e.value
|
|
73
74
|
)) }),
|
|
74
|
-
a.mode === "double" && (m == null ? void 0 : m.map((e, o) => {
|
|
75
|
+
!u && a.mode === "double" && (m == null ? void 0 : m.map((e, o) => {
|
|
75
76
|
const r = e;
|
|
76
77
|
return /* @__PURE__ */ s(
|
|
77
78
|
"div",
|
|
@@ -83,7 +84,7 @@ const N = "_root_156r8_1", p = "_nameWrapper_156r8_8", f = "_clearBtn_156r8_18",
|
|
|
83
84
|
/* @__PURE__ */ l(
|
|
84
85
|
"div",
|
|
85
86
|
{
|
|
86
|
-
onClick: () =>
|
|
87
|
+
onClick: () => C(e),
|
|
87
88
|
className: t.clearBtn,
|
|
88
89
|
children: /* @__PURE__ */ l(
|
|
89
90
|
d,
|
|
@@ -97,11 +98,11 @@ const N = "_root_156r8_1", p = "_nameWrapper_156r8_8", f = "_clearBtn_156r8_18",
|
|
|
97
98
|
] }),
|
|
98
99
|
/* @__PURE__ */ l("div", { className: t.categoryOptions, children: r.options.filter((n) => {
|
|
99
100
|
var i;
|
|
100
|
-
return (i = a.selectedValues) == null ? void 0 : i.some((
|
|
101
|
+
return (i = a.selectedValues) == null ? void 0 : i.some((O) => n.value === O.value);
|
|
101
102
|
}).map((n, i) => /* @__PURE__ */ s(
|
|
102
103
|
"div",
|
|
103
104
|
{
|
|
104
|
-
onClick: () =>
|
|
105
|
+
onClick: () => y(n.value.toString()),
|
|
105
106
|
className: `${t.summaryOption} ${t.categoryOption}`,
|
|
106
107
|
children: [
|
|
107
108
|
n.label,
|
|
@@ -124,5 +125,5 @@ const N = "_root_156r8_1", p = "_nameWrapper_156r8_8", f = "_clearBtn_156r8_18",
|
|
|
124
125
|
] });
|
|
125
126
|
};
|
|
126
127
|
export {
|
|
127
|
-
|
|
128
|
+
$ as SummarySelect
|
|
128
129
|
};
|