@consta/uikit 3.17.2 → 3.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Attach/package.json +1 -1
- package/Attachment/package.json +1 -1
- package/Avatar/package.json +1 -1
- package/Badge/package.json +1 -1
- package/BasicSelectDeprecated/package.json +1 -1
- package/Breadcrumbs/package.json +1 -1
- package/BreadcrumbsCanary/package.json +1 -1
- package/Button/package.json +1 -1
- package/CHANGELOG.md +45 -41
- 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/ContextMenuCanary/es.js +1 -0
- package/ContextMenuCanary/index.d.ts +1 -0
- package/ContextMenuCanary/index.js +4 -0
- package/ContextMenuCanary/package.json +9 -0
- 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/IconFacebook/es.js +1 -0
- package/IconFacebook/index.d.ts +1 -0
- package/IconFacebook/index.js +4 -0
- package/IconFacebook/package.json +9 -0
- 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/es.js +1 -0
- package/IconInstagram/index.d.ts +1 -0
- package/IconInstagram/index.js +4 -0
- package/IconInstagram/package.json +9 -0
- 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/es.js +1 -0
- package/IconVkontakte/index.d.ts +1 -0
- package/IconVkontakte/index.js +4 -0
- package/IconVkontakte/package.json +9 -0
- 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/es.js +1 -0
- package/IconYandexDzen/index.d.ts +1 -0
- package/IconYandexDzen/index.js +4 -0
- package/IconYandexDzen/package.json +9 -0
- package/IconYoutube/es.js +1 -0
- package/IconYoutube/index.d.ts +1 -0
- package/IconYoutube/index.js +4 -0
- package/IconYoutube/package.json +9 -0
- package/Informer/package.json +1 -1
- package/LayoutCanary/package.json +1 -1
- package/Loader/package.json +1 -1
- package/MixCard/package.json +1 -1
- package/MixFocus/package.json +1 -1
- package/MixPopoverAnimate/package.json +1 -1
- package/MixPopoverArrow/es.js +1 -0
- package/MixPopoverArrow/index.d.ts +1 -0
- package/MixPopoverArrow/index.js +4 -0
- package/MixPopoverArrow/package.json +9 -0
- package/MixSpace/package.json +1 -1
- package/MixVisuallyHidden/package.json +1 -1
- package/Modal/package.json +1 -1
- package/MultiComboboxDeprecated/package.json +1 -1
- package/Pagination/package.json +1 -1
- package/Popover/package.json +1 -1
- package/PortalWithTheme/package.json +1 -1
- package/ProgressSpin/package.json +1 -1
- package/ProgressStepBarCanary/package.json +1 -1
- package/Radio/package.json +1 -1
- package/RadioGroup/package.json +1 -1
- package/Responses/package.json +1 -1
- package/Responses403/package.json +1 -1
- package/Responses404/package.json +1 -1
- package/Responses500/package.json +1 -1
- package/Responses503/package.json +1 -1
- package/ResponsesConnectionError/package.json +1 -1
- package/ResponsesDeleted/package.json +1 -1
- package/ResponsesEmptyBox/package.json +1 -1
- package/ResponsesEmptyPockets/package.json +1 -1
- package/ResponsesExit/package.json +1 -1
- package/ResponsesImage/package.json +1 -1
- package/ResponsesImage403/package.json +1 -1
- package/ResponsesImage404/package.json +1 -1
- package/ResponsesImage500/package.json +1 -1
- package/ResponsesImage503/package.json +1 -1
- package/ResponsesImageConnectionError/package.json +1 -1
- package/ResponsesImageDeleted/package.json +1 -1
- package/ResponsesImageEmptyBox/package.json +1 -1
- package/ResponsesImageEmptyPockets/package.json +1 -1
- package/ResponsesImageNothingFound/package.json +1 -1
- package/ResponsesImageSuccess/package.json +1 -1
- package/ResponsesNothingFound/package.json +1 -1
- package/ResponsesSuccess/package.json +1 -1
- package/Select/package.json +1 -1
- package/Sidebar/package.json +1 -1
- package/Skeleton/package.json +1 -1
- package/SliderCanary/package.json +1 -1
- package/SnackBar/package.json +1 -1
- package/Steps/package.json +1 -1
- package/Switch/package.json +1 -1
- package/SwitchGroup/package.json +1 -1
- package/Table/package.json +1 -1
- package/Tabs/package.json +1 -1
- package/Tag/package.json +1 -1
- package/TagBase/package.json +1 -1
- package/Text/package.json +1 -1
- package/TextField/package.json +1 -1
- package/Theme/package.json +1 -1
- package/ThemeToggler/package.json +1 -1
- package/Timer/package.json +1 -1
- package/Tooltip/package.json +1 -1
- package/User/package.json +1 -1
- package/UserSelect/package.json +1 -1
- package/UserSelectDeprecated/package.json +1 -1
- package/__internal__/cjs-src/components/Calendar/Calendar.d.ts +1 -0
- package/__internal__/cjs-src/components/Calendar/Calendar.js +8 -4
- package/__internal__/cjs-src/components/Card/Card.d.ts +1 -0
- package/__internal__/cjs-src/components/Card/Card.js +8 -4
- package/__internal__/cjs-src/components/Checkbox/Checkbox.d.ts +2 -0
- package/__internal__/cjs-src/components/Checkbox/Checkbox.js +2 -2
- package/__internal__/cjs-src/components/Collapse/Collapse.d.ts +1 -0
- package/__internal__/cjs-src/components/Collapse/Collapse.js +8 -4
- package/__internal__/cjs-src/components/Combobox/Combobox.d.ts +1 -0
- package/__internal__/cjs-src/components/Combobox/Combobox.js +11 -4
- package/__internal__/cjs-src/components/Combobox/helpers.d.ts +5 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenu.css +18 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuCanary.d.ts +5 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuCanary.js +32 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.css +74 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.d.ts +3 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.js +45 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.css +73 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.d.ts +4 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.js +102 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevels/ContextMenuLevels.d.ts +2 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevels/ContextMenuLevels.js +73 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/helper.d.ts +95 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/helper.js +119 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/types.d.ts +141 -0
- package/__internal__/cjs-src/components/ContextMenuCanary/types.js +14 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerCanary.d.ts +1 -0
- package/__internal__/cjs-src/components/DatePickerCanary/DatePickerCanary.js +7 -3
- package/__internal__/cjs-src/components/DateTimeCanary/DateTimeCanary.d.ts +1 -0
- package/__internal__/cjs-src/components/DateTimeCanary/DateTimeCanary.js +7 -3
- package/__internal__/cjs-src/components/DragNDropField/DragNDropField.d.ts +1 -0
- package/__internal__/cjs-src/components/DragNDropField/DragNDropField.js +8 -5
- package/__internal__/cjs-src/components/EventInterceptor/EventInterceptor.d.ts +2 -2
- package/__internal__/cjs-src/components/EventInterceptor/eventInterceptorMap.d.ts +2 -81
- package/__internal__/cjs-src/components/EventInterceptor/propsHandlers/useCheckboxEventsHandler.d.ts +2 -0
- package/__internal__/cjs-src/components/EventInterceptor/types.d.ts +1 -0
- package/__internal__/cjs-src/components/EventInterceptor/types.js +2 -0
- package/__internal__/cjs-src/components/EventInterceptor/usePropsHandler.d.ts +2 -2
- package/__internal__/cjs-src/components/FileField/FileField.d.ts +1 -0
- package/__internal__/cjs-src/components/FileField/FileField.js +8 -4
- package/__internal__/cjs-src/components/Pagination/Pagination.d.ts +1 -0
- package/__internal__/cjs-src/components/Pagination/Pagination.js +9 -6
- package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBarCanary.d.ts +1 -0
- package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBarCanary.js +5 -3
- package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBarItem/ProgressStepBarItem.js +2 -2
- package/__internal__/cjs-src/components/Radio/Radio.d.ts +3 -0
- package/__internal__/cjs-src/components/Radio/Radio.js +9 -5
- package/__internal__/cjs-src/components/Select/Select.js +2 -2
- package/__internal__/cjs-src/components/Select/helpers.d.ts +2 -0
- package/__internal__/cjs-src/components/SelectComponents/SelectDropdown/SelectDropdown.css +0 -52
- package/__internal__/cjs-src/components/SelectComponents/SelectDropdown/SelectDropdown.d.ts +1 -0
- package/__internal__/cjs-src/components/SelectComponents/SelectDropdown/SelectDropdown.js +27 -18
- package/__internal__/cjs-src/components/SelectComponents/SelectLoader/SelectLoader.css +53 -0
- package/__internal__/cjs-src/components/SelectComponents/SelectLoader/SelectLoader.d.ts +9 -0
- package/__internal__/cjs-src/components/SelectComponents/SelectLoader/SelectLoader.js +15 -0
- package/__internal__/cjs-src/components/Sidebar/Sidebar.css +5 -0
- package/__internal__/cjs-src/components/Sidebar/Sidebar.js +1 -1
- package/__internal__/cjs-src/components/SliderCanary/SliderCanary.d.ts +1 -0
- package/__internal__/cjs-src/components/SliderCanary/SliderCanary.js +9 -7
- package/__internal__/cjs-src/components/Switch/Switch.d.ts +1 -0
- package/__internal__/cjs-src/components/Switch/Switch.js +8 -4
- package/__internal__/cjs-src/components/Table/FilterTooltip/TableFilterTooltip.js +10 -4
- package/__internal__/cjs-src/components/Tabs/MoreItems/TabsMoreItems.css +1 -1
- package/__internal__/cjs-src/components/Tabs/MoreItems/TabsMoreItems.js +33 -27
- package/__internal__/cjs-src/components/Tag/Tag.d.ts +1 -0
- package/__internal__/cjs-src/components/Tag/Tag.js +8 -4
- package/__internal__/cjs-src/components/ThemeToggler/ThemeToggler.d.ts +4 -30
- package/__internal__/cjs-src/components/ThemeToggler/ThemeToggler.js +26 -37
- package/__internal__/cjs-src/components/ThemeToggler/helpers.d.ts +274 -0
- package/__internal__/cjs-src/components/ThemeToggler/helpers.js +27 -0
- package/__internal__/cjs-src/components/ThemeToggler/types.d.ts +45 -0
- package/__internal__/cjs-src/components/ThemeToggler/types.js +5 -0
- package/__internal__/cjs-src/components/Tooltip/Tooltip.css +1 -88
- package/__internal__/cjs-src/components/Tooltip/Tooltip.js +3 -2
- package/__internal__/cjs-src/components/UserSelect/UserSelect.d.ts +1 -0
- package/__internal__/cjs-src/components/UserSelect/UserSelect.js +5 -3
- package/__internal__/cjs-src/components/UserSelect/helpers.d.ts +2 -0
- package/__internal__/cjs-src/icons/IconFacebook/IconFacebook.d.ts +5 -0
- package/__internal__/cjs-src/icons/IconFacebook/IconFacebook.js +13 -0
- package/__internal__/cjs-src/icons/IconFacebook/IconFacebook_size_m.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconFacebook/IconFacebook_size_m.js +9 -0
- package/__internal__/cjs-src/icons/IconFacebook/IconFacebook_size_m.svg +5 -0
- package/__internal__/cjs-src/icons/IconFacebook/IconFacebook_size_s.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconFacebook/IconFacebook_size_s.js +9 -0
- package/__internal__/cjs-src/icons/IconFacebook/IconFacebook_size_s.svg +5 -0
- package/__internal__/cjs-src/icons/IconInstagram/IconInstagram.d.ts +5 -0
- package/__internal__/cjs-src/icons/IconInstagram/IconInstagram.js +13 -0
- package/__internal__/cjs-src/icons/IconInstagram/IconInstagram_size_m.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconInstagram/IconInstagram_size_m.js +9 -0
- package/__internal__/cjs-src/icons/IconInstagram/IconInstagram_size_m.svg +7 -0
- package/__internal__/cjs-src/icons/IconInstagram/IconInstagram_size_s.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconInstagram/IconInstagram_size_s.js +9 -0
- package/__internal__/cjs-src/icons/IconInstagram/IconInstagram_size_s.svg +7 -0
- package/__internal__/cjs-src/icons/IconVkontakte/IconVkontakte.d.ts +5 -0
- package/__internal__/cjs-src/icons/IconVkontakte/IconVkontakte.js +13 -0
- package/__internal__/cjs-src/icons/IconVkontakte/IconVkontakte_size_m.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconVkontakte/IconVkontakte_size_m.js +9 -0
- package/__internal__/cjs-src/icons/IconVkontakte/IconVkontakte_size_m.svg +5 -0
- package/__internal__/cjs-src/icons/IconVkontakte/IconVkontakte_size_s.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconVkontakte/IconVkontakte_size_s.js +9 -0
- package/__internal__/cjs-src/icons/IconVkontakte/IconVkontakte_size_s.svg +5 -0
- package/__internal__/cjs-src/icons/IconYandexDzen/IconYandexDzen.d.ts +5 -0
- package/__internal__/cjs-src/icons/IconYandexDzen/IconYandexDzen.js +13 -0
- package/__internal__/cjs-src/icons/IconYandexDzen/IconYandexDzen_size_m.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconYandexDzen/IconYandexDzen_size_m.js +9 -0
- package/__internal__/cjs-src/icons/IconYandexDzen/IconYandexDzen_size_m.svg +7 -0
- package/__internal__/cjs-src/icons/IconYandexDzen/IconYandexDzen_size_s.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconYandexDzen/IconYandexDzen_size_s.js +9 -0
- package/__internal__/cjs-src/icons/IconYandexDzen/IconYandexDzen_size_s.svg +7 -0
- package/__internal__/cjs-src/icons/IconYoutube/IconYoutube.d.ts +5 -0
- package/__internal__/cjs-src/icons/IconYoutube/IconYoutube.js +13 -0
- package/__internal__/cjs-src/icons/IconYoutube/IconYoutube_size_m.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconYoutube/IconYoutube_size_m.js +9 -0
- package/__internal__/cjs-src/icons/IconYoutube/IconYoutube_size_m.svg +5 -0
- package/__internal__/cjs-src/icons/IconYoutube/IconYoutube_size_s.d.ts +3 -0
- package/__internal__/cjs-src/icons/IconYoutube/IconYoutube_size_s.js +9 -0
- package/__internal__/cjs-src/icons/IconYoutube/IconYoutube_size_s.svg +5 -0
- package/__internal__/cjs-src/mixs/MixPopoverArrow/MixPopoverArrow.css +88 -0
- package/__internal__/cjs-src/mixs/MixPopoverArrow/MixPopoverArrow.d.ts +8 -0
- package/__internal__/cjs-src/mixs/MixPopoverArrow/MixPopoverArrow.js +6 -0
- package/__internal__/src/components/Calendar/Calendar.d.ts +1 -0
- package/__internal__/src/components/Calendar/Calendar.js +7 -3
- package/__internal__/src/components/Card/Card.d.ts +1 -0
- package/__internal__/src/components/Card/Card.js +7 -3
- package/__internal__/src/components/Checkbox/Checkbox.d.ts +2 -0
- package/__internal__/src/components/Checkbox/Checkbox.js +2 -2
- package/__internal__/src/components/Collapse/Collapse.d.ts +1 -0
- package/__internal__/src/components/Collapse/Collapse.js +7 -3
- package/__internal__/src/components/Combobox/Combobox.d.ts +1 -0
- package/__internal__/src/components/Combobox/Combobox.js +10 -3
- package/__internal__/src/components/Combobox/helpers.d.ts +5 -0
- package/__internal__/src/components/ContextMenuCanary/ContextMenu.css +18 -0
- package/__internal__/src/components/ContextMenuCanary/ContextMenuCanary.d.ts +5 -0
- package/__internal__/src/components/ContextMenuCanary/ContextMenuCanary.js +29 -0
- package/__internal__/src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.css +74 -0
- package/__internal__/src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.d.ts +3 -0
- package/__internal__/src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.js +42 -0
- package/__internal__/src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.css +73 -0
- package/__internal__/src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.d.ts +4 -0
- package/__internal__/src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.js +99 -0
- package/__internal__/src/components/ContextMenuCanary/ContextMenuLevels/ContextMenuLevels.d.ts +2 -0
- package/__internal__/src/components/ContextMenuCanary/ContextMenuLevels/ContextMenuLevels.js +70 -0
- package/__internal__/src/components/ContextMenuCanary/helper.d.ts +95 -0
- package/__internal__/src/components/ContextMenuCanary/helper.js +115 -0
- package/__internal__/src/components/ContextMenuCanary/types.d.ts +141 -0
- package/__internal__/src/components/ContextMenuCanary/types.js +11 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerCanary.d.ts +1 -0
- package/__internal__/src/components/DatePickerCanary/DatePickerCanary.js +7 -3
- package/__internal__/src/components/DateTimeCanary/DateTimeCanary.d.ts +1 -0
- package/__internal__/src/components/DateTimeCanary/DateTimeCanary.js +7 -3
- package/__internal__/src/components/DragNDropField/DragNDropField.d.ts +1 -0
- package/__internal__/src/components/DragNDropField/DragNDropField.js +7 -4
- package/__internal__/src/components/EventInterceptor/EventInterceptor.d.ts +2 -2
- package/__internal__/src/components/EventInterceptor/eventInterceptorMap.d.ts +2 -81
- package/__internal__/src/components/EventInterceptor/propsHandlers/useCheckboxEventsHandler.d.ts +2 -0
- package/__internal__/src/components/EventInterceptor/types.d.ts +1 -0
- package/__internal__/src/components/EventInterceptor/types.js +0 -0
- package/__internal__/src/components/EventInterceptor/usePropsHandler.d.ts +2 -2
- package/__internal__/src/components/FileField/FileField.d.ts +1 -0
- package/__internal__/src/components/FileField/FileField.js +7 -3
- package/__internal__/src/components/Pagination/Pagination.d.ts +1 -0
- package/__internal__/src/components/Pagination/Pagination.js +8 -5
- package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarCanary.d.ts +1 -0
- package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarCanary.js +4 -2
- package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarItem/ProgressStepBarItem.js +2 -2
- package/__internal__/src/components/Radio/Radio.d.ts +3 -0
- package/__internal__/src/components/Radio/Radio.js +8 -4
- package/__internal__/src/components/Select/Select.js +2 -2
- package/__internal__/src/components/Select/helpers.d.ts +2 -0
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.css +0 -52
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.d.ts +1 -0
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js +30 -21
- package/__internal__/src/components/SelectComponents/SelectLoader/SelectLoader.css +53 -0
- package/__internal__/src/components/SelectComponents/SelectLoader/SelectLoader.d.ts +9 -0
- package/__internal__/src/components/SelectComponents/SelectLoader/SelectLoader.js +11 -0
- package/__internal__/src/components/Sidebar/Sidebar.css +5 -0
- package/__internal__/src/components/Sidebar/Sidebar.js +1 -1
- package/__internal__/src/components/SliderCanary/SliderCanary.d.ts +1 -0
- package/__internal__/src/components/SliderCanary/SliderCanary.js +8 -6
- package/__internal__/src/components/Switch/Switch.d.ts +1 -0
- package/__internal__/src/components/Switch/Switch.js +7 -3
- package/__internal__/src/components/Table/FilterTooltip/TableFilterTooltip.js +10 -4
- package/__internal__/src/components/Tabs/MoreItems/TabsMoreItems.css +1 -1
- package/__internal__/src/components/Tabs/MoreItems/TabsMoreItems.js +33 -27
- package/__internal__/src/components/Tag/Tag.d.ts +1 -0
- package/__internal__/src/components/Tag/Tag.js +7 -3
- package/__internal__/src/components/ThemeToggler/ThemeToggler.d.ts +4 -30
- package/__internal__/src/components/ThemeToggler/ThemeToggler.js +24 -35
- package/__internal__/src/components/ThemeToggler/helpers.d.ts +274 -0
- package/__internal__/src/components/ThemeToggler/helpers.js +23 -0
- package/__internal__/src/components/ThemeToggler/types.d.ts +45 -0
- package/__internal__/src/components/ThemeToggler/types.js +2 -0
- package/__internal__/src/components/Tooltip/Tooltip.css +1 -88
- package/__internal__/src/components/Tooltip/Tooltip.js +3 -2
- package/__internal__/src/components/UserSelect/UserSelect.d.ts +1 -0
- package/__internal__/src/components/UserSelect/UserSelect.js +4 -2
- package/__internal__/src/components/UserSelect/helpers.d.ts +2 -0
- package/__internal__/src/icons/IconFacebook/IconFacebook.d.ts +5 -0
- package/__internal__/src/icons/IconFacebook/IconFacebook.js +9 -0
- package/__internal__/src/icons/IconFacebook/IconFacebook_size_m.d.ts +3 -0
- package/__internal__/src/icons/IconFacebook/IconFacebook_size_m.js +7 -0
- package/__internal__/src/icons/IconFacebook/IconFacebook_size_m.svg +5 -0
- package/__internal__/src/icons/IconFacebook/IconFacebook_size_s.d.ts +3 -0
- package/__internal__/src/icons/IconFacebook/IconFacebook_size_s.js +7 -0
- package/__internal__/src/icons/IconFacebook/IconFacebook_size_s.svg +5 -0
- package/__internal__/src/icons/IconInstagram/IconInstagram.d.ts +5 -0
- package/__internal__/src/icons/IconInstagram/IconInstagram.js +9 -0
- package/__internal__/src/icons/IconInstagram/IconInstagram_size_m.d.ts +3 -0
- package/__internal__/src/icons/IconInstagram/IconInstagram_size_m.js +7 -0
- package/__internal__/src/icons/IconInstagram/IconInstagram_size_m.svg +7 -0
- package/__internal__/src/icons/IconInstagram/IconInstagram_size_s.d.ts +3 -0
- package/__internal__/src/icons/IconInstagram/IconInstagram_size_s.js +7 -0
- package/__internal__/src/icons/IconInstagram/IconInstagram_size_s.svg +7 -0
- package/__internal__/src/icons/IconVkontakte/IconVkontakte.d.ts +5 -0
- package/__internal__/src/icons/IconVkontakte/IconVkontakte.js +9 -0
- package/__internal__/src/icons/IconVkontakte/IconVkontakte_size_m.d.ts +3 -0
- package/__internal__/src/icons/IconVkontakte/IconVkontakte_size_m.js +7 -0
- package/__internal__/src/icons/IconVkontakte/IconVkontakte_size_m.svg +5 -0
- package/__internal__/src/icons/IconVkontakte/IconVkontakte_size_s.d.ts +3 -0
- package/__internal__/src/icons/IconVkontakte/IconVkontakte_size_s.js +7 -0
- package/__internal__/src/icons/IconVkontakte/IconVkontakte_size_s.svg +5 -0
- package/__internal__/src/icons/IconYandexDzen/IconYandexDzen.d.ts +5 -0
- package/__internal__/src/icons/IconYandexDzen/IconYandexDzen.js +9 -0
- package/__internal__/src/icons/IconYandexDzen/IconYandexDzen_size_m.d.ts +3 -0
- package/__internal__/src/icons/IconYandexDzen/IconYandexDzen_size_m.js +7 -0
- package/__internal__/src/icons/IconYandexDzen/IconYandexDzen_size_m.svg +7 -0
- package/__internal__/src/icons/IconYandexDzen/IconYandexDzen_size_s.d.ts +3 -0
- package/__internal__/src/icons/IconYandexDzen/IconYandexDzen_size_s.js +7 -0
- package/__internal__/src/icons/IconYandexDzen/IconYandexDzen_size_s.svg +7 -0
- package/__internal__/src/icons/IconYoutube/IconYoutube.d.ts +5 -0
- package/__internal__/src/icons/IconYoutube/IconYoutube.js +9 -0
- package/__internal__/src/icons/IconYoutube/IconYoutube_size_m.d.ts +3 -0
- package/__internal__/src/icons/IconYoutube/IconYoutube_size_m.js +7 -0
- package/__internal__/src/icons/IconYoutube/IconYoutube_size_m.svg +5 -0
- package/__internal__/src/icons/IconYoutube/IconYoutube_size_s.d.ts +3 -0
- package/__internal__/src/icons/IconYoutube/IconYoutube_size_s.js +7 -0
- package/__internal__/src/icons/IconYoutube/IconYoutube_size_s.svg +5 -0
- package/__internal__/src/mixs/MixPopoverArrow/MixPopoverArrow.css +88 -0
- package/__internal__/src/mixs/MixPopoverArrow/MixPopoverArrow.d.ts +8 -0
- package/__internal__/src/mixs/MixPopoverArrow/MixPopoverArrow.js +3 -0
- package/createIcon/package.json +1 -1
- package/createResponsesImage/package.json +1 -1
- package/package.json +8 -1
- 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,81 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const eventInterceptorMap:
|
|
3
|
-
readonly Button: <T extends import("../Button/Button").Props>(props: T, handler: import("./EventInterceptor").EventInterceptorHandler, ref: import("react").RefObject<HTMLElement>) => T;
|
|
4
|
-
readonly Checkbox: <P extends {
|
|
5
|
-
checked: boolean | undefined;
|
|
6
|
-
size?: "m" | "l" | undefined;
|
|
7
|
-
view?: "ghost" | "primary" | undefined;
|
|
8
|
-
align?: "center" | "top" | undefined;
|
|
9
|
-
disabled?: boolean | undefined;
|
|
10
|
-
intermediate?: boolean | undefined;
|
|
11
|
-
label?: string | undefined;
|
|
12
|
-
onChange?: import("../Checkbox/Checkbox").CheckboxPropOnChange | undefined;
|
|
13
|
-
name?: string | undefined;
|
|
14
|
-
onFocus?: ((event: import("react").FocusEvent<HTMLInputElement>) => void) | undefined;
|
|
15
|
-
onBlur?: ((event: import("react").FocusEvent<HTMLInputElement>) => void) | undefined;
|
|
16
|
-
autoFocus?: boolean | undefined;
|
|
17
|
-
readOnly?: boolean | undefined;
|
|
18
|
-
required?: boolean | undefined;
|
|
19
|
-
step?: string | number | undefined;
|
|
20
|
-
tabIndex?: number | undefined;
|
|
21
|
-
inputRef?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
22
|
-
children?: undefined;
|
|
23
|
-
} & Pick<import("react").HTMLAttributes<HTMLLabelElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLLabelElement>>(props: P, handler: import("./EventInterceptor").EventInterceptorHandler, ref: import("react").RefObject<HTMLLabelElement>) => P;
|
|
24
|
-
readonly Select: <PROPS extends import("../Select/helpers").SelectProps<import("../Select/helpers").DefaultItem, import("../Select/helpers").DefaultGroup>>(props: PROPS, handler: import("./EventInterceptor").EventInterceptorHandler, ref: import("react").RefObject<HTMLDivElement | null>) => PROPS;
|
|
25
|
-
readonly SnackBar: <P_1 extends import("../SnackBar/types").SnackBarProps<import("../SnackBar/types").SnackBarItemDefault>>(props: P_1, handler: import("./EventInterceptor").EventInterceptorHandler) => P_1;
|
|
26
|
-
readonly TextField: <P_2 extends {
|
|
27
|
-
className?: string | undefined;
|
|
28
|
-
value?: string | null | undefined;
|
|
29
|
-
cols?: number | undefined;
|
|
30
|
-
onChange?: import("../TextField/helpers").TextFieldPropOnChange | undefined;
|
|
31
|
-
id?: string | number | undefined;
|
|
32
|
-
name?: string | undefined;
|
|
33
|
-
type?: string | undefined;
|
|
34
|
-
disabled?: boolean | undefined;
|
|
35
|
-
maxLength?: number | undefined;
|
|
36
|
-
size?: "xs" | "s" | "m" | "l" | undefined;
|
|
37
|
-
view?: "default" | "clear" | undefined;
|
|
38
|
-
form?: "default" | "round" | "brick" | "brickRound" | "roundBrick" | "brickDefault" | "defaultBrick" | "clearRound" | "roundClear" | "clearDefault" | "defaultClear" | "brickClear" | "clearBrick" | "clearClear" | undefined;
|
|
39
|
-
state?: "alert" | "success" | "warning" | undefined;
|
|
40
|
-
status?: "alert" | "success" | "warning" | undefined;
|
|
41
|
-
width?: "default" | "full" | undefined;
|
|
42
|
-
onFocus?: ((event: import("react").FocusEvent<HTMLElement>) => void) | undefined;
|
|
43
|
-
onBlur?: ((event: import("react").FocusEvent<HTMLElement>) => void) | undefined;
|
|
44
|
-
autoFocus?: boolean | undefined;
|
|
45
|
-
placeholder?: string | undefined;
|
|
46
|
-
leftSide?: string | import("react").FC<import("../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
|
|
47
|
-
view?: "link" | "alert" | "brand" | "ghost" | "primary" | "secondary" | "success" | "warning" | "disabled" | undefined;
|
|
48
|
-
size?: "xs" | "s" | "m" | undefined;
|
|
49
|
-
}, HTMLSpanElement>> | undefined;
|
|
50
|
-
rightSide?: string | import("react").FC<import("../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
|
|
51
|
-
view?: "link" | "alert" | "brand" | "ghost" | "primary" | "secondary" | "success" | "warning" | "disabled" | undefined;
|
|
52
|
-
size?: "xs" | "s" | "m" | undefined;
|
|
53
|
-
}, HTMLSpanElement>> | undefined;
|
|
54
|
-
withClearButton?: boolean | undefined;
|
|
55
|
-
autoComplete?: "on" | "off" | "tel" | "url" | "email" | "name" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo" | undefined;
|
|
56
|
-
max?: string | number | undefined;
|
|
57
|
-
min?: string | number | undefined;
|
|
58
|
-
readOnly?: boolean | undefined;
|
|
59
|
-
required?: boolean | undefined;
|
|
60
|
-
step?: string | number | number[] | undefined;
|
|
61
|
-
tabIndex?: number | undefined;
|
|
62
|
-
inputContainerRef?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
63
|
-
inputRef?: ((instance: HTMLInputElement | HTMLTextAreaElement | null) => void) | import("react").RefObject<HTMLInputElement | HTMLTextAreaElement> | null | undefined;
|
|
64
|
-
ariaLabel?: string | undefined;
|
|
65
|
-
iconSize?: "xs" | "s" | "m" | undefined;
|
|
66
|
-
children?: undefined;
|
|
67
|
-
label?: string | undefined;
|
|
68
|
-
caption?: string | undefined;
|
|
69
|
-
labelPosition?: "left" | "top" | undefined;
|
|
70
|
-
focused?: boolean | undefined;
|
|
71
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "slot" | "spellCheck" | "style" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
|
|
72
|
-
rows?: undefined;
|
|
73
|
-
minRows?: undefined;
|
|
74
|
-
maxRows?: undefined;
|
|
75
|
-
} & {
|
|
76
|
-
rightSide?: string | import("react").FC<import("../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
|
|
77
|
-
view?: "link" | "alert" | "brand" | "ghost" | "primary" | "secondary" | "success" | "warning" | "disabled" | undefined;
|
|
78
|
-
size?: "xs" | "s" | "m" | undefined;
|
|
79
|
-
}, HTMLSpanElement>> | undefined;
|
|
80
|
-
} & import("react").RefAttributes<HTMLElement>>(props: P_2, handler: import("./EventInterceptor").EventInterceptorHandler, ref: import("react").RefObject<HTMLDivElement>) => P_2;
|
|
81
|
-
};
|
|
1
|
+
import { EventInterceptorComponentName } from './types';
|
|
2
|
+
export declare const eventInterceptorMap: Partial<Record<EventInterceptorComponentName, ((...args: any[]) => any) | undefined>>;
|
package/__internal__/src/components/EventInterceptor/propsHandlers/useCheckboxEventsHandler.d.ts
CHANGED
|
@@ -19,4 +19,6 @@ export declare const useCheckboxEventsHandler: <P extends {
|
|
|
19
19
|
tabIndex?: number | undefined;
|
|
20
20
|
inputRef?: ((instance: HTMLInputElement | null) => void) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
21
21
|
children?: undefined;
|
|
22
|
+
for?: string | undefined;
|
|
23
|
+
inputId?: string | undefined;
|
|
22
24
|
} & Pick<React.HTMLAttributes<HTMLLabelElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLLabelElement>>(props: P, handler: EventInterceptorHandler, ref: React.RefObject<HTMLLabelElement>) => P;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type EventInterceptorComponentName = 'Attachment' | 'Avatar' | 'Badge' | 'Breadcrumbs' | 'Button' | 'Calendar' | 'Card' | 'Checkbox' | 'CheckboxGroup' | 'ChoiceGroup' | 'Collapse' | 'CollapseGroup' | 'Combobox' | 'ContextMenu' | 'DatePicker' | 'DateTime' | 'DragNDropField' | 'File' | 'FileField' | 'Grid' | 'Header' | 'Informer' | 'Layout' | 'Loader' | 'Modal' | 'Pagination' | 'Popover' | 'ProgressSpin' | 'ProgressStepBar' | 'Radio' | 'RadioGroup' | 'Select' | 'Sidebar' | 'Skeleton' | 'Slider' | 'SnackBar' | 'Steps' | 'Switch' | 'SwitchGroup' | 'Table' | 'Tabs' | 'Tag' | 'TagBase' | 'Text' | 'TextField' | 'ThemeToggler' | 'Timer' | 'Tooltip' | 'User' | 'UserSelect';
|
|
File without changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const usePropsHandler: <PROPS extends {}>(componentName:
|
|
2
|
+
import { EventInterceptorComponentName } from './types';
|
|
3
|
+
export declare const usePropsHandler: <PROPS extends {}>(componentName: EventInterceptorComponentName, props: PROPS, ref?: ((instance: HTMLElement | null) => void) | React.RefObject<HTMLElement> | null | undefined) => PROPS;
|
|
@@ -12,6 +12,7 @@ export declare type FileFieldProps = PropsWithJsxAttributes<{
|
|
|
12
12
|
children?: RenderFn | React.ReactNode;
|
|
13
13
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
14
14
|
}, 'input'>;
|
|
15
|
+
export declare const COMPONENT_NAME: "FileField";
|
|
15
16
|
export declare const cnFileField: import("@bem-react/classname").ClassNameFormatter;
|
|
16
17
|
export declare const FileField: React.FC<FileFieldProps>;
|
|
17
18
|
export {};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { __assign, __rest } from "tslib";
|
|
2
2
|
import './FileField.css';
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useRef } from 'react';
|
|
4
|
+
import { useForkRef } from '../../hooks/useForkRef/useForkRef';
|
|
4
5
|
import { cnMixVisuallyHidden } from '../../mixs/MixVisuallyHidden/MixVisuallyHidden';
|
|
5
6
|
import { cn } from '../../utils/bem';
|
|
7
|
+
import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
|
|
8
|
+
export var COMPONENT_NAME = 'FileField';
|
|
6
9
|
function isRenderFn(fn) {
|
|
7
10
|
return fn.call !== undefined;
|
|
8
11
|
}
|
|
9
12
|
export var cnFileField = cn('FileField');
|
|
10
13
|
export var FileField = function (props) {
|
|
11
|
-
var
|
|
14
|
+
var fileFieldRef = useRef(null);
|
|
15
|
+
var _a = usePropsHandler(COMPONENT_NAME, props, fileFieldRef), className = _a.className, children = _a.children, id = _a.id, inputRef = _a.inputRef, _b = _a["aria-label"], ariaLabel = _b === void 0 ? 'File input' : _b, inputProps = __rest(_a, ["className", "children", "id", "inputRef", 'aria-label']);
|
|
12
16
|
var content = isRenderFn(children) ? children({ role: 'button', as: 'span' }) : children;
|
|
13
17
|
return (React.createElement("label", { htmlFor: id, className: cnFileField(null, [className]) },
|
|
14
|
-
React.createElement("input", __assign({}, inputProps, { className: cnFileField('Input', [cnMixVisuallyHidden()]), id: id, type: "file", "aria-label": ariaLabel, ref: inputRef })),
|
|
18
|
+
React.createElement("input", __assign({}, inputProps, { className: cnFileField('Input', [cnMixVisuallyHidden()]), id: id, type: "file", "aria-label": ariaLabel, ref: useForkRef([inputRef, fileFieldRef]) })),
|
|
15
19
|
content));
|
|
16
20
|
};
|
|
@@ -41,5 +41,6 @@ declare type Props = {
|
|
|
41
41
|
position?: PaginationPropPosition;
|
|
42
42
|
});
|
|
43
43
|
declare type Pagination = (props: PropsWithHTMLAttributesAndRef<Props, HTMLDivElement>) => React.ReactElement | null;
|
|
44
|
+
export declare const COMPONENT_NAME: "Pagination";
|
|
44
45
|
export declare const Pagination: Pagination;
|
|
45
46
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { __assign, __read, __rest, __spread } from "tslib";
|
|
2
2
|
import './Pagination.css';
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useRef } from 'react';
|
|
4
4
|
import { IconBackward } from '../../icons/IconBackward/IconBackward';
|
|
5
5
|
import { IconForward } from '../../icons/IconForward/IconForward';
|
|
6
6
|
import { cn } from '../../utils/bem';
|
|
7
7
|
import { Button } from '../Button/Button';
|
|
8
|
+
import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
|
|
8
9
|
import { Text } from '../Text/Text';
|
|
9
10
|
import { TextField } from '../TextField/TextField';
|
|
10
11
|
import { getPaginationInfo } from './helpers';
|
|
@@ -18,8 +19,10 @@ export var paginationPositions = ['left', 'center', 'right'];
|
|
|
18
19
|
export var paginationDefaultPosition = 'center';
|
|
19
20
|
var getDefaultLabel = function (totalPages) { return "\u0438\u0437 " + totalPages; };
|
|
20
21
|
export var cnPagination = cn('Pagination');
|
|
22
|
+
export var COMPONENT_NAME = 'Pagination';
|
|
21
23
|
export var Pagination = React.forwardRef(function (props, ref) {
|
|
22
|
-
var
|
|
24
|
+
var paginationRef = useRef(null);
|
|
25
|
+
var _a = usePropsHandler(COMPONENT_NAME, props, paginationRef), _b = _a.currentPage, currentPage = _b === void 0 ? 0 : _b, _c = _a.totalPages, totalPages = _c === void 0 ? 0 : _c, onChange = _a.onChange, _d = _a.getLabel, getLabel = _d === void 0 ? getDefaultLabel(totalPages) : _d, _e = _a.form, form = _e === void 0 ? paginationDefaultForm : _e, _f = _a.size, size = _f === void 0 ? paginationDefaultSize : _f, _g = _a.type, type = _g === void 0 ? paginationDefaultType : _g, _h = _a.position, position = _h === void 0 ? paginationDefaultPosition : _h, _j = _a.minified, minified = _j === void 0 ? false : _j, _k = _a.hotkeys, hotkeys = _k === void 0 ? {
|
|
23
26
|
nextPage: {
|
|
24
27
|
label: 'Alt →',
|
|
25
28
|
values: ['Alt', 'ArrowRight']
|
|
@@ -28,12 +31,12 @@ export var Pagination = React.forwardRef(function (props, ref) {
|
|
|
28
31
|
label: '← Alt',
|
|
29
32
|
values: ['Alt', 'ArrowLeft']
|
|
30
33
|
}
|
|
31
|
-
} :
|
|
34
|
+
} : _k, _l = _a.containerEventListener, containerEventListener = _l === void 0 ? window : _l, className = _a.className, otherProps = __rest(_a, ["currentPage", "totalPages", "onChange", "getLabel", "form", "size", "type", "position", "minified", "hotkeys", "containerEventListener", "className"]);
|
|
32
35
|
if (!totalPages)
|
|
33
36
|
return null;
|
|
34
37
|
var currPage = currentPage + 1;
|
|
35
|
-
var
|
|
36
|
-
var
|
|
38
|
+
var _m = getPaginationInfo(currPage, totalPages), prevPage = _m.prevPage, nextPage = _m.nextPage, isStartDots = _m.isStartDots, isEndDots = _m.isEndDots, pages = _m.pages, isEmpty = _m.isEmpty;
|
|
39
|
+
var _o = __read(React.useState([]), 2), keys = _o[0], setKeys = _o[1];
|
|
37
40
|
var changePage = function (page) {
|
|
38
41
|
if (page && page !== currPage && onChange) {
|
|
39
42
|
onChange(page - 1);
|
|
@@ -8,14 +8,16 @@ import { useScrollElements } from '../../hooks/useScrollElements/useScrollElemen
|
|
|
8
8
|
import { IconArrowLeft } from '../../icons/IconArrowLeft/IconArrowLeft';
|
|
9
9
|
import { IconArrowRight } from '../../icons/IconArrowRight/IconArrowRight';
|
|
10
10
|
import { Button } from '../Button/Button';
|
|
11
|
+
import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
|
|
11
12
|
import { ProgressStepBarItem } from './ProgressStepBarItem/ProgressStepBarItem';
|
|
12
13
|
import { ProgressStepBarLine } from './ProgressStepBarLine/ProgressStepBarLine';
|
|
13
14
|
import { cnProgressStepBar, getItemPosition, getLineSize, propDirectionDefault, propSizeDefault, withDefaultGetters, } from './helpers';
|
|
15
|
+
export var COMPONENT_NAME = 'ProgressStepBar';
|
|
14
16
|
function ProgressStepBarRender(props, ref) {
|
|
15
|
-
var
|
|
17
|
+
var containerRef = useRef(null);
|
|
18
|
+
var _a = usePropsHandler(COMPONENT_NAME, withDefaultGetters(props), containerRef), _b = _a.steps, steps = _b === void 0 ? [] : _b, _c = _a.direction, direction = _c === void 0 ? propDirectionDefault : _c, _d = _a.size, size = _d === void 0 ? propSizeDefault : _d, className = _a.className, activeStepIndex = _a.activeStepIndex, onItemClick = _a.onItemClick, getItemContent = _a.getItemContent, getItemLabel = _a.getItemLabel, getItemPoint = _a.getItemPoint, getItemProgress = _a.getItemProgress, getItemStatus = _a.getItemStatus, getItemTooltipContent = _a.getItemTooltipContent, getItemLineStatus = _a.getItemLineStatus, getItemOnClick = _a.getItemOnClick, style = _a.style, otherProps = __rest(_a, ["steps", "direction", "size", "className", "activeStepIndex", "onItemClick", "getItemContent", "getItemLabel", "getItemPoint", "getItemProgress", "getItemStatus", "getItemTooltipContent", "getItemLineStatus", "getItemOnClick", "style"]);
|
|
16
19
|
var _e = __read(useState([]), 2), lines = _e[0], setLines = _e[1];
|
|
17
20
|
var _f = __read(useState(activeStepIndex || 0), 2), visibleIndex = _f[0], setVisibleIndex = _f[1];
|
|
18
|
-
var containerRef = useRef(null);
|
|
19
21
|
var listRef = useRef(null);
|
|
20
22
|
var _g = useComponentSize(containerRef), width = _g.width, height = _g.height;
|
|
21
23
|
var _h = useScrollElements(steps), refs = _h.refs, scrollTo = _h.scrollTo;
|
package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarItem/ProgressStepBarItem.js
CHANGED
|
@@ -33,7 +33,7 @@ var renderPointContent = function (point, size, progress) {
|
|
|
33
33
|
return React.createElement(Icon, { size: "xs" });
|
|
34
34
|
};
|
|
35
35
|
export var ProgressStepBarItem = React.forwardRef(function (props, ref) {
|
|
36
|
-
var content = props.content, tooltipContent = props.tooltipContent, label = props.label, point = props.point, status = props.status, progress = props.progress, direction = props.direction, size = props.size, pointRef = props.pointRef, onClick = props.onClick, _a = props.position, position = _a === void 0 ? propPositionDefault : _a, otherProps = __rest(props, ["content", "tooltipContent", "label", "point", "status", "progress", "direction", "size", "pointRef", "onClick", "position"]);
|
|
36
|
+
var content = props.content, tooltipContent = props.tooltipContent, label = props.label, point = props.point, status = props.status, progress = props.progress, direction = props.direction, size = props.size, pointRef = props.pointRef, onClick = props.onClick, _a = props.position, position = _a === void 0 ? propPositionDefault : _a, tooltipZIndex = props.tooltipZIndex, otherProps = __rest(props, ["content", "tooltipContent", "label", "point", "status", "progress", "direction", "size", "pointRef", "onClick", "position", "tooltipZIndex"]);
|
|
37
37
|
var _b = __read(useFlag(), 2), isTooltipVisible = _b[0], _c = _b[1], setTooltipVisible = _c.on, setTooltipUnVisible = _c.off;
|
|
38
38
|
var anchorRef = useRef(null);
|
|
39
39
|
var pointProps = {
|
|
@@ -62,5 +62,5 @@ export var ProgressStepBarItem = React.forwardRef(function (props, ref) {
|
|
|
62
62
|
(label || content) && (React.createElement("div", { className: cnProgressStepBarItem('Content', { bottomOffset: !!content }) },
|
|
63
63
|
label && (React.createElement(Text, { className: cnProgressStepBarItem('Label'), ref: anchorRef, size: size, onMouseEnter: setTooltipVisible, onMouseLeave: setTooltipUnVisible, lineHeight: size === 's' ? 'xs' : size, view: "primary" }, label)),
|
|
64
64
|
content))),
|
|
65
|
-
tooltipContent && isTooltipVisible && (React.createElement(Tooltip, { anchorRef: label || content ? anchorRef : pointRef, className: cnProgressStepBarItem('Tooltip'), direction: direction === 'horizontal' ? 'downCenter' : 'leftUp', possibleDirections: direction === 'horizontal' ? possibleHorizontalDirections : possibleVerticalDirections }, tooltipContent))));
|
|
65
|
+
tooltipContent && isTooltipVisible && (React.createElement(Tooltip, { anchorRef: label || content ? anchorRef : pointRef, className: cnProgressStepBarItem('Tooltip'), direction: direction === 'horizontal' ? 'downCenter' : 'leftUp', style: { zIndex: tooltipZIndex }, possibleDirections: direction === 'horizontal' ? possibleHorizontalDirections : possibleVerticalDirections }, tooltipContent))));
|
|
66
66
|
});
|
|
@@ -33,7 +33,10 @@ export declare type Props = {
|
|
|
33
33
|
tabIndex?: number;
|
|
34
34
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
35
35
|
children?: never;
|
|
36
|
+
for?: string;
|
|
37
|
+
inputId?: string;
|
|
36
38
|
};
|
|
37
39
|
export declare type RadioProps = PropsWithHTMLAttributes<Props, HTMLLabelElement>;
|
|
38
40
|
export declare const cnRadio: import("@bem-react/classname").ClassNameFormatter;
|
|
41
|
+
export declare const COMPONENT_NAME: "Radio";
|
|
39
42
|
export declare const Radio: React.ForwardRefExoticComponent<Props & Pick<React.HTMLAttributes<HTMLLabelElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { __assign, __rest } from "tslib";
|
|
2
2
|
import './Radio.css';
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useRef } from 'react';
|
|
4
|
+
import { useForkRef } from '../../hooks/useForkRef/useForkRef';
|
|
4
5
|
import { cnMixFocus } from '../../mixs/MixFocus/MixFocus';
|
|
5
6
|
import { cn } from '../../utils/bem';
|
|
7
|
+
import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
|
|
6
8
|
export var radioPropSize = ['m', 'l'];
|
|
7
9
|
export var radioPropSizeDefault = radioPropSize[0];
|
|
8
10
|
export var radioPropView = ['primary', 'ghost'];
|
|
@@ -10,14 +12,16 @@ export var radioPropViewDefault = radioPropView[0];
|
|
|
10
12
|
export var radioPropAlign = ['center', 'top'];
|
|
11
13
|
export var radioPropAlignDefault = radioPropAlign[0];
|
|
12
14
|
export var cnRadio = cn('Radio');
|
|
15
|
+
export var COMPONENT_NAME = 'Radio';
|
|
13
16
|
export var Radio = React.forwardRef(function (props, ref) {
|
|
14
|
-
var
|
|
17
|
+
var radioRef = useRef(null);
|
|
18
|
+
var _a = usePropsHandler(COMPONENT_NAME, props, radioRef), _b = _a.checked, checked = _b === void 0 ? false : _b, name = _a.name, _c = _a.size, size = _c === void 0 ? radioPropSizeDefault : _c, _d = _a.view, view = _d === void 0 ? radioPropViewDefault : _d, _e = _a.align, align = _e === void 0 ? radioPropAlignDefault : _e, disabled = _a.disabled, className = _a.className, label = _a.label, onChange = _a.onChange, onFocus = _a.onFocus, onBlur = _a.onBlur, readOnly = _a.readOnly, required = _a.required, step = _a.step, tabIndex = _a.tabIndex, inputId = _a.inputId, inputRef = _a.inputRef, otherProps = __rest(_a, ["checked", "name", "size", "view", "align", "disabled", "className", "label", "onChange", "onFocus", "onBlur", "readOnly", "required", "step", "tabIndex", "inputId", "inputRef"]);
|
|
15
19
|
var handleChange = function (e) {
|
|
16
20
|
if (onChange) {
|
|
17
21
|
onChange({ e: e, checked: !checked });
|
|
18
22
|
}
|
|
19
23
|
};
|
|
20
|
-
return (React.createElement("label", __assign({}, otherProps, { className: cnRadio({ size: size, view: view, disabled: disabled, align: align }, [className]), ref: ref }),
|
|
21
|
-
React.createElement("input", { type: "radio", name: name, className: cnRadio('Input', [cnMixFocus()]), checked: checked, disabled: disabled, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, readOnly: readOnly, required: required, step: step, tabIndex: tabIndex, ref: inputRef }),
|
|
24
|
+
return (React.createElement("label", __assign({}, otherProps, { className: cnRadio({ size: size, view: view, disabled: disabled, align: align }, [className]), ref: useForkRef([ref, radioRef]) }),
|
|
25
|
+
React.createElement("input", { type: "radio", name: name, className: cnRadio('Input', [cnMixFocus()]), checked: checked, disabled: disabled, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, readOnly: readOnly, required: required, step: step, id: inputId, tabIndex: tabIndex, ref: inputRef }),
|
|
22
26
|
label && React.createElement("span", { className: cnRadio('Label') }, label)));
|
|
23
27
|
});
|
|
@@ -15,7 +15,7 @@ import { withDefaultGetters, } from './helpers';
|
|
|
15
15
|
function SelectRender(props, ref) {
|
|
16
16
|
var defaultDropdownRef = useRef(null);
|
|
17
17
|
var controlRef = useRef(null);
|
|
18
|
-
var _a = usePropsHandler(COMPONENT_NAME, withDefaultGetters(props), controlRef), placeholder = _a.placeholder, onBlur = _a.onBlur, onFocus = _a.onFocus, items = _a.items, onChange = _a.onChange, value = _a.value, required = _a.required, disabled = _a.disabled, ariaLabel = _a.ariaLabel, id = _a.id, _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, getItemLabel = _a.getItemLabel, _g = _a.labelForEmptyItems, labelForEmptyItems = _g === void 0 ? defaultLabelForEmptyItems : _g, getItemKey = _a.getItemKey, getItemGroupKey = _a.getItemGroupKey, getItemDisabled = _a.getItemDisabled, getGroupKey = _a.getGroupKey, getGroupLabel = _a.getGroupLabel, renderItem = _a.renderItem, renderValueProp = _a.renderValue, inputRefProp = _a.inputRef, style = _a.style, restProps = __rest(_a, ["placeholder", "onBlur", "onFocus", "items", "onChange", "value", "required", "disabled", "ariaLabel", "id", "dropdownRef", "form", "view", "size", "dropdownClassName", "name", "groups", "getItemLabel", "labelForEmptyItems", "getItemKey", "getItemGroupKey", "getItemDisabled", "getGroupKey", "getGroupLabel", "renderItem", "renderValue", "inputRef", "style"]);
|
|
18
|
+
var _a = usePropsHandler(COMPONENT_NAME, withDefaultGetters(props), controlRef), placeholder = _a.placeholder, onBlur = _a.onBlur, onFocus = _a.onFocus, items = _a.items, onChange = _a.onChange, value = _a.value, required = _a.required, disabled = _a.disabled, ariaLabel = _a.ariaLabel, id = _a.id, _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, getItemLabel = _a.getItemLabel, _g = _a.labelForEmptyItems, labelForEmptyItems = _g === void 0 ? defaultLabelForEmptyItems : _g, getItemKey = _a.getItemKey, getItemGroupKey = _a.getItemGroupKey, getItemDisabled = _a.getItemDisabled, getGroupKey = _a.getGroupKey, getGroupLabel = _a.getGroupLabel, renderItem = _a.renderItem, isLoading = _a.isLoading, renderValueProp = _a.renderValue, inputRefProp = _a.inputRef, style = _a.style, restProps = __rest(_a, ["placeholder", "onBlur", "onFocus", "items", "onChange", "value", "required", "disabled", "ariaLabel", "id", "dropdownRef", "form", "view", "size", "dropdownClassName", "name", "groups", "getItemLabel", "labelForEmptyItems", "getItemKey", "getItemGroupKey", "getItemDisabled", "getGroupKey", "getGroupLabel", "renderItem", "isLoading", "renderValue", "inputRef", "style"]);
|
|
19
19
|
var _h = useSelect({
|
|
20
20
|
items: items,
|
|
21
21
|
groups: groups,
|
|
@@ -53,7 +53,7 @@ function SelectRender(props, ref) {
|
|
|
53
53
|
React.createElement("span", { className: cnSelect('Indicators') },
|
|
54
54
|
React.createElement("button", { type: "button", className: cnSelect('IndicatorsDropdown'), tabIndex: -1, onClick: handleToggleDropdown },
|
|
55
55
|
React.createElement(IconSelect, { size: "xs", className: cnSelect('DropdownIndicatorIcon') })))),
|
|
56
|
-
React.createElement(SelectDropdown, { isOpen: isOpen, size: size, controlRef: controlRef, getOptionProps: getOptionProps, dropdownRef: dropdownRef, form: dropdownForm, className: dropdownClassName, renderItem: renderItem || renderItemDefault, getGroupLabel: getGroupLabel, visibleItems: visibleItems, notFound: notFound, labelForEmptyItems: labelForEmptyItems, hasItems: hasItems, style: typeof (style === null || style === void 0 ? void 0 : style.zIndex) === 'number' ? { zIndex: style.zIndex + 1 } : undefined })));
|
|
56
|
+
React.createElement(SelectDropdown, { isOpen: isOpen, size: size, controlRef: controlRef, getOptionProps: getOptionProps, dropdownRef: dropdownRef, form: dropdownForm, className: dropdownClassName, renderItem: renderItem || renderItemDefault, getGroupLabel: getGroupLabel, visibleItems: visibleItems, notFound: notFound, isLoading: isLoading, labelForEmptyItems: labelForEmptyItems, hasItems: hasItems, style: typeof (style === null || style === void 0 ? void 0 : style.zIndex) === 'number' ? { zIndex: style.zIndex + 1 } : undefined })));
|
|
57
57
|
}
|
|
58
58
|
export var Select = forwardRef(SelectRender);
|
|
59
59
|
export * from './helpers';
|
|
@@ -42,6 +42,7 @@ export declare type SelectProps<ITEM = DefaultItem, GROUP = DefaultGroup> = Prop
|
|
|
42
42
|
dropdownRef?: React.RefObject<HTMLDivElement>;
|
|
43
43
|
required?: boolean;
|
|
44
44
|
name?: string;
|
|
45
|
+
isLoading?: boolean;
|
|
45
46
|
labelForEmptyItems?: string;
|
|
46
47
|
value?: PropValue<ITEM>;
|
|
47
48
|
renderItem?: PropRenderItem<ITEM>;
|
|
@@ -102,6 +103,7 @@ export declare function withDefaultGetters<ITEM, GROUP>(props: SelectProps<ITEM,
|
|
|
102
103
|
dropdownRef?: React.RefObject<HTMLDivElement> | undefined;
|
|
103
104
|
required?: boolean | undefined;
|
|
104
105
|
name?: string | undefined;
|
|
106
|
+
isLoading?: boolean | undefined;
|
|
105
107
|
labelForEmptyItems?: string | undefined;
|
|
106
108
|
value?: PropValue<ITEM>;
|
|
107
109
|
renderItem?: PropRenderItem<ITEM> | undefined;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
.SelectDropdown {
|
|
2
|
-
--transition-spase: var(--space-2xs);
|
|
3
|
-
z-index: 9999;
|
|
4
2
|
overflow: hidden;
|
|
5
3
|
-webkit-box-sizing: border-box;
|
|
6
4
|
box-sizing: border-box;
|
|
7
|
-
width: 100%;
|
|
8
5
|
min-width: 220px;
|
|
9
6
|
margin: -1px 0 -1px;
|
|
10
7
|
background: var(--color-bg-default);
|
|
11
8
|
border: var(--control-border-width) solid var(--color-control-bg-border-default);
|
|
12
9
|
outline: none;
|
|
13
|
-
opacity: 0;
|
|
14
10
|
-webkit-box-shadow: var(--shadow-layer);
|
|
15
11
|
box-shadow: var(--shadow-layer);
|
|
16
12
|
font-size: var(--font-size);
|
|
17
|
-
-webkit-transform: translateY(var(--transition-spase));
|
|
18
|
-
transform: translateY(var(--transition-spase));
|
|
19
13
|
}
|
|
20
14
|
|
|
21
15
|
.SelectDropdown_size_xs {
|
|
@@ -58,52 +52,6 @@
|
|
|
58
52
|
border-radius: calc(var(--input-height) * 0.5);
|
|
59
53
|
}
|
|
60
54
|
|
|
61
|
-
.SelectDropdown_animate_appear,
|
|
62
|
-
.SelectDropdown_animate_appearActive,
|
|
63
|
-
.SelectDropdown_animate_appearDone,
|
|
64
|
-
.SelectDropdown_animate_enter,
|
|
65
|
-
.SelectDropdown_animate_enterActive,
|
|
66
|
-
.SelectDropdown_animate_enterDone,
|
|
67
|
-
.SelectDropdown_animate_exit,
|
|
68
|
-
.SelectDropdown_animate_exitActive,
|
|
69
|
-
.SelectDropdown_animate_exitDone {
|
|
70
|
-
-webkit-transition: 0.2s ease;
|
|
71
|
-
transition: 0.2s ease;
|
|
72
|
-
-webkit-transition-property: opacity, -webkit-transform;
|
|
73
|
-
transition-property: opacity, -webkit-transform;
|
|
74
|
-
transition-property: opacity, transform;
|
|
75
|
-
transition-property: opacity, transform, -webkit-transform;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.SelectDropdown_animate_appear,
|
|
79
|
-
.SelectDropdown_animate_enter {
|
|
80
|
-
opacity: 0;
|
|
81
|
-
-webkit-transform: translateY(var(--transition-spase));
|
|
82
|
-
transform: translateY(var(--transition-spase));
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.SelectDropdown_animate_enterActive,
|
|
86
|
-
.SelectDropdown_animate_appearActive,
|
|
87
|
-
.SelectDropdown_animate_appearDone,
|
|
88
|
-
.SelectDropdown_animate_enterDone {
|
|
89
|
-
opacity: 1;
|
|
90
|
-
-webkit-transform: translateY(0);
|
|
91
|
-
transform: translateY(0);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.SelectDropdown_animate_exit {
|
|
95
|
-
opacity: 1;
|
|
96
|
-
-webkit-transform: translateY(0);
|
|
97
|
-
transform: translateY(0);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.SelectDropdown_animate_exitActive,
|
|
101
|
-
.SelectDropdown_animate_exitDone {
|
|
102
|
-
opacity: 0;
|
|
103
|
-
-webkit-transform: translateY(var(--transition-spase));
|
|
104
|
-
transform: translateY(var(--transition-spase));
|
|
105
|
-
}
|
|
106
|
-
|
|
107
55
|
.SelectDropdown-LabelForNotFound,
|
|
108
56
|
.SelectDropdown-LabelForEmptyItems {
|
|
109
57
|
padding: 0 var(--space-xs);
|
|
@@ -13,6 +13,7 @@ declare type Props<ITEM, GROUP> = PropsWithJsxAttributes<{
|
|
|
13
13
|
getOptionProps(props: OptionProps<ITEM>): GetOptionPropsResult;
|
|
14
14
|
form: SelectDropdownPropForm;
|
|
15
15
|
isOpen: boolean;
|
|
16
|
+
isLoading?: boolean;
|
|
16
17
|
renderItem: (props: RenderItemProps<ITEM>) => JSX.Element | null;
|
|
17
18
|
visibleItems: (OptionForCreate | {
|
|
18
19
|
items: ITEM[];
|
|
@@ -1,37 +1,46 @@
|
|
|
1
|
-
import { __assign, __rest } from "tslib";
|
|
1
|
+
import { __assign, __read, __rest } from "tslib";
|
|
2
2
|
import './SelectDropdown.css';
|
|
3
|
-
import React, { Fragment, useRef } from 'react';
|
|
4
|
-
import {
|
|
3
|
+
import React, { Fragment, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { Transition } from 'react-transition-group';
|
|
5
5
|
import { isOptionForCreate, } from '../../../hooks/useSelect/useSelect';
|
|
6
|
+
import { animateTimeout, cnMixPopoverAnimate, } from '../../../mixs/MixPopoverAnimate/MixPopoverAnimate';
|
|
6
7
|
import { cn } from '../../../utils/bem';
|
|
7
|
-
import { cnForCssTransition } from '../../../utils/cnForCssTransition';
|
|
8
8
|
import { fabricIndex } from '../../../utils/fabricIndex';
|
|
9
9
|
import { Popover } from '../../Popover/Popover';
|
|
10
10
|
import { Text } from '../../Text/Text';
|
|
11
11
|
import { SelectCreateButton } from '../SelectCreateButton/SelectCreateButton';
|
|
12
12
|
import { SelectGroupLabel } from '../SelectGroupLabel/SelectGroupLabel';
|
|
13
|
+
import { SelectLoader } from '../SelectLoader/SelectLoader';
|
|
13
14
|
export var selectDropdownform = ['default', 'brick', 'round'];
|
|
14
15
|
export var defaultSelectDropdownPropForm = selectDropdownform[0];
|
|
15
16
|
var cnSelectDropdown = cn('SelectDropdown');
|
|
16
|
-
var cnSelectDropdownCssTransition = cnForCssTransition(cnSelectDropdown);
|
|
17
17
|
export var SelectDropdown = function (props) {
|
|
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, getGroupLabel = props.getGroupLabel, notFound = props.notFound, otherProps = __rest(props, ["controlRef", "size", "getOptionProps", "dropdownRef", "labelForCreate", "className", "labelForNotFound", "labelForEmptyItems", "hasItems", "form", "isOpen", "renderItem", "visibleItems", "getGroupLabel", "notFound"]);
|
|
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
19
|
var getIndex = fabricIndex(-1);
|
|
20
|
+
var _b = __read(useState('downStartLeft'), 2), direction = _b[0], setDirection = _b[1];
|
|
20
21
|
var indent = form === 'round' ? 'increased' : 'normal';
|
|
21
22
|
var popoverRef = useRef(null);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
var isListShowed = useMemo(function () {
|
|
24
|
+
return (visibleItems.filter(function (group) {
|
|
25
|
+
return isOptionForCreate(group) || (Array.isArray(group.items) && group.items.length > 0);
|
|
26
|
+
}).length > 0);
|
|
27
|
+
}, [visibleItems]);
|
|
28
|
+
return (React.createElement(Transition, { "in": isOpen, unmountOnExit: true, nodeRef: popoverRef, timeout: animateTimeout }, function (animate) { return (React.createElement(Popover, __assign({}, otherProps, { anchorRef: controlRef, direction: "downStartLeft", possibleDirections: ['downStartLeft', 'upStartLeft', 'downStartRight', 'upStartRight'], offset: "2xs", ref: popoverRef, role: "listbox", onSetDirection: setDirection, className: cnSelectDropdown({ form: form, size: size }, [
|
|
29
|
+
className,
|
|
30
|
+
cnMixPopoverAnimate({ direction: direction, animate: animate }),
|
|
31
|
+
]), equalAnchorWidth: true }),
|
|
32
|
+
React.createElement("div", { className: cnSelectDropdown('List', { size: size, form: form }), ref: dropdownRef },
|
|
33
|
+
isLoading && React.createElement(SelectLoader, { mode: isListShowed ? 'blur' : 'empty' }),
|
|
34
|
+
visibleItems.map(function (group) {
|
|
35
|
+
if (isOptionForCreate(group)) {
|
|
36
|
+
return (React.createElement(SelectCreateButton, __assign({ size: size, labelForCreate: labelForCreate, inputValue: group.label, indent: indent }, getOptionProps({ index: getIndex(), item: group }))));
|
|
37
|
+
}
|
|
38
|
+
return (React.createElement(Fragment, { key: group.key },
|
|
39
|
+
group.group && getGroupLabel && (React.createElement(SelectGroupLabel, { label: getGroupLabel(group.group), size: size, indent: indent })),
|
|
40
|
+
group.items.map(function (item, i) {
|
|
41
|
+
return (React.createElement(Fragment, { key: group.key + "-" + i }, renderItem(__assign({ item: item }, getOptionProps({ index: getIndex(), item: item })))));
|
|
42
|
+
})));
|
|
43
|
+
}),
|
|
44
|
+
!isLoading && notFound && labelForNotFound && (React.createElement(Text, { className: cnSelectDropdown('LabelForNotFound') }, labelForNotFound)),
|
|
45
|
+
!isLoading && !hasItems && labelForEmptyItems && (React.createElement(Text, { className: cnSelectDropdown('LabelForEmptyItems') }, labelForEmptyItems))))); }));
|
|
37
46
|
};
|