@alfalab/core-components-date-range-input 3.0.10 → 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.
- package/Component-72308007.d.ts +1 -1
- package/{Component-8b5756fe.d.ts → Component-b5b4c59f.d.ts} +2 -2
- package/Component.desktop-785df74d.d.ts +6 -0
- package/{esm/Component.desktop-8b5756fe.d.ts → Component.desktop-b5b4c59f.d.ts} +12 -4
- package/Component.desktop.js +1 -1
- 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-2e2b2125.d.ts +2 -63
- package/Component.responsive-785df74d.d.ts +26 -0
- package/Component.responsive.js +1 -1
- package/components/date-range-input/Component.js +5 -4
- package/components/date-range-input/index.css +7 -7
- package/components/date-range-input/index.js +1 -1
- package/cssm/Component-72308007.d.ts +1 -1
- package/{esm/Component-8b5756fe.d.ts → cssm/Component-b5b4c59f.d.ts} +2 -2
- package/cssm/Component.desktop-785df74d.d.ts +6 -0
- package/{Component.desktop-8b5756fe.d.ts → cssm/Component.desktop-b5b4c59f.d.ts} +12 -4
- package/cssm/Component.desktop.js +1 -1
- 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-2e2b2125.d.ts +2 -63
- package/cssm/Component.responsive-785df74d.d.ts +26 -0
- package/cssm/Component.responsive.js +1 -1
- package/cssm/components/date-range-input/Component.js +4 -3
- package/cssm/components/date-range-input/index.js +1 -1
- package/cssm/desktop.js +1 -1
- package/cssm/index-3109f463.d.ts +62 -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/cssm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/desktop.js +1 -1
- package/esm/Component-72308007.d.ts +295 -4
- package/{cssm/Component-8b5756fe.d.ts → esm/Component-b5b4c59f.d.ts} +2 -2
- package/esm/Component.desktop-785df74d.d.ts +6 -0
- package/{cssm/Component.desktop-8b5756fe.d.ts → esm/Component.desktop-b5b4c59f.d.ts} +13 -12
- package/esm/Component.desktop.js +1 -1
- 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-2e2b2125.d.ts +2 -63
- package/esm/Component.responsive-785df74d.d.ts +26 -0
- package/esm/Component.responsive.js +1 -1
- package/esm/components/date-range-input/Component.js +2 -2
- package/esm/components/date-range-input/index.css +7 -7
- package/esm/components/date-range-input/index.js +1 -1
- package/esm/desktop.js +1 -1
- package/esm/index-3109f463.d.ts +62 -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/esm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/index-3109f463.d.ts +62 -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/modern/Component-72308007.d.ts +1 -1
- package/modern/{Component-8b5756fe.d.ts → Component-b5b4c59f.d.ts} +2 -2
- package/modern/Component.desktop-785df74d.d.ts +6 -0
- package/modern/{Component.desktop-8b5756fe.d.ts → Component.desktop-b5b4c59f.d.ts} +12 -4
- package/modern/Component.desktop.js +1 -1
- 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-2e2b2125.d.ts +2 -63
- package/modern/Component.responsive-785df74d.d.ts +26 -0
- package/modern/Component.responsive.js +1 -1
- package/modern/components/date-range-input/Component.js +2 -2
- package/modern/components/date-range-input/index.css +7 -7
- package/modern/components/date-range-input/index.js +1 -1
- package/modern/desktop.js +1 -1
- package/modern/index-3109f463.d.ts +62 -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/package.json +4 -4
- package/src/components/date-range-input/Component.tsx +1 -1
- package/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
package/Component-72308007.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { NavigationBarProps } from "./types-
|
|
3
|
+
import { NavigationBarProps } from "./types-1c79e231";
|
|
4
4
|
declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export * from "./Component-63dec22f";
|
|
6
6
|
export { NavigationBar };
|
|
@@ -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
|
* Прозрачный бэкдроп
|
|
@@ -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 };
|
|
@@ -16,6 +16,10 @@ type HeaderProps = {
|
|
|
16
16
|
* Дочерние элементы.
|
|
17
17
|
*/
|
|
18
18
|
children?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Дополнительный класс
|
|
21
|
+
*/
|
|
22
|
+
className?: string;
|
|
19
23
|
};
|
|
20
24
|
declare const Header: FC<HeaderProps>;
|
|
21
25
|
type MonthYearHeaderProps = {
|
|
@@ -79,10 +83,6 @@ type YearsTableProps = {
|
|
|
79
83
|
* Доп. пропсы для переданного года
|
|
80
84
|
*/
|
|
81
85
|
getYearProps: (year: Date) => Record<string, unknown>;
|
|
82
|
-
/**
|
|
83
|
-
* Обработчик скролла
|
|
84
|
-
*/
|
|
85
|
-
onScroll: (scrollTop: number) => void;
|
|
86
86
|
/**
|
|
87
87
|
* Должен ли календарь подстраиваться под ширину родителя.
|
|
88
88
|
*/
|
|
@@ -94,6 +94,14 @@ type CalendarDesktopProps = {
|
|
|
94
94
|
* Дополнительный класс
|
|
95
95
|
*/
|
|
96
96
|
className?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Дополнительный класс шапки десктопного календаря
|
|
99
|
+
*/
|
|
100
|
+
headerClassName?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Дополнительный класс контента десктопного календаря
|
|
103
|
+
*/
|
|
104
|
+
contentClassName?: string;
|
|
97
105
|
/**
|
|
98
106
|
* Вид по умолчанию (выбор дней, месяцев, лет)
|
|
99
107
|
*/
|
package/Component.desktop.js
CHANGED
|
@@ -9,8 +9,8 @@ var desktop = require('@alfalab/core-components-input/desktop');
|
|
|
9
9
|
var components_dateRangeInput_Component = require('./components/date-range-input/Component.js');
|
|
10
10
|
require('react-merge-refs');
|
|
11
11
|
require('classnames');
|
|
12
|
-
require('date-fns');
|
|
13
12
|
require('date-fns/isValid');
|
|
13
|
+
require('date-fns/startOfMonth');
|
|
14
14
|
require('@alfalab/core-components-calendar/shared');
|
|
15
15
|
require('@alfalab/core-components-icon-button');
|
|
16
16
|
require('@alfalab/core-components-popover');
|
|
@@ -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/Component.mobile.js
CHANGED
|
@@ -9,8 +9,8 @@ var mobile = require('@alfalab/core-components-input/mobile');
|
|
|
9
9
|
var components_dateRangeInput_Component = require('./components/date-range-input/Component.js');
|
|
10
10
|
require('react-merge-refs');
|
|
11
11
|
require('classnames');
|
|
12
|
-
require('date-fns');
|
|
13
12
|
require('date-fns/isValid');
|
|
13
|
+
require('date-fns/startOfMonth');
|
|
14
14
|
require('@alfalab/core-components-calendar/shared');
|
|
15
15
|
require('@alfalab/core-components-icon-button');
|
|
16
16
|
require('@alfalab/core-components-popover');
|
|
@@ -1,66 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import React from
|
|
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 {
|
|
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 };
|
package/Component.responsive.js
CHANGED
|
@@ -12,8 +12,8 @@ require('@alfalab/core-components-input/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/shared');
|
|
18
18
|
require('@alfalab/core-components-icon-button');
|
|
19
19
|
require('@alfalab/core-components-popover');
|
|
@@ -6,8 +6,8 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var mergeRefs = require('react-merge-refs');
|
|
8
8
|
var cn = require('classnames');
|
|
9
|
-
var dateFns = require('date-fns');
|
|
10
9
|
var dateFnsIsValid = require('date-fns/isValid');
|
|
10
|
+
var startOfMonth = require('date-fns/startOfMonth');
|
|
11
11
|
var shared = require('@alfalab/core-components-calendar/shared');
|
|
12
12
|
var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
|
|
13
13
|
var coreComponentsPopover = require('@alfalab/core-components-popover');
|
|
@@ -22,8 +22,9 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
22
22
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
23
23
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
24
24
|
var dateFnsIsValid__default = /*#__PURE__*/_interopDefaultCompat(dateFnsIsValid);
|
|
25
|
+
var startOfMonth__default = /*#__PURE__*/_interopDefaultCompat(startOfMonth);
|
|
25
26
|
|
|
26
|
-
var styles = {"component":"date-range-
|
|
27
|
+
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"};
|
|
27
28
|
require('./index.css')
|
|
28
29
|
|
|
29
30
|
var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
@@ -204,8 +205,8 @@ var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
|
204
205
|
}
|
|
205
206
|
};
|
|
206
207
|
var renderCalendar = function () {
|
|
207
|
-
var activeMonth = (selectedTo &&
|
|
208
|
-
(selectedFrom &&
|
|
208
|
+
var activeMonth = (selectedTo && startOfMonth__default.default(selectedTo)) ||
|
|
209
|
+
(selectedFrom && startOfMonth__default.default(selectedFrom));
|
|
209
210
|
return Calendar ? (
|
|
210
211
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
211
212
|
React__default.default.createElement("div", { onMouseDown: handleCalendarWrapperMouseDown },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1fu7x */
|
|
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-
|
|
44
|
+
} .date-range-input__component_wks86 {
|
|
45
45
|
display: inline-block;
|
|
46
46
|
outline: none;
|
|
47
47
|
position: relative;
|
|
48
|
-
} .date-range-
|
|
48
|
+
} .date-range-input__calendarContainer_wks86 {
|
|
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-
|
|
53
|
+
} @media (max-width: 374px) { .date-range-input__calendarContainer_wks86 {
|
|
54
54
|
width: 100%;
|
|
55
55
|
min-width: 288px
|
|
56
56
|
}
|
|
57
|
-
} .date-range-
|
|
57
|
+
} .date-range-input__calendarResponsive_wks86 {
|
|
58
58
|
width: var(--calendar-width);
|
|
59
|
-
} .date-range-
|
|
59
|
+
} .date-range-input__block_wks86 {
|
|
60
60
|
width: 100%;
|
|
61
|
-
} .date-range-
|
|
61
|
+
} .date-range-input__calendarIcon_wks86 {
|
|
62
62
|
margin-right: var(--gap-s-neg);
|
|
63
63
|
height: 100%;
|
|
64
64
|
}
|
|
@@ -7,8 +7,8 @@ require('tslib');
|
|
|
7
7
|
require('react');
|
|
8
8
|
require('react-merge-refs');
|
|
9
9
|
require('classnames');
|
|
10
|
-
require('date-fns');
|
|
11
10
|
require('date-fns/isValid');
|
|
11
|
+
require('date-fns/startOfMonth');
|
|
12
12
|
require('@alfalab/core-components-calendar/shared');
|
|
13
13
|
require('@alfalab/core-components-icon-button');
|
|
14
14
|
require('@alfalab/core-components-popover');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { NavigationBarProps } from "./types-
|
|
3
|
+
import { NavigationBarProps } from "./types-1c79e231";
|
|
4
4
|
declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export * from "./Component-63dec22f";
|
|
6
6
|
export { NavigationBar };
|
|
@@ -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
|
* Прозрачный бэкдроп
|
|
@@ -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 };
|
|
@@ -16,6 +16,10 @@ type HeaderProps = {
|
|
|
16
16
|
* Дочерние элементы.
|
|
17
17
|
*/
|
|
18
18
|
children?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Дополнительный класс
|
|
21
|
+
*/
|
|
22
|
+
className?: string;
|
|
19
23
|
};
|
|
20
24
|
declare const Header: FC<HeaderProps>;
|
|
21
25
|
type MonthYearHeaderProps = {
|
|
@@ -79,10 +83,6 @@ type YearsTableProps = {
|
|
|
79
83
|
* Доп. пропсы для переданного года
|
|
80
84
|
*/
|
|
81
85
|
getYearProps: (year: Date) => Record<string, unknown>;
|
|
82
|
-
/**
|
|
83
|
-
* Обработчик скролла
|
|
84
|
-
*/
|
|
85
|
-
onScroll: (scrollTop: number) => void;
|
|
86
86
|
/**
|
|
87
87
|
* Должен ли календарь подстраиваться под ширину родителя.
|
|
88
88
|
*/
|
|
@@ -94,6 +94,14 @@ type CalendarDesktopProps = {
|
|
|
94
94
|
* Дополнительный класс
|
|
95
95
|
*/
|
|
96
96
|
className?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Дополнительный класс шапки десктопного календаря
|
|
99
|
+
*/
|
|
100
|
+
headerClassName?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Дополнительный класс контента десктопного календаря
|
|
103
|
+
*/
|
|
104
|
+
contentClassName?: string;
|
|
97
105
|
/**
|
|
98
106
|
* Вид по умолчанию (выбор дней, месяцев, лет)
|
|
99
107
|
*/
|
|
@@ -9,8 +9,8 @@ var desktop = require('@alfalab/core-components-input/cssm/desktop');
|
|
|
9
9
|
var components_dateRangeInput_Component = require('./components/date-range-input/Component.js');
|
|
10
10
|
require('react-merge-refs');
|
|
11
11
|
require('classnames');
|
|
12
|
-
require('date-fns');
|
|
13
12
|
require('date-fns/isValid');
|
|
13
|
+
require('date-fns/startOfMonth');
|
|
14
14
|
require('@alfalab/core-components-calendar/cssm/shared');
|
|
15
15
|
require('@alfalab/core-components-icon-button/cssm');
|
|
16
16
|
require('@alfalab/core-components-popover/cssm');
|
|
@@ -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/cssm/Component.mobile.js
CHANGED
|
@@ -9,8 +9,8 @@ var mobile = require('@alfalab/core-components-input/cssm/mobile');
|
|
|
9
9
|
var components_dateRangeInput_Component = require('./components/date-range-input/Component.js');
|
|
10
10
|
require('react-merge-refs');
|
|
11
11
|
require('classnames');
|
|
12
|
-
require('date-fns');
|
|
13
12
|
require('date-fns/isValid');
|
|
13
|
+
require('date-fns/startOfMonth');
|
|
14
14
|
require('@alfalab/core-components-calendar/cssm/shared');
|
|
15
15
|
require('@alfalab/core-components-icon-button/cssm');
|
|
16
16
|
require('@alfalab/core-components-popover/cssm');
|
|
@@ -1,66 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import React from
|
|
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 {
|
|
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 };
|
|
@@ -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');
|
|
@@ -6,8 +6,8 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var mergeRefs = require('react-merge-refs');
|
|
8
8
|
var cn = require('classnames');
|
|
9
|
-
var dateFns = require('date-fns');
|
|
10
9
|
var dateFnsIsValid = require('date-fns/isValid');
|
|
10
|
+
var startOfMonth = require('date-fns/startOfMonth');
|
|
11
11
|
var shared = require('@alfalab/core-components-calendar/cssm/shared');
|
|
12
12
|
var coreComponentsIconButton = require('@alfalab/core-components-icon-button/cssm');
|
|
13
13
|
var coreComponentsPopover = require('@alfalab/core-components-popover/cssm');
|
|
@@ -23,6 +23,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
23
23
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
24
24
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
25
25
|
var dateFnsIsValid__default = /*#__PURE__*/_interopDefaultCompat(dateFnsIsValid);
|
|
26
|
+
var startOfMonth__default = /*#__PURE__*/_interopDefaultCompat(startOfMonth);
|
|
26
27
|
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
27
28
|
|
|
28
29
|
var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
@@ -203,8 +204,8 @@ var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
|
203
204
|
}
|
|
204
205
|
};
|
|
205
206
|
var renderCalendar = function () {
|
|
206
|
-
var activeMonth = (selectedTo &&
|
|
207
|
-
(selectedFrom &&
|
|
207
|
+
var activeMonth = (selectedTo && startOfMonth__default.default(selectedTo)) ||
|
|
208
|
+
(selectedFrom && startOfMonth__default.default(selectedFrom));
|
|
208
209
|
return Calendar ? (
|
|
209
210
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
210
211
|
React__default.default.createElement("div", { onMouseDown: handleCalendarWrapperMouseDown },
|
|
@@ -7,8 +7,8 @@ require('tslib');
|
|
|
7
7
|
require('react');
|
|
8
8
|
require('react-merge-refs');
|
|
9
9
|
require('classnames');
|
|
10
|
-
require('date-fns');
|
|
11
10
|
require('date-fns/isValid');
|
|
11
|
+
require('date-fns/startOfMonth');
|
|
12
12
|
require('@alfalab/core-components-calendar/cssm/shared');
|
|
13
13
|
require('@alfalab/core-components-icon-button/cssm');
|
|
14
14
|
require('@alfalab/core-components-popover/cssm');
|
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');
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
type MqProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Media выражение или кастомный запрос из `mq.json`, например `--mobile`.
|
|
5
|
+
*/
|
|
6
|
+
query?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Запрос на поддержку тач-событий
|
|
9
|
+
*/
|
|
10
|
+
touch?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Дочерние элементы.
|
|
13
|
+
*/
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Обработчик изменений в совпадении запросов
|
|
17
|
+
*/
|
|
18
|
+
onMatchChange?: (isMatched: boolean) => void;
|
|
19
|
+
};
|
|
20
|
+
declare const Mq: FC<MqProps>;
|
|
21
|
+
/**
|
|
22
|
+
* Хук для медиа запросов.
|
|
23
|
+
* @param query media выражение или кастомный запрос из `mq.json`, например `--mobile`.
|
|
24
|
+
* @param defaultValue Значение по-умолчанию.
|
|
25
|
+
*/
|
|
26
|
+
declare const useMatchMedia: (query: string, defaultValue?: boolean | (() => boolean)) => boolean[];
|
|
27
|
+
/**
|
|
28
|
+
* Возвращает MediaQueryList для заданного media-выражения.
|
|
29
|
+
*
|
|
30
|
+
* @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
|
|
31
|
+
*/
|
|
32
|
+
declare function getMatchMedia(queryProp: string): MediaQueryList;
|
|
33
|
+
/**
|
|
34
|
+
* Удаляет MediaQueryList.
|
|
35
|
+
*
|
|
36
|
+
* @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
|
|
37
|
+
*/
|
|
38
|
+
declare function releaseMatchMedia(queryProp: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* Возвращает `true`, если есть поддержка `Pointer Events`
|
|
41
|
+
*/
|
|
42
|
+
declare function isPointerEventsSupported(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Возвращает `true`, если есть поддержка `Touch Events`
|
|
45
|
+
*/
|
|
46
|
+
declare function isTouchSupported(): boolean;
|
|
47
|
+
declare const _exports: {
|
|
48
|
+
"--mobile-xs": string;
|
|
49
|
+
"--mobile-s": string;
|
|
50
|
+
"--mobile-m": string;
|
|
51
|
+
"--mobile-l": string;
|
|
52
|
+
"--mobile": string;
|
|
53
|
+
"--tablet-s": string;
|
|
54
|
+
"--tablet-m": string;
|
|
55
|
+
"--tablet": string;
|
|
56
|
+
"--desktop-s": string;
|
|
57
|
+
"--desktop-m": string;
|
|
58
|
+
"--desktop-l": string;
|
|
59
|
+
"--desktop-xl": string;
|
|
60
|
+
"--desktop": string;
|
|
61
|
+
};
|
|
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";
|