@plesk/ui-library 3.35.4 → 3.35.6

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.
Files changed (40) hide show
  1. package/cjs/components/List/List.js +1 -1
  2. package/cjs/components/Pagination/Pagination.js +3 -3
  3. package/cjs/components/Progress/Progress.js +7 -0
  4. package/cjs/components/ProgressDialog/ProgressDialog.js +10 -2
  5. package/cjs/components/SegmentedControl/SegmentedControl.js +23 -82
  6. package/cjs/components/SegmentedControl/index.js +9 -2
  7. package/cjs/components/index.js +15 -1
  8. package/cjs/index.js +1 -1
  9. package/dist/plesk-ui-library-rtl.css +1 -1
  10. package/dist/plesk-ui-library-rtl.css.map +1 -1
  11. package/dist/plesk-ui-library.css +1 -1
  12. package/dist/plesk-ui-library.css.map +1 -1
  13. package/dist/plesk-ui-library.js +80 -103
  14. package/dist/plesk-ui-library.js.map +1 -1
  15. package/dist/plesk-ui-library.min.js +5 -5
  16. package/dist/plesk-ui-library.min.js.map +1 -1
  17. package/esm/components/List/List.js +1 -1
  18. package/esm/components/Pagination/Pagination.js +3 -3
  19. package/esm/components/Progress/Progress.js +8 -1
  20. package/esm/components/ProgressDialog/ProgressDialog.js +11 -3
  21. package/esm/components/SegmentedControl/SegmentedControl.js +22 -81
  22. package/esm/components/SegmentedControl/index.js +2 -1
  23. package/esm/components/index.js +2 -1
  24. package/esm/index.js +1 -1
  25. package/package.json +5 -6
  26. package/styleguide/build/bundle.8a07b2dd.js +2 -0
  27. package/styleguide/index.html +2 -2
  28. package/types/src/components/Card/PreviewPanel.d.ts +2 -1
  29. package/types/src/components/List/ListAction.d.ts +3 -3
  30. package/types/src/components/List/ListActions.d.ts +1 -1
  31. package/types/src/components/List/ListOperation.d.ts +1 -1
  32. package/types/src/components/List/ListOperationContext.d.ts +2 -2
  33. package/types/src/components/PageHeader/PageHeader.d.ts +2 -1
  34. package/types/src/components/ProgressDialog/ProgressDialog.d.ts +2 -0
  35. package/types/src/components/SegmentedControl/SegmentedControl.d.ts +112 -0
  36. package/types/src/components/SegmentedControl/index.d.ts +3 -0
  37. package/types/src/components/Toolbar/ToolbarMenu.d.ts +1 -1
  38. package/types/src/components/index.d.ts +3 -1
  39. package/styleguide/build/bundle.17ad5082.js +0 -2
  40. /package/styleguide/build/{bundle.17ad5082.js.LICENSE.txt → bundle.8a07b2dd.js.LICENSE.txt} +0 -0
@@ -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.4</title>
7
+ <title>Plesk UI Library 3.35.6</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.17ad5082.js"></script>
29
+ <script src="build/bundle.8a07b2dd.js"></script>
30
30
  </body>
31
31
  </html>
@@ -1,4 +1,5 @@
1
1
  import { ReactNode, CSSProperties } from 'react';
2
+ import { DataAttributes } from '../../utils/types';
2
3
  import './PreviewPanel.less';
3
4
  declare type PreviewPanelProps = {
4
5
  /**
@@ -44,7 +45,7 @@ declare type PreviewPanelProps = {
44
45
  * @deprecated
45
46
  */
46
47
  html?: string;
47
- };
48
+ } & DataAttributes;
48
49
  /**
49
50
  * `PreviewPanel` component is used for displaying website preview.
50
51
  * @since 0.3.0
@@ -1,6 +1,6 @@
1
- import { ReactNode, ReactElement } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  import { IconProps } from '../Icon';
3
- declare type RenderFn = (props: {
3
+ export declare type ListActionRenderFn = (props: {
4
4
  wrap: (children: ReactNode) => ReactNode;
5
5
  }) => ReactElement | null;
6
6
  declare type ListActionProps = {
@@ -18,7 +18,7 @@ declare type ListActionProps = {
18
18
  * Content of the component.
19
19
  * @since 3.3.0
20
20
  */
21
- children?: ReactNode | RenderFn;
21
+ children?: ReactNode | ListActionRenderFn;
22
22
  /**
23
23
  * Tooltip for component.
24
24
  * @since 3.5.0
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import './ListActions.less';
3
- declare type ListActionsProps = {
3
+ export declare type ListActionsProps = {
4
4
  /**
5
5
  * @ignore
6
6
  */
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent, ReactElement, ReactNode, MouseEvent } from 'react';
2
- declare type ListOperationProps = {
2
+ export declare type ListOperationProps = {
3
3
  /**
4
4
  * Whether a critical operation or not. E.g. updating, deleting are critical operations.
5
5
  * @since 2.4.0
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- declare type Context = {
2
+ export declare type ListOperationContextType = {
3
3
  selectedRows: number | ReactNode;
4
4
  selectedRowTitle?: string | ReactNode;
5
5
  };
6
- declare const ListOperationContext: import("react").Context<Context>;
6
+ declare const ListOperationContext: import("react").Context<ListOperationContextType>;
7
7
  export default ListOperationContext;
@@ -1,4 +1,5 @@
1
1
  import { FunctionComponent, ReactNode, HTMLProps } from 'react';
2
+ import { DataAttributes } from '../../utils/types';
2
3
  import './PageHeader.less';
3
4
  declare type PageHeaderProps = {
4
5
  /**
@@ -44,7 +45,7 @@ declare type PageHeaderProps = {
44
45
  * @since 2.3.0
45
46
  */
46
47
  tabs?: ReactNode;
47
- } & HTMLProps<HTMLDivElement>;
48
+ } & HTMLProps<HTMLDivElement> & DataAttributes;
48
49
  /**
49
50
  * `PageHeader` component is used for identification of the current page.
50
51
  * @since 0.0.35
@@ -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;
@@ -0,0 +1,3 @@
1
+ export { default } from './SegmentedControl';
2
+ export { SEGMENTED_CONTROL_BASE_CLASS_NAME } from './SegmentedControl';
3
+ export type { SegmentedControlProps, SegmentedControlState } from './SegmentedControl';
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, MouseEvent } from 'react';
2
- declare type ToolbarMenuProps = {
2
+ export declare type ToolbarMenuProps = {
3
3
  onItemClick?: (e: MouseEvent) => void;
4
4
  children: ReactNode;
5
5
  };
@@ -78,7 +78,7 @@ export * from './LocaleProvider';
78
78
  export { default as Markdown } from './Markdown';
79
79
  export { default as Media, MediaSection } from './Media';
80
80
  export type { MediaSectionProps, MediaProps } from './Media';
81
- export { default as Menu, MenuDivider, MenuHeader, MenuItem, MenuSelectableItem } from './Menu';
81
+ export { default as Menu, MenuDivider, MenuHeader, MenuItem, MenuSelectableItem, MenuBaseItem, } from './Menu';
82
82
  export type { MenuProps, MenuHeaderProps, MenuDividerProps, MenuItemProps, MenuSelectableItemProps, } from './Menu';
83
83
  export { default as Overlay } from './Overlay';
84
84
  export { default as PageHeader } from './PageHeader';
@@ -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';