@alfalab/core-components-date-range-input 3.0.9 → 3.0.11

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 (95) hide show
  1. package/{Component-1a4fbd11.d.ts → Component-72308007.d.ts} +1 -1
  2. package/{cssm/Component-8b5756fe.d.ts → Component-b5b4c59f.d.ts} +2 -2
  3. package/Component.desktop-785df74d.d.ts +6 -0
  4. package/{cssm/Component.desktop-8b5756fe.d.ts → Component.desktop-b5b4c59f.d.ts} +12 -4
  5. package/Component.desktop.js +1 -1
  6. package/Component.mobile-d7e9f69d.d.ts +6 -0
  7. package/Component.mobile-ebda875c.d.ts +5 -4
  8. package/Component.mobile.js +1 -1
  9. package/Component.responsive-2e2b2125.d.ts +2 -63
  10. package/Component.responsive-785df74d.d.ts +26 -0
  11. package/Component.responsive.js +1 -1
  12. package/components/date-range-input/Component.js +5 -4
  13. package/components/date-range-input/index.css +7 -7
  14. package/components/date-range-input/index.js +1 -1
  15. package/{esm/Component-1a4fbd11.d.ts → cssm/Component-72308007.d.ts} +1 -1
  16. package/{Component-8b5756fe.d.ts → cssm/Component-b5b4c59f.d.ts} +2 -2
  17. package/cssm/Component.desktop-785df74d.d.ts +6 -0
  18. package/{esm/Component.desktop-8b5756fe.d.ts → cssm/Component.desktop-b5b4c59f.d.ts} +12 -4
  19. package/cssm/Component.desktop.js +1 -1
  20. package/cssm/Component.mobile-d7e9f69d.d.ts +6 -0
  21. package/cssm/Component.mobile-ebda875c.d.ts +5 -4
  22. package/cssm/Component.mobile.js +1 -1
  23. package/cssm/Component.responsive-2e2b2125.d.ts +2 -63
  24. package/cssm/Component.responsive-785df74d.d.ts +26 -0
  25. package/cssm/Component.responsive.js +1 -1
  26. package/cssm/components/date-range-input/Component.js +4 -3
  27. package/cssm/components/date-range-input/index.js +1 -1
  28. package/cssm/desktop.js +1 -1
  29. package/cssm/index-3109f463.d.ts +62 -0
  30. package/cssm/index-72308007.d.ts +54 -0
  31. package/cssm/index-f034f741.d.ts +1 -1
  32. package/cssm/index.js +1 -1
  33. package/cssm/mobile-c219f8ca.d.ts +1 -1
  34. package/cssm/mobile.js +1 -1
  35. package/cssm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  36. package/desktop.js +1 -1
  37. package/esm/Component-72308007.d.ts +297 -0
  38. package/esm/{Component-8b5756fe.d.ts → Component-b5b4c59f.d.ts} +2 -2
  39. package/esm/Component.desktop-785df74d.d.ts +6 -0
  40. package/{modern/Component.desktop-8b5756fe.d.ts → esm/Component.desktop-b5b4c59f.d.ts} +13 -12
  41. package/esm/Component.desktop.js +1 -1
  42. package/esm/Component.mobile-d7e9f69d.d.ts +6 -0
  43. package/esm/Component.mobile-ebda875c.d.ts +5 -4
  44. package/esm/Component.mobile.js +1 -1
  45. package/esm/Component.responsive-2e2b2125.d.ts +2 -63
  46. package/esm/Component.responsive-785df74d.d.ts +26 -0
  47. package/esm/Component.responsive.js +1 -1
  48. package/esm/components/date-range-input/Component.js +2 -2
  49. package/esm/components/date-range-input/index.css +7 -7
  50. package/esm/components/date-range-input/index.js +1 -1
  51. package/esm/desktop.js +1 -1
  52. package/esm/index-3109f463.d.ts +62 -0
  53. package/esm/index-72308007.d.ts +54 -0
  54. package/esm/index-ebda875c.d.ts +1 -34
  55. package/esm/index-f034f741.d.ts +5 -2
  56. package/esm/index.js +1 -1
  57. package/esm/mobile-c219f8ca.d.ts +1 -1
  58. package/esm/mobile.js +1 -1
  59. package/esm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  60. package/index-3109f463.d.ts +62 -0
  61. package/index-72308007.d.ts +54 -0
  62. package/index-f034f741.d.ts +1 -1
  63. package/index.js +1 -1
  64. package/mobile-c219f8ca.d.ts +1 -1
  65. package/mobile.js +1 -1
  66. package/modern/{Component-1a4fbd11.d.ts → Component-72308007.d.ts} +1 -1
  67. package/modern/{Component-8b5756fe.d.ts → Component-b5b4c59f.d.ts} +2 -2
  68. package/modern/Component.desktop-785df74d.d.ts +6 -0
  69. package/{Component.desktop-8b5756fe.d.ts → modern/Component.desktop-b5b4c59f.d.ts} +12 -4
  70. package/modern/Component.desktop.js +1 -1
  71. package/modern/Component.mobile-d7e9f69d.d.ts +6 -0
  72. package/modern/Component.mobile-ebda875c.d.ts +5 -4
  73. package/modern/Component.mobile.js +1 -1
  74. package/modern/Component.responsive-2e2b2125.d.ts +2 -63
  75. package/modern/Component.responsive-785df74d.d.ts +26 -0
  76. package/modern/Component.responsive.js +1 -1
  77. package/modern/components/date-range-input/Component.js +2 -2
  78. package/modern/components/date-range-input/index.css +7 -7
  79. package/modern/components/date-range-input/index.js +1 -1
  80. package/modern/desktop.js +1 -1
  81. package/modern/index-3109f463.d.ts +62 -0
  82. package/modern/index-72308007.d.ts +54 -0
  83. package/modern/index-f034f741.d.ts +1 -1
  84. package/modern/index.js +1 -1
  85. package/modern/mobile-c219f8ca.d.ts +1 -1
  86. package/modern/mobile.js +1 -1
  87. package/modern/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  88. package/package.json +4 -4
  89. package/src/components/date-range-input/Component.tsx +1 -1
  90. package/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  91. package/cssm/Component-1a4fbd11.d.ts +0 -6
  92. package/cssm/index-1a4fbd11.d.ts +0 -22
  93. package/esm/index-1a4fbd11.d.ts +0 -22
  94. package/index-1a4fbd11.d.ts +0 -22
  95. package/modern/index-1a4fbd11.d.ts +0 -22
@@ -0,0 +1,54 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { PaddingType } from "./index-72dda473";
4
+ /* eslint-disable no-plusplus, no-param-reassign */
5
+ import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
6
+ declare const isClient: () => boolean;
7
+ declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
8
+ declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
9
+ declare function easeInOutQuad(x: number): number;
10
+ declare const easingFns: {
11
+ easeInOutQuad: typeof easeInOutQuad;
12
+ };
13
+ declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
14
+ declare const inputUtils: {
15
+ disableUserInput: typeof disableUserInput;
16
+ };
17
+ /**
18
+ * Возвращает true, если значение равно null или undefined
19
+ */
20
+ declare function isNil(value: unknown): boolean;
21
+ /**
22
+ * Выбор значения между min max границами
23
+ */
24
+ declare function clamp<T extends Date | number>(value: T, min: T, max: T): T;
25
+ declare function noop(): void;
26
+ declare const fnUtils: {
27
+ clamp: typeof clamp;
28
+ noop: typeof noop;
29
+ isNil: typeof isNil;
30
+ };
31
+ /**
32
+ * Запрещает каретке становиться за указанные границы
33
+ */
34
+ declare function caretGuard(guard: (value: string, selection: readonly [
35
+ from: number,
36
+ to: number
37
+ ]) => [
38
+ from: number,
39
+ to: number
40
+ ]): MaskitoPlugin;
41
+ /**
42
+ * Запрещает удалять указанный префикс
43
+ */
44
+ declare function prefixPostprocessor(prefix: string): MaskitoPostprocessor;
45
+ /**
46
+ * Препроцессор необходим для правильной вставки/автокомплита телефонного номера
47
+ */
48
+ declare function insertionPhonePreprocessor(mask: Array<string | RegExp>, countryCode?: string, clearableCountryCode?: boolean): MaskitoPreprocessor;
49
+ declare const maskUtils: {
50
+ insertionPhonePreprocessor: typeof insertionPhonePreprocessor;
51
+ prefixPostprocessor: typeof prefixPostprocessor;
52
+ caretGuard: typeof caretGuard;
53
+ };
54
+ export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils, fnUtils, maskUtils };
@@ -77,4 +77,4 @@ type PeriodSliderProps = {
77
77
  };
78
78
  declare const PeriodSlider: FC<PeriodSliderProps>;
79
79
  export { PeriodType, PeriodSliderProps, PeriodSlider };
80
- export { shiftValues } from "./Component.desktop-8b5756fe";
80
+ export { shiftValues } from "./Component.desktop-b5b4c59f";
package/cssm/index.js CHANGED
@@ -12,8 +12,8 @@ require('@alfalab/core-components-input/cssm/desktop');
12
12
  require('./components/date-range-input/Component.js');
13
13
  require('react-merge-refs');
14
14
  require('classnames');
15
- require('date-fns');
16
15
  require('date-fns/isValid');
16
+ require('date-fns/startOfMonth');
17
17
  require('@alfalab/core-components-calendar/cssm/shared');
18
18
  require('@alfalab/core-components-icon-button/cssm');
19
19
  require('@alfalab/core-components-popover/cssm');
@@ -1 +1 @@
1
- export * from "./Component-8b5756fe";
1
+ export * from "./Component-b5b4c59f";
package/cssm/mobile.js CHANGED
@@ -10,8 +10,8 @@ require('@alfalab/core-components-input/cssm/mobile');
10
10
  require('./components/date-range-input/Component.js');
11
11
  require('react-merge-refs');
12
12
  require('classnames');
13
- require('date-fns');
14
13
  require('date-fns/isValid');
14
+ require('date-fns/startOfMonth');
15
15
  require('@alfalab/core-components-calendar/cssm/shared');
16
16
  require('@alfalab/core-components-icon-button/cssm');
17
17
  require('@alfalab/core-components-popover/cssm');
@@ -14,7 +14,7 @@ type NavigationBarProps = {
14
14
  /**
15
15
  * Подзаголовок (доступен только в мобильной версии)
16
16
  */
17
- subtitle?: string;
17
+ subtitle?: ReactNode;
18
18
  /**
19
19
  * Размер заголовка (compact доступен только в мобильной версии)
20
20
  */
package/desktop.js CHANGED
@@ -10,8 +10,8 @@ require('@alfalab/core-components-input/desktop');
10
10
  require('./components/date-range-input/Component.js');
11
11
  require('react-merge-refs');
12
12
  require('classnames');
13
- require('date-fns');
14
13
  require('date-fns/isValid');
14
+ require('date-fns/startOfMonth');
15
15
  require('@alfalab/core-components-calendar/shared');
16
16
  require('@alfalab/core-components-icon-button');
17
17
  require('@alfalab/core-components-popover');
@@ -0,0 +1,297 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { ChangeEvent, ElementType, HTMLAttributes, InputHTMLAttributes, MouseEvent, ReactNode, RefAttributes } from "react";
4
+ type StyleColors = {
5
+ default: {
6
+ [key: string]: string;
7
+ };
8
+ inverted: {
9
+ [key: string]: string;
10
+ };
11
+ };
12
+ type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'defaultValue' | 'onChange' | 'onClick' | 'onMouseDown' | 'enterKeyHint'> & {
13
+ /**
14
+ * Значение поля ввода
15
+ */
16
+ value?: string;
17
+ /**
18
+ * Начальное значение поля
19
+ */
20
+ defaultValue?: string;
21
+ /**
22
+ * Растягивает компонент на ширину контейнера
23
+ */
24
+ block?: boolean;
25
+ /**
26
+ * Крестик для очистки поля
27
+ */
28
+ clear?: boolean;
29
+ /**
30
+ * Размер компонента
31
+ */
32
+ size?: 's' | 'm' | 'l' | 'xl';
33
+ /**
34
+ * Набор цветов для компонента
35
+ */
36
+ colors?: 'default' | 'inverted';
37
+ /**
38
+ * Отображение ошибки
39
+ */
40
+ error?: ReactNode | boolean;
41
+ /**
42
+ * Отображение иконки успеха
43
+ */
44
+ success?: boolean;
45
+ /**
46
+ * Текст подсказки
47
+ */
48
+ hint?: ReactNode;
49
+ /**
50
+ * Лейбл компонента
51
+ */
52
+ label?: React.ReactNode;
53
+ /**
54
+ * Вид лейбла внутри / снаружи
55
+ */
56
+ labelView?: 'inner' | 'outer';
57
+ /**
58
+ * Атрибут type
59
+ */
60
+ type?: 'number' | 'card' | 'email' | 'money' | 'password' | 'tel' | 'text';
61
+ /**
62
+ * Ref для обертки input
63
+ */
64
+ wrapperRef?: React.Ref<HTMLDivElement> | null;
65
+ /**
66
+ * Слот слева
67
+ */
68
+ leftAddons?: React.ReactNode;
69
+ /**
70
+ * Слот справа
71
+ */
72
+ rightAddons?: React.ReactNode;
73
+ /**
74
+ * Свойства для обертки левых аддонов
75
+ */
76
+ leftAddonsProps?: HTMLAttributes<HTMLDivElement>;
77
+ /**
78
+ * Свойства для обертки правых аддонов
79
+ */
80
+ rightAddonsProps?: HTMLAttributes<HTMLDivElement>;
81
+ /**
82
+ * Слот под инпутом
83
+ */
84
+ bottomAddons?: React.ReactNode;
85
+ /**
86
+ * Дополнительный класс
87
+ */
88
+ className?: string;
89
+ /**
90
+ * Дополнительный класс для поля
91
+ */
92
+ fieldClassName?: string;
93
+ /**
94
+ * Дополнительный класс инпута
95
+ */
96
+ inputClassName?: string;
97
+ /**
98
+ * Дополнительный класс для лейбла
99
+ */
100
+ labelClassName?: string;
101
+ /**
102
+ * Дополнительный класс для аддонов
103
+ */
104
+ addonsClassName?: string;
105
+ /**
106
+ * Класс, который будет установлен при фокусе
107
+ */
108
+ focusedClassName?: string;
109
+ /**
110
+ * Класс, который будет установлен, если в поле есть значение
111
+ */
112
+ filledClassName?: string;
113
+ /**
114
+ * Обработчик поля ввода
115
+ */
116
+ onChange?: (event: ChangeEvent<HTMLInputElement>, payload: {
117
+ value: string;
118
+ }) => void;
119
+ /**
120
+ * Обработчик нажатия на кнопку очистки
121
+ */
122
+ onClear?: (event: MouseEvent<HTMLButtonElement>) => void;
123
+ /**
124
+ * Обработчик клика по полю
125
+ */
126
+ onClick?: (event: MouseEvent<HTMLDivElement>) => void;
127
+ /**
128
+ * Обработчик MouseDown по полю
129
+ */
130
+ onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
131
+ /**
132
+ * Обработчик MouseUp по полю
133
+ */
134
+ onMouseUp?: (event: MouseEvent<HTMLDivElement>) => void;
135
+ /**
136
+ * Компонент FormControl
137
+ */
138
+ FormControlComponent?: ElementType<FormControlProps & RefAttributes<HTMLDivElement>>;
139
+ /**
140
+ * Идентификатор для систем автоматизированного тестирования
141
+ */
142
+ dataTestId?: string;
143
+ /**
144
+ * Стили компонента для default и inverted режима.
145
+ */
146
+ colorStyles?: StyleColors;
147
+ /**
148
+ * Запрещает ввод с клавиатуры
149
+ */
150
+ disableUserInput?: boolean;
151
+ };
152
+ declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "enterKeyHint"> & {
153
+ /**
154
+ * Значение поля ввода
155
+ */
156
+ value?: string | undefined;
157
+ /**
158
+ * Начальное значение поля
159
+ */
160
+ defaultValue?: string | undefined;
161
+ /**
162
+ * Растягивает компонент на ширину контейнера
163
+ */
164
+ block?: boolean | undefined;
165
+ /**
166
+ * Крестик для очистки поля
167
+ */
168
+ clear?: boolean | undefined;
169
+ /**
170
+ * Размер компонента
171
+ */
172
+ size?: "s" | "m" | "l" | "xl" | undefined;
173
+ /**
174
+ * Набор цветов для компонента
175
+ */
176
+ colors?: "default" | "inverted" | undefined;
177
+ /**
178
+ * Отображение ошибки
179
+ */
180
+ error?: ReactNode | boolean;
181
+ /**
182
+ * Отображение иконки успеха
183
+ */
184
+ success?: boolean | undefined;
185
+ /**
186
+ * Текст подсказки
187
+ */
188
+ hint?: ReactNode;
189
+ /**
190
+ * Лейбл компонента
191
+ */
192
+ label?: React.ReactNode;
193
+ /**
194
+ * Вид лейбла внутри / снаружи
195
+ */
196
+ labelView?: "inner" | "outer" | undefined;
197
+ /**
198
+ * Атрибут type
199
+ */
200
+ type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
201
+ /**
202
+ * Ref для обертки input
203
+ */
204
+ wrapperRef?: React.Ref<HTMLDivElement> | undefined;
205
+ /**
206
+ * Слот слева
207
+ */
208
+ leftAddons?: React.ReactNode;
209
+ /**
210
+ * Слот справа
211
+ */
212
+ rightAddons?: React.ReactNode;
213
+ /**
214
+ * Свойства для обертки левых аддонов
215
+ */
216
+ leftAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
217
+ /**
218
+ * Свойства для обертки правых аддонов
219
+ */
220
+ rightAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
221
+ /**
222
+ * Слот под инпутом
223
+ */
224
+ bottomAddons?: React.ReactNode;
225
+ /**
226
+ * Дополнительный класс
227
+ */
228
+ className?: string | undefined;
229
+ /**
230
+ * Дополнительный класс для поля
231
+ */
232
+ fieldClassName?: string | undefined;
233
+ /**
234
+ * Дополнительный класс инпута
235
+ */
236
+ inputClassName?: string | undefined;
237
+ /**
238
+ * Дополнительный класс для лейбла
239
+ */
240
+ labelClassName?: string | undefined;
241
+ /**
242
+ * Дополнительный класс для аддонов
243
+ */
244
+ addonsClassName?: string | undefined;
245
+ /**
246
+ * Класс, который будет установлен при фокусе
247
+ */
248
+ focusedClassName?: string | undefined;
249
+ /**
250
+ * Класс, который будет установлен, если в поле есть значение
251
+ */
252
+ filledClassName?: string | undefined;
253
+ /**
254
+ * Обработчик поля ввода
255
+ */
256
+ onChange?: ((event: ChangeEvent<HTMLInputElement>, payload: {
257
+ value: string;
258
+ }) => void) | undefined;
259
+ /**
260
+ * Обработчик нажатия на кнопку очистки
261
+ */
262
+ onClear?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
263
+ /**
264
+ * Обработчик клика по полю
265
+ */
266
+ onClick?: ((event: MouseEvent<HTMLDivElement>) => void) | undefined;
267
+ /**
268
+ * Обработчик MouseDown по полю
269
+ */
270
+ onMouseDown?: ((event: MouseEvent<HTMLDivElement>) => void) | undefined;
271
+ /**
272
+ * Обработчик MouseUp по полю
273
+ */
274
+ onMouseUp?: ((event: MouseEvent<HTMLDivElement>) => void) | undefined;
275
+ /**
276
+ * Компонент FormControl
277
+ */
278
+ FormControlComponent?: React.ElementType<Omit<import("./index-ebda875c").BaseFormControlProps, "styles" | "colorStyles"> & {
279
+ breakpoint?: number | undefined;
280
+ defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
281
+ } & React.RefAttributes<HTMLDivElement>> | undefined;
282
+ /**
283
+ * Идентификатор для систем автоматизированного тестирования
284
+ */
285
+ dataTestId?: string | undefined;
286
+ /**
287
+ * Стили компонента для default и inverted режима.
288
+ */
289
+ colorStyles?: StyleColors | undefined;
290
+ /**
291
+ * Запрещает ввод с клавиатуры
292
+ */
293
+ disableUserInput?: boolean | undefined;
294
+ } & React.RefAttributes<HTMLInputElement>>;
295
+ export * from "./Component-72dda473";
296
+ export * from "./Component.responsive-785df74d";
297
+ export { StyleColors, BaseInputProps, BaseInput };
@@ -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-83e2bd9e";
8
- import { CalendarDesktopProps } from "./Component.desktop-8b5756fe";
7
+ import { NavigationBarProps } from "./types-1c79e231";
8
+ import { CalendarDesktopProps } from "./Component.desktop-b5b4c59f";
9
9
  type BackdropProps = Partial<TransitionProps> & {
10
10
  /**
11
11
  * Прозрачный бэкдроп
@@ -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 };
@@ -2,7 +2,6 @@
2
2
  import React from "react";
3
3
  import { FC, ReactNode, MouseEvent } from "react";
4
4
  import { SelectorView, Month, DayAddons, View } from "./typings-5684a67d";
5
- import { PeriodType } from "./index-f034f741";
6
5
  type HeaderProps = {
7
6
  /**
8
7
  * Вид шапки — месяц и год или только месяц
@@ -16,6 +15,10 @@ type HeaderProps = {
16
15
  * Дочерние элементы.
17
16
  */
18
17
  children?: ReactNode;
18
+ /**
19
+ * Дополнительный класс
20
+ */
21
+ className?: string;
19
22
  };
20
23
  declare const Header: FC<HeaderProps>;
21
24
  type MonthYearHeaderProps = {
@@ -60,12 +63,6 @@ type MonthsTableProps = {
60
63
  responsive?: boolean;
61
64
  };
62
65
  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
66
  type YearsTableProps = {
70
67
  /**
71
68
  * Массив лет
@@ -79,10 +76,6 @@ type YearsTableProps = {
79
76
  * Доп. пропсы для переданного года
80
77
  */
81
78
  getYearProps: (year: Date) => Record<string, unknown>;
82
- /**
83
- * Обработчик скролла
84
- */
85
- onScroll: (scrollTop: number) => void;
86
79
  /**
87
80
  * Должен ли календарь подстраиваться под ширину родителя.
88
81
  */
@@ -94,6 +87,14 @@ type CalendarDesktopProps = {
94
87
  * Дополнительный класс
95
88
  */
96
89
  className?: string;
90
+ /**
91
+ * Дополнительный класс шапки десктопного календаря
92
+ */
93
+ headerClassName?: string;
94
+ /**
95
+ * Дополнительный класс контента десктопного календаря
96
+ */
97
+ contentClassName?: string;
97
98
  /**
98
99
  * Вид по умолчанию (выбор дней, месяцев, лет)
99
100
  */
@@ -193,5 +194,5 @@ type CalendarDesktopProps = {
193
194
  showCurrentYearSelector?: boolean;
194
195
  };
195
196
  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 { HeaderProps, Header, MonthYearHeaderProps, MonthYearHeader, MonthsTableProps, MonthsTable, YearsTableProps, YearsTable, CalendarDesktopProps, CalendarDesktop };
197
198
  export * from "./Component-63dec22f";
@@ -5,8 +5,8 @@ import { InputDesktop } from '@alfalab/core-components-input/esm/desktop';
5
5
  import { DateRangeInput } from './components/date-range-input/Component.js';
6
6
  import 'react-merge-refs';
7
7
  import 'classnames';
8
- import 'date-fns';
9
8
  import 'date-fns/isValid';
9
+ import 'date-fns/startOfMonth';
10
10
  import '@alfalab/core-components-calendar/esm/shared';
11
11
  import '@alfalab/core-components-icon-button/esm';
12
12
  import '@alfalab/core-components-popover/esm';
@@ -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 { 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 };
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 };
@@ -5,8 +5,8 @@ import { InputMobile } from '@alfalab/core-components-input/esm/mobile';
5
5
  import { DateRangeInput } from './components/date-range-input/Component.js';
6
6
  import 'react-merge-refs';
7
7
  import 'classnames';
8
- import 'date-fns';
9
8
  import 'date-fns/isValid';
9
+ import 'date-fns/startOfMonth';
10
10
  import '@alfalab/core-components-calendar/esm/shared';
11
11
  import '@alfalab/core-components-icon-button/esm';
12
12
  import '@alfalab/core-components-popover/esm';
@@ -1,66 +1,5 @@
1
1
  /// <reference types="react" />
2
- import React from "react";
3
- import { FC, ReactNode } from "react";
2
+ import React from 'react';
4
3
  import { ButtonProps } from "./typings-9211a437";
5
- type MqProps = {
6
- /**
7
- * Media выражение или кастомный запрос из `mq.json`, например `--mobile`.
8
- */
9
- query?: string;
10
- /**
11
- * Запрос на поддержку тач-событий
12
- */
13
- touch?: boolean;
14
- /**
15
- * Дочерние элементы.
16
- */
17
- children?: ReactNode;
18
- /**
19
- * Обработчик изменений в совпадении запросов
20
- */
21
- onMatchChange?: (isMatched: boolean) => void;
22
- };
23
- declare const Mq: FC<MqProps>;
24
- /**
25
- * Хук для медиа запросов.
26
- * @param query media выражение или кастомный запрос из `mq.json`, например `--mobile`.
27
- * @param defaultValue Значение по-умолчанию.
28
- */
29
- declare const useMatchMedia: (query: string, defaultValue?: boolean | (() => boolean)) => boolean[];
30
- /**
31
- * Возвращает MediaQueryList для заданного media-выражения.
32
- *
33
- * @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
34
- */
35
- declare function getMatchMedia(queryProp: string): MediaQueryList;
36
- /**
37
- * Удаляет MediaQueryList.
38
- *
39
- * @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
40
- */
41
- declare function releaseMatchMedia(queryProp: string): void;
42
- /**
43
- * Возвращает `true`, если есть поддержка `Pointer Events`
44
- */
45
- declare function isPointerEventsSupported(): boolean;
46
- /**
47
- * Возвращает `true`, если есть поддержка `Touch Events`
48
- */
49
- declare function isTouchSupported(): boolean;
50
- declare const _exports: {
51
- "--mobile-xs": string;
52
- "--mobile-s": string;
53
- "--mobile-m": string;
54
- "--mobile-l": string;
55
- "--mobile": string;
56
- "--tablet-s": string;
57
- "--tablet-m": string;
58
- "--tablet": string;
59
- "--desktop-s": string;
60
- "--desktop-m": string;
61
- "--desktop-l": string;
62
- "--desktop-xl": string;
63
- "--desktop": string;
64
- };
65
4
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
66
- export { _exports as default, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported, Button };
5
+ export { Button };
@@ -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 };
@@ -8,8 +8,8 @@ import '@alfalab/core-components-input/esm/desktop';
8
8
  import './components/date-range-input/Component.js';
9
9
  import 'react-merge-refs';
10
10
  import 'classnames';
11
- import 'date-fns';
12
11
  import 'date-fns/isValid';
12
+ import 'date-fns/startOfMonth';
13
13
  import '@alfalab/core-components-calendar/esm/shared';
14
14
  import '@alfalab/core-components-icon-button/esm';
15
15
  import '@alfalab/core-components-popover/esm';
@@ -2,8 +2,8 @@ import { __rest, __assign } from 'tslib';
2
2
  import React, { useRef, useState, useEffect } from 'react';
3
3
  import mergeRefs from 'react-merge-refs';
4
4
  import cn from 'classnames';
5
- import { startOfMonth } from 'date-fns';
6
5
  import dateFnsIsValid from 'date-fns/isValid';
6
+ import startOfMonth from 'date-fns/startOfMonth';
7
7
  import { usePeriod } from '@alfalab/core-components-calendar/esm/shared';
8
8
  import { IconButton } from '@alfalab/core-components-icon-button/esm';
9
9
  import { Popover } from '@alfalab/core-components-popover/esm';
@@ -12,7 +12,7 @@ import { CalendarMIcon } from '@alfalab/icons-glyph/CalendarMIcon';
12
12
  import { parseTimestampToDate, DATE_FORMAT, format, parseDateString, DATE_MASK, isCompleteDateInput, isValid } from '../../utils/format.js';
13
13
  import 'date-fns/parse';
14
14
 
15
- var styles = {"component":"date-range-input__component_n66xw","calendarContainer":"date-range-input__calendarContainer_n66xw","calendarResponsive":"date-range-input__calendarResponsive_n66xw","block":"date-range-input__block_n66xw","calendarIcon":"date-range-input__calendarIcon_n66xw"};
15
+ var styles = {"component":"date-range-input__component_wks86","calendarContainer":"date-range-input__calendarContainer_wks86","calendarResponsive":"date-range-input__calendarResponsive_wks86","block":"date-range-input__block_wks86","calendarIcon":"date-range-input__calendarIcon_wks86"};
16
16
  require('./index.css')
17
17
 
18
18
  var DateRangeInput = React.forwardRef(function (_a, ref) {