@consta/uikit 3.15.1 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +26 -8
- 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/IconPlay/package.json +1 -1
- package/IconPressure/package.json +1 -1
- 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/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/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/{MixDropdownAnimate → MixPopoverAnimate}/package.json +2 -2
- 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/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 +1 -0
- 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 +1 -1
- package/__internal__/cjs-src/components/EventInterceptor/propsHandlers/useTextFieldEventsHandler.d.ts +1 -1
- 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 +3 -2
- 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/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/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/helpers.d.ts +2 -0
- 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/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/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 +1 -0
- 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 +1 -1
- package/__internal__/src/components/EventInterceptor/propsHandlers/useTextFieldEventsHandler.d.ts +1 -1
- 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 +3 -2
- package/__internal__/src/components/SelectComponents/helpers.d.ts +1 -0
- package/__internal__/src/components/SelectComponents/helpers.js +1 -0
- 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/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/helpers.d.ts +2 -0
- 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/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 +3 -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
|
@@ -4,17 +4,10 @@ export var getSteps = function (step, min, max) {
|
|
|
4
4
|
var stepsArray = [];
|
|
5
5
|
var size = min;
|
|
6
6
|
if (Array.isArray(step)) {
|
|
7
|
-
step.
|
|
7
|
+
for (var i = 0; i < step.length - 1; i++) {
|
|
8
8
|
stepsArray.push({
|
|
9
|
-
min:
|
|
10
|
-
max:
|
|
11
|
-
});
|
|
12
|
-
size += stepSize - size;
|
|
13
|
-
});
|
|
14
|
-
if (size !== max) {
|
|
15
|
-
stepsArray.push({
|
|
16
|
-
min: size,
|
|
17
|
-
max: max
|
|
9
|
+
min: step[i],
|
|
10
|
+
max: step[i + 1]
|
|
18
11
|
});
|
|
19
12
|
}
|
|
20
13
|
}
|
|
@@ -30,6 +23,7 @@ export var getSteps = function (step, min, max) {
|
|
|
30
23
|
return stepsArray;
|
|
31
24
|
};
|
|
32
25
|
export var useSliderStationing = function (value, min, max, view, range, step, buttonRefs, sliderLineRef) {
|
|
26
|
+
if (step === void 0) { step = 1; }
|
|
33
27
|
var _a = __read(useState([]), 2), lineSizes = _a[0], setLineSizes = _a[1];
|
|
34
28
|
var _b = __read(useState([]), 2), buttonPositions = _b[0], setButtonPositions = _b[1];
|
|
35
29
|
var calculateLines = function () {
|
|
@@ -3,6 +3,7 @@ import './TextField.css';
|
|
|
3
3
|
import React, { forwardRef, useEffect, useState } from 'react';
|
|
4
4
|
import TextAreaAutoSize from 'react-textarea-autosize';
|
|
5
5
|
import { useForkRef } from '../../hooks/useForkRef/useForkRef';
|
|
6
|
+
import { useSortSteps } from '../../hooks/useSortSteps/useSortSteps';
|
|
6
7
|
import { IconClose } from '../../icons/IconClose/IconClose';
|
|
7
8
|
import { IconSelect } from '../../icons/IconSelect/IconSelect';
|
|
8
9
|
import { IconSelectOpen } from '../../icons/IconSelectOpen/IconSelectOpen';
|
|
@@ -11,7 +12,7 @@ import { getByMap } from '../../utils/getByMap';
|
|
|
11
12
|
import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
|
|
12
13
|
import { FieldCaption } from '../FieldCaption/FieldCaption';
|
|
13
14
|
import { FieldLabel } from '../FieldLabel/FieldLabel';
|
|
14
|
-
import { sizeMap, textFieldPropFormDefault, textFieldPropSizeDefault, textFieldPropViewDefault, textFieldPropWidthDefault, } from './helpers';
|
|
15
|
+
import { getIncrementFlag, getValueByStepArray, getValueByStepNumber, sizeMap, textFieldPropFormDefault, textFieldPropSizeDefault, textFieldPropViewDefault, textFieldPropWidthDefault, } from './helpers';
|
|
15
16
|
export var COMPONENT_NAME = 'TextField';
|
|
16
17
|
export var cnTextField = cn(COMPONENT_NAME);
|
|
17
18
|
export function TextFieldRender(props, ref) {
|
|
@@ -25,6 +26,7 @@ export function TextFieldRender(props, ref) {
|
|
|
25
26
|
var leftSideIsString = typeof leftSide === 'string';
|
|
26
27
|
var rightSideIsString = typeof rightSide === 'string';
|
|
27
28
|
var iconSize = getByMap(sizeMap, size, iconSizeProp);
|
|
29
|
+
var sortedSteps = useSortSteps({ step: step, min: Number(min), max: Number(max) });
|
|
28
30
|
var handleChange = function (e) {
|
|
29
31
|
var value = e.target.value;
|
|
30
32
|
!disabled && (onChange === null || onChange === void 0 ? void 0 : onChange({ e: e, id: id, name: name, value: value || null }));
|
|
@@ -63,6 +65,16 @@ export function TextFieldRender(props, ref) {
|
|
|
63
65
|
});
|
|
64
66
|
}
|
|
65
67
|
}, []);
|
|
68
|
+
var onKeyDown = function (e) {
|
|
69
|
+
var flag = getIncrementFlag(e);
|
|
70
|
+
if (type === 'number' && typeof flag === 'boolean' && !disabled) {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
73
|
+
e: e,
|
|
74
|
+
value: getValueByStep(flag).toString()
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
};
|
|
66
78
|
var textareaProps = {
|
|
67
79
|
rows: rows,
|
|
68
80
|
cols: cols,
|
|
@@ -74,7 +86,8 @@ export function TextFieldRender(props, ref) {
|
|
|
74
86
|
type: type,
|
|
75
87
|
max: max,
|
|
76
88
|
min: min,
|
|
77
|
-
step:
|
|
89
|
+
step: !Array.isArray(sortedSteps) ? sortedSteps : 0,
|
|
90
|
+
onKeyDown: onKeyDown,
|
|
78
91
|
ref: useForkRef([inputRef, inputRefProp])
|
|
79
92
|
};
|
|
80
93
|
var handleClear = function (e) {
|
|
@@ -83,23 +96,22 @@ export function TextFieldRender(props, ref) {
|
|
|
83
96
|
value: ''
|
|
84
97
|
});
|
|
85
98
|
};
|
|
86
|
-
var
|
|
99
|
+
var getValueByStep = function (isIncrement) {
|
|
87
100
|
var _a;
|
|
101
|
+
return Array.isArray(sortedSteps)
|
|
102
|
+
? (_a = getValueByStepArray({
|
|
103
|
+
min: min,
|
|
104
|
+
max: max,
|
|
105
|
+
value: value,
|
|
106
|
+
isIncrement: isIncrement,
|
|
107
|
+
steps: sortedSteps
|
|
108
|
+
})) !== null && _a !== void 0 ? _a : 0 : getValueByStepNumber({ value: value, step: sortedSteps, isIncrement: isIncrement, min: min, max: max });
|
|
109
|
+
};
|
|
110
|
+
var changeNumberValue = function (e, isIncrement) {
|
|
88
111
|
if (isIncrement === void 0) { isIncrement = true; }
|
|
89
|
-
var currentValue = value || 0;
|
|
90
|
-
currentValue = isIncrement
|
|
91
|
-
? Number(currentValue) + Number(step)
|
|
92
|
-
: Number(currentValue) - Number(step);
|
|
93
112
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
94
113
|
e: e,
|
|
95
|
-
value:
|
|
96
|
-
/* Необходимо для того, чтобы избежать ситуации, когда по нажатию
|
|
97
|
-
на кнопку прибавляется число с погрешностью.
|
|
98
|
-
Здесь мы берем разрядность дробной части шага и ограничиваем
|
|
99
|
-
результирующее число этой разрядностью */
|
|
100
|
-
Number(step)
|
|
101
|
-
.toString()
|
|
102
|
-
.split('.')[1]) === null || _a === void 0 ? void 0 : _a.length) || 0)
|
|
114
|
+
value: getValueByStep(isIncrement).toString()
|
|
103
115
|
});
|
|
104
116
|
};
|
|
105
117
|
var rootProps = {
|
|
@@ -128,9 +140,9 @@ export function TextFieldRender(props, ref) {
|
|
|
128
140
|
}), title: typeof leftSide === 'string' ? leftSide : undefined }, leftSideIsString ? (leftSide) : (React.createElement(LeftIcon, { className: cnTextField('Icon'), size: iconSize })))),
|
|
129
141
|
textarea ? (React.createElement(TextAreaAutoSize, __assign({}, commonProps, textareaProps))) : (React.createElement("input", __assign({}, commonProps, inputProps))),
|
|
130
142
|
type === 'number' && (React.createElement("div", { className: cnTextField('Counter') },
|
|
131
|
-
React.createElement("button", { onClick: function (e) { return changeNumberValue(e, true); }, type: "button", className: cnTextField('CounterButton') },
|
|
143
|
+
React.createElement("button", { onFocus: handleFocus, onClick: function (e) { return changeNumberValue(e, true); }, type: "button", className: cnTextField('CounterButton') },
|
|
132
144
|
React.createElement(IconSelectOpen, { size: "xs" })),
|
|
133
|
-
React.createElement("button", { onClick: function (e) { return changeNumberValue(e, false); }, type: "button", className: cnTextField('CounterButton') },
|
|
145
|
+
React.createElement("button", { onFocus: handleFocus, onClick: function (e) { return changeNumberValue(e, false); }, type: "button", className: cnTextField('CounterButton') },
|
|
134
146
|
React.createElement(IconSelect, { size: "xs" })))),
|
|
135
147
|
value && withClearButton && type !== 'number' && (React.createElement("button", { type: "button", disabled: disabled, onClick: handleClear, className: cnTextField('ClearButton') },
|
|
136
148
|
React.createElement(IconClose, { size: "xs", className: cnTextField('ClearButtonIcon') }))),
|
|
@@ -10,7 +10,7 @@ export declare type TextFieldPropSize = typeof textFieldPropSize[number];
|
|
|
10
10
|
export declare const textFieldPropSizeDefault: TextFieldPropSize;
|
|
11
11
|
export declare type TextFieldPropOnChange = (args: TextFieldOnChangeArguments) => void;
|
|
12
12
|
export declare type TextFieldOnChangeArguments = {
|
|
13
|
-
e: React.ChangeEvent | React.MouseEvent;
|
|
13
|
+
e: React.ChangeEvent | React.MouseEvent | React.KeyboardEvent;
|
|
14
14
|
id?: TextFieldPropId;
|
|
15
15
|
name?: TextFieldPropName;
|
|
16
16
|
value: TextFieldPropValue;
|
|
@@ -72,7 +72,7 @@ export declare type TextFieldProps<TYPE extends string> = PropsWithHTMLAttribute
|
|
|
72
72
|
min?: number | string;
|
|
73
73
|
readOnly?: boolean;
|
|
74
74
|
required?: boolean;
|
|
75
|
-
step?: number | string;
|
|
75
|
+
step?: number | string | number[];
|
|
76
76
|
tabIndex?: number;
|
|
77
77
|
inputContainerRef?: React.Ref<HTMLDivElement>;
|
|
78
78
|
inputRef?: React.Ref<HTMLTextAreaElement | HTMLInputElement>;
|
|
@@ -86,3 +86,18 @@ export declare type TextFieldProps<TYPE extends string> = PropsWithHTMLAttribute
|
|
|
86
86
|
}, HTMLDivElement> & TextFieldPropsTextareaType<TYPE> & TextFieldPropRightSide<TYPE>;
|
|
87
87
|
export declare type TextFieldComponent = <TYPE extends string>(props: TextFieldProps<TYPE> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
88
88
|
export declare const sizeMap: Record<TextFieldPropSize, IconPropSize>;
|
|
89
|
+
export declare const getValueByStepArray: (params: {
|
|
90
|
+
value?: string | null | undefined;
|
|
91
|
+
steps: number[];
|
|
92
|
+
min?: string | number | undefined;
|
|
93
|
+
max?: string | number | undefined;
|
|
94
|
+
isIncrement?: boolean | undefined;
|
|
95
|
+
}) => number | null;
|
|
96
|
+
export declare const getValueByStepNumber: (params: {
|
|
97
|
+
value?: string | null | undefined;
|
|
98
|
+
step: number | string;
|
|
99
|
+
isIncrement?: boolean | undefined;
|
|
100
|
+
min?: string | number | undefined;
|
|
101
|
+
max?: string | number | undefined;
|
|
102
|
+
}) => number;
|
|
103
|
+
export declare const getIncrementFlag: (event: React.KeyboardEvent) => boolean | null;
|
|
@@ -28,3 +28,54 @@ export var sizeMap = {
|
|
|
28
28
|
m: 's',
|
|
29
29
|
l: 'm'
|
|
30
30
|
};
|
|
31
|
+
export var getValueByStepArray = function (params) {
|
|
32
|
+
var value = params.value, steps = params.steps, min = params.min, _a = params.isIncrement, isIncrement = _a === void 0 ? false : _a;
|
|
33
|
+
var currentValue = Number(value !== null && value !== void 0 ? value : min);
|
|
34
|
+
var minValue = Number(min);
|
|
35
|
+
if (typeof value !== 'string') {
|
|
36
|
+
return typeof min !== 'undefined' ? minValue : 0;
|
|
37
|
+
}
|
|
38
|
+
if (currentValue < steps[0]) {
|
|
39
|
+
return steps[0];
|
|
40
|
+
}
|
|
41
|
+
if (currentValue > steps[steps.length - 1]) {
|
|
42
|
+
return steps[steps.length - 1];
|
|
43
|
+
}
|
|
44
|
+
if ((!isIncrement && currentValue === steps[0]) ||
|
|
45
|
+
(isIncrement && currentValue === steps[steps.length - 1])) {
|
|
46
|
+
return currentValue;
|
|
47
|
+
}
|
|
48
|
+
for (var i = 0; i < steps.length; i++) {
|
|
49
|
+
if (currentValue === steps[i] || (steps[i] < currentValue && steps[i + 1] > currentValue)) {
|
|
50
|
+
return steps[i + (isIncrement ? 1 : -1)];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
};
|
|
55
|
+
export var getValueByStepNumber = function (params) {
|
|
56
|
+
var _a;
|
|
57
|
+
var value = params.value, step = params.step, isIncrement = params.isIncrement, max = params.max, min = params.min;
|
|
58
|
+
var minValue = Number(min);
|
|
59
|
+
var maxValue = Number(max);
|
|
60
|
+
var currentValue = (typeof value === 'string' ? Number(value) : 0) + Number(step) * (isIncrement ? 1 : -1);
|
|
61
|
+
if (!Number.isNaN(minValue) && currentValue <= minValue) {
|
|
62
|
+
return minValue;
|
|
63
|
+
}
|
|
64
|
+
if (!Number.isNaN(maxValue) && currentValue >= maxValue) {
|
|
65
|
+
return maxValue;
|
|
66
|
+
}
|
|
67
|
+
return Number(currentValue.toFixed(Number((_a =
|
|
68
|
+
/* Необходимо для того, чтобы избежать ситуации, когда по нажатию
|
|
69
|
+
на кнопку прибавляется число с погрешностью.
|
|
70
|
+
Здесь мы берем разрядность дробной части шага и ограничиваем
|
|
71
|
+
результирующее число этой разрядностью */
|
|
72
|
+
Number(step)
|
|
73
|
+
.toString()
|
|
74
|
+
.split('.')[1]) === null || _a === void 0 ? void 0 : _a.length) || 0));
|
|
75
|
+
};
|
|
76
|
+
export var getIncrementFlag = function (event) {
|
|
77
|
+
if ((event === null || event === void 0 ? void 0 : event.key) !== 'ArrowUp' && (event === null || event === void 0 ? void 0 : event.key) !== 'ArrowDown') {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
return (event === null || event === void 0 ? void 0 : event.key) === 'ArrowUp';
|
|
81
|
+
};
|
|
@@ -7,7 +7,7 @@ import { IconClose } from '../../icons/IconClose/IconClose';
|
|
|
7
7
|
import { IconSelect } from '../../icons/IconSelect/IconSelect';
|
|
8
8
|
import { cnMixFocus } from '../../mixs/MixFocus/MixFocus';
|
|
9
9
|
import { cnSelect } from '../SelectComponents/cnSelect';
|
|
10
|
-
import { defaultlabelForCreate, defaultlabelForNotFound, getInputWidth, getSelectDropdownForm, } from '../SelectComponents/helpers';
|
|
10
|
+
import { defaultlabelForCreate, defaultLabelForEmptyItems, defaultlabelForNotFound, getInputWidth, getSelectDropdownForm, } from '../SelectComponents/helpers';
|
|
11
11
|
import { SelectContainer } from '../SelectComponents/SelectContainer/SelectContainer';
|
|
12
12
|
import { SelectDropdown } from '../SelectComponents/SelectDropdown/SelectDropdown';
|
|
13
13
|
import { defaultPropForm, defaultPropSize, defaultPropView } from '../SelectComponents/types';
|
|
@@ -19,7 +19,7 @@ function UserSelectRender(props, ref) {
|
|
|
19
19
|
var controlInnerRef = useRef(null);
|
|
20
20
|
var helperInputFakeElement = useRef(null);
|
|
21
21
|
var controlRef = useRef(null);
|
|
22
|
-
var _a = withDefaultGetters(props), placeholder = _a.placeholder, onBlur = _a.onBlur, onFocus = _a.onFocus, items = _a.items, onChange = _a.onChange, value = _a.value, disabled = _a.disabled, ariaLabel = _a.ariaLabel, id = _a.id, required = _a.required, _b = _a.dropdownRef, dropdownRef = _b === void 0 ? defaultDropdownRef : _b, _c = _a.form, form = _c === void 0 ? defaultPropForm : _c, _d = _a.view, view = _d === void 0 ? defaultPropView : _d, _e = _a.size, size = _e === void 0 ? defaultPropSize : _e, dropdownClassName = _a.dropdownClassName, name = _a.name, _f = _a.groups, groups = _f === void 0 ? [] : _f, getItemKey = _a.getItemKey, getItemLabel = _a.getItemLabel, getItemSubLabel = _a.getItemSubLabel, getItemAvatarUrl = _a.getItemAvatarUrl, getItemGroupKey = _a.getItemGroupKey, getItemDisabled = _a.getItemDisabled, getGroupKey = _a.getGroupKey, getGroupLabel = _a.getGroupLabel, renderItem = _a.renderItem, renderValueProp = _a.renderValue, onCreate = _a.onCreate, inputRefProp = _a.inputRef, _g = _a.labelForNotFound, labelForNotFound = _g === void 0 ? defaultlabelForNotFound : _g, _h = _a.labelForCreate, labelForCreate = _h === void 0 ? defaultlabelForCreate : _h, _j = _a.multiple, multiple =
|
|
22
|
+
var _a = withDefaultGetters(props), placeholder = _a.placeholder, onBlur = _a.onBlur, onFocus = _a.onFocus, items = _a.items, onChange = _a.onChange, value = _a.value, disabled = _a.disabled, ariaLabel = _a.ariaLabel, id = _a.id, required = _a.required, _b = _a.dropdownRef, dropdownRef = _b === void 0 ? defaultDropdownRef : _b, _c = _a.form, form = _c === void 0 ? defaultPropForm : _c, _d = _a.view, view = _d === void 0 ? defaultPropView : _d, _e = _a.size, size = _e === void 0 ? defaultPropSize : _e, dropdownClassName = _a.dropdownClassName, name = _a.name, _f = _a.groups, groups = _f === void 0 ? [] : _f, getItemKey = _a.getItemKey, getItemLabel = _a.getItemLabel, getItemSubLabel = _a.getItemSubLabel, getItemAvatarUrl = _a.getItemAvatarUrl, getItemGroupKey = _a.getItemGroupKey, getItemDisabled = _a.getItemDisabled, getGroupKey = _a.getGroupKey, getGroupLabel = _a.getGroupLabel, renderItem = _a.renderItem, renderValueProp = _a.renderValue, onCreate = _a.onCreate, inputRefProp = _a.inputRef, _g = _a.labelForNotFound, labelForNotFound = _g === void 0 ? defaultlabelForNotFound : _g, _h = _a.labelForCreate, labelForCreate = _h === void 0 ? defaultlabelForCreate : _h, _j = _a.labelForEmptyItems, labelForEmptyItems = _j === void 0 ? defaultLabelForEmptyItems : _j, _k = _a.multiple, multiple = _k === void 0 ? false : _k, searchFunction = _a.searchFunction, style = _a.style, restProps = __rest(_a, ["placeholder", "onBlur", "onFocus", "items", "onChange", "value", "disabled", "ariaLabel", "id", "required", "dropdownRef", "form", "view", "size", "dropdownClassName", "name", "groups", "getItemKey", "getItemLabel", "getItemSubLabel", "getItemAvatarUrl", "getItemGroupKey", "getItemDisabled", "getGroupKey", "getGroupLabel", "renderItem", "renderValue", "onCreate", "inputRef", "labelForNotFound", "labelForCreate", "labelForEmptyItems", "multiple", "searchFunction", "style"]);
|
|
23
23
|
var searchFunctionDefault = function (item, searchValue) {
|
|
24
24
|
var searchOfLabel = searchCompare(searchValue, getItemLabel(item));
|
|
25
25
|
if (searchOfLabel) {
|
|
@@ -27,7 +27,7 @@ function UserSelectRender(props, ref) {
|
|
|
27
27
|
}
|
|
28
28
|
return searchCompare(searchValue, getItemSubLabel(item));
|
|
29
29
|
};
|
|
30
|
-
var
|
|
30
|
+
var _l = useSelect({
|
|
31
31
|
items: items,
|
|
32
32
|
groups: groups,
|
|
33
33
|
value: value,
|
|
@@ -45,7 +45,7 @@ function UserSelectRender(props, ref) {
|
|
|
45
45
|
onFocus: onFocus,
|
|
46
46
|
onCreate: onCreate,
|
|
47
47
|
searchFunction: searchFunction || searchFunctionDefault
|
|
48
|
-
}), getKeyProps =
|
|
48
|
+
}), getKeyProps = _l.getKeyProps, getOptionProps = _l.getOptionProps, isOpen = _l.isOpen, visibleItems = _l.visibleItems, isFocused = _l.isFocused, handleInputFocus = _l.handleInputFocus, handleInputBlur = _l.handleInputBlur, handleToggleDropdown = _l.handleToggleDropdown, inputRef = _l.inputRef, handleInputClick = _l.handleInputClick, handleInputChange = _l.handleInputChange, searchValue = _l.searchValue, clearValue = _l.clearValue, getHandleRemoveValue = _l.getHandleRemoveValue, notFound = _l.notFound, hasItems = _l.hasItems;
|
|
49
49
|
var dropdownForm = getSelectDropdownForm(form);
|
|
50
50
|
var renderItemDefault = function (props) {
|
|
51
51
|
var item = props.item, active = props.active, hovered = props.hovered, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
@@ -84,7 +84,7 @@ function UserSelectRender(props, ref) {
|
|
|
84
84
|
React.createElement("span", { className: cnSelect('Delimiter') }),
|
|
85
85
|
React.createElement("button", { type: "button", className: cnSelect('IndicatorsDropdown'), tabIndex: -1, onClick: handleToggleDropdown },
|
|
86
86
|
React.createElement(IconSelect, { size: "xs", className: cnSelect('DropdownIndicatorIcon') })))),
|
|
87
|
-
React.createElement(SelectDropdown, { isOpen: isOpen, size: size, controlRef: controlRef, getOptionProps: getOptionProps, dropdownRef: dropdownRef, form: dropdownForm, className: dropdownClassName, renderItem: renderItem || renderItemDefault, getGroupLabel: getGroupLabel, visibleItems: visibleItems, labelForNotFound: labelForNotFound, labelForCreate: labelForCreate, notFound: notFound, style: typeof (style === null || style === void 0 ? void 0 : style.zIndex) === 'number' ? { zIndex: style.zIndex + 1 } : undefined }),
|
|
87
|
+
React.createElement(SelectDropdown, { isOpen: isOpen, size: size, controlRef: controlRef, getOptionProps: getOptionProps, dropdownRef: dropdownRef, form: dropdownForm, className: dropdownClassName, renderItem: renderItem || renderItemDefault, getGroupLabel: getGroupLabel, visibleItems: visibleItems, labelForNotFound: labelForNotFound, labelForCreate: labelForCreate, notFound: notFound, hasItems: hasItems, labelForEmptyItems: labelForEmptyItems, style: typeof (style === null || style === void 0 ? void 0 : style.zIndex) === 'number' ? { zIndex: style.zIndex + 1 } : undefined }),
|
|
88
88
|
React.createElement("div", { className: cnSelect('HelperInputFakeElement'), ref: helperInputFakeElement }, searchValue)));
|
|
89
89
|
}
|
|
90
90
|
export var UserSelect = forwardRef(UserSelectRender);
|
|
@@ -57,6 +57,7 @@ export declare type UserSelectProps<ITEM = DefaultItem, GROUP = DefaultGroup, MU
|
|
|
57
57
|
inputRef?: React.RefObject<HTMLInputElement>;
|
|
58
58
|
labelForNotFound?: string;
|
|
59
59
|
labelForCreate?: string;
|
|
60
|
+
labelForEmptyItems?: string;
|
|
60
61
|
searchFunction?: PropSearchFunction<ITEM>;
|
|
61
62
|
multiple?: MULTIPLE;
|
|
62
63
|
value?: PropValue<ITEM, MULTIPLE>;
|
|
@@ -125,6 +126,7 @@ export declare function withDefaultGetters<ITEM = DefaultItem, GROUP = DefaultGr
|
|
|
125
126
|
inputRef?: React.RefObject<HTMLInputElement> | undefined;
|
|
126
127
|
labelForNotFound?: string | undefined;
|
|
127
128
|
labelForCreate?: string | undefined;
|
|
129
|
+
labelForEmptyItems?: string | undefined;
|
|
128
130
|
searchFunction?: PropSearchFunction<ITEM> | undefined;
|
|
129
131
|
multiple?: MULTIPLE | undefined;
|
|
130
132
|
value?: PropValue<ITEM, MULTIPLE>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const useHideElementsInLine: <ELEMENT extends HTMLElement, WRAPPER_ELEMENT extends HTMLElement
|
|
2
|
+
export declare const useHideElementsInLine: <ITEM, ELEMENT extends HTMLElement = HTMLDivElement, WRAPPER_ELEMENT extends HTMLElement = HTMLDivElement>(items: ITEM[], busy?: number, reverse?: boolean | undefined) => {
|
|
3
3
|
visibleItems: ITEM[];
|
|
4
4
|
hiddenItems: ITEM[];
|
|
5
5
|
itemsRefs: import("react").RefObject<ELEMENT>[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const useRefs: <
|
|
2
|
+
export declare const useRefs: <T>(length: number, deps?: unknown[]) => import("react").RefObject<T>[];
|
|
@@ -75,5 +75,6 @@ export declare function useSelect<ITEM, GROUP, MULTIPLE extends boolean>(params:
|
|
|
75
75
|
clearValue: (e: React.SyntheticEvent) => void;
|
|
76
76
|
getHandleRemoveValue: (item: ITEM) => (e: React.SyntheticEvent) => void;
|
|
77
77
|
notFound: boolean;
|
|
78
|
+
hasItems: boolean;
|
|
78
79
|
};
|
|
79
80
|
export {};
|
|
@@ -25,7 +25,7 @@ var initialState = {
|
|
|
25
25
|
scrollToHighlighted: false
|
|
26
26
|
};
|
|
27
27
|
export var isOptionForCreate = function (params) {
|
|
28
|
-
return Object.prototype.hasOwnProperty.call(params, '__optionForCreate');
|
|
28
|
+
return params && Object.prototype.hasOwnProperty.call(params, '__optionForCreate');
|
|
29
29
|
};
|
|
30
30
|
export function useSelect(params) {
|
|
31
31
|
var items = params.items, dropdownRef = params.dropdownRef, controlRef = params.controlRef, _a = params.disabled, disabled = _a === void 0 ? false : _a, _b = params.multiple, multiple = _b === void 0 ? false : _b, getItemLabel = params.getItemLabel, getItemKey = params.getItemKey, searchFunction = params.searchFunction, getItemGroupKey = params.getItemGroupKey, groups = params.groups, getGroupKey = params.getGroupKey, sortGroups = params.sortGroups, getItemDisabled = params.getItemDisabled, onFocus = params.onFocus, onBlur = params.onBlur;
|
|
@@ -73,6 +73,7 @@ export function useSelect(params) {
|
|
|
73
73
|
}
|
|
74
74
|
return flag;
|
|
75
75
|
}, [visibleItems]);
|
|
76
|
+
var hasItems = items.length !== 0;
|
|
76
77
|
var getSelectedOptionIndex = function () {
|
|
77
78
|
var e_1, _a, e_2, _b;
|
|
78
79
|
var index = 0;
|
|
@@ -380,6 +381,7 @@ export function useSelect(params) {
|
|
|
380
381
|
searchValue: searchValue,
|
|
381
382
|
clearValue: clearValue,
|
|
382
383
|
getHandleRemoveValue: getHandleRemoveValue,
|
|
383
|
-
notFound: notFound
|
|
384
|
+
notFound: notFound,
|
|
385
|
+
hasItems: hasItems
|
|
384
386
|
};
|
|
385
387
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { __read, __spread } from "tslib";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
var getIsValidValue = function (value, min, max) {
|
|
4
|
+
return !((typeof min === 'number' && value < min) || (typeof max === 'number' && value > max));
|
|
5
|
+
};
|
|
6
|
+
export var useSortSteps = function (props) {
|
|
7
|
+
var step = props.step, min = props.min, max = props.max;
|
|
8
|
+
var sortedSteps = useMemo(function () {
|
|
9
|
+
if (Array.isArray(step)) {
|
|
10
|
+
var stepsArr = __spread(step);
|
|
11
|
+
if (typeof min === 'number') {
|
|
12
|
+
stepsArr.push(min);
|
|
13
|
+
}
|
|
14
|
+
if (typeof max === 'number') {
|
|
15
|
+
stepsArr.push(max);
|
|
16
|
+
}
|
|
17
|
+
var sortedArray = stepsArr
|
|
18
|
+
.sort(function (a, b) { return a - b; })
|
|
19
|
+
.filter(function (val) { return getIsValidValue(val, min, max); });
|
|
20
|
+
return Array.from(new Set(sortedArray));
|
|
21
|
+
}
|
|
22
|
+
return Number(step);
|
|
23
|
+
}, [step, min, max]);
|
|
24
|
+
return sortedSteps;
|
|
25
|
+
};
|
|
@@ -63,7 +63,12 @@ export function useTimer(config) {
|
|
|
63
63
|
}
|
|
64
64
|
createInterval();
|
|
65
65
|
};
|
|
66
|
-
useEffect(
|
|
66
|
+
useEffect(function () {
|
|
67
|
+
cancelInterval();
|
|
68
|
+
return function () {
|
|
69
|
+
intervalRef.current && clearInterval(intervalRef.current);
|
|
70
|
+
};
|
|
71
|
+
}, []);
|
|
67
72
|
useEffect(timerOver, [timerType, time, endTime]);
|
|
68
73
|
return { isRunning: isRunning, pause: pause, reset: reset, start: start, time: time };
|
|
69
74
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
.MixPopoverAnimate {
|
|
2
|
+
--mix-dropdown-animate-space: var(--space-s);
|
|
3
|
+
--mix-dropdown-animate-transform: translate(0, var(--mix-dropdown-animate-space));
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.MixPopoverAnimate_animate_exit {
|
|
7
|
+
opacity: 1;
|
|
8
|
+
-webkit-transform: translate(0);
|
|
9
|
+
transform: translate(0);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.MixPopoverAnimate_animate_enter,
|
|
13
|
+
.MixPopoverAnimate_animate_exitActive,
|
|
14
|
+
.MixPopoverAnimate_animate_exitDone,
|
|
15
|
+
.MixPopoverAnimate_animate_exited,
|
|
16
|
+
.MixPopoverAnimate_animate_exiting,
|
|
17
|
+
.MixPopoverAnimate_animate_unmounted {
|
|
18
|
+
opacity: 0;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
-webkit-transform: var(--mix-dropdown-animate-transform);
|
|
21
|
+
transform: var(--mix-dropdown-animate-transform);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.MixPopoverAnimate_animate_enterDone,
|
|
25
|
+
.MixPopoverAnimate_animate_enterActive,
|
|
26
|
+
.MixPopoverAnimate_animate_entered,
|
|
27
|
+
.MixPopoverAnimate_animate_entering {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
-webkit-transform: translate(0);
|
|
30
|
+
transform: translate(0);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.MixPopoverAnimate_animate_entered,
|
|
34
|
+
.MixPopoverAnimate_animate_entering,
|
|
35
|
+
.MixPopoverAnimate_animate_exiting,
|
|
36
|
+
.MixPopoverAnimate_animate_enterDone,
|
|
37
|
+
.MixPopoverAnimate_animate_exitActive,
|
|
38
|
+
.MixPopoverAnimate_animate_enterActive,
|
|
39
|
+
.MixPopoverAnimate_animate_exitDone {
|
|
40
|
+
-webkit-transition: opacity 0.2s, -webkit-transform 0.2s;
|
|
41
|
+
transition: opacity 0.2s, -webkit-transform 0.2s;
|
|
42
|
+
transition: opacity 0.2s, transform 0.2s;
|
|
43
|
+
transition: opacity 0.2s, transform 0.2s, -webkit-transform 0.2s;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.MixPopoverAnimate_direction_downCenter,
|
|
47
|
+
.MixPopoverAnimate_direction_downRight,
|
|
48
|
+
.MixPopoverAnimate_direction_downLeft,
|
|
49
|
+
.MixPopoverAnimate_direction_downStartLeft,
|
|
50
|
+
.MixPopoverAnimate_direction_downStartRight {
|
|
51
|
+
--mix-dropdown-animate-transform: translate(0, var(--mix-dropdown-animate-space));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.MixPopoverAnimate_direction_upCenter,
|
|
55
|
+
.MixPopoverAnimate_direction_upRight,
|
|
56
|
+
.MixPopoverAnimate_direction_upLeft,
|
|
57
|
+
.MixPopoverAnimate_direction_upStartLeft,
|
|
58
|
+
.MixPopoverAnimate_direction_upStartRight {
|
|
59
|
+
--mix-dropdown-animate-transform: translate(0, calc(-1 * var(--mix-dropdown-animate-space)));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.MixPopoverAnimate_direction_leftUp,
|
|
63
|
+
.MixPopoverAnimate_direction_leftCenter,
|
|
64
|
+
.MixPopoverAnimate_direction_leftDown,
|
|
65
|
+
.MixPopoverAnimate_direction_leftStartUp,
|
|
66
|
+
.MixPopoverAnimate_direction_leftStartDown {
|
|
67
|
+
--mix-dropdown-animate-transform: translate(calc(-1 * var(--mix-dropdown-animate-space)), 0);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.MixPopoverAnimate_direction_rightUp,
|
|
71
|
+
.MixPopoverAnimate_direction_rightCenter,
|
|
72
|
+
.MixPopoverAnimate_direction_rightDown,
|
|
73
|
+
.MixPopoverAnimate_direction_rightStartUp,
|
|
74
|
+
.MixPopoverAnimate_direction_rightStartDown {
|
|
75
|
+
--mix-dropdown-animate-transform: translate(var(--mix-dropdown-animate-space), 0);
|
|
76
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './MixPopoverAnimate.css';
|
|
2
|
+
import { Direction } from '../../components/Popover/Popover';
|
|
3
|
+
export declare type Animate = 'entered' | 'entering' | 'exiting' | 'exited' | 'unmounted' | 'enter' | 'enterActive' | 'enterDone' | 'exit' | 'exitActive' | 'exitDone';
|
|
4
|
+
declare type Mods = {
|
|
5
|
+
animate?: Animate;
|
|
6
|
+
direction?: Direction;
|
|
7
|
+
};
|
|
8
|
+
declare type CnMixPopoverAnimate = (mods?: Mods | null, mix?: Array<string | undefined>) => string;
|
|
9
|
+
export declare const cnMixPopoverAnimate: CnMixPopoverAnimate;
|
|
10
|
+
export declare const cnMixPopoverAnimateForCssTransition: import("../../utils/cnForCssTransition").CSSTransitionClassNames;
|
|
11
|
+
export declare const animateTimeout = 200;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import './MixPopoverAnimate.css';
|
|
2
|
+
import { cn } from '../../utils/bem';
|
|
3
|
+
import { cnForCssTransition } from '../../utils/cnForCssTransition';
|
|
4
|
+
var cnFn = cn('MixPopoverAnimate');
|
|
5
|
+
export var cnMixPopoverAnimate = cnFn;
|
|
6
|
+
export var cnMixPopoverAnimateForCssTransition = cnForCssTransition(cnFn);
|
|
7
|
+
export var animateTimeout = 200;
|
package/createIcon/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@consta/uikit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"ui-kit",
|
|
6
6
|
"design-system",
|
|
@@ -256,8 +256,8 @@
|
|
|
256
256
|
"LayoutCanary",
|
|
257
257
|
"Loader",
|
|
258
258
|
"MixCard",
|
|
259
|
-
"MixDropdownAnimate",
|
|
260
259
|
"MixFocus",
|
|
260
|
+
"MixPopoverAnimate",
|
|
261
261
|
"MixSpace",
|
|
262
262
|
"MixVisuallyHidden",
|
|
263
263
|
"Modal",
|
|
@@ -335,6 +335,7 @@
|
|
|
335
335
|
"useScrollElements",
|
|
336
336
|
"useScrollPosition",
|
|
337
337
|
"useSelect",
|
|
338
|
+
"useSortSteps",
|
|
338
339
|
"useThemeVars",
|
|
339
340
|
"useTimer",
|
|
340
341
|
"withTooltip"
|
package/useDebounce/package.json
CHANGED
package/useFlag/package.json
CHANGED
package/useForkRef/package.json
CHANGED