@alfalab/core-components-date-range-input 3.0.4 → 3.0.6
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-63dec22f.d.ts +172 -12
- package/Component-8b5756fe.d.ts +388 -0
- package/Component.desktop-8b5756fe.d.ts +68 -5
- package/Component.mobile-ebda875c.d.ts +6 -0
- package/components/date-range-input/Component.d.ts +1 -1
- package/components/date-range-input/Component.js +2 -8
- package/components/date-range-input/index.css +7 -7
- package/cssm/components/date-range-input/Component.js +1 -7
- package/cssm/{index-50136800.d.ts → index-2abb571d.d.ts} +5 -1
- package/esm/components/date-range-input/Component.js +2 -8
- package/esm/components/date-range-input/index.css +7 -7
- package/{modern/index-50136800.d.ts → esm/index-2abb571d.d.ts} +5 -1
- package/{esm/index-50136800.d.ts → index-2abb571d.d.ts} +5 -1
- package/index-9211a437.d.ts +1 -1
- package/index-ebda875c.d.ts +15 -115
- package/index-f034f741.d.ts +80 -2
- package/mobile-c219f8ca.d.ts +1 -367
- package/modern/Component-2abb571d.d.ts +6 -0
- package/modern/components/date-range-input/Component.js +2 -8
- package/modern/components/date-range-input/index.css +7 -7
- package/{index-50136800.d.ts → modern/index-2abb571d.d.ts} +5 -1
- package/package.json +4 -4
- package/src/components/date-range-input/Component.tsx +1 -10
- package/Component-50136800.d.ts +0 -186
- package/Component-5684a67d.d.ts +0 -23
- package/Component-e2b6c730.d.ts +0 -76
- package/Component.desktop-ebda875c.d.ts +0 -6
- package/desktop-8b5756fe.d.ts +0 -2
- package/utils-e0a54580.d.ts +0 -8
- /package/{cssm/Component-50136800.d.ts → Component-2abb571d.d.ts} +0 -0
- /package/{Component.responsive-755fbaa3.d.ts → Component.responsive-2e2b2125.d.ts} +0 -0
- /package/{esm/Component-50136800.d.ts → cssm/Component-2abb571d.d.ts} +0 -0
- /package/{modern/Component-50136800.d.ts → esm/Component-2abb571d.d.ts} +0 -0
package/Component-50136800.d.ts
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
|
|
4
|
-
import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
|
|
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>;
|
|
183
|
-
declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
184
|
-
export { BackArrowAddonProps, BackArrowAddon, Typography, typographyPresets, TitleResponsive, NavigationBar };
|
|
185
|
-
export type { TitleProps, TextProps, Color };
|
|
186
|
-
export * from "./useSkeleton-1b036d4b";
|
package/Component-5684a67d.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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 };
|
package/Component-e2b6c730.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
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,6 +0,0 @@
|
|
|
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 };
|
package/desktop-8b5756fe.d.ts
DELETED
package/utils-e0a54580.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PeriodType } from "./index-f034f741";
|
|
2
|
-
declare const formatPeriod: (valueFrom: Date, valueTo: Date, periodType: PeriodType, showCurrentYear?: boolean) => string;
|
|
3
|
-
declare const getYearSelectorValue: (valueFrom: Date | undefined, showCurrentYear: boolean) => number | "";
|
|
4
|
-
declare const shiftValues: (valueFrom: Date, valueTo: Date, periodType: PeriodType, direction: 'prev' | 'next') => {
|
|
5
|
-
valueFrom: Date;
|
|
6
|
-
valueTo: Date;
|
|
7
|
-
};
|
|
8
|
-
export { formatPeriod, getYearSelectorValue, shiftValues };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|