@consta/uikit 3.24.2 → 3.24.3
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 +21 -47
- 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/CheckboxGroupCanary/package.json +1 -1
- package/ChoiceGroup/package.json +1 -1
- package/ChoiceGroupCanary/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/ContextMenuCanary/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/FileIconPpt/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/IconFacebook/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/IconInstagram/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/package.json +1 -1
- package/IconPlay/package.json +1 -1
- package/IconPressure/package.json +1 -1
- package/IconPriceLabel/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/IconTable2/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/IconVkontakte/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/package.json +1 -1
- package/IconYandexDzen/package.json +1 -1
- package/IconYoutube/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/package.json +1 -1
- package/MixPopoverArrow/package.json +1 -1
- 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/StepsCanary/package.json +1 -1
- package/Switch/package.json +1 -1
- package/SwitchGroup/package.json +1 -1
- package/SwitchGroupCanary/package.json +1 -1
- package/Table/package.json +1 -1
- package/Tabs/package.json +1 -1
- package/TabsCanary/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/Combobox/helpers.d.ts +1 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDate/DatePickerFieldTypeDate.d.ts +1 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDate/DatePickerFieldTypeDate.js +29 -29
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDate/helpers.d.ts +5 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDate/helpers.js +33 -19
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.d.ts +2 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.js +7 -63
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +1 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.js +21 -18
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTime/helpers.d.ts +5 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTime/helpers.js +21 -5
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.d.ts +2 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.js +7 -63
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.d.ts +1 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.js +27 -27
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeMonth/helpers.d.ts +5 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeMonth/helpers.js +24 -9
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeMonthRange/DatePickerFieldTypeMonthRange.d.ts +2 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeMonthRange/DatePickerFieldTypeMonthRange.js +7 -63
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeMonthRange/helpers.d.ts +2 -2
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +1 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeTime/DatePickerFieldTypeTime.js +21 -18
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeTime/helpers.d.ts +5 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeTime/helpers.js +19 -3
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeYear/DatePickerFieldTypeYear.d.ts +1 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeYear/DatePickerFieldTypeYear.js +25 -25
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeYear/helpers.d.ts +1 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeYearRange/DatePickerFieldTypeYearRange.d.ts +2 -1
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeYearRange/DatePickerFieldTypeYearRange.js +7 -63
- package/__internal__/cjs-src/components/DatePickerCanary/getChangeFnRange.d.ts +14 -0
- package/__internal__/cjs-src/components/DatePickerCanary/getChangeFnRange.js +40 -0
- package/__internal__/cjs-src/components/DatePickerCanary/types.d.ts +1 -0
- package/__internal__/cjs-src/components/DragNDropField/DragNDropField.css +10 -1
- package/__internal__/cjs-src/components/DragNDropField/DragNDropField.d.ts +10 -2
- package/__internal__/cjs-src/components/DragNDropField/DragNDropField.js +13 -11
- package/__internal__/cjs-src/components/DragNDropField/DragNDropFieldContent/DragNDropFieldContent.css +3 -0
- package/__internal__/cjs-src/components/DragNDropField/DragNDropFieldContent/DragNDropFieldContent.js +3 -3
- package/__internal__/cjs-src/components/DragNDropField/types.d.ts +5 -3
- package/__internal__/cjs-src/components/Popover/Popover.css +2 -36
- package/__internal__/cjs-src/components/Popover/Popover.js +41 -12
- package/__internal__/cjs-src/components/Popover/helpers.d.ts +4 -4
- package/__internal__/cjs-src/components/Popover/helpers.js +9 -11
- package/__internal__/cjs-src/components/Popover/usePopoverReposition.d.ts +2 -1
- package/__internal__/cjs-src/components/Popover/usePopoverReposition.js +12 -12
- package/__internal__/cjs-src/components/SelectComponents/SelectDropdown/SelectDropdown.js +2 -3
- package/__internal__/cjs-src/components/SliderCanary/SliderInput/SliderInput.d.ts +1 -1
- package/__internal__/cjs-src/components/Table/Table.d.ts +4 -0
- package/__internal__/cjs-src/components/Table/filtering.d.ts +1 -5
- package/__internal__/cjs-src/components/TextField/TextField.css +24 -2
- package/__internal__/cjs-src/components/TextField/TextField.d.ts +2 -2
- package/__internal__/cjs-src/components/TextField/TextField.js +51 -45
- package/__internal__/cjs-src/components/TextField/helpers.d.ts +6 -100
- package/__internal__/cjs-src/components/TextField/helpers.js +18 -30
- package/__internal__/cjs-src/components/TextField/types.d.ts +87 -0
- package/__internal__/cjs-src/components/TextField/types.js +27 -0
- package/__internal__/cjs-src/mixs/MixPopoverAnimate/MixPopoverAnimate.css +40 -4
- package/__internal__/src/components/Combobox/helpers.d.ts +1 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDate/DatePickerFieldTypeDate.d.ts +1 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDate/DatePickerFieldTypeDate.js +29 -29
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDate/helpers.d.ts +5 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDate/helpers.js +34 -20
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.d.ts +2 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.js +8 -64
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +1 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.js +21 -18
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTime/helpers.d.ts +5 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTime/helpers.js +22 -6
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.d.ts +2 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.js +8 -64
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.d.ts +1 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.js +27 -27
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeMonth/helpers.d.ts +5 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeMonth/helpers.js +25 -10
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeMonthRange/DatePickerFieldTypeMonthRange.d.ts +2 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeMonthRange/DatePickerFieldTypeMonthRange.js +8 -64
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeMonthRange/helpers.d.ts +2 -2
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +1 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeTime/DatePickerFieldTypeTime.js +21 -18
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeTime/helpers.d.ts +5 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeTime/helpers.js +20 -4
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeYear/DatePickerFieldTypeYear.d.ts +1 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeYear/DatePickerFieldTypeYear.js +25 -25
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeYear/helpers.d.ts +1 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeYearRange/DatePickerFieldTypeYearRange.d.ts +2 -1
- package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeYearRange/DatePickerFieldTypeYearRange.js +8 -64
- package/__internal__/src/components/DatePickerCanary/getChangeFnRange.d.ts +14 -0
- package/__internal__/src/components/DatePickerCanary/getChangeFnRange.js +36 -0
- package/__internal__/src/components/DatePickerCanary/types.d.ts +1 -0
- package/__internal__/src/components/DragNDropField/DragNDropField.css +10 -1
- package/__internal__/src/components/DragNDropField/DragNDropField.d.ts +10 -2
- package/__internal__/src/components/DragNDropField/DragNDropField.js +15 -13
- package/__internal__/src/components/DragNDropField/DragNDropFieldContent/DragNDropFieldContent.css +3 -0
- package/__internal__/src/components/DragNDropField/DragNDropFieldContent/DragNDropFieldContent.js +3 -3
- package/__internal__/src/components/DragNDropField/types.d.ts +5 -3
- package/__internal__/src/components/Popover/Popover.css +2 -36
- package/__internal__/src/components/Popover/Popover.js +42 -13
- package/__internal__/src/components/Popover/helpers.d.ts +4 -4
- package/__internal__/src/components/Popover/helpers.js +8 -10
- package/__internal__/src/components/Popover/usePopoverReposition.d.ts +2 -1
- package/__internal__/src/components/Popover/usePopoverReposition.js +12 -12
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js +4 -5
- package/__internal__/src/components/SliderCanary/SliderInput/SliderInput.d.ts +1 -1
- package/__internal__/src/components/Table/Table.d.ts +4 -0
- package/__internal__/src/components/Table/filtering.d.ts +1 -5
- package/__internal__/src/components/TextField/TextField.css +24 -2
- package/__internal__/src/components/TextField/TextField.d.ts +2 -2
- package/__internal__/src/components/TextField/TextField.js +52 -46
- package/__internal__/src/components/TextField/helpers.d.ts +6 -100
- package/__internal__/src/components/TextField/helpers.js +17 -29
- package/__internal__/src/components/TextField/types.d.ts +87 -0
- package/__internal__/src/components/TextField/types.js +24 -0
- package/__internal__/src/mixs/MixPopoverAnimate/MixPopoverAnimate.css +40 -4
- package/createIcon/package.json +1 -1
- package/createResponsesImage/package.json +1 -1
- package/fonts/index.d.ts +1 -0
- package/fonts/index.js +1 -0
- package/package.json +4 -3
- 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/package.json +1 -1
- package/useThemeVars/package.json +1 -1
- package/useTimer/package.json +1 -1
- package/withTooltip/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';
|
|
2
3
|
import { Locale } from './locale';
|
|
3
4
|
export declare type DragNDropFieldPropLocale = Locale;
|
|
4
5
|
export declare type FileError = {
|
|
@@ -13,16 +14,17 @@ export declare type DragNDropFieldPropErrorMessages = Partial<Record<FileError['
|
|
|
13
14
|
export declare type DragNDropFieldChildrenRenderProp = (props: {
|
|
14
15
|
openFileDialog: () => void;
|
|
15
16
|
locale: Required<DragNDropFieldPropLocale>;
|
|
16
|
-
} & Pick<DragNDropFieldProps, 'accept' | 'maxSize' | 'multiple'>) => React.ReactNode;
|
|
17
|
+
} & Pick<DragNDropFieldProps, 'accept' | 'maxSize' | 'multiple' | 'disabled'>) => React.ReactNode;
|
|
17
18
|
export declare type FileSizes = {
|
|
18
19
|
minSize?: number;
|
|
19
20
|
maxSize?: number;
|
|
20
21
|
};
|
|
21
|
-
export declare type DragNDropFieldProps = {
|
|
22
|
+
export declare type DragNDropFieldProps = PropsWithHTMLAttributes<{
|
|
22
23
|
accept?: string | string[];
|
|
23
24
|
maxSize?: number;
|
|
24
25
|
multiple?: boolean;
|
|
25
26
|
onDropFiles: (files: File[]) => void;
|
|
26
27
|
children?: React.ReactNode | DragNDropFieldChildrenRenderProp;
|
|
27
28
|
locale?: DragNDropFieldPropLocale;
|
|
28
|
-
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
}, HTMLDivElement>;
|
|
@@ -1,42 +1,8 @@
|
|
|
1
1
|
.Popover {
|
|
2
2
|
position: absolute;
|
|
3
|
+
top: var(--popover-top);
|
|
4
|
+
left: var(--popover-left);
|
|
3
5
|
visibility: var(--popover-visibility);
|
|
4
6
|
width: var(--popover-width);
|
|
5
7
|
pointer-events: var(--popover-pointer-events);
|
|
6
8
|
}
|
|
7
|
-
|
|
8
|
-
.Popover_direction_downCenter,
|
|
9
|
-
.Popover_direction_downRight,
|
|
10
|
-
.Popover_direction_downLeft,
|
|
11
|
-
.Popover_direction_downStartLeft,
|
|
12
|
-
.Popover_direction_downStartRight {
|
|
13
|
-
top: calc(var(--popover-top) + var(--popover-offset));
|
|
14
|
-
left: var(--popover-left);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.Popover_direction_upCenter,
|
|
18
|
-
.Popover_direction_upRight,
|
|
19
|
-
.Popover_direction_upLeft,
|
|
20
|
-
.Popover_direction_upStartLeft,
|
|
21
|
-
.Popover_direction_upStartRight {
|
|
22
|
-
top: calc(var(--popover-top) - var(--popover-offset));
|
|
23
|
-
left: var(--popover-left);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.Popover_direction_leftUp,
|
|
27
|
-
.Popover_direction_leftCenter,
|
|
28
|
-
.Popover_direction_leftDown,
|
|
29
|
-
.Popover_direction_leftStartUp,
|
|
30
|
-
.Popover_direction_leftStartDown {
|
|
31
|
-
top: var(--popover-top);
|
|
32
|
-
left: calc(var(--popover-left) - var(--popover-offset));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.Popover_direction_rightUp,
|
|
36
|
-
.Popover_direction_rightCenter,
|
|
37
|
-
.Popover_direction_rightDown,
|
|
38
|
-
.Popover_direction_rightStartUp,
|
|
39
|
-
.Popover_direction_rightStartDown {
|
|
40
|
-
top: var(--popover-top);
|
|
41
|
-
left: calc(var(--popover-left) + var(--popover-offset));
|
|
42
|
-
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { __assign, __read, __rest, __spread } from "tslib";
|
|
2
2
|
import './Popover.css';
|
|
3
|
-
import React, { forwardRef, useEffect, useLayoutEffect } from 'react';
|
|
3
|
+
import React, { forwardRef, useEffect, useLayoutEffect, useMemo } from 'react';
|
|
4
4
|
import { useClickOutside } from '../../hooks/useClickOutside/useClickOutside';
|
|
5
5
|
import { useComponentSize } from '../../hooks/useComponentSize/useComponentSize';
|
|
6
6
|
import { useForkRef } from '../../hooks/useForkRef/useForkRef';
|
|
7
7
|
import { cn } from '../../utils/bem';
|
|
8
|
+
import { isNumber, isString } from '../../utils/type-guards';
|
|
8
9
|
import { PortalWithTheme, usePortalContext } from '../PortalWithTheme/PortalWithTheme';
|
|
9
10
|
import { useTheme } from '../Theme/Theme';
|
|
10
11
|
import { getComputedPositionAndDirection } from './helpers';
|
|
@@ -53,6 +54,29 @@ export var popoverPropOffset = [
|
|
|
53
54
|
'6xl',
|
|
54
55
|
];
|
|
55
56
|
export var directions = __spread(directionsStartCenter, directionsStartEdge);
|
|
57
|
+
var getOffset = function (ref, propOffset) {
|
|
58
|
+
if (isNumber(propOffset)) {
|
|
59
|
+
return propOffset;
|
|
60
|
+
}
|
|
61
|
+
if (isString(propOffset) && ref.current) {
|
|
62
|
+
var cssVar = getComputedStyle(ref.current).getPropertyValue("--space-" + propOffset);
|
|
63
|
+
if (cssVar && /px$/.test(cssVar)) {
|
|
64
|
+
return Number(cssVar.slice(0, cssVar.length - 2));
|
|
65
|
+
}
|
|
66
|
+
if (cssVar && /rem$/.test(cssVar)) {
|
|
67
|
+
var fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
68
|
+
var rem = Number(cssVar.slice(0, cssVar.length - 3));
|
|
69
|
+
return fontSize * rem;
|
|
70
|
+
}
|
|
71
|
+
if (cssVar && /em$/.test(cssVar)) {
|
|
72
|
+
var fontSize = parseFloat(getComputedStyle(ref.current).fontSize);
|
|
73
|
+
var em = Number(cssVar.slice(0, cssVar.length - 2));
|
|
74
|
+
return fontSize * em;
|
|
75
|
+
}
|
|
76
|
+
return 0;
|
|
77
|
+
}
|
|
78
|
+
return 0;
|
|
79
|
+
};
|
|
56
80
|
var isRenderProp = function (children) { return typeof children === 'function'; };
|
|
57
81
|
/**
|
|
58
82
|
* Подписчик на PortalWithThemeProvider
|
|
@@ -72,7 +96,7 @@ var ContextConsumer = function (_a) {
|
|
|
72
96
|
var cnPopover = cn('Popover');
|
|
73
97
|
export var Popover = forwardRef(function (props, componentRef) {
|
|
74
98
|
var _a;
|
|
75
|
-
var children = props.children, _b = props.direction, passedDirection = _b === void 0 ? 'upCenter' : _b, _c = props.offset,
|
|
99
|
+
var children = props.children, _b = props.direction, passedDirection = _b === void 0 ? 'upCenter' : _b, _c = props.offset, propOffset = _c === void 0 ? 0 : _c, arrowOffset = props.arrowOffset, _d = props.possibleDirections, possibleDirections = _d === void 0 ? directions : _d, _e = props.isInteractive, isInteractive = _e === void 0 ? true : _e, onClickOutside = props.onClickOutside, _f = props.spareDirection, spareDirection = _f === void 0 ? 'downStartLeft' : _f, style = props.style, className = props.className, passedPosition = props.position, anchorRef = props.anchorRef, equalAnchorWidth = props.equalAnchorWidth, onSetDirection = props.onSetDirection, otherProps = __rest(props, ["children", "direction", "offset", "arrowOffset", "possibleDirections", "isInteractive", "onClickOutside", "spareDirection", "style", "className", "position", "anchorRef", "equalAnchorWidth", "onSetDirection"]);
|
|
76
100
|
var ref = React.useRef(null);
|
|
77
101
|
var theme = useTheme().theme;
|
|
78
102
|
var _g = __read(React.useState(), 2), anchorClientRect = _g[0], setAnchorClientRect = _g[1];
|
|
@@ -85,6 +109,7 @@ export var Popover = forwardRef(function (props, componentRef) {
|
|
|
85
109
|
previousDirectionRef.current = null;
|
|
86
110
|
};
|
|
87
111
|
var updateAnchorClientRect = function () { var _a; return setAnchorClientRect((_a = anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()); };
|
|
112
|
+
var offset = useMemo(function () { return getOffset(ref, propOffset); }, [propOffset, Boolean(ref.current)]);
|
|
88
113
|
var _k = getComputedPositionAndDirection({
|
|
89
114
|
contentSize: { width: width, height: height },
|
|
90
115
|
viewportSize: {
|
|
@@ -93,6 +118,7 @@ export var Popover = forwardRef(function (props, componentRef) {
|
|
|
93
118
|
height: document.documentElement.clientHeight
|
|
94
119
|
},
|
|
95
120
|
arrowOffset: arrowOffset,
|
|
121
|
+
offset: offset,
|
|
96
122
|
direction: passedDirection,
|
|
97
123
|
possibleDirections: possibleDirections,
|
|
98
124
|
bannedDirections: bannedDirections,
|
|
@@ -102,11 +128,10 @@ export var Popover = forwardRef(function (props, componentRef) {
|
|
|
102
128
|
anchorSize: anchorSize,
|
|
103
129
|
spareDirection: spareDirection
|
|
104
130
|
}), position = _k.position, direction = _k.direction;
|
|
105
|
-
var content = isRenderProp(children) ? children(direction) : children;
|
|
106
131
|
useLayoutEffect(function () { return onSetDirection === null || onSetDirection === void 0 ? void 0 : onSetDirection(direction); }, [direction]);
|
|
107
|
-
useLayoutEffect(resetBannedDirections, [props]);
|
|
108
132
|
useEffect(updateAnchorClientRect, [anchorSize]);
|
|
109
133
|
usePopoverReposition({
|
|
134
|
+
isActive: true,
|
|
110
135
|
scrollAnchorRef: anchorRef || { current: null },
|
|
111
136
|
onRequestReposition: function () {
|
|
112
137
|
resetBannedDirections();
|
|
@@ -119,16 +144,20 @@ export var Popover = forwardRef(function (props, componentRef) {
|
|
|
119
144
|
* которые не подошли, чтобы не возвращаться к ним и предотвратить бесконечный ререндер.
|
|
120
145
|
* См. PopoverBannedPositionsStory
|
|
121
146
|
*/
|
|
122
|
-
|
|
123
|
-
if (previousDirectionRef.current
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
147
|
+
useLayoutEffect(function () {
|
|
148
|
+
if (previousDirectionRef.current !== direction) {
|
|
149
|
+
if (previousDirectionRef.current &&
|
|
150
|
+
!bannedDirections.includes(previousDirectionRef.current)) {
|
|
151
|
+
setBannedDirections(function (state) {
|
|
152
|
+
return previousDirectionRef.current ? __spread(state, [previousDirectionRef.current]) : state;
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
previousDirectionRef.current = direction;
|
|
127
156
|
}
|
|
128
|
-
|
|
129
|
-
}
|
|
157
|
+
}, [direction]);
|
|
130
158
|
// Сбрасываем при любом изменении пропсов, чтобы заново начать перебор направлений
|
|
131
159
|
// Главное не сбрасывать при изменении размеров поповера, т.к. именно оно может вызвать бесконечный перебор
|
|
132
|
-
|
|
133
|
-
|
|
160
|
+
useLayoutEffect(resetBannedDirections, [props]);
|
|
161
|
+
return (React.createElement(PortalWithTheme, __assign({}, otherProps, { preset: theme, className: cnPopover({ direction: direction }, [className]), container: window.document.body, ref: useForkRef([ref, componentRef]), style: __assign(__assign({}, style), (_a = {}, _a['--popover-top'] = ((position === null || position === void 0 ? void 0 : position.y) || 0) + window.scrollY + "px", _a['--popover-left'] = ((position === null || position === void 0 ? void 0 : position.x) || 0) + window.scrollX + "px", _a["--popover-width"] = equalAnchorWidth ? anchorSize.width + "px" : undefined, _a["--popover-pointer-events"] = isInteractive ? undefined : 'none', _a["--popover-visibility"] = position ? undefined : 'hidden', _a)) }),
|
|
162
|
+
React.createElement(ContextConsumer, { onClickOutside: onClickOutside, ignoreClicksInsideRefs: [ref, anchorRef || { current: null }] }, isRenderProp(children) ? children(direction) : children)));
|
|
134
163
|
});
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { Direction, Position } from './Popover';
|
|
2
2
|
declare type Size = Pick<ClientRect, 'width' | 'height'>;
|
|
3
3
|
declare type PositionsByDirection = Record<Direction, NonNullable<Position>>;
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const getPositionsByDirection: ({ contentSize, anchorSize, position: { x, y }, arrowOffset, }: {
|
|
4
|
+
export declare const getPositionsByDirection: ({ contentSize, anchorSize, position: { x, y }, arrowOffset, offset, }: {
|
|
6
5
|
contentSize: Size;
|
|
7
6
|
anchorSize: Size;
|
|
8
7
|
position: NonNullable<Position>;
|
|
9
8
|
arrowOffset?: number | undefined;
|
|
9
|
+
offset?: number | undefined;
|
|
10
10
|
}) => PositionsByDirection;
|
|
11
11
|
declare type ComputedPositionAndDirectionParams = {
|
|
12
12
|
position: Position;
|
|
13
13
|
contentSize: Size;
|
|
14
14
|
viewportSize: Size;
|
|
15
15
|
anchorSize?: Size;
|
|
16
|
-
offset?: number
|
|
16
|
+
offset?: number;
|
|
17
17
|
arrowOffset?: number;
|
|
18
18
|
direction: Direction;
|
|
19
19
|
spareDirection: Direction;
|
|
20
20
|
possibleDirections: readonly Direction[];
|
|
21
21
|
bannedDirections: readonly Direction[];
|
|
22
22
|
};
|
|
23
|
-
export declare const getComputedPositionAndDirection: ({ position: initialPosition, contentSize, viewportSize, anchorSize, arrowOffset, direction: initialDirection, possibleDirections, bannedDirections, spareDirection, }: ComputedPositionAndDirectionParams) => {
|
|
23
|
+
export declare const getComputedPositionAndDirection: ({ position: initialPosition, contentSize, viewportSize, anchorSize, arrowOffset, direction: initialDirection, possibleDirections, bannedDirections, spareDirection, offset, }: ComputedPositionAndDirectionParams) => {
|
|
24
24
|
direction: Direction;
|
|
25
25
|
position: Position;
|
|
26
26
|
};
|
|
@@ -3,26 +3,23 @@ var getPosition = function (x, y) { return ({
|
|
|
3
3
|
x: Math.round(x),
|
|
4
4
|
y: Math.round(y)
|
|
5
5
|
}); };
|
|
6
|
-
export var convertPixelsToNumber = function (pixels) {
|
|
7
|
-
return Number(pixels.slice(0, pixels.length - 2));
|
|
8
|
-
};
|
|
9
6
|
export var getPositionsByDirection = function (_a) {
|
|
10
|
-
var contentSize = _a.contentSize, anchorSize = _a.anchorSize, _b = _a.position, x = _b.x, y = _b.y, _c = _a.arrowOffset, arrowOffset = _c === void 0 ? 0 : _c;
|
|
7
|
+
var contentSize = _a.contentSize, anchorSize = _a.anchorSize, _b = _a.position, x = _b.x, y = _b.y, _c = _a.arrowOffset, arrowOffset = _c === void 0 ? 0 : _c, _d = _a.offset, offset = _d === void 0 ? 0 : _d;
|
|
11
8
|
var contentWidth = contentSize.width, contentHeight = contentSize.height;
|
|
12
9
|
var anchorWidth = anchorSize.width, anchorHeight = anchorSize.height;
|
|
13
10
|
var anchorCenter = {
|
|
14
11
|
x: x + anchorWidth / 2,
|
|
15
12
|
y: y + anchorHeight / 2
|
|
16
13
|
};
|
|
17
|
-
var xForRightDirections = x + anchorWidth;
|
|
18
|
-
var xForLeftDirections = x - contentWidth;
|
|
14
|
+
var xForRightDirections = x + anchorWidth + offset;
|
|
15
|
+
var xForLeftDirections = x - contentWidth - offset;
|
|
19
16
|
var xForVerticalDirections = {
|
|
20
17
|
right: anchorCenter.x - arrowOffset,
|
|
21
18
|
center: anchorCenter.x - contentWidth / 2,
|
|
22
19
|
left: anchorCenter.x - contentWidth + arrowOffset
|
|
23
20
|
};
|
|
24
|
-
var yForDownDirections = y + anchorHeight;
|
|
25
|
-
var yForUpDirections = y - contentHeight;
|
|
21
|
+
var yForDownDirections = y + anchorHeight + offset;
|
|
22
|
+
var yForUpDirections = y - contentHeight - offset;
|
|
26
23
|
var yForHorizontalDirections = {
|
|
27
24
|
up: anchorCenter.y - contentHeight + arrowOffset,
|
|
28
25
|
center: anchorCenter.y - contentHeight / 2,
|
|
@@ -56,7 +53,7 @@ export var getPositionsByDirection = function (_a) {
|
|
|
56
53
|
};
|
|
57
54
|
};
|
|
58
55
|
export var getComputedPositionAndDirection = function (_a) {
|
|
59
|
-
var initialPosition = _a.position, contentSize = _a.contentSize, viewportSize = _a.viewportSize, _b = _a.anchorSize, anchorSize = _b === void 0 ? { width: 0, height: 0 } : _b, arrowOffset = _a.arrowOffset, initialDirection = _a.direction, possibleDirections = _a.possibleDirections, bannedDirections = _a.bannedDirections, spareDirection = _a.spareDirection;
|
|
56
|
+
var initialPosition = _a.position, contentSize = _a.contentSize, viewportSize = _a.viewportSize, _b = _a.anchorSize, anchorSize = _b === void 0 ? { width: 0, height: 0 } : _b, arrowOffset = _a.arrowOffset, initialDirection = _a.direction, possibleDirections = _a.possibleDirections, bannedDirections = _a.bannedDirections, spareDirection = _a.spareDirection, _c = _a.offset, offset = _c === void 0 ? 0 : _c;
|
|
60
57
|
if (!initialPosition) {
|
|
61
58
|
return { position: initialPosition, direction: initialDirection };
|
|
62
59
|
}
|
|
@@ -64,7 +61,8 @@ export var getComputedPositionAndDirection = function (_a) {
|
|
|
64
61
|
contentSize: contentSize,
|
|
65
62
|
anchorSize: anchorSize,
|
|
66
63
|
position: initialPosition,
|
|
67
|
-
arrowOffset: arrowOffset
|
|
64
|
+
arrowOffset: arrowOffset,
|
|
65
|
+
offset: offset
|
|
68
66
|
});
|
|
69
67
|
var direction = __spread([initialDirection], possibleDirections).filter(function (dir) { return !bannedDirections.includes(dir); })
|
|
70
68
|
.find(function (dir) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/** Запрос репозиции поповера при ресайзе окна и скролле */
|
|
3
|
-
export declare const usePopoverReposition: ({ scrollAnchorRef, onRequestReposition, }: {
|
|
3
|
+
export declare const usePopoverReposition: ({ isActive, scrollAnchorRef, onRequestReposition, }: {
|
|
4
|
+
isActive: boolean;
|
|
4
5
|
/** При скролле родителей этого элемента будет запрашиваться репозиция поповера */
|
|
5
6
|
scrollAnchorRef: React.RefObject<HTMLElement | null>;
|
|
6
7
|
onRequestReposition: () => void;
|
|
@@ -11,19 +11,19 @@ var getAllParents = function (element) {
|
|
|
11
11
|
};
|
|
12
12
|
/** Запрос репозиции поповера при ресайзе окна и скролле */
|
|
13
13
|
export var usePopoverReposition = function (_a) {
|
|
14
|
-
var scrollAnchorRef = _a.scrollAnchorRef, onRequestReposition = _a.onRequestReposition;
|
|
14
|
+
var isActive = _a.isActive, scrollAnchorRef = _a.scrollAnchorRef, onRequestReposition = _a.onRequestReposition;
|
|
15
15
|
var onRequestRepositionRef = useMutableRef(onRequestReposition);
|
|
16
16
|
useEffect(function () {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
var fn = function () { return onRequestRepositionRef.current(); };
|
|
18
|
+
if (isActive) {
|
|
19
|
+
window.addEventListener('resize', fn);
|
|
20
|
+
var allParents_1 = (scrollAnchorRef === null || scrollAnchorRef === void 0 ? void 0 : scrollAnchorRef.current) ? getAllParents(scrollAnchorRef.current) : [];
|
|
21
|
+
allParents_1.forEach(function (parentEl) { return parentEl.addEventListener('scroll', fn); });
|
|
22
|
+
return function () {
|
|
23
|
+
window.removeEventListener('resize', fn);
|
|
24
|
+
allParents_1.forEach(function (parentEl) { return parentEl.removeEventListener('scroll', fn); });
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
28
|
}, [scrollAnchorRef]);
|
|
29
29
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __assign,
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
2
|
import './SelectDropdown.css';
|
|
3
|
-
import React, { Fragment, useMemo, useRef
|
|
3
|
+
import React, { Fragment, useMemo, useRef } from 'react';
|
|
4
4
|
import { Transition } from 'react-transition-group';
|
|
5
5
|
import { isOptionForCreate, } from '../../../hooks/useSelect/useSelect';
|
|
6
6
|
import { animateTimeout, cnMixPopoverAnimate, } from '../../../mixs/MixPopoverAnimate/MixPopoverAnimate';
|
|
@@ -16,7 +16,6 @@ export var defaultSelectDropdownPropForm = selectDropdownform[0];
|
|
|
16
16
|
var cnSelectDropdown = cn('SelectDropdown');
|
|
17
17
|
export var SelectDropdown = function (props) {
|
|
18
18
|
var controlRef = props.controlRef, size = props.size, getOptionProps = props.getOptionProps, dropdownRef = props.dropdownRef, labelForCreate = props.labelForCreate, className = props.className, labelForNotFound = props.labelForNotFound, labelForEmptyItems = props.labelForEmptyItems, _a = props.hasItems, hasItems = _a === void 0 ? true : _a, form = props.form, isOpen = props.isOpen, renderItem = props.renderItem, visibleItems = props.visibleItems, isLoading = props.isLoading, getGroupLabel = props.getGroupLabel, notFound = props.notFound, otherProps = __rest(props, ["controlRef", "size", "getOptionProps", "dropdownRef", "labelForCreate", "className", "labelForNotFound", "labelForEmptyItems", "hasItems", "form", "isOpen", "renderItem", "visibleItems", "isLoading", "getGroupLabel", "notFound"]);
|
|
19
|
-
var _b = __read(useState('downStartLeft'), 2), direction = _b[0], setDirection = _b[1];
|
|
20
19
|
var indent = form === 'round' ? 'increased' : 'normal';
|
|
21
20
|
var popoverRef = useRef(null);
|
|
22
21
|
var isListShowed = useMemo(function () {
|
|
@@ -26,9 +25,9 @@ export var SelectDropdown = function (props) {
|
|
|
26
25
|
}, [visibleItems]);
|
|
27
26
|
return (React.createElement(Transition, { "in": isOpen, unmountOnExit: true, nodeRef: popoverRef, timeout: animateTimeout }, function (animate) {
|
|
28
27
|
var getIndex = fabricIndex(-1);
|
|
29
|
-
return (React.createElement(Popover, __assign({}, otherProps, { anchorRef: controlRef, direction: "downStartLeft", possibleDirections: ['downStartLeft', 'upStartLeft', 'downStartRight', 'upStartRight'], offset: "2xs", ref: popoverRef, role: "listbox",
|
|
28
|
+
return (React.createElement(Popover, __assign({}, otherProps, { anchorRef: controlRef, direction: "downStartLeft", possibleDirections: ['downStartLeft', 'upStartLeft', 'downStartRight', 'upStartRight'], offset: "2xs", ref: popoverRef, role: "listbox", className: cnSelectDropdown({ form: form, size: size }, [
|
|
30
29
|
className,
|
|
31
|
-
cnMixPopoverAnimate({
|
|
30
|
+
cnMixPopoverAnimate({ animate: animate }),
|
|
32
31
|
]), equalAnchorWidth: true }),
|
|
33
32
|
React.createElement("div", { className: cnSelectDropdown('List', { size: size, form: form }), ref: dropdownRef },
|
|
34
33
|
isLoading && React.createElement(SelectLoader, { mode: isListShowed ? 'blur' : 'empty' }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TextFieldProps } from '../../TextField/
|
|
2
|
+
import { TextFieldProps } from '../../TextField/TextField';
|
|
3
3
|
declare type Props = Omit<TextFieldProps<'number'>, 'value' | 'onChange' | 'min' | 'max' | 'step'> & {
|
|
4
4
|
value: number;
|
|
5
5
|
step?: number | number[];
|
|
@@ -80,6 +80,10 @@ declare type GroupColumnAddition<T extends TableRow> = {
|
|
|
80
80
|
export interface TableControl<T extends TableRow> {
|
|
81
81
|
column: Header<T> & ColumnMetaData;
|
|
82
82
|
}
|
|
83
|
+
export declare type SortByProps<T extends TableRow> = {
|
|
84
|
+
sortingBy: keyof T;
|
|
85
|
+
sortOrder: 'asc' | 'desc';
|
|
86
|
+
};
|
|
83
87
|
export declare type TableColumn<T extends TableRow> = {
|
|
84
88
|
title: React.ReactNode;
|
|
85
89
|
align?: HorizontalAlign;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TableColumn, TableRow, ValueOf } from './Table';
|
|
2
|
+
import { SortByProps, TableColumn, TableRow, ValueOf } from './Table';
|
|
3
3
|
export declare type FilterComponentProps = {
|
|
4
4
|
onConfirm: (value: unknown) => void;
|
|
5
5
|
onCancel: () => void;
|
|
@@ -20,10 +20,6 @@ export declare type Filters<T extends TableRow> = ValueOf<{
|
|
|
20
20
|
};
|
|
21
21
|
});
|
|
22
22
|
}>[];
|
|
23
|
-
export declare type SortByProps<T extends TableRow> = {
|
|
24
|
-
sortingBy: keyof T;
|
|
25
|
-
sortOrder: 'asc' | 'desc';
|
|
26
|
-
};
|
|
27
23
|
export declare type onSortBy<T extends TableRow> = (props: SortByProps<T> | null) => void;
|
|
28
24
|
export declare type FieldSelectedValues = string[];
|
|
29
25
|
declare type SelectedFilter = {
|
|
@@ -437,21 +437,43 @@
|
|
|
437
437
|
transition: background-color 0.15s;
|
|
438
438
|
}
|
|
439
439
|
|
|
440
|
-
.TextField-ClearButton
|
|
440
|
+
.TextField-ClearButton,
|
|
441
|
+
.TextField-EyeButton {
|
|
442
|
+
display: -webkit-box;
|
|
443
|
+
display: -ms-flexbox;
|
|
444
|
+
display: flex;
|
|
445
|
+
-webkit-box-orient: vertical;
|
|
446
|
+
-webkit-box-direction: normal;
|
|
447
|
+
-ms-flex-direction: column;
|
|
448
|
+
flex-direction: column;
|
|
449
|
+
-webkit-box-pack: center;
|
|
450
|
+
-ms-flex-pack: center;
|
|
451
|
+
justify-content: center;
|
|
441
452
|
height: calc(var(--input-height) - (var(--control-border-width) * 2));
|
|
442
453
|
margin: 0;
|
|
443
454
|
margin-left: var(--input-space);
|
|
444
455
|
padding: 0;
|
|
445
|
-
color: var(--clear-button-color);
|
|
446
456
|
background-color: transparent;
|
|
447
457
|
border: none;
|
|
448
458
|
cursor: pointer;
|
|
449
459
|
}
|
|
450
460
|
|
|
461
|
+
.TextField-ClearButton {
|
|
462
|
+
color: var(--clear-button-color);
|
|
463
|
+
}
|
|
464
|
+
|
|
451
465
|
.TextField-ClearButton:hover {
|
|
452
466
|
--clear-button-color: var(--color-control-typo-clear-hover);
|
|
453
467
|
}
|
|
454
468
|
|
|
469
|
+
.TextField-EyeButton {
|
|
470
|
+
color: var(--color-control-typo-placeholder);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.TextField-EyeButton:hover {
|
|
474
|
+
color: var(--color-control-typo-clear-hover);
|
|
475
|
+
}
|
|
476
|
+
|
|
455
477
|
.TextField-ClearButtonIcon {
|
|
456
478
|
position: relative;
|
|
457
479
|
top: 1px;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './TextField.css';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { TextFieldComponent, TextFieldProps } from './
|
|
3
|
+
import { TextFieldComponent, TextFieldProps } from './types';
|
|
4
4
|
export declare const COMPONENT_NAME: "TextField";
|
|
5
5
|
export declare const cnTextField: import("@bem-react/classname").ClassNameFormatter;
|
|
6
6
|
export declare function TextFieldRender<TYPE extends string>(props: TextFieldProps<TYPE>, ref: React.Ref<HTMLDivElement>): JSX.Element;
|
|
7
7
|
export declare const TextField: TextFieldComponent;
|
|
8
|
-
export * from './
|
|
8
|
+
export * from './types';
|
|
@@ -1,42 +1,58 @@
|
|
|
1
1
|
import { __assign, __read, __rest } from "tslib";
|
|
2
2
|
import './TextField.css';
|
|
3
|
-
import React, { forwardRef,
|
|
3
|
+
import React, { forwardRef, useCallback, useEffect } from 'react';
|
|
4
4
|
import TextAreaAutoSize from 'react-textarea-autosize';
|
|
5
|
+
import { useFlag } from '../../hooks/useFlag/useFlag';
|
|
5
6
|
import { useForkRef } from '../../hooks/useForkRef/useForkRef';
|
|
7
|
+
import { useMutableRef } from '../../hooks/useMutableRef/useMutableRef';
|
|
6
8
|
import { useSortSteps } from '../../hooks/useSortSteps/useSortSteps';
|
|
7
9
|
import { IconClose } from '../../icons/IconClose/IconClose';
|
|
10
|
+
import { IconEye } from '../../icons/IconEye/IconEye';
|
|
11
|
+
import { IconEyeClose } from '../../icons/IconEyeClose/IconEyeClose';
|
|
8
12
|
import { IconSelect } from '../../icons/IconSelect/IconSelect';
|
|
9
13
|
import { IconSelectOpen } from '../../icons/IconSelectOpen/IconSelectOpen';
|
|
10
14
|
import { cn } from '../../utils/bem';
|
|
11
15
|
import { getByMap } from '../../utils/getByMap';
|
|
16
|
+
import { isString } from '../../utils/type-guards';
|
|
12
17
|
import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
|
|
13
18
|
import { FieldCaption } from '../FieldCaption/FieldCaption';
|
|
14
19
|
import { FieldLabel } from '../FieldLabel/FieldLabel';
|
|
15
|
-
import { getIncrementFlag,
|
|
20
|
+
import { getIncrementFlag, getTypeForRender, getValueByStep, sizeMap } from './helpers';
|
|
21
|
+
import { textFieldPropFormDefault, textFieldPropSizeDefault, textFieldPropViewDefault, textFieldPropWidthDefault, } from './types';
|
|
16
22
|
export var COMPONENT_NAME = 'TextField';
|
|
17
23
|
export var cnTextField = cn(COMPONENT_NAME);
|
|
18
24
|
export function TextFieldRender(props, ref) {
|
|
19
25
|
var textFieldRef = React.useRef(null);
|
|
20
26
|
var inputRef = React.useRef(null);
|
|
21
27
|
var _a = usePropsHandler(COMPONENT_NAME, props, textFieldRef), className = _a.className, _b = _a.type, type = _b === void 0 ? 'text' : _b, value = _a.value, onChange = _a.onChange, id = _a.id, name = _a.name, rows = _a.rows, cols = _a.cols, minRows = _a.minRows, maxRows = _a.maxRows, inputRefProp = _a.inputRef, maxLength = _a.maxLength, disabled = _a.disabled, _c = _a.size, size = _c === void 0 ? textFieldPropSizeDefault : _c, _d = _a.view, view = _d === void 0 ? textFieldPropViewDefault : _d, _e = _a.form, form = _e === void 0 ? textFieldPropFormDefault : _e, state = _a.state, status = _a.status, _f = _a.width, width = _f === void 0 ? textFieldPropWidthDefault : _f, onBlur = _a.onBlur, onFocus = _a.onFocus, _g = _a.autoFocus, autoFocus = _g === void 0 ? false : _g, placeholder = _a.placeholder, leftSide = _a.leftSide, rightSide = _a.rightSide, autoComplete = _a.autoComplete, withClearButton = _a.withClearButton, max = _a.max, min = _a.min, readOnly = _a.readOnly, required = _a.required, _h = _a.step, step = _h === void 0 ? 1 : _h, tabIndex = _a.tabIndex, ariaLabel = _a.ariaLabel, label = _a.label, inputContainerRef = _a.inputContainerRef, _j = _a.labelPosition, labelPosition = _j === void 0 ? 'top' : _j, caption = _a.caption, iconSizeProp = _a.iconSize, focused = _a.focused, onClick = _a.onClick, otherProps = __rest(_a, ["className", "type", "value", "onChange", "id", "name", "rows", "cols", "minRows", "maxRows", "inputRef", "maxLength", "disabled", "size", "view", "form", "state", "status", "width", "onBlur", "onFocus", "autoFocus", "placeholder", "leftSide", "rightSide", "autoComplete", "withClearButton", "max", "min", "readOnly", "required", "step", "tabIndex", "ariaLabel", "label", "inputContainerRef", "labelPosition", "caption", "iconSize", "focused", "onClick"]);
|
|
22
|
-
var _k = __read(
|
|
28
|
+
var _k = __read(useFlag(autoFocus), 2), focus = _k[0], setFocus = _k[1];
|
|
29
|
+
var _l = __read(useFlag(false), 2), passwordVisible = _l[0], setPasswordVisuble = _l[1];
|
|
30
|
+
var valueRef = useMutableRef(value);
|
|
31
|
+
var onClickRef = useMutableRef(onClick);
|
|
32
|
+
var onChangeRef = useMutableRef(onChange);
|
|
33
|
+
var handleEyeClick = useCallback(function (e) {
|
|
34
|
+
var _a;
|
|
35
|
+
e.stopPropagation();
|
|
36
|
+
setPasswordVisuble.toogle();
|
|
37
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
38
|
+
}, []);
|
|
23
39
|
var textarea = type === 'textarea';
|
|
24
40
|
var LeftIcon = leftSide;
|
|
25
41
|
var RightIcon = rightSide;
|
|
26
|
-
var leftSideIsString =
|
|
27
|
-
var rightSideIsString =
|
|
42
|
+
var leftSideIsString = isString(leftSide);
|
|
43
|
+
var rightSideIsString = isString(rightSide);
|
|
28
44
|
var iconSize = getByMap(sizeMap, size, iconSizeProp);
|
|
29
45
|
var sortedSteps = useSortSteps({ step: step, min: Number(min), max: Number(max) });
|
|
30
|
-
var handleChange = function (e) {
|
|
31
|
-
var
|
|
32
|
-
!disabled && (
|
|
33
|
-
};
|
|
46
|
+
var handleChange = useCallback(function (e) {
|
|
47
|
+
var _a;
|
|
48
|
+
!disabled && ((_a = onChangeRef.current) === null || _a === void 0 ? void 0 : _a.call(onChangeRef, { e: e, id: id, name: name, value: e.target.value || null }));
|
|
49
|
+
}, [id, name]);
|
|
34
50
|
var handleBlur = function (e) {
|
|
35
|
-
setFocus(
|
|
51
|
+
setFocus.off();
|
|
36
52
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
37
53
|
};
|
|
38
54
|
var handleFocus = function (e) {
|
|
39
|
-
setFocus(
|
|
55
|
+
setFocus.on();
|
|
40
56
|
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
41
57
|
};
|
|
42
58
|
var commonProps = {
|
|
@@ -51,27 +67,19 @@ export function TextFieldRender(props, ref) {
|
|
|
51
67
|
placeholder: placeholder,
|
|
52
68
|
autoComplete: autoComplete,
|
|
53
69
|
readOnly: readOnly,
|
|
54
|
-
required: required,
|
|
55
70
|
tabIndex: tabIndex,
|
|
56
71
|
name: name,
|
|
57
72
|
'id': id ? id.toString() : '',
|
|
58
73
|
'aria-label': ariaLabel
|
|
59
74
|
};
|
|
60
|
-
|
|
61
|
-
if (autoFocus) {
|
|
62
|
-
setTimeout(function () {
|
|
63
|
-
var _a;
|
|
64
|
-
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}, []);
|
|
75
|
+
var Eye = passwordVisible ? IconEyeClose : IconEye;
|
|
68
76
|
var onKeyDown = function (e) {
|
|
69
77
|
var flag = getIncrementFlag(e);
|
|
70
78
|
if (type === 'number' && typeof flag === 'boolean' && !disabled) {
|
|
71
79
|
e.preventDefault();
|
|
72
80
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
73
81
|
e: e,
|
|
74
|
-
value: getValueByStep(flag)
|
|
82
|
+
value: getValueByStep(sortedSteps, value, flag, min, max)
|
|
75
83
|
});
|
|
76
84
|
}
|
|
77
85
|
};
|
|
@@ -80,48 +88,44 @@ export function TextFieldRender(props, ref) {
|
|
|
80
88
|
cols: cols,
|
|
81
89
|
minRows: minRows || rows,
|
|
82
90
|
maxRows: maxRows || rows,
|
|
83
|
-
|
|
91
|
+
ref: useForkRef([inputRef, inputRefProp])
|
|
84
92
|
};
|
|
85
93
|
var inputProps = {
|
|
86
|
-
type: type,
|
|
94
|
+
type: getTypeForRender(type, passwordVisible),
|
|
87
95
|
max: max,
|
|
88
96
|
min: min,
|
|
89
97
|
step: !Array.isArray(sortedSteps) ? sortedSteps : 0,
|
|
90
98
|
onKeyDown: onKeyDown,
|
|
91
99
|
ref: useForkRef([inputRef, inputRefProp])
|
|
92
100
|
};
|
|
93
|
-
var handleClear = function (e) {
|
|
94
|
-
|
|
101
|
+
var handleClear = useCallback(function (e) {
|
|
102
|
+
var _a;
|
|
103
|
+
(_a = onChangeRef.current) === null || _a === void 0 ? void 0 : _a.call(onChangeRef, {
|
|
95
104
|
e: e,
|
|
96
|
-
value:
|
|
105
|
+
value: null
|
|
97
106
|
});
|
|
98
|
-
};
|
|
99
|
-
var getValueByStep = function (isIncrement) {
|
|
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
|
-
};
|
|
107
|
+
}, []);
|
|
110
108
|
var changeNumberValue = function (e, isIncrement) {
|
|
111
109
|
if (isIncrement === void 0) { isIncrement = true; }
|
|
112
110
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
113
111
|
e: e,
|
|
114
|
-
value: getValueByStep(isIncrement)
|
|
112
|
+
value: getValueByStep(sortedSteps, value, isIncrement, min, max)
|
|
115
113
|
});
|
|
116
114
|
};
|
|
117
115
|
var rootProps = {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
var _a;
|
|
116
|
+
onClick: useCallback(function (e) {
|
|
117
|
+
var _a, _b;
|
|
121
118
|
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
122
|
-
|
|
123
|
-
}
|
|
119
|
+
(_b = onClickRef.current) === null || _b === void 0 ? void 0 : _b.call(onClickRef, e);
|
|
120
|
+
}, [])
|
|
124
121
|
};
|
|
122
|
+
// при смене passwordVible, перемещаем курсор в конец строки
|
|
123
|
+
useEffect(function () {
|
|
124
|
+
var _a;
|
|
125
|
+
if (type === 'password' && inputRef.current) {
|
|
126
|
+
inputRef.current.selectionStart = ((_a = valueRef.current) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
127
|
+
}
|
|
128
|
+
}, [passwordVisible]);
|
|
125
129
|
return (React.createElement("div", __assign({ className: cnTextField({ labelPosition: labelPosition, size: size, view: view, width: width }, [className]), ref: useForkRef([ref, textFieldRef]) }, rootProps, otherProps),
|
|
126
130
|
label && (React.createElement(FieldLabel, { required: required, className: cnTextField('Label', { labelPosition: labelPosition }), size: size }, label)),
|
|
127
131
|
React.createElement("div", { className: cnTextField('Body') },
|
|
@@ -146,11 +150,13 @@ export function TextFieldRender(props, ref) {
|
|
|
146
150
|
React.createElement(IconSelect, { size: "xs" })))),
|
|
147
151
|
value && withClearButton && type !== 'number' && (React.createElement("button", { type: "button", disabled: disabled, onClick: handleClear, className: cnTextField('ClearButton') },
|
|
148
152
|
React.createElement(IconClose, { size: "xs", className: cnTextField('ClearButtonIcon') }))),
|
|
149
|
-
|
|
153
|
+
type === 'password' && value && (React.createElement("button", { className: cnTextField('ClearButton'), type: "button", onClick: handleEyeClick },
|
|
154
|
+
React.createElement(Eye, { className: cnTextField('Icon'), size: iconSize }))),
|
|
155
|
+
RightIcon && type !== 'number' && type !== 'password' && (React.createElement("div", { className: cnTextField('Side', {
|
|
150
156
|
position: 'right',
|
|
151
157
|
type: rightSideIsString ? 'string' : 'icon'
|
|
152
158
|
}), title: typeof rightSide === 'string' ? rightSide : undefined }, rightSideIsString ? (rightSide) : (React.createElement(RightIcon, { className: cnTextField('Icon'), size: iconSize }))))),
|
|
153
159
|
caption && (React.createElement(FieldCaption, { className: cnTextField('Caption'), status: status || state }, caption)))));
|
|
154
160
|
}
|
|
155
161
|
export var TextField = forwardRef(TextFieldRender);
|
|
156
|
-
export * from './
|
|
162
|
+
export * from './types';
|