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.
Files changed (59) hide show
  1. package/dist/Input-CqNPT8os.js +243 -0
  2. package/dist/components/Accordion/Accordion.d.ts +5 -0
  3. package/dist/components/Accordion/Accordion.js +242 -220
  4. package/dist/components/Accordion/AccordionItem/AccordionItem.d.ts +6 -1
  5. package/dist/components/Accordion/AccordionItem/AccordionItem.js +19 -8
  6. package/dist/components/Button/Button.d.ts +37 -0
  7. package/dist/components/Button/Button.js +77 -61
  8. package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +9 -0
  9. package/dist/components/CheckboxMimir/CheckboxMimir.js +90 -59
  10. package/dist/components/DatePicker/DatePicker.js +1 -1
  11. package/dist/components/Drawer/Drawer.d.ts +5 -0
  12. package/dist/components/Drawer/Drawer.js +141 -135
  13. package/dist/components/DropdownSelect/DropdownSelect.js +25 -23
  14. package/dist/components/DropdownSelect/types.d.ts +4 -0
  15. package/dist/components/GosZnak/GosZnak.d.ts +1 -1
  16. package/dist/components/GosZnak/GosZnak.js +88 -67
  17. package/dist/components/GosZnak/types.d.ts +5 -0
  18. package/dist/components/Image/Image.d.ts +5 -0
  19. package/dist/components/Image/Image.js +55 -50
  20. package/dist/components/Input/Input.d.ts +5 -0
  21. package/dist/components/Input/Input.js +1 -1
  22. package/dist/components/Input/index.js +1 -1
  23. package/dist/components/InputPassword/InputPassword.d.ts +5 -0
  24. package/dist/components/InputPassword/InputPassword.js +80 -69
  25. package/dist/components/InputPhoneNumber/InputPhoneNumber.d.ts +5 -1
  26. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +39 -32
  27. package/dist/components/Loader/Loader.d.ts +6 -1
  28. package/dist/components/Loader/Loader.js +37 -14
  29. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +1 -1
  30. package/dist/components/MultiSelectSearch/hooks/useRenderVirtualizedList.d.ts +2 -1
  31. package/dist/components/MultiSelectSearch/hooks/useRenderVirtualizedList.js +50 -48
  32. package/dist/components/MultiSelectSearch/utils.js +1 -1
  33. package/dist/components/OtpInput/OtpInput.js +1 -1
  34. package/dist/components/RadioGroup/RadioGroup.d.ts +9 -0
  35. package/dist/components/RadioGroup/RadioGroup.js +142 -129
  36. package/dist/components/SelectSearch/SelectSearch.d.ts +2 -0
  37. package/dist/components/SelectSearch/SelectSearch.js +299 -275
  38. package/dist/components/SelectSearch/types.d.ts +9 -0
  39. package/dist/components/SelectSearch/utils.js +1 -1
  40. package/dist/components/TextArea/TextArea.d.ts +1 -1
  41. package/dist/components/TextArea/TextArea.js +1 -1
  42. package/dist/components/TextAreaV2/TextArea.js +155 -142
  43. package/dist/components/TextAreaV2/types.d.ts +5 -0
  44. package/dist/components/UniversalUploader/UniversalUploader.d.ts +1 -0
  45. package/dist/components/UniversalUploader/UniversalUploader.js +89 -86
  46. package/dist/components/UniversalUploader/types.d.ts +5 -0
  47. package/dist/components/Uploader/Uploader.d.ts +5 -0
  48. package/dist/components/Uploader/Uploader.js +116 -87
  49. package/dist/components/UploaderFiles/UploaderFiles.js +88 -79
  50. package/dist/components/UploaderFiles/types.d.ts +5 -0
  51. package/dist/components/UploaderPhotos/UploaderPhotos.d.ts +5 -0
  52. package/dist/components/UploaderPhotos/UploaderPhotos.js +60 -57
  53. package/dist/components/index.js +1 -1
  54. package/dist/index.js +1 -1
  55. package/dist/types/dataTestId.d.ts +1 -0
  56. package/dist/types/dataTestId.js +1 -0
  57. package/dist/types/index.d.ts +1 -0
  58. package/package.json +1 -1
  59. package/dist/Input-DPnH8pKc.js +0 -227
@@ -1,104 +1,125 @@
1
- import { jsx as o, jsxs as f } from "react/jsx-runtime";
2
- import { c as i } from "../../index-DIxK0V-G.js";
3
- import { EGosZnakSize as k, EGosZnakType as T, COPY_TEXT_TITLE as z } from "./constants.js";
4
- import '../../assets/GosZnak.css';const E = "_number_1nnii_13", x = "_region_1nnii_32", G = "_country_1nnii_46", Z = "_l_1nnii_53", j = "_s_1nnii_62", w = "_normal_1nnii_71", L = "_traffic_1nnii_78", F = "_military_1nnii_85", I = "_police_1nnii_92", O = "_diplomatic_1nnii_99", P = "_simplified_1nnii_112", n = {
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: E,
6
+ number: L,
7
7
  "number-container": "_number-container_1nnii_22",
8
- region: x,
8
+ region: C,
9
9
  "region-container": "_region-container_1nnii_38",
10
- country: G,
11
- l: Z,
12
- s: j,
13
- normal: w,
14
- traffic: L,
15
- military: F,
16
- police: I,
17
- diplomatic: O,
18
- simplified: P,
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
- }, q = ({
21
- number: e,
22
- region: u,
23
- country: g,
24
- size: a = k.L,
25
- type: s = T.Normal,
26
- className: t,
27
- numberClassName: y,
28
- regionClassName: b,
29
- countryClassName: h,
30
- numberContainerClassName: _,
31
- regionContainerClassName: N,
32
- simplified: l = !1,
33
- copyable: m = !1,
34
- onCopy: d
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 v = async (r) => {
37
+ const x = async (_) => {
37
38
  try {
38
- await navigator.clipboard.writeText(r), d && d(r);
39
- } catch (c) {
40
- console.error("Failed to copy text: ", c);
39
+ await navigator.clipboard.writeText(_), y && y(_);
40
+ } catch (l) {
41
+ console.error("Failed to copy text: ", l);
41
42
  }
42
- }, p = (r, c = !1) => /* @__PURE__ */ o(
43
+ }, h = (_, l = !1) => /* @__PURE__ */ o(
43
44
  "span",
44
45
  {
45
- className: i(
46
- n.number,
47
- c && n["copyable-number"],
48
- l && n["simplified-number"],
49
- y
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: c ? () => v(r) : void 0,
52
- title: c ? z : void 0,
53
- children: r
53
+ onClick: l ? () => x(_) : void 0,
54
+ title: l ? j : void 0,
55
+ children: _
54
56
  }
55
57
  );
56
- return l ? /* @__PURE__ */ o(
58
+ return b ? /* @__PURE__ */ o(
57
59
  "div",
58
60
  {
59
- className: i(
60
- n["gos-znak"],
61
- n[a],
62
- n[s],
63
- n.simplified,
64
- t
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
- className: i(
70
- n["number-container"],
71
- _
72
+ "data-testid-react": n == null ? void 0 : n.numberContainer,
73
+ className: r(
74
+ i["number-container"],
75
+ f
72
76
  ),
73
- children: p(e, m)
77
+ children: h(m, g)
74
78
  }
75
79
  )
76
80
  }
77
- ) : /* @__PURE__ */ f(
81
+ ) : /* @__PURE__ */ N(
78
82
  "div",
79
83
  {
80
- className: i(n["gos-znak"], n[a], n[s], t),
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
- className: i(
86
- n["number-container"],
87
- _
90
+ "data-testid-react": n == null ? void 0 : n.numberContainer,
91
+ className: r(
92
+ i["number-container"],
93
+ f
88
94
  ),
89
- children: p(e, m)
95
+ children: h(m, g)
90
96
  }
91
97
  ),
92
- /* @__PURE__ */ f(
98
+ /* @__PURE__ */ N(
93
99
  "div",
94
100
  {
95
- className: i(
96
- n["region-container"],
97
- N
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("span", { className: i(n.region, b), children: u }),
101
- /* @__PURE__ */ o("span", { className: i(n.country, h), children: g })
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
- q as GosZnak
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 M, jsx as m } from "react/jsx-runtime";
2
- import { c as S } from "../../index-DIxK0V-G.js";
3
- import { memo as j, useState as _, useLayoutEffect as Q } from "react";
4
- import { EMediaQuery as $, EMinMediaQuery as w } from "../../hooks/useMediaQuery/constants.js";
5
- import '../../assets/Image.css';const z = "_picture_1hx49_2", A = "_image_1hx49_3", C = "_loading_1hx49_10", a = {
6
- picture: z,
7
- image: A,
8
- loading: C
9
- }, q = j((h) => {
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: b,
12
- src: o,
13
- alt: k = "image",
14
- desktopImage: r,
11
+ className: E,
12
+ src: t,
13
+ alt: N = "image",
14
+ desktopImage: o,
15
15
  mobileImage: s,
16
- pictureClassName: E,
17
- errorFallback: l,
18
- fallback: n,
19
- desktopImage2x: g,
20
- mobileImage2x: u,
16
+ pictureClassName: y,
17
+ errorFallback: n,
18
+ fallback: g,
19
+ desktopImage2x: u,
20
+ mobileImage2x: f,
21
21
  desktopImage3x: d,
22
22
  mobileImage3x: p,
23
- ...N
24
- } = h, [t, f] = _(!0), [y, L] = _(!1);
25
- if (Q(() => {
26
- const e = new Image();
27
- e.src = o ?? r ?? s ?? "", e.onload = () => {
28
- f(!1);
29
- }, e.onerror = () => {
30
- f(!1), L(!0);
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
- }, [o, r, s]), t && n)
33
+ }, [t, o, s]), c && g)
34
+ return g;
35
+ if (j && n)
33
36
  return n;
34
- if (y && l)
35
- return l;
36
- const i = (e, x, I) => {
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__ */ M(
41
+ return /* @__PURE__ */ Q(
41
42
  "picture",
42
43
  {
43
- className: S(a.picture, E, {
44
- [a.loading]: t
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__ */ m(
49
+ s && /* @__PURE__ */ l(
48
50
  "source",
49
51
  {
50
- srcSet: i(s, u, p),
51
- media: $.XS1
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
- r && /* @__PURE__ */ m(
57
+ o && /* @__PURE__ */ l(
55
58
  "source",
56
59
  {
57
- srcSet: i(r, g, d),
58
- media: w.S
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__ */ m(
65
+ /* @__PURE__ */ l(
62
66
  "img",
63
67
  {
64
- ...N,
65
- className: S(a.image, b, {
66
- [a.loading]: t
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: i(
70
- o ?? "",
71
- g ?? u,
74
+ srcSet: m(
75
+ t ?? "",
76
+ u ?? f,
72
77
  d ?? p
73
78
  ),
74
- alt: k
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
- q as AppImage
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-DPnH8pKc.js";
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,4 +1,4 @@
1
- import { I as n } from "../../Input-DPnH8pKc.js";
1
+ import { I as n } from "../../Input-CqNPT8os.js";
2
2
  import { EInputSize as u, EInputStatus as I, EInputVariant as a } from "./constants.js";
3
3
  export {
4
4
  u as EInputSize,
@@ -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 d, jsx as n } from "react/jsx-runtime";
2
- import { c as w } from "../../index-DIxK0V-G.js";
3
- import { memo as x, forwardRef as h, useState as N, useCallback as a } from "react";
4
- import { Icon as C } from "../../icons/Icon.js";
5
- import { Button as M } from "../Button/Button.js";
6
- import { I as T } from "../../Input-DPnH8pKc.js";
7
- import '../../assets/InputPassword.css';const y = "_input_7b9x2_2", I = "_wrapper_7b9x2_6", v = "_button_7b9x2_17", P = "_icon_7b9x2_33", S = "_show_7b9x2_38", s = {
8
- input: y,
9
- wrapper: I,
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: v,
13
- icon: P,
14
- show: S
15
- }, k = x(
16
- h(
17
- ({ size: o, showOnHold: t = !1, ...p }, c) => {
18
- const [r, e] = N(!1), i = a(() => {
19
- t || e(!r);
20
- }, [t, r]), u = a(() => {
21
- t && e(!0);
22
- }, [t]), m = a(() => {
23
- t && e(!1);
24
- }, [t]), f = a(() => {
25
- t && e(!1);
26
- }, [t]), _ = a(() => {
27
- t && e(!0);
28
- }, [t]), l = a(() => {
29
- t && e(!1);
30
- }, [t]), b = a(() => {
31
- t && e(!1);
32
- }, [t]);
33
- return /* @__PURE__ */ d("div", { className: s.wrapper, "data-testid": "input-password-wrapper", children: [
34
- /* @__PURE__ */ n(
35
- T,
36
- {
37
- ref: c,
38
- className: s.input,
39
- wrapperClassName: s["input-wrapper"],
40
- size: o,
41
- type: r ? "text" : "password",
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
- className: w(s.icon, {
64
- [s.show]: r
65
- }),
66
- iconName: "Eye24px"
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
- k.displayName = "InputPassword";
86
+ L.displayName = "InputPassword";
76
87
  export {
77
- k as InputPassword
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 & import('react').RefAttributes<HTMLInputElement>>>;
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>>>;