stone-kit 0.0.669 → 0.0.671

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,591 +0,0 @@
1
- import { jsxs as f, jsx as t, Fragment as P } from "react/jsx-runtime";
2
- import { NewIcon as $ } 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 j } 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 A } 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 _, 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-C4HGcCtY.js";
26
- const Y = "_root_lgek7_1", Z = "_text_lgek7_18", ee = "_textMini_lgek7_26", te = "_rootCol_lgek7_32", ie = "_item_lgek7_38", se = "_whiteRow_lgek7_57", le = "_firstItem_lgek7_68", re = "_lastItem_lgek7_72", ae = "_apart_lgek7_103", ne = "_isLong_lgek7_103", oe = "_autoWidth_lgek7_128", ce = "_mini_lgek7_132", de = "_isDisabled_lgek7_140", me = "_grayRow_lgek7_164", o = {
27
- root: Y,
28
- text: Z,
29
- textMini: ee,
30
- rootCol: te,
31
- item: ie,
32
- whiteRow: se,
33
- firstItem: le,
34
- lastItem: re,
35
- apart: ae,
36
- isLong: ne,
37
- autoWidth: oe,
38
- mini: ce,
39
- isDisabled: de,
40
- grayRow: me,
41
- "small-size": "_small-size_lgek7_192",
42
- "medium-size": "_medium-size_lgek7_197",
43
- "large-size": "_large-size_lgek7_202",
44
- "text-small-size": "_text-small-size_lgek7_207",
45
- "text-medium-size": "_text-medium-size_lgek7_212",
46
- "text-large-size": "_text-large-size_lgek7_217",
47
- "small-size_m": "_small-size_m_lgek7_223",
48
- "medium-size_m": "_medium-size_m_lgek7_227",
49
- "large-size_m": "_large-size_m_lgek7_231",
50
- "text-small-size_m": "_text-small-size_m_lgek7_235",
51
- "text-medium-size_m": "_text-medium-size_m_lgek7_239",
52
- "text-large-size_m": "_text-large-size_m_lgek7_243",
53
- "small-size_l": "_small-size_l_lgek7_258",
54
- "medium-size_l": "_medium-size_l_lgek7_262",
55
- "large-size_l": "_large-size_l_lgek7_266",
56
- "text-small-size_l": "_text-small-size_l_lgek7_270",
57
- "text-medium-size_l": "_text-medium-size_l_lgek7_274",
58
- "text-large-size_l": "_text-large-size_l_lgek7_278"
59
- }, L = V.bind(o), _e = ({
60
- children: a,
61
- variant: r = "whiteRow",
62
- isApart: n = !1,
63
- addClassName: W = "",
64
- col: c = !1
65
- }) => /* @__PURE__ */ t("div", { className: L(o.root, o[r], W, { [o.rootCol]: c, [o.apart]: n }), children: a }), G = Q((a, r) => {
66
- const { isTablet: n, isDesktop: W } = F(), {
67
- index: c,
68
- children: e,
69
- addItemClassName: l,
70
- addTextClass: d,
71
- size_s: g = "large",
72
- size_m: C,
73
- size_l: O,
74
- disabled: p = !1,
75
- itemsLength: z = 0,
76
- isLongOn: N = !0,
77
- width: S,
78
- width_m: m,
79
- width_l: u,
80
- mini: v = !1,
81
- ...k
82
- } = a, y = (e != null && e.toString().length ? (e == null ? void 0 : e.toString().length) > 2 : !1) && N, B = (x, s) => x && m ? m : s && u ? u : S, b = !S && !m && !u && y;
83
- return /* @__PURE__ */ f("label", { className: L({ [o.isLong]: y }), children: [
84
- /* @__PURE__ */ t(
85
- "input",
86
- {
87
- ref: r,
88
- type: "checkbox",
89
- ...k,
90
- disabled: p
91
- }
92
- ),
93
- /* @__PURE__ */ t(
94
- "div",
95
- {
96
- style: { width: B(n, W) },
97
- className: L(
98
- L(
99
- o.item,
100
- { [o.firstItem]: c === 0 },
101
- { [o.lastItem]: c === z - 1 },
102
- { [o.isDisabled]: p },
103
- { [o.autoWidth]: b },
104
- o[`${g}-size`],
105
- o[`${C}-size_m`],
106
- o[`${O}-size_l`],
107
- { [o.mini]: v }
108
- ),
109
- l
110
- ),
111
- children: /* @__PURE__ */ t(
112
- H,
113
- {
114
- className: L(
115
- o.text,
116
- o[`text-${g}-size`],
117
- o[`text-${C}-size_m`],
118
- o[`text-${O}-size_l`],
119
- { [o.textMini]: v },
120
- d
121
- ),
122
- children: e
123
- }
124
- )
125
- }
126
- )
127
- ] });
128
- });
129
- G.displayName = "TabSwitcherItem";
130
- const D = Object.assign(_e, { Item: G }), E = V.bind(_), pe = ({
131
- options: a,
132
- selectedOption: r,
133
- placeholder: n = "",
134
- error: W,
135
- disabled: c,
136
- additionalClass: e = "",
137
- onChange: l,
138
- onBlur: d,
139
- mini: g,
140
- openOnTop: C = !1,
141
- onClickItem: O,
142
- onCLickSelect: p
143
- }) => {
144
- const [z, N] = R(!1), S = q(null), { isMobile: m } = F(), { handleBlur: u, getInputValue: v, getOption: k, handleDocumentClick: y } = X(
145
- {
146
- selectedOption: r,
147
- onClickOption: O,
148
- setSelectedOption: l,
149
- setIsOpen: N,
150
- containerRef: S,
151
- isOpen: z,
152
- isMobile: m,
153
- placeholder: n,
154
- onChange: l,
155
- onBlur: d
156
- }
157
- );
158
- return j(() => (document.addEventListener("click", y), () => {
159
- document.removeEventListener("click", y);
160
- }), []), /* @__PURE__ */ f(
161
- "div",
162
- {
163
- ref: S,
164
- className: E(
165
- _.sortSelectWrapper,
166
- { [_.sortSelectWrapperError]: W },
167
- { [_.sortSelectWrapperTop]: C },
168
- e
169
- ),
170
- tabIndex: 0,
171
- onBlur: u,
172
- onClick: () => {
173
- p && p();
174
- },
175
- children: [
176
- /* @__PURE__ */ f("div", { className: E(_.inputWrapper), children: [
177
- /* @__PURE__ */ t(
178
- "input",
179
- {
180
- type: "text",
181
- readOnly: !0,
182
- value: v(),
183
- className: E(
184
- _.selectedOptions,
185
- { [_.selectOptionsDisabled]: c },
186
- { [_.selectionOptionMini]: g }
187
- ),
188
- onClick: () => N(!z)
189
- }
190
- ),
191
- /* @__PURE__ */ t(
192
- $,
193
- {
194
- name: "twoArrows",
195
- size: "24",
196
- additionalClass: _.icon
197
- }
198
- )
199
- ] }),
200
- z && m && /* @__PURE__ */ f(
201
- J,
202
- {
203
- isOpen: z,
204
- emitIsOpen: N,
205
- additionalClassModalBody: _.modalAddBody,
206
- additionalClass: _.selectModal,
207
- createPortalObj: { domNode: document.querySelector("body") },
208
- isTransparentBack: !0,
209
- children: [
210
- /* @__PURE__ */ f("div", { className: _.mobileSortHeader, children: [
211
- /* @__PURE__ */ t(H, { children: "Сортировка" }),
212
- /* @__PURE__ */ t("div", { onClick: () => N(!1), children: /* @__PURE__ */ t(
213
- $,
214
- {
215
- name: "close",
216
- size: "20"
217
- }
218
- ) })
219
- ] }),
220
- /* @__PURE__ */ t("div", { className: _.mobileOptionList, children: a == null ? void 0 : a.map((B) => k(B)) })
221
- ]
222
- }
223
- ),
224
- z && !m && /* @__PURE__ */ t("div", { className: E(_.optionsList, { [_.optionListOnTop]: C }), children: a == null ? void 0 : a.map((B) => k(B)) })
225
- ]
226
- }
227
- );
228
- };
229
- pe.displayName = "SortSelect";
230
- const ue = "_root_xwd22_1", he = "_filterWithSaveModal_xwd22_15", fe = "_modalAddBody_xwd22_20", ge = "_closeBtn_xwd22_29", ve = "_btnName_xwd22_35", ke = "_modalTitle_xwd22_39", xe = "_tabSWitcherWrapper_xwd22_48", we = "_switcherTitle_xwd22_56", ze = "_switcherScroll_xwd22_63", Ne = "_tabs_xwd22_72", We = "_selectWrapper_xwd22_77", Ce = "_filterOption_xwd22_81", Oe = "_btnWrapper_xwd22_88", Se = "_resetBtn_xwd22_94", ye = "_saveBtn_xwd22_95", Be = "_desktopWrapper_xwd22_99", Ie = "_desktopWrapperOpen_xwd22_122", i = {
231
- root: ue,
232
- filterWithSaveModal: he,
233
- modalAddBody: fe,
234
- closeBtn: ge,
235
- btnName: ve,
236
- modalTitle: ke,
237
- tabSWitcherWrapper: xe,
238
- switcherTitle: we,
239
- switcherScroll: ze,
240
- tabs: Ne,
241
- selectWrapper: We,
242
- filterOption: Ce,
243
- btnWrapper: Oe,
244
- resetBtn: Se,
245
- saveBtn: ye,
246
- desktopWrapper: Be,
247
- desktopWrapperOpen: Ie
248
- };
249
- var K = { exports: {} };
250
- /*!
251
- Copyright (c) 2018 Jed Watson.
252
- Licensed under the MIT License (MIT), see
253
- http://jedwatson.github.io/classnames
254
- */
255
- (function(a) {
256
- (function() {
257
- var r = {}.hasOwnProperty;
258
- function n() {
259
- for (var e = "", l = 0; l < arguments.length; l++) {
260
- var d = arguments[l];
261
- d && (e = c(e, W.call(this, d)));
262
- }
263
- return e;
264
- }
265
- function W(e) {
266
- if (typeof e == "string" || typeof e == "number")
267
- return this && this[e] || e;
268
- if (typeof e != "object")
269
- return "";
270
- if (Array.isArray(e))
271
- return n.apply(this, e);
272
- if (e.toString !== Object.prototype.toString && !e.toString.toString().includes("[native code]"))
273
- return e.toString();
274
- var l = "";
275
- for (var d in e)
276
- r.call(e, d) && e[d] && (l = c(l, this && this[d] || d));
277
- return l;
278
- }
279
- function c(e, l) {
280
- return l ? e ? e + " " + l : e + l : e;
281
- }
282
- a.exports ? (n.default = n, a.exports = n) : window.classNames = n;
283
- })();
284
- })(K);
285
- var Me = K.exports;
286
- const be = /* @__PURE__ */ U(Me), Re = ({
287
- selectedTabs: a = [],
288
- selectedValues: r = [],
289
- onClickItem: n,
290
- disabledOptions: W = [],
291
- tabs: c = [],
292
- onChange: e,
293
- setSelectedTabs: l
294
- }) => {
295
- const { isMobile: d } = F(), [g, C] = R(!1), O = q(null), [p, z] = R(a), [N] = R(r), [S, m] = R(p), [u, v] = R(N), k = (s) => {
296
- if (n && n(s), W.some((h) => h.value === s.value))
297
- return;
298
- const w = u.some((h) => h.value === s.value) ? u.filter((h) => h.value !== s.value) : [...u, s];
299
- v(w);
300
- }, y = () => {
301
- z(c), m(c), v([]), e && (e([]), l == null || l(c));
302
- }, B = () => {
303
- v(r), m(a);
304
- }, b = () => {
305
- B(), C(!1);
306
- }, x = (s) => {
307
- s.stopPropagation(), e && (l == null || l(S), e(u)), C(!1);
308
- };
309
- return j(() => {
310
- g || m((s) => JSON.stringify(s) !== JSON.stringify(a) ? a : s);
311
- }, [g, a]), j(() => {
312
- const s = (w) => {
313
- if (!O.current)
314
- return;
315
- const h = w.target;
316
- O.current.contains(h) || h.closest("svg") || b();
317
- };
318
- return g ? document.addEventListener("click", s) : document.removeEventListener("click", s), () => {
319
- document.removeEventListener("click", s);
320
- };
321
- }, [g]), {
322
- isMobile: d,
323
- handleClearClick: y,
324
- handleCloseModal: b,
325
- handleOptionClick: k,
326
- handleSaveClick: x,
327
- localSelectedTabs: S,
328
- selectedOptions: u,
329
- setSelectedOptions: v,
330
- isModalOpen: g,
331
- setIsModalOpen: C,
332
- setLocalSelectedTabs: m,
333
- containerRef: O
334
- };
335
- }, Le = be.bind(i), at = ({
336
- disabledOptions: a,
337
- tabs: r = [],
338
- selectOptions: n = [],
339
- onChange: W,
340
- selectedValues: c,
341
- setSelectedTabs: e,
342
- selectedTabs: l,
343
- onClickItem: d,
344
- onCLickSelect: g,
345
- btnName: C = "Фильтр"
346
- }) => {
347
- const {
348
- handleCloseModal: O,
349
- localSelectedTabs: p,
350
- selectedOptions: z,
351
- isMobile: N,
352
- handleOptionClick: S,
353
- handleClearClick: m,
354
- handleSaveClick: u,
355
- isModalOpen: v,
356
- setLocalSelectedTabs: k,
357
- setIsModalOpen: y,
358
- containerRef: B
359
- } = Re({
360
- selectedTabs: l,
361
- onClickItem: d,
362
- setSelectedTabs: e,
363
- tabs: r,
364
- onChange: W,
365
- disabledOptions: a,
366
- selectedValues: c
367
- }), b = () => /* @__PURE__ */ f(P, { children: [
368
- /* @__PURE__ */ t(
369
- "div",
370
- {
371
- className: i.closeBtn,
372
- onClick: () => {
373
- O();
374
- },
375
- children: /* @__PURE__ */ t(
376
- $,
377
- {
378
- name: "close",
379
- size: "24"
380
- }
381
- )
382
- }
383
- ),
384
- /* @__PURE__ */ t("div", { className: i.modalTitle, children: "Фильтры" }),
385
- /* @__PURE__ */ f("div", { className: i.tabSWitcherWrapper, children: [
386
- /* @__PURE__ */ t("div", { className: i.switcherTitle, children: "Готовность" }),
387
- /* @__PURE__ */ t("div", { className: i.switcherScroll, children: /* @__PURE__ */ t(
388
- D,
389
- {
390
- variant: "grayRow",
391
- addClassName: i.tabs,
392
- isApart: !0,
393
- children: r == null ? void 0 : r.map((x, s) => {
394
- var h;
395
- const w = x.value;
396
- return /* @__PURE__ */ t(
397
- D.Item,
398
- {
399
- itemsLength: r == null ? void 0 : r.length,
400
- mini: !0,
401
- size_s: "small",
402
- value: w,
403
- onClick: () => {
404
- },
405
- checked: ((h = p == null ? void 0 : p.find((M) => M.value === w)) == null ? void 0 : h.state) ?? !1,
406
- onChange: () => {
407
- k == null || k(
408
- (M) => M.map((I) => I.value === w ? { ...I, state: !I.state } : I)
409
- );
410
- },
411
- index: s,
412
- children: w
413
- },
414
- s
415
- );
416
- })
417
- }
418
- ) })
419
- ] }),
420
- /* @__PURE__ */ t("div", { className: i.selectWrapper, children: n == null ? void 0 : n.map((x, s) => /* @__PURE__ */ t(
421
- T,
422
- {
423
- sizeIcon: "24",
424
- addClassName: i.filterOption,
425
- disabledOptions: [],
426
- clickableOptions: [],
427
- selectedOptions: z,
428
- option: x,
429
- handleOptionClick: S
430
- },
431
- s
432
- )) }),
433
- /* @__PURE__ */ f("div", { className: i.btnWrapper, children: [
434
- /* @__PURE__ */ t(
435
- A,
436
- {
437
- as: "button",
438
- variant: "gray",
439
- additionalClass: i.resetBtn,
440
- onClick: m,
441
- children: "Сбросить"
442
- }
443
- ),
444
- /* @__PURE__ */ t(
445
- A,
446
- {
447
- as: "button",
448
- additionalClass: i.saveBtn,
449
- onClick: u,
450
- children: "Сохранить"
451
- }
452
- )
453
- ] })
454
- ] });
455
- return /* @__PURE__ */ f(P, { children: [
456
- /* @__PURE__ */ f("div", { style: { position: "relative" }, children: [
457
- /* @__PURE__ */ f(
458
- "div",
459
- {
460
- className: i.root,
461
- onClick: () => {
462
- g && g(), N ? y((x) => !x) : v || y(!0);
463
- },
464
- children: [
465
- /* @__PURE__ */ t("div", { className: i.btnName, children: C }),
466
- /* @__PURE__ */ t(
467
- $,
468
- {
469
- name: "filter",
470
- size: "16"
471
- }
472
- )
473
- ]
474
- }
475
- ),
476
- !N && /* @__PURE__ */ f(
477
- "div",
478
- {
479
- ref: B,
480
- className: Le(i.desktopWrapper, { [i.desktopWrapperOpen]: v }),
481
- children: [
482
- /* @__PURE__ */ t(
483
- "div",
484
- {
485
- className: i.closeBtn,
486
- onClick: () => {
487
- O();
488
- },
489
- children: /* @__PURE__ */ t(
490
- $,
491
- {
492
- name: "close",
493
- size: "24"
494
- }
495
- )
496
- }
497
- ),
498
- /* @__PURE__ */ t("div", { className: i.modalTitle, children: "Фильтры" }),
499
- /* @__PURE__ */ f("div", { className: i.tabSWitcherWrapper, children: [
500
- /* @__PURE__ */ t("div", { className: i.switcherTitle, children: "Готовность" }),
501
- /* @__PURE__ */ t("div", { className: i.switcherScroll, children: /* @__PURE__ */ t(
502
- D,
503
- {
504
- variant: "grayRow",
505
- addClassName: i.tabs,
506
- isApart: !0,
507
- children: r == null ? void 0 : r.map((x, s) => {
508
- var h;
509
- const w = x.value;
510
- return /* @__PURE__ */ t(
511
- D.Item,
512
- {
513
- itemsLength: r == null ? void 0 : r.length,
514
- size_s: "small",
515
- mini: !0,
516
- value: w,
517
- onClick: () => {
518
- },
519
- checked: ((h = p == null ? void 0 : p.find((M) => M.value === w)) == null ? void 0 : h.state) ?? !1,
520
- onChange: () => {
521
- k == null || k(
522
- (M) => M.map((I) => I.value === w ? { ...I, state: !I.state } : I)
523
- );
524
- },
525
- index: s,
526
- addItemClassName: i.tabSwitcher,
527
- children: w
528
- },
529
- s
530
- );
531
- })
532
- }
533
- ) })
534
- ] }),
535
- /* @__PURE__ */ t("div", { className: i.selectWrapper, children: n == null ? void 0 : n.map((x, s) => /* @__PURE__ */ t(
536
- T,
537
- {
538
- sizeIcon: "24",
539
- addClassName: i.filterOption,
540
- disabledOptions: [],
541
- clickableOptions: [],
542
- selectedOptions: z,
543
- option: x,
544
- handleOptionClick: S
545
- },
546
- s
547
- )) }),
548
- /* @__PURE__ */ f("div", { className: i.btnWrapper, children: [
549
- /* @__PURE__ */ t(
550
- A,
551
- {
552
- as: "button",
553
- variant: "gray",
554
- additionalClass: i.resetBtn,
555
- onClick: m,
556
- children: "Сбросить"
557
- }
558
- ),
559
- /* @__PURE__ */ t(
560
- A,
561
- {
562
- as: "button",
563
- additionalClass: i.saveBtn,
564
- onClick: u,
565
- children: "Сохранить"
566
- }
567
- )
568
- ] })
569
- ]
570
- }
571
- )
572
- ] }),
573
- N && /* @__PURE__ */ t(
574
- J,
575
- {
576
- isOpen: v,
577
- emitIsOpen: y,
578
- isTransparentBack: !0,
579
- additionalClassModalBody: i.modalAddBody,
580
- additionalClass: i.filterWithSaveModal,
581
- children: /* @__PURE__ */ t(b, {})
582
- }
583
- )
584
- ] });
585
- };
586
- export {
587
- at as F,
588
- D as S,
589
- pe as a,
590
- Re as u
591
- };