mimir-ui-kit 1.61.1 → 1.63.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/DropdownSelect/DropdownSelect.js +25 -23
- package/dist/components/DropdownSelect/types.d.ts +4 -0
- 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/hooks/useRenderVirtualizedList.d.ts +2 -1
- package/dist/components/MultiSelectSearch/hooks/useRenderVirtualizedList.js +50 -48
- 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 +2 -0
- package/dist/components/SelectSearch/SelectSearch.js +299 -275
- package/dist/components/SelectSearch/types.d.ts +9 -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 +89 -86
- package/dist/components/UniversalUploader/types.d.ts +5 -0
- package/dist/components/Uploader/Uploader.d.ts +5 -0
- package/dist/components/Uploader/Uploader.js +116 -87
- 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,104 +1,125 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { EGosZnakSize as
|
|
4
|
-
import '../../assets/GosZnak.css';const
|
|
1
|
+
import { jsx as o, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import { c as r } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import { EGosZnakSize as G, EGosZnakType as Z, COPY_TEXT_TITLE as j } from "./constants.js";
|
|
4
|
+
import '../../assets/GosZnak.css';const L = "_number_1nnii_13", C = "_region_1nnii_32", F = "_country_1nnii_46", O = "_l_1nnii_53", P = "_s_1nnii_62", S = "_normal_1nnii_71", X = "_traffic_1nnii_78", Y = "_military_1nnii_85", q = "_police_1nnii_92", A = "_diplomatic_1nnii_99", B = "_simplified_1nnii_112", i = {
|
|
5
5
|
"gos-znak": "_gos-znak_1nnii_2",
|
|
6
|
-
number:
|
|
6
|
+
number: L,
|
|
7
7
|
"number-container": "_number-container_1nnii_22",
|
|
8
|
-
region:
|
|
8
|
+
region: C,
|
|
9
9
|
"region-container": "_region-container_1nnii_38",
|
|
10
|
-
country:
|
|
11
|
-
l:
|
|
12
|
-
s:
|
|
13
|
-
normal:
|
|
14
|
-
traffic:
|
|
15
|
-
military:
|
|
16
|
-
police:
|
|
17
|
-
diplomatic:
|
|
18
|
-
simplified:
|
|
10
|
+
country: F,
|
|
11
|
+
l: O,
|
|
12
|
+
s: P,
|
|
13
|
+
normal: S,
|
|
14
|
+
traffic: X,
|
|
15
|
+
military: Y,
|
|
16
|
+
police: q,
|
|
17
|
+
diplomatic: A,
|
|
18
|
+
simplified: B,
|
|
19
19
|
"copyable-number": "_copyable-number_1nnii_120"
|
|
20
|
-
},
|
|
21
|
-
number:
|
|
22
|
-
region:
|
|
23
|
-
country:
|
|
24
|
-
size:
|
|
25
|
-
type: s =
|
|
26
|
-
className:
|
|
27
|
-
numberClassName:
|
|
28
|
-
regionClassName:
|
|
29
|
-
countryClassName:
|
|
30
|
-
numberContainerClassName:
|
|
31
|
-
regionContainerClassName:
|
|
32
|
-
simplified:
|
|
33
|
-
copyable:
|
|
34
|
-
onCopy:
|
|
20
|
+
}, K = ({
|
|
21
|
+
number: m,
|
|
22
|
+
region: e,
|
|
23
|
+
country: v,
|
|
24
|
+
size: c = G.L,
|
|
25
|
+
type: s = Z.Normal,
|
|
26
|
+
className: u,
|
|
27
|
+
numberClassName: k,
|
|
28
|
+
regionClassName: w,
|
|
29
|
+
countryClassName: z,
|
|
30
|
+
numberContainerClassName: f,
|
|
31
|
+
regionContainerClassName: E,
|
|
32
|
+
simplified: b = !1,
|
|
33
|
+
copyable: g = !1,
|
|
34
|
+
onCopy: y,
|
|
35
|
+
dataTestIdReactMap: n
|
|
35
36
|
}) => {
|
|
36
|
-
const
|
|
37
|
+
const x = async (_) => {
|
|
37
38
|
try {
|
|
38
|
-
await navigator.clipboard.writeText(
|
|
39
|
-
} catch (
|
|
40
|
-
console.error("Failed to copy text: ",
|
|
39
|
+
await navigator.clipboard.writeText(_), y && y(_);
|
|
40
|
+
} catch (l) {
|
|
41
|
+
console.error("Failed to copy text: ", l);
|
|
41
42
|
}
|
|
42
|
-
},
|
|
43
|
+
}, h = (_, l = !1) => /* @__PURE__ */ o(
|
|
43
44
|
"span",
|
|
44
45
|
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
l &&
|
|
49
|
-
|
|
46
|
+
"data-testid-react": n == null ? void 0 : n.number,
|
|
47
|
+
className: r(
|
|
48
|
+
i.number,
|
|
49
|
+
l && i["copyable-number"],
|
|
50
|
+
b && i["simplified-number"],
|
|
51
|
+
k
|
|
50
52
|
),
|
|
51
|
-
onClick:
|
|
52
|
-
title:
|
|
53
|
-
children:
|
|
53
|
+
onClick: l ? () => x(_) : void 0,
|
|
54
|
+
title: l ? j : void 0,
|
|
55
|
+
children: _
|
|
54
56
|
}
|
|
55
57
|
);
|
|
56
|
-
return
|
|
58
|
+
return b ? /* @__PURE__ */ o(
|
|
57
59
|
"div",
|
|
58
60
|
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
"data-testid-react": n == null ? void 0 : n.wrapper,
|
|
62
|
+
className: r(
|
|
63
|
+
i["gos-znak"],
|
|
64
|
+
i[c],
|
|
65
|
+
i[s],
|
|
66
|
+
i.simplified,
|
|
67
|
+
u
|
|
65
68
|
),
|
|
66
69
|
children: /* @__PURE__ */ o(
|
|
67
70
|
"div",
|
|
68
71
|
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
"data-testid-react": n == null ? void 0 : n.numberContainer,
|
|
73
|
+
className: r(
|
|
74
|
+
i["number-container"],
|
|
75
|
+
f
|
|
72
76
|
),
|
|
73
|
-
children:
|
|
77
|
+
children: h(m, g)
|
|
74
78
|
}
|
|
75
79
|
)
|
|
76
80
|
}
|
|
77
|
-
) : /* @__PURE__ */
|
|
81
|
+
) : /* @__PURE__ */ N(
|
|
78
82
|
"div",
|
|
79
83
|
{
|
|
80
|
-
|
|
84
|
+
"data-testid-react": n == null ? void 0 : n.wrapper,
|
|
85
|
+
className: r(i["gos-znak"], i[c], i[s], u),
|
|
81
86
|
children: [
|
|
82
87
|
/* @__PURE__ */ o(
|
|
83
88
|
"div",
|
|
84
89
|
{
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
"data-testid-react": n == null ? void 0 : n.numberContainer,
|
|
91
|
+
className: r(
|
|
92
|
+
i["number-container"],
|
|
93
|
+
f
|
|
88
94
|
),
|
|
89
|
-
children:
|
|
95
|
+
children: h(m, g)
|
|
90
96
|
}
|
|
91
97
|
),
|
|
92
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ N(
|
|
93
99
|
"div",
|
|
94
100
|
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
101
|
+
"data-testid-react": n == null ? void 0 : n.regionContainer,
|
|
102
|
+
className: r(
|
|
103
|
+
i["region-container"],
|
|
104
|
+
E
|
|
98
105
|
),
|
|
99
106
|
children: [
|
|
100
|
-
/* @__PURE__ */ o(
|
|
101
|
-
|
|
107
|
+
/* @__PURE__ */ o(
|
|
108
|
+
"span",
|
|
109
|
+
{
|
|
110
|
+
"data-testid-react": n == null ? void 0 : n.region,
|
|
111
|
+
className: r(i.region, w),
|
|
112
|
+
children: e
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
/* @__PURE__ */ o(
|
|
116
|
+
"span",
|
|
117
|
+
{
|
|
118
|
+
"data-testid-react": n == null ? void 0 : n.country,
|
|
119
|
+
className: r(i.country, z),
|
|
120
|
+
children: v
|
|
121
|
+
}
|
|
122
|
+
)
|
|
102
123
|
]
|
|
103
124
|
}
|
|
104
125
|
)
|
|
@@ -107,5 +128,5 @@ import '../../assets/GosZnak.css';const E = "_number_1nnii_13", x = "_region_1nn
|
|
|
107
128
|
);
|
|
108
129
|
};
|
|
109
130
|
export {
|
|
110
|
-
|
|
131
|
+
K as GosZnak
|
|
111
132
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EGosZnakSize, EGosZnakType } from './constants';
|
|
2
|
+
import { TDataTestIdReactMap } from '../../types';
|
|
2
3
|
|
|
3
4
|
export type TGosZnakProps = {
|
|
4
5
|
/** Номер государственного знака. Может быть полным номером (например "А123МО199") или номерной частью (например "А123МО") */
|
|
@@ -29,4 +30,8 @@ export type TGosZnakProps = {
|
|
|
29
30
|
copyable?: boolean;
|
|
30
31
|
/** Callback, который вызывается после успешного копирования */
|
|
31
32
|
onCopy?: (copiedText: string) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
35
|
+
*/
|
|
36
|
+
dataTestIdReactMap?: TDataTestIdReactMap<'wrapper' | 'numberContainer' | 'number' | 'regionContainer' | 'region' | 'country'>;
|
|
32
37
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactElement, ComponentProps } from 'react';
|
|
2
|
+
import { TDataTestIdReactMap } from '../../types';
|
|
2
3
|
|
|
3
4
|
type TProps = ComponentProps<'img'> & {
|
|
4
5
|
/**
|
|
@@ -41,6 +42,10 @@ type TProps = ComponentProps<'img'> & {
|
|
|
41
42
|
* Изображение для Super Retina (3x) мобильной версии
|
|
42
43
|
*/
|
|
43
44
|
mobileImage3x?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
47
|
+
*/
|
|
48
|
+
dataTestIdReactMap?: TDataTestIdReactMap<'picture' | 'mobileSource' | 'desktopSource' | 'img'>;
|
|
44
49
|
};
|
|
45
50
|
/**
|
|
46
51
|
* Компонент для отображения изображения с возможность показа загрузки и ошибки
|
|
@@ -1,77 +1,82 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { EMediaQuery as
|
|
5
|
-
import '../../assets/Image.css';const
|
|
6
|
-
picture:
|
|
7
|
-
image:
|
|
8
|
-
loading:
|
|
9
|
-
},
|
|
1
|
+
import { jsxs as Q, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { c as b } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import { memo as $, useState as h, useLayoutEffect as w } from "react";
|
|
4
|
+
import { EMediaQuery as z, EMinMediaQuery as A } from "../../hooks/useMediaQuery/constants.js";
|
|
5
|
+
import '../../assets/Image.css';const C = "_picture_1hx49_2", F = "_image_1hx49_3", H = "_loading_1hx49_10", i = {
|
|
6
|
+
picture: C,
|
|
7
|
+
image: F,
|
|
8
|
+
loading: H
|
|
9
|
+
}, B = $((k) => {
|
|
10
10
|
const {
|
|
11
|
-
className:
|
|
12
|
-
src:
|
|
13
|
-
alt:
|
|
14
|
-
desktopImage:
|
|
11
|
+
className: E,
|
|
12
|
+
src: t,
|
|
13
|
+
alt: N = "image",
|
|
14
|
+
desktopImage: o,
|
|
15
15
|
mobileImage: s,
|
|
16
|
-
pictureClassName:
|
|
17
|
-
errorFallback:
|
|
18
|
-
fallback:
|
|
19
|
-
desktopImage2x:
|
|
20
|
-
mobileImage2x:
|
|
16
|
+
pictureClassName: y,
|
|
17
|
+
errorFallback: n,
|
|
18
|
+
fallback: g,
|
|
19
|
+
desktopImage2x: u,
|
|
20
|
+
mobileImage2x: f,
|
|
21
21
|
desktopImage3x: d,
|
|
22
22
|
mobileImage3x: p,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
dataTestIdReactMap: e,
|
|
24
|
+
...L
|
|
25
|
+
} = k, [c, S] = h(!0), [j, I] = h(!1);
|
|
26
|
+
if (w(() => {
|
|
27
|
+
const r = new Image();
|
|
28
|
+
r.src = t ?? o ?? s ?? "", r.onload = () => {
|
|
29
|
+
S(!1);
|
|
30
|
+
}, r.onerror = () => {
|
|
31
|
+
S(!1), I(!0);
|
|
31
32
|
};
|
|
32
|
-
}, [
|
|
33
|
+
}, [t, o, s]), c && g)
|
|
34
|
+
return g;
|
|
35
|
+
if (j && n)
|
|
33
36
|
return n;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
let c = e;
|
|
38
|
-
return x && (c += `, ${x} 2x`), I && (c += `, ${I} 3x`), c;
|
|
37
|
+
const m = (r, x, _) => {
|
|
38
|
+
let a = r;
|
|
39
|
+
return x && (a += `, ${x} 2x`), _ && (a += `, ${_} 3x`), a;
|
|
39
40
|
};
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ Q(
|
|
41
42
|
"picture",
|
|
42
43
|
{
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
"data-testid-react": e == null ? void 0 : e.picture,
|
|
45
|
+
className: b(i.picture, y, {
|
|
46
|
+
[i.loading]: c
|
|
45
47
|
}),
|
|
46
48
|
children: [
|
|
47
|
-
s && /* @__PURE__ */
|
|
49
|
+
s && /* @__PURE__ */ l(
|
|
48
50
|
"source",
|
|
49
51
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
"data-testid-react": e == null ? void 0 : e.mobileSource,
|
|
53
|
+
srcSet: m(s, f, p),
|
|
54
|
+
media: z.XS1
|
|
52
55
|
}
|
|
53
56
|
),
|
|
54
|
-
|
|
57
|
+
o && /* @__PURE__ */ l(
|
|
55
58
|
"source",
|
|
56
59
|
{
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
"data-testid-react": e == null ? void 0 : e.desktopSource,
|
|
61
|
+
srcSet: m(o, u, d),
|
|
62
|
+
media: A.S
|
|
59
63
|
}
|
|
60
64
|
),
|
|
61
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ l(
|
|
62
66
|
"img",
|
|
63
67
|
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
"data-testid-react": e == null ? void 0 : e.img,
|
|
69
|
+
...L,
|
|
70
|
+
className: b(i.image, E, {
|
|
71
|
+
[i.loading]: c
|
|
67
72
|
}),
|
|
68
73
|
loading: "lazy",
|
|
69
|
-
srcSet:
|
|
70
|
-
|
|
71
|
-
|
|
74
|
+
srcSet: m(
|
|
75
|
+
t ?? "",
|
|
76
|
+
u ?? f,
|
|
72
77
|
d ?? p
|
|
73
78
|
),
|
|
74
|
-
alt:
|
|
79
|
+
alt: N
|
|
75
80
|
}
|
|
76
81
|
)
|
|
77
82
|
]
|
|
@@ -79,5 +84,5 @@ import '../../assets/Image.css';const z = "_picture_1hx49_2", A = "_image_1hx49_
|
|
|
79
84
|
);
|
|
80
85
|
});
|
|
81
86
|
export {
|
|
82
|
-
|
|
87
|
+
B as AppImage
|
|
83
88
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { EInputBorderRadius } from './constants';
|
|
3
3
|
import { TInputProps, TAddon, TIconAddon, TSize, TVariant, TStatus } from './types';
|
|
4
|
+
import { TDataTestIdReactMap } from '../../types';
|
|
4
5
|
|
|
5
6
|
export type TAdditionalProps = {
|
|
6
7
|
/**
|
|
@@ -71,6 +72,10 @@ export type TAdditionalProps = {
|
|
|
71
72
|
* Управление скруглениями углов
|
|
72
73
|
*/
|
|
73
74
|
borderRadius?: EInputBorderRadius | `${EInputBorderRadius}`;
|
|
75
|
+
/**
|
|
76
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
77
|
+
*/
|
|
78
|
+
dataTestIdReactMap?: TDataTestIdReactMap<'wrapper' | 'label' | 'requiredMark' | 'leftSlot' | 'input' | 'rightSlot' | 'clearButton'>;
|
|
74
79
|
};
|
|
75
80
|
export type TProps = TInputProps & TAdditionalProps;
|
|
76
81
|
export declare const Input: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<TInputProps & TAdditionalProps & import('react').RefAttributes<HTMLInputElement>>>;
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "../../index-DIxK0V-G.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./constants.js";
|
|
5
|
-
import { I as f } from "../../Input-
|
|
5
|
+
import { I as f } from "../../Input-CqNPT8os.js";
|
|
6
6
|
import "../../hooks/useMergeRefs/useMergeRefs.js";
|
|
7
7
|
import "../../icons/Icon.js";
|
|
8
8
|
import "../Button/Button.js";
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { TDataTestIdReactMap } from '../../types';
|
|
1
2
|
import { TInputProps } from '../Input';
|
|
2
3
|
|
|
3
4
|
export interface TProps extends TInputProps {
|
|
4
5
|
/** Показывать пароль при удержании кнопки */
|
|
5
6
|
showOnHold?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
9
|
+
*/
|
|
10
|
+
dataTestIdReactMap?: TDataTestIdReactMap<'wrapper' | 'input' | 'eyeButton' | 'eyeIcon'>;
|
|
6
11
|
}
|
|
7
12
|
export declare const InputPassword: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<TProps & import('react').RefAttributes<HTMLInputElement>>>;
|
|
@@ -1,78 +1,89 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { I as
|
|
7
|
-
import '../../assets/InputPassword.css';const
|
|
8
|
-
input:
|
|
9
|
-
wrapper:
|
|
1
|
+
import { jsxs as h, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as N } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import { memo as a, forwardRef as y, useState as C, useCallback as s } from "react";
|
|
4
|
+
import { Icon as v } from "../../icons/Icon.js";
|
|
5
|
+
import { Button as P } from "../Button/Button.js";
|
|
6
|
+
import { I as S } from "../../Input-CqNPT8os.js";
|
|
7
|
+
import '../../assets/InputPassword.css';const k = "_input_7b9x2_2", E = "_wrapper_7b9x2_6", j = "_button_7b9x2_17", B = "_icon_7b9x2_33", D = "_show_7b9x2_38", e = {
|
|
8
|
+
input: k,
|
|
9
|
+
wrapper: E,
|
|
10
10
|
"input-wrapper": "_input-wrapper_7b9x2_13",
|
|
11
11
|
"button-wrapper": "_button-wrapper_7b9x2_17",
|
|
12
|
-
button:
|
|
13
|
-
icon:
|
|
14
|
-
show:
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
({ size:
|
|
18
|
-
const [
|
|
19
|
-
|
|
20
|
-
}, [
|
|
21
|
-
|
|
22
|
-
}, [
|
|
23
|
-
|
|
24
|
-
}, [
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
|
|
28
|
-
}, [
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
|
|
32
|
-
}, [
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"data-testid": "password-input",
|
|
43
|
-
...p
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
/* @__PURE__ */ n("div", { className: s["button-wrapper"], children: /* @__PURE__ */ n(
|
|
47
|
-
M,
|
|
48
|
-
{
|
|
49
|
-
clear: !0,
|
|
50
|
-
type: "button",
|
|
51
|
-
className: s.button,
|
|
52
|
-
onClick: i,
|
|
53
|
-
onMouseDown: u,
|
|
54
|
-
onMouseUp: m,
|
|
55
|
-
onMouseLeave: f,
|
|
56
|
-
onTouchStart: _,
|
|
57
|
-
onTouchEnd: l,
|
|
58
|
-
onTouchCancel: b,
|
|
59
|
-
"data-testid": "eye-icon",
|
|
60
|
-
children: /* @__PURE__ */ n(
|
|
61
|
-
C,
|
|
12
|
+
button: j,
|
|
13
|
+
icon: B,
|
|
14
|
+
show: D
|
|
15
|
+
}, L = a(
|
|
16
|
+
y(
|
|
17
|
+
({ size: p, showOnHold: r = !1, dataTestIdReactMap: n, ...t }, c) => {
|
|
18
|
+
const [i, o] = C(!1), m = s(() => {
|
|
19
|
+
r || o(!i);
|
|
20
|
+
}, [r, i]), f = s(() => {
|
|
21
|
+
r && o(!0);
|
|
22
|
+
}, [r]), _ = s(() => {
|
|
23
|
+
r && o(!1);
|
|
24
|
+
}, [r]), l = s(() => {
|
|
25
|
+
r && o(!1);
|
|
26
|
+
}, [r]), b = s(() => {
|
|
27
|
+
r && o(!0);
|
|
28
|
+
}, [r]), w = s(() => {
|
|
29
|
+
r && o(!1);
|
|
30
|
+
}, [r]), x = s(() => {
|
|
31
|
+
r && o(!1);
|
|
32
|
+
}, [r]);
|
|
33
|
+
return /* @__PURE__ */ h(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
"data-testid-react": n == null ? void 0 : n.wrapper,
|
|
37
|
+
className: e.wrapper,
|
|
38
|
+
"data-testid": "input-password-wrapper",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ u(
|
|
41
|
+
S,
|
|
62
42
|
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
43
|
+
ref: c,
|
|
44
|
+
className: e.input,
|
|
45
|
+
wrapperClassName: e["input-wrapper"],
|
|
46
|
+
size: p,
|
|
47
|
+
type: i ? "text" : "password",
|
|
48
|
+
"data-testid": "password-input",
|
|
49
|
+
dataTestIdReactMap: { input: n == null ? void 0 : n.input },
|
|
50
|
+
...t
|
|
67
51
|
}
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ u("div", { className: e["button-wrapper"], children: /* @__PURE__ */ u(
|
|
54
|
+
P,
|
|
55
|
+
{
|
|
56
|
+
dataTestIdReactMap: { button: n == null ? void 0 : n.eyeButton },
|
|
57
|
+
clear: !0,
|
|
58
|
+
type: "button",
|
|
59
|
+
className: e.button,
|
|
60
|
+
onClick: m,
|
|
61
|
+
onMouseDown: f,
|
|
62
|
+
onMouseUp: _,
|
|
63
|
+
onMouseLeave: l,
|
|
64
|
+
onTouchStart: b,
|
|
65
|
+
onTouchEnd: w,
|
|
66
|
+
onTouchCancel: x,
|
|
67
|
+
"data-testid": "eye-icon",
|
|
68
|
+
children: /* @__PURE__ */ u(
|
|
69
|
+
v,
|
|
70
|
+
{
|
|
71
|
+
"data-testid-react": n == null ? void 0 : n.eyeIcon,
|
|
72
|
+
className: N(e.icon, {
|
|
73
|
+
[e.show]: i
|
|
74
|
+
}),
|
|
75
|
+
iconName: "Eye24px"
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
) })
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
);
|
|
72
83
|
}
|
|
73
84
|
)
|
|
74
85
|
);
|
|
75
|
-
|
|
86
|
+
L.displayName = "InputPassword";
|
|
76
87
|
export {
|
|
77
|
-
|
|
88
|
+
L as InputPassword
|
|
78
89
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { TDataTestIdReactMap } from '../../types';
|
|
2
|
+
|
|
1
3
|
export type ImperativeHandle = Partial<HTMLInputElement> & {
|
|
2
4
|
getPhoneNumber: () => string;
|
|
3
5
|
};
|
|
4
|
-
export declare const InputPhoneNumber: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<import('../Input/types').TInputProps & import('../Input').TAdditionalProps &
|
|
6
|
+
export declare const InputPhoneNumber: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<import('../Input/types').TInputProps & import('../Input').TAdditionalProps & {
|
|
7
|
+
dataTestIdReactMap?: TDataTestIdReactMap<"input">;
|
|
8
|
+
} & import('react').RefAttributes<HTMLInputElement>>>;
|