@onewelcome/react-lib-components 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/Form/FileUpload/FileItem/FileItem.d.ts +17 -0
- package/dist/Form/FileUpload/FileUpload.d.ts +26 -0
- package/dist/Icon/Icon.d.ts +4 -1
- package/dist/ProgressBar/ProgressBar.d.ts +2 -1
- package/dist/Typography/Typography.d.ts +1 -1
- package/dist/_BaseStyling_/BaseStyling.d.ts +23 -0
- package/dist/hooks/useUploadFile.d.ts +22 -0
- package/dist/react-lib-components.cjs.development.js +130 -98
- package/dist/react-lib-components.cjs.development.js.map +1 -1
- package/dist/react-lib-components.cjs.production.min.js +1 -1
- package/dist/react-lib-components.cjs.production.min.js.map +1 -1
- package/dist/react-lib-components.esm.js +130 -98
- package/dist/react-lib-components.esm.js.map +1 -1
- package/dist/util/helper.d.ts +7 -0
- package/package.json +24 -21
- package/src/Breadcrumbs/Breadcrumbs.module.scss +2 -2
- package/src/Button/Button.module.scss +14 -2
- package/src/ContextMenu/ContextMenuItem.module.scss +1 -0
- package/src/DataGrid/DataGridHeader/DataGridHeader.module.scss +1 -1
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +1 -1
- package/src/Form/Fieldset/Fieldset.module.scss +8 -1
- package/src/Form/FileUpload/FileItem/FileItem.modules.scss +75 -0
- package/src/Form/FileUpload/FileItem/FileItem.test.tsx +103 -0
- package/src/Form/FileUpload/FileItem/FileItem.tsx +141 -0
- package/src/Form/FileUpload/FileUpload.module.scss +106 -0
- package/src/Form/FileUpload/FileUpload.test.tsx +374 -0
- package/src/Form/FileUpload/FileUpload.tsx +251 -0
- package/src/Form/Input/Input.module.scss +9 -3
- package/src/Form/Select/Select.module.scss +26 -3
- package/src/Form/Wrapper/InputWrapper/InputWrapper.tsx +3 -1
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss +9 -1
- package/src/Form/Wrapper/Wrapper/Wrapper.module.scss +11 -2
- package/src/Icon/Icon.module.scss +12 -0
- package/src/Icon/Icon.tsx +4 -1
- package/src/Link/Link.module.scss +1 -1
- package/src/Notifications/Banner/Banner.module.scss +2 -2
- package/src/Pagination/Pagination.module.scss +1 -0
- package/src/ProgressBar/ProgressBar.module.scss +11 -9
- package/src/ProgressBar/ProgressBar.test.tsx +21 -0
- package/src/ProgressBar/ProgressBar.tsx +7 -2
- package/src/Tabs/TabButton.module.scss +3 -3
- package/src/Tabs/Tabs.module.scss +1 -0
- package/src/Typography/Typography.module.scss +4 -4
- package/src/Typography/Typography.tsx +1 -1
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.module.scss +17 -7
- package/src/_BaseStyling_/BaseStyling.tsx +73 -27
- package/src/hooks/useUploadFile.test.ts +211 -0
- package/src/hooks/useUploadFile.tsx +136 -0
- package/src/mixins.module.scss +26 -7
- package/src/util/helper.test.tsx +188 -16
- package/src/util/helper.tsx +38 -0
- package/src/variables.scss +18 -0
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
[](https://sonarcloud.io/summary/new_code?id=onewelcome_react-lib-components)
|
|
6
6
|
[](https://sonarcloud.io/summary/new_code?id=onewelcome_react-lib-components)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
This project provides React components built according to the OneWelcome design. It uses the [DTS tool](https://weiran-zsd.github.io/dts-cli/) for a consistent setup and configuration.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
We recommend visiting our [Storybook page](https://onewelcome.github.io/react-lib-components) to see the components in action.
|
|
11
11
|
|
|
12
12
|
> Note: the package is publicly available [on npm](https://www.npmjs.com/package/@onewelcome/react-lib-components).
|
|
13
13
|
|
|
@@ -81,9 +81,9 @@ Calculates the real cost of your library using [size-limit](https://github.com/a
|
|
|
81
81
|
|
|
82
82
|
The publishing process is fired by git tag creation. CircleCI builds a package and publishes it to the public npmjs.com registry.
|
|
83
83
|
Release notes should be provided via GitHub UI.
|
|
84
|
-
After a successful release, the release notes are published
|
|
84
|
+
After a successful release, the release notes are published via Slack.
|
|
85
85
|
|
|
86
|
-
### Creating release
|
|
86
|
+
### Creating a release
|
|
87
87
|
|
|
88
88
|
Follow these steps to create a release:
|
|
89
89
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { FileType } from "../FileUpload";
|
|
3
|
+
export type UploadProgress = "uploading" | "completed" | "error" | "readonly" | "retry";
|
|
4
|
+
export interface Props extends ComponentPropsWithRef<"div"> {
|
|
5
|
+
name: string;
|
|
6
|
+
status?: UploadProgress;
|
|
7
|
+
progress?: number;
|
|
8
|
+
error?: string;
|
|
9
|
+
onRequestedFileAction?: (action: FILE_ACTION, name: FileType["name"]) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare enum FILE_ACTION {
|
|
12
|
+
DELETE = "delete",
|
|
13
|
+
REMOVE = "remove",
|
|
14
|
+
ABORT = "abort",
|
|
15
|
+
RETRY = "retry"
|
|
16
|
+
}
|
|
17
|
+
export declare const FileItem: React.ForwardRefExoticComponent<Pick<Props, "error" | "onDrop" | "onChange" | "prefix" | "progress" | "slot" | "style" | "title" | "key" | "name" | "placeholder" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "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" | "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" | "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" | "onRequestedFileAction" | "status"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { DragEventHandler } from "react";
|
|
2
|
+
import { FILE_ACTION, Props as FileConfig } from "./FileItem/FileItem";
|
|
3
|
+
import { Props as InputProps } from "../Input/Input";
|
|
4
|
+
type FileUploadType = Omit<InputProps, "onDrop" | "type" | "onChange" | "suffix" | "prefix">;
|
|
5
|
+
export type FileType = Omit<FileConfig, "onRequestedFileAction"> & Pick<File, "size" | "type"> & {
|
|
6
|
+
data?: any;
|
|
7
|
+
};
|
|
8
|
+
export interface Props extends FileUploadType {
|
|
9
|
+
accept: string;
|
|
10
|
+
title: string;
|
|
11
|
+
multiple: boolean;
|
|
12
|
+
fileList: FileType[];
|
|
13
|
+
exceedingMaxSizeErrorText?: string;
|
|
14
|
+
maxFileSize?: number;
|
|
15
|
+
selectButtonText?: string;
|
|
16
|
+
dragAndDropText?: string;
|
|
17
|
+
subText?: string;
|
|
18
|
+
onDragOver?: DragEventHandler;
|
|
19
|
+
onDragEnter?: DragEventHandler;
|
|
20
|
+
onDragLeave?: DragEventHandler;
|
|
21
|
+
onDrop?: (e: FileType[]) => void;
|
|
22
|
+
onChange?: (e: FileType[]) => void;
|
|
23
|
+
onRequestedFileAction?: (action: FILE_ACTION, name: FileType["name"]) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare const FileUpload: React.ForwardRefExoticComponent<Pick<Props, `data-${string}` | "error" | "success" | "onDrop" | "onChange" | "form" | "slot" | "style" | "title" | "pattern" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "placeholder" | "readOnly" | "required" | "size" | "src" | "step" | "value" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "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" | "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" | "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" | "wrapperProps" | "labeledBy" | "onRequestedFileAction" | "fileList" | "exceedingMaxSizeErrorText" | "maxFileSize" | "selectButtonText" | "dragAndDropText" | "subText"> & React.RefAttributes<HTMLInputElement>>;
|
|
26
|
+
export {};
|
package/dist/Icon/Icon.d.ts
CHANGED
|
@@ -63,7 +63,10 @@ export declare enum Icons {
|
|
|
63
63
|
TriangleRight = "triangle-right",
|
|
64
64
|
TriangleUp = "triangle-up",
|
|
65
65
|
Undo = "undo",
|
|
66
|
-
Warning = "warning"
|
|
66
|
+
Warning = "warning",
|
|
67
|
+
FileOutline = "file-outline",
|
|
68
|
+
FileUpload = "file-upload-outline",
|
|
69
|
+
FileDownload = "file-download-outline"
|
|
67
70
|
}
|
|
68
71
|
type Tag = "span" | "div" | "i";
|
|
69
72
|
export interface Props extends ComponentPropsWithRef<"div"> {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ComponentPropsWithRef } from "react";
|
|
2
2
|
export interface Props extends Omit<ComponentPropsWithRef<"span">, "children"> {
|
|
3
3
|
placeholderText: string;
|
|
4
|
+
completed?: number;
|
|
4
5
|
}
|
|
5
|
-
export declare const ProgressBar: React.ForwardRefExoticComponent<Pick<Props, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "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" | "placeholderText"> & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
export declare const ProgressBar: React.ForwardRefExoticComponent<Pick<Props, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "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" | "placeholderText" | "completed"> & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
2
|
import { Spacing } from "../hooks/useSpacing";
|
|
3
3
|
export declare const validVariants: readonly ["h1", "h2", "h3", "h4", "body", "body-bold", "sub-text", "code"];
|
|
4
|
-
export type Variant = typeof validVariants[number];
|
|
4
|
+
export type Variant = (typeof validVariants)[number];
|
|
5
5
|
type Tags = "h1" | "h2" | "h3" | "h4" | "p" | "div" | "code" | "span" | "sup" | "sub" | "strong" | "em" | "small" | "mark" | "del" | "ins" | "blockquote";
|
|
6
6
|
export interface Props extends ComponentPropsWithRef<any> {
|
|
7
7
|
children: ReactNode;
|
|
@@ -8,6 +8,25 @@ interface CSSProperties {
|
|
|
8
8
|
colorPrimary?: string;
|
|
9
9
|
colorSecondary?: string;
|
|
10
10
|
colorTertiary?: string;
|
|
11
|
+
lightPink?: string;
|
|
12
|
+
vividViolet?: string;
|
|
13
|
+
colorPrimary300?: string;
|
|
14
|
+
colorPrimary500?: string;
|
|
15
|
+
colorPrimary600?: string;
|
|
16
|
+
colorPrimary700?: string;
|
|
17
|
+
colorPrimary900?: string;
|
|
18
|
+
colorBlueGrey100?: string;
|
|
19
|
+
colorBlueGrey200?: string;
|
|
20
|
+
colorBlueGrey400?: string;
|
|
21
|
+
colorBlueGrey25?: string;
|
|
22
|
+
colorBlueGrey500?: string;
|
|
23
|
+
colorBlueGrey700?: string;
|
|
24
|
+
colorBlueGrey900?: string;
|
|
25
|
+
colorGreen500?: string;
|
|
26
|
+
colorLightBlue500?: string;
|
|
27
|
+
colorLightBlue600?: string;
|
|
28
|
+
colorOrange500?: string;
|
|
29
|
+
colorRed500?: string;
|
|
11
30
|
defaultLineHeight?: string;
|
|
12
31
|
buttonBorderRadius?: string;
|
|
13
32
|
buttonBorderWidth?: string;
|
|
@@ -21,6 +40,8 @@ interface CSSProperties {
|
|
|
21
40
|
inputBorderWidthFocus?: string;
|
|
22
41
|
inputBorderStyle?: string;
|
|
23
42
|
inputBackgroundColor?: string;
|
|
43
|
+
dragBackgroundColor?: string;
|
|
44
|
+
dragBorderStyle?: string;
|
|
24
45
|
modalShadowColor?: string;
|
|
25
46
|
modalBackgroundColor?: string;
|
|
26
47
|
modalHeaderBackgroundColor?: string;
|
|
@@ -32,6 +53,7 @@ interface CSSProperties {
|
|
|
32
53
|
snackbarErrorBackgroundColor?: string;
|
|
33
54
|
snackbarBorderRadius?: string;
|
|
34
55
|
bannerBorderRadius?: string;
|
|
56
|
+
bannerBorderWidth?: string;
|
|
35
57
|
dataGridRowBackgroundColor?: string;
|
|
36
58
|
dataGridRowHoverBackgroundColor?: string;
|
|
37
59
|
tabsBackgroundColor?: string;
|
|
@@ -41,6 +63,7 @@ interface CSSProperties {
|
|
|
41
63
|
tablistBorderStyle?: string;
|
|
42
64
|
tablistBorderColor?: string;
|
|
43
65
|
tabTextColor?: string;
|
|
66
|
+
wizardStepIndicatorFutureColor?: string;
|
|
44
67
|
default?: string;
|
|
45
68
|
success?: string;
|
|
46
69
|
error?: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FileType } from "../Form/FileUpload/FileUpload";
|
|
3
|
+
export interface UploadResponseType {
|
|
4
|
+
fileList: FileType[];
|
|
5
|
+
status: XMLHttpRequest["status"];
|
|
6
|
+
}
|
|
7
|
+
export interface UseUploadFileCallback {
|
|
8
|
+
onComplete?: (response: UploadResponseType) => void;
|
|
9
|
+
onProgress?: Function;
|
|
10
|
+
}
|
|
11
|
+
export interface UploadFileRequestParams {
|
|
12
|
+
url: string;
|
|
13
|
+
headers?: Headers;
|
|
14
|
+
responseErrorPath?: string;
|
|
15
|
+
networkErrorText?: string;
|
|
16
|
+
withCredentials?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const useUploadFile: (files: FileType[], request: UploadFileRequestParams, callbacks?: UseUploadFileCallback) => {
|
|
19
|
+
updatedFiles: FileType[];
|
|
20
|
+
setUpdatedFiles: import("react").Dispatch<import("react").SetStateAction<FileType[]>>;
|
|
21
|
+
uploadingFiles: FileType[];
|
|
22
|
+
};
|