@alfalab/core-components-input-autocomplete 9.4.6 → 10.0.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/Component-425c8522.d.ts +1 -1
- package/Component-5e1b8383.d.ts +3 -3
- package/Component-63dec22f.d.ts +11 -0
- package/Component-89a3cf4c.d.ts +6 -0
- package/Component-96988a65.d.ts +9 -0
- package/Component-e81c389f.d.ts +5 -0
- package/Component-ebda875c.d.ts +222 -54
- package/Component-f12ee135.d.ts +5 -4
- package/Component.desktop-ebda875c.d.ts +6 -0
- package/Component.desktop.d.ts +11 -65
- package/Component.desktop.js +4 -4
- package/Component.mobile-f12ee135.d.ts +41 -0
- package/{Component.mobile-b2c0420d.d.ts → Component.mobile-f1f15074.d.ts} +1 -2
- package/Component.mobile.d.ts +7 -7
- package/Component.mobile.js +7 -7
- package/Component.modal.mobile.d.ts +8 -40
- package/Component.modal.mobile.js +5 -5
- package/Component.responsive.d.ts +12 -70
- package/Component.responsive.js +7 -5
- package/autocomplete-field/Component.d.ts +3 -2
- package/autocomplete-field/Component.js +3 -3
- package/autocomplete-field/index.css +2 -2
- package/autocomplete-field/index.js +1 -1
- package/autocomplete-mobile-field/Component.d.ts +5 -4
- package/autocomplete-mobile-field/Component.js +7 -7
- package/autocomplete-mobile-field/index.css +8 -8
- package/autocomplete-mobile-field/index.js +1 -1
- package/cssm/Component-5e1b8383.d.ts +70 -3
- package/{Component-3885b0d7.d.ts → cssm/Component-63dec22f.d.ts} +24 -26
- package/cssm/Component-89a3cf4c.d.ts +6 -0
- package/cssm/Component-bdb4c6b9.d.ts +11 -7
- package/cssm/Component-e81c389f.d.ts +5 -0
- package/cssm/Component-ebda875c.d.ts +9 -98
- package/cssm/Component.desktop-ebda875c.d.ts +6 -0
- package/cssm/Component.desktop.d.ts +11 -65
- package/cssm/Component.desktop.js +4 -4
- package/cssm/Component.mobile-06ffd24b.d.ts +41 -0
- package/cssm/Component.mobile-ebda875c.d.ts +6 -0
- package/{esm/Component.mobile-e81c389f.d.ts → cssm/Component.mobile-f1f15074.d.ts} +2 -6
- package/cssm/Component.mobile.d.ts +6 -6
- package/cssm/Component.mobile.js +6 -6
- package/cssm/Component.modal.mobile-5e1b8383.d.ts +60 -0
- package/cssm/Component.modal.mobile.d.ts +7 -39
- package/cssm/Component.modal.mobile.js +4 -4
- package/cssm/Component.responsive.d.ts +11 -69
- package/cssm/Component.responsive.js +6 -4
- package/cssm/autocomplete-field/Component.d.ts +3 -2
- package/cssm/autocomplete-field/Component.js +2 -2
- package/cssm/autocomplete-field/index.js +1 -1
- package/cssm/autocomplete-mobile-field/Component.d.ts +5 -4
- package/cssm/autocomplete-mobile-field/Component.js +6 -6
- package/cssm/autocomplete-mobile-field/index.js +1 -1
- package/cssm/component-89a3cf4c.d.ts +44 -0
- package/cssm/desktop-63dec22f.d.ts +6 -0
- package/cssm/desktop.d.ts +1 -1
- package/cssm/desktop.js +2 -2
- package/{esm/hook-b4e70cb0.d.ts → cssm/hook-9ea9e32c.d.ts} +12 -10
- package/cssm/{index-3885b0d7.d.ts → index-89a3cf4c.d.ts} +2 -2
- package/cssm/index-bdb4c6b9.d.ts +2 -172
- package/cssm/index-e81c389f.d.ts +1 -1
- package/cssm/index-ebda875c.d.ts +94 -56
- package/cssm/index-f12ee135.d.ts +3 -271
- package/cssm/index.d.ts +2 -3
- package/cssm/index.js +9 -8
- package/cssm/mobile-06ffd24b.d.ts +5 -0
- package/cssm/mobile-96988a65.d.ts +3 -0
- package/cssm/mobile.d.ts +2 -2
- package/cssm/mobile.js +3 -4
- package/cssm/shared-4cd3936b.d.ts +93 -0
- package/cssm/types-d9f9bbcc.d.ts +259 -0
- package/cssm/typings-5e1b8383.d.ts +1 -1
- package/cssm/typings-9211a437.d.ts +95 -0
- package/cssm/utils-1574ad8b.d.ts +29 -0
- package/cssm/utils-49cc3c24.d.ts +8 -0
- package/desktop-63dec22f.d.ts +6 -0
- package/desktop.d.ts +1 -1
- package/desktop.js +2 -2
- package/esm/Component-5e1b8383.d.ts +70 -3
- package/{modern/Component-3885b0d7.d.ts → esm/Component-63dec22f.d.ts} +24 -26
- package/esm/Component-89a3cf4c.d.ts +6 -0
- package/esm/Component-bdb4c6b9.d.ts +11 -7
- package/esm/Component-e81c389f.d.ts +5 -0
- package/esm/Component-ebda875c.d.ts +9 -98
- package/esm/Component.desktop-ebda875c.d.ts +6 -0
- package/esm/Component.desktop.d.ts +11 -65
- package/esm/Component.desktop.js +2 -2
- package/esm/Component.mobile-06ffd24b.d.ts +41 -0
- package/esm/Component.mobile-ebda875c.d.ts +6 -0
- package/{cssm/Component.mobile-e81c389f.d.ts → esm/Component.mobile-f1f15074.d.ts} +2 -6
- package/esm/Component.mobile.d.ts +6 -6
- package/esm/Component.mobile.js +6 -6
- package/esm/Component.modal.mobile-5e1b8383.d.ts +60 -0
- package/esm/Component.modal.mobile.d.ts +7 -39
- package/esm/Component.modal.mobile.js +5 -5
- package/esm/Component.responsive.d.ts +11 -69
- package/esm/Component.responsive.js +7 -5
- package/esm/autocomplete-field/Component.d.ts +3 -2
- package/esm/autocomplete-field/Component.js +4 -4
- package/esm/autocomplete-field/index.css +2 -2
- package/esm/autocomplete-field/index.js +1 -1
- package/esm/autocomplete-mobile-field/Component.d.ts +5 -4
- package/esm/autocomplete-mobile-field/Component.js +7 -7
- package/esm/autocomplete-mobile-field/index.css +8 -8
- package/esm/autocomplete-mobile-field/index.js +1 -1
- package/esm/component-89a3cf4c.d.ts +44 -0
- package/esm/desktop-63dec22f.d.ts +6 -0
- package/esm/desktop.d.ts +1 -1
- package/esm/desktop.js +2 -2
- package/{hook-b4e70cb0.d.ts → esm/hook-9ea9e32c.d.ts} +12 -10
- package/esm/{index-3885b0d7.d.ts → index-89a3cf4c.d.ts} +2 -2
- package/esm/index-bdb4c6b9.d.ts +2 -172
- package/esm/index-e81c389f.d.ts +1 -1
- package/esm/index-ebda875c.d.ts +94 -56
- package/esm/index-f12ee135.d.ts +3 -271
- package/esm/index.d.ts +2 -3
- package/esm/index.js +10 -8
- package/esm/mobile-06ffd24b.d.ts +5 -0
- package/esm/mobile-96988a65.d.ts +3 -0
- package/esm/mobile.css +4 -4
- package/esm/mobile.d.ts +2 -2
- package/esm/mobile.js +4 -5
- package/esm/{mobile.module-fc605397.js → mobile.module-ed5594fa.js} +1 -1
- package/esm/shared-4cd3936b.d.ts +93 -0
- package/esm/types-d9f9bbcc.d.ts +259 -0
- package/esm/typings-5e1b8383.d.ts +1 -1
- package/esm/typings-9211a437.d.ts +95 -0
- package/esm/utils-1574ad8b.d.ts +29 -0
- package/esm/utils-49cc3c24.d.ts +8 -0
- package/{cssm/hook-b4e70cb0.d.ts → hook-9ea9e32c.d.ts} +11 -9
- package/hook-ebda875c.d.ts +48 -0
- package/{index-3885b0d7.d.ts → index-89a3cf4c.d.ts} +2 -2
- package/index-e81c389f.d.ts +1 -1
- package/index-ebda875c.d.ts +14 -80
- package/index-f12ee135.d.ts +45 -9
- package/index.d.ts +2 -3
- package/index.js +10 -9
- package/mobile-45dc17c6.d.ts +47 -0
- package/mobile-96988a65.d.ts +6 -0
- package/mobile.css +4 -4
- package/mobile.d.ts +2 -2
- package/mobile.js +4 -5
- package/{mobile.module-4a636c52.js → mobile.module-4fb8c86a.js} +1 -1
- package/modern/Component-5e1b8383.d.ts +70 -3
- package/{esm/Component-3885b0d7.d.ts → modern/Component-63dec22f.d.ts} +24 -26
- package/modern/Component-89a3cf4c.d.ts +6 -0
- package/modern/Component-bdb4c6b9.d.ts +11 -7
- package/modern/Component-e81c389f.d.ts +5 -0
- package/modern/Component-ebda875c.d.ts +9 -98
- package/modern/Component.desktop-ebda875c.d.ts +6 -0
- package/modern/Component.desktop.d.ts +11 -65
- package/modern/Component.desktop.js +2 -2
- package/modern/Component.mobile-06ffd24b.d.ts +41 -0
- package/modern/Component.mobile-ebda875c.d.ts +6 -0
- package/modern/{Component.mobile-e81c389f.d.ts → Component.mobile-f1f15074.d.ts} +2 -6
- package/modern/Component.mobile.d.ts +6 -6
- package/modern/Component.mobile.js +6 -6
- package/modern/Component.modal.mobile-5e1b8383.d.ts +60 -0
- package/modern/Component.modal.mobile.d.ts +7 -39
- package/modern/Component.modal.mobile.js +5 -5
- package/modern/Component.responsive.d.ts +11 -69
- package/modern/Component.responsive.js +7 -5
- package/modern/autocomplete-field/Component.d.ts +3 -2
- package/modern/autocomplete-field/Component.js +4 -4
- package/modern/autocomplete-field/index.css +2 -2
- package/modern/autocomplete-field/index.js +1 -1
- package/modern/autocomplete-mobile-field/Component.d.ts +5 -4
- package/modern/autocomplete-mobile-field/Component.js +7 -7
- package/modern/autocomplete-mobile-field/index.css +8 -8
- package/modern/autocomplete-mobile-field/index.js +1 -1
- package/modern/component-89a3cf4c.d.ts +44 -0
- package/modern/desktop-63dec22f.d.ts +6 -0
- package/modern/desktop.d.ts +1 -1
- package/modern/desktop.js +2 -2
- package/modern/{hook-b4e70cb0.d.ts → hook-9ea9e32c.d.ts} +12 -10
- package/modern/{index-3885b0d7.d.ts → index-89a3cf4c.d.ts} +2 -2
- package/modern/index-bdb4c6b9.d.ts +2 -172
- package/modern/index-e81c389f.d.ts +1 -1
- package/modern/index-ebda875c.d.ts +94 -56
- package/modern/index-f12ee135.d.ts +3 -271
- package/modern/index.d.ts +2 -3
- package/modern/index.js +10 -8
- package/modern/mobile-06ffd24b.d.ts +5 -0
- package/modern/mobile-96988a65.d.ts +3 -0
- package/modern/mobile.css +4 -4
- package/modern/mobile.d.ts +2 -2
- package/modern/mobile.js +4 -5
- package/modern/{mobile.module-58dac562.js → mobile.module-a255d4ec.js} +1 -1
- package/modern/shared-4cd3936b.d.ts +93 -0
- package/modern/types-d9f9bbcc.d.ts +259 -0
- package/modern/typings-5e1b8383.d.ts +1 -1
- package/modern/typings-9211a437.d.ts +95 -0
- package/modern/utils-1574ad8b.d.ts +29 -0
- package/modern/utils-49cc3c24.d.ts +8 -0
- package/package.json +25 -5
- package/shared-4cd3936b.d.ts +8 -0
- package/src/Component.desktop.tsx +89 -0
- package/src/Component.mobile.tsx +251 -0
- package/src/Component.modal.mobile.tsx +227 -0
- package/src/Component.responsive.tsx +42 -0
- package/src/autocomplete-field/Component.tsx +91 -0
- package/src/autocomplete-field/index.module.css +3 -0
- package/src/autocomplete-field/index.ts +1 -0
- package/src/autocomplete-mobile-field/Component.tsx +74 -0
- package/src/autocomplete-mobile-field/index.module.css +37 -0
- package/src/autocomplete-mobile-field/index.ts +1 -0
- package/src/desktop.ts +1 -0
- package/src/index.ts +4 -0
- package/src/mobile.module.css +14 -0
- package/src/mobile.ts +5 -0
- package/typings-5e1b8383.d.ts +1 -1
- package/typings-9211a437.d.ts +95 -0
- package/Component-b4e70cb0.d.ts +0 -22
- package/cssm/Component-3885b0d7.d.ts +0 -169
- package/cssm/Component-425c8522.d.ts +0 -53
- package/cssm/Component-aed0af6e.d.ts +0 -11
- package/cssm/Component-b4e70cb0.d.ts +0 -22
- package/cssm/Component-f12ee135.d.ts +0 -71
- package/cssm/index-3e68f8db.d.ts +0 -5
- package/cssm/responsive.d.ts +0 -2
- package/cssm/responsive.js +0 -26
- package/esm/Component-425c8522.d.ts +0 -53
- package/esm/Component-aed0af6e.d.ts +0 -11
- package/esm/Component-b4e70cb0.d.ts +0 -22
- package/esm/Component-f12ee135.d.ts +0 -71
- package/esm/index-3e68f8db.d.ts +0 -5
- package/esm/responsive.d.ts +0 -2
- package/esm/responsive.js +0 -16
- package/index-3e68f8db.d.ts +0 -5
- package/modern/Component-425c8522.d.ts +0 -53
- package/modern/Component-aed0af6e.d.ts +0 -11
- package/modern/Component-b4e70cb0.d.ts +0 -22
- package/modern/Component-f12ee135.d.ts +0 -71
- package/modern/index-3e68f8db.d.ts +0 -5
- package/modern/responsive.d.ts +0 -2
- package/modern/responsive.js +0 -15
- package/responsive.d.ts +0 -2
- package/responsive.js +0 -24
package/cssm/index-ebda875c.d.ts
CHANGED
|
@@ -1,98 +1,136 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="react-transition-group" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import {
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { HTMLAttributes, ReactNode } from "react";
|
|
5
|
+
type StyleColors = {
|
|
6
|
+
default: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
};
|
|
9
|
+
inverted: {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
8
14
|
/**
|
|
9
|
-
*
|
|
15
|
+
* Растягивает компонент на ширину контейнера
|
|
10
16
|
*/
|
|
11
|
-
|
|
17
|
+
block?: boolean;
|
|
12
18
|
/**
|
|
13
|
-
*
|
|
19
|
+
* Размер компонента
|
|
14
20
|
*/
|
|
15
|
-
|
|
16
|
-
checked: boolean;
|
|
17
|
-
name?: string;
|
|
18
|
-
}) => void;
|
|
21
|
+
size?: "s" | "m" | "l" | "xl";
|
|
19
22
|
/**
|
|
20
|
-
*
|
|
23
|
+
* Набор цветов для компонента
|
|
21
24
|
*/
|
|
22
|
-
|
|
25
|
+
colors?: "default" | "inverted";
|
|
26
|
+
/**
|
|
27
|
+
* Заблокированное состояние
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Cостояние только для чтения
|
|
32
|
+
*/
|
|
33
|
+
readOnly?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Заполненное состояние
|
|
36
|
+
*/
|
|
37
|
+
filled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Выбранное (фокус) состояние
|
|
40
|
+
*/
|
|
41
|
+
focused?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Отображение ошибки
|
|
44
|
+
*/
|
|
45
|
+
error?: ReactNode | boolean;
|
|
23
46
|
/**
|
|
24
|
-
* Текст подсказки
|
|
47
|
+
* Текст подсказки
|
|
25
48
|
*/
|
|
26
49
|
hint?: ReactNode;
|
|
27
50
|
/**
|
|
28
|
-
*
|
|
51
|
+
* Лейбл компонента
|
|
29
52
|
*/
|
|
30
|
-
|
|
53
|
+
label?: ReactNode;
|
|
31
54
|
/**
|
|
32
|
-
*
|
|
55
|
+
* Вид лейбла внутри / снаружи
|
|
33
56
|
*/
|
|
34
|
-
|
|
57
|
+
labelView?: "inner" | "outer";
|
|
35
58
|
/**
|
|
36
|
-
*
|
|
59
|
+
* Слот слева
|
|
37
60
|
*/
|
|
38
|
-
|
|
61
|
+
leftAddons?: ReactNode;
|
|
39
62
|
/**
|
|
40
|
-
*
|
|
63
|
+
* Слот справа
|
|
41
64
|
*/
|
|
42
|
-
|
|
65
|
+
rightAddons?: ReactNode;
|
|
43
66
|
/**
|
|
44
|
-
*
|
|
67
|
+
* Слот под полем
|
|
45
68
|
*/
|
|
46
|
-
|
|
69
|
+
bottomAddons?: ReactNode;
|
|
47
70
|
/**
|
|
48
|
-
*
|
|
71
|
+
* Дополнительный класс
|
|
49
72
|
*/
|
|
50
|
-
|
|
73
|
+
className?: string;
|
|
51
74
|
/**
|
|
52
|
-
*
|
|
75
|
+
* Дополнительный класс для поля
|
|
53
76
|
*/
|
|
54
|
-
|
|
77
|
+
fieldClassName?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Дополнительный класс для поля
|
|
80
|
+
*/
|
|
81
|
+
inputWrapperClassName?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Дополнительный класс для лейбла
|
|
84
|
+
*/
|
|
85
|
+
labelClassName?: string;
|
|
55
86
|
/**
|
|
56
|
-
*
|
|
87
|
+
* Дополнительный класс для аддонов
|
|
57
88
|
*/
|
|
58
|
-
|
|
89
|
+
addonsClassName?: string;
|
|
59
90
|
/**
|
|
60
91
|
* Идентификатор для систем автоматизированного тестирования
|
|
61
92
|
*/
|
|
62
93
|
dataTestId?: string;
|
|
63
94
|
/**
|
|
64
|
-
*
|
|
95
|
+
* Компонент поля (инпут, textarea и пр.)
|
|
65
96
|
*/
|
|
66
|
-
|
|
97
|
+
children?: ReactNode;
|
|
67
98
|
/**
|
|
68
|
-
*
|
|
99
|
+
* Основные стили компонента.
|
|
69
100
|
*/
|
|
70
|
-
|
|
101
|
+
styles: {
|
|
102
|
+
[key: string]: string;
|
|
103
|
+
};
|
|
71
104
|
/**
|
|
72
|
-
*
|
|
73
|
-
* @default false
|
|
105
|
+
* Стили компонента для default и inverted режима.
|
|
74
106
|
*/
|
|
75
|
-
|
|
107
|
+
colorStyles?: StyleColors;
|
|
76
108
|
};
|
|
77
|
-
declare const
|
|
78
|
-
checked?: boolean | undefined;
|
|
79
|
-
onChange?: ((event: ChangeEvent<HTMLInputElement>, payload: {
|
|
80
|
-
checked: boolean;
|
|
81
|
-
name?: string;
|
|
82
|
-
}) => void) | undefined;
|
|
83
|
-
label?: ReactNode;
|
|
84
|
-
hint?: ReactNode;
|
|
85
|
-
size?: "s" | "m" | undefined;
|
|
86
|
-
boxClassName?: string | undefined;
|
|
87
|
-
contentClassName?: string | undefined;
|
|
88
|
-
align?: Align | undefined;
|
|
89
|
-
addons?: React.ReactNode;
|
|
109
|
+
declare const BaseFormControl: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
90
110
|
block?: boolean | undefined;
|
|
111
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
112
|
+
colors?: "default" | "inverted" | undefined;
|
|
91
113
|
disabled?: boolean | undefined;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
114
|
+
readOnly?: boolean | undefined;
|
|
115
|
+
filled?: boolean | undefined;
|
|
116
|
+
focused?: boolean | undefined;
|
|
95
117
|
error?: ReactNode | boolean;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
118
|
+
hint?: ReactNode;
|
|
119
|
+
label?: ReactNode;
|
|
120
|
+
labelView?: "inner" | "outer" | undefined;
|
|
121
|
+
leftAddons?: ReactNode;
|
|
122
|
+
rightAddons?: ReactNode;
|
|
123
|
+
bottomAddons?: ReactNode;
|
|
124
|
+
className?: string | undefined;
|
|
125
|
+
fieldClassName?: string | undefined;
|
|
126
|
+
inputWrapperClassName?: string | undefined;
|
|
127
|
+
labelClassName?: string | undefined;
|
|
128
|
+
addonsClassName?: string | undefined;
|
|
129
|
+
dataTestId?: string | undefined;
|
|
130
|
+
children?: ReactNode;
|
|
131
|
+
styles: {
|
|
132
|
+
[key: string]: string;
|
|
133
|
+
};
|
|
134
|
+
colorStyles?: StyleColors | undefined;
|
|
135
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
136
|
+
export { StyleColors, BaseFormControlProps, BaseFormControl };
|
package/cssm/index-f12ee135.d.ts
CHANGED
|
@@ -1,271 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { HTMLAttributes, ReactNode, RefObject, FC } from "react";
|
|
5
|
-
import { TransitionProps } from "react-transition-group/Transition";
|
|
6
|
-
import { BaseModalProps } from "./index-bdb4c6b9";
|
|
7
|
-
import { NavigationBarProps } from "./index-e81c389f";
|
|
8
|
-
import { BackgroundColorType } from "./index-425c8522";
|
|
9
|
-
import { SwipeableHandlers } from "react-swipeable";
|
|
10
|
-
import { BackdropProps } from "./index-ebda875c";
|
|
11
|
-
type BottomSheetTitleAlign = "center" | "left";
|
|
12
|
-
type BottomSheetProps = {
|
|
13
|
-
/**
|
|
14
|
-
* Контент
|
|
15
|
-
*/
|
|
16
|
-
children?: ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* Управление видимостью
|
|
19
|
-
*/
|
|
20
|
-
open: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Заголовок
|
|
23
|
-
*/
|
|
24
|
-
title?: ReactNode;
|
|
25
|
-
/**
|
|
26
|
-
* Размер заголовка
|
|
27
|
-
*/
|
|
28
|
-
titleSize?: NavigationBarProps["titleSize"];
|
|
29
|
-
/**
|
|
30
|
-
* Подзаголовок.
|
|
31
|
-
*/
|
|
32
|
-
subtitle?: NavigationBarProps["subtitle"];
|
|
33
|
-
/**
|
|
34
|
-
* Кнопка действия (обычно, это кнопка закрытия)
|
|
35
|
-
*/
|
|
36
|
-
actionButton?: ReactNode;
|
|
37
|
-
/**
|
|
38
|
-
* Нода, компонент или функция возвращающая их
|
|
39
|
-
*
|
|
40
|
-
* Контейнер к которому будут добавляться порталы
|
|
41
|
-
*/
|
|
42
|
-
container?: BaseModalProps["container"];
|
|
43
|
-
/**
|
|
44
|
-
* Рендерить ли в контейнер через портал.
|
|
45
|
-
*/
|
|
46
|
-
usePortal?: BaseModalProps["usePortal"];
|
|
47
|
-
/**
|
|
48
|
-
* Дополнительный класс
|
|
49
|
-
*/
|
|
50
|
-
className?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Дополнительный класс
|
|
53
|
-
*/
|
|
54
|
-
contentClassName?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Дополнительные пропсы на контейнер.
|
|
57
|
-
*/
|
|
58
|
-
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
59
|
-
/**
|
|
60
|
-
* Дополнительный класс
|
|
61
|
-
*/
|
|
62
|
-
containerClassName?: string;
|
|
63
|
-
/**
|
|
64
|
-
* Цвет фона
|
|
65
|
-
*/
|
|
66
|
-
backgroundColor?: Extract<BackgroundColorType, "primary" | "secondary">;
|
|
67
|
-
/**
|
|
68
|
-
* Дополнительный класс шапки
|
|
69
|
-
*/
|
|
70
|
-
headerClassName?: string;
|
|
71
|
-
/**
|
|
72
|
-
* Дополнительный класс футера
|
|
73
|
-
*/
|
|
74
|
-
footerClassName?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Дополнительный класс для аддонов
|
|
77
|
-
*/
|
|
78
|
-
addonClassName?: string;
|
|
79
|
-
/**
|
|
80
|
-
* Дополнительный класс для компонента крестика
|
|
81
|
-
*/
|
|
82
|
-
closerClassName?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Дополнительный класс для компонента стрелки назад
|
|
85
|
-
*/
|
|
86
|
-
backerClassName?: string;
|
|
87
|
-
/**
|
|
88
|
-
* Дополнительный класс для компонента модального окна
|
|
89
|
-
*/
|
|
90
|
-
modalClassName?: string;
|
|
91
|
-
/**
|
|
92
|
-
* Дополнительный класс для обертки модального окна
|
|
93
|
-
*/
|
|
94
|
-
modalWrapperClassName?: string;
|
|
95
|
-
/**
|
|
96
|
-
* TransitionProps, прокидываются в компонент CSSTransitionProps.
|
|
97
|
-
*/
|
|
98
|
-
transitionProps?: Partial<TransitionProps>;
|
|
99
|
-
/**
|
|
100
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
101
|
-
*/
|
|
102
|
-
dataTestId?: string;
|
|
103
|
-
/**
|
|
104
|
-
* z-index компонента
|
|
105
|
-
*/
|
|
106
|
-
zIndex?: number;
|
|
107
|
-
/**
|
|
108
|
-
* Будет ли свайпаться шторка
|
|
109
|
-
* @default true
|
|
110
|
-
*/
|
|
111
|
-
swipeable?: boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Слот слева
|
|
114
|
-
*/
|
|
115
|
-
leftAddons?: ReactNode;
|
|
116
|
-
/**
|
|
117
|
-
* Слот справа
|
|
118
|
-
*/
|
|
119
|
-
rightAddons?: ReactNode;
|
|
120
|
-
/**
|
|
121
|
-
* Слот снизу
|
|
122
|
-
*/
|
|
123
|
-
bottomAddons?: ReactNode;
|
|
124
|
-
/**
|
|
125
|
-
* Наличие компонента крестика
|
|
126
|
-
*/
|
|
127
|
-
hasCloser?: boolean;
|
|
128
|
-
/**
|
|
129
|
-
* Наличие компонента стрелки назад
|
|
130
|
-
*/
|
|
131
|
-
hasBacker?: boolean;
|
|
132
|
-
/**
|
|
133
|
-
* Выравнивание заголовка
|
|
134
|
-
*/
|
|
135
|
-
titleAlign?: BottomSheetTitleAlign;
|
|
136
|
-
/**
|
|
137
|
-
* Фиксирует шапку
|
|
138
|
-
*/
|
|
139
|
-
stickyHeader?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Фиксирует футер
|
|
142
|
-
*/
|
|
143
|
-
stickyFooter?: boolean;
|
|
144
|
-
/**
|
|
145
|
-
* Высота шторки
|
|
146
|
-
*/
|
|
147
|
-
initialHeight?: "default" | "full";
|
|
148
|
-
/**
|
|
149
|
-
* Будет ли виден оверлэй
|
|
150
|
-
*/
|
|
151
|
-
hideOverlay?: boolean;
|
|
152
|
-
/**
|
|
153
|
-
* Будет ли видна шапка
|
|
154
|
-
*/
|
|
155
|
-
hideHeader?: boolean;
|
|
156
|
-
/**
|
|
157
|
-
* Будет ли обрезан заголовок
|
|
158
|
-
*/
|
|
159
|
-
trimTitle?: boolean;
|
|
160
|
-
/**
|
|
161
|
-
* Запретить закрытие шторки кликом на оверлэй
|
|
162
|
-
*/
|
|
163
|
-
disableOverlayClick?: boolean;
|
|
164
|
-
/**
|
|
165
|
-
* Отключает блокировку скролла при открытии модального окна
|
|
166
|
-
*/
|
|
167
|
-
disableBlockingScroll?: boolean;
|
|
168
|
-
/**
|
|
169
|
-
* Отключает ловушку фокуса
|
|
170
|
-
*/
|
|
171
|
-
disableFocusLock?: boolean;
|
|
172
|
-
/**
|
|
173
|
-
* @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
|
|
174
|
-
* Не анимировать шторку при изменении размера вьюпорта
|
|
175
|
-
*/
|
|
176
|
-
ignoreScreenChange?: boolean;
|
|
177
|
-
/**
|
|
178
|
-
* Свойства для Бэкдропа
|
|
179
|
-
*/
|
|
180
|
-
backdropProps?: BaseModalProps["backdropProps"];
|
|
181
|
-
/**
|
|
182
|
-
* Реф на контейнер, в котором происходит скролл
|
|
183
|
-
*/
|
|
184
|
-
scrollableContainerRef?: RefObject<HTMLElement>;
|
|
185
|
-
/**
|
|
186
|
-
* Реф для управления компонентом.
|
|
187
|
-
*/
|
|
188
|
-
bottomSheetInstanceRef?: RefObject<{
|
|
189
|
-
scrollToArea: (idx: number) => void;
|
|
190
|
-
}>;
|
|
191
|
-
/**
|
|
192
|
-
* Реф на контейнер, в котором находится шторка
|
|
193
|
-
*/
|
|
194
|
-
sheetContainerRef?: RefObject<HTMLElement>;
|
|
195
|
-
/**
|
|
196
|
-
* Магнитные области видимой высоты шторки.
|
|
197
|
-
* Можно использовать значения в пикселях - 10(число), либо в процентах - 10%(строка).
|
|
198
|
-
* По-умолчанию -[0, window.innerHeight - '24px']
|
|
199
|
-
* массив должен состоять минимум из 2 элементов
|
|
200
|
-
*/
|
|
201
|
-
magneticAreas?: Array<number | string>;
|
|
202
|
-
/**
|
|
203
|
-
* Индекс точки из magneticAreas, к которому нужно примагнититься при первом открытии шторки.
|
|
204
|
-
*/
|
|
205
|
-
initialActiveAreaIndex?: number;
|
|
206
|
-
/**
|
|
207
|
-
* Отключает скролл контентной области.
|
|
208
|
-
*/
|
|
209
|
-
scrollLocked?: boolean;
|
|
210
|
-
/**
|
|
211
|
-
* Скрыть скроллбар внутри шторки
|
|
212
|
-
*/
|
|
213
|
-
hideScrollbar?: boolean;
|
|
214
|
-
/**
|
|
215
|
-
* Обработчик закрытия
|
|
216
|
-
*/
|
|
217
|
-
onClose: () => void;
|
|
218
|
-
/**
|
|
219
|
-
* Обработчик нажатия на стрелку назад
|
|
220
|
-
*/
|
|
221
|
-
onBack?: () => void;
|
|
222
|
-
/**
|
|
223
|
-
* Вызывается после притягивания к одной из `magneticAreas`
|
|
224
|
-
*/
|
|
225
|
-
onMagnetize?: (index: number) => void;
|
|
226
|
-
};
|
|
227
|
-
declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
|
|
228
|
-
declare const TIMEOUT = 500;
|
|
229
|
-
declare const SWIPE_VELOCITY = 0.4;
|
|
230
|
-
declare const MARKER_HEIGHT = 24;
|
|
231
|
-
/* Верхний отступ шторки, если она открыта на максимальную высоту */
|
|
232
|
-
declare const HEADER_OFFSET = 24;
|
|
233
|
-
declare const CLOSE_OFFSET = 0.2;
|
|
234
|
-
declare const SCROLL_OFFSET = 1;
|
|
235
|
-
declare const convertPercentToNumber: (value: string | number, fullHeight: number) => number;
|
|
236
|
-
type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
|
|
237
|
-
headerRef: RefObject<HTMLDivElement>;
|
|
238
|
-
};
|
|
239
|
-
declare const Header: FC<HeaderProps>;
|
|
240
|
-
type FooterProps = {
|
|
241
|
-
/**
|
|
242
|
-
* Контент футера
|
|
243
|
-
*/
|
|
244
|
-
children?: ReactNode;
|
|
245
|
-
/**
|
|
246
|
-
* Фиксирует футер
|
|
247
|
-
*/
|
|
248
|
-
sticky?: boolean;
|
|
249
|
-
/**
|
|
250
|
-
* Дополнительный класс
|
|
251
|
-
*/
|
|
252
|
-
className?: string;
|
|
253
|
-
};
|
|
254
|
-
declare const Footer: FC<FooterProps>;
|
|
255
|
-
type SwipeableBackdropProps = BackdropProps & {
|
|
256
|
-
/**
|
|
257
|
-
* Прозрачность бэкдропа
|
|
258
|
-
*/
|
|
259
|
-
opacity?: number;
|
|
260
|
-
/**
|
|
261
|
-
* Обработчики свайпа
|
|
262
|
-
*/
|
|
263
|
-
handlers?: SwipeableHandlers;
|
|
264
|
-
/**
|
|
265
|
-
* Время анимации opacity
|
|
266
|
-
*/
|
|
267
|
-
opacityTimeout?: number;
|
|
268
|
-
};
|
|
269
|
-
declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
|
|
270
|
-
export { BottomSheet, TIMEOUT, SWIPE_VELOCITY, MARKER_HEIGHT, HEADER_OFFSET, CLOSE_OFFSET, SCROLL_OFFSET, convertPercentToNumber, HeaderProps, Header, FooterProps, Footer, SwipeableBackdropProps, SwipeableBackdrop };
|
|
271
|
-
export type { BottomSheetProps, BottomSheetTitleAlign };
|
|
1
|
+
export * from "./component-89a3cf4c";
|
|
2
|
+
export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-d9f9bbcc";
|
|
3
|
+
export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
|
package/cssm/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
3
|
-
export * from "./responsive";
|
|
1
|
+
export { InputAutocompleteResponsive as InputAutocomplete, InputAutocompleteResponsiveProps as InputAutocompleteProps } from "./Component.responsive";
|
|
2
|
+
export {};
|
package/cssm/index.js
CHANGED
|
@@ -2,26 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Component_desktop = require('./Component.desktop.js');
|
|
6
5
|
var Component_responsive = require('./Component.responsive.js');
|
|
7
6
|
require('tslib');
|
|
8
7
|
require('react');
|
|
9
|
-
require('@alfalab/
|
|
8
|
+
require('@alfalab/hooks');
|
|
9
|
+
require('./Component.desktop.js');
|
|
10
|
+
require('@alfalab/core-components-select/cssm/shared');
|
|
10
11
|
require('./autocomplete-field/Component.js');
|
|
11
12
|
require('react-merge-refs');
|
|
12
13
|
require('classnames');
|
|
13
|
-
require('@alfalab/core-components-input/cssm');
|
|
14
|
+
require('@alfalab/core-components-input/cssm/desktop');
|
|
14
15
|
require('./autocomplete-field/index.module.css');
|
|
15
|
-
require('@alfalab/hooks');
|
|
16
16
|
require('./Component.mobile.js');
|
|
17
17
|
require('lodash.throttle');
|
|
18
|
-
require('@alfalab/core-components-button/cssm');
|
|
18
|
+
require('@alfalab/core-components-button/cssm/mobile');
|
|
19
|
+
require('@alfalab/core-components-input/cssm');
|
|
20
|
+
require('@alfalab/core-components-select/cssm/mobile');
|
|
19
21
|
require('./autocomplete-mobile-field/Component.js');
|
|
20
|
-
require('@alfalab/core-components-form-control/cssm');
|
|
22
|
+
require('@alfalab/core-components-form-control/cssm/mobile');
|
|
21
23
|
require('./autocomplete-mobile-field/index.module.css');
|
|
22
24
|
require('./mobile.module.css');
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
|
|
26
|
-
exports.InputAutocomplete =
|
|
27
|
-
exports.InputAutocompleteResponsive = Component_responsive.InputAutocompleteResponsive;
|
|
28
|
+
exports.InputAutocomplete = Component_responsive.InputAutocompleteResponsive;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { SelectMobile } from "./Component.mobile-06ffd24b";
|
|
2
|
+
export { SelectModalMobile } from "./Component.modal.mobile-5e1b8383";
|
|
3
|
+
export type { SelectMobileProps } from "./Component.mobile-06ffd24b";
|
|
4
|
+
export type { SelectModalMobileProps } from "./Component.modal.mobile-5e1b8383";
|
|
5
|
+
export {};
|
package/cssm/mobile.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { InputAutocompleteMobile, InputAutocompleteMobileProps } from "./Component.mobile";
|
|
2
|
+
export { InputAutocompleteModalMobile, InputAutocompleteModalMobileProps } from "./Component.modal.mobile";
|
|
3
3
|
export {};
|
package/cssm/mobile.js
CHANGED
|
@@ -9,15 +9,14 @@ require('react');
|
|
|
9
9
|
require('react-merge-refs');
|
|
10
10
|
require('classnames');
|
|
11
11
|
require('lodash.throttle');
|
|
12
|
-
require('@alfalab/core-components-button/cssm');
|
|
12
|
+
require('@alfalab/core-components-button/cssm/mobile');
|
|
13
13
|
require('@alfalab/core-components-input/cssm');
|
|
14
|
-
require('@alfalab/core-components-select/cssm');
|
|
14
|
+
require('@alfalab/core-components-select/cssm/mobile');
|
|
15
15
|
require('./autocomplete-mobile-field/Component.js');
|
|
16
|
-
require('@alfalab/core-components-form-control/cssm');
|
|
16
|
+
require('@alfalab/core-components-form-control/cssm/mobile');
|
|
17
17
|
require('@alfalab/hooks');
|
|
18
18
|
require('./autocomplete-mobile-field/index.module.css');
|
|
19
19
|
require('./mobile.module.css');
|
|
20
|
-
require('@alfalab/core-components-select/cssm/mobile');
|
|
21
20
|
|
|
22
21
|
|
|
23
22
|
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import { BaseSelectProps, OptionProps, OptionShape } from "./typings-5e1b8383";
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
6
|
+
type useSelectWithLoadingProps = {
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
visibleOptions?: BaseSelectProps["visibleOptions"];
|
|
9
|
+
Option?: React.FC<OptionProps>;
|
|
10
|
+
};
|
|
11
|
+
declare function useSelectWithLoading({ loading, visibleOptions, Option }: useSelectWithLoadingProps): {
|
|
12
|
+
Option: (props: OptionProps) => React.JSX.Element;
|
|
13
|
+
options: OptionShape[];
|
|
14
|
+
} | null;
|
|
15
|
+
type OptionsFetcherResponse = {
|
|
16
|
+
options: OptionShape[];
|
|
17
|
+
hasMore: boolean;
|
|
18
|
+
};
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
20
|
+
type useLazyLoadingProps = {
|
|
21
|
+
/** Количество элементов на "странице" */
|
|
22
|
+
limit?: number;
|
|
23
|
+
/** Начальный номер "страницы" */
|
|
24
|
+
initialOffset?: number;
|
|
25
|
+
/** Скелетон загружаемых элементов */
|
|
26
|
+
skeleton?: React.ReactNode;
|
|
27
|
+
/** Компонент пункта меню */
|
|
28
|
+
Option?: React.FC<OptionProps>;
|
|
29
|
+
/**
|
|
30
|
+
* Функция-загрузчик опций.
|
|
31
|
+
* @param offset - текущая страница
|
|
32
|
+
* @param limit - количество элементов на странице
|
|
33
|
+
* @param queryString - строчные данные, пробрасываемые для поиска из кастомного инпута, расположенного в заголовке OptionsList
|
|
34
|
+
* @returns Promise<{
|
|
35
|
+
* options - список опций следующей "страницы". Они аппендятся к предыдущим
|
|
36
|
+
* hasMore - указывает, есть ли еще незагруженные элементы (в случае false перестает загружать "следующую страницу")
|
|
37
|
+
* }>
|
|
38
|
+
*/
|
|
39
|
+
optionsFetcher(offset: number, limit: number, queryString?: string): Promise<OptionsFetcherResponse>;
|
|
40
|
+
};
|
|
41
|
+
declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, Option }: useLazyLoadingProps): {
|
|
42
|
+
optionsProps: {
|
|
43
|
+
Option: (props: OptionProps) => React.JSX.Element;
|
|
44
|
+
options: OptionShape[];
|
|
45
|
+
optionsListProps: {
|
|
46
|
+
ref: React.RefObject<HTMLDivElement>;
|
|
47
|
+
inputProps: {
|
|
48
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>, payload: {
|
|
49
|
+
value: string;
|
|
50
|
+
}) => void;
|
|
51
|
+
value: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
onOpen: (payload: {
|
|
55
|
+
open?: boolean;
|
|
56
|
+
}) => void;
|
|
57
|
+
};
|
|
58
|
+
reset: () => void;
|
|
59
|
+
};
|
|
60
|
+
type SkeletonProps = {
|
|
61
|
+
/**
|
|
62
|
+
* Флаг, явно задающий состояние, при котором контент закрывается прелоадером
|
|
63
|
+
*/
|
|
64
|
+
visible?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Флаг явного включения анимации скелета
|
|
67
|
+
*/
|
|
68
|
+
animate?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Дополнительный класс
|
|
71
|
+
*/
|
|
72
|
+
className?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Дополнительные инлайн стили
|
|
75
|
+
*/
|
|
76
|
+
style?: React.CSSProperties;
|
|
77
|
+
/**
|
|
78
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
79
|
+
*/
|
|
80
|
+
dataTestId?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Дочерние элементы.
|
|
83
|
+
*/
|
|
84
|
+
children?: ReactNode;
|
|
85
|
+
};
|
|
86
|
+
declare const Skeleton: React.FC<SkeletonProps>;
|
|
87
|
+
export * from "./index-ebda875c";
|
|
88
|
+
export * from "./Component-5e1b8383";
|
|
89
|
+
export { useSelectWithLoading, useLazyLoading, SkeletonProps, Skeleton };
|
|
90
|
+
export * from "./hook-9ea9e32c";
|
|
91
|
+
export * from "./typings-5e1b8383";
|
|
92
|
+
export * from "./utils-5e1b8383";
|
|
93
|
+
export type { AdditionalMobileProps } from "./Component.mobile-06ffd24b";
|