stone-kit 0.0.588 → 0.0.590

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.
@@ -17,13 +17,13 @@ import "./components/MetroTag/ui/MetroTag.js";
17
17
  import "./components/LotCard/ui/LotCard.js";
18
18
  import "./components/Select/ui/Select.js";
19
19
  import { useClientWidth as E } from "./shared/useClientWidth.js";
20
- import { s as l, u as et } from "./useSortSelect-CjZXLFOG.js";
20
+ import { s as c, u as et } from "./useSortSelect-CjZXLFOG.js";
21
21
  import "./components/SliderNavigation/ui/SliderNavigation.js";
22
22
  import "./components/LotCardSkeleton/ui/LotCardSkeleton.js";
23
23
  import "./components/TabSelect/ui/TabSelect.js";
24
24
  import "./components/FormModal/ui/ModalForm.js";
25
25
  import { O as it } from "./Option-CyYM1iBJ.js";
26
- const rt = "_root_2bilg_1", st = "_text_2bilg_18", nt = "_textMini_2bilg_26", ot = "_rootCol_2bilg_32", at = "_item_2bilg_38", lt = "_whiteRow_2bilg_57", ct = "_firstItem_2bilg_68", dt = "_lastItem_2bilg_72", pt = "_apart_2bilg_103", mt = "_isLong_2bilg_103", _t = "_autoWidth_2bilg_128", ut = "_mini_2bilg_132", ht = "_isDisabled_2bilg_140", ft = "_grayRow_2bilg_164", p = {
26
+ const rt = "_root_2bilg_1", st = "_text_2bilg_18", nt = "_textMini_2bilg_26", ot = "_rootCol_2bilg_32", at = "_item_2bilg_38", lt = "_whiteRow_2bilg_57", ct = "_firstItem_2bilg_68", dt = "_lastItem_2bilg_72", pt = "_apart_2bilg_103", mt = "_isLong_2bilg_103", _t = "_autoWidth_2bilg_128", ut = "_mini_2bilg_132", ft = "_isDisabled_2bilg_140", ht = "_grayRow_2bilg_164", p = {
27
27
  root: rt,
28
28
  text: st,
29
29
  textMini: nt,
@@ -36,86 +36,86 @@ const rt = "_root_2bilg_1", st = "_text_2bilg_18", nt = "_textMini_2bilg_26", ot
36
36
  isLong: mt,
37
37
  autoWidth: _t,
38
38
  mini: ut,
39
- isDisabled: ht,
40
- grayRow: ft
39
+ isDisabled: ft,
40
+ grayRow: ht
41
41
  }, I = V.bind(p), vt = ({
42
- children: o,
42
+ children: a,
43
43
  variant: n = "whiteRow",
44
- isApart: a = !1,
45
- addClassName: m = "",
46
- col: _ = !1
47
- }) => /* @__PURE__ */ e("div", { className: I(p.root, p[n], m, { [p.rootCol]: _, [p.apart]: a }), children: o }), G = Z((o, n) => {
48
- const { isTablet: a, isDesktop: m } = E(), {
49
- index: _,
44
+ isApart: l = !1,
45
+ addClassName: _ = "",
46
+ col: u = !1
47
+ }) => /* @__PURE__ */ e("div", { className: I(p.root, p[n], _, { [p.rootCol]: u, [p.apart]: l }), children: a }), G = Z((a, n) => {
48
+ const { isTablet: l, isDesktop: _ } = E(), {
49
+ index: u,
50
50
  children: t,
51
51
  addItemClassName: i,
52
- addTextClass: c,
52
+ addTextClass: d,
53
53
  disabled: g = !1,
54
- itemsLength: k = 0,
55
- isLongOn: C = !0,
56
- width: u,
57
- width_m: d,
58
- width_l: h,
59
- mini: O = !1,
60
- ...S
61
- } = o, x = (t != null && t.toString().length ? (t == null ? void 0 : t.toString().length) > 2 : !1) && C, N = (v, W) => v && d ? d : W && h ? h : u, f = !u && !d && !h && x;
54
+ itemsLength: C = 0,
55
+ isLongOn: O = !0,
56
+ width: f,
57
+ width_m: o,
58
+ width_l: m,
59
+ mini: S = !1,
60
+ ...k
61
+ } = a, x = (t != null && t.toString().length ? (t == null ? void 0 : t.toString().length) > 2 : !1) && O, b = (v, W) => v && o ? o : W && m ? m : f, h = !f && !o && !m && x;
62
62
  return /* @__PURE__ */ y("label", { className: I({ [p.isLong]: x }), children: [
63
63
  /* @__PURE__ */ e(
64
64
  "input",
65
65
  {
66
66
  ref: n,
67
67
  type: "checkbox",
68
- ...S,
68
+ ...k,
69
69
  disabled: g
70
70
  }
71
71
  ),
72
72
  /* @__PURE__ */ e(
73
73
  "div",
74
74
  {
75
- style: { width: N(a, m) },
75
+ style: { width: b(l, _) },
76
76
  className: I(
77
77
  I(
78
78
  p.item,
79
- { [p.firstItem]: _ === 0 },
80
- { [p.lastItem]: _ === k - 1 },
79
+ { [p.firstItem]: u === 0 },
80
+ { [p.lastItem]: u === C - 1 },
81
81
  { [p.isDisabled]: g },
82
- { [p.autoWidth]: f },
83
- { [p.mini]: O }
82
+ { [p.autoWidth]: h },
83
+ { [p.mini]: S }
84
84
  ),
85
85
  i
86
86
  ),
87
- children: /* @__PURE__ */ e(H, { className: I(p.text, { [p.textMini]: O }, c), children: t })
87
+ children: /* @__PURE__ */ e(H, { className: I(p.text, { [p.textMini]: S }, d), children: t })
88
88
  }
89
89
  )
90
90
  ] });
91
91
  });
92
92
  G.displayName = "TabSwitcherItem";
93
- const T = Object.assign(vt, { Item: G }), L = V.bind(l), wt = ({
94
- options: o,
93
+ const T = Object.assign(vt, { Item: G }), L = V.bind(c), wt = ({
94
+ options: a,
95
95
  selectedOption: n,
96
- placeholder: a = "",
97
- error: m,
98
- disabled: _,
96
+ placeholder: l = "",
97
+ error: _,
98
+ disabled: u,
99
99
  additionalClass: t = "",
100
100
  onChange: i,
101
- onBlur: c,
101
+ onBlur: d,
102
102
  mini: g,
103
- openOnTop: k = !1,
104
- onClickItem: C,
105
- onCLickSelect: u
103
+ openOnTop: C = !1,
104
+ onClickItem: O,
105
+ onCLickSelect: f
106
106
  }) => {
107
- const [d, h] = B(!1), O = J(null), { isMobile: S } = E(), { handleBlur: x, getInputValue: N, getOption: f, handleDocumentClick: v } = et(
107
+ const [o, m] = B(!1), S = J(null), { isMobile: k } = E(), { handleBlur: x, getInputValue: b, getOption: h, handleDocumentClick: v } = et(
108
108
  {
109
109
  selectedOption: n,
110
- onClickOption: C,
110
+ onClickOption: O,
111
111
  setSelectedOption: i,
112
- setIsOpen: h,
113
- containerRef: O,
114
- isOpen: d,
115
- isMobile: S,
116
- placeholder: a,
112
+ setIsOpen: m,
113
+ containerRef: S,
114
+ isOpen: o,
115
+ isMobile: k,
116
+ placeholder: l,
117
117
  onChange: i,
118
- onBlur: c
118
+ onBlur: d
119
119
  }
120
120
  );
121
121
  return D(() => (document.addEventListener("click", v), () => {
@@ -123,32 +123,32 @@ const T = Object.assign(vt, { Item: G }), L = V.bind(l), wt = ({
123
123
  }), []), /* @__PURE__ */ y(
124
124
  "div",
125
125
  {
126
- ref: O,
126
+ ref: S,
127
127
  className: L(
128
- l.sortSelectWrapper,
129
- { [l.sortSelectWrapperError]: m },
130
- { [l.sortSelectWrapperTop]: k },
128
+ c.sortSelectWrapper,
129
+ { [c.sortSelectWrapperError]: _ },
130
+ { [c.sortSelectWrapperTop]: C },
131
131
  t
132
132
  ),
133
133
  tabIndex: 0,
134
134
  onBlur: x,
135
135
  onClick: () => {
136
- u && u();
136
+ f && f();
137
137
  },
138
138
  children: [
139
- /* @__PURE__ */ y("div", { className: L(l.inputWrapper), children: [
139
+ /* @__PURE__ */ y("div", { className: L(c.inputWrapper), children: [
140
140
  /* @__PURE__ */ e(
141
141
  "input",
142
142
  {
143
143
  type: "text",
144
144
  readOnly: !0,
145
- value: N(),
145
+ value: b(),
146
146
  className: L(
147
- l.selectedOptions,
148
- { [l.selectOptionsDisabled]: _ },
149
- { [l.selectionOptionMini]: g }
147
+ c.selectedOptions,
148
+ { [c.selectOptionsDisabled]: u },
149
+ { [c.selectionOptionMini]: g }
150
150
  ),
151
- onClick: () => h(!d)
151
+ onClick: () => m(!o)
152
152
  }
153
153
  ),
154
154
  /* @__PURE__ */ e(
@@ -156,23 +156,23 @@ const T = Object.assign(vt, { Item: G }), L = V.bind(l), wt = ({
156
156
  {
157
157
  name: "twoArrows",
158
158
  size: "24",
159
- additionalClass: l.icon
159
+ additionalClass: c.icon
160
160
  }
161
161
  )
162
162
  ] }),
163
- d && S && /* @__PURE__ */ y(
163
+ o && k && /* @__PURE__ */ y(
164
164
  q,
165
165
  {
166
- isOpen: d,
167
- emitIsOpen: h,
168
- additionalClassModalBody: l.modalAddBody,
169
- additionalClass: l.selectModal,
166
+ isOpen: o,
167
+ emitIsOpen: m,
168
+ additionalClassModalBody: c.modalAddBody,
169
+ additionalClass: c.selectModal,
170
170
  createPortalObj: { domNode: document.querySelector("body") },
171
171
  isTransparentBack: !0,
172
172
  children: [
173
- /* @__PURE__ */ y("div", { className: l.mobileSortHeader, children: [
173
+ /* @__PURE__ */ y("div", { className: c.mobileSortHeader, children: [
174
174
  /* @__PURE__ */ e(H, { children: "Сортировка" }),
175
- /* @__PURE__ */ e("div", { onClick: () => h(!1), children: /* @__PURE__ */ e(
175
+ /* @__PURE__ */ e("div", { onClick: () => m(!1), children: /* @__PURE__ */ e(
176
176
  R,
177
177
  {
178
178
  name: "close",
@@ -180,11 +180,11 @@ const T = Object.assign(vt, { Item: G }), L = V.bind(l), wt = ({
180
180
  }
181
181
  ) })
182
182
  ] }),
183
- /* @__PURE__ */ e("div", { className: l.mobileOptionList, children: o == null ? void 0 : o.map((W) => f(W)) })
183
+ /* @__PURE__ */ e("div", { className: c.mobileOptionList, children: a == null ? void 0 : a.map((W) => h(W)) })
184
184
  ]
185
185
  }
186
186
  ),
187
- d && !S && /* @__PURE__ */ e("div", { className: L(l.optionsList, { [l.optionListOnTop]: k }), children: o == null ? void 0 : o.map((W) => f(W)) })
187
+ o && !k && /* @__PURE__ */ e("div", { className: L(c.optionsList, { [c.optionListOnTop]: C }), children: a == null ? void 0 : a.map((W) => h(W)) })
188
188
  ]
189
189
  }
190
190
  );
@@ -215,73 +215,79 @@ var K = { exports: {} };
215
215
  Licensed under the MIT License (MIT), see
216
216
  http://jedwatson.github.io/classnames
217
217
  */
218
- (function(o) {
218
+ (function(a) {
219
219
  (function() {
220
220
  var n = {}.hasOwnProperty;
221
- function a() {
221
+ function l() {
222
222
  for (var t = "", i = 0; i < arguments.length; i++) {
223
- var c = arguments[i];
224
- c && (t = _(t, m.call(this, c)));
223
+ var d = arguments[i];
224
+ d && (t = u(t, _.call(this, d)));
225
225
  }
226
226
  return t;
227
227
  }
228
- function m(t) {
228
+ function _(t) {
229
229
  if (typeof t == "string" || typeof t == "number")
230
230
  return this && this[t] || t;
231
231
  if (typeof t != "object")
232
232
  return "";
233
233
  if (Array.isArray(t))
234
- return a.apply(this, t);
234
+ return l.apply(this, t);
235
235
  if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
236
236
  return t.toString();
237
237
  var i = "";
238
- for (var c in t)
239
- n.call(t, c) && t[c] && (i = _(i, this && this[c] || c));
238
+ for (var d in t)
239
+ n.call(t, d) && t[d] && (i = u(i, this && this[d] || d));
240
240
  return i;
241
241
  }
242
- function _(t, i) {
242
+ function u(t, i) {
243
243
  return i ? t ? t + " " + i : t + i : t;
244
244
  }
245
- o.exports ? (a.default = a, o.exports = a) : window.classNames = a;
245
+ a.exports ? (l.default = l, a.exports = l) : window.classNames = l;
246
246
  })();
247
247
  })(K);
248
248
  var Et = K.exports;
249
249
  const jt = /* @__PURE__ */ tt(Et), $t = jt.bind(s), de = ({
250
- disabledOptions: o = [],
250
+ disabledOptions: a = [],
251
251
  tabs: n = [],
252
- selectOptions: a = [],
253
- onChange: m,
254
- selectedValues: _ = [],
252
+ selectOptions: l = [],
253
+ onChange: _,
254
+ selectedValues: u = [],
255
255
  setSelectedTabs: t,
256
256
  selectedTabs: i = [],
257
- onClickItem: c,
257
+ onClickItem: d,
258
258
  onCLickSelect: g,
259
- btnName: k = "Фильтр"
259
+ btnName: C = "Фильтр"
260
260
  }) => {
261
- const { isMobile: C } = E(), [u, d] = B(!1), h = J(null), [O, S] = B(i), [x] = B(_), [N, f] = B(O), [v, W] = B(x), Q = (r) => {
262
- if (c && c(r), o.some((w) => w.value === r.value))
261
+ const { isMobile: O } = E(), [f, o] = B(!1), m = J(null), [S, k] = B(i), [x] = B(u), [b, h] = B(S), [v, W] = B(x), Q = (r) => {
262
+ if (d && d(r), a.some((w) => w.value === r.value))
263
263
  return;
264
- const b = v.some((w) => w.value === r.value) ? v.filter((w) => w.value !== r.value) : [...v, r];
265
- W(b);
264
+ const N = v.some((w) => w.value === r.value) ? v.filter((w) => w.value !== r.value) : [...v, r];
265
+ W(N);
266
266
  }, U = () => {
267
- S(n), f(n), W([]), m && (m([]), t == null || t(n));
267
+ k(n), h(n), W([]), _ && (_([]), t == null || t(n));
268
268
  }, X = () => {
269
- W(_), f(i);
269
+ W(u), h(i);
270
270
  }, j = () => {
271
- X(), d(!1);
271
+ X(), o(!1);
272
272
  }, Y = (r) => {
273
- r.stopPropagation(), m && (t == null || t(N), m(v)), d(!1);
273
+ r.stopPropagation(), _ && (t == null || t(b), _(v)), o(!1);
274
274
  };
275
275
  D(() => {
276
- u || f((r) => JSON.stringify(r) !== JSON.stringify(i) ? i : r);
277
- }, [u, i]), D(() => {
278
- const r = (b) => {
279
- h.current && h.current.contains(b.target) || j();
276
+ f || h((r) => JSON.stringify(r) !== JSON.stringify(i) ? i : r);
277
+ }, [f, i]), D(() => {
278
+ const r = (N) => {
279
+ if (m.current) {
280
+ if (m.current.contains(N.target)) {
281
+ N.target === m.current && o(!1);
282
+ return;
283
+ }
284
+ j();
285
+ }
280
286
  };
281
- return u ? document.addEventListener("click", r, { capture: !0 }) : document.removeEventListener("click", r, { capture: !0 }), () => {
287
+ return f ? document.addEventListener("click", r, { capture: !0 }) : document.removeEventListener("click", r, { capture: !0 }), () => {
282
288
  document.removeEventListener("click", r, { capture: !0 });
283
289
  };
284
- }, [u]);
290
+ }, [f]);
285
291
  const $ = () => /* @__PURE__ */ y(F, { children: [
286
292
  /* @__PURE__ */ e(
287
293
  "div",
@@ -308,7 +314,7 @@ const jt = /* @__PURE__ */ tt(Et), $t = jt.bind(s), de = ({
308
314
  variant: "grayRow",
309
315
  addClassName: s.tabs,
310
316
  isApart: !0,
311
- children: n == null ? void 0 : n.map((r, b) => {
317
+ children: n == null ? void 0 : n.map((r, N) => {
312
318
  var z;
313
319
  const w = r.value;
314
320
  return /* @__PURE__ */ e(
@@ -319,23 +325,23 @@ const jt = /* @__PURE__ */ tt(Et), $t = jt.bind(s), de = ({
319
325
  value: w,
320
326
  onClick: () => {
321
327
  },
322
- checked: ((z = N == null ? void 0 : N.find((A) => A.value === w)) == null ? void 0 : z.state) ?? !1,
328
+ checked: ((z = b == null ? void 0 : b.find((A) => A.value === w)) == null ? void 0 : z.state) ?? !1,
323
329
  onChange: () => {
324
- f == null || f(
330
+ h == null || h(
325
331
  (A) => A.map((M) => M.value === w ? { ...M, state: !M.state } : M)
326
332
  );
327
333
  },
328
- index: b,
334
+ index: N,
329
335
  addItemClassName: s.tabSwitcher,
330
336
  children: w
331
337
  },
332
- b
338
+ N
333
339
  );
334
340
  })
335
341
  }
336
342
  ) })
337
343
  ] }),
338
- /* @__PURE__ */ e("div", { className: s.selectWrapper, children: a == null ? void 0 : a.map((r, b) => /* @__PURE__ */ e(
344
+ /* @__PURE__ */ e("div", { className: s.selectWrapper, children: l == null ? void 0 : l.map((r, N) => /* @__PURE__ */ e(
339
345
  it,
340
346
  {
341
347
  addClassName: s.filterOption,
@@ -345,7 +351,7 @@ const jt = /* @__PURE__ */ tt(Et), $t = jt.bind(s), de = ({
345
351
  option: r,
346
352
  handleOptionClick: Q
347
353
  },
348
- b
354
+ N
349
355
  )) }),
350
356
  /* @__PURE__ */ y("div", { className: s.btnWrapper, children: [
351
357
  /* @__PURE__ */ e(
@@ -373,13 +379,13 @@ const jt = /* @__PURE__ */ tt(Et), $t = jt.bind(s), de = ({
373
379
  /* @__PURE__ */ y(
374
380
  "div",
375
381
  {
376
- ref: h,
382
+ ref: m,
377
383
  className: s.root,
378
384
  onClick: () => {
379
- g && g(), d((r) => !r);
385
+ g && g(), o(O ? (r) => !r : !0);
380
386
  },
381
387
  children: [
382
- /* @__PURE__ */ e("div", { className: s.btnName, children: k }),
388
+ /* @__PURE__ */ e("div", { className: s.btnName, children: C }),
383
389
  /* @__PURE__ */ e(
384
390
  R,
385
391
  {
@@ -387,15 +393,15 @@ const jt = /* @__PURE__ */ tt(Et), $t = jt.bind(s), de = ({
387
393
  size: "16"
388
394
  }
389
395
  ),
390
- !C && /* @__PURE__ */ e("div", { className: $t(s.desktopWrapper, { [s.desktopWrapperOpen]: u }), children: /* @__PURE__ */ e($, {}) })
396
+ !O && /* @__PURE__ */ e("div", { className: $t(s.desktopWrapper, { [s.desktopWrapperOpen]: f }), children: /* @__PURE__ */ e($, {}) })
391
397
  ]
392
398
  }
393
399
  ),
394
- C && /* @__PURE__ */ e(
400
+ O && /* @__PURE__ */ e(
395
401
  q,
396
402
  {
397
- isOpen: u,
398
- emitIsOpen: d,
403
+ isOpen: f,
404
+ emitIsOpen: o,
399
405
  isTransparentBack: !0,
400
406
  additionalClassModalBody: s.modalAddBody,
401
407
  additionalClass: s.filterWithSaveModal,
@@ -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-3eZynMTN.js";
4
+ import { F as w } from "../../../FilterWithSave-BWVPpMvV.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-3eZynMTN.js";
1
+ import { a as r } from "../../FilterWithSave-BWVPpMvV.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-3eZynMTN.js";
16
+ import { a as z } from "../../../FilterWithSave-BWVPpMvV.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-3eZynMTN.js";
1
+ import { S as e } from "../../FilterWithSave-BWVPpMvV.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-3eZynMTN.js";
3
+ import { S as v } from "../../../FilterWithSave-BWVPpMvV.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-3eZynMTN.js";
14
+ import "../../../FilterWithSave-BWVPpMvV.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-3eZynMTN.js";
13
+ import { F as B, a as L, S as k } from "./FilterWithSave-BWVPpMvV.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.588",
5
+ "version": "0.0.590",
6
6
  "author": "Mollycodd1e",
7
7
  "license": "ISC",
8
8
  "type": "module",