mimir-ui-kit 1.65.5 → 1.65.7
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/components/AnchorLink/Link.js +18 -18
- package/dist/components/OtpInput/OtpInput.d.ts +4 -0
- package/dist/components/OtpInput/OtpInput.js +44 -37
- package/dist/components/OtpInput/utils.d.ts +2 -0
- package/dist/components/OtpInput/utils.js +9 -0
- package/dist/components/Slider/Slider.d.ts +5 -1
- package/dist/components/Slider/Slider.js +100 -99
- package/dist/components/UploaderFiles/UploaderFiles.js +33 -31
- package/dist/components/UploaderFiles/types.d.ts +1 -0
- package/dist/components/UploaderPhotos/UploaderPhotos.d.ts +1 -0
- package/dist/components/UploaderPhotos/UploaderPhotos.js +32 -30
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/16px/Like16px.js +30 -0
- package/dist/icons/components/index.js +400 -399
- package/dist/{index-CQCTAWGm.js → index-BBLWWBmN.js} +1115 -1109
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as k, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { c as q } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import { forwardRef as A, useState as B, useEffect as C } from "react";
|
|
4
4
|
import { EUploaderFilesVariant as F } from "./constants.js";
|
|
5
|
-
import { useMediaQuery as
|
|
6
|
-
import { EMediaQuery as
|
|
7
|
-
import { ListFiles as
|
|
5
|
+
import { useMediaQuery as G } from "../../hooks/useMediaQuery/useMediaQuery.js";
|
|
6
|
+
import { EMediaQuery as H } from "../../hooks/useMediaQuery/constants.js";
|
|
7
|
+
import { ListFiles as I } from "../ListFiles/ListFiles.js";
|
|
8
8
|
import { EFileItemVariant as w } from "../ListFiles/constants.js";
|
|
9
|
-
import { Uploader as
|
|
10
|
-
import '../../assets/UploaderFiles.css';const
|
|
11
|
-
container:
|
|
12
|
-
white:
|
|
13
|
-
gray:
|
|
14
|
-
compact:
|
|
15
|
-
},
|
|
9
|
+
import { Uploader as J } from "../Uploader/Uploader.js";
|
|
10
|
+
import '../../assets/UploaderFiles.css';const K = "_container_aj93w_2", O = "_white_aj93w_11", P = "_gray_aj93w_14", Y = "_compact_aj93w_17", n = {
|
|
11
|
+
container: K,
|
|
12
|
+
white: O,
|
|
13
|
+
gray: P,
|
|
14
|
+
compact: Y
|
|
15
|
+
}, ti = A(
|
|
16
16
|
(x, _) => {
|
|
17
17
|
const {
|
|
18
18
|
compact: h,
|
|
@@ -30,13 +30,14 @@ import '../../assets/UploaderFiles.css';const J = "_container_aj93w_2", K = "_wh
|
|
|
30
30
|
onMaxFilesExceeded: g,
|
|
31
31
|
onMaxSizeExceeded: z,
|
|
32
32
|
onInvalidFileType: N,
|
|
33
|
-
dataTestIdReactMap: a
|
|
34
|
-
|
|
35
|
-
B(
|
|
33
|
+
dataTestIdReactMap: a,
|
|
34
|
+
accept: V
|
|
35
|
+
} = x, U = G(H.XSS), [e, c] = B(r || []), D = t && e.length >= t, M = m === F.White ? w.gray : w.white;
|
|
36
|
+
C(() => {
|
|
36
37
|
r && c(r);
|
|
37
38
|
}, [r]);
|
|
38
|
-
const
|
|
39
|
-
const
|
|
39
|
+
const Q = (o) => {
|
|
40
|
+
const X = [
|
|
40
41
|
...e,
|
|
41
42
|
...o.value.map((i) => {
|
|
42
43
|
var f, y, u;
|
|
@@ -49,33 +50,34 @@ import '../../assets/UploaderFiles.css';const J = "_container_aj93w_2", K = "_wh
|
|
|
49
50
|
};
|
|
50
51
|
})
|
|
51
52
|
];
|
|
52
|
-
c(
|
|
53
|
-
},
|
|
53
|
+
c(X), s == null || s({ type: "add", data: o.value, name: p });
|
|
54
|
+
}, W = (o) => {
|
|
54
55
|
c(o.list), o.deleteId && (s == null || s({ type: "delete", data: o.deleteId, name: p }));
|
|
55
|
-
},
|
|
56
|
+
}, L = q([
|
|
56
57
|
n.container,
|
|
57
58
|
n[m],
|
|
58
59
|
h && n.compact,
|
|
59
60
|
b
|
|
60
61
|
]);
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ k(
|
|
62
63
|
"div",
|
|
63
64
|
{
|
|
64
65
|
"data-testid-react": a == null ? void 0 : a.wrapper,
|
|
65
|
-
className:
|
|
66
|
+
className: L,
|
|
66
67
|
children: [
|
|
67
68
|
/* @__PURE__ */ l(
|
|
68
|
-
|
|
69
|
+
J,
|
|
69
70
|
{
|
|
70
71
|
dataTestIdReactMap: { wrapper: a == null ? void 0 : a.uploader },
|
|
71
72
|
filesType: S,
|
|
72
73
|
arrayName: j,
|
|
74
|
+
accept: V,
|
|
73
75
|
maxSize: v,
|
|
74
|
-
onChangeValue:
|
|
76
|
+
onChangeValue: Q,
|
|
75
77
|
ref: _,
|
|
76
|
-
buttonSize:
|
|
78
|
+
buttonSize: U ? "s" : "m",
|
|
77
79
|
maxFiles: t && t - e.length,
|
|
78
|
-
isDisabled:
|
|
80
|
+
isDisabled: D || d,
|
|
79
81
|
buttonText: E,
|
|
80
82
|
onMaxFilesExceeded: g,
|
|
81
83
|
onMaxSizeExceeded: z,
|
|
@@ -83,11 +85,11 @@ import '../../assets/UploaderFiles.css';const J = "_container_aj93w_2", K = "_wh
|
|
|
83
85
|
}
|
|
84
86
|
),
|
|
85
87
|
/* @__PURE__ */ l("div", { "data-testid-react": a == null ? void 0 : a.listFiles, children: /* @__PURE__ */ l(
|
|
86
|
-
|
|
88
|
+
I,
|
|
87
89
|
{
|
|
88
90
|
value: e,
|
|
89
|
-
variant:
|
|
90
|
-
onChange:
|
|
91
|
+
variant: M,
|
|
92
|
+
onChange: W,
|
|
91
93
|
disabled: d
|
|
92
94
|
}
|
|
93
95
|
) })
|
|
@@ -97,5 +99,5 @@ import '../../assets/UploaderFiles.css';const J = "_container_aj93w_2", K = "_wh
|
|
|
97
99
|
}
|
|
98
100
|
);
|
|
99
101
|
export {
|
|
100
|
-
|
|
102
|
+
ti as UploaderFiles
|
|
101
103
|
};
|
|
@@ -72,6 +72,7 @@ export type TUploaderFiles = {
|
|
|
72
72
|
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
73
73
|
*/
|
|
74
74
|
dataTestIdReactMap?: TDataTestIdReactMap<'wrapper' | 'uploader' | 'listFiles'>;
|
|
75
|
+
accept?: Record<string, string>;
|
|
75
76
|
};
|
|
76
77
|
export type TOnChangeFilesUpdate = {
|
|
77
78
|
type: string;
|
|
@@ -65,6 +65,7 @@ export type TUploaderPhotos = {
|
|
|
65
65
|
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
66
66
|
*/
|
|
67
67
|
dataTestIdReactMap?: TDataTestIdReactMap<'wrapper' | 'uploader' | 'listPhotos'>;
|
|
68
|
+
accept?: Record<string, string>;
|
|
68
69
|
};
|
|
69
70
|
export type TOnChangePhotosUpdate = {
|
|
70
71
|
type: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { ListPhotos as
|
|
5
|
-
import { Uploader as
|
|
6
|
-
import '../../assets/UploaderPhotos.css';const
|
|
1
|
+
import { jsxs as N, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { c as S } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import { forwardRef as _, useState as z, useEffect as j } from "react";
|
|
4
|
+
import { ListPhotos as I } from "../ListPhotos/ListPhotos.js";
|
|
5
|
+
import { Uploader as O } from "../Uploader/Uploader.js";
|
|
6
|
+
import '../../assets/UploaderPhotos.css';const c = {
|
|
7
7
|
"upload-file-wrapper": "_upload-file-wrapper_1a115_2"
|
|
8
|
-
},
|
|
9
|
-
(
|
|
8
|
+
}, G = _(
|
|
9
|
+
(m, f) => {
|
|
10
10
|
const {
|
|
11
11
|
filesType: u,
|
|
12
12
|
arrayName: x,
|
|
@@ -22,42 +22,44 @@ import '../../assets/UploaderPhotos.css';const m = {
|
|
|
22
22
|
onInvalidFileType: F,
|
|
23
23
|
loadImage: P,
|
|
24
24
|
isDownloadingImage: U,
|
|
25
|
-
dataTestIdReactMap: e
|
|
26
|
-
|
|
27
|
-
z(
|
|
25
|
+
dataTestIdReactMap: e,
|
|
26
|
+
accept: b
|
|
27
|
+
} = m, [l, i] = z(a || []), p = l.length >= r;
|
|
28
|
+
j(() => {
|
|
28
29
|
a && i(a);
|
|
29
30
|
}, [a]);
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
...
|
|
33
|
-
...
|
|
31
|
+
const D = (t) => {
|
|
32
|
+
const L = [
|
|
33
|
+
...l,
|
|
34
|
+
...t.value.map((n) => ({
|
|
34
35
|
url: URL.createObjectURL(n.file),
|
|
35
36
|
id: n.id
|
|
36
37
|
}))
|
|
37
38
|
];
|
|
38
|
-
i(
|
|
39
|
-
},
|
|
40
|
-
i(
|
|
39
|
+
i(L), o == null || o({ type: "add", data: t.value, name: d });
|
|
40
|
+
}, E = (t) => {
|
|
41
|
+
i(t.list), t.deleteId && (o == null || o({ type: "delete", data: t.deleteId, name: d }));
|
|
41
42
|
};
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ N(
|
|
43
44
|
"div",
|
|
44
45
|
{
|
|
45
|
-
className:
|
|
46
|
-
|
|
47
|
-
p &&
|
|
46
|
+
className: S(
|
|
47
|
+
c["upload-file-wrapper"],
|
|
48
|
+
p && c.disabled
|
|
48
49
|
),
|
|
49
50
|
"data-testid-react": e == null ? void 0 : e.wrapper,
|
|
50
51
|
children: [
|
|
51
52
|
/* @__PURE__ */ s(
|
|
52
|
-
|
|
53
|
+
O,
|
|
53
54
|
{
|
|
54
55
|
dataTestIdReactMap: { wrapper: e == null ? void 0 : e.uploader },
|
|
55
56
|
filesType: u,
|
|
56
57
|
arrayName: x,
|
|
57
58
|
maxSize: h,
|
|
58
|
-
|
|
59
|
+
accept: b,
|
|
60
|
+
onChangeValue: D,
|
|
59
61
|
ref: f,
|
|
60
|
-
maxFiles: r -
|
|
62
|
+
maxFiles: r - l.length,
|
|
61
63
|
isDisabled: p,
|
|
62
64
|
titleUploader: w,
|
|
63
65
|
buttonText: v,
|
|
@@ -66,11 +68,11 @@ import '../../assets/UploaderPhotos.css';const m = {
|
|
|
66
68
|
onInvalidFileType: F
|
|
67
69
|
}
|
|
68
70
|
),
|
|
69
|
-
!!
|
|
70
|
-
|
|
71
|
+
!!l.length && /* @__PURE__ */ s("div", { "data-testid-react": e == null ? void 0 : e.listPhotos, children: /* @__PURE__ */ s(
|
|
72
|
+
I,
|
|
71
73
|
{
|
|
72
|
-
value:
|
|
73
|
-
onChange:
|
|
74
|
+
value: l,
|
|
75
|
+
onChange: E,
|
|
74
76
|
loadImage: P,
|
|
75
77
|
isDownloadingImage: U
|
|
76
78
|
}
|
|
@@ -81,5 +83,5 @@ import '../../assets/UploaderPhotos.css';const m = {
|
|
|
81
83
|
}
|
|
82
84
|
);
|
|
83
85
|
export {
|
|
84
|
-
|
|
86
|
+
G as UploaderPhotos
|
|
85
87
|
};
|
package/dist/icons/Icon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense as s } from "react";
|
|
3
|
-
import { i as e } from "../index-
|
|
3
|
+
import { i as e } from "../index-BBLWWBmN.js";
|
|
4
4
|
const p = ({ iconName: o, ...n }) => {
|
|
5
5
|
const r = e[o];
|
|
6
6
|
return r ? /* @__PURE__ */ t(s, { fallback: null, children: /* @__PURE__ */ t(r, { ...n, "data-testid": o }) }) : null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as t, jsx as C } from "react/jsx-runtime";
|
|
2
|
+
const e = (r) => /* @__PURE__ */ t(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
width: "16px",
|
|
6
|
+
height: "16px",
|
|
7
|
+
viewBox: "0 0 16 16",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
...r,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ C(
|
|
12
|
+
"path",
|
|
13
|
+
{
|
|
14
|
+
d: "M5.59375 12.3271V5.55376C5.59375 5.2871 5.67375 5.0271 5.82042 4.8071L7.6404 2.10043C7.92707 1.6671 8.6404 1.36043 9.24707 1.5871C9.9004 1.8071 10.3337 2.54043 10.1937 3.19376L9.84707 5.37376C9.8204 5.57376 9.87374 5.75376 9.98707 5.89376C10.1004 6.02043 10.2671 6.10043 10.4471 6.10043H13.1871C13.7137 6.10043 14.1671 6.31376 14.4337 6.68709C14.6871 7.04709 14.7337 7.51376 14.5671 7.98709L12.9271 12.9804C12.7204 13.8071 11.8204 14.4804 10.9271 14.4804H8.32707C7.8804 14.4804 7.25374 14.3271 6.96707 14.0404L6.11375 13.3804C5.78708 13.1338 5.59375 12.7404 5.59375 12.3271Z",
|
|
15
|
+
fill: "currentColor"
|
|
16
|
+
}
|
|
17
|
+
),
|
|
18
|
+
/* @__PURE__ */ C(
|
|
19
|
+
"path",
|
|
20
|
+
{
|
|
21
|
+
d: "M3.4735 4.25256H2.78683C1.7535 4.25256 1.3335 4.65256 1.3335 5.63923V12.3459C1.3335 13.3326 1.7535 13.7326 2.78683 13.7326H3.4735C4.50683 13.7326 4.92683 13.3326 4.92683 12.3459V5.63923C4.92683 4.65256 4.50683 4.25256 3.4735 4.25256Z",
|
|
22
|
+
fill: "currentColor"
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
export {
|
|
29
|
+
e as default
|
|
30
|
+
};
|