@plesk/ui-library 3.35.1 → 3.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Button/Button.js +1 -2
- package/cjs/components/Carousel/Carousel.js +25 -39
- package/cjs/components/Drawer/Header.js +71 -108
- package/cjs/components/Form/Form.js +5 -7
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +8 -67
- package/cjs/components/Grid/Grid.js +9 -71
- package/cjs/components/GridCol/GridCol.js +3 -54
- package/cjs/components/Link/Link.js +1 -2
- package/cjs/components/List/List.js +11 -8
- package/cjs/components/ProgressDialog/ProgressDialog.js +12 -85
- package/cjs/components/Rating/Rating.js +5 -36
- package/cjs/components/Skeleton/index.js +2 -2
- package/cjs/components/SplitButton/SplitButton.js +1 -2
- package/cjs/components/SwitchesPanel/SwitchesPanel.js +3 -26
- package/cjs/components/SwitchesPanelItem/SwitchesPanelItem.js +3 -57
- package/cjs/components/Toaster/Toaster.js +3 -3
- package/cjs/components/index.js +14 -11
- package/cjs/index.js +1 -1
- package/cjs/tests/renderer.js +7 -1
- package/dist/plesk-ui-library-rtl.css +1 -1
- package/dist/plesk-ui-library-rtl.css.map +1 -1
- package/dist/plesk-ui-library.css +1 -1
- package/dist/plesk-ui-library.css.map +1 -1
- package/dist/plesk-ui-library.js +273 -672
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +5 -5
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/Button/Button.js +1 -2
- package/esm/components/Carousel/Carousel.js +25 -37
- package/esm/components/Drawer/Header.js +70 -107
- package/esm/components/Form/Form.js +5 -7
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.js +8 -65
- package/esm/components/Grid/Grid.js +9 -69
- package/esm/components/GridCol/GridCol.js +2 -55
- package/esm/components/Link/Link.js +1 -2
- package/esm/components/List/List.js +11 -8
- package/esm/components/ProgressDialog/ProgressDialog.js +12 -83
- package/esm/components/Rating/Rating.js +5 -36
- package/esm/components/Skeleton/index.js +2 -2
- package/esm/components/SplitButton/SplitButton.js +1 -2
- package/esm/components/SwitchesPanel/SwitchesPanel.js +3 -24
- package/esm/components/SwitchesPanelItem/SwitchesPanelItem.js +3 -55
- package/esm/components/Toaster/Toaster.js +3 -1
- package/esm/components/index.js +1 -2
- package/esm/index.js +1 -1
- package/esm/tests/renderer.js +7 -1
- package/package.json +16 -17
- package/styleguide/build/bundle.6318f4a5.js +2 -0
- package/styleguide/index.html +2 -2
- package/types/src/components/Button/Button.d.ts +2 -3
- package/types/src/components/Carousel/Carousel.d.ts +58 -0
- package/types/src/components/Carousel/index.d.ts +2 -0
- package/types/src/components/Dialog/Dialog.d.ts +1 -1
- package/types/src/components/Dialog/index.d.ts +1 -1
- package/types/src/components/Drawer/Header.d.ts +4 -20
- package/types/src/components/Form/Form.d.ts +5 -0
- package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.d.ts +53 -0
- package/types/src/components/FormFieldCheckbox/index.d.ts +2 -0
- package/types/src/components/FormFieldPassword/generatePassword.d.ts +2 -0
- package/types/src/components/Grid/Grid.d.ts +97 -0
- package/types/src/components/Grid/index.d.ts +2 -0
- package/types/src/components/GridCol/GridCol.d.ts +53 -0
- package/types/src/components/GridCol/index.d.ts +2 -0
- package/types/src/components/Link/Link.d.ts +1 -2
- package/types/src/components/LocaleProvider/LocaleProvider.d.ts +1 -1
- package/types/src/components/ProgressDialog/ProgressDialog.d.ts +125 -0
- package/types/src/components/ProgressDialog/index.d.ts +2 -0
- package/types/src/components/Rating/Rating.d.ts +27 -0
- package/types/src/components/Rating/index.d.ts +2 -0
- package/types/src/components/Skeleton/Skeleton.d.ts +3 -5
- package/types/src/components/Skeleton/SkeletonTabs.d.ts +4 -4
- package/types/src/components/Skeleton/SkeletonText.d.ts +2 -2
- package/types/src/components/Skeleton/index.d.ts +4 -1
- package/types/src/components/SplitButton/SplitButton.d.ts +1 -2
- package/types/src/components/SwitchesPanel/SwitchesPanel.d.ts +24 -0
- package/types/src/components/SwitchesPanel/index.d.ts +2 -0
- package/types/src/components/SwitchesPanelItem/SwitchesPanelItem.d.ts +78 -0
- package/types/src/components/SwitchesPanelItem/index.d.ts +2 -0
- package/types/src/components/index.d.ts +10 -2
- package/types/src/components/utils.d.ts +1 -1
- package/cjs/components/Alert/Alert.stories.js +0 -34
- package/cjs/components/Button/Button.stories.js +0 -109
- package/cjs/components/Cuttable/Cuttable.stories.js +0 -46
- package/cjs/components/Dialog/Dialog.stories.js +0 -49
- package/cjs/components/Drawer/Drawer.stories.js +0 -65
- package/cjs/components/Form/Form.stories.js +0 -35
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +0 -32
- package/cjs/components/Icon/Icon.stories.js +0 -32
- package/cjs/components/ItemLink/ItemLink.stories.js +0 -20
- package/cjs/components/ItemList/ItemList.stories.js +0 -122
- package/cjs/components/List/List.stories.js +0 -152
- package/cjs/components/Markdown/Markdown.stories.js +0 -51
- package/cjs/components/Menu/Menu.stories.js +0 -77
- package/cjs/components/Popover/Popover.stories.js +0 -60
- package/cjs/components/Select/Select.stories.js +0 -57
- package/cjs/components/Skeleton/Skeleton.stories.js +0 -24
- package/cjs/components/Skeleton/SkeletonTabs.stories.js +0 -15
- package/cjs/components/Skeleton/SkeletonText.stories.js +0 -33
- package/cjs/components/Status/Status.stories.js +0 -19
- package/cjs/components/Tabs/Tabs.stories.js +0 -24
- package/dist/.DS_Store +0 -0
- package/dist/images/default.svg +0 -1
- package/dist/images/filtered.svg +0 -1
- package/esm/components/Alert/Alert.stories.js +0 -27
- package/esm/components/Button/Button.stories.js +0 -99
- package/esm/components/Cuttable/Cuttable.stories.js +0 -39
- package/esm/components/Dialog/Dialog.stories.js +0 -42
- package/esm/components/Drawer/Drawer.stories.js +0 -56
- package/esm/components/Form/Form.stories.js +0 -27
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +0 -23
- package/esm/components/Icon/Icon.stories.js +0 -23
- package/esm/components/ItemLink/ItemLink.stories.js +0 -12
- package/esm/components/ItemList/ItemList.stories.js +0 -109
- package/esm/components/List/List.stories.js +0 -139
- package/esm/components/Markdown/Markdown.stories.js +0 -43
- package/esm/components/Menu/Menu.stories.js +0 -65
- package/esm/components/Popover/Popover.stories.js +0 -52
- package/esm/components/Select/Select.stories.js +0 -48
- package/esm/components/Skeleton/Skeleton.stories.js +0 -15
- package/esm/components/Skeleton/SkeletonTabs.stories.js +0 -7
- package/esm/components/Skeleton/SkeletonText.stories.js +0 -23
- package/esm/components/Status/Status.stories.js +0 -11
- package/esm/components/Tabs/Tabs.stories.js +0 -16
- package/styleguide/build/bundle.edc3f2a1.js +0 -2
- package/types/src/components/Alert/Alert.stories.d.ts +0 -11
- package/types/src/components/Button/Button.stories.d.ts +0 -17
- package/types/src/components/Cuttable/Cuttable.stories.d.ts +0 -17
- package/types/src/components/Dialog/Dialog.stories.d.ts +0 -25
- package/types/src/components/Drawer/Drawer.stories.d.ts +0 -43
- package/types/src/components/Form/Form.stories.d.ts +0 -13
- package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.stories.d.ts +0 -20
- package/types/src/components/Icon/Icon.stories.d.ts +0 -7
- package/types/src/components/ItemLink/ItemLink.stories.d.ts +0 -12
- package/types/src/components/ItemList/ItemList.stories.d.ts +0 -172
- package/types/src/components/List/List.stories.d.ts +0 -30
- package/types/src/components/Markdown/Markdown.stories.d.ts +0 -10
- package/types/src/components/Menu/Menu.stories.d.ts +0 -20
- package/types/src/components/Popover/Popover.stories.d.ts +0 -25
- package/types/src/components/Select/Select.stories.d.ts +0 -12
- package/types/src/components/Skeleton/Skeleton.stories.d.ts +0 -15
- package/types/src/components/Skeleton/SkeletonTabs.stories.d.ts +0 -5
- package/types/src/components/Skeleton/SkeletonText.stories.d.ts +0 -23
- package/types/src/components/Status/Status.stories.d.ts +0 -11
- package/types/src/components/Tabs/Tabs.stories.d.ts +0 -10
- package/types/src/tests/index.d.ts +0 -1
- package/types/src/tests/renderer.d.ts +0 -23
- /package/styleguide/build/{bundle.edc3f2a1.js.LICENSE.txt → bundle.6318f4a5.js.LICENSE.txt} +0 -0
package/styleguide/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
7
|
-
<title>Plesk UI Library 3.35.
|
|
7
|
+
<title>Plesk UI Library 3.35.2</title>
|
|
8
8
|
<meta name="msapplication-TileColor" content="#da532c">
|
|
9
9
|
<meta name="theme-color" content="#ffffff">
|
|
10
10
|
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KWST26V"
|
|
27
27
|
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
|
28
28
|
<!-- End Google Tag Manager (noscript) -->
|
|
29
|
-
<script src="build/bundle.
|
|
29
|
+
<script src="build/bundle.6318f4a5.js"></script>
|
|
30
30
|
</body>
|
|
31
31
|
</html>
|
|
@@ -95,11 +95,10 @@ declare type ButtonComponent<Component extends ElementType = 'button'> = {
|
|
|
95
95
|
defaultProps?: Partial<ButtonProps<Component>>;
|
|
96
96
|
displayName?: string;
|
|
97
97
|
} & (<C extends ElementType = Component>(props: ButtonProps<C>) => ReactElement | null);
|
|
98
|
-
declare const _default: ButtonComponent<"button">;
|
|
99
98
|
/**
|
|
100
99
|
* `Button` component is used for executing actions, changing the application state, opening forms or dialog windows, and submitting data.
|
|
101
100
|
* As a rule, you should not use buttons for navigation between individual pages (use `Link` instead).
|
|
102
|
-
*
|
|
103
|
-
* Since: 0.0.37
|
|
101
|
+
* @since 0.0.37
|
|
104
102
|
*/
|
|
103
|
+
declare const _default: ButtonComponent<"button">;
|
|
105
104
|
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Component, CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { ContentRect } from 'react-measure';
|
|
3
|
+
import './Carousel.less';
|
|
4
|
+
export interface CarouselProps {
|
|
5
|
+
/**
|
|
6
|
+
* Slides
|
|
7
|
+
* @since 0.0.42
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
baseClassName?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Carousel component is used for optimizing page space by displaying only some parts
|
|
21
|
+
* of entire content in a cyclic view.
|
|
22
|
+
* @since 0.0.42
|
|
23
|
+
*/
|
|
24
|
+
declare class Carousel extends Component<CarouselProps> {
|
|
25
|
+
static defaultProps: {
|
|
26
|
+
children: null;
|
|
27
|
+
className: null;
|
|
28
|
+
baseClassName: string;
|
|
29
|
+
};
|
|
30
|
+
constructor(props: CarouselProps);
|
|
31
|
+
state: {
|
|
32
|
+
showControls: boolean;
|
|
33
|
+
current: number;
|
|
34
|
+
next: number;
|
|
35
|
+
moving: boolean;
|
|
36
|
+
slideWidths: never[];
|
|
37
|
+
totalWidth: number;
|
|
38
|
+
};
|
|
39
|
+
componentDidMount(): void;
|
|
40
|
+
componentDidUpdate(): void;
|
|
41
|
+
componentWillUnmount(): void;
|
|
42
|
+
private readonly speed;
|
|
43
|
+
private readonly playSpeed;
|
|
44
|
+
private isRtl;
|
|
45
|
+
private playTimer;
|
|
46
|
+
private movingCallback;
|
|
47
|
+
private readonly rootRef;
|
|
48
|
+
private readonly genuineRef;
|
|
49
|
+
handlePrevClick(): void;
|
|
50
|
+
handleNextClick(): void;
|
|
51
|
+
play(): void;
|
|
52
|
+
stop(): void;
|
|
53
|
+
setCurrentSlide(next: number): void;
|
|
54
|
+
handleResize({ bounds }: ContentRect): void;
|
|
55
|
+
listStyle(): CSSProperties;
|
|
56
|
+
render(): JSX.Element;
|
|
57
|
+
}
|
|
58
|
+
export default Carousel;
|
|
@@ -4,7 +4,7 @@ import Form, { FormProps, FormValues } from '../Form';
|
|
|
4
4
|
import { ButtonProps } from '../Button';
|
|
5
5
|
import '../../helpers/base.less';
|
|
6
6
|
import './Dialog.less';
|
|
7
|
-
declare type ImageType = string | ReactElement | HTMLAttributes<HTMLImageElement>;
|
|
7
|
+
export declare type ImageType = string | ReactElement | HTMLAttributes<HTMLImageElement>;
|
|
8
8
|
export declare type DialogProps<FV extends FormValues = FormValues> = {
|
|
9
9
|
/**
|
|
10
10
|
* Toggles visibility.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './Dialog';
|
|
2
|
-
export type { DialogProps } from './Dialog';
|
|
2
|
+
export type { DialogProps, ImageType } from './Dialog';
|
|
@@ -1,28 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import './Header.less';
|
|
3
|
-
|
|
3
|
+
interface HeaderProps {
|
|
4
4
|
baseClassName?: string;
|
|
5
5
|
onClose?: () => void;
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
backButton?: boolean;
|
|
8
8
|
hideButton?: boolean;
|
|
9
9
|
tabs?: ReactNode;
|
|
10
|
-
};
|
|
11
|
-
export default class Header extends Component<HeaderProps> {
|
|
12
|
-
static defaultProps: {
|
|
13
|
-
onClose: null;
|
|
14
|
-
baseClassName: string;
|
|
15
|
-
backButton: boolean;
|
|
16
|
-
hideButton: boolean;
|
|
17
|
-
tabs: undefined;
|
|
18
|
-
};
|
|
19
|
-
componentDidMount(): void;
|
|
20
|
-
private isRtl;
|
|
21
|
-
renderBackButton(): JSX.Element;
|
|
22
|
-
renderHideButton(): JSX.Element;
|
|
23
|
-
renderCloseButton({ disabled }?: {
|
|
24
|
-
disabled?: boolean | undefined;
|
|
25
|
-
}): JSX.Element;
|
|
26
|
-
render(): JSX.Element;
|
|
27
10
|
}
|
|
28
|
-
|
|
11
|
+
declare const Header: ({ baseClassName, onClose, children, backButton, hideButton, tabs, ...props }: HeaderProps) => JSX.Element;
|
|
12
|
+
export default Header;
|
|
@@ -101,5 +101,10 @@ export type { FormValues, FormInstanceHandles };
|
|
|
101
101
|
declare type FormComponent = <FV extends FormValues>(props: FormProps<FV> & {
|
|
102
102
|
ref?: ForwardedRef<FormInstanceHandles>;
|
|
103
103
|
}) => ReactElement;
|
|
104
|
+
/**
|
|
105
|
+
* `Form` component is used for entering and submitting of user data.
|
|
106
|
+
* [More details about designing of forms.](#!/Good%20Forms)
|
|
107
|
+
* @since 0.0.54
|
|
108
|
+
*/
|
|
104
109
|
declare const _default: FormComponent;
|
|
105
110
|
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import FormField from '../FormField';
|
|
3
|
+
import '../../helpers/base.less';
|
|
4
|
+
import './FormFieldCheckbox.less';
|
|
5
|
+
export interface FormFieldCheckboxProps extends ComponentProps<typeof FormField> {
|
|
6
|
+
/**
|
|
7
|
+
* Disabled state of field.
|
|
8
|
+
* @since 0.1.0
|
|
9
|
+
*/
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Custom checked value. Default is boolean true.
|
|
13
|
+
* @since 0.0.59
|
|
14
|
+
*/
|
|
15
|
+
checkedValue?: boolean | string;
|
|
16
|
+
/**
|
|
17
|
+
* Custom unchecked value. Default is boolean false.
|
|
18
|
+
* @since 0.0.59
|
|
19
|
+
*/
|
|
20
|
+
uncheckedValue?: boolean | string;
|
|
21
|
+
/**
|
|
22
|
+
* The browser will automatically focus on the component upon rendering the screen
|
|
23
|
+
* @since 1.9.0
|
|
24
|
+
*/
|
|
25
|
+
autoFocus?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @ignore
|
|
28
|
+
*/
|
|
29
|
+
label?: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* @ignore
|
|
32
|
+
*/
|
|
33
|
+
required?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @ignore
|
|
36
|
+
*/
|
|
37
|
+
className?: string;
|
|
38
|
+
/**
|
|
39
|
+
* @ignore
|
|
40
|
+
*/
|
|
41
|
+
baseClassName?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Adds an info icon with the additional description.
|
|
44
|
+
*/
|
|
45
|
+
fullDescription?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* `FormFieldCheckbox` component is used for turning an option on or off
|
|
49
|
+
* and selecting or deselecting an item.
|
|
50
|
+
* @since 0.0.58
|
|
51
|
+
*/
|
|
52
|
+
declare const FormFieldCheckbox: ({ className, label, autoFocus, required, checkedValue, uncheckedValue, baseClassName, ...props }: FormFieldCheckboxProps) => JSX.Element;
|
|
53
|
+
export default FormFieldCheckbox;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
|
2
|
+
import { ContentRect } from 'react-measure';
|
|
3
|
+
import './Grid.less';
|
|
4
|
+
declare type ColumnsNumber = 1 | 2 | 3 | 4 | 5 | 6 | 'auto';
|
|
5
|
+
declare type CalculateMaxColumns = (options: {
|
|
6
|
+
width: number;
|
|
7
|
+
}) => number;
|
|
8
|
+
export interface GridProps {
|
|
9
|
+
/**
|
|
10
|
+
* Content of the `Grid`.
|
|
11
|
+
* @since 0.0.48
|
|
12
|
+
*/
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @ignore
|
|
20
|
+
*/
|
|
21
|
+
baseClassName?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Minimal column width
|
|
24
|
+
* @since 0.0.50
|
|
25
|
+
*/
|
|
26
|
+
minColumnWidth?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Maximum columns number
|
|
29
|
+
* @since 0.0.53
|
|
30
|
+
*/
|
|
31
|
+
maxColumnsNumber?: number | CalculateMaxColumns;
|
|
32
|
+
/**
|
|
33
|
+
* Number of columns for `xs` breakpoint
|
|
34
|
+
* @since 0.0.53
|
|
35
|
+
*/
|
|
36
|
+
xs?: ColumnsNumber;
|
|
37
|
+
/**
|
|
38
|
+
* Number of columns for `sm` breakpoint
|
|
39
|
+
* @since 0.0.48
|
|
40
|
+
*/
|
|
41
|
+
sm?: ColumnsNumber;
|
|
42
|
+
/**
|
|
43
|
+
* Number of columns for `md` breakpoint
|
|
44
|
+
* @since 0.0.48
|
|
45
|
+
*/
|
|
46
|
+
md?: ColumnsNumber;
|
|
47
|
+
/**
|
|
48
|
+
* Number of columns for `lg` breakpoint
|
|
49
|
+
* @since 0.0.48
|
|
50
|
+
*/
|
|
51
|
+
lg?: ColumnsNumber;
|
|
52
|
+
/**
|
|
53
|
+
* Number of columns for `xl` breakpoint
|
|
54
|
+
* @since 0.0.48
|
|
55
|
+
*/
|
|
56
|
+
xl?: ColumnsNumber;
|
|
57
|
+
/**
|
|
58
|
+
* Specifying the gutters between grid items
|
|
59
|
+
* @since 0.0.53
|
|
60
|
+
*/
|
|
61
|
+
gap?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
62
|
+
/**
|
|
63
|
+
* Columns number change notifier
|
|
64
|
+
* @since 0.0.50
|
|
65
|
+
*/
|
|
66
|
+
onColumnsChange?: (columnsNumber: number) => void;
|
|
67
|
+
}
|
|
68
|
+
interface GridState {
|
|
69
|
+
xs: ColumnsNumber | number | undefined;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* `Grid` component is used to layout and align content based on 12-column system.
|
|
73
|
+
* @since 0.0.48
|
|
74
|
+
*/
|
|
75
|
+
declare class Grid extends Component<GridProps, GridState> {
|
|
76
|
+
static defaultProps: {
|
|
77
|
+
children: null;
|
|
78
|
+
className: null;
|
|
79
|
+
baseClassName: string;
|
|
80
|
+
minColumnWidth: null;
|
|
81
|
+
maxColumnsNumber: number;
|
|
82
|
+
xs: null;
|
|
83
|
+
sm: null;
|
|
84
|
+
md: null;
|
|
85
|
+
lg: null;
|
|
86
|
+
xl: null;
|
|
87
|
+
gap: null;
|
|
88
|
+
onColumnsChange: null;
|
|
89
|
+
};
|
|
90
|
+
state: {
|
|
91
|
+
xs: ColumnsNumber | undefined;
|
|
92
|
+
};
|
|
93
|
+
handleResize: ({ bounds }: ContentRect) => void;
|
|
94
|
+
getGapSize(): 0 | 8 | 12 | 16 | 24 | 32;
|
|
95
|
+
render(): JSX.Element;
|
|
96
|
+
}
|
|
97
|
+
export default Grid;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
declare type GridColSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
3
|
+
export interface GridColProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Content of the `GridCol`.
|
|
6
|
+
* @since 0.0.48
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
16
|
+
baseClassName?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Column size for `xs` breakpoint
|
|
19
|
+
* @type number (1...12)
|
|
20
|
+
* @since 0.0.53
|
|
21
|
+
*/
|
|
22
|
+
xs?: GridColSize;
|
|
23
|
+
/**
|
|
24
|
+
* Column size for `sm` breakpoint
|
|
25
|
+
* @type number (1...12)
|
|
26
|
+
* @since 0.0.53
|
|
27
|
+
*/
|
|
28
|
+
sm?: GridColSize;
|
|
29
|
+
/**
|
|
30
|
+
* Column size for `sm` breakpoint
|
|
31
|
+
* @type number (1...12)
|
|
32
|
+
* @since 0.0.53
|
|
33
|
+
*/
|
|
34
|
+
md?: GridColSize;
|
|
35
|
+
/**
|
|
36
|
+
* Column size for `md` breakpoint
|
|
37
|
+
* @type number (1...12)
|
|
38
|
+
* @since 0.0.53
|
|
39
|
+
*/
|
|
40
|
+
lg?: GridColSize;
|
|
41
|
+
/**
|
|
42
|
+
* Column size for `lg` breakpoint
|
|
43
|
+
* @type number (1...12)
|
|
44
|
+
* @since 0.0.53
|
|
45
|
+
*/
|
|
46
|
+
xl?: GridColSize;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* `GridCol` component is a part of [Grid](#!/Grid) component.
|
|
50
|
+
* @since 0.0.48
|
|
51
|
+
*/
|
|
52
|
+
declare const GridCol: ({ baseClassName, className, children, xs, sm, md, lg, xl, ...props }: GridColProps) => JSX.Element;
|
|
53
|
+
export default GridCol;
|
|
@@ -42,8 +42,7 @@ export declare type LinkProps<Component extends ElementType = 'a'> = {
|
|
|
42
42
|
} & PolymorphicComponentProps<Component, BaseLinkProps>;
|
|
43
43
|
/**
|
|
44
44
|
* `Link` is used for navigation purposes.
|
|
45
|
-
*
|
|
46
|
-
* Since: 1.9.0
|
|
45
|
+
* @since 1.9.0
|
|
47
46
|
*/
|
|
48
47
|
declare const Link: <Component extends ElementType<any> = "a">({ baseClassName, className, onClick, disabled, pseudo, component, children, ...other }: LinkProps<Component>) => JSX.Element;
|
|
49
48
|
export default Link;
|
|
@@ -7,7 +7,7 @@ declare type Messages = {
|
|
|
7
7
|
declare type Translate = (key: string, params?: {
|
|
8
8
|
[key: string]: unknown;
|
|
9
9
|
}, fallback?: string) => string | ReactNode[];
|
|
10
|
-
export declare const useTranslate: (namespace?: string
|
|
10
|
+
export declare const useTranslate: (namespace?: string) => Translate;
|
|
11
11
|
declare type LocaleProviderProps = {
|
|
12
12
|
/**
|
|
13
13
|
* Localization messages
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
|
2
|
+
import { ImageType } from '../Dialog';
|
|
3
|
+
import { ProgressProps } from '../Progress';
|
|
4
|
+
import '../../helpers/base.less';
|
|
5
|
+
import './ProgressDialog.less';
|
|
6
|
+
export interface ProgressDialogProps {
|
|
7
|
+
/**
|
|
8
|
+
* Toggles visibility.
|
|
9
|
+
* @since 1.2.0
|
|
10
|
+
*/
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Banner. Renders in front of content as wide as dialog.
|
|
14
|
+
* @since 1.2.0
|
|
15
|
+
*/
|
|
16
|
+
banner?: ImageType;
|
|
17
|
+
/**
|
|
18
|
+
* Image. Renders into content.
|
|
19
|
+
* @since 1.2.0
|
|
20
|
+
*/
|
|
21
|
+
image?: ImageType;
|
|
22
|
+
/**
|
|
23
|
+
* Title
|
|
24
|
+
* @since 1.2.0
|
|
25
|
+
*/
|
|
26
|
+
title?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Description of the `ProgressDialog`.
|
|
29
|
+
* @since 1.2.0
|
|
30
|
+
*/
|
|
31
|
+
description?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Actions which will be shown in Dialog header.
|
|
34
|
+
* @since 1.2.0
|
|
35
|
+
*/
|
|
36
|
+
actions?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the dialog should be canceled with the cancel button.
|
|
39
|
+
* @since 1.2.0
|
|
40
|
+
*/
|
|
41
|
+
cancelable?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The interval of time to auto close dialog when it successfully finished.
|
|
44
|
+
* Set `null` for disable auto close.
|
|
45
|
+
* @since 1.2.0
|
|
46
|
+
*/
|
|
47
|
+
autoCloseTimeout?: number | null;
|
|
48
|
+
/**
|
|
49
|
+
* On cancel event handler.
|
|
50
|
+
* @since 1.2.0
|
|
51
|
+
*/
|
|
52
|
+
onCancel?: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* On close event handler.
|
|
55
|
+
* @since 1.2.0
|
|
56
|
+
*/
|
|
57
|
+
onClose?: () => void;
|
|
58
|
+
/**
|
|
59
|
+
* On finish event handler.
|
|
60
|
+
* @since 1.2.0
|
|
61
|
+
*/
|
|
62
|
+
onFinish?: () => void;
|
|
63
|
+
/**
|
|
64
|
+
* On fail event handler.
|
|
65
|
+
* @since 1.2.0
|
|
66
|
+
*/
|
|
67
|
+
onFail?: () => void;
|
|
68
|
+
/**
|
|
69
|
+
* Content of the `ProgressDialog`.
|
|
70
|
+
* @since 1.2.0
|
|
71
|
+
*/
|
|
72
|
+
children?: ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* @ignore
|
|
75
|
+
*/
|
|
76
|
+
className?: string;
|
|
77
|
+
/**
|
|
78
|
+
* @ignore
|
|
79
|
+
*/
|
|
80
|
+
baseClassName?: string;
|
|
81
|
+
}
|
|
82
|
+
declare type ProgressDialogState = {
|
|
83
|
+
isOpen: boolean;
|
|
84
|
+
isFinished: boolean;
|
|
85
|
+
isFailed: boolean;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* `ProgressDialog` is a [Dialog](#!/Dialog) combined with of [Progress](#!/Progress) component.
|
|
89
|
+
* @since 1.2.0
|
|
90
|
+
*/
|
|
91
|
+
declare class ProgressDialog extends Component<ProgressDialogProps, ProgressDialogState> {
|
|
92
|
+
static defaultProps: {
|
|
93
|
+
isOpen: boolean;
|
|
94
|
+
banner: null;
|
|
95
|
+
image: null;
|
|
96
|
+
title: null;
|
|
97
|
+
description: null;
|
|
98
|
+
actions: null;
|
|
99
|
+
cancelable: boolean;
|
|
100
|
+
autoCloseTimeout: number;
|
|
101
|
+
onCancel: null;
|
|
102
|
+
onClose: null;
|
|
103
|
+
onFinish: null;
|
|
104
|
+
onFail: null;
|
|
105
|
+
children: null;
|
|
106
|
+
className: null;
|
|
107
|
+
baseClassName: string;
|
|
108
|
+
};
|
|
109
|
+
static getDerivedStateFromProps({ isOpen }: ProgressDialogState): {
|
|
110
|
+
isOpen: boolean;
|
|
111
|
+
};
|
|
112
|
+
state: {
|
|
113
|
+
isOpen: boolean;
|
|
114
|
+
isFinished: boolean;
|
|
115
|
+
isFailed: boolean;
|
|
116
|
+
};
|
|
117
|
+
componentDidUpdate(_: ProgressDialogProps, prevState: ProgressDialogState): void;
|
|
118
|
+
componentWillUnmount(): void;
|
|
119
|
+
private closeTimeout;
|
|
120
|
+
clearCloseTimeout(): void;
|
|
121
|
+
handleStatusChange: ProgressProps['onStatusChange'];
|
|
122
|
+
handleClose: () => void;
|
|
123
|
+
render(): JSX.Element;
|
|
124
|
+
}
|
|
125
|
+
export default ProgressDialog;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import './Rating.less';
|
|
2
|
+
export interface RatingProps {
|
|
3
|
+
/**
|
|
4
|
+
* Rating value from 0 to 5.
|
|
5
|
+
* @since 0.0.42
|
|
6
|
+
*/
|
|
7
|
+
value?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Small variant.
|
|
10
|
+
* @since 0.0.42
|
|
11
|
+
*/
|
|
12
|
+
small?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* @ignore
|
|
19
|
+
*/
|
|
20
|
+
baseClassName?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* `Rating` component is used for showing and collecting feedback of users' opinion in 0-5 grade scale.
|
|
24
|
+
* @since 0.0.42
|
|
25
|
+
*/
|
|
26
|
+
declare const Rating: ({ baseClassName, className, value, small, ...props }: RatingProps) => JSX.Element;
|
|
27
|
+
export default Rating;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, FC, JSX } from 'react';
|
|
1
|
+
import { ComponentType, FC, JSX, CSSProperties } from 'react';
|
|
2
2
|
import './Skeleton.less';
|
|
3
3
|
export declare type SkeletonProps = {
|
|
4
4
|
/**
|
|
@@ -20,12 +20,10 @@ export declare type SkeletonProps = {
|
|
|
20
20
|
*/
|
|
21
21
|
height?: number | string;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Custom styles for skeleton
|
|
24
24
|
* @since 3.28.0
|
|
25
25
|
*/
|
|
26
|
-
style?:
|
|
27
|
-
[key: string]: string;
|
|
28
|
-
};
|
|
26
|
+
style?: CSSProperties;
|
|
29
27
|
/**
|
|
30
28
|
* Component to render as the root element.
|
|
31
29
|
* @since 3.28.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import './SkeletonTabs.less';
|
|
3
|
-
|
|
3
|
+
export interface SkeletonTabsProps {
|
|
4
4
|
/**
|
|
5
5
|
* Number of tabs
|
|
6
6
|
* @since 3.28.0
|
|
@@ -9,12 +9,12 @@ declare type SkeletonTabsProps = {
|
|
|
9
9
|
/**
|
|
10
10
|
* @ignore
|
|
11
11
|
*/
|
|
12
|
-
className
|
|
12
|
+
className?: string;
|
|
13
13
|
/**
|
|
14
14
|
* @ignore
|
|
15
15
|
*/
|
|
16
|
-
baseClassName
|
|
17
|
-
}
|
|
16
|
+
baseClassName?: string;
|
|
17
|
+
}
|
|
18
18
|
/**
|
|
19
19
|
* Skeleton for tabs component
|
|
20
20
|
* @since `3.28.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC, ComponentType, JSX } from 'react';
|
|
2
2
|
import { SkeletonProps } from './Skeleton';
|
|
3
3
|
import './SkeletonText.less';
|
|
4
|
-
|
|
4
|
+
export interface SkeletonTextProps {
|
|
5
5
|
/**
|
|
6
6
|
* Number of rows
|
|
7
7
|
* @since 3.28.0
|
|
@@ -25,7 +25,7 @@ declare type SkeletonTextProps = {
|
|
|
25
25
|
* @ignore
|
|
26
26
|
*/
|
|
27
27
|
className?: string;
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
/**
|
|
30
30
|
* Skeleton for text-containing components. Is can be used inside Paragraph, as title, or single text
|
|
31
31
|
* @since 3.28.0
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { default } from './Skeleton';
|
|
2
|
-
export {
|
|
2
|
+
export type { SkeletonProps } from './Skeleton';
|
|
3
3
|
export { default as SkeletonTabs } from './SkeletonTabs';
|
|
4
|
+
export type { SkeletonTabsProps } from './SkeletonTabs';
|
|
5
|
+
export { default as SkeletonText } from './SkeletonText';
|
|
6
|
+
export type { SkeletonTextProps } from './SkeletonText';
|
|
@@ -46,8 +46,7 @@ export interface SplitButtonProps {
|
|
|
46
46
|
* `Split Button` is a combination of a standard [Button](#!/Button) with a [Dropdown](#!/Dropdown) menu.
|
|
47
47
|
* It is used for grouping several related actions when one of the actions should be accessible immediately
|
|
48
48
|
* because it is used more often than others.
|
|
49
|
-
*
|
|
50
|
-
* Since: 0.0.40
|
|
49
|
+
* @since 0.0.40
|
|
51
50
|
*/
|
|
52
51
|
declare const SplitButton: ({ baseClassName, className, menu, children, onClick, onKeyDown, icon, size, ...props }: SplitButtonProps) => JSX.Element;
|
|
53
52
|
export default SplitButton;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import '../../helpers/base.less';
|
|
3
|
+
import './SwitchesPanel.less';
|
|
4
|
+
export interface SwitchesPanelProps {
|
|
5
|
+
/**
|
|
6
|
+
* Content of the `SwitchesPanel`. Recommended to use [SwitchesPanelItem](#!/SwitchesPanelItem) components.
|
|
7
|
+
* @since 0.3.0
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactElement[] | ReactElement;
|
|
10
|
+
/**
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
baseClassName?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* `SwitchesPanel` component is used for grouping several [SwitchesPanelItems](#!/SwitchesPanelItem) into one set.
|
|
21
|
+
* @since 0.3.0
|
|
22
|
+
*/
|
|
23
|
+
declare const SwitchesPanel: ({ baseClassName, className, children, ...props }: SwitchesPanelProps) => JSX.Element;
|
|
24
|
+
export default SwitchesPanel;
|