@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.
Files changed (180) 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/date-range-input/Component.d.ts +2 -2
  8. package/components/date-range-input/Component.js +6 -5
  9. package/components/date-range-input/index.css +7 -7
  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/date-range-input/Component.d.ts +2 -2
  17. package/cssm/components/date-range-input/Component.js +5 -4
  18. package/cssm/desktop/index.d.ts +2 -0
  19. package/cssm/{desktop.js → desktop/index.js} +4 -4
  20. package/cssm/mobile/index.d.ts +2 -0
  21. package/cssm/{mobile.js → mobile/index.js} +4 -4
  22. package/desktop/index.d.ts +2 -0
  23. package/{desktop.js → desktop/index.js} +3 -3
  24. package/desktop/package.json +3 -0
  25. package/esm/Component.desktop.d.ts +4 -0
  26. package/esm/Component.desktop.js +4 -0
  27. package/esm/Component.mobile.d.ts +4 -0
  28. package/esm/Component.mobile.js +4 -0
  29. package/esm/Component.responsive.d.ts +4 -0
  30. package/esm/Component.responsive.js +4 -0
  31. package/esm/components/date-range-input/Component.d.ts +2 -2
  32. package/esm/components/date-range-input/Component.js +6 -5
  33. package/esm/components/date-range-input/index.css +7 -7
  34. package/esm/desktop/index.d.ts +2 -0
  35. package/esm/{desktop.js → desktop/index.js} +3 -3
  36. package/esm/mobile/index.d.ts +2 -0
  37. package/esm/{mobile.js → mobile/index.js} +3 -3
  38. package/mobile/index.d.ts +2 -0
  39. package/{mobile.js → mobile/index.js} +3 -3
  40. package/mobile/package.json +3 -0
  41. package/modern/Component.desktop.d.ts +4 -0
  42. package/modern/Component.desktop.js +4 -0
  43. package/modern/Component.mobile.d.ts +4 -0
  44. package/modern/Component.mobile.js +4 -0
  45. package/modern/Component.responsive.d.ts +4 -0
  46. package/modern/Component.responsive.js +4 -0
  47. package/modern/components/date-range-input/Component.d.ts +2 -2
  48. package/modern/components/date-range-input/Component.js +6 -5
  49. package/modern/components/date-range-input/index.css +7 -7
  50. package/modern/desktop/index.d.ts +2 -0
  51. package/modern/{desktop.js → desktop/index.js} +3 -3
  52. package/modern/mobile/index.d.ts +2 -0
  53. package/modern/{mobile.js → mobile/index.js} +3 -3
  54. package/package.json +4 -24
  55. package/src/Component.desktop.tsx +4 -0
  56. package/src/Component.mobile.tsx +4 -0
  57. package/src/Component.responsive.tsx +4 -0
  58. package/src/components/date-range-input/Component.tsx +22 -18
  59. package/src/desktop/index.ts +1 -0
  60. package/src/desktop/package.json +3 -0
  61. package/src/mobile/index.ts +1 -0
  62. package/src/mobile/package.json +3 -0
  63. package/Component-63dec22f.d.ts +0 -184
  64. package/Component-72308007.d.ts +0 -6
  65. package/Component-72dda473.d.ts +0 -53
  66. package/Component-b5b4c59f.d.ts +0 -388
  67. package/Component.desktop-2e2b2125.d.ts +0 -6
  68. package/Component.desktop-785df74d.d.ts +0 -6
  69. package/Component.desktop-b5b4c59f.d.ts +0 -205
  70. package/Component.mobile-755fbaa3.d.ts +0 -6
  71. package/Component.mobile-d7e9f69d.d.ts +0 -6
  72. package/Component.mobile-ebda875c.d.ts +0 -7
  73. package/Component.responsive-2e2b2125.d.ts +0 -5
  74. package/Component.responsive-785df74d.d.ts +0 -26
  75. package/cssm/Component-63dec22f.d.ts +0 -184
  76. package/cssm/Component-72308007.d.ts +0 -6
  77. package/cssm/Component-72dda473.d.ts +0 -53
  78. package/cssm/Component-b5b4c59f.d.ts +0 -388
  79. package/cssm/Component.desktop-2e2b2125.d.ts +0 -6
  80. package/cssm/Component.desktop-785df74d.d.ts +0 -6
  81. package/cssm/Component.desktop-b5b4c59f.d.ts +0 -205
  82. package/cssm/Component.mobile-755fbaa3.d.ts +0 -6
  83. package/cssm/Component.mobile-d7e9f69d.d.ts +0 -6
  84. package/cssm/Component.mobile-ebda875c.d.ts +0 -7
  85. package/cssm/Component.responsive-2e2b2125.d.ts +0 -5
  86. package/cssm/Component.responsive-785df74d.d.ts +0 -26
  87. package/cssm/desktop-63dec22f.d.ts +0 -2
  88. package/cssm/desktop.d.ts +0 -2
  89. package/cssm/index-3109f463.d.ts +0 -62
  90. package/cssm/index-72308007.d.ts +0 -54
  91. package/cssm/index-72dda473.d.ts +0 -12
  92. package/cssm/index-9211a437.d.ts +0 -2
  93. package/cssm/index-ebda875c.d.ts +0 -35
  94. package/cssm/index-f034f741.d.ts +0 -80
  95. package/cssm/mobile-c219f8ca.d.ts +0 -1
  96. package/cssm/mobile.d.ts +0 -2
  97. package/cssm/types-1b036d4b.d.ts +0 -13
  98. package/cssm/types-1c79e231.d.ts +0 -113
  99. package/cssm/typings-5684a67d.d.ts +0 -23
  100. package/cssm/typings-9211a437.d.ts +0 -95
  101. package/cssm/useCalendar-5684a67d.d.ts +0 -97
  102. package/cssm/useSkeleton-1b036d4b.d.ts +0 -40
  103. package/cssm/utils-5684a67d.d.ts +0 -88
  104. package/desktop-63dec22f.d.ts +0 -2
  105. package/desktop.d.ts +0 -2
  106. package/esm/Component-63dec22f.d.ts +0 -184
  107. package/esm/Component-72308007.d.ts +0 -297
  108. package/esm/Component-72dda473.d.ts +0 -53
  109. package/esm/Component-b5b4c59f.d.ts +0 -388
  110. package/esm/Component.desktop-2e2b2125.d.ts +0 -6
  111. package/esm/Component.desktop-785df74d.d.ts +0 -6
  112. package/esm/Component.desktop-b5b4c59f.d.ts +0 -198
  113. package/esm/Component.mobile-755fbaa3.d.ts +0 -6
  114. package/esm/Component.mobile-d7e9f69d.d.ts +0 -6
  115. package/esm/Component.mobile-ebda875c.d.ts +0 -7
  116. package/esm/Component.responsive-2e2b2125.d.ts +0 -5
  117. package/esm/Component.responsive-785df74d.d.ts +0 -26
  118. package/esm/desktop-63dec22f.d.ts +0 -2
  119. package/esm/desktop.d.ts +0 -2
  120. package/esm/index-3109f463.d.ts +0 -62
  121. package/esm/index-72308007.d.ts +0 -54
  122. package/esm/index-72dda473.d.ts +0 -12
  123. package/esm/index-9211a437.d.ts +0 -2
  124. package/esm/index-ebda875c.d.ts +0 -2
  125. package/esm/index-f034f741.d.ts +0 -83
  126. package/esm/mobile-c219f8ca.d.ts +0 -1
  127. package/esm/mobile.d.ts +0 -2
  128. package/esm/types-1b036d4b.d.ts +0 -13
  129. package/esm/types-1c79e231.d.ts +0 -113
  130. package/esm/typings-5684a67d.d.ts +0 -23
  131. package/esm/typings-9211a437.d.ts +0 -95
  132. package/esm/useCalendar-5684a67d.d.ts +0 -97
  133. package/esm/useSkeleton-1b036d4b.d.ts +0 -40
  134. package/esm/utils-5684a67d.d.ts +0 -88
  135. package/index-3109f463.d.ts +0 -62
  136. package/index-72308007.d.ts +0 -54
  137. package/index-72dda473.d.ts +0 -12
  138. package/index-9211a437.d.ts +0 -2
  139. package/index-ebda875c.d.ts +0 -35
  140. package/index-f034f741.d.ts +0 -80
  141. package/mobile-c219f8ca.d.ts +0 -1
  142. package/mobile.d.ts +0 -2
  143. package/modern/Component-63dec22f.d.ts +0 -184
  144. package/modern/Component-72308007.d.ts +0 -6
  145. package/modern/Component-72dda473.d.ts +0 -53
  146. package/modern/Component-b5b4c59f.d.ts +0 -388
  147. package/modern/Component.desktop-2e2b2125.d.ts +0 -6
  148. package/modern/Component.desktop-785df74d.d.ts +0 -6
  149. package/modern/Component.desktop-b5b4c59f.d.ts +0 -205
  150. package/modern/Component.mobile-755fbaa3.d.ts +0 -6
  151. package/modern/Component.mobile-d7e9f69d.d.ts +0 -6
  152. package/modern/Component.mobile-ebda875c.d.ts +0 -7
  153. package/modern/Component.responsive-2e2b2125.d.ts +0 -5
  154. package/modern/Component.responsive-785df74d.d.ts +0 -26
  155. package/modern/desktop-63dec22f.d.ts +0 -2
  156. package/modern/desktop.d.ts +0 -2
  157. package/modern/index-3109f463.d.ts +0 -62
  158. package/modern/index-72308007.d.ts +0 -54
  159. package/modern/index-72dda473.d.ts +0 -12
  160. package/modern/index-9211a437.d.ts +0 -2
  161. package/modern/index-ebda875c.d.ts +0 -35
  162. package/modern/index-f034f741.d.ts +0 -80
  163. package/modern/mobile-c219f8ca.d.ts +0 -1
  164. package/modern/mobile.d.ts +0 -2
  165. package/modern/types-1b036d4b.d.ts +0 -13
  166. package/modern/types-1c79e231.d.ts +0 -113
  167. package/modern/typings-5684a67d.d.ts +0 -23
  168. package/modern/typings-9211a437.d.ts +0 -95
  169. package/modern/useCalendar-5684a67d.d.ts +0 -97
  170. package/modern/useSkeleton-1b036d4b.d.ts +0 -40
  171. package/modern/utils-5684a67d.d.ts +0 -88
  172. package/src/desktop.ts +0 -1
  173. package/src/mobile.ts +0 -1
  174. package/types-1b036d4b.d.ts +0 -13
  175. package/types-1c79e231.d.ts +0 -113
  176. package/typings-5684a67d.d.ts +0 -23
  177. package/typings-9211a437.d.ts +0 -95
  178. package/useCalendar-5684a67d.d.ts +0 -97
  179. package/useSkeleton-1b036d4b.d.ts +0 -40
  180. 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 "../../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 { 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-input__component_wks86","calendarContainer":"date-range-input__calendarContainer_wks86","calendarResponsive":"date-range-input__calendarResponsive_wks86","block":"date-range-input__block_wks86","calendarIcon":"date-range-input__calendarIcon_wks86"};
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 && (React.createElement(Popover, { open: open, useAnchorWidth: useAnchorWidth, anchorElement: inputRef.current, popperClassName: cn(styles.calendarContainer, {
204
- [styles.calendarResponsive]: calendarResponsive,
205
- }), className: popoverClassName, position: popoverPosition, offset: [0, 8], withTransition: false, preventFlip: preventFlip, zIndex: zIndexPopover }, renderCalendar()))));
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: 1fu7x */
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-input__component_wks86 {
44
+ } .date-range-input__component_1soho {
45
45
  display: inline-block;
46
46
  outline: none;
47
47
  position: relative;
48
- } .date-range-input__calendarContainer_wks86 {
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-input__calendarContainer_wks86 {
53
+ } @media (max-width: 374px) { .date-range-input__calendarContainer_1soho {
54
54
  width: 100%;
55
55
  min-width: 288px
56
56
  }
57
- } .date-range-input__calendarResponsive_wks86 {
57
+ } .date-range-input__calendarResponsive_1soho {
58
58
  width: var(--calendar-width);
59
- } .date-range-input__block_wks86 {
59
+ } .date-range-input__block_1soho {
60
60
  width: 100%;
61
- } .date-range-input__calendarIcon_wks86 {
61
+ } .date-range-input__calendarIcon_1soho {
62
62
  margin-right: var(--gap-s-neg);
63
63
  height: 100%;
64
64
  }
@@ -0,0 +1,2 @@
1
+ export * from "../Component.desktop";
2
+ export {};
@@ -1,8 +1,8 @@
1
- export { DateRangeInputDesktop } from './Component.desktop.js';
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 './components/date-range-input/Component.js';
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 './utils/format.js';
15
+ import '../utils/format.js';
16
16
  import 'date-fns/parse';
@@ -0,0 +1,2 @@
1
+ export * from "../Component.mobile";
2
+ export {};
@@ -1,8 +1,8 @@
1
- export { DateRangeInputMobile } from './Component.mobile.js';
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 './components/date-range-input/Component.js';
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 './utils/format.js';
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.11",
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.2.0",
39
- "@alfalab/core-components-icon-button": "^6.3.0",
40
- "@alfalab/core-components-calendar": "^7.0.8",
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
@@ -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
- <Popover
489
- open={open}
490
- useAnchorWidth={useAnchorWidth}
491
- anchorElement={inputRef.current as HTMLElement}
492
- popperClassName={cn(styles.calendarContainer, {
493
- [styles.calendarResponsive]: calendarResponsive,
494
- })}
495
- className={popoverClassName}
496
- position={popoverPosition}
497
- offset={[0, 8]}
498
- withTransition={false}
499
- preventFlip={preventFlip}
500
- zIndex={zIndexPopover}
501
- >
502
- {renderCalendar()}
503
- </Popover>
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,3 @@
1
+ {
2
+ "module": "../esm/desktop/index.js"
3
+ }
@@ -0,0 +1 @@
1
+ export * from '../Component.mobile';
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../esm/mobile/index.js"
3
+ }
@@ -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";
@@ -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 };
@@ -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 };