stone-kit 0.0.234 → 0.0.236
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/{SortSelect-DudrT8RK.js → SortSelect-nD0x1SSi.js} +1 -1
- package/dist/components/LotCard/ui/LotCard.js +1 -1
- package/dist/components/Select/ui/Select.js +25 -21
- package/dist/components/SortSelect/hooks/useSortSelect.js +1 -1
- package/dist/components/SortSelect/index.js +1 -1
- package/dist/components/SortSelect/ui/SortSelect.js +2 -2
- package/dist/components/TabSwitcher/index.js +1 -1
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +1 -1
- package/dist/main.js +1 -1
- package/dist/{useSortSelect-BXr8BYtw.js → useSortSelect-C7leD2tv.js} +24 -24
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as _, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as k, useState as D, useRef as T, useEffect as B } from "react";
|
|
3
3
|
import { c as L } from "./index-rKuIKazb.js";
|
|
4
|
-
import { s as t, u as M } from "./useSortSelect-
|
|
4
|
+
import { s as t, u as M } from "./useSortSelect-C7leD2tv.js";
|
|
5
5
|
import { NewIcon as O } from "./components/NewIcon/ui/NewIcon.js";
|
|
6
6
|
import "./components/Button/ui/Button.js";
|
|
7
7
|
import "./components/mobileButton/ui/MobileButton.js";
|
|
@@ -13,7 +13,7 @@ import "../../Flex/ui/Flex.js";
|
|
|
13
13
|
import "../../Input/ui/Input.js";
|
|
14
14
|
import "react";
|
|
15
15
|
import "../../../Modal-G1ISsPJt.js";
|
|
16
|
-
import "../../../SortSelect-
|
|
16
|
+
import "../../../SortSelect-nD0x1SSi.js";
|
|
17
17
|
import "../../GroupedInput/ui/GroupedInputs.js";
|
|
18
18
|
import "../../../index-rKuIKazb.js";
|
|
19
19
|
import "../../MetroTag/ui/MetroTag.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as r, Fragment as b, jsx as
|
|
1
|
+
import { jsxs as r, Fragment as b, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { memo as y, useState as N, useRef as W, useCallback as O, useEffect as C } from "react";
|
|
3
3
|
import { c as F } from "../../../index-rKuIKazb.js";
|
|
4
4
|
import { NewIcon as h } from "../../NewIcon/ui/NewIcon.js";
|
|
@@ -22,29 +22,33 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
|
|
|
22
22
|
additionalClassBtn: E,
|
|
23
23
|
onChange: p,
|
|
24
24
|
onBlur: d,
|
|
25
|
-
selectedValues:
|
|
26
|
-
isBtn:
|
|
25
|
+
selectedValues: i = [],
|
|
26
|
+
isBtn: g = !1,
|
|
27
27
|
btnName: w,
|
|
28
28
|
isListRight: z = !1
|
|
29
29
|
}) => {
|
|
30
|
-
const [s,
|
|
30
|
+
const [s, S] = N(i), [o, m] = N(!1), f = W(null), I = O(
|
|
31
31
|
(t) => () => {
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const n = s.some((_) => _.value === t.value) ? s.filter((_) => _.value !== t.value) : [...s, t];
|
|
33
|
+
S(n), p && p(n);
|
|
34
34
|
},
|
|
35
35
|
[s, p]
|
|
36
36
|
), u = O((t) => {
|
|
37
|
-
f.current && !f.current.contains(t.target)
|
|
37
|
+
if (f.current && !f.current.contains(t.target)) {
|
|
38
|
+
if (t.target.closest("svg"))
|
|
39
|
+
return;
|
|
40
|
+
m(!1);
|
|
41
|
+
}
|
|
38
42
|
}, []), j = O(() => {
|
|
39
43
|
d && d(s);
|
|
40
44
|
}, [s, d]);
|
|
41
45
|
C(() => (document.addEventListener("click", u), () => {
|
|
42
46
|
document.removeEventListener("click", u);
|
|
43
47
|
}), [u]);
|
|
44
|
-
const k = W(
|
|
48
|
+
const k = W(i);
|
|
45
49
|
return C(() => {
|
|
46
|
-
|
|
47
|
-
}, [
|
|
50
|
+
i.length !== k.current.length && (S(i), k.current = i);
|
|
51
|
+
}, [i]), /* @__PURE__ */ r(
|
|
48
52
|
"div",
|
|
49
53
|
{
|
|
50
54
|
ref: f,
|
|
@@ -53,8 +57,8 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
|
|
|
53
57
|
onBlur: j,
|
|
54
58
|
children: [
|
|
55
59
|
/* @__PURE__ */ r("div", { className: l(e.inputWrapper), children: [
|
|
56
|
-
!
|
|
57
|
-
/* @__PURE__ */
|
|
60
|
+
!g && /* @__PURE__ */ r(b, { children: [
|
|
61
|
+
/* @__PURE__ */ c(
|
|
58
62
|
"div",
|
|
59
63
|
{
|
|
60
64
|
className: l(e.selectedOptions, { [e.selectOptionsDisabled]: v }),
|
|
@@ -62,7 +66,7 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
|
|
|
62
66
|
children: s.length === 0 ? R : "Выбрано " + s.length
|
|
63
67
|
}
|
|
64
68
|
),
|
|
65
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ c(
|
|
66
70
|
h,
|
|
67
71
|
{
|
|
68
72
|
name: "arrowShort",
|
|
@@ -72,8 +76,8 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
|
|
|
72
76
|
}
|
|
73
77
|
)
|
|
74
78
|
] }),
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */
|
|
79
|
+
g && /* @__PURE__ */ r(b, { children: [
|
|
80
|
+
/* @__PURE__ */ c(
|
|
77
81
|
"button",
|
|
78
82
|
{
|
|
79
83
|
className: l(
|
|
@@ -85,7 +89,7 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
|
|
|
85
89
|
children: w
|
|
86
90
|
}
|
|
87
91
|
),
|
|
88
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ c(
|
|
89
93
|
h,
|
|
90
94
|
{
|
|
91
95
|
name: "filter",
|
|
@@ -96,20 +100,20 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
|
|
|
96
100
|
)
|
|
97
101
|
] })
|
|
98
102
|
] }),
|
|
99
|
-
o && /* @__PURE__ */
|
|
103
|
+
o && /* @__PURE__ */ c("div", { className: l(e.optionsList, { [e.listRight]: z }, x), children: a == null ? void 0 : a.map((t) => /* @__PURE__ */ r(
|
|
100
104
|
"div",
|
|
101
105
|
{
|
|
102
106
|
className: l(e.option, {
|
|
103
|
-
[e.selected]: s.some((
|
|
107
|
+
[e.selected]: s.some((n) => n.value === t.value)
|
|
104
108
|
}),
|
|
105
109
|
onClick: I(t),
|
|
106
110
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ c("div", { children: t.label }),
|
|
112
|
+
/* @__PURE__ */ c(
|
|
109
113
|
h,
|
|
110
114
|
{
|
|
111
115
|
size: "20",
|
|
112
|
-
name: s.some((
|
|
116
|
+
name: s.some((n) => n.value === t.value) ? "selectChecked" : "selectUnchecked"
|
|
113
117
|
}
|
|
114
118
|
)
|
|
115
119
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../../index-rKuIKazb.js";
|
|
4
|
-
import "../../../useSortSelect-
|
|
4
|
+
import "../../../useSortSelect-C7leD2tv.js";
|
|
5
5
|
import "../../NewIcon/ui/NewIcon.js";
|
|
6
6
|
import "../../Button/ui/Button.js";
|
|
7
7
|
import "../../mobileButton/ui/MobileButton.js";
|
|
@@ -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-G1ISsPJt.js";
|
|
16
|
-
import { a as y } from "../../../SortSelect-
|
|
16
|
+
import { a as y } from "../../../SortSelect-nD0x1SSi.js";
|
|
17
17
|
import "../../GroupedInput/ui/GroupedInputs.js";
|
|
18
18
|
import "../../MetroTag/ui/MetroTag.js";
|
|
19
19
|
import "../../Select/ui/Select.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { S as q } from "../../../SortSelect-
|
|
3
|
+
import { S as q } from "../../../SortSelect-nD0x1SSi.js";
|
|
4
4
|
import "../../Text/ui/Text.js";
|
|
5
5
|
import "../../../index-rKuIKazb.js";
|
|
6
6
|
import "../../Button/ui/Button.js";
|
package/dist/main.js
CHANGED
|
@@ -10,7 +10,7 @@ import { Flex as C } from "./components/Flex/ui/Flex.js";
|
|
|
10
10
|
import { Input as b } from "./components/Input/ui/Input.js";
|
|
11
11
|
import { M as I } from "./Modal-G1ISsPJt.js";
|
|
12
12
|
import { FieldInput as w } from "./components/FieldInput/ui/FieldInput.js";
|
|
13
|
-
import { a as F, S as L } from "./SortSelect-
|
|
13
|
+
import { a as F, S as L } from "./SortSelect-nD0x1SSi.js";
|
|
14
14
|
import { GroupedInputs as N } from "./components/GroupedInput/ui/GroupedInputs.js";
|
|
15
15
|
import { Logo as v } from "./components/Logo/ui/Logo.js";
|
|
16
16
|
import { MetroTag as G } from "./components/MetroTag/ui/MetroTag.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as k, jsx as
|
|
1
|
+
import { jsxs as k, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { c as y } from "./index-rKuIKazb.js";
|
|
3
|
-
const j = "_sortSelectWrapper_1ynju_1", v = "_selectedOptions_1ynju_10", b = "_selectionOptionMini_1ynju_33", x = "_selectedOptionsOpened_1ynju_37", B = "_selectOptionsDisabled_1ynju_41", C = "_optionsList_1ynju_48", S = "_mobileOptionList_1ynju_63",
|
|
3
|
+
const j = "_sortSelectWrapper_1ynju_1", v = "_selectedOptions_1ynju_10", b = "_selectionOptionMini_1ynju_33", x = "_selectedOptionsOpened_1ynju_37", B = "_selectOptionsDisabled_1ynju_41", C = "_optionsList_1ynju_48", S = "_mobileOptionList_1ynju_63", f = "_mobileSortHeader_1ynju_70", L = "_modalAddBody_1ynju_84", W = "_inputWrapper_1ynju_90", g = "_option_1ynju_48", D = "_icon_1ynju_118", T = "_checkBox_1ynju_125", N = "_checkBoxChecked_1ynju_132", A = "_innerCheck_1ynju_139", H = "_sortSelectWrapperTop_1ynju_153", M = "_optionListOnTop_1ynju_156", e = {
|
|
4
4
|
sortSelectWrapper: j,
|
|
5
5
|
selectedOptions: v,
|
|
6
6
|
selectionOptionMini: b,
|
|
@@ -8,63 +8,63 @@ const j = "_sortSelectWrapper_1ynju_1", v = "_selectedOptions_1ynju_10", b = "_s
|
|
|
8
8
|
selectOptionsDisabled: B,
|
|
9
9
|
optionsList: C,
|
|
10
10
|
mobileOptionList: S,
|
|
11
|
-
mobileSortHeader:
|
|
12
|
-
modalAddBody:
|
|
13
|
-
inputWrapper:
|
|
11
|
+
mobileSortHeader: f,
|
|
12
|
+
modalAddBody: L,
|
|
13
|
+
inputWrapper: W,
|
|
14
14
|
option: g,
|
|
15
|
-
icon:
|
|
16
|
-
checkBox:
|
|
15
|
+
icon: D,
|
|
16
|
+
checkBox: T,
|
|
17
17
|
checkBoxChecked: N,
|
|
18
18
|
innerCheck: A,
|
|
19
19
|
sortSelectWrapperTop: H,
|
|
20
20
|
optionListOnTop: M
|
|
21
|
-
},
|
|
21
|
+
}, _ = y.bind(e), q = ({
|
|
22
22
|
selectedOption: n,
|
|
23
|
-
setSelectedOption:
|
|
23
|
+
setSelectedOption: r,
|
|
24
24
|
setIsOpen: l,
|
|
25
|
-
containerRef:
|
|
26
|
-
onBlur:
|
|
27
|
-
onChange:
|
|
25
|
+
containerRef: i,
|
|
26
|
+
onBlur: a,
|
|
27
|
+
onChange: u,
|
|
28
28
|
isDesktop: p,
|
|
29
29
|
placeholder: d
|
|
30
30
|
}) => {
|
|
31
31
|
const h = (o) => (t) => {
|
|
32
32
|
t.stopPropagation();
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
33
|
+
const c = (n == null ? void 0 : n.value) === o.value ? null : o;
|
|
34
|
+
if (c && (r && r(c), u)) {
|
|
35
35
|
const m = {
|
|
36
36
|
...t,
|
|
37
|
-
target: { value:
|
|
37
|
+
target: { value: c }
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
u(m);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
return { handleDocumentClick: (o) => {
|
|
43
|
-
|
|
43
|
+
o.preventDefault(), i.current && !i.current.contains(o.target) && l(!1);
|
|
44
44
|
}, handleBlur: (o) => {
|
|
45
|
-
if (
|
|
45
|
+
if (a) {
|
|
46
46
|
const t = {
|
|
47
47
|
...o,
|
|
48
48
|
target: { value: n }
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
a(t);
|
|
51
51
|
}
|
|
52
52
|
}, getInputValue: () => p ? n ? n.label : d : "", getOption: (o) => /* @__PURE__ */ k(
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
|
-
className:
|
|
55
|
+
className: _(e.option, {
|
|
56
56
|
[e.selected]: (n == null ? void 0 : n.value) === o.value
|
|
57
57
|
}),
|
|
58
58
|
onClick: h(o),
|
|
59
59
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ s("div", { children: o.label }),
|
|
61
|
+
/* @__PURE__ */ s(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
64
|
-
className:
|
|
64
|
+
className: _(e.checkBox, {
|
|
65
65
|
[e.checkBoxChecked]: (n == null ? void 0 : n.value) === o.value
|
|
66
66
|
}),
|
|
67
|
-
children: (n == null ? void 0 : n.value) === o.value && /* @__PURE__ */
|
|
67
|
+
children: (n == null ? void 0 : n.value) === o.value && /* @__PURE__ */ s("div", { className: e.innerCheck })
|
|
68
68
|
}
|
|
69
69
|
)
|
|
70
70
|
]
|