@consta/uikit 3.15.1 → 3.17.1
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/Attach/package.json +1 -1
- package/Attachment/package.json +1 -1
- package/Avatar/package.json +1 -1
- package/Badge/package.json +1 -1
- package/BasicSelectDeprecated/package.json +1 -1
- package/Breadcrumbs/package.json +1 -1
- package/BreadcrumbsCanary/package.json +1 -1
- package/Button/package.json +1 -1
- package/CHANGELOG.md +54 -59
- package/Calendar/package.json +1 -1
- package/Card/package.json +1 -1
- package/Checkbox/package.json +1 -1
- package/CheckboxGroup/package.json +1 -1
- package/ChoiceGroup/package.json +1 -1
- package/Collapse/package.json +1 -1
- package/CollapseGroup/package.json +1 -1
- package/Combobox/package.json +1 -1
- package/ComboboxDeprecated/package.json +1 -1
- package/ContextMenu/package.json +1 -1
- package/DatePickerCanary/package.json +1 -1
- package/DateTimeCanary/package.json +1 -1
- package/DragNDropField/package.json +1 -1
- package/EventInterceptor/package.json +1 -1
- package/FieldCaption/package.json +1 -1
- package/FieldLabel/package.json +1 -1
- package/File/package.json +1 -1
- package/FileField/package.json +1 -1
- package/FileIcon/package.json +1 -1
- package/FileIconAvi/package.json +1 -1
- package/FileIconBmp/package.json +1 -1
- package/FileIconCsv/package.json +1 -1
- package/FileIconDoc/package.json +1 -1
- package/FileIconExe/package.json +1 -1
- package/FileIconGif/package.json +1 -1
- package/FileIconJpg/package.json +1 -1
- package/FileIconJson/package.json +1 -1
- package/FileIconLoading/package.json +1 -1
- package/FileIconMov/package.json +1 -1
- package/FileIconMp3/package.json +1 -1
- package/FileIconMp4/package.json +1 -1
- package/FileIconPdf/package.json +1 -1
- package/FileIconPng/package.json +1 -1
- package/FileIconPtt/package.json +1 -1
- package/FileIconRar/package.json +1 -1
- package/FileIconRtf/package.json +1 -1
- package/FileIconTiff/package.json +1 -1
- package/FileIconTxt/package.json +1 -1
- package/FileIconUndefined/package.json +1 -1
- package/FileIconWav/package.json +1 -1
- package/FileIconXls/package.json +1 -1
- package/FileIconZip/package.json +1 -1
- package/Grid/package.json +1 -1
- package/Header/package.json +1 -1
- package/Icon/package.json +1 -1
- package/IconAdd/package.json +1 -1
- package/IconAddToComparison/package.json +1 -1
- package/IconAlert/package.json +1 -1
- package/IconAlignBlocksLeft/package.json +1 -1
- package/IconAlignBlocksRight/package.json +1 -1
- package/IconAlignCenter/package.json +1 -1
- package/IconAlignJustify/package.json +1 -1
- package/IconAlignLeft/package.json +1 -1
- package/IconAlignRight/package.json +1 -1
- package/IconAllDone/package.json +1 -1
- package/IconArrowDown/package.json +1 -1
- package/IconArrowLeft/package.json +1 -1
- package/IconArrowRight/package.json +1 -1
- package/IconArrowUp/package.json +1 -1
- package/IconArtBrush/package.json +1 -1
- package/IconAttach/package.json +1 -1
- package/IconBackward/package.json +1 -1
- package/IconBag/package.json +1 -1
- package/IconBarrier/package.json +1 -1
- package/IconBento/package.json +1 -1
- package/IconBold/package.json +1 -1
- package/IconBook/package.json +1 -1
- package/IconBookmarkFilled/package.json +1 -1
- package/IconBookmarkStroked/package.json +1 -1
- package/IconCalculator/package.json +1 -1
- package/IconCalendar/package.json +1 -1
- package/IconCamera/package.json +1 -1
- package/IconCancel/package.json +1 -1
- package/IconCards/package.json +1 -1
- package/IconChat/package.json +1 -1
- package/IconCheck/package.json +1 -1
- package/IconClose/package.json +1 -1
- package/IconCollapse/package.json +1 -1
- package/IconColorFill/package.json +1 -1
- package/IconColorText/package.json +1 -1
- package/IconColumns/package.json +1 -1
- package/IconComment/package.json +1 -1
- package/IconConnection/package.json +1 -1
- package/IconCopy/package.json +1 -1
- package/IconCrown/package.json +1 -1
- package/IconCursorMouse/package.json +1 -1
- package/IconDataNull/package.json +1 -1
- package/IconDiamond/package.json +1 -1
- package/IconDinosaur/package.json +1 -1
- package/IconDisconnection/package.json +1 -1
- package/IconDocAdd/package.json +1 -1
- package/IconDocBlank/package.json +1 -1
- package/IconDocDelete/package.json +1 -1
- package/IconDocExport/package.json +1 -1
- package/IconDocFilled/package.json +1 -1
- package/IconDown/package.json +1 -1
- package/IconDownload/package.json +1 -1
- package/IconDrag/package.json +1 -1
- package/IconDraggable/package.json +1 -1
- package/IconDrillingRig/package.json +1 -1
- package/IconDrop/package.json +1 -1
- package/IconEdit/package.json +1 -1
- package/IconExit/package.json +1 -1
- package/IconExpand/package.json +1 -1
- package/IconEye/package.json +1 -1
- package/IconEyeClose/package.json +1 -1
- package/IconFavorite/package.json +1 -1
- package/IconFilter/package.json +1 -1
- package/IconFitToDefault/package.json +1 -1
- package/IconFlagFilled/package.json +1 -1
- package/IconFlagStroked/package.json +1 -1
- package/IconFolders/package.json +1 -1
- package/IconForward/package.json +1 -1
- package/IconFunnel/package.json +1 -1
- package/IconGas/package.json +1 -1
- package/IconGeo/package.json +1 -1
- package/IconGrouping/package.json +1 -1
- package/IconHamburger/package.json +1 -1
- package/IconHand/package.json +1 -1
- package/IconHealth/package.json +1 -1
- package/IconHome/package.json +1 -1
- package/IconInComparison/package.json +1 -1
- package/IconInfo/package.json +1 -1
- package/IconIntroduction/package.json +1 -1
- package/IconIpad/package.json +1 -1
- package/IconItalic/package.json +1 -1
- package/IconKebab/package.json +1 -1
- package/IconLaptop/package.json +1 -1
- package/IconLayers/package.json +1 -1
- package/IconLeaf/package.json +1 -1
- package/IconLightningBolt/package.json +1 -1
- package/IconLineAndBarChart/package.json +1 -1
- package/IconLink/package.json +1 -1
- package/IconList/package.json +1 -1
- package/IconListNumbered/package.json +1 -1
- package/IconLock/package.json +1 -1
- package/IconLogicalElement/package.json +1 -1
- package/IconMBU/package.json +1 -1
- package/IconMGRP/package.json +1 -1
- package/IconMLSP/package.json +1 -1
- package/IconMMP/package.json +1 -1
- package/IconMail/package.json +1 -1
- package/IconMap/package.json +1 -1
- package/IconMaxHeight/package.json +1 -1
- package/IconMaxWidth/package.json +1 -1
- package/IconMeatball/package.json +1 -1
- package/IconMic/package.json +1 -1
- package/IconMolecules/package.json +1 -1
- package/IconMoon/package.json +1 -1
- package/IconNodeEnd/package.json +1 -1
- package/IconNodeStart/package.json +1 -1
- package/IconNodeStep/package.json +1 -1
- package/IconNodes/package.json +1 -1
- package/IconOpenInNew/package.json +1 -1
- package/IconOperators/package.json +1 -1
- package/IconPanelBottom/package.json +1 -1
- package/IconPanelLeft/package.json +1 -1
- package/IconPanelRight/package.json +1 -1
- package/IconPanelTop/package.json +1 -1
- package/IconPaste/package.json +1 -1
- package/IconPause/package.json +1 -1
- package/IconPhone/package.json +1 -1
- package/IconPhoto/package.json +1 -1
- package/IconPicture/es.js +1 -0
- package/IconPicture/index.d.ts +1 -0
- package/IconPicture/index.js +4 -0
- package/{MixDropdownAnimate → IconPicture}/package.json +2 -2
- package/IconPlay/package.json +1 -1
- package/IconPressure/package.json +1 -1
- package/IconPriceLabel/es.js +1 -0
- package/IconPriceLabel/index.d.ts +1 -0
- package/IconPriceLabel/index.js +4 -0
- package/IconPriceLabel/package.json +9 -0
- package/IconProcessing/package.json +1 -1
- package/IconQuestion/package.json +1 -1
- package/IconQuote/package.json +1 -1
- package/IconRUO/package.json +1 -1
- package/IconRUS/package.json +1 -1
- package/IconRecord/package.json +1 -1
- package/IconRemove/package.json +1 -1
- package/IconRemoveFromComparison/package.json +1 -1
- package/IconReply/package.json +1 -1
- package/IconResize/package.json +1 -1
- package/IconRestart/package.json +1 -1
- package/IconRevert/package.json +1 -1
- package/IconRing/package.json +1 -1
- package/IconRouble/package.json +1 -1
- package/IconRuler/package.json +1 -1
- package/IconSave/package.json +1 -1
- package/IconScreen/package.json +1 -1
- package/IconSearch/package.json +1 -1
- package/IconSelect/package.json +1 -1
- package/IconSelectOpen/package.json +1 -1
- package/IconSendMessage/package.json +1 -1
- package/IconSettings/package.json +1 -1
- package/IconShape/package.json +1 -1
- package/IconShuffle/package.json +1 -1
- package/IconSmile/package.json +1 -1
- package/IconSortDown/package.json +1 -1
- package/IconSortDownCenter/package.json +1 -1
- package/IconSortUp/package.json +1 -1
- package/IconSortUpCenter/package.json +1 -1
- package/IconStop/package.json +1 -1
- package/IconStorage/package.json +1 -1
- package/IconStrikethrough/package.json +1 -1
- package/IconSun/package.json +1 -1
- package/IconTable/package.json +1 -1
- package/IconTable2/es.js +1 -0
- package/IconTable2/index.d.ts +1 -0
- package/IconTable2/index.js +4 -0
- package/IconTable2/package.json +9 -0
- package/IconTarget/package.json +1 -1
- package/IconTeam/package.json +1 -1
- package/IconTechResponse/package.json +1 -1
- package/IconTest/package.json +1 -1
- package/IconThumbUp/package.json +1 -1
- package/IconTie/package.json +1 -1
- package/IconTop/package.json +1 -1
- package/IconTrash/package.json +1 -1
- package/IconType/package.json +1 -1
- package/IconUnderline/package.json +1 -1
- package/IconUnlock/package.json +1 -1
- package/IconUnsort/package.json +1 -1
- package/IconUnsortCenter/package.json +1 -1
- package/IconUpload/package.json +1 -1
- package/IconUser/package.json +1 -1
- package/IconVZD/package.json +1 -1
- package/IconVideo/package.json +1 -1
- package/IconWarning/package.json +1 -1
- package/IconWatch/package.json +1 -1
- package/IconWideScreen/package.json +1 -1
- package/IconWorld/package.json +1 -1
- package/IconWrench/es.js +1 -0
- package/IconWrench/index.d.ts +1 -0
- package/IconWrench/index.js +4 -0
- package/IconWrench/package.json +9 -0
- package/Informer/package.json +1 -1
- package/LayoutCanary/package.json +1 -1
- package/Loader/package.json +1 -1
- package/MixCard/package.json +1 -1
- package/MixFocus/package.json +1 -1
- package/MixPopoverAnimate/es.js +1 -0
- package/MixPopoverAnimate/index.d.ts +1 -0
- package/MixPopoverAnimate/index.js +4 -0
- package/MixPopoverAnimate/package.json +9 -0
- package/MixSpace/package.json +1 -1
- package/MixVisuallyHidden/package.json +1 -1
- package/Modal/package.json +1 -1
- package/MultiComboboxDeprecated/package.json +1 -1
- package/Pagination/package.json +1 -1
- package/Popover/package.json +1 -1
- package/PortalWithTheme/package.json +1 -1
- package/ProgressSpin/package.json +1 -1
- package/ProgressStepBarCanary/package.json +1 -1
- package/Radio/package.json +1 -1
- package/RadioGroup/package.json +1 -1
- package/Responses/package.json +1 -1
- package/Responses403/package.json +1 -1
- package/Responses404/package.json +1 -1
- package/Responses500/package.json +1 -1
- package/Responses503/package.json +1 -1
- package/ResponsesConnectionError/package.json +1 -1
- package/ResponsesDeleted/package.json +1 -1
- package/ResponsesEmptyBox/package.json +1 -1
- package/ResponsesEmptyPockets/package.json +1 -1
- package/ResponsesExit/package.json +1 -1
- package/ResponsesImage/package.json +1 -1
- package/ResponsesImage403/package.json +1 -1
- package/ResponsesImage404/package.json +1 -1
- package/ResponsesImage500/package.json +1 -1
- package/ResponsesImage503/package.json +1 -1
- package/ResponsesImageConnectionError/package.json +1 -1
- package/ResponsesImageDeleted/package.json +1 -1
- package/ResponsesImageEmptyBox/package.json +1 -1
- package/ResponsesImageEmptyPockets/package.json +1 -1
- package/ResponsesImageNothingFound/package.json +1 -1
- package/ResponsesImageSuccess/package.json +1 -1
- package/ResponsesNothingFound/package.json +1 -1
- package/ResponsesSuccess/package.json +1 -1
- package/Select/package.json +1 -1
- package/Sidebar/package.json +1 -1
- package/Skeleton/package.json +1 -1
- package/SliderCanary/package.json +1 -1
- package/SnackBar/package.json +1 -1
- package/Steps/package.json +1 -1
- package/Switch/package.json +1 -1
- package/SwitchGroup/package.json +1 -1
- package/Table/package.json +1 -1
- package/Tabs/package.json +1 -1
- package/Tag/package.json +1 -1
- package/TagBase/package.json +1 -1
- package/Text/package.json +1 -1
- package/TextField/package.json +1 -1
- package/Theme/package.json +1 -1
- package/ThemeToggler/package.json +1 -1
- package/Timer/package.json +1 -1
- package/Tooltip/package.json +1 -1
- package/User/package.json +1 -1
- package/UserSelect/package.json +1 -1
- package/UserSelectDeprecated/package.json +1 -1
- package/__internal__/cjs-src/components/BreadcrumbsCanary/BreadcrumbsMore/BreadcrumbsMore.d.ts +6 -0
- package/__internal__/cjs-src/components/BreadcrumbsCanary/BreadcrumbsMore/BreadcrumbsMore.js +17 -4
- package/__internal__/cjs-src/components/Collapse/CollapseIcon/CollapseIcon.js +7 -5
- package/__internal__/cjs-src/components/Combobox/Combobox.js +4 -4
- package/__internal__/cjs-src/components/Combobox/helpers.d.ts +2 -0
- package/__internal__/cjs-src/components/ContextMenu/ContextMenu.js +1 -1
- package/__internal__/cjs-src/components/ContextMenu/helpers.d.ts +4 -3
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerCanary.js +3 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerDropdown/DatePickerDropdown.css +0 -49
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerDropdown/DatePickerDropdown.d.ts +1 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerDropdown/DatePickerDropdown.js +11 -6
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.d.ts +0 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.js +9 -13
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateRange/helpers.d.ts +0 -3
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateRange/helpers.js +0 -33
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.d.ts +83 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.js +98 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/helpers.d.ts +30 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/helpers.js +2 -0
- package/__internal__/cjs-src/components/DatePickerCanary/{DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.css → DatePickerMixRangeField/DatePickerMixRangeField.css} +16 -16
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerMixRangeField/DatePickerMixRangeField.d.ts +2 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerMixRangeField/DatePickerMixRangeField.js +6 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerTypeDate/DatePickerTypeDate.js +1 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerTypeDateRange/DatePickerTypeDateRange.js +31 -34
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerTypeDateTime/DatePickerTypeDateTime.js +4 -5
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.d.ts +2 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js +95 -0
- package/__internal__/cjs-src/components/DatePickerCanary/helpers.d.ts +10 -7
- package/__internal__/cjs-src/components/DatePickerCanary/helpers.js +37 -2
- package/__internal__/cjs-src/components/DateTimeCanary/DateTimeTypeDateTime/DateTimeTypeDateTime.js +7 -7
- package/__internal__/cjs-src/components/DateTimeCanary/DateTimeTypeDateTime/useOnChange.d.ts +3 -2
- package/__internal__/cjs-src/components/DateTimeCanary/DateTimeTypeDateTime/useOnChange.js +18 -4
- package/__internal__/cjs-src/components/DateTimeCanary/helpers/types.d.ts +3 -1
- package/__internal__/cjs-src/components/EventInterceptor/eventInterceptorMap.d.ts +2 -5
- package/__internal__/cjs-src/components/EventInterceptor/propsHandlers/useSnackBarEventsHandler.d.ts +2 -5
- package/__internal__/cjs-src/components/EventInterceptor/propsHandlers/useTextFieldEventsHandler.d.ts +1 -1
- package/__internal__/cjs-src/components/Popover/Popover.css +8 -0
- package/__internal__/cjs-src/components/Popover/Popover.d.ts +6 -3
- package/__internal__/cjs-src/components/Popover/Popover.js +31 -9
- package/__internal__/cjs-src/components/Popover/helpers.d.ts +2 -1
- package/__internal__/cjs-src/components/Popover/helpers.js +7 -3
- package/__internal__/cjs-src/components/Select/Select.js +4 -4
- package/__internal__/cjs-src/components/Select/helpers.d.ts +2 -0
- package/__internal__/cjs-src/components/SelectComponents/SelectDropdown/SelectDropdown.css +2 -1
- package/__internal__/cjs-src/components/SelectComponents/SelectDropdown/SelectDropdown.d.ts +2 -0
- package/__internal__/cjs-src/components/SelectComponents/SelectDropdown/SelectDropdown.js +6 -4
- package/__internal__/cjs-src/components/SelectComponents/helpers.d.ts +1 -0
- package/__internal__/cjs-src/components/SelectComponents/helpers.js +2 -1
- package/__internal__/cjs-src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js +4 -3
- package/__internal__/cjs-src/components/Sidebar/Sidebar.js +3 -2
- package/__internal__/cjs-src/components/SliderCanary/SliderCanary.js +5 -3
- package/__internal__/cjs-src/components/SliderCanary/SliderInput/SliderInput.d.ts +1 -1
- package/__internal__/cjs-src/components/SliderCanary/SliderInput/SliderInput.js +1 -1
- package/__internal__/cjs-src/components/SliderCanary/useSlider/helper.js +4 -11
- package/__internal__/cjs-src/components/SliderCanary/useSlider/useSlider.js +7 -15
- package/__internal__/cjs-src/components/SliderCanary/useSliderStationing.js +4 -10
- package/__internal__/cjs-src/components/SnackBar/SnackBar.d.ts +3 -3
- package/__internal__/cjs-src/components/SnackBar/SnackBar.js +14 -14
- package/__internal__/cjs-src/components/SnackBar/SnackBarActionButton/SnackBarActionButton.d.ts +1 -1
- package/__internal__/cjs-src/components/SnackBar/SnackBarItem/SnackBarItem.d.ts +2 -4
- package/__internal__/cjs-src/components/SnackBar/SnackBarItem/SnackBarItem.js +14 -13
- package/__internal__/cjs-src/components/SnackBar/SnackBarLine/SnackBarLine.d.ts +1 -1
- package/__internal__/cjs-src/components/SnackBar/SnackBarTimer/SnackBarTimer.d.ts +1 -1
- package/__internal__/cjs-src/components/SnackBar/helper.d.ts +288 -45
- package/__internal__/cjs-src/components/SnackBar/helper.js +52 -4
- package/__internal__/cjs-src/components/SnackBar/types.d.ts +78 -0
- package/__internal__/cjs-src/components/SnackBar/types.js +6 -0
- package/__internal__/cjs-src/components/Table/Table.css +1 -0
- package/__internal__/cjs-src/components/Table/Table.d.ts +1 -1
- package/__internal__/cjs-src/components/Table/Table.js +17 -5
- package/__internal__/cjs-src/components/Table/helpers.d.ts +1 -0
- package/__internal__/cjs-src/components/Table/helpers.js +12 -4
- package/__internal__/cjs-src/components/TextField/TextField.js +28 -16
- package/__internal__/cjs-src/components/TextField/helpers.d.ts +17 -2
- package/__internal__/cjs-src/components/TextField/helpers.js +52 -1
- package/__internal__/cjs-src/components/UserSelect/UserSelect.js +4 -4
- package/__internal__/cjs-src/components/UserSelect/UserSelectItem/UserSelectItem.js +4 -3
- package/__internal__/cjs-src/components/UserSelect/helpers.d.ts +2 -0
- package/__internal__/cjs-src/components/UserSelectDeprecated/UserSelectItem/UserSelectItem.js +4 -3
- package/__internal__/cjs-src/hooks/useHideElementsInLine/useHideElementsInLine.d.ts +1 -1
- package/__internal__/cjs-src/hooks/useRefs/useRefs.d.ts +1 -1
- package/__internal__/cjs-src/hooks/useSelect/useSelect.d.ts +1 -0
- package/__internal__/cjs-src/hooks/useSelect/useSelect.js +4 -2
- package/__internal__/cjs-src/hooks/useSortSteps/useSortSteps.d.ts +7 -0
- package/__internal__/cjs-src/hooks/useSortSteps/useSortSteps.js +28 -0
- package/__internal__/cjs-src/hooks/useTimer/useTimer.js +6 -1
- package/__internal__/cjs-src/icons/IconPicture/IconPicture.d.ts +5 -0
- package/__internal__/cjs-src/icons/IconPicture/IconPicture.js +14 -0
- package/__internal__/cjs-src/icons/IconPicture/IconPicture_size_m.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconPicture/IconPicture_size_m.js +9 -0
- package/__internal__/cjs-src/icons/IconPicture/IconPicture_size_m.svg +5 -0
- package/__internal__/cjs-src/icons/IconPicture/IconPicture_size_s.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconPicture/IconPicture_size_s.js +9 -0
- package/__internal__/cjs-src/icons/IconPicture/IconPicture_size_s.svg +5 -0
- package/__internal__/cjs-src/icons/IconPicture/IconPicture_size_xs.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconPicture/IconPicture_size_xs.js +9 -0
- package/__internal__/cjs-src/icons/IconPicture/IconPicture_size_xs.svg +5 -0
- package/__internal__/cjs-src/icons/IconPriceLabel/IconPriceLabel.d.ts +5 -0
- package/__internal__/cjs-src/icons/IconPriceLabel/IconPriceLabel.js +14 -0
- package/__internal__/cjs-src/icons/IconPriceLabel/IconPriceLabel_size_m.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconPriceLabel/IconPriceLabel_size_m.js +9 -0
- package/__internal__/cjs-src/icons/IconPriceLabel/IconPriceLabel_size_m.svg +5 -0
- package/__internal__/cjs-src/icons/IconPriceLabel/IconPriceLabel_size_s.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconPriceLabel/IconPriceLabel_size_s.js +9 -0
- package/__internal__/cjs-src/icons/IconPriceLabel/IconPriceLabel_size_s.svg +5 -0
- package/__internal__/cjs-src/icons/IconPriceLabel/IconPriceLabel_size_xs.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconPriceLabel/IconPriceLabel_size_xs.js +9 -0
- package/__internal__/cjs-src/icons/IconPriceLabel/IconPriceLabel_size_xs.svg +5 -0
- package/__internal__/cjs-src/icons/IconTable2/IconTable2.d.ts +5 -0
- package/__internal__/cjs-src/icons/IconTable2/IconTable2.js +14 -0
- package/__internal__/cjs-src/icons/IconTable2/IconTable2_size_m.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconTable2/IconTable2_size_m.js +9 -0
- package/__internal__/cjs-src/icons/IconTable2/IconTable2_size_m.svg +7 -0
- package/__internal__/cjs-src/icons/IconTable2/IconTable2_size_s.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconTable2/IconTable2_size_s.js +9 -0
- package/__internal__/cjs-src/icons/IconTable2/IconTable2_size_s.svg +7 -0
- package/__internal__/cjs-src/icons/IconTable2/IconTable2_size_xs.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconTable2/IconTable2_size_xs.js +9 -0
- package/__internal__/cjs-src/icons/IconTable2/IconTable2_size_xs.svg +7 -0
- package/__internal__/cjs-src/icons/IconWrench/IconWrench.d.ts +5 -0
- package/__internal__/cjs-src/icons/IconWrench/IconWrench.js +14 -0
- package/__internal__/cjs-src/icons/IconWrench/IconWrench_size_m.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconWrench/IconWrench_size_m.js +9 -0
- package/__internal__/cjs-src/icons/IconWrench/IconWrench_size_m.svg +5 -0
- package/__internal__/cjs-src/icons/IconWrench/IconWrench_size_s.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconWrench/IconWrench_size_s.js +9 -0
- package/__internal__/cjs-src/icons/IconWrench/IconWrench_size_s.svg +5 -0
- package/__internal__/cjs-src/icons/IconWrench/IconWrench_size_xs.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconWrench/IconWrench_size_xs.js +9 -0
- package/__internal__/cjs-src/icons/IconWrench/IconWrench_size_xs.svg +5 -0
- package/__internal__/cjs-src/mixs/MixPopoverAnimate/MixPopoverAnimate.css +76 -0
- package/__internal__/cjs-src/mixs/MixPopoverAnimate/MixPopoverAnimate.d.ts +12 -0
- package/__internal__/cjs-src/mixs/MixPopoverAnimate/MixPopoverAnimate.js +10 -0
- package/__internal__/src/components/BreadcrumbsCanary/BreadcrumbsMore/BreadcrumbsMore.d.ts +6 -0
- package/__internal__/src/components/BreadcrumbsCanary/BreadcrumbsMore/BreadcrumbsMore.js +18 -5
- package/__internal__/src/components/Collapse/CollapseIcon/CollapseIcon.js +7 -5
- package/__internal__/src/components/Combobox/Combobox.js +5 -5
- package/__internal__/src/components/Combobox/helpers.d.ts +2 -0
- package/__internal__/src/components/ContextMenu/ContextMenu.js +1 -1
- package/__internal__/src/components/ContextMenu/helpers.d.ts +4 -3
- package/__internal__/src/components/DatePickerCanary/DatePickerCanary.js +3 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerDropdown/DatePickerDropdown.css +0 -49
- package/__internal__/src/components/DatePickerCanary/DatePickerDropdown/DatePickerDropdown.d.ts +1 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerDropdown/DatePickerDropdown.js +14 -9
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.d.ts +0 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.js +10 -14
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateRange/helpers.d.ts +0 -3
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateRange/helpers.js +0 -32
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.d.ts +83 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.js +95 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/helpers.d.ts +30 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/helpers.js +0 -0
- package/__internal__/src/components/DatePickerCanary/{DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.css → DatePickerMixRangeField/DatePickerMixRangeField.css} +16 -16
- package/__internal__/src/components/DatePickerCanary/DatePickerMixRangeField/DatePickerMixRangeField.d.ts +2 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerMixRangeField/DatePickerMixRangeField.js +3 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerTypeDate/DatePickerTypeDate.js +1 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerTypeDateRange/DatePickerTypeDateRange.js +31 -34
- package/__internal__/src/components/DatePickerCanary/DatePickerTypeDateTime/DatePickerTypeDateTime.js +4 -5
- package/__internal__/src/components/DatePickerCanary/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.d.ts +2 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js +92 -0
- package/__internal__/src/components/DatePickerCanary/helpers.d.ts +10 -7
- package/__internal__/src/components/DatePickerCanary/helpers.js +36 -1
- package/__internal__/src/components/DateTimeCanary/DateTimeTypeDateTime/DateTimeTypeDateTime.js +7 -7
- package/__internal__/src/components/DateTimeCanary/DateTimeTypeDateTime/useOnChange.d.ts +3 -2
- package/__internal__/src/components/DateTimeCanary/DateTimeTypeDateTime/useOnChange.js +18 -4
- package/__internal__/src/components/DateTimeCanary/helpers/types.d.ts +3 -1
- package/__internal__/src/components/EventInterceptor/eventInterceptorMap.d.ts +2 -5
- package/__internal__/src/components/EventInterceptor/propsHandlers/useSnackBarEventsHandler.d.ts +2 -5
- package/__internal__/src/components/EventInterceptor/propsHandlers/useTextFieldEventsHandler.d.ts +1 -1
- package/__internal__/src/components/Popover/Popover.css +8 -0
- package/__internal__/src/components/Popover/Popover.d.ts +6 -3
- package/__internal__/src/components/Popover/Popover.js +30 -8
- package/__internal__/src/components/Popover/helpers.d.ts +2 -1
- package/__internal__/src/components/Popover/helpers.js +6 -2
- package/__internal__/src/components/Select/Select.js +5 -5
- package/__internal__/src/components/Select/helpers.d.ts +2 -0
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.css +2 -1
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.d.ts +2 -0
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js +7 -5
- package/__internal__/src/components/SelectComponents/helpers.d.ts +1 -0
- package/__internal__/src/components/SelectComponents/helpers.js +1 -0
- package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js +4 -3
- package/__internal__/src/components/Sidebar/Sidebar.js +3 -2
- package/__internal__/src/components/SliderCanary/SliderCanary.js +5 -3
- package/__internal__/src/components/SliderCanary/SliderInput/SliderInput.d.ts +1 -1
- package/__internal__/src/components/SliderCanary/SliderInput/SliderInput.js +1 -1
- package/__internal__/src/components/SliderCanary/useSlider/helper.js +5 -12
- package/__internal__/src/components/SliderCanary/useSlider/useSlider.js +7 -15
- package/__internal__/src/components/SliderCanary/useSliderStationing.js +4 -10
- package/__internal__/src/components/SnackBar/SnackBar.d.ts +3 -3
- package/__internal__/src/components/SnackBar/SnackBar.js +15 -15
- package/__internal__/src/components/SnackBar/SnackBarActionButton/SnackBarActionButton.d.ts +1 -1
- package/__internal__/src/components/SnackBar/SnackBarItem/SnackBarItem.d.ts +2 -4
- package/__internal__/src/components/SnackBar/SnackBarItem/SnackBarItem.js +13 -13
- package/__internal__/src/components/SnackBar/SnackBarLine/SnackBarLine.d.ts +1 -1
- package/__internal__/src/components/SnackBar/SnackBarTimer/SnackBarTimer.d.ts +1 -1
- package/__internal__/src/components/SnackBar/helper.d.ts +288 -45
- package/__internal__/src/components/SnackBar/helper.js +51 -3
- package/__internal__/src/components/SnackBar/types.d.ts +78 -0
- package/__internal__/src/components/SnackBar/types.js +3 -0
- package/__internal__/src/components/Table/Table.css +1 -0
- package/__internal__/src/components/Table/Table.d.ts +1 -1
- package/__internal__/src/components/Table/Table.js +18 -6
- package/__internal__/src/components/Table/helpers.d.ts +1 -0
- package/__internal__/src/components/Table/helpers.js +10 -3
- package/__internal__/src/components/TextField/TextField.js +29 -17
- package/__internal__/src/components/TextField/helpers.d.ts +17 -2
- package/__internal__/src/components/TextField/helpers.js +51 -0
- package/__internal__/src/components/UserSelect/UserSelect.js +5 -5
- package/__internal__/src/components/UserSelect/UserSelectItem/UserSelectItem.js +4 -3
- package/__internal__/src/components/UserSelect/helpers.d.ts +2 -0
- package/__internal__/src/components/UserSelectDeprecated/UserSelectItem/UserSelectItem.js +4 -3
- package/__internal__/src/hooks/useHideElementsInLine/useHideElementsInLine.d.ts +1 -1
- package/__internal__/src/hooks/useRefs/useRefs.d.ts +1 -1
- package/__internal__/src/hooks/useSelect/useSelect.d.ts +1 -0
- package/__internal__/src/hooks/useSelect/useSelect.js +4 -2
- package/__internal__/src/hooks/useSortSteps/useSortSteps.d.ts +7 -0
- package/__internal__/src/hooks/useSortSteps/useSortSteps.js +25 -0
- package/__internal__/src/hooks/useTimer/useTimer.js +6 -1
- package/__internal__/src/icons/IconPicture/IconPicture.d.ts +5 -0
- package/__internal__/src/icons/IconPicture/IconPicture.js +10 -0
- package/__internal__/src/icons/IconPicture/IconPicture_size_m.d.ts +3 -0
- package/__internal__/src/icons/IconPicture/IconPicture_size_m.js +7 -0
- package/__internal__/src/icons/IconPicture/IconPicture_size_m.svg +5 -0
- package/__internal__/src/icons/IconPicture/IconPicture_size_s.d.ts +3 -0
- package/__internal__/src/icons/IconPicture/IconPicture_size_s.js +7 -0
- package/__internal__/src/icons/IconPicture/IconPicture_size_s.svg +5 -0
- package/__internal__/src/icons/IconPicture/IconPicture_size_xs.d.ts +3 -0
- package/__internal__/src/icons/IconPicture/IconPicture_size_xs.js +7 -0
- package/__internal__/src/icons/IconPicture/IconPicture_size_xs.svg +5 -0
- package/__internal__/src/icons/IconPriceLabel/IconPriceLabel.d.ts +5 -0
- package/__internal__/src/icons/IconPriceLabel/IconPriceLabel.js +10 -0
- package/__internal__/src/icons/IconPriceLabel/IconPriceLabel_size_m.d.ts +3 -0
- package/__internal__/src/icons/IconPriceLabel/IconPriceLabel_size_m.js +7 -0
- package/__internal__/src/icons/IconPriceLabel/IconPriceLabel_size_m.svg +5 -0
- package/__internal__/src/icons/IconPriceLabel/IconPriceLabel_size_s.d.ts +3 -0
- package/__internal__/src/icons/IconPriceLabel/IconPriceLabel_size_s.js +7 -0
- package/__internal__/src/icons/IconPriceLabel/IconPriceLabel_size_s.svg +5 -0
- package/__internal__/src/icons/IconPriceLabel/IconPriceLabel_size_xs.d.ts +3 -0
- package/__internal__/src/icons/IconPriceLabel/IconPriceLabel_size_xs.js +7 -0
- package/__internal__/src/icons/IconPriceLabel/IconPriceLabel_size_xs.svg +5 -0
- package/__internal__/src/icons/IconTable2/IconTable2.d.ts +5 -0
- package/__internal__/src/icons/IconTable2/IconTable2.js +10 -0
- package/__internal__/src/icons/IconTable2/IconTable2_size_m.d.ts +3 -0
- package/__internal__/src/icons/IconTable2/IconTable2_size_m.js +7 -0
- package/__internal__/src/icons/IconTable2/IconTable2_size_m.svg +7 -0
- package/__internal__/src/icons/IconTable2/IconTable2_size_s.d.ts +3 -0
- package/__internal__/src/icons/IconTable2/IconTable2_size_s.js +7 -0
- package/__internal__/src/icons/IconTable2/IconTable2_size_s.svg +7 -0
- package/__internal__/src/icons/IconTable2/IconTable2_size_xs.d.ts +3 -0
- package/__internal__/src/icons/IconTable2/IconTable2_size_xs.js +7 -0
- package/__internal__/src/icons/IconTable2/IconTable2_size_xs.svg +7 -0
- package/__internal__/src/icons/IconWrench/IconWrench.d.ts +5 -0
- package/__internal__/src/icons/IconWrench/IconWrench.js +10 -0
- package/__internal__/src/icons/IconWrench/IconWrench_size_m.d.ts +3 -0
- package/__internal__/src/icons/IconWrench/IconWrench_size_m.js +7 -0
- package/__internal__/src/icons/IconWrench/IconWrench_size_m.svg +5 -0
- package/__internal__/src/icons/IconWrench/IconWrench_size_s.d.ts +3 -0
- package/__internal__/src/icons/IconWrench/IconWrench_size_s.js +7 -0
- package/__internal__/src/icons/IconWrench/IconWrench_size_s.svg +5 -0
- package/__internal__/src/icons/IconWrench/IconWrench_size_xs.d.ts +3 -0
- package/__internal__/src/icons/IconWrench/IconWrench_size_xs.js +7 -0
- package/__internal__/src/icons/IconWrench/IconWrench_size_xs.svg +5 -0
- package/__internal__/src/mixs/MixPopoverAnimate/MixPopoverAnimate.css +76 -0
- package/__internal__/src/mixs/MixPopoverAnimate/MixPopoverAnimate.d.ts +12 -0
- package/__internal__/src/mixs/MixPopoverAnimate/MixPopoverAnimate.js +7 -0
- package/createIcon/package.json +1 -1
- package/createResponsesImage/package.json +1 -1
- package/package.json +7 -2
- package/useBreakpoints/package.json +1 -1
- package/useChoiceGroup/package.json +1 -1
- package/useChoiceGroupIndexed/package.json +1 -1
- package/useClickOutside/package.json +1 -1
- package/useComponentSize/package.json +1 -1
- package/useDebounce/package.json +1 -1
- package/useFlag/package.json +1 -1
- package/useForkRef/package.json +1 -1
- package/useGlobalKeys/package.json +1 -1
- package/useHideElementsInLine/package.json +1 -1
- package/useKeys/package.json +1 -1
- package/useMutableRef/package.json +1 -1
- package/useOverflow/package.json +1 -1
- package/usePrevious/package.json +1 -1
- package/useRefs/package.json +1 -1
- package/useResizeObserved/package.json +1 -1
- package/useScrollElements/package.json +1 -1
- package/useScrollPosition/package.json +1 -1
- package/useSelect/package.json +1 -1
- package/useSortSteps/es.js +1 -0
- package/useSortSteps/index.d.ts +1 -0
- package/useSortSteps/index.js +4 -0
- package/useSortSteps/package.json +9 -0
- package/useThemeVars/package.json +1 -1
- package/useTimer/package.json +1 -1
- package/withTooltip/package.json +1 -1
- package/MixDropdownAnimate/es.js +0 -1
- package/MixDropdownAnimate/index.d.ts +0 -1
- package/MixDropdownAnimate/index.js +0 -4
- package/__internal__/cjs-src/mixs/MixDropdownAnimate/MixDropdownAnimate.css +0 -37
- package/__internal__/cjs-src/mixs/MixDropdownAnimate/MixDropdownAnimate.d.ts +0 -4
- package/__internal__/cjs-src/mixs/MixDropdownAnimate/MixDropdownAnimate.js +0 -9
- package/__internal__/src/mixs/MixDropdownAnimate/MixDropdownAnimate.css +0 -37
- package/__internal__/src/mixs/MixDropdownAnimate/MixDropdownAnimate.d.ts +0 -4
- package/__internal__/src/mixs/MixDropdownAnimate/MixDropdownAnimate.js +0 -6
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ClickOutsideHandler } from '../../hooks/useClickOutside/useClickOutside';
|
|
3
3
|
import { PropsWithAsAttributes } from '../../utils/types/PropsWithAsAttributes';
|
|
4
4
|
import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
|
|
5
|
-
import { Direction, Position } from '../Popover/Popover';
|
|
5
|
+
import { Direction, PopoverPropOffset, Position } from '../Popover/Popover';
|
|
6
6
|
export declare const contextMenuSizes: readonly ["m", "s", "l"];
|
|
7
7
|
export declare type ContextMenuPropSize = typeof contextMenuSizes[number];
|
|
8
8
|
export declare const contextMenuDefaultSize: ContextMenuPropSize;
|
|
@@ -48,7 +48,7 @@ export declare type ContextMenuProps<ITEM> = PropsWithHTMLAttributesAndRef<{
|
|
|
48
48
|
subMenuDirection?: ContextMenuPropSubMenuDirection;
|
|
49
49
|
getKey?: ContextMenuPropGetKey<ITEM>;
|
|
50
50
|
getDisabled?: ContextMenuPropGetDisable<ITEM>;
|
|
51
|
-
offset?:
|
|
51
|
+
offset?: PopoverPropOffset;
|
|
52
52
|
onItemClick?: (props: {
|
|
53
53
|
e: React.MouseEvent;
|
|
54
54
|
item: ITEM;
|
|
@@ -57,6 +57,7 @@ export declare type ContextMenuProps<ITEM> = PropsWithHTMLAttributesAndRef<{
|
|
|
57
57
|
spareDirection?: Direction;
|
|
58
58
|
getItemAs?: ContextMenuPropGetItemAs<ITEM>;
|
|
59
59
|
getItemHTMLAttributes?: ContextMenuPropGetItemHTMLAttributes<ITEM>;
|
|
60
|
+
onSetDirection?: (direction: Direction) => void;
|
|
60
61
|
} & PositioningProps, HTMLDivElement>;
|
|
61
62
|
export declare type AddLevel<ITEM> = (level: number, items: ITEM[], anchorRef: React.RefObject<HTMLElement>, activeItem: string) => void;
|
|
62
63
|
export declare type DeleteLevel = (level: number) => void;
|
|
@@ -84,7 +85,7 @@ export declare type Level<ITEM> = {
|
|
|
84
85
|
activeItem?: string;
|
|
85
86
|
direction?: Direction;
|
|
86
87
|
possibleDirections?: readonly Direction[];
|
|
87
|
-
offset?:
|
|
88
|
+
offset?: PopoverPropOffset;
|
|
88
89
|
} & PositioningProps;
|
|
89
90
|
export declare type ContextMenuItemComponent = <AS extends keyof JSX.IntrinsicElements = 'div'>(props: ContextMenuItemProps<AS>, ref: React.Ref<HTMLElement>) => React.ReactElement | null;
|
|
90
91
|
export declare type ContextMenuComponent = <ITEM>(props: ContextMenuProps<ITEM>) => React.ReactElement | null;
|
|
@@ -5,11 +5,13 @@ import { getByMap } from '../../utils/getByMap';
|
|
|
5
5
|
import { DatePickerTypeDate } from './DatePickerTypeDate/DatePickerTypeDate';
|
|
6
6
|
import { DatePickerTypeDateRange } from './DatePickerTypeDateRange/DatePickerTypeDateRange';
|
|
7
7
|
import { DatePickerTypeDateTime } from './DatePickerTypeDateTime/DatePickerTypeDateTime';
|
|
8
|
+
import { DatePickerTypeDateTimeRange } from './DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange';
|
|
8
9
|
import { datePickerPropTypeDefault, } from './helpers';
|
|
9
10
|
var typeMap = {
|
|
10
11
|
'date': DatePickerTypeDate,
|
|
11
12
|
'date-range': DatePickerTypeDateRange,
|
|
12
|
-
'date-time': DatePickerTypeDateTime
|
|
13
|
+
'date-time': DatePickerTypeDateTime,
|
|
14
|
+
'date-time-range': DatePickerTypeDateTimeRange
|
|
13
15
|
};
|
|
14
16
|
export var DatePicker = forwardRef(function (props, ref) {
|
|
15
17
|
var _a = props.type, type = _a === void 0 ? datePickerPropTypeDefault : _a, _b = props.minDate, minDate = _b === void 0 ? minDateDefault : _b, _c = props.maxDate, maxDate = _c === void 0 ? maxDateDefault : _c, multiplicityMinutes = props.multiplicityMinutes, multiplicitySeconds = props.multiplicitySeconds, multiplicityHours = props.multiplicityHours, otherProps = __rest(props, ["type", "minDate", "maxDate", "multiplicityMinutes", "multiplicitySeconds", "multiplicityHours"]);
|
package/__internal__/src/components/DatePickerCanary/DatePickerDropdown/DatePickerDropdown.css
CHANGED
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
--transition-spase: var(--space-2xs);
|
|
3
3
|
padding: var(--space-l);
|
|
4
4
|
background: var(--color-bg-default);
|
|
5
|
-
opacity: 0;
|
|
6
5
|
-webkit-box-shadow: var(--shadow-layer);
|
|
7
6
|
box-shadow: var(--shadow-layer);
|
|
8
|
-
-webkit-transform: translateY(var(--transition-spase));
|
|
9
|
-
transform: translateY(var(--transition-spase));
|
|
10
7
|
}
|
|
11
8
|
|
|
12
9
|
.DatePickerDropdown_form_default {
|
|
@@ -20,49 +17,3 @@
|
|
|
20
17
|
.DatePickerDropdown_form_round {
|
|
21
18
|
border-radius: var(--space-l);
|
|
22
19
|
}
|
|
23
|
-
|
|
24
|
-
.DatePickerDropdown_animate_appear,
|
|
25
|
-
.DatePickerDropdown_animate_appearActive,
|
|
26
|
-
.DatePickerDropdown_animate_appearDone,
|
|
27
|
-
.DatePickerDropdown_animate_enter,
|
|
28
|
-
.DatePickerDropdown_animate_enterActive,
|
|
29
|
-
.DatePickerDropdown_animate_enterDone,
|
|
30
|
-
.DatePickerDropdown_animate_exit,
|
|
31
|
-
.DatePickerDropdown_animate_exitActive,
|
|
32
|
-
.DatePickerDropdown_animate_exitDone {
|
|
33
|
-
-webkit-transition: 0.2s ease;
|
|
34
|
-
transition: 0.2s ease;
|
|
35
|
-
-webkit-transition-property: opacity, -webkit-transform;
|
|
36
|
-
transition-property: opacity, -webkit-transform;
|
|
37
|
-
transition-property: opacity, transform;
|
|
38
|
-
transition-property: opacity, transform, -webkit-transform;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.DatePickerDropdown_animate_appear,
|
|
42
|
-
.DatePickerDropdown_animate_enter {
|
|
43
|
-
opacity: 0;
|
|
44
|
-
-webkit-transform: translateY(var(--transition-spase));
|
|
45
|
-
transform: translateY(var(--transition-spase));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.DatePickerDropdown_animate_enterActive,
|
|
49
|
-
.DatePickerDropdown_animate_appearActive,
|
|
50
|
-
.DatePickerDropdown_animate_appearDone,
|
|
51
|
-
.DatePickerDropdown_animate_enterDone {
|
|
52
|
-
opacity: 1;
|
|
53
|
-
-webkit-transform: translateY(0);
|
|
54
|
-
transform: translateY(0);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.DatePickerDropdown_animate_exit {
|
|
58
|
-
opacity: 1;
|
|
59
|
-
-webkit-transform: translateY(0);
|
|
60
|
-
transform: translateY(0);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.DatePickerDropdown_animate_exitActive,
|
|
64
|
-
.DatePickerDropdown_animate_exitDone {
|
|
65
|
-
opacity: 0;
|
|
66
|
-
-webkit-transform: translateY(var(--transition-spase));
|
|
67
|
-
transform: translateY(var(--transition-spase));
|
|
68
|
-
}
|
package/__internal__/src/components/DatePickerCanary/DatePickerDropdown/DatePickerDropdown.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare type DatePickerDropdownProps = PropsWithHTMLAttributesAndRef<{
|
|
|
25
25
|
multiplicitySeconds?: number;
|
|
26
26
|
multiplicityMinutes?: number;
|
|
27
27
|
multiplicityHours?: number;
|
|
28
|
+
timeFor?: 'start' | 'end';
|
|
28
29
|
}, HTMLDivElement>;
|
|
29
30
|
declare type DatePickerDropdownComponent = (props: DatePickerDropdownProps) => React.ReactElement | null;
|
|
30
31
|
export declare const DatePickerDropdown: DatePickerDropdownComponent;
|
package/__internal__/src/components/DatePickerCanary/DatePickerDropdown/DatePickerDropdown.js
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import { __assign, __rest } from "tslib";
|
|
1
|
+
import { __assign, __read, __rest } from "tslib";
|
|
2
2
|
import './DatePickerDropdown.css';
|
|
3
|
-
import React, { forwardRef, useRef } from 'react';
|
|
4
|
-
import {
|
|
3
|
+
import React, { forwardRef, useRef, useState } from 'react';
|
|
4
|
+
import { Transition } from 'react-transition-group';
|
|
5
5
|
import { useForkRef } from '../../../hooks/useForkRef/useForkRef';
|
|
6
|
+
import { animateTimeout, cnMixPopoverAnimate, } from '../../../mixs/MixPopoverAnimate/MixPopoverAnimate';
|
|
6
7
|
import { cn } from '../../../utils/bem';
|
|
7
|
-
import { cnForCssTransition } from '../../../utils/cnForCssTransition';
|
|
8
8
|
import { DateTime, } from '../../DateTimeCanary/DateTimeCanary';
|
|
9
9
|
import { Popover } from '../../Popover/Popover';
|
|
10
10
|
import { datePickerPropDropdownFormDefault, } from '../helpers';
|
|
11
11
|
var cnDatePickerDropdown = cn('DatePickerDropdown');
|
|
12
|
-
var
|
|
13
|
-
export var DatePickerDropdown = forwardRef(function (props, ref) {
|
|
12
|
+
export var DatePickerDropdown = forwardRef(function (props, componentRef) {
|
|
14
13
|
var _a = props.form, form = _a === void 0 ? datePickerPropDropdownFormDefault : _a, anchorRef = props.anchorRef, isOpen = props.isOpen, className = props.className, zIndex = props.zIndex, otherProps = __rest(props, ["form", "anchorRef", "isOpen", "className", "zIndex"]);
|
|
15
14
|
var rootRef = useRef(null);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
var _b = __read(useState(), 2), direction = _b[0], setDirection = _b[1];
|
|
16
|
+
var ref = useForkRef([componentRef, rootRef]);
|
|
17
|
+
return (React.createElement(Transition, { "in": isOpen, unmountOnExit: true, timeout: animateTimeout, nodeRef: rootRef }, function (animate) {
|
|
18
|
+
return (React.createElement(Popover, { ref: ref, anchorRef: anchorRef, className: cnDatePickerDropdown({ form: form }, [
|
|
19
|
+
className,
|
|
20
|
+
cnMixPopoverAnimate({ direction: direction, animate: animate }),
|
|
21
|
+
]), direction: "downStartLeft", spareDirection: "downStartLeft", possibleDirections: ['downStartLeft', 'upStartLeft', 'downStartRight', 'upStartRight'], style: { zIndex: zIndex }, role: "listbox", onSetDirection: setDirection },
|
|
22
|
+
React.createElement(DateTime, __assign({}, otherProps))));
|
|
23
|
+
}));
|
|
19
24
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import './DatePickerFieldTypeDateRange.css';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
export declare const DatePickerFieldTypeDateRange: React.ForwardRefExoticComponent<Pick<import("../../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributes<{
|
|
4
3
|
className?: string | undefined;
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import { __assign, __read, __rest } from "tslib";
|
|
2
|
-
import './DatePickerFieldTypeDateRange.css';
|
|
3
2
|
import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
|
4
3
|
import isBefore from 'date-fns/isBefore';
|
|
5
4
|
import isEqual from 'date-fns/isEqual';
|
|
6
|
-
import { cn } from '../../../utils/bem';
|
|
7
|
-
import { getByMap } from '../../../utils/getByMap';
|
|
8
5
|
import { FieldCaption } from '../../FieldCaption/FieldCaption';
|
|
9
6
|
import { FieldLabel } from '../../FieldLabel/FieldLabel';
|
|
10
7
|
import { DatePickerFieldTypeDate } from '../DatePickerFieldTypeDate/DatePickerFieldTypeDate';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
var cnDatePickerFieldTypeDateRange = cn('DatePickerFieldTypeDateRange');
|
|
8
|
+
import { cnDatePickerMixRangeField } from '../DatePickerMixRangeField/DatePickerMixRangeField';
|
|
9
|
+
import { datePickerErrorTypes, getFormForEnd, getFormForStart } from '../helpers';
|
|
14
10
|
export var DatePickerFieldTypeDateRange = forwardRef(function (props, ref) {
|
|
15
11
|
var _a, _b;
|
|
16
12
|
var className = props.className, _c = props.form, form = _c === void 0 ? 'default' : _c, startFieldInputRef = props.startFieldInputRef, startFieldLeftSide = props.startFieldLeftSide, startFieldRightSide = props.startFieldRightSide, endFieldInputRef = props.endFieldInputRef, endFieldLeftSide = props.endFieldLeftSide, endFieldRightSide = props.endFieldRightSide, _d = props.value, value = _d === void 0 ? [] : _d, onChange = props.onChange, onError = props.onError, name = props.name, disabled = props.disabled, size = props.size, view = props.view, status = props.status, autoFocus = props.autoFocus, placeholder = props.placeholder, readOnly = props.readOnly, required = props.required, tabIndex = props.tabIndex, ariaLabel = props.ariaLabel, iconSize = props.iconSize, format = props.format, separator = props.separator, minDate = props.minDate, maxDate = props.maxDate, startFieldOnBlur = props.startFieldOnBlur, startFieldOnFocus = props.startFieldOnFocus, endFieldOnBlur = props.endFieldOnBlur, endFieldOnFocus = props.endFieldOnFocus, startFieldRef = props.startFieldRef, endFieldRef = props.endFieldRef, startFocused = props.startFocused, endFocused = props.endFocused, label = props.label, labelPosition = props.labelPosition, caption = props.caption, width = props.width, otherProps = __rest(props, ["className", "form", "startFieldInputRef", "startFieldLeftSide", "startFieldRightSide", "endFieldInputRef", "endFieldLeftSide", "endFieldRightSide", "value", "onChange", "onError", "name", "disabled", "size", "view", "status", "autoFocus", "placeholder", "readOnly", "required", "tabIndex", "ariaLabel", "iconSize", "format", "separator", "minDate", "maxDate", "startFieldOnBlur", "startFieldOnFocus", "endFieldOnBlur", "endFieldOnFocus", "startFieldRef", "endFieldRef", "startFocused", "endFocused", "label", "labelPosition", "caption", "width"]);
|
|
17
13
|
var commonProps = {
|
|
18
|
-
className:
|
|
14
|
+
className: cnDatePickerMixRangeField('Field'),
|
|
19
15
|
disabled: disabled,
|
|
20
16
|
name: name,
|
|
21
17
|
onError: onError,
|
|
@@ -89,11 +85,11 @@ export var DatePickerFieldTypeDateRange = forwardRef(function (props, ref) {
|
|
|
89
85
|
useEffect(function () {
|
|
90
86
|
setEndDate(value === null || value === void 0 ? void 0 : value[1]);
|
|
91
87
|
}, [(_b = value === null || value === void 0 ? void 0 : value[1]) === null || _b === void 0 ? void 0 : _b.getTime()]);
|
|
92
|
-
return (React.createElement("div", __assign({}, otherProps, { className:
|
|
93
|
-
label && (React.createElement(FieldLabel, { required: required, className:
|
|
94
|
-
React.createElement("div", { className:
|
|
95
|
-
React.createElement("div", { className:
|
|
96
|
-
React.createElement(DatePickerFieldTypeDate, __assign({}, commonProps, { inputRef: startFieldInputRef, ref: startFieldRef, leftSide: startFieldLeftSide, rightSide: startFieldRightSide, form:
|
|
97
|
-
React.createElement(DatePickerFieldTypeDate, __assign({}, commonProps, { inputRef: endFieldInputRef, ref: endFieldRef, leftSide: endFieldLeftSide, rightSide: endFieldRightSide, form:
|
|
98
|
-
caption && (React.createElement(FieldCaption, { className:
|
|
88
|
+
return (React.createElement("div", __assign({}, otherProps, { className: cnDatePickerMixRangeField({ view: view, labelPosition: labelPosition, width: width, size: size }, [className]), ref: ref }),
|
|
89
|
+
label && (React.createElement(FieldLabel, { required: required, className: cnDatePickerMixRangeField('Label', { labelPosition: labelPosition }), size: size }, label)),
|
|
90
|
+
React.createElement("div", { className: cnDatePickerMixRangeField('Body') },
|
|
91
|
+
React.createElement("div", { className: cnDatePickerMixRangeField('Fields') },
|
|
92
|
+
React.createElement(DatePickerFieldTypeDate, __assign({}, commonProps, { inputRef: startFieldInputRef, ref: startFieldRef, leftSide: startFieldLeftSide, rightSide: startFieldRightSide, form: getFormForStart(form), value: startDate, onChange: handleStartDateChange, onFocus: startFieldOnFocus, onBlur: startFieldOnBlur, focused: startFocused })),
|
|
93
|
+
React.createElement(DatePickerFieldTypeDate, __assign({}, commonProps, { inputRef: endFieldInputRef, ref: endFieldRef, leftSide: endFieldLeftSide, rightSide: endFieldRightSide, form: getFormForEnd(form), value: endDate, onChange: handleEndDateChange, onFocus: endFieldOnFocus, onBlur: endFieldOnBlur, focused: endFocused }))),
|
|
94
|
+
caption && (React.createElement(FieldCaption, { className: cnDatePickerMixRangeField('Caption'), status: status }, caption)))));
|
|
99
95
|
});
|
package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateRange/helpers.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IconComponent } from '../../../icons/Icon/Icon';
|
|
3
3
|
import { DateRange } from '../../../utils/types/Date';
|
|
4
|
-
import { TextFieldPropForm } from '../../TextField/TextField';
|
|
5
4
|
import { DatePickerFieldTypeDateProps } from '../DatePickerFieldTypeDate/helpers';
|
|
6
5
|
declare type DatePickerFieldTypeDateRangePropOnChange = (props: {
|
|
7
6
|
e: Event;
|
|
@@ -28,6 +27,4 @@ export declare type DatePickerFieldTypeDateRangeProps = Omit<DatePickerFieldType
|
|
|
28
27
|
onChangeCurrentVisibleDate?: (date: Date) => void;
|
|
29
28
|
currentVisibleDate?: Date;
|
|
30
29
|
};
|
|
31
|
-
export declare const mapFormForStart: Record<TextFieldPropForm, TextFieldPropForm>;
|
|
32
|
-
export declare const mapFormForEnd: Record<TextFieldPropForm, TextFieldPropForm>;
|
|
33
30
|
export {};
|
package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateRange/helpers.js
CHANGED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export var mapFormForStart = {
|
|
2
|
-
"default": 'defaultClear',
|
|
3
|
-
defaultClear: 'defaultClear',
|
|
4
|
-
defaultBrick: 'defaultClear',
|
|
5
|
-
brick: 'brickClear',
|
|
6
|
-
brickDefault: 'brickClear',
|
|
7
|
-
brickClear: 'brickClear',
|
|
8
|
-
brickRound: 'brickClear',
|
|
9
|
-
round: 'roundClear',
|
|
10
|
-
roundClear: 'roundClear',
|
|
11
|
-
roundBrick: 'roundClear',
|
|
12
|
-
clearRound: 'clearClear',
|
|
13
|
-
clearDefault: 'clearClear',
|
|
14
|
-
clearBrick: 'clearClear',
|
|
15
|
-
clearClear: 'clearClear'
|
|
16
|
-
};
|
|
17
|
-
export var mapFormForEnd = {
|
|
18
|
-
"default": 'brickDefault',
|
|
19
|
-
defaultClear: 'brickClear',
|
|
20
|
-
defaultBrick: 'brick',
|
|
21
|
-
brick: 'brick',
|
|
22
|
-
brickDefault: 'brickDefault',
|
|
23
|
-
brickClear: 'brickClear',
|
|
24
|
-
brickRound: 'brickRound',
|
|
25
|
-
round: 'brickRound',
|
|
26
|
-
roundClear: 'brickClear',
|
|
27
|
-
roundBrick: 'brick',
|
|
28
|
-
clearRound: 'brickRound',
|
|
29
|
-
clearDefault: 'brickDefault',
|
|
30
|
-
clearBrick: 'brick',
|
|
31
|
-
clearClear: 'brickClear'
|
|
32
|
-
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const DatePickerFieldTypeDateTimeRange: React.ForwardRefExoticComponent<Pick<import("../../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributes<{
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
value?: Date | null | undefined;
|
|
5
|
+
onChange?: ((props: {
|
|
6
|
+
e: Event;
|
|
7
|
+
value: Date | null;
|
|
8
|
+
}) => void) | undefined;
|
|
9
|
+
onError?: import("../helpers").DatePickerPropOnError | undefined;
|
|
10
|
+
id?: string | undefined;
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
13
|
+
size?: "xs" | "s" | "m" | "l" | undefined;
|
|
14
|
+
view?: "default" | "clear" | undefined;
|
|
15
|
+
form?: "default" | "round" | "brick" | "brickRound" | "roundBrick" | "brickDefault" | "defaultBrick" | "clearRound" | "roundClear" | "clearDefault" | "defaultClear" | "brickClear" | "clearBrick" | "clearClear" | undefined;
|
|
16
|
+
status?: "alert" | "success" | "warning" | undefined;
|
|
17
|
+
width?: "default" | "full" | undefined;
|
|
18
|
+
onFocus?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined;
|
|
19
|
+
onBlur?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined;
|
|
20
|
+
autoFocus?: boolean | undefined;
|
|
21
|
+
placeholder?: string | undefined;
|
|
22
|
+
leftSide?: string | React.FC<import("../../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
|
|
23
|
+
view?: "link" | "alert" | "brand" | "ghost" | "primary" | "secondary" | "success" | "warning" | "disabled" | undefined;
|
|
24
|
+
size?: "xs" | "s" | "m" | undefined;
|
|
25
|
+
}, HTMLSpanElement>> | undefined;
|
|
26
|
+
rightSide?: string | React.FC<import("../../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
|
|
27
|
+
view?: "link" | "alert" | "brand" | "ghost" | "primary" | "secondary" | "success" | "warning" | "disabled" | undefined;
|
|
28
|
+
size?: "xs" | "s" | "m" | undefined;
|
|
29
|
+
}, HTMLSpanElement>> | undefined;
|
|
30
|
+
readOnly?: boolean | undefined;
|
|
31
|
+
required?: boolean | undefined;
|
|
32
|
+
tabIndex?: number | undefined;
|
|
33
|
+
inputRef?: ((instance: HTMLInputElement | HTMLTextAreaElement | null) => void) | React.RefObject<HTMLInputElement | HTMLTextAreaElement> | null | undefined;
|
|
34
|
+
ariaLabel?: string | undefined;
|
|
35
|
+
iconSize?: "xs" | "s" | "m" | undefined;
|
|
36
|
+
children?: undefined;
|
|
37
|
+
format?: string | undefined;
|
|
38
|
+
separator?: string | undefined;
|
|
39
|
+
minDate?: Date | undefined;
|
|
40
|
+
maxDate?: Date | undefined;
|
|
41
|
+
focused?: boolean | undefined;
|
|
42
|
+
multiplicitySeconds?: number | undefined;
|
|
43
|
+
multiplicityMinutes?: number | undefined;
|
|
44
|
+
multiplicityHours?: number | undefined;
|
|
45
|
+
label?: string | undefined;
|
|
46
|
+
caption?: string | undefined;
|
|
47
|
+
labelPosition?: "left" | "top" | undefined;
|
|
48
|
+
}, HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "view" | "size" | "caption" | "form" | "label" | "name" | "width" | "format" | "autoFocus" | "readOnly" | "required" | "status" | "focused" | "ariaLabel" | "labelPosition" | "iconSize" | "separator" | "minDate" | "maxDate" | "multiplicitySeconds" | "multiplicityMinutes" | "multiplicityHours"> & {
|
|
49
|
+
onChange?: ((props: {
|
|
50
|
+
e: Event;
|
|
51
|
+
value: import("../../../utils/types/Date").DateRange | null;
|
|
52
|
+
}) => void) | undefined;
|
|
53
|
+
value?: import("../../../utils/types/Date").DateRange | null | undefined;
|
|
54
|
+
startFieldInputRef?: ((instance: HTMLInputElement | null) => void) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
55
|
+
endFieldInputRef?: ((instance: HTMLInputElement | null) => void) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
56
|
+
startFieldLeftSide?: string | React.FC<import("../../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
|
|
57
|
+
view?: "link" | "alert" | "brand" | "ghost" | "primary" | "secondary" | "success" | "warning" | "disabled" | undefined;
|
|
58
|
+
size?: "xs" | "s" | "m" | undefined;
|
|
59
|
+
}, HTMLSpanElement>> | undefined;
|
|
60
|
+
startFieldRightSide?: string | React.FC<import("../../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
|
|
61
|
+
view?: "link" | "alert" | "brand" | "ghost" | "primary" | "secondary" | "success" | "warning" | "disabled" | undefined;
|
|
62
|
+
size?: "xs" | "s" | "m" | undefined;
|
|
63
|
+
}, HTMLSpanElement>> | undefined;
|
|
64
|
+
endFieldLeftSide?: string | React.FC<import("../../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
|
|
65
|
+
view?: "link" | "alert" | "brand" | "ghost" | "primary" | "secondary" | "success" | "warning" | "disabled" | undefined;
|
|
66
|
+
size?: "xs" | "s" | "m" | undefined;
|
|
67
|
+
}, HTMLSpanElement>> | undefined;
|
|
68
|
+
endFieldRightSide?: string | React.FC<import("../../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
|
|
69
|
+
view?: "link" | "alert" | "brand" | "ghost" | "primary" | "secondary" | "success" | "warning" | "disabled" | undefined;
|
|
70
|
+
size?: "xs" | "s" | "m" | undefined;
|
|
71
|
+
}, HTMLSpanElement>> | undefined;
|
|
72
|
+
startFieldRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
73
|
+
endFieldRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
74
|
+
startFieldOnFocus?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined;
|
|
75
|
+
endFieldOnFocus?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined;
|
|
76
|
+
startFieldOnBlur?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined;
|
|
77
|
+
endFieldOnBlur?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined;
|
|
78
|
+
startFocused?: boolean | undefined;
|
|
79
|
+
endFocused?: boolean | undefined;
|
|
80
|
+
id?: string | undefined;
|
|
81
|
+
onChangeCurrentVisibleDate?: ((date: Date) => void) | undefined;
|
|
82
|
+
currentVisibleDate?: Date | undefined;
|
|
83
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { __assign, __read, __rest } from "tslib";
|
|
2
|
+
import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import isBefore from 'date-fns/isBefore';
|
|
4
|
+
import isEqual from 'date-fns/isEqual';
|
|
5
|
+
import { FieldCaption } from '../../FieldCaption/FieldCaption';
|
|
6
|
+
import { FieldLabel } from '../../FieldLabel/FieldLabel';
|
|
7
|
+
import { DatePickerFieldTypeDateTime } from '../DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime';
|
|
8
|
+
import { cnDatePickerMixRangeField } from '../DatePickerMixRangeField/DatePickerMixRangeField';
|
|
9
|
+
import { datePickerErrorTypes, getFormForEnd, getFormForStart } from '../helpers';
|
|
10
|
+
export var DatePickerFieldTypeDateTimeRange = forwardRef(function (props, ref) {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
var className = props.className, _c = props.form, form = _c === void 0 ? 'default' : _c, startFieldInputRef = props.startFieldInputRef, startFieldLeftSide = props.startFieldLeftSide, startFieldRightSide = props.startFieldRightSide, endFieldInputRef = props.endFieldInputRef, endFieldLeftSide = props.endFieldLeftSide, endFieldRightSide = props.endFieldRightSide, _d = props.value, value = _d === void 0 ? [] : _d, onChange = props.onChange, onError = props.onError, name = props.name, disabled = props.disabled, size = props.size, view = props.view, status = props.status, autoFocus = props.autoFocus, placeholder = props.placeholder, readOnly = props.readOnly, required = props.required, tabIndex = props.tabIndex, ariaLabel = props.ariaLabel, iconSize = props.iconSize, format = props.format, separator = props.separator, minDate = props.minDate, maxDate = props.maxDate, startFieldOnBlur = props.startFieldOnBlur, startFieldOnFocus = props.startFieldOnFocus, endFieldOnBlur = props.endFieldOnBlur, endFieldOnFocus = props.endFieldOnFocus, startFieldRef = props.startFieldRef, endFieldRef = props.endFieldRef, startFocused = props.startFocused, endFocused = props.endFocused, label = props.label, labelPosition = props.labelPosition, caption = props.caption, width = props.width, otherProps = __rest(props, ["className", "form", "startFieldInputRef", "startFieldLeftSide", "startFieldRightSide", "endFieldInputRef", "endFieldLeftSide", "endFieldRightSide", "value", "onChange", "onError", "name", "disabled", "size", "view", "status", "autoFocus", "placeholder", "readOnly", "required", "tabIndex", "ariaLabel", "iconSize", "format", "separator", "minDate", "maxDate", "startFieldOnBlur", "startFieldOnFocus", "endFieldOnBlur", "endFieldOnFocus", "startFieldRef", "endFieldRef", "startFocused", "endFocused", "label", "labelPosition", "caption", "width"]);
|
|
13
|
+
var commonProps = {
|
|
14
|
+
className: cnDatePickerMixRangeField('Field'),
|
|
15
|
+
disabled: disabled,
|
|
16
|
+
name: name,
|
|
17
|
+
onError: onError,
|
|
18
|
+
size: size,
|
|
19
|
+
view: view,
|
|
20
|
+
status: status,
|
|
21
|
+
autoFocus: autoFocus,
|
|
22
|
+
placeholder: placeholder,
|
|
23
|
+
readOnly: readOnly,
|
|
24
|
+
required: required,
|
|
25
|
+
tabIndex: tabIndex,
|
|
26
|
+
ariaLabel: ariaLabel,
|
|
27
|
+
iconSize: iconSize,
|
|
28
|
+
format: format,
|
|
29
|
+
separator: separator,
|
|
30
|
+
minDate: minDate,
|
|
31
|
+
maxDate: maxDate
|
|
32
|
+
};
|
|
33
|
+
var _e = __read(useState(value === null || value === void 0 ? void 0 : value[0]), 2), startDate = _e[0], setStartDate = _e[1];
|
|
34
|
+
var _f = __read(useState(value === null || value === void 0 ? void 0 : value[1]), 2), endDate = _f[0], setEndDate = _f[1];
|
|
35
|
+
var eventRef = useRef();
|
|
36
|
+
var handleChange = function (e, ownStartDate, ownEndDate) {
|
|
37
|
+
var start = ownStartDate || startDate;
|
|
38
|
+
var end = ownEndDate || endDate;
|
|
39
|
+
if (!onChange) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (start && end) {
|
|
43
|
+
if (isBefore(start, end) || isEqual(start, end)) {
|
|
44
|
+
onChange({ e: e, value: [start, end] });
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
onChange({ e: e, value: [start, undefined] });
|
|
48
|
+
onError && onError({ type: datePickerErrorTypes[2], date: [start, end] });
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (start) {
|
|
52
|
+
onChange({ e: e, value: [start, undefined] });
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (end) {
|
|
56
|
+
onChange({ e: e, value: [undefined, end] });
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
onChange({ e: e, value: null });
|
|
60
|
+
};
|
|
61
|
+
var handleStartDateChange = function (props) {
|
|
62
|
+
var _a;
|
|
63
|
+
if (((_a = props.value) === null || _a === void 0 ? void 0 : _a.getTime()) === (startDate === null || startDate === void 0 ? void 0 : startDate.getTime())) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
eventRef.current = props.e;
|
|
67
|
+
setStartDate(props.value);
|
|
68
|
+
};
|
|
69
|
+
var handleEndDateChange = function (props) {
|
|
70
|
+
var _a;
|
|
71
|
+
if (((_a = props.value) === null || _a === void 0 ? void 0 : _a.getTime()) === (endDate === null || endDate === void 0 ? void 0 : endDate.getTime())) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
eventRef.current = props.e;
|
|
75
|
+
setEndDate(props.value);
|
|
76
|
+
};
|
|
77
|
+
useEffect(function () {
|
|
78
|
+
if (eventRef.current) {
|
|
79
|
+
handleChange(eventRef.current, startDate, endDate);
|
|
80
|
+
}
|
|
81
|
+
}, [eventRef.current]);
|
|
82
|
+
useEffect(function () {
|
|
83
|
+
setStartDate(value === null || value === void 0 ? void 0 : value[0]);
|
|
84
|
+
}, [(_a = value === null || value === void 0 ? void 0 : value[0]) === null || _a === void 0 ? void 0 : _a.getTime()]);
|
|
85
|
+
useEffect(function () {
|
|
86
|
+
setEndDate(value === null || value === void 0 ? void 0 : value[1]);
|
|
87
|
+
}, [(_b = value === null || value === void 0 ? void 0 : value[1]) === null || _b === void 0 ? void 0 : _b.getTime()]);
|
|
88
|
+
return (React.createElement("div", __assign({}, otherProps, { className: cnDatePickerMixRangeField({ view: view, labelPosition: labelPosition, width: width, size: size }, [className]), ref: ref }),
|
|
89
|
+
label && (React.createElement(FieldLabel, { required: required, className: cnDatePickerMixRangeField('Label', { labelPosition: labelPosition }), size: size }, label)),
|
|
90
|
+
React.createElement("div", { className: cnDatePickerMixRangeField('Body') },
|
|
91
|
+
React.createElement("div", { className: cnDatePickerMixRangeField('Fields') },
|
|
92
|
+
React.createElement(DatePickerFieldTypeDateTime, __assign({}, commonProps, { inputRef: startFieldInputRef, ref: startFieldRef, leftSide: startFieldLeftSide, rightSide: startFieldRightSide, form: getFormForStart(form), value: startDate, onChange: handleStartDateChange, onFocus: startFieldOnFocus, onBlur: startFieldOnBlur, focused: startFocused })),
|
|
93
|
+
React.createElement(DatePickerFieldTypeDateTime, __assign({}, commonProps, { inputRef: endFieldInputRef, ref: endFieldRef, leftSide: endFieldLeftSide, rightSide: endFieldRightSide, form: getFormForEnd(form), value: endDate, onChange: handleEndDateChange, onFocus: endFieldOnFocus, onBlur: endFieldOnBlur, focused: endFocused }))),
|
|
94
|
+
caption && (React.createElement(FieldCaption, { className: cnDatePickerMixRangeField('Caption'), status: status }, caption)))));
|
|
95
|
+
});
|
package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/helpers.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconComponent } from '../../../icons/Icon/Icon';
|
|
3
|
+
import { DateRange } from '../../../utils/types/Date';
|
|
4
|
+
import { DatePickerFieldTypeDateTimeProps } from '../DatePickerFieldTypeDateTime/helpers';
|
|
5
|
+
declare type DatePickerFieldTypeDateTimeRangePropOnChange = (props: {
|
|
6
|
+
e: Event;
|
|
7
|
+
value: DateRange | null;
|
|
8
|
+
}) => void;
|
|
9
|
+
export declare type DatePickerFieldTypeDateTimeRangeProps = Omit<DatePickerFieldTypeDateTimeProps, 'onChange' | 'value' | 'inputRef' | 'leftSide' | 'rightSide' | 'id' | 'onFocus' | 'onBlur'> & {
|
|
10
|
+
onChange?: DatePickerFieldTypeDateTimeRangePropOnChange;
|
|
11
|
+
value?: DateRange | null;
|
|
12
|
+
startFieldInputRef?: React.Ref<HTMLInputElement>;
|
|
13
|
+
endFieldInputRef?: React.Ref<HTMLInputElement>;
|
|
14
|
+
startFieldLeftSide?: string | IconComponent;
|
|
15
|
+
startFieldRightSide?: string | IconComponent;
|
|
16
|
+
endFieldLeftSide?: string | IconComponent;
|
|
17
|
+
endFieldRightSide?: string | IconComponent;
|
|
18
|
+
startFieldRef?: React.Ref<HTMLDivElement>;
|
|
19
|
+
endFieldRef?: React.Ref<HTMLDivElement>;
|
|
20
|
+
startFieldOnFocus?: React.FocusEventHandler<HTMLElement>;
|
|
21
|
+
endFieldOnFocus?: React.FocusEventHandler<HTMLElement>;
|
|
22
|
+
startFieldOnBlur?: React.FocusEventHandler<HTMLElement>;
|
|
23
|
+
endFieldOnBlur?: React.FocusEventHandler<HTMLElement>;
|
|
24
|
+
startFocused?: boolean;
|
|
25
|
+
endFocused?: boolean;
|
|
26
|
+
id?: string;
|
|
27
|
+
onChangeCurrentVisibleDate?: (date: Date) => void;
|
|
28
|
+
currentVisibleDate?: Date;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/helpers.js
ADDED
|
File without changes
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
.
|
|
1
|
+
.DatePickerMixRangeField {
|
|
2
2
|
--caption-margin-left: calc(var(--input-space) + var(--control-border-width));
|
|
3
3
|
display: -webkit-box;
|
|
4
4
|
display: -ms-flexbox;
|
|
5
5
|
display: flex;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.
|
|
8
|
+
.DatePickerMixRangeField_size_xs {
|
|
9
9
|
--input-height: var(--control-height-xs);
|
|
10
10
|
--input-space: calc(var(--control-space-xs) * 0.5);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.
|
|
13
|
+
.DatePickerMixRangeField_size_s {
|
|
14
14
|
--input-height: var(--control-height-s);
|
|
15
15
|
--input-space: calc(var(--control-space-s) * 0.5);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.DatePickerMixRangeField_size_m {
|
|
19
19
|
--input-height: var(--control-height-m);
|
|
20
20
|
--input-space: calc(var(--control-space-m) * 0.5);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.
|
|
23
|
+
.DatePickerMixRangeField_size_l {
|
|
24
24
|
--input-height: var(--control-height-l);
|
|
25
25
|
--input-space: calc(var(--control-space-l) * 0.5);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.
|
|
28
|
+
.DatePickerMixRangeField_view_clear {
|
|
29
29
|
--caption-margin-left: 0;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.
|
|
32
|
+
.DatePickerMixRangeField_width_full {
|
|
33
33
|
width: 100%;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.
|
|
36
|
+
.DatePickerMixRangeField-Field {
|
|
37
37
|
-webkit-box-flex: 1;
|
|
38
38
|
-ms-flex: 1;
|
|
39
39
|
flex: 1;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.DatePickerMixRangeField-Fields {
|
|
43
43
|
display: -webkit-box;
|
|
44
44
|
display: -ms-flexbox;
|
|
45
45
|
display: flex;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.
|
|
48
|
+
.DatePickerMixRangeField_labelPosition_top {
|
|
49
49
|
-webkit-box-orient: vertical;
|
|
50
50
|
-webkit-box-direction: normal;
|
|
51
51
|
-ms-flex-direction: column;
|
|
52
52
|
flex-direction: column;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.
|
|
55
|
+
.DatePickerMixRangeField_labelPosition_top > *:not(:last-child) {
|
|
56
56
|
margin-bottom: var(--space-xs);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
.
|
|
59
|
+
.DatePickerMixRangeField_labelPosition_left {
|
|
60
60
|
-webkit-box-orient: horizontal;
|
|
61
61
|
-webkit-box-direction: normal;
|
|
62
62
|
-ms-flex-direction: row;
|
|
63
63
|
flex-direction: row;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.
|
|
66
|
+
.DatePickerMixRangeField_labelPosition_left .DatePickerFieldTypeDateRange-Label {
|
|
67
67
|
display: -webkit-inline-box;
|
|
68
68
|
display: -ms-inline-flexbox;
|
|
69
69
|
display: inline-flex;
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
height: var(--input-height);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.
|
|
76
|
+
.DatePickerMixRangeField_labelPosition_left > *:not(:last-child) {
|
|
77
77
|
margin-right: var(--space-s);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.
|
|
80
|
+
.DatePickerMixRangeField-Body {
|
|
81
81
|
display: -webkit-inline-box;
|
|
82
82
|
display: -ms-inline-flexbox;
|
|
83
83
|
display: inline-flex;
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
width: 100%;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
.
|
|
91
|
+
.DatePickerMixRangeField-Caption {
|
|
92
92
|
margin-top: var(--space-2xs);
|
|
93
93
|
margin-left: var(--caption-margin-left);
|
|
94
94
|
}
|
package/__internal__/src/components/DatePickerCanary/DatePickerTypeDate/DatePickerTypeDate.js
CHANGED
|
@@ -42,7 +42,7 @@ export var DatePickerTypeDate = forwardRef(function (props, ref) {
|
|
|
42
42
|
}, [props.value]);
|
|
43
43
|
var handleClose = function () {
|
|
44
44
|
setCalendarVisible.off();
|
|
45
|
-
setCurrentVisibleDate(undefined);
|
|
45
|
+
setCurrentVisibleDate(props.value ? undefined : currentVisibleDateProp);
|
|
46
46
|
};
|
|
47
47
|
useClickOutside({
|
|
48
48
|
isActive: calendarVisible,
|