@alfalab/core-components-date-range-input 3.5.28 → 49.0.0-snapshot-fbb690e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component.responsive.d.ts +30 -6
- package/Component.responsive.js +4 -3
- package/Component.responsive.js.map +1 -0
- package/components/date-range-input/Component.d.ts +208 -11
- package/components/date-range-input/Component.js +26 -27
- package/components/date-range-input/Component.js.map +1 -0
- package/components/date-range-input/index.css +11 -51
- package/components/date-range-input/index.d.ts +1 -1
- package/components/date-range-input/index.js +3 -2
- package/components/date-range-input/index.js.map +1 -0
- package/components/date-range-input/index.module.css.js +8 -0
- package/components/date-range-input/index.module.css.js.map +1 -0
- package/cssm/Component.responsive.d.ts +30 -6
- package/cssm/Component.responsive.js +6 -5
- package/cssm/Component.responsive.js.map +1 -0
- package/cssm/components/date-range-input/Component.d.ts +208 -11
- package/cssm/components/date-range-input/Component.js +24 -23
- package/cssm/components/date-range-input/Component.js.map +1 -0
- package/cssm/components/date-range-input/index.d.ts +1 -1
- package/cssm/components/date-range-input/index.js +3 -2
- package/cssm/components/date-range-input/index.js.map +1 -0
- package/cssm/components/date-range-input/index.module.css +5 -44
- package/cssm/desktop/Component.desktop.d.ts +9 -5
- package/cssm/desktop/Component.desktop.js +5 -4
- package/cssm/desktop/Component.desktop.js.map +1 -0
- package/cssm/desktop/index.d.ts +1 -2
- package/cssm/desktop/index.js +3 -2
- package/cssm/desktop/index.js.map +1 -0
- package/cssm/index.d.ts +2 -3
- package/cssm/index.js +1 -0
- package/cssm/index.js.map +1 -0
- package/cssm/mobile/Component.mobile.d.ts +9 -5
- package/cssm/mobile/Component.mobile.js +5 -4
- package/cssm/mobile/Component.mobile.js.map +1 -0
- package/cssm/mobile/index.d.ts +1 -2
- package/cssm/mobile/index.js +3 -2
- package/cssm/mobile/index.js.map +1 -0
- package/cssm/utils/format.d.ts +7 -8
- package/cssm/utils/format.js +1 -0
- package/cssm/utils/format.js.map +1 -0
- package/cssm/utils/index.d.ts +1 -1
- package/cssm/utils/index.js +9 -8
- package/cssm/utils/index.js.map +1 -0
- package/desktop/Component.desktop.d.ts +9 -5
- package/desktop/Component.desktop.js +5 -4
- package/desktop/Component.desktop.js.map +1 -0
- package/desktop/index.d.ts +1 -2
- package/desktop/index.js +3 -2
- package/desktop/index.js.map +1 -0
- package/esm/Component.responsive.d.ts +30 -6
- package/esm/Component.responsive.js +1 -0
- package/esm/Component.responsive.js.map +1 -0
- package/esm/components/date-range-input/Component.d.ts +208 -11
- package/esm/components/date-range-input/Component.js +2 -3
- package/esm/components/date-range-input/Component.js.map +1 -0
- package/esm/components/date-range-input/index.css +11 -51
- package/esm/components/date-range-input/index.d.ts +1 -1
- package/esm/components/date-range-input/index.js +1 -0
- package/esm/components/date-range-input/index.js.map +1 -0
- package/esm/components/date-range-input/index.module.css.js +6 -0
- package/esm/components/date-range-input/index.module.css.js.map +1 -0
- package/esm/desktop/Component.desktop.d.ts +9 -5
- package/esm/desktop/Component.desktop.js +1 -0
- package/esm/desktop/Component.desktop.js.map +1 -0
- package/esm/desktop/index.d.ts +1 -2
- package/esm/desktop/index.js +1 -0
- package/esm/desktop/index.js.map +1 -0
- package/esm/index.d.ts +2 -3
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -0
- package/esm/mobile/Component.mobile.d.ts +9 -5
- package/esm/mobile/Component.mobile.js +1 -0
- package/esm/mobile/Component.mobile.js.map +1 -0
- package/esm/mobile/index.d.ts +1 -2
- package/esm/mobile/index.js +1 -0
- package/esm/mobile/index.js.map +1 -0
- package/esm/utils/format.d.ts +7 -8
- package/esm/utils/format.js +1 -0
- package/esm/utils/format.js.map +1 -0
- package/esm/utils/index.d.ts +1 -1
- package/esm/utils/index.js +1 -0
- package/esm/utils/index.js.map +1 -0
- package/index.d.ts +2 -3
- package/index.js +1 -0
- package/index.js.map +1 -0
- package/mobile/Component.mobile.d.ts +9 -5
- package/mobile/Component.mobile.js +5 -4
- package/mobile/Component.mobile.js.map +1 -0
- package/mobile/index.d.ts +1 -2
- package/mobile/index.js +3 -2
- package/mobile/index.js.map +1 -0
- package/modern/Component.responsive.d.ts +30 -6
- package/modern/Component.responsive.js +1 -0
- package/modern/Component.responsive.js.map +1 -0
- package/modern/components/date-range-input/Component.d.ts +208 -11
- package/modern/components/date-range-input/Component.js +2 -3
- package/modern/components/date-range-input/Component.js.map +1 -0
- package/modern/components/date-range-input/index.css +11 -51
- package/modern/components/date-range-input/index.d.ts +1 -1
- package/modern/components/date-range-input/index.js +1 -0
- package/modern/components/date-range-input/index.js.map +1 -0
- package/modern/components/date-range-input/index.module.css.js +6 -0
- package/modern/components/date-range-input/index.module.css.js.map +1 -0
- package/modern/desktop/Component.desktop.d.ts +9 -5
- package/modern/desktop/Component.desktop.js +1 -0
- package/modern/desktop/Component.desktop.js.map +1 -0
- package/modern/desktop/index.d.ts +1 -2
- package/modern/desktop/index.js +1 -0
- package/modern/desktop/index.js.map +1 -0
- package/modern/index.d.ts +2 -3
- package/modern/index.js +1 -0
- package/modern/index.js.map +1 -0
- package/modern/mobile/Component.mobile.d.ts +9 -5
- package/modern/mobile/Component.mobile.js +1 -0
- package/modern/mobile/Component.mobile.js.map +1 -0
- package/modern/mobile/index.d.ts +1 -2
- package/modern/mobile/index.js +1 -0
- package/modern/mobile/index.js.map +1 -0
- package/modern/utils/format.d.ts +7 -8
- package/modern/utils/format.js +1 -0
- package/modern/utils/format.js.map +1 -0
- package/modern/utils/index.d.ts +1 -1
- package/modern/utils/index.js +1 -0
- package/modern/utils/index.js.map +1 -0
- package/moderncssm/Component.responsive.d.ts +30 -6
- package/moderncssm/Component.responsive.js +1 -0
- package/moderncssm/Component.responsive.js.map +1 -0
- package/moderncssm/components/date-range-input/Component.d.ts +208 -11
- package/moderncssm/components/date-range-input/Component.js +1 -0
- package/moderncssm/components/date-range-input/Component.js.map +1 -0
- package/moderncssm/components/date-range-input/index.d.ts +1 -1
- package/moderncssm/components/date-range-input/index.js +1 -0
- package/moderncssm/components/date-range-input/index.js.map +1 -0
- package/moderncssm/components/date-range-input/index.module.css +0 -21
- package/moderncssm/desktop/Component.desktop.d.ts +9 -5
- package/moderncssm/desktop/Component.desktop.js +1 -0
- package/moderncssm/desktop/Component.desktop.js.map +1 -0
- package/moderncssm/desktop/index.d.ts +1 -2
- package/moderncssm/desktop/index.js +1 -0
- package/moderncssm/desktop/index.js.map +1 -0
- package/moderncssm/index.d.ts +2 -3
- package/moderncssm/index.js +1 -0
- package/moderncssm/index.js.map +1 -0
- package/moderncssm/mobile/Component.mobile.d.ts +9 -5
- package/moderncssm/mobile/Component.mobile.js +1 -0
- package/moderncssm/mobile/Component.mobile.js.map +1 -0
- package/moderncssm/mobile/index.d.ts +1 -2
- package/moderncssm/mobile/index.js +1 -0
- package/moderncssm/mobile/index.js.map +1 -0
- package/moderncssm/utils/format.d.ts +7 -8
- package/moderncssm/utils/format.js +1 -0
- package/moderncssm/utils/format.js.map +1 -0
- package/moderncssm/utils/index.d.ts +1 -1
- package/moderncssm/utils/index.js +1 -0
- package/moderncssm/utils/index.js.map +1 -0
- package/package.json +9 -10
- package/utils/format.d.ts +7 -8
- package/utils/format.js +1 -0
- package/utils/format.js.map +1 -0
- package/utils/index.d.ts +1 -1
- package/utils/index.js +9 -8
- package/utils/index.js.map +1 -0
|
@@ -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":["React","__rest","useRef","useState","usePeriod","useEffect","parseTimestampToDate","DATE_FORMAT","useDidUpdateEffect","format","parseDateString","DATE_MASK","dateFnsIsValid","isCompleteDateInput","isValid","startOfMonth","__assign","cn","styles","mergeRefs","IconButton","CalendarMIcon","Popover"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyKa,IAAA,cAAc,GAAGA,sBAAK,CAAC,UAAU,CAC1C,UACI,EA8BC,EACD,GAAG,EAAA;;;AA9BC,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,gBAAgB,GAAA,EAAA,CAAA,gBAAA,EAChB,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,EAAwB,GAAA,EAAA,CAAA,gBAAA,EAAxB,gBAAgB,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,EACxB,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,EAAA,GAAA,EAAA,CAAA,YAAiB,EAAjB,YAAY,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,KAAA,EACV,SAAS,GAAA,EAAA,CAAA,KAAA,EAChB,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,UAAU,gBAAA,EACV,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,cAAc,oBAAA,EACd,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,EAAgC,GAAA,EAAA,CAAA,eAAA,EAAhC,eAAe,GAAA,EA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A,uBAAM,CAAC,kBAAkB,CAAA,GAAG,kBAAkB;AACjD,oBAAA,EAAA,EAAA,EACF,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EACd,cAAc,EAAE,KAAK,EACrB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,aAAa,EAEpB,EAAA,cAAc,EAAE,CACX,KAEV,cAAc,EAAE,CACnB,CAAC,CACJ;AAEd,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './Component';
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var Component = require('./Component.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.DateRangeInput =
|
|
9
|
+
exports.DateRangeInput = Component.DateRangeInput;
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,52 +1,13 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
|
|
3
|
-
--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 */
|
|
4
|
-
} :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 */
|
|
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 */
|
|
1
|
+
:root {
|
|
2
|
+
--color-light-neutral-300: #e7e8eb;
|
|
6
3
|
} :root {
|
|
7
|
-
|
|
8
|
-
/* Hard */
|
|
9
|
-
|
|
10
|
-
/* Up */
|
|
11
|
-
|
|
12
|
-
/* Hard up */
|
|
13
|
-
} :root { /* deprecated */ /* deprecated */
|
|
14
|
-
--border-radius-m: 8px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
15
|
-
|
|
16
|
-
/* новые значения, используйте их */
|
|
4
|
+
--border-radius-m: 8px;
|
|
17
5
|
--border-radius-8: var(--border-radius-m);
|
|
18
|
-
} :root {
|
|
19
|
-
--gap-s-neg: -12px;
|
|
20
|
-
|
|
21
|
-
/* новые значения, используйте их */
|
|
22
|
-
|
|
23
|
-
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
24
|
-
/* stylelint-disable-next-line length-zero-no-unit */
|
|
6
|
+
} :root {
|
|
7
|
+
--gap-s-neg: -12px;
|
|
25
8
|
--gap-12-neg: var(--gap-s-neg);
|
|
26
9
|
} :root {
|
|
27
|
-
} /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
|
|
28
|
-
} /* сбрасывает синюю подсветку при нажатии */ :root {
|
|
29
10
|
--calendar-width: 344px;
|
|
30
|
-
|
|
31
|
-
/* Кнопки выбора месяцев и годов */
|
|
32
|
-
|
|
33
|
-
/* Шапка */
|
|
34
|
-
|
|
35
|
-
/* День */
|
|
36
|
-
|
|
37
|
-
/* today */
|
|
38
|
-
|
|
39
|
-
/* highlighted */
|
|
40
|
-
|
|
41
|
-
/* holidays */
|
|
42
|
-
|
|
43
|
-
/* range */
|
|
44
|
-
|
|
45
|
-
/* selected */
|
|
46
|
-
|
|
47
|
-
/* disabled */
|
|
48
|
-
|
|
49
|
-
/* marker */
|
|
50
11
|
} :root {
|
|
51
12
|
--calendar-popover-border-radius: var(--border-radius-8);
|
|
52
13
|
} .component {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from
|
|
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<
|
|
10
|
-
|
|
8
|
+
export declare const DateRangeInputDesktop: React.ForwardRefExoticComponent<(Omit<Omit<DateRangeInputProps, "view" | "picker" | "onClose" | "InputComponent"> & {
|
|
9
|
+
picker: true;
|
|
10
|
+
onClose?: (() => void) | undefined;
|
|
11
|
+
}, "ref"> | Omit<Omit<DateRangeInputProps, "view" | "picker" | "onClose" | "InputComponent"> & {
|
|
12
|
+
picker?: false | undefined;
|
|
13
|
+
onClose?: undefined;
|
|
14
|
+
}, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var desktop
|
|
8
|
-
var desktop = require('@alfalab/core-components-input/cssm/desktop');
|
|
9
|
-
var
|
|
7
|
+
var desktop = require('@alfalab/core-components-calendar/cssm/desktop');
|
|
8
|
+
var desktop$1 = require('@alfalab/core-components-input/cssm/desktop');
|
|
9
|
+
var Component = require('../components/date-range-input/Component.js');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
12
|
|
|
@@ -16,6 +16,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
16
16
|
* @deprecated
|
|
17
17
|
* use UniversalDateInput instead
|
|
18
18
|
*/
|
|
19
|
-
var DateRangeInputDesktop = React.forwardRef(function (props, ref) { return (React__default.default.createElement(
|
|
19
|
+
var DateRangeInputDesktop = React.forwardRef(function (props, ref) { return (React__default.default.createElement(Component.DateRangeInput, tslib.__assign({ InputComponent: desktop$1.InputDesktop, Calendar: desktop.CalendarDesktop }, props, { ref: ref }))); });
|
|
20
20
|
|
|
21
21
|
exports.DateRangeInputDesktop = DateRangeInputDesktop;
|
|
22
|
+
//# 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":["forwardRef","React","DateRangeInput","__assign","InputDesktop","CalendarDesktop"],"mappings":";;;;;;;;;;;;;;AAmBA;;;AAGG;AACI,IAAM,qBAAqB,GAAGA,gBAAU,CAC3C,UAAC,KAAK,EAAE,GAAG,EAAK,EAAA,QACZC,sBAAA,CAAA,aAAA,CAACC,wBAAc,EACXC,cAAA,CAAA,EAAA,cAAc,EAAEC,sBAAY,EAC5B,QAAQ,EAAEC,uBAAe,IACrB,KAAK,EAAA,EACT,GAAG,EAAE,GAAG,EACV,CAAA,CAAA,EANU,EAOf;;;;"}
|
package/cssm/desktop/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export {};
|
|
1
|
+
export * from './Component.desktop';
|
package/cssm/desktop/index.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var Component_desktop = require('./Component.desktop.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.DateRangeInputDesktop =
|
|
9
|
+
exports.DateRangeInputDesktop = Component_desktop.DateRangeInputDesktop;
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/cssm/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export { DateRangeInputResponsive as DateRangeInput } from
|
|
2
|
-
export type { DateRangeInputResponsiveProps as DateRangeInputProps } from
|
|
3
|
-
export {};
|
|
1
|
+
export { DateRangeInputResponsive as DateRangeInput } from './Component.responsive';
|
|
2
|
+
export type { DateRangeInputResponsiveProps as DateRangeInputProps } from './Component.responsive';
|
package/cssm/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from
|
|
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<
|
|
10
|
-
|
|
8
|
+
export declare const DateRangeInputMobile: React.ForwardRefExoticComponent<(Omit<Omit<DateRangeInputProps, "view" | "picker" | "onClose" | "InputComponent"> & {
|
|
9
|
+
picker: true;
|
|
10
|
+
onClose?: (() => void) | undefined;
|
|
11
|
+
}, "ref"> | Omit<Omit<DateRangeInputProps, "view" | "picker" | "onClose" | "InputComponent"> & {
|
|
12
|
+
picker?: false | undefined;
|
|
13
|
+
onClose?: undefined;
|
|
14
|
+
}, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var mobile
|
|
8
|
-
var mobile = require('@alfalab/core-components-input/cssm/mobile');
|
|
9
|
-
var
|
|
7
|
+
var mobile = require('@alfalab/core-components-calendar/cssm/mobile');
|
|
8
|
+
var mobile$1 = require('@alfalab/core-components-input/cssm/mobile');
|
|
9
|
+
var Component = require('../components/date-range-input/Component.js');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
12
|
|
|
@@ -16,6 +16,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
16
16
|
* @deprecated
|
|
17
17
|
* use UniversalDateInput instead
|
|
18
18
|
*/
|
|
19
|
-
var DateRangeInputMobile = React.forwardRef(function (props, ref) { return (React__default.default.createElement(
|
|
19
|
+
var DateRangeInputMobile = React.forwardRef(function (props, ref) { return (React__default.default.createElement(Component.DateRangeInput, tslib.__assign({ InputComponent: mobile$1.InputMobile, Calendar: mobile.CalendarMobile, view: 'mobile' }, props, { ref: ref }))); });
|
|
20
20
|
|
|
21
21
|
exports.DateRangeInputMobile = DateRangeInputMobile;
|
|
22
|
+
//# 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":["forwardRef","React","DateRangeInput","__assign","InputMobile","CalendarMobile"],"mappings":";;;;;;;;;;;;;;AAmBA;;;AAGG;AACU,IAAA,oBAAoB,GAAGA,gBAAU,CAC1C,UAAC,KAAK,EAAE,GAAG,IAAK,QACZC,qCAACC,wBAAc,EAAAC,cAAA,CAAA,EACX,cAAc,EAAEC,oBAAW,EAC3B,QAAQ,EAAEC,qBAAc,EACxB,IAAI,EAAC,QAAQ,EACT,EAAA,KAAK,EACT,EAAA,GAAG,EAAE,GAAG,EAAA,CAAA,CACV,EAPU,EAQf;;;;"}
|
package/cssm/mobile/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export {};
|
|
1
|
+
export * from './Component.mobile';
|
package/cssm/mobile/index.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var Component_mobile = require('./Component.mobile.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.DateRangeInputMobile =
|
|
9
|
+
exports.DateRangeInputMobile = Component_mobile.DateRangeInputMobile;
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/cssm/utils/format.d.ts
CHANGED
|
@@ -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;
|
package/cssm/utils/format.js
CHANGED
|
@@ -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":["parse","dateFnsIsValid"],"mappings":";;;;;;;;;;;;AAAA;AAKO,IAAM,WAAW,GAAG;AACd,IAAA,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,IAAA,mBAAmB,GAAG,UAAC,KAAa,EAAK,EAAA,OAAA,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM,CAAA;AAE1E,IAAA,eAAe,GAAG,UAAC,KAAa,EAAE,UAAwB,EAAA;AAAxB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GAAA,CAAA,CAAA,MAAA,CAAI,KAAK,EAAI,GAAA,CAAA,CAAA,MAAA,CAAA,IAAI,CAAE;AACpC;;;;;;;;;;"}
|
package/cssm/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './format';
|
package/cssm/utils/index.js
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var format = require('./format.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.DATE_FORMAT =
|
|
10
|
-
exports.DATE_MASK =
|
|
11
|
-
exports.format =
|
|
12
|
-
exports.isCompleteDateInput =
|
|
13
|
-
exports.isValid =
|
|
14
|
-
exports.parseDateString =
|
|
15
|
-
exports.parseTimestampToDate =
|
|
9
|
+
exports.DATE_FORMAT = format.DATE_FORMAT;
|
|
10
|
+
exports.DATE_MASK = format.DATE_MASK;
|
|
11
|
+
exports.format = format.format;
|
|
12
|
+
exports.isCompleteDateInput = format.isCompleteDateInput;
|
|
13
|
+
exports.isValid = format.isValid;
|
|
14
|
+
exports.parseDateString = format.parseDateString;
|
|
15
|
+
exports.parseTimestampToDate = format.parseTimestampToDate;
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from
|
|
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<
|
|
10
|
-
|
|
8
|
+
export declare const DateRangeInputDesktop: React.ForwardRefExoticComponent<(Omit<Omit<DateRangeInputProps, "view" | "picker" | "onClose" | "InputComponent"> & {
|
|
9
|
+
picker: true;
|
|
10
|
+
onClose?: (() => void) | undefined;
|
|
11
|
+
}, "ref"> | Omit<Omit<DateRangeInputProps, "view" | "picker" | "onClose" | "InputComponent"> & {
|
|
12
|
+
picker?: false | undefined;
|
|
13
|
+
onClose?: undefined;
|
|
14
|
+
}, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var desktop
|
|
8
|
-
var desktop = require('@alfalab/core-components-input/desktop');
|
|
9
|
-
var
|
|
7
|
+
var desktop = require('@alfalab/core-components-calendar/desktop');
|
|
8
|
+
var desktop$1 = require('@alfalab/core-components-input/desktop');
|
|
9
|
+
var Component = require('../components/date-range-input/Component.js');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
12
|
|
|
@@ -16,6 +16,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
16
16
|
* @deprecated
|
|
17
17
|
* use UniversalDateInput instead
|
|
18
18
|
*/
|
|
19
|
-
var DateRangeInputDesktop = React.forwardRef(function (props, ref) { return (React__default.default.createElement(
|
|
19
|
+
var DateRangeInputDesktop = React.forwardRef(function (props, ref) { return (React__default.default.createElement(Component.DateRangeInput, tslib.__assign({ InputComponent: desktop$1.InputDesktop, Calendar: desktop.CalendarDesktop }, props, { ref: ref }))); });
|
|
20
20
|
|
|
21
21
|
exports.DateRangeInputDesktop = DateRangeInputDesktop;
|
|
22
|
+
//# 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":["forwardRef","React","DateRangeInput","__assign","InputDesktop","CalendarDesktop"],"mappings":";;;;;;;;;;;;;;AAmBA;;;AAGG;AACI,IAAM,qBAAqB,GAAGA,gBAAU,CAC3C,UAAC,KAAK,EAAE,GAAG,EAAK,EAAA,QACZC,sBAAA,CAAA,aAAA,CAACC,wBAAc,EACXC,cAAA,CAAA,EAAA,cAAc,EAAEC,sBAAY,EAC5B,QAAQ,EAAEC,uBAAe,IACrB,KAAK,EAAA,EACT,GAAG,EAAE,GAAG,EACV,CAAA,CAAA,EANU,EAOf;;;;"}
|
package/desktop/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export {};
|
|
1
|
+
export * from './Component.desktop';
|
package/desktop/index.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var Component_desktop = require('./Component.desktop.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.DateRangeInputDesktop =
|
|
9
|
+
exports.DateRangeInputDesktop = Component_desktop.DateRangeInputDesktop;
|
|
10
|
+
//# 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
|
|
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,35 @@ 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<
|
|
21
|
-
|
|
19
|
+
export declare const DateRangeInputResponsive: React.ForwardRefExoticComponent<(Omit<Omit<DateRangeInputProps, "view" | "picker" | "onClose" | "InputComponent"> & {
|
|
20
|
+
picker: true;
|
|
21
|
+
onClose?: (() => void) | undefined;
|
|
22
|
+
} & {
|
|
23
|
+
/**
|
|
24
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
25
|
+
* @default 1024
|
|
26
|
+
*/
|
|
27
|
+
breakpoint?: number | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
30
|
+
*/
|
|
31
|
+
client?: "desktop" | "mobile" | undefined;
|
|
32
|
+
}, "ref"> | Omit<Omit<DateRangeInputProps, "view" | "picker" | "onClose" | "InputComponent"> & {
|
|
33
|
+
picker?: false | undefined;
|
|
34
|
+
onClose?: undefined;
|
|
35
|
+
} & {
|
|
36
|
+
/**
|
|
37
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
38
|
+
* @default 1024
|
|
39
|
+
*/
|
|
40
|
+
breakpoint?: number | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
43
|
+
*/
|
|
44
|
+
client?: "desktop" | "mobile" | undefined;
|
|
45
|
+
}, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -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;IACU,wBAAwB,GAAG,UAAU,CAC9C,UAAC,EAAoC,EAAE,GAAG,EAAA;IAAvC,IAAA,UAAU,gBAAA,EAAE,MAAM,YAAA,EAAK,SAAS,GAAlC,MAAA,CAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,CAAoC,CAAF;IAC/B,IAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;AAEhE,IAAA,OAAO,SAAS,IACZ,KAAA,CAAA,aAAA,CAAC,qBAAqB,EAAA,QAAA,CAAA,EAAA,EAAK,SAAS,EAAA,EAAE,GAAG,EAAE,GAAG,EAAA,CAAA,CAAI,KAElD,KAAA,CAAA,aAAA,CAAC,oBAAoB,EAAA,QAAA,CAAA,EAAA,EAAK,SAAS,EAAA,EAAE,GAAG,EAAE,GAAG,EAAA,CAAA,CAAI,CACpD;AACL,CAAC;;;;"}
|