stone-kit 0.0.617 → 0.0.619

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.
@@ -0,0 +1,548 @@
1
+ import { jsxs as u, jsx as e, Fragment as P } from "react/jsx-runtime";
2
+ import { NewIcon as A } from "./components/NewIcon/ui/NewIcon.js";
3
+ import { M as J } from "./Modal-BZv6nlLe.js";
4
+ import { forwardRef as Q, useState as R, useRef as q, useEffect as z } from "react";
5
+ import { Text as H } from "./components/Text/ui/Text.js";
6
+ import { c as V, g as U } from "./index-rKuIKazb.js";
7
+ import { Button as E } from "./components/Button/ui/Button.js";
8
+ import "./components/mobileButton/ui/MobileButton.js";
9
+ import "./components/DestinationTab/ui/DestinationTab.js";
10
+ import "./components/RoundButton/ui/RoundButton.js";
11
+ import "./components/Tag/ui/Tag.js";
12
+ import "./components/Switcher/ui/Switcher.js";
13
+ import "./components/Flex/ui/Flex.js";
14
+ import "./components/Input/ui/Input.js";
15
+ import "./components/GroupedInput/ui/GroupedInputs.js";
16
+ import "./components/MetroTag/ui/MetroTag.js";
17
+ import "./components/LotCard/ui/LotCard.js";
18
+ import "./components/Select/ui/Select.js";
19
+ import { useClientWidth as F } from "./shared/useClientWidth.js";
20
+ import { s as d, u as X } from "./useSortSelect-CjZXLFOG.js";
21
+ import "./components/SliderNavigation/ui/SliderNavigation.js";
22
+ import "./components/LotCardSkeleton/ui/LotCardSkeleton.js";
23
+ import "./components/TabSelect/ui/TabSelect.js";
24
+ import "./components/FormModal/ui/ModalForm.js";
25
+ import { O as T } from "./Option-BJoptpZe.js";
26
+ const Y = "_root_2bilg_1", Z = "_text_2bilg_18", tt = "_textMini_2bilg_26", et = "_rootCol_2bilg_32", it = "_item_2bilg_38", rt = "_whiteRow_2bilg_57", at = "_firstItem_2bilg_68", nt = "_lastItem_2bilg_72", st = "_apart_2bilg_103", ot = "_isLong_2bilg_103", lt = "_autoWidth_2bilg_128", ct = "_mini_2bilg_132", dt = "_isDisabled_2bilg_140", mt = "_grayRow_2bilg_164", _ = {
27
+ root: Y,
28
+ text: Z,
29
+ textMini: tt,
30
+ rootCol: et,
31
+ item: it,
32
+ whiteRow: rt,
33
+ firstItem: at,
34
+ lastItem: nt,
35
+ apart: st,
36
+ isLong: ot,
37
+ autoWidth: lt,
38
+ mini: ct,
39
+ isDisabled: dt,
40
+ grayRow: mt
41
+ }, L = V.bind(_), pt = ({
42
+ children: s,
43
+ variant: a = "whiteRow",
44
+ isApart: o = !1,
45
+ addClassName: w = "",
46
+ col: l = !1
47
+ }) => /* @__PURE__ */ e("div", { className: L(_.root, _[a], w, { [_.rootCol]: l, [_.apart]: o }), children: s }), G = Q((s, a) => {
48
+ const { isTablet: o, isDesktop: w } = F(), {
49
+ index: l,
50
+ children: t,
51
+ addItemClassName: r,
52
+ addTextClass: c,
53
+ disabled: f = !1,
54
+ itemsLength: b = 0,
55
+ isLongOn: y = !0,
56
+ width: m,
57
+ width_m: p,
58
+ width_l: h,
59
+ mini: O = !1,
60
+ ...v
61
+ } = s, N = (t != null && t.toString().length ? (t == null ? void 0 : t.toString().length) > 2 : !1) && y, g = (x, B) => x && p ? p : B && h ? h : m, W = !m && !p && !h && N;
62
+ return /* @__PURE__ */ u("label", { className: L({ [_.isLong]: N }), children: [
63
+ /* @__PURE__ */ e(
64
+ "input",
65
+ {
66
+ ref: a,
67
+ type: "checkbox",
68
+ ...v,
69
+ disabled: f
70
+ }
71
+ ),
72
+ /* @__PURE__ */ e(
73
+ "div",
74
+ {
75
+ style: { width: g(o, w) },
76
+ className: L(
77
+ L(
78
+ _.item,
79
+ { [_.firstItem]: l === 0 },
80
+ { [_.lastItem]: l === b - 1 },
81
+ { [_.isDisabled]: f },
82
+ { [_.autoWidth]: W },
83
+ { [_.mini]: O }
84
+ ),
85
+ r
86
+ ),
87
+ children: /* @__PURE__ */ e(H, { className: L(_.text, { [_.textMini]: O }, c), children: t })
88
+ }
89
+ )
90
+ ] });
91
+ });
92
+ G.displayName = "TabSwitcherItem";
93
+ const j = Object.assign(pt, { Item: G }), $ = V.bind(d), ht = ({
94
+ options: s,
95
+ selectedOption: a,
96
+ placeholder: o = "",
97
+ error: w,
98
+ disabled: l,
99
+ additionalClass: t = "",
100
+ onChange: r,
101
+ onBlur: c,
102
+ mini: f,
103
+ openOnTop: b = !1,
104
+ onClickItem: y,
105
+ onCLickSelect: m
106
+ }) => {
107
+ const [p, h] = R(!1), O = q(null), { isMobile: v } = F(), { handleBlur: N, getInputValue: g, getOption: W, handleDocumentClick: x } = X(
108
+ {
109
+ selectedOption: a,
110
+ onClickOption: y,
111
+ setSelectedOption: r,
112
+ setIsOpen: h,
113
+ containerRef: O,
114
+ isOpen: p,
115
+ isMobile: v,
116
+ placeholder: o,
117
+ onChange: r,
118
+ onBlur: c
119
+ }
120
+ );
121
+ return z(() => (document.addEventListener("click", x), () => {
122
+ document.removeEventListener("click", x);
123
+ }), []), /* @__PURE__ */ u(
124
+ "div",
125
+ {
126
+ ref: O,
127
+ className: $(
128
+ d.sortSelectWrapper,
129
+ { [d.sortSelectWrapperError]: w },
130
+ { [d.sortSelectWrapperTop]: b },
131
+ t
132
+ ),
133
+ tabIndex: 0,
134
+ onBlur: N,
135
+ onClick: () => {
136
+ m && m();
137
+ },
138
+ children: [
139
+ /* @__PURE__ */ u("div", { className: $(d.inputWrapper), children: [
140
+ /* @__PURE__ */ e(
141
+ "input",
142
+ {
143
+ type: "text",
144
+ readOnly: !0,
145
+ value: g(),
146
+ className: $(
147
+ d.selectedOptions,
148
+ { [d.selectOptionsDisabled]: l },
149
+ { [d.selectionOptionMini]: f }
150
+ ),
151
+ onClick: () => h(!p)
152
+ }
153
+ ),
154
+ /* @__PURE__ */ e(
155
+ A,
156
+ {
157
+ name: "twoArrows",
158
+ size: "24",
159
+ additionalClass: d.icon
160
+ }
161
+ )
162
+ ] }),
163
+ p && v && /* @__PURE__ */ u(
164
+ J,
165
+ {
166
+ isOpen: p,
167
+ emitIsOpen: h,
168
+ additionalClassModalBody: d.modalAddBody,
169
+ additionalClass: d.selectModal,
170
+ createPortalObj: { domNode: document.querySelector("body") },
171
+ isTransparentBack: !0,
172
+ children: [
173
+ /* @__PURE__ */ u("div", { className: d.mobileSortHeader, children: [
174
+ /* @__PURE__ */ e(H, { children: "Сортировка" }),
175
+ /* @__PURE__ */ e("div", { onClick: () => h(!1), children: /* @__PURE__ */ e(
176
+ A,
177
+ {
178
+ name: "close",
179
+ size: "20"
180
+ }
181
+ ) })
182
+ ] }),
183
+ /* @__PURE__ */ e("div", { className: d.mobileOptionList, children: s == null ? void 0 : s.map((B) => W(B)) })
184
+ ]
185
+ }
186
+ ),
187
+ p && !v && /* @__PURE__ */ e("div", { className: $(d.optionsList, { [d.optionListOnTop]: b }), children: s == null ? void 0 : s.map((B) => W(B)) })
188
+ ]
189
+ }
190
+ );
191
+ };
192
+ ht.displayName = "SortSelect";
193
+ const ut = "_root_1t65a_1", _t = "_filterWithSaveModal_1t65a_15", ft = "_modalAddBody_1t65a_20", vt = "_closeBtn_1t65a_29", Nt = "_btnName_1t65a_35", Wt = "_modalTitle_1t65a_39", Ct = "_tabSWitcherWrapper_1t65a_48", gt = "_switcherTitle_1t65a_56", wt = "_switcherScroll_1t65a_63", Ot = "_tabs_1t65a_72", kt = "_selectWrapper_1t65a_77", St = "_filterOption_1t65a_81", bt = "_btnWrapper_1t65a_88", yt = "_resetBtn_1t65a_94", xt = "_saveBtn_1t65a_95", Bt = "_desktopWrapper_1t65a_99", It = "_desktopWrapperOpen_1t65a_122", i = {
194
+ root: ut,
195
+ filterWithSaveModal: _t,
196
+ modalAddBody: ft,
197
+ closeBtn: vt,
198
+ btnName: Nt,
199
+ modalTitle: Wt,
200
+ tabSWitcherWrapper: Ct,
201
+ switcherTitle: gt,
202
+ switcherScroll: wt,
203
+ tabs: Ot,
204
+ selectWrapper: kt,
205
+ filterOption: St,
206
+ btnWrapper: bt,
207
+ resetBtn: yt,
208
+ saveBtn: xt,
209
+ desktopWrapper: Bt,
210
+ desktopWrapperOpen: It
211
+ };
212
+ var K = { exports: {} };
213
+ /*!
214
+ Copyright (c) 2018 Jed Watson.
215
+ Licensed under the MIT License (MIT), see
216
+ http://jedwatson.github.io/classnames
217
+ */
218
+ (function(s) {
219
+ (function() {
220
+ var a = {}.hasOwnProperty;
221
+ function o() {
222
+ for (var t = "", r = 0; r < arguments.length; r++) {
223
+ var c = arguments[r];
224
+ c && (t = l(t, w.call(this, c)));
225
+ }
226
+ return t;
227
+ }
228
+ function w(t) {
229
+ if (typeof t == "string" || typeof t == "number")
230
+ return this && this[t] || t;
231
+ if (typeof t != "object")
232
+ return "";
233
+ if (Array.isArray(t))
234
+ return o.apply(this, t);
235
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
236
+ return t.toString();
237
+ var r = "";
238
+ for (var c in t)
239
+ a.call(t, c) && t[c] && (r = l(r, this && this[c] || c));
240
+ return r;
241
+ }
242
+ function l(t, r) {
243
+ return r ? t ? t + " " + r : t + r : t;
244
+ }
245
+ s.exports ? (o.default = o, s.exports = o) : window.classNames = o;
246
+ })();
247
+ })(K);
248
+ var Mt = K.exports;
249
+ const Rt = /* @__PURE__ */ U(Mt), Lt = ({
250
+ selectedTabs: s = [],
251
+ selectedValues: a = [],
252
+ onClickItem: o,
253
+ disabledOptions: w = [],
254
+ tabs: l = [],
255
+ onChange: t,
256
+ setSelectedTabs: r
257
+ }) => {
258
+ const { isMobile: c } = F(), [f, b] = R(!1), y = q(null), [m, p] = R(s), [h] = R(a), [O, v] = R(m), [N, g] = R(h), W = (n) => {
259
+ if (o && o(n), w.some((S) => S.value === n.value))
260
+ return;
261
+ const C = N.some((S) => S.value === n.value) ? N.filter((S) => S.value !== n.value) : [...N, n];
262
+ g(C);
263
+ }, x = () => {
264
+ p(l), v(l), g([]), t && (t([]), r == null || r(l));
265
+ }, B = () => {
266
+ g(a), v(s);
267
+ }, D = () => {
268
+ B(), b(!1);
269
+ }, k = (n) => {
270
+ n.stopPropagation(), t && (r == null || r(O), t(N)), b(!1);
271
+ };
272
+ return z(() => {
273
+ f || v((n) => JSON.stringify(n) !== JSON.stringify(s) ? s : n);
274
+ }, [f, s]), z(() => {
275
+ const n = (C) => {
276
+ y.current && (y.current.contains(C.target) || D());
277
+ };
278
+ return f ? document.addEventListener("click", n) : document.removeEventListener("click", n), () => {
279
+ document.removeEventListener("click", n);
280
+ };
281
+ }, [f]), {
282
+ isMobile: c,
283
+ handleClearClick: x,
284
+ handleCloseModal: D,
285
+ handleOptionClick: W,
286
+ handleSaveClick: k,
287
+ localSelectedTabs: O,
288
+ selectedOptions: N,
289
+ setSelectedOptions: g,
290
+ isModalOpen: f,
291
+ setIsModalOpen: b,
292
+ setLocalSelectedTabs: v,
293
+ containerRef: y
294
+ };
295
+ }, At = Rt.bind(i), se = ({
296
+ disabledOptions: s,
297
+ tabs: a = [],
298
+ selectOptions: o = [],
299
+ onChange: w,
300
+ selectedValues: l,
301
+ setSelectedTabs: t,
302
+ selectedTabs: r,
303
+ onClickItem: c,
304
+ onCLickSelect: f,
305
+ btnName: b = "Фильтр"
306
+ }) => {
307
+ const {
308
+ handleCloseModal: y,
309
+ localSelectedTabs: m,
310
+ selectedOptions: p,
311
+ isMobile: h,
312
+ handleOptionClick: O,
313
+ handleClearClick: v,
314
+ handleSaveClick: N,
315
+ isModalOpen: g,
316
+ setLocalSelectedTabs: W,
317
+ setIsModalOpen: x,
318
+ containerRef: B
319
+ } = Lt({
320
+ selectedTabs: r,
321
+ onClickItem: c,
322
+ setSelectedTabs: t,
323
+ tabs: a,
324
+ onChange: w,
325
+ disabledOptions: s,
326
+ selectedValues: l
327
+ }), D = () => /* @__PURE__ */ u(P, { children: [
328
+ /* @__PURE__ */ e(
329
+ "div",
330
+ {
331
+ className: i.closeBtn,
332
+ onClick: () => {
333
+ y();
334
+ },
335
+ children: /* @__PURE__ */ e(
336
+ A,
337
+ {
338
+ name: "close",
339
+ size: "24"
340
+ }
341
+ )
342
+ }
343
+ ),
344
+ /* @__PURE__ */ e("div", { className: i.modalTitle, children: "Фильтры" }),
345
+ /* @__PURE__ */ u("div", { className: i.tabSWitcherWrapper, children: [
346
+ /* @__PURE__ */ e("div", { className: i.switcherTitle, children: "Готовность" }),
347
+ /* @__PURE__ */ e("div", { className: i.switcherScroll, children: /* @__PURE__ */ e(
348
+ j,
349
+ {
350
+ variant: "grayRow",
351
+ addClassName: i.tabs,
352
+ isApart: !0,
353
+ children: a == null ? void 0 : a.map((k, n) => {
354
+ var S;
355
+ const C = k.value;
356
+ return /* @__PURE__ */ e(
357
+ j.Item,
358
+ {
359
+ itemsLength: a == null ? void 0 : a.length,
360
+ mini: !0,
361
+ value: C,
362
+ onClick: () => {
363
+ },
364
+ checked: ((S = m == null ? void 0 : m.find((M) => M.value === C)) == null ? void 0 : S.state) ?? !1,
365
+ onChange: () => {
366
+ W == null || W(
367
+ (M) => M.map((I) => I.value === C ? { ...I, state: !I.state } : I)
368
+ );
369
+ },
370
+ index: n,
371
+ addItemClassName: i.tabSwitcher,
372
+ children: C
373
+ },
374
+ n
375
+ );
376
+ })
377
+ }
378
+ ) })
379
+ ] }),
380
+ /* @__PURE__ */ e("div", { className: i.selectWrapper, children: o == null ? void 0 : o.map((k, n) => /* @__PURE__ */ e(
381
+ T,
382
+ {
383
+ addClassName: i.filterOption,
384
+ disabledOptions: [],
385
+ clickableOptions: [],
386
+ selectedOptions: p,
387
+ option: k,
388
+ handleOptionClick: O
389
+ },
390
+ n
391
+ )) }),
392
+ /* @__PURE__ */ u("div", { className: i.btnWrapper, children: [
393
+ /* @__PURE__ */ e(
394
+ E,
395
+ {
396
+ as: "button",
397
+ variant: "gray",
398
+ additionalClass: i.resetBtn,
399
+ onClick: v,
400
+ children: "Сбросить"
401
+ }
402
+ ),
403
+ /* @__PURE__ */ e(
404
+ E,
405
+ {
406
+ as: "button",
407
+ additionalClass: i.saveBtn,
408
+ onClick: N,
409
+ children: "Сохранить"
410
+ }
411
+ )
412
+ ] })
413
+ ] });
414
+ return /* @__PURE__ */ u(P, { children: [
415
+ /* @__PURE__ */ u("div", { style: { position: "relative" }, children: [
416
+ /* @__PURE__ */ u(
417
+ "div",
418
+ {
419
+ className: i.root,
420
+ onClick: () => {
421
+ f && f(), h ? x((k) => !k) : g || x(!0);
422
+ },
423
+ children: [
424
+ /* @__PURE__ */ e("div", { className: i.btnName, children: b }),
425
+ /* @__PURE__ */ e(
426
+ A,
427
+ {
428
+ name: "filter",
429
+ size: "16"
430
+ }
431
+ )
432
+ ]
433
+ }
434
+ ),
435
+ !h && /* @__PURE__ */ u(
436
+ "div",
437
+ {
438
+ ref: B,
439
+ className: At(i.desktopWrapper, { [i.desktopWrapperOpen]: g }),
440
+ children: [
441
+ /* @__PURE__ */ e(
442
+ "div",
443
+ {
444
+ className: i.closeBtn,
445
+ onClick: () => {
446
+ y();
447
+ },
448
+ children: /* @__PURE__ */ e(
449
+ A,
450
+ {
451
+ name: "close",
452
+ size: "24"
453
+ }
454
+ )
455
+ }
456
+ ),
457
+ /* @__PURE__ */ e("div", { className: i.modalTitle, children: "Фильтры" }),
458
+ /* @__PURE__ */ u("div", { className: i.tabSWitcherWrapper, children: [
459
+ /* @__PURE__ */ e("div", { className: i.switcherTitle, children: "Готовность" }),
460
+ /* @__PURE__ */ e("div", { className: i.switcherScroll, children: /* @__PURE__ */ e(
461
+ j,
462
+ {
463
+ variant: "grayRow",
464
+ addClassName: i.tabs,
465
+ isApart: !0,
466
+ children: a == null ? void 0 : a.map((k, n) => {
467
+ var S;
468
+ const C = k.value;
469
+ return /* @__PURE__ */ e(
470
+ j.Item,
471
+ {
472
+ itemsLength: a == null ? void 0 : a.length,
473
+ mini: !0,
474
+ value: C,
475
+ onClick: () => {
476
+ },
477
+ checked: ((S = m == null ? void 0 : m.find((M) => M.value === C)) == null ? void 0 : S.state) ?? !1,
478
+ onChange: () => {
479
+ W == null || W(
480
+ (M) => M.map((I) => I.value === C ? { ...I, state: !I.state } : I)
481
+ );
482
+ },
483
+ index: n,
484
+ addItemClassName: i.tabSwitcher,
485
+ children: C
486
+ },
487
+ n
488
+ );
489
+ })
490
+ }
491
+ ) })
492
+ ] }),
493
+ /* @__PURE__ */ e("div", { className: i.selectWrapper, children: o == null ? void 0 : o.map((k, n) => /* @__PURE__ */ e(
494
+ T,
495
+ {
496
+ addClassName: i.filterOption,
497
+ disabledOptions: [],
498
+ clickableOptions: [],
499
+ selectedOptions: p,
500
+ option: k,
501
+ handleOptionClick: O
502
+ },
503
+ n
504
+ )) }),
505
+ /* @__PURE__ */ u("div", { className: i.btnWrapper, children: [
506
+ /* @__PURE__ */ e(
507
+ E,
508
+ {
509
+ as: "button",
510
+ variant: "gray",
511
+ additionalClass: i.resetBtn,
512
+ onClick: v,
513
+ children: "Сбросить"
514
+ }
515
+ ),
516
+ /* @__PURE__ */ e(
517
+ E,
518
+ {
519
+ as: "button",
520
+ additionalClass: i.saveBtn,
521
+ onClick: N,
522
+ children: "Сохранить"
523
+ }
524
+ )
525
+ ] })
526
+ ]
527
+ }
528
+ )
529
+ ] }),
530
+ h && /* @__PURE__ */ e(
531
+ J,
532
+ {
533
+ isOpen: g,
534
+ emitIsOpen: x,
535
+ isTransparentBack: !0,
536
+ additionalClassModalBody: i.modalAddBody,
537
+ additionalClass: i.filterWithSaveModal,
538
+ children: /* @__PURE__ */ e(D, {})
539
+ }
540
+ )
541
+ ] });
542
+ };
543
+ export {
544
+ se as F,
545
+ j as S,
546
+ ht as a,
547
+ Lt as u
548
+ };
@@ -1,14 +1,14 @@
1
1
  import { jsxs as r, jsx as i } from "react/jsx-runtime";
2
2
  import { NewIcon as p } from "./components/NewIcon/ui/NewIcon.js";
3
3
  import { c as h } from "./index-rKuIKazb.js";
4
- const m = "_multiSelectWrapper_1h59t_1", u = "_selectedOptions_1h59t_8", O = "_selectedOptionsBtn_1h59t_27", b = "_selectedOptionsOpened_1h59t_31", v = "_selectedOptionsNotEmpty_1h59t_35", C = "_selectOptionsDisabled_1h59t_40", g = "_optionsList_1h59t_47", k = "_listRight_1h59t_63", y = "_inputWrapper_1h59t_67", D = "_option_1h59t_47", f = "_category_1h59t_88", N = "_leftSide_1h59t_92", S = "_optionCategory_1h59t_97", W = "_optionDisabled_1h59t_103", x = "_optionClickable_1h59t_107", B = "_icon_1h59t_111", s = {
4
+ const m = "_multiSelectWrapper_1h59t_1", u = "_selectedOptions_1h59t_8", O = "_selectedOptionsBtn_1h59t_27", b = "_selectedOptionsOpened_1h59t_31", v = "_selectedOptionsNotEmpty_1h59t_35", g = "_selectOptionsDisabled_1h59t_40", C = "_optionsList_1h59t_47", k = "_listRight_1h59t_63", y = "_inputWrapper_1h59t_67", D = "_option_1h59t_47", f = "_category_1h59t_88", N = "_leftSide_1h59t_92", S = "_optionCategory_1h59t_97", W = "_optionDisabled_1h59t_103", x = "_optionClickable_1h59t_107", B = "_icon_1h59t_111", o = {
5
5
  multiSelectWrapper: m,
6
6
  selectedOptions: u,
7
7
  selectedOptionsBtn: O,
8
8
  selectedOptionsOpened: b,
9
9
  selectedOptionsNotEmpty: v,
10
- selectOptionsDisabled: C,
11
- optionsList: g,
10
+ selectOptionsDisabled: g,
11
+ optionsList: C,
12
12
  listRight: k,
13
13
  inputWrapper: y,
14
14
  option: D,
@@ -18,9 +18,9 @@ const m = "_multiSelectWrapper_1h59t_1", u = "_selectedOptions_1h59t_8", O = "_s
18
18
  optionDisabled: W,
19
19
  optionClickable: x,
20
20
  icon: B
21
- }, E = h.bind(s), U = ({
22
- option: e,
23
- selectedOptions: o,
21
+ }, E = h.bind(o), U = ({
22
+ option: t,
23
+ selectedOptions: s,
24
24
  disabledOptions: _,
25
25
  clickableOptions: c,
26
26
  handleOptionClick: a,
@@ -31,30 +31,32 @@ const m = "_multiSelectWrapper_1h59t_1", u = "_selectedOptions_1h59t_8", O = "_s
31
31
  "div",
32
32
  {
33
33
  className: E(
34
- s.option,
34
+ o.option,
35
35
  {
36
- [s.selected]: o.some((t) => t.value === e.value),
37
- [s.optionDisabled]: _.some((t) => t.value === e.value),
38
- [s.optionCategory]: n,
39
- [s.optionClickable]: c && c.includes(`${e.value}`)
36
+ [o.selected]: s.some((e) => e.value === t.value),
37
+ [o.optionDisabled]: _.some((e) => e.value === t.value),
38
+ [o.optionCategory]: n,
39
+ [o.optionClickable]: c && c.includes(`${t.value}`)
40
40
  },
41
41
  d
42
42
  ),
43
- onClick: () => a(e),
43
+ onClick: (e) => {
44
+ e.stopPropagation(), a(t);
45
+ },
44
46
  children: [
45
47
  n && /* @__PURE__ */ i(
46
48
  p,
47
49
  {
48
50
  size: l ?? "20",
49
- name: o.some((t) => t.value === e.value) ? "selectChecked" : "selectUnchecked"
51
+ name: s.some((e) => e.value === t.value) ? "selectChecked" : "selectUnchecked"
50
52
  }
51
53
  ),
52
- /* @__PURE__ */ i("div", { children: e.label }),
54
+ /* @__PURE__ */ i("div", { children: t.label }),
53
55
  !n && /* @__PURE__ */ i(
54
56
  p,
55
57
  {
56
58
  size: l ?? "20",
57
- name: o.some((t) => t.value === e.value) ? "selectChecked" : "selectUnchecked"
59
+ name: s.some((e) => e.value === t.value) ? "selectChecked" : "selectUnchecked"
58
60
  }
59
61
  )
60
62
  ]
@@ -62,5 +64,5 @@ const m = "_multiSelectWrapper_1h59t_1", u = "_selectedOptions_1h59t_8", O = "_s
62
64
  );
63
65
  export {
64
66
  U as O,
65
- s
67
+ o as s
66
68
  };
@@ -0,0 +1,42 @@
1
+ import { TOption } from '../../Select/ui/Select.types';
2
+
3
+ interface IuseFilterWithSave {
4
+ selectOptions?: TOption[];
5
+ disabledOptions?: TOption[];
6
+ selectedValues?: TOption[];
7
+ tabs?: {
8
+ value: string;
9
+ state: boolean;
10
+ }[];
11
+ selectedTabs?: {
12
+ value: string;
13
+ state: boolean;
14
+ }[];
15
+ setSelectedTabs?: React.Dispatch<React.SetStateAction<{
16
+ value: string;
17
+ state: boolean;
18
+ }[]>>;
19
+ onChange?: (selectedOptions: TOption[]) => unknown;
20
+ onClickItem?: (option: TOption | TOption[]) => void;
21
+ }
22
+ export declare const useFilterWithSave: ({ selectedTabs, selectedValues, onClickItem, disabledOptions, tabs, onChange, setSelectedTabs, }: IuseFilterWithSave) => {
23
+ isMobile: boolean;
24
+ handleClearClick: () => void;
25
+ handleCloseModal: () => void;
26
+ handleOptionClick: (option: TOption) => void;
27
+ handleSaveClick: import('react').MouseEventHandler<HTMLButtonElement>;
28
+ localSelectedTabs: {
29
+ value: string;
30
+ state: boolean;
31
+ }[];
32
+ selectedOptions: TOption[];
33
+ setSelectedOptions: import('react').Dispatch<import('react').SetStateAction<TOption[]>>;
34
+ isModalOpen: boolean;
35
+ setIsModalOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
36
+ setLocalSelectedTabs: import('react').Dispatch<import('react').SetStateAction<{
37
+ value: string;
38
+ state: boolean;
39
+ }[]>>;
40
+ containerRef: import('react').MutableRefObject<HTMLDivElement | null>;
41
+ };
42
+ export {};
@@ -0,0 +1,27 @@
1
+ import "react";
2
+ import "../../Button/ui/Button.js";
3
+ import "../../mobileButton/ui/MobileButton.js";
4
+ import "../../NewIcon/ui/NewIcon.js";
5
+ import "../../DestinationTab/ui/DestinationTab.js";
6
+ import "../../RoundButton/ui/RoundButton.js";
7
+ import "../../Tag/ui/Tag.js";
8
+ import "../../Switcher/ui/Switcher.js";
9
+ import "../../Text/ui/Text.js";
10
+ import "../../Flex/ui/Flex.js";
11
+ import "../../Input/ui/Input.js";
12
+ import "react/jsx-runtime";
13
+ import "../../../Modal-BZv6nlLe.js";
14
+ import { u as q } from "../../../FilterWithSave-Cgi_z_HZ.js";
15
+ import "../../GroupedInput/ui/GroupedInputs.js";
16
+ import "../../../index-rKuIKazb.js";
17
+ import "../../MetroTag/ui/MetroTag.js";
18
+ import "../../LotCard/ui/LotCard.js";
19
+ import "../../Select/ui/Select.js";
20
+ import "../../../shared/useClientWidth.js";
21
+ import "../../SliderNavigation/ui/SliderNavigation.js";
22
+ import "../../LotCardSkeleton/ui/LotCardSkeleton.js";
23
+ import "../../TabSelect/ui/TabSelect.js";
24
+ import "../../FormModal/ui/ModalForm.js";
25
+ export {
26
+ q as useFilterWithSave
27
+ };