stone-kit 0.0.548 → 0.0.549

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,4 +1,4 @@
1
- import { jsxs as W, jsx as e, Fragment as z } from "react/jsx-runtime";
1
+ import { jsxs as g, jsx as e, Fragment as z } from "react/jsx-runtime";
2
2
  import { forwardRef as tt, useState as B, useRef as H, useEffect as A } from "react";
3
3
  import { NewIcon as R } from "./components/NewIcon/ui/NewIcon.js";
4
4
  import { M as V } from "./Modal-BZv6nlLe.js";
@@ -42,11 +42,11 @@ const st = "_root_2bilg_1", ot = "_text_2bilg_18", nt = "_textMini_2bilg_26", at
42
42
  children: n,
43
43
  variant: o = "whiteRow",
44
44
  isApart: a = !1,
45
- addClassName: _ = "",
46
- col: h = !1
47
- }) => /* @__PURE__ */ e("div", { className: j(p.root, p[o], _, { [p.rootCol]: h, [p.apart]: a }), children: n }), K = tt((n, o) => {
48
- const { isTablet: a, isDesktop: _ } = D(), {
49
- index: h,
45
+ addClassName: h = "",
46
+ col: u = !1
47
+ }) => /* @__PURE__ */ e("div", { className: j(p.root, p[o], h, { [p.rootCol]: u, [p.apart]: a }), children: n }), K = tt((n, o) => {
48
+ const { isTablet: a, isDesktop: h } = D(), {
49
+ index: u,
50
50
  children: t,
51
51
  addItemClassName: i,
52
52
  addTextClass: d,
@@ -55,11 +55,11 @@ const st = "_root_2bilg_1", ot = "_text_2bilg_18", nt = "_textMini_2bilg_26", at
55
55
  isLongOn: N = !0,
56
56
  width: m,
57
57
  width_m: l,
58
- width_l: u,
58
+ width_l: _,
59
59
  mini: S = !1,
60
60
  ...C
61
- } = n, x = (t != null && t.toString().length ? (t == null ? void 0 : t.toString().length) > 2 : !1) && N, w = (y, g) => y && l ? l : g && u ? u : m, f = !m && !l && !u && x;
62
- return /* @__PURE__ */ W("label", { className: j({ [p.isLong]: x }), children: [
61
+ } = n, x = (t != null && t.toString().length ? (t == null ? void 0 : t.toString().length) > 2 : !1) && N, w = (y, W) => y && l ? l : W && _ ? _ : m, f = !m && !l && !_ && x;
62
+ return /* @__PURE__ */ g("label", { className: j({ [p.isLong]: x }), children: [
63
63
  /* @__PURE__ */ e(
64
64
  "input",
65
65
  {
@@ -72,12 +72,12 @@ const st = "_root_2bilg_1", ot = "_text_2bilg_18", nt = "_textMini_2bilg_26", at
72
72
  /* @__PURE__ */ e(
73
73
  "div",
74
74
  {
75
- style: { width: w(a, _) },
75
+ style: { width: w(a, h) },
76
76
  className: j(
77
77
  j(
78
78
  p.item,
79
- { [p.firstItem]: h === 0 },
80
- { [p.lastItem]: h === k - 1 },
79
+ { [p.firstItem]: u === 0 },
80
+ { [p.lastItem]: u === k - 1 },
81
81
  { [p.isDisabled]: O },
82
82
  { [p.autoWidth]: f },
83
83
  { [p.mini]: S }
@@ -94,8 +94,8 @@ const q = Object.assign(vt, { Item: K }), M = J.bind(c), bt = ({
94
94
  options: n,
95
95
  selectedOption: o,
96
96
  placeholder: a = "",
97
- error: _,
98
- disabled: h,
97
+ error: h,
98
+ disabled: u,
99
99
  additionalClass: t = "",
100
100
  onChange: i,
101
101
  onBlur: d,
@@ -104,12 +104,12 @@ const q = Object.assign(vt, { Item: K }), M = J.bind(c), bt = ({
104
104
  onClickItem: N,
105
105
  onCLickSelect: m
106
106
  }) => {
107
- const [l, u] = B(!1), S = H(null), { isMobile: C } = D(), { handleBlur: x, getInputValue: w, getOption: f, handleDocumentClick: y } = it(
107
+ const [l, _] = B(!1), S = H(null), { isMobile: C } = D(), { handleBlur: x, getInputValue: w, getOption: f, handleDocumentClick: y } = it(
108
108
  {
109
109
  selectedOption: o,
110
110
  onClickOption: N,
111
111
  setSelectedOption: i,
112
- setIsOpen: u,
112
+ setIsOpen: _,
113
113
  containerRef: S,
114
114
  isOpen: l,
115
115
  isMobile: C,
@@ -120,13 +120,13 @@ const q = Object.assign(vt, { Item: K }), M = J.bind(c), bt = ({
120
120
  );
121
121
  return A(() => (document.addEventListener("click", y), () => {
122
122
  document.removeEventListener("click", y);
123
- }), []), /* @__PURE__ */ W(
123
+ }), []), /* @__PURE__ */ g(
124
124
  "div",
125
125
  {
126
126
  ref: S,
127
127
  className: M(
128
128
  c.sortSelectWrapper,
129
- { [c.sortSelectWrapperError]: _ },
129
+ { [c.sortSelectWrapperError]: h },
130
130
  { [c.sortSelectWrapperTop]: k },
131
131
  t
132
132
  ),
@@ -136,7 +136,7 @@ const q = Object.assign(vt, { Item: K }), M = J.bind(c), bt = ({
136
136
  m && m();
137
137
  },
138
138
  children: [
139
- /* @__PURE__ */ W("div", { className: M(c.inputWrapper), children: [
139
+ /* @__PURE__ */ g("div", { className: M(c.inputWrapper), children: [
140
140
  /* @__PURE__ */ e(
141
141
  "input",
142
142
  {
@@ -145,10 +145,10 @@ const q = Object.assign(vt, { Item: K }), M = J.bind(c), bt = ({
145
145
  value: w(),
146
146
  className: M(
147
147
  c.selectedOptions,
148
- { [c.selectOptionsDisabled]: h },
148
+ { [c.selectOptionsDisabled]: u },
149
149
  { [c.selectionOptionMini]: O }
150
150
  ),
151
- onClick: () => u(!l)
151
+ onClick: () => _(!l)
152
152
  }
153
153
  ),
154
154
  /* @__PURE__ */ e(
@@ -160,19 +160,19 @@ const q = Object.assign(vt, { Item: K }), M = J.bind(c), bt = ({
160
160
  }
161
161
  )
162
162
  ] }),
163
- l && C && /* @__PURE__ */ W(
163
+ l && C && /* @__PURE__ */ g(
164
164
  V,
165
165
  {
166
166
  isOpen: l,
167
- emitIsOpen: u,
167
+ emitIsOpen: _,
168
168
  additionalClassModalBody: c.modalAddBody,
169
169
  additionalClass: c.selectModal,
170
170
  createPortalObj: { domNode: document.querySelector("body") },
171
171
  isTransparentBack: !0,
172
172
  children: [
173
- /* @__PURE__ */ W("div", { className: c.mobileSortHeader, children: [
173
+ /* @__PURE__ */ g("div", { className: c.mobileSortHeader, children: [
174
174
  /* @__PURE__ */ e(G, { children: "Сортировка" }),
175
- /* @__PURE__ */ e("div", { onClick: () => u(!1), children: /* @__PURE__ */ e(
175
+ /* @__PURE__ */ e("div", { onClick: () => _(!1), children: /* @__PURE__ */ e(
176
176
  R,
177
177
  {
178
178
  name: "close",
@@ -180,19 +180,19 @@ const q = Object.assign(vt, { Item: K }), M = J.bind(c), bt = ({
180
180
  }
181
181
  ) })
182
182
  ] }),
183
- /* @__PURE__ */ e("div", { className: c.mobileOptionList, children: n == null ? void 0 : n.map((g) => f(g)) })
183
+ /* @__PURE__ */ e("div", { className: c.mobileOptionList, children: n == null ? void 0 : n.map((W) => f(W)) })
184
184
  ]
185
185
  }
186
186
  ),
187
- l && !C && /* @__PURE__ */ e("div", { className: M(c.optionsList, { [c.optionListOnTop]: k }), children: n == null ? void 0 : n.map((g) => f(g)) })
187
+ l && !C && /* @__PURE__ */ e("div", { className: M(c.optionsList, { [c.optionListOnTop]: k }), children: n == null ? void 0 : n.map((W) => f(W)) })
188
188
  ]
189
189
  }
190
190
  );
191
191
  };
192
192
  bt.displayName = "SortSelect";
193
- const Wt = "_root_j0tyy_1", gt = "_filterWithSaveModal_j0tyy_15", Nt = "_modalAddBody_j0tyy_20", wt = "_closeBtn_j0tyy_29", Ot = "_btnName_j0tyy_35", St = "_modalTitle_j0tyy_39", Ct = "_tabSWitcherWrapper_j0tyy_48", kt = "_switcherTitle_j0tyy_56", xt = "_switcherScroll_j0tyy_63", Bt = "_tabs_j0tyy_67", jt = "_selectWrapper_j0tyy_72", It = "_filterOption_j0tyy_76", Mt = "_btnWrapper_j0tyy_83", Rt = "_resetBtn_j0tyy_89", Lt = "_saveBtn_j0tyy_90", At = "_desktopWrapper_j0tyy_94", Dt = "_desktopWrapperOpen_j0tyy_116", r = {
194
- root: Wt,
195
- filterWithSaveModal: gt,
193
+ const gt = "_root_j0tyy_1", Wt = "_filterWithSaveModal_j0tyy_15", Nt = "_modalAddBody_j0tyy_20", wt = "_closeBtn_j0tyy_29", Ot = "_btnName_j0tyy_35", St = "_modalTitle_j0tyy_39", Ct = "_tabSWitcherWrapper_j0tyy_48", kt = "_switcherTitle_j0tyy_56", xt = "_switcherScroll_j0tyy_63", Bt = "_tabs_j0tyy_67", jt = "_selectWrapper_j0tyy_72", It = "_filterOption_j0tyy_76", Mt = "_btnWrapper_j0tyy_83", Rt = "_resetBtn_j0tyy_89", Lt = "_saveBtn_j0tyy_90", At = "_desktopWrapper_j0tyy_94", Dt = "_desktopWrapperOpen_j0tyy_116", s = {
194
+ root: gt,
195
+ filterWithSaveModal: Wt,
196
196
  modalAddBody: Nt,
197
197
  closeBtn: wt,
198
198
  btnName: Ot,
@@ -221,11 +221,11 @@ var Q = { exports: {} };
221
221
  function a() {
222
222
  for (var t = "", i = 0; i < arguments.length; i++) {
223
223
  var d = arguments[i];
224
- d && (t = h(t, _.call(this, d)));
224
+ d && (t = u(t, h.call(this, d)));
225
225
  }
226
226
  return t;
227
227
  }
228
- function _(t) {
228
+ function h(t) {
229
229
  if (typeof t == "string" || typeof t == "number")
230
230
  return this && this[t] || t;
231
231
  if (typeof t != "object")
@@ -236,59 +236,59 @@ var Q = { exports: {} };
236
236
  return t.toString();
237
237
  var i = "";
238
238
  for (var d in t)
239
- o.call(t, d) && t[d] && (i = h(i, this && this[d] || d));
239
+ o.call(t, d) && t[d] && (i = u(i, this && this[d] || d));
240
240
  return i;
241
241
  }
242
- function h(t, i) {
242
+ function u(t, i) {
243
243
  return i ? t ? t + " " + i : t + i : t;
244
244
  }
245
245
  n.exports ? (a.default = a, n.exports = a) : window.classNames = a;
246
246
  })();
247
247
  })(Q);
248
248
  var Et = Q.exports;
249
- const Tt = /* @__PURE__ */ et(Et), $t = Tt.bind(r), pe = ({
249
+ const Tt = /* @__PURE__ */ et(Et), $t = Tt.bind(s), pe = ({
250
250
  disabledOptions: n = [],
251
251
  tabs: o = [],
252
252
  selectOptions: a = [],
253
- onChange: _,
254
- selectedValues: h = [],
253
+ onChange: h,
254
+ selectedValues: u = [],
255
255
  setSelectedTabs: t,
256
256
  selectedTabs: i = [],
257
257
  onClickItem: d,
258
258
  onCLickSelect: O,
259
259
  btnName: k = "Фильтр"
260
260
  }) => {
261
- const { isMobile: N } = D(), [m, l] = B(!1), u = H(null), [S, C] = B(i), [x] = B(h), [w, f] = B(S), [y, g] = B(x), U = (s) => {
262
- if (d && d(s), n.some((b) => b.value === s.value))
261
+ const { isMobile: N } = D(), [m, l] = B(!1), _ = H(null), [S, C] = B(i), [x] = B(u), [w, f] = B(S), [y, W] = B(x), U = (r) => {
262
+ if (d && d(r), n.some((b) => b.value === r.value))
263
263
  return;
264
- const v = y.some((b) => b.value === s.value) ? y.filter((b) => b.value !== s.value) : [...y, s];
265
- g(v);
264
+ const v = y.some((b) => b.value === r.value) ? y.filter((b) => b.value !== r.value) : [...y, r];
265
+ W(v);
266
266
  }, X = () => {
267
- C(o), g([]), _ && (_([]), t == null || t(o));
267
+ C(o), W([]), h && (h([]), t == null || t(o));
268
268
  }, Y = () => {
269
- g(h), f(i);
269
+ W(u), f(i);
270
270
  }, E = () => {
271
271
  Y(), l(!1);
272
272
  }, Z = () => {
273
- _ && (t == null || t(w), _(y)), l(!1);
273
+ h && (t == null || t(w), h(y)), l(!1);
274
274
  };
275
275
  A(() => {
276
276
  m && f(i);
277
277
  }, [m]);
278
- const T = (s) => {
279
- if (!m || N)
278
+ const T = (r) => {
279
+ if (console.log("Клик по:", r.target), !m || N)
280
280
  return;
281
- const v = s.target;
282
- u.current && !u.current.contains(v) && E();
281
+ const v = r.target;
282
+ _.current && !_.current.contains(v) && r.target !== _.current && (console.log("Закрытие модалки"), E());
283
283
  };
284
284
  A(() => (m && !N && document.addEventListener("click", T), () => {
285
285
  document.removeEventListener("click", T);
286
286
  }), [m]);
287
- const $ = () => /* @__PURE__ */ W(z, { children: [
287
+ const $ = () => /* @__PURE__ */ g(z, { children: [
288
288
  /* @__PURE__ */ e(
289
289
  "div",
290
290
  {
291
- className: r.closeBtn,
291
+ className: s.closeBtn,
292
292
  onClick: E,
293
293
  children: /* @__PURE__ */ e(
294
294
  R,
@@ -299,18 +299,18 @@ const Tt = /* @__PURE__ */ et(Et), $t = Tt.bind(r), pe = ({
299
299
  )
300
300
  }
301
301
  ),
302
- /* @__PURE__ */ e("div", { className: r.modalTitle, children: "Фильтры" }),
303
- /* @__PURE__ */ W("div", { className: r.tabSWitcherWrapper, children: [
304
- /* @__PURE__ */ e("div", { className: r.switcherTitle, children: "Готовность" }),
305
- /* @__PURE__ */ e("div", { className: r.switcherScroll, children: /* @__PURE__ */ e(
302
+ /* @__PURE__ */ e("div", { className: s.modalTitle, children: "Фильтры" }),
303
+ /* @__PURE__ */ g("div", { className: s.tabSWitcherWrapper, children: [
304
+ /* @__PURE__ */ e("div", { className: s.switcherTitle, children: "Готовность" }),
305
+ /* @__PURE__ */ e("div", { className: s.switcherScroll, children: /* @__PURE__ */ e(
306
306
  q,
307
307
  {
308
308
  variant: "grayRow",
309
- addClassName: r.tabs,
309
+ addClassName: s.tabs,
310
310
  isApart: !0,
311
- children: o == null ? void 0 : o.map((s, v) => {
311
+ children: o == null ? void 0 : o.map((r, v) => {
312
312
  var P;
313
- const b = s.value;
313
+ const b = r.value;
314
314
  return /* @__PURE__ */ e(
315
315
  q.Item,
316
316
  {
@@ -326,7 +326,7 @@ const Tt = /* @__PURE__ */ et(Et), $t = Tt.bind(r), pe = ({
326
326
  );
327
327
  },
328
328
  index: v,
329
- addItemClassName: r.tabSwitcher,
329
+ addItemClassName: s.tabSwitcher,
330
330
  children: b
331
331
  },
332
332
  v
@@ -338,29 +338,29 @@ const Tt = /* @__PURE__ */ et(Et), $t = Tt.bind(r), pe = ({
338
338
  /* @__PURE__ */ e(
339
339
  "div",
340
340
  {
341
- className: r.selectWrapper,
342
- onClick: (s) => s.stopPropagation(),
343
- children: a == null ? void 0 : a.map((s, v) => /* @__PURE__ */ e(
341
+ className: s.selectWrapper,
342
+ onClick: (r) => r.stopPropagation(),
343
+ children: a == null ? void 0 : a.map((r, v) => /* @__PURE__ */ e(
344
344
  rt,
345
345
  {
346
- addClassName: r.filterOption,
346
+ addClassName: s.filterOption,
347
347
  disabledOptions: [],
348
348
  clickableOptions: [],
349
349
  selectedOptions: y,
350
- option: s,
350
+ option: r,
351
351
  handleOptionClick: U
352
352
  },
353
353
  v
354
354
  ))
355
355
  }
356
356
  ),
357
- /* @__PURE__ */ W("div", { className: r.btnWrapper, children: [
357
+ /* @__PURE__ */ g("div", { className: s.btnWrapper, children: [
358
358
  /* @__PURE__ */ e(
359
359
  F,
360
360
  {
361
361
  as: "button",
362
362
  variant: "gray",
363
- additionalClass: r.resetBtn,
363
+ additionalClass: s.resetBtn,
364
364
  onClick: X,
365
365
  children: "Сбросить"
366
366
  }
@@ -369,23 +369,23 @@ const Tt = /* @__PURE__ */ et(Et), $t = Tt.bind(r), pe = ({
369
369
  F,
370
370
  {
371
371
  as: "button",
372
- additionalClass: r.saveBtn,
372
+ additionalClass: s.saveBtn,
373
373
  onClick: Z,
374
374
  children: "Сохранить"
375
375
  }
376
376
  )
377
377
  ] })
378
378
  ] });
379
- return /* @__PURE__ */ W(z, { children: [
380
- /* @__PURE__ */ W(
379
+ return /* @__PURE__ */ g(z, { children: [
380
+ /* @__PURE__ */ g(
381
381
  "div",
382
382
  {
383
- className: r.root,
384
- onClick: (s) => {
385
- s.stopPropagation(), O && O(), l(N ? (v) => !v : !0);
383
+ className: s.root,
384
+ onClick: (r) => {
385
+ r.stopPropagation(), O && O(), l(N ? (v) => !v : !0);
386
386
  },
387
387
  children: [
388
- /* @__PURE__ */ e("div", { className: r.btnName, children: k }),
388
+ /* @__PURE__ */ e("div", { className: s.btnName, children: k }),
389
389
  /* @__PURE__ */ e(
390
390
  R,
391
391
  {
@@ -396,9 +396,9 @@ const Tt = /* @__PURE__ */ et(Et), $t = Tt.bind(r), pe = ({
396
396
  /* @__PURE__ */ e(
397
397
  "div",
398
398
  {
399
- ref: u,
400
- className: $t(r.desktopWrapper, { [r.desktopWrapperOpen]: m }),
401
- onClick: (s) => s.stopPropagation(),
399
+ ref: _,
400
+ className: $t(s.desktopWrapper, { [s.desktopWrapperOpen]: m }),
401
+ onClick: (r) => r.stopPropagation(),
402
402
  children: /* @__PURE__ */ e($, {})
403
403
  }
404
404
  )
@@ -411,8 +411,8 @@ const Tt = /* @__PURE__ */ et(Et), $t = Tt.bind(r), pe = ({
411
411
  isOpen: m,
412
412
  emitIsOpen: l,
413
413
  isTransparentBack: !0,
414
- additionalClassModalBody: r.modalAddBody,
415
- additionalClass: r.filterWithSaveModal,
414
+ additionalClassModalBody: s.modalAddBody,
415
+ additionalClass: s.filterWithSaveModal,
416
416
  children: /* @__PURE__ */ e($, {})
417
417
  }
418
418
  )
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../NewIcon/ui/NewIcon.js";
4
- import { F as w } from "../../../FilterWithSave-DxzFoKBs.js";
4
+ import { F as w } from "../../../FilterWithSave-SQtQiFyF.js";
5
5
  import "../../../Modal-BZv6nlLe.js";
6
6
  import "../../../Option-CyYM1iBJ.js";
7
7
  import "../../Button/ui/Button.js";
@@ -1,4 +1,4 @@
1
- import { a as r } from "../../FilterWithSave-DxzFoKBs.js";
1
+ import { a as r } from "../../FilterWithSave-SQtQiFyF.js";
2
2
  export {
3
3
  r as SortSelect
4
4
  };
@@ -13,7 +13,7 @@ import "../../Text/ui/Text.js";
13
13
  import "../../Flex/ui/Flex.js";
14
14
  import "../../Input/ui/Input.js";
15
15
  import "../../../Modal-BZv6nlLe.js";
16
- import { a as z } from "../../../FilterWithSave-DxzFoKBs.js";
16
+ import { a as z } from "../../../FilterWithSave-SQtQiFyF.js";
17
17
  import "../../GroupedInput/ui/GroupedInputs.js";
18
18
  import "../../MetroTag/ui/MetroTag.js";
19
19
  import "../../LotCard/ui/LotCard.js";
@@ -1,4 +1,4 @@
1
- import { S as e } from "../../FilterWithSave-DxzFoKBs.js";
1
+ import { S as e } from "../../FilterWithSave-SQtQiFyF.js";
2
2
  export {
3
3
  e as TabSwitcher
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { S as v } from "../../../FilterWithSave-DxzFoKBs.js";
3
+ import { S as v } from "../../../FilterWithSave-SQtQiFyF.js";
4
4
  import "../../Text/ui/Text.js";
5
5
  import "../../../index-rKuIKazb.js";
6
6
  import "../../Button/ui/Button.js";
@@ -11,7 +11,7 @@ import "../../Flex/ui/Flex.js";
11
11
  import "../../Input/ui/Input.js";
12
12
  import "react";
13
13
  import "../../../Modal-BZv6nlLe.js";
14
- import "../../../FilterWithSave-DxzFoKBs.js";
14
+ import "../../../FilterWithSave-SQtQiFyF.js";
15
15
  import "../../GroupedInput/ui/GroupedInputs.js";
16
16
  import "../../../index-rKuIKazb.js";
17
17
  import "../../MetroTag/ui/MetroTag.js";
package/dist/main.js CHANGED
@@ -10,7 +10,7 @@ import { Flex as T } from "./components/Flex/ui/Flex.js";
10
10
  import { Input as F } from "./components/Input/ui/Input.js";
11
11
  import { M as g } from "./Modal-BZv6nlLe.js";
12
12
  import { FieldInput as I } from "./components/FieldInput/ui/FieldInput.js";
13
- import { F as B, a as L, S as k } from "./FilterWithSave-DxzFoKBs.js";
13
+ import { F as B, a as L, S as k } from "./FilterWithSave-SQtQiFyF.js";
14
14
  import { GroupedInputs as N } from "./components/GroupedInput/ui/GroupedInputs.js";
15
15
  import { Logo as j } from "./components/Logo/ui/Logo.js";
16
16
  import { MetroTag as D } from "./components/MetroTag/ui/MetroTag.js";
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.548",
5
+ "version": "0.0.549",
6
6
  "author": "Mollycodd1e",
7
7
  "license": "ISC",
8
8
  "type": "module",