stone-kit 0.0.622 → 0.0.624

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,551 +0,0 @@
1
- import { jsxs as _, 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-8X0Ft_zQ.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", f = {
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(f), pt = ({
42
- children: s,
43
- variant: a = "whiteRow",
44
- isApart: o = !1,
45
- addClassName: O = "",
46
- col: l = !1
47
- }) => /* @__PURE__ */ e("div", { className: L(f.root, f[a], O, { [f.rootCol]: l, [f.apart]: o }), children: s }), G = Q((s, a) => {
48
- const { isTablet: o, isDesktop: O } = F(), {
49
- index: l,
50
- children: t,
51
- addItemClassName: r,
52
- addTextClass: c,
53
- disabled: v = !1,
54
- itemsLength: b = 0,
55
- isLongOn: y = !0,
56
- width: m,
57
- width_m: p,
58
- width_l: h,
59
- mini: k = !1,
60
- ...N
61
- } = s, W = (t != null && t.toString().length ? (t == null ? void 0 : t.toString().length) > 2 : !1) && y, w = (x, B) => x && p ? p : B && h ? h : m, g = !m && !p && !h && W;
62
- return /* @__PURE__ */ _("label", { className: L({ [f.isLong]: W }), children: [
63
- /* @__PURE__ */ e(
64
- "input",
65
- {
66
- ref: a,
67
- type: "checkbox",
68
- ...N,
69
- disabled: v
70
- }
71
- ),
72
- /* @__PURE__ */ e(
73
- "div",
74
- {
75
- style: { width: w(o, O) },
76
- className: L(
77
- L(
78
- f.item,
79
- { [f.firstItem]: l === 0 },
80
- { [f.lastItem]: l === b - 1 },
81
- { [f.isDisabled]: v },
82
- { [f.autoWidth]: g },
83
- { [f.mini]: k }
84
- ),
85
- r
86
- ),
87
- children: /* @__PURE__ */ e(H, { className: L(f.text, { [f.textMini]: k }, 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: O,
98
- disabled: l,
99
- additionalClass: t = "",
100
- onChange: r,
101
- onBlur: c,
102
- mini: v,
103
- openOnTop: b = !1,
104
- onClickItem: y,
105
- onCLickSelect: m
106
- }) => {
107
- const [p, h] = R(!1), k = q(null), { isMobile: N } = F(), { handleBlur: W, getInputValue: w, getOption: g, handleDocumentClick: x } = X(
108
- {
109
- selectedOption: a,
110
- onClickOption: y,
111
- setSelectedOption: r,
112
- setIsOpen: h,
113
- containerRef: k,
114
- isOpen: p,
115
- isMobile: N,
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__ */ _(
124
- "div",
125
- {
126
- ref: k,
127
- className: $(
128
- d.sortSelectWrapper,
129
- { [d.sortSelectWrapperError]: O },
130
- { [d.sortSelectWrapperTop]: b },
131
- t
132
- ),
133
- tabIndex: 0,
134
- onBlur: W,
135
- onClick: () => {
136
- m && m();
137
- },
138
- children: [
139
- /* @__PURE__ */ _("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 && N && /* @__PURE__ */ _(
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__ */ _("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) => g(B)) })
184
- ]
185
- }
186
- ),
187
- p && !N && /* @__PURE__ */ e("div", { className: $(d.optionsList, { [d.optionListOnTop]: b }), children: s == null ? void 0 : s.map((B) => g(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", gt = "_tabSWitcherWrapper_1t65a_48", Ct = "_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: gt,
201
- switcherTitle: Ct,
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, O.call(this, c)));
225
- }
226
- return t;
227
- }
228
- function O(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: O = [],
254
- tabs: l = [],
255
- onChange: t,
256
- setSelectedTabs: r
257
- }) => {
258
- const { isMobile: c } = F(), [v, b] = R(!1), y = q(null), [m, p] = R(s), [h] = R(a), [k, N] = R(m), [W, w] = R(h), g = (n) => {
259
- if (o && o(n), O.some((u) => u.value === n.value))
260
- return;
261
- const C = W.some((u) => u.value === n.value) ? W.filter((u) => u.value !== n.value) : [...W, n];
262
- w(C);
263
- }, x = () => {
264
- p(l), N(l), w([]), t && (t([]), r == null || r(l));
265
- }, B = () => {
266
- w(a), N(s);
267
- }, D = () => {
268
- B(), b(!1);
269
- }, S = (n) => {
270
- n.stopPropagation(), t && (r == null || r(k), t(W)), b(!1);
271
- };
272
- return z(() => {
273
- v || N((n) => JSON.stringify(n) !== JSON.stringify(s) ? s : n);
274
- }, [v, s]), z(() => {
275
- const n = (C) => {
276
- if (!y.current)
277
- return;
278
- const u = C.target;
279
- y.current.contains(u) || u.closest("svg") || D();
280
- };
281
- return v ? document.addEventListener("click", n) : document.removeEventListener("click", n), () => {
282
- document.removeEventListener("click", n);
283
- };
284
- }, [v]), {
285
- isMobile: c,
286
- handleClearClick: x,
287
- handleCloseModal: D,
288
- handleOptionClick: g,
289
- handleSaveClick: S,
290
- localSelectedTabs: k,
291
- selectedOptions: W,
292
- setSelectedOptions: w,
293
- isModalOpen: v,
294
- setIsModalOpen: b,
295
- setLocalSelectedTabs: N,
296
- containerRef: y
297
- };
298
- }, At = Rt.bind(i), se = ({
299
- disabledOptions: s,
300
- tabs: a = [],
301
- selectOptions: o = [],
302
- onChange: O,
303
- selectedValues: l,
304
- setSelectedTabs: t,
305
- selectedTabs: r,
306
- onClickItem: c,
307
- onCLickSelect: v,
308
- btnName: b = "Фильтр"
309
- }) => {
310
- const {
311
- handleCloseModal: y,
312
- localSelectedTabs: m,
313
- selectedOptions: p,
314
- isMobile: h,
315
- handleOptionClick: k,
316
- handleClearClick: N,
317
- handleSaveClick: W,
318
- isModalOpen: w,
319
- setLocalSelectedTabs: g,
320
- setIsModalOpen: x,
321
- containerRef: B
322
- } = Lt({
323
- selectedTabs: r,
324
- onClickItem: c,
325
- setSelectedTabs: t,
326
- tabs: a,
327
- onChange: O,
328
- disabledOptions: s,
329
- selectedValues: l
330
- }), D = () => /* @__PURE__ */ _(P, { children: [
331
- /* @__PURE__ */ e(
332
- "div",
333
- {
334
- className: i.closeBtn,
335
- onClick: () => {
336
- y();
337
- },
338
- children: /* @__PURE__ */ e(
339
- A,
340
- {
341
- name: "close",
342
- size: "24"
343
- }
344
- )
345
- }
346
- ),
347
- /* @__PURE__ */ e("div", { className: i.modalTitle, children: "Фильтры" }),
348
- /* @__PURE__ */ _("div", { className: i.tabSWitcherWrapper, children: [
349
- /* @__PURE__ */ e("div", { className: i.switcherTitle, children: "Готовность" }),
350
- /* @__PURE__ */ e("div", { className: i.switcherScroll, children: /* @__PURE__ */ e(
351
- j,
352
- {
353
- variant: "grayRow",
354
- addClassName: i.tabs,
355
- isApart: !0,
356
- children: a == null ? void 0 : a.map((S, n) => {
357
- var u;
358
- const C = S.value;
359
- return /* @__PURE__ */ e(
360
- j.Item,
361
- {
362
- itemsLength: a == null ? void 0 : a.length,
363
- mini: !0,
364
- value: C,
365
- onClick: () => {
366
- },
367
- checked: ((u = m == null ? void 0 : m.find((M) => M.value === C)) == null ? void 0 : u.state) ?? !1,
368
- onChange: () => {
369
- g == null || g(
370
- (M) => M.map((I) => I.value === C ? { ...I, state: !I.state } : I)
371
- );
372
- },
373
- index: n,
374
- addItemClassName: i.tabSwitcher,
375
- children: C
376
- },
377
- n
378
- );
379
- })
380
- }
381
- ) })
382
- ] }),
383
- /* @__PURE__ */ e("div", { className: i.selectWrapper, children: o == null ? void 0 : o.map((S, n) => /* @__PURE__ */ e(
384
- T,
385
- {
386
- addClassName: i.filterOption,
387
- disabledOptions: [],
388
- clickableOptions: [],
389
- selectedOptions: p,
390
- option: S,
391
- handleOptionClick: k
392
- },
393
- n
394
- )) }),
395
- /* @__PURE__ */ _("div", { className: i.btnWrapper, children: [
396
- /* @__PURE__ */ e(
397
- E,
398
- {
399
- as: "button",
400
- variant: "gray",
401
- additionalClass: i.resetBtn,
402
- onClick: N,
403
- children: "Сбросить"
404
- }
405
- ),
406
- /* @__PURE__ */ e(
407
- E,
408
- {
409
- as: "button",
410
- additionalClass: i.saveBtn,
411
- onClick: W,
412
- children: "Сохранить"
413
- }
414
- )
415
- ] })
416
- ] });
417
- return /* @__PURE__ */ _(P, { children: [
418
- /* @__PURE__ */ _("div", { style: { position: "relative" }, children: [
419
- /* @__PURE__ */ _(
420
- "div",
421
- {
422
- className: i.root,
423
- onClick: () => {
424
- v && v(), h ? x((S) => !S) : w || x(!0);
425
- },
426
- children: [
427
- /* @__PURE__ */ e("div", { className: i.btnName, children: b }),
428
- /* @__PURE__ */ e(
429
- A,
430
- {
431
- name: "filter",
432
- size: "16"
433
- }
434
- )
435
- ]
436
- }
437
- ),
438
- !h && /* @__PURE__ */ _(
439
- "div",
440
- {
441
- ref: B,
442
- className: At(i.desktopWrapper, { [i.desktopWrapperOpen]: w }),
443
- children: [
444
- /* @__PURE__ */ e(
445
- "div",
446
- {
447
- className: i.closeBtn,
448
- onClick: () => {
449
- y();
450
- },
451
- children: /* @__PURE__ */ e(
452
- A,
453
- {
454
- name: "close",
455
- size: "24"
456
- }
457
- )
458
- }
459
- ),
460
- /* @__PURE__ */ e("div", { className: i.modalTitle, children: "Фильтры" }),
461
- /* @__PURE__ */ _("div", { className: i.tabSWitcherWrapper, children: [
462
- /* @__PURE__ */ e("div", { className: i.switcherTitle, children: "Готовность" }),
463
- /* @__PURE__ */ e("div", { className: i.switcherScroll, children: /* @__PURE__ */ e(
464
- j,
465
- {
466
- variant: "grayRow",
467
- addClassName: i.tabs,
468
- isApart: !0,
469
- children: a == null ? void 0 : a.map((S, n) => {
470
- var u;
471
- const C = S.value;
472
- return /* @__PURE__ */ e(
473
- j.Item,
474
- {
475
- itemsLength: a == null ? void 0 : a.length,
476
- mini: !0,
477
- value: C,
478
- onClick: () => {
479
- },
480
- checked: ((u = m == null ? void 0 : m.find((M) => M.value === C)) == null ? void 0 : u.state) ?? !1,
481
- onChange: () => {
482
- g == null || g(
483
- (M) => M.map((I) => I.value === C ? { ...I, state: !I.state } : I)
484
- );
485
- },
486
- index: n,
487
- addItemClassName: i.tabSwitcher,
488
- children: C
489
- },
490
- n
491
- );
492
- })
493
- }
494
- ) })
495
- ] }),
496
- /* @__PURE__ */ e("div", { className: i.selectWrapper, children: o == null ? void 0 : o.map((S, n) => /* @__PURE__ */ e(
497
- T,
498
- {
499
- addClassName: i.filterOption,
500
- disabledOptions: [],
501
- clickableOptions: [],
502
- selectedOptions: p,
503
- option: S,
504
- handleOptionClick: k
505
- },
506
- n
507
- )) }),
508
- /* @__PURE__ */ _("div", { className: i.btnWrapper, children: [
509
- /* @__PURE__ */ e(
510
- E,
511
- {
512
- as: "button",
513
- variant: "gray",
514
- additionalClass: i.resetBtn,
515
- onClick: N,
516
- children: "Сбросить"
517
- }
518
- ),
519
- /* @__PURE__ */ e(
520
- E,
521
- {
522
- as: "button",
523
- additionalClass: i.saveBtn,
524
- onClick: W,
525
- children: "Сохранить"
526
- }
527
- )
528
- ] })
529
- ]
530
- }
531
- )
532
- ] }),
533
- h && /* @__PURE__ */ e(
534
- J,
535
- {
536
- isOpen: w,
537
- emitIsOpen: x,
538
- isTransparentBack: !0,
539
- additionalClassModalBody: i.modalAddBody,
540
- additionalClass: i.filterWithSaveModal,
541
- children: /* @__PURE__ */ e(D, {})
542
- }
543
- )
544
- ] });
545
- };
546
- export {
547
- se as F,
548
- j as S,
549
- ht as a,
550
- Lt as u
551
- };
@@ -1,68 +0,0 @@
1
- import { jsxs as r, jsx as i } from "react/jsx-runtime";
2
- import { NewIcon as p } from "./components/NewIcon/ui/NewIcon.js";
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 = {
5
- multiSelectWrapper: m,
6
- selectedOptions: u,
7
- selectedOptionsBtn: O,
8
- selectedOptionsOpened: b,
9
- selectedOptionsNotEmpty: v,
10
- selectOptionsDisabled: C,
11
- optionsList: g,
12
- listRight: k,
13
- inputWrapper: y,
14
- option: D,
15
- category: f,
16
- leftSide: N,
17
- optionCategory: S,
18
- optionDisabled: W,
19
- optionClickable: x,
20
- icon: B
21
- }, E = h.bind(s), U = ({
22
- option: e,
23
- selectedOptions: o,
24
- disabledOptions: _,
25
- clickableOptions: c,
26
- handleOptionClick: a,
27
- isOptionCategory: n,
28
- sizeIcon: l,
29
- addClassName: d = ""
30
- }) => /* @__PURE__ */ r(
31
- "div",
32
- {
33
- className: E(
34
- s.option,
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}`)
40
- },
41
- d
42
- ),
43
- onClick: () => {
44
- a(e);
45
- },
46
- children: [
47
- n && /* @__PURE__ */ i(
48
- p,
49
- {
50
- size: l ?? "20",
51
- name: o.some((t) => t.value === e.value) ? "selectChecked" : "selectUnchecked"
52
- }
53
- ),
54
- /* @__PURE__ */ i("div", { children: e.label }),
55
- !n && /* @__PURE__ */ i(
56
- p,
57
- {
58
- size: l ?? "20",
59
- name: o.some((t) => t.value === e.value) ? "selectChecked" : "selectUnchecked"
60
- }
61
- )
62
- ]
63
- }
64
- );
65
- export {
66
- U as O,
67
- s
68
- };