@webiny/ui 5.23.1-beta.0 → 5.24.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
package/Tabs/Tabs.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
-
export
|
|
2
|
+
export interface TabsRenderProps {
|
|
3
3
|
switchTab(tabIndex: number): void;
|
|
4
|
-
}
|
|
5
|
-
export
|
|
4
|
+
}
|
|
5
|
+
export interface TabsPropsChildrenCallable {
|
|
6
|
+
(props: TabsRenderProps): ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare type TabsPropsChildren = TabsPropsChildrenCallable | ReactNode;
|
|
9
|
+
export interface TabsProps {
|
|
6
10
|
/**
|
|
7
11
|
* A collection of tabs that needs to be rendered.
|
|
8
12
|
*/
|
|
9
|
-
children:
|
|
13
|
+
children: TabsPropsChildren;
|
|
10
14
|
/**
|
|
11
15
|
* Append a class name.
|
|
12
16
|
*/
|
|
@@ -23,19 +27,21 @@ export declare type TabsProps = {
|
|
|
23
27
|
* Function to change active tab.
|
|
24
28
|
*/
|
|
25
29
|
updateValue?: (index: number) => void;
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Tab ID for the testing.
|
|
32
|
+
*/
|
|
33
|
+
"data-testid"?: string;
|
|
34
|
+
}
|
|
35
|
+
interface State {
|
|
28
36
|
activeTabIndex: number;
|
|
29
|
-
}
|
|
37
|
+
}
|
|
30
38
|
/**
|
|
31
39
|
* Use Tabs component to display a list of choices, once the handler is triggered.
|
|
32
40
|
*/
|
|
33
41
|
export declare class Tabs extends React.Component<TabsProps, State> {
|
|
34
|
-
state:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
switchTab(activeTabIndex: any): void;
|
|
38
|
-
renderChildren(children: any, activeIndex: any): JSX.Element;
|
|
42
|
+
state: State;
|
|
43
|
+
switchTab(activeTabIndex: number): void;
|
|
44
|
+
renderChildren(children: React.ReactNode, activeIndex: number): JSX.Element;
|
|
39
45
|
render(): JSX.Element;
|
|
40
46
|
}
|
|
41
47
|
export {};
|
package/Tabs/Tabs.js
CHANGED
|
@@ -131,8 +131,8 @@ export var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
131
131
|
var children = this.props.children;
|
|
132
132
|
|
|
133
133
|
if (typeof this.props.children === "function") {
|
|
134
|
-
|
|
135
|
-
children =
|
|
134
|
+
var childrenCallable = this.props.children;
|
|
135
|
+
children = childrenCallable({
|
|
136
136
|
switchTab: this.switchTab.bind(this)
|
|
137
137
|
});
|
|
138
138
|
}
|
package/Tags/Tags.d.ts
CHANGED
|
@@ -45,14 +45,8 @@ declare type State = {
|
|
|
45
45
|
inputValue: string;
|
|
46
46
|
};
|
|
47
47
|
export declare class Tags extends React.Component<Props, State> {
|
|
48
|
-
state:
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
static defaultProps: {
|
|
52
|
-
validation: {
|
|
53
|
-
isValid: any;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
48
|
+
state: State;
|
|
49
|
+
static defaultProps: Partial<Props>;
|
|
56
50
|
render(): JSX.Element;
|
|
57
51
|
}
|
|
58
52
|
export default Tags;
|
package/Tags/Tags.js
CHANGED
|
@@ -79,15 +79,18 @@ export var Tags = /*#__PURE__*/function (_React$Component) {
|
|
|
79
79
|
inputValue: inputValue
|
|
80
80
|
});
|
|
81
81
|
},
|
|
82
|
-
onKeyDown: function onKeyDown(
|
|
82
|
+
onKeyDown: function onKeyDown(ev) {
|
|
83
83
|
if (!onChange) {
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
var newValue = Array.isArray(value) ? _toConsumableArray(value) : [];
|
|
88
88
|
var inputValue = _this2.state.inputValue || "";
|
|
89
|
+
/**
|
|
90
|
+
* We must cast as keycode only works with Event | string type.
|
|
91
|
+
*/
|
|
89
92
|
|
|
90
|
-
switch (keycode(
|
|
93
|
+
switch (keycode(ev)) {
|
|
91
94
|
case "enter":
|
|
92
95
|
if (inputValue) {
|
|
93
96
|
newValue.push(inputValue);
|
|
@@ -141,7 +144,8 @@ export var Tags = /*#__PURE__*/function (_React$Component) {
|
|
|
141
144
|
|
|
142
145
|
_defineProperty(Tags, "defaultProps", {
|
|
143
146
|
validation: {
|
|
144
|
-
isValid: null
|
|
147
|
+
isValid: null,
|
|
148
|
+
message: null
|
|
145
149
|
}
|
|
146
150
|
});
|
|
147
151
|
|
package/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import "rc-tooltip/assets/bootstrap_white.css";
|
|
3
3
|
import "./style.scss";
|
|
4
|
-
|
|
4
|
+
interface TooltipProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
content: React.ReactNode;
|
|
7
7
|
trigger?: string;
|
|
8
8
|
placement?: string;
|
|
9
9
|
className?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
10
|
+
}
|
|
11
|
+
interface State {
|
|
12
12
|
tooltipIsOpen: boolean;
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
14
|
/**
|
|
15
15
|
* Use Tooltip component to display a list of choices, once the handler is triggered.
|
|
16
16
|
*/
|
|
17
17
|
declare class Tooltip extends React.Component<TooltipProps, State> {
|
|
18
|
-
state:
|
|
19
|
-
tooltipIsOpen: boolean;
|
|
20
|
-
};
|
|
18
|
+
state: State;
|
|
21
19
|
onVisibleChange: (visible: boolean) => void;
|
|
22
20
|
render(): JSX.Element;
|
|
23
21
|
}
|
package/Tooltip/Tooltip.js
CHANGED
|
@@ -44,7 +44,12 @@ var Tooltip = /*#__PURE__*/function (_React$Component) {
|
|
|
44
44
|
_createClass(Tooltip, [{
|
|
45
45
|
key: "render",
|
|
46
46
|
value: function render() {
|
|
47
|
-
return /*#__PURE__*/React.createElement(RcTooltip
|
|
47
|
+
return /*#__PURE__*/React.createElement(RcTooltip
|
|
48
|
+
/**
|
|
49
|
+
* rc-tooltip types do not have animation as prop, but the rc-tooltip lib has.
|
|
50
|
+
*/
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
, Object.assign({
|
|
48
53
|
animation: "fade",
|
|
49
54
|
onVisibleChange: this.onVisibleChange,
|
|
50
55
|
overlay: this.props.content
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import nprogress from "nprogress";
|
|
3
3
|
import "./style.scss";
|
|
4
|
-
export
|
|
4
|
+
export interface TopProgressBarRender {
|
|
5
5
|
start: () => void;
|
|
6
6
|
finish: () => void;
|
|
7
|
-
nprogress: nprogress;
|
|
8
|
-
}
|
|
9
|
-
export
|
|
7
|
+
nprogress: typeof nprogress;
|
|
8
|
+
}
|
|
9
|
+
export interface TopProgressBarProps {
|
|
10
10
|
/**
|
|
11
11
|
* Elements that require top loading bar to be shown.
|
|
12
12
|
*/
|
|
13
13
|
children: (params: TopProgressBarRender) => React.ReactElement;
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
export declare const TopProgressBar: (props: TopProgressBarProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { TypographyProps as RmwcTypographyProps } from "@rmwc/typography";
|
|
3
|
-
|
|
3
|
+
export interface TypographyProps extends RmwcTypographyProps {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
className?: string;
|
|
6
6
|
style?: React.CSSProperties;
|
|
7
7
|
tag?: string;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
/**
|
|
10
10
|
* Use Ripple component to display a list of choices, once the handler is triggered.
|
|
11
11
|
*/
|
|
12
|
-
declare const Typography:
|
|
12
|
+
declare const Typography: React.FC<TypographyProps>;
|
|
13
13
|
export { Typography };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.24.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -81,11 +81,16 @@
|
|
|
81
81
|
"@storybook/addon-knobs": "^5.0.5",
|
|
82
82
|
"@storybook/addon-links": "^5.0.5",
|
|
83
83
|
"@storybook/react": "^5.2.8",
|
|
84
|
-
"@
|
|
85
|
-
"@
|
|
86
|
-
"@
|
|
87
|
-
"@
|
|
88
|
-
"@
|
|
84
|
+
"@types/nprogress": "^0.2.0",
|
|
85
|
+
"@types/rc-tooltip": "^3.7.6",
|
|
86
|
+
"@types/react-custom-scrollbars": "^4.0.10",
|
|
87
|
+
"@types/react-transition-group": "^4.4.4",
|
|
88
|
+
"@types/shortid": "^0.0.29",
|
|
89
|
+
"@webiny/cli": "^5.24.0",
|
|
90
|
+
"@webiny/form": "^5.24.0",
|
|
91
|
+
"@webiny/project-utils": "^5.24.0",
|
|
92
|
+
"@webiny/storybook-utils": "^5.24.0",
|
|
93
|
+
"@webiny/validation": "^5.24.0",
|
|
89
94
|
"babel-loader": "^8.0.0-beta.6",
|
|
90
95
|
"babel-plugin-emotion": "^9.2.8",
|
|
91
96
|
"execa": "^5.0.0",
|
|
@@ -133,5 +138,5 @@
|
|
|
133
138
|
]
|
|
134
139
|
}
|
|
135
140
|
},
|
|
136
|
-
"gitHead": "
|
|
141
|
+
"gitHead": "be0cbfcaa9247c658c44179af7943cc5d6d71bc7"
|
|
137
142
|
}
|