@alfalab/core-components-date-range-input 3.0.11 → 3.1.0
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.desktop.d.ts +4 -0
- package/Component.desktop.js +4 -0
- package/Component.mobile.d.ts +4 -0
- package/Component.mobile.js +4 -0
- package/Component.responsive.d.ts +4 -0
- package/Component.responsive.js +4 -0
- package/components/date-range-input/Component.d.ts +2 -2
- package/components/date-range-input/Component.js +6 -5
- package/components/date-range-input/index.css +7 -7
- package/cssm/Component.desktop.d.ts +4 -0
- package/cssm/Component.desktop.js +4 -0
- package/cssm/Component.mobile.d.ts +4 -0
- package/cssm/Component.mobile.js +4 -0
- package/cssm/Component.responsive.d.ts +4 -0
- package/cssm/Component.responsive.js +4 -0
- package/cssm/components/date-range-input/Component.d.ts +2 -2
- package/cssm/components/date-range-input/Component.js +5 -4
- package/cssm/desktop/index.d.ts +2 -0
- package/cssm/{desktop.js → desktop/index.js} +4 -4
- package/cssm/mobile/index.d.ts +2 -0
- package/cssm/{mobile.js → mobile/index.js} +4 -4
- package/desktop/index.d.ts +2 -0
- package/{desktop.js → desktop/index.js} +3 -3
- package/desktop/package.json +3 -0
- package/esm/Component.desktop.d.ts +4 -0
- package/esm/Component.desktop.js +4 -0
- package/esm/Component.mobile.d.ts +4 -0
- package/esm/Component.mobile.js +4 -0
- package/esm/Component.responsive.d.ts +4 -0
- package/esm/Component.responsive.js +4 -0
- package/esm/components/date-range-input/Component.d.ts +2 -2
- package/esm/components/date-range-input/Component.js +6 -5
- package/esm/components/date-range-input/index.css +7 -7
- package/esm/desktop/index.d.ts +2 -0
- package/esm/{desktop.js → desktop/index.js} +3 -3
- package/esm/mobile/index.d.ts +2 -0
- package/esm/{mobile.js → mobile/index.js} +3 -3
- package/mobile/index.d.ts +2 -0
- package/{mobile.js → mobile/index.js} +3 -3
- package/mobile/package.json +3 -0
- package/modern/Component.desktop.d.ts +4 -0
- package/modern/Component.desktop.js +4 -0
- package/modern/Component.mobile.d.ts +4 -0
- package/modern/Component.mobile.js +4 -0
- package/modern/Component.responsive.d.ts +4 -0
- package/modern/Component.responsive.js +4 -0
- package/modern/components/date-range-input/Component.d.ts +2 -2
- package/modern/components/date-range-input/Component.js +6 -5
- package/modern/components/date-range-input/index.css +7 -7
- package/modern/desktop/index.d.ts +2 -0
- package/modern/{desktop.js → desktop/index.js} +3 -3
- package/modern/mobile/index.d.ts +2 -0
- package/modern/{mobile.js → mobile/index.js} +3 -3
- package/package.json +4 -24
- package/src/Component.desktop.tsx +4 -0
- package/src/Component.mobile.tsx +4 -0
- package/src/Component.responsive.tsx +4 -0
- package/src/components/date-range-input/Component.tsx +22 -18
- package/src/desktop/index.ts +1 -0
- package/src/desktop/package.json +3 -0
- package/src/mobile/index.ts +1 -0
- package/src/mobile/package.json +3 -0
- package/Component-63dec22f.d.ts +0 -184
- package/Component-72308007.d.ts +0 -6
- package/Component-72dda473.d.ts +0 -53
- package/Component-b5b4c59f.d.ts +0 -388
- package/Component.desktop-2e2b2125.d.ts +0 -6
- package/Component.desktop-785df74d.d.ts +0 -6
- package/Component.desktop-b5b4c59f.d.ts +0 -205
- package/Component.mobile-755fbaa3.d.ts +0 -6
- package/Component.mobile-d7e9f69d.d.ts +0 -6
- package/Component.mobile-ebda875c.d.ts +0 -7
- package/Component.responsive-2e2b2125.d.ts +0 -5
- package/Component.responsive-785df74d.d.ts +0 -26
- package/cssm/Component-63dec22f.d.ts +0 -184
- package/cssm/Component-72308007.d.ts +0 -6
- package/cssm/Component-72dda473.d.ts +0 -53
- package/cssm/Component-b5b4c59f.d.ts +0 -388
- package/cssm/Component.desktop-2e2b2125.d.ts +0 -6
- package/cssm/Component.desktop-785df74d.d.ts +0 -6
- package/cssm/Component.desktop-b5b4c59f.d.ts +0 -205
- package/cssm/Component.mobile-755fbaa3.d.ts +0 -6
- package/cssm/Component.mobile-d7e9f69d.d.ts +0 -6
- package/cssm/Component.mobile-ebda875c.d.ts +0 -7
- package/cssm/Component.responsive-2e2b2125.d.ts +0 -5
- package/cssm/Component.responsive-785df74d.d.ts +0 -26
- package/cssm/desktop-63dec22f.d.ts +0 -2
- package/cssm/desktop.d.ts +0 -2
- package/cssm/index-3109f463.d.ts +0 -62
- package/cssm/index-72308007.d.ts +0 -54
- package/cssm/index-72dda473.d.ts +0 -12
- package/cssm/index-9211a437.d.ts +0 -2
- package/cssm/index-ebda875c.d.ts +0 -35
- package/cssm/index-f034f741.d.ts +0 -80
- package/cssm/mobile-c219f8ca.d.ts +0 -1
- package/cssm/mobile.d.ts +0 -2
- package/cssm/types-1b036d4b.d.ts +0 -13
- package/cssm/types-1c79e231.d.ts +0 -113
- package/cssm/typings-5684a67d.d.ts +0 -23
- package/cssm/typings-9211a437.d.ts +0 -95
- package/cssm/useCalendar-5684a67d.d.ts +0 -97
- package/cssm/useSkeleton-1b036d4b.d.ts +0 -40
- package/cssm/utils-5684a67d.d.ts +0 -88
- package/desktop-63dec22f.d.ts +0 -2
- package/desktop.d.ts +0 -2
- package/esm/Component-63dec22f.d.ts +0 -184
- package/esm/Component-72308007.d.ts +0 -297
- package/esm/Component-72dda473.d.ts +0 -53
- package/esm/Component-b5b4c59f.d.ts +0 -388
- package/esm/Component.desktop-2e2b2125.d.ts +0 -6
- package/esm/Component.desktop-785df74d.d.ts +0 -6
- package/esm/Component.desktop-b5b4c59f.d.ts +0 -198
- package/esm/Component.mobile-755fbaa3.d.ts +0 -6
- package/esm/Component.mobile-d7e9f69d.d.ts +0 -6
- package/esm/Component.mobile-ebda875c.d.ts +0 -7
- package/esm/Component.responsive-2e2b2125.d.ts +0 -5
- package/esm/Component.responsive-785df74d.d.ts +0 -26
- package/esm/desktop-63dec22f.d.ts +0 -2
- package/esm/desktop.d.ts +0 -2
- package/esm/index-3109f463.d.ts +0 -62
- package/esm/index-72308007.d.ts +0 -54
- package/esm/index-72dda473.d.ts +0 -12
- package/esm/index-9211a437.d.ts +0 -2
- package/esm/index-ebda875c.d.ts +0 -2
- package/esm/index-f034f741.d.ts +0 -83
- package/esm/mobile-c219f8ca.d.ts +0 -1
- package/esm/mobile.d.ts +0 -2
- package/esm/types-1b036d4b.d.ts +0 -13
- package/esm/types-1c79e231.d.ts +0 -113
- package/esm/typings-5684a67d.d.ts +0 -23
- package/esm/typings-9211a437.d.ts +0 -95
- package/esm/useCalendar-5684a67d.d.ts +0 -97
- package/esm/useSkeleton-1b036d4b.d.ts +0 -40
- package/esm/utils-5684a67d.d.ts +0 -88
- package/index-3109f463.d.ts +0 -62
- package/index-72308007.d.ts +0 -54
- package/index-72dda473.d.ts +0 -12
- package/index-9211a437.d.ts +0 -2
- package/index-ebda875c.d.ts +0 -35
- package/index-f034f741.d.ts +0 -80
- package/mobile-c219f8ca.d.ts +0 -1
- package/mobile.d.ts +0 -2
- package/modern/Component-63dec22f.d.ts +0 -184
- package/modern/Component-72308007.d.ts +0 -6
- package/modern/Component-72dda473.d.ts +0 -53
- package/modern/Component-b5b4c59f.d.ts +0 -388
- package/modern/Component.desktop-2e2b2125.d.ts +0 -6
- package/modern/Component.desktop-785df74d.d.ts +0 -6
- package/modern/Component.desktop-b5b4c59f.d.ts +0 -205
- package/modern/Component.mobile-755fbaa3.d.ts +0 -6
- package/modern/Component.mobile-d7e9f69d.d.ts +0 -6
- package/modern/Component.mobile-ebda875c.d.ts +0 -7
- package/modern/Component.responsive-2e2b2125.d.ts +0 -5
- package/modern/Component.responsive-785df74d.d.ts +0 -26
- package/modern/desktop-63dec22f.d.ts +0 -2
- package/modern/desktop.d.ts +0 -2
- package/modern/index-3109f463.d.ts +0 -62
- package/modern/index-72308007.d.ts +0 -54
- package/modern/index-72dda473.d.ts +0 -12
- package/modern/index-9211a437.d.ts +0 -2
- package/modern/index-ebda875c.d.ts +0 -35
- package/modern/index-f034f741.d.ts +0 -80
- package/modern/mobile-c219f8ca.d.ts +0 -1
- package/modern/mobile.d.ts +0 -2
- package/modern/types-1b036d4b.d.ts +0 -13
- package/modern/types-1c79e231.d.ts +0 -113
- package/modern/typings-5684a67d.d.ts +0 -23
- package/modern/typings-9211a437.d.ts +0 -95
- package/modern/useCalendar-5684a67d.d.ts +0 -97
- package/modern/useSkeleton-1b036d4b.d.ts +0 -40
- package/modern/utils-5684a67d.d.ts +0 -88
- package/src/desktop.ts +0 -1
- package/src/mobile.ts +0 -1
- package/types-1b036d4b.d.ts +0 -13
- package/types-1c79e231.d.ts +0 -113
- package/typings-5684a67d.d.ts +0 -23
- package/typings-9211a437.d.ts +0 -95
- package/useCalendar-5684a67d.d.ts +0 -97
- package/useSkeleton-1b036d4b.d.ts +0 -40
- package/utils-5684a67d.d.ts +0 -88
|
@@ -14,6 +14,10 @@ import '@alfalab/icons-glyph/CalendarMIcon';
|
|
|
14
14
|
import './utils/format.js';
|
|
15
15
|
import 'date-fns/parse';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated
|
|
19
|
+
* use UniversalDateInput instead
|
|
20
|
+
*/
|
|
17
21
|
const DateRangeInputMobile = forwardRef((props, ref) => (React.createElement(DateRangeInput, { InputComponent: InputMobile, Calendar: CalendarMobile, view: 'mobile', ...props, ref: ref })));
|
|
18
22
|
|
|
19
23
|
export { DateRangeInputMobile };
|
|
@@ -9,5 +9,9 @@ type DateRangeInputResponsiveProps = Omit<DateRangeInputProps, 'view' | 'picker'
|
|
|
9
9
|
breakpoint?: number;
|
|
10
10
|
};
|
|
11
11
|
type DateRangeInputMedia = 'desktop' | 'mobile';
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
* use UniversalDateInput instead
|
|
15
|
+
*/
|
|
12
16
|
declare const DateRangeInputResponsive: React.ForwardRefExoticComponent<DateRangeInputResponsiveProps & React.RefAttributes<HTMLInputElement>>;
|
|
13
17
|
export { DateRangeInputResponsiveProps, DateRangeInputMedia, DateRangeInputResponsive };
|
|
@@ -18,6 +18,10 @@ import 'date-fns/parse';
|
|
|
18
18
|
import '@alfalab/core-components-calendar/modern/mobile';
|
|
19
19
|
import '@alfalab/core-components-input/modern/mobile';
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated
|
|
23
|
+
* use UniversalDateInput instead
|
|
24
|
+
*/
|
|
21
25
|
const DateRangeInputResponsive = forwardRef(({ breakpoint = 1024, ...restProps }, ref) => {
|
|
22
26
|
const [view] = useMedia([
|
|
23
27
|
['mobile', `(max-width: ${breakpoint - 1}px)`],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ChangeEvent, ElementType } from "react";
|
|
4
|
-
import { CalendarDesktopProps } from "
|
|
5
|
-
import { CalendarMobileProps } from "
|
|
4
|
+
import { CalendarDesktopProps } from "@alfalab/core-components-calendar/desktop";
|
|
5
|
+
import { CalendarMobileProps } from "@alfalab/core-components-calendar/mobile";
|
|
6
6
|
import { InputProps } from "@alfalab/core-components-input";
|
|
7
7
|
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
8
8
|
type ConditionalProps = {
|
|
@@ -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_1soho","calendarContainer":"date-range-input__calendarContainer_1soho","calendarResponsive":"date-range-input__calendarResponsive_1soho","block":"date-range-input__block_1soho","calendarIcon":"date-range-input__calendarIcon_1soho"};
|
|
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: 1etz5 */
|
|
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_1soho {
|
|
45
45
|
display: inline-block;
|
|
46
46
|
outline: none;
|
|
47
47
|
position: relative;
|
|
48
|
-
} .date-range-
|
|
48
|
+
} .date-range-input__calendarContainer_1soho {
|
|
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_1soho {
|
|
54
54
|
width: 100%;
|
|
55
55
|
min-width: 288px
|
|
56
56
|
}
|
|
57
|
-
} .date-range-
|
|
57
|
+
} .date-range-input__calendarResponsive_1soho {
|
|
58
58
|
width: var(--calendar-width);
|
|
59
|
-
} .date-range-
|
|
59
|
+
} .date-range-input__block_1soho {
|
|
60
60
|
width: 100%;
|
|
61
|
-
} .date-range-
|
|
61
|
+
} .date-range-input__calendarIcon_1soho {
|
|
62
62
|
margin-right: var(--gap-s-neg);
|
|
63
63
|
height: 100%;
|
|
64
64
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { DateRangeInputDesktop } from '
|
|
1
|
+
export { DateRangeInputDesktop } from '../Component.desktop.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@alfalab/core-components-calendar/modern/desktop';
|
|
4
4
|
import '@alfalab/core-components-input/modern/desktop';
|
|
5
|
-
import '
|
|
5
|
+
import '../components/date-range-input/Component.js';
|
|
6
6
|
import 'react-merge-refs';
|
|
7
7
|
import 'classnames';
|
|
8
8
|
import 'date-fns/isValid';
|
|
@@ -12,5 +12,5 @@ import '@alfalab/core-components-icon-button/modern';
|
|
|
12
12
|
import '@alfalab/core-components-popover/modern';
|
|
13
13
|
import '@alfalab/hooks';
|
|
14
14
|
import '@alfalab/icons-glyph/CalendarMIcon';
|
|
15
|
-
import '
|
|
15
|
+
import '../utils/format.js';
|
|
16
16
|
import 'date-fns/parse';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { DateRangeInputMobile } from '
|
|
1
|
+
export { DateRangeInputMobile } from '../Component.mobile.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@alfalab/core-components-calendar/modern/mobile';
|
|
4
4
|
import '@alfalab/core-components-input/modern/mobile';
|
|
5
|
-
import '
|
|
5
|
+
import '../components/date-range-input/Component.js';
|
|
6
6
|
import 'react-merge-refs';
|
|
7
7
|
import 'classnames';
|
|
8
8
|
import 'date-fns/isValid';
|
|
@@ -12,5 +12,5 @@ import '@alfalab/core-components-icon-button/modern';
|
|
|
12
12
|
import '@alfalab/core-components-popover/modern';
|
|
13
13
|
import '@alfalab/hooks';
|
|
14
14
|
import '@alfalab/icons-glyph/CalendarMIcon';
|
|
15
|
-
import '
|
|
15
|
+
import '../utils/format.js';
|
|
16
16
|
import 'date-fns/parse';
|
package/package.json
CHANGED
|
@@ -1,31 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-date-range-input",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "./esm/index.js",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./esm/index.js",
|
|
12
|
-
"require": "./index.js"
|
|
13
|
-
},
|
|
14
|
-
"./mobile": {
|
|
15
|
-
"import": "./esm/mobile.js",
|
|
16
|
-
"require": "./mobile.js"
|
|
17
|
-
},
|
|
18
|
-
"./desktop": {
|
|
19
|
-
"import": "./esm/desktop.js",
|
|
20
|
-
"require": "./desktop.js"
|
|
21
|
-
},
|
|
22
|
-
"./esm": "./esm/index.js",
|
|
23
|
-
"./cssm": "./cssm/index.js",
|
|
24
|
-
"./modern": "./modern/index.js",
|
|
25
|
-
"./esm/*": "./esm/*",
|
|
26
|
-
"./cssm/*": "./cssm/*",
|
|
27
|
-
"./modern/*": "./modern/*"
|
|
28
|
-
},
|
|
29
9
|
"publishConfig": {
|
|
30
10
|
"access": "public",
|
|
31
11
|
"directory": "dist"
|
|
@@ -35,9 +15,9 @@
|
|
|
35
15
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
36
16
|
},
|
|
37
17
|
"dependencies": {
|
|
38
|
-
"@alfalab/core-components-input": "^12.
|
|
39
|
-
"@alfalab/core-components-icon-button": "^6.3.
|
|
40
|
-
"@alfalab/core-components-calendar": "^7.0
|
|
18
|
+
"@alfalab/core-components-input": "^12.3.0",
|
|
19
|
+
"@alfalab/core-components-icon-button": "^6.3.2",
|
|
20
|
+
"@alfalab/core-components-calendar": "^7.1.0",
|
|
41
21
|
"@alfalab/core-components-popover": "^6.1.0",
|
|
42
22
|
"@alfalab/hooks": "^1.13.0",
|
|
43
23
|
"@alfalab/icons-glyph": "^2.108.0",
|
|
@@ -17,6 +17,10 @@ export type DateRangeInputDesktopProps = Omit<
|
|
|
17
17
|
> &
|
|
18
18
|
ConditionalProps;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated
|
|
22
|
+
* use UniversalDateInput instead
|
|
23
|
+
*/
|
|
20
24
|
export const DateRangeInputDesktop = forwardRef<HTMLInputElement, DateRangeInputDesktopProps>(
|
|
21
25
|
(props, ref) => (
|
|
22
26
|
<DateRangeInput
|
package/src/Component.mobile.tsx
CHANGED
|
@@ -17,6 +17,10 @@ export type DateRangeInputMobileProps = Omit<
|
|
|
17
17
|
> &
|
|
18
18
|
ConditionalProps;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated
|
|
22
|
+
* use UniversalDateInput instead
|
|
23
|
+
*/
|
|
20
24
|
export const DateRangeInputMobile = forwardRef<HTMLInputElement, DateRangeInputMobileProps>(
|
|
21
25
|
(props, ref) => (
|
|
22
26
|
<DateRangeInput
|
|
@@ -22,6 +22,10 @@ export type DateRangeInputResponsiveProps = Omit<
|
|
|
22
22
|
|
|
23
23
|
export type DateRangeInputMedia = 'desktop' | 'mobile';
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated
|
|
27
|
+
* use UniversalDateInput instead
|
|
28
|
+
*/
|
|
25
29
|
export const DateRangeInputResponsive = forwardRef<HTMLInputElement, DateRangeInputResponsiveProps>(
|
|
26
30
|
({ breakpoint = 1024, ...restProps }, ref) => {
|
|
27
31
|
const [view] = useMedia<DateRangeInputMedia>(
|
|
@@ -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
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../Component.desktop';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../Component.mobile';
|
package/Component-63dec22f.d.ts
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
|
|
4
|
-
import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
|
|
5
|
-
declare const colors: readonly [
|
|
6
|
-
"tertiary",
|
|
7
|
-
"disabled",
|
|
8
|
-
"accent",
|
|
9
|
-
"primary",
|
|
10
|
-
"attention",
|
|
11
|
-
"positive",
|
|
12
|
-
"secondary",
|
|
13
|
-
"tertiary-inverted",
|
|
14
|
-
"primary-inverted",
|
|
15
|
-
"secondary-inverted",
|
|
16
|
-
"link",
|
|
17
|
-
"negative",
|
|
18
|
-
"static-primary-light",
|
|
19
|
-
"static-secondary-light",
|
|
20
|
-
"static-tertiary-light",
|
|
21
|
-
"static-primary-dark",
|
|
22
|
-
"static-secondary-dark",
|
|
23
|
-
"static-tertiary-dark",
|
|
24
|
-
"static-accent"
|
|
25
|
-
];
|
|
26
|
-
type Color = (typeof colors)[number];
|
|
27
|
-
type NativeProps = HTMLAttributes<HTMLSpanElement>;
|
|
28
|
-
type TextBaseProps = {
|
|
29
|
-
/**
|
|
30
|
-
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
|
|
31
|
-
*/
|
|
32
|
-
view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps";
|
|
33
|
-
/**
|
|
34
|
-
* Цвет текста
|
|
35
|
-
*/
|
|
36
|
-
color?: Color;
|
|
37
|
-
/**
|
|
38
|
-
* Толщина шрифта
|
|
39
|
-
*/
|
|
40
|
-
weight?: "regular" | "medium" | "bold";
|
|
41
|
-
/**
|
|
42
|
-
* Делает цифры моноширинными
|
|
43
|
-
*/
|
|
44
|
-
monospaceNumbers?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* HTML тег
|
|
47
|
-
*/
|
|
48
|
-
tag?: "span" | "div";
|
|
49
|
-
/**
|
|
50
|
-
* Css-класс для стилизации (native prop)
|
|
51
|
-
*/
|
|
52
|
-
className?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Id компонента для тестов
|
|
55
|
-
*/
|
|
56
|
-
dataTestId?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Контент (native prop)
|
|
59
|
-
*/
|
|
60
|
-
children?: React.ReactNode;
|
|
61
|
-
/**
|
|
62
|
-
* Добавляет отступы к тэгу 'p'
|
|
63
|
-
*/
|
|
64
|
-
defaultMargins?: never;
|
|
65
|
-
/**
|
|
66
|
-
* Количество строк (не поддерживает IE)
|
|
67
|
-
*/
|
|
68
|
-
rowLimit?: 1 | 2 | 3;
|
|
69
|
-
/**
|
|
70
|
-
* Показать скелетон
|
|
71
|
-
*/
|
|
72
|
-
showSkeleton?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Пропы для скелетона
|
|
75
|
-
*/
|
|
76
|
-
skeletonProps?: TextSkeletonProps;
|
|
77
|
-
};
|
|
78
|
-
type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
|
|
79
|
-
tag?: "p";
|
|
80
|
-
defaultMargins?: boolean;
|
|
81
|
-
};
|
|
82
|
-
type TextProps = Omit<NativeProps, "color"> & (TextBaseProps | TextPTagProps);
|
|
83
|
-
type NativeProps$0 = HTMLAttributes<HTMLHeadingElement>;
|
|
84
|
-
type TitleProps = Omit<NativeProps$0, "color"> & {
|
|
85
|
-
/**
|
|
86
|
-
* HTML тег
|
|
87
|
-
*/
|
|
88
|
-
tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
|
|
89
|
-
/**
|
|
90
|
-
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
|
|
91
|
-
*/
|
|
92
|
-
view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
|
|
93
|
-
/**
|
|
94
|
-
* Цвет текста
|
|
95
|
-
*/
|
|
96
|
-
color?: Color;
|
|
97
|
-
/**
|
|
98
|
-
* Толщина шрифта
|
|
99
|
-
*/
|
|
100
|
-
weight?: "regular" | "medium" | "bold";
|
|
101
|
-
/**
|
|
102
|
-
* Шрифт текста
|
|
103
|
-
*/
|
|
104
|
-
font?: "styrene" | "system";
|
|
105
|
-
/**
|
|
106
|
-
* Добавляет отступы
|
|
107
|
-
*/
|
|
108
|
-
defaultMargins?: boolean;
|
|
109
|
-
/**
|
|
110
|
-
* Css-класс для стилизации (native prop)
|
|
111
|
-
*/
|
|
112
|
-
className?: string;
|
|
113
|
-
/**
|
|
114
|
-
* Id компонента для тестов
|
|
115
|
-
*/
|
|
116
|
-
dataTestId?: string;
|
|
117
|
-
/**
|
|
118
|
-
* Контент (native prop)
|
|
119
|
-
*/
|
|
120
|
-
children?: React.ReactNode;
|
|
121
|
-
/**
|
|
122
|
-
* Количество строк (не поддерживает IE)
|
|
123
|
-
*/
|
|
124
|
-
rowLimit?: 1 | 2 | 3;
|
|
125
|
-
/**
|
|
126
|
-
* Показать скелетон
|
|
127
|
-
*/
|
|
128
|
-
showSkeleton?: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* Пропы для скелетона
|
|
131
|
-
*/
|
|
132
|
-
skeletonProps?: TextSkeletonProps;
|
|
133
|
-
};
|
|
134
|
-
type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
|
|
135
|
-
declare const Typography: {
|
|
136
|
-
Title: FC<TitleProps>;
|
|
137
|
-
Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
|
|
138
|
-
TitleResponsive: FC<TitleProps>;
|
|
139
|
-
TitleMobile: FC<TitleMobileProps>;
|
|
140
|
-
};
|
|
141
|
-
declare const typographyPresets: {
|
|
142
|
-
mobile: {
|
|
143
|
-
list: {
|
|
144
|
-
text: {
|
|
145
|
-
primary: {
|
|
146
|
-
tag: string;
|
|
147
|
-
view: string;
|
|
148
|
-
};
|
|
149
|
-
secondary: {
|
|
150
|
-
tag: string;
|
|
151
|
-
color: string;
|
|
152
|
-
view: string;
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
declare const TitleResponsive: FC<TitleProps>;
|
|
159
|
-
interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
160
|
-
/**
|
|
161
|
-
* Текст после иконки
|
|
162
|
-
*/
|
|
163
|
-
text?: string;
|
|
164
|
-
/**
|
|
165
|
-
* Дополнительный класс
|
|
166
|
-
*/
|
|
167
|
-
className?: string;
|
|
168
|
-
/**
|
|
169
|
-
* Вид компонента
|
|
170
|
-
*/
|
|
171
|
-
view: 'mobile' | 'desktop';
|
|
172
|
-
/**
|
|
173
|
-
* Прозрачность текста
|
|
174
|
-
*/
|
|
175
|
-
textOpacity?: number;
|
|
176
|
-
/**
|
|
177
|
-
* Обработчик клика
|
|
178
|
-
*/
|
|
179
|
-
onClick?: () => void;
|
|
180
|
-
}
|
|
181
|
-
declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
|
|
182
|
-
export { Typography, typographyPresets, TitleResponsive, BackArrowAddonProps, BackArrowAddon };
|
|
183
|
-
export type { TitleProps, TextProps, Color };
|
|
184
|
-
export * from "./useSkeleton-1b036d4b";
|
package/Component-72308007.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { NavigationBarProps } from "./types-1c79e231";
|
|
4
|
-
declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export * from "./Component-63dec22f";
|
|
6
|
-
export { NavigationBar };
|
package/Component-72dda473.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { BackgroundColorType, GraphicColorType } from "./index-72dda473";
|
|
4
|
-
type IconColorType = Extract<GraphicColorType, 'positive' | 'attention' | 'link' | 'negative' | 'tertiary' | 'secondary' | 'primary'>;
|
|
5
|
-
type BadgeProps = {
|
|
6
|
-
/**
|
|
7
|
-
* Дополнительный класс
|
|
8
|
-
*/
|
|
9
|
-
className?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Вид компонента
|
|
12
|
-
*/
|
|
13
|
-
view: 'icon' | 'count';
|
|
14
|
-
/**
|
|
15
|
-
* Размер компонента (только для view=icon)
|
|
16
|
-
* //deprecated(используйте height для view=count )
|
|
17
|
-
*/
|
|
18
|
-
size?: 's' | 'm' | 'l' | 'xl';
|
|
19
|
-
/**
|
|
20
|
-
* Видимость белой обводки вокруг иконки
|
|
21
|
-
*/
|
|
22
|
-
visibleIconOutline?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Видимость цветной обводки вокруг иконки (только для view=icon)
|
|
25
|
-
*/
|
|
26
|
-
visibleColorOutline?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Контент компонента
|
|
29
|
-
*/
|
|
30
|
-
content?: React.ReactElement | number;
|
|
31
|
-
/**
|
|
32
|
-
* Высота компонента, min = 16; max = 48 (только для view=count)
|
|
33
|
-
*/
|
|
34
|
-
height?: number;
|
|
35
|
-
/**
|
|
36
|
-
* Цветовое оформление бейджа при view='count'
|
|
37
|
-
*/
|
|
38
|
-
color?: Extract<BackgroundColorType, 'accent' | 'primary' | 'specialbg-secondary-transparent'>;
|
|
39
|
-
/**
|
|
40
|
-
* Цветовое оформление бейджа при view='icon'
|
|
41
|
-
*/
|
|
42
|
-
iconColor?: IconColorType;
|
|
43
|
-
/**
|
|
44
|
-
* Цвет подложки под иконкой
|
|
45
|
-
*/
|
|
46
|
-
iconUnderlayColor?: Extract<GraphicColorType, 'primary' | 'static-light'>;
|
|
47
|
-
/**
|
|
48
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
49
|
-
*/
|
|
50
|
-
dataTestId?: string;
|
|
51
|
-
};
|
|
52
|
-
declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, color, iconUnderlayColor, dataTestId, }: BadgeProps) => React.JSX.Element;
|
|
53
|
-
export { IconColorType, BadgeProps, Badge };
|