@plesk/ui-library 3.35.3 → 3.35.5
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/List/List.js +1 -1
- package/cjs/components/Pagination/Pagination.js +3 -3
- package/cjs/components/Progress/Progress.js +7 -0
- package/cjs/components/ProgressDialog/ProgressDialog.js +10 -2
- package/cjs/components/SegmentedControl/SegmentedControl.js +23 -82
- package/cjs/components/SegmentedControl/index.js +9 -2
- package/cjs/components/TextArea/TextArea.js +1 -1
- package/cjs/components/index.js +8 -1
- package/cjs/index.js +1 -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 +74 -104
- 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/List/List.js +1 -1
- package/esm/components/Pagination/Pagination.js +3 -3
- package/esm/components/Progress/Progress.js +8 -1
- package/esm/components/ProgressDialog/ProgressDialog.js +11 -3
- package/esm/components/SegmentedControl/SegmentedControl.js +22 -81
- package/esm/components/SegmentedControl/index.js +2 -1
- package/esm/components/TextArea/TextArea.js +1 -1
- package/esm/components/index.js +1 -0
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/styleguide/build/bundle.ecbe3015.js +2 -0
- package/styleguide/index.html +2 -2
- package/types/src/components/Menu/MenuItem.d.ts +1 -1
- package/types/src/components/ProgressDialog/ProgressDialog.d.ts +2 -0
- package/types/src/components/SegmentedControl/SegmentedControl.d.ts +112 -0
- package/types/src/components/SegmentedControl/index.d.ts +3 -0
- package/types/src/components/TextArea/TextArea.d.ts +1 -1
- package/types/src/components/index.d.ts +2 -0
- package/styleguide/build/bundle.8058bbce.js +0 -2
- /package/styleguide/build/{bundle.8058bbce.js.LICENSE.txt → bundle.ecbe3015.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.5</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.ecbe3015.js"></script>
|
|
30
30
|
</body>
|
|
31
31
|
</html>
|
|
@@ -45,5 +45,5 @@ export declare type MenuItemProps<Component extends ElementType = 'div'> = {
|
|
|
45
45
|
* `MenuItem` is a part of [Menu](#!/Menu) component.
|
|
46
46
|
* @since 0.0.55
|
|
47
47
|
*/
|
|
48
|
-
declare const MenuItem: ({ className, children, onClick, icon, label, tooltip, baseClassName, disabled, active, ...props }: MenuItemProps) => JSX.Element;
|
|
48
|
+
declare const MenuItem: <Component extends ElementType<any> = "div">({ className, children, onClick, icon, label, tooltip, baseClassName, disabled, active, ...props }: MenuItemProps<Component>) => JSX.Element;
|
|
49
49
|
export default MenuItem;
|
|
@@ -82,6 +82,7 @@ export interface ProgressDialogProps {
|
|
|
82
82
|
declare type ProgressDialogState = {
|
|
83
83
|
isOpen: boolean;
|
|
84
84
|
isFinished: boolean;
|
|
85
|
+
isFinishedWithWarnings: boolean;
|
|
85
86
|
isFailed: boolean;
|
|
86
87
|
};
|
|
87
88
|
/**
|
|
@@ -112,6 +113,7 @@ declare class ProgressDialog extends Component<ProgressDialogProps, ProgressDial
|
|
|
112
113
|
state: {
|
|
113
114
|
isOpen: boolean;
|
|
114
115
|
isFinished: boolean;
|
|
116
|
+
isFinishedWithWarnings: boolean;
|
|
115
117
|
isFailed: boolean;
|
|
116
118
|
};
|
|
117
119
|
componentDidUpdate(_: ProgressDialogProps, prevState: ProgressDialogState): void;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Component, CSSProperties, ReactChild, ReactNode } from 'react';
|
|
2
|
+
import '../../helpers/base.less';
|
|
3
|
+
import './SegmentedControl.less';
|
|
4
|
+
declare type SingleProps<T> = {
|
|
5
|
+
multiple?: false;
|
|
6
|
+
/**
|
|
7
|
+
* Selected value or an array of values (for multiple version).
|
|
8
|
+
* Used in controlled version or as default value in uncontrolled version (with onChange property)
|
|
9
|
+
* @since 0.0.68
|
|
10
|
+
*/
|
|
11
|
+
selected?: T;
|
|
12
|
+
/**
|
|
13
|
+
* On change selection callback for uncontrolled mode.
|
|
14
|
+
* @since 0.0.68
|
|
15
|
+
*/
|
|
16
|
+
onChange?: (newSelection: T) => void;
|
|
17
|
+
};
|
|
18
|
+
declare type MultipleProps<T> = {
|
|
19
|
+
multiple: true;
|
|
20
|
+
selected?: T[];
|
|
21
|
+
onChange?: (newSelection: T[]) => void;
|
|
22
|
+
};
|
|
23
|
+
declare type MultipleBaseProps<T> = MultipleProps<T> | SingleProps<T>;
|
|
24
|
+
export declare type SegmentedControlProps<T> = {
|
|
25
|
+
/**
|
|
26
|
+
* Label
|
|
27
|
+
* @since 0.0.68
|
|
28
|
+
*/
|
|
29
|
+
label: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Where to place label
|
|
32
|
+
* @since 0.0.68
|
|
33
|
+
*/
|
|
34
|
+
labelPlacement?: 'top' | 'left';
|
|
35
|
+
/**
|
|
36
|
+
* Array of buttons to display (every array item must contain an unique "value" property)
|
|
37
|
+
* @since 0.0.68
|
|
38
|
+
*/
|
|
39
|
+
buttons: {
|
|
40
|
+
value: T;
|
|
41
|
+
title?: ReactChild;
|
|
42
|
+
icon?: ReactNode;
|
|
43
|
+
className?: string;
|
|
44
|
+
style?: CSSProperties;
|
|
45
|
+
}[];
|
|
46
|
+
/**
|
|
47
|
+
* Monospaced version of buttons (all button would have the same width).
|
|
48
|
+
* Attention: using it with buttons dynamic update may cause to wrong behavior!
|
|
49
|
+
* @since 0.0.68
|
|
50
|
+
*/
|
|
51
|
+
monospaced?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Should component displays as inline element?
|
|
54
|
+
* @since 0.0.68
|
|
55
|
+
*/
|
|
56
|
+
inline?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Use buttons with transparent background (ghost buttons)
|
|
59
|
+
* @since 2.3.0
|
|
60
|
+
*/
|
|
61
|
+
ghost?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* @ignore
|
|
64
|
+
*/
|
|
65
|
+
className?: string;
|
|
66
|
+
/**
|
|
67
|
+
* @ignore
|
|
68
|
+
*/
|
|
69
|
+
baseClassName?: string;
|
|
70
|
+
} & MultipleBaseProps<T>;
|
|
71
|
+
export interface SegmentedControlState<T> {
|
|
72
|
+
selected?: T | T[];
|
|
73
|
+
prevSelected?: T | T[];
|
|
74
|
+
monoWidth: number;
|
|
75
|
+
compact?: boolean;
|
|
76
|
+
}
|
|
77
|
+
export declare const SEGMENTED_CONTROL_BASE_CLASS_NAME: string;
|
|
78
|
+
/**
|
|
79
|
+
* `Segmented Control` is a group of several [Buttons](#!/Button)
|
|
80
|
+
* each of which functions as a mutually exclusive option.
|
|
81
|
+
* @since 0.0.68
|
|
82
|
+
*/
|
|
83
|
+
declare class SegmentedControl<T = unknown> extends Component<SegmentedControlProps<T>, SegmentedControlState<T>> {
|
|
84
|
+
static defaultProps: {
|
|
85
|
+
label: null;
|
|
86
|
+
labelPlacement: string;
|
|
87
|
+
monospaced: boolean;
|
|
88
|
+
multiple: boolean;
|
|
89
|
+
onChange: null;
|
|
90
|
+
inline: boolean;
|
|
91
|
+
ghost: boolean;
|
|
92
|
+
className: null;
|
|
93
|
+
baseClassName: string;
|
|
94
|
+
};
|
|
95
|
+
state: SegmentedControlState<T>;
|
|
96
|
+
static getDerivedStateFromProps<T>(props: SegmentedControlProps<T>, state: SegmentedControlState<T>): Partial<SegmentedControlState<T>>;
|
|
97
|
+
componentDidMount(): void;
|
|
98
|
+
componentDidUpdate(): void;
|
|
99
|
+
static contextType: import("react").Context<boolean | undefined>;
|
|
100
|
+
isCompact: boolean;
|
|
101
|
+
rootRef: import("react").RefObject<Element>;
|
|
102
|
+
adjustMonospaced: () => void;
|
|
103
|
+
isResponsive(): any;
|
|
104
|
+
handleChange: (value: T) => () => void;
|
|
105
|
+
compact: () => boolean;
|
|
106
|
+
uncompact: () => boolean;
|
|
107
|
+
renderControl(): JSX.Element;
|
|
108
|
+
renderDropdown(): JSX.Element;
|
|
109
|
+
renderButtonGroup(): JSX.Element;
|
|
110
|
+
render(): JSX.Element;
|
|
111
|
+
}
|
|
112
|
+
export default SegmentedControl;
|
|
@@ -17,7 +17,7 @@ export declare type TextAreaProps = {
|
|
|
17
17
|
* Textarea width.
|
|
18
18
|
* @since 1.9.0
|
|
19
19
|
*/
|
|
20
|
-
size
|
|
20
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'fill';
|
|
21
21
|
/**
|
|
22
22
|
* Adjust height automatically when multiline option is set to true.
|
|
23
23
|
* @since 1.9.0
|
|
@@ -102,6 +102,8 @@ export type { RatingProps } from './Rating';
|
|
|
102
102
|
export { default as Section } from './Section';
|
|
103
103
|
export * from './Section';
|
|
104
104
|
export { default as SegmentedControl } from './SegmentedControl';
|
|
105
|
+
export { SEGMENTED_CONTROL_BASE_CLASS_NAME } from './SegmentedControl';
|
|
106
|
+
export type { SegmentedControlProps, SegmentedControlState } from './SegmentedControl';
|
|
105
107
|
export { default as Spot } from './Spot';
|
|
106
108
|
export type { SpotProps } from './Spot';
|
|
107
109
|
export { default as SplitButton } from './SplitButton';
|