@alfalab/core-components-date-range-input 3.0.10 → 3.0.12
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/{esm/Component-72308007.d.ts → Component-10db897e.d.ts} +2 -2
- package/Component-89f0cb07.d.ts +38 -0
- package/{cssm/Component-8b5756fe.d.ts → Component-b5b4c59f.d.ts} +4 -3
- package/Component.desktop-0aa4e915.d.ts +5 -0
- package/Component.desktop-785df74d.d.ts +6 -0
- package/{esm/Component.desktop-8b5756fe.d.ts → Component.desktop-b5b4c59f.d.ts} +13 -5
- package/Component.desktop.js +1 -1
- package/Component.mobile-16b1285a.d.ts +5 -0
- package/Component.mobile-d7e9f69d.d.ts +6 -0
- package/Component.mobile-ebda875c.d.ts +5 -4
- package/Component.mobile.js +1 -1
- package/Component.responsive-0aa4e915.d.ts +5 -0
- package/Component.responsive-785df74d.d.ts +26 -0
- package/Component.responsive.js +1 -1
- package/components/date-range-input/Component.js +10 -8
- package/components/date-range-input/index.css +7 -7
- package/components/date-range-input/index.js +1 -1
- package/{Component-72308007.d.ts → cssm/Component-10db897e.d.ts} +2 -2
- package/cssm/Component-89f0cb07.d.ts +38 -0
- package/{esm/Component-8b5756fe.d.ts → cssm/Component-b5b4c59f.d.ts} +4 -3
- package/cssm/Component.desktop-0aa4e915.d.ts +5 -0
- package/cssm/Component.desktop-785df74d.d.ts +6 -0
- package/{Component.desktop-8b5756fe.d.ts → cssm/Component.desktop-b5b4c59f.d.ts} +13 -5
- package/cssm/Component.desktop.js +1 -1
- package/cssm/Component.mobile-16b1285a.d.ts +5 -0
- package/cssm/Component.mobile-d7e9f69d.d.ts +6 -0
- package/cssm/Component.mobile-ebda875c.d.ts +5 -4
- package/cssm/Component.mobile.js +1 -1
- package/cssm/Component.responsive-0aa4e915.d.ts +5 -0
- package/cssm/Component.responsive-785df74d.d.ts +26 -0
- package/cssm/Component.responsive.js +1 -1
- package/cssm/components/date-range-input/Component.js +9 -7
- package/cssm/components/date-range-input/index.js +1 -1
- package/cssm/desktop-63dec22f.d.ts +1 -1
- package/cssm/desktop-69921c40.d.ts +2 -0
- package/cssm/desktop.js +1 -1
- package/{esm/index-72308007.d.ts → cssm/index-10db897e.d.ts} +1 -5
- package/{Component.responsive-2e2b2125.d.ts → cssm/index-3109f463.d.ts} +1 -5
- package/cssm/index-89f0cb07.d.ts +2 -0
- package/cssm/index-f034f741.d.ts +1 -1
- package/cssm/index.js +1 -1
- package/cssm/mobile-c219f8ca.d.ts +1 -1
- package/cssm/mobile.js +1 -1
- package/{esm/types-83e2bd9e.d.ts → cssm/types-1c79e231.d.ts} +1 -1
- package/{modern/typings-9211a437.d.ts → cssm/typings-89f0cb07.d.ts} +5 -7
- package/desktop-63dec22f.d.ts +1 -1
- package/desktop-69921c40.d.ts +2 -0
- package/desktop.js +1 -1
- package/esm/Component-10db897e.d.ts +297 -0
- package/esm/Component-89f0cb07.d.ts +38 -0
- package/{Component-8b5756fe.d.ts → esm/Component-b5b4c59f.d.ts} +4 -3
- package/esm/Component.desktop-0aa4e915.d.ts +5 -0
- package/esm/Component.desktop-785df74d.d.ts +6 -0
- package/{cssm/Component.desktop-8b5756fe.d.ts → esm/Component.desktop-b5b4c59f.d.ts} +14 -13
- package/esm/Component.desktop.js +1 -1
- package/esm/Component.mobile-89f0cb07.d.ts +5 -0
- package/esm/Component.mobile-d7e9f69d.d.ts +6 -0
- package/esm/Component.mobile-ebda875c.d.ts +5 -4
- package/esm/Component.mobile.js +1 -1
- package/esm/Component.responsive-0aa4e915.d.ts +5 -0
- package/esm/Component.responsive-785df74d.d.ts +26 -0
- package/esm/Component.responsive.js +1 -1
- package/esm/components/date-range-input/Component.js +7 -6
- package/esm/components/date-range-input/index.css +7 -7
- package/esm/components/date-range-input/index.js +1 -1
- package/esm/desktop-63dec22f.d.ts +1 -1
- package/esm/desktop-69921c40.d.ts +2 -0
- package/esm/desktop.js +1 -1
- package/{index-72308007.d.ts → esm/index-10db897e.d.ts} +1 -5
- package/{cssm/Component.responsive-2e2b2125.d.ts → esm/index-3109f463.d.ts} +1 -5
- package/esm/index-89f0cb07.d.ts +2 -0
- package/esm/index-ebda875c.d.ts +1 -34
- package/esm/index-f034f741.d.ts +5 -2
- package/esm/index.js +1 -1
- package/esm/mobile-c219f8ca.d.ts +1 -1
- package/esm/mobile.js +1 -1
- package/{cssm/types-83e2bd9e.d.ts → esm/types-1c79e231.d.ts} +1 -1
- package/{typings-9211a437.d.ts → esm/typings-89f0cb07.d.ts} +5 -7
- package/{cssm/index-72308007.d.ts → index-10db897e.d.ts} +1 -5
- package/{modern/Component.responsive-2e2b2125.d.ts → index-3109f463.d.ts} +1 -5
- package/index-89f0cb07.d.ts +2 -0
- package/index-f034f741.d.ts +1 -1
- package/index.js +1 -1
- package/mobile-c219f8ca.d.ts +1 -1
- package/mobile.js +1 -1
- package/{cssm/Component-72308007.d.ts → modern/Component-10db897e.d.ts} +2 -2
- package/modern/Component-89f0cb07.d.ts +38 -0
- package/modern/{Component-8b5756fe.d.ts → Component-b5b4c59f.d.ts} +4 -3
- package/modern/Component.desktop-0aa4e915.d.ts +5 -0
- package/modern/Component.desktop-785df74d.d.ts +6 -0
- package/modern/{Component.desktop-8b5756fe.d.ts → Component.desktop-b5b4c59f.d.ts} +13 -5
- package/modern/Component.desktop.js +1 -1
- package/modern/Component.mobile-16b1285a.d.ts +5 -0
- package/modern/Component.mobile-d7e9f69d.d.ts +6 -0
- package/modern/Component.mobile-ebda875c.d.ts +5 -4
- package/modern/Component.mobile.js +1 -1
- package/modern/Component.responsive-0aa4e915.d.ts +5 -0
- package/modern/Component.responsive-785df74d.d.ts +26 -0
- package/modern/Component.responsive.js +1 -1
- package/modern/components/date-range-input/Component.js +7 -6
- package/modern/components/date-range-input/index.css +7 -7
- package/modern/components/date-range-input/index.js +1 -1
- package/modern/desktop-63dec22f.d.ts +1 -1
- package/modern/desktop-69921c40.d.ts +2 -0
- package/modern/desktop.js +1 -1
- package/modern/{index-72308007.d.ts → index-10db897e.d.ts} +1 -5
- package/{esm/Component.responsive-2e2b2125.d.ts → modern/index-3109f463.d.ts} +1 -5
- package/modern/index-89f0cb07.d.ts +2 -0
- package/modern/index-f034f741.d.ts +1 -1
- package/modern/index.js +1 -1
- package/modern/mobile-c219f8ca.d.ts +1 -1
- package/modern/mobile.js +1 -1
- package/modern/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/{esm/typings-9211a437.d.ts → modern/typings-89f0cb07.d.ts} +5 -7
- package/package.json +4 -4
- package/src/components/date-range-input/Component.tsx +23 -19
- package/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/{cssm/typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/Component.desktop-2e2b2125.d.ts +0 -6
- package/Component.mobile-755fbaa3.d.ts +0 -6
- package/cssm/Component.desktop-2e2b2125.d.ts +0 -6
- package/cssm/Component.mobile-755fbaa3.d.ts +0 -6
- package/cssm/index-9211a437.d.ts +0 -2
- package/esm/Component.desktop-2e2b2125.d.ts +0 -6
- package/esm/Component.mobile-755fbaa3.d.ts +0 -6
- package/esm/index-9211a437.d.ts +0 -2
- package/index-9211a437.d.ts +0 -2
- package/modern/Component-72308007.d.ts +0 -6
- package/modern/Component.desktop-2e2b2125.d.ts +0 -6
- package/modern/Component.mobile-755fbaa3.d.ts +0 -6
- package/modern/index-9211a437.d.ts +0 -2
- /package/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
- /package/cssm/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
- /package/esm/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
- /package/modern/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
package/cssm/desktop.js
CHANGED
|
@@ -10,8 +10,8 @@ require('@alfalab/core-components-input/cssm/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/cssm/shared');
|
|
16
16
|
require('@alfalab/core-components-icon-button/cssm');
|
|
17
17
|
require('@alfalab/core-components-popover/cssm');
|
|
@@ -10,10 +10,6 @@ declare function easeInOutQuad(x: number): number;
|
|
|
10
10
|
declare const easingFns: {
|
|
11
11
|
easeInOutQuad: typeof easeInOutQuad;
|
|
12
12
|
};
|
|
13
|
-
declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
|
|
14
|
-
declare const inputUtils: {
|
|
15
|
-
disableUserInput: typeof disableUserInput;
|
|
16
|
-
};
|
|
17
13
|
/**
|
|
18
14
|
* Возвращает true, если значение равно null или undefined
|
|
19
15
|
*/
|
|
@@ -51,4 +47,4 @@ declare const maskUtils: {
|
|
|
51
47
|
prefixPostprocessor: typeof prefixPostprocessor;
|
|
52
48
|
caretGuard: typeof caretGuard;
|
|
53
49
|
};
|
|
54
|
-
export { isClient, getDataTestId, createPaddingStyle, easingFns,
|
|
50
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, fnUtils, maskUtils };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from "react";
|
|
3
1
|
import { FC, ReactNode } from "react";
|
|
4
|
-
import { ButtonProps } from "./typings-9211a437";
|
|
5
2
|
type MqProps = {
|
|
6
3
|
/**
|
|
7
4
|
* Media выражение или кастомный запрос из `mq.json`, например `--mobile`.
|
|
@@ -62,5 +59,4 @@ declare const _exports: {
|
|
|
62
59
|
"--desktop-xl": string;
|
|
63
60
|
"--desktop": string;
|
|
64
61
|
};
|
|
65
|
-
|
|
66
|
-
export { _exports as default, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported, Button };
|
|
62
|
+
export { _exports as default, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported };
|
package/cssm/index-f034f741.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
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');
|
|
@@ -69,6 +69,8 @@ type ComponentProps = {
|
|
|
69
69
|
* Дочерние элементы.
|
|
70
70
|
*/
|
|
71
71
|
children?: ReactNode;
|
|
72
|
+
};
|
|
73
|
+
type PrivateButtonProps = {
|
|
72
74
|
/**
|
|
73
75
|
* Основные стили компонента.
|
|
74
76
|
*/
|
|
@@ -80,16 +82,12 @@ type ComponentProps = {
|
|
|
80
82
|
*/
|
|
81
83
|
colorStylesMap: StyleColors;
|
|
82
84
|
};
|
|
83
|
-
type
|
|
84
|
-
type
|
|
85
|
-
type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
|
|
86
|
-
type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
87
|
-
type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
88
|
-
type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
|
|
85
|
+
type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
86
|
+
type ButtonProps = CommonButtonProps & {
|
|
89
87
|
/**
|
|
90
88
|
* Контрольная точка, с нее начинается desktop версия
|
|
91
89
|
* @default 1024
|
|
92
90
|
*/
|
|
93
91
|
breakpoint?: number;
|
|
94
92
|
};
|
|
95
|
-
export { StyleColors, ComponentProps,
|
|
93
|
+
export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
|
package/desktop-63dec22f.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Component.desktop-
|
|
1
|
+
export * from "./Component.desktop-b5b4c59f";
|
|
2
2
|
export {};
|
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 };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
|
|
5
|
+
type SpinnerProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Управление видимостью компонента
|
|
8
|
+
*/
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Размер компонента
|
|
12
|
+
*/
|
|
13
|
+
size?: "xs" | "s" | "m";
|
|
14
|
+
/**
|
|
15
|
+
* Дополнительный класс
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Идентификатор компонента в DOM
|
|
20
|
+
*/
|
|
21
|
+
id?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
24
|
+
*/
|
|
25
|
+
dataTestId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Палитра, в контексте которой используется спиннер
|
|
28
|
+
*/
|
|
29
|
+
colors?: "default" | "inverted";
|
|
30
|
+
};
|
|
31
|
+
declare const Spinner: FC<SpinnerProps>;
|
|
32
|
+
/**
|
|
33
|
+
* Минимальное время отображения лоадера - 500мс,
|
|
34
|
+
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
35
|
+
*/
|
|
36
|
+
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
37
|
+
declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
38
|
+
export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|
|
@@ -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-
|
|
8
|
-
import { CalendarDesktopProps } from "./Component.desktop-
|
|
7
|
+
import { NavigationBarProps } from "./types-1c79e231";
|
|
8
|
+
import { CalendarDesktopProps } from "./Component.desktop-b5b4c59f";
|
|
9
9
|
type BackdropProps = Partial<TransitionProps> & {
|
|
10
10
|
/**
|
|
11
11
|
* Прозрачный бэкдроп
|
|
@@ -383,6 +383,7 @@ declare const CalendarMobile: React.ForwardRefExoticComponent<CalendarDesktopPro
|
|
|
383
383
|
*/
|
|
384
384
|
allowSelectionFromEmptyRange?: boolean | undefined;
|
|
385
385
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
386
|
-
export
|
|
386
|
+
export { ButtonMobile } from "./Component.mobile-89f0cb07";
|
|
387
|
+
export type { CommonButtonProps as ButtonMobileProps } from "./typings-89f0cb07";
|
|
387
388
|
export { ModalMobile, ModalMobileProps, Content, ResponsiveContext, Modal, ModalContext, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, getModalStore, GlobalStore, CalendarMobileProps, CalendarMobile };
|
|
388
389
|
export type { SavedStyle };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CommonButtonProps } from "./typings-89f0cb07";
|
|
4
|
+
declare const ButtonDesktop: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
|
+
export { ButtonDesktop };
|
|
@@ -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,
|
|
197
|
-
export * from "./Component-
|
|
197
|
+
export { HeaderProps, Header, MonthYearHeaderProps, MonthYearHeader, MonthsTableProps, MonthsTable, YearsTableProps, YearsTable, CalendarDesktopProps, CalendarDesktop };
|
|
198
|
+
export * from "./Component-69921c40";
|
package/esm/Component.desktop.js
CHANGED
|
@@ -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,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CommonButtonProps } from "./typings-89f0cb07";
|
|
4
|
+
declare const ButtonMobile: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
|
+
export { 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,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
type
|
|
5
|
-
declare const
|
|
6
|
-
export
|
|
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 };
|
package/esm/Component.mobile.js
CHANGED
|
@@ -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';
|
|
@@ -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 };
|