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