@alfalab/core-components-date-range-input 3.0.11 → 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/{modern/Component-72308007.d.ts → Component-10db897e.d.ts} +1 -1
- package/Component-89f0cb07.d.ts +38 -0
- package/Component-b5b4c59f.d.ts +2 -1
- package/Component.desktop-0aa4e915.d.ts +5 -0
- package/Component.desktop-b5b4c59f.d.ts +1 -1
- package/Component.mobile-16b1285a.d.ts +5 -0
- package/{Component.responsive-2e2b2125.d.ts → Component.responsive-0aa4e915.d.ts} +1 -1
- package/components/date-range-input/Component.js +6 -5
- package/components/date-range-input/index.css +7 -7
- package/{Component-72308007.d.ts → cssm/Component-10db897e.d.ts} +1 -1
- package/cssm/Component-89f0cb07.d.ts +38 -0
- package/cssm/Component-b5b4c59f.d.ts +2 -1
- package/cssm/Component.desktop-0aa4e915.d.ts +5 -0
- package/cssm/Component.desktop-b5b4c59f.d.ts +1 -1
- package/cssm/Component.mobile-16b1285a.d.ts +5 -0
- package/{esm/Component.responsive-2e2b2125.d.ts → cssm/Component.responsive-0aa4e915.d.ts} +1 -1
- package/cssm/components/date-range-input/Component.js +5 -4
- package/cssm/desktop-63dec22f.d.ts +1 -1
- package/cssm/desktop-69921c40.d.ts +2 -0
- package/cssm/{index-72308007.d.ts → index-10db897e.d.ts} +1 -5
- package/cssm/index-89f0cb07.d.ts +2 -0
- package/{esm/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/esm/Component-89f0cb07.d.ts +38 -0
- package/esm/Component-b5b4c59f.d.ts +2 -1
- package/esm/Component.desktop-0aa4e915.d.ts +5 -0
- package/esm/Component.desktop-b5b4c59f.d.ts +1 -1
- package/esm/Component.mobile-89f0cb07.d.ts +5 -0
- package/{modern/Component.responsive-2e2b2125.d.ts → esm/Component.responsive-0aa4e915.d.ts} +1 -1
- package/esm/components/date-range-input/Component.js +6 -5
- package/esm/components/date-range-input/index.css +7 -7
- package/esm/desktop-63dec22f.d.ts +1 -1
- package/esm/desktop-69921c40.d.ts +2 -0
- package/{index-72308007.d.ts → esm/index-10db897e.d.ts} +1 -5
- package/esm/index-89f0cb07.d.ts +2 -0
- package/esm/index-ebda875c.d.ts +1 -1
- package/{modern/typings-9211a437.d.ts → esm/typings-89f0cb07.d.ts} +5 -7
- package/{esm/index-72308007.d.ts → index-10db897e.d.ts} +1 -5
- package/index-89f0cb07.d.ts +2 -0
- package/{cssm/Component-72308007.d.ts → modern/Component-10db897e.d.ts} +1 -1
- package/modern/Component-89f0cb07.d.ts +38 -0
- package/modern/Component-b5b4c59f.d.ts +2 -1
- package/modern/Component.desktop-0aa4e915.d.ts +5 -0
- package/modern/Component.desktop-b5b4c59f.d.ts +1 -1
- package/modern/Component.mobile-16b1285a.d.ts +5 -0
- package/{cssm/Component.responsive-2e2b2125.d.ts → modern/Component.responsive-0aa4e915.d.ts} +1 -1
- package/modern/components/date-range-input/Component.js +6 -5
- package/modern/components/date-range-input/index.css +7 -7
- package/modern/desktop-63dec22f.d.ts +1 -1
- package/modern/desktop-69921c40.d.ts +2 -0
- package/modern/{index-72308007.d.ts → index-10db897e.d.ts} +1 -5
- package/modern/index-89f0cb07.d.ts +2 -0
- package/{typings-9211a437.d.ts → modern/typings-89f0cb07.d.ts} +5 -7
- package/package.json +4 -4
- package/src/components/date-range-input/Component.tsx +22 -18
- 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.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-72308007.d.ts → Component-10db897e.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
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { NavigationBarProps } from "./types-1c79e231";
|
|
4
4
|
declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export * from "./Component-
|
|
5
|
+
export * from "./Component-69921c40";
|
|
6
6
|
export { NavigationBar };
|
|
@@ -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 };
|
package/Component-b5b4c59f.d.ts
CHANGED
|
@@ -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-16b1285a";
|
|
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 };
|
|
@@ -202,4 +202,4 @@ type CalendarDesktopProps = {
|
|
|
202
202
|
};
|
|
203
203
|
declare const CalendarDesktop: React.ForwardRefExoticComponent<CalendarDesktopProps & React.RefAttributes<HTMLDivElement>>;
|
|
204
204
|
export { HeaderProps, Header, MonthYearHeaderProps, MonthYearHeader, MonthsTableProps, MonthsTable, formatPeriod, getYearSelectorValue, shiftValues, YearsTableProps, YearsTable, CalendarDesktopProps, CalendarDesktop };
|
|
205
|
-
export * from "./Component-
|
|
205
|
+
export * from "./Component-69921c40";
|
|
@@ -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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ButtonProps } from "./typings-
|
|
3
|
+
import { ButtonProps } from "./typings-89f0cb07";
|
|
4
4
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
5
|
export { Button };
|
|
@@ -24,7 +24,7 @@ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
|
24
24
|
var dateFnsIsValid__default = /*#__PURE__*/_interopDefaultCompat(dateFnsIsValid);
|
|
25
25
|
var startOfMonth__default = /*#__PURE__*/_interopDefaultCompat(startOfMonth);
|
|
26
26
|
|
|
27
|
-
var styles = {"component":"date-range-
|
|
27
|
+
var styles = {"component":"date-range-input__component_1hqhh","calendarContainer":"date-range-input__calendarContainer_1hqhh","calendarResponsive":"date-range-input__calendarResponsive_1hqhh","block":"date-range-input__block_1hqhh","calendarIcon":"date-range-input__calendarIcon_1hqhh"};
|
|
28
28
|
require('./index.css')
|
|
29
29
|
|
|
30
30
|
var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
@@ -215,12 +215,13 @@ var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
|
215
215
|
return (React__default.default.createElement("div", { className: cn__default.default(styles.component, className, (_b = {},
|
|
216
216
|
_b[styles.block] = block,
|
|
217
217
|
_b)), onFocus: inputDisabled ? undefined : handleInputWrapperFocus, onBlur: handleBlur },
|
|
218
|
-
InputComponent ? (React__default.default.createElement(InputComponent, tslib.__assign({}, restProps, { block: block, ref: mergeRefs__default.default([ref, inputRef]), value: value, onChange: handleChange, disabled: disabled, readOnly: readOnly, className: inputClassName, onClear: handleClear, disableUserInput: disableUserInput, rightAddons: React__default.default.createElement(React__default.default.Fragment, null,
|
|
218
|
+
InputComponent ? (React__default.default.createElement(InputComponent, tslib.__assign({ autoComplete: picker ? 'off' : undefined }, restProps, { block: block, ref: mergeRefs__default.default([ref, inputRef]), value: value, onChange: handleChange, disabled: disabled, readOnly: readOnly, className: inputClassName, onClear: handleClear, disableUserInput: disableUserInput, rightAddons: React__default.default.createElement(React__default.default.Fragment, null,
|
|
219
219
|
rightAddons,
|
|
220
220
|
picker && (React__default.default.createElement(coreComponentsIconButton.IconButton, { className: styles.calendarIcon, ref: iconRef, onClick: inputDisabled ? undefined : handleIconButtonClick, icon: CalendarMIcon.CalendarMIcon, size: 's' }))) }))) : null,
|
|
221
|
-
picker &&
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
picker &&
|
|
222
|
+
(view === 'desktop' ? (React__default.default.createElement(coreComponentsPopover.Popover, { open: open, useAnchorWidth: useAnchorWidth, anchorElement: inputRef.current, popperClassName: cn__default.default(styles.calendarContainer, (_c = {},
|
|
223
|
+
_c[styles.calendarResponsive] = calendarResponsive,
|
|
224
|
+
_c)), className: popoverClassName, position: popoverPosition, offset: [0, 8], withTransition: false, preventFlip: preventFlip, zIndex: zIndexPopover }, renderCalendar())) : (renderCalendar()))));
|
|
224
225
|
});
|
|
225
226
|
|
|
226
227
|
exports.DateRangeInput = DateRangeInput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1vwf3 */
|
|
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_1hqhh {
|
|
45
45
|
display: inline-block;
|
|
46
46
|
outline: none;
|
|
47
47
|
position: relative;
|
|
48
|
-
} .date-range-
|
|
48
|
+
} .date-range-input__calendarContainer_1hqhh {
|
|
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_1hqhh {
|
|
54
54
|
width: 100%;
|
|
55
55
|
min-width: 288px
|
|
56
56
|
}
|
|
57
|
-
} .date-range-
|
|
57
|
+
} .date-range-input__calendarResponsive_1hqhh {
|
|
58
58
|
width: var(--calendar-width);
|
|
59
|
-
} .date-range-
|
|
59
|
+
} .date-range-input__block_1hqhh {
|
|
60
60
|
width: 100%;
|
|
61
|
-
} .date-range-
|
|
61
|
+
} .date-range-input__calendarIcon_1hqhh {
|
|
62
62
|
margin-right: var(--gap-s-neg);
|
|
63
63
|
height: 100%;
|
|
64
64
|
}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { NavigationBarProps } from "./types-1c79e231";
|
|
4
4
|
declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export * from "./Component-
|
|
5
|
+
export * from "./Component-69921c40";
|
|
6
6
|
export { NavigationBar };
|
|
@@ -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 };
|
|
@@ -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-16b1285a";
|
|
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 };
|
|
@@ -202,4 +202,4 @@ type CalendarDesktopProps = {
|
|
|
202
202
|
};
|
|
203
203
|
declare const CalendarDesktop: React.ForwardRefExoticComponent<CalendarDesktopProps & React.RefAttributes<HTMLDivElement>>;
|
|
204
204
|
export { HeaderProps, Header, MonthYearHeaderProps, MonthYearHeader, MonthsTableProps, MonthsTable, formatPeriod, getYearSelectorValue, shiftValues, YearsTableProps, YearsTable, CalendarDesktopProps, CalendarDesktop };
|
|
205
|
-
export * from "./Component-
|
|
205
|
+
export * from "./Component-69921c40";
|
|
@@ -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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ButtonProps } from "./typings-
|
|
3
|
+
import { ButtonProps } from "./typings-89f0cb07";
|
|
4
4
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
5
|
export { Button };
|
|
@@ -214,12 +214,13 @@ var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
|
214
214
|
return (React__default.default.createElement("div", { className: cn__default.default(styles__default.default.component, className, (_b = {},
|
|
215
215
|
_b[styles__default.default.block] = block,
|
|
216
216
|
_b)), onFocus: inputDisabled ? undefined : handleInputWrapperFocus, onBlur: handleBlur },
|
|
217
|
-
InputComponent ? (React__default.default.createElement(InputComponent, tslib.__assign({}, restProps, { block: block, ref: mergeRefs__default.default([ref, inputRef]), value: value, onChange: handleChange, disabled: disabled, readOnly: readOnly, className: inputClassName, onClear: handleClear, disableUserInput: disableUserInput, rightAddons: React__default.default.createElement(React__default.default.Fragment, null,
|
|
217
|
+
InputComponent ? (React__default.default.createElement(InputComponent, tslib.__assign({ autoComplete: picker ? 'off' : undefined }, restProps, { block: block, ref: mergeRefs__default.default([ref, inputRef]), value: value, onChange: handleChange, disabled: disabled, readOnly: readOnly, className: inputClassName, onClear: handleClear, disableUserInput: disableUserInput, rightAddons: React__default.default.createElement(React__default.default.Fragment, null,
|
|
218
218
|
rightAddons,
|
|
219
219
|
picker && (React__default.default.createElement(coreComponentsIconButton.IconButton, { className: styles__default.default.calendarIcon, ref: iconRef, onClick: inputDisabled ? undefined : handleIconButtonClick, icon: CalendarMIcon.CalendarMIcon, size: 's' }))) }))) : null,
|
|
220
|
-
picker &&
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
picker &&
|
|
221
|
+
(view === 'desktop' ? (React__default.default.createElement(coreComponentsPopover.Popover, { open: open, useAnchorWidth: useAnchorWidth, anchorElement: inputRef.current, popperClassName: cn__default.default(styles__default.default.calendarContainer, (_c = {},
|
|
222
|
+
_c[styles__default.default.calendarResponsive] = calendarResponsive,
|
|
223
|
+
_c)), className: popoverClassName, position: popoverPosition, offset: [0, 8], withTransition: false, preventFlip: preventFlip, zIndex: zIndexPopover }, renderCalendar())) : (renderCalendar()))));
|
|
223
224
|
});
|
|
224
225
|
|
|
225
226
|
exports.DateRangeInput = DateRangeInput;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Component.desktop-
|
|
1
|
+
export * from "./Component.desktop-b5b4c59f";
|
|
2
2
|
export {};
|
|
@@ -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 };
|
|
@@ -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 {};
|
|
@@ -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 };
|
|
@@ -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 };
|
|
@@ -195,4 +195,4 @@ type CalendarDesktopProps = {
|
|
|
195
195
|
};
|
|
196
196
|
declare const CalendarDesktop: React.ForwardRefExoticComponent<CalendarDesktopProps & React.RefAttributes<HTMLDivElement>>;
|
|
197
197
|
export { HeaderProps, Header, MonthYearHeaderProps, MonthYearHeader, MonthsTableProps, MonthsTable, YearsTableProps, YearsTable, CalendarDesktopProps, CalendarDesktop };
|
|
198
|
-
export * from "./Component-
|
|
198
|
+
export * from "./Component-69921c40";
|
|
@@ -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 };
|
package/{modern/Component.responsive-2e2b2125.d.ts → esm/Component.responsive-0aa4e915.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ButtonProps } from "./typings-
|
|
3
|
+
import { ButtonProps } from "./typings-89f0cb07";
|
|
4
4
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
5
|
export { Button };
|
|
@@ -12,7 +12,7 @@ import { CalendarMIcon } from '@alfalab/icons-glyph/CalendarMIcon';
|
|
|
12
12
|
import { parseTimestampToDate, DATE_FORMAT, format, parseDateString, DATE_MASK, isCompleteDateInput, isValid } from '../../utils/format.js';
|
|
13
13
|
import 'date-fns/parse';
|
|
14
14
|
|
|
15
|
-
var styles = {"component":"date-range-
|
|
15
|
+
var styles = {"component":"date-range-input__component_1hqhh","calendarContainer":"date-range-input__calendarContainer_1hqhh","calendarResponsive":"date-range-input__calendarResponsive_1hqhh","block":"date-range-input__block_1hqhh","calendarIcon":"date-range-input__calendarIcon_1hqhh"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
var DateRangeInput = React.forwardRef(function (_a, ref) {
|
|
@@ -203,12 +203,13 @@ var DateRangeInput = React.forwardRef(function (_a, ref) {
|
|
|
203
203
|
return (React.createElement("div", { className: cn(styles.component, className, (_b = {},
|
|
204
204
|
_b[styles.block] = block,
|
|
205
205
|
_b)), onFocus: inputDisabled ? undefined : handleInputWrapperFocus, onBlur: handleBlur },
|
|
206
|
-
InputComponent ? (React.createElement(InputComponent, __assign({}, restProps, { block: block, ref: mergeRefs([ref, inputRef]), value: value, onChange: handleChange, disabled: disabled, readOnly: readOnly, className: inputClassName, onClear: handleClear, disableUserInput: disableUserInput, rightAddons: React.createElement(React.Fragment, null,
|
|
206
|
+
InputComponent ? (React.createElement(InputComponent, __assign({ autoComplete: picker ? 'off' : undefined }, restProps, { block: block, ref: mergeRefs([ref, inputRef]), value: value, onChange: handleChange, disabled: disabled, readOnly: readOnly, className: inputClassName, onClear: handleClear, disableUserInput: disableUserInput, rightAddons: React.createElement(React.Fragment, null,
|
|
207
207
|
rightAddons,
|
|
208
208
|
picker && (React.createElement(IconButton, { className: styles.calendarIcon, ref: iconRef, onClick: inputDisabled ? undefined : handleIconButtonClick, icon: CalendarMIcon, size: 's' }))) }))) : null,
|
|
209
|
-
picker &&
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
picker &&
|
|
210
|
+
(view === 'desktop' ? (React.createElement(Popover, { open: open, useAnchorWidth: useAnchorWidth, anchorElement: inputRef.current, popperClassName: cn(styles.calendarContainer, (_c = {},
|
|
211
|
+
_c[styles.calendarResponsive] = calendarResponsive,
|
|
212
|
+
_c)), className: popoverClassName, position: popoverPosition, offset: [0, 8], withTransition: false, preventFlip: preventFlip, zIndex: zIndexPopover }, renderCalendar())) : (renderCalendar()))));
|
|
212
213
|
});
|
|
213
214
|
|
|
214
215
|
export { DateRangeInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1vwf3 */
|
|
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_1hqhh {
|
|
45
45
|
display: inline-block;
|
|
46
46
|
outline: none;
|
|
47
47
|
position: relative;
|
|
48
|
-
} .date-range-
|
|
48
|
+
} .date-range-input__calendarContainer_1hqhh {
|
|
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_1hqhh {
|
|
54
54
|
width: 100%;
|
|
55
55
|
min-width: 288px
|
|
56
56
|
}
|
|
57
|
-
} .date-range-
|
|
57
|
+
} .date-range-input__calendarResponsive_1hqhh {
|
|
58
58
|
width: var(--calendar-width);
|
|
59
|
-
} .date-range-
|
|
59
|
+
} .date-range-input__block_1hqhh {
|
|
60
60
|
width: 100%;
|
|
61
|
-
} .date-range-
|
|
61
|
+
} .date-range-input__calendarIcon_1hqhh {
|
|
62
62
|
margin-right: var(--gap-s-neg);
|
|
63
63
|
height: 100%;
|
|
64
64
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Component.desktop-
|
|
1
|
+
export * from "./Component.desktop-b5b4c59f";
|
|
2
2
|
export {};
|
|
@@ -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 };
|
package/esm/index-ebda875c.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export * from "./Component-
|
|
2
|
+
export * from "./Component-10db897e";
|
|
@@ -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 };
|
|
@@ -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 };
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { NavigationBarProps } from "./types-1c79e231";
|
|
4
4
|
declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export * from "./Component-
|
|
5
|
+
export * from "./Component-69921c40";
|
|
6
6
|
export { NavigationBar };
|
|
@@ -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 };
|
|
@@ -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-16b1285a";
|
|
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 };
|
|
@@ -202,4 +202,4 @@ type CalendarDesktopProps = {
|
|
|
202
202
|
};
|
|
203
203
|
declare const CalendarDesktop: React.ForwardRefExoticComponent<CalendarDesktopProps & React.RefAttributes<HTMLDivElement>>;
|
|
204
204
|
export { HeaderProps, Header, MonthYearHeaderProps, MonthYearHeader, MonthsTableProps, MonthsTable, formatPeriod, getYearSelectorValue, shiftValues, YearsTableProps, YearsTable, CalendarDesktopProps, CalendarDesktop };
|
|
205
|
-
export * from "./Component-
|
|
205
|
+
export * from "./Component-69921c40";
|
|
@@ -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 };
|
package/{cssm/Component.responsive-2e2b2125.d.ts → modern/Component.responsive-0aa4e915.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ButtonProps } from "./typings-
|
|
3
|
+
import { ButtonProps } from "./typings-89f0cb07";
|
|
4
4
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
5
|
export { Button };
|
|
@@ -11,7 +11,7 @@ import { CalendarMIcon } from '@alfalab/icons-glyph/CalendarMIcon';
|
|
|
11
11
|
import { parseTimestampToDate, DATE_FORMAT, format, parseDateString, DATE_MASK, isCompleteDateInput, isValid } from '../../utils/format.js';
|
|
12
12
|
import 'date-fns/parse';
|
|
13
13
|
|
|
14
|
-
const styles = {"component":"date-range-
|
|
14
|
+
const styles = {"component":"date-range-input__component_1hqhh","calendarContainer":"date-range-input__calendarContainer_1hqhh","calendarResponsive":"date-range-input__calendarResponsive_1hqhh","block":"date-range-input__block_1hqhh","calendarIcon":"date-range-input__calendarIcon_1hqhh"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
/* eslint-disable no-useless-escape, jsx-a11y/click-events-have-key-events */
|
|
@@ -197,12 +197,13 @@ const DateRangeInput = React.forwardRef(({ className, inputClassName, popoverCla
|
|
|
197
197
|
return (React.createElement("div", { className: cn(styles.component, className, {
|
|
198
198
|
[styles.block]: block,
|
|
199
199
|
}), onFocus: inputDisabled ? undefined : handleInputWrapperFocus, onBlur: handleBlur },
|
|
200
|
-
InputComponent ? (React.createElement(InputComponent, { ...restProps, block: block, ref: mergeRefs([ref, inputRef]), value: value, onChange: handleChange, disabled: disabled, readOnly: readOnly, className: inputClassName, onClear: handleClear, disableUserInput: disableUserInput, rightAddons: React.createElement(React.Fragment, null,
|
|
200
|
+
InputComponent ? (React.createElement(InputComponent, { autoComplete: picker ? 'off' : undefined, ...restProps, block: block, ref: mergeRefs([ref, inputRef]), value: value, onChange: handleChange, disabled: disabled, readOnly: readOnly, className: inputClassName, onClear: handleClear, disableUserInput: disableUserInput, rightAddons: React.createElement(React.Fragment, null,
|
|
201
201
|
rightAddons,
|
|
202
202
|
picker && (React.createElement(IconButton, { className: styles.calendarIcon, ref: iconRef, onClick: inputDisabled ? undefined : handleIconButtonClick, icon: CalendarMIcon, size: 's' }))) })) : null,
|
|
203
|
-
picker &&
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
picker &&
|
|
204
|
+
(view === 'desktop' ? (React.createElement(Popover, { open: open, useAnchorWidth: useAnchorWidth, anchorElement: inputRef.current, popperClassName: cn(styles.calendarContainer, {
|
|
205
|
+
[styles.calendarResponsive]: calendarResponsive,
|
|
206
|
+
}), className: popoverClassName, position: popoverPosition, offset: [0, 8], withTransition: false, preventFlip: preventFlip, zIndex: zIndexPopover }, renderCalendar())) : (renderCalendar()))));
|
|
206
207
|
});
|
|
207
208
|
|
|
208
209
|
export { DateRangeInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1vwf3 */
|
|
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_1hqhh {
|
|
45
45
|
display: inline-block;
|
|
46
46
|
outline: none;
|
|
47
47
|
position: relative;
|
|
48
|
-
} .date-range-
|
|
48
|
+
} .date-range-input__calendarContainer_1hqhh {
|
|
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_1hqhh {
|
|
54
54
|
width: 100%;
|
|
55
55
|
min-width: 288px
|
|
56
56
|
}
|
|
57
|
-
} .date-range-
|
|
57
|
+
} .date-range-input__calendarResponsive_1hqhh {
|
|
58
58
|
width: var(--calendar-width);
|
|
59
|
-
} .date-range-
|
|
59
|
+
} .date-range-input__block_1hqhh {
|
|
60
60
|
width: 100%;
|
|
61
|
-
} .date-range-
|
|
61
|
+
} .date-range-input__calendarIcon_1hqhh {
|
|
62
62
|
margin-right: var(--gap-s-neg);
|
|
63
63
|
height: 100%;
|
|
64
64
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Component.desktop-
|
|
1
|
+
export * from "./Component.desktop-b5b4c59f";
|
|
2
2
|
export {};
|
|
@@ -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 };
|
|
@@ -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-date-range-input",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@alfalab/core-components-input": "^12.2.
|
|
39
|
-
"@alfalab/core-components-icon-button": "^6.3.
|
|
40
|
-
"@alfalab/core-components-calendar": "^7.0.
|
|
38
|
+
"@alfalab/core-components-input": "^12.2.1",
|
|
39
|
+
"@alfalab/core-components-icon-button": "^6.3.1",
|
|
40
|
+
"@alfalab/core-components-calendar": "^7.0.9",
|
|
41
41
|
"@alfalab/core-components-popover": "^6.1.0",
|
|
42
42
|
"@alfalab/hooks": "^1.13.0",
|
|
43
43
|
"@alfalab/icons-glyph": "^2.108.0",
|
|
@@ -458,6 +458,7 @@ export const DateRangeInput = React.forwardRef<HTMLInputElement, DateRangeInputP
|
|
|
458
458
|
>
|
|
459
459
|
{InputComponent ? (
|
|
460
460
|
<InputComponent
|
|
461
|
+
autoComplete={picker ? 'off' : undefined}
|
|
461
462
|
{...restProps}
|
|
462
463
|
block={block}
|
|
463
464
|
ref={mergeRefs([ref, inputRef])}
|
|
@@ -484,24 +485,27 @@ export const DateRangeInput = React.forwardRef<HTMLInputElement, DateRangeInputP
|
|
|
484
485
|
}
|
|
485
486
|
/>
|
|
486
487
|
) : null}
|
|
487
|
-
{picker &&
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
488
|
+
{picker &&
|
|
489
|
+
(view === 'desktop' ? (
|
|
490
|
+
<Popover
|
|
491
|
+
open={open}
|
|
492
|
+
useAnchorWidth={useAnchorWidth}
|
|
493
|
+
anchorElement={inputRef.current as HTMLElement}
|
|
494
|
+
popperClassName={cn(styles.calendarContainer, {
|
|
495
|
+
[styles.calendarResponsive]: calendarResponsive,
|
|
496
|
+
})}
|
|
497
|
+
className={popoverClassName}
|
|
498
|
+
position={popoverPosition}
|
|
499
|
+
offset={[0, 8]}
|
|
500
|
+
withTransition={false}
|
|
501
|
+
preventFlip={preventFlip}
|
|
502
|
+
zIndex={zIndexPopover}
|
|
503
|
+
>
|
|
504
|
+
{renderCalendar()}
|
|
505
|
+
</Popover>
|
|
506
|
+
) : (
|
|
507
|
+
renderCalendar()
|
|
508
|
+
))}
|
|
505
509
|
</div>
|
|
506
510
|
);
|
|
507
511
|
},
|
|
@@ -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 };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
-
type ButtonDesktopProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
-
declare const ButtonDesktop: React.ForwardRefExoticComponent<ButtonDesktopProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
-
export { ButtonDesktopProps, ButtonDesktop };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
-
type ButtonMobileProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
-
declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
-
export { ButtonMobileProps, ButtonMobile };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
-
type ButtonDesktopProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
-
declare const ButtonDesktop: React.ForwardRefExoticComponent<ButtonDesktopProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
-
export { ButtonDesktopProps, ButtonDesktop };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
-
type ButtonMobileProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
-
declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
-
export { ButtonMobileProps, ButtonMobile };
|
package/cssm/index-9211a437.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
-
type ButtonDesktopProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
-
declare const ButtonDesktop: React.ForwardRefExoticComponent<ButtonDesktopProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
-
export { ButtonDesktopProps, ButtonDesktop };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
-
type ButtonMobileProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
-
declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
-
export { ButtonMobileProps, ButtonMobile };
|
package/esm/index-9211a437.d.ts
DELETED
package/index-9211a437.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
-
type ButtonDesktopProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
-
declare const ButtonDesktop: React.ForwardRefExoticComponent<ButtonDesktopProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
-
export { ButtonDesktopProps, ButtonDesktop };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
-
type ButtonMobileProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
-
declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
-
export { ButtonMobileProps, ButtonMobile };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|