@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.
Files changed (186) hide show
  1. package/Component.desktop.d.ts +4 -0
  2. package/Component.desktop.js +4 -0
  3. package/Component.mobile.d.ts +4 -0
  4. package/Component.mobile.js +4 -0
  5. package/Component.responsive.d.ts +4 -0
  6. package/Component.responsive.js +4 -0
  7. package/components/calendar-input/Component.d.ts +2 -2
  8. package/components/calendar-input/Component.js +8 -2
  9. package/components/calendar-input/index.css +14 -14
  10. package/cssm/Component.desktop.d.ts +4 -0
  11. package/cssm/Component.desktop.js +4 -0
  12. package/cssm/Component.mobile.d.ts +4 -0
  13. package/cssm/Component.mobile.js +4 -0
  14. package/cssm/Component.responsive.d.ts +4 -0
  15. package/cssm/Component.responsive.js +4 -0
  16. package/cssm/components/calendar-input/Component.d.ts +2 -2
  17. package/cssm/components/calendar-input/Component.js +7 -1
  18. package/cssm/components/calendar-input/index.module.css +3 -3
  19. package/cssm/desktop/index.d.ts +2 -0
  20. package/cssm/{desktop.js → desktop/index.js} +4 -4
  21. package/cssm/mobile/index.d.ts +2 -0
  22. package/cssm/{mobile.js → mobile/index.js} +4 -4
  23. package/cssm/shared/index.d.ts +1 -0
  24. package/cssm/{shared.js → shared/index.js} +1 -1
  25. package/desktop/index.d.ts +2 -0
  26. package/{desktop.js → desktop/index.js} +3 -3
  27. package/desktop/package.json +3 -0
  28. package/esm/Component.desktop.d.ts +4 -0
  29. package/esm/Component.desktop.js +4 -0
  30. package/esm/Component.mobile.d.ts +4 -0
  31. package/esm/Component.mobile.js +4 -0
  32. package/esm/Component.responsive.d.ts +4 -0
  33. package/esm/Component.responsive.js +4 -0
  34. package/esm/components/calendar-input/Component.d.ts +2 -2
  35. package/esm/components/calendar-input/Component.js +8 -2
  36. package/esm/components/calendar-input/index.css +14 -14
  37. package/esm/desktop/index.d.ts +2 -0
  38. package/esm/{desktop.js → desktop/index.js} +3 -3
  39. package/esm/mobile/index.d.ts +2 -0
  40. package/esm/{mobile.js → mobile/index.js} +3 -3
  41. package/esm/shared/index.d.ts +1 -0
  42. package/esm/{shared.js → shared/index.js} +1 -1
  43. package/mobile/index.d.ts +2 -0
  44. package/{mobile.js → mobile/index.js} +3 -3
  45. package/mobile/package.json +3 -0
  46. package/modern/Component.desktop.d.ts +4 -0
  47. package/modern/Component.desktop.js +4 -0
  48. package/modern/Component.mobile.d.ts +4 -0
  49. package/modern/Component.mobile.js +4 -0
  50. package/modern/Component.responsive.d.ts +4 -0
  51. package/modern/Component.responsive.js +4 -0
  52. package/modern/components/calendar-input/Component.d.ts +2 -2
  53. package/modern/components/calendar-input/Component.js +6 -2
  54. package/modern/components/calendar-input/index.css +14 -14
  55. package/modern/desktop/index.d.ts +2 -0
  56. package/modern/{desktop.js → desktop/index.js} +3 -3
  57. package/modern/mobile/index.d.ts +2 -0
  58. package/modern/{mobile.js → mobile/index.js} +3 -3
  59. package/modern/shared/index.d.ts +1 -0
  60. package/modern/{shared.js → shared/index.js} +1 -1
  61. package/package.json +3 -27
  62. package/shared/index.d.ts +1 -0
  63. package/{shared.js → shared/index.js} +1 -1
  64. package/shared/package.json +3 -0
  65. package/src/Component.desktop.tsx +4 -0
  66. package/src/Component.mobile.tsx +4 -0
  67. package/src/Component.responsive.tsx +4 -0
  68. package/src/components/calendar-input/Component.tsx +5 -1
  69. package/src/components/calendar-input/index.module.css +1 -1
  70. package/src/desktop/index.ts +1 -0
  71. package/src/desktop/package.json +3 -0
  72. package/src/mobile/index.ts +1 -0
  73. package/src/mobile/package.json +3 -0
  74. package/src/shared/index.ts +1 -0
  75. package/src/shared/package.json +3 -0
  76. package/Component-10db897e.d.ts +0 -6
  77. package/Component-69921c40.d.ts +0 -184
  78. package/Component-89f0cb07.d.ts +0 -38
  79. package/Component-b5b4c59f.d.ts +0 -389
  80. package/Component-ebda875c.d.ts +0 -35
  81. package/Component.desktop-0aa4e915.d.ts +0 -5
  82. package/Component.desktop-b5b4c59f.d.ts +0 -205
  83. package/Component.mobile-16b1285a.d.ts +0 -5
  84. package/Component.responsive-0aa4e915.d.ts +0 -66
  85. package/cssm/Component-10db897e.d.ts +0 -6
  86. package/cssm/Component-69921c40.d.ts +0 -184
  87. package/cssm/Component-89f0cb07.d.ts +0 -38
  88. package/cssm/Component-b5b4c59f.d.ts +0 -389
  89. package/cssm/Component-ebda875c.d.ts +0 -35
  90. package/cssm/Component.desktop-0aa4e915.d.ts +0 -5
  91. package/cssm/Component.desktop-b5b4c59f.d.ts +0 -205
  92. package/cssm/Component.mobile-16b1285a.d.ts +0 -5
  93. package/cssm/Component.responsive-0aa4e915.d.ts +0 -66
  94. package/cssm/desktop-63dec22f.d.ts +0 -2
  95. package/cssm/desktop-69921c40.d.ts +0 -2
  96. package/cssm/desktop.d.ts +0 -2
  97. package/cssm/index-10db897e.d.ts +0 -55
  98. package/cssm/index-89f0cb07.d.ts +0 -2
  99. package/cssm/index-ebda875c.d.ts +0 -2
  100. package/cssm/index-f034f741.d.ts +0 -80
  101. package/cssm/mobile-c219f8ca.d.ts +0 -1
  102. package/cssm/mobile.d.ts +0 -2
  103. package/cssm/shared-f034f741.d.ts +0 -35
  104. package/cssm/shared.d.ts +0 -1
  105. package/cssm/types-1b036d4b.d.ts +0 -13
  106. package/cssm/types-1c79e231.d.ts +0 -113
  107. package/cssm/typings-5684a67d.d.ts +0 -23
  108. package/cssm/typings-89f0cb07.d.ts +0 -93
  109. package/cssm/useCalendar-5684a67d.d.ts +0 -97
  110. package/cssm/useSkeleton-1b036d4b.d.ts +0 -40
  111. package/cssm/utils-5684a67d.d.ts +0 -88
  112. package/desktop-63dec22f.d.ts +0 -2
  113. package/desktop-69921c40.d.ts +0 -2
  114. package/desktop.d.ts +0 -2
  115. package/esm/Component-10db897e.d.ts +0 -6
  116. package/esm/Component-69921c40.d.ts +0 -184
  117. package/esm/Component-89f0cb07.d.ts +0 -38
  118. package/esm/Component-b5b4c59f.d.ts +0 -389
  119. package/esm/Component-ebda875c.d.ts +0 -35
  120. package/esm/Component.desktop-0aa4e915.d.ts +0 -5
  121. package/esm/Component.desktop-b5b4c59f.d.ts +0 -205
  122. package/esm/Component.mobile-16b1285a.d.ts +0 -5
  123. package/esm/Component.responsive-0aa4e915.d.ts +0 -66
  124. package/esm/desktop-63dec22f.d.ts +0 -2
  125. package/esm/desktop-69921c40.d.ts +0 -2
  126. package/esm/desktop.d.ts +0 -2
  127. package/esm/index-10db897e.d.ts +0 -55
  128. package/esm/index-89f0cb07.d.ts +0 -2
  129. package/esm/index-ebda875c.d.ts +0 -2
  130. package/esm/index-f034f741.d.ts +0 -80
  131. package/esm/mobile-c219f8ca.d.ts +0 -1
  132. package/esm/mobile.d.ts +0 -2
  133. package/esm/shared-f034f741.d.ts +0 -35
  134. package/esm/shared.d.ts +0 -1
  135. package/esm/types-1b036d4b.d.ts +0 -13
  136. package/esm/types-1c79e231.d.ts +0 -113
  137. package/esm/typings-5684a67d.d.ts +0 -23
  138. package/esm/typings-89f0cb07.d.ts +0 -93
  139. package/esm/useCalendar-5684a67d.d.ts +0 -97
  140. package/esm/useSkeleton-1b036d4b.d.ts +0 -40
  141. package/esm/utils-5684a67d.d.ts +0 -88
  142. package/index-10db897e.d.ts +0 -55
  143. package/index-89f0cb07.d.ts +0 -2
  144. package/index-ebda875c.d.ts +0 -2
  145. package/index-f034f741.d.ts +0 -80
  146. package/mobile-c219f8ca.d.ts +0 -1
  147. package/mobile.d.ts +0 -2
  148. package/modern/Component-10db897e.d.ts +0 -6
  149. package/modern/Component-69921c40.d.ts +0 -184
  150. package/modern/Component-89f0cb07.d.ts +0 -38
  151. package/modern/Component-b5b4c59f.d.ts +0 -389
  152. package/modern/Component-ebda875c.d.ts +0 -35
  153. package/modern/Component.desktop-0aa4e915.d.ts +0 -5
  154. package/modern/Component.desktop-b5b4c59f.d.ts +0 -205
  155. package/modern/Component.mobile-16b1285a.d.ts +0 -5
  156. package/modern/Component.responsive-0aa4e915.d.ts +0 -66
  157. package/modern/desktop-63dec22f.d.ts +0 -2
  158. package/modern/desktop-69921c40.d.ts +0 -2
  159. package/modern/desktop.d.ts +0 -2
  160. package/modern/index-10db897e.d.ts +0 -55
  161. package/modern/index-89f0cb07.d.ts +0 -2
  162. package/modern/index-ebda875c.d.ts +0 -2
  163. package/modern/index-f034f741.d.ts +0 -80
  164. package/modern/mobile-c219f8ca.d.ts +0 -1
  165. package/modern/mobile.d.ts +0 -2
  166. package/modern/shared-f034f741.d.ts +0 -35
  167. package/modern/shared.d.ts +0 -1
  168. package/modern/types-1b036d4b.d.ts +0 -13
  169. package/modern/types-1c79e231.d.ts +0 -113
  170. package/modern/typings-5684a67d.d.ts +0 -23
  171. package/modern/typings-89f0cb07.d.ts +0 -93
  172. package/modern/useCalendar-5684a67d.d.ts +0 -97
  173. package/modern/useSkeleton-1b036d4b.d.ts +0 -40
  174. package/modern/utils-5684a67d.d.ts +0 -88
  175. package/shared-f034f741.d.ts +0 -35
  176. package/shared.d.ts +0 -1
  177. package/src/desktop.ts +0 -1
  178. package/src/mobile.ts +0 -1
  179. package/src/shared.ts +0 -1
  180. package/types-1b036d4b.d.ts +0 -13
  181. package/types-1c79e231.d.ts +0 -113
  182. package/typings-5684a67d.d.ts +0 -23
  183. package/typings-89f0cb07.d.ts +0 -93
  184. package/useCalendar-5684a67d.d.ts +0 -97
  185. package/useSkeleton-1b036d4b.d.ts +0 -40
  186. package/utils-5684a67d.d.ts +0 -88
@@ -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 };
@@ -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;
@@ -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 };
@@ -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 версия
@@ -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 "../../desktop-63dec22f";
5
- import { CalendarMobileProps } from "../../mobile-c219f8ca";
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-input__component_18mfo","block":"calendar-input__block_18mfo","calendarContainer":"calendar-input__calendarContainer_18mfo","calendarResponsive":"calendar-input__calendarResponsive_18mfo","calendarIcon":"calendar-input__calendarIcon_18mfo","nativeInput":"calendar-input__nativeInput_18mfo"};
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: 5wan2 */
1
+ /* hash: 1qwej */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
- --color-light-border-secondary: #e9e9eb;
5
- --color-light-graphic-primary: #0e0e0e; /* 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 */
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-graphic-primary);
44
+ --calendar-input-icon-color: var(--color-light-neutral-translucent-700);
45
45
  --calendar-input-popover-border-radius: var(--border-radius-m);
46
- } .calendar-input__component_18mfo {
46
+ } .calendar-input__component_17c3e {
47
47
  display: inline-block;
48
48
  outline: none;
49
49
  position: relative;
50
- } .calendar-input__block_18mfo {
50
+ } .calendar-input__block_17c3e {
51
51
  width: 100%;
52
- } .calendar-input__calendarContainer_18mfo {
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-input__calendarContainer_18mfo {
57
+ } @media (max-width: 374px) { .calendar-input__calendarContainer_17c3e {
58
58
  width: 100%;
59
59
  min-width: 288px
60
60
  }
61
- } .calendar-input__calendarResponsive_18mfo {
61
+ } .calendar-input__calendarResponsive_17c3e {
62
62
  width: var(--calendar-width);
63
- } .calendar-input__calendarIcon_18mfo {
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-input__calendarIcon_18mfo:not(:only-child) {
68
+ } .calendar-input__calendarIcon_17c3e:not(:only-child) {
69
69
  margin-right: var(--gap-2xs);
70
- } .calendar-input__nativeInput_18mfo {
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-input__nativeInput_18mfo::-webkit-calendar-picker-indicator {
79
+ } .calendar-input__nativeInput_17c3e::-webkit-calendar-picker-indicator {
80
80
  display: none;
81
- } .calendar-input__nativeInput_18mfo::-webkit-inner-spin-button {
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 };
@@ -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 "../../desktop-63dec22f";
5
- import { CalendarMobileProps } from "../../mobile-c219f8ca";
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: #e9e9eb;
4
- --color-light-graphic-primary: #0e0e0e; /* 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 */
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-graphic-primary);
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;
@@ -0,0 +1,2 @@
1
+ export * from "../Component.desktop";
2
+ export {};
@@ -2,22 +2,22 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_desktop = require('./Component.desktop.js');
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('./components/calendar-input/Component.js');
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('./utils.js');
16
+ require('../utils.js');
17
17
  require('date-fns/format');
18
18
  require('date-fns/isSameDay');
19
19
  require('date-fns/parse');
20
- require('./components/calendar-input/index.module.css');
20
+ require('../components/calendar-input/index.module.css');
21
21
 
22
22
 
23
23
 
@@ -0,0 +1,2 @@
1
+ export * from "../Component.mobile";
2
+ export {};
@@ -2,22 +2,22 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_mobile = require('./Component.mobile.js');
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('./components/calendar-input/Component.js');
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('./utils.js');
16
+ require('../utils.js');
17
17
  require('date-fns/format');
18
18
  require('date-fns/isSameDay');
19
19
  require('date-fns/parse');
20
- require('./components/calendar-input/index.module.css');
20
+ require('../components/calendar-input/index.module.css');
21
21
 
22
22
 
23
23
 
@@ -0,0 +1 @@
1
+ export * from "../utils";
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var utils = require('./utils.js');
5
+ var utils = require('../utils.js');
6
6
  require('date-fns/format');
7
7
  require('date-fns/isSameDay');
8
8
  require('date-fns/parse');
@@ -0,0 +1,2 @@
1
+ export * from "../Component.desktop";
2
+ export {};
@@ -2,18 +2,18 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_desktop = require('./Component.desktop.js');
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('./components/calendar-input/Component.js');
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('./utils.js');
16
+ require('../utils.js');
17
17
  require('date-fns/format');
18
18
  require('date-fns/isSameDay');
19
19
  require('date-fns/parse');
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../esm/desktop/index.js"
3
+ }
@@ -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 };
@@ -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 };
@@ -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 "../../desktop-63dec22f";
5
- import { CalendarMobileProps } from "../../mobile-c219f8ca";
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-input__component_18mfo","block":"calendar-input__block_18mfo","calendarContainer":"calendar-input__calendarContainer_18mfo","calendarResponsive":"calendar-input__calendarResponsive_18mfo","calendarIcon":"calendar-input__calendarIcon_18mfo","nativeInput":"calendar-input__nativeInput_18mfo"};
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: 5wan2 */
1
+ /* hash: 1qwej */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
- --color-light-border-secondary: #e9e9eb;
5
- --color-light-graphic-primary: #0e0e0e; /* 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 */
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-graphic-primary);
44
+ --calendar-input-icon-color: var(--color-light-neutral-translucent-700);
45
45
  --calendar-input-popover-border-radius: var(--border-radius-m);
46
- } .calendar-input__component_18mfo {
46
+ } .calendar-input__component_17c3e {
47
47
  display: inline-block;
48
48
  outline: none;
49
49
  position: relative;
50
- } .calendar-input__block_18mfo {
50
+ } .calendar-input__block_17c3e {
51
51
  width: 100%;
52
- } .calendar-input__calendarContainer_18mfo {
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-input__calendarContainer_18mfo {
57
+ } @media (max-width: 374px) { .calendar-input__calendarContainer_17c3e {
58
58
  width: 100%;
59
59
  min-width: 288px
60
60
  }
61
- } .calendar-input__calendarResponsive_18mfo {
61
+ } .calendar-input__calendarResponsive_17c3e {
62
62
  width: var(--calendar-width);
63
- } .calendar-input__calendarIcon_18mfo {
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-input__calendarIcon_18mfo:not(:only-child) {
68
+ } .calendar-input__calendarIcon_17c3e:not(:only-child) {
69
69
  margin-right: var(--gap-2xs);
70
- } .calendar-input__nativeInput_18mfo {
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-input__nativeInput_18mfo::-webkit-calendar-picker-indicator {
79
+ } .calendar-input__nativeInput_17c3e::-webkit-calendar-picker-indicator {
80
80
  display: none;
81
- } .calendar-input__nativeInput_18mfo::-webkit-inner-spin-button {
81
+ } .calendar-input__nativeInput_17c3e::-webkit-inner-spin-button {
82
82
  display: none;
83
83
  }
@@ -0,0 +1,2 @@
1
+ export * from "../Component.desktop";
2
+ export {};