@alfalab/core-components-date-time-input 4.0.10 → 4.0.12
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-10db897e.d.ts +297 -0
- package/Component-5684a67d.d.ts +23 -0
- package/Component-69921c40.d.ts +24 -0
- package/Component-89f0cb07.d.ts +38 -0
- package/Component-e2b6c730.d.ts +76 -0
- package/Component.desktop-785df74d.d.ts +6 -0
- package/Component.desktop-89f0cb07.d.ts +5 -0
- package/{cssm/Component.desktop-8b5756fe.d.ts → Component.desktop-b5b4c59f.d.ts} +13 -72
- package/Component.desktop-ebda875c.d.ts +7 -0
- package/Component.mobile-16b1285a.d.ts +5 -0
- package/Component.responsive-16b1285a.d.ts +5 -0
- package/Component.responsive-d7e9f69d.d.ts +26 -0
- package/components/date-time-input/Component.d.ts +1 -1
- package/components/date-time-input/Component.js +6 -5
- package/components/date-time-input/index.css +7 -7
- package/{esm/Component-72308007.d.ts → cssm/Component-10db897e.d.ts} +2 -2
- package/cssm/Component-89f0cb07.d.ts +38 -0
- package/cssm/{Component-8b5756fe.d.ts → Component-b5b4c59f.d.ts} +4 -3
- package/cssm/Component.desktop-0aa4e915.d.ts +5 -0
- package/cssm/Component.desktop-785df74d.d.ts +6 -0
- package/{esm/Component.desktop-8b5756fe.d.ts → cssm/Component.desktop-b5b4c59f.d.ts} +13 -5
- package/cssm/Component.mobile-16b1285a.d.ts +5 -0
- package/cssm/Component.mobile-d7e9f69d.d.ts +6 -0
- package/cssm/Component.mobile-ebda875c.d.ts +5 -4
- package/cssm/Component.responsive-0aa4e915.d.ts +5 -0
- package/cssm/Component.responsive-785df74d.d.ts +26 -0
- package/cssm/components/date-time-input/Component.js +5 -4
- package/cssm/desktop-63dec22f.d.ts +1 -1
- package/cssm/desktop-69921c40.d.ts +2 -0
- package/{esm/index-72308007.d.ts → cssm/index-10db897e.d.ts} +1 -5
- package/{Component.responsive-2e2b2125.d.ts → cssm/index-3109f463.d.ts} +1 -5
- package/cssm/index-89f0cb07.d.ts +2 -0
- package/cssm/index-f034f741.d.ts +1 -1
- package/cssm/mobile-c219f8ca.d.ts +1 -1
- package/{esm/types-83e2bd9e.d.ts → cssm/types-1c79e231.d.ts} +1 -1
- package/{modern/typings-9211a437.d.ts → cssm/typings-89f0cb07.d.ts} +5 -7
- package/desktop-89f0cb07.d.ts +2 -0
- package/desktop-b5b4c59f.d.ts +2 -0
- package/esm/Component-10db897e.d.ts +297 -0
- package/esm/Component-89f0cb07.d.ts +38 -0
- package/esm/{Component-8b5756fe.d.ts → Component-b5b4c59f.d.ts} +4 -3
- package/esm/Component.desktop-0aa4e915.d.ts +5 -0
- package/esm/Component.desktop-785df74d.d.ts +6 -0
- package/{modern/Component.desktop-8b5756fe.d.ts → esm/Component.desktop-b5b4c59f.d.ts} +14 -13
- package/esm/Component.mobile-89f0cb07.d.ts +5 -0
- package/esm/Component.mobile-d7e9f69d.d.ts +6 -0
- package/esm/Component.mobile-ebda875c.d.ts +5 -4
- package/esm/Component.responsive-0aa4e915.d.ts +5 -0
- package/esm/Component.responsive-785df74d.d.ts +26 -0
- package/esm/components/date-time-input/Component.js +6 -5
- package/esm/components/date-time-input/index.css +7 -7
- package/esm/desktop-63dec22f.d.ts +1 -1
- package/esm/desktop-69921c40.d.ts +2 -0
- package/{index-72308007.d.ts → esm/index-10db897e.d.ts} +1 -5
- package/{cssm/Component.responsive-2e2b2125.d.ts → esm/index-3109f463.d.ts} +1 -5
- package/esm/index-89f0cb07.d.ts +2 -0
- package/esm/index-ebda875c.d.ts +1 -34
- package/esm/index-f034f741.d.ts +5 -2
- package/esm/mobile-c219f8ca.d.ts +1 -1
- package/{cssm/types-83e2bd9e.d.ts → esm/types-1c79e231.d.ts} +1 -1
- package/{typings-9211a437.d.ts → esm/typings-89f0cb07.d.ts} +5 -7
- package/{cssm/index-72308007.d.ts → index-10db897e.d.ts} +1 -5
- package/{modern/Component.responsive-2e2b2125.d.ts → index-3109f463.d.ts} +1 -5
- package/index-89f0cb07.d.ts +2 -0
- package/index-ebda875c.d.ts +1 -34
- package/index-f034f741.d.ts +2 -80
- package/mobile-c219f8ca.d.ts +368 -1
- package/{Component-72308007.d.ts → modern/Component-10db897e.d.ts} +2 -2
- package/modern/Component-89f0cb07.d.ts +38 -0
- package/{Component-8b5756fe.d.ts → modern/Component-b5b4c59f.d.ts} +4 -3
- package/modern/Component.desktop-0aa4e915.d.ts +5 -0
- package/modern/Component.desktop-785df74d.d.ts +6 -0
- package/{Component.desktop-8b5756fe.d.ts → modern/Component.desktop-b5b4c59f.d.ts} +13 -5
- package/modern/Component.mobile-16b1285a.d.ts +5 -0
- package/modern/Component.mobile-d7e9f69d.d.ts +6 -0
- package/modern/Component.mobile-ebda875c.d.ts +5 -4
- package/modern/Component.responsive-0aa4e915.d.ts +5 -0
- package/modern/Component.responsive-785df74d.d.ts +26 -0
- package/modern/components/date-time-input/Component.js +6 -5
- package/modern/components/date-time-input/index.css +7 -7
- package/modern/desktop-63dec22f.d.ts +1 -1
- package/modern/desktop-69921c40.d.ts +2 -0
- package/modern/{index-72308007.d.ts → index-10db897e.d.ts} +1 -5
- package/{esm/Component.responsive-2e2b2125.d.ts → modern/index-3109f463.d.ts} +1 -5
- package/modern/index-89f0cb07.d.ts +2 -0
- package/modern/index-f034f741.d.ts +1 -1
- package/modern/mobile-c219f8ca.d.ts +1 -1
- package/modern/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/{esm/typings-9211a437.d.ts → modern/typings-89f0cb07.d.ts} +5 -7
- package/package.json +4 -4
- package/src/components/date-time-input/Component.tsx +22 -18
- package/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/{cssm/typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/utils-e0a54580.d.ts +8 -0
- package/Component.desktop-2e2b2125.d.ts +0 -6
- package/Component.mobile-755fbaa3.d.ts +0 -6
- package/cssm/Component-72308007.d.ts +0 -6
- package/cssm/Component.desktop-2e2b2125.d.ts +0 -6
- package/cssm/Component.mobile-755fbaa3.d.ts +0 -6
- package/cssm/index-9211a437.d.ts +0 -2
- package/desktop-63dec22f.d.ts +0 -2
- package/esm/Component.desktop-2e2b2125.d.ts +0 -6
- package/esm/Component.mobile-755fbaa3.d.ts +0 -6
- package/esm/index-9211a437.d.ts +0 -2
- package/index-9211a437.d.ts +0 -2
- package/modern/Component-63dec22f.d.ts +0 -184
- package/modern/Component-72308007.d.ts +0 -6
- package/modern/Component-8b5756fe.d.ts +0 -388
- package/modern/Component.desktop-2e2b2125.d.ts +0 -6
- package/modern/Component.mobile-755fbaa3.d.ts +0 -6
- package/modern/index-9211a437.d.ts +0 -2
- /package/{Component.mobile-ebda875c.d.ts → Component.mobile-d7e9f69d.d.ts} +0 -0
- /package/{Component-63dec22f.d.ts → cssm/Component-69921c40.d.ts} +0 -0
- /package/{cssm/Component-63dec22f.d.ts → esm/Component-69921c40.d.ts} +0 -0
- /package/{esm/Component-63dec22f.d.ts → modern/Component-69921c40.d.ts} +0 -0
package/mobile-c219f8ca.d.ts
CHANGED
|
@@ -1 +1,368 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react-transition-group" />
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { ReactNode, FC, KeyboardEvent, MouseEvent, MutableRefObject, Ref, RefObject } from "react";
|
|
5
|
+
import { CalendarDesktopProps } from "./Component.desktop-b5b4c59f";
|
|
6
|
+
import { TransitionProps } from "react-transition-group/Transition";
|
|
7
|
+
import { CSSTransitionClassNames } from "react-transition-group/CSSTransition";
|
|
8
|
+
import { NavigationBarProps } from "./types-1c79e231";
|
|
9
|
+
type CalendarMobileProps = CalendarDesktopProps & {
|
|
10
|
+
/**
|
|
11
|
+
* Управление видимостью модалки
|
|
12
|
+
*/
|
|
13
|
+
open: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Заголовок календаря
|
|
16
|
+
*/
|
|
17
|
+
title?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Обработчик закрытия модалки
|
|
20
|
+
*/
|
|
21
|
+
onClose?: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Обработчик клика на название месяца в мобильном календаре
|
|
24
|
+
*/
|
|
25
|
+
onMonthTitleClick?: (event: React.MouseEvent<HTMLSpanElement>) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Количество лет для генерации в обе стороны от текущего года
|
|
28
|
+
*/
|
|
29
|
+
yearsAmount?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Нужно ли рендерить шапку
|
|
32
|
+
*/
|
|
33
|
+
hasHeader?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Разрешить выбор из недозаполненного диапазона дат.
|
|
36
|
+
*/
|
|
37
|
+
allowSelectionFromEmptyRange?: boolean;
|
|
38
|
+
};
|
|
39
|
+
declare const CalendarMobile: React.ForwardRefExoticComponent<CalendarDesktopProps & {
|
|
40
|
+
open: boolean;
|
|
41
|
+
title?: string | undefined;
|
|
42
|
+
onClose?: (() => void) | undefined;
|
|
43
|
+
onMonthTitleClick?: ((event: React.MouseEvent<HTMLSpanElement>) => void) | undefined;
|
|
44
|
+
yearsAmount?: number | undefined;
|
|
45
|
+
hasHeader?: boolean | undefined;
|
|
46
|
+
allowSelectionFromEmptyRange?: boolean | undefined;
|
|
47
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
type BackdropProps = Partial<TransitionProps> & {
|
|
49
|
+
/**
|
|
50
|
+
* Прозрачный бэкдроп
|
|
51
|
+
*/
|
|
52
|
+
invisible?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Управляет видимостью компонента
|
|
55
|
+
*/
|
|
56
|
+
open: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Обработчик клика по бэкдропу
|
|
59
|
+
*/
|
|
60
|
+
onClose?: (event: MouseEvent<HTMLElement>) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Дополнительный класс
|
|
63
|
+
*/
|
|
64
|
+
className?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Классы анимации
|
|
67
|
+
*
|
|
68
|
+
* http://reactcommunity.org/react-transition-group/css-transition#CSSTransition-prop-classNames
|
|
69
|
+
*/
|
|
70
|
+
transitionClassNames?: string | CSSTransitionClassNames;
|
|
71
|
+
/**
|
|
72
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
73
|
+
*/
|
|
74
|
+
dataTestId?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Дочерние элементы.
|
|
77
|
+
*/
|
|
78
|
+
children?: ReactNode;
|
|
79
|
+
};
|
|
80
|
+
type PortalProps = {
|
|
81
|
+
/** Контент */
|
|
82
|
+
children?: ReactNode;
|
|
83
|
+
/**
|
|
84
|
+
* Функция, возвращающая контейнер, в который будут рендериться дочерние элементы
|
|
85
|
+
*/
|
|
86
|
+
getPortalContainer?: () => Element;
|
|
87
|
+
/**
|
|
88
|
+
* Немедленно отрендерить дочерние элементы (false - контент будет отрендерен на след. рендер).
|
|
89
|
+
*/
|
|
90
|
+
immediateMount?: boolean;
|
|
91
|
+
};
|
|
92
|
+
type BaseModalProps = {
|
|
93
|
+
/**
|
|
94
|
+
* Контент
|
|
95
|
+
*/
|
|
96
|
+
children?: ReactNode;
|
|
97
|
+
/**
|
|
98
|
+
* Компонент бэкдропа
|
|
99
|
+
*/
|
|
100
|
+
Backdrop?: FC<BackdropProps>;
|
|
101
|
+
/**
|
|
102
|
+
* Свойства для Бэкдропа
|
|
103
|
+
*/
|
|
104
|
+
backdropProps?: Partial<BackdropProps> & Record<string, unknown>;
|
|
105
|
+
/**
|
|
106
|
+
* Нода, компонент или функция возвращающая их
|
|
107
|
+
*
|
|
108
|
+
* Контейнер к которому будут добавляться порталы
|
|
109
|
+
*/
|
|
110
|
+
container?: PortalProps["getPortalContainer"];
|
|
111
|
+
/**
|
|
112
|
+
* Отключает автоматический перевод фокуса на модалку при открытии
|
|
113
|
+
* @default false
|
|
114
|
+
*/
|
|
115
|
+
disableAutoFocus?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Отключает ловушку фокуса
|
|
118
|
+
* @default false
|
|
119
|
+
*/
|
|
120
|
+
disableFocusLock?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Отключает восстановление фокуса на предыдущем элементе после закрытия модалки
|
|
123
|
+
* @default false
|
|
124
|
+
*/
|
|
125
|
+
disableRestoreFocus?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Отключает вызов `callback` при нажатии Escape
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
disableEscapeKeyDown?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Отключает вызов `callback` при клике на бэкдроп
|
|
133
|
+
* @default false
|
|
134
|
+
*/
|
|
135
|
+
disableBackdropClick?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Отключает блокировку скролла при открытии модального окна
|
|
138
|
+
* @default false
|
|
139
|
+
*/
|
|
140
|
+
disableBlockingScroll?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Содержимое модалки всегда в DOM
|
|
143
|
+
* @default false
|
|
144
|
+
*/
|
|
145
|
+
keepMounted?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Управление видимостью модалки
|
|
148
|
+
*/
|
|
149
|
+
open: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Дополнительный класс
|
|
152
|
+
*/
|
|
153
|
+
className?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Дополнительный класс
|
|
156
|
+
*/
|
|
157
|
+
contentClassName?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Дополнительные пропсы на обертку контента
|
|
160
|
+
*/
|
|
161
|
+
contentProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
162
|
+
/**
|
|
163
|
+
* Дополнительные пропсы на компонентную обертку контента
|
|
164
|
+
*/
|
|
165
|
+
componentDivProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
166
|
+
/**
|
|
167
|
+
* Дополнительный класс для обертки (Modal)
|
|
168
|
+
*/
|
|
169
|
+
wrapperClassName?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Обработчик скролла контента
|
|
172
|
+
*/
|
|
173
|
+
scrollHandler?: "wrapper" | "content" | MutableRefObject<HTMLDivElement | null>;
|
|
174
|
+
/**
|
|
175
|
+
* Пропсы для анимации (CSSTransition)
|
|
176
|
+
*/
|
|
177
|
+
transitionProps?: Partial<TransitionProps>;
|
|
178
|
+
/**
|
|
179
|
+
* Рендерить ли в контейнер через портал.
|
|
180
|
+
* @default true
|
|
181
|
+
*/
|
|
182
|
+
usePortal?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Обработчик события нажатия на бэкдроп
|
|
185
|
+
*/
|
|
186
|
+
onBackdropClick?: (event: MouseEvent) => void;
|
|
187
|
+
/**
|
|
188
|
+
* Обработчик события нажатия на Escape
|
|
189
|
+
*
|
|
190
|
+
* Если `disableEscapeKeyDown` - false и модальное окно в фокусе
|
|
191
|
+
*/
|
|
192
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
193
|
+
/**
|
|
194
|
+
* Обработчик закрытия
|
|
195
|
+
*/
|
|
196
|
+
onClose?: (event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
|
|
197
|
+
/**
|
|
198
|
+
* Обработчик события onEntered компонента Transition
|
|
199
|
+
*/
|
|
200
|
+
onMount?: () => void;
|
|
201
|
+
/**
|
|
202
|
+
* Обработчик события onExited компонента Transition
|
|
203
|
+
*/
|
|
204
|
+
onUnmount?: () => void;
|
|
205
|
+
/**
|
|
206
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
207
|
+
*/
|
|
208
|
+
dataTestId?: string;
|
|
209
|
+
/**
|
|
210
|
+
* z-index компонента
|
|
211
|
+
*/
|
|
212
|
+
zIndex?: number;
|
|
213
|
+
/**
|
|
214
|
+
* Реф, который должен быть установлен компонентной области
|
|
215
|
+
*/
|
|
216
|
+
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
217
|
+
};
|
|
218
|
+
type BaseModalContext = {
|
|
219
|
+
parentRef: React.RefObject<HTMLDivElement>;
|
|
220
|
+
componentRef: React.RefObject<HTMLDivElement>;
|
|
221
|
+
hasFooter?: boolean;
|
|
222
|
+
hasHeader?: boolean;
|
|
223
|
+
hasScroll?: boolean;
|
|
224
|
+
headerHighlighted?: boolean;
|
|
225
|
+
footerHighlighted?: boolean;
|
|
226
|
+
headerOffset?: number;
|
|
227
|
+
setHeaderOffset: (offset: number) => void;
|
|
228
|
+
contentRef: Ref<HTMLElement>;
|
|
229
|
+
setHasHeader: (exists: boolean) => void;
|
|
230
|
+
setHasFooter: (exists: boolean) => void;
|
|
231
|
+
onClose: Required<BaseModalProps>["onClose"];
|
|
232
|
+
};
|
|
233
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
234
|
+
declare const BaseModalContext: React.Context<BaseModalContext>;
|
|
235
|
+
type ModalDesktopProps = BaseModalProps & {
|
|
236
|
+
/**
|
|
237
|
+
* Ширина модального окна
|
|
238
|
+
* @default "m"
|
|
239
|
+
*/
|
|
240
|
+
size?: "s" | "m" | "l" | "xl" | "fullscreen";
|
|
241
|
+
/**
|
|
242
|
+
* Растягивает модальное окно на весь экран
|
|
243
|
+
* @deprecated Используйте размер fullscreen
|
|
244
|
+
*/
|
|
245
|
+
fullscreen?: boolean;
|
|
246
|
+
/**
|
|
247
|
+
* Фиксирует позицию модального окна после открытия,
|
|
248
|
+
* предотвращая скачки, если контент внутри будет меняться
|
|
249
|
+
*/
|
|
250
|
+
fixedPosition?: boolean;
|
|
251
|
+
/**
|
|
252
|
+
* Управление наличием закрывающего крестика
|
|
253
|
+
* @default false
|
|
254
|
+
*/
|
|
255
|
+
hasCloser?: boolean;
|
|
256
|
+
};
|
|
257
|
+
type ModalMobileProps = Omit<ModalDesktopProps, "size" | "fixedPosition" | "fullscreen">;
|
|
258
|
+
type View = "desktop" | "mobile";
|
|
259
|
+
type TResponsiveModalContext = {
|
|
260
|
+
view: View;
|
|
261
|
+
size: NonNullable<ModalDesktopProps["size"]>;
|
|
262
|
+
};
|
|
263
|
+
type ContentProps = {
|
|
264
|
+
/**
|
|
265
|
+
* Контент
|
|
266
|
+
*/
|
|
267
|
+
children?: ReactNode;
|
|
268
|
+
/**
|
|
269
|
+
* Дополнительный класс
|
|
270
|
+
*/
|
|
271
|
+
className?: string;
|
|
272
|
+
/**
|
|
273
|
+
* Растягивает контент на всю высоту
|
|
274
|
+
*/
|
|
275
|
+
flex?: boolean;
|
|
276
|
+
};
|
|
277
|
+
type HeaderProps = Omit<NavigationBarProps, "size" | "view" | "parentRef">;
|
|
278
|
+
type FooterProps = {
|
|
279
|
+
/**
|
|
280
|
+
* Контент футера
|
|
281
|
+
*/
|
|
282
|
+
children?: ReactNode;
|
|
283
|
+
/**
|
|
284
|
+
* Дополнительный класс
|
|
285
|
+
*/
|
|
286
|
+
className?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Фиксирует футер
|
|
289
|
+
*/
|
|
290
|
+
sticky?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Выравнивание элементов футера
|
|
293
|
+
*/
|
|
294
|
+
layout?: "start" | "center" | "space-between" | "column";
|
|
295
|
+
/**
|
|
296
|
+
* Отступы между элементами футера
|
|
297
|
+
*/
|
|
298
|
+
gap?: 16 | 24 | 32;
|
|
299
|
+
};
|
|
300
|
+
declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
|
|
301
|
+
Content: React.FC<ContentProps>;
|
|
302
|
+
Header: React.FC<HeaderProps>;
|
|
303
|
+
Footer: React.FC<FooterProps>;
|
|
304
|
+
};
|
|
305
|
+
declare const Content: FC<ContentProps>;
|
|
306
|
+
declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
|
|
307
|
+
declare const Modal: React.ForwardRefExoticComponent<BaseModalProps & {
|
|
308
|
+
size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
|
|
309
|
+
fullscreen?: boolean | undefined;
|
|
310
|
+
fixedPosition?: boolean | undefined;
|
|
311
|
+
hasCloser?: boolean | undefined;
|
|
312
|
+
} & {
|
|
313
|
+
view: View;
|
|
314
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
315
|
+
declare const ModalContext: import("react").Context<BaseModalContext>;
|
|
316
|
+
/**
|
|
317
|
+
* Набор констант для z-index соответствующих классов компонентов.
|
|
318
|
+
* Значения выбраны по приоритету.
|
|
319
|
+
*/
|
|
320
|
+
declare const stackingOrder: {
|
|
321
|
+
FOCUSED: number;
|
|
322
|
+
DEFAULT: number;
|
|
323
|
+
POPOVER: number;
|
|
324
|
+
MODAL: number;
|
|
325
|
+
TOAST: number;
|
|
326
|
+
};
|
|
327
|
+
declare const StackingContext: import("react").Context<number>;
|
|
328
|
+
type StackProps = {
|
|
329
|
+
/**
|
|
330
|
+
* Render prop, в который передается функция.
|
|
331
|
+
* Функция принимает аргумент со значением z-index из текущего контекста.
|
|
332
|
+
*/
|
|
333
|
+
children: (value: number) => ReactNode;
|
|
334
|
+
/**
|
|
335
|
+
* Исходное значение для z-index.
|
|
336
|
+
* @default 5
|
|
337
|
+
*/
|
|
338
|
+
value?: number;
|
|
339
|
+
};
|
|
340
|
+
declare const Stack: FC<StackProps>;
|
|
341
|
+
declare const PORTAL_CONTAINER_ATTRIBUTE = "alfa-portal-container";
|
|
342
|
+
declare const getDefaultPortalContainer: () => Element;
|
|
343
|
+
declare function setRef<T>(ref: RefObject<T> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
|
|
344
|
+
type SavedStyle = {
|
|
345
|
+
value: string;
|
|
346
|
+
key: string;
|
|
347
|
+
el: HTMLElement;
|
|
348
|
+
};
|
|
349
|
+
type RestoreStyle = {
|
|
350
|
+
container: HTMLElement;
|
|
351
|
+
modals: number;
|
|
352
|
+
styles: SavedStyle[];
|
|
353
|
+
};
|
|
354
|
+
declare class ModalStore {
|
|
355
|
+
private readonly restoreStyles;
|
|
356
|
+
constructor();
|
|
357
|
+
getRestoreStyles: () => RestoreStyle[];
|
|
358
|
+
}
|
|
359
|
+
declare const getModalStore: () => ModalStore;
|
|
360
|
+
declare class GlobalStore {
|
|
361
|
+
private readonly modalStore;
|
|
362
|
+
constructor();
|
|
363
|
+
getModalStore: () => ModalStore;
|
|
364
|
+
}
|
|
365
|
+
export { CalendarMobileProps, CalendarMobile, ModalMobile, ModalMobileProps, Content, ResponsiveContext, Modal, ModalContext, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, getModalStore, GlobalStore };
|
|
366
|
+
export { ButtonMobile } from "./Component.mobile-16b1285a";
|
|
367
|
+
export type { CommonButtonProps as ButtonMobileProps } from "./typings-89f0cb07";
|
|
368
|
+
export type { SavedStyle };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { NavigationBarProps } from "./types-
|
|
3
|
+
import { NavigationBarProps } from "./types-1c79e231";
|
|
4
4
|
declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export * from "./Component-
|
|
5
|
+
export * from "./Component-69921c40";
|
|
6
6
|
export { NavigationBar };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
|
|
5
|
+
type SpinnerProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Управление видимостью компонента
|
|
8
|
+
*/
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Размер компонента
|
|
12
|
+
*/
|
|
13
|
+
size?: "xs" | "s" | "m";
|
|
14
|
+
/**
|
|
15
|
+
* Дополнительный класс
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Идентификатор компонента в DOM
|
|
20
|
+
*/
|
|
21
|
+
id?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
24
|
+
*/
|
|
25
|
+
dataTestId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Палитра, в контексте которой используется спиннер
|
|
28
|
+
*/
|
|
29
|
+
colors?: "default" | "inverted";
|
|
30
|
+
};
|
|
31
|
+
declare const Spinner: FC<SpinnerProps>;
|
|
32
|
+
/**
|
|
33
|
+
* Минимальное время отображения лоадера - 500мс,
|
|
34
|
+
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
35
|
+
*/
|
|
36
|
+
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
37
|
+
declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
38
|
+
export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|
|
@@ -4,8 +4,8 @@ import React from "react";
|
|
|
4
4
|
import { ReactNode, FC, KeyboardEvent, MouseEvent, MutableRefObject, Ref, RefObject } from "react";
|
|
5
5
|
import { TransitionProps } from "react-transition-group/Transition";
|
|
6
6
|
import { CSSTransitionClassNames } from "react-transition-group/CSSTransition";
|
|
7
|
-
import { NavigationBarProps } from "./types-
|
|
8
|
-
import { CalendarDesktopProps } from "./Component.desktop-
|
|
7
|
+
import { NavigationBarProps } from "./types-1c79e231";
|
|
8
|
+
import { CalendarDesktopProps } from "./Component.desktop-b5b4c59f";
|
|
9
9
|
type BackdropProps = Partial<TransitionProps> & {
|
|
10
10
|
/**
|
|
11
11
|
* Прозрачный бэкдроп
|
|
@@ -383,6 +383,7 @@ declare const CalendarMobile: React.ForwardRefExoticComponent<CalendarDesktopPro
|
|
|
383
383
|
*/
|
|
384
384
|
allowSelectionFromEmptyRange?: boolean | undefined;
|
|
385
385
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
386
|
-
export
|
|
386
|
+
export { ButtonMobile } from "./Component.mobile-16b1285a";
|
|
387
|
+
export type { CommonButtonProps as ButtonMobileProps } from "./typings-89f0cb07";
|
|
387
388
|
export { ModalMobile, ModalMobileProps, Content, ResponsiveContext, Modal, ModalContext, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, getModalStore, GlobalStore, CalendarMobileProps, CalendarMobile };
|
|
388
389
|
export type { SavedStyle };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CommonButtonProps } from "./typings-89f0cb07";
|
|
4
|
+
declare const ButtonDesktop: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
|
+
export { ButtonDesktop };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BaseFormControlProps } from "./index-ebda875c";
|
|
4
|
+
type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
|
|
5
|
+
declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { FormControlDesktopProps, FormControlDesktop };
|
|
@@ -16,6 +16,10 @@ type HeaderProps = {
|
|
|
16
16
|
* Дочерние элементы.
|
|
17
17
|
*/
|
|
18
18
|
children?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Дополнительный класс
|
|
21
|
+
*/
|
|
22
|
+
className?: string;
|
|
19
23
|
};
|
|
20
24
|
declare const Header: FC<HeaderProps>;
|
|
21
25
|
type MonthYearHeaderProps = {
|
|
@@ -79,10 +83,6 @@ type YearsTableProps = {
|
|
|
79
83
|
* Доп. пропсы для переданного года
|
|
80
84
|
*/
|
|
81
85
|
getYearProps: (year: Date) => Record<string, unknown>;
|
|
82
|
-
/**
|
|
83
|
-
* Обработчик скролла
|
|
84
|
-
*/
|
|
85
|
-
onScroll: (scrollTop: number) => void;
|
|
86
86
|
/**
|
|
87
87
|
* Должен ли календарь подстраиваться под ширину родителя.
|
|
88
88
|
*/
|
|
@@ -94,6 +94,14 @@ type CalendarDesktopProps = {
|
|
|
94
94
|
* Дополнительный класс
|
|
95
95
|
*/
|
|
96
96
|
className?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Дополнительный класс шапки десктопного календаря
|
|
99
|
+
*/
|
|
100
|
+
headerClassName?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Дополнительный класс контента десктопного календаря
|
|
103
|
+
*/
|
|
104
|
+
contentClassName?: string;
|
|
97
105
|
/**
|
|
98
106
|
* Вид по умолчанию (выбор дней, месяцев, лет)
|
|
99
107
|
*/
|
|
@@ -194,4 +202,4 @@ type CalendarDesktopProps = {
|
|
|
194
202
|
};
|
|
195
203
|
declare const CalendarDesktop: React.ForwardRefExoticComponent<CalendarDesktopProps & React.RefAttributes<HTMLDivElement>>;
|
|
196
204
|
export { HeaderProps, Header, MonthYearHeaderProps, MonthYearHeader, MonthsTableProps, MonthsTable, formatPeriod, getYearSelectorValue, shiftValues, YearsTableProps, YearsTable, CalendarDesktopProps, CalendarDesktop };
|
|
197
|
-
export * from "./Component-
|
|
205
|
+
export * from "./Component-69921c40";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CommonButtonProps } from "./typings-89f0cb07";
|
|
4
|
+
declare const ButtonMobile: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
|
+
export { ButtonMobile };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BaseFormControlProps } from "./index-ebda875c";
|
|
4
|
+
type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
|
|
5
|
+
declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { FormControlMobileProps, FormControlMobile };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
type
|
|
5
|
-
declare const
|
|
6
|
-
export
|
|
3
|
+
import { BaseInputProps } from "./index-ebda875c";
|
|
4
|
+
type InputMobileProps = Omit<BaseInputProps, 'FormControlComponent' | 'colorStyles'>;
|
|
5
|
+
declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
+
export * from "./Component.mobile-d7e9f69d";
|
|
7
|
+
export { InputMobileProps, InputMobile };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BaseFormControlProps } from "./index-ebda875c";
|
|
4
|
+
type FormControlProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'> & {
|
|
5
|
+
/**
|
|
6
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
7
|
+
* @default 1024
|
|
8
|
+
*/
|
|
9
|
+
breakpoint?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Значение по-умолчанию для хука useMatchMedia
|
|
12
|
+
*/
|
|
13
|
+
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
14
|
+
};
|
|
15
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
|
|
16
|
+
/**
|
|
17
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
18
|
+
* @default 1024
|
|
19
|
+
*/
|
|
20
|
+
breakpoint?: number | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Значение по-умолчанию для хука useMatchMedia
|
|
23
|
+
*/
|
|
24
|
+
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
25
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export { FormControlProps, FormControl };
|
|
@@ -10,7 +10,7 @@ import { getDateWithoutTime, DATE_WITH_TIME_LENGTH, format, getFullDateTime, isC
|
|
|
10
10
|
import 'date-fns/isValid';
|
|
11
11
|
import 'date-fns/parse';
|
|
12
12
|
|
|
13
|
-
const styles = {"component":"date-time-
|
|
13
|
+
const styles = {"component":"date-time-input__component_12vzy","calendarContainer":"date-time-input__calendarContainer_12vzy","calendarResponsive":"date-time-input__calendarResponsive_12vzy","block":"date-time-input__block_12vzy","calendarIcon":"date-time-input__calendarIcon_12vzy"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
/* eslint-disable no-useless-escape, jsx-a11y/click-events-have-key-events */
|
|
@@ -131,12 +131,13 @@ const DateTimeInput = React.forwardRef(({ className, inputClassName, popoverClas
|
|
|
131
131
|
return (React.createElement("div", { className: cn(styles.component, className, {
|
|
132
132
|
[styles.block]: block,
|
|
133
133
|
}), onFocus: inputDisabled ? undefined : handleInputWrapperFocus, onBlur: handleBlur },
|
|
134
|
-
InputComponent ? (React.createElement(InputComponent, { ...restProps, block: block, ref: mergeRefs([ref, inputRef]), value: value, onChange: handleChange, disabled: disabled, readOnly: readOnly, className: inputClassName, onClear: handleClear, disableUserInput: disableUserInput, error: error, rightAddons: React.createElement(React.Fragment, null,
|
|
134
|
+
InputComponent ? (React.createElement(InputComponent, { autoComplete: picker ? 'off' : undefined, ...restProps, block: block, ref: mergeRefs([ref, inputRef]), value: value, onChange: handleChange, disabled: disabled, readOnly: readOnly, className: inputClassName, onClear: handleClear, disableUserInput: disableUserInput, error: error, rightAddons: React.createElement(React.Fragment, null,
|
|
135
135
|
rightAddons,
|
|
136
136
|
picker && (React.createElement(IconButton, { className: styles.calendarIcon, onClick: inputDisabled ? undefined : handleIconButtonClick, icon: CalendarMIcon, size: 's' }))) })) : null,
|
|
137
|
-
picker &&
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
picker &&
|
|
138
|
+
(view === 'desktop' ? (React.createElement(Popover, { open: open, useAnchorWidth: useAnchorWidth, anchorElement: inputRef.current, popperClassName: cn(styles.calendarContainer, {
|
|
139
|
+
[styles.calendarResponsive]: calendarResponsive,
|
|
140
|
+
}), className: popoverClassName, position: popoverPosition, offset: [0, 8], withTransition: false, preventFlip: preventFlip, zIndex: zIndexPopover }, renderCalendar())) : (renderCalendar()))));
|
|
140
141
|
});
|
|
141
142
|
|
|
142
143
|
export { DateTimeInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 11wew */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-secondary: #e9e9eb; /* 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 */
|
|
@@ -41,24 +41,24 @@
|
|
|
41
41
|
/* marker */
|
|
42
42
|
} :root {
|
|
43
43
|
--calendar-popover-border-radius: var(--border-radius-m);
|
|
44
|
-
} .date-time-
|
|
44
|
+
} .date-time-input__component_12vzy {
|
|
45
45
|
display: inline-block;
|
|
46
46
|
outline: none;
|
|
47
47
|
position: relative;
|
|
48
|
-
} .date-time-
|
|
48
|
+
} .date-time-input__calendarContainer_12vzy {
|
|
49
49
|
display: inline-block;
|
|
50
50
|
box-sizing: border-box;
|
|
51
51
|
border-radius: var(--calendar-popover-border-radius);
|
|
52
52
|
border: 1px solid var(--color-light-border-secondary)
|
|
53
|
-
} @media (max-width: 374px) { .date-time-
|
|
53
|
+
} @media (max-width: 374px) { .date-time-input__calendarContainer_12vzy {
|
|
54
54
|
width: 100%;
|
|
55
55
|
min-width: 288px
|
|
56
56
|
}
|
|
57
|
-
} .date-time-
|
|
57
|
+
} .date-time-input__calendarResponsive_12vzy {
|
|
58
58
|
width: var(--calendar-width);
|
|
59
|
-
} .date-time-
|
|
59
|
+
} .date-time-input__block_12vzy {
|
|
60
60
|
width: 100%;
|
|
61
|
-
} .date-time-
|
|
61
|
+
} .date-time-input__calendarIcon_12vzy {
|
|
62
62
|
margin-right: var(--gap-s-neg);
|
|
63
63
|
height: 100%;
|
|
64
64
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Component.desktop-
|
|
1
|
+
export * from "./Component.desktop-b5b4c59f";
|
|
2
2
|
export {};
|
|
@@ -10,10 +10,6 @@ declare function easeInOutQuad(x: number): number;
|
|
|
10
10
|
declare const easingFns: {
|
|
11
11
|
easeInOutQuad: typeof easeInOutQuad;
|
|
12
12
|
};
|
|
13
|
-
declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
|
|
14
|
-
declare const inputUtils: {
|
|
15
|
-
disableUserInput: typeof disableUserInput;
|
|
16
|
-
};
|
|
17
13
|
/**
|
|
18
14
|
* Возвращает true, если значение равно null или undefined
|
|
19
15
|
*/
|
|
@@ -51,4 +47,4 @@ declare const maskUtils: {
|
|
|
51
47
|
prefixPostprocessor: typeof prefixPostprocessor;
|
|
52
48
|
caretGuard: typeof caretGuard;
|
|
53
49
|
};
|
|
54
|
-
export { isClient, getDataTestId, createPaddingStyle, easingFns,
|
|
50
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, fnUtils, maskUtils };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from "react";
|
|
3
1
|
import { FC, ReactNode } from "react";
|
|
4
|
-
import { ButtonProps } from "./typings-9211a437";
|
|
5
2
|
type MqProps = {
|
|
6
3
|
/**
|
|
7
4
|
* Media выражение или кастомный запрос из `mq.json`, например `--mobile`.
|
|
@@ -62,5 +59,4 @@ declare const _exports: {
|
|
|
62
59
|
"--desktop-xl": string;
|
|
63
60
|
"--desktop": string;
|
|
64
61
|
};
|
|
65
|
-
|
|
66
|
-
export { _exports as default, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported, Button };
|
|
62
|
+
export { _exports as default, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported };
|