@alfalab/core-components-date-range-input 3.0.2 → 3.0.4

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 (36) hide show
  1. package/Component-50136800.d.ts +183 -3
  2. package/Component-5684a67d.d.ts +23 -0
  3. package/Component-63dec22f.d.ts +12 -155
  4. package/Component-e2b6c730.d.ts +76 -0
  5. package/Component.desktop-8b5756fe.d.ts +5 -68
  6. package/Component.desktop-ebda875c.d.ts +6 -0
  7. package/components/date-range-input/Component.d.ts +1 -1
  8. package/components/date-range-input/Component.js +3 -5
  9. package/components/date-range-input/index.css +7 -7
  10. package/cssm/Component-63dec22f.d.ts +18 -1
  11. package/cssm/components/date-range-input/Component.js +2 -4
  12. package/cssm/types-1b036d4b.d.ts +13 -0
  13. package/cssm/useSkeleton-1b036d4b.d.ts +40 -0
  14. package/desktop-8b5756fe.d.ts +2 -0
  15. package/esm/Component-63dec22f.d.ts +18 -1
  16. package/esm/components/date-range-input/Component.js +3 -5
  17. package/esm/components/date-range-input/index.css +7 -7
  18. package/esm/types-1b036d4b.d.ts +13 -0
  19. package/esm/useSkeleton-1b036d4b.d.ts +40 -0
  20. package/index-9211a437.d.ts +1 -1
  21. package/index-ebda875c.d.ts +115 -15
  22. package/index-f034f741.d.ts +2 -80
  23. package/mobile-c219f8ca.d.ts +367 -1
  24. package/modern/Component-63dec22f.d.ts +18 -1
  25. package/modern/components/date-range-input/Component.js +3 -5
  26. package/modern/components/date-range-input/index.css +7 -7
  27. package/modern/types-1b036d4b.d.ts +13 -0
  28. package/modern/useSkeleton-1b036d4b.d.ts +40 -0
  29. package/package.json +2 -2
  30. package/src/components/date-range-input/Component.tsx +2 -4
  31. package/types-1b036d4b.d.ts +13 -0
  32. package/useSkeleton-1b036d4b.d.ts +40 -0
  33. package/utils-e0a54580.d.ts +8 -0
  34. package/Component-8b5756fe.d.ts +0 -388
  35. package/Component.mobile-ebda875c.d.ts +0 -6
  36. /package/{Component.responsive-2e2b2125.d.ts → Component.responsive-755fbaa3.d.ts} +0 -0
@@ -1,6 +1,186 @@
1
1
  /// <reference types="react" />
2
- import React from 'react';
2
+ import React from "react";
3
+ import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
4
+ import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
3
5
  import { NavigationBarProps } from "./types-83e2bd9e";
6
+ interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
7
+ /**
8
+ * Текст после иконки
9
+ */
10
+ text?: string;
11
+ /**
12
+ * Дополнительный класс
13
+ */
14
+ className?: string;
15
+ /**
16
+ * Вид компонента
17
+ */
18
+ view: "mobile" | "desktop";
19
+ /**
20
+ * Прозрачность текста
21
+ */
22
+ textOpacity?: number;
23
+ /**
24
+ * Обработчик клика
25
+ */
26
+ onClick?: () => void;
27
+ }
28
+ declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
29
+ declare const colors: readonly [
30
+ "tertiary",
31
+ "disabled",
32
+ "accent",
33
+ "primary",
34
+ "attention",
35
+ "positive",
36
+ "secondary",
37
+ "tertiary-inverted",
38
+ "primary-inverted",
39
+ "secondary-inverted",
40
+ "link",
41
+ "negative",
42
+ "static-primary-light",
43
+ "static-secondary-light",
44
+ "static-tertiary-light",
45
+ "static-primary-dark",
46
+ "static-secondary-dark",
47
+ "static-tertiary-dark",
48
+ "static-accent"
49
+ ];
50
+ type Color = (typeof colors)[number];
51
+ type NativeProps = HTMLAttributes<HTMLSpanElement>;
52
+ type TextBaseProps = {
53
+ /**
54
+ * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
55
+ */
56
+ view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps";
57
+ /**
58
+ * Цвет текста
59
+ */
60
+ color?: Color;
61
+ /**
62
+ * Толщина шрифта
63
+ */
64
+ weight?: "regular" | "medium" | "bold";
65
+ /**
66
+ * Делает цифры моноширинными
67
+ */
68
+ monospaceNumbers?: boolean;
69
+ /**
70
+ * HTML тег
71
+ */
72
+ tag?: "span" | "div";
73
+ /**
74
+ * Css-класс для стилизации (native prop)
75
+ */
76
+ className?: string;
77
+ /**
78
+ * Id компонента для тестов
79
+ */
80
+ dataTestId?: string;
81
+ /**
82
+ * Контент (native prop)
83
+ */
84
+ children?: React.ReactNode;
85
+ /**
86
+ * Добавляет отступы к тэгу 'p'
87
+ */
88
+ defaultMargins?: never;
89
+ /**
90
+ * Количество строк (не поддерживает IE)
91
+ */
92
+ rowLimit?: 1 | 2 | 3;
93
+ /**
94
+ * Показать скелетон
95
+ */
96
+ showSkeleton?: boolean;
97
+ /**
98
+ * Пропы для скелетона
99
+ */
100
+ skeletonProps?: TextSkeletonProps;
101
+ };
102
+ type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
103
+ tag?: "p";
104
+ defaultMargins?: boolean;
105
+ };
106
+ type TextProps = Omit<NativeProps, "color"> & (TextBaseProps | TextPTagProps);
107
+ type NativeProps$0 = HTMLAttributes<HTMLHeadingElement>;
108
+ type TitleProps = Omit<NativeProps$0, "color"> & {
109
+ /**
110
+ * HTML тег
111
+ */
112
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
113
+ /**
114
+ * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
115
+ */
116
+ view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
117
+ /**
118
+ * Цвет текста
119
+ */
120
+ color?: Color;
121
+ /**
122
+ * Толщина шрифта
123
+ */
124
+ weight?: "regular" | "medium" | "bold";
125
+ /**
126
+ * Шрифт текста
127
+ */
128
+ font?: "styrene" | "system";
129
+ /**
130
+ * Добавляет отступы
131
+ */
132
+ defaultMargins?: boolean;
133
+ /**
134
+ * Css-класс для стилизации (native prop)
135
+ */
136
+ className?: string;
137
+ /**
138
+ * Id компонента для тестов
139
+ */
140
+ dataTestId?: string;
141
+ /**
142
+ * Контент (native prop)
143
+ */
144
+ children?: React.ReactNode;
145
+ /**
146
+ * Количество строк (не поддерживает IE)
147
+ */
148
+ rowLimit?: 1 | 2 | 3;
149
+ /**
150
+ * Показать скелетон
151
+ */
152
+ showSkeleton?: boolean;
153
+ /**
154
+ * Пропы для скелетона
155
+ */
156
+ skeletonProps?: TextSkeletonProps;
157
+ };
158
+ type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
159
+ declare const Typography: {
160
+ Title: FC<TitleProps>;
161
+ Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
162
+ TitleResponsive: FC<TitleProps>;
163
+ TitleMobile: FC<TitleMobileProps>;
164
+ };
165
+ declare const typographyPresets: {
166
+ mobile: {
167
+ list: {
168
+ text: {
169
+ primary: {
170
+ tag: string;
171
+ view: string;
172
+ };
173
+ secondary: {
174
+ tag: string;
175
+ color: string;
176
+ view: string;
177
+ };
178
+ };
179
+ };
180
+ };
181
+ };
182
+ declare const TitleResponsive: FC<TitleProps>;
4
183
  declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
5
- export * from "./Component-63dec22f";
6
- export { NavigationBar };
184
+ export { BackArrowAddonProps, BackArrowAddon, Typography, typographyPresets, TitleResponsive, NavigationBar };
185
+ export type { TitleProps, TextProps, Color };
186
+ export * from "./useSkeleton-1b036d4b";
@@ -0,0 +1,23 @@
1
+ /// <reference types="react" />
2
+ import { FC } from 'react';
3
+ import { Month } from "./typings-5684a67d";
4
+ type MonthsTableProps = {
5
+ /**
6
+ * Массив месяцев
7
+ */
8
+ months?: Month[];
9
+ /**
10
+ * Выбранный месяц
11
+ */
12
+ selectedMonth?: Date;
13
+ /**
14
+ * Доп пропсы для переданного месяца
15
+ */
16
+ getMonthProps: (day: Month) => Record<string, unknown>;
17
+ /**
18
+ * Должен ли календарь подстраиваться под ширину родителя.
19
+ */
20
+ responsive?: boolean;
21
+ };
22
+ declare const MonthsTable: FC<MonthsTableProps>;
23
+ export { MonthsTableProps, MonthsTable };
@@ -1,167 +1,24 @@
1
1
  /// <reference types="react" />
2
- import React from "react";
3
- import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
4
- declare const colors: readonly [
5
- "tertiary",
6
- "disabled",
7
- "accent",
8
- "primary",
9
- "attention",
10
- "positive",
11
- "secondary",
12
- "tertiary-inverted",
13
- "primary-inverted",
14
- "secondary-inverted",
15
- "link",
16
- "negative",
17
- "static-primary-light",
18
- "static-secondary-light",
19
- "static-tertiary-light",
20
- "static-primary-dark",
21
- "static-secondary-dark",
22
- "static-tertiary-dark",
23
- "static-accent"
24
- ];
25
- type Color = (typeof colors)[number];
26
- type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
27
- type NativeProps = HTMLAttributes<HTMLSpanElement>;
28
- type TextBaseProps = {
2
+ import React from 'react';
3
+ import { ButtonHTMLAttributes } from "react";
4
+ type SelectButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
29
5
  /**
30
- * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
31
- */
32
- view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps";
33
- /**
34
- * Цвет текста
35
- */
36
- color?: Color;
37
- /**
38
- * Толщина шрифта
39
- */
40
- weight?: "regular" | "medium" | "bold";
41
- /**
42
- * Делает цифры моноширинными
43
- */
44
- monospaceNumbers?: boolean;
45
- /**
46
- * HTML тег
47
- */
48
- tag?: "span" | "div";
49
- /**
50
- * Css-класс для стилизации (native prop)
51
- */
52
- className?: string;
53
- /**
54
- * Id компонента для тестов
55
- */
56
- dataTestId?: string;
57
- /**
58
- * Контент (native prop)
59
- */
60
- children?: React.ReactNode;
61
- /**
62
- * Добавляет отступы к тэгу 'p'
63
- */
64
- defaultMargins?: never;
65
- /**
66
- * Количество строк (не поддерживает IE)
67
- */
68
- rowLimit?: 1 | 2 | 3;
69
- };
70
- type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
71
- tag?: "p";
72
- defaultMargins?: boolean;
73
- };
74
- type TextProps = Omit<NativeProps, "color"> & (TextBaseProps | TextPTagProps);
75
- type NativeProps$0 = HTMLAttributes<HTMLHeadingElement>;
76
- type TitleProps = Omit<NativeProps$0, "color"> & {
77
- /**
78
- * HTML тег
79
- */
80
- tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
81
- /**
82
- * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
83
- */
84
- view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
85
- /**
86
- * Цвет текста
87
- */
88
- color?: Color;
89
- /**
90
- * Толщина шрифта
91
- */
92
- weight?: "regular" | "medium" | "bold";
93
- /**
94
- * Шрифт текста
95
- */
96
- font?: "styrene" | "system";
97
- /**
98
- * Добавляет отступы
99
- */
100
- defaultMargins?: boolean;
101
- /**
102
- * Css-класс для стилизации (native prop)
6
+ * Дополнительный класс
103
7
  */
104
8
  className?: string;
105
9
  /**
106
- * Id компонента для тестов
107
- */
108
- dataTestId?: string;
109
- /**
110
- * Контент (native prop)
111
- */
112
- children?: React.ReactNode;
113
- /**
114
- * Количество строк (не поддерживает IE)
10
+ * Вид кнопки
115
11
  */
116
- rowLimit?: 1 | 2 | 3;
12
+ view?: 'default' | 'filled' | 'outlined' | 'selected';
117
13
  };
118
- type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
119
- declare const Typography: {
120
- Title: FC<TitleProps>;
121
- Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
122
- TitleResponsive: FC<TitleProps>;
123
- TitleMobile: FC<TitleMobileProps>;
124
- };
125
- declare const typographyPresets: {
126
- mobile: {
127
- list: {
128
- text: {
129
- primary: {
130
- tag: string;
131
- view: string;
132
- };
133
- secondary: {
134
- tag: string;
135
- color: string;
136
- view: string;
137
- };
138
- };
139
- };
140
- };
141
- };
142
- declare const TitleResponsive: FC<TitleProps>;
143
- interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
144
- /**
145
- * Текст после иконки
146
- */
147
- text?: string;
14
+ declare const SelectButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
148
15
  /**
149
16
  * Дополнительный класс
150
17
  */
151
- className?: string;
152
- /**
153
- * Вид компонента
154
- */
155
- view: 'mobile' | 'desktop';
156
- /**
157
- * Прозрачность текста
158
- */
159
- textOpacity?: number;
18
+ className?: string | undefined;
160
19
  /**
161
- * Обработчик клика
20
+ * Вид кнопки
162
21
  */
163
- onClick?: () => void;
164
- }
165
- declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
166
- export { Typography, typographyPresets, TitleResponsive, BackArrowAddonProps, BackArrowAddon };
167
- export type { TitleProps, TextProps, Color };
22
+ view?: "default" | "outlined" | "filled" | "selected" | undefined;
23
+ } & React.RefAttributes<HTMLButtonElement>>;
24
+ export { SelectButtonProps, SelectButton };
@@ -0,0 +1,76 @@
1
+ import { FC, MouseEvent } from 'react';
2
+ type PeriodType = 'range' | 'day' | 'week' | 'month' | 'quarter' | 'year';
3
+ type PeriodSliderProps = {
4
+ /**
5
+ * Активная дата или период
6
+ */
7
+ value?: Date | [Date, Date];
8
+ /**
9
+ * Тип периода
10
+ */
11
+ periodType?: PeriodType;
12
+ /**
13
+ * Дополнительный класс
14
+ */
15
+ className?: string;
16
+ /**
17
+ * Отключает кнопку назад
18
+ */
19
+ prevArrowDisabled?: boolean;
20
+ /**
21
+ * Отключает кнопку вперед
22
+ */
23
+ nextArrowDisabled?: boolean;
24
+ /**
25
+ * Скрывает заблокированные кнопки
26
+ */
27
+ hideDisabledArrows?: boolean;
28
+ /**
29
+ * Возможность выбора месяца и года, если periodType 'month'
30
+ */
31
+ isMonthAndYearSelectable?: boolean;
32
+ /**
33
+ * Отображать ли текущий год, если isMonthAndYearSelectable true
34
+ */
35
+ showCurrentYearSelector?: boolean;
36
+ /**
37
+ * Функция для форматирование выбранного периода
38
+ */
39
+ periodFormatter?: (valueFrom: Date, valueTo: Date, periodType: PeriodType) => string;
40
+ /**
41
+ * Обработчик нажатия кнопки переключения на назад
42
+ */
43
+ onPrevArrowClick?: (event: MouseEvent<HTMLButtonElement>, payload: {
44
+ value: Date;
45
+ valueFrom: Date;
46
+ valueTo: Date;
47
+ periodType: PeriodType;
48
+ }) => void;
49
+ /**
50
+ * Обработчик нажатия кнопки переключения на вперед
51
+ */
52
+ onNextArrowClick?: (event: MouseEvent<HTMLButtonElement>, payload: {
53
+ value: Date;
54
+ valueFrom: Date;
55
+ valueTo: Date;
56
+ periodType: PeriodType;
57
+ }) => void;
58
+ /**
59
+ * Обработчик нажатия на селектор месяца
60
+ */
61
+ onMonthClick?: (event: MouseEvent<HTMLButtonElement>) => void;
62
+ /**
63
+ * Обработчик нажатия на селектор года
64
+ */
65
+ onYearClick?: (event: MouseEvent<HTMLButtonElement>) => void;
66
+ /**
67
+ * Обработчик нажатия на период
68
+ */
69
+ onPeriodClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
70
+ /**
71
+ * Идентификатор для систем автоматизированного тестирования
72
+ */
73
+ dataTestId?: string;
74
+ };
75
+ declare const PeriodSlider: FC<PeriodSliderProps>;
76
+ export { PeriodType, PeriodSliderProps, PeriodSlider };
@@ -1,71 +1,7 @@
1
1
  /// <reference types="react" />
2
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
- };
3
+ import { FC, MouseEvent } from "react";
4
+ import { DayAddons, SelectorView, View } from "./typings-5684a67d";
69
5
  type YearsTableProps = {
70
6
  /**
71
7
  * Массив лет
@@ -193,5 +129,6 @@ type CalendarDesktopProps = {
193
129
  showCurrentYearSelector?: boolean;
194
130
  };
195
131
  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";
132
+ export * from "./Component-5684a67d";
133
+ export * from "./Component-e2b6c730";
134
+ export { YearsTableProps, YearsTable, CalendarDesktopProps, CalendarDesktop };
@@ -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 };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { ChangeEvent, ElementType } from "react";
4
- import { CalendarDesktopProps } from "../../desktop-63dec22f";
4
+ import { CalendarDesktopProps } from "../../desktop-8b5756fe";
5
5
  import { CalendarMobileProps } from "../../mobile-c219f8ca";
6
6
  import { InputProps } from "@alfalab/core-components-input";
7
7
  import { PopoverProps } from "@alfalab/core-components-popover";
@@ -23,7 +23,7 @@ var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
23
23
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
24
24
  var dateFnsIsValid__default = /*#__PURE__*/_interopDefaultCompat(dateFnsIsValid);
25
25
 
26
- var styles = {"component":"date-range-input__component_gnz83","calendarContainer":"date-range-input__calendarContainer_gnz83","calendarResponsive":"date-range-input__calendarResponsive_gnz83","block":"date-range-input__block_gnz83","calendarIcon":"date-range-input__calendarIcon_gnz83"};
26
+ var styles = {"component":"date-range-input__component_r7x48","calendarContainer":"date-range-input__calendarContainer_r7x48","calendarResponsive":"date-range-input__calendarResponsive_r7x48","block":"date-range-input__block_r7x48","calendarIcon":"date-range-input__calendarIcon_r7x48"};
27
27
  require('./index.css')
28
28
 
29
29
  var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
@@ -118,7 +118,7 @@ var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
118
118
  };
119
119
  var handleInputKeyDown = function (event) {
120
120
  var isCopy = (event.metaKey || event.ctrlKey) && event.key === 'c';
121
- if (disableUserInput && !isCopy) {
121
+ if (disableUserInput && !isCopy && event.key !== 'Tab') {
122
122
  event.preventDefault();
123
123
  }
124
124
  };
@@ -196,9 +196,7 @@ var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
196
196
  resetPeriod();
197
197
  };
198
198
  var handleCalendarChange = function (date) {
199
- if (date) {
200
- updatePeriod(date);
201
- }
199
+ updatePeriod(date);
202
200
  };
203
201
  var handleCalendarWrapperMouseDown = function (event) {
204
202
  // Не дает инпуту терять фокус при выборе даты
@@ -1,4 +1,4 @@
1
- /* hash: 108tg */
1
+ /* hash: 19mkh */
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-range-input__component_gnz83 {
44
+ } .date-range-input__component_r7x48 {
45
45
  display: inline-block;
46
46
  outline: none;
47
47
  position: relative;
48
- } .date-range-input__calendarContainer_gnz83 {
48
+ } .date-range-input__calendarContainer_r7x48 {
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-range-input__calendarContainer_gnz83 {
53
+ } @media (max-width: 374px) { .date-range-input__calendarContainer_r7x48 {
54
54
  width: 100%;
55
55
  min-width: 288px
56
56
  }
57
- } .date-range-input__calendarResponsive_gnz83 {
57
+ } .date-range-input__calendarResponsive_r7x48 {
58
58
  width: var(--calendar-width);
59
- } .date-range-input__block_gnz83 {
59
+ } .date-range-input__block_r7x48 {
60
60
  width: 100%;
61
- } .date-range-input__calendarIcon_gnz83 {
61
+ } .date-range-input__calendarIcon_r7x48 {
62
62
  margin-right: var(--gap-s-neg);
63
63
  height: 100%;
64
64
  }
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
4
+ import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
4
5
  declare const colors: readonly [
5
6
  "tertiary",
6
7
  "disabled",
@@ -23,7 +24,6 @@ declare const colors: readonly [
23
24
  "static-accent"
24
25
  ];
25
26
  type Color = (typeof colors)[number];
26
- type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
27
27
  type NativeProps = HTMLAttributes<HTMLSpanElement>;
28
28
  type TextBaseProps = {
29
29
  /**
@@ -66,6 +66,14 @@ type TextBaseProps = {
66
66
  * Количество строк (не поддерживает IE)
67
67
  */
68
68
  rowLimit?: 1 | 2 | 3;
69
+ /**
70
+ * Показать скелетон
71
+ */
72
+ showSkeleton?: boolean;
73
+ /**
74
+ * Пропы для скелетона
75
+ */
76
+ skeletonProps?: TextSkeletonProps;
69
77
  };
70
78
  type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
71
79
  tag?: "p";
@@ -114,6 +122,14 @@ type TitleProps = Omit<NativeProps$0, "color"> & {
114
122
  * Количество строк (не поддерживает IE)
115
123
  */
116
124
  rowLimit?: 1 | 2 | 3;
125
+ /**
126
+ * Показать скелетон
127
+ */
128
+ showSkeleton?: boolean;
129
+ /**
130
+ * Пропы для скелетона
131
+ */
132
+ skeletonProps?: TextSkeletonProps;
117
133
  };
118
134
  type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
119
135
  declare const Typography: {
@@ -165,3 +181,4 @@ interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
165
181
  declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
166
182
  export { Typography, typographyPresets, TitleResponsive, BackArrowAddonProps, BackArrowAddon };
167
183
  export type { TitleProps, TextProps, Color };
184
+ export * from "./useSkeleton-1b036d4b";