@alfalab/core-components-date-range-input 2.4.1 → 3.0.1
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-50136800.d.ts +6 -0
- package/Component-63dec22f.d.ts +167 -0
- package/Component-72dda473.d.ts +53 -0
- package/Component-8b5756fe.d.ts +388 -0
- package/Component.desktop-2e2b2125.d.ts +6 -0
- package/Component.desktop-8b5756fe.d.ts +197 -0
- package/Component.desktop.d.ts +1 -1
- package/Component.desktop.js +4 -3
- package/Component.mobile-755fbaa3.d.ts +6 -0
- package/Component.mobile-ebda875c.d.ts +6 -0
- package/Component.mobile.d.ts +1 -1
- package/Component.mobile.js +4 -3
- package/Component.responsive-2e2b2125.d.ts +66 -0
- package/Component.responsive.d.ts +1 -1
- package/Component.responsive.js +5 -2
- package/components/date-range-input/Component.d.ts +7 -2
- package/components/date-range-input/Component.js +10 -11
- package/components/date-range-input/index.css +7 -7
- package/components/date-range-input/index.js +1 -2
- package/cssm/Component-50136800.d.ts +6 -0
- package/cssm/Component-63dec22f.d.ts +167 -0
- package/cssm/Component-72dda473.d.ts +53 -0
- package/cssm/Component-8b5756fe.d.ts +388 -0
- package/cssm/Component.desktop-2e2b2125.d.ts +6 -0
- package/cssm/Component.desktop-8b5756fe.d.ts +197 -0
- package/cssm/Component.desktop.d.ts +1 -1
- package/cssm/Component.desktop.js +4 -3
- package/cssm/Component.mobile-755fbaa3.d.ts +6 -0
- package/cssm/Component.mobile-ebda875c.d.ts +6 -0
- package/cssm/Component.mobile.d.ts +1 -1
- package/cssm/Component.mobile.js +4 -3
- package/cssm/Component.responsive-2e2b2125.d.ts +66 -0
- package/cssm/Component.responsive.d.ts +1 -1
- package/cssm/Component.responsive.js +5 -2
- package/cssm/components/date-range-input/Component.d.ts +7 -2
- package/cssm/components/date-range-input/Component.js +9 -10
- package/cssm/components/date-range-input/index.js +1 -2
- package/cssm/desktop-63dec22f.d.ts +2 -0
- package/cssm/desktop.js +3 -2
- package/cssm/index-50136800.d.ts +11 -0
- package/cssm/index-72dda473.d.ts +12 -0
- package/cssm/index-9211a437.d.ts +2 -0
- package/cssm/index-ebda875c.d.ts +35 -0
- package/cssm/index-f034f741.d.ts +80 -0
- package/cssm/index.d.ts +3 -2
- package/cssm/index.js +5 -2
- package/cssm/mobile-c219f8ca.d.ts +1 -0
- package/cssm/mobile.js +3 -2
- package/cssm/types-83e2bd9e.d.ts +113 -0
- package/cssm/typings-5684a67d.d.ts +23 -0
- package/cssm/typings-9211a437.d.ts +95 -0
- package/cssm/useCalendar-5684a67d.d.ts +97 -0
- package/cssm/utils-5684a67d.d.ts +88 -0
- package/desktop-63dec22f.d.ts +2 -0
- package/desktop.js +3 -2
- package/esm/Component-50136800.d.ts +6 -0
- package/esm/Component-63dec22f.d.ts +167 -0
- package/esm/Component-72dda473.d.ts +53 -0
- package/esm/Component-8b5756fe.d.ts +388 -0
- package/esm/Component.desktop-2e2b2125.d.ts +6 -0
- package/esm/Component.desktop-8b5756fe.d.ts +197 -0
- package/esm/Component.desktop.d.ts +1 -1
- package/esm/Component.desktop.js +4 -3
- package/esm/Component.mobile-755fbaa3.d.ts +6 -0
- package/esm/Component.mobile-ebda875c.d.ts +6 -0
- package/esm/Component.mobile.d.ts +1 -1
- package/esm/Component.mobile.js +4 -3
- package/esm/Component.responsive-2e2b2125.d.ts +66 -0
- package/esm/Component.responsive.d.ts +1 -1
- package/esm/Component.responsive.js +5 -2
- package/esm/components/date-range-input/Component.d.ts +7 -2
- package/esm/components/date-range-input/Component.js +10 -11
- package/esm/components/date-range-input/index.css +7 -7
- package/esm/components/date-range-input/index.js +1 -2
- package/esm/desktop-63dec22f.d.ts +2 -0
- package/esm/desktop.js +3 -2
- package/esm/index-50136800.d.ts +11 -0
- package/esm/index-72dda473.d.ts +12 -0
- package/esm/index-9211a437.d.ts +2 -0
- package/esm/index-ebda875c.d.ts +35 -0
- package/esm/index-f034f741.d.ts +80 -0
- package/esm/index.d.ts +3 -2
- package/esm/index.js +5 -2
- package/esm/mobile-c219f8ca.d.ts +1 -0
- package/esm/mobile.js +3 -2
- package/esm/types-83e2bd9e.d.ts +113 -0
- package/esm/typings-5684a67d.d.ts +23 -0
- package/esm/typings-9211a437.d.ts +95 -0
- package/esm/useCalendar-5684a67d.d.ts +97 -0
- package/esm/utils-5684a67d.d.ts +88 -0
- package/index-50136800.d.ts +11 -0
- package/index-72dda473.d.ts +12 -0
- package/index-9211a437.d.ts +2 -0
- package/index-ebda875c.d.ts +35 -0
- package/index-f034f741.d.ts +80 -0
- package/index.d.ts +3 -2
- package/index.js +5 -2
- package/mobile-c219f8ca.d.ts +1 -0
- package/mobile.js +3 -2
- package/modern/Component-50136800.d.ts +6 -0
- package/modern/Component-63dec22f.d.ts +167 -0
- package/modern/Component-72dda473.d.ts +53 -0
- package/modern/Component-8b5756fe.d.ts +388 -0
- package/modern/Component.desktop-2e2b2125.d.ts +6 -0
- package/modern/Component.desktop-8b5756fe.d.ts +197 -0
- package/modern/Component.desktop.d.ts +1 -1
- package/modern/Component.desktop.js +4 -3
- package/modern/Component.mobile-755fbaa3.d.ts +6 -0
- package/modern/Component.mobile-ebda875c.d.ts +6 -0
- package/modern/Component.mobile.d.ts +1 -1
- package/modern/Component.mobile.js +4 -3
- package/modern/Component.responsive-2e2b2125.d.ts +66 -0
- package/modern/Component.responsive.d.ts +1 -1
- package/modern/Component.responsive.js +5 -2
- package/modern/components/date-range-input/Component.d.ts +7 -2
- package/modern/components/date-range-input/Component.js +7 -8
- package/modern/components/date-range-input/index.css +7 -7
- package/modern/components/date-range-input/index.js +1 -2
- package/modern/desktop-63dec22f.d.ts +2 -0
- package/modern/desktop.js +3 -2
- package/modern/index-50136800.d.ts +11 -0
- package/modern/index-72dda473.d.ts +12 -0
- package/modern/index-9211a437.d.ts +2 -0
- package/modern/index-ebda875c.d.ts +35 -0
- package/modern/index-f034f741.d.ts +80 -0
- package/modern/index.d.ts +3 -2
- package/modern/index.js +5 -2
- package/modern/mobile-c219f8ca.d.ts +1 -0
- package/modern/mobile.js +3 -2
- package/modern/types-83e2bd9e.d.ts +113 -0
- package/modern/typings-5684a67d.d.ts +23 -0
- package/modern/typings-9211a437.d.ts +95 -0
- package/modern/useCalendar-5684a67d.d.ts +97 -0
- package/modern/utils-5684a67d.d.ts +88 -0
- package/package.json +28 -5
- package/src/Component.desktop.tsx +29 -0
- package/src/Component.mobile.tsx +30 -0
- package/src/Component.responsive.tsx +41 -0
- package/src/components/date-range-input/Component.tsx +519 -0
- package/src/components/date-range-input/index.module.css +37 -0
- package/src/components/date-range-input/index.ts +1 -0
- package/src/desktop.ts +1 -0
- package/src/index.ts +2 -0
- package/src/mobile.ts +1 -0
- package/src/utils/format.ts +91 -0
- package/src/utils/index.ts +1 -0
- package/types-83e2bd9e.d.ts +113 -0
- package/typings-5684a67d.d.ts +23 -0
- package/typings-9211a437.d.ts +95 -0
- package/useCalendar-5684a67d.d.ts +97 -0
- package/utils-5684a67d.d.ts +88 -0
- package/cssm/responsive.d.ts +0 -2
- package/cssm/responsive.js +0 -27
- package/esm/responsive.d.ts +0 -2
- package/esm/responsive.js +0 -18
- package/modern/responsive.d.ts +0 -2
- package/modern/responsive.js +0 -17
- package/responsive.d.ts +0 -2
- package/responsive.js +0 -26
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { FC, MouseEvent } from "react";
|
|
2
|
+
type PeriodType = "range" | "day" | "week" | "month" | "quarter" | "year";
|
|
3
|
+
type PeriodSliderProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Активная дата или период
|
|
6
|
+
*/
|
|
7
|
+
value?: Date | [
|
|
8
|
+
Date,
|
|
9
|
+
Date
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* Тип периода
|
|
13
|
+
*/
|
|
14
|
+
periodType?: PeriodType;
|
|
15
|
+
/**
|
|
16
|
+
* Дополнительный класс
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Отключает кнопку назад
|
|
21
|
+
*/
|
|
22
|
+
prevArrowDisabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Отключает кнопку вперед
|
|
25
|
+
*/
|
|
26
|
+
nextArrowDisabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Скрывает заблокированные кнопки
|
|
29
|
+
*/
|
|
30
|
+
hideDisabledArrows?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Возможность выбора месяца и года, если periodType 'month'
|
|
33
|
+
*/
|
|
34
|
+
isMonthAndYearSelectable?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Отображать ли текущий год, если isMonthAndYearSelectable true
|
|
37
|
+
*/
|
|
38
|
+
showCurrentYearSelector?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Функция для форматирование выбранного периода
|
|
41
|
+
*/
|
|
42
|
+
periodFormatter?: (valueFrom: Date, valueTo: Date, periodType: PeriodType) => string;
|
|
43
|
+
/**
|
|
44
|
+
* Обработчик нажатия кнопки переключения на назад
|
|
45
|
+
*/
|
|
46
|
+
onPrevArrowClick?: (event: MouseEvent<HTMLButtonElement>, payload: {
|
|
47
|
+
value: Date;
|
|
48
|
+
valueFrom: Date;
|
|
49
|
+
valueTo: Date;
|
|
50
|
+
periodType: PeriodType;
|
|
51
|
+
}) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Обработчик нажатия кнопки переключения на вперед
|
|
54
|
+
*/
|
|
55
|
+
onNextArrowClick?: (event: MouseEvent<HTMLButtonElement>, payload: {
|
|
56
|
+
value: Date;
|
|
57
|
+
valueFrom: Date;
|
|
58
|
+
valueTo: Date;
|
|
59
|
+
periodType: PeriodType;
|
|
60
|
+
}) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Обработчик нажатия на селектор месяца
|
|
63
|
+
*/
|
|
64
|
+
onMonthClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Обработчик нажатия на селектор года
|
|
67
|
+
*/
|
|
68
|
+
onYearClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Обработчик нажатия на период
|
|
71
|
+
*/
|
|
72
|
+
onPeriodClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
75
|
+
*/
|
|
76
|
+
dataTestId?: string;
|
|
77
|
+
};
|
|
78
|
+
declare const PeriodSlider: FC<PeriodSliderProps>;
|
|
79
|
+
export { PeriodType, PeriodSliderProps, PeriodSlider };
|
|
80
|
+
export { shiftValues } from "./Component.desktop-8b5756fe";
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { DateRangeInputResponsive as DateRangeInput } from "./responsive";
|
|
2
|
-
export type { DateRangeInputResponsiveProps as DateRangeInputProps } from "./responsive";
|
|
1
|
+
export { DateRangeInputResponsive as DateRangeInput } from "./Component.responsive";
|
|
2
|
+
export type { DateRangeInputResponsiveProps as DateRangeInputProps } from "./Component.responsive";
|
|
3
|
+
export {};
|
package/index.js
CHANGED
|
@@ -7,19 +7,22 @@ require('tslib');
|
|
|
7
7
|
require('react');
|
|
8
8
|
require('@alfalab/hooks');
|
|
9
9
|
require('./Component.desktop.js');
|
|
10
|
+
require('@alfalab/core-components-calendar/desktop');
|
|
11
|
+
require('@alfalab/core-components-input/desktop');
|
|
10
12
|
require('./components/date-range-input/Component.js');
|
|
11
13
|
require('react-merge-refs');
|
|
12
14
|
require('classnames');
|
|
13
15
|
require('date-fns');
|
|
14
16
|
require('date-fns/isValid');
|
|
15
|
-
require('@alfalab/core-components-calendar');
|
|
17
|
+
require('@alfalab/core-components-calendar/shared');
|
|
16
18
|
require('@alfalab/core-components-icon-button');
|
|
17
|
-
require('@alfalab/core-components-input');
|
|
18
19
|
require('@alfalab/core-components-popover');
|
|
19
20
|
require('@alfalab/icons-glyph/CalendarMIcon');
|
|
20
21
|
require('./utils/format.js');
|
|
21
22
|
require('date-fns/parse');
|
|
22
23
|
require('./Component.mobile.js');
|
|
24
|
+
require('@alfalab/core-components-calendar/mobile');
|
|
25
|
+
require('@alfalab/core-components-input/mobile');
|
|
23
26
|
|
|
24
27
|
|
|
25
28
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component-8b5756fe";
|
package/mobile.js
CHANGED
|
@@ -5,14 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var Component_mobile = require('./Component.mobile.js');
|
|
6
6
|
require('tslib');
|
|
7
7
|
require('react');
|
|
8
|
-
require('@alfalab/core-components-calendar');
|
|
8
|
+
require('@alfalab/core-components-calendar/mobile');
|
|
9
|
+
require('@alfalab/core-components-input/mobile');
|
|
9
10
|
require('./components/date-range-input/Component.js');
|
|
10
11
|
require('react-merge-refs');
|
|
11
12
|
require('classnames');
|
|
12
13
|
require('date-fns');
|
|
13
14
|
require('date-fns/isValid');
|
|
15
|
+
require('@alfalab/core-components-calendar/shared');
|
|
14
16
|
require('@alfalab/core-components-icon-button');
|
|
15
|
-
require('@alfalab/core-components-input');
|
|
16
17
|
require('@alfalab/core-components-popover');
|
|
17
18
|
require('@alfalab/hooks');
|
|
18
19
|
require('@alfalab/icons-glyph/CalendarMIcon');
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { NavigationBarProps } from "./types-83e2bd9e";
|
|
4
|
+
declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export * from "./Component-63dec22f";
|
|
6
|
+
export { NavigationBar };
|
|
@@ -0,0 +1,167 @@
|
|
|
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 = {
|
|
29
|
+
/**
|
|
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)
|
|
103
|
+
*/
|
|
104
|
+
className?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Id компонента для тестов
|
|
107
|
+
*/
|
|
108
|
+
dataTestId?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Контент (native prop)
|
|
111
|
+
*/
|
|
112
|
+
children?: React.ReactNode;
|
|
113
|
+
/**
|
|
114
|
+
* Количество строк (не поддерживает IE)
|
|
115
|
+
*/
|
|
116
|
+
rowLimit?: 1 | 2 | 3;
|
|
117
|
+
};
|
|
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;
|
|
148
|
+
/**
|
|
149
|
+
* Дополнительный класс
|
|
150
|
+
*/
|
|
151
|
+
className?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Вид компонента
|
|
154
|
+
*/
|
|
155
|
+
view: 'mobile' | 'desktop';
|
|
156
|
+
/**
|
|
157
|
+
* Прозрачность текста
|
|
158
|
+
*/
|
|
159
|
+
textOpacity?: number;
|
|
160
|
+
/**
|
|
161
|
+
* Обработчик клика
|
|
162
|
+
*/
|
|
163
|
+
onClick?: () => void;
|
|
164
|
+
}
|
|
165
|
+
declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
|
|
166
|
+
export { Typography, typographyPresets, TitleResponsive, BackArrowAddonProps, BackArrowAddon };
|
|
167
|
+
export type { TitleProps, TextProps, Color };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BackgroundColorType, GraphicColorType } from "./index-72dda473";
|
|
4
|
+
type IconColorType = Extract<GraphicColorType, 'positive' | 'attention' | 'link' | 'negative' | 'tertiary' | 'secondary' | 'primary'>;
|
|
5
|
+
type BadgeProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Дополнительный класс
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Вид компонента
|
|
12
|
+
*/
|
|
13
|
+
view: 'icon' | 'count';
|
|
14
|
+
/**
|
|
15
|
+
* Размер компонента (только для view=icon)
|
|
16
|
+
* //deprecated(используйте height для view=count )
|
|
17
|
+
*/
|
|
18
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
19
|
+
/**
|
|
20
|
+
* Видимость белой обводки вокруг иконки
|
|
21
|
+
*/
|
|
22
|
+
visibleIconOutline?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Видимость цветной обводки вокруг иконки (только для view=icon)
|
|
25
|
+
*/
|
|
26
|
+
visibleColorOutline?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Контент компонента
|
|
29
|
+
*/
|
|
30
|
+
content?: React.ReactElement | number;
|
|
31
|
+
/**
|
|
32
|
+
* Высота компонента, min = 16; max = 48 (только для view=count)
|
|
33
|
+
*/
|
|
34
|
+
height?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Цветовое оформление бейджа при view='count'
|
|
37
|
+
*/
|
|
38
|
+
color?: Extract<BackgroundColorType, 'accent' | 'primary' | 'specialbg-secondary-transparent'>;
|
|
39
|
+
/**
|
|
40
|
+
* Цветовое оформление бейджа при view='icon'
|
|
41
|
+
*/
|
|
42
|
+
iconColor?: IconColorType;
|
|
43
|
+
/**
|
|
44
|
+
* Цвет подложки под иконкой
|
|
45
|
+
*/
|
|
46
|
+
iconUnderlayColor?: Extract<GraphicColorType, 'primary' | 'static-light'>;
|
|
47
|
+
/**
|
|
48
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
49
|
+
*/
|
|
50
|
+
dataTestId?: string;
|
|
51
|
+
};
|
|
52
|
+
declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, color, iconUnderlayColor, dataTestId, }: BadgeProps) => React.JSX.Element;
|
|
53
|
+
export { IconColorType, BadgeProps, Badge };
|