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.
@@ -4,6 +4,7 @@ interface ISummarySelectProps extends MultiSelectProps {
4
4
  label?: string;
5
5
  isShowReset?: boolean;
6
6
  isLast?: boolean;
7
+ isShowCategoryDelete?: boolean;
7
8
  }
8
9
  export declare const SummarySelect: React.FC<ISummarySelectProps>;
9
10
  export {};
@@ -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 O } from "../../Select/ui/Select.js";
4
- const N = "_root_156r8_1", p = "_nameWrapper_156r8_8", f = "_clearBtn_156r8_18", S = "_summaryList_156r8_33", V = "_summaryOption_156r8_40", B = "_categoryOption_156r8_62", b = "_summaryCategory_156r8_71", k = "_headerCategory_156r8_81", T = "_categoryTitle_156r8_87", W = "_categoryOptions_156r8_95", t = {
5
- root: N,
6
- nameWrapper: p,
7
- clearBtn: f,
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: V,
10
- categoryOption: B,
11
- summaryCategory: b,
12
- headerCategory: k,
13
- categoryTitle: T,
14
- categoryOptions: W
15
- }, j = ({
16
- label: _ = "",
17
- isShowReset: g,
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 y;
21
+ var _;
21
22
  const c = (e) => {
22
23
  a.onChange && a.onChange(e);
23
- }, u = (e) => {
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
- }, h = () => {
28
+ }, v = () => {
28
29
  c([]);
29
- }, v = (e) => {
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 = (y = a.selectedValues) == null ? void 0 : y.filter((e) => "options" in e);
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
- g && /* @__PURE__ */ l(
40
+ /* @__PURE__ */ l("div", { children: g }),
41
+ h && /* @__PURE__ */ l(
41
42
  "div",
42
43
  {
43
44
  className: t.clearBtn,
44
- onClick: h,
45
+ onClick: v,
45
46
  children: "Очистить"
46
47
  }
47
48
  )
48
49
  ] }),
49
50
  /* @__PURE__ */ l(
50
- O,
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: () => u(e.value.toString()),
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: () => v(e),
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((C) => n.value === C.value);
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: () => u(n.value.toString()),
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
- j as SummarySelect
128
+ $ as SummarySelect
128
129
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "stone-kit",
3
3
  "description": "uikit for redesign",
4
4
  "private": false,
5
- "version": "0.0.1026",
5
+ "version": "0.0.1027",
6
6
  "author": "Mollycodd1e",
7
7
  "license": "ISC",
8
8
  "type": "module",