stone-kit 0.0.523 → 0.0.525

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