@plesk/ui-library 3.40.3 → 3.40.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/Badge/Badge.js +3 -1
- package/cjs/components/ItemList/ItemList.js +1 -0
- package/cjs/components/LocaleProvider/LocaleProvider.js +2 -2
- package/cjs/components/SwitchesPanelItem/SwitchesPanelItem.js +48 -77
- package/cjs/hooks/useMutationObserver.js +30 -0
- package/cjs/hooks/useSqueeze.js +10 -0
- 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 +107 -83
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +6 -6
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/Badge/Badge.js +3 -1
- package/esm/components/ItemList/ItemList.js +1 -0
- package/esm/components/LocaleProvider/LocaleProvider.js +1 -1
- package/esm/components/SwitchesPanelItem/SwitchesPanelItem.js +48 -77
- package/esm/hooks/useMutationObserver.js +23 -0
- package/esm/hooks/useSqueeze.js +10 -0
- package/esm/index.js +1 -1
- package/package.json +11 -11
- package/styleguide/build/bundle.f0d21187.js +2 -0
- package/styleguide/index.html +2 -2
- package/types/src/components/AutoClosable/AutoClosable.d.ts +2 -2
- package/types/src/components/CodeEditor/CodeEditor.d.ts +6 -4
- package/types/src/components/Drawer/DrawerProgress.d.ts +1 -1
- package/types/src/components/ExtendedStatusMessage/ExtendedStatusMessage.d.ts +1 -1
- package/types/src/components/ExtendedStatusMessage/ExtendedStatusMessageActions.d.ts +1 -1
- package/types/src/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.d.ts +1 -1
- package/types/src/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.d.ts +1 -1
- package/types/src/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.d.ts +1 -1
- package/types/src/components/ExtendedStatusMessage/index.d.ts +5 -0
- package/types/src/components/FormField/FormField.d.ts +2 -2
- package/types/src/components/FormFieldPassword/index.d.ts +1 -0
- package/types/src/components/Grid/Grid.d.ts +3 -3
- package/types/src/components/Heading/Heading.d.ts +1 -1
- package/types/src/components/Heading/index.d.ts +1 -0
- package/types/src/components/Hint/Hint.d.ts +1 -1
- package/types/src/components/Hint/index.d.ts +1 -0
- package/types/src/components/InputNumber/InputNumber.d.ts +5 -0
- package/types/src/components/ItemLink/ItemLink.d.ts +1 -1
- package/types/src/components/ItemLink/index.d.ts +1 -0
- package/types/src/components/ItemList/ItemList.d.ts +4 -4
- package/types/src/components/ItemList/index.d.ts +1 -0
- package/types/src/components/Label/Label.d.ts +3 -2
- package/types/src/components/Label/index.d.ts +1 -0
- package/types/src/components/Layout/Layout.d.ts +1 -1
- package/types/src/components/List/List.d.ts +27 -27
- package/types/src/components/LocaleProvider/LocaleProvider.d.ts +6 -1
- package/types/src/components/Markdown/index.d.ts +1 -0
- package/types/src/components/Menu/index.d.ts +1 -0
- package/types/src/components/PageHeader/PageHeader.d.ts +1 -1
- package/types/src/components/PageHeader/index.d.ts +1 -0
- package/types/src/components/Paragraph/Paragraph.d.ts +1 -1
- package/types/src/components/Paragraph/index.d.ts +1 -0
- package/types/src/components/Popover/Popover.d.ts +6 -4
- package/types/src/components/Popper/Popper.d.ts +3 -2
- package/types/src/components/Progress/Progress.d.ts +1 -1
- package/types/src/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/types/src/components/ProgressBar/index.d.ts +1 -0
- package/types/src/components/ProgressDialog/ProgressDialog.d.ts +2 -2
- package/types/src/components/Section/Section.d.ts +1 -1
- package/types/src/components/SegmentedControl/SegmentedControl.d.ts +2 -1
- package/types/src/components/Select/Select.d.ts +1 -1
- package/types/src/components/Select/SelectOption.d.ts +1 -1
- package/types/src/components/Select/SelectOptionGroup.d.ts +1 -1
- package/types/src/components/Select/index.d.ts +3 -0
- package/types/src/components/Status/Status.d.ts +3 -3
- package/types/src/components/Status/index.d.ts +2 -0
- package/types/src/components/StatusMessage/index.d.ts +1 -0
- package/types/src/components/SwitchesPanelItem/SwitchesPanelItem.d.ts +5 -20
- package/types/src/components/Tabs/Tabs.d.ts +1 -1
- package/types/src/components/Text/Text.d.ts +1 -1
- package/types/src/components/Text/index.d.ts +1 -0
- package/types/src/components/Toaster/Toaster.d.ts +1 -1
- package/types/src/components/Toaster/index.d.ts +1 -0
- package/types/src/components/Toolbar/ToolbarExpander.d.ts +1 -1
- package/types/src/components/Toolbar/ToolbarItem.d.ts +1 -1
- package/types/src/components/Toolbar/index.d.ts +1 -0
- package/types/src/components/Tour/index.d.ts +1 -0
- package/types/src/components/Translate/Translate.d.ts +1 -1
- package/types/src/components/index.d.ts +21 -4
- package/types/src/hooks/useMutationObserver.d.ts +8 -0
- package/styleguide/build/bundle.bbdb5666.js +0 -2
- /package/styleguide/build/{bundle.bbdb5666.js.LICENSE.txt → bundle.f0d21187.js.LICENSE.txt} +0 -0
|
@@ -30,7 +30,7 @@ type MultipleProps = {
|
|
|
30
30
|
onChange?: (value: Value[] | undefined) => void;
|
|
31
31
|
};
|
|
32
32
|
type MultipleBaseProps = MultipleProps | SingleProps;
|
|
33
|
-
type SelectProps = MultipleBaseProps & {
|
|
33
|
+
export type SelectProps = MultipleBaseProps & {
|
|
34
34
|
/**
|
|
35
35
|
* ID of the input.
|
|
36
36
|
*/
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { default } from './Select';
|
|
2
|
+
export type { SelectProps } from './Select';
|
|
2
3
|
export { default as SelectOption } from './SelectOption';
|
|
4
|
+
export type { SelectOptionProps } from './SelectOption';
|
|
3
5
|
export { default as SelectOptionGroup } from './SelectOptionGroup';
|
|
6
|
+
export type { SelectOptionGroupProps } from './SelectOptionGroup';
|
|
@@ -3,8 +3,8 @@ import { IconProps } from '../Icon';
|
|
|
3
3
|
import '../../helpers/base.less';
|
|
4
4
|
import './Status.less';
|
|
5
5
|
type IconType = boolean | string | IconProps | ReactElement<any>;
|
|
6
|
-
type
|
|
7
|
-
type StatusProps = {
|
|
6
|
+
export type Intent = 'danger' | 'warning' | 'success' | 'info' | 'muted' | 'inactive';
|
|
7
|
+
export type StatusProps = {
|
|
8
8
|
/**
|
|
9
9
|
* Content of the `Status`.
|
|
10
10
|
* @since 0.0.68
|
|
@@ -19,7 +19,7 @@ type StatusProps = {
|
|
|
19
19
|
* Visual intent color to apply to component.
|
|
20
20
|
* @since 0.0.68
|
|
21
21
|
*/
|
|
22
|
-
intent?:
|
|
22
|
+
intent?: Intent;
|
|
23
23
|
/**
|
|
24
24
|
* Compact version with the dot indicator instead of icon.
|
|
25
25
|
* @since 2.1.0
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { SwitchProps } from '../Switch';
|
|
3
|
+
import { DataAttributes } from '../../utils/types';
|
|
3
4
|
import '../../helpers/base.less';
|
|
4
5
|
import './SwitchesPanelItem.less';
|
|
5
|
-
export interface SwitchesPanelItemProps {
|
|
6
|
+
export interface SwitchesPanelItemProps extends DataAttributes {
|
|
6
7
|
/**
|
|
7
8
|
* A callback function, can be executed when the checked state is changing.
|
|
8
9
|
* @since 0.3.0
|
|
@@ -43,7 +44,7 @@ export interface SwitchesPanelItemProps {
|
|
|
43
44
|
* Don't place here more than three buttons (with the one from 'fullDescription' property) or one link and one button.
|
|
44
45
|
* @since 0.3.0
|
|
45
46
|
*/
|
|
46
|
-
children
|
|
47
|
+
children?: ReactNode;
|
|
47
48
|
/**
|
|
48
49
|
* @ignore
|
|
49
50
|
*/
|
|
@@ -58,21 +59,5 @@ export interface SwitchesPanelItemProps {
|
|
|
58
59
|
* Used in [SwitchesPanel](#!/SwitchesPanel).
|
|
59
60
|
* @since 0.3.0
|
|
60
61
|
*/
|
|
61
|
-
declare
|
|
62
|
-
static defaultProps: {
|
|
63
|
-
defaultChecked: boolean;
|
|
64
|
-
intent: null;
|
|
65
|
-
description: null;
|
|
66
|
-
fullDescription: null;
|
|
67
|
-
switchProps: {};
|
|
68
|
-
children: null;
|
|
69
|
-
className: null;
|
|
70
|
-
baseClassName: string;
|
|
71
|
-
};
|
|
72
|
-
state: {
|
|
73
|
-
checked: boolean | undefined;
|
|
74
|
-
};
|
|
75
|
-
handleChange: (checked: boolean) => void;
|
|
76
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
77
|
-
}
|
|
62
|
+
declare const SwitchesPanelItem: ({ onChange, defaultChecked, intent, title, description, fullDescription, className, switchProps, children, baseClassName, ...props }: SwitchesPanelItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
78
63
|
export default SwitchesPanelItem;
|
|
@@ -84,7 +84,7 @@ declare class Tabs extends Component<TabsProps, TabsState> {
|
|
|
84
84
|
searching: boolean;
|
|
85
85
|
monospacedWidth: number;
|
|
86
86
|
};
|
|
87
|
-
static getDerivedStateFromProps(props: TabsProps
|
|
87
|
+
static getDerivedStateFromProps(props: Readonly<TabsProps>, state: TabsState): Partial<TabsState>;
|
|
88
88
|
componentDidUpdate(): void;
|
|
89
89
|
widths: Widths | undefined;
|
|
90
90
|
addon: BoundingRect | undefined;
|
|
@@ -45,7 +45,7 @@ export default class Toaster extends Component<ToasterProps, ToasterState> {
|
|
|
45
45
|
position: string;
|
|
46
46
|
baseClassName: string;
|
|
47
47
|
};
|
|
48
|
-
static getDerivedStateFromProps({ toasts, maxToastsNumber }: ToasterProps): {
|
|
48
|
+
static getDerivedStateFromProps({ toasts, maxToastsNumber }: Readonly<ToasterProps>): {
|
|
49
49
|
toasts: ToastPropsWithKey[];
|
|
50
50
|
} | null;
|
|
51
51
|
static create: (props?: {}, container?: HTMLElement) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export declare const toToolbarItems: (children: ReactNode, isBeta?: boolean) => (string | number |
|
|
2
|
+
export declare const toToolbarItems: (children: ReactNode, isBeta?: boolean) => (string | number | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode>)[] | null | undefined;
|
|
@@ -3,4 +3,5 @@ export type { ToolbarProps } from './Toolbar';
|
|
|
3
3
|
export { default as ToolbarGroup } from './ToolbarGroup';
|
|
4
4
|
export type { ToolbarGroupProps } from './ToolbarGroup';
|
|
5
5
|
export { default as ToolbarExpander } from './ToolbarExpander';
|
|
6
|
+
export type { ToolbarExpanderProps } from './ToolbarExpander';
|
|
6
7
|
export { default as ToolbarBetaProvider } from './ToolbarBetaProvider';
|
|
@@ -55,5 +55,5 @@ export type TranslateProps<Component extends ElementType = 'span'> = {
|
|
|
55
55
|
* `Translate` component.
|
|
56
56
|
* @since 0.0.42
|
|
57
57
|
*/
|
|
58
|
-
declare const Translate: <Component extends ElementType = "span">({ component, content, children, params, unsafe, fallback, namespace, translators, ...props }: TranslateProps<Component>) => string | number | boolean |
|
|
58
|
+
declare const Translate: <Component extends ElementType = "span">({ component, content, children, params, unsafe, fallback, namespace, translators, ...props }: TranslateProps<Component>) => string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
59
59
|
export default Translate;
|
|
@@ -61,12 +61,15 @@ export type { FormFieldRadioButtonsProps } from './FormFieldRadioButtons';
|
|
|
61
61
|
export { default as FormFieldText } from './FormFieldText';
|
|
62
62
|
export type { FormFieldTextProps } from './FormFieldText';
|
|
63
63
|
export { default as FormFieldSelect } from './FormFieldSelect';
|
|
64
|
+
export type { FormFieldSelectProps } from './FormFieldSelect';
|
|
64
65
|
export { default as Grid } from './Grid';
|
|
65
66
|
export type { GridProps } from './Grid';
|
|
66
67
|
export { default as GridCol } from './GridCol';
|
|
67
68
|
export type { GridColProps } from './GridCol';
|
|
68
69
|
export { default as Heading } from './Heading';
|
|
70
|
+
export type { HeadingProps } from './Heading';
|
|
69
71
|
export { default as Hint } from './Hint';
|
|
72
|
+
export type { HintProps } from './Hint';
|
|
70
73
|
export { default as Icon } from './Icon';
|
|
71
74
|
export type { IconProps, IconName, IconSize } from './Icon';
|
|
72
75
|
export { default as Input } from './Input';
|
|
@@ -82,25 +85,33 @@ export * from './Select';
|
|
|
82
85
|
export { default as Item } from './Item';
|
|
83
86
|
export type { ItemProps, ItemView } from './Item';
|
|
84
87
|
export { default as ItemLink } from './ItemLink';
|
|
88
|
+
export type { ItemLinkProps } from './ItemLink';
|
|
85
89
|
export { default as ItemList } from './ItemList';
|
|
90
|
+
export type { ItemListProps } from './ItemList';
|
|
86
91
|
export { default as Label } from './Label';
|
|
92
|
+
export type { LabelProps, LabelIntent } from './Label';
|
|
87
93
|
export { default as Layout } from './Layout';
|
|
88
94
|
export type { LayoutProps } from './Layout';
|
|
89
95
|
export { default as List, ListActions, ListAction, ListOperation, ListEmptyView, ListActionsDivider, } from './List';
|
|
90
|
-
export type { ListActionsProps, ListActionProps, ListOperationProps, ListEmptyViewProps, ListActionsDividerProps, } from './List';
|
|
96
|
+
export type { ListProps, ListActionsProps, ListActionProps, ListOperationProps, ListEmptyViewProps, ListActionsDividerProps, } from './List';
|
|
91
97
|
export { default as LocaleProvider } from './LocaleProvider';
|
|
92
98
|
export * from './LocaleProvider';
|
|
93
99
|
export { default as Markdown } from './Markdown';
|
|
100
|
+
export type { MarkdownProps } from './Markdown';
|
|
94
101
|
export { default as Media, MediaSection } from './Media';
|
|
95
|
-
export type {
|
|
102
|
+
export type { MediaProps, MediaSectionProps } from './Media';
|
|
96
103
|
export { default as Menu, MenuDivider, MenuHeader, MenuItem, MenuSelectableItem, MenuBaseItem, } from './Menu';
|
|
97
|
-
export type { MenuProps, MenuHeaderProps, MenuDividerProps, MenuItemProps, MenuSelectableItemProps, } from './Menu';
|
|
104
|
+
export type { MenuProps, MenuHeaderProps, MenuDividerProps, MenuItemProps, MenuSelectableItemProps, MenuBaseItemProps, } from './Menu';
|
|
98
105
|
export { default as Overlay } from './Overlay';
|
|
106
|
+
export type { OverlayProps } from './Overlay';
|
|
99
107
|
export { default as PageHeader } from './PageHeader';
|
|
108
|
+
export type { PageHeaderProps } from './PageHeader';
|
|
100
109
|
export { default as Pagination } from './Pagination';
|
|
110
|
+
export type { PaginationProps } from './Pagination';
|
|
101
111
|
export { default as Panel } from './Panel';
|
|
102
112
|
export type { PanelProps, PanelBaseProps } from './Panel';
|
|
103
113
|
export { default as Paragraph } from './Paragraph';
|
|
114
|
+
export type { ParagraphProps } from './Paragraph';
|
|
104
115
|
export { default as Plaintext } from './Plaintext';
|
|
105
116
|
export type { PlainTextProps } from './Plaintext';
|
|
106
117
|
export { default as Popover } from './Popover';
|
|
@@ -108,6 +119,7 @@ export type { PopoverProps } from './Popover';
|
|
|
108
119
|
export { default as Progress } from './Progress';
|
|
109
120
|
export type { ProgressProps } from './Progress';
|
|
110
121
|
export { default as ProgressBar } from './ProgressBar';
|
|
122
|
+
export type { ProgressBarProps } from './ProgressBar';
|
|
111
123
|
export { default as ProgressDialog } from './ProgressDialog';
|
|
112
124
|
export type { ProgressDialogProps } from './ProgressDialog';
|
|
113
125
|
export { default as ProgressDialogStep } from './ProgressDialogStep';
|
|
@@ -125,7 +137,9 @@ export type { SpotProps } from './Spot';
|
|
|
125
137
|
export { default as SplitButton } from './SplitButton';
|
|
126
138
|
export type { SplitButtonProps } from './SplitButton';
|
|
127
139
|
export { default as Status } from './Status';
|
|
140
|
+
export type { StatusProps, StatusIntent } from './Status';
|
|
128
141
|
export { default as StatusMessage } from './StatusMessage';
|
|
142
|
+
export type { StatusMessageProps } from './StatusMessage';
|
|
129
143
|
export { default as Subnav, SubnavItem } from './Subnav';
|
|
130
144
|
export type { SubnavProps, SubnavItemProps } from './Subnav';
|
|
131
145
|
export { default as Switch } from './Switch';
|
|
@@ -137,12 +151,15 @@ export type { SwitchesPanelItemProps } from './SwitchesPanelItem';
|
|
|
137
151
|
export { default as Tabs, Tab, SearchBar } from './Tabs';
|
|
138
152
|
export type { TabsProps, TabProps, SearchBarProps } from './Tabs';
|
|
139
153
|
export { default as Text } from './Text';
|
|
154
|
+
export type { TextProps } from './Text';
|
|
140
155
|
export { default as Toaster } from './Toaster';
|
|
156
|
+
export type { ToasterProps } from './Toaster';
|
|
141
157
|
export { default as Toolbar, ToolbarGroup, ToolbarExpander, ToolbarBetaProvider } from './Toolbar';
|
|
142
|
-
export type { ToolbarGroupProps,
|
|
158
|
+
export type { ToolbarProps, ToolbarGroupProps, ToolbarExpanderProps } from './Toolbar';
|
|
143
159
|
export { default as Tooltip } from './Tooltip';
|
|
144
160
|
export type { TooltipProps } from './Tooltip';
|
|
145
161
|
export { default as Tour } from './Tour';
|
|
162
|
+
export type { TourProps } from './Tour';
|
|
146
163
|
export { default as Translate } from './Translate';
|
|
147
164
|
export type { TranslateProps } from './Translate';
|
|
148
165
|
export { default as Link } from './Link';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
type UseMutationObserverOptions<T extends HTMLElement = HTMLElement> = {
|
|
3
|
+
ref: RefObject<T>;
|
|
4
|
+
onMutate?: () => void;
|
|
5
|
+
options?: MutationObserverInit;
|
|
6
|
+
};
|
|
7
|
+
export declare const useMutationObserver: <Element_1 extends HTMLElement = HTMLElement>({ ref, onMutate, options, }: UseMutationObserverOptions<Element_1>) => void;
|
|
8
|
+
export {};
|