@alfalab/core-components-date-range-input 3.0.3 → 3.0.5
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/components/date-range-input/Component.js +2 -2
- package/components/date-range-input/index.css +7 -7
- package/cssm/components/date-range-input/Component.js +1 -1
- package/{esm/index-50136800.d.ts → cssm/index-2abb571d.d.ts} +5 -1
- package/esm/components/date-range-input/Component.js +2 -2
- package/esm/components/date-range-input/index.css +7 -7
- package/{index-50136800.d.ts → esm/index-2abb571d.d.ts} +5 -1
- package/{cssm/index-50136800.d.ts → index-2abb571d.d.ts} +5 -1
- package/modern/components/date-range-input/Component.js +2 -2
- package/modern/components/date-range-input/index.css +7 -7
- package/modern/{index-50136800.d.ts → index-2abb571d.d.ts} +5 -1
- package/package.json +4 -4
- package/src/components/date-range-input/Component.tsx +1 -1
- /package/{Component-50136800.d.ts → Component-2abb571d.d.ts} +0 -0
- /package/cssm/{Component-50136800.d.ts → Component-2abb571d.d.ts} +0 -0
- /package/esm/{Component-50136800.d.ts → Component-2abb571d.d.ts} +0 -0
- /package/modern/{Component-50136800.d.ts → Component-2abb571d.d.ts} +0 -0
|
@@ -23,7 +23,7 @@ var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
|
23
23
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
24
24
|
var dateFnsIsValid__default = /*#__PURE__*/_interopDefaultCompat(dateFnsIsValid);
|
|
25
25
|
|
|
26
|
-
var styles = {"component":"date-range-
|
|
26
|
+
var styles = {"component":"date-range-input__component_184ip","calendarContainer":"date-range-input__calendarContainer_184ip","calendarResponsive":"date-range-input__calendarResponsive_184ip","block":"date-range-input__block_184ip","calendarIcon":"date-range-input__calendarIcon_184ip"};
|
|
27
27
|
require('./index.css')
|
|
28
28
|
|
|
29
29
|
var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
@@ -118,7 +118,7 @@ var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
|
118
118
|
};
|
|
119
119
|
var handleInputKeyDown = function (event) {
|
|
120
120
|
var isCopy = (event.metaKey || event.ctrlKey) && event.key === 'c';
|
|
121
|
-
if (disableUserInput && !isCopy) {
|
|
121
|
+
if (disableUserInput && !isCopy && event.key !== 'Tab') {
|
|
122
122
|
event.preventDefault();
|
|
123
123
|
}
|
|
124
124
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 9bgzg */
|
|
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_184ip {
|
|
45
45
|
display: inline-block;
|
|
46
46
|
outline: none;
|
|
47
47
|
position: relative;
|
|
48
|
-
} .date-range-
|
|
48
|
+
} .date-range-input__calendarContainer_184ip {
|
|
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_184ip {
|
|
54
54
|
width: 100%;
|
|
55
55
|
min-width: 288px
|
|
56
56
|
}
|
|
57
|
-
} .date-range-
|
|
57
|
+
} .date-range-input__calendarResponsive_184ip {
|
|
58
58
|
width: var(--calendar-width);
|
|
59
|
-
} .date-range-
|
|
59
|
+
} .date-range-input__block_184ip {
|
|
60
60
|
width: 100%;
|
|
61
|
-
} .date-range-
|
|
61
|
+
} .date-range-input__calendarIcon_184ip {
|
|
62
62
|
margin-right: var(--gap-s-neg);
|
|
63
63
|
height: 100%;
|
|
64
64
|
}
|
|
@@ -117,7 +117,7 @@ var DateRangeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
|
117
117
|
};
|
|
118
118
|
var handleInputKeyDown = function (event) {
|
|
119
119
|
var isCopy = (event.metaKey || event.ctrlKey) && event.key === 'c';
|
|
120
|
-
if (disableUserInput && !isCopy) {
|
|
120
|
+
if (disableUserInput && !isCopy && event.key !== 'Tab') {
|
|
121
121
|
event.preventDefault();
|
|
122
122
|
}
|
|
123
123
|
};
|
|
@@ -8,4 +8,8 @@ declare function easeInOutQuad(x: number): number;
|
|
|
8
8
|
declare const easingFns: {
|
|
9
9
|
easeInOutQuad: typeof easeInOutQuad;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
|
|
12
|
+
declare const inputUtils: {
|
|
13
|
+
disableUserInput: typeof disableUserInput;
|
|
14
|
+
};
|
|
15
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils };
|
|
@@ -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_184ip","calendarContainer":"date-range-input__calendarContainer_184ip","calendarResponsive":"date-range-input__calendarResponsive_184ip","block":"date-range-input__block_184ip","calendarIcon":"date-range-input__calendarIcon_184ip"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
var DateRangeInput = React.forwardRef(function (_a, ref) {
|
|
@@ -107,7 +107,7 @@ var DateRangeInput = React.forwardRef(function (_a, ref) {
|
|
|
107
107
|
};
|
|
108
108
|
var handleInputKeyDown = function (event) {
|
|
109
109
|
var isCopy = (event.metaKey || event.ctrlKey) && event.key === 'c';
|
|
110
|
-
if (disableUserInput && !isCopy) {
|
|
110
|
+
if (disableUserInput && !isCopy && event.key !== 'Tab') {
|
|
111
111
|
event.preventDefault();
|
|
112
112
|
}
|
|
113
113
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 9bgzg */
|
|
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_184ip {
|
|
45
45
|
display: inline-block;
|
|
46
46
|
outline: none;
|
|
47
47
|
position: relative;
|
|
48
|
-
} .date-range-
|
|
48
|
+
} .date-range-input__calendarContainer_184ip {
|
|
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_184ip {
|
|
54
54
|
width: 100%;
|
|
55
55
|
min-width: 288px
|
|
56
56
|
}
|
|
57
|
-
} .date-range-
|
|
57
|
+
} .date-range-input__calendarResponsive_184ip {
|
|
58
58
|
width: var(--calendar-width);
|
|
59
|
-
} .date-range-
|
|
59
|
+
} .date-range-input__block_184ip {
|
|
60
60
|
width: 100%;
|
|
61
|
-
} .date-range-
|
|
61
|
+
} .date-range-input__calendarIcon_184ip {
|
|
62
62
|
margin-right: var(--gap-s-neg);
|
|
63
63
|
height: 100%;
|
|
64
64
|
}
|
|
@@ -8,4 +8,8 @@ declare function easeInOutQuad(x: number): number;
|
|
|
8
8
|
declare const easingFns: {
|
|
9
9
|
easeInOutQuad: typeof easeInOutQuad;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
|
|
12
|
+
declare const inputUtils: {
|
|
13
|
+
disableUserInput: typeof disableUserInput;
|
|
14
|
+
};
|
|
15
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils };
|
|
@@ -8,4 +8,8 @@ declare function easeInOutQuad(x: number): number;
|
|
|
8
8
|
declare const easingFns: {
|
|
9
9
|
easeInOutQuad: typeof easeInOutQuad;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
|
|
12
|
+
declare const inputUtils: {
|
|
13
|
+
disableUserInput: typeof disableUserInput;
|
|
14
|
+
};
|
|
15
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils };
|
|
@@ -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_184ip","calendarContainer":"date-range-input__calendarContainer_184ip","calendarResponsive":"date-range-input__calendarResponsive_184ip","block":"date-range-input__block_184ip","calendarIcon":"date-range-input__calendarIcon_184ip"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
/* eslint-disable no-useless-escape, jsx-a11y/click-events-have-key-events */
|
|
@@ -103,7 +103,7 @@ const DateRangeInput = React.forwardRef(({ className, inputClassName, popoverCla
|
|
|
103
103
|
};
|
|
104
104
|
const handleInputKeyDown = (event) => {
|
|
105
105
|
const isCopy = (event.metaKey || event.ctrlKey) && event.key === 'c';
|
|
106
|
-
if (disableUserInput && !isCopy) {
|
|
106
|
+
if (disableUserInput && !isCopy && event.key !== 'Tab') {
|
|
107
107
|
event.preventDefault();
|
|
108
108
|
}
|
|
109
109
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 9bgzg */
|
|
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_184ip {
|
|
45
45
|
display: inline-block;
|
|
46
46
|
outline: none;
|
|
47
47
|
position: relative;
|
|
48
|
-
} .date-range-
|
|
48
|
+
} .date-range-input__calendarContainer_184ip {
|
|
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_184ip {
|
|
54
54
|
width: 100%;
|
|
55
55
|
min-width: 288px
|
|
56
56
|
}
|
|
57
|
-
} .date-range-
|
|
57
|
+
} .date-range-input__calendarResponsive_184ip {
|
|
58
58
|
width: var(--calendar-width);
|
|
59
|
-
} .date-range-
|
|
59
|
+
} .date-range-input__block_184ip {
|
|
60
60
|
width: 100%;
|
|
61
|
-
} .date-range-
|
|
61
|
+
} .date-range-input__calendarIcon_184ip {
|
|
62
62
|
margin-right: var(--gap-s-neg);
|
|
63
63
|
height: 100%;
|
|
64
64
|
}
|
|
@@ -8,4 +8,8 @@ declare function easeInOutQuad(x: number): number;
|
|
|
8
8
|
declare const easingFns: {
|
|
9
9
|
easeInOutQuad: typeof easeInOutQuad;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
|
|
12
|
+
declare const inputUtils: {
|
|
13
|
+
disableUserInput: typeof disableUserInput;
|
|
14
|
+
};
|
|
15
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils };
|
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.5",
|
|
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.0
|
|
39
|
-
"@alfalab/core-components-icon-button": "^6.2.
|
|
40
|
-
"@alfalab/core-components-calendar": "^7.0.
|
|
38
|
+
"@alfalab/core-components-input": "^12.1.0",
|
|
39
|
+
"@alfalab/core-components-icon-button": "^6.2.3",
|
|
40
|
+
"@alfalab/core-components-calendar": "^7.0.4",
|
|
41
41
|
"@alfalab/core-components-popover": "^6.1.0",
|
|
42
42
|
"@alfalab/hooks": "^1.13.0",
|
|
43
43
|
"@alfalab/icons-glyph": "^2.108.0",
|
|
@@ -319,7 +319,7 @@ export const DateRangeInput = React.forwardRef<HTMLInputElement, DateRangeInputP
|
|
|
319
319
|
const handleInputKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {
|
|
320
320
|
const isCopy = (event.metaKey || event.ctrlKey) && event.key === 'c';
|
|
321
321
|
|
|
322
|
-
if (disableUserInput && !isCopy) {
|
|
322
|
+
if (disableUserInput && !isCopy && event.key !== 'Tab') {
|
|
323
323
|
event.preventDefault();
|
|
324
324
|
}
|
|
325
325
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|