mimir-ui-kit 1.63.0 → 1.64.1
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/assets/styles.css +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +8 -0
- package/dist/components/DatePicker/DatePicker.js +189 -180
- package/dist/components/DatePicker/DatePickerModal.d.ts +2 -1
- package/dist/components/DatePicker/DatePickerModal.js +65 -64
- package/dist/components/DatePicker/MonthPickerModal.d.ts +2 -1
- package/dist/components/DatePicker/MonthPickerModal.js +100 -92
- package/dist/components/DatePicker/YearPickerModal.d.ts +2 -1
- package/dist/components/DatePicker/YearPickerModal.js +90 -82
- package/dist/components/DatePicker/hooks.d.ts +1 -1
- package/dist/components/DatePicker/hooks.js +21 -21
- package/dist/components/UniversalUploader/UniversalUploader.js +73 -72
- package/dist/components/Uploader/Uploader.d.ts +2 -2
- package/dist/components/Uploader/Uploader.js +60 -58
- package/dist/styles.module-DjQdoVeY.js +31 -0
- package/package.json +1 -1
- package/dist/styles.module-DeBRSK_x.js +0 -30
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useDatePickerPosition as
|
|
5
|
-
import { c as
|
|
6
|
-
import { formating as
|
|
7
|
-
import { Button as
|
|
8
|
-
const p = 15,
|
|
9
|
-
date:
|
|
1
|
+
import { jsxs as P, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as v } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import { useState as I } from "react";
|
|
4
|
+
import { useDatePickerPosition as C } from "./hooks.js";
|
|
5
|
+
import { c as r } from "../../styles.module-DjQdoVeY.js";
|
|
6
|
+
import { formating as E } from "../../utils/index.js";
|
|
7
|
+
import { Button as F } from "../Button/Button.js";
|
|
8
|
+
const p = 15, L = 7, Z = ({
|
|
9
|
+
date: S,
|
|
10
10
|
selectedDate: u,
|
|
11
|
-
onChangeValue:
|
|
11
|
+
onChangeValue: _,
|
|
12
12
|
before: Y,
|
|
13
13
|
onChangeType: d,
|
|
14
14
|
onChangeYear: N,
|
|
15
|
-
disableFuture:
|
|
16
|
-
disablePast:
|
|
15
|
+
disableFuture: y = !1,
|
|
16
|
+
disablePast: G = !1,
|
|
17
17
|
disabledDate: o,
|
|
18
18
|
validRange: k,
|
|
19
|
-
position:
|
|
19
|
+
position: M,
|
|
20
|
+
isFixed: h
|
|
20
21
|
}) => {
|
|
21
|
-
const
|
|
22
|
+
const Q = C(M, h), i = new Date(S), l = u ? new Date(u) : i, B = {
|
|
22
23
|
y: l.getFullYear(),
|
|
23
24
|
d: l.getDate(),
|
|
24
25
|
m: l.getMonth() + 1
|
|
@@ -26,93 +27,100 @@ const p = 15, C = 7, X = ({
|
|
|
26
27
|
y: i.getFullYear(),
|
|
27
28
|
d: i.getDate(),
|
|
28
29
|
m: i.getMonth() + 1
|
|
29
|
-
}, [D,
|
|
30
|
-
(t) => t +
|
|
31
|
-
),
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
},
|
|
30
|
+
}, [D, g] = I(e.y), H = D - L, R = Array.from(Array(p).keys()).map(
|
|
31
|
+
(t) => t + H
|
|
32
|
+
), $ = () => {
|
|
33
|
+
g(D + p);
|
|
34
|
+
}, j = () => {
|
|
35
|
+
g(D - p);
|
|
36
|
+
}, x = (t) => {
|
|
36
37
|
const s = (/* @__PURE__ */ new Date()).getFullYear();
|
|
37
38
|
if (k) {
|
|
38
39
|
const [a, w] = k;
|
|
39
|
-
let
|
|
40
|
+
let n;
|
|
40
41
|
if (e.m && e.d)
|
|
41
|
-
|
|
42
|
+
n = new Date(t, e.m - 1, e.d);
|
|
42
43
|
else {
|
|
43
|
-
const
|
|
44
|
-
|
|
44
|
+
const b = /* @__PURE__ */ new Date();
|
|
45
|
+
n = new Date(t, b.getMonth(), b.getDate());
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
+
n.setHours(0, 0, 0, 0);
|
|
47
48
|
const m = new Date(a), f = new Date(w);
|
|
48
|
-
if (m.setHours(0, 0, 0, 0), f.setHours(23, 59, 59, 999),
|
|
49
|
+
if (m.setHours(0, 0, 0, 0), f.setHours(23, 59, 59, 999), n < m || n > f)
|
|
49
50
|
return !0;
|
|
50
51
|
}
|
|
51
|
-
if (Y && Y.getFullYear() > t ||
|
|
52
|
+
if (Y && Y.getFullYear() > t || y && t > s || G && t < s)
|
|
52
53
|
return !0;
|
|
53
54
|
if (o) {
|
|
54
55
|
const a = new Date(t, e.m - 1, e.d);
|
|
55
56
|
if (!o(a)) return !1;
|
|
56
|
-
const w = new Date(t, 2, 15),
|
|
57
|
-
return o(w) && o(
|
|
57
|
+
const w = new Date(t, 2, 15), n = new Date(t, 5, 15), m = new Date(t, 8, 15), f = new Date(t, 11, 15);
|
|
58
|
+
return o(w) && o(n) && o(m) && o(f);
|
|
58
59
|
}
|
|
59
60
|
return !1;
|
|
60
|
-
},
|
|
61
|
-
|
|
61
|
+
}, z = (t) => {
|
|
62
|
+
x(t) || (N ? N(t) : _(
|
|
62
63
|
/* @__PURE__ */ new Date(
|
|
63
|
-
`${t}-${
|
|
64
|
+
`${t}-${E.Number(2, e.m)}-${E.Number(2, e.d)}`
|
|
64
65
|
)
|
|
65
66
|
));
|
|
66
67
|
};
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
68
|
+
return /* @__PURE__ */ P(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: v(r["calendar-block"], h && r.fixed),
|
|
72
|
+
ref: Q,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ P("div", { className: r.h, children: [
|
|
75
|
+
/* @__PURE__ */ c(
|
|
76
|
+
F,
|
|
77
|
+
{
|
|
78
|
+
isIconButton: !0,
|
|
79
|
+
iconName: "DropdownArrowLeft16px",
|
|
80
|
+
onClick: j,
|
|
81
|
+
variant: "secondary-gray",
|
|
82
|
+
size: "l"
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ c(
|
|
86
|
+
"button",
|
|
87
|
+
{
|
|
88
|
+
type: "button",
|
|
89
|
+
onClick: () => d == null ? void 0 : d("years"),
|
|
90
|
+
className: r.d
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ c(
|
|
94
|
+
F,
|
|
95
|
+
{
|
|
96
|
+
isIconButton: !0,
|
|
97
|
+
iconName: "DropdownArrowRight16px",
|
|
98
|
+
onClick: $,
|
|
99
|
+
variant: "secondary-gray",
|
|
100
|
+
size: "l"
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
] }),
|
|
104
|
+
/* @__PURE__ */ c("div", { className: r.monthGrid, "data-testid": "year-picker", children: R.map((t, A) => {
|
|
105
|
+
const s = x(t);
|
|
106
|
+
return /* @__PURE__ */ c(
|
|
107
|
+
"button",
|
|
108
|
+
{
|
|
109
|
+
type: "button",
|
|
110
|
+
onClick: () => z(t),
|
|
111
|
+
disabled: s,
|
|
112
|
+
className: v(s ? r.m : r.a, {
|
|
113
|
+
[r.current]: u && B.y === t
|
|
114
|
+
}),
|
|
115
|
+
children: t
|
|
116
|
+
},
|
|
117
|
+
A
|
|
118
|
+
);
|
|
119
|
+
}) })
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
);
|
|
115
123
|
};
|
|
116
124
|
export {
|
|
117
|
-
|
|
125
|
+
Z as YearPickerModal
|
|
118
126
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DependencyList } from 'react';
|
|
2
2
|
|
|
3
|
-
export declare const useDatePickerPosition: (position?: "center" | "bottom" | "top", deps?: DependencyList) => import('react').RefObject<HTMLDivElement>;
|
|
3
|
+
export declare const useDatePickerPosition: (position?: "center" | "bottom" | "top", isFixed?: boolean, deps?: DependencyList) => import('react').RefObject<HTMLDivElement>;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import { BLOCK_WIDTH as
|
|
3
|
-
const
|
|
4
|
-
const f =
|
|
5
|
-
return
|
|
6
|
-
var c, r,
|
|
7
|
-
const
|
|
1
|
+
import { useRef as w, useEffect as d } from "react";
|
|
2
|
+
import { BLOCK_WIDTH as p, MAX_MOBILE_WIDTH as m } from "./constants.js";
|
|
3
|
+
const W = (n, i, x) => {
|
|
4
|
+
const f = w(null);
|
|
5
|
+
return d(() => {
|
|
6
|
+
var c, r, a;
|
|
7
|
+
const u = window.innerHeight, y = window.innerWidth, t = f.current;
|
|
8
8
|
if (t && t !== null) {
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
if (
|
|
12
|
-
t.style.position = "fixed", t.style.top = `calc(50vh - ${
|
|
9
|
+
const h = ((c = t == null ? void 0 : t.parentElement) == null ? void 0 : c.offsetWidth) ?? 0, l = ((r = t == null ? void 0 : t.parentElement) == null ? void 0 : r.offsetHeight) ?? 0, e = (a = t == null ? void 0 : t.parentElement) == null ? void 0 : a.getBoundingClientRect(), s = t.offsetHeight;
|
|
10
|
+
if (n) {
|
|
11
|
+
if (n === "center") {
|
|
12
|
+
t.style.position = "fixed", t.style.top = `calc(50vh - ${s / 2}px)`, t.style.left = `calc(50vw - ${p / 2}px)`, t.style.opacity = "1";
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
if (
|
|
16
|
-
t.style.top =
|
|
15
|
+
if (n === "bottom") {
|
|
16
|
+
t.style.top = l + "px", t.style.opacity = "1";
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
if (
|
|
20
|
-
t.style.top = -
|
|
19
|
+
if (n === "top") {
|
|
20
|
+
t.style.top = -s + "px", t.style.opacity = "1";
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
} else {
|
|
24
|
-
if (
|
|
25
|
-
const
|
|
26
|
-
|
|
24
|
+
if (y < e.x + p) {
|
|
25
|
+
const o = h - p;
|
|
26
|
+
e.x - Math.abs(o) < 0 ? t.style.left = (o < 0 ? o / 2 : o) + "px" : t.style.left = o + "px";
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
u < e.y + s + l ? e.y - s > 0 ? i ? t.style.top = e.y - s + "px" : t.style.top = -s + "px" : y > m ? i ? t.style.top = e.y + l + "px" : t.style.top = l + "px" : (t.style.position = "fixed", t.style.top = `calc(50vh - ${s / 2}px)`, t.style.left = `calc(50vw - ${p / 2}px)`) : i ? t.style.top = e.y + l + "px" : t.style.top = l + "px", t.style.opacity = "1";
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
}, [
|
|
31
|
+
}, [x, n, i]), f;
|
|
32
32
|
};
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
W as useDatePickerPosition
|
|
35
35
|
};
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as x, jsx as p, Fragment as k } from "react/jsx-runtime";
|
|
2
2
|
import { c as q } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { forwardRef as G, useState as H, useEffect as J, useMemo as K } from "react";
|
|
4
|
-
import { imageTypes as g } from "./constants.js";
|
|
5
4
|
import "../Button/Button.js";
|
|
6
5
|
import { EButtonVariantDefault as Q } from "../Button/constants.js";
|
|
7
6
|
import { ListFiles as W } from "../ListFiles/ListFiles.js";
|
|
8
7
|
import { EFileItemVariant as X } from "../ListFiles/constants.js";
|
|
9
8
|
import { ListPhotos as Y } from "../ListPhotos/ListPhotos.js";
|
|
10
9
|
import { Uploader as Z } from "../Uploader/Uploader.js";
|
|
11
|
-
import '../../assets/UploaderPhotos.css';const
|
|
10
|
+
import '../../assets/UploaderPhotos.css';const g = {
|
|
12
11
|
"upload-file-wrapper": "_upload-file-wrapper_1a115_2"
|
|
13
|
-
},
|
|
14
|
-
(r,
|
|
12
|
+
}, y = (r, d) => "file" in r && r.file instanceof File ? d.includes(r.file.type) : "type" in r && typeof r.type == "string" ? d.includes(r.type) : !1, le = G(
|
|
13
|
+
(r, d) => {
|
|
15
14
|
const {
|
|
16
15
|
type: s,
|
|
17
|
-
filesType:
|
|
18
|
-
arrayName:
|
|
19
|
-
maxSize:
|
|
20
|
-
onChange:
|
|
21
|
-
value:
|
|
22
|
-
maxFiles:
|
|
23
|
-
titleUploader:
|
|
24
|
-
buttonText:
|
|
25
|
-
showOnlyUploadButton:
|
|
26
|
-
uploadButtonVariant:
|
|
27
|
-
buttonSize:
|
|
28
|
-
buttonClassName:
|
|
29
|
-
variantListFiles:
|
|
30
|
-
onMaxFilesExceeded:
|
|
31
|
-
onMaxSizeExceeded:
|
|
32
|
-
onInvalidFileType:
|
|
33
|
-
loadImage:
|
|
34
|
-
isDownloadingImage:
|
|
35
|
-
dataTestIdReactMap:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
filesType: a,
|
|
17
|
+
arrayName: z,
|
|
18
|
+
maxSize: P,
|
|
19
|
+
onChange: l,
|
|
20
|
+
value: f,
|
|
21
|
+
maxFiles: m,
|
|
22
|
+
titleUploader: U,
|
|
23
|
+
buttonText: b = "Выберите файлы",
|
|
24
|
+
showOnlyUploadButton: v = !1,
|
|
25
|
+
uploadButtonVariant: D = Q.SecondaryAsphalt,
|
|
26
|
+
buttonSize: E = "m",
|
|
27
|
+
buttonClassName: S,
|
|
28
|
+
variantListFiles: V = X.white,
|
|
29
|
+
onMaxFilesExceeded: L,
|
|
30
|
+
onMaxSizeExceeded: N,
|
|
31
|
+
onInvalidFileType: B,
|
|
32
|
+
loadImage: _,
|
|
33
|
+
isDownloadingImage: j,
|
|
34
|
+
dataTestIdReactMap: t,
|
|
35
|
+
accept: A
|
|
36
|
+
} = r, [n, u] = H(
|
|
37
|
+
f || []
|
|
38
|
+
), F = !!m && n.length >= m;
|
|
39
39
|
J(() => {
|
|
40
|
-
|
|
41
|
-
}, [
|
|
42
|
-
const C = (
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
f && u(f);
|
|
41
|
+
}, [f]);
|
|
42
|
+
const C = (i) => {
|
|
43
|
+
const o = i.value.map((e) => y(e.file, a) ? new Promise((c) => {
|
|
44
|
+
const h = new FileReader();
|
|
45
|
+
h.onload = () => {
|
|
46
|
+
c({
|
|
47
47
|
id: e.id,
|
|
48
|
-
url:
|
|
48
|
+
url: h.result,
|
|
49
49
|
type: e.file.type,
|
|
50
50
|
name: e.file.name,
|
|
51
51
|
size: e.file.size
|
|
52
52
|
});
|
|
53
|
-
},
|
|
53
|
+
}, h.readAsDataURL(e.file);
|
|
54
54
|
}) : Promise.resolve({
|
|
55
55
|
id: e.id,
|
|
56
56
|
url: "",
|
|
@@ -58,63 +58,64 @@ import '../../assets/UploaderPhotos.css';const w = {
|
|
|
58
58
|
name: e.file.name,
|
|
59
59
|
type: e.file.type
|
|
60
60
|
}));
|
|
61
|
-
Promise.all(
|
|
62
|
-
|
|
61
|
+
Promise.all(o).then((e) => {
|
|
62
|
+
u((c) => [...c, ...e]), l == null || l({ type: "add", data: i.value });
|
|
63
63
|
});
|
|
64
|
-
},
|
|
65
|
-
|
|
64
|
+
}, w = (i) => {
|
|
65
|
+
u((o) => o.filter((e) => e.id !== i)), l == null || l({ type: "delete", data: i });
|
|
66
66
|
}, { photos: I, files: O } = K(() => {
|
|
67
|
-
const
|
|
68
|
-
return s === "all" ? { files:
|
|
69
|
-
}, [a, s]);
|
|
70
|
-
return /* @__PURE__ */
|
|
67
|
+
const i = () => n.filter((e) => !y(e, a)), o = () => n.filter((e) => y(e, a));
|
|
68
|
+
return s === "all" ? { files: i(), photos: o() } : s === "files" ? { photos: [], files: i() } : s === "photos" ? { files: [], photos: o() } : { files: [], photos: [] };
|
|
69
|
+
}, [n, a, s]);
|
|
70
|
+
return /* @__PURE__ */ x(
|
|
71
71
|
"div",
|
|
72
72
|
{
|
|
73
73
|
"data-testid": "universal-uploader",
|
|
74
|
-
"data-testid-react":
|
|
74
|
+
"data-testid-react": t == null ? void 0 : t.wrapper,
|
|
75
75
|
className: q(
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
g["upload-file-wrapper"],
|
|
77
|
+
F && g.disabled
|
|
78
78
|
),
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ p(
|
|
81
81
|
Z,
|
|
82
82
|
{
|
|
83
|
-
dataTestIdReactMap: { wrapper:
|
|
84
|
-
filesType:
|
|
85
|
-
arrayName:
|
|
86
|
-
maxSize:
|
|
83
|
+
dataTestIdReactMap: { wrapper: t == null ? void 0 : t.uploader },
|
|
84
|
+
filesType: a,
|
|
85
|
+
arrayName: z,
|
|
86
|
+
maxSize: P,
|
|
87
87
|
onChangeValue: C,
|
|
88
|
-
ref:
|
|
89
|
-
maxFiles:
|
|
90
|
-
isDisabled:
|
|
91
|
-
titleUploader:
|
|
92
|
-
showOnlyUploadButton:
|
|
93
|
-
buttonText:
|
|
94
|
-
uploadButtonVariant:
|
|
95
|
-
buttonSize:
|
|
96
|
-
buttonClassName:
|
|
97
|
-
onMaxFilesExceeded:
|
|
98
|
-
onMaxSizeExceeded:
|
|
99
|
-
onInvalidFileType:
|
|
88
|
+
ref: d,
|
|
89
|
+
maxFiles: m && m - n.length,
|
|
90
|
+
isDisabled: F,
|
|
91
|
+
titleUploader: U,
|
|
92
|
+
showOnlyUploadButton: v,
|
|
93
|
+
buttonText: b,
|
|
94
|
+
uploadButtonVariant: D,
|
|
95
|
+
buttonSize: E,
|
|
96
|
+
buttonClassName: S,
|
|
97
|
+
onMaxFilesExceeded: L,
|
|
98
|
+
onMaxSizeExceeded: N,
|
|
99
|
+
onInvalidFileType: B,
|
|
100
|
+
accept: A
|
|
100
101
|
}
|
|
101
102
|
),
|
|
102
|
-
!
|
|
103
|
-
(s === "files" || s === "all") && /* @__PURE__ */
|
|
103
|
+
!v && /* @__PURE__ */ x(k, { children: [
|
|
104
|
+
(s === "files" || s === "all") && /* @__PURE__ */ p("div", { "data-testid-react": t == null ? void 0 : t.listFiles, children: /* @__PURE__ */ p(
|
|
104
105
|
W,
|
|
105
106
|
{
|
|
106
107
|
value: O,
|
|
107
|
-
onChange: (
|
|
108
|
-
variant:
|
|
108
|
+
onChange: (i) => w(i.deleteId),
|
|
109
|
+
variant: V
|
|
109
110
|
}
|
|
110
111
|
) }),
|
|
111
|
-
(s === "photos" || s === "all") && /* @__PURE__ */
|
|
112
|
+
(s === "photos" || s === "all") && /* @__PURE__ */ p("div", { "data-testid-react": t == null ? void 0 : t.listPhotos, children: /* @__PURE__ */ p(
|
|
112
113
|
Y,
|
|
113
114
|
{
|
|
114
115
|
value: I,
|
|
115
|
-
onChange: (
|
|
116
|
-
loadImage:
|
|
117
|
-
isDownloadingImage:
|
|
116
|
+
onChange: (i) => w(i.deleteId),
|
|
117
|
+
loadImage: _,
|
|
118
|
+
isDownloadingImage: j
|
|
118
119
|
}
|
|
119
120
|
) })
|
|
120
121
|
] })
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { imageTypesArr } from './constants';
|
|
3
2
|
import { TDataTestIdReactMap } from '../../types';
|
|
4
3
|
import { EButtonSize } from '../Button';
|
|
5
4
|
import { TButtonDefaultFormProps } from '../Button/types';
|
|
@@ -9,7 +8,7 @@ export type TUploader = {
|
|
|
9
8
|
* Массив разрешенных типов файлов для настройки валидации
|
|
10
9
|
* 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'heic' | 'doc' | 'xls' | 'pdf' | 'docx' | 'txt' | 'xlsx'
|
|
11
10
|
*/
|
|
12
|
-
filesType:
|
|
11
|
+
filesType: string[];
|
|
13
12
|
/**
|
|
14
13
|
* Наименование передаваемого массива файлов
|
|
15
14
|
*/
|
|
@@ -70,6 +69,7 @@ export type TUploader = {
|
|
|
70
69
|
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
71
70
|
*/
|
|
72
71
|
dataTestIdReactMap?: TDataTestIdReactMap<'wrapper' | 'input' | 'label' | 'button' | 'buttonIcon' | 'title' | 'description'>;
|
|
72
|
+
accept?: Record<string, string>;
|
|
73
73
|
};
|
|
74
74
|
export type TUploadValue = {
|
|
75
75
|
value: TFileItem[];
|