@webiny/ui 5.23.1 → 5.24.0-beta.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/Accordion/Accordion.d.ts +3 -3
- package/Accordion/AccordionItem.js +4 -0
- package/AutoComplete/AutoComplete.d.ts +8 -19
- package/AutoComplete/AutoComplete.js +3 -4
- package/AutoComplete/MultiAutoComplete.d.ts +18 -34
- package/AutoComplete/MultiAutoComplete.js +4 -8
- package/AutoComplete/utils.d.ts +11 -5
- package/AutoComplete/utils.js +1 -1
- package/Button/Button.d.ts +7 -7
- package/Checkbox/Checkbox.d.ts +4 -8
- package/Checkbox/Checkbox.js +2 -1
- package/CodeEditor/CodeEditor.d.ts +1 -5
- package/CodeEditor/CodeEditor.js +2 -1
- package/ColorPicker/ColorPicker.d.ts +3 -6
- package/ColorPicker/ColorPicker.js +2 -1
- package/ConfirmationDialog/ConfirmationDialog.d.ts +1 -1
- package/ConfirmationDialog/withConfirmation.d.ts +1 -1
- package/Dialog/Dialog.d.ts +1 -2
- package/DynamicFieldset/Fieldset.d.ts +22 -12
- package/DynamicFieldset/Fieldset.js +3 -0
- package/Helpers/ClassNames.d.ts +1 -1
- package/Icon/Icon.d.ts +2 -5
- package/Icon/Icon.js +0 -3
- package/ImageEditor/ImageEditor.d.ts +21 -23
- package/ImageEditor/ImageEditor.js +23 -8
- package/ImageEditor/toolbar/crop.js +3 -1
- package/ImageEditor/toolbar/filter.js +3 -1
- package/ImageEditor/toolbar/flip.js +3 -1
- package/ImageEditor/toolbar/rotate.js +3 -1
- package/ImageEditor/toolbar/types.d.ts +21 -11
- package/ImageUpload/ImageEditorDialog.d.ts +7 -3
- package/ImageUpload/MultiImageUpload.d.ts +7 -28
- package/ImageUpload/MultiImageUpload.js +15 -2
- package/ImageUpload/SingleImageUpload.d.ts +4 -26
- package/ImageUpload/SingleImageUpload.js +4 -2
- package/ImageUpload/styled.d.ts +10 -10
- package/Input/Input.d.ts +1 -7
- package/List/DataList/DataList.d.ts +11 -35
- package/List/DataList/DataList.js +5 -1
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +2 -2
- package/List/DataList/Loader.js +5 -0
- package/Menu/Menu.d.ts +1 -4
- package/Menu/Menu.stories.js +1 -1
- package/Mosaic/Mosaic.d.ts +4 -14
- package/Mosaic/Mosaic.js +11 -3
- package/Progress/CircularProgress.d.ts +7 -15
- package/Radio/Radio.d.ts +1 -5
- package/Radio/Radio.js +2 -1
- package/Radio/RadioGroup.d.ts +1 -5
- package/Radio/RadioGroup.js +2 -1
- package/RichTextEditor/RichTextEditor.d.ts +6 -6
- package/RichTextEditor/createPropsFromConfig.d.ts +11 -1
- package/RichTextEditor/createPropsFromConfig.js +7 -3
- package/Ripple/Ripple.d.ts +3 -4
- package/Ripple/Ripple.stories.js +1 -1
- package/Scrollbar/Scrollbar.d.ts +4 -4
- package/Section/index.d.ts +3 -4
- package/Select/Select.d.ts +5 -8
- package/Select/Select.js +11 -3
- package/Slider/Slider.d.ts +1 -5
- package/Slider/Slider.js +2 -1
- package/Snackbar/Snackbar.d.ts +1 -1
- package/Switch/Switch.d.ts +1 -5
- package/Switch/Switch.js +2 -1
- package/Tabs/Tab.d.ts +4 -0
- package/Tabs/Tabs.d.ts +18 -12
- package/Tabs/Tabs.js +2 -2
- package/Tags/Tags.d.ts +2 -8
- package/Tags/Tags.js +7 -3
- package/Tooltip/Tooltip.d.ts +5 -7
- package/Tooltip/Tooltip.js +6 -1
- package/TopProgressBar/TopProgressBar.d.ts +5 -5
- package/Typography/Typography.d.ts +3 -3
- package/package.json +12 -7
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { ListItem, ListProps } from "..";
|
|
3
3
|
import { PaginationProp, SortersProp } from "./types";
|
|
4
|
-
|
|
4
|
+
interface DataListProps {
|
|
5
5
|
children?: Function;
|
|
6
6
|
title?: React.ReactNode;
|
|
7
|
-
data?:
|
|
7
|
+
data?: Record<string, any>[];
|
|
8
8
|
refresh?: Function;
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
loader?: React.ReactNode;
|
|
@@ -24,38 +24,14 @@ declare type Props = {
|
|
|
24
24
|
search?: React.ReactElement;
|
|
25
25
|
modalOverlay?: React.ReactElement;
|
|
26
26
|
modalOverlayAction?: React.ReactElement;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
meta: any;
|
|
35
|
-
loading: boolean;
|
|
36
|
-
refresh: any;
|
|
37
|
-
setPage: any;
|
|
38
|
-
setPerPage: any;
|
|
39
|
-
perPageOptions: number[];
|
|
40
|
-
filters: any;
|
|
41
|
-
sorters: any;
|
|
42
|
-
setSorters: any;
|
|
43
|
-
actions: any;
|
|
44
|
-
multiSelectAll: any;
|
|
45
|
-
isAllMultiSelected: () => boolean;
|
|
46
|
-
isNoneMultiSelected: () => boolean;
|
|
47
|
-
loader: JSX.Element;
|
|
48
|
-
noData: JSX.Element;
|
|
49
|
-
showOptions: {
|
|
50
|
-
refresh: boolean;
|
|
51
|
-
pagination: boolean;
|
|
52
|
-
sorters: boolean;
|
|
53
|
-
filters: boolean;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
export declare type ScrollListProps = ListProps & {
|
|
27
|
+
meta?: Record<string, any>;
|
|
28
|
+
setPage?: (page: string) => void;
|
|
29
|
+
setPerPage?: (page: string) => void;
|
|
30
|
+
perPageOptions?: number[];
|
|
31
|
+
}
|
|
32
|
+
export declare const DataList: React.FC<DataListProps>;
|
|
33
|
+
export interface ScrollListProps extends ListProps {
|
|
58
34
|
children: React.ReactElement<typeof ListItem>[];
|
|
59
|
-
}
|
|
60
|
-
export declare const ScrollList:
|
|
35
|
+
}
|
|
36
|
+
export declare const ScrollList: React.FC<ScrollListProps>;
|
|
61
37
|
export {};
|
|
@@ -248,7 +248,11 @@ export var DataList = function DataList(props) {
|
|
|
248
248
|
} else if (isEmpty(props.data)) {
|
|
249
249
|
render = props.noData;
|
|
250
250
|
} else {
|
|
251
|
-
|
|
251
|
+
/**
|
|
252
|
+
* TODO: figure out the correct type.
|
|
253
|
+
*/
|
|
254
|
+
var ch = props.children;
|
|
255
|
+
render = typeof ch === "function" ? ch(props) : null;
|
|
252
256
|
}
|
|
253
257
|
|
|
254
258
|
return /*#__PURE__*/React.createElement(DataListModalOverlayProvider, null, /*#__PURE__*/React.createElement(ListContainer, {
|
|
@@ -2,13 +2,13 @@ import React from "react";
|
|
|
2
2
|
export declare type SimpleOverlayProps = {
|
|
3
3
|
showOverlay: boolean;
|
|
4
4
|
};
|
|
5
|
-
export declare const SimpleOverlay: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & SimpleOverlayProps, "
|
|
5
|
+
export declare const SimpleOverlay: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & SimpleOverlayProps, "onError" | "className" | "style" | "title" | "children" | "onBlur" | "onClick" | "onContextMenu" | "onCopy" | "onCut" | "onAuxClick" | "onDoubleClick" | "onDragEnd" | "onDragStart" | "onDrop" | "onFocus" | "onInput" | "onInvalid" | "onKeyDown" | "onKeyPress" | "onKeyUp" | "onMouseDown" | "onMouseUp" | "onPaste" | "onPause" | "onPlay" | "onPointerCancel" | "onPointerDown" | "onPointerUp" | "onRateChange" | "onReset" | "onSeeked" | "onSubmit" | "onTouchCancel" | "onTouchEnd" | "onTouchStart" | "onVolumeChange" | "onAbort" | "onAnimationEnd" | "onAnimationIteration" | "onAnimationStart" | "onCanPlay" | "onCanPlayThrough" | "onDrag" | "onDragEnter" | "onDragExit" | "onDragLeave" | "onDragOver" | "onDurationChange" | "onEmptied" | "onEncrypted" | "onEnded" | "onGotPointerCapture" | "onLoad" | "onLoadedData" | "onLoadedMetadata" | "onLoadStart" | "onLostPointerCapture" | "onMouseMove" | "onMouseOut" | "onMouseOver" | "onPlaying" | "onPointerMove" | "onPointerOut" | "onPointerOver" | "onProgress" | "onScroll" | "onSeeking" | "onStalled" | "onSuspend" | "onTimeUpdate" | "onTouchMove" | "onTransitionEnd" | "onWaiting" | "onWheel" | "onMouseEnter" | "onMouseLeave" | "onPointerEnter" | "onPointerLeave" | "onChange" | "onSelect" | "onBeforeInput" | "onCompositionEnd" | "onCompositionStart" | "onCompositionUpdate" | "placeholder" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "onCopyCapture" | "onCutCapture" | "onPasteCapture" | "onCompositionEndCapture" | "onCompositionStartCapture" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInputCapture" | "onInputCapture" | "onResetCapture" | "onSubmitCapture" | "onInvalidCapture" | "onLoadCapture" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbortCapture" | "onCanPlayCapture" | "onCanPlayThroughCapture" | "onDurationChangeCapture" | "onEmptiedCapture" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedDataCapture" | "onLoadedMetadataCapture" | "onLoadStartCapture" | "onPauseCapture" | "onPlayCapture" | "onPlayingCapture" | "onProgressCapture" | "onRateChangeCapture" | "onSeekedCapture" | "onSeekingCapture" | "onStalledCapture" | "onSuspendCapture" | "onTimeUpdateCapture" | "onVolumeChangeCapture" | "onWaitingCapture" | "onAuxClickCapture" | "onClickCapture" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnterCapture" | "onDragExitCapture" | "onDragLeaveCapture" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onMouseDownCapture" | "onMouseMoveCapture" | "onMouseOutCapture" | "onMouseOverCapture" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancelCapture" | "onTouchEndCapture" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerDownCapture" | "onPointerMoveCapture" | "onPointerUpCapture" | "onPointerCancelCapture" | "onPointerEnterCapture" | "onPointerLeaveCapture" | "onPointerOverCapture" | "onPointerOutCapture" | "onGotPointerCaptureCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEndCapture" | "onAnimationIterationCapture" | "onTransitionEndCapture" | "translate" | "css" | "showOverlay"> & {
|
|
6
6
|
theme: object;
|
|
7
7
|
}, object>;
|
|
8
8
|
export declare type DataListModalWrapperProps = {
|
|
9
9
|
showOverlay: boolean;
|
|
10
10
|
};
|
|
11
|
-
export declare const DataListModalWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & DataListModalWrapperProps, "
|
|
11
|
+
export declare const DataListModalWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & DataListModalWrapperProps, "onError" | "className" | "style" | "title" | "children" | "onBlur" | "onClick" | "onContextMenu" | "onCopy" | "onCut" | "onAuxClick" | "onDoubleClick" | "onDragEnd" | "onDragStart" | "onDrop" | "onFocus" | "onInput" | "onInvalid" | "onKeyDown" | "onKeyPress" | "onKeyUp" | "onMouseDown" | "onMouseUp" | "onPaste" | "onPause" | "onPlay" | "onPointerCancel" | "onPointerDown" | "onPointerUp" | "onRateChange" | "onReset" | "onSeeked" | "onSubmit" | "onTouchCancel" | "onTouchEnd" | "onTouchStart" | "onVolumeChange" | "onAbort" | "onAnimationEnd" | "onAnimationIteration" | "onAnimationStart" | "onCanPlay" | "onCanPlayThrough" | "onDrag" | "onDragEnter" | "onDragExit" | "onDragLeave" | "onDragOver" | "onDurationChange" | "onEmptied" | "onEncrypted" | "onEnded" | "onGotPointerCapture" | "onLoad" | "onLoadedData" | "onLoadedMetadata" | "onLoadStart" | "onLostPointerCapture" | "onMouseMove" | "onMouseOut" | "onMouseOver" | "onPlaying" | "onPointerMove" | "onPointerOut" | "onPointerOver" | "onProgress" | "onScroll" | "onSeeking" | "onStalled" | "onSuspend" | "onTimeUpdate" | "onTouchMove" | "onTransitionEnd" | "onWaiting" | "onWheel" | "onMouseEnter" | "onMouseLeave" | "onPointerEnter" | "onPointerLeave" | "onChange" | "onSelect" | "onBeforeInput" | "onCompositionEnd" | "onCompositionStart" | "onCompositionUpdate" | "placeholder" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "onCopyCapture" | "onCutCapture" | "onPasteCapture" | "onCompositionEndCapture" | "onCompositionStartCapture" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInputCapture" | "onInputCapture" | "onResetCapture" | "onSubmitCapture" | "onInvalidCapture" | "onLoadCapture" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbortCapture" | "onCanPlayCapture" | "onCanPlayThroughCapture" | "onDurationChangeCapture" | "onEmptiedCapture" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedDataCapture" | "onLoadedMetadataCapture" | "onLoadStartCapture" | "onPauseCapture" | "onPlayCapture" | "onPlayingCapture" | "onProgressCapture" | "onRateChangeCapture" | "onSeekedCapture" | "onSeekingCapture" | "onStalledCapture" | "onSuspendCapture" | "onTimeUpdateCapture" | "onVolumeChangeCapture" | "onWaitingCapture" | "onAuxClickCapture" | "onClickCapture" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnterCapture" | "onDragExitCapture" | "onDragLeaveCapture" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onMouseDownCapture" | "onMouseMoveCapture" | "onMouseOutCapture" | "onMouseOverCapture" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancelCapture" | "onTouchEndCapture" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerDownCapture" | "onPointerMoveCapture" | "onPointerUpCapture" | "onPointerCancelCapture" | "onPointerEnterCapture" | "onPointerLeaveCapture" | "onPointerOverCapture" | "onPointerOutCapture" | "onGotPointerCaptureCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEndCapture" | "onAnimationIterationCapture" | "onTransitionEndCapture" | "translate" | "css" | "showOverlay"> & {
|
|
12
12
|
theme: object;
|
|
13
13
|
}, object>;
|
|
14
14
|
export declare type DataListModalOverlayProps = {
|
package/List/DataList/Loader.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
|
+
/**
|
|
4
|
+
* Package react-loading-skeleton does not have types.
|
|
5
|
+
*/
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
|
|
3
8
|
import Skeleton from "react-loading-skeleton";
|
|
4
9
|
var LoaderUl = /*#__PURE__*/styled("ul", {
|
|
5
10
|
target: "e1nb7uzc0",
|
package/Menu/Menu.d.ts
CHANGED
|
@@ -16,10 +16,7 @@ declare type State = {
|
|
|
16
16
|
* Use Menu component to display a list of choices, once the handler is triggered.
|
|
17
17
|
*/
|
|
18
18
|
declare class Menu extends React.Component<MenuProps, State> {
|
|
19
|
-
static defaultProps:
|
|
20
|
-
handle: any;
|
|
21
|
-
anchor: string;
|
|
22
|
-
};
|
|
19
|
+
static defaultProps: Partial<MenuProps>;
|
|
23
20
|
state: {
|
|
24
21
|
menuIsOpen: boolean;
|
|
25
22
|
};
|
package/Menu/Menu.stories.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { storiesOf } from "@storybook/react";
|
|
3
3
|
import { Story, StoryReadme, StorySandbox, StorySandboxExample, StorySandboxCode } from "@webiny/storybook-utils/Story";
|
|
4
|
-
import { ButtonPrimary } from "
|
|
4
|
+
import { ButtonPrimary } from "../Button";
|
|
5
5
|
import readme from "./../Menu/README.md";
|
|
6
6
|
import { Menu, MenuItem, MenuDivider } from "./Menu";
|
|
7
7
|
var story = storiesOf("Components/Menu", module);
|
package/Mosaic/Mosaic.d.ts
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
columns: {
|
|
2
|
+
export interface MosaicProps {
|
|
3
|
+
columns?: {
|
|
5
4
|
[key: string]: number;
|
|
6
5
|
};
|
|
7
6
|
className?: string;
|
|
8
|
-
};
|
|
9
|
-
export declare function Mosaic({ children, columns, className }: MosaicProps): JSX.Element;
|
|
10
|
-
export declare namespace Mosaic {
|
|
11
|
-
var defaultProps: {
|
|
12
|
-
columns: {
|
|
13
|
-
320: number;
|
|
14
|
-
480: number;
|
|
15
|
-
800: number;
|
|
16
|
-
1366: number;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
7
|
}
|
|
8
|
+
declare const Mosaic: React.FC<MosaicProps>;
|
|
9
|
+
export { Mosaic };
|
package/Mosaic/Mosaic.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Package react-columned does not have types.
|
|
4
|
+
*/
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
|
|
2
7
|
import Columned from "react-columned";
|
|
3
|
-
|
|
8
|
+
|
|
9
|
+
var Mosaic = function Mosaic(_ref) {
|
|
4
10
|
var children = _ref.children,
|
|
5
11
|
columns = _ref.columns,
|
|
6
12
|
className = _ref.className;
|
|
@@ -8,7 +14,8 @@ export function Mosaic(_ref) {
|
|
|
8
14
|
columns: columns,
|
|
9
15
|
className: className
|
|
10
16
|
}, children);
|
|
11
|
-
}
|
|
17
|
+
};
|
|
18
|
+
|
|
12
19
|
Mosaic.defaultProps = {
|
|
13
20
|
columns: {
|
|
14
21
|
320: 1,
|
|
@@ -16,4 +23,5 @@ Mosaic.defaultProps = {
|
|
|
16
23
|
800: 3,
|
|
17
24
|
1366: 4
|
|
18
25
|
}
|
|
19
|
-
};
|
|
26
|
+
};
|
|
27
|
+
export { Mosaic };
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
interface Props {
|
|
3
3
|
label?: React.ReactNode;
|
|
4
|
-
size
|
|
5
|
-
spinnerColor
|
|
6
|
-
spinnerWidth
|
|
7
|
-
visible
|
|
4
|
+
size?: number;
|
|
5
|
+
spinnerColor?: string;
|
|
6
|
+
spinnerWidth?: number;
|
|
7
|
+
visible?: boolean;
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
|
-
}
|
|
10
|
-
declare const CircularProgress:
|
|
11
|
-
({ label, size, spinnerWidth, spinnerColor, visible, style }: Props): JSX.Element;
|
|
12
|
-
defaultProps: {
|
|
13
|
-
size: number;
|
|
14
|
-
spinnerColor: string;
|
|
15
|
-
spinnerWidth: number;
|
|
16
|
-
visible: boolean;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
9
|
+
}
|
|
10
|
+
declare const CircularProgress: React.FC<Props>;
|
|
19
11
|
export default CircularProgress;
|
package/Radio/Radio.d.ts
CHANGED
|
@@ -10,11 +10,7 @@ declare type Props = FormComponentProps & {
|
|
|
10
10
|
* Each Radio component must receive value and onChange callback via props.
|
|
11
11
|
*/
|
|
12
12
|
declare class Radio extends React.Component<Props> {
|
|
13
|
-
static defaultProps:
|
|
14
|
-
validation: {
|
|
15
|
-
isValid: any;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
13
|
+
static defaultProps: Partial<Props>;
|
|
18
14
|
onChange: (e: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
19
15
|
render(): JSX.Element;
|
|
20
16
|
}
|
package/Radio/Radio.js
CHANGED
package/Radio/RadioGroup.d.ts
CHANGED
|
@@ -10,11 +10,7 @@ declare type Props = FormComponentProps & {
|
|
|
10
10
|
children: (props: RadioGroupRenderParams) => React.ReactNode;
|
|
11
11
|
};
|
|
12
12
|
declare class RadioGroup extends React.Component<Props> {
|
|
13
|
-
static defaultProps:
|
|
14
|
-
validation: {
|
|
15
|
-
isValid: any;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
13
|
+
static defaultProps: Partial<Props>;
|
|
18
14
|
render(): JSX.Element;
|
|
19
15
|
}
|
|
20
16
|
export default RadioGroup;
|
package/Radio/RadioGroup.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { OutputBlockData, OutputData, SanitizerConfig, ToolSettings } from "@editorjs/editorjs/types";
|
|
3
|
-
export
|
|
3
|
+
export interface OnReadyParams {
|
|
4
4
|
editor: any;
|
|
5
5
|
initialData: OutputData;
|
|
6
|
-
}
|
|
7
|
-
export
|
|
6
|
+
}
|
|
7
|
+
export interface RichTextEditorProps {
|
|
8
8
|
autofocus?: boolean;
|
|
9
9
|
context?: {
|
|
10
10
|
[key: string]: any;
|
|
@@ -23,5 +23,5 @@ export declare type RichTextEditorProps = {
|
|
|
23
23
|
label?: string;
|
|
24
24
|
description?: string;
|
|
25
25
|
disabled?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export declare const RichTextEditor:
|
|
26
|
+
}
|
|
27
|
+
export declare const RichTextEditor: React.FC<RichTextEditorProps>;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { RichTextEditorProps } from "./RichTextEditor";
|
|
2
|
+
import { ToolSettings } from "@editorjs/editorjs";
|
|
3
|
+
interface CreatePropsFromConfigResult {
|
|
4
|
+
onReady: (editor: any) => void;
|
|
5
|
+
tools: {
|
|
6
|
+
[key: string]: ToolSettings;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
2
9
|
/**
|
|
3
10
|
* Creates RichTextEditor props from the given config (or array of configs).
|
|
11
|
+
*
|
|
12
|
+
* TODO: figure out types for editor and return type of the function.
|
|
4
13
|
*/
|
|
5
|
-
export declare const createPropsFromConfig: (config:
|
|
14
|
+
export declare const createPropsFromConfig: (config: RichTextEditorProps[]) => CreatePropsFromConfigResult;
|
|
15
|
+
export {};
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Creates RichTextEditor props from the given config (or array of configs).
|
|
5
|
+
*
|
|
6
|
+
* TODO: figure out types for editor and return type of the function.
|
|
3
7
|
*/
|
|
4
8
|
export var createPropsFromConfig = function createPropsFromConfig(config) {
|
|
5
9
|
var configs = Array.isArray(config) ? config : [config];
|
|
6
10
|
return {
|
|
7
|
-
onReady: function onReady(
|
|
11
|
+
onReady: function onReady(params) {
|
|
8
12
|
configs.forEach(function (config) {
|
|
9
13
|
if (typeof config.onReady === "function") {
|
|
10
|
-
config.onReady(
|
|
14
|
+
config.onReady(params);
|
|
11
15
|
}
|
|
12
16
|
});
|
|
13
17
|
},
|
|
14
18
|
tools: configs.reduce(function (tools, config) {
|
|
15
|
-
return
|
|
19
|
+
return _objectSpread(_objectSpread({}, tools), config.tools);
|
|
16
20
|
}, {})
|
|
17
21
|
};
|
|
18
22
|
};
|
package/Ripple/Ripple.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
children?: React.ReactNode;
|
|
2
|
+
interface Props {
|
|
4
3
|
type?: "unbounded" | "primary" | "accent";
|
|
5
4
|
disabled?: boolean;
|
|
6
|
-
}
|
|
5
|
+
}
|
|
7
6
|
/**
|
|
8
7
|
* Use Ripple component to display a list of choices, once the handler is triggered.
|
|
9
8
|
*/
|
|
10
|
-
declare const Ripple:
|
|
9
|
+
declare const Ripple: React.FC<Props>;
|
|
11
10
|
export { Ripple };
|
package/Ripple/Ripple.stories.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { storiesOf } from "@storybook/react";
|
|
3
3
|
import { Story, StoryReadme, StorySandboxCode, StorySandbox, StorySandboxExample } from "@webiny/storybook-utils/Story";
|
|
4
4
|
import readme from "./../Ripple/README.md";
|
|
5
|
-
import { Icon } from "
|
|
5
|
+
import { Icon } from "../Icon";
|
|
6
6
|
import { withKnobs, boolean } from "@storybook/addon-knobs";
|
|
7
7
|
import { ReactComponent as AutoRenewIcon } from "./svg/baseline-autorenew-24px.svg";
|
|
8
8
|
import { ReactComponent as CloudDoneIcon } from "./svg/baseline-cloud_done-24px.svg";
|
package/Scrollbar/Scrollbar.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { ScrollbarProps } from "react-custom-scrollbars";
|
|
3
|
+
interface Props extends ScrollbarProps {
|
|
4
4
|
style?: React.CSSProperties;
|
|
5
5
|
[key: string]: any;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
/**
|
|
8
8
|
* Use Scrollbar component to show vertical or horizontal scrollbars.
|
|
9
9
|
*/
|
|
10
|
-
declare const Scrollbar:
|
|
10
|
+
declare const Scrollbar: React.FC<Props>;
|
|
11
11
|
export { Scrollbar };
|
package/Section/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
children?: React.ReactNode;
|
|
2
|
+
interface SectionProps {
|
|
4
3
|
title?: String;
|
|
5
|
-
}
|
|
6
|
-
declare const Section:
|
|
4
|
+
}
|
|
5
|
+
declare const Section: React.FC<SectionProps>;
|
|
7
6
|
export default Section;
|
package/Select/Select.d.ts
CHANGED
|
@@ -11,12 +11,9 @@ export declare type SelectProps = FormComponentProps & RmwcSelectProps & {
|
|
|
11
11
|
rootProps?: Object;
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
14
|
+
/**
|
|
15
|
+
* We check for null and undefined in the value because React is complaining about those values.
|
|
16
|
+
* Error says to use the empty string in null/undefined case.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Select: React.FC<SelectProps>;
|
|
22
19
|
export default Select;
|
package/Select/Select.js
CHANGED
|
@@ -30,18 +30,25 @@ var getRmwcProps = function getRmwcProps(props) {
|
|
|
30
30
|
var newProps = {};
|
|
31
31
|
Object.keys(props).filter(function (name) {
|
|
32
32
|
return !skipProps.includes(name);
|
|
33
|
-
})
|
|
33
|
+
}) // @ts-ignore
|
|
34
|
+
.forEach(function (name) {
|
|
34
35
|
return newProps[name] = props[name];
|
|
35
36
|
});
|
|
36
37
|
return newProps;
|
|
37
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* We check for null and undefined in the value because React is complaining about those values.
|
|
41
|
+
* Error says to use the empty string in null/undefined case.
|
|
42
|
+
*/
|
|
43
|
+
|
|
38
44
|
|
|
39
45
|
export var Select = function Select(props) {
|
|
40
|
-
var
|
|
46
|
+
var initialValue = props.value,
|
|
41
47
|
description = props.description,
|
|
42
48
|
validation = props.validation,
|
|
43
49
|
other = _objectWithoutProperties(props, _excluded);
|
|
44
50
|
|
|
51
|
+
var value = initialValue === null || initialValue === undefined ? "" : initialValue;
|
|
45
52
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(RmwcSelect, Object.assign({}, getRmwcProps(other), {
|
|
46
53
|
value: value,
|
|
47
54
|
className: classNames("webiny-ui-select", props.className, _defineProperty({}, noLabel, !props.label)),
|
|
@@ -54,7 +61,8 @@ export var Select = function Select(props) {
|
|
|
54
61
|
};
|
|
55
62
|
Select.defaultProps = {
|
|
56
63
|
validation: {
|
|
57
|
-
isValid: null
|
|
64
|
+
isValid: null,
|
|
65
|
+
message: null
|
|
58
66
|
}
|
|
59
67
|
};
|
|
60
68
|
export default Select;
|
package/Slider/Slider.d.ts
CHANGED
|
@@ -15,11 +15,7 @@ declare type Props = FormComponentProps & {
|
|
|
15
15
|
* Slider component lets users choose a value from given range.
|
|
16
16
|
*/
|
|
17
17
|
declare class Slider extends React.Component<Props> {
|
|
18
|
-
static defaultProps:
|
|
19
|
-
validation: {
|
|
20
|
-
isValid: any;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
18
|
+
static defaultProps: Partial<Props>;
|
|
23
19
|
onChange: (e: {
|
|
24
20
|
detail: {
|
|
25
21
|
value: number;
|
package/Slider/Slider.js
CHANGED
package/Snackbar/Snackbar.d.ts
CHANGED
package/Switch/Switch.d.ts
CHANGED
|
@@ -9,11 +9,7 @@ declare type Props = FormComponentProps & SwitchProps & {
|
|
|
9
9
|
* Switch component can be used to store simple boolean values.
|
|
10
10
|
*/
|
|
11
11
|
declare class Switch extends React.Component<Props> {
|
|
12
|
-
static defaultProps:
|
|
13
|
-
validation: {
|
|
14
|
-
isValid: any;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
12
|
+
static defaultProps: Partial<Props>;
|
|
17
13
|
static rmwcProps: string[];
|
|
18
14
|
onChange: (e: React.SyntheticEvent<HTMLElement>) => void;
|
|
19
15
|
render(): JSX.Element;
|
package/Switch/Switch.js
CHANGED
package/Tabs/Tab.d.ts
CHANGED