@alfalab/core-components-date-range-input 3.5.34 → 4.0.0-snapshot-6a9d3fc

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 (167) hide show
  1. package/Component.responsive.d.ts +4 -6
  2. package/Component.responsive.js +4 -3
  3. package/Component.responsive.js.map +1 -0
  4. package/components/date-range-input/Component.d.ts +8 -11
  5. package/components/date-range-input/Component.js +26 -27
  6. package/components/date-range-input/Component.js.map +1 -0
  7. package/components/date-range-input/index.css +11 -51
  8. package/components/date-range-input/index.d.ts +1 -1
  9. package/components/date-range-input/index.js +3 -2
  10. package/components/date-range-input/index.js.map +1 -0
  11. package/components/date-range-input/index.module.css.js +8 -0
  12. package/components/date-range-input/index.module.css.js.map +1 -0
  13. package/cssm/Component.responsive.d.ts +4 -6
  14. package/cssm/Component.responsive.js +6 -5
  15. package/cssm/Component.responsive.js.map +1 -0
  16. package/cssm/components/date-range-input/Component.d.ts +8 -11
  17. package/cssm/components/date-range-input/Component.js +24 -23
  18. package/cssm/components/date-range-input/Component.js.map +1 -0
  19. package/cssm/components/date-range-input/index.d.ts +1 -1
  20. package/cssm/components/date-range-input/index.js +3 -2
  21. package/cssm/components/date-range-input/index.js.map +1 -0
  22. package/cssm/components/date-range-input/index.module.css +5 -44
  23. package/cssm/desktop/Component.desktop.d.ts +3 -5
  24. package/cssm/desktop/Component.desktop.js +5 -4
  25. package/cssm/desktop/Component.desktop.js.map +1 -0
  26. package/cssm/desktop/index.d.ts +1 -2
  27. package/cssm/desktop/index.js +3 -2
  28. package/cssm/desktop/index.js.map +1 -0
  29. package/cssm/index.d.ts +2 -3
  30. package/cssm/index.js +1 -0
  31. package/cssm/index.js.map +1 -0
  32. package/cssm/mobile/Component.mobile.d.ts +3 -5
  33. package/cssm/mobile/Component.mobile.js +5 -4
  34. package/cssm/mobile/Component.mobile.js.map +1 -0
  35. package/cssm/mobile/index.d.ts +1 -2
  36. package/cssm/mobile/index.js +3 -2
  37. package/cssm/mobile/index.js.map +1 -0
  38. package/cssm/utils/format.d.ts +7 -8
  39. package/cssm/utils/format.js +1 -0
  40. package/cssm/utils/format.js.map +1 -0
  41. package/cssm/utils/index.d.ts +1 -1
  42. package/cssm/utils/index.js +9 -8
  43. package/cssm/utils/index.js.map +1 -0
  44. package/desktop/Component.desktop.d.ts +3 -5
  45. package/desktop/Component.desktop.js +5 -4
  46. package/desktop/Component.desktop.js.map +1 -0
  47. package/desktop/index.d.ts +1 -2
  48. package/desktop/index.js +3 -2
  49. package/desktop/index.js.map +1 -0
  50. package/esm/Component.responsive.d.ts +4 -6
  51. package/esm/Component.responsive.js +1 -0
  52. package/esm/Component.responsive.js.map +1 -0
  53. package/esm/components/date-range-input/Component.d.ts +8 -11
  54. package/esm/components/date-range-input/Component.js +2 -3
  55. package/esm/components/date-range-input/Component.js.map +1 -0
  56. package/esm/components/date-range-input/index.css +11 -51
  57. package/esm/components/date-range-input/index.d.ts +1 -1
  58. package/esm/components/date-range-input/index.js +1 -0
  59. package/esm/components/date-range-input/index.js.map +1 -0
  60. package/esm/components/date-range-input/index.module.css.js +6 -0
  61. package/esm/components/date-range-input/index.module.css.js.map +1 -0
  62. package/esm/desktop/Component.desktop.d.ts +3 -5
  63. package/esm/desktop/Component.desktop.js +1 -0
  64. package/esm/desktop/Component.desktop.js.map +1 -0
  65. package/esm/desktop/index.d.ts +1 -2
  66. package/esm/desktop/index.js +1 -0
  67. package/esm/desktop/index.js.map +1 -0
  68. package/esm/index.d.ts +2 -3
  69. package/esm/index.js +1 -0
  70. package/esm/index.js.map +1 -0
  71. package/esm/mobile/Component.mobile.d.ts +3 -5
  72. package/esm/mobile/Component.mobile.js +1 -0
  73. package/esm/mobile/Component.mobile.js.map +1 -0
  74. package/esm/mobile/index.d.ts +1 -2
  75. package/esm/mobile/index.js +1 -0
  76. package/esm/mobile/index.js.map +1 -0
  77. package/esm/utils/format.d.ts +7 -8
  78. package/esm/utils/format.js +1 -0
  79. package/esm/utils/format.js.map +1 -0
  80. package/esm/utils/index.d.ts +1 -1
  81. package/esm/utils/index.js +1 -0
  82. package/esm/utils/index.js.map +1 -0
  83. package/index.d.ts +2 -3
  84. package/index.js +1 -0
  85. package/index.js.map +1 -0
  86. package/mobile/Component.mobile.d.ts +3 -5
  87. package/mobile/Component.mobile.js +5 -4
  88. package/mobile/Component.mobile.js.map +1 -0
  89. package/mobile/index.d.ts +1 -2
  90. package/mobile/index.js +3 -2
  91. package/mobile/index.js.map +1 -0
  92. package/modern/Component.responsive.d.ts +4 -6
  93. package/modern/Component.responsive.js +1 -0
  94. package/modern/Component.responsive.js.map +1 -0
  95. package/modern/components/date-range-input/Component.d.ts +8 -11
  96. package/modern/components/date-range-input/Component.js +2 -3
  97. package/modern/components/date-range-input/Component.js.map +1 -0
  98. package/modern/components/date-range-input/index.css +11 -51
  99. package/modern/components/date-range-input/index.d.ts +1 -1
  100. package/modern/components/date-range-input/index.js +1 -0
  101. package/modern/components/date-range-input/index.js.map +1 -0
  102. package/modern/components/date-range-input/index.module.css.js +6 -0
  103. package/modern/components/date-range-input/index.module.css.js.map +1 -0
  104. package/modern/desktop/Component.desktop.d.ts +3 -5
  105. package/modern/desktop/Component.desktop.js +1 -0
  106. package/modern/desktop/Component.desktop.js.map +1 -0
  107. package/modern/desktop/index.d.ts +1 -2
  108. package/modern/desktop/index.js +1 -0
  109. package/modern/desktop/index.js.map +1 -0
  110. package/modern/index.d.ts +2 -3
  111. package/modern/index.js +1 -0
  112. package/modern/index.js.map +1 -0
  113. package/modern/mobile/Component.mobile.d.ts +3 -5
  114. package/modern/mobile/Component.mobile.js +1 -0
  115. package/modern/mobile/Component.mobile.js.map +1 -0
  116. package/modern/mobile/index.d.ts +1 -2
  117. package/modern/mobile/index.js +1 -0
  118. package/modern/mobile/index.js.map +1 -0
  119. package/modern/utils/format.d.ts +7 -8
  120. package/modern/utils/format.js +1 -0
  121. package/modern/utils/format.js.map +1 -0
  122. package/modern/utils/index.d.ts +1 -1
  123. package/modern/utils/index.js +1 -0
  124. package/modern/utils/index.js.map +1 -0
  125. package/moderncssm/Component.responsive.d.ts +4 -6
  126. package/moderncssm/Component.responsive.js +1 -0
  127. package/moderncssm/Component.responsive.js.map +1 -0
  128. package/moderncssm/components/date-range-input/Component.d.ts +8 -11
  129. package/moderncssm/components/date-range-input/Component.js +1 -0
  130. package/moderncssm/components/date-range-input/Component.js.map +1 -0
  131. package/moderncssm/components/date-range-input/index.d.ts +1 -1
  132. package/moderncssm/components/date-range-input/index.js +1 -0
  133. package/moderncssm/components/date-range-input/index.js.map +1 -0
  134. package/moderncssm/components/date-range-input/index.module.css +0 -21
  135. package/moderncssm/desktop/Component.desktop.d.ts +3 -5
  136. package/moderncssm/desktop/Component.desktop.js +1 -0
  137. package/moderncssm/desktop/Component.desktop.js.map +1 -0
  138. package/moderncssm/desktop/index.d.ts +1 -2
  139. package/moderncssm/desktop/index.js +1 -0
  140. package/moderncssm/desktop/index.js.map +1 -0
  141. package/moderncssm/index.d.ts +2 -3
  142. package/moderncssm/index.js +1 -0
  143. package/moderncssm/index.js.map +1 -0
  144. package/moderncssm/mobile/Component.mobile.d.ts +3 -5
  145. package/moderncssm/mobile/Component.mobile.js +1 -0
  146. package/moderncssm/mobile/Component.mobile.js.map +1 -0
  147. package/moderncssm/mobile/index.d.ts +1 -2
  148. package/moderncssm/mobile/index.js +1 -0
  149. package/moderncssm/mobile/index.js.map +1 -0
  150. package/moderncssm/utils/format.d.ts +7 -8
  151. package/moderncssm/utils/format.js +1 -0
  152. package/moderncssm/utils/format.js.map +1 -0
  153. package/moderncssm/utils/index.d.ts +1 -1
  154. package/moderncssm/utils/index.js +1 -0
  155. package/moderncssm/utils/index.js.map +1 -0
  156. package/package.json +9 -10
  157. package/src/components/date-range-input/index.module.css +1 -1
  158. package/utils/format.d.ts +7 -8
  159. package/utils/format.js +1 -0
  160. package/utils/format.js.map +1 -0
  161. package/utils/index.d.ts +1 -1
  162. package/utils/index.js +9 -8
  163. package/utils/index.js.map +1 -0
  164. package/desktop/package.json +0 -3
  165. package/mobile/package.json +0 -3
  166. package/src/desktop/package.json +0 -3
  167. package/src/mobile/package.json +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.responsive.js","sources":["../src/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { InputProps } from '@alfalab/core-components-input';\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { ConditionalProps, DateRangeInputProps } from './components/date-range-input';\nimport { DateRangeInputDesktop } from './desktop';\nimport { DateRangeInputMobile } from './mobile';\n\nexport type DateRangeInputResponsiveProps = Omit<\n DateRangeInputProps,\n 'view' | 'picker' | 'onClose' | 'InputComponent'\n> &\n ConditionalProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n };\n\nexport type DateRangeInputMedia = 'desktop' | 'mobile';\n\n/**\n * @deprecated\n * use UniversalDateInput instead\n */\nexport const DateRangeInputResponsive = forwardRef<HTMLInputElement, DateRangeInputResponsiveProps>(\n ({ breakpoint, client, ...restProps }, ref) => {\n const isDesktop = useIsDesktop(breakpoint, client === 'desktop');\n\n return isDesktop ? (\n <DateRangeInputDesktop {...restProps} ref={ref} />\n ) : (\n <DateRangeInputMobile {...restProps} ref={ref} />\n );\n },\n);\n"],"names":[],"mappings":";;;;;AA6BA;;;AAGG;AACU,MAAA,wBAAwB,GAAG,UAAU,CAC9C,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG,KAAI;IAC1C,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;AAEhE,IAAA,OAAO,SAAS,IACZ,KAAA,CAAA,aAAA,CAAC,qBAAqB,EAAA,EAAA,GAAK,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,KAElD,KAAA,CAAA,aAAA,CAAC,oBAAoB,EAAA,EAAA,GAAK,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,CACpD;AACL,CAAC;;;;"}
@@ -1,11 +1,9 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { ChangeEvent, ElementType } from "react";
4
- import { CalendarDesktopProps } from "@alfalab/core-components-calendar/desktop";
5
- import { CalendarMobileProps } from "@alfalab/core-components-calendar/mobile";
6
- import { InputProps } from "@alfalab/core-components-input";
7
- import { PopoverProps } from "@alfalab/core-components-popover";
8
- type ConditionalProps = {
1
+ import React, { ChangeEvent, ElementType } from 'react';
2
+ import type { CalendarDesktopProps } from '@alfalab/core-components-calendar/desktop';
3
+ import type { CalendarMobileProps } from '@alfalab/core-components-calendar/mobile';
4
+ import { InputProps } from '@alfalab/core-components-input';
5
+ import { PopoverProps } from '@alfalab/core-components-popover';
6
+ export declare type ConditionalProps = {
9
7
  /**
10
8
  * Обработчик изменения значения
11
9
  */
@@ -18,7 +16,7 @@ type ConditionalProps = {
18
16
  picker?: false;
19
17
  onClose?: never;
20
18
  };
21
- type DateRangeInputProps = Omit<InputProps, 'onChange'> & ConditionalProps & {
19
+ export declare type DateRangeInputProps = Omit<InputProps, 'onChange'> & ConditionalProps & {
22
20
  /**
23
21
  * Дополнительный класс
24
22
  */
@@ -113,5 +111,4 @@ type DateRangeInputProps = Omit<InputProps, 'onChange'> & ConditionalProps & {
113
111
  */
114
112
  disableUserInput?: boolean;
115
113
  };
116
- declare const DateRangeInput: React.ForwardRefExoticComponent<DateRangeInputProps & React.RefAttributes<HTMLInputElement>>;
117
- export { ConditionalProps, DateRangeInputProps, DateRangeInput };
114
+ export declare const DateRangeInput: React.ForwardRefExoticComponent<DateRangeInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -9,9 +9,7 @@ import { Popover } from '@alfalab/core-components-popover/modern';
9
9
  import { useDidUpdateEffect } from '@alfalab/hooks';
10
10
  import { CalendarMIcon } from '@alfalab/icons-glyph/CalendarMIcon';
11
11
  import { parseTimestampToDate, DATE_FORMAT, format, parseDateString, DATE_MASK, isCompleteDateInput, isValid } from '../../utils/format.js';
12
-
13
- const styles = {"component":"date-range-input__component_y3ej4","calendarContainer":"date-range-input__calendarContainer_y3ej4","calendarResponsive":"date-range-input__calendarResponsive_y3ej4","block":"date-range-input__block_y3ej4","calendarIcon":"date-range-input__calendarIcon_y3ej4"};
14
- require('./index.css')
12
+ import styles from './index.module.css.js';
15
13
 
16
14
  /* eslint-disable no-useless-escape, jsx-a11y/click-events-have-key-events */
17
15
  const DateRangeInput = React.forwardRef(({ className, inputClassName, popoverClassName, disabled, readOnly, disableUserInput = false, picker, defaultValue = '', value: propValue, onChange, onComplete, onClose, rightAddons, useAnchorWidth, block, popoverPosition = 'bottom-start', zIndexPopover, preventFlip, InputComponent, Calendar, calendarProps = {}, defaultMonth, minDate = calendarProps.minDate, maxDate = calendarProps.maxDate, offDays = calendarProps.offDays || [], events = calendarProps.events || [], defaultOpen = false, view = 'desktop', ...restProps }, ref) => {
@@ -206,3 +204,4 @@ const DateRangeInput = React.forwardRef(({ className, inputClassName, popoverCla
206
204
  });
207
205
 
208
206
  export { DateRangeInput };
207
+ //# sourceMappingURL=Component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/date-range-input/Component.tsx"],"sourcesContent":["/* eslint-disable no-useless-escape, jsx-a11y/click-events-have-key-events */\nimport React, {\n ChangeEvent,\n ElementType,\n FocusEvent,\n MouseEvent,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\nimport dateFnsIsValid from 'date-fns/isValid';\nimport startOfMonth from 'date-fns/startOfMonth';\n\nimport type { CalendarDesktopProps } from '@alfalab/core-components-calendar/desktop';\nimport type { CalendarMobileProps } from '@alfalab/core-components-calendar/mobile';\nimport { usePeriod } from '@alfalab/core-components-calendar/shared';\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport { InputProps } from '@alfalab/core-components-input';\nimport { Popover, PopoverProps } from '@alfalab/core-components-popover';\nimport { useDidUpdateEffect } from '@alfalab/hooks';\nimport { CalendarMIcon } from '@alfalab/icons-glyph/CalendarMIcon';\n\nimport {\n DATE_FORMAT,\n DATE_MASK,\n format,\n isCompleteDateInput,\n isValid,\n parseDateString,\n parseTimestampToDate,\n} from '../../utils';\n\nimport styles from './index.module.css';\n\nexport type ConditionalProps =\n | {\n /**\n * Обработчик изменения значения\n */\n picker: true;\n\n /**\n * Обработчик закрытия календаря\n */\n onClose?: () => void;\n }\n | { picker?: false; onClose?: never };\n\nexport type DateRangeInputProps = Omit<InputProps, 'onChange'> &\n ConditionalProps & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дополнительный класс для инпута\n */\n inputClassName?: string;\n\n /**\n * Дополнительный класс для поповера\n */\n popoverClassName?: string;\n\n /**\n * Обработчик изменения значения\n */\n onChange?: (\n payload: { dateFrom?: Date; dateTo?: Date; value: string },\n event?: ChangeEvent<HTMLInputElement>,\n ) => void;\n\n /**\n * Обработчик окончания ввода\n */\n onComplete?: (\n payload: { dateFrom: Date; dateTo: Date; value: string },\n event?: ChangeEvent<HTMLInputElement>,\n ) => void;\n\n /**\n * Компонент календаря\n */\n Calendar?: ElementType;\n\n /**\n * Доп. пропсы для календаря\n */\n calendarProps?:\n | (CalendarDesktopProps & Record<string, unknown>)\n | (CalendarMobileProps & Record<string, unknown>);\n\n /**\n * Месяц в календаре по умолчанию (timestamp)\n */\n defaultMonth?: number;\n\n /**\n * Минимальная дата, доступная для выбора (timestamp)\n */\n minDate?: number;\n\n /**\n * Максимальная дата, доступная для выбора (timestamp)\n */\n maxDate?: number;\n\n /**\n * Список событий\n */\n events?: Array<Date | number>;\n\n /**\n * Список выходных\n */\n offDays?: Array<Date | number>;\n\n /**\n * Состояние открытия по умолчанию\n */\n defaultOpen?: boolean;\n\n /**\n * Позиционирование поповера с календарем\n */\n popoverPosition?: PopoverProps['position'];\n\n /**\n * z-index Popover\n */\n zIndexPopover?: PopoverProps['zIndex'];\n\n /**\n * Запрещает поповеру менять свою позицию.\n * Например, если места снизу недостаточно, то он все равно будет показан снизу\n */\n preventFlip?: boolean;\n\n /**\n * Календарь будет принимать ширину инпута\n */\n useAnchorWidth?: boolean;\n\n /**\n * Растягивает компонент на ширину контейнера\n */\n block?: boolean;\n\n /**\n * Отображение компонента в мобильном или десктопном виде\n */\n view?: 'desktop' | 'mobile';\n\n /**\n * Компонент инпута\n */\n InputComponent?: ElementType;\n\n /**\n * Запретить ввод с клавиатуры\n */\n disableUserInput?: boolean;\n };\n\ntype GetDatesRet = { formattedValue: string; dateFrom?: Date; dateTo?: Date; dateArr: string[] };\n\nexport const DateRangeInput = React.forwardRef<HTMLInputElement, DateRangeInputProps>(\n (\n {\n className,\n inputClassName,\n popoverClassName,\n disabled,\n readOnly,\n disableUserInput = false,\n picker,\n defaultValue = '',\n value: propValue,\n onChange,\n onComplete,\n onClose,\n rightAddons,\n useAnchorWidth,\n block,\n popoverPosition = 'bottom-start',\n zIndexPopover,\n preventFlip,\n InputComponent,\n Calendar,\n calendarProps = {},\n defaultMonth,\n minDate = calendarProps.minDate,\n maxDate = calendarProps.maxDate,\n offDays = calendarProps.offDays || [],\n events = calendarProps.events || [],\n defaultOpen = false,\n view = 'desktop',\n ...restProps\n },\n ref,\n ) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const iconRef = useRef<HTMLButtonElement>(null);\n const calendarRef = useRef<HTMLDivElement>(null);\n\n const [value, setValue] = useState(propValue || defaultValue);\n const [open, setOpen] = useState(defaultOpen);\n\n const inputDisabled = disabled || readOnly;\n\n const calendarResponsive = calendarProps?.responsive ?? true;\n\n const { selectedFrom, selectedTo, updatePeriod, resetPeriod, setStart, setEnd } = usePeriod(\n { onPeriodChange: handlePeriodChange },\n );\n\n useEffect(() => {\n if (value) {\n setCalendarPeriod(getDates(value));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n setValue((prevValue) => {\n if (selectedFrom && selectedTo) {\n const from = parseTimestampToDate(selectedFrom);\n const to = parseTimestampToDate(selectedTo);\n\n return `${from} - ${to}`;\n }\n if (selectedFrom && prevValue.length < DATE_FORMAT.length) {\n return parseTimestampToDate(selectedFrom);\n }\n\n return prevValue;\n });\n }, [selectedFrom, selectedTo]);\n\n useDidUpdateEffect(() => {\n const newPropValue = propValue || '';\n\n setValue((prevValue) => {\n if (prevValue === newPropValue) {\n return prevValue;\n }\n\n const dates = getDates(newPropValue);\n\n setCalendarPeriod(dates);\n\n return dates.formattedValue;\n });\n }, [propValue]);\n\n function getDates(val: string): GetDatesRet {\n const formattedValue = format(val);\n\n const dateArr = formattedValue.split('-').map((v) => v.trim());\n const dateFrom = dateArr[0] ? parseDateString(dateArr[0]) : undefined;\n const dateTo = dateArr[1] ? parseDateString(dateArr[1]) : undefined;\n\n return { formattedValue, dateFrom, dateTo, dateArr };\n }\n\n function setCalendarPeriod({ dateFrom, dateTo }: GetDatesRet) {\n setStart(dateFrom?.getTime());\n setEnd(dateTo?.getTime());\n }\n\n function handlePeriodChange(from?: number, to?: number) {\n if (from && !to && value.length === DATE_MASK.length) {\n setValue(parseTimestampToDate(from));\n } else if (\n (!from && !to && value.length === DATE_FORMAT.length) ||\n (from === to && value.length === DATE_MASK.length)\n ) {\n setValue('');\n }\n\n const dateFrom = from ? new Date(from) : undefined;\n const dateTo = to ? new Date(to) : undefined;\n\n const newValue = ([from, to].filter(Boolean) as number[])\n .map((timestamp) => parseTimestampToDate(timestamp))\n .join(' - ');\n\n onChange?.({\n dateFrom,\n dateTo,\n value: newValue,\n });\n\n if (dateFrom && dateTo) {\n onComplete?.({\n dateFrom,\n dateTo,\n value: newValue,\n });\n }\n }\n\n const handleInputWrapperFocus = (event: FocusEvent<HTMLDivElement>) => {\n if (view === 'desktop') {\n if (picker) {\n setOpen(true);\n }\n\n if (!open && event.target.tagName !== 'INPUT' && calendarRef.current) {\n calendarRef.current.focus();\n }\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLDivElement>) => {\n if (view === 'desktop') {\n const target = (event.relatedTarget || document.activeElement) as HTMLElement;\n\n if (\n calendarRef.current?.contains(target) === false &&\n inputRef.current?.contains(target) === false &&\n iconRef.current?.contains(target) === false\n ) {\n setOpen(false);\n\n if (onClose) {\n onClose();\n }\n }\n }\n };\n\n // eslint-disable-next-line complexity\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n const { value: newValue } = event.target;\n\n if (newValue.length > DATE_MASK.length) return;\n\n // Позволяем вводить только цифры, точки, дефис и пробелы\n if (/[^\\d. -]/.test(newValue)) {\n return;\n }\n\n const dots = newValue.match(/\\./g);\n const hyphen = newValue.match(/\\-/g);\n\n // Не даем вводить больше, чем 4 точки и 1 дефис\n if ((dots && dots.length > 4) || (hyphen && hyphen.length > 1)) {\n return;\n }\n\n const { formattedValue, dateFrom, dateTo, dateArr } = getDates(newValue);\n\n if (!dateFrom && !dateTo) {\n resetPeriod();\n } else if (selectedFrom && formattedValue.length < DATE_FORMAT.length) {\n setStart();\n } else if (selectedFrom && selectedTo) {\n setEnd();\n } else if (\n dateFrom &&\n dateFnsIsValid(dateFrom) &&\n dateArr[0]?.length === DATE_FORMAT.length &&\n dateFrom.getTime() !== selectedFrom\n ) {\n setStart(dateFrom.getTime());\n } else if (\n dateTo &&\n dateFnsIsValid(dateTo) &&\n dateArr[1]?.length === DATE_FORMAT.length &&\n dateTo.getTime() !== selectedTo\n ) {\n setEnd(dateTo.getTime());\n }\n\n setValue(formattedValue);\n\n onChange?.({ dateFrom, dateTo, value: formattedValue }, event);\n\n if (isCompleteDateInput(formattedValue)) {\n const valid = isValid(formattedValue, dateArr[0], dateArr[1]);\n\n if (!valid) return;\n\n if (dateFrom && dateTo) {\n onComplete?.({ dateFrom, dateTo, value: formattedValue }, event);\n }\n }\n };\n\n const handleCalendarClose = () => {\n if (view === 'mobile' && onClose) {\n onClose();\n }\n\n setOpen(false);\n };\n\n const handleClear = () => {\n setValue('');\n resetPeriod();\n };\n\n const handleCalendarChange = (date?: number) => {\n updatePeriod(date);\n };\n\n const handleCalendarWrapperMouseDown = (event: MouseEvent<HTMLDivElement>) => {\n // Не дает инпуту терять фокус при выборе даты\n event.preventDefault();\n };\n\n const handleIconButtonClick = () => {\n if (!open) setOpen(true);\n\n if (view === 'desktop' && inputRef.current) {\n inputRef.current.focus();\n }\n };\n\n const renderCalendar = () => {\n const activeMonth =\n (selectedTo && startOfMonth(selectedTo)) ||\n (selectedFrom && startOfMonth(selectedFrom));\n\n return Calendar ? (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div onMouseDown={handleCalendarWrapperMouseDown}>\n <Calendar\n {...calendarProps}\n responsive={calendarResponsive}\n open={open}\n onClose={handleCalendarClose}\n ref={calendarRef}\n defaultMonth={activeMonth || defaultMonth}\n selectedFrom={selectedFrom}\n selectedTo={selectedTo}\n onChange={handleCalendarChange}\n minDate={minDate}\n maxDate={maxDate}\n offDays={offDays}\n events={events}\n />\n </div>\n ) : null;\n };\n\n return (\n <div\n className={cn(styles.component, className, {\n [styles.block]: block,\n })}\n onFocus={inputDisabled ? undefined : handleInputWrapperFocus}\n onBlur={handleBlur}\n >\n {InputComponent ? (\n <InputComponent\n autoComplete={picker ? 'off' : undefined}\n {...restProps}\n block={block}\n ref={mergeRefs([ref, inputRef])}\n value={value}\n onChange={handleChange}\n disabled={disabled}\n readOnly={readOnly}\n className={inputClassName}\n onClear={handleClear}\n disableUserInput={disableUserInput}\n rightAddons={\n <React.Fragment>\n {rightAddons}\n {picker && (\n <IconButton\n className={styles.calendarIcon}\n ref={iconRef}\n onClick={inputDisabled ? undefined : handleIconButtonClick}\n icon={CalendarMIcon}\n size='s'\n />\n )}\n </React.Fragment>\n }\n />\n ) : null}\n {picker &&\n (view === 'desktop' ? (\n <Popover\n open={open}\n useAnchorWidth={useAnchorWidth}\n anchorElement={inputRef.current as HTMLElement}\n popperClassName={cn(styles.calendarContainer, {\n [styles.calendarResponsive]: calendarResponsive,\n })}\n className={popoverClassName}\n position={popoverPosition}\n offset={[0, 8]}\n withTransition={false}\n preventFlip={preventFlip}\n zIndex={zIndexPopover}\n >\n {renderCalendar()}\n </Popover>\n ) : (\n renderCalendar()\n ))}\n </div>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;MAyKa,cAAc,GAAG,KAAK,CAAC,UAAU,CAC1C,CACI,EACI,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,gBAAgB,GAAG,KAAK,EACxB,MAAM,EACN,YAAY,GAAG,EAAE,EACjB,KAAK,EAAE,SAAS,EAChB,QAAQ,EACR,UAAU,EACV,OAAO,EACP,WAAW,EACX,cAAc,EACd,KAAK,EACL,eAAe,GAAG,cAAc,EAChC,aAAa,EACb,WAAW,EACX,cAAc,EACd,QAAQ,EACR,aAAa,GAAG,EAAE,EAClB,YAAY,EACZ,OAAO,GAAG,aAAa,CAAC,OAAO,EAC/B,OAAO,GAAG,aAAa,CAAC,OAAO,EAC/B,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,EAAE,EACrC,MAAM,GAAG,aAAa,CAAC,MAAM,IAAI,EAAE,EACnC,WAAW,GAAG,KAAK,EACnB,IAAI,GAAG,SAAS,EAChB,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC;AAC/C,IAAA,MAAM,OAAO,GAAG,MAAM,CAAoB,IAAI,CAAC;AAC/C,IAAA,MAAM,WAAW,GAAG,MAAM,CAAiB,IAAI,CAAC;AAEhD,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,SAAS,IAAI,YAAY,CAAC;IAC7D,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC;AAE7C,IAAA,M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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 */ /* 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
- } /* deprecated */ :root {
4
- --color-light-neutral-300: #e7e8eb; /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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
- } :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 */ /* 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 */ /* 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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
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 */
1
+ :root {
2
+ --color-light-neutral-300: #e7e8eb;
7
3
  } :root {
8
-
9
- /* Hard */
10
-
11
- /* Up */
12
-
13
- /* Hard up */
14
- } :root { /* deprecated */ /* deprecated */
15
- --border-radius-m: 8px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
16
-
17
- /* новые значения, используйте их */
4
+ --border-radius-m: 8px;
18
5
  --border-radius-8: var(--border-radius-m);
19
- } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
20
- --gap-s-neg: -12px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
21
-
22
- /* новые значения, используйте их */
23
-
24
- /* no-unit может приводить к проблемам в calc (#1559) */
25
- /* stylelint-disable-next-line length-zero-no-unit */
6
+ } :root {
7
+ --gap-s-neg: -12px;
26
8
  --gap-12-neg: var(--gap-s-neg);
27
9
  } :root {
28
- } /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
29
- } /* сбрасывает синюю подсветку при нажатии */ :root {
30
10
  --calendar-width: 344px;
31
-
32
- /* Кнопки выбора месяцев и годов */
33
-
34
- /* Шапка */
35
-
36
- /* День */
37
-
38
- /* today */
39
-
40
- /* highlighted */
41
-
42
- /* holidays */
43
-
44
- /* range */
45
-
46
- /* selected */
47
-
48
- /* disabled */
49
-
50
- /* marker */
51
11
  } :root {
52
12
  --calendar-popover-border-radius: var(--border-radius-8);
53
- } .date-range-input__component_y3ej4 {
13
+ } .date-range-input__component_1kofu {
54
14
  display: inline-block;
55
15
  outline: none;
56
16
  position: relative;
57
- } .date-range-input__calendarContainer_y3ej4 {
17
+ } .date-range-input__calendarContainer_1kofu {
58
18
  display: inline-block;
59
19
  box-sizing: border-box;
60
20
  border-radius: var(--calendar-popover-border-radius);
61
21
  border: 1px solid var(--color-light-neutral-300)
62
- } @media (max-width: 374px) { .date-range-input__calendarContainer_y3ej4 {
22
+ } @media (max-width: 374px) { .date-range-input__calendarContainer_1kofu {
63
23
  width: 100%;
64
24
  min-width: 288px
65
25
  }
66
- } .date-range-input__calendarResponsive_y3ej4 {
26
+ } .date-range-input__calendarResponsive_1kofu {
67
27
  width: var(--calendar-width);
68
- } .date-range-input__block_y3ej4 {
28
+ } .date-range-input__block_1kofu {
69
29
  width: 100%;
70
- } .date-range-input__calendarIcon_y3ej4 {
30
+ } .date-range-input__calendarIcon_1kofu {
71
31
  margin-right: var(--gap-12-neg);
72
32
  height: 100%;
73
33
  }
@@ -1 +1 @@
1
- export * from "./Component";
1
+ export * from './Component';
@@ -1 +1,2 @@
1
1
  export { DateRangeInput } from './Component.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import './index.css';
2
+
3
+ const styles = {"component":"date-range-input__component_1kofu","calendarContainer":"date-range-input__calendarContainer_1kofu","calendarResponsive":"date-range-input__calendarResponsive_1kofu","block":"date-range-input__block_1kofu","calendarIcon":"date-range-input__calendarIcon_1kofu"};
4
+
5
+ export { styles as default };
6
+ //# sourceMappingURL=index.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.module.css.js","sources":["../../src/components/date-range-input/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../../../../calendar/src/vars.css';\n\n:root {\n --calendar-popover-border-radius: var(--border-radius-8);\n}\n\n.component {\n display: inline-block;\n outline: none;\n position: relative;\n}\n\n.calendarContainer {\n display: inline-block;\n box-sizing: border-box;\n border-radius: var(--calendar-popover-border-radius);\n border: 1px solid var(--color-light-neutral-300);\n\n @media (max-width: 374px) {\n width: 100%;\n min-width: 288px;\n }\n}\n\n.calendarResponsive {\n width: var(--calendar-width);\n}\n\n.block {\n width: 100%;\n}\n\n.calendarIcon {\n margin-right: var(--gap-12-neg);\n height: 100%;\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,mCAAmC,CAAC,mBAAmB,CAAC,2CAA2C,CAAC,oBAAoB,CAAC,4CAA4C,CAAC,OAAO,CAAC,+BAA+B,CAAC,cAAc,CAAC,sCAAsC,CAAC;;;;"}
@@ -1,10 +1,8 @@
1
- /// <reference types="react" />
2
1
  import React from 'react';
3
- import { ConditionalProps, DateRangeInputProps } from "../components/date-range-input/index";
4
- type DateRangeInputDesktopProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
2
+ import { ConditionalProps, DateRangeInputProps } from '../components/date-range-input';
3
+ export declare type DateRangeInputDesktopProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
5
4
  /**
6
5
  * @deprecated
7
6
  * use UniversalDateInput instead
8
7
  */
9
- declare const DateRangeInputDesktop: React.ForwardRefExoticComponent<DateRangeInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
10
- export { DateRangeInputDesktopProps, DateRangeInputDesktop };
8
+ export declare const DateRangeInputDesktop: React.ForwardRefExoticComponent<DateRangeInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
@@ -10,3 +10,4 @@ import { DateRangeInput } from '../components/date-range-input/Component.js';
10
10
  const DateRangeInputDesktop = forwardRef((props, ref) => (React.createElement(DateRangeInput, { InputComponent: InputDesktop, Calendar: CalendarDesktop, ...props, ref: ref })));
11
11
 
12
12
  export { DateRangeInputDesktop };
13
+ //# sourceMappingURL=Component.desktop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.desktop.js","sources":["../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { CalendarDesktop } from '@alfalab/core-components-calendar/desktop';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { InputProps } from '@alfalab/core-components-input';\nimport { InputDesktop } from '@alfalab/core-components-input/desktop';\n\nimport {\n ConditionalProps,\n DateRangeInput,\n DateRangeInputProps,\n} from '../components/date-range-input';\n\nexport type DateRangeInputDesktopProps = Omit<\n DateRangeInputProps,\n 'view' | 'picker' | 'onClose' | 'InputComponent'\n> &\n ConditionalProps;\n\n/**\n * @deprecated\n * use UniversalDateInput instead\n */\nexport const DateRangeInputDesktop = forwardRef<HTMLInputElement, DateRangeInputDesktopProps>(\n (props, ref) => (\n <DateRangeInput\n InputComponent={InputDesktop}\n Calendar={CalendarDesktop}\n {...props}\n ref={ref}\n />\n ),\n);\n"],"names":[],"mappings":";;;;;AAmBA;;;AAGG;AACI,MAAM,qBAAqB,GAAG,UAAU,CAC3C,CAAC,KAAK,EAAE,GAAG,MACP,KAAC,CAAA,aAAA,CAAA,cAAc,EACX,EAAA,cAAc,EAAE,YAAY,EAC5B,QAAQ,EAAE,eAAe,EAAA,GACrB,KAAK,EACT,GAAG,EAAE,GAAG,EACV,CAAA,CACL;;;;"}
@@ -1,2 +1 @@
1
- export * from "./Component.desktop";
2
- export {};
1
+ export * from './Component.desktop';
@@ -1 +1,2 @@
1
1
  export { DateRangeInputDesktop } from './Component.desktop.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/modern/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- export { DateRangeInputResponsive as DateRangeInput } from "./Component.responsive";
2
- export type { DateRangeInputResponsiveProps as DateRangeInputProps } from "./Component.responsive";
3
- export {};
1
+ export { DateRangeInputResponsive as DateRangeInput } from './Component.responsive';
2
+ export type { DateRangeInputResponsiveProps as DateRangeInputProps } from './Component.responsive';
package/modern/index.js CHANGED
@@ -1 +1,2 @@
1
1
  export { DateRangeInputResponsive as DateRangeInput } from './Component.responsive.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,10 +1,8 @@
1
- /// <reference types="react" />
2
1
  import React from 'react';
3
- import { ConditionalProps, DateRangeInputProps } from "../components/date-range-input/index";
4
- type DateRangeInputMobileProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
2
+ import { ConditionalProps, DateRangeInputProps } from '../components/date-range-input';
3
+ export declare type DateRangeInputMobileProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
5
4
  /**
6
5
  * @deprecated
7
6
  * use UniversalDateInput instead
8
7
  */
9
- declare const DateRangeInputMobile: React.ForwardRefExoticComponent<DateRangeInputMobileProps & React.RefAttributes<HTMLInputElement>>;
10
- export { DateRangeInputMobileProps, DateRangeInputMobile };
8
+ export declare const DateRangeInputMobile: React.ForwardRefExoticComponent<DateRangeInputMobileProps & React.RefAttributes<HTMLInputElement>>;
@@ -10,3 +10,4 @@ import { DateRangeInput } from '../components/date-range-input/Component.js';
10
10
  const DateRangeInputMobile = forwardRef((props, ref) => (React.createElement(DateRangeInput, { InputComponent: InputMobile, Calendar: CalendarMobile, view: 'mobile', ...props, ref: ref })));
11
11
 
12
12
  export { DateRangeInputMobile };
13
+ //# sourceMappingURL=Component.mobile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.mobile.js","sources":["../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { CalendarMobile } from '@alfalab/core-components-calendar/mobile';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { InputProps } from '@alfalab/core-components-input';\nimport { InputMobile } from '@alfalab/core-components-input/mobile';\n\nimport {\n ConditionalProps,\n DateRangeInput,\n DateRangeInputProps,\n} from '../components/date-range-input';\n\nexport type DateRangeInputMobileProps = Omit<\n DateRangeInputProps,\n 'view' | 'picker' | 'onClose' | 'InputComponent'\n> &\n ConditionalProps;\n\n/**\n * @deprecated\n * use UniversalDateInput instead\n */\nexport const DateRangeInputMobile = forwardRef<HTMLInputElement, DateRangeInputMobileProps>(\n (props, ref) => (\n <DateRangeInput\n InputComponent={InputMobile}\n Calendar={CalendarMobile}\n view='mobile'\n {...props}\n ref={ref}\n />\n ),\n);\n"],"names":[],"mappings":";;;;;AAmBA;;;AAGG;AACU,MAAA,oBAAoB,GAAG,UAAU,CAC1C,CAAC,KAAK,EAAE,GAAG,MACP,KAAA,CAAA,aAAA,CAAC,cAAc,EACX,EAAA,cAAc,EAAE,WAAW,EAC3B,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAC,QAAQ,EACT,GAAA,KAAK,EACT,GAAG,EAAE,GAAG,EACV,CAAA,CACL;;;;"}
@@ -1,2 +1 @@
1
- export * from "./Component.mobile";
2
- export {};
1
+ export * from './Component.mobile';
@@ -1 +1,2 @@
1
1
  export { DateRangeInputMobile } from './Component.mobile.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,8 +1,7 @@
1
- declare const DATE_FORMAT = "dd.MM.yyyy";
2
- declare const DATE_MASK: (string | RegExp)[];
3
- declare const isCompleteDateInput: (input: string) => boolean;
4
- declare const parseDateString: (value: string, dateFormat?: string) => Date;
5
- declare const isValid: (inputValue: string, dateFrom: string, dateTo: string) => boolean;
6
- declare const format: (value: string) => string;
7
- declare const parseTimestampToDate: (timestamp: number) => string;
8
- export { DATE_FORMAT, DATE_MASK, isCompleteDateInput, parseDateString, isValid, format, parseTimestampToDate };
1
+ export declare const DATE_FORMAT = "dd.MM.yyyy";
2
+ export declare const DATE_MASK: (string | RegExp)[];
3
+ export declare const isCompleteDateInput: (input: string) => boolean;
4
+ export declare const parseDateString: (value: string, dateFormat?: string) => Date;
5
+ export declare const isValid: (inputValue: string, dateFrom: string, dateTo: string) => boolean;
6
+ export declare const format: (value: string) => string;
7
+ export declare const parseTimestampToDate: (timestamp: number) => string;
@@ -79,3 +79,4 @@ const parseTimestampToDate = (timestamp) => {
79
79
  };
80
80
 
81
81
  export { DATE_FORMAT, DATE_MASK, format, isCompleteDateInput, isValid, parseDateString, parseTimestampToDate };
82
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sources":["../../src/utils/format.ts"],"sourcesContent":["/* eslint-disable no-useless-escape */\n\nimport dateFnsIsValid from 'date-fns/isValid';\nimport parse from 'date-fns/parse';\n\nexport const DATE_FORMAT = 'dd.MM.yyyy';\nexport const DATE_MASK = [\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n ' ',\n '-',\n ' ',\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n];\n\nexport const isCompleteDateInput = (input: string) => input.length === DATE_MASK.length;\n\nexport const parseDateString = (value: string, dateFormat = DATE_FORMAT) =>\n parse(value, dateFormat, new Date());\n\nexport const isValid = (inputValue: string, dateFrom: string, dateTo: string) =>\n !inputValue ||\n (isCompleteDateInput(inputValue) &&\n dateFnsIsValid(parseDateString(dateFrom)) &&\n dateFnsIsValid(parseDateString(dateTo)));\n\nexport const format = (value: string): string =>\n value\n .replace(/^(\\d\\d)(\\d)$/, '$1.$2') // 121 => 12.1\n .replace(/^(\\d\\d)\\.(\\d\\d)(\\d)$/, '$1.$2.$3') // 12.122 => 12.12.2\n .replace(/^(\\d\\d)\\d\\.(.*)/, '$1.$2') // 123.12.2005 => 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d)\\d\\.(.*)/, '$1.$2') // 12.123.2005 => 12.12.2005\n .replace(/\\.$/, '') // 12. => 12\n .replace(/\\ $/, '') // 1 2 => 12\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)(\\d) - (\\d.*)/, '$1 - $3') // 12.12.20051 - 12.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) (\\d)- (\\d.*)/, '$1 - $3') // 12.12.2005 1- 12.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) -(\\d) (\\d.*)/, '$1 - $3') // 12.12.2005 -1 12.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d)(\\d\\d.\\d\\d.\\d\\d\\d)/, '$1 - $3') // 12.12.2005 - 112.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d)(\\d\\d.\\d.\\d\\d\\d\\d)/, '$1 - $3') // 12.12.2005 - 112.1.2001 => 12.12.2005 - 12.1.2001\n .replace(/^(\\d\\d\\.\\d\\d)(\\d\\d\\d\\d)/, '$1.$2') // 12.122005 => 12.12.2005\n .replace(/^(\\d\\d)(\\d\\d\\.\\d\\d\\d\\d)/, '$1.$2') // 1212.2005 => 12.12.2005\n .replace(/^(\\d\\d)(\\d.*)/, '$1.$2') // 1212 => 12.12\n .replace(/^(\\d\\d.\\d\\d)(\\d.*)/, '$1.$2') // 12.122 => 12.12.2\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)(\\d)/, '$1 - $2') // 12.12.20056 => 12.12.2005 - 6\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d\\d)(\\d)/, '$1 - $2.$3') // 12.12.2005 - 123 => 12.12.2005 - 12.3\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d\\d).(\\d\\d)(\\d)/, '$1 - $2.$3.$4') // 12.12.2005 - 12.123 => 12.12.2005 - 12.12.3\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)- (\\d.*)/, '$1 - $2') // 12.12.2005- 12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) -(\\d.*)/, '$1 - $2') // 12.12.2005 -12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) -/, '$1') // 12.12.2005 - => 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) (\\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) {2}(\\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)-/, '$1') // 12.12.2005- => 12.12.2005\n .replace(/^(\\d\\.\\d\\d\\.\\d\\d\\d\\d)([0-9]*)/, '$1') // 1.12.2005123123 => 1.12.2005\n .replace(/^(\\d\\d\\.\\d\\.\\d\\d\\d\\d)([0-9]*)/, '$1') // 01.2.20055125125 => 01.2.2005\n .replace(/^(\\d)\\.(\\d\\d)([0-9]*)\\.(\\d\\d\\d\\d)/, '$1.$2.$4') // 1.123123.2005 => 1.12.2005\n .replace(/^(\\d\\.\\d\\.\\d\\d\\d\\d)([0-9]*)/, '$1') // 1.2.20055125125 => 1.2.2005\n .replace(/^()\\.(\\d)\\.(\\d\\d\\d\\d)([0-9]*)/, '$1.$2.$3'); // .2.2005123123 => .2.2005\n\nexport const parseTimestampToDate = (timestamp: number): string => {\n const date = new Date(timestamp);\n const year = date.getFullYear();\n\n let month: number | string = date.getMonth() + 1;\n let day: number | string = date.getDate();\n\n if (month < 10) {\n month = `0${month}`;\n }\n if (day < 10) {\n day = `0${day}`;\n }\n\n return `${day}.${month}.${year}`;\n};\n"],"names":[],"mappings":";;;AAAA;AAKO,MAAM,WAAW,GAAG;AACd,MAAA,SAAS,GAAG;IACrB,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;;AAGK,MAAA,mBAAmB,GAAG,CAAC,KAAa,KAAK,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC;MAEpE,eAAe,GAAG,CAAC,KAAa,EAAE,UAAU,GAAG,WAAW,KACnE,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,I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C;AACrD,KAAA,OAAO,CAAC,iCAAiC,EAAE,SAAS,CAAC;AACrD,KAAA,OAAO,CAAC,2BAA2B,EAAE,IAAI,CAAC;AAC1C,KAAA,OAAO,CAAC,gCAAgC,EAAE,SAAS,CAAC;AACpD,KAAA,OAAO,CAAC,oCAAoC,EAAE,SAAS,CAAC;AACxD,KAAA,OAAO,CAAC,0BAA0B,EAAE,IAAI,CAAC;AACzC,KAAA,OAAO,CAAC,+BAA+B,EAAE,IAAI,CAAC;AAC9C,KAAA,OAAO,CAAC,+BAA+B,EAAE,IAAI,CAAC;AAC9C,KAAA,OAAO,CAAC,mCAAmC,EAAE,UAAU,CAAC;AACxD,KAAA,OAAO,CAAC,6BAA6B,EAAE,IAAI,CAAC;AAC5C,KAAA,OAAO,CAAC,+BAA+B,EAAE,UAAU,EAAE;AAEjD,MAAA,oBAAoB,GAAG,CAAC,SAAiB,KAAY;AAC9D,IAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC;AAChC,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE;IAE/B,IAAI,KAAK,GAAoB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC;AAChD,IAAA,IAAI,GAAG,GAAoB,IAAI,CAAC,OAAO,EAAE;IAEzC,IAAI,KAAK,GAAG,EAAE,EAAE;AACZ,QAAA,KAAK,GAAG,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE;AACtB;IACD,IAAI,GAAG,GAAG,EAAE,EAAE;AACV,QAAA,GAAG,GAAG,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE;AAClB;AAED,IAAA,OAAO,GAAG,GAAG,CAAA,CAAA,EAAI,KAAK,CAAI,CAAA,EAAA,IAAI,EAAE;AACpC;;;;"}
@@ -1 +1 @@
1
- export * from "./format";
1
+ export * from './format';
@@ -1 +1,2 @@
1
1
  export { DATE_FORMAT, DATE_MASK, format, isCompleteDateInput, isValid, parseDateString, parseTimestampToDate } from './format.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  import React from 'react';
3
- import { ConditionalProps, DateRangeInputProps } from "./components/date-range-input/index";
4
- type DateRangeInputResponsiveProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps & {
2
+ import { ConditionalProps, DateRangeInputProps } from './components/date-range-input';
3
+ export declare type DateRangeInputResponsiveProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps & {
5
4
  /**
6
5
  * Контрольная точка, с нее начинается desktop версия
7
6
  * @default 1024
@@ -12,10 +11,9 @@ type DateRangeInputResponsiveProps = Omit<DateRangeInputProps, 'view' | 'picker'
12
11
  */
13
12
  client?: 'desktop' | 'mobile';
14
13
  };
15
- type DateRangeInputMedia = 'desktop' | 'mobile';
14
+ export declare type DateRangeInputMedia = 'desktop' | 'mobile';
16
15
  /**
17
16
  * @deprecated
18
17
  * use UniversalDateInput instead
19
18
  */
20
- declare const DateRangeInputResponsive: React.ForwardRefExoticComponent<DateRangeInputResponsiveProps & React.RefAttributes<HTMLInputElement>>;
21
- export { DateRangeInputResponsiveProps, DateRangeInputMedia, DateRangeInputResponsive };
19
+ export declare const DateRangeInputResponsive: React.ForwardRefExoticComponent<DateRangeInputResponsiveProps & React.RefAttributes<HTMLInputElement>>;
@@ -13,3 +13,4 @@ const DateRangeInputResponsive = forwardRef(({ breakpoint, client, ...restProps
13
13
  });
14
14
 
15
15
  export { DateRangeInputResponsive };
16
+ //# sourceMappingURL=Component.responsive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.responsive.js","sources":["../src/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { InputProps } from '@alfalab/core-components-input';\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { ConditionalProps, DateRangeInputProps } from './components/date-range-input';\nimport { DateRangeInputDesktop } from './desktop';\nimport { DateRangeInputMobile } from './mobile';\n\nexport type DateRangeInputResponsiveProps = Omit<\n DateRangeInputProps,\n 'view' | 'picker' | 'onClose' | 'InputComponent'\n> &\n ConditionalProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n };\n\nexport type DateRangeInputMedia = 'desktop' | 'mobile';\n\n/**\n * @deprecated\n * use UniversalDateInput instead\n */\nexport const DateRangeInputResponsive = forwardRef<HTMLInputElement, DateRangeInputResponsiveProps>(\n ({ breakpoint, client, ...restProps }, ref) => {\n const isDesktop = useIsDesktop(breakpoint, client === 'desktop');\n\n return isDesktop ? (\n <DateRangeInputDesktop {...restProps} ref={ref} />\n ) : (\n <DateRangeInputMobile {...restProps} ref={ref} />\n );\n },\n);\n"],"names":[],"mappings":";;;;;AA6BA;;;AAGG;AACU,MAAA,wBAAwB,GAAG,UAAU,CAC9C,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG,KAAI;IAC1C,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;AAEhE,IAAA,OAAO,SAAS,IACZ,KAAA,CAAA,aAAA,CAAC,qBAAqB,EAAA,EAAA,GAAK,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,KAElD,KAAA,CAAA,aAAA,CAAC,oBAAoB,EAAA,EAAA,GAAK,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,CACpD;AACL,CAAC;;;;"}
@@ -1,11 +1,9 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { ChangeEvent, ElementType } from "react";
4
- import { CalendarDesktopProps } from "@alfalab/core-components-calendar/desktop";
5
- import { CalendarMobileProps } from "@alfalab/core-components-calendar/mobile";
6
- import { InputProps } from "@alfalab/core-components-input";
7
- import { PopoverProps } from "@alfalab/core-components-popover";
8
- type ConditionalProps = {
1
+ import React, { ChangeEvent, ElementType } from 'react';
2
+ import type { CalendarDesktopProps } from '@alfalab/core-components-calendar/desktop';
3
+ import type { CalendarMobileProps } from '@alfalab/core-components-calendar/mobile';
4
+ import { InputProps } from '@alfalab/core-components-input';
5
+ import { PopoverProps } from '@alfalab/core-components-popover';
6
+ export declare type ConditionalProps = {
9
7
  /**
10
8
  * Обработчик изменения значения
11
9
  */
@@ -18,7 +16,7 @@ type ConditionalProps = {
18
16
  picker?: false;
19
17
  onClose?: never;
20
18
  };
21
- type DateRangeInputProps = Omit<InputProps, 'onChange'> & ConditionalProps & {
19
+ export declare type DateRangeInputProps = Omit<InputProps, 'onChange'> & ConditionalProps & {
22
20
  /**
23
21
  * Дополнительный класс
24
22
  */
@@ -113,5 +111,4 @@ type DateRangeInputProps = Omit<InputProps, 'onChange'> & ConditionalProps & {
113
111
  */
114
112
  disableUserInput?: boolean;
115
113
  };
116
- declare const DateRangeInput: React.ForwardRefExoticComponent<DateRangeInputProps & React.RefAttributes<HTMLInputElement>>;
117
- export { ConditionalProps, DateRangeInputProps, DateRangeInput };
114
+ export declare const DateRangeInput: React.ForwardRefExoticComponent<DateRangeInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -204,3 +204,4 @@ const DateRangeInput = React.forwardRef(({ className, inputClassName, popoverCla
204
204
  });
205
205
 
206
206
  export { DateRangeInput };
207
+ //# sourceMappingURL=Component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/date-range-input/Component.tsx"],"sourcesContent":["/* eslint-disable no-useless-escape, jsx-a11y/click-events-have-key-events */\nimport React, {\n ChangeEvent,\n ElementType,\n FocusEvent,\n MouseEvent,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\nimport dateFnsIsValid from 'date-fns/isValid';\nimport startOfMonth from 'date-fns/startOfMonth';\n\nimport type { CalendarDesktopProps } from '@alfalab/core-components-calendar/desktop';\nimport type { CalendarMobileProps } from '@alfalab/core-components-calendar/mobile';\nimport { usePeriod } from '@alfalab/core-components-calendar/shared';\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport { InputProps } from '@alfalab/core-components-input';\nimport { Popover, PopoverProps } from '@alfalab/core-components-popover';\nimport { useDidUpdateEffect } from '@alfalab/hooks';\nimport { CalendarMIcon } from '@alfalab/icons-glyph/CalendarMIcon';\n\nimport {\n DATE_FORMAT,\n DATE_MASK,\n format,\n isCompleteDateInput,\n isValid,\n parseDateString,\n parseTimestampToDate,\n} from '../../utils';\n\nimport styles from './index.module.css';\n\nexport type ConditionalProps =\n | {\n /**\n * Обработчик изменения значения\n */\n picker: true;\n\n /**\n * Обработчик закрытия календаря\n */\n onClose?: () => void;\n }\n | { picker?: false; onClose?: never };\n\nexport type DateRangeInputProps = Omit<InputProps, 'onChange'> &\n ConditionalProps & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дополнительный класс для инпута\n */\n inputClassName?: string;\n\n /**\n * Дополнительный класс для поповера\n */\n popoverClassName?: string;\n\n /**\n * Обработчик изменения значения\n */\n onChange?: (\n payload: { dateFrom?: Date; dateTo?: Date; value: string },\n event?: ChangeEvent<HTMLInputElement>,\n ) => void;\n\n /**\n * Обработчик окончания ввода\n */\n onComplete?: (\n payload: { dateFrom: Date; dateTo: Date; value: string },\n event?: ChangeEvent<HTMLInputElement>,\n ) => void;\n\n /**\n * Компонент календаря\n */\n Calendar?: ElementType;\n\n /**\n * Доп. пропсы для календаря\n */\n calendarProps?:\n | (CalendarDesktopProps & Record<string, unknown>)\n | (CalendarMobileProps & Record<string, unknown>);\n\n /**\n * Месяц в календаре по умолчанию (timestamp)\n */\n defaultMonth?: number;\n\n /**\n * Минимальная дата, доступная для выбора (timestamp)\n */\n minDate?: number;\n\n /**\n * Максимальная дата, доступная для выбора (timestamp)\n */\n maxDate?: number;\n\n /**\n * Список событий\n */\n events?: Array<Date | number>;\n\n /**\n * Список выходных\n */\n offDays?: Array<Date | number>;\n\n /**\n * Состояние открытия по умолчанию\n */\n defaultOpen?: boolean;\n\n /**\n * Позиционирование поповера с календарем\n */\n popoverPosition?: PopoverProps['position'];\n\n /**\n * z-index Popover\n */\n zIndexPopover?: PopoverProps['zIndex'];\n\n /**\n * Запрещает поповеру менять свою позицию.\n * Например, если места снизу недостаточно, то он все равно будет показан снизу\n */\n preventFlip?: boolean;\n\n /**\n * Календарь будет принимать ширину инпута\n */\n useAnchorWidth?: boolean;\n\n /**\n * Растягивает компонент на ширину контейнера\n */\n block?: boolean;\n\n /**\n * Отображение компонента в мобильном или десктопном виде\n */\n view?: 'desktop' | 'mobile';\n\n /**\n * Компонент инпута\n */\n InputComponent?: ElementType;\n\n /**\n * Запретить ввод с клавиатуры\n */\n disableUserInput?: boolean;\n };\n\ntype GetDatesRet = { formattedValue: string; dateFrom?: Date; dateTo?: Date; dateArr: string[] };\n\nexport const DateRangeInput = React.forwardRef<HTMLInputElement, DateRangeInputProps>(\n (\n {\n className,\n inputClassName,\n popoverClassName,\n disabled,\n readOnly,\n disableUserInput = false,\n picker,\n defaultValue = '',\n value: propValue,\n onChange,\n onComplete,\n onClose,\n rightAddons,\n useAnchorWidth,\n block,\n popoverPosition = 'bottom-start',\n zIndexPopover,\n preventFlip,\n InputComponent,\n Calendar,\n calendarProps = {},\n defaultMonth,\n minDate = calendarProps.minDate,\n maxDate = calendarProps.maxDate,\n offDays = calendarProps.offDays || [],\n events = calendarProps.events || [],\n defaultOpen = false,\n view = 'desktop',\n ...restProps\n },\n ref,\n ) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const iconRef = useRef<HTMLButtonElement>(null);\n const calendarRef = useRef<HTMLDivElement>(null);\n\n const [value, setValue] = useState(propValue || defaultValue);\n const [open, setOpen] = useState(defaultOpen);\n\n const inputDisabled = disabled || readOnly;\n\n const calendarResponsive = calendarProps?.responsive ?? true;\n\n const { selectedFrom, selectedTo, updatePeriod, resetPeriod, setStart, setEnd } = usePeriod(\n { onPeriodChange: handlePeriodChange },\n );\n\n useEffect(() => {\n if (value) {\n setCalendarPeriod(getDates(value));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n setValue((prevValue) => {\n if (selectedFrom && selectedTo) {\n const from = parseTimestampToDate(selectedFrom);\n const to = parseTimestampToDate(selectedTo);\n\n return `${from} - ${to}`;\n }\n if (selectedFrom && prevValue.length < DATE_FORMAT.length) {\n return parseTimestampToDate(selectedFrom);\n }\n\n return prevValue;\n });\n }, [selectedFrom, selectedTo]);\n\n useDidUpdateEffect(() => {\n const newPropValue = propValue || '';\n\n setValue((prevValue) => {\n if (prevValue === newPropValue) {\n return prevValue;\n }\n\n const dates = getDates(newPropValue);\n\n setCalendarPeriod(dates);\n\n return dates.formattedValue;\n });\n }, [propValue]);\n\n function getDates(val: string): GetDatesRet {\n const formattedValue = format(val);\n\n const dateArr = formattedValue.split('-').map((v) => v.trim());\n const dateFrom = dateArr[0] ? parseDateString(dateArr[0]) : undefined;\n const dateTo = dateArr[1] ? parseDateString(dateArr[1]) : undefined;\n\n return { formattedValue, dateFrom, dateTo, dateArr };\n }\n\n function setCalendarPeriod({ dateFrom, dateTo }: GetDatesRet) {\n setStart(dateFrom?.getTime());\n setEnd(dateTo?.getTime());\n }\n\n function handlePeriodChange(from?: number, to?: number) {\n if (from && !to && value.length === DATE_MASK.length) {\n setValue(parseTimestampToDate(from));\n } else if (\n (!from && !to && value.length === DATE_FORMAT.length) ||\n (from === to && value.length === DATE_MASK.length)\n ) {\n setValue('');\n }\n\n const dateFrom = from ? new Date(from) : undefined;\n const dateTo = to ? new Date(to) : undefined;\n\n const newValue = ([from, to].filter(Boolean) as number[])\n .map((timestamp) => parseTimestampToDate(timestamp))\n .join(' - ');\n\n onChange?.({\n dateFrom,\n dateTo,\n value: newValue,\n });\n\n if (dateFrom && dateTo) {\n onComplete?.({\n dateFrom,\n dateTo,\n value: newValue,\n });\n }\n }\n\n const handleInputWrapperFocus = (event: FocusEvent<HTMLDivElement>) => {\n if (view === 'desktop') {\n if (picker) {\n setOpen(true);\n }\n\n if (!open && event.target.tagName !== 'INPUT' && calendarRef.current) {\n calendarRef.current.focus();\n }\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLDivElement>) => {\n if (view === 'desktop') {\n const target = (event.relatedTarget || document.activeElement) as HTMLElement;\n\n if (\n calendarRef.current?.contains(target) === false &&\n inputRef.current?.contains(target) === false &&\n iconRef.current?.contains(target) === false\n ) {\n setOpen(false);\n\n if (onClose) {\n onClose();\n }\n }\n }\n };\n\n // eslint-disable-next-line complexity\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n const { value: newValue } = event.target;\n\n if (newValue.length > DATE_MASK.length) return;\n\n // Позволяем вводить только цифры, точки, дефис и пробелы\n if (/[^\\d. -]/.test(newValue)) {\n return;\n }\n\n const dots = newValue.match(/\\./g);\n const hyphen = newValue.match(/\\-/g);\n\n // Не даем вводить больше, чем 4 точки и 1 дефис\n if ((dots && dots.length > 4) || (hyphen && hyphen.length > 1)) {\n return;\n }\n\n const { formattedValue, dateFrom, dateTo, dateArr } = getDates(newValue);\n\n if (!dateFrom && !dateTo) {\n resetPeriod();\n } else if (selectedFrom && formattedValue.length < DATE_FORMAT.length) {\n setStart();\n } else if (selectedFrom && selectedTo) {\n setEnd();\n } else if (\n dateFrom &&\n dateFnsIsValid(dateFrom) &&\n dateArr[0]?.length === DATE_FORMAT.length &&\n dateFrom.getTime() !== selectedFrom\n ) {\n setStart(dateFrom.getTime());\n } else if (\n dateTo &&\n dateFnsIsValid(dateTo) &&\n dateArr[1]?.length === DATE_FORMAT.length &&\n dateTo.getTime() !== selectedTo\n ) {\n setEnd(dateTo.getTime());\n }\n\n setValue(formattedValue);\n\n onChange?.({ dateFrom, dateTo, value: formattedValue }, event);\n\n if (isCompleteDateInput(formattedValue)) {\n const valid = isValid(formattedValue, dateArr[0], dateArr[1]);\n\n if (!valid) return;\n\n if (dateFrom && dateTo) {\n onComplete?.({ dateFrom, dateTo, value: formattedValue }, event);\n }\n }\n };\n\n const handleCalendarClose = () => {\n if (view === 'mobile' && onClose) {\n onClose();\n }\n\n setOpen(false);\n };\n\n const handleClear = () => {\n setValue('');\n resetPeriod();\n };\n\n const handleCalendarChange = (date?: number) => {\n updatePeriod(date);\n };\n\n const handleCalendarWrapperMouseDown = (event: MouseEvent<HTMLDivElement>) => {\n // Не дает инпуту терять фокус при выборе даты\n event.preventDefault();\n };\n\n const handleIconButtonClick = () => {\n if (!open) setOpen(true);\n\n if (view === 'desktop' && inputRef.current) {\n inputRef.current.focus();\n }\n };\n\n const renderCalendar = () => {\n const activeMonth =\n (selectedTo && startOfMonth(selectedTo)) ||\n (selectedFrom && startOfMonth(selectedFrom));\n\n return Calendar ? (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div onMouseDown={handleCalendarWrapperMouseDown}>\n <Calendar\n {...calendarProps}\n responsive={calendarResponsive}\n open={open}\n onClose={handleCalendarClose}\n ref={calendarRef}\n defaultMonth={activeMonth || defaultMonth}\n selectedFrom={selectedFrom}\n selectedTo={selectedTo}\n onChange={handleCalendarChange}\n minDate={minDate}\n maxDate={maxDate}\n offDays={offDays}\n events={events}\n />\n </div>\n ) : null;\n };\n\n return (\n <div\n className={cn(styles.component, className, {\n [styles.block]: block,\n })}\n onFocus={inputDisabled ? undefined : handleInputWrapperFocus}\n onBlur={handleBlur}\n >\n {InputComponent ? (\n <InputComponent\n autoComplete={picker ? 'off' : undefined}\n {...restProps}\n block={block}\n ref={mergeRefs([ref, inputRef])}\n value={value}\n onChange={handleChange}\n disabled={disabled}\n readOnly={readOnly}\n className={inputClassName}\n onClear={handleClear}\n disableUserInput={disableUserInput}\n rightAddons={\n <React.Fragment>\n {rightAddons}\n {picker && (\n <IconButton\n className={styles.calendarIcon}\n ref={iconRef}\n onClick={inputDisabled ? undefined : handleIconButtonClick}\n icon={CalendarMIcon}\n size='s'\n />\n )}\n </React.Fragment>\n }\n />\n ) : null}\n {picker &&\n (view === 'desktop' ? (\n <Popover\n open={open}\n useAnchorWidth={useAnchorWidth}\n anchorElement={inputRef.current as HTMLElement}\n popperClassName={cn(styles.calendarContainer, {\n [styles.calendarResponsive]: calendarResponsive,\n })}\n className={popoverClassName}\n position={popoverPosition}\n offset={[0, 8]}\n withTransition={false}\n preventFlip={preventFlip}\n zIndex={zIndexPopover}\n >\n {renderCalendar()}\n </Popover>\n ) : (\n renderCalendar()\n ))}\n </div>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;MAyKa,cAAc,GAAG,KAAK,CAAC,UAAU,CAC1C,CACI,EACI,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,gBAAgB,GAAG,KAAK,EACxB,MAAM,EACN,YAAY,GAAG,EAAE,EACjB,KAAK,EAAE,SAAS,EAChB,QAAQ,EACR,UAAU,EACV,OAAO,EACP,WAAW,EACX,cAAc,EACd,KAAK,EACL,eAAe,GAAG,cAAc,EAChC,aAAa,EACb,WAAW,EACX,cAAc,EACd,QAAQ,EACR,aAAa,GAAG,EAAE,EAClB,YAAY,EACZ,OAAO,GAAG,aAAa,CAAC,OAAO,EAC/B,OAAO,GAAG,aAAa,CAAC,OAAO,EAC/B,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,EAAE,EACrC,MAAM,GAAG,aAAa,CAAC,MAAM,IAAI,EAAE,EACnC,WAAW,GAAG,KAAK,EACnB,IAAI,GAAG,SAAS,EAChB,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC;AAC/C,IAAA,MAAM,OAAO,GAAG,MAAM,CAAoB,IAAI,CAAC;AAC/C,IAAA,MAAM,WAAW,GAAG,MAAM,CAAiB,IAAI,CA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AM,EAAE,aAAa,EAEpB,EAAA,cAAc,EAAE,CACX,KAEV,cAAc,EAAE,CACnB,CAAC,CACJ;AAEd,CAAC;;;;"}
@@ -1 +1 @@
1
- export * from "./Component";
1
+ export * from './Component';
@@ -1 +1,2 @@
1
1
  export { DateRangeInput } from './Component.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}