@alfalab/core-components-date-range-input 2.4.0 → 3.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.
Files changed (151) hide show
  1. package/Component-63dec22f.d.ts +167 -0
  2. package/Component-89a3cf4c.d.ts +6 -0
  3. package/Component-8b5756fe.d.ts +380 -0
  4. package/Component.desktop-2e2b2125.d.ts +6 -0
  5. package/Component.desktop-8b5756fe.d.ts +197 -0
  6. package/Component.desktop.d.ts +1 -1
  7. package/Component.desktop.js +4 -3
  8. package/Component.mobile-755fbaa3.d.ts +6 -0
  9. package/Component.mobile-ebda875c.d.ts +6 -0
  10. package/Component.mobile.d.ts +1 -1
  11. package/Component.mobile.js +4 -3
  12. package/Component.responsive-2e2b2125.d.ts +66 -0
  13. package/Component.responsive.d.ts +1 -1
  14. package/Component.responsive.js +5 -2
  15. package/components/date-range-input/Component.d.ts +7 -2
  16. package/components/date-range-input/Component.js +10 -11
  17. package/components/date-range-input/index.css +7 -7
  18. package/components/date-range-input/index.js +1 -2
  19. package/cssm/Component-63dec22f.d.ts +167 -0
  20. package/cssm/Component-89a3cf4c.d.ts +6 -0
  21. package/cssm/Component-8b5756fe.d.ts +380 -0
  22. package/cssm/Component.desktop-2e2b2125.d.ts +6 -0
  23. package/cssm/Component.desktop-8b5756fe.d.ts +197 -0
  24. package/cssm/Component.desktop.d.ts +1 -1
  25. package/cssm/Component.desktop.js +4 -3
  26. package/cssm/Component.mobile-755fbaa3.d.ts +6 -0
  27. package/cssm/Component.mobile-ebda875c.d.ts +6 -0
  28. package/cssm/Component.mobile.d.ts +1 -1
  29. package/cssm/Component.mobile.js +4 -3
  30. package/cssm/Component.responsive-2e2b2125.d.ts +66 -0
  31. package/cssm/Component.responsive.d.ts +1 -1
  32. package/cssm/Component.responsive.js +5 -2
  33. package/cssm/components/date-range-input/Component.d.ts +7 -2
  34. package/cssm/components/date-range-input/Component.js +9 -10
  35. package/cssm/components/date-range-input/index.js +1 -2
  36. package/cssm/desktop-63dec22f.d.ts +2 -0
  37. package/cssm/desktop.js +3 -2
  38. package/cssm/index-89a3cf4c.d.ts +3 -0
  39. package/cssm/index-9211a437.d.ts +2 -0
  40. package/cssm/index-ebda875c.d.ts +35 -0
  41. package/cssm/index-f034f741.d.ts +80 -0
  42. package/cssm/index.d.ts +3 -2
  43. package/cssm/index.js +5 -2
  44. package/cssm/mobile-c219f8ca.d.ts +1 -0
  45. package/cssm/mobile.js +3 -2
  46. package/cssm/types-ebda875c.d.ts +113 -0
  47. package/cssm/typings-5684a67d.d.ts +23 -0
  48. package/cssm/typings-9211a437.d.ts +95 -0
  49. package/cssm/useCalendar-5684a67d.d.ts +97 -0
  50. package/cssm/utils-5684a67d.d.ts +88 -0
  51. package/desktop-63dec22f.d.ts +2 -0
  52. package/desktop.js +3 -2
  53. package/esm/Component-63dec22f.d.ts +167 -0
  54. package/esm/Component-89a3cf4c.d.ts +6 -0
  55. package/esm/Component-8b5756fe.d.ts +380 -0
  56. package/esm/Component.desktop-2e2b2125.d.ts +6 -0
  57. package/esm/Component.desktop-8b5756fe.d.ts +197 -0
  58. package/esm/Component.desktop.d.ts +1 -1
  59. package/esm/Component.desktop.js +4 -3
  60. package/esm/Component.mobile-755fbaa3.d.ts +6 -0
  61. package/esm/Component.mobile-ebda875c.d.ts +6 -0
  62. package/esm/Component.mobile.d.ts +1 -1
  63. package/esm/Component.mobile.js +4 -3
  64. package/esm/Component.responsive-2e2b2125.d.ts +66 -0
  65. package/esm/Component.responsive.d.ts +1 -1
  66. package/esm/Component.responsive.js +5 -2
  67. package/esm/components/date-range-input/Component.d.ts +7 -2
  68. package/esm/components/date-range-input/Component.js +10 -11
  69. package/esm/components/date-range-input/index.css +7 -7
  70. package/esm/components/date-range-input/index.js +1 -2
  71. package/esm/desktop-63dec22f.d.ts +2 -0
  72. package/esm/desktop.js +3 -2
  73. package/esm/index-89a3cf4c.d.ts +3 -0
  74. package/esm/index-9211a437.d.ts +2 -0
  75. package/esm/index-ebda875c.d.ts +35 -0
  76. package/esm/index-f034f741.d.ts +80 -0
  77. package/esm/index.d.ts +3 -2
  78. package/esm/index.js +5 -2
  79. package/esm/mobile-c219f8ca.d.ts +1 -0
  80. package/esm/mobile.js +3 -2
  81. package/esm/types-ebda875c.d.ts +113 -0
  82. package/esm/typings-5684a67d.d.ts +23 -0
  83. package/esm/typings-9211a437.d.ts +95 -0
  84. package/esm/useCalendar-5684a67d.d.ts +97 -0
  85. package/esm/utils-5684a67d.d.ts +88 -0
  86. package/index-89a3cf4c.d.ts +3 -0
  87. package/index-9211a437.d.ts +2 -0
  88. package/index-ebda875c.d.ts +35 -0
  89. package/index-f034f741.d.ts +80 -0
  90. package/index.d.ts +3 -2
  91. package/index.js +5 -2
  92. package/mobile-c219f8ca.d.ts +1 -0
  93. package/mobile.js +3 -2
  94. package/modern/Component-63dec22f.d.ts +167 -0
  95. package/modern/Component-89a3cf4c.d.ts +6 -0
  96. package/modern/Component-8b5756fe.d.ts +380 -0
  97. package/modern/Component.desktop-2e2b2125.d.ts +6 -0
  98. package/modern/Component.desktop-8b5756fe.d.ts +197 -0
  99. package/modern/Component.desktop.d.ts +1 -1
  100. package/modern/Component.desktop.js +4 -3
  101. package/modern/Component.mobile-755fbaa3.d.ts +6 -0
  102. package/modern/Component.mobile-ebda875c.d.ts +6 -0
  103. package/modern/Component.mobile.d.ts +1 -1
  104. package/modern/Component.mobile.js +4 -3
  105. package/modern/Component.responsive-2e2b2125.d.ts +66 -0
  106. package/modern/Component.responsive.d.ts +1 -1
  107. package/modern/Component.responsive.js +5 -2
  108. package/modern/components/date-range-input/Component.d.ts +7 -2
  109. package/modern/components/date-range-input/Component.js +7 -8
  110. package/modern/components/date-range-input/index.css +7 -7
  111. package/modern/components/date-range-input/index.js +1 -2
  112. package/modern/desktop-63dec22f.d.ts +2 -0
  113. package/modern/desktop.js +3 -2
  114. package/modern/index-89a3cf4c.d.ts +3 -0
  115. package/modern/index-9211a437.d.ts +2 -0
  116. package/modern/index-ebda875c.d.ts +35 -0
  117. package/modern/index-f034f741.d.ts +80 -0
  118. package/modern/index.d.ts +3 -2
  119. package/modern/index.js +5 -2
  120. package/modern/mobile-c219f8ca.d.ts +1 -0
  121. package/modern/mobile.js +3 -2
  122. package/modern/types-ebda875c.d.ts +113 -0
  123. package/modern/typings-5684a67d.d.ts +23 -0
  124. package/modern/typings-9211a437.d.ts +95 -0
  125. package/modern/useCalendar-5684a67d.d.ts +97 -0
  126. package/modern/utils-5684a67d.d.ts +88 -0
  127. package/package.json +25 -5
  128. package/src/Component.desktop.tsx +29 -0
  129. package/src/Component.mobile.tsx +30 -0
  130. package/src/Component.responsive.tsx +41 -0
  131. package/src/components/date-range-input/Component.tsx +519 -0
  132. package/src/components/date-range-input/index.module.css +37 -0
  133. package/src/components/date-range-input/index.ts +1 -0
  134. package/src/desktop.ts +1 -0
  135. package/src/index.ts +2 -0
  136. package/src/mobile.ts +1 -0
  137. package/src/utils/format.ts +91 -0
  138. package/src/utils/index.ts +1 -0
  139. package/types-ebda875c.d.ts +113 -0
  140. package/typings-5684a67d.d.ts +23 -0
  141. package/typings-9211a437.d.ts +95 -0
  142. package/useCalendar-5684a67d.d.ts +97 -0
  143. package/utils-5684a67d.d.ts +88 -0
  144. package/cssm/responsive.d.ts +0 -2
  145. package/cssm/responsive.js +0 -27
  146. package/esm/responsive.d.ts +0 -2
  147. package/esm/responsive.js +0 -18
  148. package/modern/responsive.d.ts +0 -2
  149. package/modern/responsive.js +0 -17
  150. package/responsive.d.ts +0 -2
  151. package/responsive.js +0 -26
@@ -0,0 +1,380 @@
1
+ /// <reference types="react-transition-group" />
2
+ /// <reference types="react" />
3
+ import React from "react";
4
+ import { ReactNode, FC, KeyboardEvent, MouseEvent, MutableRefObject, Ref, RefObject } from "react";
5
+ import { TransitionProps } from "react-transition-group/Transition";
6
+ import { CSSTransitionClassNames } from "react-transition-group/CSSTransition";
7
+ import { NavigationBarProps } from "./types-ebda875c";
8
+ import { CalendarDesktopProps } from "./Component.desktop-8b5756fe";
9
+ type BackdropProps = Partial<TransitionProps> & {
10
+ /**
11
+ * Прозрачный бэкдроп
12
+ */
13
+ invisible?: boolean;
14
+ /**
15
+ * Управляет видимостью компонента
16
+ */
17
+ open: boolean;
18
+ /**
19
+ * Обработчик клика по бэкдропу
20
+ */
21
+ onClose?: (event: MouseEvent<HTMLElement>) => void;
22
+ /**
23
+ * Дополнительный класс
24
+ */
25
+ className?: string;
26
+ /**
27
+ * Классы анимации
28
+ *
29
+ * http://reactcommunity.org/react-transition-group/css-transition#CSSTransition-prop-classNames
30
+ */
31
+ transitionClassNames?: string | CSSTransitionClassNames;
32
+ /**
33
+ * Идентификатор для систем автоматизированного тестирования
34
+ */
35
+ dataTestId?: string;
36
+ /**
37
+ * Дочерние элементы.
38
+ */
39
+ children?: ReactNode;
40
+ };
41
+ type PortalProps = {
42
+ /** Контент */
43
+ children?: ReactNode;
44
+ /**
45
+ * Функция, возвращающая контейнер, в который будут рендериться дочерние элементы
46
+ */
47
+ getPortalContainer?: () => Element;
48
+ /**
49
+ * Немедленно отрендерить дочерние элементы (false - контент будет отрендерен на след. рендер).
50
+ */
51
+ immediateMount?: boolean;
52
+ };
53
+ type BaseModalProps = {
54
+ /**
55
+ * Контент
56
+ */
57
+ children?: ReactNode;
58
+ /**
59
+ * Компонент бэкдропа
60
+ */
61
+ Backdrop?: FC<BackdropProps>;
62
+ /**
63
+ * Свойства для Бэкдропа
64
+ */
65
+ backdropProps?: Partial<BackdropProps> & Record<string, unknown>;
66
+ /**
67
+ * Нода, компонент или функция возвращающая их
68
+ *
69
+ * Контейнер к которому будут добавляться порталы
70
+ */
71
+ container?: PortalProps["getPortalContainer"];
72
+ /**
73
+ * Отключает автоматический перевод фокуса на модалку при открытии
74
+ * @default false
75
+ */
76
+ disableAutoFocus?: boolean;
77
+ /**
78
+ * Отключает ловушку фокуса
79
+ * @default false
80
+ */
81
+ disableFocusLock?: boolean;
82
+ /**
83
+ * Отключает восстановление фокуса на предыдущем элементе после закрытия модалки
84
+ * @default false
85
+ */
86
+ disableRestoreFocus?: boolean;
87
+ /**
88
+ * Отключает вызов `callback` при нажатии Escape
89
+ * @default false
90
+ */
91
+ disableEscapeKeyDown?: boolean;
92
+ /**
93
+ * Отключает вызов `callback` при клике на бэкдроп
94
+ * @default false
95
+ */
96
+ disableBackdropClick?: boolean;
97
+ /**
98
+ * Отключает блокировку скролла при открытии модального окна
99
+ * @default false
100
+ */
101
+ disableBlockingScroll?: boolean;
102
+ /**
103
+ * Содержимое модалки всегда в DOM
104
+ * @default false
105
+ */
106
+ keepMounted?: boolean;
107
+ /**
108
+ * Управление видимостью модалки
109
+ */
110
+ open: boolean;
111
+ /**
112
+ * Дополнительный класс
113
+ */
114
+ className?: string;
115
+ /**
116
+ * Дополнительный класс
117
+ */
118
+ contentClassName?: string;
119
+ /**
120
+ * Дополнительный класс для обертки (Modal)
121
+ */
122
+ wrapperClassName?: string;
123
+ /**
124
+ * Обработчик скролла контента
125
+ */
126
+ scrollHandler?: "wrapper" | "content" | MutableRefObject<HTMLDivElement | null>;
127
+ /**
128
+ * Пропсы для анимации (CSSTransition)
129
+ */
130
+ transitionProps?: Partial<TransitionProps>;
131
+ /**
132
+ * Рендерить ли в контейнер через портал.
133
+ * @default true
134
+ */
135
+ usePortal?: boolean;
136
+ /**
137
+ * Обработчик события нажатия на бэкдроп
138
+ */
139
+ onBackdropClick?: (event: MouseEvent) => void;
140
+ /**
141
+ * Обработчик события нажатия на Escape
142
+ *
143
+ * Если `disableEscapeKeyDown` - false и модальное окно в фокусе
144
+ */
145
+ onEscapeKeyDown?: (event: KeyboardEvent) => void;
146
+ /**
147
+ * Обработчик закрытия
148
+ */
149
+ onClose?: (event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
150
+ /**
151
+ * Обработчик события onEntered компонента Transition
152
+ */
153
+ onMount?: () => void;
154
+ /**
155
+ * Обработчик события onExited компонента Transition
156
+ */
157
+ onUnmount?: () => void;
158
+ /**
159
+ * Идентификатор для систем автоматизированного тестирования
160
+ */
161
+ dataTestId?: string;
162
+ /**
163
+ * z-index компонента
164
+ */
165
+ zIndex?: number;
166
+ /**
167
+ * Реф, который должен быть установлен компонентной области
168
+ */
169
+ componentRef?: MutableRefObject<HTMLDivElement | null>;
170
+ };
171
+ type BaseModalContext = {
172
+ parentRef: React.RefObject<HTMLDivElement>;
173
+ componentRef: React.RefObject<HTMLDivElement>;
174
+ hasFooter?: boolean;
175
+ hasHeader?: boolean;
176
+ hasScroll?: boolean;
177
+ headerHighlighted?: boolean;
178
+ footerHighlighted?: boolean;
179
+ headerOffset?: number;
180
+ setHeaderOffset: (offset: number) => void;
181
+ contentRef: Ref<HTMLElement>;
182
+ setHasHeader: (exists: boolean) => void;
183
+ setHasFooter: (exists: boolean) => void;
184
+ onClose: Required<BaseModalProps>["onClose"];
185
+ };
186
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
187
+ declare const BaseModalContext: React.Context<BaseModalContext>;
188
+ type ModalDesktopProps = BaseModalProps & {
189
+ /**
190
+ * Ширина модального окна
191
+ * @default "m"
192
+ */
193
+ size?: "s" | "m" | "l" | "xl" | "fullscreen";
194
+ /**
195
+ * Растягивает модальное окно на весь экран
196
+ * @deprecated Используйте размер fullscreen
197
+ */
198
+ fullscreen?: boolean;
199
+ /**
200
+ * Фиксирует позицию модального окна после открытия,
201
+ * предотвращая скачки, если контент внутри будет меняться
202
+ */
203
+ fixedPosition?: boolean;
204
+ /**
205
+ * Управление наличием закрывающего крестика
206
+ * @default false
207
+ */
208
+ hasCloser?: boolean;
209
+ };
210
+ type ModalMobileProps = Omit<ModalDesktopProps, "size" | "fixedPosition" | "fullscreen">;
211
+ type View = "desktop" | "mobile";
212
+ type TResponsiveModalContext = {
213
+ view: View;
214
+ size: NonNullable<ModalDesktopProps["size"]>;
215
+ };
216
+ type ContentProps = {
217
+ /**
218
+ * Контент
219
+ */
220
+ children?: ReactNode;
221
+ /**
222
+ * Дополнительный класс
223
+ */
224
+ className?: string;
225
+ /**
226
+ * Растягивает контент на всю высоту
227
+ */
228
+ flex?: boolean;
229
+ };
230
+ type HeaderProps = Omit<NavigationBarProps, "size" | "view" | "parentRef">;
231
+ type FooterProps = {
232
+ /**
233
+ * Контент футера
234
+ */
235
+ children?: ReactNode;
236
+ /**
237
+ * Дополнительный класс
238
+ */
239
+ className?: string;
240
+ /**
241
+ * Фиксирует футер
242
+ */
243
+ sticky?: boolean;
244
+ /**
245
+ * Выравнивание элементов футера
246
+ */
247
+ layout?: "start" | "center" | "space-between" | "column";
248
+ /**
249
+ * Отступы между элементами футера
250
+ */
251
+ gap?: 16 | 24 | 32;
252
+ };
253
+ declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
254
+ Content: React.FC<ContentProps>;
255
+ Header: React.FC<HeaderProps>;
256
+ Footer: React.FC<FooterProps>;
257
+ };
258
+ declare const Content: FC<ContentProps>;
259
+ declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
260
+ declare const Modal: React.ForwardRefExoticComponent<BaseModalProps & {
261
+ size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
262
+ fullscreen?: boolean | undefined;
263
+ fixedPosition?: boolean | undefined;
264
+ hasCloser?: boolean | undefined;
265
+ } & {
266
+ view: View;
267
+ } & React.RefAttributes<HTMLDivElement>>;
268
+ declare const ModalContext: import("react").Context<BaseModalContext>;
269
+ /**
270
+ * Набор констант для z-index соответствующих классов компонентов.
271
+ * Значения выбраны по приоритету.
272
+ */
273
+ declare const stackingOrder: {
274
+ FOCUSED: number;
275
+ DEFAULT: number;
276
+ POPOVER: number;
277
+ MODAL: number;
278
+ TOAST: number;
279
+ };
280
+ declare const StackingContext: import("react").Context<number>;
281
+ type StackProps = {
282
+ /**
283
+ * Render prop, в который передается функция.
284
+ * Функция принимает аргумент со значением z-index из текущего контекста.
285
+ */
286
+ children: (value: number) => ReactNode;
287
+ /**
288
+ * Исходное значение для z-index.
289
+ * @default 5
290
+ */
291
+ value?: number;
292
+ };
293
+ declare const Stack: FC<StackProps>;
294
+ declare const PORTAL_CONTAINER_ATTRIBUTE = "alfa-portal-container";
295
+ declare const getDefaultPortalContainer: () => Element;
296
+ declare function setRef<T>(ref: RefObject<T> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
297
+ type SavedStyle = {
298
+ value: string;
299
+ key: string;
300
+ el: HTMLElement;
301
+ };
302
+ type RestoreStyle = {
303
+ container: HTMLElement;
304
+ modals: number;
305
+ styles: SavedStyle[];
306
+ };
307
+ declare class ModalStore {
308
+ private readonly restoreStyles;
309
+ constructor();
310
+ getRestoreStyles: () => RestoreStyle[];
311
+ }
312
+ declare const getModalStore: () => ModalStore;
313
+ declare class GlobalStore {
314
+ private readonly modalStore;
315
+ constructor();
316
+ getModalStore: () => ModalStore;
317
+ }
318
+ type CalendarMobileProps = CalendarDesktopProps & {
319
+ /**
320
+ * Управление видимостью модалки
321
+ */
322
+ open: boolean;
323
+ /**
324
+ * Заголовок календаря
325
+ */
326
+ title?: string;
327
+ /**
328
+ * Обработчик закрытия модалки
329
+ */
330
+ onClose?: () => void;
331
+ /**
332
+ * Обработчик клика на название месяца в мобильном календаре
333
+ */
334
+ onMonthTitleClick?: (event: React.MouseEvent<HTMLSpanElement>) => void;
335
+ /**
336
+ * Количество лет для генерации в обе стороны от текущего года
337
+ */
338
+ yearsAmount?: number;
339
+ /**
340
+ * Нужно ли рендерить шапку
341
+ */
342
+ hasHeader?: boolean;
343
+ /**
344
+ * Разрешить выбор из недозаполненного диапазона дат.
345
+ */
346
+ allowSelectionFromEmptyRange?: boolean;
347
+ };
348
+ declare const CalendarMobile: React.ForwardRefExoticComponent<CalendarDesktopProps & {
349
+ /**
350
+ * Управление видимостью модалки
351
+ */
352
+ open: boolean;
353
+ /**
354
+ * Заголовок календаря
355
+ */
356
+ title?: string | undefined;
357
+ /**
358
+ * Обработчик закрытия модалки
359
+ */
360
+ onClose?: (() => void) | undefined;
361
+ /**
362
+ * Обработчик клика на название месяца в мобильном календаре
363
+ */
364
+ onMonthTitleClick?: ((event: React.MouseEvent<HTMLSpanElement>) => void) | undefined;
365
+ /**
366
+ * Количество лет для генерации в обе стороны от текущего года
367
+ */
368
+ yearsAmount?: number | undefined;
369
+ /**
370
+ * Нужно ли рендерить шапку
371
+ */
372
+ hasHeader?: boolean | undefined;
373
+ /**
374
+ * Разрешить выбор из недозаполненного диапазона дат.
375
+ */
376
+ allowSelectionFromEmptyRange?: boolean | undefined;
377
+ } & React.RefAttributes<HTMLDivElement>>;
378
+ export * from "./Component.mobile-755fbaa3";
379
+ export { ModalMobile, ModalMobileProps, Content, ResponsiveContext, Modal, ModalContext, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, getModalStore, GlobalStore, CalendarMobileProps, CalendarMobile };
380
+ export type { SavedStyle };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
4
+ type ButtonDesktopProps = Partial<AnchorButtonProps | NativeButtonProps>;
5
+ declare const ButtonDesktop: React.ForwardRefExoticComponent<ButtonDesktopProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
+ export { ButtonDesktopProps, ButtonDesktop };
@@ -0,0 +1,197 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC, ReactNode, MouseEvent } from "react";
4
+ import { SelectorView, Month, DayAddons, View } from "./typings-5684a67d";
5
+ import { PeriodType } from "./index-f034f741";
6
+ type HeaderProps = {
7
+ /**
8
+ * Вид шапки — месяц и год или только месяц
9
+ */
10
+ view?: SelectorView;
11
+ /**
12
+ * Отображать тень? (нужна при прокрутке)
13
+ */
14
+ withShadow?: boolean;
15
+ /**
16
+ * Дочерние элементы.
17
+ */
18
+ children?: ReactNode;
19
+ };
20
+ declare const Header: FC<HeaderProps>;
21
+ type MonthYearHeaderProps = {
22
+ /**
23
+ * Активная дата
24
+ */
25
+ value?: Date;
26
+ /**
27
+ * Дополнительный класс
28
+ */
29
+ className?: string;
30
+ /**
31
+ * Обработчик нажатия на кнопку месяца
32
+ */
33
+ onMonthClick?: (event: MouseEvent<HTMLButtonElement>) => void;
34
+ /**
35
+ * Обработчик нажатия на кнопку года
36
+ */
37
+ onYearClick?: (event: MouseEvent<HTMLButtonElement>) => void;
38
+ /**
39
+ * Идентификатор для систем автоматизированного тестирования
40
+ */
41
+ dataTestId?: string;
42
+ };
43
+ declare const MonthYearHeader: FC<MonthYearHeaderProps>;
44
+ type MonthsTableProps = {
45
+ /**
46
+ * Массив месяцев
47
+ */
48
+ months?: Month[];
49
+ /**
50
+ * Выбранный месяц
51
+ */
52
+ selectedMonth?: Date;
53
+ /**
54
+ * Доп пропсы для переданного месяца
55
+ */
56
+ getMonthProps: (day: Month) => Record<string, unknown>;
57
+ /**
58
+ * Должен ли календарь подстраиваться под ширину родителя.
59
+ */
60
+ responsive?: boolean;
61
+ };
62
+ declare const MonthsTable: FC<MonthsTableProps>;
63
+ declare const formatPeriod: (valueFrom: Date, valueTo: Date, periodType: PeriodType, showCurrentYear?: boolean) => string;
64
+ declare const getYearSelectorValue: (valueFrom: Date | undefined, showCurrentYear: boolean) => number | "";
65
+ declare const shiftValues: (valueFrom: Date, valueTo: Date, periodType: PeriodType, direction: "prev" | "next") => {
66
+ valueFrom: Date;
67
+ valueTo: Date;
68
+ };
69
+ type YearsTableProps = {
70
+ /**
71
+ * Массив лет
72
+ */
73
+ years?: Date[];
74
+ /**
75
+ * Выбранный год
76
+ */
77
+ selectedYear?: Date;
78
+ /**
79
+ * Доп. пропсы для переданного года
80
+ */
81
+ getYearProps: (year: Date) => Record<string, unknown>;
82
+ /**
83
+ * Обработчик скролла
84
+ */
85
+ onScroll: (scrollTop: number) => void;
86
+ /**
87
+ * Должен ли календарь подстраиваться под ширину родителя.
88
+ */
89
+ responsive?: boolean;
90
+ };
91
+ declare const YearsTable: FC<YearsTableProps>;
92
+ type CalendarDesktopProps = {
93
+ /**
94
+ * Дополнительный класс
95
+ */
96
+ className?: string;
97
+ /**
98
+ * Вид по умолчанию (выбор дней, месяцев, лет)
99
+ */
100
+ defaultView?: View;
101
+ /**
102
+ * Вид шапки — месяц и год или только месяц
103
+ */
104
+ selectorView?: SelectorView;
105
+ /**
106
+ * Выбранная дата (timestamp)
107
+ */
108
+ value?: number;
109
+ /**
110
+ * Открытый месяц (timestamp)
111
+ */
112
+ month?: number;
113
+ /**
114
+ * Месяц, открытый по умолчанию (timestamp)
115
+ */
116
+ defaultMonth?: number;
117
+ /**
118
+ * Минимальная дата, доступная для выбора (timestamp)
119
+ */
120
+ minDate?: number;
121
+ /**
122
+ * Максимальная дата, доступная для выбора (timestamp)
123
+ */
124
+ maxDate?: number;
125
+ /**
126
+ * Начало выделенного периода (timestamp)
127
+ */
128
+ selectedFrom?: number;
129
+ /**
130
+ * Конец выделенного периода (timestamp)
131
+ */
132
+ selectedTo?: number;
133
+ /**
134
+ * Индикатор, что выбран полный период
135
+ */
136
+ rangeComplete?: boolean;
137
+ /**
138
+ * Список событий
139
+ */
140
+ events?: Array<Date | number>;
141
+ /**
142
+ * Список отключенных для выбора дней.
143
+ */
144
+ offDays?: Array<Date | number>;
145
+ /**
146
+ * Список выходных
147
+ */
148
+ holidays?: Array<Date | number>;
149
+ /**
150
+ * Обработчик изменения месяца (или года)
151
+ */
152
+ onMonthChange?: (month: number) => void;
153
+ /**
154
+ * Обработчик выбора даты
155
+ */
156
+ onChange?: (date?: number) => void;
157
+ /**
158
+ * Обработчик нажатия на кнопку месяца
159
+ */
160
+ onMonthClick?: (event: MouseEvent<HTMLButtonElement>) => void;
161
+ /**
162
+ * Обработчик нажатия на кнопку года
163
+ */
164
+ onYearClick?: (event: MouseEvent<HTMLButtonElement>) => void;
165
+ /**
166
+ * Обработчик нажатия на период
167
+ */
168
+ onPeriodClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
169
+ /**
170
+ * Идентификатор для систем автоматизированного тестирования
171
+ */
172
+ dataTestId?: string;
173
+ /**
174
+ * Нужно ли рендерить шапку календаря
175
+ */
176
+ hasHeader?: boolean;
177
+ /**
178
+ * Должен ли календарь подстраиваться под ширину родителя.
179
+ */
180
+ responsive?: boolean;
181
+ /**
182
+ * Дополнительный контент под числом
183
+ */
184
+ dayAddons?: DayAddons[];
185
+ /**
186
+ * Форма ячейки дня
187
+ */
188
+ shape?: 'rounded' | 'rectangular';
189
+ /**
190
+ * Отображать ли текущий год, если selectorView 'month-only'
191
+ * @default false
192
+ */
193
+ showCurrentYearSelector?: boolean;
194
+ };
195
+ declare const CalendarDesktop: React.ForwardRefExoticComponent<CalendarDesktopProps & React.RefAttributes<HTMLDivElement>>;
196
+ export { HeaderProps, Header, MonthYearHeaderProps, MonthYearHeader, MonthsTableProps, MonthsTable, formatPeriod, getYearSelectorValue, shiftValues, YearsTableProps, YearsTable, CalendarDesktopProps, CalendarDesktop };
197
+ export * from "./Component-63dec22f";
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { ConditionalProps, DateRangeInputProps } from "./components/date-range-input/index";
4
- type DateRangeInputDesktopProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose'> & ConditionalProps;
4
+ type DateRangeInputDesktopProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
5
5
  declare const DateRangeInputDesktop: React.ForwardRefExoticComponent<DateRangeInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
6
6
  export { DateRangeInputDesktopProps, DateRangeInputDesktop };
@@ -1,19 +1,20 @@
1
1
  import { __assign } from 'tslib';
2
2
  import React, { forwardRef } from 'react';
3
+ import { CalendarDesktop } from '@alfalab/core-components-calendar/esm/desktop';
4
+ import { InputDesktop } from '@alfalab/core-components-input/esm/desktop';
3
5
  import { DateRangeInput } from './components/date-range-input/Component.js';
4
6
  import 'react-merge-refs';
5
7
  import 'classnames';
6
8
  import 'date-fns';
7
9
  import 'date-fns/isValid';
8
- import '@alfalab/core-components-calendar/esm';
10
+ import '@alfalab/core-components-calendar/esm/shared';
9
11
  import '@alfalab/core-components-icon-button/esm';
10
- import '@alfalab/core-components-input/esm';
11
12
  import '@alfalab/core-components-popover/esm';
12
13
  import '@alfalab/hooks';
13
14
  import '@alfalab/icons-glyph/CalendarMIcon';
14
15
  import './utils/format.js';
15
16
  import 'date-fns/parse';
16
17
 
17
- var DateRangeInputDesktop = forwardRef(function (props, ref) { return React.createElement(DateRangeInput, __assign({}, props, { ref: ref })); });
18
+ var DateRangeInputDesktop = forwardRef(function (props, ref) { return (React.createElement(DateRangeInput, __assign({ InputComponent: InputDesktop, Calendar: CalendarDesktop }, props, { ref: ref }))); });
18
19
 
19
20
  export { DateRangeInputDesktop };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
4
+ type ButtonMobileProps = Partial<AnchorButtonProps | NativeButtonProps>;
5
+ declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
+ export { ButtonMobileProps, 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,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { ConditionalProps, DateRangeInputProps } from "./components/date-range-input/index";
4
- type DateRangeInputMobileProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose'> & ConditionalProps;
4
+ type DateRangeInputMobileProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
5
5
  declare const DateRangeInputMobile: React.ForwardRefExoticComponent<DateRangeInputMobileProps & React.RefAttributes<HTMLInputElement>>;
6
6
  export { DateRangeInputMobileProps, DateRangeInputMobile };
@@ -1,19 +1,20 @@
1
1
  import { __assign } from 'tslib';
2
2
  import React, { forwardRef } from 'react';
3
- import { CalendarMobile } from '@alfalab/core-components-calendar/esm';
3
+ import { CalendarMobile } from '@alfalab/core-components-calendar/esm/mobile';
4
+ import { InputMobile } from '@alfalab/core-components-input/esm/mobile';
4
5
  import { DateRangeInput } from './components/date-range-input/Component.js';
5
6
  import 'react-merge-refs';
6
7
  import 'classnames';
7
8
  import 'date-fns';
8
9
  import 'date-fns/isValid';
10
+ import '@alfalab/core-components-calendar/esm/shared';
9
11
  import '@alfalab/core-components-icon-button/esm';
10
- import '@alfalab/core-components-input/esm';
11
12
  import '@alfalab/core-components-popover/esm';
12
13
  import '@alfalab/hooks';
13
14
  import '@alfalab/icons-glyph/CalendarMIcon';
14
15
  import './utils/format.js';
15
16
  import 'date-fns/parse';
16
17
 
17
- var DateRangeInputMobile = forwardRef(function (props, ref) { return React.createElement(DateRangeInput, __assign({ Calendar: CalendarMobile, view: 'mobile' }, props, { ref: ref })); });
18
+ var DateRangeInputMobile = forwardRef(function (props, ref) { return (React.createElement(DateRangeInput, __assign({ InputComponent: InputMobile, Calendar: CalendarMobile, view: 'mobile' }, props, { ref: ref }))); });
18
19
 
19
20
  export { DateRangeInputMobile };