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,6 +1,7 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { TCommonButtonProps } from './types';
|
|
3
3
|
import { TIcon } from '../../icons';
|
|
4
|
+
import { TDataTestIdReactMap } from '../../types';
|
|
4
5
|
|
|
5
6
|
export type TProps = TCommonButtonProps & ComponentProps<'button'> & {
|
|
6
7
|
/**
|
|
@@ -31,6 +32,10 @@ export type TProps = TCommonButtonProps & ComponentProps<'button'> & {
|
|
|
31
32
|
* Идентификатор формы, к которой привязана кнопка.
|
|
32
33
|
*/
|
|
33
34
|
formId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
37
|
+
*/
|
|
38
|
+
dataTestIdReactMap?: TDataTestIdReactMap<'button' | 'isIconButton' | 'count'>;
|
|
34
39
|
};
|
|
35
40
|
/**
|
|
36
41
|
* Компонент кнопки, который можно настраивать с различными темами и размерами.
|
|
@@ -69,6 +74,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
|
|
|
69
74
|
* Идентификатор формы, к которой привязана кнопка.
|
|
70
75
|
*/
|
|
71
76
|
formId?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
79
|
+
*/
|
|
80
|
+
dataTestIdReactMap?: TDataTestIdReactMap<"button" | "isIconButton" | "count">;
|
|
72
81
|
}, "ref"> | Omit<import('./types').TButtonDefaultFormProps & {
|
|
73
82
|
isIconButton?: false;
|
|
74
83
|
iconName?: never;
|
|
@@ -103,6 +112,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
|
|
|
103
112
|
* Идентификатор формы, к которой привязана кнопка.
|
|
104
113
|
*/
|
|
105
114
|
formId?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
117
|
+
*/
|
|
118
|
+
dataTestIdReactMap?: TDataTestIdReactMap<"button" | "isIconButton" | "count">;
|
|
106
119
|
}, "ref"> | Omit<import('./types').TButtonRoundFormProps & {
|
|
107
120
|
isIconButton: true;
|
|
108
121
|
iconName: TIcon;
|
|
@@ -137,6 +150,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
|
|
|
137
150
|
* Идентификатор формы, к которой привязана кнопка.
|
|
138
151
|
*/
|
|
139
152
|
formId?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
155
|
+
*/
|
|
156
|
+
dataTestIdReactMap?: TDataTestIdReactMap<"button" | "isIconButton" | "count">;
|
|
140
157
|
}, "ref"> | Omit<import('./types').TButtonRoundFormProps & {
|
|
141
158
|
isIconButton?: false;
|
|
142
159
|
iconName?: never;
|
|
@@ -171,6 +188,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
|
|
|
171
188
|
* Идентификатор формы, к которой привязана кнопка.
|
|
172
189
|
*/
|
|
173
190
|
formId?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
193
|
+
*/
|
|
194
|
+
dataTestIdReactMap?: TDataTestIdReactMap<"button" | "isIconButton" | "count">;
|
|
174
195
|
}, "ref"> | Omit<import('./types').TButtonOutlineFormProps & {
|
|
175
196
|
isIconButton: true;
|
|
176
197
|
iconName: TIcon;
|
|
@@ -205,6 +226,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
|
|
|
205
226
|
* Идентификатор формы, к которой привязана кнопка.
|
|
206
227
|
*/
|
|
207
228
|
formId?: string;
|
|
229
|
+
/**
|
|
230
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
231
|
+
*/
|
|
232
|
+
dataTestIdReactMap?: TDataTestIdReactMap<"button" | "isIconButton" | "count">;
|
|
208
233
|
}, "ref"> | Omit<import('./types').TButtonOutlineFormProps & {
|
|
209
234
|
isIconButton?: false;
|
|
210
235
|
iconName?: never;
|
|
@@ -239,6 +264,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
|
|
|
239
264
|
* Идентификатор формы, к которой привязана кнопка.
|
|
240
265
|
*/
|
|
241
266
|
formId?: string;
|
|
267
|
+
/**
|
|
268
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
269
|
+
*/
|
|
270
|
+
dataTestIdReactMap?: TDataTestIdReactMap<"button" | "isIconButton" | "count">;
|
|
242
271
|
}, "ref"> | Omit<import('./types').TButtonBorderlessFormProps & {
|
|
243
272
|
isIconButton: true;
|
|
244
273
|
iconName: TIcon;
|
|
@@ -273,6 +302,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
|
|
|
273
302
|
* Идентификатор формы, к которой привязана кнопка.
|
|
274
303
|
*/
|
|
275
304
|
formId?: string;
|
|
305
|
+
/**
|
|
306
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
307
|
+
*/
|
|
308
|
+
dataTestIdReactMap?: TDataTestIdReactMap<"button" | "isIconButton" | "count">;
|
|
276
309
|
}, "ref"> | Omit<import('./types').TButtonBorderlessFormProps & {
|
|
277
310
|
isIconButton?: false;
|
|
278
311
|
iconName?: never;
|
|
@@ -307,4 +340,8 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
|
|
|
307
340
|
* Идентификатор формы, к которой привязана кнопка.
|
|
308
341
|
*/
|
|
309
342
|
formId?: string;
|
|
343
|
+
/**
|
|
344
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
345
|
+
*/
|
|
346
|
+
dataTestIdReactMap?: TDataTestIdReactMap<"button" | "isIconButton" | "count">;
|
|
310
347
|
}, "ref">) & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c } from "../../index-DIxK0V-G.js";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { EButtonVariantDefault as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import '../../assets/Button.css';const
|
|
7
|
-
button:
|
|
8
|
-
clear:
|
|
9
|
-
count:
|
|
1
|
+
import { jsxs as k, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as i } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import { forwardRef as C } from "react";
|
|
4
|
+
import { EButtonVariantDefault as j, EButtonForm as D } from "./constants.js";
|
|
5
|
+
import { Icon as E } from "../../icons/Icon.js";
|
|
6
|
+
import '../../assets/Button.css';const P = "_button_1qnsv_2", z = "_clear_1qnsv_42", F = "_count_1qnsv_53", I = "_black_1qnsv_132", S = "_gray_1qnsv_141", V = "_white_1qnsv_150", A = "_xs_1qnsv_250", G = "_s_1qnsv_83", H = "_m_1qnsv_259", J = "_l_1qnsv_283", K = "_xl_1qnsv_291", L = "_xxl_1qnsv_299", O = "_full_1qnsv_314", Q = "_disabled_1qnsv_320", s = {
|
|
7
|
+
button: P,
|
|
8
|
+
clear: z,
|
|
9
|
+
count: F,
|
|
10
10
|
"default-button": "_default-button_1qnsv_61",
|
|
11
11
|
"primary-sapphire": "_primary-sapphire_1qnsv_64",
|
|
12
12
|
"primary-citrine": "_primary-citrine_1qnsv_73",
|
|
@@ -15,9 +15,9 @@ import '../../assets/Button.css';const D = "_button_1qnsv_2", E = "_clear_1qnsv_
|
|
|
15
15
|
"secondary-white": "_secondary-white_1qnsv_101",
|
|
16
16
|
"secondary-red": "_secondary-red_1qnsv_110",
|
|
17
17
|
"round-button": "_round-button_1qnsv_120",
|
|
18
|
-
black:
|
|
19
|
-
gray:
|
|
20
|
-
white:
|
|
18
|
+
black: I,
|
|
19
|
+
gray: S,
|
|
20
|
+
white: V,
|
|
21
21
|
"outline-button": "_outline-button_1qnsv_160",
|
|
22
22
|
"outline-asphalt": "_outline-asphalt_1qnsv_168",
|
|
23
23
|
"outline-gray": "_outline-gray_1qnsv_176",
|
|
@@ -28,73 +28,89 @@ import '../../assets/Button.css';const D = "_button_1qnsv_2", E = "_clear_1qnsv_
|
|
|
28
28
|
"borderless-gray": "_borderless-gray_1qnsv_216",
|
|
29
29
|
"borderless-white": "_borderless-white_1qnsv_221",
|
|
30
30
|
"borderless-red": "_borderless-red_1qnsv_226",
|
|
31
|
-
xs:
|
|
31
|
+
xs: A,
|
|
32
32
|
"m-s": "_m-s_1qnsv_259",
|
|
33
|
-
s:
|
|
34
|
-
m:
|
|
35
|
-
l:
|
|
36
|
-
xl:
|
|
37
|
-
xxl:
|
|
38
|
-
full:
|
|
39
|
-
disabled:
|
|
33
|
+
s: G,
|
|
34
|
+
m: H,
|
|
35
|
+
l: J,
|
|
36
|
+
xl: K,
|
|
37
|
+
xxl: L,
|
|
38
|
+
full: O,
|
|
39
|
+
disabled: Q,
|
|
40
40
|
"icon-button": "_icon-button_1qnsv_341"
|
|
41
|
-
},
|
|
42
|
-
(
|
|
41
|
+
}, U = C(
|
|
42
|
+
(u, d) => {
|
|
43
43
|
const {
|
|
44
|
-
size:
|
|
45
|
-
variant:
|
|
46
|
-
form:
|
|
47
|
-
full:
|
|
48
|
-
clear:
|
|
44
|
+
size: _ = "m",
|
|
45
|
+
variant: b = j.PrimarySapphire,
|
|
46
|
+
form: r = D.DefaultButton,
|
|
47
|
+
full: m,
|
|
48
|
+
clear: t,
|
|
49
49
|
isIconButton: e = !1,
|
|
50
|
-
iconName:
|
|
51
|
-
children:
|
|
52
|
-
className:
|
|
53
|
-
iconButtonClassName:
|
|
54
|
-
formId:
|
|
55
|
-
type:
|
|
56
|
-
rightIcon:
|
|
57
|
-
count:
|
|
58
|
-
leftIcon:
|
|
59
|
-
disabled:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
[s.
|
|
64
|
-
[s.
|
|
65
|
-
[s
|
|
50
|
+
iconName: v,
|
|
51
|
+
children: q,
|
|
52
|
+
className: y,
|
|
53
|
+
iconButtonClassName: h,
|
|
54
|
+
formId: f,
|
|
55
|
+
type: p = "button",
|
|
56
|
+
rightIcon: x,
|
|
57
|
+
count: l,
|
|
58
|
+
leftIcon: g,
|
|
59
|
+
disabled: o,
|
|
60
|
+
dataTestIdReactMap: n,
|
|
61
|
+
...w
|
|
62
|
+
} = u, a = {
|
|
63
|
+
[s.full]: m && !t,
|
|
64
|
+
[s.disabled]: o && !t,
|
|
65
|
+
[s.clear]: t,
|
|
66
|
+
[s[b ?? ""]]: !o || t,
|
|
66
67
|
[s["icon-button"]]: e
|
|
67
|
-
},
|
|
68
|
-
|
|
68
|
+
}, N = i(
|
|
69
|
+
y,
|
|
69
70
|
s.button,
|
|
70
71
|
a,
|
|
71
|
-
|
|
72
|
-
),
|
|
72
|
+
t ? [] : [s[r ?? ""], s[_]]
|
|
73
|
+
), B = i(
|
|
73
74
|
s.count,
|
|
74
75
|
a,
|
|
75
|
-
s[
|
|
76
|
-
s[
|
|
76
|
+
s[_],
|
|
77
|
+
s[r ?? ""]
|
|
77
78
|
);
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
+
return /* @__PURE__ */ k(
|
|
79
80
|
"button",
|
|
80
81
|
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
"data-testid-react": n == null ? void 0 : n.button,
|
|
83
|
+
type: p,
|
|
84
|
+
form: f,
|
|
85
|
+
...w,
|
|
86
|
+
disabled: o,
|
|
87
|
+
ref: d,
|
|
88
|
+
className: N,
|
|
87
89
|
children: [
|
|
90
|
+
g,
|
|
91
|
+
e ? /* @__PURE__ */ c(
|
|
92
|
+
E,
|
|
93
|
+
{
|
|
94
|
+
"data-testid-react": n == null ? void 0 : n.isIconButton,
|
|
95
|
+
iconName: v,
|
|
96
|
+
className: h
|
|
97
|
+
}
|
|
98
|
+
) : q,
|
|
88
99
|
x,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
100
|
+
!!l && /* @__PURE__ */ c(
|
|
101
|
+
"span",
|
|
102
|
+
{
|
|
103
|
+
"data-testid-react": n == null ? void 0 : n.count,
|
|
104
|
+
className: B,
|
|
105
|
+
children: l
|
|
106
|
+
}
|
|
107
|
+
)
|
|
92
108
|
]
|
|
93
109
|
}
|
|
94
110
|
);
|
|
95
111
|
}
|
|
96
112
|
);
|
|
97
|
-
|
|
113
|
+
U.displayName = "Button";
|
|
98
114
|
export {
|
|
99
|
-
|
|
115
|
+
U as Button
|
|
100
116
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CheckboxProps } from '@headlessui/react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { TDataTestIdReactMap } from '../../types';
|
|
3
4
|
|
|
4
5
|
export type TCheckboxMimirProps = CheckboxProps & {
|
|
5
6
|
children?: ReactNode;
|
|
@@ -9,6 +10,10 @@ export type TCheckboxMimirProps = CheckboxProps & {
|
|
|
9
10
|
className?: string;
|
|
10
11
|
containerClassName?: string;
|
|
11
12
|
labelClassName?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
15
|
+
*/
|
|
16
|
+
dataTestIdReactMap?: TDataTestIdReactMap<'checkbox' | 'field' | 'label' | 'iconMinus' | 'iconDone'>;
|
|
12
17
|
};
|
|
13
18
|
export declare const CheckboxMimir: import('react').ForwardRefExoticComponent<{
|
|
14
19
|
suppressHydrationWarning?: boolean | undefined;
|
|
@@ -308,4 +313,8 @@ export declare const CheckboxMimir: import('react').ForwardRefExoticComponent<{
|
|
|
308
313
|
className?: string;
|
|
309
314
|
containerClassName?: string;
|
|
310
315
|
labelClassName?: string;
|
|
316
|
+
/**
|
|
317
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
318
|
+
*/
|
|
319
|
+
dataTestIdReactMap?: TDataTestIdReactMap<"checkbox" | "field" | "label" | "iconMinus" | "iconDone">;
|
|
311
320
|
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,71 +1,102 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { W, p as
|
|
3
|
-
import
|
|
4
|
-
import { w as
|
|
5
|
-
import { u as
|
|
6
|
-
import { r as
|
|
7
|
-
import { H as
|
|
8
|
-
import { c as
|
|
9
|
-
import { Icon as
|
|
10
|
-
import '../../assets/CheckboxMimir.css';let
|
|
11
|
-
function he(
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs as z, jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { W as J, p as Q, o as f, $ as Y, b as Z, D as I, H as M, c as E } from "../../keyboard-wis2TUql.js";
|
|
3
|
+
import C, { useId as R, useState as T, useMemo as ee, useCallback as oe, forwardRef as re } from "react";
|
|
4
|
+
import { w as ne } from "../../use-active-press-CnDeVvQq.js";
|
|
5
|
+
import { u as ie, a as ae, b as se, T as ce, I as le, G as te, j as de, p as ue, K as me } from "../../label-BmphTIGY.js";
|
|
6
|
+
import { r as be } from "../../bugs-diTMAGNw.js";
|
|
7
|
+
import { H as fe } from "../../field-BLi5834s.js";
|
|
8
|
+
import { c as N } from "../../index-DIxK0V-G.js";
|
|
9
|
+
import { Icon as K } from "../../icons/Icon.js";
|
|
10
|
+
import '../../assets/CheckboxMimir.css';let pe = "span";
|
|
11
|
+
function he(p, h) {
|
|
12
|
+
let l = R(), k = ie(), t = ae(), { id: d = k || `headlessui-checkbox-${l}`, disabled: o = t || !1, autoFocus: n = !1, checked: v, defaultChecked: x, onChange: _, name: u, value: e, form: $, indeterminate: m = !1, ...j } = p, a = se(x), [s, c] = ce(v, _, a ?? !1), w = le(), G = te(), S = Q(), [g, D] = T(!1), P = f(() => {
|
|
13
|
+
D(!0), c == null || c(!s), S.nextFrame(() => {
|
|
14
|
+
D(!1);
|
|
15
15
|
});
|
|
16
|
-
}),
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
}),
|
|
20
|
-
|
|
21
|
-
}),
|
|
22
|
-
if (
|
|
23
|
-
}, [c,
|
|
24
|
-
return
|
|
16
|
+
}), U = f((r) => {
|
|
17
|
+
if (be(r.currentTarget)) return r.preventDefault();
|
|
18
|
+
r.preventDefault(), P();
|
|
19
|
+
}), A = f((r) => {
|
|
20
|
+
r.key === E.Space ? (r.preventDefault(), P()) : r.key === E.Enter && ue(r.currentTarget);
|
|
21
|
+
}), B = f((r) => r.preventDefault()), { isFocusVisible: y, focusProps: L } = Y({ autoFocus: n }), { isHovered: F, hoverProps: O } = Z({ isDisabled: o }), { pressed: H, pressProps: V } = ne({ disabled: o }), W = I({ ref: h, id: d, role: "checkbox", "aria-checked": m ? "mixed" : s ? "true" : "false", "aria-labelledby": w, "aria-describedby": G, "aria-disabled": o ? !0 : void 0, indeterminate: m ? "true" : void 0, tabIndex: o ? void 0 : 0, onKeyUp: o ? void 0 : A, onKeyPress: o ? void 0 : B, onClick: o ? void 0 : U }, L, O, V), X = ee(() => ({ checked: s, disabled: o, hover: F, focus: y, active: H, indeterminate: m, changing: g, autofocus: n }), [s, m, o, F, y, H, g, n]), q = oe(() => {
|
|
22
|
+
if (a !== void 0) return c == null ? void 0 : c(a);
|
|
23
|
+
}, [c, a]);
|
|
24
|
+
return C.createElement(C.Fragment, null, u != null && C.createElement(de, { disabled: o, data: { [u]: e || "on" }, overrides: { type: "checkbox", checked: s }, form: $, onReset: q }), M({ ourProps: W, theirProps: j, slot: X, defaultTag: pe, name: "Checkbox" }));
|
|
25
25
|
}
|
|
26
|
-
let
|
|
27
|
-
const
|
|
28
|
-
container:
|
|
29
|
-
checkbox:
|
|
26
|
+
let ke = J(he);
|
|
27
|
+
const ve = "_container_9u4lp_2", xe = "_checkbox_9u4lp_8", _e = "_enabled_9u4lp_40", $e = "_label_9u4lp_56", i = {
|
|
28
|
+
container: ve,
|
|
29
|
+
checkbox: xe,
|
|
30
30
|
"icon-done": "_icon-done_9u4lp_21",
|
|
31
31
|
"icon-minus": "_icon-minus_9u4lp_27",
|
|
32
|
-
enabled:
|
|
32
|
+
enabled: _e,
|
|
33
33
|
label: $e
|
|
34
|
-
},
|
|
35
|
-
(
|
|
34
|
+
}, Ke = re(
|
|
35
|
+
(p, h) => {
|
|
36
36
|
const {
|
|
37
|
-
checked:
|
|
38
|
-
onChange:
|
|
37
|
+
checked: l,
|
|
38
|
+
onChange: k,
|
|
39
39
|
children: t,
|
|
40
|
-
id:
|
|
41
|
-
isInteractive:
|
|
42
|
-
disabled:
|
|
40
|
+
id: d,
|
|
41
|
+
isInteractive: o = !0,
|
|
42
|
+
disabled: n = !1,
|
|
43
43
|
className: v,
|
|
44
|
-
containerClassName:
|
|
45
|
-
isMinusIcon:
|
|
46
|
-
labelClassName:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
44
|
+
containerClassName: x,
|
|
45
|
+
isMinusIcon: _ = !1,
|
|
46
|
+
labelClassName: u,
|
|
47
|
+
dataTestIdReactMap: e,
|
|
48
|
+
...$
|
|
49
|
+
} = p;
|
|
50
|
+
return /* @__PURE__ */ z(
|
|
51
|
+
fe,
|
|
52
|
+
{
|
|
53
|
+
"data-testid-react": e == null ? void 0 : e.field,
|
|
54
|
+
className: N(i.container, x),
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ b(
|
|
57
|
+
ke,
|
|
58
|
+
{
|
|
59
|
+
"data-testid-react": e == null ? void 0 : e.checkbox,
|
|
60
|
+
id: d,
|
|
61
|
+
ref: h,
|
|
62
|
+
checked: l,
|
|
63
|
+
onChange: o && !n ? k : void 0,
|
|
64
|
+
className: N(i.checkbox, v, {
|
|
65
|
+
[i.enabled]: l
|
|
66
|
+
}),
|
|
67
|
+
"data-disabled": n,
|
|
68
|
+
...$,
|
|
69
|
+
children: _ ? /* @__PURE__ */ b(
|
|
70
|
+
K,
|
|
71
|
+
{
|
|
72
|
+
"data-testid-react": e == null ? void 0 : e.iconMinus,
|
|
73
|
+
iconName: "Minus16px",
|
|
74
|
+
className: i["icon-minus"]
|
|
75
|
+
}
|
|
76
|
+
) : /* @__PURE__ */ b(
|
|
77
|
+
K,
|
|
78
|
+
{
|
|
79
|
+
"data-testid-react": e == null ? void 0 : e.iconDone,
|
|
80
|
+
iconName: "Done16px",
|
|
81
|
+
className: i["icon-done"]
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
t && /* @__PURE__ */ b(
|
|
87
|
+
me,
|
|
88
|
+
{
|
|
89
|
+
"data-testid-react": e == null ? void 0 : e.label,
|
|
90
|
+
htmlFor: d,
|
|
91
|
+
className: N(i.label, u),
|
|
92
|
+
children: t
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
);
|
|
67
98
|
}
|
|
68
99
|
);
|
|
69
100
|
export {
|
|
70
|
-
|
|
101
|
+
Ke as CheckboxMimir
|
|
71
102
|
};
|
|
@@ -10,7 +10,7 @@ import { YearPickerModal as bt } from "./YearPickerModal.js";
|
|
|
10
10
|
import { useClickOutside as At } from "../../hooks/useClickOutside/useClickOutside.js";
|
|
11
11
|
import { Icon as B } from "../../icons/Icon.js";
|
|
12
12
|
import { formating as d } from "../../utils/index.js";
|
|
13
|
-
import { I as Pt } from "../../Input-
|
|
13
|
+
import { I as Pt } from "../../Input-CqNPT8os.js";
|
|
14
14
|
import { EInputStatus as St, EInputSize as V } from "../Input/constants.js";
|
|
15
15
|
const Yt = Nt(
|
|
16
16
|
ut(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ElementType, ReactElement, ReactNode, RefObject } from 'react';
|
|
2
2
|
import { EDrawerPosition } from './constants';
|
|
3
|
+
import { TDataTestIdReactMap } from '../../types';
|
|
3
4
|
import { Props } from '../../types/propsWithAs';
|
|
4
5
|
|
|
5
6
|
export declare const ANIMATION_DELAY = 300;
|
|
@@ -88,6 +89,10 @@ type TProps = {
|
|
|
88
89
|
* Если указано false, компонент рендерится без использования Portal.
|
|
89
90
|
*/
|
|
90
91
|
getContainer?: HTMLElement | RefObject<HTMLElement> | false;
|
|
92
|
+
/**
|
|
93
|
+
* Объект, для передачи в компонент и его элементы data-testid-react, для автоматизированного тестирования
|
|
94
|
+
*/
|
|
95
|
+
dataTestIdReactMap?: TDataTestIdReactMap<'drawer' | 'closeButton' | 'footer' | 'footerCloseButton' | 'overlay'>;
|
|
91
96
|
};
|
|
92
97
|
type TDrawerComponent = <C extends ElementType = 'div'>(props: Props<C, TProps>) => ReactElement | ReactNode;
|
|
93
98
|
/**
|