mimir-ui-kit 1.62.0 → 1.64.0
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/Input-CqNPT8os.js +243 -0
- package/dist/components/Accordion/Accordion.d.ts +5 -0
- package/dist/components/Accordion/Accordion.js +242 -220
- package/dist/components/Accordion/AccordionItem/AccordionItem.d.ts +6 -1
- package/dist/components/Accordion/AccordionItem/AccordionItem.js +19 -8
- package/dist/components/Button/Button.d.ts +37 -0
- package/dist/components/Button/Button.js +77 -61
- package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +9 -0
- package/dist/components/CheckboxMimir/CheckboxMimir.js +90 -59
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Drawer/Drawer.d.ts +5 -0
- package/dist/components/Drawer/Drawer.js +141 -135
- package/dist/components/GosZnak/GosZnak.d.ts +1 -1
- package/dist/components/GosZnak/GosZnak.js +88 -67
- package/dist/components/GosZnak/types.d.ts +5 -0
- package/dist/components/Image/Image.d.ts +5 -0
- package/dist/components/Image/Image.js +55 -50
- package/dist/components/Input/Input.d.ts +5 -0
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.d.ts +5 -0
- package/dist/components/InputPassword/InputPassword.js +80 -69
- package/dist/components/InputPhoneNumber/InputPhoneNumber.d.ts +5 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +39 -32
- package/dist/components/Loader/Loader.d.ts +6 -1
- package/dist/components/Loader/Loader.js +37 -14
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +1 -1
- package/dist/components/MultiSelectSearch/utils.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +9 -0
- package/dist/components/RadioGroup/RadioGroup.js +142 -129
- package/dist/components/SelectSearch/SelectSearch.d.ts +1 -0
- package/dist/components/SelectSearch/SelectSearch.js +299 -277
- package/dist/components/SelectSearch/types.d.ts +5 -0
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/TextArea/TextArea.d.ts +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/TextAreaV2/TextArea.js +155 -142
- package/dist/components/TextAreaV2/types.d.ts +5 -0
- package/dist/components/UniversalUploader/UniversalUploader.d.ts +1 -0
- package/dist/components/UniversalUploader/UniversalUploader.js +92 -88
- package/dist/components/UniversalUploader/types.d.ts +5 -0
- package/dist/components/Uploader/Uploader.d.ts +7 -2
- package/dist/components/Uploader/Uploader.js +121 -90
- package/dist/components/UploaderFiles/UploaderFiles.js +88 -79
- package/dist/components/UploaderFiles/types.d.ts +5 -0
- package/dist/components/UploaderPhotos/UploaderPhotos.d.ts +5 -0
- package/dist/components/UploaderPhotos/UploaderPhotos.js +60 -57
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/dataTestId.d.ts +1 -0
- package/dist/types/dataTestId.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/Input-DPnH8pKc.js +0 -227
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ELoadingIndicatorPlacement, ESelectSearchBorderRadius, ESelectSearchSize } from './constants';
|
|
3
|
+
import { TDataTestIdReactMap } from '../../types';
|
|
3
4
|
import { TInputProps } from '../Input';
|
|
4
5
|
|
|
5
6
|
export type TSelectOption = {
|
|
@@ -118,4 +119,8 @@ export type TSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'variant'
|
|
|
118
119
|
* Если `false`, разрешает прокрутку страницы и клики по внешним элементам при открытом списке, иначе блокирует скролл.
|
|
119
120
|
*/
|
|
120
121
|
isModal?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
124
|
+
*/
|
|
125
|
+
dataTestIdReactMap?: TDataTestIdReactMap<'selectSearch' | 'container' | 'input' | 'options' | 'option' | 'groupHeader' | 'clearButton' | 'loadingIndicator'>;
|
|
121
126
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElement as u, Fragment as l, isValidElement as g, cloneElement as m } from "react";
|
|
2
2
|
import { ESelectSearchSize as s, MOBILE_MENU_HEIGHT as h, DESKTOP_MENU_HEIGHT as w } from "./constants.js";
|
|
3
|
-
import "../../Input-
|
|
3
|
+
import "../../Input-CqNPT8os.js";
|
|
4
4
|
import { EInputSize as c } from "../Input/constants.js";
|
|
5
5
|
const A = (r) => {
|
|
6
6
|
switch (r) {
|
|
@@ -2,6 +2,6 @@ import { TTextAreaProps } from './types';
|
|
|
2
2
|
import { TAdditionalProps } from '../Input';
|
|
3
3
|
|
|
4
4
|
export type TProps = TAdditionalProps & TTextAreaProps;
|
|
5
|
-
export declare const TextArea: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<TAdditionalProps & Omit<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, "
|
|
5
|
+
export declare const TextArea: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<TAdditionalProps & Omit<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, "readOnly" | "size"> & {
|
|
6
6
|
inputSize?: `${import('./constants').ETextAreaInputSize}` | import('./constants').ETextAreaInputSize;
|
|
7
7
|
} & import('react').RefAttributes<HTMLTextAreaElement>>>;
|
|
@@ -5,7 +5,7 @@ import { useAutoResizeTextArea as Z } from "./hooks.js";
|
|
|
5
5
|
import { useMergeRefs as $ } from "../../hooks/useMergeRefs/useMergeRefs.js";
|
|
6
6
|
import { Icon as ee } from "../../icons/Icon.js";
|
|
7
7
|
import { Button as te } from "../Button/Button.js";
|
|
8
|
-
import { c as e } from "../../Input-
|
|
8
|
+
import { c as e } from "../../Input-CqNPT8os.js";
|
|
9
9
|
import { EInputVariant as ae } from "../Input/constants.js";
|
|
10
10
|
import '../../assets/TextArea.css';const re = "_textarea_rk5xe_2", se = "_clear_rk5xe_11", le = "_label_rk5xe_26", ne = "_s_rk5xe_71", oe = "_m_rk5xe_84", ce = "_l_rk5xe_26", t = {
|
|
11
11
|
"textarea-wrapper": "_textarea-wrapper_rk5xe_2",
|
|
@@ -1,183 +1,187 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { ETextAreaSize as
|
|
5
|
-
import { getCurrentText as
|
|
6
|
-
import { useMergeRefs as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { MiniButton as
|
|
9
|
-
import '../../assets/TextArea2.css';const
|
|
1
|
+
import { jsxs as p, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as d } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import { memo as M, forwardRef as I, useId as R, useRef as V, useState as F, useEffect as ee, useCallback as g } from "react";
|
|
4
|
+
import { ETextAreaSize as z, ETextAreaVariant as re } from "./constants.js";
|
|
5
|
+
import { getCurrentText as A, setEditableText as $, clampByMaxLength as te, placeCaretAtEnd as ne, getMaxHeightStyle as se } from "./utils.js";
|
|
6
|
+
import { useMergeRefs as oe } from "../../hooks/useMergeRefs/useMergeRefs.js";
|
|
7
|
+
import { Icon as ce } from "../../icons/Icon.js";
|
|
8
|
+
import { MiniButton as ae } from "../MiniButton/MiniButton.js";
|
|
9
|
+
import '../../assets/TextArea2.css';const le = "_textarea_swf3z_2", ie = "_disabled_swf3z_68", ue = "_clear_swf3z_112", fe = "_label_swf3z_128", _e = "_message_swf3z_184", me = "_error_swf3z_188", de = "_success_swf3z_219", xe = "_alarm_swf3z_226", we = "_s_swf3z_219", ge = "_m_swf3z_184", he = "_l_swf3z_128", r = {
|
|
10
10
|
"textarea-wrapper": "_textarea-wrapper_swf3z_2",
|
|
11
|
-
textarea:
|
|
12
|
-
disabled:
|
|
11
|
+
textarea: le,
|
|
12
|
+
disabled: ie,
|
|
13
13
|
"with-value": "_with-value_swf3z_85",
|
|
14
14
|
clear: ue,
|
|
15
15
|
"has-left-addon": "_has-left-addon_swf3z_115",
|
|
16
16
|
"has-clear": "_has-clear_swf3z_119",
|
|
17
17
|
"is-required": "_is-required_swf3z_123",
|
|
18
|
-
label:
|
|
18
|
+
label: fe,
|
|
19
19
|
"is-focused": "_is-focused_swf3z_148",
|
|
20
20
|
"textarea-right-addon": "_textarea-right-addon_swf3z_152",
|
|
21
21
|
"textarea-left-addon": "_textarea-left-addon_swf3z_153",
|
|
22
22
|
"required-mark": "_required-mark_swf3z_169",
|
|
23
23
|
"addon-icon": "_addon-icon_swf3z_179",
|
|
24
|
-
message:
|
|
25
|
-
error:
|
|
24
|
+
message: _e,
|
|
25
|
+
error: me,
|
|
26
26
|
"right-addons-content": "_right-addons-content_swf3z_192",
|
|
27
27
|
"default-gray": "_default-gray_swf3z_201",
|
|
28
28
|
"default-white": "_default-white_swf3z_210",
|
|
29
|
-
success:
|
|
30
|
-
alarm:
|
|
31
|
-
s:
|
|
32
|
-
m:
|
|
33
|
-
l:
|
|
34
|
-
},
|
|
35
|
-
if (!
|
|
29
|
+
success: de,
|
|
30
|
+
alarm: xe,
|
|
31
|
+
s: we,
|
|
32
|
+
m: ge,
|
|
33
|
+
l: he
|
|
34
|
+
}, pe = (f, l) => {
|
|
35
|
+
if (!f)
|
|
36
36
|
return null;
|
|
37
|
-
switch (
|
|
37
|
+
switch (f.addonType) {
|
|
38
38
|
case "icon": {
|
|
39
|
-
const
|
|
39
|
+
const _ = l === z.L, N = l === z.M, n = l === z.S;
|
|
40
40
|
return /* @__PURE__ */ u(
|
|
41
|
-
|
|
41
|
+
ce,
|
|
42
42
|
{
|
|
43
43
|
style: {
|
|
44
|
-
"--icon-size":
|
|
45
|
-
"16px":
|
|
46
|
-
"24px":
|
|
44
|
+
"--icon-size": d({
|
|
45
|
+
"16px": N || n,
|
|
46
|
+
"24px": _
|
|
47
47
|
})
|
|
48
48
|
},
|
|
49
|
-
className:
|
|
50
|
-
iconName:
|
|
49
|
+
className: r["addon-icon"],
|
|
50
|
+
iconName: f.addonContent
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
case "text":
|
|
55
|
-
return
|
|
55
|
+
return f.addonContent;
|
|
56
56
|
default:
|
|
57
57
|
return null;
|
|
58
58
|
}
|
|
59
|
-
},
|
|
60
|
-
|
|
59
|
+
}, ze = M(
|
|
60
|
+
I(
|
|
61
61
|
({
|
|
62
|
-
className:
|
|
63
|
-
label:
|
|
64
|
-
required:
|
|
65
|
-
leftAddon:
|
|
66
|
-
disabled:
|
|
67
|
-
autofocus:
|
|
68
|
-
withClearButton:
|
|
69
|
-
value:
|
|
70
|
-
onChange:
|
|
71
|
-
maxLength:
|
|
72
|
-
maxRows:
|
|
73
|
-
message:
|
|
74
|
-
size:
|
|
75
|
-
status:
|
|
76
|
-
variant:
|
|
77
|
-
containerClassName:
|
|
78
|
-
wrapperClassName:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
b(
|
|
84
|
-
|
|
62
|
+
className: f,
|
|
63
|
+
label: l,
|
|
64
|
+
required: _,
|
|
65
|
+
leftAddon: N,
|
|
66
|
+
disabled: n,
|
|
67
|
+
autofocus: j,
|
|
68
|
+
withClearButton: S,
|
|
69
|
+
value: k,
|
|
70
|
+
onChange: h,
|
|
71
|
+
maxLength: m,
|
|
72
|
+
maxRows: H,
|
|
73
|
+
message: E,
|
|
74
|
+
size: x = z.M,
|
|
75
|
+
status: q,
|
|
76
|
+
variant: K = re.DefaultGray,
|
|
77
|
+
containerClassName: P,
|
|
78
|
+
wrapperClassName: W,
|
|
79
|
+
dataTestIdReactMap: t
|
|
80
|
+
}, G) => {
|
|
81
|
+
const v = R(), y = pe(N, x), s = V(null), D = V(!1), U = oe(G, s), [w, B] = F(
|
|
82
|
+
j
|
|
83
|
+
), [b, J] = F(""), C = k !== void 0, o = C ? k ?? "" : b, O = se(x, H);
|
|
84
|
+
ee(() => {
|
|
85
|
+
const e = s.current;
|
|
85
86
|
if (e) {
|
|
86
|
-
if (
|
|
87
|
-
|
|
87
|
+
if (D.current) {
|
|
88
|
+
D.current = !1;
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
|
-
|
|
91
|
+
A(e) !== o && $(o, e);
|
|
91
92
|
}
|
|
92
|
-
}, [
|
|
93
|
-
const
|
|
94
|
-
(e,
|
|
95
|
-
const
|
|
96
|
-
|
|
93
|
+
}, [o]);
|
|
94
|
+
const i = g(
|
|
95
|
+
(e, a = !1) => {
|
|
96
|
+
const c = te(e, m);
|
|
97
|
+
C ? h == null || h(c) : J(c), a && (D.current = !0, $(c, s == null ? void 0 : s.current), ne(s == null ? void 0 : s.current));
|
|
97
98
|
},
|
|
98
|
-
[
|
|
99
|
-
),
|
|
100
|
-
if (
|
|
101
|
-
const e =
|
|
102
|
-
typeof
|
|
103
|
-
}, [
|
|
99
|
+
[C, h, m]
|
|
100
|
+
), Q = g(() => {
|
|
101
|
+
if (n) return;
|
|
102
|
+
const e = A(s == null ? void 0 : s.current);
|
|
103
|
+
typeof m == "number" && m >= 0 && e.length > m ? i(e, !0) : e.length === 0 ? i("", !0) : i(e);
|
|
104
|
+
}, [i, m, n]), X = g(
|
|
104
105
|
(e) => {
|
|
105
|
-
if (
|
|
106
|
+
if (n)
|
|
106
107
|
return;
|
|
107
108
|
e.preventDefault();
|
|
108
|
-
const
|
|
109
|
-
`),
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
|
|
109
|
+
const a = (e.clipboardData.getData("text/plain") || "").replace(/\r\n|\r/g, `
|
|
110
|
+
`), c = window.getSelection();
|
|
111
|
+
c != null && c.rangeCount && (c.deleteFromDocument(), c.getRangeAt(0).insertNode(document.createTextNode(a)), c.collapseToEnd());
|
|
112
|
+
const T = A(s == null ? void 0 : s.current);
|
|
113
|
+
i(T, !0);
|
|
113
114
|
},
|
|
114
|
-
[
|
|
115
|
-
),
|
|
115
|
+
[i, n]
|
|
116
|
+
), Y = g(
|
|
116
117
|
(e) => {
|
|
117
|
-
|
|
118
|
+
n && e.preventDefault();
|
|
118
119
|
},
|
|
119
|
-
[
|
|
120
|
-
),
|
|
120
|
+
[n]
|
|
121
|
+
), Z = g(() => {
|
|
121
122
|
var e;
|
|
122
|
-
|
|
123
|
-
}, [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
!!
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
123
|
+
i("", !0), (e = s.current) == null || e.focus();
|
|
124
|
+
}, [i]), L = d(
|
|
125
|
+
r["textarea-wrapper"],
|
|
126
|
+
r[K],
|
|
127
|
+
r[x],
|
|
128
|
+
r[q ?? ""],
|
|
129
|
+
_ && r.required,
|
|
130
|
+
n && r.disabled,
|
|
131
|
+
!!o && r["with-value"],
|
|
132
|
+
y && r["has-left-addon"],
|
|
133
|
+
S && !!o && r["has-clear"],
|
|
134
|
+
_ && !w && r["is-required"],
|
|
135
|
+
W
|
|
135
136
|
);
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
+
return /* @__PURE__ */ p(
|
|
137
138
|
"div",
|
|
138
139
|
{
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
"data-testid-react": t == null ? void 0 : t.textarea,
|
|
141
|
+
id: `textarea-container-${v}`,
|
|
142
|
+
className: d(r["textarea-container"], P),
|
|
141
143
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ p(
|
|
143
145
|
"div",
|
|
144
146
|
{
|
|
145
147
|
"data-testid": "textarea-wrapper",
|
|
146
|
-
id: `textarea-wrapper-${
|
|
147
|
-
tabIndex:
|
|
148
|
-
className:
|
|
148
|
+
id: `textarea-wrapper-${v}`,
|
|
149
|
+
tabIndex: n ? -1 : 0,
|
|
150
|
+
className: L,
|
|
149
151
|
onMouseDown: (e) => {
|
|
150
|
-
var
|
|
151
|
-
|
|
152
|
+
var a;
|
|
153
|
+
n || e.target === e.currentTarget && (e.preventDefault(), (a = s.current) == null || a.focus());
|
|
152
154
|
},
|
|
153
155
|
onFocusCapture: (e) => {
|
|
154
|
-
var
|
|
155
|
-
|
|
156
|
+
var a;
|
|
157
|
+
n || (e.target === e.currentTarget && ((a = s.current) == null || a.focus()), e.currentTarget.contains(e.relatedTarget) || B(!0));
|
|
156
158
|
},
|
|
157
159
|
onBlurCapture: (e) => {
|
|
158
|
-
|
|
160
|
+
n || e.currentTarget.contains(e.relatedTarget) || B(!1);
|
|
159
161
|
},
|
|
160
162
|
children: [
|
|
161
|
-
|
|
163
|
+
y && /* @__PURE__ */ u(
|
|
162
164
|
"div",
|
|
163
165
|
{
|
|
166
|
+
"data-testid-react": t == null ? void 0 : t.leftAddon,
|
|
164
167
|
"data-testid": "left-addon",
|
|
165
|
-
className:
|
|
166
|
-
children:
|
|
168
|
+
className: r["textarea-left-addon"],
|
|
169
|
+
children: y
|
|
167
170
|
}
|
|
168
171
|
),
|
|
169
|
-
|
|
172
|
+
l && /* @__PURE__ */ p(
|
|
170
173
|
"span",
|
|
171
174
|
{
|
|
172
|
-
|
|
173
|
-
|
|
175
|
+
"data-testid-react": t == null ? void 0 : t.label,
|
|
176
|
+
className: d(r.label, {
|
|
177
|
+
[r["is-focused"]]: !!o || w
|
|
174
178
|
}),
|
|
175
179
|
children: [
|
|
176
|
-
|
|
177
|
-
|
|
180
|
+
l,
|
|
181
|
+
_ && (!!o || w) && /* @__PURE__ */ u(
|
|
178
182
|
"span",
|
|
179
183
|
{
|
|
180
|
-
className:
|
|
184
|
+
className: r["required-mark"],
|
|
181
185
|
"data-testid": "required-mark"
|
|
182
186
|
}
|
|
183
187
|
)
|
|
@@ -187,69 +191,78 @@ import '../../assets/TextArea2.css';const ce = "_textarea_swf3z_2", le = "_disab
|
|
|
187
191
|
/* @__PURE__ */ u(
|
|
188
192
|
"div",
|
|
189
193
|
{
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
194
|
+
"data-testid-react": t == null ? void 0 : t.textbox,
|
|
195
|
+
id: `textarea-${v}`,
|
|
196
|
+
className: d(
|
|
197
|
+
r.textarea,
|
|
198
|
+
f,
|
|
199
|
+
n && r.disabled,
|
|
195
200
|
{
|
|
196
|
-
[
|
|
201
|
+
[r["with-value"]]: !!o
|
|
197
202
|
}
|
|
198
203
|
),
|
|
199
204
|
role: "textbox",
|
|
200
205
|
"aria-multiline": !0,
|
|
201
|
-
"aria-label":
|
|
202
|
-
"aria-disabled":
|
|
203
|
-
onInput:
|
|
204
|
-
onKeyDown:
|
|
206
|
+
"aria-label": l,
|
|
207
|
+
"aria-disabled": n,
|
|
208
|
+
onInput: Q,
|
|
209
|
+
onKeyDown: Y,
|
|
205
210
|
onBeforeInput: (e) => {
|
|
206
|
-
|
|
211
|
+
n && e.preventDefault();
|
|
207
212
|
},
|
|
208
213
|
contentEditable: !0,
|
|
209
214
|
suppressContentEditableWarning: !0,
|
|
210
|
-
onPaste:
|
|
211
|
-
ref:
|
|
212
|
-
style:
|
|
215
|
+
onPaste: X,
|
|
216
|
+
ref: U,
|
|
217
|
+
style: O,
|
|
213
218
|
tabIndex: -1,
|
|
214
|
-
"data-placeholder":
|
|
219
|
+
"data-placeholder": o || w ? void 0 : l
|
|
215
220
|
}
|
|
216
221
|
),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
|
|
222
|
+
/* @__PURE__ */ p("div", { className: r["right-addons-content"], children: [
|
|
223
|
+
_ && !o && !w && /* @__PURE__ */ u(
|
|
219
224
|
"span",
|
|
220
225
|
{
|
|
221
|
-
className:
|
|
226
|
+
className: r["required-mark"],
|
|
222
227
|
"data-testid": "required-mark"
|
|
223
228
|
}
|
|
224
229
|
),
|
|
225
|
-
|
|
226
|
-
|
|
230
|
+
S && !!o && /* @__PURE__ */ u(
|
|
231
|
+
ae,
|
|
227
232
|
{
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
233
|
+
"data-testid-react": t == null ? void 0 : t.clearBtn,
|
|
234
|
+
className: r.clear,
|
|
235
|
+
iconName: x === "l" ? "Close16px" : "Close12px",
|
|
236
|
+
size: x === "l" ? "l" : "m-s",
|
|
231
237
|
variant: "transparent",
|
|
232
|
-
disabled:
|
|
238
|
+
disabled: n,
|
|
233
239
|
"data-testid": "clear-button",
|
|
234
240
|
"data-minibutton": !0,
|
|
235
241
|
onMouseDown: (e) => {
|
|
236
242
|
e.preventDefault();
|
|
237
243
|
},
|
|
238
|
-
onClick:
|
|
244
|
+
onClick: Z
|
|
239
245
|
}
|
|
240
246
|
)
|
|
241
247
|
] })
|
|
242
248
|
]
|
|
243
249
|
}
|
|
244
250
|
),
|
|
245
|
-
|
|
251
|
+
E && /* @__PURE__ */ u(
|
|
252
|
+
"div",
|
|
253
|
+
{
|
|
254
|
+
"data-testid-react": t == null ? void 0 : t.infoMessage,
|
|
255
|
+
className: d(r.message, r[q ?? ""]),
|
|
256
|
+
children: E
|
|
257
|
+
}
|
|
258
|
+
)
|
|
246
259
|
]
|
|
247
260
|
}
|
|
248
261
|
);
|
|
249
262
|
}
|
|
250
263
|
)
|
|
251
264
|
);
|
|
252
|
-
|
|
265
|
+
ze.displayName = "TextArea";
|
|
253
266
|
export {
|
|
254
|
-
|
|
267
|
+
ze as TextArea
|
|
255
268
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ETextAreaSize, ETextAreaStatus, ETextAreaVariant } from './constants';
|
|
3
3
|
import { TIcon } from '../../icons';
|
|
4
|
+
import { TDataTestIdReactMap } from '../../types';
|
|
4
5
|
|
|
5
6
|
type TTextAddon = {
|
|
6
7
|
addonType?: 'text';
|
|
@@ -84,5 +85,9 @@ export type TProps = {
|
|
|
84
85
|
* Дополнительный слот слева.
|
|
85
86
|
*/
|
|
86
87
|
leftAddon?: TIconAddon;
|
|
88
|
+
/**
|
|
89
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
90
|
+
*/
|
|
91
|
+
dataTestIdReactMap?: TDataTestIdReactMap<'textarea' | 'leftAddon' | 'label' | 'textbox' | 'clearBtn' | 'infoMessage'>;
|
|
87
92
|
};
|
|
88
93
|
export {};
|
|
@@ -7,6 +7,7 @@ export declare const UniversalUploader: import('react').ForwardRefExoticComponen
|
|
|
7
7
|
onChange: (j: import('./types').TOnChangeUpdate) => void;
|
|
8
8
|
value?: TFilesDetail[] | TPhotosDetail[];
|
|
9
9
|
variantListFiles?: EFileItemVariant | `${EFileItemVariant}`;
|
|
10
|
+
dataTestIdReactMap?: import('../..').TDataTestIdReactMap<"wrapper" | "uploader" | "listFiles" | "listPhotos">;
|
|
10
11
|
loadImage?: (src?: string) => Promise<string>;
|
|
11
12
|
isDownloadingImage?: boolean;
|
|
12
13
|
} & import('react').RefAttributes<HTMLDivElement>>;
|