@alfalab/core-components-input-autocomplete 9.4.7 → 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-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-bdb4c6b9.d.ts +10 -7
- 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/{esm/Component.mobile-e81c389f.d.ts → Component.mobile-f1f15074.d.ts} +2 -6
- 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 +1 -1
- 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 +4 -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 +10 -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/cssm/{Component.mobile-e81c389f.d.ts → 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 +1 -1
- package/cssm/autocomplete-field/Component.js +2 -2
- package/cssm/autocomplete-field/index.js +1 -1
- package/cssm/autocomplete-mobile-field/Component.d.ts +4 -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 -287
- 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 +10 -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/{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 +1 -1
- 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 +4 -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 -287
- 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-2d568950.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 +38 -18
- 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-80b4093b.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 +10 -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 +1 -1
- 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 +4 -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 -287
- 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-93c1e0e2.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
|
@@ -1,287 +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
|
-
* Содержимое bottom-sheet всегда в DOM
|
|
228
|
-
*/
|
|
229
|
-
keepMounted?: boolean;
|
|
230
|
-
/**
|
|
231
|
-
* Отключает автоматический перевод фокуса на bottom-sheet при открытии
|
|
232
|
-
*/
|
|
233
|
-
disableAutoFocus?: boolean;
|
|
234
|
-
/**
|
|
235
|
-
* Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
|
|
236
|
-
*/
|
|
237
|
-
disableRestoreFocus?: boolean;
|
|
238
|
-
/**
|
|
239
|
-
* Отключает вызов `onClose` при нажатии Escape
|
|
240
|
-
*/
|
|
241
|
-
disableEscapeKeyDown?: boolean;
|
|
242
|
-
};
|
|
243
|
-
declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
|
|
244
|
-
declare const TIMEOUT = 500;
|
|
245
|
-
declare const SWIPE_VELOCITY = 0.4;
|
|
246
|
-
declare const MARKER_HEIGHT = 24;
|
|
247
|
-
/* Верхний отступ шторки, если она открыта на максимальную высоту */
|
|
248
|
-
declare const HEADER_OFFSET = 24;
|
|
249
|
-
declare const CLOSE_OFFSET = 0.2;
|
|
250
|
-
declare const SCROLL_OFFSET = 1;
|
|
251
|
-
declare const convertPercentToNumber: (value: string | number, fullHeight: number) => number;
|
|
252
|
-
type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
|
|
253
|
-
headerRef: RefObject<HTMLDivElement>;
|
|
254
|
-
};
|
|
255
|
-
declare const Header: FC<HeaderProps>;
|
|
256
|
-
type FooterProps = {
|
|
257
|
-
/**
|
|
258
|
-
* Контент футера
|
|
259
|
-
*/
|
|
260
|
-
children?: ReactNode;
|
|
261
|
-
/**
|
|
262
|
-
* Фиксирует футер
|
|
263
|
-
*/
|
|
264
|
-
sticky?: boolean;
|
|
265
|
-
/**
|
|
266
|
-
* Дополнительный класс
|
|
267
|
-
*/
|
|
268
|
-
className?: string;
|
|
269
|
-
};
|
|
270
|
-
declare const Footer: FC<FooterProps>;
|
|
271
|
-
type SwipeableBackdropProps = BackdropProps & {
|
|
272
|
-
/**
|
|
273
|
-
* Прозрачность бэкдропа
|
|
274
|
-
*/
|
|
275
|
-
opacity?: number;
|
|
276
|
-
/**
|
|
277
|
-
* Обработчики свайпа
|
|
278
|
-
*/
|
|
279
|
-
handlers?: SwipeableHandlers;
|
|
280
|
-
/**
|
|
281
|
-
* Время анимации opacity
|
|
282
|
-
*/
|
|
283
|
-
opacityTimeout?: number;
|
|
284
|
-
};
|
|
285
|
-
declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
|
|
286
|
-
export { BottomSheet, TIMEOUT, SWIPE_VELOCITY, MARKER_HEIGHT, HEADER_OFFSET, CLOSE_OFFSET, SCROLL_OFFSET, convertPercentToNumber, HeaderProps, Header, FooterProps, Footer, SwipeableBackdropProps, SwipeableBackdrop };
|
|
287
|
-
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/modern/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/modern/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { InputAutocompleteResponsive } from './Component.responsive.js';
|
|
1
|
+
export { InputAutocompleteResponsive as InputAutocomplete } from './Component.responsive.js';
|
|
3
2
|
import 'react';
|
|
4
|
-
import '@alfalab/
|
|
3
|
+
import '@alfalab/hooks';
|
|
4
|
+
import './Component.desktop.js';
|
|
5
|
+
import '@alfalab/core-components-select/modern/shared';
|
|
5
6
|
import './autocomplete-field/Component.js';
|
|
6
7
|
import 'react-merge-refs';
|
|
7
8
|
import 'classnames';
|
|
8
|
-
import '@alfalab/core-components-input/modern';
|
|
9
|
-
import '@alfalab/hooks';
|
|
9
|
+
import '@alfalab/core-components-input/modern/desktop';
|
|
10
10
|
import './Component.mobile.js';
|
|
11
11
|
import 'lodash.throttle';
|
|
12
|
-
import '@alfalab/core-components-button/modern';
|
|
12
|
+
import '@alfalab/core-components-button/modern/mobile';
|
|
13
|
+
import '@alfalab/core-components-input/modern';
|
|
14
|
+
import '@alfalab/core-components-select/modern/mobile';
|
|
13
15
|
import './autocomplete-mobile-field/Component.js';
|
|
14
|
-
import '@alfalab/core-components-form-control/modern';
|
|
15
|
-
import './mobile.module-
|
|
16
|
+
import '@alfalab/core-components-form-control/modern/mobile';
|
|
17
|
+
import './mobile.module-a255d4ec.js';
|
|
@@ -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/modern/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: ripaa */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .input-
|
|
19
|
+
} .input-autocomplete__bottomAddonInput_aij30 {
|
|
20
20
|
padding: 0 var(--gap-xs) var(--gap-xs);
|
|
21
21
|
box-sizing: border-box;
|
|
22
|
-
} .input-
|
|
22
|
+
} .input-autocomplete__footer_aij30 {
|
|
23
23
|
display: flex
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__footer_aij30 > button + button {
|
|
25
25
|
margin-left: var(--gap-m);
|
|
26
26
|
}
|
package/modern/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/modern/mobile.js
CHANGED
|
@@ -4,11 +4,10 @@ import 'react';
|
|
|
4
4
|
import 'react-merge-refs';
|
|
5
5
|
import 'classnames';
|
|
6
6
|
import 'lodash.throttle';
|
|
7
|
-
import '@alfalab/core-components-button/modern';
|
|
7
|
+
import '@alfalab/core-components-button/modern/mobile';
|
|
8
8
|
import '@alfalab/core-components-input/modern';
|
|
9
|
-
import '@alfalab/core-components-select/modern';
|
|
9
|
+
import '@alfalab/core-components-select/modern/mobile';
|
|
10
10
|
import './autocomplete-mobile-field/Component.js';
|
|
11
|
-
import '@alfalab/core-components-form-control/modern';
|
|
11
|
+
import '@alfalab/core-components-form-control/modern/mobile';
|
|
12
12
|
import '@alfalab/hooks';
|
|
13
|
-
import './mobile.module-
|
|
14
|
-
import '@alfalab/core-components-select/modern/mobile';
|
|
13
|
+
import './mobile.module-a255d4ec.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const styles = {"bottomAddonInput":"input-
|
|
1
|
+
const styles = {"bottomAddonInput":"input-autocomplete__bottomAddonInput_aij30","footer":"input-autocomplete__footer_aij30"};
|
|
2
2
|
require('./mobile.css')
|
|
3
3
|
|
|
4
4
|
export { styles as s };
|
|
@@ -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";
|