@mezzanine-ui/react 0.6.4 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.js +3 -2
- package/Accordion/AccordionDetails.js +3 -2
- package/Accordion/AccordionSummary.js +3 -2
- package/Alert/Alert.js +3 -2
- package/AppBar/AppBar.js +3 -2
- package/AppBar/AppBarBrand.js +3 -2
- package/AppBar/AppBarMain.js +3 -2
- package/AppBar/AppBarSupport.js +3 -2
- package/Badge/Badge.js +3 -2
- package/Badge/BadgeContainer.js +3 -2
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js +3 -2
- package/Button/ButtonGroup.js +3 -2
- package/Button/IconButton.js +3 -2
- package/Button/index.js +2 -2
- package/Calendar/Calendar.js +3 -2
- package/Calendar/CalendarCell.js +1 -1
- package/Calendar/CalendarContext.js +1 -2
- package/Calendar/CalendarControls.js +1 -1
- package/Calendar/CalendarDayOfWeek.js +1 -1
- package/Calendar/CalendarDays.js +1 -1
- package/Calendar/CalendarMonths.js +1 -1
- package/Calendar/CalendarWeeks.js +1 -1
- package/Calendar/CalendarYears.js +1 -1
- package/Card/Card.js +3 -2
- package/Card/CardActions.js +3 -2
- package/Checkbox/CheckAll.js +3 -2
- package/Checkbox/Checkbox.js +3 -2
- package/Checkbox/CheckboxGroup.js +3 -2
- package/ConfirmActions/ConfirmActions.js +3 -2
- package/DatePicker/DatePicker.js +4 -3
- package/DatePicker/DatePickerCalendar.js +3 -2
- package/DateRangePicker/DateRangePicker.js +4 -3
- package/DateRangePicker/DateRangePickerCalendar.js +3 -2
- package/DateRangePicker/useDateRangePickerValue.d.ts +2 -2
- package/DateTimePicker/DateTimePicker.js +4 -3
- package/DateTimePicker/DateTimePickerPanel.js +3 -2
- package/Drawer/Drawer.d.ts +2 -7
- package/Drawer/Drawer.js +8 -23
- package/Dropdown/Dropdown.js +3 -2
- package/Empty/Empty.js +3 -2
- package/Form/FormField.js +3 -2
- package/Form/FormLabel.js +3 -2
- package/Form/FormMessage.js +3 -2
- package/Icon/Icon.d.ts +4 -0
- package/Icon/Icon.js +6 -4
- package/Input/Input.js +4 -3
- package/Loading/Loading.js +3 -2
- package/Menu/Menu.js +3 -2
- package/Menu/MenuDivider.js +3 -2
- package/Menu/MenuItem.js +3 -2
- package/Menu/MenuItemGroup.js +3 -2
- package/Message/Message.d.ts +8 -5
- package/Message/Message.js +29 -13
- package/Message/index.d.ts +1 -1
- package/Modal/Modal.d.ts +2 -7
- package/Modal/Modal.js +11 -59
- package/Modal/ModalActions.js +3 -2
- package/Modal/ModalBody.js +3 -2
- package/Modal/ModalFooter.js +3 -2
- package/Modal/ModalHeader.js +3 -2
- package/Modal/index.d.ts +1 -0
- package/Modal/index.js +1 -0
- package/Modal/useModalContainer.d.ts +6 -0
- package/Modal/useModalContainer.js +27 -0
- package/Navigation/Navigation.js +3 -2
- package/Navigation/NavigationItem.js +3 -2
- package/Navigation/NavigationSubMenu.js +3 -2
- package/Notification/Notification.js +4 -3
- package/Notifier/NotifierManager.js +1 -1
- package/Overlay/Overlay.js +3 -2
- package/PageFooter/PageFooter.js +3 -2
- package/Pagination/Pagination.js +3 -2
- package/Pagination/PaginationItem.js +3 -2
- package/Pagination/PaginationJumper.js +3 -2
- package/Picker/PickerTrigger.js +3 -2
- package/Picker/RangePickerTrigger.js +3 -2
- package/Picker/usePickerInputValue.js +1 -2
- package/Picker/usePickerValue.d.ts +1 -1
- package/Picker/useRangePickerValue.d.ts +2 -2
- package/Popconfirm/Popconfirm.js +3 -2
- package/Popover/Popover.js +3 -2
- package/Popper/Popper.js +3 -2
- package/Portal/Portal.js +3 -2
- package/Progress/Progress.js +3 -2
- package/Radio/Radio.js +4 -3
- package/Radio/RadioGroup.js +3 -2
- package/Select/AutoComplete.d.ts +1 -1
- package/Select/AutoComplete.js +4 -3
- package/Select/Option.js +3 -2
- package/Select/Select.d.ts +1 -1
- package/Select/Select.js +4 -3
- package/Select/SelectTrigger.js +3 -2
- package/Select/TreeSelect.d.ts +1 -1
- package/Select/TreeSelect.js +4 -3
- package/Skeleton/Skeleton.js +3 -2
- package/Slider/Slider.js +20 -3
- package/Slider/useSlider.js +8 -6
- package/Stepper/Step.js +3 -2
- package/Stepper/Stepper.js +3 -2
- package/Switch/Switch.js +4 -3
- package/Table/Table.d.ts +51 -44
- package/Table/Table.js +42 -23
- package/Table/TableBody.js +10 -4
- package/Table/TableBodyRow.js +3 -2
- package/Table/TableCell.js +3 -2
- package/Table/TableHeader.js +3 -2
- package/Table/editable/TableEditRenderWrapper.js +1 -1
- package/Table/expandable/TableExpandable.js +3 -2
- package/Table/pagination/TablePagination.js +13 -14
- package/Table/pagination/useTablePagination.d.ts +5 -13
- package/Table/pagination/useTablePagination.js +3 -23
- package/Table/refresh/TableRefresh.js +3 -2
- package/Table/rowSelection/TableRowSelection.js +3 -2
- package/Table/sorting/TableSortingIcon.js +3 -2
- package/Table/useTableScroll.d.ts +9 -9
- package/Table/useTableScroll.js +1 -1
- package/Tabs/Tab.js +3 -2
- package/Tabs/TabPane.js +3 -2
- package/Tabs/Tabs.js +3 -2
- package/Tabs/useTabsOverflow.js +1 -1
- package/Tag/Tag.js +3 -2
- package/TextField/TextField.js +3 -2
- package/Textarea/Textarea.js +4 -3
- package/TimePanel/TimePanel.js +3 -2
- package/TimePanel/TimePanelAction.js +3 -2
- package/TimePanel/TimePanelColumn.js +3 -2
- package/TimePicker/TimePicker.js +4 -3
- package/TimePicker/TimePickerPanel.js +3 -2
- package/Tooltip/Tooltip.js +3 -2
- package/Transition/Collapse.js +3 -2
- package/Transition/Fade.js +3 -2
- package/Transition/Grow.js +3 -2
- package/Transition/SlideFade.js +3 -2
- package/Transition/Transition.d.ts +1 -1
- package/Transition/Transition.js +1 -1
- package/Transition/Zoom.js +3 -2
- package/Tree/Tree.js +3 -2
- package/Tree/TreeNode.js +3 -2
- package/Tree/TreeNodeList.js +3 -2
- package/Typography/Typography.d.ts +1 -1
- package/Typography/Typography.js +3 -2
- package/Upload/UploadButton.js +3 -2
- package/Upload/UploadInput.js +5 -2
- package/Upload/UploadPicture.d.ts +48 -0
- package/Upload/UploadPicture.js +52 -0
- package/Upload/UploadPictureBlock.d.ts +13 -0
- package/Upload/UploadPictureBlock.js +86 -0
- package/Upload/UploadPictureWall.d.ts +71 -0
- package/Upload/UploadPictureWall.js +156 -0
- package/Upload/UploadPictureWallItem.d.ts +13 -0
- package/Upload/UploadPictureWallItem.js +19 -0
- package/Upload/UploadResult.js +3 -2
- package/Upload/index.d.ts +3 -0
- package/Upload/index.js +3 -0
- package/_internal/InputCheck/InputCheck.js +3 -2
- package/_internal/InputCheck/InputCheckGroup.js +3 -2
- package/_internal/InputTriggerPopper/InputTriggerPopper.js +3 -2
- package/_internal/SlideFadeOverlay/SlideFadeOverlay.d.ts +21 -0
- package/_internal/SlideFadeOverlay/SlideFadeOverlay.js +66 -0
- package/_internal/SlideFadeOverlay/index.d.ts +1 -0
- package/_internal/SlideFadeOverlay/index.js +1 -0
- package/_internal/SlideFadeOverlay/useTopStack.d.ts +1 -0
- package/{Modal/useIsTopModal.js → _internal/SlideFadeOverlay/useTopStack.js} +3 -3
- package/index.d.ts +4 -4
- package/index.js +52 -49
- package/package.json +6 -6
- package/utils/{rename-types.d.ts → general.d.ts} +3 -0
- package/Modal/useIsTopModal.d.ts +0 -1
package/Tree/Tree.js
CHANGED
|
@@ -126,6 +126,7 @@ const Tree = forwardRef(function Tree(props, ref) {
|
|
|
126
126
|
const selectHandler = multiple ? onMultipleSelect : onSingleSelect;
|
|
127
127
|
const onSelect = selectable ? selectHandler : undefined;
|
|
128
128
|
return (jsx("div", Object.assign({ ref: ref, className: cx(treeClasses.host, className) }, restRootProp, { children: jsx(TreeNodeList, Object.assign({}, treeNodeListProps, { multiple: multiple, nodes: displayNodes, onExpand: onExpand, onSelect: onSelect, selectable: selectable, size: size, treeNodeProps: treeNodeProps, treeNodeRefs: treeNodeRefs }), void 0) }), void 0));
|
|
129
|
-
});
|
|
129
|
+
});
|
|
130
|
+
var Tree$1 = Tree;
|
|
130
131
|
|
|
131
|
-
export default
|
|
132
|
+
export { Tree$1 as default };
|
package/Tree/TreeNode.js
CHANGED
|
@@ -36,6 +36,7 @@ const TreeNode = forwardRef(function TreeNode(props, ref) {
|
|
|
36
36
|
[treeClasses.nodeLabelDisabled]: disabled,
|
|
37
37
|
}) }, { children: label }), void 0))] }), void 0),
|
|
38
38
|
children && (jsx(Collapse, Object.assign({ in: expanded, appear: false }, { children: children }), void 0))] }), void 0));
|
|
39
|
-
});
|
|
39
|
+
});
|
|
40
|
+
var TreeNode$1 = TreeNode;
|
|
40
41
|
|
|
41
|
-
export default
|
|
42
|
+
export { TreeNode$1 as default };
|
package/Tree/TreeNodeList.js
CHANGED
|
@@ -24,6 +24,7 @@ const TreeNodeList = forwardRef((props, ref) => {
|
|
|
24
24
|
return (jsx(TreeNode, Object.assign({ ref: getNodeRefHandler === null || getNodeRefHandler === void 0 ? void 0 : getNodeRefHandler(value) }, treeNodeProps, { multiple: multiple, onExpand: onExpand, onSelect: onSelect, selectable: selectable, size: size, value: value }, restNodeProps, { children: (siblingNodes === null || siblingNodes === void 0 ? void 0 : siblingNodes.length) ? (jsx(TreeNodeList, Object.assign({}, restRootProp, { className: className, multiple: multiple, nodes: siblingNodes, onExpand: onExpand, onSelect: onSelect, selectable: selectable, size: size, treeNodeRefs: treeNodeRefs }), void 0))
|
|
25
25
|
: undefined }), value));
|
|
26
26
|
}) }), void 0));
|
|
27
|
-
});
|
|
27
|
+
});
|
|
28
|
+
var TreeNodeList$1 = TreeNodeList;
|
|
28
29
|
|
|
29
|
-
export default
|
|
30
|
+
export { TreeNodeList$1 as default };
|
|
@@ -37,7 +37,7 @@ export declare type TypographyProps<C extends TypographyComponent = 'p'> = Compo
|
|
|
37
37
|
/**
|
|
38
38
|
* The react component for `mezzanine` typography.
|
|
39
39
|
*/
|
|
40
|
-
declare const Typography: import("react").ForwardRefExoticComponent<Pick<Pick<Pick<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "key" | "slot" | "style" | "title" | "children" | "color" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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">, "slot" | "style" | "title" | "children" | "color" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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">, "slot" | "style" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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"> & TypographyPropsBase, "slot" | "style" | "title" | "children" | "align" | "color" | "display" | "ellipsis" | "noWrap" | "variant" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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"> & {
|
|
40
|
+
declare const Typography: import("react").ForwardRefExoticComponent<Pick<Pick<Pick<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "key" | "slot" | "style" | "title" | "color" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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">, "slot" | "style" | "title" | "color" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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">, "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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"> & TypographyPropsBase, "slot" | "style" | "title" | "align" | "color" | "display" | "ellipsis" | "noWrap" | "variant" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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"> & {
|
|
41
41
|
component?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>) | "p" | "span" | "label" | "div" | "caption" | "a" | undefined;
|
|
42
42
|
} & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
43
43
|
export default Typography;
|
package/Typography/Typography.js
CHANGED
|
@@ -33,6 +33,7 @@ const Typography = forwardRef(function Typography(props, ref) {
|
|
|
33
33
|
[typographyClasses.ellipsis]: ellipsis,
|
|
34
34
|
[typographyClasses.noWrap]: noWrap,
|
|
35
35
|
}, className), style: style, title: title }, { children: children }), void 0));
|
|
36
|
-
});
|
|
36
|
+
});
|
|
37
|
+
var Typography$1 = Typography;
|
|
37
38
|
|
|
38
|
-
export default
|
|
39
|
+
export { Typography$1 as default };
|
package/Upload/UploadButton.js
CHANGED
|
@@ -18,6 +18,7 @@ const UploadButton = forwardRef(function UploadButton(props, ref) {
|
|
|
18
18
|
onClick(event);
|
|
19
19
|
}
|
|
20
20
|
}, prefix: jsx(Icon, { icon: UploadIcon }, void 0) }, { children: [jsx(UploadInput, { ref: inputRef, accept: accept, disabled: disabled, multiple: multiple, onUpload: onUpload }, void 0), children] }), void 0));
|
|
21
|
-
});
|
|
21
|
+
});
|
|
22
|
+
var UploadButton$1 = UploadButton;
|
|
22
23
|
|
|
23
|
-
export default
|
|
24
|
+
export { UploadButton$1 as default };
|
package/Upload/UploadInput.js
CHANGED
|
@@ -5,6 +5,8 @@ import { uploadInputClasses } from '@mezzanine-ui/core/upload';
|
|
|
5
5
|
const UploadInput = forwardRef((props, ref) => {
|
|
6
6
|
const { accept, disabled = false, multiple = false, onUpload, } = props;
|
|
7
7
|
return (jsx("input", { ref: ref, accept: accept, "aria-disabled": disabled, className: uploadInputClasses.host, disabled: disabled, multiple: multiple, onClick: (event) => {
|
|
8
|
+
// eslint-disable-next-line no-param-reassign
|
|
9
|
+
event.currentTarget.value = '';
|
|
8
10
|
event.stopPropagation();
|
|
9
11
|
event.nativeEvent.stopImmediatePropagation();
|
|
10
12
|
}, onChange: (event) => {
|
|
@@ -17,6 +19,7 @@ const UploadInput = forwardRef((props, ref) => {
|
|
|
17
19
|
onUpload(files);
|
|
18
20
|
}
|
|
19
21
|
}, type: "file" }, void 0));
|
|
20
|
-
});
|
|
22
|
+
});
|
|
23
|
+
var UploadInput$1 = UploadInput;
|
|
21
24
|
|
|
22
|
-
export default
|
|
25
|
+
export { UploadInput$1 as default };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
3
|
+
export declare type UploadPictureControl = {
|
|
4
|
+
getData: () => void;
|
|
5
|
+
};
|
|
6
|
+
export interface UploadPictureProps extends Omit<NativeElementPropsWithoutKeyAndRef<'div'>, 'children' | 'onChange' | 'onError' | 'value'> {
|
|
7
|
+
/**
|
|
8
|
+
* The accept attributes of native input element.
|
|
9
|
+
* @default 'image/*'
|
|
10
|
+
*/
|
|
11
|
+
accept?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Provide `controllerRef` if you need detail data of file.
|
|
14
|
+
*/
|
|
15
|
+
controllerRef?: Ref<UploadPictureControl | null>;
|
|
16
|
+
/**
|
|
17
|
+
* The default value of uploader.
|
|
18
|
+
*/
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the input which is disabled.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Fired after value changed.
|
|
27
|
+
*/
|
|
28
|
+
onChange?: (url: string) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Fired after user delete image.
|
|
31
|
+
*/
|
|
32
|
+
onDelete?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Fired after user upload image failed.
|
|
35
|
+
*/
|
|
36
|
+
onError?: (file: File) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Fired when user upload image, need to return Promise<string>.
|
|
39
|
+
* Arg1 is target file, arg2 `setProgress` can set the progress of uploading.
|
|
40
|
+
*/
|
|
41
|
+
onUpload?: (file: File, setProgress: (progress: number) => void) => Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Fired after user upload image success.
|
|
44
|
+
*/
|
|
45
|
+
onUploadSuccess?: (file: File, url: string) => void;
|
|
46
|
+
}
|
|
47
|
+
declare const UploadPicture: import("react").ForwardRefExoticComponent<UploadPictureProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
48
|
+
export default UploadPicture;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useRef, useCallback, useImperativeHandle } from 'react';
|
|
3
|
+
import { ImageUploader, uploadPictureClasses } from '@mezzanine-ui/core/upload';
|
|
4
|
+
import UploadPictureBlock from './UploadPictureBlock.js';
|
|
5
|
+
import cx from 'clsx';
|
|
6
|
+
|
|
7
|
+
const UploadPicture = forwardRef(function UploadPicture(props, ref) {
|
|
8
|
+
const { accept = 'image/*', className, controllerRef, defaultValue, disabled = false, onChange, onDelete, onError, onUpload, onUploadSuccess, style, } = props;
|
|
9
|
+
const defaultImageUploader = new ImageUploader(undefined, defaultValue);
|
|
10
|
+
const uploadPictureImageLoader = useRef(defaultImageUploader);
|
|
11
|
+
const onImageUpload = useCallback((files) => {
|
|
12
|
+
if (files.length) {
|
|
13
|
+
const currentFile = files[0];
|
|
14
|
+
uploadPictureImageLoader.current.setNewFile(currentFile);
|
|
15
|
+
uploadPictureImageLoader.current.setPreview();
|
|
16
|
+
if (onUpload) {
|
|
17
|
+
const setProgress = (progress) => uploadPictureImageLoader.current.setPercentage(progress);
|
|
18
|
+
uploadPictureImageLoader.current.setLoadingStatus(true);
|
|
19
|
+
onUpload(currentFile, setProgress)
|
|
20
|
+
.then((url) => {
|
|
21
|
+
uploadPictureImageLoader.current.setUrl(url);
|
|
22
|
+
uploadPictureImageLoader.current.setLoadingStatus(false);
|
|
23
|
+
setProgress(100);
|
|
24
|
+
if (onUploadSuccess) {
|
|
25
|
+
onUploadSuccess(currentFile, url);
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
.catch(() => {
|
|
29
|
+
uploadPictureImageLoader.current.setErrorStatus(true);
|
|
30
|
+
uploadPictureImageLoader.current.setLoadingStatus(false);
|
|
31
|
+
setProgress(100);
|
|
32
|
+
if (onError) {
|
|
33
|
+
onError(currentFile);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}, [onUpload, onUploadSuccess, onError]);
|
|
39
|
+
const onImageDelete = useCallback(() => {
|
|
40
|
+
uploadPictureImageLoader.current.clear();
|
|
41
|
+
if (onDelete) {
|
|
42
|
+
onDelete();
|
|
43
|
+
}
|
|
44
|
+
}, [onDelete]);
|
|
45
|
+
useImperativeHandle(controllerRef, () => ({
|
|
46
|
+
getData: () => uploadPictureImageLoader.current.getAll(),
|
|
47
|
+
}));
|
|
48
|
+
return (jsx("div", Object.assign({ ref: ref, className: cx(uploadPictureClasses.host, className), style: style }, { children: jsx(UploadPictureBlock, { accept: accept, disabled: disabled, imageLoader: uploadPictureImageLoader.current, multiple: false, onDelete: onImageDelete, onUpload: onImageUpload, onValueChange: onChange }, void 0) }), void 0));
|
|
49
|
+
});
|
|
50
|
+
var UploadPicture$1 = UploadPicture;
|
|
51
|
+
|
|
52
|
+
export { UploadPicture$1 as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
|
+
import { ImageUploader } from '@mezzanine-ui/core/upload';
|
|
3
|
+
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
4
|
+
export interface UploadPictureBlockProps extends Omit<NativeElementPropsWithoutKeyAndRef<'button'>, 'children' | 'onChange' | 'value'> {
|
|
5
|
+
accept?: string;
|
|
6
|
+
imageLoader: ImageUploader;
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
onDelete?: MouseEventHandler;
|
|
9
|
+
onUpload?: (files: File[]) => void;
|
|
10
|
+
onValueChange?: (value: string) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const UploadPictureBlock: import("react").ForwardRefExoticComponent<UploadPictureBlockProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export default UploadPictureBlock;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
3
|
+
import { toUploadPictureBlockCssVars, uploadPictureBlockClasses } from '@mezzanine-ui/core/upload';
|
|
4
|
+
import { TimesIcon, SpinnerIcon, UploadIcon, TrashIcon } from '@mezzanine-ui/icons';
|
|
5
|
+
import { usePreviousValue } from '../hooks/usePreviousValue.js';
|
|
6
|
+
import UploadInput from './UploadInput.js';
|
|
7
|
+
import Icon from '../Icon/Icon.js';
|
|
8
|
+
import cx from 'clsx';
|
|
9
|
+
|
|
10
|
+
const UploadPictureBlock = forwardRef(function UploadPictureBlock(props, ref) {
|
|
11
|
+
const { accept = 'image/*', disabled = false, imageLoader, multiple = false, onDelete, onUpload, onValueChange, } = props;
|
|
12
|
+
const [previewImage, setPreviewImage] = useState(imageLoader.getPreview() || '');
|
|
13
|
+
const [value, setValue] = useState(imageLoader.getUrl() || '');
|
|
14
|
+
const [percentage, setPercentage] = useState(imageLoader.getPercentage() || 0);
|
|
15
|
+
const [isLoading, setIsLoading] = useState(imageLoader.getIsLoading() || false);
|
|
16
|
+
const [isError, setIsError] = useState(imageLoader.getIsError() || false);
|
|
17
|
+
const inputRef = useRef(null);
|
|
18
|
+
const prevValue = usePreviousValue(value);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (onValueChange && value !== prevValue) {
|
|
21
|
+
onValueChange(value);
|
|
22
|
+
}
|
|
23
|
+
}, [onValueChange, prevValue, value]);
|
|
24
|
+
const setImageUploaderData = useCallback(() => {
|
|
25
|
+
const data = imageLoader.getAll();
|
|
26
|
+
setPreviewImage(data.preview);
|
|
27
|
+
setValue(data.url);
|
|
28
|
+
setPercentage(data.percentage);
|
|
29
|
+
setIsLoading(data.isLoading);
|
|
30
|
+
setIsError(data.isError);
|
|
31
|
+
}, [imageLoader]);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
imageLoader.on('fileChange', () => {
|
|
34
|
+
setImageUploaderData();
|
|
35
|
+
});
|
|
36
|
+
imageLoader.on('previewChange', () => {
|
|
37
|
+
setPreviewImage(imageLoader.getPreview());
|
|
38
|
+
});
|
|
39
|
+
imageLoader.on('percentageChange', () => {
|
|
40
|
+
setPercentage(imageLoader.getPercentage());
|
|
41
|
+
});
|
|
42
|
+
imageLoader.on('urlChange', () => {
|
|
43
|
+
setValue(imageLoader.getUrl());
|
|
44
|
+
});
|
|
45
|
+
imageLoader.on('loadingStatusChange', () => {
|
|
46
|
+
setIsLoading(imageLoader.getIsLoading());
|
|
47
|
+
});
|
|
48
|
+
imageLoader.on('errorStatusChange', () => {
|
|
49
|
+
setIsError(imageLoader.getIsError());
|
|
50
|
+
});
|
|
51
|
+
imageLoader.on('clear', () => {
|
|
52
|
+
setImageUploaderData();
|
|
53
|
+
});
|
|
54
|
+
return () => {
|
|
55
|
+
imageLoader.removeAllListeners();
|
|
56
|
+
};
|
|
57
|
+
}, [imageLoader, setImageUploaderData]);
|
|
58
|
+
const cssVars = toUploadPictureBlockCssVars({ percentage });
|
|
59
|
+
const style = {
|
|
60
|
+
...cssVars,
|
|
61
|
+
};
|
|
62
|
+
const showImage = useMemo(() => ((value || previewImage) && !isError), [previewImage, value, isError]);
|
|
63
|
+
const canDeleteImage = useMemo(() => ((showImage || isError) && !isLoading), [showImage, isError, isLoading]);
|
|
64
|
+
return (jsxs("button", Object.assign({ ref: ref, type: "button", "aria-disabled": disabled, disabled: disabled, onClick: (event) => {
|
|
65
|
+
var _a;
|
|
66
|
+
if (!showImage && !isError) {
|
|
67
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
68
|
+
}
|
|
69
|
+
if (canDeleteImage && onDelete) {
|
|
70
|
+
onDelete(event);
|
|
71
|
+
}
|
|
72
|
+
}, className: cx(uploadPictureBlockClasses.host, {
|
|
73
|
+
[uploadPictureBlockClasses.loading]: isLoading,
|
|
74
|
+
[uploadPictureBlockClasses.error]: isError,
|
|
75
|
+
[uploadPictureBlockClasses.disabled]: disabled,
|
|
76
|
+
}), style: style }, { children: [jsx(UploadInput, { ref: inputRef, accept: accept, disabled: disabled, multiple: multiple, onUpload: onUpload }, void 0),
|
|
77
|
+
isError ? (jsxs("div", Object.assign({ className: uploadPictureBlockClasses.group }, { children: [jsx(Icon, { icon: TimesIcon }, void 0),
|
|
78
|
+
jsx("span", Object.assign({ className: uploadPictureBlockClasses.status }, { children: "\u4E0A\u50B3\u932F\u8AA4" }), void 0)] }), void 0)) : (jsx(Fragment, { children: showImage ? (jsxs(Fragment, { children: [jsx("img", { alt: "", src: (value || previewImage), className: uploadPictureBlockClasses.preview }, void 0),
|
|
79
|
+
isLoading ? (jsxs("div", Object.assign({ className: uploadPictureBlockClasses.group }, { children: [jsx(Icon, { icon: SpinnerIcon, spin: true }, void 0),
|
|
80
|
+
jsx("span", Object.assign({ className: uploadPictureBlockClasses.status }, { children: "\u4E0A\u50B3\u4E2D..." }), void 0)] }), void 0)) : null] }, void 0)) : (jsxs("div", Object.assign({ className: uploadPictureBlockClasses.group }, { children: [jsx(Icon, { icon: UploadIcon }, void 0),
|
|
81
|
+
jsx("span", Object.assign({ className: uploadPictureBlockClasses.status }, { children: "\u4E0A\u50B3\u5F71\u50CF" }), void 0)] }), void 0)) }, void 0)),
|
|
82
|
+
!disabled && canDeleteImage && (jsx("div", Object.assign({ className: uploadPictureBlockClasses.delete }, { children: jsx(Icon, { icon: TrashIcon }, void 0) }), void 0))] }), void 0));
|
|
83
|
+
});
|
|
84
|
+
var UploadPictureBlock$1 = UploadPictureBlock;
|
|
85
|
+
|
|
86
|
+
export { UploadPictureBlock$1 as default };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
3
|
+
export declare type UploadPictureWallControl = {
|
|
4
|
+
getAllData: () => void;
|
|
5
|
+
};
|
|
6
|
+
export interface UploadPictureWallBaseProps extends Omit<NativeElementPropsWithoutKeyAndRef<'div'>, 'children' | 'onChange' | 'onError' | 'value'> {
|
|
7
|
+
/**
|
|
8
|
+
* The accept attributes of native input element.
|
|
9
|
+
* @default 'image/*'
|
|
10
|
+
*/
|
|
11
|
+
accept?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Provide `controllerRef` if you need detail data of files.
|
|
14
|
+
*/
|
|
15
|
+
controllerRef?: Ref<UploadPictureWallControl | null>;
|
|
16
|
+
/**
|
|
17
|
+
* The default values of uploader.
|
|
18
|
+
*/
|
|
19
|
+
defaultValues?: string[];
|
|
20
|
+
/**
|
|
21
|
+
* Whether the input which is disabled.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the input which is multiple.
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
multiple?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Fired after values changed.
|
|
32
|
+
*/
|
|
33
|
+
onChange?: (urls: string[]) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Fired after user delete image.
|
|
36
|
+
*/
|
|
37
|
+
onDelete?: (urls: string[]) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Fired after user upload images failed.
|
|
40
|
+
*/
|
|
41
|
+
onError?: (files: File | File[]) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Fired after user upload images success.
|
|
44
|
+
*/
|
|
45
|
+
onUploadSuccess?: (files: File | File[], urls: string | string[]) => void;
|
|
46
|
+
}
|
|
47
|
+
export interface UploadPictureWallSingleUploadProps extends UploadPictureWallBaseProps {
|
|
48
|
+
onMultiUpload?: undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Fired when user upload image, need to return Promise<string>.
|
|
51
|
+
* Arg1 is target file, arg2 `setProgress` can set the progress of uploading.
|
|
52
|
+
*/
|
|
53
|
+
onUpload?: (file: File, setProgress: (progress: number) => void) => Promise<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the uploading which is parallel, only enabled when `onUpload` is given .
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
parallel?: boolean;
|
|
59
|
+
}
|
|
60
|
+
export interface UploadPictureWallMultiUploadProps extends UploadPictureWallBaseProps {
|
|
61
|
+
/**
|
|
62
|
+
* Fired when user upload images, need to return Promise<string[]>.
|
|
63
|
+
* Arg1 is target files, arg2 `setProgress` can set the progress of uploading.
|
|
64
|
+
*/
|
|
65
|
+
onMultiUpload?: (files: File[], setProgress: (progress: number) => void) => Promise<string[]>;
|
|
66
|
+
onUpload?: undefined;
|
|
67
|
+
parallel?: undefined;
|
|
68
|
+
}
|
|
69
|
+
export declare type UploadPictureWallProps = UploadPictureWallSingleUploadProps | UploadPictureWallMultiUploadProps;
|
|
70
|
+
declare const UploadPictureWall: import("react").ForwardRefExoticComponent<(UploadPictureWallSingleUploadProps & import("react").RefAttributes<HTMLDivElement>) | (UploadPictureWallMultiUploadProps & import("react").RefAttributes<HTMLDivElement>)>;
|
|
71
|
+
export default UploadPictureWall;
|