@consta/uikit 3.24.0 → 3.24.2
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 +20 -16
- 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/ContextMenuCanary/ContextMenu.css +4 -1
- package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuCanary.js +6 -2
- package/__internal__/cjs-src/components/DateTimeCanary/DateTimeItem/DateTimeItem.d.ts +1 -1
- package/__internal__/cjs-src/components/DragNDropField/DragNDropField.d.ts +2 -10
- package/__internal__/cjs-src/components/DragNDropField/DragNDropField.js +8 -3
- package/__internal__/cjs-src/components/DragNDropField/DragNDropFieldContent/DragNDropFieldContent.js +5 -6
- package/__internal__/cjs-src/components/DragNDropField/DragNDropFieldContent/formatFileRequirements.d.ts +2 -1
- package/__internal__/cjs-src/components/DragNDropField/DragNDropFieldContent/formatFileRequirements.js +8 -3
- package/__internal__/cjs-src/components/DragNDropField/formatFileSize.d.ts +2 -1
- package/__internal__/cjs-src/components/DragNDropField/formatFileSize.js +16 -13
- package/__internal__/cjs-src/components/DragNDropField/getErrorsList.d.ts +2 -1
- package/__internal__/cjs-src/components/DragNDropField/getErrorsList.js +26 -21
- package/__internal__/cjs-src/components/DragNDropField/locale.d.ts +30 -0
- package/__internal__/cjs-src/components/DragNDropField/locale.js +35 -0
- package/__internal__/cjs-src/components/DragNDropField/types.d.ts +28 -0
- package/__internal__/cjs-src/components/DragNDropField/types.js +2 -0
- package/__internal__/cjs-src/components/Popover/Popover.js +17 -17
- package/__internal__/cjs-src/components/Popover/usePopoverReposition.d.ts +1 -2
- package/__internal__/cjs-src/components/Popover/usePopoverReposition.js +17 -17
- package/__internal__/cjs-src/components/SelectComponents/SelectCreateButton/SelectCreateButton.d.ts +1 -0
- package/__internal__/cjs-src/components/SelectComponents/SelectCreateButton/SelectCreateButton.js +3 -3
- package/__internal__/cjs-src/components/SelectComponents/SelectLoader/SelectLoader.d.ts +1 -0
- package/__internal__/cjs-src/components/SelectComponents/SelectLoader/SelectLoader.js +4 -4
- package/__internal__/cjs-src/components/Table/RowsCollapse/TableRowsCollapse.js +1 -1
- package/__internal__/cjs-src/components/Table/Table.js +3 -3
- package/__internal__/src/components/ContextMenuCanary/ContextMenu.css +4 -1
- package/__internal__/src/components/ContextMenuCanary/ContextMenuCanary.js +6 -2
- package/__internal__/src/components/DateTimeCanary/DateTimeItem/DateTimeItem.d.ts +1 -1
- package/__internal__/src/components/DragNDropField/DragNDropField.d.ts +2 -10
- package/__internal__/src/components/DragNDropField/DragNDropField.js +8 -3
- package/__internal__/src/components/DragNDropField/DragNDropFieldContent/DragNDropFieldContent.js +5 -6
- package/__internal__/src/components/DragNDropField/DragNDropFieldContent/formatFileRequirements.d.ts +2 -1
- package/__internal__/src/components/DragNDropField/DragNDropFieldContent/formatFileRequirements.js +8 -3
- package/__internal__/src/components/DragNDropField/formatFileSize.d.ts +2 -1
- package/__internal__/src/components/DragNDropField/formatFileSize.js +16 -13
- package/__internal__/src/components/DragNDropField/getErrorsList.d.ts +2 -1
- package/__internal__/src/components/DragNDropField/getErrorsList.js +27 -22
- package/__internal__/src/components/DragNDropField/locale.d.ts +30 -0
- package/__internal__/src/components/DragNDropField/locale.js +32 -0
- package/__internal__/src/components/DragNDropField/types.d.ts +28 -0
- package/__internal__/src/components/DragNDropField/types.js +0 -0
- package/__internal__/src/components/Popover/Popover.js +18 -18
- package/__internal__/src/components/Popover/usePopoverReposition.d.ts +1 -2
- package/__internal__/src/components/Popover/usePopoverReposition.js +17 -16
- package/__internal__/src/components/SelectComponents/SelectCreateButton/SelectCreateButton.d.ts +1 -0
- package/__internal__/src/components/SelectComponents/SelectCreateButton/SelectCreateButton.js +1 -1
- package/__internal__/src/components/SelectComponents/SelectLoader/SelectLoader.d.ts +1 -0
- package/__internal__/src/components/SelectComponents/SelectLoader/SelectLoader.js +1 -1
- package/__internal__/src/components/Table/RowsCollapse/TableRowsCollapse.js +1 -1
- package/__internal__/src/components/Table/Table.js +4 -4
- package/createIcon/package.json +1 -1
- package/createResponsesImage/package.json +1 -1
- package/package.json +1 -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
|
@@ -19,4 +19,4 @@ export declare const DateTimeItem: React.ForwardRefExoticComponent<Pick<Pick<{
|
|
|
19
19
|
event?: boolean | undefined;
|
|
20
20
|
role?: undefined;
|
|
21
21
|
children?: undefined;
|
|
22
|
-
} & Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "css" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "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" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "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" | "ref" | "key" | "form" | "name" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value">, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "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" | "ref" | "disabled" | "key" | "form" | "label" | "name" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "selected" | "current" | "event">, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "key" | "form" | "label" | "name" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "selected" | "current" | "event"> & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
} & Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "css" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "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" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "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" | "ref" | "key" | "form" | "name" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value">, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "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" | "ref" | "disabled" | "key" | "form" | "label" | "name" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "selected" | "event" | "current">, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "key" | "form" | "label" | "name" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "selected" | "event" | "current"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import './DragNDropField.css';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
accept?: string | string[];
|
|
5
|
-
maxSize?: number;
|
|
6
|
-
multiple?: boolean;
|
|
7
|
-
onDropFiles: (files: File[]) => void;
|
|
8
|
-
children?: React.ReactNode | DragNDropFieldChildrenRenderProp;
|
|
9
|
-
};
|
|
10
|
-
export declare type DragNDropFieldChildrenRenderProp = (props: {
|
|
11
|
-
openFileDialog: () => void;
|
|
12
|
-
} & Pick<DragNDropFieldProps, 'accept' | 'maxSize' | 'multiple'>) => React.ReactNode;
|
|
3
|
+
import { DragNDropFieldProps } from './types';
|
|
13
4
|
export declare const COMPONENT_NAME: "DragNDropField";
|
|
14
5
|
export declare const DragNDropField: React.ForwardRefExoticComponent<DragNDropFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export * from './types';
|
|
@@ -9,11 +9,13 @@ import { Text } from '../Text/Text';
|
|
|
9
9
|
import { DragNDropFieldContent } from './DragNDropFieldContent/DragNDropFieldContent';
|
|
10
10
|
import { DragNDropFieldTooltip } from './DragNDropFieldTooltip/DragNDropFieldTooltip';
|
|
11
11
|
import { getErrorsList } from './getErrorsList';
|
|
12
|
+
import { withdefaultLocale } from './locale';
|
|
12
13
|
var cnDragNDropField = cn('DragNDropField');
|
|
13
14
|
export var COMPONENT_NAME = 'DragNDropField';
|
|
14
15
|
export var DragNDropField = React.forwardRef(function (props, ref) {
|
|
15
16
|
var dragNDropFieldRef = useRef(null);
|
|
16
|
-
var _a = usePropsHandler(COMPONENT_NAME, props, dragNDropFieldRef), accept = _a.accept, maxSize = _a.maxSize, _b = _a.multiple, multiple = _b === void 0 ? false : _b, onDropFiles = _a.onDropFiles, _c = _a.children, children = _c === void 0 ? DragNDropFieldContent : _c;
|
|
17
|
+
var _a = usePropsHandler(COMPONENT_NAME, props, dragNDropFieldRef), accept = _a.accept, maxSize = _a.maxSize, _b = _a.multiple, multiple = _b === void 0 ? false : _b, onDropFiles = _a.onDropFiles, _c = _a.children, children = _c === void 0 ? DragNDropFieldContent : _c, localeProp = _a.locale;
|
|
18
|
+
var locale = withdefaultLocale(localeProp);
|
|
17
19
|
var handleDrop = React.useCallback(function (acceptedFiles) { return acceptedFiles.length > 0 && onDropFiles(acceptedFiles); }, [onDropFiles]);
|
|
18
20
|
var _d = useDropzone({
|
|
19
21
|
accept: (accept === null || accept === void 0 ? void 0 : accept.length) ? accept : undefined,
|
|
@@ -32,9 +34,11 @@ export var DragNDropField = React.forwardRef(function (props, ref) {
|
|
|
32
34
|
onClick: handleRootClick
|
|
33
35
|
});
|
|
34
36
|
var content = isRenderProp(children)
|
|
35
|
-
? children({ accept: accept, maxSize: maxSize, multiple: multiple, openFileDialog: open })
|
|
37
|
+
? children({ accept: accept, maxSize: maxSize, multiple: multiple, openFileDialog: open, locale: locale })
|
|
36
38
|
: children;
|
|
37
|
-
var errors = React.useMemo(function () { return getErrorsList(fileRejections); }, [
|
|
39
|
+
var errors = React.useMemo(function () { return getErrorsList(fileRejections, { maxSize: maxSize }, locale); }, [
|
|
40
|
+
fileRejections,
|
|
41
|
+
]);
|
|
38
42
|
return (React.createElement(React.Fragment, null,
|
|
39
43
|
React.createElement("div", __assign({}, rootProps, { ref: useForkRef([ref, rootRef, dragNDropFieldRef]) }),
|
|
40
44
|
React.createElement("input", __assign({}, getInputProps())),
|
|
@@ -42,3 +46,4 @@ export var DragNDropField = React.forwardRef(function (props, ref) {
|
|
|
42
46
|
React.createElement(DragNDropFieldTooltip, { anchorRef: rootRef, errors: errors })));
|
|
43
47
|
});
|
|
44
48
|
var isRenderProp = function (children) { return typeof children === 'function'; };
|
|
49
|
+
export * from './types';
|
package/__internal__/src/components/DragNDropField/DragNDropFieldContent/DragNDropFieldContent.js
CHANGED
|
@@ -4,19 +4,18 @@ import { IconAttach } from '../../../icons/IconAttach/IconAttach';
|
|
|
4
4
|
import { cn } from '../../../utils/bem';
|
|
5
5
|
import { Button } from '../../Button/Button';
|
|
6
6
|
import { Text } from '../../Text/Text';
|
|
7
|
+
import { getText } from '../locale';
|
|
7
8
|
import { formatFileRequirements } from './formatFileRequirements';
|
|
8
9
|
var cnDragNDropFieldContent = cn('DragNDropFieldContent');
|
|
9
10
|
export var DragNDropFieldContent = function (_a) {
|
|
10
|
-
var accept = _a.accept, maxSize = _a.maxSize, multiple = _a.multiple, openFileDialog = _a.openFileDialog;
|
|
11
|
+
var accept = _a.accept, maxSize = _a.maxSize, multiple = _a.multiple, openFileDialog = _a.openFileDialog, locale = _a.locale;
|
|
11
12
|
var requirements = formatFileRequirements(accept, maxSize);
|
|
12
|
-
var fileText = multiple ?
|
|
13
|
+
var fileText = multiple ? locale.files : locale.file;
|
|
13
14
|
return (React.createElement(React.Fragment, null,
|
|
14
15
|
React.createElement(Text, { view: "secondary", size: "s", lineHeight: "s", align: "center" },
|
|
15
|
-
|
|
16
|
-
fileText,
|
|
17
|
-
" \u0441\u044E\u0434\u0430 \u0438\u043B\u0438\u00A0\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043F\u043E\u00A0\u043A\u043D\u043E\u043F\u043A\u0435",
|
|
16
|
+
getText(locale['call-to-action'], { fileText: fileText }),
|
|
18
17
|
requirements && (React.createElement(React.Fragment, null,
|
|
19
18
|
React.createElement("br", null),
|
|
20
19
|
requirements))),
|
|
21
|
-
React.createElement(Button, { className: cnDragNDropFieldContent('Button'), label:
|
|
20
|
+
React.createElement(Button, { className: cnDragNDropFieldContent('Button'), label: getText(locale['action-button'], { fileText: fileText }), iconLeft: IconAttach, view: "ghost", size: "s", onClick: openFileDialog })));
|
|
22
21
|
};
|
package/__internal__/src/components/DragNDropField/DragNDropFieldContent/formatFileRequirements.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { DragNDropFieldProps } from '../DragNDropField';
|
|
2
|
-
|
|
2
|
+
import { Locale } from '../locale';
|
|
3
|
+
export declare const formatFileRequirements: (accept: DragNDropFieldProps['accept'], maxSize: DragNDropFieldProps['maxSize'], locale?: Required<Locale>) => string | undefined;
|
package/__internal__/src/components/DragNDropField/DragNDropFieldContent/formatFileRequirements.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { isNotNil } from '../../../utils/type-guards';
|
|
2
2
|
import { formatFileSize } from '../formatFileSize';
|
|
3
|
-
|
|
3
|
+
import { defaultLocale } from '../locale';
|
|
4
|
+
export var formatFileRequirements = function (accept, maxSize, locale) {
|
|
5
|
+
if (locale === void 0) { locale = defaultLocale; }
|
|
4
6
|
if (accept === null || accept === void 0 ? void 0 : accept.length) {
|
|
5
7
|
var formattedAccept = Array.isArray(accept) ? accept.join(', ') : accept;
|
|
6
|
-
return [
|
|
8
|
+
return [
|
|
9
|
+
locale['fit-files'] + " " + formattedAccept,
|
|
10
|
+
maxSize ? locale.before + " " + formatFileSize(maxSize, locale) : null,
|
|
11
|
+
]
|
|
7
12
|
.filter(isNotNil)
|
|
8
13
|
.join(', ');
|
|
9
14
|
}
|
|
10
15
|
if (maxSize) {
|
|
11
|
-
return "
|
|
16
|
+
return locale.max + " " + formatFileSize(maxSize, locale);
|
|
12
17
|
}
|
|
13
18
|
return undefined;
|
|
14
19
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { Locale } from './locale';
|
|
2
|
+
export declare const formatFileSize: (sizeInBytes: number, locale: Required<Locale>) => string | undefined;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { __values } from "tslib";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var getUnits = function (locale) {
|
|
3
|
+
return [
|
|
4
|
+
{ value: 1024 * 1024 * 1024, name: locale.gigabyte },
|
|
5
|
+
{ value: 1024 * 1024, name: locale.megabyte },
|
|
6
|
+
{ value: 1024, name: locale.kilobyte },
|
|
7
|
+
{ value: 1, name: locale.byte },
|
|
8
|
+
];
|
|
9
|
+
};
|
|
10
|
+
var floorToDecimals = function (num, decimals) {
|
|
11
|
+
return Math.floor(Math.pow(10, decimals) * num) / Math.pow(10, decimals);
|
|
12
|
+
};
|
|
13
|
+
export var formatFileSize = function (sizeInBytes, locale) {
|
|
9
14
|
var e_1, _a;
|
|
15
|
+
var units = getUnits(locale);
|
|
10
16
|
try {
|
|
11
|
-
for (var
|
|
12
|
-
var step =
|
|
17
|
+
for (var units_1 = __values(units), units_1_1 = units_1.next(); !units_1_1.done; units_1_1 = units_1.next()) {
|
|
18
|
+
var step = units_1_1.value;
|
|
13
19
|
if (sizeInBytes >= step.value) {
|
|
14
20
|
return floorToDecimals(sizeInBytes / step.value, 1) + " " + step.name;
|
|
15
21
|
}
|
|
@@ -18,12 +24,9 @@ export var formatFileSize = function (sizeInBytes) {
|
|
|
18
24
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
19
25
|
finally {
|
|
20
26
|
try {
|
|
21
|
-
if (
|
|
27
|
+
if (units_1_1 && !units_1_1.done && (_a = units_1["return"])) _a.call(units_1);
|
|
22
28
|
}
|
|
23
29
|
finally { if (e_1) throw e_1.error; }
|
|
24
30
|
}
|
|
25
31
|
return undefined;
|
|
26
32
|
};
|
|
27
|
-
var floorToDecimals = function (num, decimals) {
|
|
28
|
-
return Math.floor(Math.pow(10, decimals) * num) / Math.pow(10, decimals);
|
|
29
|
-
};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { FileRejection } from 'react-dropzone';
|
|
2
|
-
|
|
2
|
+
import { DragNDropFieldPropLocale, FileSizes } from './types';
|
|
3
|
+
export declare const getErrorsList: (fileRejections: FileRejection[], sizes: FileSizes | undefined, locale: Required<DragNDropFieldPropLocale>) => string[];
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { __values } from "tslib";
|
|
2
|
-
import { isNotNil } from '../../utils/type-guards';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return
|
|
2
|
+
import { isNotNil, isString } from '../../utils/type-guards';
|
|
3
|
+
var defaultFileSizes = {
|
|
4
|
+
maxSize: 1024 * 1024 * 1024,
|
|
5
|
+
minSize: 1
|
|
6
|
+
};
|
|
7
|
+
var NO_MESSAGE = 'no-message';
|
|
8
|
+
var getErrorMessage = function (error, file, sizes, locale) {
|
|
9
|
+
var code = error.code;
|
|
10
|
+
var message = locale[code];
|
|
11
|
+
if (!isNotNil(message)) {
|
|
12
|
+
return file ? file.name + ": " + locale['general-error'] : NO_MESSAGE;
|
|
13
|
+
}
|
|
14
|
+
if (file) {
|
|
15
|
+
return file.name + ": " + (isString(message) ? message : message({ file: file, sizes: sizes }));
|
|
16
16
|
}
|
|
17
|
+
return isString(message) ? message : NO_MESSAGE;
|
|
17
18
|
};
|
|
18
|
-
var
|
|
19
|
-
export var getErrorsList = function (fileRejections) {
|
|
19
|
+
export var getErrorsList = function (fileRejections, sizes, locale) {
|
|
20
20
|
var e_1, _a, e_2, _b;
|
|
21
|
-
|
|
21
|
+
if (sizes === void 0) { sizes = defaultFileSizes; }
|
|
22
22
|
var errorsList = [];
|
|
23
23
|
var tooManyFilesErrorsCount = 0;
|
|
24
24
|
try {
|
|
25
25
|
for (var fileRejections_1 = __values(fileRejections), fileRejections_1_1 = fileRejections_1.next(); !fileRejections_1_1.done; fileRejections_1_1 = fileRejections_1.next()) {
|
|
26
26
|
var rejection = fileRejections_1_1.value;
|
|
27
27
|
try {
|
|
28
|
-
for (var
|
|
29
|
-
var error =
|
|
28
|
+
for (var _c = (e_2 = void 0, __values(rejection.errors)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
29
|
+
var error = _d.value;
|
|
30
30
|
if (error.code === 'too-many-files') {
|
|
31
31
|
tooManyFilesErrorsCount++;
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
errorsList.push(
|
|
34
|
+
errorsList.push(getErrorMessage(error, rejection.file, sizes, locale));
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
39
39
|
finally {
|
|
40
40
|
try {
|
|
41
|
-
if (
|
|
41
|
+
if (_d && !_d.done && (_b = _c["return"])) _b.call(_c);
|
|
42
42
|
}
|
|
43
43
|
finally { if (e_2) throw e_2.error; }
|
|
44
44
|
}
|
|
@@ -52,7 +52,12 @@ export var getErrorsList = function (fileRejections) {
|
|
|
52
52
|
finally { if (e_1) throw e_1.error; }
|
|
53
53
|
}
|
|
54
54
|
if (tooManyFilesErrorsCount) {
|
|
55
|
-
errorsList.unshift(
|
|
55
|
+
errorsList.unshift(getErrorMessage({ code: 'too-many-files', message: '' }, undefined, sizes, locale));
|
|
56
|
+
}
|
|
57
|
+
if (isNotNil(errorsList.find(function (text) { return text === NO_MESSAGE; }))) {
|
|
58
|
+
var list = errorsList.filter(function (text) { return text !== NO_MESSAGE; });
|
|
59
|
+
list.unshift(locale['general-error']);
|
|
60
|
+
return list;
|
|
56
61
|
}
|
|
57
62
|
return errorsList;
|
|
58
63
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FileSizes } from './types';
|
|
2
|
+
declare type LocaleError = string | ((props: {
|
|
3
|
+
file: File;
|
|
4
|
+
sizes: FileSizes;
|
|
5
|
+
}) => string);
|
|
6
|
+
declare type LocaleLabel = string | ((props: {
|
|
7
|
+
fileText: string;
|
|
8
|
+
}) => string);
|
|
9
|
+
export declare type Locale = {
|
|
10
|
+
'file-invalid-type'?: LocaleError;
|
|
11
|
+
'file-too-large'?: LocaleError;
|
|
12
|
+
'file-too-small'?: LocaleError;
|
|
13
|
+
'too-many-files'?: string;
|
|
14
|
+
'general-error'?: string;
|
|
15
|
+
'fit-files'?: string;
|
|
16
|
+
'file'?: string;
|
|
17
|
+
'files'?: string;
|
|
18
|
+
'before'?: string;
|
|
19
|
+
'gigabyte'?: string;
|
|
20
|
+
'megabyte'?: string;
|
|
21
|
+
'kilobyte'?: string;
|
|
22
|
+
'byte'?: string;
|
|
23
|
+
'max'?: string;
|
|
24
|
+
'call-to-action'?: LocaleLabel;
|
|
25
|
+
'action-button'?: LocaleLabel;
|
|
26
|
+
};
|
|
27
|
+
export declare const defaultLocale: Required<Locale>;
|
|
28
|
+
export declare const getText: <PROPS>(textOrFn: string | ((props: PROPS) => string), props: PROPS) => string;
|
|
29
|
+
export declare const withdefaultLocale: (locale?: Locale | undefined) => Required<Locale>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { isDefined, isNotNil, isString } from '../../utils/type-guards';
|
|
3
|
+
import { formatFileSize } from './formatFileSize';
|
|
4
|
+
export var defaultLocale = {
|
|
5
|
+
'file-invalid-type': function (props) {
|
|
6
|
+
return ['формат файла не подходит', props.file.type && "(" + props.file.type + ")"]
|
|
7
|
+
.filter(isNotNil)
|
|
8
|
+
.join(' ');
|
|
9
|
+
},
|
|
10
|
+
'file-too-large': function (props) { var _a; return "\u0444\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439 (\u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C " + formatFileSize((_a = props.sizes.maxSize) !== null && _a !== void 0 ? _a : 0, defaultLocale) + ")"; },
|
|
11
|
+
'file-too-small': function (props) { var _a; return "\u0444\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0438\u0439 (\u043C\u0438\u043D\u0438\u043C\u0443\u043C " + formatFileSize((_a = props.sizes.minSize) !== null && _a !== void 0 ? _a : 0, defaultLocale) + ")"; },
|
|
12
|
+
'too-many-files': 'Вы перетащили несколько файлов. Выберите один, пожалуйста',
|
|
13
|
+
'general-error': 'не получилось добавить файл',
|
|
14
|
+
'fit-files': 'Подходят файлы',
|
|
15
|
+
'file': 'файл',
|
|
16
|
+
'files': 'файлы',
|
|
17
|
+
'before': 'до',
|
|
18
|
+
'max': 'Максимум',
|
|
19
|
+
'gigabyte': 'Гб',
|
|
20
|
+
'megabyte': 'Мб',
|
|
21
|
+
'kilobyte': 'Кб',
|
|
22
|
+
'byte': 'байт',
|
|
23
|
+
'call-to-action': function (props) { return "\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 " + props.fileText + " \u0441\u044E\u0434\u0430 \u0438\u043B\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043F\u043E \u043A\u043D\u043E\u043F\u043A\u0435"; },
|
|
24
|
+
'action-button': function (props) { return "\u0412\u044B\u0431\u0440\u0430\u0442\u044C " + props.fileText; }
|
|
25
|
+
};
|
|
26
|
+
export var getText = function (textOrFn, props) {
|
|
27
|
+
return isString(textOrFn) ? textOrFn : textOrFn(props);
|
|
28
|
+
};
|
|
29
|
+
export var withdefaultLocale = function (locale) {
|
|
30
|
+
return isDefined(locale)
|
|
31
|
+
? __assign(__assign({}, defaultLocale), locale) : defaultLocale;
|
|
32
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Locale } from './locale';
|
|
3
|
+
export declare type DragNDropFieldPropLocale = Locale;
|
|
4
|
+
export declare type FileError = {
|
|
5
|
+
message: string;
|
|
6
|
+
code: 'file-too-large' | 'file-too-small' | 'too-many-files' | 'file-invalid-type';
|
|
7
|
+
};
|
|
8
|
+
export declare type FileRejection = {
|
|
9
|
+
file: File;
|
|
10
|
+
errors: FileError[];
|
|
11
|
+
};
|
|
12
|
+
export declare type DragNDropFieldPropErrorMessages = Partial<Record<FileError['code'], string | ((file: File | undefined, error?: FileError) => string)>>;
|
|
13
|
+
export declare type DragNDropFieldChildrenRenderProp = (props: {
|
|
14
|
+
openFileDialog: () => void;
|
|
15
|
+
locale: Required<DragNDropFieldPropLocale>;
|
|
16
|
+
} & Pick<DragNDropFieldProps, 'accept' | 'maxSize' | 'multiple'>) => React.ReactNode;
|
|
17
|
+
export declare type FileSizes = {
|
|
18
|
+
minSize?: number;
|
|
19
|
+
maxSize?: number;
|
|
20
|
+
};
|
|
21
|
+
export declare type DragNDropFieldProps = {
|
|
22
|
+
accept?: string | string[];
|
|
23
|
+
maxSize?: number;
|
|
24
|
+
multiple?: boolean;
|
|
25
|
+
onDropFiles: (files: File[]) => void;
|
|
26
|
+
children?: React.ReactNode | DragNDropFieldChildrenRenderProp;
|
|
27
|
+
locale?: DragNDropFieldPropLocale;
|
|
28
|
+
};
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __assign, __read, __rest, __spread } from "tslib";
|
|
2
2
|
import './Popover.css';
|
|
3
|
-
import React, { useEffect } from 'react';
|
|
3
|
+
import React, { forwardRef, useEffect, useLayoutEffect } 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';
|
|
@@ -70,7 +70,7 @@ var ContextConsumer = function (_a) {
|
|
|
70
70
|
return React.createElement(React.Fragment, null, children);
|
|
71
71
|
};
|
|
72
72
|
var cnPopover = cn('Popover');
|
|
73
|
-
export var Popover =
|
|
73
|
+
export var Popover = forwardRef(function (props, componentRef) {
|
|
74
74
|
var _a;
|
|
75
75
|
var children = props.children, _b = props.direction, passedDirection = _b === void 0 ? 'upCenter' : _b, _c = props.offset, offset = _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
76
|
var ref = React.useRef(null);
|
|
@@ -79,22 +79,12 @@ export var Popover = React.forwardRef(function (props, componentRef) {
|
|
|
79
79
|
var _h = useComponentSize(ref), width = _h.width, height = _h.height;
|
|
80
80
|
var anchorSize = useComponentSize(anchorRef || { current: null });
|
|
81
81
|
var previousDirectionRef = React.useRef(null);
|
|
82
|
-
var previousDirection = previousDirectionRef.current;
|
|
83
82
|
var _j = __read(React.useState([]), 2), bannedDirections = _j[0], setBannedDirections = _j[1];
|
|
84
83
|
var resetBannedDirections = function () {
|
|
85
84
|
setBannedDirections(function (state) { return (state.length ? [] : state); });
|
|
86
85
|
previousDirectionRef.current = null;
|
|
87
86
|
};
|
|
88
87
|
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()); };
|
|
89
|
-
React.useLayoutEffect(updateAnchorClientRect, [anchorSize]);
|
|
90
|
-
usePopoverReposition({
|
|
91
|
-
isActive: true,
|
|
92
|
-
scrollAnchorRef: anchorRef || { current: null },
|
|
93
|
-
onRequestReposition: function () {
|
|
94
|
-
resetBannedDirections();
|
|
95
|
-
updateAnchorClientRect();
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
88
|
var _k = getComputedPositionAndDirection({
|
|
99
89
|
contentSize: { width: width, height: height },
|
|
100
90
|
viewportSize: {
|
|
@@ -112,23 +102,33 @@ export var Popover = React.forwardRef(function (props, componentRef) {
|
|
|
112
102
|
anchorSize: anchorSize,
|
|
113
103
|
spareDirection: spareDirection
|
|
114
104
|
}), position = _k.position, direction = _k.direction;
|
|
115
|
-
|
|
105
|
+
var content = isRenderProp(children) ? children(direction) : children;
|
|
106
|
+
useLayoutEffect(function () { return onSetDirection === null || onSetDirection === void 0 ? void 0 : onSetDirection(direction); }, [direction]);
|
|
107
|
+
useLayoutEffect(resetBannedDirections, [props]);
|
|
108
|
+
useEffect(updateAnchorClientRect, [anchorSize]);
|
|
109
|
+
usePopoverReposition({
|
|
110
|
+
scrollAnchorRef: anchorRef || { current: null },
|
|
111
|
+
onRequestReposition: function () {
|
|
112
|
+
resetBannedDirections();
|
|
113
|
+
updateAnchorClientRect();
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
116
|
/**
|
|
117
117
|
* Может возникнуть ситуация, когда перерасчет поповера всегда будет выдавать 2 направления
|
|
118
118
|
* и бесконечно зацикливать себя. Для избежания таких кейсов мы запоминаем стороны,
|
|
119
119
|
* которые не подошли, чтобы не возвращаться к ним и предотвратить бесконечный ререндер.
|
|
120
120
|
* См. PopoverBannedPositionsStory
|
|
121
121
|
*/
|
|
122
|
-
if (
|
|
123
|
-
if (
|
|
124
|
-
setBannedDirections(
|
|
122
|
+
if (previousDirectionRef.current !== direction) {
|
|
123
|
+
if (previousDirectionRef.current && !bannedDirections.includes(previousDirectionRef.current)) {
|
|
124
|
+
setBannedDirections(function (state) {
|
|
125
|
+
return previousDirectionRef.current ? __spread(state, [previousDirectionRef.current]) : state;
|
|
126
|
+
});
|
|
125
127
|
}
|
|
126
128
|
previousDirectionRef.current = direction;
|
|
127
129
|
}
|
|
128
130
|
// Сбрасываем при любом изменении пропсов, чтобы заново начать перебор направлений
|
|
129
131
|
// Главное не сбрасывать при изменении размеров поповера, т.к. именно оно может вызвать бесконечный перебор
|
|
130
|
-
React.useLayoutEffect(resetBannedDirections, [props]);
|
|
131
|
-
var content = isRenderProp(children) ? children(direction) : children;
|
|
132
132
|
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["--popover-offset"] = typeof offset === 'string' ? "var(--space-" + offset + ")" : offset + "px", _a)) }),
|
|
133
133
|
React.createElement(ContextConsumer, { onClickOutside: onClickOutside, ignoreClicksInsideRefs: [ref, anchorRef || { current: null }] }, content)));
|
|
134
134
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/** Запрос репозиции поповера при ресайзе окна и скролле */
|
|
3
|
-
export declare const usePopoverReposition: ({
|
|
4
|
-
isActive: boolean;
|
|
3
|
+
export declare const usePopoverReposition: ({ scrollAnchorRef, onRequestReposition, }: {
|
|
5
4
|
/** При скролле родителей этого элемента будет запрашиваться репозиция поповера */
|
|
6
5
|
scrollAnchorRef: React.RefObject<HTMLElement | null>;
|
|
7
6
|
onRequestReposition: () => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { useMutableRef } from '../../hooks/useMutableRef/useMutableRef';
|
|
2
3
|
var getAllParents = function (element) {
|
|
3
4
|
var mutableParents = [];
|
|
4
5
|
var currentNode = element;
|
|
@@ -10,19 +11,19 @@ var getAllParents = function (element) {
|
|
|
10
11
|
};
|
|
11
12
|
/** Запрос репозиции поповера при ресайзе окна и скролле */
|
|
12
13
|
export var usePopoverReposition = function (_a) {
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}, [
|
|
14
|
+
var scrollAnchorRef = _a.scrollAnchorRef, onRequestReposition = _a.onRequestReposition;
|
|
15
|
+
var onRequestRepositionRef = useMutableRef(onRequestReposition);
|
|
16
|
+
useEffect(function () {
|
|
17
|
+
window.addEventListener('resize', onRequestRepositionRef.current);
|
|
18
|
+
var allParents = (scrollAnchorRef === null || scrollAnchorRef === void 0 ? void 0 : scrollAnchorRef.current) ? getAllParents(scrollAnchorRef.current) : [];
|
|
19
|
+
allParents.forEach(function (parentEl) {
|
|
20
|
+
return parentEl.addEventListener('scroll', onRequestRepositionRef.current);
|
|
21
|
+
});
|
|
22
|
+
return function () {
|
|
23
|
+
window.removeEventListener('resize', onRequestRepositionRef.current);
|
|
24
|
+
allParents.forEach(function (parentEl) {
|
|
25
|
+
return parentEl.removeEventListener('scroll', onRequestRepositionRef.current);
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
}, [scrollAnchorRef]);
|
|
28
29
|
};
|
package/__internal__/src/components/SelectComponents/SelectCreateButton/SelectCreateButton.d.ts
CHANGED
|
@@ -10,5 +10,6 @@ declare type SelectCreateButtonProps = PropsWithHTMLAttributes<{
|
|
|
10
10
|
size: PropSize;
|
|
11
11
|
indent: 'normal' | 'increased';
|
|
12
12
|
}, HTMLDivElement>;
|
|
13
|
+
export declare const cnSelectCreateButton: import("@bem-react/classname").ClassNameFormatter;
|
|
13
14
|
export declare const SelectCreateButton: React.FC<SelectCreateButtonProps>;
|
|
14
15
|
export {};
|
package/__internal__/src/components/SelectComponents/SelectCreateButton/SelectCreateButton.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __assign, __rest } from "tslib";
|
|
|
2
2
|
import './SelectCreateButton.css';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { cn } from '../../../utils/bem';
|
|
5
|
-
var cnSelectCreateButton = cn('SelectCreateButton');
|
|
5
|
+
export var cnSelectCreateButton = cn('SelectCreateButton');
|
|
6
6
|
export var SelectCreateButton = function (props) {
|
|
7
7
|
var className = props.className, labelForCreate = props.labelForCreate, inputValue = props.inputValue, active = props.active, hovered = props.hovered, size = props.size, indent = props.indent, otherProps = __rest(props, ["className", "labelForCreate", "inputValue", "active", "hovered", "size", "indent"]);
|
|
8
8
|
return (React.createElement("div", __assign({}, otherProps, { className: cnSelectCreateButton({ active: active, hovered: hovered, size: size, indent: indent }, [className]), "aria-selected": active, role: "option" }),
|