@alfalab/core-components-calendar-input 9.0.12 → 10.0.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/calendar-input/Component.d.ts +2 -2
- package/components/calendar-input/Component.js +8 -2
- package/components/calendar-input/index.css +14 -14
- 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/calendar-input/Component.d.ts +2 -2
- package/cssm/components/calendar-input/Component.js +7 -1
- package/cssm/components/calendar-input/index.module.css +3 -3
- 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/cssm/shared/index.d.ts +1 -0
- package/cssm/{shared.js → shared/index.js} +1 -1
- 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/calendar-input/Component.d.ts +2 -2
- package/esm/components/calendar-input/Component.js +8 -2
- package/esm/components/calendar-input/index.css +14 -14
- 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/esm/shared/index.d.ts +1 -0
- package/esm/{shared.js → shared/index.js} +1 -1
- 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/calendar-input/Component.d.ts +2 -2
- package/modern/components/calendar-input/Component.js +6 -2
- package/modern/components/calendar-input/index.css +14 -14
- 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/modern/shared/index.d.ts +1 -0
- package/modern/{shared.js → shared/index.js} +1 -1
- package/package.json +3 -27
- package/shared/index.d.ts +1 -0
- package/{shared.js → shared/index.js} +1 -1
- package/shared/package.json +3 -0
- package/src/Component.desktop.tsx +4 -0
- package/src/Component.mobile.tsx +4 -0
- package/src/Component.responsive.tsx +4 -0
- package/src/components/calendar-input/Component.tsx +5 -1
- package/src/components/calendar-input/index.module.css +1 -1
- 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/src/shared/index.ts +1 -0
- package/src/shared/package.json +3 -0
- package/Component-10db897e.d.ts +0 -6
- package/Component-69921c40.d.ts +0 -184
- package/Component-89f0cb07.d.ts +0 -38
- package/Component-b5b4c59f.d.ts +0 -389
- package/Component-ebda875c.d.ts +0 -35
- package/Component.desktop-0aa4e915.d.ts +0 -5
- package/Component.desktop-b5b4c59f.d.ts +0 -205
- package/Component.mobile-16b1285a.d.ts +0 -5
- package/Component.responsive-0aa4e915.d.ts +0 -66
- package/cssm/Component-10db897e.d.ts +0 -6
- package/cssm/Component-69921c40.d.ts +0 -184
- package/cssm/Component-89f0cb07.d.ts +0 -38
- package/cssm/Component-b5b4c59f.d.ts +0 -389
- package/cssm/Component-ebda875c.d.ts +0 -35
- package/cssm/Component.desktop-0aa4e915.d.ts +0 -5
- package/cssm/Component.desktop-b5b4c59f.d.ts +0 -205
- package/cssm/Component.mobile-16b1285a.d.ts +0 -5
- package/cssm/Component.responsive-0aa4e915.d.ts +0 -66
- package/cssm/desktop-63dec22f.d.ts +0 -2
- package/cssm/desktop-69921c40.d.ts +0 -2
- package/cssm/desktop.d.ts +0 -2
- package/cssm/index-10db897e.d.ts +0 -55
- package/cssm/index-89f0cb07.d.ts +0 -2
- package/cssm/index-ebda875c.d.ts +0 -2
- 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/shared-f034f741.d.ts +0 -35
- package/cssm/shared.d.ts +0 -1
- 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-89f0cb07.d.ts +0 -93
- 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-69921c40.d.ts +0 -2
- package/desktop.d.ts +0 -2
- package/esm/Component-10db897e.d.ts +0 -6
- package/esm/Component-69921c40.d.ts +0 -184
- package/esm/Component-89f0cb07.d.ts +0 -38
- package/esm/Component-b5b4c59f.d.ts +0 -389
- package/esm/Component-ebda875c.d.ts +0 -35
- package/esm/Component.desktop-0aa4e915.d.ts +0 -5
- package/esm/Component.desktop-b5b4c59f.d.ts +0 -205
- package/esm/Component.mobile-16b1285a.d.ts +0 -5
- package/esm/Component.responsive-0aa4e915.d.ts +0 -66
- package/esm/desktop-63dec22f.d.ts +0 -2
- package/esm/desktop-69921c40.d.ts +0 -2
- package/esm/desktop.d.ts +0 -2
- package/esm/index-10db897e.d.ts +0 -55
- package/esm/index-89f0cb07.d.ts +0 -2
- package/esm/index-ebda875c.d.ts +0 -2
- package/esm/index-f034f741.d.ts +0 -80
- package/esm/mobile-c219f8ca.d.ts +0 -1
- package/esm/mobile.d.ts +0 -2
- package/esm/shared-f034f741.d.ts +0 -35
- package/esm/shared.d.ts +0 -1
- 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-89f0cb07.d.ts +0 -93
- 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-10db897e.d.ts +0 -55
- package/index-89f0cb07.d.ts +0 -2
- package/index-ebda875c.d.ts +0 -2
- package/index-f034f741.d.ts +0 -80
- package/mobile-c219f8ca.d.ts +0 -1
- package/mobile.d.ts +0 -2
- package/modern/Component-10db897e.d.ts +0 -6
- package/modern/Component-69921c40.d.ts +0 -184
- package/modern/Component-89f0cb07.d.ts +0 -38
- package/modern/Component-b5b4c59f.d.ts +0 -389
- package/modern/Component-ebda875c.d.ts +0 -35
- package/modern/Component.desktop-0aa4e915.d.ts +0 -5
- package/modern/Component.desktop-b5b4c59f.d.ts +0 -205
- package/modern/Component.mobile-16b1285a.d.ts +0 -5
- package/modern/Component.responsive-0aa4e915.d.ts +0 -66
- package/modern/desktop-63dec22f.d.ts +0 -2
- package/modern/desktop-69921c40.d.ts +0 -2
- package/modern/desktop.d.ts +0 -2
- package/modern/index-10db897e.d.ts +0 -55
- package/modern/index-89f0cb07.d.ts +0 -2
- package/modern/index-ebda875c.d.ts +0 -2
- 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/shared-f034f741.d.ts +0 -35
- package/modern/shared.d.ts +0 -1
- 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-89f0cb07.d.ts +0 -93
- 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/shared-f034f741.d.ts +0 -35
- package/shared.d.ts +0 -1
- package/src/desktop.ts +0 -1
- package/src/mobile.ts +0 -1
- package/src/shared.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-89f0cb07.d.ts +0 -93
- package/useCalendar-5684a67d.d.ts +0 -97
- package/useSkeleton-1b036d4b.d.ts +0 -40
- package/utils-5684a67d.d.ts +0 -88
package/Component.desktop.d.ts
CHANGED
|
@@ -2,5 +2,9 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CalendarInputProps } from "./components/calendar-input/Component";
|
|
4
4
|
type CalendarInputDesktopProps = Omit<CalendarInputProps, 'view'>;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
* use UniversalDateInput instead
|
|
8
|
+
*/
|
|
5
9
|
declare const CalendarInputDesktop: React.ForwardRefExoticComponent<CalendarInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
10
|
export { CalendarInputDesktopProps, CalendarInputDesktop };
|
package/Component.desktop.js
CHANGED
|
@@ -21,6 +21,10 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
21
21
|
|
|
22
22
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
* use UniversalDateInput instead
|
|
27
|
+
*/
|
|
24
28
|
var CalendarInputDesktop = React.forwardRef(function (props, ref) { return React__default.default.createElement(components_calendarInput_Component.CalendarInput, tslib.__assign({ Calendar: desktop.CalendarDesktop }, props, { ref: ref })); });
|
|
25
29
|
|
|
26
30
|
exports.CalendarInputDesktop = CalendarInputDesktop;
|
package/Component.mobile.d.ts
CHANGED
|
@@ -2,5 +2,9 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CalendarInputProps } from "./components/calendar-input/Component";
|
|
4
4
|
type CalendarInputMobileProps = Omit<CalendarInputProps, 'view'>;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
* use UniversalDateInput instead
|
|
8
|
+
*/
|
|
5
9
|
declare const CalendarInputMobile: React.ForwardRefExoticComponent<CalendarInputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
10
|
export { CalendarInputMobileProps, CalendarInputMobile };
|
package/Component.mobile.js
CHANGED
|
@@ -21,6 +21,10 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
21
21
|
|
|
22
22
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
* use UniversalDateInput instead
|
|
27
|
+
*/
|
|
24
28
|
var CalendarInputMobile = React.forwardRef(function (props, ref) { return React__default.default.createElement(components_calendarInput_Component.CalendarInput, tslib.__assign({ Calendar: mobile.CalendarMobile, view: 'mobile' }, props, { ref: ref })); });
|
|
25
29
|
|
|
26
30
|
exports.CalendarInputMobile = CalendarInputMobile;
|
|
@@ -9,6 +9,10 @@ type CalendarInputResponsiveProps = Omit<CalendarInputProps, 'view'> & {
|
|
|
9
9
|
breakpoint?: number;
|
|
10
10
|
};
|
|
11
11
|
type CalendarInputMedia = 'desktop' | 'mobile';
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
* use UniversalDateInput instead
|
|
15
|
+
*/
|
|
12
16
|
declare const CalendarInputResponsive: React.ForwardRefExoticComponent<Omit<CalendarInputProps, "view"> & {
|
|
13
17
|
/**
|
|
14
18
|
* Контрольная точка, с нее начинается desktop версия
|
package/Component.responsive.js
CHANGED
|
@@ -25,6 +25,10 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
25
25
|
|
|
26
26
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated
|
|
30
|
+
* use UniversalDateInput instead
|
|
31
|
+
*/
|
|
28
32
|
var CalendarInputResponsive = React.forwardRef(function (_a, ref) {
|
|
29
33
|
var _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, restProps = tslib.__rest(_a, ["breakpoint"]);
|
|
30
34
|
var view = hooks.useMedia([
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ChangeEvent, ElementType, MouseEvent } 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 { DateInputProps } from "@alfalab/core-components-date-input";
|
|
7
7
|
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
8
8
|
type CalendarInputProps = Omit<DateInputProps, 'onChange' | 'mobileMode'> & {
|
|
@@ -21,7 +21,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
21
21
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
22
22
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
23
23
|
|
|
24
|
-
var styles = {"component":"calendar-
|
|
24
|
+
var styles = {"component":"calendar-input__component_17c3e","block":"calendar-input__block_17c3e","calendarContainer":"calendar-input__calendarContainer_17c3e","calendarResponsive":"calendar-input__calendarResponsive_17c3e","calendarIcon":"calendar-input__calendarIcon_17c3e","nativeInput":"calendar-input__nativeInput_17c3e"};
|
|
25
25
|
require('./index.css')
|
|
26
26
|
|
|
27
27
|
var CalendarInput = React.forwardRef(function (_a, ref) {
|
|
@@ -76,7 +76,10 @@ var CalendarInput = React.forwardRef(function (_a, ref) {
|
|
|
76
76
|
closeCalendar();
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
var handleClick = function () {
|
|
79
|
+
var handleClick = function (event) {
|
|
80
|
+
var _a;
|
|
81
|
+
if (!((_a = inputWrapperRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)))
|
|
82
|
+
return;
|
|
80
83
|
if (!open)
|
|
81
84
|
openCalendar();
|
|
82
85
|
if (view === 'desktop' && inputRef.current) {
|
|
@@ -84,7 +87,10 @@ var CalendarInput = React.forwardRef(function (_a, ref) {
|
|
|
84
87
|
}
|
|
85
88
|
};
|
|
86
89
|
var handleFocus = function (event) {
|
|
90
|
+
var _a;
|
|
87
91
|
if (view === 'desktop') {
|
|
92
|
+
if (!((_a = inputWrapperRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)))
|
|
93
|
+
return;
|
|
88
94
|
openCalendar();
|
|
89
95
|
if (!open && event.target.tagName !== 'INPUT' && calendarRef.current) {
|
|
90
96
|
calendarRef.current.focus();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1qwej */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
|
-
--color-light-border-secondary: #
|
|
5
|
-
--color-light-
|
|
4
|
+
--color-light-border-secondary: #e7e8ec;
|
|
5
|
+
--color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47); /* 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 */
|
|
6
6
|
} :root { /* 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 */
|
|
7
7
|
} :root {
|
|
8
8
|
} :root {
|
|
@@ -41,33 +41,33 @@
|
|
|
41
41
|
|
|
42
42
|
/* marker */
|
|
43
43
|
} :root {
|
|
44
|
-
--calendar-input-icon-color: var(--color-light-
|
|
44
|
+
--calendar-input-icon-color: var(--color-light-neutral-translucent-700);
|
|
45
45
|
--calendar-input-popover-border-radius: var(--border-radius-m);
|
|
46
|
-
} .calendar-
|
|
46
|
+
} .calendar-input__component_17c3e {
|
|
47
47
|
display: inline-block;
|
|
48
48
|
outline: none;
|
|
49
49
|
position: relative;
|
|
50
|
-
} .calendar-
|
|
50
|
+
} .calendar-input__block_17c3e {
|
|
51
51
|
width: 100%;
|
|
52
|
-
} .calendar-
|
|
52
|
+
} .calendar-input__calendarContainer_17c3e {
|
|
53
53
|
display: inline-block;
|
|
54
54
|
box-sizing: border-box;
|
|
55
55
|
border-radius: var(--calendar-input-popover-border-radius);
|
|
56
56
|
border: 1px solid var(--color-light-border-secondary)
|
|
57
|
-
} @media (max-width: 374px) { .calendar-
|
|
57
|
+
} @media (max-width: 374px) { .calendar-input__calendarContainer_17c3e {
|
|
58
58
|
width: 100%;
|
|
59
59
|
min-width: 288px
|
|
60
60
|
}
|
|
61
|
-
} .calendar-
|
|
61
|
+
} .calendar-input__calendarResponsive_17c3e {
|
|
62
62
|
width: var(--calendar-width);
|
|
63
|
-
} .calendar-
|
|
63
|
+
} .calendar-input__calendarIcon_17c3e {
|
|
64
64
|
width: 24px;
|
|
65
65
|
height: 24px;
|
|
66
66
|
display: block;
|
|
67
67
|
color: var(--calendar-input-icon-color)
|
|
68
|
-
} .calendar-
|
|
68
|
+
} .calendar-input__calendarIcon_17c3e:not(:only-child) {
|
|
69
69
|
margin-right: var(--gap-2xs);
|
|
70
|
-
} .calendar-
|
|
70
|
+
} .calendar-input__nativeInput_17c3e {
|
|
71
71
|
opacity: 0;
|
|
72
72
|
position: absolute;
|
|
73
73
|
top: 0;
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
height: 100%;
|
|
77
77
|
appearance: none;
|
|
78
78
|
z-index: 1
|
|
79
|
-
} .calendar-
|
|
79
|
+
} .calendar-input__nativeInput_17c3e::-webkit-calendar-picker-indicator {
|
|
80
80
|
display: none;
|
|
81
|
-
} .calendar-
|
|
81
|
+
} .calendar-input__nativeInput_17c3e::-webkit-inner-spin-button {
|
|
82
82
|
display: none;
|
|
83
83
|
}
|
|
@@ -2,5 +2,9 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CalendarInputProps } from "./components/calendar-input/Component";
|
|
4
4
|
type CalendarInputDesktopProps = Omit<CalendarInputProps, 'view'>;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
* use UniversalDateInput instead
|
|
8
|
+
*/
|
|
5
9
|
declare const CalendarInputDesktop: React.ForwardRefExoticComponent<CalendarInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
10
|
export { CalendarInputDesktopProps, CalendarInputDesktop };
|
|
@@ -22,6 +22,10 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
22
22
|
|
|
23
23
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated
|
|
27
|
+
* use UniversalDateInput instead
|
|
28
|
+
*/
|
|
25
29
|
var CalendarInputDesktop = React.forwardRef(function (props, ref) { return React__default.default.createElement(components_calendarInput_Component.CalendarInput, tslib.__assign({ Calendar: desktop.CalendarDesktop }, props, { ref: ref })); });
|
|
26
30
|
|
|
27
31
|
exports.CalendarInputDesktop = CalendarInputDesktop;
|
|
@@ -2,5 +2,9 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CalendarInputProps } from "./components/calendar-input/Component";
|
|
4
4
|
type CalendarInputMobileProps = Omit<CalendarInputProps, 'view'>;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
* use UniversalDateInput instead
|
|
8
|
+
*/
|
|
5
9
|
declare const CalendarInputMobile: React.ForwardRefExoticComponent<CalendarInputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
10
|
export { CalendarInputMobileProps, CalendarInputMobile };
|
package/cssm/Component.mobile.js
CHANGED
|
@@ -22,6 +22,10 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
22
22
|
|
|
23
23
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated
|
|
27
|
+
* use UniversalDateInput instead
|
|
28
|
+
*/
|
|
25
29
|
var CalendarInputMobile = React.forwardRef(function (props, ref) { return React__default.default.createElement(components_calendarInput_Component.CalendarInput, tslib.__assign({ Calendar: mobile.CalendarMobile, view: 'mobile' }, props, { ref: ref })); });
|
|
26
30
|
|
|
27
31
|
exports.CalendarInputMobile = CalendarInputMobile;
|
|
@@ -9,6 +9,10 @@ type CalendarInputResponsiveProps = Omit<CalendarInputProps, 'view'> & {
|
|
|
9
9
|
breakpoint?: number;
|
|
10
10
|
};
|
|
11
11
|
type CalendarInputMedia = 'desktop' | 'mobile';
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
* use UniversalDateInput instead
|
|
15
|
+
*/
|
|
12
16
|
declare const CalendarInputResponsive: React.ForwardRefExoticComponent<Omit<CalendarInputProps, "view"> & {
|
|
13
17
|
/**
|
|
14
18
|
* Контрольная точка, с нее начинается desktop версия
|
|
@@ -26,6 +26,10 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
26
26
|
|
|
27
27
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated
|
|
31
|
+
* use UniversalDateInput instead
|
|
32
|
+
*/
|
|
29
33
|
var CalendarInputResponsive = React.forwardRef(function (_a, ref) {
|
|
30
34
|
var _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, restProps = tslib.__rest(_a, ["breakpoint"]);
|
|
31
35
|
var view = hooks.useMedia([
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ChangeEvent, ElementType, MouseEvent } 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 { DateInputProps } from "@alfalab/core-components-date-input";
|
|
7
7
|
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
8
8
|
type CalendarInputProps = Omit<DateInputProps, 'onChange' | 'mobileMode'> & {
|
|
@@ -75,7 +75,10 @@ var CalendarInput = React.forwardRef(function (_a, ref) {
|
|
|
75
75
|
closeCalendar();
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
var handleClick = function () {
|
|
78
|
+
var handleClick = function (event) {
|
|
79
|
+
var _a;
|
|
80
|
+
if (!((_a = inputWrapperRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)))
|
|
81
|
+
return;
|
|
79
82
|
if (!open)
|
|
80
83
|
openCalendar();
|
|
81
84
|
if (view === 'desktop' && inputRef.current) {
|
|
@@ -83,7 +86,10 @@ var CalendarInput = React.forwardRef(function (_a, ref) {
|
|
|
83
86
|
}
|
|
84
87
|
};
|
|
85
88
|
var handleFocus = function (event) {
|
|
89
|
+
var _a;
|
|
86
90
|
if (view === 'desktop') {
|
|
91
|
+
if (!((_a = inputWrapperRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)))
|
|
92
|
+
return;
|
|
87
93
|
openCalendar();
|
|
88
94
|
if (!open && event.target.tagName !== 'INPUT' && calendarRef.current) {
|
|
89
95
|
calendarRef.current.focus();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
} /* deprecated */ :root {
|
|
3
|
-
--color-light-border-secondary: #
|
|
4
|
-
--color-light-
|
|
3
|
+
--color-light-border-secondary: #e7e8ec;
|
|
4
|
+
--color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47); /* 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 */
|
|
5
5
|
} :root { /* 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 */
|
|
6
6
|
} :root {
|
|
7
7
|
} :root {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
/* marker */
|
|
42
42
|
} :root {
|
|
43
|
-
--calendar-input-icon-color: var(--color-light-
|
|
43
|
+
--calendar-input-icon-color: var(--color-light-neutral-translucent-700);
|
|
44
44
|
--calendar-input-popover-border-radius: var(--border-radius-m);
|
|
45
45
|
} .component {
|
|
46
46
|
display: inline-block;
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Component_desktop = require('
|
|
5
|
+
var Component_desktop = require('../Component.desktop.js');
|
|
6
6
|
require('tslib');
|
|
7
7
|
require('react');
|
|
8
8
|
require('@alfalab/core-components-calendar/cssm/desktop');
|
|
9
|
-
require('
|
|
9
|
+
require('../components/calendar-input/Component.js');
|
|
10
10
|
require('react-merge-refs');
|
|
11
11
|
require('classnames');
|
|
12
12
|
require('@alfalab/core-components-calendar/cssm/shared');
|
|
13
13
|
require('@alfalab/core-components-date-input/cssm');
|
|
14
14
|
require('@alfalab/core-components-popover/cssm');
|
|
15
15
|
require('@alfalab/icons-glyph/CalendarMIcon');
|
|
16
|
-
require('
|
|
16
|
+
require('../utils.js');
|
|
17
17
|
require('date-fns/format');
|
|
18
18
|
require('date-fns/isSameDay');
|
|
19
19
|
require('date-fns/parse');
|
|
20
|
-
require('
|
|
20
|
+
require('../components/calendar-input/index.module.css');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Component_mobile = require('
|
|
5
|
+
var Component_mobile = require('../Component.mobile.js');
|
|
6
6
|
require('tslib');
|
|
7
7
|
require('react');
|
|
8
8
|
require('@alfalab/core-components-calendar/cssm/mobile');
|
|
9
|
-
require('
|
|
9
|
+
require('../components/calendar-input/Component.js');
|
|
10
10
|
require('react-merge-refs');
|
|
11
11
|
require('classnames');
|
|
12
12
|
require('@alfalab/core-components-calendar/cssm/shared');
|
|
13
13
|
require('@alfalab/core-components-date-input/cssm');
|
|
14
14
|
require('@alfalab/core-components-popover/cssm');
|
|
15
15
|
require('@alfalab/icons-glyph/CalendarMIcon');
|
|
16
|
-
require('
|
|
16
|
+
require('../utils.js');
|
|
17
17
|
require('date-fns/format');
|
|
18
18
|
require('date-fns/isSameDay');
|
|
19
19
|
require('date-fns/parse');
|
|
20
|
-
require('
|
|
20
|
+
require('../components/calendar-input/index.module.css');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../utils";
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Component_desktop = require('
|
|
5
|
+
var Component_desktop = require('../Component.desktop.js');
|
|
6
6
|
require('tslib');
|
|
7
7
|
require('react');
|
|
8
8
|
require('@alfalab/core-components-calendar/desktop');
|
|
9
|
-
require('
|
|
9
|
+
require('../components/calendar-input/Component.js');
|
|
10
10
|
require('react-merge-refs');
|
|
11
11
|
require('classnames');
|
|
12
12
|
require('@alfalab/core-components-calendar/shared');
|
|
13
13
|
require('@alfalab/core-components-date-input');
|
|
14
14
|
require('@alfalab/core-components-popover');
|
|
15
15
|
require('@alfalab/icons-glyph/CalendarMIcon');
|
|
16
|
-
require('
|
|
16
|
+
require('../utils.js');
|
|
17
17
|
require('date-fns/format');
|
|
18
18
|
require('date-fns/isSameDay');
|
|
19
19
|
require('date-fns/parse');
|
|
@@ -2,5 +2,9 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CalendarInputProps } from "./components/calendar-input/Component";
|
|
4
4
|
type CalendarInputDesktopProps = Omit<CalendarInputProps, 'view'>;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
* use UniversalDateInput instead
|
|
8
|
+
*/
|
|
5
9
|
declare const CalendarInputDesktop: React.ForwardRefExoticComponent<CalendarInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
10
|
export { CalendarInputDesktopProps, CalendarInputDesktop };
|
package/esm/Component.desktop.js
CHANGED
|
@@ -13,6 +13,10 @@ import 'date-fns/format';
|
|
|
13
13
|
import 'date-fns/isSameDay';
|
|
14
14
|
import 'date-fns/parse';
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated
|
|
18
|
+
* use UniversalDateInput instead
|
|
19
|
+
*/
|
|
16
20
|
var CalendarInputDesktop = forwardRef(function (props, ref) { return React.createElement(CalendarInput, __assign({ Calendar: CalendarDesktop }, props, { ref: ref })); });
|
|
17
21
|
|
|
18
22
|
export { CalendarInputDesktop };
|
|
@@ -2,5 +2,9 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CalendarInputProps } from "./components/calendar-input/Component";
|
|
4
4
|
type CalendarInputMobileProps = Omit<CalendarInputProps, 'view'>;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
* use UniversalDateInput instead
|
|
8
|
+
*/
|
|
5
9
|
declare const CalendarInputMobile: React.ForwardRefExoticComponent<CalendarInputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
10
|
export { CalendarInputMobileProps, CalendarInputMobile };
|
package/esm/Component.mobile.js
CHANGED
|
@@ -13,6 +13,10 @@ import 'date-fns/format';
|
|
|
13
13
|
import 'date-fns/isSameDay';
|
|
14
14
|
import 'date-fns/parse';
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated
|
|
18
|
+
* use UniversalDateInput instead
|
|
19
|
+
*/
|
|
16
20
|
var CalendarInputMobile = forwardRef(function (props, ref) { return React.createElement(CalendarInput, __assign({ Calendar: CalendarMobile, view: 'mobile' }, props, { ref: ref })); });
|
|
17
21
|
|
|
18
22
|
export { CalendarInputMobile };
|
|
@@ -9,6 +9,10 @@ type CalendarInputResponsiveProps = Omit<CalendarInputProps, 'view'> & {
|
|
|
9
9
|
breakpoint?: number;
|
|
10
10
|
};
|
|
11
11
|
type CalendarInputMedia = 'desktop' | 'mobile';
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
* use UniversalDateInput instead
|
|
15
|
+
*/
|
|
12
16
|
declare const CalendarInputResponsive: React.ForwardRefExoticComponent<Omit<CalendarInputProps, "view"> & {
|
|
13
17
|
/**
|
|
14
18
|
* Контрольная точка, с нее начинается desktop версия
|
|
@@ -17,6 +17,10 @@ import 'date-fns/isSameDay';
|
|
|
17
17
|
import 'date-fns/parse';
|
|
18
18
|
import '@alfalab/core-components-calendar/esm/mobile';
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated
|
|
22
|
+
* use UniversalDateInput instead
|
|
23
|
+
*/
|
|
20
24
|
var CalendarInputResponsive = forwardRef(function (_a, ref) {
|
|
21
25
|
var _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, restProps = __rest(_a, ["breakpoint"]);
|
|
22
26
|
var view = useMedia([
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ChangeEvent, ElementType, MouseEvent } 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 { DateInputProps } from "@alfalab/core-components-date-input";
|
|
7
7
|
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
8
8
|
type CalendarInputProps = Omit<DateInputProps, 'onChange' | 'mobileMode'> & {
|
|
@@ -11,7 +11,7 @@ import 'date-fns/format';
|
|
|
11
11
|
import 'date-fns/isSameDay';
|
|
12
12
|
import 'date-fns/parse';
|
|
13
13
|
|
|
14
|
-
var styles = {"component":"calendar-
|
|
14
|
+
var styles = {"component":"calendar-input__component_17c3e","block":"calendar-input__block_17c3e","calendarContainer":"calendar-input__calendarContainer_17c3e","calendarResponsive":"calendar-input__calendarResponsive_17c3e","calendarIcon":"calendar-input__calendarIcon_17c3e","nativeInput":"calendar-input__nativeInput_17c3e"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var CalendarInput = forwardRef(function (_a, ref) {
|
|
@@ -66,7 +66,10 @@ var CalendarInput = forwardRef(function (_a, ref) {
|
|
|
66
66
|
closeCalendar();
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
var handleClick = function () {
|
|
69
|
+
var handleClick = function (event) {
|
|
70
|
+
var _a;
|
|
71
|
+
if (!((_a = inputWrapperRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)))
|
|
72
|
+
return;
|
|
70
73
|
if (!open)
|
|
71
74
|
openCalendar();
|
|
72
75
|
if (view === 'desktop' && inputRef.current) {
|
|
@@ -74,7 +77,10 @@ var CalendarInput = forwardRef(function (_a, ref) {
|
|
|
74
77
|
}
|
|
75
78
|
};
|
|
76
79
|
var handleFocus = function (event) {
|
|
80
|
+
var _a;
|
|
77
81
|
if (view === 'desktop') {
|
|
82
|
+
if (!((_a = inputWrapperRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)))
|
|
83
|
+
return;
|
|
78
84
|
openCalendar();
|
|
79
85
|
if (!open && event.target.tagName !== 'INPUT' && calendarRef.current) {
|
|
80
86
|
calendarRef.current.focus();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1qwej */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
|
-
--color-light-border-secondary: #
|
|
5
|
-
--color-light-
|
|
4
|
+
--color-light-border-secondary: #e7e8ec;
|
|
5
|
+
--color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47); /* 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 */
|
|
6
6
|
} :root { /* 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 */
|
|
7
7
|
} :root {
|
|
8
8
|
} :root {
|
|
@@ -41,33 +41,33 @@
|
|
|
41
41
|
|
|
42
42
|
/* marker */
|
|
43
43
|
} :root {
|
|
44
|
-
--calendar-input-icon-color: var(--color-light-
|
|
44
|
+
--calendar-input-icon-color: var(--color-light-neutral-translucent-700);
|
|
45
45
|
--calendar-input-popover-border-radius: var(--border-radius-m);
|
|
46
|
-
} .calendar-
|
|
46
|
+
} .calendar-input__component_17c3e {
|
|
47
47
|
display: inline-block;
|
|
48
48
|
outline: none;
|
|
49
49
|
position: relative;
|
|
50
|
-
} .calendar-
|
|
50
|
+
} .calendar-input__block_17c3e {
|
|
51
51
|
width: 100%;
|
|
52
|
-
} .calendar-
|
|
52
|
+
} .calendar-input__calendarContainer_17c3e {
|
|
53
53
|
display: inline-block;
|
|
54
54
|
box-sizing: border-box;
|
|
55
55
|
border-radius: var(--calendar-input-popover-border-radius);
|
|
56
56
|
border: 1px solid var(--color-light-border-secondary)
|
|
57
|
-
} @media (max-width: 374px) { .calendar-
|
|
57
|
+
} @media (max-width: 374px) { .calendar-input__calendarContainer_17c3e {
|
|
58
58
|
width: 100%;
|
|
59
59
|
min-width: 288px
|
|
60
60
|
}
|
|
61
|
-
} .calendar-
|
|
61
|
+
} .calendar-input__calendarResponsive_17c3e {
|
|
62
62
|
width: var(--calendar-width);
|
|
63
|
-
} .calendar-
|
|
63
|
+
} .calendar-input__calendarIcon_17c3e {
|
|
64
64
|
width: 24px;
|
|
65
65
|
height: 24px;
|
|
66
66
|
display: block;
|
|
67
67
|
color: var(--calendar-input-icon-color)
|
|
68
|
-
} .calendar-
|
|
68
|
+
} .calendar-input__calendarIcon_17c3e:not(:only-child) {
|
|
69
69
|
margin-right: var(--gap-2xs);
|
|
70
|
-
} .calendar-
|
|
70
|
+
} .calendar-input__nativeInput_17c3e {
|
|
71
71
|
opacity: 0;
|
|
72
72
|
position: absolute;
|
|
73
73
|
top: 0;
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
height: 100%;
|
|
77
77
|
appearance: none;
|
|
78
78
|
z-index: 1
|
|
79
|
-
} .calendar-
|
|
79
|
+
} .calendar-input__nativeInput_17c3e::-webkit-calendar-picker-indicator {
|
|
80
80
|
display: none;
|
|
81
|
-
} .calendar-
|
|
81
|
+
} .calendar-input__nativeInput_17c3e::-webkit-inner-spin-button {
|
|
82
82
|
display: none;
|
|
83
83
|
}
|