mimir-ui-kit 1.37.2 → 1.37.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/styles.css +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +4 -4
- package/dist/components/DatePicker/DatePicker.js +102 -99
- package/dist/components/DatePicker/DatePickerModal.js +1 -1
- package/dist/components/DatePicker/MonthPickerModal.js +1 -1
- package/dist/components/DatePicker/YearPickerModal.js +1 -1
- package/dist/components/UniversalUploader/UniversalUploader.d.ts +2 -0
- package/dist/components/UniversalUploader/UniversalUploader.js +54 -51
- package/dist/components/UniversalUploader/types.d.ts +2 -0
- package/dist/styles.module-CPvzaOtD.js +27 -0
- package/package.json +1 -1
- package/dist/styles.module-B3xL6-zc.js +0 -25
package/dist/assets/styles.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._input-field-group-datePicker_97gw7_2{display:flex;flex-direction:column;gap:var(--mimir-space-2xs)}._input-field-group-datePicker_97gw7_2 ._textError_97gw7_7{font-family:var(--mimir-font-inter);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-s);line-height:var(--mimir-size-text-m);text-align:left;color:var(--gos-znak-diplomatic-background-color)}._input_97gw7_2{padding-right:var(--mimir-space-3xl)}._input-wrapper_97gw7_20{flex:1}._date-wrapper_97gw7_24{position:relative;width:100%}._date-wrapper_97gw7_24 ._inputBorderControl_97gw7_28{border:transparent}._date-wrapper_97gw7_24:hover ._input-wrapper_97gw7_20{background-color:var(--input-bg-color-hover)}._date-wrapper_97gw7_24:before{position:absolute;top:0;right:45px;bottom:0;left:0;z-index:3;cursor:pointer;content:""}._date-wrapper_97gw7_24._editable_97gw7_41:before{display:none}._date-wrapper_97gw7_24 svg{cursor:pointer}[data-disabled=true] ._date-wrapper_97gw7_24:before{cursor:auto}[data-disabled=true] ._date-wrapper_97gw7_24 ._input-wrapper_97gw7_20{background:var(--black-20)}[data-disabled=true] ._date-wrapper_97gw7_24 ._input-wrapper_97gw7_20 label,[data-disabled=true] ._date-wrapper_97gw7_24 ._input-wrapper_97gw7_20 input{color:var(--white)}[data-disabled=true] ._button-wrapper_97gw7_58 svg{color:var(--white);cursor:default;fill:var(--white)}._wrapper_97gw7_64{--border-color: var(--citrine-100);position:relative;display:flex;align-items:center;border-radius:var(--mimir-control-radius-s)}._wrapper_97gw7_64:has([data-error=true]){--border-color: var(--error-normal)}._wrapper_97gw7_64._active_97gw7_74{border-bottom:1px solid var(--border-color)}._button-wrapper_97gw7_58{position:absolute;top:0;right:0;z-index:2;display:flex;justify-content:center;width:44px;height:100%;max-height:var(--button-height-xxl)}._button_97gw7_58{align-self:center;background-color:transparent;border-radius:var(--mimir-control-radius-s)}._calendar-block_97gw7_96{position:absolute;z-index:var(--mimir-zindex-dropdown);display:flex;flex-direction:column;width:368px;max-height:none;padding:var(--mimir-space-m);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-l);font-family:var(--mimir-font-inter);line-height:var(--mimir-line-height-text-2xs);text-align:center;text-overflow:ellipsis;background:var(--white);border-radius:var(--mimir-control-radius-s);box-shadow:0 0 #16172705,0 2px 4px #16172705,0 6px 6px #16172705,0 15px 9px #16172703;opacity:0;transition:height .5s ease-in;font-feature-settings:"zero";font-variant-numeric:slashed-zero}._calendar-block_97gw7_96 ._h_97gw7_118{display:flex;width:100%;color:var(--black-100)}._calendar-block_97gw7_96 ._b_97gw7_58{display:grid;grid-template-columns:repeat(7,1fr)}._calendar-block_97gw7_96 ._d_97gw7_24{display:flex;flex:1;gap:var(--mimir-space-2xs);align-items:center;justify-content:center;color:var(--black-100);font-size:var(--mimir-size-text-l);cursor:pointer}._calendar-block_97gw7_96 ._m_97gw7_140,._calendar-block_97gw7_96 ._a_97gw7_74,._calendar-block_97gw7_96 ._prev_97gw7_142{width:auto;height:48px;overflow:hidden}._calendar-block_97gw7_96 ._m_97gw7_140{display:flex;align-items:center;justify-content:center;color:var(--disabled);font-size:var(--mimir-size-text-l)}._calendar-block_97gw7_96 ._orange_97gw7_156{color:var(--citrine-100)}._calendar-block_97gw7_96 ._a_97gw7_74{color:var(--black-100);font-size:var(--mimir-size-text-l);border-radius:var(--mimir-control-radius-s)}._calendar-block_97gw7_96 ._a_97gw7_74:hover{background:var(--black-10)}._calendar-block_97gw7_96 ._a_97gw7_74:active{color:var(--white);background:var(--sapphire-100)}._calendar-block_97gw7_96 ._current_97gw7_173{background:var(--sapphire-10);border-radius:var(--mimir-control-radius-s)}._calendar-block_97gw7_96 ._monthGrid_97gw7_178{display:grid;grid-template-columns:repeat(3,1fr)}._icon-button_97gw7_183{display:flex}
|
@@ -30,9 +30,9 @@ export type TProps = {
|
|
30
30
|
*/
|
31
31
|
disabled?: boolean;
|
32
32
|
/**
|
33
|
-
* Флаг наличия ошибки
|
33
|
+
* Флаг наличия ошибки или текст ошибки
|
34
34
|
*/
|
35
|
-
error?: boolean;
|
35
|
+
error?: boolean | string;
|
36
36
|
/**
|
37
37
|
* Флаг немедленной валидации при вводе
|
38
38
|
*/
|
@@ -84,9 +84,9 @@ export declare const DatePicker: import('react').MemoExoticComponent<import('rea
|
|
84
84
|
*/
|
85
85
|
disabled?: boolean;
|
86
86
|
/**
|
87
|
-
* Флаг наличия ошибки
|
87
|
+
* Флаг наличия ошибки или текст ошибки
|
88
88
|
*/
|
89
|
-
error?: boolean;
|
89
|
+
error?: boolean | string;
|
90
90
|
/**
|
91
91
|
* Флаг немедленной валидации при вводе
|
92
92
|
*/
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
1
|
+
import { jsxs as H, jsx as a } from "react/jsx-runtime";
|
2
|
+
import { c as _ } from "../../index-DIxK0V-G.js";
|
3
3
|
import { memo as V, forwardRef as tt, useState as w, useEffect as T } from "react";
|
4
4
|
import { MAX_DAY as st, MAX_MONTH as et, DATE_LENGTH as it } from "./constants.js";
|
5
|
-
import { DatePickerModal as
|
6
|
-
import { MonthPickerModal as
|
7
|
-
import { c as
|
5
|
+
import { DatePickerModal as rt } from "./DatePickerModal.js";
|
6
|
+
import { MonthPickerModal as ot } from "./MonthPickerModal.js";
|
7
|
+
import { c as e } from "../../styles.module-CPvzaOtD.js";
|
8
8
|
import { formatDatePart as L } from "./utils.js";
|
9
9
|
import { YearPickerModal as at } from "./YearPickerModal.js";
|
10
10
|
import { useClickOutside as ct } from "../../hooks/useClickOutside/useClickOutside.js";
|
@@ -13,137 +13,140 @@ import { formating as y } from "../../utils/index.js";
|
|
13
13
|
import { I as mt } from "../../Input-BYrIS5GU.js";
|
14
14
|
import { EInputStatus as pt, EInputSize as U } from "../Input/constants.js";
|
15
15
|
const dt = {
|
16
|
-
days:
|
17
|
-
months:
|
16
|
+
days: rt,
|
17
|
+
months: ot,
|
18
18
|
years: at
|
19
19
|
}, ft = V(
|
20
20
|
tt(
|
21
21
|
({
|
22
|
-
size:
|
23
|
-
value:
|
22
|
+
size: M,
|
23
|
+
value: i,
|
24
24
|
onChangeValue: s,
|
25
|
-
name:
|
26
|
-
before:
|
25
|
+
name: c,
|
26
|
+
before: v,
|
27
27
|
type: p = "days",
|
28
|
-
error:
|
28
|
+
error: x,
|
29
29
|
onError: d,
|
30
|
-
onBlur:
|
31
|
-
validateImmediately:
|
30
|
+
onBlur: r,
|
31
|
+
validateImmediately: b,
|
32
32
|
variant: X,
|
33
|
-
disabled:
|
33
|
+
disabled: S = !1,
|
34
34
|
editable: D = !1,
|
35
35
|
openOnInput: j = !0,
|
36
|
-
...
|
36
|
+
...E
|
37
37
|
}, F) => {
|
38
|
-
const [
|
39
|
-
() =>
|
40
|
-
), [
|
38
|
+
const [l, m] = w(!1), [g, f] = w(p), [o, k] = w(
|
39
|
+
() => i && !isNaN(new Date(i).getTime()) ? new Date(i) : void 0
|
40
|
+
), [n, h] = w(x), [G, A] = w("");
|
41
41
|
T(() => {
|
42
|
-
|
43
|
-
}, [
|
44
|
-
|
45
|
-
|
42
|
+
h(x);
|
43
|
+
}, [x]), T(() => {
|
44
|
+
k(
|
45
|
+
i && !isNaN(new Date(i).getTime()) ? new Date(i) : void 0
|
46
46
|
);
|
47
|
-
}, [
|
48
|
-
|
49
|
-
}, [
|
50
|
-
const
|
47
|
+
}, [i]), T(() => {
|
48
|
+
o && typeof o != "string" && !isNaN(o == null ? void 0 : o.getTime()) ? A(y.Date(o, "dd/mm/yyyy")) : A("");
|
49
|
+
}, [o]);
|
50
|
+
const u = i && new Date(i).getTime;
|
51
51
|
T(() => {
|
52
|
-
|
53
|
-
}, [
|
54
|
-
isActive:
|
52
|
+
b && (u ? (h(!1), d == null || d({ name: c, active: !1 })) : (h(!0), d == null || d({ name: c, active: !0 })));
|
53
|
+
}, [b, c, u]), ct({
|
54
|
+
isActive: l,
|
55
55
|
setActive: (t) => {
|
56
|
-
|
56
|
+
m(t), f(p);
|
57
57
|
},
|
58
|
-
className:
|
58
|
+
className: e["calendar-block"]
|
59
59
|
});
|
60
60
|
const K = () => {
|
61
|
-
!
|
61
|
+
!S && (j || !D) && m(!0);
|
62
62
|
}, W = (t) => {
|
63
|
-
isNaN(t.getTime()) || (
|
63
|
+
isNaN(t.getTime()) || (k(t), s == null || s({
|
64
64
|
value: y.Date(t, "yyyy-mm-dd"),
|
65
|
-
name:
|
66
|
-
})),
|
65
|
+
name: c
|
66
|
+
})), g === "years" && (p === "years" ? (m(!1), f(p)) : f("months")), g === "months" && (p === "months" ? (m(!1), f(p)) : f("days")), k(t), s == null || s({
|
67
67
|
value: y.Date(t, "yyyy-mm-dd"),
|
68
|
-
name:
|
69
|
-
}),
|
68
|
+
name: c
|
69
|
+
}), r == null || r(y.Date(t, "yyyy-mm-dd"));
|
70
70
|
}, q = (t) => {
|
71
71
|
if (D) {
|
72
|
-
const
|
73
|
-
if (
|
74
|
-
|
72
|
+
const N = t.target.value.replace(/[^\d]/g, "");
|
73
|
+
if (N.length === 0)
|
74
|
+
A(""), s == null || s({ value: "", name: c }), r == null || r("");
|
75
75
|
else {
|
76
|
-
const [
|
77
|
-
L(
|
78
|
-
L(
|
79
|
-
|
80
|
-
],
|
81
|
-
if (
|
82
|
-
const
|
83
|
-
`${
|
76
|
+
const [I, O, Y] = [
|
77
|
+
L(N.substring(0, 2), st),
|
78
|
+
L(N.substring(2, 4), et),
|
79
|
+
N.substring(4, 8)
|
80
|
+
], $ = [I, O, Y].filter(Boolean).join("/");
|
81
|
+
if (A($), $.length === it) {
|
82
|
+
const B = parseInt(Y), P = /* @__PURE__ */ new Date(
|
83
|
+
`${B}-${O.padStart(2, "0")}-${I.padStart(2, "0")}`
|
84
84
|
);
|
85
|
-
isNaN(
|
86
|
-
value: y.Date(
|
87
|
-
name:
|
88
|
-
}),
|
85
|
+
isNaN(P.getTime()) || (k(P), s == null || s({
|
86
|
+
value: y.Date(P, "yyyy-mm-dd"),
|
87
|
+
name: c
|
88
|
+
}), r == null || r(y.Date(P, "yyyy-mm-dd")));
|
89
89
|
}
|
90
90
|
}
|
91
91
|
}
|
92
|
-
},
|
92
|
+
}, J = _(e.wrapper, l && e.active), Q = _(e.input, e.inputBorderControl), Z = {
|
93
93
|
onChangeValue: W,
|
94
|
-
date:
|
95
|
-
before: typeof
|
94
|
+
date: o || /* @__PURE__ */ new Date(),
|
95
|
+
before: typeof v == "string" ? new Date(v) : v,
|
96
96
|
onChangeType: f,
|
97
|
-
setIsActive:
|
98
|
-
},
|
99
|
-
|
100
|
-
}, className:
|
97
|
+
setIsActive: m
|
98
|
+
}, z = dt[g], C = ({ isActive: t }) => /* @__PURE__ */ a("button", { onClick: (I) => {
|
99
|
+
I.stopPropagation(), S || m(!t);
|
100
|
+
}, className: e["icon-button"], children: t ? /* @__PURE__ */ a(
|
101
101
|
R,
|
102
102
|
{
|
103
|
-
iconName:
|
103
|
+
iconName: M === U.S ? "DropdownArrowUp16px" : "DropdownArrowUp24px"
|
104
104
|
}
|
105
|
-
) : /* @__PURE__ */
|
105
|
+
) : /* @__PURE__ */ a(
|
106
106
|
R,
|
107
107
|
{
|
108
|
-
iconName:
|
108
|
+
iconName: M === U.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px"
|
109
109
|
}
|
110
110
|
) });
|
111
|
-
return /* @__PURE__ */
|
112
|
-
/* @__PURE__ */
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
[
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
111
|
+
return /* @__PURE__ */ H("div", { className: e["input-field-group-datePicker"], children: [
|
112
|
+
/* @__PURE__ */ H("div", { className: J, "data-disabled": S, children: [
|
113
|
+
/* @__PURE__ */ a(
|
114
|
+
"div",
|
115
|
+
{
|
116
|
+
role: "button",
|
117
|
+
"data-error": n,
|
118
|
+
className: _(e["date-wrapper"], {
|
119
|
+
[e.editable]: D
|
120
|
+
}),
|
121
|
+
onClick: K,
|
122
|
+
children: /* @__PURE__ */ a(
|
123
|
+
mt,
|
124
|
+
{
|
125
|
+
ref: F,
|
126
|
+
className: Q,
|
127
|
+
wrapperClassName: e["input-wrapper"],
|
128
|
+
size: M,
|
129
|
+
type: "text",
|
130
|
+
variant: X,
|
131
|
+
status: n ? pt.Error : void 0,
|
132
|
+
value: G,
|
133
|
+
onChange: q,
|
134
|
+
rightAddon: {
|
135
|
+
addonType: "react-node",
|
136
|
+
addonContent: /* @__PURE__ */ a(C, { isActive: l })
|
137
|
+
},
|
138
|
+
onFocus: () => {
|
139
|
+
j && !D && m(!0);
|
140
|
+
},
|
141
|
+
"data-error": n,
|
142
|
+
...E
|
143
|
+
}
|
144
|
+
)
|
145
|
+
}
|
146
|
+
),
|
147
|
+
l && /* @__PURE__ */ a(z, { ...Z })
|
148
|
+
] }),
|
149
|
+
n && typeof n == "string" && /* @__PURE__ */ a("div", { className: e.textError, children: n })
|
147
150
|
] });
|
148
151
|
}
|
149
152
|
)
|
@@ -3,7 +3,7 @@ import { c as x } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { useState as O } from "react";
|
4
4
|
import { week as Y, COUNT_WORK_DAYS as j } from "./constants.js";
|
5
5
|
import { useDatePickerPosition as z } from "./hooks.js";
|
6
|
-
import { c as o } from "../../styles.module-
|
6
|
+
import { c as o } from "../../styles.module-CPvzaOtD.js";
|
7
7
|
import { getUpdateDate as M } from "./utils.js";
|
8
8
|
import { Icon as G } from "../../icons/Icon.js";
|
9
9
|
import { formating as s } from "../../utils/index.js";
|
@@ -3,7 +3,7 @@ import { c as k } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { useState as $ } from "react";
|
4
4
|
import { months as x } from "./constants.js";
|
5
5
|
import { useDatePickerPosition as v } from "./hooks.js";
|
6
|
-
import { c as e } from "../../styles.module-
|
6
|
+
import { c as e } from "../../styles.module-CPvzaOtD.js";
|
7
7
|
import { Icon as B } from "../../icons/Icon.js";
|
8
8
|
import { formating as a } from "../../utils/index.js";
|
9
9
|
import { Button as b } from "../Button/Button.js";
|
@@ -2,7 +2,7 @@ import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { c as v } from "../../index-DIxK0V-G.js";
|
3
3
|
import { useState as x } from "react";
|
4
4
|
import { useDatePickerPosition as Y } from "./hooks.js";
|
5
|
-
import { c as t } from "../../styles.module-
|
5
|
+
import { c as t } from "../../styles.module-CPvzaOtD.js";
|
6
6
|
import { formating as n } from "../../utils/index.js";
|
7
7
|
import { Button as y } from "../Button/Button.js";
|
8
8
|
const F = ({
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { EFileItemVariant } from '../ListFiles';
|
1
2
|
import { TFilesDetail } from '../ListFiles/ListFiles';
|
2
3
|
import { TPhotosDetail } from '../ListPhotos/ListPhotos';
|
3
4
|
|
@@ -5,4 +6,5 @@ export declare const UniversalUploader: import('react').ForwardRefExoticComponen
|
|
5
6
|
type: "files" | "photos" | "all";
|
6
7
|
onChange: (j: import('./types').TOnChangeUpdate) => void;
|
7
8
|
value?: TFilesDetail[] | TPhotosDetail[];
|
9
|
+
variantListFiles?: EFileItemVariant | `${EFileItemVariant}`;
|
8
10
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
@@ -1,38 +1,40 @@
|
|
1
|
-
import { jsxs as h, jsx as p, Fragment as
|
2
|
-
import { c as
|
3
|
-
import { forwardRef as
|
1
|
+
import { jsxs as h, jsx as p, Fragment as j } from "react/jsx-runtime";
|
2
|
+
import { c as B } from "../../index-DIxK0V-G.js";
|
3
|
+
import { forwardRef as D, useState as E, useEffect as T, useMemo as _ } from "react";
|
4
4
|
import { imageTypes as y } from "./constants.js";
|
5
5
|
import "../Button/Button.js";
|
6
6
|
import { EButtonVariantDefault as C } from "../Button/constants.js";
|
7
|
-
import { ListFiles as
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import
|
7
|
+
import { ListFiles as M } from "../ListFiles/ListFiles.js";
|
8
|
+
import { EFileItemVariant as O } from "../ListFiles/constants.js";
|
9
|
+
import { ListPhotos as P } from "../ListPhotos/ListPhotos.js";
|
10
|
+
import { Uploader as A } from "../Uploader/Uploader.js";
|
11
|
+
import '../../assets/UploaderPhotos.css';const v = {
|
11
12
|
"upload-file-wrapper": "_upload-file-wrapper_1a115_2"
|
12
|
-
}, f = (i) => "file" in i && i.file instanceof File ? y.includes(i.file.type) : "type" in i && typeof i.type == "string" ? y.includes(i.type) : !1,
|
13
|
-
(i,
|
13
|
+
}, f = (i) => "file" in i && i.file instanceof File ? y.includes(i.file.type) : "type" in i && typeof i.type == "string" ? y.includes(i.type) : !1, Z = D(
|
14
|
+
(i, F) => {
|
14
15
|
const {
|
15
|
-
type:
|
16
|
-
filesType:
|
17
|
-
arrayName:
|
18
|
-
maxSize:
|
19
|
-
onChange:
|
20
|
-
value:
|
21
|
-
maxFiles:
|
22
|
-
titleUploader:
|
23
|
-
buttonText:
|
24
|
-
showOnlyUploadButton:
|
16
|
+
type: a,
|
17
|
+
filesType: g,
|
18
|
+
arrayName: w,
|
19
|
+
maxSize: x,
|
20
|
+
onChange: s,
|
21
|
+
value: o,
|
22
|
+
maxFiles: m,
|
23
|
+
titleUploader: U,
|
24
|
+
buttonText: b = "Выберите файлы",
|
25
|
+
showOnlyUploadButton: u = !1,
|
25
26
|
uploadButtonVariant: z = C.SecondaryAsphalt,
|
26
27
|
buttonSize: I = "m",
|
27
|
-
buttonClassName: L
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
buttonClassName: L,
|
29
|
+
variantListFiles: V = O.white
|
30
|
+
} = i, [l, n] = E(
|
31
|
+
o || []
|
32
|
+
), d = l.length >= m;
|
31
33
|
T(() => {
|
32
|
-
|
33
|
-
}, [
|
34
|
+
o && n(o);
|
35
|
+
}, [o]);
|
34
36
|
const N = (t) => {
|
35
|
-
const
|
37
|
+
const r = t.value.map((e) => f(e.file) ? {
|
36
38
|
id: e.id,
|
37
39
|
url: URL.createObjectURL(e.file),
|
38
40
|
type: e.file.type,
|
@@ -45,50 +47,51 @@ import '../../assets/UploaderPhotos.css';const g = {
|
|
45
47
|
name: e.file.name,
|
46
48
|
type: e.file.type
|
47
49
|
});
|
48
|
-
n((e) => [...e, ...
|
50
|
+
n((e) => [...e, ...r]), s == null || s({ type: "add", data: t.value });
|
49
51
|
}, c = (t) => {
|
50
|
-
n((
|
52
|
+
n((r) => r.filter((e) => e.id !== t)), s == null || s({ type: "delete", data: t });
|
51
53
|
}, { photos: R, files: S } = _(() => {
|
52
|
-
const t = () => l.filter((e) => !f(e)),
|
53
|
-
return
|
54
|
-
}, [l,
|
54
|
+
const t = () => l.filter((e) => !f(e)), r = () => l.filter(f);
|
55
|
+
return a === "all" ? { files: t(), photos: r() } : a === "files" ? { photos: [], files: t() } : a === "photos" ? { files: [], photos: r() } : { files: [], photos: [] };
|
56
|
+
}, [l, a]);
|
55
57
|
return /* @__PURE__ */ h(
|
56
58
|
"div",
|
57
59
|
{
|
58
60
|
"data-testid": "universal-uploader",
|
59
|
-
className:
|
60
|
-
|
61
|
-
|
61
|
+
className: B(
|
62
|
+
v["upload-file-wrapper"],
|
63
|
+
d && v.disabled
|
62
64
|
),
|
63
65
|
children: [
|
64
66
|
/* @__PURE__ */ p(
|
65
|
-
|
67
|
+
A,
|
66
68
|
{
|
67
|
-
filesType:
|
68
|
-
arrayName:
|
69
|
-
maxSize:
|
69
|
+
filesType: g,
|
70
|
+
arrayName: w,
|
71
|
+
maxSize: x,
|
70
72
|
onChangeValue: N,
|
71
|
-
ref:
|
72
|
-
maxFiles:
|
73
|
-
isDisabled:
|
74
|
-
titleUploader:
|
75
|
-
showOnlyUploadButton:
|
76
|
-
buttonText:
|
73
|
+
ref: F,
|
74
|
+
maxFiles: m,
|
75
|
+
isDisabled: d,
|
76
|
+
titleUploader: U,
|
77
|
+
showOnlyUploadButton: u,
|
78
|
+
buttonText: b,
|
77
79
|
uploadButtonVariant: z,
|
78
80
|
buttonSize: I,
|
79
81
|
buttonClassName: L
|
80
82
|
}
|
81
83
|
),
|
82
|
-
!
|
83
|
-
(
|
84
|
-
|
84
|
+
!u && /* @__PURE__ */ h(j, { children: [
|
85
|
+
(a === "files" || a === "all") && /* @__PURE__ */ p(
|
86
|
+
M,
|
85
87
|
{
|
86
88
|
value: S,
|
87
|
-
onChange: (t) => c(t.deleteId)
|
89
|
+
onChange: (t) => c(t.deleteId),
|
90
|
+
variant: V
|
88
91
|
}
|
89
92
|
),
|
90
|
-
(
|
91
|
-
|
93
|
+
(a === "photos" || a === "all") && /* @__PURE__ */ p(
|
94
|
+
P,
|
92
95
|
{
|
93
96
|
value: R,
|
94
97
|
onChange: (t) => c(t.deleteId)
|
@@ -101,5 +104,5 @@ import '../../assets/UploaderPhotos.css';const g = {
|
|
101
104
|
}
|
102
105
|
);
|
103
106
|
export {
|
104
|
-
|
107
|
+
Z as UniversalUploader
|
105
108
|
};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { EFileItemVariant } from '../ListFiles';
|
1
2
|
import { TFilesDetail } from '../ListFiles/ListFiles';
|
2
3
|
import { TPhotosDetail } from '../ListPhotos/ListPhotos';
|
3
4
|
import { TFileItem, TUploader } from '../Uploader';
|
@@ -6,6 +7,7 @@ export type TUniversalUploader = Omit<TUploader, 'onChangeValue'> & {
|
|
6
7
|
type: 'files' | 'photos' | 'all';
|
7
8
|
onChange: (j: TOnChangeUpdate) => void;
|
8
9
|
value?: TFilesDetail[] | TPhotosDetail[];
|
10
|
+
variantListFiles?: EFileItemVariant | `${EFileItemVariant}`;
|
9
11
|
};
|
10
12
|
export type TOnChangeUpdate = {
|
11
13
|
type: string;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import './assets/styles.css';const t = "_textError_97gw7_7", _ = "_input_97gw7_2", r = "_inputBorderControl_97gw7_28", n = "_editable_97gw7_41", o = "_wrapper_97gw7_64", e = "_active_97gw7_74", p = "_button_97gw7_58", c = "_h_97gw7_118", w = "_b_97gw7_58", a = "_d_97gw7_24", g = "_m_97gw7_140", i = "_a_97gw7_74", u = "_prev_97gw7_142", d = "_orange_97gw7_156", s = "_current_97gw7_173", b = "_monthGrid_97gw7_178", l = {
|
2
|
+
"input-field-group-datePicker": "_input-field-group-datePicker_97gw7_2",
|
3
|
+
textError: t,
|
4
|
+
input: _,
|
5
|
+
"input-wrapper": "_input-wrapper_97gw7_20",
|
6
|
+
"date-wrapper": "_date-wrapper_97gw7_24",
|
7
|
+
inputBorderControl: r,
|
8
|
+
editable: n,
|
9
|
+
"button-wrapper": "_button-wrapper_97gw7_58",
|
10
|
+
wrapper: o,
|
11
|
+
active: e,
|
12
|
+
button: p,
|
13
|
+
"calendar-block": "_calendar-block_97gw7_96",
|
14
|
+
h: c,
|
15
|
+
b: w,
|
16
|
+
d: a,
|
17
|
+
m: g,
|
18
|
+
a: i,
|
19
|
+
prev: u,
|
20
|
+
orange: d,
|
21
|
+
current: s,
|
22
|
+
monthGrid: b,
|
23
|
+
"icon-button": "_icon-button_97gw7_183"
|
24
|
+
};
|
25
|
+
export {
|
26
|
+
l as c
|
27
|
+
};
|
package/package.json
CHANGED
@@ -1,25 +0,0 @@
|
|
1
|
-
import './assets/styles.css';const _ = "_input_hmkm7_2", t = "_inputBorderControl_hmkm7_14", n = "_editable_hmkm7_27", m = "_wrapper_hmkm7_50", r = "_active_hmkm7_56", o = "_button_hmkm7_44", e = "_h_hmkm7_100", c = "_b_hmkm7_44", p = "_d_hmkm7_10", a = "_m_hmkm7_122", h = "_a_hmkm7_56", k = "_prev_hmkm7_124", i = "_orange_hmkm7_138", s = "_current_hmkm7_155", u = "_monthGrid_hmkm7_160", d = {
|
2
|
-
input: _,
|
3
|
-
"input-wrapper": "_input-wrapper_hmkm7_6",
|
4
|
-
"date-wrapper": "_date-wrapper_hmkm7_10",
|
5
|
-
inputBorderControl: t,
|
6
|
-
editable: n,
|
7
|
-
"button-wrapper": "_button-wrapper_hmkm7_44",
|
8
|
-
wrapper: m,
|
9
|
-
active: r,
|
10
|
-
button: o,
|
11
|
-
"calendar-block": "_calendar-block_hmkm7_78",
|
12
|
-
h: e,
|
13
|
-
b: c,
|
14
|
-
d: p,
|
15
|
-
m: a,
|
16
|
-
a: h,
|
17
|
-
prev: k,
|
18
|
-
orange: i,
|
19
|
-
current: s,
|
20
|
-
monthGrid: u,
|
21
|
-
"icon-button": "_icon-button_hmkm7_165"
|
22
|
-
};
|
23
|
-
export {
|
24
|
-
d as c
|
25
|
-
};
|